aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-preferences.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-11-13 12:40:07 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-11-13 12:40:07 +0800
commit9e4f25d532f59d85034cbef768bb941f748fb1f2 (patch)
treea255e1471c9723e60590d85c32f1f0ba4ce834f0 /mail/mail-preferences.c
parent4dece891604244df7d9dea34b9f1e18efe27f09a (diff)
downloadgsoc2013-evolution-9e4f25d532f59d85034cbef768bb941f748fb1f2.tar.gz
gsoc2013-evolution-9e4f25d532f59d85034cbef768bb941f748fb1f2.tar.zst
gsoc2013-evolution-9e4f25d532f59d85034cbef768bb941f748fb1f2.zip
Added to cvs. Currently contains no configurable stuff, but maybe it will
2002-11-13 Not Zed <NotZed@Ximian.com> * GNOME_Evolution_Mail.server.in.in: Added to cvs. Currently contains no configurable stuff, but maybe it will one day. * Makefile.am (server_DATA): change oaf stuff to server stuff for bonobo activation. * mail-preferences.c (mail_preferences_apply): handle const entry text. * mail-composer-prefs.c (url_requested): Fixed typo. (mail_composer_prefs_construct): gnomepixmap->gtkimage. * mail-callbacks.c (configure_mail): destroy dialogue before dealing with response. (mail_generate_reply): Fix a typo. (popup_listener_cb): fix prototype. (tag_editor_response): Handle gtk dialog response. (flag_for_followup): Change gnome dialog to gtk dialog stuff. (tag_editor_destroy_cb): (tag_editor_cancel): (tag_editor_ok): Removed, handled in _response(). (filter_editor_response): renamed from _clicked, handle gtk dialogue signal. (filter_editor_destroy): Removed. (footer_info_new): gnome font api changes. (do_mail_print): port to gnome print 2. * mail-autofilter.c (mail_filter_delete_uri): message_dialog uses a specific button enum, not the stock ones. * mail-accounts.c (mail_accounts_tab_get_type): gobjectify. (account_delete_clicked): gdkdialogise. * mail-account-gui.c (mail_account_gui_setup): Hack around font metric determination code. * mail-account-editor.c (mail_account_editor_get_type): gobjectise. (mail_account_editor_new): "" * folder-info.c (evolution_folder_info_notify_ready): use pbclient interface. * folder-browser-factory.c (control_destroy_cb): fix a typo. (folder_browser_factory_new_control): More typos. * folder-browser.c (on_right_click): cast around const warning. (context_menu_position_func): fix for api change. * e-searching-tokenizer.c (e_searching_tokenizer_finalise): Changed from destroy since it only frees memory. (e_searching_tokenizer_get_type): glibify. * component-factory.c (request_quit): gtkdialogise. (send_receive_cb): " (create_component): gdk_pixbuf api. (component_factory_init): bonobo activation stuff. (warning_response): renamed from warning_clicked. (owner_set_cb): gtkdialogise. svn path=/trunk/; revision=18731
Diffstat (limited to 'mail/mail-preferences.c')
-rw-r--r--mail/mail-preferences.c73
1 files changed, 38 insertions, 35 deletions
diff --git a/mail/mail-preferences.c b/mail/mail-preferences.c
index d81de371ce..c102d6c02a 100644
--- a/mail/mail-preferences.c
+++ b/mail/mail-preferences.c
@@ -38,7 +38,7 @@
static void mail_preferences_class_init (MailPreferencesClass *class);
static void mail_preferences_init (MailPreferences *dialog);
-static void mail_preferences_finalise (GtkObject *obj);
+static void mail_preferences_finalise (GObject *obj);
static GtkVBoxClass *parent_class = NULL;
@@ -83,7 +83,7 @@ mail_preferences_init (MailPreferences *preferences)
}
static void
-mail_preferences_finalise (GtkObject *obj)
+mail_preferences_finalise (GObject *obj)
{
MailPreferences *prefs = (MailPreferences *) obj;
@@ -152,7 +152,7 @@ restore_labels_clicked (GtkWidget *widget, gpointer user_data)
int i;
for (i = 0; i < 5; i++) {
- gtk_entry_set_text(prefs->labels[i].name, U_(label_defaults[i].name));
+ gtk_entry_set_text(prefs->labels[i].name, _(label_defaults[i].name));
colorpicker_set_color (prefs->labels[i].color, label_defaults[i].color);
}
}
@@ -177,7 +177,7 @@ option_menu_connect (GtkOptionMenu *omenu, gpointer user_data)
items = GTK_MENU_SHELL (menu)->children;
while (items) {
item = items->data;
- g_signal_connect(item, "activate", menu_changed, user_data);
+ g_signal_connect(item, "activate", G_CALLBACK(menu_changed), user_data);
items = items->next;
}
}
@@ -212,11 +212,11 @@ mail_preferences_construct (MailPreferences *prefs)
/* Message Display */
prefs->timeout_toggle = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkMarkTimeout"));
gtk_toggle_button_set_active (prefs->timeout_toggle, mail_config_get_do_seen_timeout ());
- g_signal_connect(prefs->timeout_toggle, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->timeout_toggle, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->timeout = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinMarkTimeout"));
gtk_spin_button_set_value (prefs->timeout, (1.0 * mail_config_get_mark_as_seen_timeout ()) / 1000.0);
- g_signal_connect(prefs->timeout, "changed", entry_changed, prefs);
+ g_signal_connect(prefs->timeout, "changed", G_CALLBACK(entry_changed), prefs);
prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset"));
menu = e_charset_picker_new (mail_config_get_default_charset ());
@@ -225,71 +225,72 @@ mail_preferences_construct (MailPreferences *prefs)
prefs->citation_highlight = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkHighlightCitations"));
gtk_toggle_button_set_active (prefs->citation_highlight, mail_config_get_citation_highlight ());
- g_signal_connect(prefs->citation_highlight, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->citation_highlight, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->citation_color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerHighlightCitations"));
colorpicker_set_color (prefs->citation_color, mail_config_get_citation_color ());
- g_signal_connect(prefs->citation_color, "color-set", color_set, prefs);
+ g_signal_connect(prefs->citation_color, "color-set", G_CALLBACK(color_set), prefs);
/* Deleting Mail */
prefs->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit"));
gtk_toggle_button_set_active (prefs->empty_trash, mail_config_get_empty_trash_on_exit ());
- g_signal_connect(prefs->empty_trash, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->empty_trash, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->confirm_expunge = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkConfirmExpunge"));
gtk_toggle_button_set_active (prefs->confirm_expunge, mail_config_get_confirm_expunge ());
- g_signal_connect(prefs->confirm_expunge, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->confirm_expunge, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
/* New Mail Notification */
prefs->notify_not = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyNot"));
gtk_toggle_button_set_active (prefs->notify_not, mail_config_get_new_mail_notify () == MAIL_CONFIG_NOTIFY_NOT);
- g_signal_connect(prefs->notify_not, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->notify_not, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->notify_beep = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyBeep"));
gtk_toggle_button_set_active (prefs->notify_beep, mail_config_get_new_mail_notify () == MAIL_CONFIG_NOTIFY_BEEP);
- g_signal_connect(prefs->notify_beep, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->notify_beep, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->notify_play_sound = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radNotifyPlaySound"));
gtk_toggle_button_set_active (prefs->notify_play_sound,
mail_config_get_new_mail_notify () == MAIL_CONFIG_NOTIFY_PLAY_SOUND);
- g_signal_connect(prefs->notify_play_sound, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->notify_play_sound, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->notify_sound_file = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyPlaySound"));
text = mail_config_get_new_mail_notify_sound_file ();
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)),
- text ? text : "");
- g_signal_connect(gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed",
- entry_changed, prefs);
+ gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), text ? text : "");
+ g_signal_connect(gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed", G_CALLBACK(entry_changed), prefs);
/* HTML Mail tab */
/* Loading Images */
prefs->images_never = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesNever"));
gtk_toggle_button_set_active (prefs->images_never, mail_config_get_http_mode () == MAIL_CONFIG_HTTP_NEVER);
- g_signal_connect(prefs->images_never, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->images_never, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->images_sometimes = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesSometimes"));
gtk_toggle_button_set_active (prefs->images_sometimes, mail_config_get_http_mode () == MAIL_CONFIG_HTTP_SOMETIMES);
- g_signal_connect(prefs->images_sometimes, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->images_sometimes, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
prefs->images_always = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radImagesAlways"));
gtk_toggle_button_set_active (prefs->images_always, mail_config_get_http_mode () == MAIL_CONFIG_HTTP_ALWAYS);
- g_signal_connect(prefs->images_always, "toggled", toggle_button_toggled, prefs);
-
+ g_signal_connect(prefs->images_always, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
+
+#warning "gtkhtml prop manager"
+#if 0
prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (prefs->gconf));
- g_signal_connect(prefs->pman, "changed", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->pman, "changed", G_CALLBACK(toggle_button_toggled), prefs);
g_object_ref(prefs->pman);
gtk_html_propmanager_set_names (prefs->pman, names);
gtk_html_propmanager_set_gui (prefs->pman, gui, NULL);
for (i = 0; names[i][0] != NULL; i++) {
widget = glade_xml_get_widget (gui, names[i][1]);
- g_signal_connect(widget, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(widget, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
}
-
+#endif
+
prefs->prompt_unwanted_html = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkPromptWantHTML"));
gtk_toggle_button_set_active (prefs->prompt_unwanted_html, mail_config_get_confirm_unwanted_html ());
- g_signal_connect(prefs->prompt_unwanted_html, "toggled", toggle_button_toggled, prefs);
+ g_signal_connect(prefs->prompt_unwanted_html, "toggled", G_CALLBACK(toggle_button_toggled), prefs);
/* Labels and Colours tab */
for (i = 0; i < 5; i++) {
@@ -300,16 +301,16 @@ mail_preferences_construct (MailPreferences *prefs)
g_free (widget_name);
text = mail_config_get_label_name (i);
gtk_entry_set_text(prefs->labels[i].name, text ? text : "");
- g_signal_connect(prefs->labels[i].name, "changed", entry_changed, prefs);
+ g_signal_connect(prefs->labels[i].name, "changed", G_CALLBACK(entry_changed), prefs);
widget_name = g_strdup_printf ("colorLabel%d", i);
prefs->labels[i].color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, widget_name));
g_free (widget_name);
colorpicker_set_color (prefs->labels[i].color, mail_config_get_label_color (i));
- g_signal_connect(prefs->labels[i].color, "color_set", color_set, prefs);
+ g_signal_connect(prefs->labels[i].color, "color_set", G_CALLBACK(color_set), prefs);
}
prefs->restore_labels = GTK_BUTTON (glade_xml_get_widget (gui, "cmdRestoreLabels"));
- g_signal_connect(prefs->restore_labels, "clicked", restore_labels_clicked, prefs);
+ g_signal_connect(prefs->restore_labels, "clicked", G_CALLBACK(restore_labels_clicked), prefs);
}
@@ -330,6 +331,7 @@ mail_preferences_apply (MailPreferences *prefs)
{
GtkWidget *entry, *menu;
char *string;
+ const char *cstring;
guint32 rgb;
int i, val;
@@ -367,8 +369,8 @@ mail_preferences_apply (MailPreferences *prefs)
mail_config_set_new_mail_notify (MAIL_CONFIG_NOTIFY_PLAY_SOUND);
entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prefs->notify_sound_file));
- string = gtk_entry_get_text (GTK_ENTRY (entry));
- mail_config_set_new_mail_notify_sound_file (string);
+ cstring = gtk_entry_get_text (GTK_ENTRY (entry));
+ mail_config_set_new_mail_notify_sound_file (cstring);
/* HTML Mail */
if (gtk_toggle_button_get_active (prefs->images_always))
@@ -377,17 +379,18 @@ mail_preferences_apply (MailPreferences *prefs)
mail_config_set_http_mode (MAIL_CONFIG_HTTP_SOMETIMES);
else
mail_config_set_http_mode (MAIL_CONFIG_HTTP_NEVER);
-
+
+#warning "gtkhtml propmanager"
+#if 0
gtk_html_propmanager_apply (prefs->pman);
-
+#endif
mail_config_set_confirm_unwanted_html (gtk_toggle_button_get_active (prefs->prompt_unwanted_html));
/* Labels and Colours */
for (i = 0; i < 5; i++) {
/* save the label... */
- string = gtk_entry_get_text(prefs->labels[i].name);
- mail_config_set_label_name (i, string);
- g_free (string);
+ cstring = gtk_entry_get_text(prefs->labels[i].name);
+ mail_config_set_label_name (i, cstring);
/* save the colour... */
rgb = colorpicker_get_color (prefs->labels[i].color);