[gnumeric] GUI: Don't show font button when the toolbar is vertical.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: Don't show font button when the toolbar is vertical.
- Date: Thu, 18 Apr 2013 00:18:22 +0000 (UTC)
commit 722e54a69dff67f0dd3844fc7a20094fecdef7ce
Author: Morten Welinder <terra gnome org>
Date: Wed Apr 17 20:17:44 2013 -0400
GUI: Don't show font button when the toolbar is vertical.
This version is too wide. We need something else for the vertical
case.
ChangeLog | 3 +++
src/wbc-gtk.c | 12 ++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 55db2cb..be2cf10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2013-04-17 Morten Welinder <terra gnome org>
+ * src/wbc-gtk.c (wbc_gtk_init_font_name): Show the font button
+ only for horizontal toolbars.
+
* src/gui-file.c (file_saver_format_changed_cb): New function to
change the extension when the format is changed.
(gui_file_save_as): Don't try to hide the extension -- it
diff --git a/src/wbc-gtk.c b/src/wbc-gtk.c
index 87a9a5f..243345d 100644
--- a/src/wbc-gtk.c
+++ b/src/wbc-gtk.c
@@ -3488,23 +3488,22 @@ cb_font_filter (G_GNUC_UNUSED const PangoFontFamily *family,
static GtkWidget *
gnm_font_action_create_tool_item (GtkAction *action)
{
- GtkWidget *item = g_object_new (GTK_TYPE_TOOL_ITEM, NULL);
+ GtkWidget *item = g_object_new
+ (GTK_TYPE_TOOL_ITEM,
+ NULL);
GtkWidget *but = g_object_new
(gnm_font_button_get_type(),
"dialog-type", GO_TYPE_FONT_SEL_DIALOG,
-// "dialog-type", GTK_TYPE_FONT_CHOOSER_DIALOG,
"show-preview-entry", TRUE,
"show-style", FALSE,
+ "relief", gtk_tool_item_get_relief_style (GTK_TOOL_ITEM (item)),
+ "focus-on-click", FALSE,
NULL);
if (0) gtk_font_chooser_set_filter_func (GTK_FONT_CHOOSER (but),
cb_font_filter,
NULL,
NULL);
gtk_widget_show_all (but);
- gtk_button_set_relief
- (GTK_BUTTON (but),
- gtk_tool_item_get_relief_style (GTK_TOOL_ITEM (item)));
- gtk_button_set_focus_on_click (GTK_BUTTON (but), FALSE);
gtk_container_add (GTK_CONTAINER (item), but);
g_signal_connect (but,
"font-set", G_CALLBACK (cb_font_set),
@@ -3590,6 +3589,7 @@ wbc_gtk_init_font_name (WBCGtk *gtk)
{
gtk->font_name = g_object_new
(gnm_font_action_get_type (),
+ "visible-vertical", FALSE,
"name", "FontName",
"tooltip", _("Change font"),
NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]