[gnumeric] GUI: Goodbye, long format toolbar.



commit 3f359fbec1995d27246ab7c3396dc6147c232d5b
Author: Morten Welinder <terra gnome org>
Date:   Fri Apr 19 16:11:03 2013 -0400

    GUI: Goodbye, long format toolbar.

 NEWS                                         |  1 +
 component/Gnumeric-embed.xml.in              | 26 -----------
 schemas/org.gnome.gnumeric.gschema.xml.in.in | 10 -----
 src/GNOME_Gnumeric-gtk.xml.in                | 25 -----------
 src/gnumeric-conf.c                          | 66 +---------------------------
 src/gnumeric-conf.h                          |  8 ----
 src/wbc-gtk.c                                |  1 -
 tools/handle-conf-options                    |  6 ---
 8 files changed, 2 insertions(+), 141 deletions(-)
---
diff --git a/NEWS b/NEWS
index e506c43..cc21b41 100644
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,7 @@ Morten:
        * Fix vertical toolbar's font button.
        * Fix criticals in insert-comment dialog.
        * Improve vertical toolbars.  [#590889]
+       * Merge long format toolbar into regular one.
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.1
diff --git a/component/Gnumeric-embed.xml.in b/component/Gnumeric-embed.xml.in
index 1397400..67f5537 100644
--- a/component/Gnumeric-embed.xml.in
+++ b/component/Gnumeric-embed.xml.in
@@ -374,38 +374,12 @@
     <toolitem action="FormatDecreaseIndent"/>
     <toolitem action="FormatIncreaseIndent"/>
     <separator/>
-    <toolitem action="BorderSelector"/>
-    <toolitem action="ColorBack"/>
-    <toolitem action="ColorFore"/>
-  </toolbar>
-  <toolbar _name="LongFormatToolbar">
-    <toolitem action="FontName"/>
-    <toolitem action="FontSize"/>
     <toolitem action="FontSuperscript"/>
     <toolitem action="FontSubscript"/>
-    <toolitem action="FontBold"/>
-    <toolitem action="FontItalic"/>
-    <toolitem action="FontUnderline"/>
     <separator/>
     <toolitem action="BorderSelector"/>
     <toolitem action="ColorBack"/>
     <toolitem action="ColorFore"/>
-    <separator/>
-    <toolitem action="AlignLeft"/>
-    <toolitem action="AlignCenter"/>
-    <toolitem action="AlignRight"/>
-    <toolitem action="CenterAcrossSelection"/>
-    <toolitem action="FormatMergeCells"/>
-    <toolitem action="FormatUnmergeCells"/>
-    <separator/>
-    <toolitem action="FormatAsAccounting"/>
-    <toolitem action="FormatAsPercentage"/>
-    <toolitem action="FormatWithThousands"/>
-    <toolitem action="FormatIncreasePrecision"/>
-    <toolitem action="FormatDecreasePrecision"/>
-    <separator/>
-    <toolitem action="FormatDecreaseIndent"/>
-    <toolitem action="FormatIncreaseIndent"/>
   </toolbar>
   <toolbar _name="ObjectToolbar">
     <toolitem action="CreateRectangle"/>
diff --git a/schemas/org.gnome.gnumeric.gschema.xml.in.in b/schemas/org.gnome.gnumeric.gschema.xml.in.in
index bbdedf2..0b8fd9f 100644
--- a/schemas/org.gnome.gnumeric.gschema.xml.in.in
+++ b/schemas/org.gnome.gnumeric.gschema.xml.in.in
@@ -123,16 +123,6 @@
       <_summary>Format toolbar position</_summary>
       <_description>This variable determines where the format toolbar should be shown.  0 is left, 1 is 
right, 2 is top.</_description>
     </key>
-    <key name="longformat-visible" type="b">
-      <default>false</default>
-      <_summary>Long format toolbar visible</_summary>
-      <_description>This variable determines whether the long format toolbar should be visible 
initially.</_description>
-    </key>
-    <key name="longformat-position" type="i">
-      <default>2</default>
-      <_summary>Long format toolbar position</_summary>
-      <_description>This variable determines where the long format toolbar should be shown.  0 is left, 1 is 
right, 2 is top.</_description>
-    </key>
     <key name="object-visible" type="b">
       <default>true</default>
       <_summary>Object toolbar visible</_summary>
diff --git a/src/GNOME_Gnumeric-gtk.xml.in b/src/GNOME_Gnumeric-gtk.xml.in
index c9c71c3..ddc27ff 100644
--- a/src/GNOME_Gnumeric-gtk.xml.in
+++ b/src/GNOME_Gnumeric-gtk.xml.in
@@ -380,37 +380,12 @@
     <toolitem action="FormatDecreaseIndent"/>
     <toolitem action="FormatIncreaseIndent"/>
     <separator/>
-    <toolitem action="BorderSelector"/>
-    <toolitem action="ColorBack"/>
-    <toolitem action="ColorFore"/>
-  </toolbar>
-  <toolbar _name="LongFormatToolbar">
-    <toolitem action="FontName"/>
     <toolitem action="FontSuperscript"/>
     <toolitem action="FontSubscript"/>
-    <toolitem action="FontBold"/>
-    <toolitem action="FontItalic"/>
-    <toolitem action="FontUnderline"/>
     <separator/>
     <toolitem action="BorderSelector"/>
     <toolitem action="ColorBack"/>
     <toolitem action="ColorFore"/>
-    <separator/>
-    <toolitem action="AlignLeft"/>
-    <toolitem action="AlignCenter"/>
-    <toolitem action="AlignRight"/>
-    <toolitem action="CenterAcrossSelection"/>
-    <toolitem action="FormatMergeCells"/>
-    <toolitem action="FormatUnmergeCells"/>
-    <separator/>
-    <toolitem action="FormatAsAccounting"/>
-    <toolitem action="FormatAsPercentage"/>
-    <toolitem action="FormatWithThousands"/>
-    <toolitem action="FormatIncreasePrecision"/>
-    <toolitem action="FormatDecreasePrecision"/>
-    <separator/>
-    <toolitem action="FormatDecreaseIndent"/>
-    <toolitem action="FormatIncreaseIndent"/>
   </toolbar>
   <toolbar _name="ObjectToolbar">
     <toolitem action="CreateRectangle"/>
diff --git a/src/gnumeric-conf.c b/src/gnumeric-conf.c
index 052270c..9990b3f 100644
--- a/src/gnumeric-conf.c
+++ b/src/gnumeric-conf.c
@@ -573,13 +573,11 @@ gnm_conf_get_printer_decoration_font (void)
        return style;
 }
 
