aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-08-20 01:35:44 +0800
committerChris Lahey <clahey@src.gnome.org>2001-08-20 01:35:44 +0800
commit7aa37d45375de7a08821f7108cd90cdc96273be5 (patch)
treed9849bbdc0ccb0aa28617d984e8d70217b26171e /addressbook/gui/component/addressbook.c
parent81657a54af2413a1b2be6a00f2d46b31e035df5a (diff)
downloadgsoc2013-evolution-7aa37d45375de7a08821f7108cd90cdc96273be5.tar
gsoc2013-evolution-7aa37d45375de7a08821f7108cd90cdc96273be5.tar.gz
gsoc2013-evolution-7aa37d45375de7a08821f7108cd90cdc96273be5.tar.bz2
gsoc2013-evolution-7aa37d45375de7a08821f7108cd90cdc96273be5.tar.lz
gsoc2013-evolution-7aa37d45375de7a08821f7108cd90cdc96273be5.tar.xz
gsoc2013-evolution-7aa37d45375de7a08821f7108cd90cdc96273be5.tar.zst
gsoc2013-evolution-7aa37d45375de7a08821f7108cd90cdc96273be5.zip
Set the folder bar message here.
2001-08-19 Christopher James Lahey <clahey@ximian.com> * gui/component/addressbook.c (set_folder_bar_label), gui/widgets/e-addressbook-model.c, gui/widgets/e-addressbook-model.h (update_folder_bar_message), gui/widgets/e-addressbook-view.c, gui/widgets/e-addressbook-view.h (folder_bar_message): Set the folder bar message here. * gui/component/select-names/e-select-names-model.c (SEPLEN): Use strlen(SEPARATOR) here so that if the separator changes the length will work properly. svn path=/trunk/; revision=12220
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r--addressbook/gui/component/addressbook.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index a6f0dfc2a5..5e8b523a5a 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -18,6 +18,7 @@
#include <libgnomeui/gnome-uidefs.h>
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-ui-util.h>
+#include <bonobo/bonobo-exception.h>
#include <gal/util/e-util.h>
#include <gal/widgets/e-unicode.h>
@@ -40,6 +41,8 @@
#include <widgets/misc/e-search-bar.h>
#include <widgets/misc/e-filter-bar.h>
+#define d(x)
+
#define PROPERTY_FOLDER_URI "folder_uri"
#define PROPERTY_FOLDER_URI_IDX 1
@@ -791,6 +794,42 @@ set_status_message (EAddressbookView *eav, const char *message, AddressbookView
CORBA_exception_free (&ev);
}
+static void
+set_folder_bar_label (EAddressbookView *eav, const char *message, AddressbookView *view)
+{
+ CORBA_Environment ev;
+ GNOME_Evolution_ShellView shell_view_interface;
+
+ CORBA_exception_init (&ev);
+
+ shell_view_interface = retrieve_shell_view_interface_from_control (view->control);
+ if (!shell_view_interface) {
+ CORBA_exception_free (&ev);
+ return;
+ }
+
+ d(g_message("Updating via ShellView"));
+
+ if (message == NULL || message[0] == 0) {
+ GNOME_Evolution_ShellView_setFolderBarLabel (shell_view_interface,
+ "",
+ &ev);
+ }
+ else {
+ GNOME_Evolution_ShellView_setFolderBarLabel (shell_view_interface,
+ message,
+ &ev);
+ }
+
+ if (BONOBO_EX (&ev))
+ g_warning ("Exception in label update: %s",
+ bonobo_exception_get_text (&ev));
+
+ CORBA_exception_free (&ev);
+}
+
+
+
BonoboControl *
addressbook_factory_new_control (void)
{
@@ -873,6 +912,11 @@ addressbook_factory_new_control (void)
view);
gtk_signal_connect (GTK_OBJECT (view->view),
+ "folder_bar_message",
+ GTK_SIGNAL_FUNC(set_folder_bar_label),
+ view);
+
+ gtk_signal_connect (GTK_OBJECT (view->view),
"command_state_change",
GTK_SIGNAL_FUNC(update_command_state),
view);