rhk_spm32_import.C

Go to the documentation of this file.
00001 /* Gnome gxsm - Gnome X Scanning Microscopy
00002  * universal STM/AFM/SARLS/SPALEED/... controlling and
00003  * data analysis software
00004  *
00005  * Gxsm Plugin Name: rhk_spm32_import.C
00006  * ========================================
00007  * 
00008  * Copyright (C) 1999 The Free Software Foundation
00009  *
00010  * Authors: Percy Zahl <zahl@users.sf.net>
00011  * additional features: Andreas Klust <klust@users.sf.net>
00012  *
00013  * This program is free software; you can redistribute it and/or modify
00014  * it under the terms of the GNU General Public License as published by
00015  * the Free Software Foundation; either version 2 of the License, or
00016  * (at your option) any later version.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program; if not, write to the Free Software
00025  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00026  */
00027 
00028 /* Please do not change the Begin/End lines of this comment section!
00029  * this is a LaTeX style section used for auto generation of the PlugIn Manual 
00030  * Chapter. Add a complete PlugIn documentation inbetween the Begin/End marks!
00031  * --------------------------------------------------------------------------------
00032 % BeginPlugInDocuSection
00033 % PlugInDocuCaption: Import of RHK SPM32 files (STM-1000 electronics).
00034 % PlugInName: rhk_spm32_import
00035 % PlugInAuthor: Andreas klust
00036 % PlugInAuthorEmail: klust@users.sf.net
00037 % PlugInMenuPath: File/Import/RHK SPM32
00038 
00039 % PlugInDescription 
00040 \label{plugins:rhk_spm32_import} 
00041 
00042 The \GxsmEmph{rhk\_spm32\_import} plug-in supports reading of files
00043 generated with the SPM32 software distributed by RHK Technology Inc.\
00044 (Troy, MI, USA).  This is the software that is usually used to control
00045 the RHK STM-1000 electronics (unless you use \Gxsm to control it :-).
00046 
00047 % PlugInUsage
00048 
00049 The plug-in is called by \GxsmMenu{File/Import/RHK SPM32}.  It is also
00050 automatically invoked by \Gxsm when opening RHK SPM32 files.
00051 
00052 % OptPlugInKnownBugs
00053 
00054 Not yet all very well tested.  At the moment, it is somewhat
00055 restricted: i) SPM32 files can contain several pages with data from,
00056 e.g., forward and backward scans.  The plug-in only reads the first
00057 page.  ii) only pages with pure images can be imported, no
00058 spectroscopy data.
00059 
00060 % EndPlugInDocuSection
00061  * -------------------------------------------------------------------------
00062  */
00063 
00064 
00065 
00066 #include <gtk/gtk.h>
00067 #include "config.h"
00068 #include "gxsm/plugin.h"
00069 #include "gxsm/dataio.h"
00070 #include "gxsm/action_id.h"
00071 
00072 #include <stdio.h>
00073 #include <time.h>
00074 #include <math.h>
00075 #include <string.h>
00076 
00077 using namespace std;
00078 
00079 #define IMGMAXCOLORS 64
00080 
00081 // Plugin Prototypes
00082 static void rhk_spm32_import_init (void);
00083 static void rhk_spm32_import_query (void);
00084 static void rhk_spm32_import_about (void);
00085 static void rhk_spm32_import_configure (void);
00086 static void rhk_spm32_import_cleanup (void);
00087 
00088 static void rhk_spm32_import_filecheck_load_callback (gpointer data );
00089 static void rhk_spm32_import_filecheck_save_callback (gpointer data );
00090 
00091 static void rhk_spm32_import_import_callback (GtkWidget *w, void *data);
00092 static void rhk_spm32_import_export_callback (GtkWidget *w, void *data);
00093 
00094 // Fill in the GxsmPlugin Description here
00095 GxsmPlugin rhk_spm32_import_pi = {
00096   NULL,                   // filled in and used by Gxsm, don't touch !
00097   NULL,                   // filled in and used by Gxsm, don't touch !
00098   0,                      // filled in and used by Gxsm, don't touch !
00099   NULL,                   // The Gxsm-App Class Ref.pointer (called "gapp" in Gxsm) is 
00100                           // filled in here by Gxsm on Plugin load, 
00101                           // just after init() is called !!!
00102   "RHK_SPM32_Import",
00103   NULL,                   // PlugIn's Categorie, set to NULL for all, I just don't want this always to be loaded!
00104   // Description, is shown by PluginViewer (Plugin: listplugin, Tools->Plugin Details)
00105   "Import of SPM32 files from RHK STM-1000 systems.",
00106   "Percy Zahl",
00107   N_("_File/_Import/"),
00108   N_("RHK SPM32"),
00109   N_("Import RHK SPM32 files."),
00110   N_("RHK SPM32 file import."),
00111   NULL,          // error msg, plugin may put error status msg here later
00112   NULL,          // Plugin Status, managed by Gxsm, plugin may manipulate it too
00113   rhk_spm32_import_init,
00114   rhk_spm32_import_query,
00115   // about-function, can be "NULL"
00116   // can be called by "Plugin Details"
00117   rhk_spm32_import_about,
00118   // configure-function, can be "NULL"
00119   // can be called by "Plugin Details"
00120   rhk_spm32_import_configure,
00121   // run-function, can be "NULL", if non-Zero and no query defined, 
00122   // it is called on menupath->"plugin"
00123   NULL,
00124   // cleanup-function, can be "NULL"
00125   // called if present at plugin removeal
00126   rhk_spm32_import_cleanup
00127 };
00128 
00129 // Text used in Aboutbox, please update!!
00130 static const char *about_text = N_("Gxsm RHK SPM32 file import plug-in\n\n"
00131                                    " "
00132         );
00133 
00134 static const char *file_mask = "*.sm2";
00135 
00136 // Symbol "get_gxsm_plugin_info" is resolved by dlsym from Gxsm, used to get Plugin's info!! 
00137 // Essential Plugin Function!!
00138 GxsmPlugin *get_gxsm_plugin_info ( void ){ 
00139   rhk_spm32_import_pi.description = g_strdup_printf(N_("Gxsm rhk_spm32_import plugin %s"), VERSION);
00140   return &rhk_spm32_import_pi; 
00141 }
00142 
00143 // Query Function, installs Plugin's in File/Import and Export Menupaths!
00144 // ----------------------------------------------------------------------
00145 // Import Menupath is "File/Import/RHK SPM32"
00146 // Export Menupath is "File/Export/RHK SPM32"
00147 // ----------------------------------------------------------------------
00148 // !!!! make sure the "rhk_spm32_import_cleanup()" function (see below) !!!!
00149 // !!!! removes the correct menuentries !!!!
00150 
00151 static void rhk_spm32_import_query(void)
00152 {
00153         gchar **path  = g_strsplit (rhk_spm32_import_pi.menupath, ",", 2);
00154         gchar **entry = g_strsplit (rhk_spm32_import_pi.menuentry, ",", 2);
00155         gchar **help  = g_strsplit (rhk_spm32_import_pi.help, ",", 2);
00156 
00157         static GnomeUIInfo menuinfo_i[] = { 
00158                 { GNOME_APP_UI_ITEM, NULL, NULL,
00159                   NULL, NULL,
00160                   NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN,
00161                   0, GDK_CONTROL_MASK, NULL },
00162                 GNOMEUIINFO_END
00163         };
00164         menuinfo_i[0].label  = entry[0];
00165         menuinfo_i[0].hint   = help[0];
00166         menuinfo_i[0].moreinfo  = (gpointer) rhk_spm32_import_import_callback; 
00167         menuinfo_i[0].user_data = rhk_spm32_import_pi.name;
00168 
00169         gnome_app_insert_menus (
00170                 GNOME_APP(rhk_spm32_import_pi.app->getApp()), 
00171                 path[0], 
00172                 menuinfo_i
00173                 );
00174         
00175 
00176         static GnomeUIInfo menuinfo_e[] = { 
00177                 { GNOME_APP_UI_ITEM, NULL, NULL,
00178                   NULL, NULL,
00179                   NULL, GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SAVE,
00180                   0, GDK_CONTROL_MASK, NULL },
00181                 GNOMEUIINFO_END
00182         };
00183         menuinfo_e[0].label  = entry[1];
00184         menuinfo_e[0].hint   = help[1];
00185         menuinfo_e[0].moreinfo  = (gpointer) rhk_spm32_import_export_callback; 
00186         menuinfo_e[0].user_data = rhk_spm32_import_pi.name;
00187 
00188 //s     gnome_app_insert_menus (
00189 //s             GNOME_APP(rhk_spm32_import_pi.app->getApp()), 
00190 //s             path[1],
00191 //s             menuinfo_e
00192 //s             );
00193 
00194         if(rhk_spm32_import_pi.status) g_free(rhk_spm32_import_pi.status); 
00195         rhk_spm32_import_pi.status = g_strconcat (
00196                 N_("Plugin query has attached "),
00197                 rhk_spm32_import_pi.name, 
00198                 N_(": File IO Filters are ready to use."),
00199                 NULL);
00200         
00201         // clean up
00202         g_strfreev (path);
00203         g_strfreev (entry);
00204         g_strfreev (help);
00205 
00206 // register this plugins filecheck functions with Gxsm now!
00207 // This allows Gxsm to check files from DnD, open, 
00208 // and cmdline sources against all known formats automatically - no explicit im/export is necessary.
00209         rhk_spm32_import_pi.app->ConnectPluginToLoadFileEvent (rhk_spm32_import_filecheck_load_callback);
00210         rhk_spm32_import_pi.app->ConnectPluginToSaveFileEvent (rhk_spm32_import_filecheck_save_callback);
00211 }
00212 
00213 
00214 // 5.) Start here with the plugins code, vars def., etc.... here.
00215 // ----------------------------------------------------------------------
00216 //
00217 
00218 
00219 // init-Function
00220 static void rhk_spm32_import_init(void)
00221 {
00222         PI_DEBUG (DBG_L2, "rhk_spm32_import Plugin Init");
00223 }
00224 
00225 // about-Function
00226 static void rhk_spm32_import_about(void)
00227 {
00228         const gchar *authors[] = { rhk_spm32_import_pi.authors, NULL};
00229         gtk_widget_show(gnome_about_new ( rhk_spm32_import_pi.name,
00230                                           VERSION,
00231                                           N_("(C) 2001 the Free Software Foundation"),
00232                                           about_text,
00233                                           authors,
00234                                           NULL, NULL, NULL
00235                                           ));
00236 }
00237 
00238 // configure-Function
00239 static void rhk_spm32_import_configure(void)
00240 {
00241         if(rhk_spm32_import_pi.app)
00242                 rhk_spm32_import_pi.app->message("rhk_spm32_import Plugin Configuration");
00243 }
00244 
00245 // cleanup-Function, make sure the Menustrings are matching those above!!!
00246 static void rhk_spm32_import_cleanup(void)
00247 {
00248         gchar **path  = g_strsplit (rhk_spm32_import_pi.menupath, ",", 2);
00249         gchar **entry = g_strsplit (rhk_spm32_import_pi.menuentry, ",", 2);
00250 
00251         gchar *tmp = g_strconcat (path[0], entry[0], NULL);
00252         gnome_app_remove_menus (GNOME_APP (rhk_spm32_import_pi.app->getApp()), tmp, 1);
00253         g_free (tmp);
00254 
00255 //      tmp = g_strconcat (path[1], entry[1], NULL);
00256 //      gnome_app_remove_menus (GNOME_APP (rhk_spm32_import_pi.app->getApp()), tmp, 1);
00257 //      g_free (tmp);
00258 
00259         g_strfreev (path);
00260         g_strfreev (entry);
00261 
00262         PI_DEBUG (DBG_L2, "Plugin Cleanup done.");
00263 }
00264 
00265 // make a new derivate of the base class "Dataio"
00266 class RHK_SPM32_ImportFile : public Dataio{
00267 public:
00268         RHK_SPM32_ImportFile(Scan *s, const char *n) : Dataio(s,n){ };
00269         virtual FIO_STATUS Read();
00270         virtual FIO_STATUS Write();
00271 private:
00272         FIO_STATUS import(const char *fname);
00273 };
00274 
00275 // sm2 import
00276 FIO_STATUS RHK_SPM32_ImportFile::Read(){
00277         FIO_STATUS ret;
00278         gchar *fname=NULL;
00279 
00280         fname = (gchar*)name;
00281 
00282         // name should have at least 4 chars: ".ext"
00283         if (fname == NULL || strlen(fname) < 4)
00284                 return  FIO_NOT_RESPONSIBLE_FOR_THAT_FILE;
00285  
00286         // check for file exists and is OK !
00287         // else open File Dlg
00288         ifstream f;
00289         f.open(fname, ios::in);
00290         if(!f.good()){
00291                 PI_DEBUG (DBG_L2, "File Error");
00292                 return status=FIO_OPEN_ERR;
00293         }
00294         f.close();
00295 
00296         // Check all known File Types:
00297         
00298         // is this a SPM32 file?
00299         if ((ret=import (fname)) !=  FIO_NOT_RESPONSIBLE_FOR_THAT_FILE)
00300                 return ret;
00301 
00302         return  FIO_NOT_RESPONSIBLE_FOR_THAT_FILE;
00303 }
00304 
00305 FIO_STATUS RHK_SPM32_ImportFile::import(const char *fname){
00306 
00307         ifstream f;
00308         char header[512];
00309         GString *comment=NULL;
00310         int datamode = 16;
00311         
00312         float xscale, yscale, zscale, xyscale, angle, xoffset, yoffset, \
00313                 zoffset, current, bias, period;
00314         char date[9], scantime[9], xunits[10], yunits[10], zunits[10], \
00315                 label[10], text[160];
00316         long int x_size, y_size, size, type, data_type, line_type, \
00317                 page_type, scandir, file_id, data_offset = 512;
00318 
00319         f.open(fname, ios::in);
00320         if (!f.good())
00321                 return status=FIO_OPEN_ERR;
00322 
00323         // read header
00324         f.read(header, 512);
00325 
00326         // Am I resposible for that file?
00327         // check for Magic No./ID at file header start:
00328         if (strncmp (header, "STiMage 3.1", 11) != 0){
00329                 f.close ();
00330                 return FIO_NOT_RESPONSIBLE_FOR_THAT_FILE;
00331         }
00332         PI_DEBUG (DBG_L2, "rhk_spm32_import.C: Identified SPM32 file.");
00333         
00334 
00335         // put some usefull values in the ui structure
00336         if(getlogin()){
00337                 scan->data.ui.SetUser (getlogin());
00338         }
00339         else{
00340                 scan->data.ui.SetUser ("unkonwn user");
00341         }
00342         time_t t; // scan start time
00343         time(&t);
00344         gchar *tmp = g_strconcat ((ctime(&t)), " (Imported)", NULL); scan->data.ui.SetDateOfScan (tmp); g_free (tmp);
00345         scan->data.ui.SetName (fname);
00346         scan->data.ui.SetOriginalName (fname);
00347         scan->data.ui.SetType ("RHK SPM32"); 
00348         // comment; may be appended later
00349         comment = g_string_new ("Imported by Gxsm from RHK SPM32 file.\n");
00350         scan->data.ui.SetComment (comment->str);
00351         g_string_free(comment, TRUE); 
00352         comment=NULL;
00353 
00354         // this is mandatory.
00355         scan->data.s.ntimes  = 1;
00356         scan->data.s.nvalues = 1;
00357     
00358         // initialize scan structure -- this is a minimum example
00359         scan->data.s.nx = 1;
00360         scan->data.s.ny = 1;
00361         scan->data.s.dx = 1;
00362         scan->data.s.dy = 1;
00363         scan->data.s.dz = -1;
00364         scan->data.s.rx = scan->data.s.nx;
00365         scan->data.s.ry = scan->data.s.ny;
00366         scan->data.s.x0 = 0;
00367         scan->data.s.y0 = 0;
00368         scan->data.s.alpha = 0;
00369 
00370         // be nice and reset this to some defined state
00371         scan->data.display.cpshigh       = 1e3;
00372         scan->data.display.cpslow        = 1.;
00373         scan->data.display.cnttime       = 1.;
00374 
00375         // set the default view parameters
00376         scan->data.display.bright = 32.;
00377         scan->data.display.contrast = 1.0;
00378 
00379         // FYI: (PZ)
00380         //  scan->data.display.vrange_z  = ; // View Range Z in base ZUnits
00381         //  scan->data.display.voffset_z = 0; // View Offset Z in base ZUnits
00382         //  scan->AutoDisplay([...]); // may be used too...
00383 
00384 
00385         //
00386         // interpret header
00387         //
00388         sscanf (header + 0x20, "%d %d %d %d %d %d %d",
00389                 &type, &data_type, &line_type, &x_size, &y_size, &size, &page_type);
00390         // only image files (type=1) supported for now:
00391         if (type != 0) {
00392                 f.close ();
00393                 return FIO_NOT_RESPONSIBLE_FOR_THAT_FILE;
00394         }
00395         // check data type; only 16 bit signed integer supported for now
00396         switch (data_type){
00397         case 1:
00398                 break;
00399         default:
00400                 f.close ();
00401                 return FIO_NOT_RESPONSIBLE_FOR_THAT_FILE;
00402                 break;
00403         }
00404         // check plausibility:
00405         if ( x_size > 2048 || y_size > 2048 || x_size < 1 || y_size < 1 ) {
00406                 f.close ();
00407                 return FIO_INVALID_FILE;
00408         }
00409         scan->data.s.nx = x_size;
00410         scan->data.s.ny = y_size;
00411         // put page type in comment
00412         comment = g_string_new (scan->data.ui.comment);
00413         switch (page_type){
00414         case 0:
00415                 g_string_sprintfa (comment, "Undefined image type.\n");
00416                 break;
00417         case 1:
00418                 g_string_sprintfa (comment, "Topographic image.\n");
00419                 break;
00420         case 2:
00421                 g_string_sprintfa (comment, "Current image.\n");
00422                 break;
00423         case 3:
00424                 g_string_sprintfa (comment, "Aux image.\n");
00425                 break;
00426         case 4:
00427                 g_string_sprintfa (comment, "Force image.\n");
00428                 break;
00429         case 5:
00430                 g_string_sprintfa (comment, "Signal image.\n");
00431                 break;
00432         case 6:
00433                 g_string_sprintfa (comment, "Image FFT transform.\n");
00434                 break;
00435         default:
00436                 g_string_sprintfa (comment, "Unknown page type.\n");
00437                 break;
00438         }
00439         scan->data.ui.SetComment (comment->str);
00440         g_string_free(comment, TRUE); 
00441         comment=NULL;
00442 
00443         sscanf (header + 0x40, "X %g %g %10s",
00444                 &xscale, &xoffset, xunits);
00445         scan->data.s.dx = fabs(xscale) * 1e10;
00446         scan->data.s.rx = scan->data.s.dx * scan->data.s.nx;
00447         scan->data.s.x0 = xoffset * 1e10;
00448 
00449         sscanf (header + 0x60, "Y %g %g %10s",
00450                 &yscale, &yoffset, yunits);
00451         scan->data.s.dy = fabs(yscale) * 1e10;
00452         scan->data.s.ry = scan->data.s.dy * scan->data.s.ny;
00453         scan->data.s.y0 = yoffset * 1e10;
00454 
00455         sscanf (header + 0x80, "Z %g %g %10s",
00456                 &zscale, &zoffset, zunits);
00457         scan->data.s.dz = fabs(zscale) * 1e10;
00458 
00459         sscanf (header + 0xA0, "XY %g G %g",
00460                 &xyscale, &angle);
00461         if (fabs(angle) < 1e-3)
00462                 angle = 0.;
00463         scan->data.s.alpha = angle;
00464 
00465         sscanf (header + 0xC0, "IV %g %g",
00466                 &current, &bias);
00467         scan->data.s.Bias = bias;
00468         scan->data.s.Current = current;
00469 
00470         sscanf (header + 0x100, "id %ld %ld",
00471                 &file_id, &data_offset);
00472         sscanf (header + 0x140, "%20s", label);
00473         strncpy (text, header + 0x160, 160);
00474         comment = g_string_new (scan->data.ui.comment);
00475         g_string_sprintfa (comment, "id: %d; label: %s.\n", file_id, label);
00476         g_string_sprintfa (comment, "%s\n", text);
00477         scan->data.ui.SetComment (comment->str);
00478         g_string_free(comment, TRUE); 
00479         comment=NULL;
00480 
00481 
00482         // Read Img Data.
00483         f.seekg(data_offset, ios::beg);
00484         scan->mem2d->Resize (scan->data.s.nx, scan->data.s.ny, ZD_SHORT);
00485         scan->mem2d->DataRead (f, 1);
00486 
00487 
00488         scan->data.orgmode = SCAN_ORG_CENTER;
00489         
00490         scan->mem2d->data->MkXLookup (-scan->data.s.rx/2., scan->data.s.rx/2.);
00491         scan->mem2d->data->MkYLookup (0., scan->data.s.ry);
00492 
00493         f.close ();
00494   
00495         // RHK SPM32 read done.
00496         return FIO_OK; 
00497 }
00498 
00499 
00500 FIO_STATUS RHK_SPM32_ImportFile::Write(){
00501 
00502         return FIO_NOT_RESPONSIBLE_FOR_THAT_FILE;
00503 
00504 }
00505 
00506 // Plugin's Notify Cb's, registered to be called on file load/save to check file
00507 // return via filepointer, it is set to Zero or passed as Zero if file has been processed!
00508 // That's all fine, you should just change the Text Stings below...
00509 
00510 
00511 static void rhk_spm32_import_filecheck_load_callback (gpointer data ){
00512         gchar **fn = (gchar**)data;
00513         if (*fn){
00514                 PI_DEBUG (DBG_L2, 
00515                           "Check File: rhk_spm32_import_filecheck_load_callback called with >"
00516                           << *fn << "<" );
00517 
00518                 Scan *dst = gapp->xsm->GetActiveScan();
00519                 if(!dst){ 
00520                         gapp->xsm->ActivateFreeChannel();
00521                         dst = gapp->xsm->GetActiveScan();
00522                 }
00523                 RHK_SPM32_ImportFile fileobj (dst, *fn);
00524 
00525                 FIO_STATUS ret = fileobj.Read(); 
00526                 if (ret != FIO_OK){ 
00527                         // I'am responsible! (But failed)
00528                         if (ret != FIO_NOT_RESPONSIBLE_FOR_THAT_FILE)
00529                                 *fn=NULL;
00530                         // no more data: remove allocated and unused scan now, force!
00531                         gapp->xsm->SetMode(-1, ID_CH_M_OFF, TRUE); 
00532                         PI_DEBUG (DBG_L2, "Read Error " << ((int)ret) << "!!!!!!!!" );
00533                 }else{
00534                         // got it!
00535                         *fn=NULL;
00536 
00537                         // Now update gxsm main window data fields
00538                         gapp->xsm->ActiveScan->GetDataSet(gapp->xsm->data);
00539                         gapp->spm_update_all();
00540                         dst->draw();
00541                 }
00542         }else{
00543                 PI_DEBUG (DBG_L2, "rhk_spm32_import_filecheck_load: Skipping" );
00544         }
00545 }
00546 
00547 static void rhk_spm32_import_filecheck_save_callback (gpointer data ){
00548         gchar **fn = (gchar**)data;
00549         if (*fn){
00550                 Scan *src;
00551                 PI_DEBUG (DBG_L2,
00552                           "Check File: rhk_spm32_import_filecheck_save_callback called with >"
00553                           << *fn << "<" );
00554 
00555                 RHK_SPM32_ImportFile fileobj (src = gapp->xsm->GetActiveScan(), *fn);
00556 
00557                 FIO_STATUS ret;
00558                 ret = fileobj.Write(); 
00559 
00560                 if(ret != FIO_OK){
00561                         // I'am responsible! (But failed)
00562                         if (ret != FIO_NOT_RESPONSIBLE_FOR_THAT_FILE)
00563                                 *fn=NULL;
00564                         PI_DEBUG (DBG_L2, "Write Error " << ((int)ret) << "!!!!!!!!" );
00565                 }else{
00566                         // write done!
00567                         *fn=NULL;
00568                 }
00569         }else{
00570                 PI_DEBUG (DBG_L2, "rhk_spm32_import_filecheck_save: Skipping >" << *fn << "<" );
00571         }
00572 }
00573 
00574 // Menu Call Back Fkte
00575 
00576 static void rhk_spm32_import_import_callback(GtkWidget *w, void *data){
00577         gchar **help = g_strsplit (rhk_spm32_import_pi.help, ",", 2);
00578         gchar *dlgid = g_strconcat (rhk_spm32_import_pi.name, "-import", NULL);
00579         gchar *fn = gapp->file_dialog(help[0], NULL, file_mask, NULL, dlgid);
00580         g_strfreev (help); 
00581         g_free (dlgid);
00582         rhk_spm32_import_filecheck_load_callback (&fn );
00583 }
00584 
00585 static void rhk_spm32_import_export_callback(GtkWidget *w, void *data){
00586         gchar **help = g_strsplit (rhk_spm32_import_pi.help, ",", 2);
00587         gchar *dlgid = g_strconcat (rhk_spm32_import_pi.name, "-export", NULL);
00588         gchar *fn = gapp->file_dialog(help[1], NULL, file_mask, NULL, dlgid);
00589         g_strfreev (help); 
00590         g_free (dlgid);
00591         rhk_spm32_import_filecheck_save_callback (&fn );
00592 }

Generated on Sat Apr 1 09:04:27 2006 for GXSM by  doxygen 1.4.6