diff options
author | Javier Jardón <jjardon@gnome.org> | 2010-04-13 13:20:31 +0800 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2010-04-13 22:23:16 +0800 |
commit | 96421ff37cd554af1ac11527bcad25cc2f2f1930 (patch) | |
tree | 3f1a0d1ded8ab241481df3eb1ae1772c137eff7f /widgets/misc/e-calendar.c | |
parent | 7e931d4c10c0b0d06c9df571589d003e43790690 (diff) | |
download | gsoc2013-evolution-96421ff37cd554af1ac11527bcad25cc2f2f1930.tar.gz gsoc2013-evolution-96421ff37cd554af1ac11527bcad25cc2f2f1930.tar.zst gsoc2013-evolution-96421ff37cd554af1ac11527bcad25cc2f2f1930.zip |
Use accessor functions instead direct access (GSEAL work)
Still remaining:
GtkAccessible::widget
GtkAssistant::forward
GtkAssistant::back
GtkObject::flags
GtkTreeStore::stamp
The GtkAssistant fields are related to bug #596428. We don't
need accessor functions so much as the enhancement described
there implemented.
https://bugzilla.gnome.org/show_bug.cgi?id=615613
Diffstat (limited to 'widgets/misc/e-calendar.c')
-rw-r--r-- | widgets/misc/e-calendar.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/widgets/misc/e-calendar.c b/widgets/misc/e-calendar.c index 3164b7b976..fd8f882b25 100644 --- a/widgets/misc/e-calendar.c +++ b/widgets/misc/e-calendar.c @@ -623,26 +623,29 @@ e_calendar_focus (GtkWidget *widget, GtkDirectionType direction) void e_calendar_set_focusable (ECalendar *cal, gboolean focusable) { + GtkWidget *widget; GtkWidget *prev_widget, *next_widget; + GtkWidget *toplevel; g_return_if_fail (E_IS_CALENDAR (cal)); + widget = GTK_WIDGET (cal); prev_widget = GNOME_CANVAS_WIDGET(cal->prev_item)->widget; next_widget = GNOME_CANVAS_WIDGET(cal->next_item)->widget; if (focusable) { - GTK_WIDGET_SET_FLAGS (cal, GTK_CAN_FOCUS); - GTK_WIDGET_SET_FLAGS (prev_widget, GTK_CAN_FOCUS); - GTK_WIDGET_SET_FLAGS (next_widget, GTK_CAN_FOCUS); + gtk_widget_set_can_focus (widget, TRUE); + gtk_widget_set_can_focus (prev_widget, TRUE); + gtk_widget_set_can_focus (next_widget, TRUE); } else { if (gtk_widget_has_focus (GTK_WIDGET (cal)) || e_calendar_button_has_focus (cal)) { - GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (cal)); + toplevel = gtk_widget_get_toplevel (widget); if (toplevel) gtk_widget_grab_focus (toplevel); } - GTK_WIDGET_UNSET_FLAGS (cal, GTK_CAN_FOCUS); - GTK_WIDGET_UNSET_FLAGS (prev_widget, GTK_CAN_FOCUS); - GTK_WIDGET_UNSET_FLAGS (next_widget, GTK_CAN_FOCUS); + gtk_widget_set_can_focus (widget, FALSE); + gtk_widget_set_can_focus (prev_widget, FALSE); + gtk_widget_set_can_focus (next_widget, FALSE); } } |