comparison src/gtkstatusbox.c @ 14128:a8a033a89ee0

[gaim-migrate @ 16766] I'm hoping this will fix a lot of the remaining idle-away problems, like not correctly returning from idle-away. This change also causes the gtkstatusbox to show your idle-away status when you are idle-away. Please test everything and let me know if there are any problems. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 15 Aug 2006 08:22:29 +0000
parents 8bda65b88e49
children 31d33e7bc0e6
comparison
equal deleted inserted replaced
14127:9a4b76c288aa 14128:a8a033a89ee0
255 if (statusbox->status_changed_signal) { 255 if (statusbox->status_changed_signal) {
256 gaim_signal_disconnect(gaim_accounts_get_handle(), "account-status-changed", 256 gaim_signal_disconnect(gaim_accounts_get_handle(), "account-status-changed",
257 statusbox, GAIM_CALLBACK(account_status_changed_cb)); 257 statusbox, GAIM_CALLBACK(account_status_changed_cb));
258 statusbox->status_changed_signal = 0; 258 statusbox->status_changed_signal = 0;
259 } 259 }
260 gaim_signals_disconnect_by_handle(statusbox);
260 gaim_prefs_disconnect_by_handle(statusbox); 261 gaim_prefs_disconnect_by_handle(statusbox);
261 262
262 G_OBJECT_CLASS(parent_class)->finalize(obj); 263 G_OBJECT_CLASS(parent_class)->finalize(obj);
263 } 264 }
264 265
827 status_box->typing_pixbufs[3] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), GAIM_STOCK_STATUS_TYPING3, 828 status_box->typing_pixbufs[3] = gtk_widget_render_icon (GTK_WIDGET(status_box->vbox), GAIM_STOCK_STATUS_TYPING3,
828 icon_size, "GtkGaimStatusBox"); 829 icon_size, "GtkGaimStatusBox");
829 } 830 }
830 831
831 static void 832 static void
832 current_status_pref_changed_cb(const char *name, GaimPrefType type, 833 current_savedstatus_changed_cb(GaimSavedStatus *now, GaimSavedStatus *old, gpointer data)
833 gconstpointer val, gpointer data)
834 { 834 {
835 GtkGaimStatusBox *status_box = data; 835 GtkGaimStatusBox *status_box = data;
836 836
837 /* Make sure our current status is added to the list of popular statuses */ 837 /* Make sure our current status is added to the list of popular statuses */
838 gtk_gaim_status_box_regenerate(status_box); 838 gtk_gaim_status_box_regenerate(status_box);
998 998
999 cache_pixbufs(status_box); 999 cache_pixbufs(status_box);
1000 gtk_gaim_status_box_regenerate(status_box); 1000 gtk_gaim_status_box_regenerate(status_box);
1001 gtk_gaim_status_box_refresh(status_box); 1001 gtk_gaim_status_box_refresh(status_box);
1002 1002
1003 gaim_prefs_connect_callback(status_box, "/core/savedstatus/current", 1003 gaim_signal_connect(gaim_savedstatuses_get_handle(), "savedstatus-changed",
1004 current_status_pref_changed_cb, status_box); 1004 status_box,
1005 GAIM_CALLBACK(current_savedstatus_changed_cb),
1006 status_box);
1005 gaim_prefs_connect_callback(status_box, "/gaim/gtk/blist/show_buddy_icons", 1007 gaim_prefs_connect_callback(status_box, "/gaim/gtk/blist/show_buddy_icons",
1006 buddy_list_details_pref_changed_cb, status_box); 1008 buddy_list_details_pref_changed_cb, status_box);
1007 gaim_prefs_connect_callback(status_box, "/gaim/gtk/conversations/spellcheck", 1009 gaim_prefs_connect_callback(status_box, "/gaim/gtk/conversations/spellcheck",
1008 spellcheck_prefs_cb, status_box); 1010 spellcheck_prefs_cb, status_box);
1009 } 1011 }
1251 /* 1253 /*
1252 * If the currently selected status is "New..." or 1254 * If the currently selected status is "New..." or
1253 * "Saved..." or a popular status then do nothing. 1255 * "Saved..." or a popular status then do nothing.
1254 * Popular statuses are 1256 * Popular statuses are
1255 * activated elsewhere, and we update the status_box 1257 * activated elsewhere, and we update the status_box
1256 * accordingly by monitoring the preference 1258 * accordingly by connecting to the savedstatus-changed
1257 * "/core/savedstatus/current" and then calling 1259 * signal and then calling status_menu_refresh_iter()
1258 * status_menu_refresh_iter()
1259 */ 1260 */
1260 if (type != GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE) 1261 if (type != GTK_GAIM_STATUS_BOX_TYPE_PRIMITIVE)
1261 return; 1262 return;
1262 1263
1263 gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter, 1264 gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,