aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorSuman Manjunath <msuman@src.gnome.org>2008-01-14 18:32:42 +0800
committerSuman Manjunath <msuman@src.gnome.org>2008-01-14 18:32:42 +0800
commit3cccd392dcf5066d818dfcd4caf464fbbc2ac0bb (patch)
treebdc1d9cb022fa1d7ec4962df94569dd6343655d6 /calendar
parenta42b719e162605f458190f24b870c96c8d477a1c (diff)
downloadgsoc2013-evolution-3cccd392dcf5066d818dfcd4caf464fbbc2ac0bb.tar
gsoc2013-evolution-3cccd392dcf5066d818dfcd4caf464fbbc2ac0bb.tar.gz
gsoc2013-evolution-3cccd392dcf5066d818dfcd4caf464fbbc2ac0bb.tar.bz2
gsoc2013-evolution-3cccd392dcf5066d818dfcd4caf464fbbc2ac0bb.tar.lz
gsoc2013-evolution-3cccd392dcf5066d818dfcd4caf464fbbc2ac0bb.tar.xz
gsoc2013-evolution-3cccd392dcf5066d818dfcd4caf464fbbc2ac0bb.tar.zst
gsoc2013-evolution-3cccd392dcf5066d818dfcd4caf464fbbc2ac0bb.zip
Patch from Milan Crha <mcrha@redhat.com> Fix for bug #507359 (Free/Busy UI needs names and graphs widgets in a container)
svn path=/trunk/; revision=34814
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog12
-rw-r--r--calendar/gui/dialogs/memo-page.c2
-rw-r--r--calendar/gui/e-meeting-time-sel.c35
-rw-r--r--calendar/gui/e-meeting-time-sel.h2
4 files changed, 43 insertions, 8 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index dbf56cdb14..c80e94515d 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,17 @@
2008-01-14 Milan Crha <mcrha@redhat.com>
+ ** Fix for bug #507359
+
+ * gui/e-meeting-time-sel.h: (struct _EMeetingTimeSelector):
+ * gui/e-meeting-time-sel.c: (e_meeting_time_selector_class_init),
+ (e_meeting_time_selector_destroy), (style_change_idle_func),
+ (e_meeting_time_selector_style_set): Recalculate sizes in idle queue,
+ which will ensure the style is propagated in list_view too, because we
+ read from there the height of the row and the style isn't set there
+ before it is set in our widget.
+
+2008-01-14 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #490464
* gui/dialogs/memo-page.c: (get_recipients): New helper function to
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index d70f937c74..038346c898 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -355,7 +355,7 @@ get_recipients (ECalComponent *comp)
icalprop = icalcomponent_get_next_property (icalcomp, ICAL_X_PROPERTY)) {
const char *xname = icalproperty_get_x_name (icalprop);
- if (xname && 0 == strcmp (xname, "X-EVOLUTION-RECIPIENTS"))
+ if (xname && strcmp (xname, "X-EVOLUTION-RECIPIENTS") == 0)
break;
}
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 013fa338f9..4744ab2e74 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -263,6 +263,7 @@ e_meeting_time_selector_init (EMeetingTimeSelector * mts)
mts);
mts->fb_refresh_not = 0;
+ mts->style_change_idle_id = 0;
}
@@ -842,6 +843,12 @@ e_meeting_time_selector_destroy (GtkObject *object)
if (mts->fb_refresh_not != 0) {
g_source_remove (mts->fb_refresh_not);
+ mts->fb_refresh_not = 0;
+ }
+
+ if (mts->style_change_idle_id != 0) {
+ g_source_remove (mts->style_change_idle_id);
+ mts->style_change_idle_id = 0;
}
if (GTK_OBJECT_CLASS (e_meeting_time_selector_parent_class)->destroy)
@@ -891,9 +898,8 @@ get_cell_height (GtkTreeView *tree)
return height;
}
-static void
-e_meeting_time_selector_style_set (GtkWidget *widget,
- GtkStyle *previous_style)
+static gboolean
+style_change_idle_func (gpointer widget)
{
EMeetingTimeSelector *mts;
EMeetingTime saved_time;
@@ -904,9 +910,6 @@ e_meeting_time_selector_style_set (GtkWidget *widget,
PangoFontMetrics *font_metrics;
PangoLayout *layout;
- if (GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->style_set)
- (*GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->style_set)(widget, previous_style);
-
mts = E_MEETING_TIME_SELECTOR (widget);
/* Set up Pango prerequisites */
@@ -928,7 +931,8 @@ e_meeting_time_selector_style_set (GtkWidget *widget,
max_hour_width = MAX (max_hour_width, mts->hour_widths[hour]);
}
- mts->row_height = get_cell_height (GTK_TREE_VIEW (mts->list_view));
+ /* add also some padding for lines so it fits better */
+ mts->row_height = get_cell_height (GTK_TREE_VIEW (mts->list_view)) + 2;
mts->col_width = max_hour_width + 6;
e_meeting_time_selector_save_position (mts, &saved_time);
@@ -956,6 +960,23 @@ e_meeting_time_selector_style_set (GtkWidget *widget,
g_object_unref (layout);
pango_font_metrics_unref (font_metrics);
+
+ mts->style_change_idle_id = 0;
+
+ return FALSE;
+}
+
+static void
+e_meeting_time_selector_style_set (GtkWidget *widget,
+ GtkStyle *previous_style)
+{
+ EMeetingTimeSelector *mts = E_MEETING_TIME_SELECTOR (widget);
+
+ if (GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->style_set)
+ (*GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->style_set)(widget, previous_style);
+
+ if (!mts->style_change_idle_id)
+ mts->style_change_idle_id = g_idle_add (style_change_idle_func, widget);
}
/* This draws a shadow around the top display and main display. */
diff --git a/calendar/gui/e-meeting-time-sel.h b/calendar/gui/e-meeting-time-sel.h
index 9b95c7d767..8a10c04b7e 100644
--- a/calendar/gui/e-meeting-time-sel.h
+++ b/calendar/gui/e-meeting-time-sel.h
@@ -262,6 +262,8 @@ struct _EMeetingTimeSelector
gboolean fb_refresh_not;
GdkCursorType last_cursor_set;
+
+ guint style_change_idle_id;
};