[evince/hildon-2-28] Ifdef out the editable toolbars code on hildon
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evince/hildon-2-28] Ifdef out the editable toolbars code on hildon
- Date: Mon, 26 Oct 2009 12:12:55 +0000 (UTC)
commit c5043accd4689b4d46521e52d0d288d6177d634b
Author: Christian Persch <chpe gnome org>
Date: Sat Jun 6 21:13:51 2009 +0200
Ifdef out the editable toolbars code on hildon
cut-n-paste/toolbar-editor/Makefile.am | 4 ++++
data/Makefile.am | 5 +++--
shell/ev-application.c | 17 ++++++++++++-----
shell/ev-application.h | 5 +++++
shell/ev-window.c | 18 +++++++++++++-----
5 files changed, 37 insertions(+), 12 deletions(-)
---
diff --git a/cut-n-paste/toolbar-editor/Makefile.am b/cut-n-paste/toolbar-editor/Makefile.am
index a5600f9..96f3a9d 100644
--- a/cut-n-paste/toolbar-editor/Makefile.am
+++ b/cut-n-paste/toolbar-editor/Makefile.am
@@ -14,6 +14,8 @@ noinst_HEADERS = \
noinst_LTLIBRARIES = libtoolbareditor.la
+if !PLATFORM_HILDON
+
libtoolbareditor_la_SOURCES = \
$(BUILT_SOURCES) \
$(EGGSOURCES) \
@@ -29,6 +31,8 @@ libtoolbareditor_la_CFLAGS = \
-DCURSOR_DIR=\"$(pkgdatadir)\" \
$(AM_CFLAGS)
+endif # PLATFORM_HILDON
+
BUILT_SOURCES = \
eggmarshalers.c \
eggmarshalers.h \
diff --git a/data/Makefile.am b/data/Makefile.am
index af92046..3df91e5 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -16,11 +16,12 @@ man_MANS=evince.1
uidir = $(pkgdatadir)
ui_DATA = \
- evince-toolbar.xml \
hand-open.png
if !PLATFORM_HILDON
-ui_DATA += evince-ui.xml
+ui_DATA += \
+ evince-ui.xml \
+ evince-toolbar.xml
else
ui_DATA += evince-hildon-ui.xml
endif
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 7775107..73b38ae 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -68,14 +68,16 @@ struct _EvApplication {
gchar *dot_dir;
gchar *data_dir;
gchar *accel_map_file;
- gchar *toolbars_file;
#ifdef ENABLE_DBUS
gchar *crashed_file;
guint crashed_idle;
#endif
+#ifndef PLATFORM_HILDON
EggToolbarsModel *toolbars_model;
+ gchar *toolbars_file;
+#endif
TotemScrsaver *scr_saver;
@@ -943,12 +945,14 @@ ev_application_shutdown (EvApplication *application)
application->accel_map_file = NULL;
}
+#ifndef PLATFORM_HILDON
if (application->toolbars_model) {
g_object_unref (application->toolbars_model);
g_free (application->toolbars_file);
application->toolbars_model = NULL;
application->toolbars_file = NULL;
}
+#endif /* !PLATFORM_HILDON */
ev_application_save_print_settings (application);
@@ -1103,8 +1107,7 @@ ev_application_init (EvApplication *ev_application)
NULL);
gtk_accel_map_load (ev_application->accel_map_file);
}
-#endif /* !PLATFORM_HILDON */
-
+
ev_application->toolbars_model = egg_toolbars_model_new ();
ev_application->toolbars_file = g_build_filename
@@ -1122,7 +1125,6 @@ ev_application_init (EvApplication *ev_application)
}
g_free (toolbar_path);
-#ifndef PLATFORM_HILDON
/* Open item doesn't exist anymore,
* convert it to OpenRecent for compatibility
*/
@@ -1138,11 +1140,12 @@ ev_application_init (EvApplication *ev_application)
break;
}
}
-#endif /* !PLATFORM_HILDON */
egg_toolbars_model_set_flags (ev_application->toolbars_model, 0,
EGG_TB_MODEL_NOT_REMOVABLE);
+#endif /* !PLATFORM_HILDON */
+
#ifdef ENABLE_DBUS
ev_application->keys = ev_media_player_keys_new ();
#endif /* ENABLE_DBUS */
@@ -1193,6 +1196,8 @@ ev_application_get_media_keys (EvApplication *application)
#endif /* ENABLE_DBUS */
}
+#ifndef PLATFORM_HILDON
+
EggToolbarsModel *
ev_application_get_toolbars_model (EvApplication *application)
{
@@ -1206,6 +1211,8 @@ ev_application_save_toolbars_model (EvApplication *application)
application->toolbars_file, "1.0");
}
+#endif /* !PLATFORM_HILDON */
+
void
ev_application_set_filechooser_uri (EvApplication *application,
GtkFileChooserAction action,
diff --git a/shell/ev-application.h b/shell/ev-application.h
index 821f9c5..7e836a9 100644
--- a/shell/ev-application.h
+++ b/shell/ev-application.h
@@ -30,7 +30,9 @@
#include <glib.h>
#include <gtk/gtk.h>
+#ifndef PLATFORM_HILDON
#include "egg-toolbars-model.h"
+#endif
#include "ev-window.h"
@@ -78,8 +80,11 @@ void ev_application_open_uri_list (EvApplication *application,
GList *ev_application_get_windows (EvApplication *application);
GObject *ev_application_get_media_keys (EvApplication *application);
+#ifndef PLATFORM_HILDON
EggToolbarsModel *ev_application_get_toolbars_model (EvApplication *application);
void ev_application_save_toolbars_model (EvApplication *application);
+#endif
+
void ev_application_set_filechooser_uri (EvApplication *application,
GtkFileChooserAction action,
const gchar *uri);
diff --git a/shell/ev-window.c b/shell/ev-window.c
index cca7ee0..bf1a2ac 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -43,10 +43,6 @@
#include <gconf/gconf-client.h>
#endif
-#include "egg-editable-toolbar.h"
-#include "egg-toolbar-editor.h"
-#include "egg-toolbars-model.h"
-
#include "eggfindbar.h"
#include "ephy-zoom-action.h"
@@ -102,6 +98,12 @@
#include <hildon/hildon-file-chooser-dialog.h>
#endif
+#ifndef PLATFORM_HILDON
+#include "egg-editable-toolbar.h"
+#include "egg-toolbar-editor.h"
+#include "egg-toolbars-model.h"
+#endif
+
typedef enum {
PAGE_MODE_DOCUMENT,
PAGE_MODE_PASSWORD
@@ -559,9 +561,9 @@ update_chrome_visibility (EvWindow *window)
set_widget_visibility (priv->find_bar, findbar);
set_widget_visibility (priv->sidebar, sidebar);
+#ifndef PLATFORM_HILDON
ev_window_set_action_sensitive (window, "EditToolbar", toolbar);
-#ifndef PLATFORM_HILDON
if (priv->fullscreen_toolbar != NULL) {
set_widget_visibility (priv->fullscreen_toolbar, fullscreen_toolbar);
}
@@ -3819,6 +3821,8 @@ ev_window_cmd_edit_rotate_right (GtkAction *action, EvWindow *ev_window)
ev_view_rotate_right (EV_VIEW (ev_window->priv->view));
}
+#ifndef PLATFORM_HILDON
+
static void
ev_window_cmd_edit_toolbar_cb (GtkDialog *dialog, gint response, gpointer data)
{
@@ -3863,6 +3867,8 @@ ev_window_cmd_edit_toolbar (GtkAction *action, EvWindow *ev_window)
gtk_widget_show_all (dialog);
}
+#endif /* !PLATFORM_HILDON */
+
static void
ev_window_cmd_view_zoom_in (GtkAction *action, EvWindow *ev_window)
{
@@ -5023,8 +5029,10 @@ static const GtkActionEntry entries[] = {
G_CALLBACK (ev_window_cmd_edit_find_next) },
{ "EditFindPrevious", NULL, N_("Find Pre_vious"), "<shift><control>G", NULL,
G_CALLBACK (ev_window_cmd_edit_find_previous) },
+#ifndef PLATFORM_HILDON
{ "EditToolbar", NULL, N_("T_oolbar"), NULL, NULL,
G_CALLBACK (ev_window_cmd_edit_toolbar) },
+#endif
{ "EditRotateLeft", EV_STOCK_ROTATE_LEFT, N_("Rotate _Left"), "<control>Left", NULL,
G_CALLBACK (ev_window_cmd_edit_rotate_left) },
{ "EditRotateRight", EV_STOCK_ROTATE_RIGHT, N_("Rotate _Right"), "<control>Right", NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]