-#define TOOLBAR_TANGO(Object,Format,LongFormat,Standard)       \
+#define TOOLBAR_TANGO(Object,Format,Standard)  \
        if (strcmp (name, "ObjectToolbar") == 0)                \
                Object                                          \
        else if (strcmp (name, "FormatToolbar") == 0)           \
                Format                                          \
-       else if (strcmp (name, "LongFormatToolbar") == 0)       \
-               LongFormat                                      \
        else if (strcmp (name, "StandardToolbar") == 0)         \
                Standard
 
@@ -590,7 +588,6 @@ gnm_conf_get_toolbar_visible (const char *name)
        TOOLBAR_TANGO
                (return gnm_conf_get_core_gui_toolbars_object_visible ();,
                 return gnm_conf_get_core_gui_toolbars_format_visible ();,
-                return gnm_conf_get_core_gui_toolbars_longformat_visible ();,
                 return gnm_conf_get_core_gui_toolbars_standard_visible (););
 
        g_warning ("Unknown toolbar: %s", name);
@@ -603,7 +600,6 @@ gnm_conf_set_toolbar_visible (const char *name, gboolean x)
        TOOLBAR_TANGO
                (gnm_conf_set_core_gui_toolbars_object_visible (x);,
                 gnm_conf_set_core_gui_toolbars_format_visible (x);,
-                gnm_conf_set_core_gui_toolbars_longformat_visible (x);,
                 gnm_conf_set_core_gui_toolbars_standard_visible (x););
 }
 
@@ -613,7 +609,6 @@ gnm_conf_get_toolbar_position (const char *name)
        TOOLBAR_TANGO
                (return gnm_conf_get_core_gui_toolbars_object_position ();,
                 return gnm_conf_get_core_gui_toolbars_format_position ();,
-                return gnm_conf_get_core_gui_toolbars_longformat_position ();,
                 return gnm_conf_get_core_gui_toolbars_standard_position (););
 
        g_warning ("Unknown toolbar: %s", name);
@@ -626,7 +621,6 @@ gnm_conf_set_toolbar_position (const char *name, GtkPositionType x)
        TOOLBAR_TANGO
                (gnm_conf_set_core_gui_toolbars_object_position (x);,
                 gnm_conf_set_core_gui_toolbars_format_position (x);,
-                gnm_conf_set_core_gui_toolbars_longformat_position (x);,
                 gnm_conf_set_core_gui_toolbars_standard_position (x););
 }
 
@@ -1576,64 +1570,6 @@ gnm_conf_get_core_gui_toolbars_format_visible_node (void)
        return get_watch_node (&watch_core_gui_toolbars_format_visible);
 }
 
