aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-04-15 20:32:34 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-04-15 20:32:34 +0800
commit5fca5b574ef9831ff6a789b45f7d37746739e358 (patch)
treea39d445f89ecdb12183ec3f089bb724cc3651404 /calendar
parent5c3c40aec8f72c5e33d77e47959d4ba485c4b97f (diff)
downloadgsoc2013-evolution-5fca5b574ef9831ff6a789b45f7d37746739e358.tar
gsoc2013-evolution-5fca5b574ef9831ff6a789b45f7d37746739e358.tar.gz
gsoc2013-evolution-5fca5b574ef9831ff6a789b45f7d37746739e358.tar.bz2
gsoc2013-evolution-5fca5b574ef9831ff6a789b45f7d37746739e358.tar.lz
gsoc2013-evolution-5fca5b574ef9831ff6a789b45f7d37746739e358.tar.xz
gsoc2013-evolution-5fca5b574ef9831ff6a789b45f7d37746739e358.tar.zst
gsoc2013-evolution-5fca5b574ef9831ff6a789b45f7d37746739e358.zip
Adapt the event editor for MeeGo / small-screen.
Bin the menu bar, disable the print icon, add a close button at top right.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/comp-editor.c22
-rw-r--r--calendar/gui/dialogs/event-editor.c15
2 files changed, 24 insertions, 13 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 5fe874d476..b59e159bd7 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -172,10 +172,14 @@ static const gchar *ui =
" </menu>"
" </menubar>"
" <toolbar name='main-toolbar'>"
-" <toolitem action='save'/>"
-" <toolitem action='print'/>"
-" <toolitem action='close'/>"
+" <toolitem action='save'/>\n"
+"#if !EXPRESS\n"
+" <toolitem action='print'/>\n"
+"#endif\n"
" <separator/>"
+" <placeholder name='content'/>"
+" <separator expand='true'/>"
+" <toolitem action='close'/>"
" </toolbar>"
"</ui>";
@@ -1596,6 +1600,9 @@ comp_editor_init (CompEditor *editor)
gint n_targets;
GError *error = NULL;
+ /* FIXME Shell should be passed in. */
+ shell = e_shell_get_default ();
+
editor->priv = priv = COMP_EDITOR_GET_PRIVATE (editor);
g_object_weak_ref (
@@ -1619,6 +1626,8 @@ comp_editor_init (CompEditor *editor)
priv->is_group_item = FALSE;
priv->ui_manager = e_ui_manager_new ();
+ e_ui_manager_set_express_mode (E_UI_MANAGER (priv->ui_manager),
+ e_shell_get_express_mode (shell));
if (comp_lite)
gtk_window_set_default_size ((GtkWindow *) editor, 800, 450);
@@ -1696,7 +1705,7 @@ comp_editor_init (CompEditor *editor)
action = comp_editor_get_action (editor, "save");
gtk_action_set_sensitive (action, FALSE);
- gtk_ui_manager_add_ui_from_string (priv->ui_manager, ui, -1, &error);
+ e_ui_manager_add_ui_from_string (E_UI_MANAGER (priv->ui_manager), ui, &error);
if (error != NULL) {
g_warning ("%s: %s", G_STRFUNC, error->message);
g_error_free (error);
@@ -1714,7 +1723,7 @@ comp_editor_init (CompEditor *editor)
widget = comp_editor_get_managed_widget (editor, "/main-menu");
gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
- gtk_widget_show (widget);
+ gtk_widget_set_visible (widget, !e_shell_get_meego_mode (shell));
if (!comp_lite) {
widget = comp_editor_get_managed_widget (editor, "/main-toolbar");
@@ -1815,9 +1824,8 @@ comp_editor_init (CompEditor *editor)
comp_editor_bind_gconf (editor);
- /* FIXME Shell should be passed in. */
- shell = e_shell_get_default ();
e_shell_watch_window (shell, GTK_WINDOW (editor));
+ e_shell_adapt_window_size (shell, GTK_WINDOW (editor));
}
static gboolean
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 1a5f6d67fd..8ca6605ee4 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -36,6 +36,7 @@
#include <e-util/e-binding.h>
#include <e-util/e-plugin-ui.h>
#include <e-util/e-util-private.h>
+#include <e-util/e-ui-manager.h>
#include "event-page.h"
#include "recurrence-page.h"
@@ -89,11 +90,13 @@ static const gchar *ui =
" </menu>"
" </menubar>"
" <toolbar name='main-toolbar'>"
-" <toolitem action='alarms'/>"
-" <toolitem action='show-time-busy'/>"
-" <toolitem action='recurrence'/>"
-" <toolitem action='all-day-event'/>"
-" <toolitem action='free-busy'/>"
+" <placeholder name='content'>"
+" <toolitem action='alarms'/>"
+" <toolitem action='show-time-busy'/>"
+" <toolitem action='recurrence'/>"
+" <toolitem action='all-day-event'/>"
+" <toolitem action='free-busy'/>"
+" </placeholder>"
" </toolbar>"
"</ui>";
@@ -491,7 +494,7 @@ event_editor_init (EventEditor *ee)
G_N_ELEMENTS (meeting_entries), ee);
ui_manager = comp_editor_get_ui_manager (editor);
- gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, &error);
+ e_ui_manager_add_ui_from_string (E_UI_MANAGER (ui_manager), ui, &error);
id = "org.gnome.evolution.event-editor";
e_plugin_ui_register_manager (ui_manager, id, ee);