[gnumeric] GUI: Don't show style in font button.



commit b13ea8574e591a9d62972a900d708e4088ec83cb
Author: Morten Welinder <terra gnome org>
Date:   Sun Mar 17 09:40:06 2013 -0400

    GUI: Don't show style in font button.

 ChangeLog                    |    5 +++++
 src/wbc-gtk.c                |    1 +
 src/widgets/gnm-fontbutton.c |   24 ++++++++++++------------
 3 files changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d5a8913..d1de09b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-17  Morten Welinder  <terra gnome org>
+
+       * src/wbc-gtk.c (gnm_font_action_create_tool_item): Don't show the
+       style since we're not picking it explicitly.
+
 2013-03-14  Morten Welinder  <terra gnome org>
 
        * src/wbc-gtk.c (gnm_font_action_create_tool_item): Add filter to
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 40b0494..3d0df95 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -3444,6 +3444,7 @@ gnm_font_action_create_tool_item (GtkAction *action)
                 "dialog-type", GO_TYPE_FONT_SEL_DIALOG,
 //              "dialog-type", GTK_TYPE_FONT_CHOOSER_DIALOG,
                 "show-preview-entry", TRUE,
+                "show-style", FALSE,
                 NULL);
        gtk_font_chooser_set_filter_func (GTK_FONT_CHOOSER (but),
                                          cb_font_filter,
diff --git a/src/widgets/gnm-fontbutton.c b/src/widgets/gnm-fontbutton.c
index 6de05fc..669e7a0 100644
--- a/src/widgets/gnm-fontbutton.c
+++ b/src/widgets/gnm-fontbutton.c
@@ -760,7 +760,7 @@ gnm_font_button_set_title (GnmFontButton *font_button,
                            const gchar   *title)
 {
   gchar *old_title;
-  g_return_if_fail (GTK_IS_FONT_BUTTON (font_button));
+  g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
   
   old_title = font_button->priv->title;
   font_button->priv->title = g_strdup (title);
@@ -786,7 +786,7 @@ gnm_font_button_set_title (GnmFontButton *font_button,
 const gchar*
 gnm_font_button_get_title (GnmFontButton *font_button)
 {
-  g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), NULL);
+  g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), NULL);
 
   return font_button->priv->title;
 } 
@@ -804,7 +804,7 @@ gnm_font_button_get_title (GnmFontButton *font_button)
 gboolean
 gnm_font_button_get_use_font (GnmFontButton *font_button)
 {
-  g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), FALSE);
+  g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), FALSE);
 
   return font_button->priv->use_font;
 } 
@@ -822,7 +822,7 @@ void
 gnm_font_button_set_use_font (GnmFontButton *font_button,
                              gboolean       use_font)
 {
-  g_return_if_fail (GTK_IS_FONT_BUTTON (font_button));
+  g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
   
   use_font = (use_font != FALSE);
   
@@ -850,7 +850,7 @@ gnm_font_button_set_use_font (GnmFontButton *font_button,
 gboolean
 gnm_font_button_get_use_size (GnmFontButton *font_button)
 {
-  g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), FALSE);
+  g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), FALSE);
 
   return font_button->priv->use_size;
 } 
@@ -868,7 +868,7 @@ void
 gnm_font_button_set_use_size (GnmFontButton *font_button,
                               gboolean       use_size)
 {
-  g_return_if_fail (GTK_IS_FONT_BUTTON (font_button));
+  g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
   
   use_size = (use_size != FALSE);
   if (font_button->priv->use_size != use_size) 
@@ -894,7 +894,7 @@ gnm_font_button_set_use_size (GnmFontButton *font_button,
 gboolean 
 gnm_font_button_get_show_style (GnmFontButton *font_button)
 {
-  g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), FALSE);
+  g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), FALSE);
 
   return font_button->priv->show_style;
 }
@@ -912,7 +912,7 @@ void
 gnm_font_button_set_show_style (GnmFontButton *font_button,
                                 gboolean       show_style)
 {
-  g_return_if_fail (GTK_IS_FONT_BUTTON (font_button));
+  g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
   
   show_style = (show_style != FALSE);
   if (font_button->priv->show_style != show_style) 
@@ -939,7 +939,7 @@ gnm_font_button_set_show_style (GnmFontButton *font_button,
 gboolean 
 gnm_font_button_get_show_size (GnmFontButton *font_button)
 {
-  g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), FALSE);
+  g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), FALSE);
 
   return font_button->priv->show_size;
 }
@@ -957,7 +957,7 @@ void
 gnm_font_button_set_show_size (GnmFontButton *font_button,
                                gboolean       show_size)
 {
-  g_return_if_fail (GTK_IS_FONT_BUTTON (font_button));
+  g_return_if_fail (GNM_IS_FONT_BUTTON (font_button));
   
   show_size = (show_size != FALSE);
 
@@ -994,7 +994,7 @@ gnm_font_button_set_show_size (GnmFontButton *font_button,
 const gchar *
 gnm_font_button_get_font_name (GnmFontButton *font_button)
 {
-  g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), NULL);
+  g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), NULL);
 
   return font_button->priv->fontname;
 }
@@ -1016,7 +1016,7 @@ gnm_font_button_set_font_name (GnmFontButton *font_button,
 {
   PangoFontDescription *font_desc;
 
-  g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), FALSE);
+  g_return_val_if_fail (GNM_IS_FONT_BUTTON (font_button), FALSE);
   g_return_val_if_fail (fontname != NULL, FALSE);
 
   font_desc = pango_font_description_from_string (fontname);


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