aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMichael Meeks <michael@helixcode.com>2000-09-14 10:32:14 +0800
committerMichael Meeks <mmeeks@src.gnome.org>2000-09-14 10:32:14 +0800
commit25678df2fe9215cb1d31435e24b91f8be72b9c92 (patch)
tree420adc9e41d8dba5af216e940e1ed262adb22b7d /shell
parentfd88276cd22ace15490fc9183fe6139723cf9166 (diff)
downloadgsoc2013-evolution-25678df2fe9215cb1d31435e24b91f8be72b9c92.tar
gsoc2013-evolution-25678df2fe9215cb1d31435e24b91f8be72b9c92.tar.gz
gsoc2013-evolution-25678df2fe9215cb1d31435e24b91f8be72b9c92.tar.bz2
gsoc2013-evolution-25678df2fe9215cb1d31435e24b91f8be72b9c92.tar.lz
gsoc2013-evolution-25678df2fe9215cb1d31435e24b91f8be72b9c92.tar.xz
gsoc2013-evolution-25678df2fe9215cb1d31435e24b91f8be72b9c92.tar.zst
gsoc2013-evolution-25678df2fe9215cb1d31435e24b91f8be72b9c92.zip
Get the status bar playing ball.
2000-09-14 Michael Meeks <michael@helixcode.com> * e-shell-view.c (e_shell_view_construct): prune cruft. (shell_view_interface_unset_message_cb), (shell_view_interface_set_message_cb): impl. svn path=/trunk/; revision=5419
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-shell-view.c75
2 files changed, 50 insertions, 31 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 6177a2c2e1..ac1c59ef7d 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,11 @@
2000-09-14 Michael Meeks <michael@helixcode.com>
+ * e-shell-view.c (e_shell_view_construct): prune cruft.
+ (shell_view_interface_unset_message_cb),
+ (shell_view_interface_set_message_cb): impl.
+
+2000-09-14 Michael Meeks <michael@helixcode.com>
+
* e-shell-view-menu.c (e_shell_view_menu_setup): re-order to suit and
add freeze / thaw, update paths to toggles, remove warnings
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 8ac1aef4ec..85bb603ffb 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -742,62 +742,76 @@ stop_progress_bar (EShellView *shell_view)
/* EvolutionShellView interface callbacks. */
+/*
+ * MOVEME: into Bonobo.
+ */
+static void
+bonobo_ui_container_set_status (Bonobo_UIContainer container,
+ const char *text,
+ CORBA_Environment *opt_ev)
+{
+ char *str;
+
+ g_return_if_fail (text != NULL);
+ g_return_if_fail (container != CORBA_OBJECT_NIL);
+
+ str = g_strdup_printf ("<item name=\"main\">%s</item>", text);
+
+ bonobo_ui_component_set (NULL, container, "/status", str, opt_ev);
+}
+
static void
shell_view_interface_set_message_cb (EvolutionShellView *shell_view,
const char *message,
gboolean busy,
void *data)
{
-#if 0
- GnomeApp *app;
- GnomeAppBar *app_bar;
+ char *status;
+ EShellView *view;
-#warning FIXME: I broke it
- app = GNOME_APP (data);
- app_bar = GNOME_APPBAR (app->statusbar);
+ view = E_SHELL_VIEW (data);
- gtk_progress_set_value (GTK_PROGRESS (app_bar->progress), 1.0);
+ g_return_if_fail (view != NULL);
- if (message != NULL) {
+ if (message) {
const char *newline;
-
+
newline = strchr (message, '\n');
- if (newline == NULL) {
- gnome_appbar_set_status (app_bar, message);
- } else {
- char *message_until_newline;
-
- message_until_newline = g_strndup (message, newline - message);
- gnome_appbar_set_status (app_bar, message_until_newline);
- g_free (message_until_newline);
- }
- } else {
- gnome_appbar_set_status (app_bar, "");
- }
+
+ if (!newline)
+ status = g_strdup (message);
+ else
+ status = g_strndup (message, newline - message);
+ } else
+ status = g_strdup ("");
+
+ bonobo_ui_container_set_status (
+ bonobo_ui_compat_get_container (view->priv->uih),
+ status, NULL);
+
+ g_free (status);
if (busy)
start_progress_bar (E_SHELL_VIEW (data));
else
stop_progress_bar (E_SHELL_VIEW (data));
-#endif
}
static void
shell_view_interface_unset_message_cb (EvolutionShellView *shell_view,
void *data)
{
-#if 0
- GnomeApp *app;
- GnomeAppBar *app_bar;
+ EShellView *view;
-#warning FIXME: I broke it
- app = GNOME_APP (data);
- app_bar = GNOME_APPBAR (app->statusbar);
+ view = E_SHELL_VIEW (data);
+
+ g_return_if_fail (view != NULL);
- gnome_appbar_set_status (app_bar, "");
+ bonobo_ui_container_set_status (
+ bonobo_ui_compat_get_container (view->priv->uih),
+ "", NULL);
stop_progress_bar (E_SHELL_VIEW (data));
-#endif
}
@@ -806,7 +820,6 @@ e_shell_view_construct (EShellView *shell_view,
EShell *shell)
{
EShellViewPrivate *priv;
- Bonobo_UIContainer container;
EShellView *view;
GtkObject *window;