aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-05-22 17:42:17 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-05-22 17:43:11 +0800
commit7b1c449738cd5800d54335eb5512a3b8231b1e12 (patch)
tree1a46984497075ae32d0844cd4d9a4dd191d21aae
parentefb2bc19461c213a1bd6917d5b7f25943f436c6d (diff)
downloadgsoc2013-empathy-7b1c449738cd5800d54335eb5512a3b8231b1e12.tar
gsoc2013-empathy-7b1c449738cd5800d54335eb5512a3b8231b1e12.tar.gz
gsoc2013-empathy-7b1c449738cd5800d54335eb5512a3b8231b1e12.tar.bz2
gsoc2013-empathy-7b1c449738cd5800d54335eb5512a3b8231b1e12.tar.lz
gsoc2013-empathy-7b1c449738cd5800d54335eb5512a3b8231b1e12.tar.xz
gsoc2013-empathy-7b1c449738cd5800d54335eb5512a3b8231b1e12.tar.zst
gsoc2013-empathy-7b1c449738cd5800d54335eb5512a3b8231b1e12.zip
empathy-chat-window: add Contact menu as top-level (bgo #580922)
-rw-r--r--src/empathy-chat-window.c9
-rw-r--r--src/empathy-chat-window.ui7
2 files changed, 16 insertions, 0 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 8976dadda..0ac5f4e84 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -278,6 +278,8 @@ chat_window_update (EmpathyChatWindow *window)
gboolean avatar_in_icon;
GtkWidget *chat;
GtkWidget *chat_close_button;
+ GtkWidget *submenu;
+ GtkWidget *menu;
/* Get information */
page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook));
@@ -298,6 +300,13 @@ chat_window_update (EmpathyChatWindow *window)
gtk_action_set_sensitive (priv->menu_tabs_right, !last_page);
gtk_action_set_sensitive (priv->menu_conv_insert_smiley, is_connected);
+ /* Update Contact menu */
+ menu = gtk_ui_manager_get_widget (priv->ui_manager,
+ "/chats_menubar/menu_contact");
+ submenu = empathy_chat_get_contact_menu (priv->current_chat);
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu), submenu);
+ gtk_widget_show (menu);
+
/* Update window title */
if (n_chats == 1) {
gtk_window_set_title (GTK_WINDOW (priv->dialog), name);
diff --git a/src/empathy-chat-window.ui b/src/empathy-chat-window.ui
index fb13af39a..0d5a83180 100644
--- a/src/empathy-chat-window.ui
+++ b/src/empathy-chat-window.ui
@@ -39,6 +39,12 @@
<accelerator key="W" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
+ <object class="GtkAction" id="menu_contact">
+ <property name="name">menu_contact</property>
+ <property name="label" translatable="yes">_Contact</property>
+ </object>
+ </child>
+ <child>
<object class="GtkAction" id="menu_edit">
<property name="name">menu_edit</property>
<property name="label" translatable="yes">_Edit</property>
@@ -134,6 +140,7 @@
<separator/>
<menuitem action="menu_conv_close"/>
</menu>
+ <menu action="menu_contact" />
<menu action="menu_edit">
<menuitem action="menu_edit_cut"/>
<menuitem action="menu_edit_copy"/>