aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnu.org>2000-01-16 04:08:30 +0800
committerArturo Espinosa <unammx@src.gnome.org>2000-01-16 04:08:30 +0800
commit3c49032de459fa26e8512005b859c8eb8768caf8 (patch)
tree31c06aa6698678a67d41532a60b270fb6b492793 /shell/e-shell-view.c
parent19a9abb138faf5f77afdca76670a23a476a7a922 (diff)
downloadgsoc2013-evolution-3c49032de459fa26e8512005b859c8eb8768caf8.tar.gz
gsoc2013-evolution-3c49032de459fa26e8512005b859c8eb8768caf8.tar.zst
gsoc2013-evolution-3c49032de459fa26e8512005b859c8eb8768caf8.zip
Use e_bar_set_item_data.
2000-01-10 Miguel de Icaza <miguel@gnu.org> * widgets/shortcut-bar/e-shortcut-bar.c (e_shortcut_bar_add_item): Use e_bar_set_item_data. Drop item_url; Require image argument; Require user data argument. 2000-01-09 Miguel de Icaza <miguel@gnu.org> * widgets/shortcut-bar/e-icon-bar.c (e_icon_bar_init): Turn on anti-aliasing. svn path=/trunk/; revision=1573
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c69
1 files changed, 68 insertions, 1 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index f57a6add3a..5962e0686f 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -8,6 +8,7 @@
*/
#include <config.h>
#include <gnome.h>
+#include "shortcut-bar/e-shortcut-bar.h"
#include "e-util/e-util.h"
#include "e-shell-view.h"
#include "e-shell-view-menu.h"
@@ -34,21 +35,87 @@ e_shell_view_class_init (GtkObjectClass *object_class)
parent_class = gtk_type_class (PARENT_TYPE);
}
+static void
+e_shell_view_setup (EShellView *eshell_view)
+{
+ /*
+ * FIXME, should load the config if (load_config)....
+ */
+ gtk_window_set_default_size (GTK_WINDOW (eshell_view), 600, 400);
+}
+
+static void
+e_shell_view_load_shortcut_bar (EShellView *eshell_view)
+{
+ gtk_paned_set_position (GTK_PANED (eshell_view->shortcut_hpaned), 100);
+}
+
+static void
+e_shell_view_setup_shortcut_display (EShellView *eshell_view)
+{
+ gtk_widget_push_visual (gdk_rgb_get_visual ());
+ gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+
+ eshell_view->shortcut_hpaned = gtk_hpaned_new ();
+ gtk_widget_show (eshell_view->shortcut_hpaned);
+
+ eshell_view->shortcut_bar = e_shortcut_bar_new ();
+ e_shell_view_load_shortcut_bar (eshell_view);
+
+ gtk_paned_pack1 (GTK_PANED (eshell_view->shortcut_hpaned),
+ eshell_view->shortcut_bar, FALSE, TRUE);
+ gtk_widget_show (eshell_view->shortcut_bar);
+
+ gtk_widget_pop_visual ();
+ gtk_widget_pop_colormap ();
+
+ gnome_app_set_contents (GNOME_APP (eshell_view), eshell_view->shortcut_hpaned);
+}
+
GtkWidget *
-e_shell_view_new (EShell *eshell)
+e_shell_view_new (EShell *eshell, gboolean show_shortcut_bar)
{
EShellView *eshell_view;
eshell_view = gtk_type_new (e_shell_view_get_type ());
gnome_app_construct (GNOME_APP (eshell_view), "Evolution", "Evolution");
+
+ e_shell_view_setup (eshell_view);
e_shell_view_setup_menus (eshell_view);
+ if (show_shortcut_bar)
+ e_shell_view_setup_shortcut_display (eshell_view);
+ else {
+ g_error ("Non-shortcut bar code not written yet");
+ }
+
e_shell_register_view (eshell, eshell_view);
+
+ eshell_view->shortcut_displayed = show_shortcut_bar;
return (GtkWidget *) eshell_view;
}
+void
+e_shell_view_set_view (EShellView *eshell_view, EFolder *efolder)
+{
+ if (efolder == NULL){
+ printf ("Display executive summary");
+ } else {
+
+ }
+}
+
+void
+e_shell_view_display_shortcut_bar (EShellView *eshell_view, gboolean display)
+{
+ g_return_if_fail (eshell_view != NULL);
+ g_return_if_fail (E_IS_SHELL_VIEW (eshell_view));
+
+ g_error ("Switching code for the shortcut bar is not written yet");
+}
+
E_MAKE_TYPE (e_shell_view, "EShellView", EShellView, e_shell_view_class_init, NULL, PARENT_TYPE);
void