[gedit-list] [PATCH] Prioritized text for gedit (fwd)
- From: Gaute Lindkvist <lindkvis stud ntnu no>
- To: gedit-list lists sourceforge net
- Subject: [gedit-list] [PATCH] Prioritized text for gedit (fwd)
- Date: Sat Oct 12 05:35:02 2002
Sent this to desktop-devel-list first. This seems like a better place.
---------- Forwarded message ----------
Date: Sat, 12 Oct 2002 14:26:34 +0200 (CEST)
From: Gaute Lindkvist <lindkvis stud ntnu no>
To: desktop-devel-list mail gnome org
Subject: [PATCH] Prioritized text for gedit
I've attached a patch that adds priority text support to gedit. There is
probably some discussion about what text that should actually be
prioritized.
My suggestions are:
New
Save
Undo
Ideas?
Gaute
? autom4te-2.53.cache
Index: src/gedit-mdi.c
===================================================================
RCS file: /cvs/gnome/gedit/src/gedit-mdi.c,v
retrieving revision 1.57
diff -u -r1.57 gedit-mdi.c
--- src/gedit-mdi.c 30 Sep 2002 18:26:02 -0000 1.57
+++ src/gedit-mdi.c 12 Oct 2002 12:23:09 -0000
@@ -466,6 +466,9 @@
bonobo_ui_component_add_listener (ui_component, "ToolbarIconText",
(BonoboUIListenerFn)gedit_mdi_view_menu_item_toggled_handler,
(gpointer)win);
+ bonobo_ui_component_add_listener (ui_component, "ToolbarIconBothHoriz",
+ (BonoboUIListenerFn)gedit_mdi_view_menu_item_toggled_handler,
+ (gpointer)win);
bonobo_ui_component_add_listener (ui_component, "StatusBarCursorPosition",
(BonoboUIListenerFn)gedit_mdi_view_menu_item_toggled_handler,
@@ -603,6 +606,17 @@
goto save_prefs;
}
+ if (s && (strcmp (path, "ToolbarIconBothHoriz") == 0))
+ {
+ if (prefs->toolbar_buttons_style != GEDIT_TOOLBAR_ICONS_BOTH_HORIZ)
+ {
+ prefs->toolbar_buttons_style = GEDIT_TOOLBAR_ICONS_BOTH_HORIZ;
+ gedit_mdi_set_app_toolbar_style (win);
+ }
+
+ goto save_prefs;
+ }
+
if (strcmp (path, "StatusBarCursorPosition") == 0)
{
if (s != prefs->statusbar_show_cursor_position)
@@ -700,6 +714,9 @@
gedit_menus_set_verb_sensitive (ui_component,
"/commands/ToolbarIconText",
prefs->toolbar_visible);
+ gedit_menus_set_verb_sensitive (ui_component,
+ "/commands/ToolbarIconBothHoriz",
+ prefs->toolbar_visible);
gedit_menus_set_verb_sensitive (ui_component,
"/commands/ToolbarTooltips",
prefs->toolbar_visible);
@@ -716,6 +733,10 @@
"/commands/ToolbarIconText",
prefs->toolbar_buttons_style == GEDIT_TOOLBAR_ICONS_AND_TEXT);
+ gedit_menus_set_verb_state (ui_component,
+ "/commands/ToolbarBothHoriz",
+ prefs->toolbar_buttons_style == GEDIT_TOOLBAR_ICONS_BOTH_HORIZ);
+
switch (prefs->toolbar_buttons_style)
{
case GEDIT_TOOLBAR_SYSTEM:
@@ -738,6 +759,13 @@
ui_component, "/Toolbar", "look", "both", NULL);
break;
+
+ case GEDIT_TOOLBAR_ICONS_BOTH_HORIZ:
+ gedit_debug (DEBUG_MDI, "GEDIT: ICONS_BOTH_HORIZ");
+ bonobo_ui_component_set_prop (
+ ui_component, "/Toolbar", "look", "both_horiz", NULL);
+
+ break;
default:
goto error;
break;
Index: src/gedit-prefs-manager.c
===================================================================
RCS file: /cvs/gnome/gedit/src/gedit-prefs-manager.c,v
retrieving revision 1.11
diff -u -r1.11 gedit-prefs-manager.c
--- src/gedit-prefs-manager.c 11 Oct 2002 17:40:14 -0000 1.11
+++ src/gedit-prefs-manager.c 12 Oct 2002 12:23:13 -0000
@@ -933,8 +933,13 @@
{
if (strcmp (str, "GEDIT_TOOLBAR_ICONS_AND_TEXT") == 0)
res = GEDIT_TOOLBAR_ICONS_AND_TEXT;
- else
- res = GEDIT_TOOLBAR_SYSTEM;
+ else
+ {
+ if (strcmp (str, "GEDIT_TOOLBAR_ICONS_BOTH_HORIZ") == 0)
+ res = GEDIT_TOOLBAR_ICONS_BOTH_HORIZ;
+ else
+ res = GEDIT_TOOLBAR_SYSTEM;
+ }
}
g_free (str);
@@ -960,6 +965,9 @@
str = "GEDIT_TOOLBAR_ICONS_AND_TEXT";
break;
+ case GEDIT_TOOLBAR_ICONS_BOTH_HORIZ:
+ str = "GEDIT_TOOLBAR_ICONS_BOTH_HORIZ";
+ break;
default: /* GEDIT_TOOLBAR_SYSTEM */
str = "GEDIT_TOOLBAR_SYSTEM";
}
Index: src/gedit-prefs-manager.h
===================================================================
RCS file: /cvs/gnome/gedit/src/gedit-prefs-manager.h,v
retrieving revision 1.9
diff -u -r1.9 gedit-prefs-manager.h
--- src/gedit-prefs-manager.h 11 Oct 2002 17:40:14 -0000 1.9
+++ src/gedit-prefs-manager.h 12 Oct 2002 12:23:14 -0000
@@ -41,7 +41,8 @@
typedef enum {
GEDIT_TOOLBAR_SYSTEM = 0,
GEDIT_TOOLBAR_ICONS,
- GEDIT_TOOLBAR_ICONS_AND_TEXT
+ GEDIT_TOOLBAR_ICONS_AND_TEXT,
+ GEDIT_TOOLBAR_ICONS_BOTH_HORIZ
} GeditToolbarSetting;
typedef enum {
Index: src/gedit-ui.xml
===================================================================
RCS file: /cvs/gnome/gedit/src/gedit-ui.xml,v
retrieving revision 1.34
diff -u -r1.34 gedit-ui.xml
--- src/gedit-ui.xml 5 Oct 2002 14:46:22 -0000 1.34
+++ src/gedit-ui.xml 12 Oct 2002 12:23:14 -0000
@@ -98,6 +98,8 @@
<cmd name="ToolbarIconText" id="ToolbarIconText" _label="Icon and _Text" type="radio"
group="buttons" _tip ="Show both icons and texts in the toolbar"/>
+ <cmd name="ToolbarIconBothHoriz" id="ToolbarIconBothHoriz" _label="_Priority Text beside Icons" type="radio"
+ group="buttons" _tip ="Show prioritized text beside icons in toolbar"/>
<cmd name="SettingsPreferences" _label="Preferences" _tip="Configure the application"
pixtype="stock" pixname="gtk-preferences"/>
@@ -214,6 +216,8 @@
<menuitem name="ToolbarIcon" verb=""/>
<menuitem name="ToolbarIconText" verb=""/>
+
+ <menuitem name="ToolbarIconBothHoriz" verb=""/>
</submenu>
@@ -304,10 +308,10 @@
<dockitem name="Toolbar" _tip="Main toolbar" config="0"
behavior = "exclusive" in_new_band="1">
- <toolitem name="FileNew" verb=""/>
+ <toolitem name="FileNew" verb="" priority="1"/>
<toolitem name="FileOpen" verb=""/>
<control name="FileOpenMenu" verb=""/>
- <toolitem name="FileSave" verb=""/>
+ <toolitem name="FileSave" verb="" priority="1"/>
<separator/>
@@ -315,7 +319,7 @@
<separator/>
- <toolitem name="EditUndo" verb=""/>
+ <toolitem name="EditUndo" verb="" priority="1"/>
<toolitem name="EditRedo" verb=""/>
<separator/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]