changeset 4323:8a932c488afc

[gaim-migrate @ 4578] This is so you don't have to restart Gaim to use a new theme, yo. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Fri, 17 Jan 2003 07:18:26 +0000
parents a789969fc198
children 561316116cd8
files src/aim.c src/prefs.c src/themes.c
diffstat 3 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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);
 
--- 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()