comparison gtk/gtkblist.c @ 15033:ca46f41aa433

[gaim-migrate @ 17815] buddy-list alerts. I've made the two existing account ui_ops ('so-and-so has added you' and 'would you like to add so-and-so') use this. I'll follow up with a new 'so-and-so needs you to authorize him' ui_op, and replace the gaim_request_action() calls in the appropriate prpls committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Thu, 23 Nov 2006 08:37:07 +0000
parents b4346a8b446f
children 8c5c4d7d53a5
comparison
equal deleted inserted replaced
15032:ea6186360b68 15033:ca46f41aa433
52 #include "gtkplugin.h" 52 #include "gtkplugin.h"
53 #include "gtkprefs.h" 53 #include "gtkprefs.h"
54 #include "gtkprivacy.h" 54 #include "gtkprivacy.h"
55 #include "gtkroomlist.h" 55 #include "gtkroomlist.h"
56 #include "gtkstatusbox.h" 56 #include "gtkstatusbox.h"
57 #include "gtkscrollbook.h"
57 #include "gtkutils.h" 58 #include "gtkutils.h"
58 59
59 #include <gdk/gdkkeysyms.h> 60 #include <gdk/gdkkeysyms.h>
60 #include <gtk/gtk.h> 61 #include <gtk/gtk.h>
61 #include <gdk/gdk.h> 62 #include <gdk/gdk.h>
4028 g_free(pretty); 4029 g_free(pretty);
4029 gtk_notebook_append_page(GTK_NOTEBOOK(gtkblist->notebook),label, NULL); 4030 gtk_notebook_append_page(GTK_NOTEBOOK(gtkblist->notebook),label, NULL);
4030 gtkblist->vbox = gtk_vbox_new(FALSE, 0); 4031 gtkblist->vbox = gtk_vbox_new(FALSE, 0);
4031 gtk_notebook_append_page(GTK_NOTEBOOK(gtkblist->notebook), gtkblist->vbox, NULL); 4032 gtk_notebook_append_page(GTK_NOTEBOOK(gtkblist->notebook), gtkblist->vbox, NULL);
4032 gtk_widget_show_all(gtkblist->notebook); 4033 gtk_widget_show_all(gtkblist->notebook);
4033 if (accounts = gaim_accounts_get_all_active()) { 4034 if ((accounts = gaim_accounts_get_all_active())) {
4034 g_list_free(accounts); 4035 g_list_free(accounts);
4035 gtk_notebook_set_current_page(GTK_NOTEBOOK(gtkblist->notebook), 1); 4036 gtk_notebook_set_current_page(GTK_NOTEBOOK(gtkblist->notebook), 1);
4036 } 4037 }
4037 4038
4038 /****************************** GtkTreeView **********************************/ 4039 /****************************** GtkTreeView **********************************/
4176 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), sw, TRUE, TRUE, 0); 4177 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), sw, TRUE, TRUE, 0);
4177 gtk_container_add(GTK_CONTAINER(sw), gtkblist->treeview); 4178 gtk_container_add(GTK_CONTAINER(sw), gtkblist->treeview);
4178 4179
4179 sep = gtk_hseparator_new(); 4180 sep = gtk_hseparator_new();
4180 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), sep, FALSE, FALSE, 0); 4181 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), sep, FALSE, FALSE, 0);
4182
4183 gtkblist->scrollbook = gtk_gaim_scroll_book_new();
4184 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->scrollbook, FALSE, FALSE, 0);
4181 4185
4182 /* Create an empty vbox used for showing connection errors */ 4186 /* Create an empty vbox used for showing connection errors */
4183 gtkblist->error_buttons = gtk_vbox_new(FALSE, 0); 4187 gtkblist->error_buttons = gtk_vbox_new(FALSE, 0);
4184 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->error_buttons, FALSE, FALSE, 0); 4188 gtk_box_pack_start(GTK_BOX(gtkblist->vbox), gtkblist->error_buttons, FALSE, FALSE, 0);
4185 4189
4276 gtkblist); 4280 gtkblist);
4277 gaim_signal_connect(gaim_conversations_get_handle(), "deleting-conversation", 4281 gaim_signal_connect(gaim_conversations_get_handle(), "deleting-conversation",
4278 gtkblist, GAIM_CALLBACK(conversation_deleting_cb), 4282 gtkblist, GAIM_CALLBACK(conversation_deleting_cb),
4279 gtkblist); 4283 gtkblist);
4280 4284
4285 gtk_widget_hide(gtkblist->scrollbook);
4286
4281 /* emit our created signal */ 4287 /* emit our created signal */
4282 gaim_signal_emit(handle, "gtkblist-created", list); 4288 gaim_signal_emit(handle, "gtkblist-created", list);
4283 } 4289 }
4284 4290
4285 static void redo_buddy_list(GaimBuddyList *list, gboolean remove, gboolean rerender) 4291 static void redo_buddy_list(GaimBuddyList *list, gboolean remove, gboolean rerender)
5493 if (visibility_manager_count) 5499 if (visibility_manager_count)
5494 visibility_manager_count--; 5500 visibility_manager_count--;
5495 if (!visibility_manager_count) 5501 if (!visibility_manager_count)
5496 gaim_blist_set_visible(TRUE); 5502 gaim_blist_set_visible(TRUE);
5497 gaim_debug_info("gtkblist", "removed visibility manager: %d\n", visibility_manager_count); 5503 gaim_debug_info("gtkblist", "removed visibility manager: %d\n", visibility_manager_count);
5504 }
5505
5506 void gaim_gtk_blist_add_alert(GtkWidget *widget)
5507 {
5508 gtk_container_add(GTK_CONTAINER(gtkblist->scrollbook), widget);
5498 } 5509 }
5499 5510
5500 5511
5501 static GaimBlistUiOps blist_ui_ops = 5512 static GaimBlistUiOps blist_ui_ops =
5502 { 5513 {