[evolution/express2] Add 'add new calendar' to the side pane like annum.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/express2] Add 'add new calendar' to the side pane like annum.
- Date: Tue, 27 Apr 2010 09:24:23 +0000 (UTC)
commit f1d7e36a2f26f1633f9282f8210879ca7f1ea0a0
Author: Srinivasa Ragavan <sragavan gnome org>
Date: Tue Apr 27 14:43:04 2010 +0530
Add 'add new calendar' to the side pane like annum.
modules/calendar/e-cal-shell-sidebar.c | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index a00ade7..546d21b 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -33,6 +33,7 @@
#include "calendar/gui/calendar-config.h"
#include "calendar/gui/e-calendar-selector.h"
#include "calendar/gui/misc.h"
+#include "calendar/gui/dialogs/calendar-setup.h"
#include "e-cal-shell-view.h"
#include "e-cal-shell-backend.h"
@@ -559,6 +560,21 @@ cal_shell_sidebar_finalize (GObject *object)
}
static void
+new_calendar_clicked (GtkButton *button,
+ EShellSidebar *shell_sidebar)
+{
+ EShellView *shell_view;
+ EShellWindow *shell_window;
+ EShellBackend *shell_backend;
+
+ shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
+ shell_backend = e_shell_view_get_shell_backend (shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ calendar_setup_new_calendar (GTK_WINDOW (shell_window));
+}
+
+static void
cal_shell_sidebar_constructed (GObject *object)
{
ECalShellSidebarPrivate *priv;
@@ -605,7 +621,21 @@ cal_shell_sidebar_constructed (GObject *object)
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (
GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
- gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE);
+ if(!e_shell_get_express_mode(e_shell_get_default())) {
+ gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE);
+ } else {
+ GtkWidget *button;
+
+ container = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX(container), widget, TRUE, TRUE, 0);
+
+ button = gtk_button_new_with_label (_("New Calendar..."));
+ gtk_box_pack_start (GTK_BOX(container), button, FALSE, FALSE, 0);
+ g_signal_connect (button, "clicked", G_CALLBACK(new_calendar_clicked), shell_sidebar);
+
+ gtk_paned_pack1 (GTK_PANED (priv->paned), container, TRUE, TRUE);
+ gtk_widget_show_all (container);
+ }
gtk_widget_show (widget);
container = widget;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]