[evolution-patches] menu changes - Wrap Lines, indentation accelerators (#44141, #41191)



Attached patch introduces the new Wrap Lines menu item and adds C-[, C-]
accelerators for indentation menu items.

Anna, I have used only C-[, C-] and dropped C-TAB, S-C-TAB, I think not
many people known and used them. I hope it's OK.
Index: GNOME_GtkHTML_Editor.xml.in
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/GNOME_GtkHTML_Editor.xml.in,v
retrieving revision 1.51
diff -u -p -r1.51 GNOME_GtkHTML_Editor.xml.in
--- GNOME_GtkHTML_Editor.xml.in	3 Apr 2003 23:04:04 -0000	1.51
+++ GNOME_GtkHTML_Editor.xml.in	5 Jun 2003 17:46:46 -0000
@@ -268,8 +268,9 @@
 
 				<separator/>
 
-				<menuitem name="IndentMore" verb="" _label="_Increase Indent" accel="*Ctrl*TAB"/>
-				<menuitem name="IndentLess" verb="" _label="_Decrease Indent" accel="*Shift**Ctrl*TAB"/>
+				<menuitem name="IndentMore" verb="" _label="_Increase Indent" accel="*Ctrl*bracketright"/>
+				<menuitem name="IndentLess" verb="" _label="_Decrease Indent" accel="*Ctrl*bracketleft"/>
+				<menuitem name="WrapLines" verb="" _label="_Wrap Lines" accel="*Ctrl*l"/>
 
 				<separator/>
 
Index: menubar.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/menubar.c,v
retrieving revision 1.90
diff -u -p -r1.90 menubar.c
--- menubar.c	20 May 2003 20:30:18 -0000	1.90
+++ menubar.c	5 Jun 2003 17:46:46 -0000
@@ -398,6 +398,7 @@ static BonoboUIVerb editor_verbs [] = {
 
 	BONOBO_UI_UNSAFE_VERB ("IndentMore", command_cb),
 	BONOBO_UI_UNSAFE_VERB ("IndentLess", command_cb),
+	BONOBO_UI_UNSAFE_VERB ("WrapLines", command_cb),
 
 	BONOBO_UI_UNSAFE_VERB ("FormatText", format_text_cb),
 	BONOBO_UI_UNSAFE_VERB ("FormatParagraph", format_paragraph_cb),
@@ -458,6 +459,7 @@ static struct {
 	{"strikeout-toggle", "FormatStrikeout"},
 	{"indent-more", "IndentMore"},
 	{"indent-less", "IndentLess"},
+	{"indent-paragraph", "WrapLines"},
 	{"align-left", "AlignLeft"},
 	{"align-right", "AlignRight"},
 	{"align-center", "AlignCenter"},
@@ -666,6 +668,13 @@ smiley_cb (BonoboUIComponent *uic, GtkHT
 	}
 }
 
+static void
+menubar_paragraph_style_changed_cb (GtkHTML *html, GtkHTMLParagraphStyle style, GtkHTMLControlData *cd)
+{
+	bonobo_ui_component_set_prop (bonobo_control_get_ui_component (cd->control), "/commands/WrapLines",
+				      "sensitive", style == GTK_HTML_PARAGRAPH_STYLE_PRE ? "1" : "0", NULL);
+}
+
 void
 menubar_setup (BonoboUIComponent  *uic,
 	       GtkHTMLControlData *cd)
@@ -696,4 +705,7 @@ menubar_setup (BonoboUIComponent  *uic,
 
 	textdomain (domain);
 	g_free (domain);
+
+	menubar_paragraph_style_changed_cb (cd->html, gtk_html_get_paragraph_style (cd->html), cd);
+	g_signal_connect (cd->html, "current_paragraph_style_changed", G_CALLBACK (menubar_paragraph_style_changed_cb), cd);
 }


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