diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 2000-01-19 15:57:20 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 2000-01-19 15:57:20 +0800 |
commit | 711ce9920ad6ca4f9ffd8a246d70acc574f2ae39 (patch) | |
tree | 7cd058083b3ea1df671ea3aefeff2a5a49532dac /shell/e-shell-view.c | |
parent | d44875ac5f2dfc7753cc33281c5fc8a866edd0b7 (diff) | |
download | gsoc2013-evolution-711ce9920ad6ca4f9ffd8a246d70acc574f2ae39.tar gsoc2013-evolution-711ce9920ad6ca4f9ffd8a246d70acc574f2ae39.tar.gz gsoc2013-evolution-711ce9920ad6ca4f9ffd8a246d70acc574f2ae39.tar.bz2 gsoc2013-evolution-711ce9920ad6ca4f9ffd8a246d70acc574f2ae39.tar.lz gsoc2013-evolution-711ce9920ad6ca4f9ffd8a246d70acc574f2ae39.tar.xz gsoc2013-evolution-711ce9920ad6ca4f9ffd8a246d70acc574f2ae39.tar.zst gsoc2013-evolution-711ce9920ad6ca4f9ffd8a246d70acc574f2ae39.zip |
More work on the code. Added more for the framework.
More work on the code. Added more for the framework.
Miguel.
svn path=/trunk/; revision=1593
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r-- | shell/e-shell-view.c | 58 |
1 files changed, 39 insertions, 19 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 300a996959..bdbc34238b 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -65,8 +65,43 @@ e_shell_view_setup_shortcut_display (EShellView *eshell_view) GTK_SIGNAL_FUNC (shortcut_bar_item_selected), eshell_view); } +static GtkWidget * +get_view (EFolder *efolder) +{ + GtkWidget *w; + char buffer [80]; + + sprintf (buffer, "I am the view for %s\n", + e_folder_get_description (efolder)); + + w = gtk_label_new (buffer); + + gtk_widget_show (w); + + return w; +} + +void +e_shell_view_set_view (EShellView *eshell_view, EFolder *efolder) +{ + GtkWidget *w = get_view (efolder); + + if (eshell_view->contents){ + gtk_widget_destroy (eshell_view->contents); + } + + eshell_view->contents = w; + + if (eshell_view->shortcut_displayed){ + gtk_paned_pack2 (GTK_PANED (eshell_view->shortcut_hpaned), + eshell_view->contents, FALSE, TRUE); + } else { + gnome_app_set_contents (GNOME_APP (eshell_view), eshell_view->contents); + } +} + GtkWidget * -e_shell_view_new (EShell *eshell, gboolean show_shortcut_bar) +e_shell_view_new (EShell *eshell, EFolder *efolder, gboolean show_shortcut_bar) { EShellView *eshell_view; @@ -79,30 +114,15 @@ e_shell_view_new (EShell *eshell, gboolean show_shortcut_bar) e_shell_view_setup_menus (eshell_view); e_shell_register_view (eshell, eshell_view); - - if (show_shortcut_bar){ - e_shell_view_setup_shortcut_display (eshell_view); - } else { - g_error ("Non-shortcut bar code not written yet"); - } - - eshell_view->shortcut_displayed = show_shortcut_bar; + e_shell_view_setup_shortcut_display (eshell_view); + + e_shell_view_set_view (eshell_view, efolder); 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); |