aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2001-01-11 05:54:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-11 05:54:09 +0800
commitc8db3edba3c1879e7f627a26ec0c50a0102d9c4d (patch)
treeeafd3fd11d2788bf7ee24363bdcc47ead8f036a7
parent42ad657dfd6c6095895eb2e631c1ab65322fb905 (diff)
downloadgsoc2013-evolution-c8db3edba3c1879e7f627a26ec0c50a0102d9c4d.tar
gsoc2013-evolution-c8db3edba3c1879e7f627a26ec0c50a0102d9c4d.tar.gz
gsoc2013-evolution-c8db3edba3c1879e7f627a26ec0c50a0102d9c4d.tar.bz2
gsoc2013-evolution-c8db3edba3c1879e7f627a26ec0c50a0102d9c4d.tar.lz
gsoc2013-evolution-c8db3edba3c1879e7f627a26ec0c50a0102d9c4d.tar.xz
gsoc2013-evolution-c8db3edba3c1879e7f627a26ec0c50a0102d9c4d.tar.zst
gsoc2013-evolution-c8db3edba3c1879e7f627a26ec0c50a0102d9c4d.zip
Grab the focus of the first widget that is sensitive.
2001-01-10 Jeffrey Stedfast <fejj@helixcode.com> * mail-config-druid.c (incoming_type_changed): Grab the focus of the first widget that is sensitive. (transport_type_changed): Same. (identity_prepare): Grab the focus of the name entry. * mail-callbacks.c (send_queued_mail): Prevent Federico's segfault. svn path=/trunk/; revision=7374
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-config-druid.c15
2 files changed, 19 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 82adefbbf7..a58c9241cc 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,10 @@
2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
+ * mail-config-druid.c (incoming_type_changed): Grab the focus of
+ the first widget that is sensitive.
+ (transport_type_changed): Same.
+ (identity_prepare): Grab the focus of the name entry.
+
* mail-callbacks.c (send_queued_mail): Prevent Federico's segfault.
2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index b56bf20295..86977b5081 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -266,6 +266,8 @@ identity_prepare (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
{
MailConfigDruid *config = data;
+ gtk_widget_grab_focus (GTK_WIDGET (config->full_name));
+
identity_check (config);
}
@@ -366,8 +368,8 @@ static void
incoming_type_changed (GtkWidget *widget, gpointer user_data)
{
MailConfigDruid *druid = user_data;
+ GtkWidget *label, *dwidget = NULL;
CamelProvider *provider;
- GtkWidget *label;
provider = gtk_object_get_data (GTK_OBJECT (widget), "provider");
@@ -376,6 +378,7 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
/* hostname */
label = glade_xml_get_widget (druid->gui, "lblSourceHost");
if (provider->url_flags & CAMEL_URL_ALLOW_HOST) {
+ dwidget = GTK_WIDGET (druid->incoming_hostname);
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_hostname), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -387,6 +390,8 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
/* username */
label = glade_xml_get_widget (druid->gui, "lblSourceUser");
if (provider->url_flags & CAMEL_URL_ALLOW_USER) {
+ if (!dwidget)
+ dwidget = GTK_WIDGET (druid->incoming_username);
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_username), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -398,6 +403,8 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
/* password */
label = glade_xml_get_widget (druid->gui, "lblSourcePasswd");
if (provider->url_flags & CAMEL_URL_ALLOW_PASSWORD) {
+ if (!dwidget)
+ dwidget = GTK_WIDGET (druid->password);
gtk_widget_set_sensitive (GTK_WIDGET (druid->password), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -419,6 +426,8 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
/* path */
label = glade_xml_get_widget (druid->gui, "lblSourcePath");
if (provider->url_flags & CAMEL_URL_ALLOW_PATH) {
+ if (!dwidget)
+ dwidget = GTK_WIDGET (druid->incoming_path);
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_path), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {
@@ -434,6 +443,9 @@ incoming_type_changed (GtkWidget *widget, gpointer user_data)
gtk_widget_set_sensitive (GTK_WIDGET (druid->incoming_keep_mail), FALSE);
incoming_check (druid);
+
+ if (dwidget)
+ gtk_widget_grab_focus (dwidget);
}
/* Authentication Page */
@@ -604,6 +616,7 @@ transport_type_changed (GtkWidget *widget, gpointer user_data)
/* hostname */
label = glade_xml_get_widget (druid->gui, "lblTransportHost");
if (provider->url_flags & CAMEL_URL_ALLOW_HOST) {
+ gtk_widget_grab_focus (GTK_WIDGET (druid->outgoing_hostname));
gtk_widget_set_sensitive (GTK_WIDGET (druid->outgoing_hostname), TRUE);
gtk_widget_set_sensitive (label, TRUE);
} else {