aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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 /plugins
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
Diffstat (limited to 'plugins')
-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
10 files changed, 39 insertions, 23 deletions
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 ();