# HG changeset patch # User Sean Egan # Date 1042787906 0 # Node ID 8a932c488afc2af251a9735c705c0b8bca4689be # Parent a789969fc1986a41b59a390c025531eafcecc8fc [gaim-migrate @ 4578] This is so you don't have to restart Gaim to use a new theme, yo. committer: Tailor Script diff -r a789969fc198 -r 8a932c488afc src/aim.c --- a/src/aim.c Fri Jan 17 04:24:29 2003 +0000 +++ b/src/aim.c Fri Jan 17 07:18:26 2003 +0000 @@ -502,11 +502,13 @@ GdkPixbuf *icon = NULL; char *icon_path; #endif - - - smiley_theme_probe(); - if (current_smiley_theme == NULL && smiley_themes) - load_smiley_theme(smiley_themes->data, TRUE); + if (current_smiley_theme == NULL) { + smiley_theme_probe(); + if (smiley_themes) { + struct smiley_theme *smile = smiley_themes->data; + load_smiley_theme(smile->path, TRUE); + } + } #ifndef _WIN32 /* use the nice PNG icon for all the windows */ icon_path = g_build_filename(DATADIR, "pixmaps", "gaim.png", NULL); diff -r a789969fc198 -r 8a932c488afc src/prefs.c --- a/src/prefs.c Fri Jan 17 04:24:29 2003 +0000 +++ b/src/prefs.c Fri Jan 17 07:18:26 2003 +0000 @@ -215,7 +215,7 @@ GtkWidget *theme_page() { GtkWidget *ret; GtkWidget *sw; - GSList *themes = smiley_themes; + GSList *themes; GtkTreeIter iter; GtkWidget *view; GtkCellRenderer *rend; @@ -226,6 +226,11 @@ GdkPixbuf *pixbuf; int ind =0; + smiley_theme_probe(); + if (!smiley_themes) + return; + themes = smiley_themes; + ret = gtk_vbox_new(FALSE, 18); gtk_container_set_border_width (GTK_CONTAINER (ret), 12); diff -r a789969fc198 -r 8a932c488afc src/themes.c --- a/src/themes.c Fri Jan 17 04:24:29 2003 +0000 +++ b/src/themes.c Fri Jan 17 07:18:26 2003 +0000 @@ -68,11 +68,13 @@ struct smiley_list *list = NULL; GSList *lst = smiley_themes; char *dirname; + gboolean old=FALSE; while (lst) { struct smiley_theme *thm = lst->data; if (!strcmp(thm->path, file)) { theme = thm; + old = TRUE; break; } lst = lst->next; @@ -185,7 +187,7 @@ } g_free(dirname); - return theme; + return old ? NULL : theme; } void smiley_theme_probe()