diff options
author | Not Zed <NotZed@Ximian.com> | 2002-11-12 22:59:35 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-11-12 22:59:35 +0800 |
commit | f9804e11931411358ce98ad5a7726de6d68f2115 (patch) | |
tree | a8fb046c3abbc7c0e07147c21557a3e22504dbda /mail/mail-preferences.c | |
parent | 83f816df158441ca750b0bc12b7ccab2d43c0e43 (diff) | |
download | gsoc2013-evolution-f9804e11931411358ce98ad5a7726de6d68f2115.tar.gz gsoc2013-evolution-f9804e11931411358ce98ad5a7726de6d68f2115.tar.zst gsoc2013-evolution-f9804e11931411358ce98ad5a7726de6d68f2115.zip |
Commented out stuff that doesn't build yet. Also fixed idl build rule.
2002-11-13 Not Zed <NotZed@Ximian.com>
* Makefile.am: Commented out stuff that doesn't build yet. Also
fixed idl build rule. importers still not built.
* main.c (main): bonobactivationise. remove push visual/colormap.
(main): no longer activate activation, let bonobo_init do it.
* mail-signature-editor.c (menu_help): Change help api.
* mail-session.c (user_message_destroy_noreply): removed. Not
used?
* mail-local.c (load_metainfo): xml root->children.
* mail-format.c (g_string_append_len): Removed, it exists now.
2002-11-12 Not Zed <NotZed@Ximian.com>
* subscribe-dialog.c: gnome2ised, use gtkdialog.
(subscribe_get_global_extras): use a weak ref rather than destroy signal.
* message-tag-followup.c: gnome2ised.
* message-tag-editor.c: gnome2ised & converted to gtkdialog.
* message-list.c: gnome2ised.
(message_list_finalise): From destroy method. maybe should be
destroy still.
* message-browser.c: port to gnome2
(message_browser_finalise): renamed from destroy method.
* mail-stream-gtkhtml.c: removed redundant
camel_class_get_global_classfuncs() call.
* mail-signature-editor.c: gtkdialogised, & bonobo api changes.
* mail-search-dialogue.c: gtkdialogised.
* mail-folder-cache.c: cleaned up camel ref/hook casts.
* mail-composer-prefs.c (mail_composer_prefs_get_type): convert to
gtype.
* mail-font-prefs.c (mail_font_prefs_destroy): from finalise.
* mail-config.c: s/bonobo_config/e_config_listener/
Added /apps/Evolution prefix to the evolution keys.
Changed to use e_config_listener, etc.
(mail_config_init): remove bonobo_config stuff.
(mail_config_check_service): gtk dialogise.
(check_response): from check_cancelled.
* mail-config-druid.c (mail_config_druid_destroy): renamed from
_finalize, turned into destroy handler.
(construct): set type to toplevel, GTK_WINDOW_DIALOG no longer exists.
* mail-config-factory.c (mail_config_register_factory): bonobo api
changes.
* mail-crypto.c (mail_crypto_get_pgp_cipher_context): cleaned up
unref casts.
* mail-display.c (write_data_to_file): gnome->gtkdialog.
(on_link_clicked): use ascii_str*cmp on url.
(save_part): g_path stuff.
(launch_cb): gtk dialog.
(pixmap_press): de-oafify.
(pixbuf_for_mime_type): gnome-vfs api changes.
(do_attachment_header): Change the pixmap to a gtkimage.
(do_signature): "
(pixbuf_gen_idle): "
(do_attachment_header): ascii_str*cmp
(do_attachment_header): gnome pixmap->gtkimage.
(mail_display_destroy): protect against gtk mentalness.
(html_button_press_event): ascii_str*cmp
(drag_data_get_cb): added comment for translators of filename.
* mail-format.c (component_supports): de-oafise.
(is_anonymous): ascii_strncmp
(attachment_header): remove utf8<>locale stuff, and gnomevfs api
changes.
(format_mime_part): fix g_strdown call.
(write_field_row_begin): kill utf8->gtk stuff.
(write_address): "
(default_header_index): ascii_strcasecmp
(handle_text_plain): "
(handle_text_enriched): "
(handle_multipart_encrypted): remove utf/gtk stuff.
(handle_message_external_body): ascii_str*cmp
* mail-identify.c (mail_identify_mime_part):
(identify_by_magic): gnome vfs api changes.
* mail-importer.c: Converted.
* mail-local.c (load_metainfo): xml childs -> children.
(mls_get_folder): g_strerror.
(mls_delete_folder): g_strerror.
(reconfigure_got_folder): Gnome->GtkDialog
(reconfigure_response): from reconfigure_clicked.
* mail-mt.c (mail_msg_check_error): gnome -> gtk dialog
(error_response): renmae from error_gone. destroy widget on any
response.
* mail-offline-handler.c (impl_finalise): renamed from
impl_destroy since thats what it should be anyway.
* mail-ops.c: removed utf8 widget conversion & camel_object_un/ref
casts.
* mail-preferences.c (mail_preferences_get_type): glib2'ised.
* mail-search.c (mail_search_finalise): renmaed from destroy &
properly chain.
(mail_search_get_type): glib2 & make gtkdialog parent.
(entry_run_search): run search when entry activated. not sure if
gtkdialog has anohter way to do this on an arbitrary widget.
* mail-send-recv.c (dialogue_response): renamed from clicked. Use
gtkdialog.
* mail-session.c (request_password_deleted): removed, redundant.
(pass_response): rename from pass_got, changed for gtkdialog.
(user_message_destroy): Removed, redundant.
(user_message_response): Renamed from user_message_clicked.
2002-11-11 Not Zed <NotZed@Ximian.com>
* mail-stream-gtkhtml.c (mail_stream_gtkhtml_class_init): dont use
get_global_classfuncs, just get the type
* mail-tools.c: converted gnome2 api's.
* mail-vfolder.c (vfolder_editor_response): clicked->response.
(vfolder_editor_destroy): Removed.
(vfolder_edit): gtk dialog api
(edit_rule_response): clicked->response.
(vfolder_edit_rule): gnomedialog->gtkdialog.
(vfolder_gui_add_rule): "
(new_rule_clicked): clicked->response
svn path=/trunk/; revision=18723
Diffstat (limited to 'mail/mail-preferences.c')
-rw-r--r-- | mail/mail-preferences.c | 107 |
1 files changed, 43 insertions, 64 deletions
diff --git a/mail/mail-preferences.c b/mail/mail-preferences.c index 758f9cd540..d81de371ce 100644 --- a/mail/mail-preferences.c +++ b/mail/mail-preferences.c @@ -28,7 +28,6 @@ #include "mail-preferences.h" #include <gal/widgets/e-unicode.h> -#include <gal/util/e-unicode-i18n.h> #include <gtkhtml/gtkhtml-properties.h> #include "widgets/misc/e-charset-picker.h" @@ -47,20 +46,20 @@ static GtkVBoxClass *parent_class = NULL; GtkType mail_preferences_get_type (void) { - static GtkType type = 0; + static GType type = 0; if (!type) { - GtkTypeInfo type_info = { - "MailPreferences", - sizeof (MailPreferences), + GTypeInfo type_info = { sizeof (MailPreferencesClass), - (GtkClassInitFunc) mail_preferences_class_init, - (GtkObjectInitFunc) mail_preferences_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL + NULL, NULL, + (GClassInitFunc) mail_preferences_class_init, + NULL, NULL, + sizeof (MailPreferences), + 0, + (GInstanceInitFunc) mail_preferences_init, }; - type = gtk_type_unique (gtk_vbox_get_type (), &type_info); + type = g_type_register_static(gtk_vbox_get_type (), "MailPreferences", &type_info, 0); } return type; @@ -69,14 +68,12 @@ mail_preferences_get_type (void) static void mail_preferences_class_init (MailPreferencesClass *klass) { - GtkObjectClass *object_class; + GObjectClass *object_class; - object_class = (GtkObjectClass *) klass; - parent_class = gtk_type_class (gtk_vbox_get_type ()); + object_class = (GObjectClass *) klass; + parent_class = g_type_class_ref(gtk_vbox_get_type ()); object_class->finalize = mail_preferences_finalise; - /* override methods */ - } static void @@ -90,11 +87,11 @@ mail_preferences_finalise (GtkObject *obj) { MailPreferences *prefs = (MailPreferences *) obj; - gtk_object_unref (GTK_OBJECT (prefs->gui)); - gtk_object_unref (GTK_OBJECT (prefs->pman)); - gtk_object_unref (GTK_OBJECT (prefs->gconf)); + g_object_unref(prefs->gui); + g_object_unref(prefs->pman); + g_object_unref(prefs->gconf); - ((GtkObjectClass *)(parent_class))->finalize (obj); + ((GObjectClass *)(parent_class))->finalize (obj); } @@ -155,7 +152,7 @@ restore_labels_clicked (GtkWidget *widget, gpointer user_data) int i; for (i = 0; i < 5; i++) { - e_utf8_gtk_entry_set_text (prefs->labels[i].name, U_(label_defaults[i].name)); + gtk_entry_set_text(prefs->labels[i].name, U_(label_defaults[i].name)); colorpicker_set_color (prefs->labels[i].color, label_defaults[i].color); } } @@ -180,8 +177,7 @@ option_menu_connect (GtkOptionMenu *omenu, gpointer user_data) items = GTK_MENU_SHELL (menu)->children; while (items) { item = items->data; - gtk_signal_connect (GTK_OBJECT (item), "activate", - menu_changed, user_data); + g_signal_connect(item, "activate", menu_changed, user_data); items = items->next; } } @@ -199,7 +195,7 @@ mail_preferences_construct (MailPreferences *prefs) { NULL, NULL } }; - gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "preferences_tab"); + gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "preferences_tab", NULL); prefs->gui = gui; /* get our toplevel widget */ @@ -216,13 +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 ()); - gtk_signal_connect (GTK_OBJECT (prefs->timeout_toggle), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->timeout_toggle, "toggled", 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); - gtk_signal_connect (GTK_OBJECT (prefs->timeout), "changed", - entry_changed, prefs); + g_signal_connect(prefs->timeout, "changed", entry_changed, prefs); prefs->charset = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuCharset")); menu = e_charset_picker_new (mail_config_get_default_charset ()); @@ -231,47 +225,40 @@ 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 ()); - gtk_signal_connect (GTK_OBJECT (prefs->citation_highlight), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->citation_highlight, "toggled", 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 ()); - gtk_signal_connect (GTK_OBJECT (prefs->citation_color), "color-set", - color_set, prefs); + g_signal_connect(prefs->citation_color, "color-set", 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 ()); - gtk_signal_connect (GTK_OBJECT (prefs->empty_trash), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->empty_trash, "toggled", 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 ()); - gtk_signal_connect (GTK_OBJECT (prefs->confirm_expunge), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->confirm_expunge, "toggled", 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); - gtk_signal_connect (GTK_OBJECT (prefs->notify_not), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->notify_not, "toggled", 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); - gtk_signal_connect (GTK_OBJECT (prefs->notify_beep), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->notify_beep, "toggled", 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); - gtk_signal_connect (GTK_OBJECT (prefs->notify_play_sound), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->notify_play_sound, "toggled", 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 : ""); - gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), "changed", + g_signal_connect(gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed", entry_changed, prefs); /* HTML Mail tab */ @@ -279,35 +266,30 @@ mail_preferences_construct (MailPreferences *prefs) /* 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); - gtk_signal_connect (GTK_OBJECT (prefs->images_never), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->images_never, "toggled", 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); - gtk_signal_connect (GTK_OBJECT (prefs->images_sometimes), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->images_sometimes, "toggled", 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); - gtk_signal_connect (GTK_OBJECT (prefs->images_always), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->images_always, "toggled", toggle_button_toggled, prefs); prefs->pman = GTK_HTML_PROPMANAGER (gtk_html_propmanager_new (prefs->gconf)); - gtk_signal_connect (GTK_OBJECT (prefs->pman), "changed", toggle_button_toggled, prefs); - gtk_object_ref (GTK_OBJECT (prefs->pman)); + g_signal_connect(prefs->pman, "changed", 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]); - gtk_signal_connect (GTK_OBJECT (widget), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(widget, "toggled", toggle_button_toggled, prefs); } 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 ()); - gtk_signal_connect (GTK_OBJECT (prefs->prompt_unwanted_html), "toggled", - toggle_button_toggled, prefs); + g_signal_connect(prefs->prompt_unwanted_html, "toggled", toggle_button_toggled, prefs); /* Labels and Colours tab */ for (i = 0; i < 5; i++) { @@ -317,20 +299,17 @@ mail_preferences_construct (MailPreferences *prefs) prefs->labels[i].name = GTK_ENTRY (glade_xml_get_widget (gui, widget_name)); g_free (widget_name); text = mail_config_get_label_name (i); - e_utf8_gtk_entry_set_text (prefs->labels[i].name, text ? text : ""); - gtk_signal_connect (GTK_OBJECT (prefs->labels[i].name), "changed", - entry_changed, prefs); + gtk_entry_set_text(prefs->labels[i].name, text ? text : ""); + g_signal_connect(prefs->labels[i].name, "changed", 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)); - gtk_signal_connect (GTK_OBJECT (prefs->labels[i].color), "color_set", - color_set, prefs); + g_signal_connect(prefs->labels[i].color, "color_set", color_set, prefs); } prefs->restore_labels = GTK_BUTTON (glade_xml_get_widget (gui, "cmdRestoreLabels")); - gtk_signal_connect (GTK_OBJECT (prefs->restore_labels), "clicked", - restore_labels_clicked, prefs); + g_signal_connect(prefs->restore_labels, "clicked", restore_labels_clicked, prefs); } @@ -339,7 +318,7 @@ mail_preferences_new (void) { MailPreferences *new; - new = (MailPreferences *) gtk_type_new (mail_preferences_get_type ()); + new = (MailPreferences *) g_object_new(mail_preferences_get_type (), 0); mail_preferences_construct (new); return (GtkWidget *) new; @@ -359,7 +338,7 @@ mail_preferences_apply (MailPreferences *prefs) /* Message Display */ mail_config_set_do_seen_timeout (gtk_toggle_button_get_active (prefs->timeout_toggle)); - val = (int) (gtk_spin_button_get_value_as_float (prefs->timeout) * 1000); + val = (int) (gtk_spin_button_get_value (prefs->timeout) * 1000.0); mail_config_set_mark_as_seen_timeout (val); menu = gtk_option_menu_get_menu (prefs->charset); @@ -406,7 +385,7 @@ mail_preferences_apply (MailPreferences *prefs) /* Labels and Colours */ for (i = 0; i < 5; i++) { /* save the label... */ - string = e_utf8_gtk_entry_get_text (prefs->labels[i].name); + string = gtk_entry_get_text(prefs->labels[i].name); mail_config_set_label_name (i, string); g_free (string); |