settings_utils.h
Go to the documentation of this file.00001 #ifndef SETTINGS_UTILS_H
00002 #define SETTINGS_UTILS_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <gtk/gtk.h>
00031
00032 #define SETTINGS_GCONF_PATH "/apps/er/sys/"
00033
00034 #define GCONF_CURRENT_LOCALE SETTINGS_GCONF_PATH "global/locale"
00035 #define GCONF_LOCALE_LIST SETTINGS_GCONF_PATH "global/list_locales"
00036 #define GCONF_LANGUAGE_LIST SETTINGS_GCONF_PATH "global/list_languages"
00037
00038 #define GCONF_ROTATION_DIRECTION SETTINGS_GCONF_PATH "display/rotation"
00039 #define GCONF_USE_LIGHT SETTINGS_GCONF_PATH "sensor/use_light"
00040 #define GCONF_USE_SOUND SETTINGS_GCONF_PATH "sensor/use_sound"
00041 #define GCONF_LOCK_LEFT_SENSOR SETTINGS_GCONF_PATH "sensor/use_lock_left"
00042 #define GCONF_LOCK_MIDDLE_SENSOR SETTINGS_GCONF_PATH "sensor/use_lock_middle"
00043 #define GCONF_LOCK_RIGHT_SENSOR SETTINGS_GCONF_PATH "sensor/use_lock_right"
00044
00045 #define GCONF_FLIGHTMODE_MODE SETTINGS_GCONF_PATH "flightmode/flightmode_mode"
00046 #define GCONF_PAGETURN_INVERTED SETTINGS_GCONF_PATH "flipbar/pageturn_inverted"
00047
00048 #define GCONF_IDLE_MODE SETTINGS_GCONF_PATH "power/idle_mode"
00049 #define GCONF_MIN_STANDBY SETTINGS_GCONF_PATH "power/min_standby"
00050 #define GCONF_STANDBY_IF_PLUGGED SETTINGS_GCONF_PATH "power/standby_if_plugged"
00051
00052 #define GCONF_ENABLE_SD_CARD SETTINGS_GCONF_PATH "ctb/show_sdcard"
00053 #define GCONF_INDEX_WITH_THUMBNAILS SETTINGS_GCONF_PATH "index/add_with_metadata"
00054
00055 #define UDS_GCONF_PATH "/apps/er/uds/"
00056 #define GCONF_PAGE_MARGINS UDS_GCONF_PATH "page_margins"
00057 #define GCONF_ENABLE_ZOOMING UDS_GCONF_PATH "enable_zooming"
00058 #define GCONF_ENABLE_SCRIBBLE UDS_GCONF_PATH "enable_scribble"
00059
00060 #define GCONF_DOWNLOAD_ACCOUNT_EMAIL "/apps/er/private/ids/account/email"
00061 #define GCONF_DOWNLOAD_ACCOUNT_PASSWD "/apps/er/private/ids/account/password"
00062
00063 typedef enum
00064 {
00065 IREX_DR800SG,
00066 IREX_DR1000,
00067 IREX_DR1000S,
00068 IREX_DR1000SW,
00069 } DeviceType;
00070
00071
00072 GtkWidget* create_separator_widgets();
00073
00074
00075 void set_popup_window_style(GtkWindow* window);
00076
00077
00078 gboolean set_date_time(time_t t);
00079
00080
00081 void gconf_initialize();
00082 void gconf_finalize();
00083
00084
00085 int get_value_int(const char* key);
00086 gboolean set_value_int(const char* key, int new_value);
00087
00088
00089 gboolean get_value_bool(const char* key);
00090 gboolean set_value_bool(const char* key, gboolean new_value);
00091
00092
00093 const char* get_value_string(const char* key);
00094 gboolean set_value_string(const char* key, const char* new_value);
00095
00096
00097 GSList* get_value_string_list(const char* key);
00098
00099 GArray* get_int_array(const gchar* key);
00100 int set_int_array(const gchar* key, const GArray* new_value);
00101
00102 #endif // SETTINGS_UTILS_H