Fix bug #3020, "Use theme doesn't change some icons until restart"
authorColin Leroy <colin@colino.net>
Sat, 28 Dec 2013 17:15:31 +0000 (18:15 +0100)
committerColin Leroy <colin@colino.net>
Sat, 28 Dec 2013 17:15:31 +0000 (18:15 +0100)
src/addr_compl.c
src/addr_compl.h
src/prefs_themes.c

index ed73557..7472fc1 100644 (file)
@@ -969,6 +969,17 @@ static void addrcompl_add_entry( CompletionWindow *cw, gchar *address ) {
 #endif
 }
 
+void addrcompl_reflect_prefs_pixmap_theme(void) {
+       if (group_pixbuf) {
+               g_object_unref(G_OBJECT(group_pixbuf));
+               group_pixbuf = NULL;
+       }
+       if (email_pixbuf) {
+               g_object_unref(G_OBJECT(email_pixbuf));
+               email_pixbuf = NULL;
+       }
+}
+
 /**
  * Completion idle function. This function is called by the main (UI) thread
  * during UI idle time while an address search is in progress. Items from the
index 3dbdc8d..de9d4b1 100644 (file)
@@ -54,4 +54,5 @@ void addrcompl_teardown               ( void );
 
 void addr_compl_add_address1(const char *str, address_entry *ae);
 
+void addrcompl_reflect_prefs_pixmap_theme(void);
 #endif /* __ADDR_COMPL_H__ */
index 2f3202c..6c69fba 100644 (file)
@@ -428,14 +428,15 @@ static void prefs_themes_btn_use_clicked_cb(GtkWidget *widget, gpointer data)
        gchar      *theme_str;
 
        theme_str = tdata->displayed;
-       
+
        g_free(prefs_common.pixmap_theme_path);
-       
+
         prefs_common.pixmap_theme_path = g_strdup(theme_str);
-       
+
         main_window_reflect_prefs_all_real(TRUE);
         compose_reflect_prefs_pixmap_theme();
-       
+       addrcompl_reflect_prefs_pixmap_theme();
+
        prefs_themes_update_buttons(tdata);
 }