[evolution] Disable classic/vertical options when preview is hidden.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Disable classic/vertical options when preview is hidden.
- Date: Wed, 2 Sep 2009 00:27:15 +0000 (UTC)
commit 6b2a55be48922c9fe5c94d654a4d463f23a428f2
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Sep 1 20:26:33 2009 -0400
Disable classic/vertical options when preview is hidden.
modules/addressbook/e-book-shell-view-actions.c | 8 ++++++++
modules/addressbook/e-book-shell-view-private.h | 1 +
modules/calendar/e-memo-shell-view-actions.c | 8 ++++++++
modules/calendar/e-memo-shell-view-private.h | 1 +
modules/calendar/e-task-shell-view-actions.c | 8 ++++++++
modules/mail/e-mail-shell-view-actions.c | 8 ++++++++
6 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c
index c2195e5..5daf7e5 100644
--- a/modules/addressbook/e-book-shell-view-actions.c
+++ b/modules/addressbook/e-book-shell-view-actions.c
@@ -1007,6 +1007,14 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
g_signal_connect (
ACTION (SEARCH_EXECUTE), "activate",
G_CALLBACK (action_search_execute_cb), book_shell_view);
+
+ e_binding_new (
+ G_OBJECT (ACTION (CONTACT_PREVIEW)), "active",
+ G_OBJECT (ACTION (CONTACT_VIEW_CLASSIC)), "sensitive");
+
+ e_binding_new (
+ G_OBJECT (ACTION (CONTACT_PREVIEW)), "active",
+ G_OBJECT (ACTION (CONTACT_VIEW_VERTICAL)), "sensitive");
}
void
diff --git a/modules/addressbook/e-book-shell-view-private.h b/modules/addressbook/e-book-shell-view-private.h
index b496776..31165e4 100644
--- a/modules/addressbook/e-book-shell-view-private.h
+++ b/modules/addressbook/e-book-shell-view-private.h
@@ -32,6 +32,7 @@
#include <libedataserver/e-sexp.h>
#include <libedataserverui/e-source-selector.h>
+#include "e-util/e-binding.h"
#include "e-util/gconf-bridge.h"
#include "shell/e-shell-content.h"
#include "shell/e-shell-sidebar.h"
diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c
index 0161eeb..8604d8e 100644
--- a/modules/calendar/e-memo-shell-view-actions.c
+++ b/modules/calendar/e-memo-shell-view-actions.c
@@ -933,6 +933,14 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
g_signal_connect (
ACTION (SEARCH_EXECUTE), "activate",
G_CALLBACK (action_search_execute_cb), memo_shell_view);
+
+ e_binding_new (
+ G_OBJECT (ACTION (MEMO_PREVIEW)), "active",
+ G_OBJECT (ACTION (MEMO_VIEW_CLASSIC)), "sensitive");
+
+ e_binding_new (
+ G_OBJECT (ACTION (MEMO_PREVIEW)), "active",
+ G_OBJECT (ACTION (MEMO_VIEW_VERTICAL)), "sensitive");
}
void
diff --git a/modules/calendar/e-memo-shell-view-private.h b/modules/calendar/e-memo-shell-view-private.h
index c7ece91..857e924 100644
--- a/modules/calendar/e-memo-shell-view-private.h
+++ b/modules/calendar/e-memo-shell-view-private.h
@@ -29,6 +29,7 @@
#include <libedataserver/e-categories.h>
#include <libedataserver/e-sexp.h>
+#include "e-util/e-binding.h"
#include "e-util/e-dialog-utils.h"
#include "e-util/e-error.h"
#include "e-util/e-util.h"
diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c
index d4fb94c..b08f965 100644
--- a/modules/calendar/e-task-shell-view-actions.c
+++ b/modules/calendar/e-task-shell-view-actions.c
@@ -1133,6 +1133,14 @@ e_task_shell_view_actions_init (ETaskShellView *task_shell_view)
g_signal_connect (
ACTION (SEARCH_EXECUTE), "activate",
G_CALLBACK (action_search_execute_cb), task_shell_view);
+
+ e_binding_new (
+ G_OBJECT (ACTION (TASK_PREVIEW)), "active",
+ G_OBJECT (ACTION (TASK_VIEW_CLASSIC)), "sensitive");
+
+ e_binding_new (
+ G_OBJECT (ACTION (TASK_PREVIEW)), "active",
+ G_OBJECT (ACTION (TASK_VIEW_VERTICAL)), "sensitive");
}
void
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c
index 5e6a9ba..11cedfb 100644
--- a/modules/mail/e-mail-shell-view-actions.c
+++ b/modules/mail/e-mail-shell-view-actions.c
@@ -1583,6 +1583,14 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view)
G_OBJECT (ACTION (MAIL_PREVIEW)), "active",
G_OBJECT (shell_content), "preview-visible");
+ e_binding_new (
+ G_OBJECT (ACTION (MAIL_PREVIEW)), "active",
+ G_OBJECT (ACTION (MAIL_VIEW_CLASSIC)), "sensitive");
+
+ e_binding_new (
+ G_OBJECT (ACTION (MAIL_PREVIEW)), "active",
+ G_OBJECT (ACTION (MAIL_VIEW_VERTICAL)), "sensitive");
+
/* XXX The boolean sense of the GConf key is the inverse of
* the menu item, so we have to maintain two properties. */
e_mutual_binding_new_with_negation (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]