aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog10
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c40
-rw-r--r--addressbook/gui/widgets/e-minicard-view.h1
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/message-list.c9
5 files changed, 58 insertions, 8 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index c62f154be6..fd3aa36ca4 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -8,6 +8,16 @@
handle. This patch removes any freed objects from the 'locals' list in
each conduit which otherwise frees them again when the conduit is closed.
+2008-07-09 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #228725
+
+ * gui/widgets/e-minicard-view.h: (struct _EMinicardView):
+ * gui/widgets/e-minicard-view.c: (set_empty_message),
+ (stop_state_changed), (e_minicard_view_set_property),
+ (e_minicard_view_dispose), (e_minicard_view_init):
+ Show different message in a view when searching.
+
2008-07-03 Milan Crha <mcrha@redhat.com>
** Fix for bug #540152
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index daa41b1e2f..30a384091d 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -155,28 +155,34 @@ static void
set_empty_message (EMinicardView *view)
{
char *empty_message;
- gboolean editable = FALSE, perform_initial_query = FALSE;
+ gboolean editable = FALSE, perform_initial_query = FALSE, searching = FALSE;
EBook *book;
if (view->adapter) {
+ EABModel *model = NULL;
+
g_object_get (view->adapter,
"editable", &editable,
+ "model", &model,
NULL);
g_object_get (view->adapter, "book", &book, NULL);
if (!e_book_check_static_capability (book, "do-initial-query"))
perform_initial_query = TRUE;
+
+ searching = model && eab_model_can_stop (model);
}
- if (editable) {
+ if (searching) {
+ empty_message = _("\n\nSearching for the Contacts...");
+ } else if (editable) {
if (perform_initial_query)
empty_message = _("\n\nSearch for the Contact\n\n"
"or double-click here to create a new Contact.");
else
empty_message = _("\n\nThere are no items to show in this view.\n\n"
"Double-click here to create a new Contact.");
- }
- else {
+ } else {
if (perform_initial_query)
empty_message = _("\n\nSearch for the Contact.");
else
@@ -195,6 +201,12 @@ writable_status_change (EABModel *model, gboolean writable, EMinicardView *view)
}
static void
+stop_state_changed (EABModel *model, EMinicardView *view)
+{
+ set_empty_message (view);
+}
+
+static void
adapter_changed (EMinicardView *view)
{
set_empty_message (view);
@@ -216,19 +228,23 @@ e_minicard_view_set_property (GObject *object,
switch (prop_id){
case PROP_ADAPTER:
if (view->adapter) {
- if (view->writable_status_id) {
+ if (view->writable_status_id || view->stop_state_id) {
EABModel *model;
g_object_get (view->adapter,
"model", &model,
NULL);
if (model) {
- g_signal_handler_disconnect (model, view->writable_status_id);
+ if (view->writable_status_id)
+ g_signal_handler_disconnect (model, view->writable_status_id);
+ if (view->stop_state_id)
+ g_signal_handler_disconnect (model, view->stop_state_id);
}
}
g_object_unref (view->adapter);
}
view->writable_status_id = 0;
+ view->stop_state_id = 0;
view->adapter = g_value_get_object (value);
g_object_ref (view->adapter);
adapter_changed (view);
@@ -244,6 +260,9 @@ e_minicard_view_set_property (GObject *object,
view->writable_status_id =
g_signal_connect (model, "writable_status",
G_CALLBACK (writable_status_change), view);
+ view->stop_state_id =
+ g_signal_connect (model, "stop_state_changed",
+ G_CALLBACK (stop_state_changed), view);
}
}
@@ -317,19 +336,23 @@ e_minicard_view_dispose (GObject *object)
}
if (view->adapter) {
- if (view->writable_status_id) {
+ if (view->writable_status_id || view->stop_state_id) {
EABModel *model;
g_object_get (view->adapter,
"model", &model,
NULL);
if (model) {
- g_signal_handler_disconnect (model, view->writable_status_id);
+ if (view->writable_status_id)
+ g_signal_handler_disconnect (model, view->writable_status_id);
+ if (view->stop_state_id)
+ g_signal_handler_disconnect (model, view->stop_state_id);
}
}
g_object_unref (view->adapter);
}
view->writable_status_id = 0;
+ view->stop_state_id = 0;
view->adapter = NULL;
if (G_OBJECT_CLASS(parent_class)->dispose)
@@ -548,6 +571,7 @@ e_minicard_view_init (EMinicardView *view)
view->adapter = NULL;
view->canvas_drag_data_get_id = 0;
view->writable_status_id = 0;
+ view->stop_state_id = 0;
set_empty_message (view);
}
diff --git a/addressbook/gui/widgets/e-minicard-view.h b/addressbook/gui/widgets/e-minicard-view.h
index 1d8eef963c..eb6d07f034 100644
--- a/addressbook/gui/widgets/e-minicard-view.h
+++ b/addressbook/gui/widgets/e-minicard-view.h
@@ -70,6 +70,7 @@ struct _EMinicardView
guint canvas_drag_data_get_id;
guint writable_status_id;
+ guint stop_state_id;
};
struct _EMinicardViewClass
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c874975c03..3d51651e46 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -34,6 +34,12 @@
2008-07-09 Milan Crha <mcrha@redhat.com>
+ ** Part of fix for bug #228725
+
+ * message-list.c: (mail_regen_list): Update empty message on regen.
+
+2008-07-09 Milan Crha <mcrha@redhat.com>
+
** Fix for bug #207802 (Patch suggested by Veerapuram Varadhan.)
* message-list.c: (struct search_child_struct), (search_child_cb),
diff --git a/mail/message-list.c b/mail/message-list.c
index ffa00bc927..8c62fc4244 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -4316,6 +4316,15 @@ mail_regen_list (MessageList *ml, const char *search, const char *hideexpr, Came
camel_folder_thread_messages_ref(m->tree);
}
+ if (message_list_length (ml) <= 0) {
+ /* there is some info why the message list is empty, let it be something useful */
+ char *txt = g_strconcat (_("Generating message list"), "..." , NULL);
+
+ e_tree_set_info_message (m->ml->tree, txt);
+
+ g_free (txt);
+ }
+
/* if we're busy already kick off timeout processing, so normal updates are immediate */
if (ml->regen == NULL)
ml_regen_timeout(m);