Mercurial > pidgin
comparison src/gtkblist.c @ 10353:fc7168f9ecb0
[gaim-migrate @ 11570]
Gone to watch Vertigo with my gal
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 13 Dec 2004 02:02:05 +0000 |
parents | 5879593a6a10 |
children | 0c985021a1d8 |
comparison
equal
deleted
inserted
replaced
10352:5879593a6a10 | 10353:fc7168f9ecb0 |
---|---|
1000 gtknode->contact_expanded = TRUE; | 1000 gtknode->contact_expanded = TRUE; |
1001 | 1001 |
1002 for(bnode = node->child; bnode; bnode = bnode->next) { | 1002 for(bnode = node->child; bnode; bnode = bnode->next) { |
1003 gaim_gtk_blist_update(NULL, bnode); | 1003 gaim_gtk_blist_update(NULL, bnode); |
1004 } | 1004 } |
1005 | 1005 |
1006 /* This ensures that the bottom buddy is visible, i.e. not scrolled off the alignment */ | 1006 /* This ensures that the bottom buddy is visible, i.e. not scrolled off the alignment */ |
1007 get_iter_from_node(node, &parent); | 1007 get_iter_from_node(node, &parent); |
1008 gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(gtkblist->treemodel), &iter, &parent, | 1008 gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(gtkblist->treemodel), &iter, &parent, |
1009 gtk_tree_model_iter_n_children(GTK_TREE_MODEL(gtkblist->treemodel), &parent) -1); | 1009 gtk_tree_model_iter_n_children(GTK_TREE_MODEL(gtkblist->treemodel), &parent) -1); |
1010 path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter); | 1010 path = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel), &iter); |
1011 /* Let the treeview draw so it knows where to scroll */ | 1011 /* Let the treeview draw so it knows where to scroll */ |
1012 while (gtk_events_pending()) | 1012 while (gtk_events_pending()) |
1013 gtk_main_iteration(); | 1013 gtk_main_iteration(); |
1014 gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(gtkblist->treeview), path, NULL, FALSE, 0, 0); | 1014 gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(gtkblist->treeview), path, NULL, FALSE, 0, 0); |
1015 | 1015 |
1016 | 1016 |
1017 gaim_gtk_blist_update(NULL, node); | 1017 gaim_gtk_blist_update(NULL, node); |
1018 gtk_tree_path_free(path); | 1018 gtk_tree_path_free(path); |
1019 } | 1019 } |
1020 | 1020 |
3019 gaim_gtk_blist_update_protocol_actions(); | 3019 gaim_gtk_blist_update_protocol_actions(); |
3020 gaim_gtkpounce_menu_build(gtkblist->bpmenu); | 3020 gaim_gtkpounce_menu_build(gtkblist->bpmenu); |
3021 | 3021 |
3022 sensitive = (gaim_connections_get_all() != NULL); | 3022 sensitive = (gaim_connections_get_all() != NULL); |
3023 | 3023 |
3024 gtk_widget_set_sensitive(gtkblist->treeview, sensitive); | |
3025 | |
3024 for (i = 0; i < SIZEOF_REQUIRE_CONNECTION; i++) | 3026 for (i = 0; i < SIZEOF_REQUIRE_CONNECTION; i++) |
3025 { | 3027 { |
3026 widget = gtk_item_factory_get_widget(gtkblist->ift, require_connection[i]); | 3028 widget = gtk_item_factory_get_widget(gtkblist->ift, require_connection[i]); |
3027 gtk_widget_set_sensitive(widget, sensitive); | 3029 gtk_widget_set_sensitive(widget, sensitive); |
3028 } | 3030 } |
3171 | 3173 |
3172 gtkblist->bpmenu = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Buddy Pounce")); | 3174 gtkblist->bpmenu = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Buddy Pounce")); |
3173 protomenu = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Account Actions")); | 3175 protomenu = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Account Actions")); |
3174 pluginmenu = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Plugin Actions")); | 3176 pluginmenu = gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Plugin Actions")); |
3175 | 3177 |
3176 update_menu_bar(gtkblist); | |
3177 gaim_gtk_blist_update_plugin_actions(); | |
3178 | |
3179 /****************************** GtkTreeView **********************************/ | 3178 /****************************** GtkTreeView **********************************/ |
3180 sw = gtk_scrolled_window_new(NULL,NULL); | 3179 sw = gtk_scrolled_window_new(NULL,NULL); |
3181 gtk_widget_show(sw); | 3180 gtk_widget_show(sw); |
3182 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); | 3181 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN); |
3183 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); | 3182 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); |
3278 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtk_item_factory_get_item (gtkblist->ift, N_("/Tools/Mute Sounds"))), | 3277 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(gtk_item_factory_get_item (gtkblist->ift, N_("/Tools/Mute Sounds"))), |
3279 gaim_prefs_get_bool("/gaim/gtk/sound/mute")); | 3278 gaim_prefs_get_bool("/gaim/gtk/sound/mute")); |
3280 if(!strcmp(gaim_prefs_get_string("/gaim/gtk/sound/method"), "none")) | 3279 if(!strcmp(gaim_prefs_get_string("/gaim/gtk/sound/method"), "none")) |
3281 gtk_widget_set_sensitive(gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Mute Sounds")), FALSE); | 3280 gtk_widget_set_sensitive(gtk_item_factory_get_widget(gtkblist->ift, N_("/Tools/Mute Sounds")), FALSE); |
3282 | 3281 |
3282 /* Update some dynamic things */ | |
3283 update_menu_bar(gtkblist); | |
3284 gaim_gtk_blist_update_plugin_actions(); | |
3285 | |
3283 /* OK... let's show this bad boy. */ | 3286 /* OK... let's show this bad boy. */ |
3284 if (gaim_prefs_get_bool("/gaim/gtk/blist/list_visible") || docklet_count == 0) { | 3287 if (gaim_prefs_get_bool("/gaim/gtk/blist/list_visible") || docklet_count == 0) { |
3285 gaim_gtk_blist_refresh(list); | 3288 gaim_gtk_blist_refresh(list); |
3286 gaim_gtk_blist_restore_position(); | 3289 gaim_gtk_blist_restore_position(); |
3287 gtk_widget_show(gtkblist->window); | 3290 gtk_widget_show(gtkblist->window); |
3288 } | 3291 } |
3289 | 3292 |
3290 /* start the refresh timer */ | 3293 /* start the refresh timer */ |
3291 gtkblist->refresh_timer = g_timeout_add(30000, (GSourceFunc)gaim_gtk_blist_refresh_timer, list); | 3294 gtkblist->refresh_timer = g_timeout_add(30000, (GSourceFunc)gaim_gtk_blist_refresh_timer, list); |
3292 | 3295 |
3293 handle = gaim_gtk_blist_get_handle(); | 3296 handle = gaim_gtk_blist_get_handle(); |
3294 | 3297 |
3295 /* things that affect how buddies are displayed */ | 3298 /* things that affect how buddies are displayed */ |
3296 gaim_prefs_connect_callback(handle, "/gaim/gtk/blist/show_buddy_icons", | 3299 gaim_prefs_connect_callback(handle, "/gaim/gtk/blist/show_buddy_icons", |
3297 _prefs_change_redo_list, NULL); | 3300 _prefs_change_redo_list, NULL); |