From 72797decc12602b181f69dba7c54df7a0d1b9326 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 30 Jan 2010 14:03:19 -0500 Subject: Giant leap towards GSEAL compliance. --- modules/mail/em-mailer-prefs.c | 12 ++++++++++-- modules/mail/em-network-prefs.c | 16 ++++++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'modules/mail') 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 -- cgit v1.2.3