aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-29 03:27:47 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-29 03:27:47 +0800
commit8a28b5d24127efc3e7d90c0751d110b38f315d66 (patch)
treef83739f0a66081ff686f1209c1bcc072119388c9
parent4b4991f7db7b48f6d403104d9f5d01bb67405bcc (diff)
downloadgsoc2013-evolution-8a28b5d24127efc3e7d90c0751d110b38f315d66.tar.gz
gsoc2013-evolution-8a28b5d24127efc3e7d90c0751d110b38f315d66.tar.zst
gsoc2013-evolution-8a28b5d24127efc3e7d90c0751d110b38f315d66.zip
** Fix for bug #458820 from Cosimo Cecchi
svn path=/trunk/; revision=33868
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/em-mailer-prefs.c17
2 files changed, 27 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ddae6fcb3d..05772d0f06 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,15 @@
+2007-07-29 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #458820 from Cosimo Cecchi
+
+ * em-mailer-prefs.c: (photo_toggle_changed),
+ (em_mailer_prefs_construct):
+
+2007-07-29 Srinivasa Ragavan <sragavan@novell.com>
+
+ * em-mailer-prefs.c: (em_mailer_prefs_construct): Fix a crash while
+ starting preferences window.
+
2007-07-27 Milan Crha <mcrha@redhat.com>
** Fix for bug #303937
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index 714ba82fbc..18870efacb 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -504,6 +504,16 @@ toggle_button_toggled (GtkToggleButton *toggle, EMMailerPrefs *prefs)
gconf_client_set_bool (prefs->gconf, key, gtk_toggle_button_get_active (toggle), NULL);
}
+static void
+photo_toggle_changed (GtkToggleButton *toggle, EMMailerPrefs *prefs)
+{
+ toggle_button_toggled (toggle, prefs);
+ if (gtk_toggle_button_get_active (toggle))
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->photo_local, TRUE);
+ else
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->photo_local, FALSE);
+}
+
#if 0
// not used at the moment, commenting out
static void
@@ -980,7 +990,8 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_play_sound, FALSE);
buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL);
- gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (prefs->notify_sound_file), buf ? buf : "");
+ if (buf && *buf)
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (prefs->notify_sound_file), buf);
g_signal_connect (GTK_FILE_CHOOSER_BUTTON (prefs->notify_sound_file), "selection-changed",
G_CALLBACK (notify_sound_changed), prefs);
if (val != MAIL_CONFIG_NOTIFY_PLAY_SOUND)
@@ -1087,11 +1098,13 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
prefs->photo_show= GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "photo_show"));
toggle_button_init (prefs, prefs->photo_show, FALSE,
"/apps/evolution/mail/display/sender_photo",
- G_CALLBACK (toggle_button_toggled));
+ G_CALLBACK (photo_toggle_changed));
prefs->photo_local = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "photo_local"));
toggle_button_init (prefs, prefs->photo_local, FALSE,
"/apps/evolution/mail/display/photo_local",
G_CALLBACK (toggle_button_toggled));
+ if (!gtk_toggle_button_get_active (prefs->photo_show))
+ gtk_widget_set_sensitive ((GtkWidget *) prefs->photo_local, FALSE);
/* always de-sensitised until the user types something in the entry */
prefs->add_header = GTK_BUTTON (glade_xml_get_widget (gui, "cmdHeadersAdd"));