gxsm_resoucetable.C

Go to the documentation of this file.
00001 /* Gxsm - Gnome X Scanning Microscopy
00002  * universal STM/AFM/SARLS/SPALEED/... controlling and
00003  * data analysis software
00004  * 
00005  * Copyright (C) 1999,2000,2001,2002,2003 Percy Zahl
00006  *
00007  * Authors: Percy Zahl <zahl@users.sf.net>
00008  * additional features: Andreas Klust <klust@users.sf.net>
00009  * WWW Home: http://gxsm.sf.net
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00024  */
00025 
00026 /* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
00027 
00028 #include <dirent.h>
00029 #include <fnmatch.h>
00030 #include <string.h>
00031 #include <cstring>
00032 
00033 #include <locale.h>
00034 #include <libintl.h>
00035 
00036 #include <libgnome/libgnome.h>
00037 #include "glbvars.h"
00038 #include "gnome-res.h"
00039 
00040 #include "gxsm_resoucetable.h"
00041 #include "../pixmaps/gxsmdruidlogo.xpm"
00042 #include "../pixmaps/gxsmwatermark.xpm"
00043 
00044 #define UTF8_DOT       "\302\267"
00045 #define UTF8_DEGREE    "\302\260"
00046 #define UTF8_MU        "\302\265"
00047 #define UTF8_ANGSTROEM "\303\205"
00048 
00049 #define MANUAL_REF_CHANCONF N_("See Manual, section Channelsetup")
00050 #define MANUAL_REF_PROBECONF N_("See Manual, section Probesetup")
00051 
00052 gint ask_if_instrument_is_spaleed_and_hard(){ return ( IS_SPALEED_CTRL && !(IS_NOCARD) ); }
00053 gint ask_if_instrument_is_afm_and_hard(){ return ( IS_AFM_CTRL && !(IS_NOCARD) ); }
00054 gint ask_if_instrument_is_spm_and_hard(){ return ( IS_SPM_CTRL && !(IS_NOCARD) ); }
00055 
00056 // Gxsm Resource Table
00057 extern GnomeResEntryInfoType xsm_res_def[];
00058 
00059 // Have to define option lists before:
00060 gchar* TrueFalseList[]      = { "true", "false", NULL };
00061 gchar* HardwareCardListCore[]   = { "no", NULL };
00062 #define MAX_HWI 32
00063 gchar* HardwareCardList[MAX_HWI];
00064 // do not used real Angstroem or mu characters here!!!
00065 gchar* InstrumentTypeList[] = { "STM", "AFM", "SARLS", "SNOM", "SPALEED", "ELSLEED", "CCD", "SCMA", NULL }; 
00066 gchar* UserXYUnitList[]     = { "AA", "nm", "um", "mm", "BZ", "sec", "amu", "V", "1", NULL };
00067 gchar* UserZUnitList[]      = { "1", "V", "AA", "nm", "um", "mm", "nA", "pA", "nN", "Hz", "K", "CPS", "Int", NULL };
00068 gchar* PrbXunitsList[]      = { "1", "V", "AA", "nm", "um", "mm", "BZ", "sec", "amu", NULL };
00069 gchar* PrbYunitsList[]      = { "1", "V", "AA", "nm", "um", "mm", "nA", "pA", "nN", "Hz", "Amp", "logAmp", NULL };
00070 gchar* UserSliderTypeList[] = { "slider", "mover", NULL };
00071 gchar* UserFileNameConventionList[] = { "digit", "alpha", "date-time", NULL };
00072 gchar* UserAutosaveUnitList[] = { "percent", "lines", "seconds", NULL };
00073 gchar* AnalogVXYZIndexList[]  = { "0", "1", "2", "3", "4", "5", "6", "7", "8", NULL };
00074 gchar* AnalogOffsetModeList[]  = { "undefined", "DSP offset adding", "analog offset adding", NULL };
00075 gchar* GUIObjectHandleTypes[]    = { "Triangle", "Square", NULL };
00076 //gchar* List[] = { NULL };
00077 
00078 // Simple Units Symbols to append to..
00079 gchar* Unit1[] = { " " };
00080 gchar* UnitV[] = { "V" };
00081 gchar* UnitA[] = { UTF8_ANGSTROEM };
00082 gchar* UnitAV[] = { UTF8_ANGSTROEM"/V" };
00083 gchar* UnitVnA[] = { "V/nA" };
00084 gchar* UnitVnN[] = { "V/nN" };
00085 gchar* UnitVHz[] = { "V/Hz" };
00086 gchar* UniteVV[] = { "eV/V" };
00087 gchar* UnitSensi[] = { "BZ"UTF8_DOT"sqrt(eV)/V" };
00088 gchar* UnitDeg[] = {  UTF8_DEGREE };
00089 
00090 #define UNIT_AV UTF8_ANGSTROEM"/V"
00091 
00092 // Resource Definition and Information table
00093 
00094 GnomeResEntryInfoType xsm_res_def[] = {
00095         GNOME_RES_ENTRY_FIRST_NAME("GXSM_PREFERENCES_200309010000"),
00096         GNOME_RES_ENTRY_INFOTEXT 
00097   // Hardware Settings
00098         (N_("Hardware"),
00099          N_("Select the type of Low-Level Hardware Interface and connection (device): \n\n"
00100             "Gxsm itself is entirely Hardware independent, it only suggests a \n"
00101             "command compatible device to communicate with via a kernel module. \n"
00102             "In case of SPM's a intelligent SPM controller is expected. \n"
00103             "This can be a DSP card like the PCI32 or similar running the SPM software, \n"
00104             "which can specially adapted to the STM, AFM, SARLS or what ever is similar. \n\n"
00105             "In case of SPALEED it's similar, but a special SPALEED command subset is used.\n"
00106             "The hardware can be a intelligent DSP card or even a simple AD/DA/counter card, \n"
00107             "in the second case the required controller is emulated at kernel level.\n"
00108             "")
00109                 ),
00110         GNOME_RES_ENTRY_ASK_PATH_OPTION 
00111         (GNOME_RES_STRING, "Hardware/Card", "no", &xsmres.HardwareType, HardwareCardList, 
00112          N_("Hardware"),
00113          N_("Type of Hardware Interface, choice of: \n"
00114             " no: data analysis only (hardware disabled, simulation mode), \n"
00115             " XXX:SPM (SPM comandset), \n"
00116             " XXX:SPA (SPA-LEED like), \n"
00117             " and others, \n"
00118             " XXX:ccd: special ParPort CCD Cam. TC211 (CCD comandset)")
00119                 ),
00120         GNOME_RES_ENTRY_ASK_PATH
00121         ( GNOME_RES_STRING, "Hardware/Device", "/dev/sranger0", &xsmres.DSPDev,
00122           N_("Hardware"),
00123           N_("Special Character Device used for (DSP)-Control,\n"
00124              " default for DSP cards: \"/dev/pcdsps/tms320\" (new with devfs),\n"
00125              " with Kernel 2.2.x modules use \"/dev/pcdsp\"\n"
00126              " for Signal Ranger SP2 (usb-sranger.o) use  \"/dev/sranger0\"\n"
00127              " ignored in case of HardwareType=no")
00128                 ),
00129         
00130         GNOME_RES_ENTRY_INFOTEXT
00131         ( N_("Instrument"),
00132           N_("Setup of Instrument type. Btw. this is used to autoselect als essential Plug-Ins.\n"
00133              "In addition the userinterface adapts to the Instruments special needs.\n"
00134              "")
00135                 ),
00136         GNOME_RES_ENTRY_ASK_PATH_OPTION
00137         ( GNOME_RES_STRING, "Instrument/Type", "STM", &xsmres.InstrumentType, InstrumentTypeList, 
00138           N_("Instrument"), 
00139           N_("Type of Instrument, choices are:\n"
00140              " STM, AFM, SARLS, SPALEED, ELSLEED, CCD, SCMA")
00141                 ),
00142         GNOME_RES_ENTRY_ASK_PATH
00143         ( GNOME_RES_STRING, "Instrument/Name", "Quantum", &xsmres.InstrumentName,
00144           N_("Instrument"), 
00145           N_("Arbitrary Instrument Name, max. 30 chars !")
00146                 ),
00147         GNOME_RES_ENTRY_INFOTEXT_DEPEND 
00148         ( N_("Inst-SPM"),
00149           N_("SPM and IVC specific Volt to physical unit conversions:\n\n"
00150              "The default values are approximatly matching standard 1/2\" piezo tubes.\n"
00151              "\n"
00152              "In addition please check Section DataAq/... in Settings/Preferences for\n"
00153              "details about data acquisition channel setup later too and refer to manual.\n"
00154              ""),
00155           ask_if_instrument_is_spm_and_hard
00156                 ),
00157         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00158         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/XPiezoAV", "532.0", &xsmres.XPiezoAV, UnitAV, N_("Inst-SPM"),
00159           N_("STM/AFM: X Piezo Sensitivity in "UNIT_AV),
00160           ask_if_instrument_is_spm_and_hard
00161                 ),
00162         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00163         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/YPiezoAV", "532.0", &xsmres.YPiezoAV, UnitAV, N_("Inst-SPM"),
00164           N_("STM/AFM: Y Piezo Sensitivity in "UNIT_AV),
00165           ask_if_instrument_is_spm_and_hard 
00166                 ),
00167         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00168         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/ZPiezoAV", "74.0", &xsmres.ZPiezoAV, UnitAV, N_("Inst-SPM"),
00169           N_("STM/AFM: Z Piezo Sensitivity in "UNIT_AV),
00170           ask_if_instrument_is_spm_and_hard 
00171                 ),
00172         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00173         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/BiasGain", "4", &xsmres.BiasGain, Unit1, N_("Inst-SPM"),
00174           N_("STM/AFM: Bias Gain, Unit: 1 (gain between DAC-Bias-Volt and sample voltage)"),
00175           ask_if_instrument_is_spm_and_hard
00176                 ),
00177         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00178         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/nAmpere2Volt", "0.1", &xsmres.nAmpere2Volt, UnitVnA, N_("Inst-SPM"),
00179           N_("STM/AFM: Tunnel Current Gain, Unit: V/nA"),
00180           ask_if_instrument_is_afm_and_hard
00181                 ),
00182         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00183         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/nNewton2Volt", "1.0", &xsmres.nNewton2Volt, UnitVnN, N_("Inst-SPM"),
00184           N_("AFM: nano Newton to Volt calib. factor"),
00185           ask_if_instrument_is_afm_and_hard
00186                 ),
00187         GNOME_RES_ENTRY_AUTO_PATH_UNIT
00188         ( GNOME_RES_FLOAT_W_UNIT, "Instrument/dHertz2Volt", "1.0", &xsmres.dHertz2Volt, UnitVHz, N_("Inst-SPM"),
00189           N_("STM/AFM: delta Herz to Volt calib. factor")
00190                 ),
00191         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00192         ( GNOME_RES_BOOL, "Instrument/ScanOrgCenter", "true", &xsmres.ScanOrgCenter, TrueFalseList, N_("Inst-SPM"), 
00193           N_("bool: true=Offset is relative to center of scan, else center of top line")
00194                 ),
00195 
00196         // Analog defaults, Piezodrive
00197         GNOME_RES_ENTRY_INFOTEXT_DEPEND
00198         ( N_(N_("Inst-SPM")),
00199           N_("Select your default Piezodrive settings.\n"
00200              "\n"
00201              "Please have a look at the Section Analog/... in Settings/Preferences for\n"
00202              "details about in line and variable gain Piezodrive settings.\n"
00203              ""),
00204           ask_if_instrument_is_spm_and_hard
00205                 ),
00206         GNOME_RES_ENTRY_AUTO_PATH
00207         ( GNOME_RES_FLOAT,  "Analog/DigRangeIn", "32767.0" , &xsmres.DigRangeIn, N_("Inst-SPM"),
00208           N_("Max AD Digital Value corresponding to Max Voltage")
00209                 ),
00210         GNOME_RES_ENTRY_AUTO_PATH_UNIT
00211         ( GNOME_RES_FLOAT_W_UNIT,  "Analog/VoltMaxIn", "10.0", &xsmres.AnalogVMaxIn, UnitV, N_("Inst-SPM"),
00212           N_("Max Voltage of AD [V]")
00213                 ),
00214         GNOME_RES_ENTRY_AUTO_PATH
00215         ( GNOME_RES_FLOAT,  "Analog/DigRangeOut", "32747.0" , &xsmres.DigRangeOut, N_("Inst-SPM"),
00216           N_("Max DA Digital Value corresponding to Max Voltage")
00217                 ),
00218         GNOME_RES_ENTRY_AUTO_PATH_UNIT
00219         ( GNOME_RES_FLOAT_W_UNIT,  "Analog/VoltMaxOut", "2.06", &xsmres.AnalogVMaxOut, UnitV, N_("Inst-SPM"),
00220           N_("Max Voltage of DA [V]")
00221                 ),
00222 /* has to match: V[0..GAIN_POSITIONS-1] !! */
00223         GNOME_RES_ENTRY_AUTO_PATH
00224         ( GNOME_RES_FLOAT,  "Analog/V1",  "1.0", &xsmres.V[0], N_("Inst-SPM"),
00225           N_("External Amplifier Gain in Position 0")
00226                 ),
00227         GNOME_RES_ENTRY_AUTO_PATH
00228         ( GNOME_RES_FLOAT,  "Analog/V2",  "2.0", &xsmres.V[1], N_("Inst-SPM"),
00229           N_("External Amplifier Gain in Position 1")
00230                 ),
00231         GNOME_RES_ENTRY_AUTO_PATH
00232         ( GNOME_RES_FLOAT,  "Analog/V3",  "5.0", &xsmres.V[2], N_("Inst-SPM"),
00233           N_("External Amplifier Gain in Position 2")
00234                 ),
00235         GNOME_RES_ENTRY_AUTO_PATH
00236         ( GNOME_RES_FLOAT,  "Analog/V4", "10.0", &xsmres.V[3], N_("Inst-SPM"),
00237           N_("External Amplifier Gain in Position 3")
00238                 ),
00239         GNOME_RES_ENTRY_AUTO_PATH
00240         ( GNOME_RES_FLOAT,  "Analog/V5", "15.0", &xsmres.V[4], N_("Inst-SPM"),
00241           N_("External Amplifier Gain in Position 4")
00242                 ),
00243         GNOME_RES_ENTRY_AUTO_PATH
00244         ( GNOME_RES_FLOAT,  "Analog/V6", "0.1", &xsmres.V[5], N_("Inst-SPM"),
00245           N_("External Amplifier Gain in Position 5")
00246                 ),
00247         GNOME_RES_ENTRY_AUTO_PATH
00248         ( GNOME_RES_FLOAT,  "Analog/V7", "0.2", &xsmres.V[6], N_("Inst-SPM"),
00249           N_("External Amplifier Gain in Position 6")
00250                 ),
00251         GNOME_RES_ENTRY_AUTO_PATH
00252         ( GNOME_RES_FLOAT,  "Analog/V8", "0.3", &xsmres.V[7], N_("Inst-SPM"),
00253           N_("External Amplifier Gain in Position 7")
00254                 ),
00255         GNOME_RES_ENTRY_AUTO_PATH
00256         ( GNOME_RES_FLOAT,  "Analog/V9", "0.5", &xsmres.V[8], N_("Inst-SPM"),
00257           N_("External Amplifier Gain in Position 8")
00258                 ),
00259         GNOME_RES_ENTRY_ASK_PATH_OPTION_FMT_DEPEND
00260         ( GNOME_RES_INT, "Analog/VXdefault","1", &xsmres.VXdefault, AnalogVXYZIndexList, 
00261           "# %s -> x %g", xsmres.V,
00262           N_("Inst-SPM"),
00263           N_("Default Amplifier Positionindex [0,1,2,..8] used by X-Channel"),
00264           ask_if_instrument_is_spm_and_hard
00265                 ),
00266         GNOME_RES_ENTRY_ASK_PATH_OPTION_FMT_DEPEND
00267         ( GNOME_RES_INT, "Analog/VYdefault","1", &xsmres.VYdefault, AnalogVXYZIndexList, 
00268           "# %s -> x %g", xsmres.V,
00269           N_("Inst-SPM"),
00270           N_("Default Amplifier Positionindex [0,1,2,..8] used by Y-Channel"),
00271           ask_if_instrument_is_spm_and_hard
00272                 ),
00273         GNOME_RES_ENTRY_ASK_PATH_OPTION_FMT_DEPEND
00274         ( GNOME_RES_INT,    "Analog/VZdefault","2", &xsmres.VZdefault, AnalogVXYZIndexList, 
00275           "# %s -> x %g", xsmres.V,
00276           N_("Inst-SPM"),
00277           N_("Default Amplifier Positionindex [0,1,2,..8] used by Z-Channel"),
00278           ask_if_instrument_is_spm_and_hard
00279                 ),
00280 
00281         GNOME_RES_ENTRY_ASK_PATH_OPTION_FMT_DEPEND
00282         ( GNOME_RES_INT, "Analog/VX0default","1", &xsmres.VX0default, AnalogVXYZIndexList, 
00283           "# %s -> x %g", xsmres.V,
00284           N_("Inst-SPM"),
00285           N_("Default Amplifier Positionindex [0,1,2,..8] used by X-Offset-Channel"),
00286           ask_if_instrument_is_spm_and_hard
00287                 ),
00288         GNOME_RES_ENTRY_ASK_PATH_OPTION_FMT_DEPEND
00289         ( GNOME_RES_INT, "Analog/VY0default","1", &xsmres.VY0default, AnalogVXYZIndexList, 
00290           "# %s -> x %g", xsmres.V,
00291           N_("Inst-SPM"),
00292           N_("Default Amplifier Positionindex [0,1,2,..8] used by Y-Offset-Channel"),
00293           ask_if_instrument_is_spm_and_hard
00294                 ),
00295         GNOME_RES_ENTRY_ASK_PATH_OPTION_FMT_DEPEND
00296         ( GNOME_RES_INT,    "Analog/VZ0default","2", &xsmres.VZ0default, AnalogVXYZIndexList, 
00297           "# %s -> x %g", xsmres.V,
00298           N_("Inst-SPM"),
00299           N_("Default Amplifier Positionindex [0,1,2,..8] used by Z-Offset-Channel"),
00300           ask_if_instrument_is_spm_and_hard
00301                 ),
00302         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00303         ( GNOME_RES_BOOL, "Analog/AnalogOffsetAdding", "false", &xsmres.AnalogOffsetAdding, TrueFalseList, N_("Inst-SPM"), 
00304           N_("Offset adding modus for piezo amplifier:\nchoose from:\n 'DSP offset adding': false\n 'Analog offset adding': true")
00305                 ),
00306 
00307         GNOME_RES_ENTRY_INFOTEXT_DEPEND
00308         ( N_("Inst-SPA"),
00309           N_("SPA-LEED specific Volt to physical unit conversions.\n\n"
00310              "In addition some geometry parameters and sample properties are required.\n"
00311              ""),
00312           ask_if_instrument_is_spaleed_and_hard
00313                 ),
00314         GNOME_RES_ENTRY_ASK_PATH_DEPEND
00315         ( GNOME_RES_FLOAT,  "Instrument/XCalibV","10.0", &xsmres.XCalibVA, N_("Inst-SPA"),
00316           N_("SPALEED: X Calibration factor 1V am DA => +/-10V/15V at oktopol rear/front"), 
00317           ask_if_instrument_is_spaleed_and_hard
00318                 ),
00319         GNOME_RES_ENTRY_ASK_PATH_DEPEND
00320         ( GNOME_RES_FLOAT,  "Instrument/YCalibV","10.0", &xsmres.YCalibVA, N_("Inst-SPA"),
00321           N_("SPALEED: Y Calibration factor 1V am DA => +/-10V/15V at oktopol rear/front"), 
00322           ask_if_instrument_is_spaleed_and_hard
00323                 ),
00324         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00325         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/EnergyCalibVeV","100", &xsmres.EnergyCalibVeV, UniteVV, N_("Inst-SPA"),
00326           N_("SPA-LEED: Energy 2 Volt Factor"), 
00327           ask_if_instrument_is_spaleed_and_hard
00328                 ),
00329         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00330         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/Sensitivity","50.0", &xsmres.Sensitivity, UnitSensi, N_("Inst-SPA"),
00331           N_("SPA-LEED: default Sensitivity"), 
00332           ask_if_instrument_is_spaleed_and_hard
00333                 ),
00334         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00335         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/ThetaChGunInt","2.5", &xsmres.ThetaChGunInt, UnitDeg, N_("Inst-SPA"),
00336           N_("SPA-LEED: half angle between E-gun and Channeltron in internal Geom."), 
00337           ask_if_instrument_is_spaleed_and_hard
00338                 ),
00339         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00340         ( GNOME_RES_FLOAT_W_UNIT,  "Instrument/ThetaChGunExt","57.5", &xsmres.ThetaChGunExt, UnitDeg, N_("Inst-SPA"),
00341           N_("SPA-LEED: half angle between E-gun and Channeltron in external Geom."),
00342           ask_if_instrument_is_spaleed_and_hard
00343                 ),
00344   // Sample SPA-LEED
00345         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00346         ( GNOME_RES_FLOAT_W_UNIT,  "Sample/LayerDist","3.141", &xsmres.SampleLayerDist, UnitA, N_("Inst-SPA"),
00347           N_("SPA_LEED: Sample Layer Distance d0 [A] - used for Phase S calculations"), 
00348           ask_if_instrument_is_spaleed_and_hard
00349                 ),
00350         GNOME_RES_ENTRY_ASK_PATH_DEPEND_UNIT
00351         ( GNOME_RES_FLOAT_W_UNIT,  "Sample/UnitLen","5.431", &xsmres.SampleUnitLen, UnitA, N_("Inst-SPA"),
00352           N_("SPA-LEED: Sample Unit Cell Length a0 [A] - used for Phase K calibration"), 
00353           ask_if_instrument_is_spaleed_and_hard
00354                 ),
00355   
00356   
00357   // sample Channelconfiguration AFM
00358         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), 
00359                                    N_("Channel defines the variable controlled by the feedback loop:\n"
00360                                       "-> PIDSrc can be selected from ADC A1..4.\n"
00361                                       "Acquired data is the variable manipulated by the feedback loop,\n"
00362                                       "-> Z Output is always on DAC A3.\n"
00363                                       "Note: X,Y is always on DAC A0,1 and always U on A4."
00364                                       )
00365                                    ),
00366 
00367         GNOME_RES_ENTRY_AUTO_PATH
00368         ( GNOME_RES_STRING, "DataAq/PIDSrcA1", "Topo,*", xsmres.pidsrc[0], N_("DataAq"),
00369           MANUAL_REF_CHANCONF
00370                 ),
00371         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00372         ( GNOME_RES_STRING, "DataAq/PIDSrcA1-ZUnit", "AA", &xsmres.pidsrcZunit[0], UserZUnitList, N_("DataAq"),
00373           MANUAL_REF_CHANCONF
00374                 ),
00375         GNOME_RES_ENTRY_AUTO_PATH
00376         ( GNOME_RES_STRING, "DataAq/PIDSrcA1Z-Label", "Z", &xsmres.pidsrcZlabel[0], N_("DataAq"),
00377           MANUAL_REF_CHANCONF
00378                 ),
00379 
00380         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00381 
00382         GNOME_RES_ENTRY_AUTO_PATH
00383         ( GNOME_RES_STRING, "DataAq/PIDSrcA2", "-", xsmres.pidsrc[1], N_("DataAq"),
00384           MANUAL_REF_CHANCONF
00385                 ),
00386         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00387         ( GNOME_RES_STRING, "DataAq/PIDSrcA2-ZUnit", "V", &xsmres.pidsrcZunit[1], UserZUnitList, N_("DataAq"),
00388           MANUAL_REF_CHANCONF
00389                 ),
00390         GNOME_RES_ENTRY_AUTO_PATH
00391         ( GNOME_RES_STRING, "DataAq/PIDSrcA2-ZLabel", "U", &xsmres.pidsrcZlabel[1], N_("DataAq"),
00392           MANUAL_REF_CHANCONF
00393                 ),
00394 
00395         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00396 
00397         GNOME_RES_ENTRY_AUTO_PATH
00398         ( GNOME_RES_STRING, "DataAq/PIDSrcA3", "-", xsmres.pidsrc[2], N_("DataAq"),
00399           MANUAL_REF_CHANCONF
00400                 ),
00401         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00402         ( GNOME_RES_STRING, "DataAq/PIDSrcA3-ZUnit", "V", &xsmres.pidsrcZunit[2], UserZUnitList, N_("DataAq"),
00403           MANUAL_REF_CHANCONF
00404                 ),
00405         GNOME_RES_ENTRY_AUTO_PATH
00406         ( GNOME_RES_STRING, "DataAq/PIDSrcA3-ZLabel", "U", &xsmres.pidsrcZlabel[2], N_("DataAq"),
00407           MANUAL_REF_CHANCONF
00408                 ),
00409 
00410         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00411 
00412         GNOME_RES_ENTRY_AUTO_PATH
00413         ( GNOME_RES_STRING, "DataAq/PIDSrcA4", "-", xsmres.pidsrc[3], N_("DataAq"),
00414           MANUAL_REF_CHANCONF
00415                 ),
00416         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00417         ( GNOME_RES_STRING, "DataAq/PIDSrcA4-ZUnit", "V", &xsmres.pidsrcZunit[3], UserZUnitList, N_("DataAq"),
00418           MANUAL_REF_CHANCONF
00419                 ),
00420         GNOME_RES_ENTRY_AUTO_PATH
00421         ( GNOME_RES_STRING, "DataAq/PIDSrcA4-ZLabel", "U", &xsmres.pidsrcZlabel[3], N_("DataAq"),
00422           MANUAL_REF_CHANCONF
00423                 ),
00424 
00425         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), 
00426                                    N_("Source Channels for data acquisition:\n"
00427                                       "ADC A1..4")
00428                                    ),
00429 
00430         GNOME_RES_ENTRY_AUTO_PATH
00431         ( GNOME_RES_STRING, "DataAq/DataSrcA1", "AIC5-ITunnel", xsmres.daqsrc[0], N_("DataAq"),
00432           MANUAL_REF_CHANCONF
00433                 ),
00434         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00435         ( GNOME_RES_STRING, "DataAq/DataSrcA1-ZUnit", "nA", &xsmres.daqZunit[0], UserZUnitList, N_("DataAq"),
00436           MANUAL_REF_CHANCONF
00437                 ),
00438         GNOME_RES_ENTRY_AUTO_PATH
00439         ( GNOME_RES_STRING, "DataAq/DataSrcA1-ZLabel", "I", &xsmres.daqZlabel[0], N_("DataAq"),
00440           MANUAL_REF_CHANCONF
00441                 ),
00442 
00443         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00444 
00445         GNOME_RES_ENTRY_AUTO_PATH
00446         ( GNOME_RES_STRING, "DataAq/DataSrcA2", "AIC0", xsmres.daqsrc[1], N_("DataAq"),
00447           MANUAL_REF_CHANCONF
00448                 ),
00449         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00450         ( GNOME_RES_STRING, "DataAq/DataSrcA2-ZUnit", "V", &xsmres.daqZunit[1], UserZUnitList, N_("DataAq"),
00451           MANUAL_REF_CHANCONF
00452                 ),
00453         GNOME_RES_ENTRY_AUTO_PATH
00454         ( GNOME_RES_STRING, "DataAq/DataSrcA2-ZLabel", "AIC0", &xsmres.daqZlabel[1], N_("DataAq"),
00455           MANUAL_REF_CHANCONF
00456                 ),
00457 
00458         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00459 
00460         GNOME_RES_ENTRY_AUTO_PATH
00461         ( GNOME_RES_STRING, "DataAq/DataSrcA3", "AIC1", xsmres.daqsrc[2], N_("DataAq"),
00462           MANUAL_REF_CHANCONF
00463                 ),
00464         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00465         ( GNOME_RES_STRING, "DataAq/DataSrcA3-ZUnit", "V", &xsmres.daqZunit[2], UserZUnitList, N_("DataAq"),
00466           MANUAL_REF_CHANCONF
00467                 ),
00468         GNOME_RES_ENTRY_AUTO_PATH
00469         ( GNOME_RES_STRING, "DataAq/DataSrcA3-ZLabel", "AIC1", &xsmres.daqZlabel[2], N_("DataAq"),
00470           MANUAL_REF_CHANCONF
00471                 ),
00472 
00473         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00474 
00475         GNOME_RES_ENTRY_AUTO_PATH
00476         ( GNOME_RES_STRING, "DataAq/DataSrcA4", "AIC2", xsmres.daqsrc[3], N_("DataAq"),
00477           MANUAL_REF_CHANCONF
00478                 ),
00479         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00480         ( GNOME_RES_STRING, "DataAq/DataSrcA4-ZUnit", "V", &xsmres.daqZunit[3], UserZUnitList, N_("DataAq"),
00481           MANUAL_REF_CHANCONF
00482                 ),
00483         GNOME_RES_ENTRY_AUTO_PATH
00484         ( GNOME_RES_STRING, "DataAq/DataSrcA4-ZLabel", "AIC2", &xsmres.daqZlabel[3], N_("DataAq"),
00485           MANUAL_REF_CHANCONF
00486                 ),
00487 
00488         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), 
00489                                    N_("Source Channels for data acquisition:\n"
00490                                       "ADC B1..4 (Note: PC31 only)")
00491                                    ),
00492 
00493         GNOME_RES_ENTRY_AUTO_PATH
00494         ( GNOME_RES_STRING, "DataAq/DataSrcB1", "AIC3", xsmres.daqsrc[4], N_("DataAq"),
00495           MANUAL_REF_CHANCONF
00496                 ),
00497         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00498         ( GNOME_RES_STRING, "DataAq/DataSrcB1-ZUnit", "V", &xsmres.daqZunit[4], UserZUnitList, N_("DataAq"),
00499           MANUAL_REF_CHANCONF
00500                 ),
00501         GNOME_RES_ENTRY_AUTO_PATH
00502         ( GNOME_RES_STRING, "DataAq/DataSrcB1-ZLabel", "AIC3", &xsmres.daqZlabel[4], N_("DataAq"),
00503           MANUAL_REF_CHANCONF
00504                 ),
00505 
00506         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00507 
00508         GNOME_RES_ENTRY_AUTO_PATH
00509         ( GNOME_RES_STRING, "DataAq/DataSrcB2", "AIC4", xsmres.daqsrc[5], N_("DataAq"),
00510           MANUAL_REF_CHANCONF
00511                 ),
00512         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00513         ( GNOME_RES_STRING, "DataAq/DataSrcB2-ZUnit", "V", &xsmres.daqZunit[5], UserZUnitList, N_("DataAq"),
00514           MANUAL_REF_CHANCONF
00515                 ),
00516         GNOME_RES_ENTRY_AUTO_PATH
00517         ( GNOME_RES_STRING, "DataAq/DataSrcB2-ZLabel", "AIC4", &xsmres.daqZlabel[5], N_("DataAq"),
00518           MANUAL_REF_CHANCONF
00519                 ),
00520 
00521         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00522 
00523         GNOME_RES_ENTRY_AUTO_PATH
00524         ( GNOME_RES_STRING, "DataAq/DataSrcB3", "-", xsmres.daqsrc[6], N_("DataAq"),
00525           MANUAL_REF_CHANCONF
00526                 ),
00527         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00528         ( GNOME_RES_STRING, "DataAq/DataSrcB3-ZUnit", "V", &xsmres.daqZunit[6], UserZUnitList, N_("DataAq"),
00529           MANUAL_REF_CHANCONF
00530                 ),
00531         GNOME_RES_ENTRY_AUTO_PATH
00532         ( GNOME_RES_STRING, "DataAq/DataSrcB3-ZLabel", "AuxB3", &xsmres.daqZlabel[6], N_("DataAq"),
00533           MANUAL_REF_CHANCONF
00534                 ),
00535 
00536         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00537 
00538         GNOME_RES_ENTRY_AUTO_PATH
00539         ( GNOME_RES_STRING, "DataAq/DataSrcB4", "-", xsmres.daqsrc[7], N_("DataAq"),
00540           MANUAL_REF_CHANCONF
00541                 ),
00542         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00543         ( GNOME_RES_STRING, "DataAq/DataSrcB4-ZUnit", "V", &xsmres.daqZunit[7], UserZUnitList, N_("DataAq"),
00544           MANUAL_REF_CHANCONF
00545                 ),
00546         GNOME_RES_ENTRY_AUTO_PATH
00547         ( GNOME_RES_STRING, "DataAq/DataSrcB4-ZLabel", "AuxB4", &xsmres.daqZlabel[7], N_("DataAq"),
00548           MANUAL_REF_CHANCONF
00549                 ),
00550 
00551 
00552         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), 
00553                                    N_("Source Channels C1,D1:\n"
00554                                       "DSP generated data")
00555                                    ),
00556 
00557         GNOME_RES_ENTRY_AUTO_PATH
00558         ( GNOME_RES_STRING, "DataAq/DataSrcC1", "dIdV", xsmres.daqsrc[8], N_("DataAq"),
00559           MANUAL_REF_CHANCONF
00560                 ),
00561         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00562         ( GNOME_RES_STRING, "DataAq/DataSrcC1-ZUnit", "a.u.", &xsmres.daqZunit[8], UserZUnitList, N_("DataAq"),
00563           MANUAL_REF_CHANCONF
00564                 ),
00565         GNOME_RES_ENTRY_AUTO_PATH
00566         ( GNOME_RES_STRING, "DataAq/DataSrcC1-ZLabel", "LockIn1st", &xsmres.daqZlabel[8], N_("DataAq"),
00567           MANUAL_REF_CHANCONF
00568                 ),
00569 
00570         GNOME_RES_ENTRY_SEPARATOR (N_("DataAq"), NULL),
00571 
00572         GNOME_RES_ENTRY_AUTO_PATH
00573         ( GNOME_RES_STRING, "DataAq/DataSrcD1", "ddIdV", xsmres.daqsrc[9], N_("DataAq"),
00574           MANUAL_REF_CHANCONF
00575                 ),
00576         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00577         ( GNOME_RES_STRING, "DataAq/DataSrcD1-ZUnit", "a.u.", &xsmres.daqZunit[9], UserZUnitList, N_("DataAq"),
00578           MANUAL_REF_CHANCONF
00579                 ),
00580         GNOME_RES_ENTRY_AUTO_PATH
00581         ( GNOME_RES_STRING, "DataAq/DataSrcD1-ZLabel", "LockIn2nd", &xsmres.daqZlabel[9], N_("DataAq"),
00582           MANUAL_REF_CHANCONF
00583                 ),
00584 
00585   // Data storage defaults
00586         GNOME_RES_ENTRY_AUTO_PATH
00587         ( GNOME_RES_STRING, "Paths/Logfiles", "~", &xsmres.LogFilePath, N_("Paths"),
00588           N_("where to put logfiles")
00589                 ),
00590         GNOME_RES_ENTRY_AUTO_PATH
00591         ( GNOME_RES_STRING, "Paths/Data", ".", &xsmres.DataPath, N_("Paths"),
00592           N_("default data path")
00593                 ),
00594         GNOME_RES_ENTRY_AUTO_PATH
00595         ( GNOME_RES_STRING, "Paths/RemoteFifo", "remote", &xsmres.RemoteFifo, N_("Paths"),
00596           N_("path/name of remote control fifo, read cmds")
00597                 ),
00598         GNOME_RES_ENTRY_AUTO_PATH
00599         ( GNOME_RES_STRING, "Paths/RemoteFifoOut", "remoteecho", &xsmres.RemoteFifoOut, N_("Paths"),
00600           N_("path/name of remote control fifo, status out")
00601                 ),
00602         GNOME_RES_ENTRY_AUTO_PATH
00603         ( GNOME_RES_STRING, "Paths/Plugins", ".", &xsmres.UserPluginPath, N_("Paths"),
00604           N_("searchpath to additional GxsmPlugins")
00605                 ),
00606         GNOME_RES_ENTRY_AUTO_PATH
00607         ( GNOME_RES_STRING, "Paths/GxsmPalette", PACKAGE_PALETTE_DIR, &xsmres.GxsmPalettePath, N_("Paths"),
00608           N_("searchpath to Gxsm Palette Pixmaps (1024x1 ACSII .pnm)")
00609                 ),
00610         GNOME_RES_ENTRY_AUTO_PATH
00611         ( GNOME_RES_STRING, "Paths/UserPalette", ".", &xsmres.UserPalettePath, N_("Paths"),
00612           N_("searchpath to additional Gxsm Palette Pixmaps (1024x1 ACSII .pnm)")
00613                 ),
00614   
00615 
00616         // User configuration
00617         GNOME_RES_ENTRY_INFOTEXT
00618         ( N_("User"),
00619           N_("User interface specific adjustments.\n"
00620              "Have a look at the Preferences Dialog later for some more...\n"
00621              "")
00622                 ),
00623         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00624         ( GNOME_RES_BOOL, "User/SaveWindowGeometry", "true", &xsmres.geomsave, TrueFalseList, N_("User"), 
00625           N_("bool: true=save window positions, false: do not")
00626                 ),
00627         GNOME_RES_ENTRY_ASK_PATH_OPTION
00628         ( GNOME_RES_STRING, "User/XYUnit","nm", &xsmres.Unit, UserXYUnitList, N_("User"),
00629           N_("XY Unit alias, choose one of: AA ("UTF8_ANGSTROEM"), nm, um ("UTF8_MU"m), mm, BZ, sec, V, 1")
00630                 ),
00631         GNOME_RES_ENTRY_ASK_PATH
00632         ( GNOME_RES_INT, "User/HiLoDelta", "4", &xsmres.HiLoDelta, N_("User"), 
00633           N_("Gridsize used by Autodisp, e.g: 1: all Pixels are examined")
00634                 ),
00635 
00636         GNOME_RES_ENTRY_SEPARATOR (N_("User"), N_("Y limit in log view of profile.")),
00637 
00638         GNOME_RES_ENTRY_AUTO_PATH
00639         ( GNOME_RES_FLOAT,  "User/ProfileLogLimit","1e-20", &xsmres.ProfileLogLimit, N_("User"),
00640           N_("Minimal Y value allwed in profile view in log view mode.")
00641                 ),
00642   
00643         GNOME_RES_ENTRY_SEPARATOR (N_("User"), NULL),
00644 
00645         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00646         ( GNOME_RES_STRING, "User/FileNameConvention", "digit", &xsmres.FileNameConvention, UserFileNameConventionList, N_("User"),
00647           N_("File numbering mode: digit, alpha")
00648                 ),
00649 
00650         // Autosave improvements
00651         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00652         ( GNOME_RES_STRING, "User/AutosaveUnit", "percent", &xsmres.AutosaveUnit, UserAutosaveUnitList, N_("User"), 
00653           N_("Autosaveunit: Save every percent, lines, seconds")
00654                 ),
00655         GNOME_RES_ENTRY_AUTO_PATH
00656         ( GNOME_RES_INT, "User/AutosaveValue", "100", &xsmres.AutosaveValue, N_("User"), 
00657           N_("Rate of Autosaves, depending on Unit.")
00658           ),
00659         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00660         ( GNOME_RES_STRING, "User/AutosaveOverwritemode", "false", &xsmres.AutosaveOverwritemode, TrueFalseList, N_("User"), 
00661           N_("true = Overwrite unasked during Autosave, false = ask before overwrite")
00662           ),
00663 
00664 
00665         GNOME_RES_ENTRY_SEPARATOR (N_("User"), NULL),
00666         GNOME_RES_ENTRY_AUTO_PATH
00667         ( GNOME_RES_INT, "User/LoadDelay", "10", &xsmres.LoadDelay, N_("User"), 
00668           N_("Delay after loading file in 1/10s:\n"
00669              "if zero no waiting for pending events.")
00670           ),
00671 
00672         GNOME_RES_ENTRY_SEPARATOR (N_("User"), NULL),
00673 
00674         GNOME_RES_ENTRY_ASK_PATH_OPTION_DEPEND
00675         ( GNOME_RES_STRING, "User/SliderControlType", "slider", &xsmres.SliderControlType, UserSliderTypeList, N_("User"),
00676           N_("Slider/Approch control type:\n"
00677              " slider: Omicron Box/similar, single steps via DSP's digital IO,\n"
00678              " mover: Mover/Besocke via sawtooth like ramp voltages from Piezodrive"),
00679           ask_if_instrument_is_spm_and_hard
00680                 ),
00681 
00682         GNOME_RES_ENTRY_ASK_PATH_OPTION
00683         ( GNOME_RES_STRING, "User/Palette", PACKAGE_PALETTE_DIR G_DIR_SEPARATOR_S "xxsmpalette.pnm", &xsmres.Palette, xsmres.PalPathList, N_("User"), 
00684           N_("Path/name of your favorite palette, (1024x1 pnm RGB Bitmap (ascii))")
00685                 ),
00686 
00687         GNOME_RES_ENTRY_SEPARATOR (N_("User"), NULL),
00688 
00689         GNOME_RES_ENTRY_ASK_PATH
00690         ( GNOME_RES_STRING, "User/griplottitle", "Gxsm Profile Plot", &xsmres.griplottitle, N_("User"), 
00691           N_("Title used in plots")
00692                 ),
00693         GNOME_RES_ENTRY_ASK_PATH
00694         ( GNOME_RES_STRING, "User/command1", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot1d-1.gri.sh", &xsmres.gricmd1d[0], N_("User"), 
00695           N_("Path/name of your 1d profile plot file #1")
00696                 ),
00697         GNOME_RES_ENTRY_ASK_PATH
00698         ( GNOME_RES_STRING, "User/command2", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot1d-2.gri.sh", &xsmres.gricmd1d[1], N_("User"), 
00699           N_("Path/name of your 1d profile plot file #2")
00700                 ),
00701         GNOME_RES_ENTRY_ASK_PATH
00702         ( GNOME_RES_STRING, "User/command3", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot1d-3.gri.sh", &xsmres.gricmd1d[2], N_("User"), 
00703           N_("Path/name of your 1d profile plot file #3")
00704                 ),
00705         GNOME_RES_ENTRY_ASK_PATH
00706         ( GNOME_RES_STRING, "User/command4", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot1d-4.gri.sh", &xsmres.gricmd1d[3], N_("User"), 
00707           N_("Path/name of your 1d profile plot file #4")
00708                 ),
00709         GNOME_RES_ENTRY_ASK_PATH
00710         ( GNOME_RES_STRING, "User/command5", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot1d-xmgrace.sh", &xsmres.gricmd1d[4], N_("User"), 
00711           N_("Path/name of your 1d profile plot file #5")
00712                 ),
00713         GNOME_RES_ENTRY_ASK_PATH
00714         ( GNOME_RES_STRING, "User/command6", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot1d-matplot.py", &xsmres.gricmd1d[5], N_("User"), 
00715           N_("Path/name of your 1d profile plot file #6")
00716                 ),
00717 
00718         GNOME_RES_ENTRY_SEPARATOR (N_("User"), NULL),
00719 
00720         GNOME_RES_ENTRY_ASK_PATH
00721         ( GNOME_RES_STRING, "User/2d-gricmdfile1", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot2d-1.gri", &xsmres.gricmd2d[0], N_("User"), 
00722           N_("Path/name of your 2d gri cmd file #1")
00723                 ),
00724         GNOME_RES_ENTRY_ASK_PATH
00725         ( GNOME_RES_STRING, "User/2d-gricmdfile2", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot2d-2.gri", &xsmres.gricmd2d[1], N_("User"), 
00726           N_("Path/name of your 2d gri cmd file #2")
00727                 ),
00728         GNOME_RES_ENTRY_ASK_PATH
00729         ( GNOME_RES_STRING, "User/2d-gricmdfile3", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot2d-3.gri", &xsmres.gricmd2d[2], N_("User"), 
00730           N_("Path/name of your 2d gri cmd file #3")
00731                 ),
00732         GNOME_RES_ENTRY_ASK_PATH
00733         ( GNOME_RES_STRING, "User/2d-gricmdfile4", PACKAGE_PROFILEPLOT_DIR G_DIR_SEPARATOR_S "gxsmplot2d-4.gri", &xsmres.gricmd2d[3], N_("User"), 
00734           N_("Path/name of your 2d gri cmd file #4")
00735                 ),
00736 
00737         GNOME_RES_ENTRY_SEPARATOR (N_("User"), NULL),
00738 
00739         GNOME_RES_ENTRY_FONTSEL
00740         ( "User/ProfileTicFont", "Profile Ticmarks Font", "Arial 8", 
00741           &xsmres.ProfileTicFont, N_("User"), 
00742           N_("Pic a font used for tickmarks of the profile view."), 
00743           NULL
00744                 ),
00745         GNOME_RES_ENTRY_FONTSEL
00746         ( "User/ProfileLabFont", "Profile Label Font", "Arial 10", 
00747           &xsmres.ProfileLabFont, N_("User"), 
00748           N_("Pic a font used for X and Y labels of the profile view."), 
00749           NULL
00750                 ),
00751         GNOME_RES_ENTRY_AUTO_PATH
00752         ( GNOME_RES_INT, "User/ProfileOrgMode", "0", &xsmres.LineProfileOrgMode, N_("User"), 
00753           N_("Origin Modus for Line Profile: 0: ZeroLeft, 1: ZeroCenter, 2:PrjX, 3:PrjY")
00754           ),
00755 
00756         GNOME_RES_ENTRY_SEPARATOR (N_("User"), NULL),
00757 
00758         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00759         ( GNOME_RES_BOOL, "User/MenuTooltips", "true", &xsmres.menutooltips, TrueFalseList, N_("User"), 
00760           N_("Enable Menu Tooltips: true|false")
00761                 ),
00762 
00763         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00764         ( GNOME_RES_BOOL, "User/AcceptDatK0", "false", &xsmres.datnullok, TrueFalseList, N_("User"),
00765           N_("Accept Dat Kennung 0x000, Attention this is a safety hole if enabled !")
00766                 ),
00767 
00768         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00769         ( GNOME_RES_BOOL, "GUI/layerfields", "true", &xsmres.gui_layerfields, TrueFalseList, N_("GUI"),
00770           N_("Select here, if you want use layered (3d) scans.")
00771                 ),
00772 
00773         GNOME_RES_ENTRY_SEPARATOR (N_("GUI"), NULL),
00774 
00775         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00776         ( GNOME_RES_STRING, "GUI/HandleType", GUIObjectHandleTypes[0], 
00777           &xsmres.HandleType, GUIObjectHandleTypes, N_("GUI"), 
00778           N_("Select shape for object handle type")
00779                 ),
00780 
00781         GNOME_RES_ENTRY_COLORSEL
00782         ( "GUI/ObjHandleActiveBgColor", "ObjHandleActiveBgColor", "0 1 1 0.3", 
00783           &xsmres.HandleActBgColor, N_("GUI"),
00784           N_("Object Handle Bg Color, active [red, green, blue, alpha]"), NULL
00785                 ),
00786 
00787         GNOME_RES_ENTRY_COLORSEL
00788         ( "GUI/ObjHandleInActiveBgColor", "ObjHandleInActiveBgColor", "0.6 0.6 0.6 0.3", 
00789           &xsmres.HandleInActBgColor, N_("GUI"),
00790           N_("Object Handle Bg Color, inactive [red, green, blue, alpha]"), NULL
00791                 ),
00792 
00793         GNOME_RES_ENTRY_AUTO_PATH
00794         ( GNOME_RES_INT,  "GUI/HandleLineWidth","1", &xsmres.HandleLineWidth, N_("GUI"),
00795           N_("Width of handle outline in pixels")
00796                 ),
00797 
00798         GNOME_RES_ENTRY_AUTO_PATH
00799         ( GNOME_RES_INT,  "GUI/ObjectLineWidth","2", &xsmres.ObjectLineWidth, N_("GUI"),
00800           N_("Line width of object (connections) in pixels")
00801                 ),
00802 
00803         GNOME_RES_ENTRY_COLORSEL
00804         ( "GUI/ObjLabColor", "ObjectLabelColor", "1 0 0 1", 
00805           &xsmres.ObjectLabColor, N_("GUI"),
00806           N_("Object Label Color [red, green, blue, alpha]"), NULL
00807                 ),
00808 
00809         GNOME_RES_ENTRY_FONTSEL
00810         ( "GUI/ObjLabFont", "Object Label Font", "Sans Bold 12", 
00811           &xsmres.ObjectLabFont, N_("GUI"),
00812           N_("Select object label font."), NULL
00813                 ),
00814 
00815         GNOME_RES_ENTRY_AUTO_PATH_OPTION
00816         ( GNOME_RES_BOOL, "GUI/AntialiasCanvas", "true", &xsmres.antialiascanvas, TrueFalseList, N_("GUI"),
00817           N_("Enable Antialas Mode in Canvas View, transparency etc.")
00818                 ), 
00819 
00820         GNOME_RES_ENTRY_LAST
00821 };
00822 
00823 void gxsm_init_dynamic_res(){
00824         for (int i=0; i<MAXPALANZ; ++i)
00825                 xsmres.PalPathList[i] = NULL;
00826 }
00827 
00828 // Directory File Selection Stuff
00829 #ifdef IS_MACOSX
00830 int select_pnm(struct dirent *item){ return !fnmatch("*.pnm", item->d_name, 0); }
00831 #else
00832 int select_pnm(const struct dirent *item){ return !fnmatch("*.pnm", item->d_name, 0); }
00833 #endif
00834 
00835 // Fill HwI selection list
00836 void gxsm_search_for_HwI(){
00837         int i,j,k;
00838         for (k=0; HardwareCardListCore[k] && k<MAX_HWI-1; ++k)
00839                 HardwareCardList[k] = HardwareCardListCore[k];  
00840 
00841         XsmRescourceManager xrm("HardwareInterfaces");
00842         xrm.Get ("HwI-count", &i);
00843 
00844         for (j=0; j<i && k<MAX_HWI-1; ++j, ++k){
00845                 gchar *key;
00846                 key = g_strdup_printf ("HwI-%02d", j);
00847                 HardwareCardList[k] = xrm.GetStr (key);
00848                 g_free (key);
00849         }
00850         
00851         HardwareCardList[k] = NULL;
00852 }
00853 
00854 void gxsm_search_for_palette(){
00855         struct dirent **namelist;
00856         int n, palnum;
00857 
00858         palnum=0;
00859 
00860         n = scandir (xsmres.GxsmPalettePath, &namelist, select_pnm, alphasort);
00861         if (n < 0){
00862                 gchar *message = g_strconcat ("Please check Gxsm preferences, Path/Palette: Could not find Gxsm palette files in <",
00863                                               xsmres.GxsmPalettePath,
00864                                               ">, reason is: ", g_strerror(errno),
00865                                               NULL);
00866                 XSM_DEBUG_WARNING (DBG_EVER, message);
00867                 GtkWidget *dialog = gtk_message_dialog_new (NULL,
00868                                                             GTK_DIALOG_DESTROY_WITH_PARENT,
00869                                                             GTK_MESSAGE_WARNING,
00870                                                             GTK_BUTTONS_OK,
00871                                                             message);
00872                 gtk_dialog_run (GTK_DIALOG (dialog));
00873                 gtk_widget_destroy (dialog);
00874                 g_free (message);
00875         } else {
00876                 while(n--) {
00877                         if (palnum < MAXPALANZ){
00878                                 if (xsmres.PalPathList[palnum])
00879                                         g_free (xsmres.PalPathList[palnum]);
00880 
00881                                 xsmres.PalPathList[palnum++] = g_strconcat (xsmres.GxsmPalettePath, 
00882                                                                             "/", 
00883                                                                             namelist[n]->d_name, 
00884                                                                             NULL);
00885                         }
00886                         free(namelist[n]);
00887                 }
00888                 free(namelist);
00889         }
00890 
00891         n = scandir(xsmres.UserPalettePath, &namelist, select_pnm, alphasort);
00892         if (n < 0)
00893                 g_warning ("Could not find User palette files: %s\n",
00894                            g_strerror(errno));
00895         else {
00896                 while(n--) {
00897                         if (palnum < MAXPALANZ){
00898                                 if (xsmres.PalPathList[palnum])
00899                                         g_free (xsmres.PalPathList[palnum]);
00900 
00901                                 xsmres.PalPathList[palnum++] = g_strconcat (xsmres.UserPalettePath, 
00902                                                                             "/", 
00903                                                                             namelist[n]->d_name, 
00904                                                                             NULL);
00905                         }
00906                         free(namelist[n]);
00907                 }
00908                 free(namelist);
00909         }
00910 
00911         xsmres.PalPathList[palnum] = NULL;
00912 }
00913 
00914 void gxsm_check_new_user_config()
00915 {
00916         int FirstStart;
00917 
00918         XsmRescourceManager xrm ("GUI-global", "System");
00919         if (!xrm.GetStr ("First-Start-Key", NULL)){
00920                 xrm.Put ("First-Start-Key", "key");
00921                 FirstStart = TRUE;
00922         } else
00923                 FirstStart = xrm.GetBool ("First-Start", TRUE);
00924         
00925         if(FirstStart || xsmres.force_config ){
00926                 gxsm_search_for_HwI();
00927 
00928                 GdkPixbuf *logo      = gdk_pixbuf_new_from_xpm_data (gxsmdruidlogo_xpm);
00929                 GdkPixbuf *watermark = gdk_pixbuf_new_from_xpm_data (gxsmwatermark_xpm);
00930 
00931                 gchar *title = 
00932                         g_strdup ( _("Configure GXSM") );
00933                 gchar *welcome = 
00934                         g_strdup ( _("Welcome to GXSM!") );
00935                 gchar *intro_text = 
00936                         g_strdup ( _("You seem to be running GXSM for the first time.\n"
00937                                     "The following steps will set up GXSM by asking you\n"
00938                                     "about all mandatory settings.\n"
00939                                     "\n"
00940                                     "If you are going to setup a SPM, SPA-LEED or\n"
00941                                     "other 2D data acquisition Instrument, you will\n"
00942                                     "need all the calibration parameters, which will\n"
00943                                     "convert the ADC/DAC Voltages to corresponding\n"
00944                                     "physical dimension.\n"
00945                                     "\n"
00946                                     "Note: You can review and change all values later\n"
00947                                     "using the Preferences Dialog.\n"
00948                                     ""
00949                                           ) );
00950         
00951                 gchar *finish = 
00952                         g_strdup ( _("Congratulation") );
00953                 gchar *final_text = 
00954                         g_strdup ( _("GXSM is now ready to go!\n"
00955                                     "\n"
00956                                     "You can review and change all values later\n"
00957                                     "unsig the Preferences Dialog from Settings menu\n"
00958                                     "or starting over GXSM like:\n"
00959                                     "\"gxsm --force-configure\"\n"
00960                                     "This will not replace you previous values with the\n"
00961                                     "defaults! Instead remove \"~/.gnome/gxsm\".\n"
00962                                     "\n"
00963                                     "Have fun,\n       your GXSM developer team.\n"
00964                                     ""
00965                                           ) );
00966 
00967                 GnomeResNewUserDruid *my_druid = gnome_res_new_user_druid_new_with_vals (
00968                         xsm_res_def, title, 
00969                         logo, watermark, 
00970                         welcome, intro_text,  
00971                         finish, final_text
00972                         );
00973         
00974                 if (gnome_res_new_user_druid_run_druids (my_druid) == GNOME_RES_DRUID_FINISH)
00975                         FirstStart=0;
00976         
00977                 gnome_res_new_user_druid_destroy (my_druid);
00978         
00979 //              gobject_... destroy?? (logo);  ??? fixme!
00980 //              gobject_... destroy?? (watermark); ??? fixme!
00981                 g_free (title);
00982                 g_free (welcome);
00983                 g_free (intro_text);
00984                 g_free (finish);
00985                 g_free (final_text);
00986         }
00987 
00988         xrm.PutBool ("First-Start", FirstStart);
00989 }

Generated on Sat Apr 1 09:03:59 2006 for GXSM by  doxygen 1.4.6