aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-04-18 05:39:49 +0800
committerFederico Mena Quintero <federico@novell.com>2010-04-18 05:47:35 +0800
commit287cb76b70650be2d10ee437a6920f87f4cbff8a (patch)
tree47fabcf9c8728fe2b6863cb25136462197691047 /calendar
parent1adc67f9fdf7b19170c4acef7728aa3f70cdf948 (diff)
downloadgsoc2013-evolution-287cb76b70650be2d10ee437a6920f87f4cbff8a.tar
gsoc2013-evolution-287cb76b70650be2d10ee437a6920f87f4cbff8a.tar.gz
gsoc2013-evolution-287cb76b70650be2d10ee437a6920f87f4cbff8a.tar.bz2
gsoc2013-evolution-287cb76b70650be2d10ee437a6920f87f4cbff8a.tar.lz
gsoc2013-evolution-287cb76b70650be2d10ee437a6920f87f4cbff8a.tar.xz
gsoc2013-evolution-287cb76b70650be2d10ee437a6920f87f4cbff8a.tar.zst
gsoc2013-evolution-287cb76b70650be2d10ee437a6920f87f4cbff8a.zip
Hack the row spacing of a single-row table
The table for the Time preferences in the calendar's General preferences page, when Evo runs in Express mode, has only a single row of visible widgets; all the other rows are hidden in Express mode. However, GTK+ 2.20 and earlier will include row spacings even for empty rows in GtkTable (or those that only have invisible widgets). Since that table has only a single visible row in Express mode, we hack its row spacing to be 0 so that we don't get any extra spacing in that case. Signed-off-by: Federico Mena Quintero <federico@novell.com>
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index f8ea87a4ff..ae50ab9543 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -785,6 +785,17 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs,
/* Hide senseless preferences when running in Express mode */
e_shell_hide_widgets_for_express_mode (shell, prefs->builder, "/apps/evolution/calendar/express_preferences_hidden");
+ /* HACK: GTK+ 2.18 and 2.20 has a GtkTable which includes row/column spacing even for empty rows/columns.
+ * When Evo runs in Express mode, we hide all the rows in the Time section of the calendar's General
+ * preferences page. However, due to that behavior in GTK+, we get a lot of extra spacing in that
+ * section. Since we know that in Express mode we only leave a single row visible, we'll make the
+ * table's row spacing equal to 0 in that case.
+ */
+ if (e_shell_get_express_mode (shell)) {
+ widget = e_builder_get_widget (prefs->builder, "time");
+ gtk_table_set_row_spacings (GTK_TABLE (widget), 0);
+ }
+
/* Hook up and add the toplevel widget */
target = e_cal_config_target_new_prefs (ec, prefs->gconf);