aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog22
-rw-r--r--mail/mail-callbacks.c3
-rw-r--r--mail/mail-vfolder.c4
-rw-r--r--mail/message-browser.c6
-rw-r--r--mail/message-list.c32
5 files changed, 59 insertions, 8 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 49241e0cee..a45d74992b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,25 @@
+2003-06-16 Not Zed <NotZed@Ximian.com>
+
+ ** See bug #44609
+
+ * mail-vfolder.c (vfolder_edit_rule): put the ok/cancel buttons in
+ the stupid gnome 2 order.
+
+ ** See bug #33593
+
+ * message-list.c (on_selection_changed_cmd): also listedn to
+ selection changed events, since the etable api has changed.
+ (get_selected_cb): helper for above.
+ (message_list_construct): hook to selection change signal.
+
+ * mail-callbacks.c (composer_send_queued_cb): Unref the composer
+ to match the ref composer_send_cb();
+
+ ** See bug #44519
+
+ * message-browser.c (message_browser_message_list_built): We want
+ to disconnect from the messagelist, not folderbrowser signal.
+
2003-06-11 Jeffrey Stedfast <fejj@ximian.com>
* mail-format.c (format_mime_part): We only really want to use
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 6001e8fd7e..56c6109c85 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -364,7 +364,7 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
g_free (ccd->uid);
ccd->uid = NULL;
}
-
+
gtk_widget_destroy (GTK_WIDGET (send->composer));
if (send->send && camel_session_is_online (session)) {
@@ -397,6 +397,7 @@ composer_send_queued_cb (CamelFolder *folder, CamelMimeMessage *msg, CamelMessag
if (send->ccd)
ccd_unref (send->ccd);
+ g_object_unref(send->composer);
g_free (send);
}
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 9d09614182..b04c55ce04 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -873,10 +873,10 @@ vfolder_edit_rule(const char *uri)
gd = (GtkDialog *)gtk_dialog_new_with_buttons(_("Edit VFolder"), NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_OK,
- GTK_RESPONSE_OK,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK,
+ GTK_RESPONSE_OK,
NULL);
gtk_container_set_border_width ((GtkWindow *) gd, 6);
gtk_box_set_spacing ((GtkBox *) gd->vbox, 6);
diff --git a/mail/message-browser.c b/mail/message-browser.c
index 5c105bc109..018fda670b 100644
--- a/mail/message-browser.c
+++ b/mail/message-browser.c
@@ -212,7 +212,7 @@ message_browser_message_loaded (FolderBrowser *fb, const char *uid, MessageBrows
CamelMimeMessage *message;
char *subject = NULL;
char *title;
-
+
folder_browser_ui_message_loaded(fb);
message = fb->mail_display->current_message;
@@ -234,8 +234,8 @@ static void
message_browser_message_list_built (MessageList *ml, MessageBrowser *mb)
{
const char *uid = g_object_get_data (G_OBJECT (mb), "uid");
-
- g_signal_handlers_disconnect_matched (mb->fb, G_SIGNAL_MATCH_DATA|G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
+
+ g_signal_handlers_disconnect_matched (ml, G_SIGNAL_MATCH_DATA|G_SIGNAL_MATCH_FUNC, 0, 0, NULL,
message_browser_message_list_built, mb);
message_list_select_uid (ml, uid);
}
diff --git a/mail/message-list.c b/mail/message-list.c
index 1d9ca11aaa..d694dd2629 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -131,6 +131,7 @@ typedef struct _EMailAddress EMailAddress;
static ETreeScrolledClass *message_list_parent_class;
static void on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data);
+static void on_selection_changed_cmd(ETree *tree, MessageList *ml);
static gint on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list);
static char *filter_date (time_t date);
static char *filter_size (int size);
@@ -1453,6 +1454,10 @@ message_list_construct (MessageList *message_list)
g_signal_connect((message_list->tree), "click",
G_CALLBACK (on_click), message_list);
+
+ g_signal_connect((message_list->tree), "selection_change",
+ G_CALLBACK (on_selection_changed_cmd), message_list);
+
}
GtkWidget *
@@ -2235,7 +2240,7 @@ on_cursor_activated_idle (gpointer data)
MessageList *message_list = data;
ESelectionModel *esm = e_tree_get_selection_model (message_list->tree);
int selected = e_selection_model_selected_count (esm);
-
+
if (selected == 1 && message_list->cursor_uid) {
d(printf ("emitting cursor changed signal, for uid %s\n", message_list->cursor_uid));
g_signal_emit (message_list, message_list_signals[MESSAGE_SELECTED], 0, message_list->cursor_uid);
@@ -2252,7 +2257,7 @@ on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_dat
{
MessageList *message_list = MESSAGE_LIST (user_data);
const char *new_uid;
-
+
if (path == NULL)
new_uid = NULL;
else
@@ -2272,6 +2277,29 @@ on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_dat
}
}
+static void
+get_selected_cb(ETreePath path, MessageList *ml)
+{
+ g_free(ml->cursor_uid);
+ ml->cursor_uid = g_strdup(get_message_uid(ml, path));
+}
+
+static void
+on_selection_changed_cmd(ETree *tree, MessageList *ml)
+{
+ ESelectionModel *esm = e_tree_get_selection_model (ml->tree);
+ int selected = e_selection_model_selected_count (esm);
+
+ g_free(ml->cursor_uid);
+ ml->cursor_uid = NULL;
+
+ if (selected == 1)
+ e_tree_selected_path_foreach(ml->tree, (ETreeForeachFunc)get_selected_cb, ml);
+
+ if ((selected == 1 || selected == 0) && !ml->idle_id)
+ g_idle_add_full (G_PRIORITY_LOW, on_cursor_activated_idle, ml, NULL);
+}
+
static gint
on_click (ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, MessageList *list)
{