aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-06 02:25:51 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-06 02:25:51 +0800
commit944083d8b9805f6d352dac2f09c04f641b84fbc9 (patch)
treee8994f08ca3a6a7c5abfc6a24b2e8023b2d421d8
parent6daf98ee0a7c0de9de5a713b2a529b811e945d06 (diff)
downloadgsoc2013-evolution-944083d8b9805f6d352dac2f09c04f641b84fbc9.tar
gsoc2013-evolution-944083d8b9805f6d352dac2f09c04f641b84fbc9.tar.gz
gsoc2013-evolution-944083d8b9805f6d352dac2f09c04f641b84fbc9.tar.bz2
gsoc2013-evolution-944083d8b9805f6d352dac2f09c04f641b84fbc9.tar.lz
gsoc2013-evolution-944083d8b9805f6d352dac2f09c04f641b84fbc9.tar.xz
gsoc2013-evolution-944083d8b9805f6d352dac2f09c04f641b84fbc9.tar.zst
gsoc2013-evolution-944083d8b9805f6d352dac2f09c04f641b84fbc9.zip
Don't access the `active` data member of a GtkToggleButton directly - bad
2001-03-05 Jeffrey Stedfast <fejj@ximian.com> * mail-config-druid.c: Don't access the `active` data member of a GtkToggleButton directly - bad programming, shame on me. * mail-account-editor.c: Same here. * mail-accounts.c: And here too. * mail-callbacks.c (empty_subject_destroyed): And finally here. * mail-crypto.c (pgp_mime_part_sign): Correcty set the mime type for the multipart. Hmmm, still doesn't wrap correctly. NotZed? Ideas? (pgp_mime_part_encrypt): Here too. svn path=/trunk/; revision=8560
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-account-editor.c14
-rw-r--r--mail/mail-accounts.c2
-rw-r--r--mail/mail-callbacks.c2
-rw-r--r--mail/mail-config-druid.c21
-rw-r--r--mail/mail-config.glade146
6 files changed, 37 insertions, 157 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 0f6aa37185..ae91bbd43e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,14 @@
2001-03-05 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-config-druid.c: Don't access the `active` data member of a
+ GtkToggleButton directly - bad programming, shame on me.
+
+ * mail-account-editor.c: Same here.
+
+ * mail-accounts.c: And here too.
+
+ * mail-callbacks.c (empty_subject_destroyed): And finally here.
+
* mail-crypto.c (pgp_mime_part_sign): Correcty set the mime type
for the multipart. Hmmm, still doesn't wrap correctly. NotZed?
Ideas?
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index 526f0b57c2..89f6057949 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -194,15 +194,15 @@ apply_changes (MailAccountEditor *editor)
str = gtk_entry_get_text (editor->source_path);
source_url->path = str && *str ? g_strdup (str) : NULL;
- account->source->save_passwd = GTK_TOGGLE_BUTTON (editor->save_passwd)->active;
- account->source->keep_on_server = GTK_TOGGLE_BUTTON (editor->keep_on_server)->active;
+ account->source->save_passwd = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->save_passwd));
+ account->source->keep_on_server = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->keep_on_server));
- account->source->enabled = GTK_TOGGLE_BUTTON (editor->source_enabled)->active;
- account->source->auto_check = GTK_TOGGLE_BUTTON (editor->source_auto_check)->active;
+ account->source->enabled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->source_enabled));
+ account->source->auto_check = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->source_auto_check));
account->source->auto_check_time = gtk_spin_button_get_value_as_int (editor->source_auto_timeout);
if (editor->source_ssl)
- account->source->use_ssl = GTK_TOGGLE_BUTTON (editor->source_ssl)->active;
+ account->source->use_ssl = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->source_ssl));
/* set the new source url */
g_free (account->source->url);
@@ -237,7 +237,7 @@ apply_changes (MailAccountEditor *editor)
transport_url->port = port;
if (editor->transport_ssl)
- account->transport->use_ssl = GTK_TOGGLE_BUTTON (editor->transport_ssl)->active;
+ account->transport->use_ssl = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (editor->transport_ssl));
/* set the new transport url */
g_free (account->transport->url);
@@ -550,7 +550,7 @@ auto_check_toggled (GtkToggleButton *button, gpointer data)
{
MailAccountEditor *editor = data;
- gtk_widget_set_sensitive (GTK_WIDGET (editor->source_auto_timeout), button->active);
+ gtk_widget_set_sensitive (GTK_WIDGET (editor->source_auto_timeout), gtk_toggle_button_get_active (button));
}
static void
diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c
index c258c28167..e7bcdaa0e2 100644
--- a/mail/mail-accounts.c
+++ b/mail/mail-accounts.c
@@ -369,7 +369,7 @@ news_delete (GtkButton *button, gpointer data)
static void
send_html_toggled (GtkToggleButton *button, gpointer data)
{
- mail_config_set_send_html (button->active);
+ mail_config_set_send_html (gtk_toggle_button_get_active (button));
}
static void
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 1bb6a15871..b21ad96d51 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -203,7 +203,7 @@ empty_subject_destroyed (GtkWidget *widget, gpointer data)
GtkWidget *checkbox;
checkbox = e_message_box_get_checkbox (E_MESSAGE_BOX (widget));
- *show_again = !GTK_TOGGLE_BUTTON (checkbox)->active;
+ *show_again = !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox));
}
static gboolean
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index 58014c7430..2aa4d9fe4a 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -326,7 +326,8 @@ auto_check_toggled (GtkToggleButton *button, gpointer data)
{
MailConfigDruid *druid = data;
- gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_auto_check_min), button->active);
+ gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_auto_check_min),
+ gtk_toggle_button_get_active (button));
}
static void
@@ -388,7 +389,7 @@ incoming_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
url = camel_url_new (source_url, NULL);
g_free (source_url);
- connect = GTK_TOGGLE_BUTTON (config->incoming_check_settings)->active;
+ connect = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (config->incoming_check_settings));
/* If we can't connect, warn them and continue on to the Transport page. */
if (!mail_config_check_service (url, CAMEL_PROVIDER_STORE, connect, &authtypes)) {
@@ -671,7 +672,7 @@ transport_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
url = camel_url_new (xport_url, NULL);
g_free (xport_url);
- connect = GTK_TOGGLE_BUTTON (config->outgoing_check_settings)->active;
+ connect = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (config->outgoing_check_settings));
/* If we can't connect, don't let them continue. */
if (!mail_config_check_service (url, CAMEL_PROVIDER_TRANSPORT, connect, NULL)) {
@@ -1096,7 +1097,7 @@ construct (MailConfigDruid *druid)
gtk_signal_connect (GTK_OBJECT (druid->incoming_auto_check), "toggled", auto_check_toggled, druid);
druid->incoming_auto_check_min = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinAutoCheckMinutes"));
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_auto_check_min),
- GTK_TOGGLE_BUTTON (druid->incoming_auto_check)->active);
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (druid->incoming_auto_check)));
druid->incoming_check_settings = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "chkIncomingCheckSettings"));
druid->have_auth_page = TRUE;
@@ -1145,7 +1146,7 @@ mail_config_druid_get_default_account (MailConfigDruid *druid)
{
g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), FALSE);
- return GTK_TOGGLE_BUTTON (druid->default_account)->active;
+ return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (druid->default_account));
}
@@ -1221,7 +1222,7 @@ mail_config_druid_get_source_url (MailConfigDruid *druid)
url->path = g_strdup (gtk_entry_get_text (druid->incoming_path));
/* only 'show password' if we intend to save it */
- source_url = camel_url_to_string (url, GTK_TOGGLE_BUTTON (druid->save_password)->active);
+ source_url = camel_url_to_string (url, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (druid->save_password)));
camel_url_free (url);
return source_url;
@@ -1233,7 +1234,7 @@ mail_config_druid_get_keep_mail_on_server (MailConfigDruid *druid)
{
g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), FALSE);
- return GTK_TOGGLE_BUTTON (druid->incoming_keep_mail)->active;
+ return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (druid->incoming_keep_mail));
}
@@ -1242,7 +1243,7 @@ mail_config_druid_get_auto_check (MailConfigDruid *druid)
{
g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), FALSE);
- return GTK_TOGGLE_BUTTON (druid->incoming_auto_check)->active;
+ return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (druid->incoming_auto_check));
}
@@ -1259,7 +1260,7 @@ mail_config_druid_get_save_password (MailConfigDruid *druid)
{
g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), FALSE);
- return GTK_TOGGLE_BUTTON (druid->save_password)->active;
+ return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (druid->save_password));
}
@@ -1299,5 +1300,5 @@ mail_config_druid_get_transport_requires_auth (MailConfigDruid *druid)
{
g_return_val_if_fail (IS_MAIL_CONFIG_DRUID (druid), FALSE);
- return GTK_TOGGLE_BUTTON (druid->outgoing_requires_auth)->active;
+ return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (druid->outgoing_requires_auth));
}
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index 5c7753cfb9..eb8766afd8 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -736,6 +736,7 @@ Click &quot;Next&quot; to begin. </text>
<widget>
<class>GtkSpinButton</class>
<name>spinAutoCheckMinutes</name>
+ <sensitive>False</sensitive>
<can_focus>True</can_focus>
<climb_rate>1</climb_rate>
<digits>0</digits>
@@ -2973,6 +2974,7 @@ SMTP
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Add</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
@@ -2981,6 +2983,7 @@ SMTP
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Edit</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
@@ -2989,6 +2992,7 @@ SMTP
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Delete</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
@@ -2997,6 +3001,7 @@ SMTP
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Default</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
</widget>
@@ -3079,6 +3084,7 @@ SMTP
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Add</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
@@ -3087,6 +3093,7 @@ SMTP
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Edit</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
</widget>
<widget>
@@ -3095,6 +3102,7 @@ SMTP
<can_default>True</can_default>
<can_focus>True</can_focus>
<label>Delete</label>
+ <relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
</widget>
@@ -3272,142 +3280,4 @@ SMTP
</widget>
</widget>
-<widget>
- <class>GnomeDialog</class>
- <name>editor</name>
- <visible>False</visible>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>True</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>True</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area4</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkNotebook</class>
- <name>toplevel</name>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>lblGeneral</name>
- <label>General</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>lblSource</name>
- <label>Source</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>lblTransport</name>
- <label>Transport</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-</widget>
-
</GTK-Interface>