diff options
author | rbuj <[email protected]> | 2020-12-04 15:45:50 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2020-12-10 15:35:41 +0100 |
commit | 5c2cfd426c816c6cddfb2e6f0a26095881e7ee24 (patch) | |
tree | c14edc5c9ae57c14e8c1d2d50f0328ec07ac7a70 | |
parent | 89c85c3ca0d81ac0db527c14e5a3e6daad86dd72 (diff) | |
download | mate-applets-5c2cfd426c816c6cddfb2e6f0a26095881e7ee24.tar.bz2 mate-applets-5c2cfd426c816c6cddfb2e6f0a26095881e7ee24.tar.xz |
geyes: define GEYES_SETTINGS_THEME_PATH_KEY & GEYES_SETTINGS_SCHEMA
-rw-r--r-- | geyes/src/geyes.c | 5 | ||||
-rw-r--r-- | geyes/src/geyes.h | 3 | ||||
-rw-r--r-- | geyes/src/themes.c | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/geyes/src/geyes.c b/geyes/src/geyes.c index f5458caf..cf53ad6e 100644 --- a/geyes/src/geyes.c +++ b/geyes/src/geyes.c @@ -206,7 +206,8 @@ properties_load (EyesApplet *eyes_applet) gchar *theme_path = NULL; gboolean result; - theme_path = g_settings_get_string (eyes_applet->settings, "theme-path"); + theme_path = g_settings_get_string (eyes_applet->settings, + GEYES_SETTINGS_THEME_PATH_KEY); if (theme_path == NULL) theme_path = g_strdup (GEYES_THEMES_DIR "Default-tiny"); @@ -287,7 +288,7 @@ create_eyes (MatePanelApplet *applet) eyes_applet->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); eyes_applet->settings = mate_panel_applet_settings_new (applet, - "org.mate.panel.applet.geyes"); + GEYES_SETTINGS_SCHEMA); gtk_container_add (GTK_CONTAINER (applet), eyes_applet->vbox); return eyes_applet; } diff --git a/geyes/src/geyes.h b/geyes/src/geyes.h index 37bf7a37..ab28d2f1 100644 --- a/geyes/src/geyes.h +++ b/geyes/src/geyes.h @@ -26,6 +26,9 @@ #include <mate-panel-applet.h> #define MAX_EYES 1000 +#define GEYES_SETTINGS_SCHEMA "org.mate.panel.applet.geyes" +#define GEYES_SETTINGS_THEME_PATH_KEY "theme-path" + typedef struct { GtkWidget *pbox; diff --git a/geyes/src/themes.c b/geyes/src/themes.c index 0a2530d1..c399bbb7 100644 --- a/geyes/src/themes.c +++ b/geyes/src/themes.c @@ -210,7 +210,9 @@ theme_selected_cb (GtkTreeSelection *selection, load_theme (eyes_applet, theme); setup_eyes (eyes_applet); - g_settings_set_string (eyes_applet->settings, "theme-path", theme); + g_settings_set_string (eyes_applet->settings, + GEYES_SETTINGS_THEME_PATH_KEY, + theme); g_free (theme); } @@ -300,7 +302,7 @@ properties_cb (GtkAction *action, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column); - if (!g_settings_is_writable (eyes_applet->settings, "theme-path")) { + if (!g_settings_is_writable (eyes_applet->settings, GEYES_SETTINGS_THEME_PATH_KEY)) { gtk_widget_set_sensitive (tree, FALSE); gtk_widget_set_sensitive (label, FALSE); } |