aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog21
-rw-r--r--shell/e-shell-view-menu.c12
-rw-r--r--shell/e-shell-view.c110
3 files changed, 77 insertions, 66 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 8866699c3b..059b0d168c 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,24 @@
+2000-10-03 Michael Meeks <michael@helixcode.com>
+
+ * e-shell-view.c (setup_bonobo_ui_handler): kill.
+
+ * e-shell-view-menu.c (e_shell_view_menu_setup): strip
+ out the XML UI merge; move it to
+
+ * e-shell-view.c (e_shell_view_construct): here, +
+ freeze / thaw pair.
+
+ * e-shell-view.c (setup_progress_bar): impl.
+ (setup_widgets): hook in.
+ (progress_bar_timeout_cb): fix.
+ (start_progress_bar): fix.
+ (stop_progress_bar): fix.
+ (e_shell_view_construct): setup ui handler first.
+
+2000-09-22 Michael Meeks <michael@helixcode.com>
+
+ * e-shell-view-menu.c (e_shell_view_menu_setup): upd.
+
2000-10-02 Chris Toshok <toshok@helixcode.com>
* e-storage-set-view.c (new_folder_cb): set the new node's compare function.
diff --git a/shell/e-shell-view-menu.c b/shell/e-shell-view-menu.c
index 13ec5c4cb8..2779cc94f7 100644
--- a/shell/e-shell-view-menu.c
+++ b/shell/e-shell-view-menu.c
@@ -446,7 +446,6 @@ void
e_shell_view_menu_setup (EShellView *shell_view)
{
BonoboUIHandler *uih;
- Bonobo_UIContainer container;
BonoboUIComponent *component;
g_return_if_fail (shell_view != NULL);
@@ -465,15 +464,6 @@ e_shell_view_menu_setup (EShellView *shell_view)
bonobo_ui_component_add_verb_list_with_data (
component, help_verbs, shell_view);
- container = bonobo_ui_compat_get_container (uih);
- g_return_if_fail (container != CORBA_OBJECT_NIL);
-
- bonobo_ui_container_freeze (container, NULL);
-
- bonobo_ui_util_set_ui (component, container,
- EVOLUTION_DATADIR, "evolution.xml",
- "evolution");
-
menu_do_misc (component, shell_view);
gtk_signal_connect (GTK_OBJECT (shell_view), "shortcut_bar_mode_changed",
@@ -488,6 +478,4 @@ e_shell_view_menu_setup (EShellView *shell_view)
FOLDER_BAR_TOGGLE_PATH);
shortcut_bar_mode_changed_cb (shell_view, e_shell_view_get_shortcut_bar_mode (shell_view),
SHORTCUT_BAR_TOGGLE_PATH);
-
- bonobo_ui_container_thaw (container, NULL);
}
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 1ce2f82990..5ad2cad1f2 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -82,6 +82,7 @@ struct _EShellViewPrivate {
GtkWidget *storage_set_title_bar;
GtkWidget *storage_set_view;
GtkWidget *storage_set_view_box;
+ GtkWidget *progress_bar;
/* The view we have already open. */
GHashTable *uri_to_control;
@@ -423,28 +424,42 @@ setup_storage_set_subwindow (EShellView *shell_view)
}
static void
+setup_progress_bar (EShellViewPrivate *priv)
+{
+ GtkProgressBar *progress_bar;
+ BonoboControl *control;
+
+ progress_bar = (GTK_PROGRESS_BAR (gtk_progress_bar_new ()));
+
+ gtk_progress_bar_set_orientation (
+ progress_bar, GTK_PROGRESS_LEFT_TO_RIGHT);
+ gtk_progress_bar_set_bar_style (
+ progress_bar, GTK_PROGRESS_CONTINUOUS);
+
+ priv->progress_bar = GTK_WIDGET (progress_bar);
+ gtk_widget_set_usize (priv->progress_bar, 200, 10);
+ gtk_widget_show (priv->progress_bar);
+
+ control = bonobo_control_new (priv->progress_bar);
+ g_return_if_fail (control != NULL);
+
+ bonobo_ui_container_object_set (
+ bonobo_ui_compat_get_container (priv->uih),
+ "/status/Progress",
+ bonobo_object_corba_objref (BONOBO_OBJECT (control)),
+ NULL);
+}
+
+static void
setup_widgets (EShellView *shell_view)
{
EShellViewPrivate *priv;
-#if 0
- GtkWidget *progress_bar;
-#endif
priv = shell_view->priv;
-#if 0
- /* The application bar. */
-
- priv->appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
- gnome_app_set_statusbar (GNOME_APP (shell_view), priv->appbar);
-
/* The progress bar. */
- progress_bar = GNOME_APPBAR (GNOME_APP (shell_view)->statusbar)->progress;
-
- gtk_progress_bar_set_orientation (GTK_PROGRESS_BAR (progress_bar), GTK_PROGRESS_LEFT_TO_RIGHT);
- gtk_progress_bar_set_bar_style (GTK_PROGRESS_BAR (progress_bar), GTK_PROGRESS_CONTINUOUS);
-#endif
+ setup_progress_bar (priv);
/* The shortcut bar. */
@@ -514,27 +529,6 @@ setup_widgets (EShellView *shell_view)
}
-/* BonoboUIHandler setup. */
-
-static void
-setup_bonobo_ui_handler (EShellView *shell_view)
-{
- BonoboUIHandler *uih;
- EShellViewPrivate *priv;
-
- priv = shell_view->priv;
-
- uih = bonobo_ui_handler_new ();
-
- bonobo_ui_handler_set_app (uih, BONOBO_WIN (shell_view));
- bonobo_ui_handler_create_menubar (uih);
- bonobo_ui_handler_create_toolbar (uih, "Toolbar");
-/* bonobo_ui_handler_set_statusbar (uih, priv->appbar);*/
-
- priv->uih = uih;
-}
-
-
/* GtkObject methods. */
static void
@@ -680,19 +674,16 @@ init (EShellView *shell_view)
static int
progress_bar_timeout_cb (void *data)
{
-#if 0
EShellView *shell_view;
EShellViewPrivate *priv;
GtkWidget *progress_bar;
-#warning FIXME: I broke it
shell_view = E_SHELL_VIEW (data);
priv = shell_view->priv;
- progress_bar = GNOME_APPBAR (GNOME_APP (shell_view)->statusbar)->progress;
+ progress_bar = priv->progress_bar;
priv->progress_bar_value = ! priv->progress_bar_value;
gtk_progress_set_value (GTK_PROGRESS (progress_bar), priv->progress_bar_value);
-#endif
return TRUE;
}
@@ -700,36 +691,32 @@ progress_bar_timeout_cb (void *data)
static void
start_progress_bar (EShellView *shell_view)
{
-#if 0
EShellViewPrivate *priv;
- GtkWidget *progress_bar;
+ GtkProgress *progress;
-#warning FIXME: I broke it
priv = shell_view->priv;
- progress_bar = GNOME_APPBAR (GNOME_APP (shell_view)->statusbar)->progress;
+
+ progress = GTK_PROGRESS (priv->progress_bar);
if (priv->progress_bar_timeout_id != 0)
return;
- priv->progress_bar_timeout_id = gtk_timeout_add (PROGRESS_BAR_TIMEOUT,
- progress_bar_timeout_cb,
- shell_view);
+ priv->progress_bar_timeout_id = gtk_timeout_add (
+ PROGRESS_BAR_TIMEOUT, progress_bar_timeout_cb,
+ shell_view);
- gtk_progress_set_activity_mode (GTK_PROGRESS (progress_bar), TRUE);
- gtk_progress_set_value (GTK_PROGRESS (progress_bar), priv->progress_bar_value);
-#endif
+ gtk_progress_set_activity_mode (progress, TRUE);
+ gtk_progress_set_value (progress, priv->progress_bar_value);
}
static void
stop_progress_bar (EShellView *shell_view)
{
-#if 0
EShellViewPrivate *priv;
GtkWidget *progress_bar;
-#warning FIXME: I broke it
priv = shell_view->priv;
- progress_bar = GNOME_APPBAR (GNOME_APP (shell_view)->statusbar)->progress;
+ progress_bar = priv->progress_bar;
if (priv->progress_bar_timeout_id != 0) {
gtk_timeout_remove (priv->progress_bar_timeout_id);
@@ -738,7 +725,6 @@ stop_progress_bar (EShellView *shell_view)
gtk_progress_set_activity_mode (GTK_PROGRESS (progress_bar), FALSE);
gtk_progress_set_value (GTK_PROGRESS (progress_bar), 0);
-#endif
}
@@ -806,6 +792,8 @@ e_shell_view_construct (EShellView *shell_view,
EShellViewPrivate *priv;
EShellView *view;
GtkObject *window;
+ Bonobo_UIContainer container;
+ BonoboUIComponent *component;
g_return_val_if_fail (shell != NULL, NULL);
g_return_val_if_fail (shell_view != NULL, NULL);
@@ -831,13 +819,27 @@ e_shell_view_construct (EShellView *shell_view,
priv->shell = shell;
+ priv->uih = bonobo_ui_handler_new ();
+ bonobo_ui_handler_set_app (priv->uih, BONOBO_WIN (shell_view));
+
+ component = bonobo_ui_compat_get_component (priv->uih);
+ container = bonobo_ui_compat_get_container (priv->uih);
+ g_return_val_if_fail (container != CORBA_OBJECT_NIL, NULL);
+
+ bonobo_ui_container_freeze (container, NULL);
+
+ bonobo_ui_util_set_ui (component, container,
+ EVOLUTION_DATADIR, "evolution.xml",
+ "evolution");
+
setup_widgets (shell_view);
- setup_bonobo_ui_handler (shell_view);
e_shell_view_menu_setup (shell_view);
e_shell_view_set_folder_bar_mode (shell_view, E_SHELL_VIEW_SUBWINDOW_HIDDEN);
+ bonobo_ui_container_thaw (container, NULL);
+
return view;
}