diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-07-02 19:50:48 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-07-02 19:50:48 +0800 |
commit | 38ad4dab9cd3d88a2f05fa7e1a37c74e3d361304 (patch) | |
tree | 17bcb3e774e49580e093671de341f848c54fd856 | |
parent | 9ea865f2b1e420d2a908cd0ac80e0c5d38a7ac4d (diff) | |
download | gsoc2013-empathy-38ad4dab9cd3d88a2f05fa7e1a37c74e3d361304.tar gsoc2013-empathy-38ad4dab9cd3d88a2f05fa7e1a37c74e3d361304.tar.gz gsoc2013-empathy-38ad4dab9cd3d88a2f05fa7e1a37c74e3d361304.tar.bz2 gsoc2013-empathy-38ad4dab9cd3d88a2f05fa7e1a37c74e3d361304.tar.lz gsoc2013-empathy-38ad4dab9cd3d88a2f05fa7e1a37c74e3d361304.tar.xz gsoc2013-empathy-38ad4dab9cd3d88a2f05fa7e1a37c74e3d361304.tar.zst gsoc2013-empathy-38ad4dab9cd3d88a2f05fa7e1a37c74e3d361304.zip |
no need to call empathy_theme_manager_find_theme() twice
-rw-r--r-- | libempathy-gtk/empathy-theme-manager.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c index 4854a9632..c28b7204f 100644 --- a/libempathy-gtk/empathy-theme-manager.c +++ b/libempathy-gtk/empathy-theme-manager.c @@ -141,18 +141,12 @@ theme_manager_notify_theme_cb (GSettings *gsettings_chat, theme = g_settings_get_string (gsettings_chat, key); - if (empathy_theme_manager_find_theme (theme) != NULL) - { - path = empathy_theme_manager_find_theme (theme); - g_free (theme); - } - else + path = empathy_theme_manager_find_theme (theme); + if (path == NULL) { g_warning ("Can't find theme: %s; fallback to 'Classic'", theme); - g_free (theme); - path = empathy_theme_manager_find_theme ("Classic"); if (path == NULL) g_critical ("Can't find 'Classic theme"); @@ -167,6 +161,7 @@ theme_manager_notify_theme_cb (GSettings *gsettings_chat, theme_manager_emit_changed (self); g_free (path); + g_free (theme); } static void |