aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/alarm-notify/alarm-notify-dialog.c6
-rw-r--r--calendar/gui/dialogs/event-page.c4
-rw-r--r--calendar/gui/dialogs/recurrence-page.c4
-rw-r--r--calendar/gui/e-day-view-main-item.c8
-rw-r--r--calendar/gui/e-day-view-time-item.c4
-rw-r--r--calendar/gui/e-day-view-top-item.c4
-rw-r--r--calendar/gui/e-day-view.c24
-rw-r--r--calendar/gui/e-meeting-time-sel.c16
-rw-r--r--calendar/gui/e-memo-table.c4
-rw-r--r--calendar/gui/e-task-table.c4
-rw-r--r--calendar/gui/e-timezone-entry.c24
-rw-r--r--calendar/gui/e-week-view-event-item.c4
-rw-r--r--calendar/gui/e-week-view-main-item.c4
-rw-r--r--calendar/gui/e-week-view.c12
-rw-r--r--calendar/gui/ea-cal-view.c8
-rw-r--r--calendar/gui/ea-day-view.c4
-rw-r--r--calendar/gui/ea-week-view.c4
-rw-r--r--calendar/gui/gnome-cal.c4
-rw-r--r--calendar/gui/tag-calendar.c8
-rw-r--r--calendar/gui/weekday-picker.c4
20 files changed, 153 insertions, 1 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c
index 7062ccb376..a6259d69ab 100644
--- a/calendar/gui/alarm-notify/alarm-notify-dialog.c
+++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c
@@ -310,8 +310,12 @@ notified_alarms_dialog_new (void)
g_signal_connect (G_OBJECT (an->dialog), "response", G_CALLBACK (dialog_response_cb), an);
g_signal_connect (G_OBJECT (an->dialog), "destroy", G_CALLBACK (dialog_destroyed_cb), an);
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_get_realized (an->dialog))
+#else
if (!GTK_WIDGET_REALIZED (an->dialog))
- gtk_widget_realize (an->dialog);
+#endif
+ gtk_widget_realize (an->dialog);
gtk_window_set_icon_name (GTK_WINDOW (an->dialog), "stock_alarm");
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index bef407c8dd..7d79a2bfb7 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -2457,7 +2457,11 @@ safe_to_process_date_changed_signal (GtkWidget *dedit_widget)
entry = e_date_edit_get_entry (dedit);
+#if GTK_CHECK_VERSION(2,19,7)
+ return !entry || !gtk_widget_has_focus (entry);
+#else
return !entry || !GTK_WIDGET_HAS_FOCUS (entry);
+#endif
}
/* Callback used when the start date widget change. We check that the
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index e71a3445ae..6bb9f18e28 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -900,7 +900,11 @@ fill_component (RecurrencePage *rpage, ECalComponent *comp)
e_cal_component_set_exdate_list (comp, list);
e_cal_component_free_exdate_list (list);
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_get_visible (priv->ending_combo) && gtk_widget_get_sensitive (priv->ending_combo) &&
+#else
if (GTK_WIDGET_VISIBLE (priv->ending_combo) && GTK_WIDGET_IS_SENSITIVE (priv->ending_combo) &&
+#endif
e_dialog_combo_box_get (priv->ending_combo, ending_types_map) == ENDING_UNTIL) {
/* check whether the "until" date is in the future */
struct icaltimetype tt;
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 6c234bf3d1..11baebf67b 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -279,7 +279,11 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item,
g_object_get (G_OBJECT (event->canvas_item), "x_offset", &text_x_offset, NULL);
/* Draw shadow around the event when selected */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (is_editing && (gtk_widget_has_focus (day_view->main_canvas))) {
+#else
if (is_editing && (GTK_WIDGET_HAS_FOCUS (day_view->main_canvas))) {
+#endif
/* For embossing Item selection */
item_x -= 1;
item_y -= 2;
@@ -1099,7 +1103,11 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item,
if (can_draw_in_region (draw_region, rect_x, rect_y, rect_width, rect_height)) {
cairo_save (cr);
+#if GTK_CHECK_VERSION(2,19,7)
+ gdk_cairo_set_source_color (cr, &day_view->colors[gtk_widget_has_focus (GTK_WIDGET (day_view)) ? E_DAY_VIEW_COLOR_BG_SELECTED : E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED]);
+#else
gdk_cairo_set_source_color (cr, &day_view->colors[GTK_WIDGET_HAS_FOCUS(day_view) ? E_DAY_VIEW_COLOR_BG_SELECTED : E_DAY_VIEW_COLOR_BG_SELECTED_UNFOCUSSED]);
+#endif
cairo_rectangle (cr, rect_x, rect_y, rect_width, rect_height);
cairo_fill (cr);
cairo_restore (cr);
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index 94f2327185..6f7b8313c0 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -868,7 +868,11 @@ e_day_view_time_item_on_button_press (EDayViewTimeItem *time_item,
if (row == -1)
return;
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (day_view)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (day_view))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (day_view));
if (gdk_pointer_grab (GTK_LAYOUT (canvas)->bin_window, FALSE,
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index 6b6a6fd8f7..4012ba6289 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -648,7 +648,11 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item,
cairo_restore (cr);
/* Draw the selection background. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_has_focus (GTK_WIDGET (day_view))
+#else
if (GTK_WIDGET_HAS_FOCUS (day_view)
+#endif
&& day_view->selection_start_day != -1) {
gint start_col, end_col, rect_x, rect_y, rect_w, rect_h;
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 3800fd69c6..3df599f5d7 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -3161,7 +3161,11 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
return TRUE;
}
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (day_view)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (day_view))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (day_view));
if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE,
@@ -3174,7 +3178,11 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
e_day_view_start_selection (day_view, day, -1);
}
} else if (event->button == 3) {
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (day_view)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (day_view))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (day_view));
if (day < day_view->selection_start_day || day > day_view->selection_end_day) {
@@ -3299,7 +3307,11 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
return TRUE;
}
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (day_view)) && !gtk_widget_has_focus (GTK_WIDGET (day_view->main_canvas)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (day_view) && !GTK_WIDGET_HAS_FOCUS (day_view->main_canvas))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (day_view));
if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE,
@@ -3313,7 +3325,11 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
g_signal_emit_by_name (day_view, "selected_time_changed");
}
} else if (event->button == 3) {
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (day_view)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (day_view))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (day_view));
if ((day < day_view->selection_start_day || day > day_view->selection_end_day)
@@ -3496,7 +3512,11 @@ e_day_view_on_long_event_click (EDayView *day_view,
/* Grab the keyboard focus, so the event being edited is saved
and we can use the Escape key to abort the resize. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (day_view)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (day_view))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (day_view));
if (gdk_pointer_grab (GTK_LAYOUT (day_view->top_canvas)->bin_window, FALSE,
@@ -3566,7 +3586,11 @@ e_day_view_on_event_click (EDayView *day_view,
/* Grab the keyboard focus, so the event being edited is saved
and we can use the Escape key to abort the resize. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (day_view)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (day_view))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (day_view));
if (gdk_pointer_grab (GTK_LAYOUT (day_view->main_canvas)->bin_window, FALSE,
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 9998cb2445..19a572d6d8 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -1653,7 +1653,11 @@ e_meeting_time_selector_on_update_free_busy (GtkWidget *button,
{
/* Make sure the menu pops down, which doesn't happen by default if
keyboard accelerators are used. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_get_visible (mts->options_menu))
+#else
if (GTK_WIDGET_VISIBLE (mts->options_menu))
+#endif
gtk_menu_popdown (GTK_MENU (mts->options_menu));
e_meeting_time_selector_refresh_free_busy (mts, 0, TRUE);
@@ -1700,7 +1704,11 @@ e_meeting_time_selector_on_autopick_option_toggled (GtkWidget *button,
{
/* Make sure the menu pops down, which doesn't happen by default if
keyboard accelerators are used. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_get_visible (mts->autopick_menu))
+#else
if (GTK_WIDGET_VISIBLE (mts->autopick_menu))
+#endif
gtk_menu_popdown (GTK_MENU (mts->autopick_menu));
}
@@ -2100,7 +2108,11 @@ e_meeting_time_selector_on_zoomed_out_toggled (GtkWidget *menuitem,
{
/* Make sure the menu pops down, which doesn't happen by default if
keyboard accelerators are used. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_get_visible (mts->options_menu))
+#else
if (GTK_WIDGET_VISIBLE (mts->options_menu))
+#endif
gtk_menu_popdown (GTK_MENU (mts->options_menu));
e_meeting_time_selector_set_zoomed_out (mts, GTK_CHECK_MENU_ITEM (menuitem)->active);
@@ -2113,7 +2125,11 @@ e_meeting_time_selector_on_working_hours_toggled (GtkWidget *menuitem,
{
/* Make sure the menu pops down, which doesn't happen by default if
keyboard accelerators are used. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_get_visible (mts->options_menu))
+#else
if (GTK_WIDGET_VISIBLE (mts->options_menu))
+#endif
gtk_menu_popdown (GTK_MENU (mts->options_menu));
e_meeting_time_selector_set_working_hours_only (mts, GTK_CHECK_MENU_ITEM (menuitem)->active);
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 24eded5223..3f1d8f1bb3 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -911,7 +911,11 @@ memo_table_paste_clipboard (ESelectable *selectable)
/* Paste text into a cell being edited. */
if (gtk_clipboard_wait_is_text_available (clipboard) &&
+#if GTK_CHECK_VERSION(2,19,7)
+ gtk_widget_has_focus (GTK_WIDGET (table_canvas)) &&
+#else
GTK_WIDGET_HAS_FOCUS (table_canvas) &&
+#endif
E_IS_TABLE_ITEM (item) &&
E_TABLE_ITEM (item)->editing_col >= 0 &&
E_TABLE_ITEM (item)->editing_row >= 0) {
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index e9f3645b30..9a3a9af210 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -1132,7 +1132,11 @@ task_table_paste_clipboard (ESelectable *selectable)
/* Paste text into a cell being edited. */
if (gtk_clipboard_wait_is_text_available (clipboard) &&
+#if GTK_CHECK_VERSION(2,19,7)
+ gtk_widget_has_focus (GTK_WIDGET (table_canvas)) &&
+#else
GTK_WIDGET_HAS_FOCUS (table_canvas) &&
+#endif
E_IS_TABLE_ITEM (item) &&
E_TABLE_ITEM (item)->editing_col >= 0 &&
E_TABLE_ITEM (item)->editing_row >= 0) {
diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c
index a01c060491..309661a2db 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -236,20 +236,44 @@ timezone_entry_focus (GtkWidget *widget,
priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget);
if (direction == GTK_DIR_TAB_FORWARD) {
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_has_focus (priv->entry))
+#else
if (GTK_WIDGET_HAS_FOCUS (priv->entry))
+#endif
gtk_widget_grab_focus (priv->button);
+#if GTK_CHECK_VERSION(2,19,7)
+ else if (gtk_widget_has_focus (priv->button))
+#else
else if (GTK_WIDGET_HAS_FOCUS (priv->button))
+#endif
return FALSE;
+#if GTK_CHECK_VERSION(2,19,7)
+ else if (gtk_widget_get_visible (priv->entry))
+#else
else if (GTK_WIDGET_VISIBLE (priv->entry))
+#endif
gtk_widget_grab_focus (priv->entry);
else
gtk_widget_grab_focus (priv->button);
} else if (direction == GTK_DIR_TAB_BACKWARD) {
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_has_focus (priv->entry))
+#else
if (GTK_WIDGET_HAS_FOCUS (priv->entry))
+#endif
return FALSE;
+#if GTK_CHECK_VERSION(2,19,7)
+ else if (gtk_widget_has_focus (priv->button)) {
+#else
else if (GTK_WIDGET_HAS_FOCUS (priv->button)) {
+#endif
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_get_visible (priv->entry))
+#else
if (GTK_WIDGET_VISIBLE (priv->entry))
+#endif
gtk_widget_grab_focus (priv->entry);
else
return FALSE;
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 7971ebb2a8..90d8831747 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -201,7 +201,11 @@ week_view_event_item_button_press (EWeekViewEventItem *event_item,
return TRUE;
} else if (bevent->button.button == 3) {
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (week_view))) {
+#else
if (!GTK_WIDGET_HAS_FOCUS (week_view)) {
+#endif
gtk_widget_grab_focus (GTK_WIDGET (week_view));
if (week_view->event_destroyed) {
week_view->event_destroyed = FALSE;
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index 04b77311d6..eb8de3af9a 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -169,7 +169,11 @@ week_view_main_item_draw_day (EWeekViewMainItem *main_item,
|| week_view->selection_end_day < day)
selected = FALSE;
if (selected) {
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_has_focus (GTK_WIDGET (week_view))) {
+#else
if (GTK_WIDGET_HAS_FOCUS (week_view)) {
+#endif
gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED]);
} else {
gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_SELECTED]);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 2c44d26458..c319520924 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2365,7 +2365,11 @@ e_week_view_on_button_press (GtkWidget *widget,
if (event->button == 1) {
/* Start the selection drag. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (week_view)) && !gtk_widget_has_focus (GTK_WIDGET (week_view->main_canvas)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (week_view) && !GTK_WIDGET_HAS_FOCUS (week_view->main_canvas))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (week_view));
if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE,
@@ -2384,7 +2388,11 @@ e_week_view_on_button_press (GtkWidget *widget,
gtk_widget_queue_draw (week_view->main_canvas);
}
} else if (event->button == 3) {
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (week_view)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (week_view))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (week_view));
if (day < week_view->selection_start_day || day > week_view->selection_end_day) {
@@ -3391,7 +3399,11 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
e = &g_array_index (week_view->events, EWeekViewEvent, event_num);
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_has_focus (GTK_WIDGET (week_view)))
+#else
if (!GTK_WIDGET_HAS_FOCUS (week_view))
+#endif
gtk_widget_grab_focus (GTK_WIDGET (week_view));
e_week_view_set_selected_time_range_visible (week_view, e->start, e->end);
diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c
index 2a1c128059..ceffaa0483 100644
--- a/calendar/gui/ea-cal-view.c
+++ b/calendar/gui/ea-cal-view.c
@@ -331,7 +331,11 @@ action_interface_do_action (AtkAction *action, gint index)
*/
return FALSE;
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
+#else
if (!GTK_WIDGET_IS_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
+#endif
return FALSE;
cal_view = E_CALENDAR_VIEW (widget);
@@ -395,7 +399,11 @@ action_interface_get_keybinding (AtkAction *action, gint index)
*/
return NULL;
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
+#else
if (!GTK_WIDGET_IS_SENSITIVE (widget) || !GTK_WIDGET_VISIBLE (widget))
+#endif
return NULL;
switch (index) {
diff --git a/calendar/gui/ea-day-view.c b/calendar/gui/ea-day-view.c
index 1d0199df3a..c75bf89f7b 100644
--- a/calendar/gui/ea-day-view.c
+++ b/calendar/gui/ea-day-view.c
@@ -133,7 +133,11 @@ ea_day_view_get_name (AtkObject *accessible)
day_view = E_DAY_VIEW (GTK_ACCESSIBLE (accessible)->widget);
gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (day_view));
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_get_visible (GTK_WIDGET (gcal)))
+#else
if (!GTK_WIDGET_VISIBLE (GTK_WIDGET (gcal)))
+#endif
return NULL;
label_text = ea_gnome_calendar_get_label_description (gcal);
diff --git a/calendar/gui/ea-week-view.c b/calendar/gui/ea-week-view.c
index 6e9751eb27..c3b4658e78 100644
--- a/calendar/gui/ea-week-view.c
+++ b/calendar/gui/ea-week-view.c
@@ -134,7 +134,11 @@ ea_week_view_get_name (AtkObject *accessible)
week_view = E_WEEK_VIEW (GTK_ACCESSIBLE (accessible)->widget);
gcal = e_calendar_view_get_calendar (E_CALENDAR_VIEW (week_view));
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_get_visible (GTK_WIDGET (gcal)))
+#else
if (!GTK_WIDGET_VISIBLE (GTK_WIDGET (gcal)))
+#endif
return NULL;
label_text = ea_gnome_calendar_get_label_description (gcal);
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 987d3dad9c..8c48b8eafb 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1993,7 +1993,11 @@ gnome_calendar_update_date_navigator (GnomeCalendar *gcal)
return;
/* If the ECalendar isn't visible, we just return. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_get_visible (GTK_WIDGET (priv->date_navigator)))
+#else
if (!GTK_WIDGET_VISIBLE (priv->date_navigator))
+#endif
return;
if (priv->current_view_type == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range)
diff --git a/calendar/gui/tag-calendar.c b/calendar/gui/tag-calendar.c
index 2eddfbfec6..2d167cfa7d 100644
--- a/calendar/gui/tag-calendar.c
+++ b/calendar/gui/tag-calendar.c
@@ -144,7 +144,11 @@ tag_calendar_by_client (ECalendar *ecal, ECal *client)
g_return_if_fail (E_IS_CAL (client));
/* If the ECalendar isn't visible, we just return. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_get_visible (GTK_WIDGET (ecal)))
+#else
if (!GTK_WIDGET_VISIBLE (ecal))
+#endif
return;
if (e_cal_get_load_state (client) != E_CAL_LOAD_LOADED)
@@ -213,7 +217,11 @@ tag_calendar_by_comp (ECalendar *ecal, ECalComponent *comp, ECal *client, icalti
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
/* If the ECalendar isn't visible, we just return. */
+#if GTK_CHECK_VERSION(2,19,7)
+ if (!gtk_widget_get_visible (GTK_WIDGET (ecal)))
+#else
if (!GTK_WIDGET_VISIBLE (ecal))
+#endif
return;
if (!prepare_tag (ecal, &c, display_zone, clear_first))
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index 75223ad7d8..ab06db9765 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -318,7 +318,11 @@ weekday_picker_focus (GtkWidget *widget,
if (!gtk_widget_get_can_focus (widget))
return FALSE;
+#if GTK_CHECK_VERSION(2,19,7)
+ if (gtk_widget_has_focus (widget)) {
+#else
if (GTK_WIDGET_HAS_FOCUS (widget)) {
+#endif
priv->focus_day = -1;
colorize_items (wp);
return FALSE;