Mercurial > pidgin.yaz
comparison gtk/gtkdocklet.c @ 14885:51c51d89c114
[gaim-migrate @ 17654]
This seems good. Change prefs dialog around a bit to add docklet pref. beta5 time?
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 02 Nov 2006 21:09:12 +0000 |
parents | 3a23706f9f4b |
children | 621e798f435c |
comparison
equal
deleted
inserted
replaced
14884:f2b347afd583 | 14885:51c51d89c114 |
---|---|
125 ui_ops->create(); | 125 ui_ops->create(); |
126 return FALSE; | 126 return FALSE; |
127 } else if (!convs && ui_ops->destroy && visibility_manager) { | 127 } else if (!convs && ui_ops->destroy && visibility_manager) { |
128 ui_ops->destroy(); | 128 ui_ops->destroy(); |
129 return FALSE; | 129 return FALSE; |
130 } else if (!visibility_manager) { | 130 } |
131 return FALSE; | 131 } |
132 } | 132 |
133 } | 133 if (!visibility_manager) |
134 return FALSE; | |
134 | 135 |
135 if (convs != NULL) { | 136 if (convs != NULL) { |
136 pending = TRUE; | 137 pending = TRUE; |
137 | 138 |
138 /* set tooltip if messages are pending */ | 139 /* set tooltip if messages are pending */ |
290 enable_join_chat = online_account_supports_chat(); | 291 enable_join_chat = online_account_supports_chat(); |
291 } | 292 } |
292 docklet_update_status(); | 293 docklet_update_status(); |
293 } | 294 } |
294 | 295 |
296 static void | |
297 docklet_show_pref_changed_cb(const char *name, GaimPrefType type, | |
298 gconstpointer value, gpointer data) | |
299 { | |
300 const char *val = value; | |
301 if (!strcmp(val, "always")) { | |
302 if (!visibility_manager && ui_ops->create) | |
303 ui_ops->create(); | |
304 } else if (!strcmp(val, "never")) { | |
305 if (visibility_manager && ui_ops->destroy) | |
306 ui_ops->destroy(); | |
307 } else { | |
308 docklet_update_status(); | |
309 } | |
310 | |
311 } | |
312 | |
295 /************************************************************************** | 313 /************************************************************************** |
296 * docklet pop-up menu | 314 * docklet pop-up menu |
297 **************************************************************************/ | 315 **************************************************************************/ |
298 static void | 316 static void |
299 docklet_toggle_mute(GtkWidget *toggle, void *data) | 317 docklet_toggle_mute(GtkWidget *toggle, void *data) |
618 void *docklet_handle = gaim_gtk_docklet_get_handle(); | 636 void *docklet_handle = gaim_gtk_docklet_get_handle(); |
619 | 637 |
620 gaim_prefs_add_none("/gaim/gtk/docklet"); | 638 gaim_prefs_add_none("/gaim/gtk/docklet"); |
621 gaim_prefs_add_bool("/gaim/gtk/docklet/blink", FALSE); | 639 gaim_prefs_add_bool("/gaim/gtk/docklet/blink", FALSE); |
622 gaim_prefs_add_string("/gaim/gtk/docklet/show", "always"); | 640 gaim_prefs_add_string("/gaim/gtk/docklet/show", "always"); |
641 gaim_prefs_connect_callback(docklet_handle, "/gaim/gtk/docklet/show", | |
642 docklet_show_pref_changed_cb, NULL); | |
623 | 643 |
624 docklet_ui_init(); | 644 docklet_ui_init(); |
625 if (!strcmp(gaim_prefs_get_string("/gaim/gtk/docklet/show"), "always") && ui_ops && ui_ops->create) | 645 if (!strcmp(gaim_prefs_get_string("/gaim/gtk/docklet/show"), "always") && ui_ops && ui_ops->create) |
626 ui_ops->create(); | 646 ui_ops->create(); |
627 | 647 |