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 /calendar/gui | |
parent | 7e931d4c10c0b0d06c9df571589d003e43790690 (diff) | |
download | gsoc2013-evolution-96421ff37cd554af1ac11527bcad25cc2f2f1930.tar gsoc2013-evolution-96421ff37cd554af1ac11527bcad25cc2f2f1930.tar.gz gsoc2013-evolution-96421ff37cd554af1ac11527bcad25cc2f2f1930.tar.bz2 gsoc2013-evolution-96421ff37cd554af1ac11527bcad25cc2f2f1930.tar.lz gsoc2013-evolution-96421ff37cd554af1ac11527bcad25cc2f2f1930.tar.xz 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 'calendar/gui')
-rw-r--r-- | calendar/gui/dialogs/calendar-setup.c | 16 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-select-names-renderer.c | 4 | ||||
-rw-r--r-- | calendar/gui/e-timezone-entry.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 2 |
5 files changed, 15 insertions, 11 deletions
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index 9b396ce2cf..b21c027fe1 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -137,7 +137,7 @@ static GtkWidget * eccp_get_source_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { static GtkWidget *label, *type; - gint row; + guint row; CalendarSourceDialog *sdialog = data; ECalConfigTargetSource *t = (ECalConfigTargetSource *) ec->target; ESource *source = t->source; @@ -147,7 +147,7 @@ eccp_get_source_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidg if (old) gtk_widget_destroy (label); - row = ((GtkTable *)parent)->nrows; + g_object_get (parent, "n-rows", &row, NULL); if (sdialog->original_source) { label = gtk_label_new (_("Type:")); @@ -214,14 +214,14 @@ static GtkWidget * eccp_get_source_name (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { static GtkWidget *label, *entry; - gint row; + guint row; ECalConfigTargetSource *t = (ECalConfigTargetSource *) ec->target; ESource *source = t->source; if (old) gtk_widget_destroy (label); - row = ((GtkTable*)parent)->nrows; + g_object_get (parent, "n-rows", &row, NULL); label = gtk_label_new_with_mnemonic (_("_Name:")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); @@ -257,14 +257,14 @@ eccp_general_offline (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidg CalendarSourceDialog *sdialog = data; GtkWidget *offline_setting = NULL; const gchar *offline_sync; - gint row; + guint row; const gchar *base_uri = e_source_group_peek_base_uri (sdialog->source_group); gboolean is_local = base_uri && (g_str_has_prefix (base_uri, "file://") || g_str_has_prefix (base_uri, "contacts://")); offline_sync = e_source_get_property (sdialog->source, "offline_sync"); if (old) return old; else { - row = ((GtkTable*)parent)->nrows; + g_object_get (parent, "n-rows", &row, NULL); if (sdialog->source_type == E_CAL_SOURCE_TYPE_EVENT) offline_setting = gtk_check_button_new_with_mnemonic (_("Cop_y calendar contents locally for offline operation")); @@ -322,10 +322,12 @@ eccp_get_source_color (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWid { CalendarSourceDialog *sdialog = data; static GtkWidget *label, *color_button; - guint row = GTK_TABLE (parent)->nrows; + guint row; const gchar *color_spec = NULL; GdkColor color; + g_object_get (parent, "n-rows", &row, NULL); + if (old) gtk_widget_destroy (label); diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index d2a21f0097..3d9985ba08 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -987,7 +987,7 @@ e_day_view_init (EDayView *day_view) GtkLayout *layout; GtkWidget *w; - GTK_WIDGET_SET_FLAGS (day_view, GTK_CAN_FOCUS); + gtk_widget_set_can_focus (GTK_WIDGET (day_view), TRUE); day_view->long_events = g_array_new (FALSE, FALSE, sizeof (EDayViewEvent)); diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c index 93f02bfdcf..ddb8e72efe 100644 --- a/calendar/gui/e-select-names-renderer.c +++ b/calendar/gui/e-select-names-renderer.c @@ -54,11 +54,13 @@ static void e_select_names_renderer_editing_done (GtkCellEditable *editable, ESelectNamesRenderer *cell) { GList *addresses = NULL, *names = NULL, *a, *n; + gboolean editing_canceled; /* We don't need to listen for the focus out event any more */ g_signal_handlers_disconnect_matched (editable, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, cell); - if (GTK_ENTRY (editable)->editing_canceled) { + g_object_get (editable, "editing-canceled", &editing_canceled, NULL); + if (editing_canceled) { gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER (cell), TRUE); goto cleanup; } diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index 5adb4102d2..c281a4aedf 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -304,7 +304,7 @@ e_timezone_entry_init (ETimezoneEntry *timezone_entry) timezone_entry->priv = E_TIMEZONE_ENTRY_GET_PRIVATE (timezone_entry); - GTK_WIDGET_SET_FLAGS (GTK_WIDGET (timezone_entry), GTK_CAN_FOCUS); + gtk_widget_set_can_focus (GTK_WIDGET (timezone_entry), TRUE); widget = gtk_entry_new (); gtk_editable_set_editable (GTK_EDITABLE (widget), FALSE); diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 0ab4415a6f..5e850f53ab 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -695,7 +695,7 @@ e_week_view_init (EWeekView *week_view) GdkPixbuf *pixbuf; gint i; - GTK_WIDGET_SET_FLAGS (week_view, GTK_CAN_FOCUS); + gtk_widget_set_can_focus (GTK_WIDGET (week_view), TRUE); week_view->query = NULL; week_view->event_destroyed = FALSE; |