aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-04-13 13:20:31 +0800
committerJavier Jardón <jjardon@gnome.org>2010-04-13 22:23:16 +0800
commit96421ff37cd554af1ac11527bcad25cc2f2f1930 (patch)
tree3f1a0d1ded8ab241481df3eb1ae1772c137eff7f
parent7e931d4c10c0b0d06c9df571589d003e43790690 (diff)
downloadgsoc2013-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
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c3
-rw-r--r--calendar/gui/dialogs/calendar-setup.c16
-rw-r--r--calendar/gui/e-day-view.c2
-rw-r--r--calendar/gui/e-select-names-renderer.c4
-rw-r--r--calendar/gui/e-timezone-entry.c2
-rw-r--r--calendar/gui/e-week-view.c2
-rw-r--r--capplet/anjal-settings-main.c2
-rw-r--r--capplet/settings/mail-account-view.c4
-rw-r--r--capplet/settings/mail-capplet-shell.c6
-rw-r--r--capplet/settings/mail-decoration.c20
-rw-r--r--capplet/settings/mail-settings-view.c4
-rw-r--r--composer/e-composer-header.c2
-rw-r--r--e-util/e-plugin-util.c7
-rw-r--r--filter/e-filter-rule.c4
-rw-r--r--mail/e-mail-attachment-bar.c4
-rw-r--r--mail/em-account-editor.c9
-rw-r--r--mail/em-filter-rule.c4
-rw-r--r--mail/em-folder-tree.c2
-rw-r--r--mail/em-format-html-display.c2
-rw-r--r--modules/calendar/e-cal-shell-view-actions.c2
-rw-r--r--modules/calendar/e-cal-shell-view.c3
-rw-r--r--plugins/attachment-reminder/attachment-reminder.c6
-rw-r--r--plugins/bogo-junk-plugin/bf-junk-filter.c8
-rw-r--r--plugins/caldav/caldav-source.c6
-rw-r--r--plugins/calendar-file/calendar-file.c6
-rw-r--r--plugins/calendar-weather/calendar-weather.c8
-rw-r--r--plugins/email-custom-header/email-custom-header.c6
-rw-r--r--plugins/google-account-setup/google-source.c4
-rw-r--r--plugins/prefer-plain/prefer-plain.c4
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c8
-rw-r--r--plugins/templates/templates.c6
-rw-r--r--shell/e-shell-content.c2
-rw-r--r--shell/e-shell-sidebar.c2
-rw-r--r--shell/e-shell-switcher.c4
-rw-r--r--widgets/misc/e-attachment-paned.c4
-rw-r--r--widgets/misc/e-calendar.c17
-rw-r--r--widgets/misc/e-map.c9
-rw-r--r--widgets/misc/e-menu-tool-button.c3
-rw-r--r--widgets/misc/e-online-button.c2
-rw-r--r--widgets/misc/e-preferences-window.c2
-rw-r--r--widgets/table/e-cell-combo.c8
-rw-r--r--widgets/table/e-table-field-chooser.c6
-rw-r--r--widgets/table/e-table.c2
-rw-r--r--widgets/table/e-tree.c4
44 files changed, 137 insertions, 94 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 3194eec943..ba7ff79ee8 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -1191,7 +1191,8 @@ expand_mail (EContactEditor *editor, gboolean expanded)
table = GTK_TABLE (e_builder_get_widget (editor->builder, "email-table"));
if (check != NULL && table != NULL) {
g_object_ref (G_OBJECT (check));
- gtk_container_remove (GTK_CONTAINER (check->parent), check);
+ gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (check)),
+ check);
if (expanded)
gtk_table_attach_defaults (table, check, 0, 4, 2, 3);
else
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;
diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c
index 6352f020bd..aa090e36fd 100644
--- a/capplet/anjal-settings-main.c
+++ b/capplet/anjal-settings-main.c
@@ -91,7 +91,7 @@ mail_message_received_cb (UniqueApp *app G_GNUC_UNUSED,
//mail_shell_set_cmdline_args ((MailShell *)window, args);
//mail_shell_handle_cmdline ((MailShell *)window);
g_free (url);
- gdk_window_raise (((GtkWidget *)window)->window);
+ gdk_window_raise (gtk_widget_get_window (GTK_WIDGET (window)));
gtk_window_deiconify (window);
gtk_window_present (window);
diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c
index e97abdc6dc..8c488af5b4 100644
--- a/capplet/settings/mail-account-view.c
+++ b/capplet/settings/mail-account-view.c
@@ -636,7 +636,9 @@ static gboolean
mav_btn_expose (GtkWidget *w, GdkEventExpose *event, MailAccountView *mfv)
{
GdkPixbuf *img = g_object_get_data ((GObject *)w, "pbuf");
- cairo_t *cr = gdk_cairo_create (w->window);
+ cairo_t *cr;
+
+ cr = gdk_cairo_create (gtk_widget_get_window (w));
cairo_save (cr);
gdk_cairo_set_source_pixbuf (cr, img, event->area.x-5, event->area.y-4);
cairo_paint(cr);
diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c
index da22b9d0d5..3c5803b89a 100644
--- a/capplet/settings/mail-capplet-shell.c
+++ b/capplet/settings/mail-capplet-shell.c
@@ -267,7 +267,11 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean
gint
mail_capplet_shell_toolbar_height (MailCappletShell *shell)
{
- return shell->priv->top_bar->allocation.height;
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (shell->priv->top_bar, &allocation);
+
+ return allocation.height;
}
MailCappletShell *
diff --git a/capplet/settings/mail-decoration.c b/capplet/settings/mail-decoration.c
index 056283dabe..d3cddc9b28 100644
--- a/capplet/settings/mail-decoration.c
+++ b/capplet/settings/mail-decoration.c
@@ -86,7 +86,7 @@ md_translate_position (GdkWindow *w, double ex, double ey, gint *x, gint *y, Gtk
*x = (gint)ex;
*y = (gint)ey;
- while (w && w != window->window) {
+ while (w && w != gtk_widget_get_window (window)) {
gint cx, cy, cw, ch, cd;
gdk_window_get_geometry (w, &cx, &cy, &cw, &ch, &cd);
*x += cx;
@@ -110,19 +110,28 @@ in_left (MailDecoration *md, double x)
static gboolean
in_bottom (MailDecoration *md, double y)
{
- return y >= ((GtkWidget *)md->window)->allocation.height - md->priv->resize_width;
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (GTK_WIDGET (md->window), &allocation);
+
+ return y >= allocation.height - md->priv->resize_width;
}
static gboolean
in_right (MailDecoration *md, double x)
{
- return x >= ((GtkWidget *)md->window)->allocation.width - md->priv->resize_width;
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (GTK_WIDGET (md->window), &allocation);
+
+ return x >= allocation.width - md->priv->resize_width;
}
static void
set_cursor (MailDecoration *md, GdkWindowEdge edge)
{
- gdk_window_set_cursor (((GtkWidget *)md->window)->window, md->priv->cursors[edge]);
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (md->window)),
+ md->priv->cursors[edge]);
md->priv->default_cursor = FALSE;
}
@@ -131,7 +140,8 @@ reset_cursor (MailDecoration *md)
{
if (!md->priv->default_cursor) {
md->priv->default_cursor = TRUE;
- gdk_window_set_cursor (((GtkWidget *)md->window)->window, NULL);
+ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (md->window)),
+ NULL);
}
}
diff --git a/capplet/settings/mail-settings-view.c b/capplet/settings/mail-settings-view.c
index 3a9864ae23..ee5858c893 100644
--- a/capplet/settings/mail-settings-view.c
+++ b/capplet/settings/mail-settings-view.c
@@ -227,7 +227,9 @@ static gboolean
msv_btn_expose (GtkWidget *w, GdkEventExpose *event, MailSettingsView *mfv)
{
GdkPixbuf *img = g_object_get_data ((GObject *)w, "pbuf");
- cairo_t *cr = gdk_cairo_create (w->window);
+ cairo_t *cr;
+
+ cr = gdk_cairo_create (gtk_widget_get_window (w));
cairo_save (cr);
gdk_cairo_set_source_pixbuf (cr, img, event->area.x-5, event->area.y-4);
cairo_paint(cr);
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c
index 2a6942acd8..0d32667bca 100644
--- a/composer/e-composer-header.c
+++ b/composer/e-composer-header.c
@@ -97,7 +97,7 @@ composer_header_constructor (GType type,
if (header->priv->button) {
widget = gtk_button_new_with_mnemonic (header->priv->label);
- GTK_WIDGET_UNSET_FLAGS (widget, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (widget, FALSE);
g_signal_connect (
widget, "clicked",
G_CALLBACK (composer_header_button_clicked_cb),
diff --git a/e-util/e-plugin-util.c b/e-util/e-plugin-util.c
index c40d67650b..c49ec3691a 100644
--- a/e-util/e-plugin-util.c
+++ b/e-util/e-plugin-util.c
@@ -221,7 +221,7 @@ e_plugin_util_add_entry (GtkWidget *parent, const gchar *label, ESource *source,
}
if (GTK_IS_TABLE (parent))
- row = GTK_TABLE (parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
if (label) {
lbl = gtk_label_new_with_mnemonic (label);
@@ -279,6 +279,7 @@ e_plugin_util_add_check (GtkWidget *parent, const gchar *label, ESource *source,
{
GtkWidget *check;
const gchar *value;
+ guint row;
g_return_val_if_fail (parent == NULL || GTK_IS_TABLE (parent) || GTK_IS_CONTAINER (parent), NULL);
g_return_val_if_fail (label != NULL, NULL);
@@ -303,7 +304,7 @@ e_plugin_util_add_check (GtkWidget *parent, const gchar *label, ESource *source,
gtk_widget_show (check);
if (parent && GTK_IS_TABLE (parent)) {
- gint row = GTK_TABLE (parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
gtk_table_attach (GTK_TABLE (parent), check, 1, 2, row , row + 1, GTK_FILL, 0, 0, 0);
} else if (parent) {
@@ -395,7 +396,7 @@ e_plugin_util_add_refresh (GtkWidget *parent, const gchar *label, ESource *sourc
g_return_val_if_fail (*source_property != 0, NULL);
if (parent)
- row = GTK_TABLE (parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
value = e_source_get_property (source, source_property);
if (!value) {
diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c
index 08bf921507..2692972b16 100644
--- a/filter/e-filter-rule.c
+++ b/filter/e-filter-rule.c
@@ -255,13 +255,13 @@ more_parts (GtkWidget *button,
new = e_rule_context_next_part (data->context, NULL);
if (new) {
GtkWidget *w;
- gint rows;
+ guint rows;
new = e_filter_part_clone (new);
e_filter_rule_add_part (data->rule, new);
w = get_rule_part_widget (data->context, new, data->rule);
- rows = GTK_TABLE (data->parts)->nrows;
+ g_object_get (data->parts, "n-rows", &rows, NULL);
gtk_table_resize (GTK_TABLE (data->parts), rows + 1, 2);
attach_rule (w, data, new, rows);
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index 0ffe287306..f603b719e4 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -546,7 +546,7 @@ mail_attachment_bar_init (EMailAttachmentBar *bar)
container = widget;
widget = e_attachment_icon_view_new ();
- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (widget, TRUE);
gtk_icon_view_set_model (GTK_ICON_VIEW (widget), bar->priv->model);
gtk_container_add (GTK_CONTAINER (container), widget);
bar->priv->icon_view = g_object_ref (widget);
@@ -563,7 +563,7 @@ mail_attachment_bar_init (EMailAttachmentBar *bar)
container = widget;
widget = e_attachment_tree_view_new ();
- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (widget, TRUE);
gtk_tree_view_set_model (GTK_TREE_VIEW (widget), bar->priv->model);
gtk_container_add (GTK_CONTAINER (container), widget);
bar->priv->tree_view = g_object_ref (widget);
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index d3158fb48d..702e63e723 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -2483,7 +2483,7 @@ emae_receive_options_item (EConfig *ec, EConfigItem *item, GtkWidget *parent, Gt
{
EMAccountEditor *emae = data;
GtkWidget *w, *box, *spin;
- gint row;
+ guint row;
if (emae->priv->source.provider == NULL
|| emae->priv->source.provider->extra_conf == NULL)
@@ -2509,7 +2509,7 @@ emae_receive_options_item (EConfig *ec, EConfigItem *item, GtkWidget *parent, Gt
}
/* We have to add the automatic mail check item with the rest of the receive options */
- row = ((GtkTable *)parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
box = gtk_hbox_new (FALSE, 4);
w = gtk_check_button_new_with_mnemonic (_("Check for _new messages every"));
@@ -2541,7 +2541,8 @@ emae_receive_options_extra_item (EConfig *ec, EConfigItem *eitem, GtkWidget *par
GtkWidget *depw;
GSList *depl = NULL, *n;
EMAccountEditorService *service = &emae->priv->source;
- gint row, i;
+ gint i;
+ guint row;
GHashTable *extra;
CamelURL *url;
@@ -2569,7 +2570,7 @@ section:
url = emae_account_url (emae, emae_service_info[service->type].account_uri_key);
item->extra_table = g_hash_table_new (g_str_hash, g_str_equal);
extra = g_hash_table_new (g_str_hash, g_str_equal);
- row = ((GtkTable *)parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
for (;entries[i].type != CAMEL_PROVIDER_CONF_END && entries[i].type != CAMEL_PROVIDER_CONF_SECTION_END;i++) {
if (entries[i].depname) {
diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c
index ce73d2024f..b8ae4d66d7 100644
--- a/mail/em-filter-rule.c
+++ b/mail/em-filter-rule.c
@@ -480,13 +480,13 @@ more_parts(GtkWidget *button, struct _rule_data *data)
new = em_filter_context_next_action((EMFilterContext *)data->f, NULL);
if (new) {
GtkWidget *w;
- guint16 rows;
+ guint rows;
new = e_filter_part_clone(new);
em_filter_rule_add_action((EMFilterRule *)data->fr, new);
w = get_rule_part_widget(data->f, new, data->fr);
- rows = GTK_TABLE(data->parts)->nrows;
+ g_object_get (data->parts, "n-rows", &rows, NULL);
gtk_table_resize(GTK_TABLE(data->parts), rows + 1, 2);
attach_rule(w, data, new, rows);
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 7a8f7be744..622c9c1389 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -1149,7 +1149,7 @@ folder_tree_new (EMFolderTree *folder_tree)
/* FIXME Gross hack */
tree = GTK_WIDGET (folder_tree);
- GTK_WIDGET_SET_FLAGS(tree, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (tree, TRUE);
column = gtk_tree_view_column_new ();
gtk_tree_view_append_column ((GtkTreeView *) tree, column);
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index cca924ac9f..a0a6c6ecc1 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -999,7 +999,7 @@ efhd_attachment_optional(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPOb
g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(efhd_optional_button_show), scroll);
else {
gtk_widget_set_sensitive(button, FALSE);
- GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (button, FALSE);
}
vbox = gtk_vbox_new (FALSE, 0);
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c
index 339faaa091..17afe3bf7a 100644
--- a/modules/calendar/e-cal-shell-view-actions.c
+++ b/modules/calendar/e-cal-shell-view-actions.c
@@ -1209,7 +1209,7 @@ quit_calendar_cb (GtkAction *action,
/* Synthesize a delete_event on this window. */
event = gdk_event_new (GDK_DELETE);
- event->any.window = g_object_ref (((GtkWidget *) shell_window)->window);
+ event->any.window = g_object_ref (gtk_widget_get_window (GTK_WIDGET (shell_window)));
event->any.send_event = TRUE;
gtk_main_do_event (event);
gdk_event_free (event);
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index dc717c3951..29d8fd08b1 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -326,7 +326,8 @@ cal_shell_view_update_actions (EShellView *shell_view)
gtk_widget_hide(item);
scr = gdk_screen_get_default ();
- monitor = gdk_screen_get_monitor_at_window (scr, GTK_WIDGET (shell_window)->window);
+ monitor = gdk_screen_get_monitor_at_window (scr,
+ gtk_widget_get_window (GTK_WIDGET (shell_window)));
gdk_screen_get_monitor_geometry (scr, monitor, &rect);
gtk_window_set_default_size ((GtkWindow *)shell_window, rect.width, rect.height);
diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c
index 983327df73..19decd6cbf 100644
--- a/plugins/attachment-reminder/attachment-reminder.c
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -485,17 +485,17 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
clue_add = gtk_button_new_from_stock ("gtk-add");
gtk_widget_show (clue_add);
gtk_container_add (GTK_CONTAINER (vbuttonbox2), clue_add);
- GTK_WIDGET_SET_FLAGS (clue_add, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (clue_add, TRUE);
clue_edit = gtk_button_new_from_stock ("gtk-edit");
gtk_widget_show (clue_edit);
gtk_container_add (GTK_CONTAINER (vbuttonbox2), clue_edit);
- GTK_WIDGET_SET_FLAGS (clue_edit, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (clue_edit, TRUE);
clue_remove = gtk_button_new_from_stock ("gtk-remove");
gtk_widget_show (clue_remove);
gtk_container_add (GTK_CONTAINER (vbuttonbox2), clue_remove);
- GTK_WIDGET_SET_FLAGS (clue_remove, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (clue_remove, TRUE);
ui->gconf = gconf_client_get_default ();
diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c
index 6c54ad678c..a3e72c975e 100644
--- a/plugins/bogo-junk-plugin/bf-junk-filter.c
+++ b/plugins/bogo-junk-plugin/bf-junk-filter.c
@@ -384,7 +384,9 @@ GtkWidget *
org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
{
GtkWidget *check;
- guint i = ((GtkTable *)data->parent)->nrows;
+ guint n_rows;
+
+ g_object_get (data->parent, "n-rows", &n_rows, NULL);
if (data->old)
return data->old;
@@ -393,7 +395,9 @@ org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFac
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), em_junk_bf_unicode);
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (convert_unicode_cb), (gpointer) "/apps/evolution/mail/junk/bogofilter/unicode");
- gtk_table_attach((GtkTable *)data->parent, check, 0, 1, i, i+1, 0, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (data->parent), check,
+ 0, 1, n_rows, n_rows+1,
+ 0, 0, 0, 0);
gtk_widget_show (check);
return (GtkWidget *)check;
}
diff --git a/plugins/caldav/caldav-source.c b/plugins/caldav/caldav-source.c
index 5691fdde45..14b4e3cfdb 100644
--- a/plugins/caldav/caldav-source.c
+++ b/plugins/caldav/caldav-source.c
@@ -185,6 +185,7 @@ oge_caldav (EPlugin *epl,
SoupURI *suri;
GtkWidget *parent, *location, *ssl, *user, *browse_cal;
gchar *uri, *username;
+ guint n_rows;
source = t->source;
@@ -227,7 +228,10 @@ oge_caldav (EPlugin *epl,
browse_cal = gtk_button_new_with_mnemonic (_("Brows_e server for a calendar"));
gtk_widget_show (browse_cal);
- gtk_table_attach (GTK_TABLE (parent), browse_cal, 1, 2, GTK_TABLE (parent)->nrows, GTK_TABLE (parent)->nrows + 1, GTK_FILL, 0, 0, 0);
+ g_object_get (parent, "n-rows", &n_rows, NULL);
+ gtk_table_attach (GTK_TABLE (parent), browse_cal,
+ 1, 2, n_rows, n_rows + 1,
+ GTK_FILL, 0, 0, 0);
g_object_set_data (G_OBJECT (browse_cal), "caldav-url", location);
g_object_set_data (G_OBJECT (browse_cal), "caldav-username", user);
diff --git a/plugins/calendar-file/calendar-file.c b/plugins/calendar-file/calendar-file.c
index e82feaa11a..138826803d 100644
--- a/plugins/calendar-file/calendar-file.c
+++ b/plugins/calendar-file/calendar-file.c
@@ -95,6 +95,7 @@ e_calendar_file_customs (EPlugin *epl, EConfigHookItemFactoryData *data)
ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target;
ESource *source = t->source;
const gchar *relative_uri, *value;
+ guint n_rows;
GtkWidget *w1, *w2, *box1, *box2, *mainbox, *maincheck;
if (!e_plugin_util_is_source_proto (source, "file"))
@@ -107,7 +108,10 @@ e_calendar_file_customs (EPlugin *epl, EConfigHookItemFactoryData *data)
e_source_set_relative_uri (source, e_source_peek_uid (source));
mainbox = gtk_vbox_new (FALSE, 2);
- gtk_table_attach (GTK_TABLE (data->parent), mainbox, 1, 2, GTK_TABLE (data->parent)->nrows, GTK_TABLE (data->parent)->nrows + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ g_object_get (data->parent, "n-rows", &n_rows, NULL);
+ gtk_table_attach (GTK_TABLE (data->parent), mainbox,
+ 1, 2, n_rows, n_rows + 1,
+ GTK_EXPAND | GTK_FILL, 0, 0, 0);
maincheck = gtk_check_button_new_with_mnemonic (_("_Customize options"));
gtk_box_pack_start ((GtkBox *)mainbox, maincheck, TRUE, TRUE, 2);
diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c
index b33141a980..61180b7153 100644
--- a/plugins/calendar-weather/calendar-weather.c
+++ b/plugins/calendar-weather/calendar-weather.c
@@ -336,7 +336,7 @@ GtkWidget *
e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData *data)
{
GtkWidget *button, *parent, *text, *label;
- gint row;
+ guint row;
ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target;
ESource *source = t->source;
SoupURI *suri;
@@ -353,7 +353,7 @@ e_calendar_weather_location (EPlugin *epl, EConfigHookItemFactoryData *data)
parent = data->parent;
- row = ((GtkTable*)parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
label = gtk_label_new_with_mnemonic (_("_Location:"));
gtk_widget_show (label);
@@ -434,7 +434,7 @@ GtkWidget *
e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data)
{
GtkWidget *combobox, *parent, *label;
- gint row;
+ guint row;
ECalConfigTargetSource *t = (ECalConfigTargetSource *) data->target;
ESource *source = t->source;
@@ -443,7 +443,7 @@ e_calendar_weather_units (EPlugin *epl, EConfigHookItemFactoryData *data)
parent = data->parent;
- row = ((GtkTable*)parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
label = gtk_label_new_with_mnemonic (_("_Units:"));
gtk_widget_show (label);
diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c
index 771b23874f..6b94c721f3 100644
--- a/plugins/email-custom-header/email-custom-header.c
+++ b/plugins/email-custom-header/email-custom-header.c
@@ -926,17 +926,17 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
header_add = gtk_button_new_from_stock ("gtk-add");
gtk_widget_show (header_add);
gtk_container_add (GTK_CONTAINER (vbuttonbox1), header_add);
- GTK_WIDGET_SET_FLAGS (header_add, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (header_add, TRUE);
header_edit = gtk_button_new_from_stock ("gtk-edit");
gtk_widget_show (header_edit);
gtk_container_add (GTK_CONTAINER (vbuttonbox1), header_edit);
- GTK_WIDGET_SET_FLAGS (header_edit, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (header_edit, TRUE);
header_remove = gtk_button_new_from_stock ("gtk-remove");
gtk_widget_show (header_remove);
gtk_container_add (GTK_CONTAINER (vbuttonbox1), header_remove);
- GTK_WIDGET_SET_FLAGS (header_remove, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (header_remove, TRUE);
cd->gconf = gconf_client_get_default ();
diff --git a/plugins/google-account-setup/google-source.c b/plugins/google-account-setup/google-source.c
index 26b80f0ec8..76d03526a6 100644
--- a/plugins/google-account-setup/google-source.c
+++ b/plugins/google-account-setup/google-source.c
@@ -583,7 +583,7 @@ plugin_google (EPlugin *epl,
GtkWidget *combo;
gchar *uri;
const gchar *username;
- gint row;
+ guint row;
GtkCellRenderer *renderer;
GtkListStore *store;
@@ -626,7 +626,7 @@ plugin_google (EPlugin *epl,
e_plugin_util_add_refresh (parent, _("Re_fresh:"), source, "refresh");
- row = GTK_TABLE (parent)->nrows;
+ g_object_get (parent, "n-rows", &row, NULL);
label = gtk_label_new_with_mnemonic (_("Cal_endar:"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c
index 358f234e12..f4d5c168be 100644
--- a/plugins/prefer-plain/prefer-plain.c
+++ b/plugins/prefer-plain/prefer-plain.c
@@ -238,7 +238,7 @@ org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItem
GtkCellRenderer *cell;
GtkListStore *store;
GtkWidget *dropdown_label, *info, *check;
- gint i;
+ guint i;
GtkTreeIter iter;
if (data->old)
@@ -277,7 +277,7 @@ org_gnome_prefer_plain_config_mode(struct _EPlugin *epl, struct _EConfigHookItem
g_signal_connect (dropdown, "changed", G_CALLBACK(epp_mode_changed), info);
- i = ((GtkTable *)data->parent)->nrows;
+ g_object_get (data->parent, "n-rows", &i, NULL);
gtk_table_attach((GtkTable *)data->parent, check, 0, 2, i, i + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0);
gtk_table_attach((GtkTable *)data->parent, dropdown_label, 0, 1, i + 1, i + 2, 0, 0, 0, 0);
gtk_table_attach((GtkTable *)data->parent, (GtkWidget *)dropdown, 1, 2, i + 1, i + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index 15b323424b..7db6b6813d 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -922,7 +922,9 @@ org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFact
{
GtkWidget *check, *vbox, *label;
gchar *text = g_strdup_printf (" <small>%s</small>", _("This will make SpamAssassin more reliable, but slower"));
- guint i = ((GtkTable *)data->parent)->nrows;
+ guint n_rows;
+
+ g_object_get (data->parent, "n-rows", &n_rows, NULL);
if (data->old)
return data->old;
@@ -937,7 +939,9 @@ org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFact
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), !em_junk_sa_local_only);
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (use_remote_tests_cb), (gpointer) "/apps/evolution/mail/junk/sa/local_only");
- gtk_table_attach((GtkTable *)data->parent, vbox, 0, 1, i, i+1, 0, 0, 0, 0);
+ gtk_table_attach (GTK_TABLE (data->parent), vbox,
+ 0, 1, n_rows, n_rows+1,
+ 0, 0, 0, 0);
gtk_widget_show_all (vbox);
return (GtkWidget *)vbox;
}
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index cd3d682515..7971ea3b72 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -385,17 +385,17 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
clue_add = gtk_button_new_from_stock ("gtk-add");
gtk_widget_show (clue_add);
gtk_container_add (GTK_CONTAINER (vbuttonbox2), clue_add);
- GTK_WIDGET_SET_FLAGS (clue_add, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (clue_add, TRUE);
clue_edit = gtk_button_new_from_stock ("gtk-edit");
gtk_widget_show (clue_edit);
gtk_container_add (GTK_CONTAINER (vbuttonbox2), clue_edit);
- GTK_WIDGET_SET_FLAGS (clue_edit, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (clue_edit, TRUE);
clue_remove = gtk_button_new_from_stock ("gtk-remove");
gtk_widget_show (clue_remove);
gtk_container_add (GTK_CONTAINER (vbuttonbox2), clue_remove);
- GTK_WIDGET_SET_FLAGS (clue_remove, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (clue_remove, TRUE);
ui->gconf = gconf_client_get_default ();
diff --git a/shell/e-shell-content.c b/shell/e-shell-content.c
index 658bb2a6fc..aef93d73ec 100644
--- a/shell/e-shell-content.c
+++ b/shell/e-shell-content.c
@@ -313,7 +313,7 @@ e_shell_content_init (EShellContent *shell_content)
{
shell_content->priv = E_SHELL_CONTENT_GET_PRIVATE (shell_content);
- GTK_WIDGET_SET_FLAGS (shell_content, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (shell_content, FALSE);
}
/**
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index 0c2aa48440..b5c3879c50 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -400,7 +400,7 @@ e_shell_sidebar_init (EShellSidebar *shell_sidebar)
shell_sidebar->priv = E_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar);
- GTK_WIDGET_SET_FLAGS (shell_sidebar, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (shell_sidebar), FALSE);
widget = gtk_event_box_new ();
style = gtk_widget_get_style (widget);
diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c
index aace0a0073..c09258b7a2 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -507,7 +507,7 @@ e_shell_switcher_init (EShellSwitcher *switcher)
{
switcher->priv = E_SHELL_SWITCHER_GET_PRIVATE (switcher);
- GTK_WIDGET_SET_FLAGS (switcher, GTK_NO_WINDOW);
+ gtk_widget_set_has_window (GTK_WIDGET (switcher), FALSE);
e_extensible_load_extensions (E_EXTENSIBLE (switcher));
}
@@ -545,7 +545,7 @@ tool_item_get_button (GtkWidget *widget)
g_return_val_if_fail (GTK_IS_TOOL_ITEM (widget), NULL);
- child = GTK_BIN (widget)->child;
+ child = gtk_bin_get_child (GTK_BIN (widget));
if (child != NULL && GTK_IS_BUTTON (child))
return GTK_BUTTON (child);
else
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c
index 417e436f50..110e858e74 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -547,7 +547,7 @@ attachment_paned_init (EAttachmentPaned *paned)
container = widget;
widget = e_attachment_icon_view_new ();
- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (widget, TRUE);
gtk_icon_view_set_model (GTK_ICON_VIEW (widget), paned->priv->model);
gtk_container_add (GTK_CONTAINER (container), widget);
paned->priv->icon_view = g_object_ref (widget);
@@ -567,7 +567,7 @@ attachment_paned_init (EAttachmentPaned *paned)
container = widget;
widget = e_attachment_tree_view_new ();
- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (widget, TRUE);
gtk_tree_view_set_model (GTK_TREE_VIEW (widget), paned->priv->model);
gtk_container_add (GTK_CONTAINER (container), widget);
paned->priv->tree_view = g_object_ref (widget);
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);
}
}
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 4ce8d75084..22ea72fa6a 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -198,8 +198,11 @@ static void
e_map_init (EMap *view)
{
EMapPrivate *priv;
+ GtkWidget *widget;
gchar *map_file_name = g_build_filename (EVOLUTION_IMAGESDIR, "world_map-960.png", NULL);
+ widget = GTK_WIDGET (view);
+
priv = g_new0 (EMapPrivate, 1);
view->priv = priv;
@@ -210,8 +213,8 @@ e_map_init (EMap *view)
priv->zoom_state = E_MAP_ZOOMED_OUT;
priv->points = g_ptr_array_new ();
- GTK_WIDGET_SET_FLAGS (view, GTK_CAN_FOCUS);
- GTK_WIDGET_UNSET_FLAGS (view, GTK_NO_WINDOW);
+ gtk_widget_set_can_focus (widget, TRUE);
+ gtk_widget_set_has_window (widget, TRUE);
}
/* Destroy handler for the map view */
@@ -300,7 +303,7 @@ e_map_realize (GtkWidget *widget)
g_return_if_fail (widget != NULL);
g_return_if_fail (E_IS_MAP (widget));
- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+ gtk_widget_set_realized (widget, TRUE);
gtk_widget_get_allocation (widget, &allocation);
diff --git a/widgets/misc/e-menu-tool-button.c b/widgets/misc/e-menu-tool-button.c
index 0d9599c2f4..5a87e7420a 100644
--- a/widgets/misc/e-menu-tool-button.c
+++ b/widgets/misc/e-menu-tool-button.c
@@ -50,8 +50,7 @@ menu_tool_button_get_first_menu_item (GtkMenuToolButton *menu_tool_button)
if (!GTK_IS_MENU (menu))
return NULL;
- /* XXX GTK+ 2.18 provides no accessor function. */
- children = GTK_MENU_SHELL (menu)->children;
+ children = gtk_container_get_children (GTK_CONTAINER (menu));
if (children == NULL)
return NULL;
diff --git a/widgets/misc/e-online-button.c b/widgets/misc/e-online-button.c
index cb7dab1453..6fcd446958 100644
--- a/widgets/misc/e-online-button.c
+++ b/widgets/misc/e-online-button.c
@@ -141,7 +141,7 @@ online_button_init (EOnlineButton *button)
button->priv = E_ONLINE_BUTTON_GET_PRIVATE (button);
- GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (button, FALSE);
gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
widget = gtk_image_new ();
diff --git a/widgets/misc/e-preferences-window.c b/widgets/misc/e-preferences-window.c
index f40dee180b..27caa80e80 100644
--- a/widgets/misc/e-preferences-window.c
+++ b/widgets/misc/e-preferences-window.c
@@ -287,7 +287,7 @@ preferences_window_init (EPreferencesWindow *window)
g_signal_connect_swapped (
widget, "clicked",
G_CALLBACK (gtk_widget_hide), window);
- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (widget, TRUE);
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
accel_group = gtk_accel_group_new ();
gtk_widget_add_accelerator (
diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c
index 47e1a87eac..186ae4dfed 100644
--- a/widgets/table/e-cell-combo.c
+++ b/widgets/table/e-cell-combo.c
@@ -146,12 +146,8 @@ e_cell_combo_init (ECellCombo *ecc)
gtk_scrolled_window_set_policy (scrolled_window,
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- GTK_WIDGET_UNSET_FLAGS (
- gtk_scrolled_window_get_hscrollbar (scrolled_window),
- GTK_CAN_FOCUS);
- GTK_WIDGET_UNSET_FLAGS (
- gtk_scrolled_window_get_vscrollbar (scrolled_window),
- GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (gtk_scrolled_window_get_hscrollbar (scrolled_window), FALSE);
+ gtk_widget_set_can_focus (gtk_scrolled_window_get_vscrollbar (scrolled_window), FALSE);
gtk_container_add (GTK_CONTAINER (frame), ecc->popup_scrolled_window);
gtk_widget_show (ecc->popup_scrolled_window);
diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c
index e56293b111..2cf0d5f114 100644
--- a/widgets/table/e-table-field-chooser.c
+++ b/widgets/table/e-table-field-chooser.c
@@ -156,14 +156,14 @@ create_content (GnomeCanvas **canvas)
scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (scrolledwindow1);
gtk_box_pack_start (GTK_BOX (vbox_top), scrolledwindow1, TRUE, TRUE, 0);
- GTK_WIDGET_UNSET_FLAGS (scrolledwindow1, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (scrolledwindow1, FALSE);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
canvas_buttons = e_canvas_new ();
gtk_widget_show (canvas_buttons);
gtk_container_add (GTK_CONTAINER (scrolledwindow1), canvas_buttons);
- GTK_WIDGET_UNSET_FLAGS (canvas_buttons, GTK_CAN_FOCUS);
- GTK_WIDGET_UNSET_FLAGS (canvas_buttons, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_focus (canvas_buttons, FALSE);
+ gtk_widget_set_can_default (canvas_buttons, FALSE);
*canvas = GNOME_CANVAS (canvas_buttons);
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index ce2253bc66..90c42b9e44 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -509,7 +509,7 @@ et_finalize (GObject *object)
static void
e_table_init (ETable *e_table)
{
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (e_table), GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (GTK_WIDGET (e_table), TRUE);
gtk_table_set_homogeneous (GTK_TABLE (e_table), FALSE);
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 586544900d..f14c72b4dd 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -538,7 +538,7 @@ et_search_accept (ETableSearch *search, ETree *et)
static void
e_tree_init (ETree *e_tree)
{
- GTK_WIDGET_SET_FLAGS (GTK_WIDGET (e_tree), GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (GTK_WIDGET (e_tree), TRUE);
gtk_table_set_homogeneous (GTK_TABLE (e_tree), FALSE);
@@ -709,7 +709,7 @@ e_tree_setup_header (ETree *e_tree)
{
gchar *pointer;
e_tree->priv->header_canvas = GNOME_CANVAS (e_canvas_new ());
- GTK_WIDGET_UNSET_FLAGS (e_tree->priv->header_canvas, GTK_CAN_FOCUS);
+ gtk_widget_set_can_focus (e_tree->priv->header_canvas, FALSE);
gtk_widget_show (GTK_WIDGET (e_tree->priv->header_canvas));