aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2006-07-14 14:55:19 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-07-14 14:55:19 +0800
commitb8daa5dc7cf47fe07480c9dd85765b4ea264c0da (patch)
treed6545cb4ebf8fe87aa6fc3b126431df13a60a79f /composer
parent796be1785ae62f9801d14238363e2c4fb23e2dfc (diff)
downloadgsoc2013-evolution-b8daa5dc7cf47fe07480c9dd85765b4ea264c0da.tar.gz
gsoc2013-evolution-b8daa5dc7cf47fe07480c9dd85765b4ea264c0da.tar.zst
gsoc2013-evolution-b8daa5dc7cf47fe07480c9dd85765b4ea264c0da.zip
Fix for bug #209254
svn path=/trunk/; revision=32316
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog8
-rw-r--r--composer/e-msg-composer.c39
2 files changed, 45 insertions, 2 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index bee24a5ee2..188fd6fc09 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,11 @@
+2006-07-14 Arvind <sa.phoenix@gmail.com>
+
+ ** Fixes bug #209254
+
+ * e-msg-composer.c: (menu_help_cb), (destroy),
+ (e_msg_composer_show_help), (init): initiated help when clicked
+ help menu
+
2006-06-12 Parthasarathi Susarla <sparthasarathi@novell.com>
Fixes bug #177416 on bnc
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index e3e90f2dbb..4279939cc8 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -220,7 +220,7 @@ struct _EMsgComposerPrivate {
GtkWidget *saveas; /* saveas async file requester */
GtkWidget *load; /* same for load - not used */
-
+ char *help_section; /* this is for the help label */
};
@@ -293,6 +293,8 @@ static void handle_multipart_signed (EMsgComposer *composer, CamelMultipart *mul
static void set_editor_signature (EMsgComposer *composer);
+/* used by e_msg_composer for showing the help menu item */
+static void e_msg_composer_show_help (EMsgComposer *composer);
static EDestination**
destination_list_to_vector_sized (GList *list, int n)
@@ -1776,6 +1778,18 @@ menu_file_close_cb (BonoboUIComponent *uic,
do_exit (composer);
}
+/* this is the callback for the help menu */
+static void
+menu_help_cb (BonoboUIComponent *uic,
+ void *data,
+ const char *path)
+{
+ EMsgComposer *composer = (EMsgComposer *) data;
+
+ e_msg_composer_show_help (composer);
+}
+
+
static void
add_to_bar (EMsgComposer *composer, GSList *names, int is_inline)
{
@@ -2110,7 +2124,7 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("FileSaveAs", menu_file_save_as_cb),
BONOBO_UI_VERB ("FileSaveDraft", menu_file_save_draft_cb),
BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
-
+ BONOBO_UI_VERB ("Help", menu_help_cb),
BONOBO_UI_VERB ("FileAttach", menu_file_add_attachment_cb),
BONOBO_UI_VERB ("FileSend", menu_file_send_cb),
@@ -2750,6 +2764,8 @@ destroy (GtkObject *object)
p->menu = NULL;
}
+ /* free the help menu */
+ g_free(p->help_section);
if (p->load) {
gtk_widget_destroy(p->load);
@@ -2836,6 +2852,23 @@ destroy (GtkObject *object)
}
+ /* show the help menu item of the composer */
+static void
+e_msg_composer_show_help (EMsgComposer *composer)
+{
+ GError *error = NULL;
+ EMsgComposerPrivate *p = composer->priv;
+
+ gnome_help_display_desktop (NULL,
+ "evolution-" BASE_VERSION,
+ "evolution-" BASE_VERSION ".xml",
+ p->help_section,
+ &error);
+ if (error != NULL)
+ g_warning ("%s", error->message);
+}
+
+
/* GtkWidget methods. */
static int
@@ -3285,6 +3318,8 @@ init (EMsgComposer *composer)
p->smime_sign = FALSE;
p->smime_encrypt = FALSE;
+ p->help_section = g_strdup("usage-composer");
+
p->has_changed = FALSE;
p->autosaved = FALSE;