summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-04 15:16:10 +0100
committerraveit65 <[email protected]>2020-12-10 15:35:41 +0100
commit672042924f6a857d86c480c6cc76550d4eb718fc (patch)
tree84a6362d425314285c21e4d2c54923915457c7cd
parent099324dcb930c77add9100df9c059d4485f78658 (diff)
downloadmate-applets-672042924f6a857d86c480c6cc76550d4eb718fc.tar.bz2
mate-applets-672042924f6a857d86c480c6cc76550d4eb718fc.tar.xz
geyes: use returned value by load_theme
-rw-r--r--geyes/src/geyes.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/geyes/src/geyes.c b/geyes/src/geyes.c
index 8f763b74..a1e3a664 100644
--- a/geyes/src/geyes.c
+++ b/geyes/src/geyes.c
@@ -200,23 +200,21 @@ about_cb (GtkAction *action,
NULL);
}
-static int
+static gboolean
properties_load (EyesApplet *eyes_applet)
{
gchar *theme_path = NULL;
+ gboolean result;
theme_path = g_settings_get_string (eyes_applet->settings, "theme-path");
if (theme_path == NULL)
theme_path = g_strdup (GEYES_THEMES_DIR "Default-tiny");
- if (load_theme (eyes_applet, theme_path) == FALSE) {
- g_free (theme_path);
- return FALSE;
- }
-
+ result = load_theme (eyes_applet, theme_path);
g_free (theme_path);
- return TRUE;
+
+ return result;
}
void
@@ -396,6 +394,7 @@ geyes_applet_fill (MatePanelApplet *applet)
{
EyesApplet *eyes_applet;
GtkActionGroup *action_group;
+ gboolean result;
g_set_application_name (_("Eyes"));
gtk_window_set_default_icon_name ("mate-eyes-applet");
@@ -441,12 +440,10 @@ geyes_applet_fill (MatePanelApplet *applet)
/* setup here and not in create eyes so the destroy signal is set so
* that when there is an error within loading the theme
* we can emit this signal */
- if (properties_load (eyes_applet) == FALSE)
- return FALSE;
-
- setup_eyes (eyes_applet);
+ if ((result = properties_load (eyes_applet)) == TRUE)
+ setup_eyes (eyes_applet);
- return TRUE;
+ return result;
}
static gboolean