1 #ifndef window_h 2 #define window_h 3 4 #include <stdbool.h> 5 6 #include "isomaster.h" 7 #ifndef USE_SYSTEM_INIPARSER 8 #include "iniparser-4.1/src/iniparser.h" 9 #else 10 #include <iniparser.h> 11 #endif 12 #define ISOMASTER_DEFAULT_WINDOW_WIDTH 500 13 #define ISOMASTER_DEFAULT_WINDOW_HEIGHT 550 14 #define ISOMASTER_DEFAULT_TOPPANE_HEIGHT 170 15 16 /* not putting this in the makefile because i really can't think of a 17 * distro that doesn't have a writeable /tmp directory */ 18 #define DEFAULT_TEMP_DIR "/tmp" 19 20 typedef struct 21 { 22 /* stuff only read from the config file */ 23 int windowWidth; 24 int windowHeight; 25 int topPaneHeight; 26 const char* fsCurrentDir; 27 int isoSortColumnId; 28 int isoSortDirection; 29 int fsSortColumnId; 30 int fsSortDirection; 31 char* recentlyOpen[5]; 32 33 /* stuff read from the config file that will also be written back from here */ 34 bool showHiddenFilesFs; 35 bool sortDirectoriesFirst; 36 bool scanForDuplicateFiles; 37 bool followSymLinks; 38 char* lastIsoDir; 39 bool appendExtension; 40 char* lastBootRecordDir; 41 char* fsDrive; 42 char* editor; 43 char* viewer; 44 char* tempDir; 45 bool caseSensitiveSort; 46 47 /* stuf that's never in the config file, but is a setting */ 48 int filenameTypesToWrite; 49 50 } AppSettings; 51 52 typedef struct 53 { 54 GtkWidget* dialog; 55 GtkWidget* scanForDuplicateFiles; 56 GtkWidget* followSymlinks; 57 GtkWidget* editor; 58 GtkWidget* viewer; 59 GtkWidget* tempDir; 60 61 } PrefWidgets; 62 63 void buildImagePropertiesWindow(GtkWidget *widget, GdkEvent *event); 64 void findHomeDir(void); 65 void getDefaultTempDir(char** destStr); 66 void openConfigFile(char* configFilePathAndName); 67 void loadSettings(void); 68 void scanForDuplicatesCbk(GtkButton* button, gpointer data); 69 void showPreferencesWindowCbk(GtkButton* button, gpointer data); 70 void writeSettings(void); 71 72 #endif 73