[evolution-patches] 70718, prev/next buttons not enablign properly
- From: Not Zed <notzed ximian com>
- To: asdf <evolution-patches lists ximian com>
- Subject: [evolution-patches] 70718, prev/next buttons not enablign properly
- Date: Mon, 21 Feb 2005 13:30:53 +0800
can happen if you have sorting turned on
? mail/ems.diff
? mail/evolution-mail-2.0.schemas
? mail/m.diff
? mail/ma.diff
? mail/default/zh_CN/Makefile
? mail/default/zh_CN/Makefile.in
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3576
diff -u -p -r1.3576 ChangeLog
--- mail/ChangeLog 18 Feb 2005 16:43:55 -0000 1.3576
+++ mail/ChangeLog 21 Feb 2005 05:31:43 -0000
@@ -1,3 +1,12 @@
+2005-02-21 Not Zed <NotZed Ximian com>
+
+ ** See bug #70718
+
+ * em-folder-view.c (emfv_list_built): handle list_built events -
+ whenever the list changes.
+ (emfv_gui_folder_changed, emfv_folder_changed): removed, we want
+ to run off the viewed list, not the physical folder.
+
2005-02-18 Rodney Dawes <dobey novell com>
* mail/em-folder-view.c (emfv_popup_copy_text): New method to copy
Index: mail/em-folder-view.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-folder-view.c,v
retrieving revision 1.108
diff -u -p -r1.108 em-folder-view.c
--- mail/em-folder-view.c 18 Feb 2005 16:43:55 -0000 1.108
+++ mail/em-folder-view.c 21 Feb 2005 05:31:44 -0000
@@ -99,9 +99,8 @@
#include "evolution-shell-component-utils.h" /* Pixmap stuff, sigh */
-static void emfv_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, EMFolderView *emfv);
-
static void emfv_list_message_selected(MessageList *ml, const char *uid, EMFolderView *emfv);
+static void emfv_list_built(MessageList *ml, EMFolderView *emfv);
static int emfv_list_right_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv);
static void emfv_list_double_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv);
static int emfv_list_key_press(ETree *tree, int row, ETreePath path, int col, GdkEvent *ev, EMFolderView *emfv);
@@ -136,8 +135,6 @@ struct _EMFolderViewPrivate {
int nomarkseen:1;
int destroyed:1;
- CamelObjectHookID folder_changed_id;
-
GtkWidget *invisible;
char *selection_uri;
@@ -180,6 +177,7 @@ emfv_init(GObject *o)
emfv->list = (MessageList *)message_list_new();
g_signal_connect(emfv->list, "message_selected", G_CALLBACK(emfv_list_message_selected), emfv);
+ g_signal_connect(emfv->list, "message_list_built", G_CALLBACK(emfv_list_built), emfv);
/* FIXME: should this hang off message-list instead? */
g_signal_connect(emfv->list->tree, "right_click", G_CALLBACK(emfv_list_right_click), emfv);
@@ -241,8 +239,6 @@ emfv_destroy (GtkObject *o)
}
if (emfv->folder) {
- if (p->folder_changed_id)
- camel_object_remove_event(emfv->folder, p->folder_changed_id);
camel_object_unref(emfv->folder);
g_free(emfv->folder_uri);
emfv->folder = NULL;
@@ -570,14 +566,11 @@ emfv_set_folder(EMFolderView *emfv, Came
if (emfv->folder) {
emfv->hide_deleted = emfv->list->hidedeleted; /* <- a bit nasty but makes it track the display better */
mail_sync_folder (emfv->folder, NULL, NULL);
- camel_object_remove_event(emfv->folder, emfv->priv->folder_changed_id);
camel_object_unref(emfv->folder);
}
emfv->folder = folder;
if (folder) {
- emfv->priv->folder_changed_id = camel_object_hook_event(folder, "folder_changed",
- (CamelObjectEventHookFunc)emfv_folder_changed, emfv);
camel_object_ref(folder);
mail_refresh_folder(folder, NULL, NULL);
/* We need to set this up to get the right view options for the message-list, even if we're not showing it */
@@ -2169,6 +2162,15 @@ emfv_list_message_selected(MessageList *
}
static void
+emfv_list_built(MessageList *ml, EMFolderView *emfv)
+{
+ if (!emfv->priv->destroyed) {
+ emfv_enable_menus(emfv);
+ g_signal_emit(emfv, signals[EMFV_LOADED], 0);
+ }
+}
+
+static void
emfv_list_double_click(ETree *tree, gint row, ETreePath path, gint col, GdkEvent *event, EMFolderView *emfv)
{
/* Ignore double-clicks on columns that handle thier own state */
@@ -2375,23 +2377,6 @@ emfv_format_popup_event(EMFormatHTMLDisp
gtk_menu_popup(menu, NULL, NULL, NULL, NULL, event->button, event->time);
return TRUE;
-}
-
-static void
-emfv_gui_folder_changed(CamelFolder *folder, void *dummy, EMFolderView *emfv)
-{
- if (!emfv->priv->destroyed) {
- emfv_enable_menus(emfv);
- g_signal_emit(emfv, signals[EMFV_LOADED], 0);
- }
- g_object_unref(emfv);
-}
-
-static void
-emfv_folder_changed(CamelFolder *folder, CamelFolderChangeInfo *changes, EMFolderView *emfv)
-{
- g_object_ref(emfv);
- mail_async_event_emit(emfv->async, MAIL_ASYNC_GUI, (MailAsyncFunc)emfv_gui_folder_changed, folder, NULL, emfv);
}
/* keep these two tables in sync */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]