aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-31 03:03:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-08 23:05:26 +0800
commit72797decc12602b181f69dba7c54df7a0d1b9326 (patch)
treeecd1314c92bc26b59647b351b2d47e446f4ed21d /modules
parent3ba0b61f9f447b01c3a83bfb78ee33a45d413700 (diff)
downloadgsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.gz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.bz2
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.lz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.xz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.zst
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.zip
Giant leap towards GSEAL compliance.
Diffstat (limited to 'modules')
-rw-r--r--modules/addressbook/addressbook-config.c32
-rw-r--r--modules/calendar/e-task-shell-view-actions.c5
-rw-r--r--modules/mail/em-mailer-prefs.c12
-rw-r--r--modules/mail/em-network-prefs.c16
4 files changed, 49 insertions, 16 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c
index 7718709c9d..7d398f855d 100644
--- a/modules/addressbook/addressbook-config.c
+++ b/modules/addressbook/addressbook-config.c
@@ -299,10 +299,15 @@ static gint
addressbook_root_dse_query (AddressbookSourceDialog *dialog, LDAP *ldap,
const gchar **attrs, LDAPMessage **resp)
{
+ GtkAdjustment *adjustment;
+ GtkRange *range;
gint ldap_error;
struct timeval timeout;
- timeout.tv_sec = (gint) gtk_adjustment_get_value (GTK_RANGE(dialog->timeout_scale)->adjustment);
+ range = GTK_RANGE (dialog->timeout_scale);
+ adjustment = gtk_range_get_adjustment (range);
+
+ timeout.tv_sec = (gint) gtk_adjustment_get_value (adjustment);
timeout.tv_usec = 0;
ldap_error = ldap_search_ext_s (ldap,
@@ -376,6 +381,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkWidget *dialog;
+ GtkWidget *container;
GtkWidget *supported_bases_table;
GtkBuilder *builder;
GtkTreeIter iter;
@@ -389,8 +395,12 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_widget_ensure_style (dialog);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 0);
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 12);
+
+ container = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 12);
+
+ container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_container_set_border_width (GTK_CONTAINER (container), 0);
supported_bases_table = e_builder_get_widget (builder, "supported-bases-table");
model = gtk_tree_view_get_model (GTK_TREE_VIEW (supported_bases_table));
@@ -918,9 +928,13 @@ eabc_details_search(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget
static void
timeout_changed_cb(GtkWidget *w, AddressbookSourceDialog *sdialog)
{
+ GtkAdjustment *adjustment;
+ GtkRange *range;
gchar *timeout;
- timeout = g_strdup_printf("%f", gtk_adjustment_get_value(((GtkRange *)sdialog->timeout_scale)->adjustment));
+ range = GTK_RANGE (sdialog->timeout_scale);
+ adjustment = gtk_range_get_adjustment (range);
+ timeout = g_strdup_printf("%f", gtk_adjustment_get_value (adjustment));
e_source_set_property(sdialog->source, "timeout", timeout);
g_free(timeout);
}
@@ -947,6 +961,8 @@ static GtkWidget *
eabc_details_limit(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data)
{
AddressbookSourceDialog *sdialog = data;
+ GtkAdjustment *adjustment;
+ GtkRange *range;
GtkWidget *w;
const gchar *tmp;
GtkBuilder *builder;
@@ -961,9 +977,13 @@ eabc_details_limit(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget
gtk_box_pack_start((GtkBox *)parent, w, FALSE, FALSE, 0);
sdialog->timeout_scale = e_builder_get_widget (builder, "timeout-scale");
+ range = GTK_RANGE (sdialog->timeout_scale);
+ adjustment = gtk_range_get_adjustment (range);
tmp = e_source_get_property(sdialog->source, "timeout");
- gtk_adjustment_set_value(((GtkRange *)sdialog->timeout_scale)->adjustment, tmp?g_strtod(tmp, NULL):3.0);
- g_signal_connect (GTK_RANGE(sdialog->timeout_scale)->adjustment, "value_changed", G_CALLBACK (timeout_changed_cb), sdialog);
+ gtk_adjustment_set_value (adjustment, tmp?g_strtod(tmp, NULL):3.0);
+ g_signal_connect (
+ adjustment, "value_changed",
+ G_CALLBACK (timeout_changed_cb), sdialog);
sdialog->limit_spinbutton = e_builder_get_widget (builder, "download-limit-spinbutton");
tmp = e_source_get_property(sdialog->source, "limit");
diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c
index 0fd218c9e9..72d9aa27ce 100644
--- a/modules/calendar/e-task-shell-view-actions.c
+++ b/modules/calendar/e-task-shell-view-actions.c
@@ -532,6 +532,7 @@ action_task_purge_cb (GtkAction *action,
{
EShellView *shell_view;
EShellWindow *shell_window;
+ GtkWidget *content_area;
GtkWidget *dialog;
GtkWidget *widget;
gboolean active;
@@ -556,9 +557,9 @@ action_task_purge_cb (GtkAction *action,
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_NO);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
widget = gtk_check_button_new_with_label (_("Do not ask me again"));
- gtk_box_pack_start (
- GTK_BOX (GTK_DIALOG (dialog)->vbox), widget, TRUE, TRUE, 6);
+ gtk_box_pack_start (GTK_BOX (content_area), widget, TRUE, TRUE, 6);
gtk_widget_show (widget);
response = gtk_dialog_run (GTK_DIALOG (dialog));
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index fb34805409..838144695d 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -216,8 +216,15 @@ jh_add_cb (GtkWidget *widget, gpointer user_data)
{
EMMailerPrefs *prefs = (EMMailerPrefs *) user_data;
GtkWidget *dialog, *l1, *l2, *entry1, *entry2, *vbox, *hbox;
+ GtkWidget *content_area;
gint response;
- dialog = gtk_dialog_new_with_buttons (_("Add Custom Junk Header"), (GtkWindow *)gtk_widget_get_toplevel (widget), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL);
+
+ dialog = gtk_dialog_new_with_buttons (
+ _("Add Custom Junk Header"),
+ (GtkWindow *) gtk_widget_get_toplevel (widget),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, NULL);
vbox = gtk_vbox_new (FALSE, 6);
hbox = gtk_hbox_new (FALSE, 0);
@@ -235,7 +242,8 @@ jh_add_cb (GtkWidget *widget, gpointer user_data)
gtk_box_pack_start ((GtkBox *)vbox, hbox, FALSE, FALSE, 6);
gtk_widget_show_all (vbox);
- gtk_container_add ((GtkContainer *)((GtkDialog *)dialog)->vbox, vbox);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_container_add (GTK_CONTAINER (content_area), vbox);
response = gtk_dialog_run ((GtkDialog *)dialog);
if (response == GTK_RESPONSE_ACCEPT) {
const gchar *name = gtk_entry_get_text ((GtkEntry *)entry1);
diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c
index 6b419d0c2e..85a0a82ca3 100644
--- a/modules/mail/em-network-prefs.c
+++ b/modules/mail/em-network-prefs.c
@@ -283,12 +283,16 @@ emnp_free(EConfig *ec, GSList *items, gpointer data)
static void
emnp_set_markups (EMNetworkPrefs *prefs)
{
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN(prefs->sys_proxy)->child), TRUE);
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN(prefs->no_proxy)->child), TRUE);
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN(prefs->manual_proxy)->child), TRUE);
-#if 0
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN(prefs->auto_proxy)->child), TRUE);
-#endif
+ GtkWidget *child;
+
+ child = gtk_bin_get_child (GTK_BIN (prefs->sys_proxy));
+ gtk_label_set_use_markup (GTK_LABEL (child), TRUE);
+
+ child = gtk_bin_get_child (GTK_BIN (prefs->no_proxy));
+ gtk_label_set_use_markup (GTK_LABEL (child), TRUE);
+
+ child = gtk_bin_get_child (GTK_BIN (prefs->manual_proxy));
+ gtk_label_set_use_markup (GTK_LABEL (child), TRUE);
}
static void