-static struct cb_watch_int watch_core_gui_toolbars_longformat_position = {
-       0, "core/gui/toolbars/longformat-position",
-       "Long format toolbar position",
-       "This variable determines where the long format toolbar should be shown.  0 is left, 1 is right, 2 is 
top.",
-       0, 3, 2,
-};
-
-GtkPositionType
-gnm_conf_get_core_gui_toolbars_longformat_position (void)
-{
-       if (!watch_core_gui_toolbars_longformat_position.handler)
-               watch_int (&watch_core_gui_toolbars_longformat_position);
-       return watch_core_gui_toolbars_longformat_position.var;
-}
-
-void
-gnm_conf_set_core_gui_toolbars_longformat_position (GtkPositionType x)
-{
-       if (!watch_core_gui_toolbars_longformat_position.handler)
-               watch_int (&watch_core_gui_toolbars_longformat_position);
-       set_int (&watch_core_gui_toolbars_longformat_position, x);
-}
-
-GOConfNode *
-gnm_conf_get_core_gui_toolbars_longformat_position_node (void)
-{
-       return get_watch_node (&watch_core_gui_toolbars_longformat_position);
-}
-
-static struct cb_watch_bool watch_core_gui_toolbars_longformat_visible = {
-       0, "core/gui/toolbars/longformat-visible",
-       "Long format toolbar visible",
-       "This variable determines whether the long format toolbar should be visible initially.",
-       FALSE,
-};
-
-gboolean
-gnm_conf_get_core_gui_toolbars_longformat_visible (void)
-{
-       if (!watch_core_gui_toolbars_longformat_visible.handler)
-               watch_bool (&watch_core_gui_toolbars_longformat_visible);
-       return watch_core_gui_toolbars_longformat_visible.var;
-}
-
-void
-gnm_conf_set_core_gui_toolbars_longformat_visible (gboolean x)
-{
-       if (!watch_core_gui_toolbars_longformat_visible.handler)
-               watch_bool (&watch_core_gui_toolbars_longformat_visible);
-       set_bool (&watch_core_gui_toolbars_longformat_visible, x);
-}
-
-GOConfNode *
-gnm_conf_get_core_gui_toolbars_longformat_visible_node (void)
-{
-       return get_watch_node (&watch_core_gui_toolbars_longformat_visible);
-}
-
 static struct cb_watch_int watch_core_gui_toolbars_object_position = {
        0, "core/gui/toolbars/object-position",
        "Object toolbar position",
diff --git a/src/gnumeric-conf.h b/src/gnumeric-conf.h
index d686dd3..c3b072c 100644
--- a/src/gnumeric-conf.h
+++ b/src/gnumeric-conf.h
@@ -151,14 +151,6 @@ GOConfNode *gnm_conf_get_core_gui_toolbars_format_visible_node (void);
 gboolean gnm_conf_get_core_gui_toolbars_format_visible (void);
 void gnm_conf_set_core_gui_toolbars_format_visible (gboolean x);
 
-GOConfNode *gnm_conf_get_core_gui_toolbars_longformat_position_node (void);
-GtkPositionType gnm_conf_get_core_gui_toolbars_longformat_position (void);
-void gnm_conf_set_core_gui_toolbars_longformat_position (GtkPositionType x);
-
-GOConfNode *gnm_conf_get_core_gui_toolbars_longformat_visible_node (void);
-gboolean gnm_conf_get_core_gui_toolbars_longformat_visible (void);
-void gnm_conf_set_core_gui_toolbars_longformat_visible (gboolean x);
-
 GOConfNode *gnm_conf_get_core_gui_toolbars_object_position_node (void);
 GtkPositionType gnm_conf_get_core_gui_toolbars_object_position (void);
 void gnm_conf_set_core_gui_toolbars_object_position (GtkPositionType x);
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index ed5b4b5..73c8471 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -4259,7 +4259,6 @@ static struct ToolbarInfo {
 } toolbar_info[] = {
        { "StandardToolbar", N_("Standard Toolbar"), "<control>7" },
        { "FormatToolbar", N_("Format Toolbar"), NULL },
-       { "LongFormatToolbar", N_("Long Format Toolbar"), NULL },
        { "ObjectToolbar", N_("Object Toolbar"), NULL },
        { NULL, NULL, NULL }
 };
diff --git a/tools/handle-conf-options b/tools/handle-conf-options
index 7379661..7d8e51f 100644
--- a/tools/handle-conf-options
+++ b/tools/handle-conf-options
@@ -192,12 +192,6 @@ my %extra_attributes =
         'max' => 3,
      },
 
-     '/org/gnome/gnumeric/core/gui/toolbars/longformat-position' => {
-        'gtype' => 'GTK_TYPE_POSITION',
-        'min' => 0,
-        'max' => 3,
-     },
-
      '/org/gnome/gnumeric/core/gui/toolbars/object-position' => {
         'gtype' => 'GTK_TYPE_POSITION',
         'min' => 0,


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