aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-05-25 21:14:51 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-05-25 21:14:51 +0800
commitf49077cfb57ade9013674487a1f371da7c038709 (patch)
tree58ebabbe624409eed22ed13578eab3ed2d4d0206 /calendar/gui/dialogs
parentd3c7420fb977fe5c337f2c917839a6e982a47902 (diff)
parent9fb0290d914e63512f6e3fc719b6b0249d787656 (diff)
downloadgsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.gz
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.bz2
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.lz
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.xz
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.tar.zst
gsoc2013-evolution-f49077cfb57ade9013674487a1f371da7c038709.zip
Merge branch 'gnome-2-30' into express2
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c5
-rw-r--r--calendar/gui/dialogs/comp-editor.c24
-rw-r--r--calendar/gui/dialogs/event-editor.c32
-rw-r--r--calendar/gui/dialogs/event-page.c3
-rw-r--r--calendar/gui/dialogs/memo-page.c3
-rw-r--r--calendar/gui/dialogs/task-page.c3
6 files changed, 57 insertions, 13 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 21675b4a0d..e925838e58 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -600,6 +600,11 @@ calendar_prefs_dialog_construct (CalendarPrefsDialog *prefs,
locale_supports_12_hour_format =
calendar_config_locale_supports_12_hour_format ();
+ /* Force 24 hour format for locales which don't support 12 hour format */
+ if (!locale_supports_12_hour_format
+ && !e_shell_settings_get_boolean (shell_settings, "cal-use-24-hour-format"))
+ e_shell_settings_set_boolean (shell_settings, "cal-use-24-hour-format", TRUE);
+
/* Make sure our custom widget classes are registered with
* GType before we load the GtkBuilder definition file. */
E_TYPE_DATE_EDIT;
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index cbdeecee2d..91d9f1e202 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -36,6 +36,7 @@
#include <glib/gstdio.h>
#include <gdk/gdkkeysyms.h>
#include <e-util/e-util.h>
+#include <e-util/e-binding.h>
#include <e-util/e-dialog-utils.h>
#include <e-util/e-util-private.h>
#include <e-util/gconf-bridge.h>
@@ -1078,7 +1079,7 @@ static GtkActionEntry individual_entries[] = {
G_CALLBACK (action_attach_cb) }
};
-static GtkToggleActionEntry individual_toggle_entries[] = {
+static GtkToggleActionEntry core_toggle_entries[] = {
{ "view-categories",
NULL,
@@ -1592,6 +1593,7 @@ comp_editor_init (CompEditor *editor)
GtkTargetList *target_list;
GtkTargetEntry *targets;
GtkActionGroup *action_group;
+ GtkActionGroup *action_group_2;
GtkAction *action;
GtkWidget *container;
GtkWidget *widget;
@@ -1642,6 +1644,9 @@ comp_editor_init (CompEditor *editor)
gtk_action_group_add_actions (
action_group, core_entries,
G_N_ELEMENTS (core_entries), editor);
+ gtk_action_group_add_toggle_actions (
+ action_group, core_toggle_entries,
+ G_N_ELEMENTS (core_toggle_entries), editor);
gtk_ui_manager_insert_action_group (
priv->ui_manager, action_group, 0);
g_object_unref (action_group);
@@ -1652,9 +1657,6 @@ comp_editor_init (CompEditor *editor)
gtk_action_group_add_actions (
action_group, individual_entries,
G_N_ELEMENTS (individual_entries), editor);
- gtk_action_group_add_toggle_actions (
- action_group, individual_toggle_entries,
- G_N_ELEMENTS (individual_toggle_entries), editor);
gtk_action_group_add_radio_actions (
action_group, classification_radio_entries,
G_N_ELEMENTS (classification_radio_entries),
@@ -1664,6 +1666,13 @@ comp_editor_init (CompEditor *editor)
priv->ui_manager, action_group, 0);
g_object_unref (action_group);
+ action_group = gtk_action_group_new ("editable");
+ gtk_action_group_set_translation_domain (
+ action_group, GETTEXT_PACKAGE);
+ gtk_ui_manager_insert_action_group (
+ priv->ui_manager, action_group, 0);
+ g_object_unref (action_group);
+
action_group = gtk_action_group_new ("coordinated");
gtk_action_group_set_translation_domain (
action_group, GETTEXT_PACKAGE);
@@ -1810,6 +1819,13 @@ comp_editor_init (CompEditor *editor)
gtk_window_set_type_hint (
GTK_WINDOW (editor), GDK_WINDOW_TYPE_HINT_NORMAL);
+ action_group = comp_editor_get_action_group (editor, "individual");
+ action_group_2 = e_attachment_view_get_action_group (view, "editable");
+
+ e_binding_new (
+ action_group, "sensitive",
+ action_group_2, "sensitive");
+
/* Listen for attachment store changes. */
store = e_attachment_view_get_store (view);
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 687f26a5d5..1ae9595c02 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -203,7 +203,7 @@ action_show_time_busy_cb (GtkToggleAction *action,
event_page_set_show_time_busy (editor->priv->event_page, active);
}
-static GtkActionEntry event_entries[] = {
+static GtkActionEntry editable_entries[] = {
{ "alarms",
"appointment-soon",
@@ -211,6 +211,20 @@ static GtkActionEntry event_entries[] = {
NULL,
N_("Click here to set or unset alarms for this event"),
G_CALLBACK (action_alarms_cb) },
+};
+
+static GtkToggleActionEntry editable_toggle_entries[] = {
+
+ { "show-time-busy",
+ GTK_STOCK_DIALOG_ERROR,
+ N_("Show Time as _Busy"),
+ NULL,
+ N_("Toggles whether to show time as busy"),
+ G_CALLBACK (action_show_time_busy_cb),
+ FALSE }
+};
+
+static GtkActionEntry event_entries[] = {
{ "recurrence",
"stock_task-recurring",
@@ -236,14 +250,6 @@ static GtkToggleActionEntry event_toggle_entries[] = {
N_("Toggles whether to have All Day Event"),
G_CALLBACK (action_all_day_event_cb),
FALSE },
-
- { "show-time-busy",
- GTK_STOCK_DIALOG_ERROR,
- N_("Show Time as _Busy"),
- NULL,
- N_("Toggles whether to show time as busy"),
- G_CALLBACK (action_show_time_busy_cb),
- FALSE }
};
static GtkActionEntry meeting_entries[] = {
@@ -525,6 +531,14 @@ event_editor_init (EventEditor *ee)
action_group, event_toggle_entries,
G_N_ELEMENTS (event_toggle_entries), ee);
+ action_group = comp_editor_get_action_group (editor, "editable");
+ gtk_action_group_add_actions (
+ action_group, editable_entries,
+ G_N_ELEMENTS (editable_entries), ee);
+ gtk_action_group_add_toggle_actions (
+ action_group, editable_toggle_entries,
+ G_N_ELEMENTS (editable_toggle_entries), ee);
+
action_group = comp_editor_get_action_group (editor, "coordinated");
gtk_action_group_add_actions (
action_group, meeting_entries,
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 3aa42a48b0..74d6af4c4b 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -809,6 +809,9 @@ sensitize_widgets (EventPage *epage)
gtk_widget_set_sensitive (priv->invite, (!read_only && sens) || delegate);
gtk_widget_set_sensitive (GTK_WIDGET (priv->list_view), !read_only);
+ action_group = comp_editor_get_action_group (editor, "editable");
+ gtk_action_group_set_sensitive (action_group, !read_only);
+
action_group = comp_editor_get_action_group (editor, "individual");
gtk_action_group_set_sensitive (action_group, sensitize);
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 269caba5d6..adb10dc9fa 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -376,6 +376,9 @@ sensitize_widgets (MemoPage *mpage)
}
}
+ action_group = comp_editor_get_action_group (editor, "editable");
+ gtk_action_group_set_sensitive (action_group, !read_only);
+
action_group = comp_editor_get_action_group (editor, "individual");
gtk_action_group_set_sensitive (action_group, sensitize);
}
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 623260cf46..fb6338005f 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -365,6 +365,9 @@ sensitize_widgets (TaskPage *tpage)
gtk_widget_set_sensitive (priv->invite, (!read_only && sens));
gtk_widget_set_sensitive (GTK_WIDGET (priv->list_view), !read_only);
+ action_group = comp_editor_get_action_group (editor, "editable");
+ gtk_action_group_set_sensitive (action_group, !read_only);
+
action_group = comp_editor_get_action_group (editor, "individual");
gtk_action_group_set_sensitive (action_group, sensitize);