aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook-component.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-12-02 12:53:57 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-12-02 12:53:57 +0800
commit215a9c0ea3cb222004ff8842b663ea7a77dcb3e5 (patch)
tree3b0e35a8102377c807ad33063082a5b9a9f7813a /addressbook/gui/component/addressbook-component.c
parentd904b8e0d8f1702e4a32989f0fb0a4c2ba872d29 (diff)
downloadgsoc2013-evolution-215a9c0ea3cb222004ff8842b663ea7a77dcb3e5.tar
gsoc2013-evolution-215a9c0ea3cb222004ff8842b663ea7a77dcb3e5.tar.gz
gsoc2013-evolution-215a9c0ea3cb222004ff8842b663ea7a77dcb3e5.tar.bz2
gsoc2013-evolution-215a9c0ea3cb222004ff8842b663ea7a77dcb3e5.tar.lz
gsoc2013-evolution-215a9c0ea3cb222004ff8842b663ea7a77dcb3e5.tar.xz
gsoc2013-evolution-215a9c0ea3cb222004ff8842b663ea7a77dcb3e5.tar.zst
gsoc2013-evolution-215a9c0ea3cb222004ff8842b663ea7a77dcb3e5.zip
Replace activity_client with activity_id. (set_status_message): Use the
* gui/component/addressbook.c (struct AddressbookView): Replace activity_client with activity_id. (set_status_message): Use the EActivityHandler from the AddressbookComponent. * gui/component/addressbook-component.c (struct _AddressbookComponentPrivate): New member activity_handler. (addressbook_component_init): Init. (impl_dispose): Unref. (addressbook_component_peek_activity_handler): New. (impl_createControls): Return an ETaskBar as the statusbar control and attach it to the activity handler. svn path=/trunk/; revision=23560
Diffstat (limited to 'addressbook/gui/component/addressbook-component.c')
-rw-r--r--addressbook/gui/component/addressbook-component.c41
1 files changed, 31 insertions, 10 deletions
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index 306a1f6e2b..803ed82d55 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -33,6 +33,8 @@
#include "widgets/misc/e-source-selector.h"
#include "addressbook/gui/widgets/eab-gui-util.h"
+#include "e-task-bar.h"
+
#include <string.h>
#include <bonobo/bonobo-i18n.h>
#include <gtk/gtkscrolledwindow.h>
@@ -53,6 +55,8 @@ struct _AddressbookComponentPrivate {
GConfClient *gconf_client;
ESourceList *source_list;
GtkWidget *source_selector;
+
+ EActivityHandler *activity_handler;
};
@@ -156,8 +160,10 @@ impl_createControls (PortableServer_Servant servant,
AddressbookComponent *addressbook_component = ADDRESSBOOK_COMPONENT (bonobo_object_from_servant (servant));
GtkWidget *selector;
GtkWidget *selector_scrolled_window;
+ GtkWidget *statusbar_widget;
BonoboControl *sidebar_control;
BonoboControl *view_control;
+ BonoboControl *statusbar_control;
selector = e_source_selector_new (addressbook_component->priv->source_list);
e_source_selector_show_selection (E_SOURCE_SELECTOR (selector), FALSE);
@@ -183,18 +189,16 @@ impl_createControls (PortableServer_Servant servant,
G_OBJECT (addressbook_component), 0);
load_uri_for_selection (E_SOURCE_SELECTOR (selector), view_control);
- *corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev);
- *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
+ statusbar_widget = e_task_bar_new ();
+ gtk_widget_show (statusbar_widget);
+ statusbar_control = bonobo_control_new (statusbar_widget);
- /* FIXME temporary for testing. */
- {
- GtkWidget *label = gtk_label_new ("Hey hey this is the addressbook");
- BonoboControl *control;
+ e_activity_handler_attach_task_bar (addressbook_component->priv->activity_handler,
+ E_TASK_BAR (statusbar_widget));
- gtk_widget_show (label);
- control = bonobo_control_new (label);
- *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (control), ev);
- }
+ *corba_sidebar_control = CORBA_Object_duplicate (BONOBO_OBJREF (sidebar_control), ev);
+ *corba_view_control = CORBA_Object_duplicate (BONOBO_OBJREF (view_control), ev);
+ *corba_statusbar_control = CORBA_Object_duplicate (BONOBO_OBJREF (statusbar_control), ev);
}
static GNOME_Evolution_CreatableItemTypeList *
@@ -300,6 +304,11 @@ impl_dispose (GObject *object)
priv->gconf_client = NULL;
}
+ if (priv->activity_handler != NULL) {
+ g_object_unref (priv->activity_handler);
+ priv->activity_handler = NULL;
+ }
+
(* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
@@ -347,6 +356,8 @@ addressbook_component_init (AddressbookComponent *component)
priv->source_list = e_source_list_new_for_gconf (priv->gconf_client,
"/apps/evolution/addressbook/sources");
+ priv->activity_handler = e_activity_handler_new ();
+
/* Create default addressbooks if there are no groups */
groups = e_source_list_peek_groups (priv->source_list);
if (!groups) {
@@ -407,4 +418,14 @@ addressbook_component_peek (void)
return component;
}
+
+EActivityHandler *
+addressbook_component_peek_activity_handler (AddressbookComponent *component)
+{
+ g_return_val_if_fail (ADDRESSBOOK_IS_COMPONENT (component), NULL);
+
+ return component->priv->activity_handler;
+}
+
+
BONOBO_TYPE_FUNC_FULL (AddressbookComponent, GNOME_Evolution_Component, PARENT_TYPE, addressbook_component)