diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-25 17:33:29 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-25 17:33:29 +0800 |
commit | 50efb94e69a9cccebb7475f1977e7eb1f749f362 (patch) | |
tree | 60f490e3c7896e5ecb5b2cda835030ebfc1630ef /src | |
parent | 9d5d80ba33f31e935c7335be6fa89ecd183b85bc (diff) | |
download | gsoc2013-empathy-50efb94e69a9cccebb7475f1977e7eb1f749f362.tar gsoc2013-empathy-50efb94e69a9cccebb7475f1977e7eb1f749f362.tar.gz gsoc2013-empathy-50efb94e69a9cccebb7475f1977e7eb1f749f362.tar.bz2 gsoc2013-empathy-50efb94e69a9cccebb7475f1977e7eb1f749f362.tar.lz gsoc2013-empathy-50efb94e69a9cccebb7475f1977e7eb1f749f362.tar.xz gsoc2013-empathy-50efb94e69a9cccebb7475f1977e7eb1f749f362.tar.zst gsoc2013-empathy-50efb94e69a9cccebb7475f1977e7eb1f749f362.zip |
Create contact menu in empathy-contact-menu.h
svn path=/trunk/; revision=1046
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-main-window.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index 7b616f4ab..089fb98b7 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -291,7 +291,8 @@ empathy_main_window_show (void) list_iface = EMPATHY_CONTACT_LIST (empathy_contact_manager_new ()); window->list_store = empathy_contact_list_store_new (list_iface); window->list_view = empathy_contact_list_view_new (window->list_store, - EMPATHY_CONTACT_LIST_FEATURE_ALL); + EMPATHY_CONTACT_LIST_FEATURE_ALL, + EMPATHY_CONTACT_FEATURE_ALL); g_object_unref (list_iface); gtk_widget_show (GTK_WIDGET (window->list_view)); @@ -594,53 +595,43 @@ main_window_edit_button_press_event_cb (GtkWidget *widget, GdkEventButton *event, EmpathyMainWindow *window) { - EmpathyContact *contact; - gchar *group; + GtkWidget *submenu; if (!event->button == 1) { return FALSE; } - group = empathy_contact_list_view_get_selected_group (window->list_view); - if (group) { + submenu = empathy_contact_list_view_get_contact_menu (window->list_view); + if (submenu) { GtkMenuItem *item; GtkWidget *label; - GtkWidget *submenu; item = GTK_MENU_ITEM (window->edit_context); label = gtk_bin_get_child (GTK_BIN (item)); - gtk_label_set_text (GTK_LABEL (label), _("Group")); + gtk_label_set_text (GTK_LABEL (label), _("Contact")); gtk_widget_show (window->edit_context); gtk_widget_show (window->edit_context_separator); - submenu = empathy_contact_list_view_get_group_menu (window->list_view); gtk_menu_item_set_submenu (item, submenu); - g_free (group); - return FALSE; } - contact = empathy_contact_list_view_get_selected (window->list_view); - if (contact) { + submenu = empathy_contact_list_view_get_group_menu (window->list_view); + if (submenu) { GtkMenuItem *item; GtkWidget *label; - GtkWidget *submenu; item = GTK_MENU_ITEM (window->edit_context); label = gtk_bin_get_child (GTK_BIN (item)); - gtk_label_set_text (GTK_LABEL (label), _("Contact")); + gtk_label_set_text (GTK_LABEL (label), _("Group")); gtk_widget_show (window->edit_context); gtk_widget_show (window->edit_context_separator); - submenu = empathy_contact_list_view_get_contact_menu (window->list_view, - contact); gtk_menu_item_set_submenu (item, submenu); - g_object_unref (contact); - return FALSE; } |