aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2007-12-11 08:28:19 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-12-11 08:28:19 +0800
commit955a87dbef08d099fcda317be58e5b677a1ad93d (patch)
tree410ec81206a7bd39ebc31d8795d91506978bf353
parent218b72794abe8acaa255847907d5d1ef2a071b15 (diff)
downloadgsoc2013-empathy-955a87dbef08d099fcda317be58e5b677a1ad93d.tar
gsoc2013-empathy-955a87dbef08d099fcda317be58e5b677a1ad93d.tar.gz
gsoc2013-empathy-955a87dbef08d099fcda317be58e5b677a1ad93d.tar.bz2
gsoc2013-empathy-955a87dbef08d099fcda317be58e5b677a1ad93d.tar.lz
gsoc2013-empathy-955a87dbef08d099fcda317be58e5b677a1ad93d.tar.xz
gsoc2013-empathy-955a87dbef08d099fcda317be58e5b677a1ad93d.tar.zst
gsoc2013-empathy-955a87dbef08d099fcda317be58e5b677a1ad93d.zip
Add help menu in chat window
svn path=/trunk/; revision=471
-rw-r--r--libempathy-gtk/empathy-chat-window.c26
-rw-r--r--libempathy-gtk/empathy-chat.glade42
2 files changed, 68 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat-window.c b/libempathy-gtk/empathy-chat-window.c
index b4475ff7a..3d1608df1 100644
--- a/libempathy-gtk/empathy-chat-window.c
+++ b/libempathy-gtk/empathy-chat-window.c
@@ -57,6 +57,7 @@
#include "empathy-group-chat.h"
//#include "empathy-sound.h"
#include "empathy-ui-utils.h"
+#include "empathy-about-dialog.h"
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CHAT_WINDOW, EmpathyChatWindowPriv))
@@ -103,6 +104,9 @@ struct _EmpathyChatWindowPriv {
GtkWidget *menu_tabs_left;
GtkWidget *menu_tabs_right;
GtkWidget *menu_tabs_detach;
+
+ GtkWidget *menu_help_contents;
+ GtkWidget *menu_help_about;
guint save_geometry_id;
};
@@ -168,6 +172,10 @@ static void chat_window_tabs_right_activate_cb (GtkWidget *
EmpathyChatWindow *window);
static void chat_window_detach_activate_cb (GtkWidget *menuitem,
EmpathyChatWindow *window);
+static void chat_window_help_contents_cb (GtkWidget *menuitem,
+ EmpathyChatWindow *window);
+static void chat_window_help_about_cb (GtkWidget *menuitem,
+ EmpathyChatWindow *window);
static gboolean chat_window_delete_event_cb (GtkWidget *dialog,
GdkEvent *event,
EmpathyChatWindow *window);
@@ -306,6 +314,8 @@ empathy_chat_window_init (EmpathyChatWindow *window)
"menu_tabs_left", &priv->menu_tabs_left,
"menu_tabs_right", &priv->menu_tabs_right,
"menu_tabs_detach", &priv->menu_tabs_detach,
+ "menu_help_contents", &priv->menu_help_contents,
+ "menu_help_about", &priv->menu_help_about,
NULL);
empathy_glade_connect (glade,
@@ -329,6 +339,8 @@ empathy_chat_window_init (EmpathyChatWindow *window)
"menu_tabs_left", "activate", chat_window_tabs_left_activate_cb,
"menu_tabs_right", "activate", chat_window_tabs_right_activate_cb,
"menu_tabs_detach", "activate", chat_window_detach_activate_cb,
+ "menu_help_contents", "activate", chat_window_help_contents_cb,
+ "menu_help_about", "activate", chat_window_help_about_cb,
NULL);
g_object_unref (glade);
@@ -1234,6 +1246,20 @@ chat_window_detach_activate_cb (GtkWidget *menuitem,
gtk_widget_show (priv->dialog);
}
+static void
+chat_window_help_contents_cb (GtkWidget *menuitem,
+ EmpathyChatWindow *window)
+{
+ //empathy_help_show ();
+}
+
+static void
+chat_window_help_about_cb (GtkWidget *menuitem,
+ EmpathyChatWindow *window)
+{
+ empathy_about_dialog_new (GTK_WINDOW (window));
+}
+
static gboolean
chat_window_delete_event_cb (GtkWidget *dialog,
GdkEvent *event,
diff --git a/libempathy-gtk/empathy-chat.glade b/libempathy-gtk/empathy-chat.glade
index 61e93457f..1fcd2a27c 100644
--- a/libempathy-gtk/empathy-chat.glade
+++ b/libempathy-gtk/empathy-chat.glade
@@ -498,6 +498,48 @@
</child>
</widget>
</child>
+
+ <child>
+ <widget class="GtkMenuItem" id="menu_help">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use_underline">True</property>
+
+ <child>
+ <widget class="GtkMenu" id="menu_help_menu">
+
+ <child>
+ <widget class="GtkImageMenuItem" id="menu_help_contents">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Contents</property>
+ <property name="use_underline">True</property>
+ <accelerator key="F1" modifiers="0" signal="activate"/>
+
+ <child internal-child="image">
+ <widget class="GtkImage" id="image289">
+ <property name="visible">True</property>
+ <property name="stock">gtk-help</property>
+ <property name="icon_size">1</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkImageMenuItem" id="menu_help_about">
+ <property name="visible">True</property>
+ <property name="label">gtk-about</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
<property name="padding">0</property>