aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-04-25 17:33:16 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-04-25 17:33:16 +0800
commit9d5d80ba33f31e935c7335be6fa89ecd183b85bc (patch)
tree1cc7c8b8dc09c263bf5089caeaefdea5260b1ef9 /src
parente7c508690e38330c4d1568e2ff0e1ae1bbf0c8e9 (diff)
downloadgsoc2013-empathy-9d5d80ba33f31e935c7335be6fa89ecd183b85bc.tar
gsoc2013-empathy-9d5d80ba33f31e935c7335be6fa89ecd183b85bc.tar.gz
gsoc2013-empathy-9d5d80ba33f31e935c7335be6fa89ecd183b85bc.tar.bz2
gsoc2013-empathy-9d5d80ba33f31e935c7335be6fa89ecd183b85bc.tar.lz
gsoc2013-empathy-9d5d80ba33f31e935c7335be6fa89ecd183b85bc.tar.xz
gsoc2013-empathy-9d5d80ba33f31e935c7335be6fa89ecd183b85bc.tar.zst
gsoc2013-empathy-9d5d80ba33f31e935c7335be6fa89ecd183b85bc.zip
Setup contact submenu in chat window.
svn path=/trunk/; revision=1045
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c23
-rw-r--r--src/empathy-chat-window.glade7
2 files changed, 21 insertions, 9 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 88858dae5..0d4baef57 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -454,12 +454,28 @@ chat_window_insert_smiley_activate_cb (GtkWidget *menuitem,
}
static void
+chat_window_conv_activate_cb (GtkWidget *menuitem,
+ EmpathyChatWindow *window)
+{
+ EmpathyChatWindowPriv *priv = GET_PRIV (window);
+ GtkWidget *submenu = NULL;
+
+ submenu = empathy_chat_get_contact_menu (priv->current_chat);
+ if (submenu) {
+ gtk_menu_item_set_submenu (GTK_MENU_ITEM (priv->menu_conv_contact),
+ submenu);
+ gtk_widget_show (priv->menu_conv_contact);
+ gtk_widget_show (submenu);
+ } else {
+ gtk_widget_hide (priv->menu_conv_contact);
+ }
+}
+
+static void
chat_window_clear_activate_cb (GtkWidget *menuitem,
EmpathyChatWindow *window)
{
- EmpathyChatWindowPriv *priv;
-
- priv = GET_PRIV (window);
+ EmpathyChatWindowPriv *priv = GET_PRIV (window);
empathy_chat_clear (priv->current_chat);
}
@@ -1120,6 +1136,7 @@ empathy_chat_window_init (EmpathyChatWindow *window)
empathy_glade_connect (glade,
window,
"chat_window", "configure-event", chat_window_configure_event_cb,
+ "menu_conv", "activate", chat_window_conv_activate_cb,
"menu_conv_clear", "activate", chat_window_clear_activate_cb,
"menu_conv_close", "activate", chat_window_close_activate_cb,
"menu_edit", "activate", chat_window_edit_activate_cb,
diff --git a/src/empathy-chat-window.glade b/src/empathy-chat-window.glade
index f553267d0..0d8553609 100644
--- a/src/empathy-chat-window.glade
+++ b/src/empathy-chat-window.glade
@@ -42,11 +42,6 @@
</widget>
</child>
<child>
- <widget class="GtkSeparatorMenuItem" id="separator7">
- <property name="visible">True</property>
- </widget>
- </child>
- <child>
<widget class="GtkMenuItem" id="menu_conv_contact">
<property name="visible">True</property>
<property name="label" translatable="yes">_Contact</property>
@@ -54,7 +49,7 @@
</widget>
</child>
<child>
- <widget class="GtkSeparatorMenuItem" id="separator1">
+ <widget class="GtkSeparatorMenuItem" id="separator7">
<property name="visible">True</property>
</widget>
</child>