aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-mailer-prefs.c
diff options
context:
space:
mode:
authorJohnny Jacob <jjohnny@src.gnome.org>2007-12-15 19:59:39 +0800
committerJohnny Jacob <jjohnny@src.gnome.org>2007-12-15 19:59:39 +0800
commit6cb13b10b6c87bd6fd89454049dd9b58c1f9808c (patch)
tree7c96fa9f180a0295eea711ecef359c635143033c /mail/em-mailer-prefs.c
parent4f7d3decd1bb7f47e9d23c0514e82d002aaac752 (diff)
downloadgsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.gz
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.bz2
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.lz
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.xz
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.tar.zst
gsoc2013-evolution-6cb13b10b6c87bd6fd89454049dd9b58c1f9808c.zip
Part of fix for #492702 from Milan Crha : New mail notify and preferences ui movement.
svn path=/trunk/; revision=34702
Diffstat (limited to 'mail/em-mailer-prefs.c')
-rw-r--r--mail/em-mailer-prefs.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index 2a4e81117d..b8c3d7fb59 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -702,36 +702,6 @@ http_images_changed (GtkWidget *widget, EMMailerPrefs *prefs)
}
-static void
-notify_type_changed (GtkWidget *widget, EMMailerPrefs *prefs)
-{
- int type;
-
- if (gtk_toggle_button_get_active (prefs->notify_not))
- type = MAIL_CONFIG_NOTIFY_NOT;
- else if (gtk_toggle_button_get_active (prefs->notify_beep))
- type = MAIL_CONFIG_NOTIFY_BEEP;
- else
- type = MAIL_CONFIG_NOTIFY_PLAY_SOUND;
-
- if (type == MAIL_CONFIG_NOTIFY_PLAY_SOUND)
- gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_sound_file, TRUE);
- else
- gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_sound_file, FALSE);
-
- gconf_client_set_int (prefs->gconf, "/apps/evolution/mail/notify/type", type, NULL);
-}
-
-static void
-notify_sound_changed (GtkWidget *widget, EMMailerPrefs *prefs)
-{
- const char *filename;
-
- filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (prefs->notify_sound_file));
- /* When we startup the file name will be NULL*/
- gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/notify/sound", filename ? filename : "", NULL);
-}
-
static GtkWidget *
emmp_widget_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data)
{
@@ -973,38 +943,6 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
"/apps/evolution/mail/prompts/expunge",
G_CALLBACK (toggle_button_toggled));
- /* New Mail Notification */
- locked = !gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/notify/type", NULL);
-
- val = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/notify/type", NULL);
- prefs->notify_not = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyNot"));
- gtk_toggle_button_set_active (prefs->notify_not, val == MAIL_CONFIG_NOTIFY_NOT);
- g_signal_connect (prefs->notify_not, "toggled", G_CALLBACK (notify_type_changed), prefs);
- if (locked)
- gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_not, FALSE);
-
- prefs->notify_beep = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyBeep"));
- prefs->notify_sound_file = GTK_FILE_CHOOSER_BUTTON (glade_xml_get_widget (gui, "fileNotifyPlaySoundButton"));
- gtk_toggle_button_set_active (prefs->notify_beep, val == MAIL_CONFIG_NOTIFY_BEEP);
- g_signal_connect (prefs->notify_beep, "toggled", G_CALLBACK (notify_type_changed), prefs);
- if (locked)
- gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_beep, FALSE);
-
- prefs->notify_play_sound = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyPlaySound"));
- gtk_toggle_button_set_active (prefs->notify_play_sound, val == MAIL_CONFIG_NOTIFY_PLAY_SOUND);
- g_signal_connect (prefs->notify_play_sound, "toggled", G_CALLBACK (notify_type_changed), prefs);
- if (locked)
- gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_play_sound, FALSE);
-
- buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL);
- 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)
- gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_sound_file, FALSE);
- g_free (buf);
-
/* Mail Fonts */
font = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/display/fonts/monospace", NULL);
prefs->font_fixed = GTK_FONT_BUTTON (glade_xml_get_widget (gui, "FontFixed"));