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