aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-browser.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-11-12 22:59:35 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-11-12 22:59:35 +0800
commitf9804e11931411358ce98ad5a7726de6d68f2115 (patch)
treea8fb046c3abbc7c0e07147c21557a3e22504dbda /mail/message-browser.c
parent83f816df158441ca750b0bc12b7ccab2d43c0e43 (diff)
downloadgsoc2013-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/message-browser.c')
-rw-r--r--mail/message-browser.c71
1 files changed, 33 insertions, 38 deletions
diff --git a/mail/message-browser.c b/mail/message-browser.c
index 1b44f0934b..a9994631ab 100644
--- a/mail/message-browser.c
+++ b/mail/message-browser.c
@@ -61,25 +61,25 @@ static GtkAllocation last_allocation = { 0, 0 };
static BonoboWindowClass *message_browser_parent_class;
static void
-message_browser_destroy (GtkObject *object)
+message_browser_finalise (GObject *object)
{
MessageBrowser *message_browser;
message_browser = MESSAGE_BROWSER (object);
+
+ g_signal_handlers_disconnect_matched(message_browser->fb, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, message_browser);
+ g_object_unref((message_browser->fb));
- gtk_signal_disconnect_by_data((GtkObject *)message_browser->fb, message_browser);
- gtk_object_unref (GTK_OBJECT (message_browser->fb));
-
- if (GTK_OBJECT_CLASS (message_browser_parent_class)->destroy)
- (GTK_OBJECT_CLASS (message_browser_parent_class)->destroy) (object);
+ if (G_OBJECT_CLASS (message_browser_parent_class)->finalize)
+ (G_OBJECT_CLASS (message_browser_parent_class)->finalize) (object);
}
static void
-message_browser_class_init (GtkObjectClass *object_class)
+message_browser_class_init (GObjectClass *object_class)
{
- object_class->destroy = message_browser_destroy;
+ object_class->finalize = message_browser_finalise;
- message_browser_parent_class = gtk_type_class (PARENT_TYPE);
+ message_browser_parent_class = g_type_class_ref(PARENT_TYPE);
}
static void
@@ -94,7 +94,9 @@ transfer_msg_done (gboolean ok, void *data)
MessageBrowser *mb = data;
int row;
- if (ok && !GTK_OBJECT_DESTROYED (mb)) {
+#warning "GTK_OBJECT_DESTROYED"
+ /*if (ok && !GTK_OBJECT_DESTROYED (mb)) {*/
+ if (ok) {
row = e_tree_row_of_node (mb->fb->message_list->tree,
e_tree_get_cursor (mb->fb->message_list->tree));
@@ -109,7 +111,7 @@ transfer_msg_done (gboolean ok, void *data)
0, 0, FALSE);
}
- gtk_object_unref (GTK_OBJECT (mb));
+ g_object_unref((mb));
}
static void
@@ -121,9 +123,9 @@ transfer_msg (MessageBrowser *mb, int del)
static char *last_uri = NULL;
GPtrArray *uids;
char *desc;
-
- if (GTK_OBJECT_DESTROYED(mb))
- return;
+
+/* if (GTK_OBJECT_DESTROYED(mb))
+ return;*/
if (last_uri == NULL)
last_uri = g_strdup ("");
@@ -148,7 +150,7 @@ transfer_msg (MessageBrowser *mb, int del)
message_list_foreach (mb->fb->message_list, enumerate_msg, uids);
if (del) {
- gtk_object_ref (GTK_OBJECT (mb));
+ g_object_ref((mb));
mail_transfer_messages (mb->fb->folder, uids, del,
folder->physicalUri, 0, transfer_msg_done, mb);
} else {
@@ -204,13 +206,10 @@ message_browser_message_loaded (FolderBrowser *fb, const char *uid, MessageBrows
if (message)
subject = (char *) camel_mime_message_get_subject (message);
- if (subject != NULL)
- subject = e_utf8_to_gtk_string (GTK_WIDGET (mb), subject);
- else
- subject = g_strdup (_("(No subject)"));
+ if (subject == NULL)
+ subject = _("(No subject)");
title = g_strdup_printf (_("%s - Message"), subject);
- g_free (subject);
gtk_window_set_title (GTK_WINDOW (mb), title);
@@ -222,16 +221,16 @@ message_browser_message_list_built (MessageList *ml, MessageBrowser *mb)
{
const char *uid = gtk_object_get_data (GTK_OBJECT (mb), "uid");
- gtk_signal_disconnect_by_func (GTK_OBJECT (ml), message_browser_message_list_built, mb);
-
+ g_signal_handlers_disconnect_matched(mb->fb, G_SIGNAL_MATCH_DATA|G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
+ message_browser_message_list_built, mb);
message_list_select_uid (ml, uid);
}
static void
message_browser_folder_loaded (FolderBrowser *fb, const char *uri, MessageBrowser *mb)
{
- gtk_signal_connect (GTK_OBJECT (fb->message_list), "message_list_built",
- message_browser_message_list_built, mb);
+ g_signal_connect(fb->message_list, "message_list_built",
+ G_CALLBACK(message_browser_message_list_built), mb);
}
static void
@@ -261,17 +260,16 @@ set_bonobo_ui (GtkWidget *widget, FolderBrowser *fb)
BonoboUIComponent *uic;
CORBA_Environment ev;
- uicont = bonobo_ui_container_new ();
- bonobo_ui_container_set_win (uicont, BONOBO_WINDOW (widget));
+ uicont = bonobo_window_get_ui_container(BONOBO_WINDOW(widget));
uic = bonobo_ui_component_new_default ();
- bonobo_ui_component_set_container (uic, BONOBO_OBJREF (uicont));
+ bonobo_ui_component_set_container (uic, BONOBO_OBJREF (uicont), NULL);
folder_browser_set_ui_component (fb, uic);
/* Load our UI */
/*bonobo_ui_component_freeze (uic, NULL);*/
- bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR, "evolution-mail-messagedisplay.xml", "evolution-mail");
+ bonobo_ui_util_set_ui (uic, EVOLUTION_DATADIR, "evolution-mail-messagedisplay.xml", "evolution-mail", NULL);
/* Load the appropriate UI stuff from the folder browser */
@@ -307,14 +305,14 @@ message_browser_new (const GNOME_Evolution_Shell shell, const char *uri, const c
MessageBrowser *new;
FolderBrowser *fb;
- new = gtk_type_new (MESSAGE_BROWSER_TYPE);
- new = (MessageBrowser *) bonobo_window_construct (BONOBO_WINDOW (new), "Ximian Evolution", "");
+ new = g_object_new (MESSAGE_BROWSER_TYPE,
+ "title", "Ximian Evolution", NULL);
if (!new) {
g_warning ("Failed to construct Bonobo window!");
return NULL;
}
- gtk_object_set_data_full (GTK_OBJECT (new), "uid", g_strdup (uid), g_free);
+ g_object_set_data_full(G_OBJECT(new), "uid", g_strdup (uid), g_free);
fb = FOLDER_BROWSER (folder_browser_new (shell, uri));
new->fb = fb;
@@ -332,8 +330,8 @@ message_browser_new (const GNOME_Evolution_Shell shell, const char *uri, const c
gtk_widget_show (GTK_WIDGET (fb->mail_display));
gtk_widget_show (vbox);
- gtk_signal_connect (GTK_OBJECT (new), "size_allocate",
- GTK_SIGNAL_FUNC (message_browser_size_allocate_cb), NULL);
+ g_signal_connect(new, "size_allocate",
+ G_CALLBACK (message_browser_size_allocate_cb), NULL);
bonobo_window_set_contents (BONOBO_WINDOW (new), vbox);
gtk_widget_grab_focus (GTK_WIDGET (MAIL_DISPLAY (fb->mail_display)->html));
@@ -341,11 +339,8 @@ message_browser_new (const GNOME_Evolution_Shell shell, const char *uri, const c
set_default_size (GTK_WIDGET (new));
/* more evil hackery... */
- gtk_signal_connect (GTK_OBJECT (fb), "folder_loaded",
- message_browser_folder_loaded, new);
-
- gtk_signal_connect (GTK_OBJECT (fb), "message_loaded",
- message_browser_message_loaded, new);
+ g_signal_connect(fb, "folder_loaded", G_CALLBACK(message_browser_folder_loaded), new);
+ g_signal_connect(fb, "message_loaded", G_CALLBACK(message_browser_message_loaded), new);
return GTK_WIDGET (new);
}