changeset 31100:b2bb0d04d659

Correctly set up the prefs for the docklet.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 06 Jan 2011 04:15:28 +0000
parents e9f62dfd2dd8
children abaff1dd6548 5de2d1b3669c
files pidgin/gtkdocklet-gtk.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkdocklet-gtk.c	Wed Jan 05 16:25:38 2011 +0000
+++ b/pidgin/gtkdocklet-gtk.c	Thu Jan 06 04:15:28 2011 +0000
@@ -54,6 +54,7 @@
 	 */
 	purple_debug_info("docklet", "failed to embed within timeout\n");
 	pidgin_docklet_remove();
+	purple_prefs_set_bool(PIDGIN_PREFS_ROOT "/docklet/gtk/embedded", FALSE);
 
 	embed_timeout = 0;
 	return FALSE;
@@ -255,6 +256,16 @@
 docklet_ui_init(void)
 {
 	pidgin_docklet_set_ui_ops(&ui_ops);
+
+	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/docklet/gtk");
+	if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/x11/embedded")) {
+		purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/docklet/gtk/embedded", TRUE);
+		purple_prefs_remove(PIDGIN_PREFS_ROOT "/docklet/x11/embedded");
+	} else {
+		purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/docklet/gtk/embedded", FALSE);
+	}
+
 	gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(),
 		DATADIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S "pidgin" G_DIR_SEPARATOR_S "tray");
 }
+