Addition of new string in Composer part of Evolution



hello ,

I'm Arvind Sundararajan.

I would like to notify you about the help menu that i've added in the
composer component of evolution.

refer http://bugzilla.gnome.org/show_bug.cgi?id=209254

i've attached my patch to this mail

Do make a note of these changes
Index: composer/e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.536
diff -u -p -r1.536 e-msg-composer.c
--- composer/e-msg-composer.c	12 Jun 2006 11:44:04 -0000	1.536
+++ composer/e-msg-composer.c	14 Jul 2006 05:47:33 -0000
@@ -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 (EMs
 
 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 *u
 	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;
 	
Index: ui/evolution-message-composer.xml
===================================================================
RCS file: /cvs/gnome/evolution/ui/evolution-message-composer.xml,v
retrieving revision 1.56
diff -u -p -r1.56 evolution-message-composer.xml
--- ui/evolution-message-composer.xml	26 Apr 2006 08:57:47 -0000	1.56
+++ ui/evolution-message-composer.xml	14 Jul 2006 05:47:54 -0000
@@ -83,6 +83,11 @@
                 <cmd name="SecuritySMimeEncrypt" _label="S/MIME Encrypt" 
                 _tip="Encrypt this message with your S/MIME Encryption Certificate"
 		type="toggle" state="0" hidden="1"/>
+	
+		
+		<cmd name="Help" _label="Help" 
+		_tip="Click here to view help available" accel="F1" 
+		pixtype="stock" pixname="gtk-help"/>
 
 	</commands>
 	
@@ -151,6 +156,10 @@
                         <menuitem name="SecuritySMimeSign" verb="" _label="S/MIME Sign"/>
                         <menuitem name="SecuritySMimeEncrypt" verb="" _label="S/MIME Encrypt"/>
                 </submenu>
+
+		<submenu name="Help" _label="_Help">
+			<menuitem name="Help" verb="" _label="_Help"/>
+    		</submenu>
 		
 	</menu>
 	
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/ChangeLog,v
retrieving revision 1.1596
diff -u -p -r1.1596 ChangeLog
--- ChangeLog	15 Jun 2006 10:14:38 -0000	1.1596
+++ ChangeLog	14 Jul 2006 05:48:07 -0000
@@ -1,3 +1,11 @@
+2006-06-20   Arvind <sa phoenix gmail com>
+
+	** Fix for bug#209254
+	* composer/e-msg-composer.c : Added a help menu item to the
+	compose new message window
+	* ui/evolution-message-composer.xml : Added code for the compose
+	new message->help menu item
+
 2006-06-15  Tor Lillqvist  <tml novell com>
 
 	* plugin.mk: Must expand also @GETTEXT_PACKAGE@ and @LOCALEDIR@,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]