aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-12-02 11:41:35 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-12-02 11:41:35 +0800
commit492cdaf6f9db2f622ad4a4b292bddaf55631d0b6 (patch)
tree847eae4fea9d93692e162eec11673c2577691068 /mail
parentac0442e31c68ce073e4156bbe47d63da8f7d2523 (diff)
downloadgsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.tar
gsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.tar.gz
gsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.tar.bz2
gsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.tar.lz
gsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.tar.xz
gsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.tar.zst
gsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.zip
New member activity_handler. (mail_component_init): Initialize.
* mail-component.c (struct _MailComponentPrivate): New member activity_handler. (mail_component_init): Initialize. (impl_dispose): Unref. (mail_component_peek_activity_handler): New. (impl_createControls): Create an ETaskBar, attach it to the ActivityHandler, and return it to the caller as the statusbar control. * e-activity-handler.c (e_activity_handler_operation_finished): Argh, renamed from e_activity_client_operation_finished(). (e_activity_handler_operation_started): Don't unref the pixbuf. * e-shell-window.c (setup_widgets): Hide the menu hint label. * e-activity-handler.c (init): Init to next_activity_id to 1 so callers can rely on it being nonzero. svn path=/trunk/; revision=23556
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog14
-rw-r--r--mail/mail-component.c37
2 files changed, 39 insertions, 12 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index da58519f1b..fe425c4cb9 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,19 @@
2003-12-01 Ettore Perazzoli <ettore@ximian.com>
+ * mail-mt.c (struct _mail_msg_priv): Remove member "activity".
+ (mail_operation_status): Un-#if 0 the code.
+
+ * mail-component.c (struct _MailComponentPrivate): New member
+ activity_handler.
+ (mail_component_init): Initialize.
+ (impl_dispose): Unref.
+ (mail_component_peek_activity_handler): New.
+ (impl_createControls): Create an ETaskBar, attach it to the
+ ActivityHandler, and return it to the caller as the statusbar
+ control.
+
+2003-12-01 Ettore Perazzoli <ettore@ximian.com>
+
* mail-component.c (impl_createControls): Pass a label for the
status bar control for now.
diff --git a/mail/mail-component.c b/mail/mail-component.c
index e43f0610d3..fd22ad4524 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -40,6 +40,7 @@
#include "em-folder-browser.h"
#include "em-folder-selector.h"
#include "em-folder-selection.h"
+#include "em-migrate.h"
#include "mail-config.h"
#include "mail-component.h"
@@ -51,7 +52,7 @@
#include "mail-send-recv.h"
#include "mail-session.h"
-#include "em-migrate.h"
+#include "e-task-bar.h"
#include <gtk/gtklabel.h>
@@ -78,6 +79,8 @@ struct _MailComponentPrivate {
char *base_directory;
EMFolderTreeModel *model;
+
+ EActivityHandler *activity_handler;
MailAsyncEvent *async_event;
GHashTable *store_hash; /* display_name by store */
@@ -264,7 +267,12 @@ static void
impl_dispose (GObject *object)
{
MailComponentPrivate *priv = MAIL_COMPONENT (object)->priv;
-
+
+ if (priv->activity_handler != NULL) {
+ g_object_unref (priv->activity_handler);
+ priv->activity_handler = NULL;
+ }
+
if (priv->search_context != NULL) {
g_object_unref (priv->search_context);
priv->search_context = NULL;
@@ -325,35 +333,33 @@ impl_createControls (PortableServer_Servant servant,
MailComponentPrivate *priv = mail_component->priv;
BonoboControl *tree_control;
BonoboControl *view_control;
+ BonoboControl *statusbar_control;
GtkWidget *tree_widget;
GtkWidget *view_widget;
+ GtkWidget *statusbar_widget;
view_widget = em_folder_browser_new ();
tree_widget = (GtkWidget *) em_folder_tree_new_with_model (priv->model);
em_format_set_session ((EMFormat *) ((EMFolderView *) view_widget)->preview, session);
+ statusbar_widget = e_task_bar_new ();
+ e_activity_handler_attach_task_bar (priv->activity_handler, E_TASK_BAR (statusbar_widget));
+
gtk_widget_show (tree_widget);
gtk_widget_show (view_widget);
+ gtk_widget_show (statusbar_widget);
tree_control = bonobo_control_new (tree_widget);
view_control = bonobo_control_new (view_widget);
+ statusbar_control = bonobo_control_new (statusbar_widget);
*corba_tree_control = CORBA_Object_duplicate (BONOBO_OBJREF (tree_control), ev);
*corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
+ *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (statusbar_control), ev);
g_signal_connect (view_control, "activate", G_CALLBACK (view_control_activate_cb), view_widget);
g_signal_connect (tree_widget, "folder-selected", G_CALLBACK (folder_selected_cb), view_widget);
-
- /* FIXME temporary for testing. */
- {
- GtkWidget *label = gtk_label_new ("Hey hey this is the mailer");
- BonoboControl *control;
-
- gtk_widget_show (label);
- control = bonobo_control_new (label);
- *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (control), ev);
- }
}
@@ -443,6 +449,8 @@ mail_component_init (MailComponent *component)
abort ();
priv->model = em_folder_tree_model_new ();
+
+ priv->activity_handler = e_activity_handler_new ();
/* EPFIXME: Turn into an object? */
mail_session_init (priv->base_directory);
@@ -516,6 +524,11 @@ mail_component_peek_search_context (MailComponent *component)
return component->priv->search_context;
}
+EActivityHandler *
+mail_component_peek_activity_handler (MailComponent *component)
+{
+ return component->priv->activity_handler;
+}
void
mail_component_add_store (MailComponent *component, CamelStore *store, const char *name)