#include "eggfindbar.h"
#include "egg-recent-view-uimanager.h"
#include "egg-recent-view.h"
-#include "egg-recent-model.h"
#include "egg-toolbar-editor.h"
-#include "egg-toolbars-model.h"
#include "egg-editable-toolbar.h"
+#include "egg-recent-model.h"
+#include "egg-toolbars-model.h"
#include "ephy-zoom.h"
#include "ephy-zoom-action.h"
#include "ev-application.h"
#include "ev-stock-icons.h"
-#include "ev-file-helpers.h"
#include "ev-metadata-manager.h"
+#include "ev-file-helpers.h"
+#include "ev-utils.h"
#include <poppler.h>
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
- gchar *toolbar_file;
- EggToolbarsModel *toolbar_model;
-
/* Fullscreen mode */
GtkWidget *fullscreen_toolbar;
GtkWidget *fullscreen_popup;
- GSource *fullscreen_timeout_source;
+ GSource *fullscreen_timeout_source;
/* Document */
char *uri;
EvJob *xfer_job;
EvJob *load_job;
- /* recent file stuff */
- EggRecentModel *recent_model;
EggRecentViewUIManager *recent_view;
};
#define GCONF_CHROME_TOOLBAR "/apps/evince/show_toolbar"
#define GCONF_CHROME_SIDEBAR "/apps/evince/show_sidebar"
#define GCONF_CHROME_STATUSBAR "/apps/evince/show_statusbar"
-
+#define GCONF_LOCKDOWN_SAVE "/desktop/gnome/lockdown/disable_save_to_disk"
+#define GCONF_LOCKDOWN_PRINT "/desktop/gnome/lockdown/disable_printing"
#define GCONF_SIDEBAR_SIZE "/apps/evince/sidebar_size"
#define SIDEBAR_DEFAULT_SIZE 132
+#define PRINT_CONFIG_FILENAME "ev-print-config.xml"
+
static void ev_window_update_fullscreen_popup (EvWindow *window);
static void ev_window_sidebar_visibility_changed_cb (EvSidebar *ev_sidebar,
GParamSpec *pspec,
gboolean ok_to_print = TRUE;
gboolean ok_to_copy = TRUE;
gboolean has_properties = TRUE;
+ GConfClient *client;
view = EV_VIEW (ev_window->priv->view);
if (!info || info->fields_mask == 0) {
has_properties = FALSE;
}
+
+ client = gconf_client_get_default ();
+
+ if (gconf_client_get_bool (client, GCONF_LOCKDOWN_SAVE, NULL)) {
+ ok_to_copy = FALSE;
+ }
+
+ if (gconf_client_get_bool (client, GCONF_LOCKDOWN_PRINT, NULL)) {
+ ok_to_print = FALSE;
+ }
/* File menu */
/* "FileOpen": always sensitive */
has_pages && EV_IS_DOCUMENT_FIND (document));
set_action_sensitive (ev_window, "EditFindNext",
ev_view_can_find_next (view));
- set_action_sensitive (ev_window, "EditRotateLeft", has_document);
- set_action_sensitive (ev_window, "EditRotateRight", has_document);
+ set_action_sensitive (ev_window, "EditRotateLeft", has_pages);
+ set_action_sensitive (ev_window, "EditRotateRight", has_pages);
/* View menu */
set_action_sensitive (ev_window, "ViewContinuous", has_pages);
set_widget_visibility (priv->sidebar, sidebar);
set_widget_visibility (priv->find_bar, findbar);
set_widget_visibility (priv->statusbar, statusbar);
- set_widget_visibility (priv->fullscreen_toolbar, fullscreen_toolbar);
if (priv->fullscreen_popup != NULL) {
if (fullscreen)
show_fullscreen_popup (window);
else
set_widget_visibility (priv->fullscreen_popup, FALSE);
+
+ set_widget_visibility (priv->fullscreen_toolbar, fullscreen_toolbar);
}
}
}
if (doc_title == NULL && ev_window->priv->uri) {
- char *basename;
+ char *display_name;
- basename = g_path_get_basename (ev_window->priv->uri);
- doc_title = gnome_vfs_unescape_string_for_display (basename);
- g_free (basename);
+ display_name = gnome_vfs_format_uri_for_display (ev_window->priv->uri);
+ doc_title = g_path_get_basename (display_name);
+ g_free (display_name);
}
if (password_needed) {
update_window_title (ev_window->priv->password_document, NULL, ev_window);
if (ev_window->priv->password_dialog == NULL) {
- gchar *basename, *file_name;
+ gchar *base_name, *file_name;
- basename = g_path_get_basename (ev_window->priv->password_uri);
- file_name = gnome_vfs_unescape_string_for_display (basename);
+ file_name = gnome_vfs_format_uri_for_display (ev_window->priv->password_uri);
+ base_name = g_path_get_basename (file_name);
ev_window->priv->password_dialog =
- ev_password_dialog_new (GTK_WIDGET (ev_window), file_name);
+ ev_password_dialog_new (GTK_WIDGET (ev_window), base_name);
+ g_free (base_name);
+ g_free (file_name);
+
g_object_add_weak_pointer (G_OBJECT (ev_window->priv->password_dialog),
(gpointer *) &(ev_window->priv->password_dialog));
g_signal_connect (ev_window->priv->password_dialog,
"response",
G_CALLBACK (password_dialog_response),
ev_window);
- g_free (basename);
- g_free (file_name);
gtk_widget_show (ev_window->priv->password_dialog);
} else {
ev_password_dialog_set_bad_pass (ev_window->priv->password_dialog);
ev_window->priv->password_document = g_object_ref (document);
ev_window->priv->password_uri = g_strdup (job->uri);
- base_name = g_path_get_basename (job->uri);
- file_name = gnome_vfs_unescape_string_for_display (base_name);
-
+ file_name = gnome_vfs_format_uri_for_display (job->uri);
+ base_name = g_path_get_basename (file_name);
ev_password_view_set_file_name (EV_PASSWORD_VIEW (ev_window->priv->password_view),
- file_name);
+ base_name);
g_free (file_name);
g_free (base_name);
ev_window_set_page_mode (ev_window, PAGE_MODE_PASSWORD);
GValue dual_page = { 0, };
GValue presentation = { 0, };
GValue fullscreen = { 0, };
+ GValue rotation = { 0, };
/* Window size */
if (!GTK_WIDGET_VISIBLE (window)) {
ev_window_run_fullscreen (window);
}
}
+
+ /* Rotation */
+ if (ev_metadata_manager_get (uri, "rotation", &rotation)) {
+ if (g_value_get_int (&rotation)) {
+ switch (g_value_get_int (&rotation)) {
+ case 90:
+ ev_view_set_rotation (view, 90);
+ break;
+ case 180:
+ ev_view_set_rotation (view, 180);
+ break;
+ case 270:
+ ev_view_set_rotation (view, 270);
+ break;
+ default:
+ break;
+ }
+ }
+ }
}
void
GtkWidget *chooser;
static char *folder = NULL;
- chooser = gtk_file_chooser_dialog_new (_("Open document"),
+ chooser = gtk_file_chooser_dialog_new (_("Open Document"),
GTK_WINDOW (window),
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL,
folder = gtk_file_chooser_get_current_folder_uri (GTK_FILE_CHOOSER (chooser));
- ev_application_open_uri_list (EV_APP, uris);
+ ev_application_open_uri_list (EV_APP, uris, GDK_CURRENT_TIME);
g_slist_foreach (uris, (GFunc)g_free, NULL);
g_slist_free (uris);
uri = egg_recent_item_get_uri (item);
- ev_application_open_uri (EV_APP, uri, NULL, NULL);
+ ev_application_open_uri (EV_APP, uri, NULL, GDK_CURRENT_TIME, NULL);
g_free (uri);
}
item = egg_recent_item_new_from_uri (filename);
egg_recent_item_add_group (item, "Evince");
- egg_recent_model_add_full (window->priv->recent_model, item);
+ egg_recent_model_add_full (ev_application_get_recent_model (EV_APP), item);
}
static void
ev_window_setup_recent (EvWindow *ev_window)
{
-
-
- /* it would be better if we just filtered by mime-type, but there
- * doesn't seem to be an easy way to figure out which mime-types we
- * can handle */
- ev_window->priv->recent_model = egg_recent_model_new (EGG_RECENT_MODEL_SORT_MRU);
-
ev_window->priv->recent_view = egg_recent_view_uimanager_new (ev_window->priv->ui_manager,
"/MainMenu/FileMenu/RecentFilesMenu",
G_CALLBACK (ev_window_cmd_recent_file_activate),
ev_window);
egg_recent_view_uimanager_show_icons (EGG_RECENT_VIEW_UIMANAGER (ev_window->priv->recent_view), FALSE);
- egg_recent_model_set_limit (ev_window->priv->recent_model, 5);
egg_recent_view_set_model (EGG_RECENT_VIEW (ev_window->priv->recent_view),
- ev_window->priv->recent_model);
-
- egg_recent_model_set_filter_groups (ev_window->priv->recent_model,
- "Evince", NULL);
+ ev_application_get_recent_model (EV_APP));
egg_recent_view_uimanager_set_trailing_sep (ev_window->priv->recent_view, TRUE);
GtkWidget *fc;
gchar *uri;
- gchar *basename;
+ gchar *base_name;
+ gchar *file_name;
static char* folder = NULL;
gboolean success;
folder);
}
- basename = g_path_get_basename (ev_window->priv->uri);
- gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (fc), basename);
- g_free (basename);
+ file_name = gnome_vfs_format_uri_for_display (ev_window->priv->uri);
+ base_name = g_path_get_basename (file_name);
+ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (fc), base_name);
+ g_free (file_name);
+ g_free (base_name);
gtk_widget_show (fc);
gtk_widget_destroy (fc);
}
+static gboolean
+using_pdf_printer (GnomePrintConfig *config)
+{
+ const guchar *driver;
+
+ driver = gnome_print_config_get (
+ config, (const guchar *)"Settings.Engine.Backend.Driver");
+
+ if (driver) {
+ if (!strcmp ((const gchar *)driver, "gnome-print-pdf"))
+ return TRUE;
+ else
+ return FALSE;
+ }
+
+ return FALSE;
+}
+
static gboolean
using_postscript_printer (GnomePrintConfig *config)
{
return TRUE;
else
return FALSE;
- } else if (transport) {
+ } else if (transport) { /* these transports default to PostScript */
if (!strcmp ((const gchar *)transport, "CUPS"))
return TRUE;
else if (!strcmp ((const gchar *)transport, "LPD"))
return FALSE;
}
+static GnomePrintConfig *
+load_print_config_from_file (void)
+{
+ GnomePrintConfig *print_config = NULL;
+ char *file_name, *contents = NULL;
+
+ file_name = g_build_filename (ev_dot_dir (), PRINT_CONFIG_FILENAME,
+ NULL);
+
+ if (g_file_get_contents (file_name, &contents, NULL, NULL)) {
+ print_config = gnome_print_config_from_string (contents, 0);
+ g_free (contents);
+ }
+
+ if (print_config == NULL) {
+ print_config = gnome_print_config_default ();
+ }
+
+ g_free (file_name);
+
+ return print_config;
+}
+
+static void
+save_print_config_to_file (GnomePrintConfig *config)
+{
+ char *file_name, *str;
+
+ g_return_if_fail (config != NULL);
+
+ str = gnome_print_config_to_string (config, 0);
+ if (str == NULL) return;
+
+ file_name = g_build_filename (ev_dot_dir (),
+ PRINT_CONFIG_FILENAME,
+ NULL);
+
+#ifdef HAVE_G_FILE_SET_CONTENTS
+ g_file_set_contents (file_name, str, -1, NULL);
+#else
+ ev_file_set_contents (file_name, str, -1, NULL);
+#endif
+
+ g_free (file_name);
+ g_free (str);
+}
+
static void
ev_window_print (EvWindow *window)
{
last_page = ev_page_cache_get_n_pages (page_cache);
}
- config = gnome_print_config_default ();
+ config = load_print_config_from_file ();
job = gnome_print_job_new (config);
print_dialog = gnome_print_dialog_new (job, (guchar *) _("Print"),
/* FIXME: Change this when we have the first backend
* that can print more than postscript
*/
- if (!using_postscript_printer (config)) {
+ if (using_pdf_printer (config)) {
+ GtkWidget *dialog;
+
+ dialog = gtk_message_dialog_new (
+ GTK_WINDOW (print_dialog), GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
+ _("Generating PDF is not supported"));
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+
+ continue;
+ } else if (!using_postscript_printer (config)) {
GtkWidget *dialog;
dialog = gtk_message_dialog_new (
continue;
}
+ save_print_config_to_file (config);
+
print_job = g_object_new (EV_TYPE_PRINT_JOB,
"gnome_print_job", job,
"document", ev_window->priv->document,
break;
}
+ g_object_unref (job);
+
gtk_widget_destroy (print_dialog);
if (print_job != NULL) {
ev_print_job_print (print_job, GTK_WINDOW (ev_window));
g_object_unref (print_job);
}
+
+ g_object_unref (config);
}
static void
g_return_if_fail (popup != NULL);
+ if (GTK_WIDGET (window)->window == NULL)
+ return;
+
toolbar = (window->priv->chrome & EV_CHROME_TOOLBAR) != 0 ||
(window->priv->chrome & EV_CHROME_RAISE_TOOLBAR) != 0;
popup_width = popup->requisition.width;
GtkWidget *hbox;
GtkWidget *button;
+ window->priv->fullscreen_toolbar = egg_editable_toolbar_new_with_model
+ (window->priv->ui_manager, ev_application_get_toolbars_model (EV_APP));
+
popup = gtk_window_new (GTK_WINDOW_POPUP);
hbox = gtk_hbox_new (FALSE, 0);
button = ev_window_get_exit_fullscreen_button (window);
EvWindow *ev_window = EV_WINDOW (data);
egg_editable_toolbar_set_edit_mode
(EGG_EDITABLE_TOOLBAR (ev_window->priv->toolbar), FALSE);
- egg_toolbars_model_save (ev_window->priv->toolbar_model,
- ev_window->priv->toolbar_file, "1.0");
+ ev_application_save_toolbars_model (EV_APP);
gtk_widget_destroy (GTK_WIDGET (dialog));
}
ev_window_cmd_edit_rotate_left (GtkAction *action, EvWindow *ev_window)
{
ev_view_rotate_left (EV_VIEW (ev_window->priv->view));
- ev_sidebar_thumbnails_refresh (EV_SIDEBAR_THUMBNAILS (ev_window->priv->sidebar_thumbs));
}
static void
ev_window_cmd_edit_rotate_right (GtkAction *action, EvWindow *ev_window)
{
ev_view_rotate_right (EV_VIEW (ev_window->priv->view));
- ev_sidebar_thumbnails_refresh (EV_SIDEBAR_THUMBNAILS (ev_window->priv->sidebar_thumbs));
}
static void
{
GtkWidget *dialog;
GtkWidget *editor;
-
+
dialog = gtk_dialog_new_with_buttons (_("Toolbar editor"),
GTK_WINDOW (ev_window),
GTK_DIALOG_DESTROY_WITH_PARENT,
gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 400);
editor = egg_toolbar_editor_new (ev_window->priv->ui_manager,
- ev_window->priv->toolbar_model);
+ ev_application_get_toolbars_model (EV_APP));
gtk_container_set_border_width (GTK_CONTAINER (editor), 5);
gtk_box_set_spacing (GTK_BOX (EGG_TOOLBAR_EDITOR (editor)), 5);
widget = gtk_window_get_focus (GTK_WINDOW (window));
if (widget && gtk_widget_get_ancestor (widget, EGG_TYPE_FIND_BAR)) {
update_chrome_flag (window, EV_CHROME_FINDBAR, NULL, FALSE);
+ gtk_widget_grab_focus (window->priv->view);
} else {
gboolean fullscreen;
gboolean presentation;
ev_view_get_continuous (EV_VIEW (ev_window->priv->view)));
}
+static void
+ev_window_rotation_changed_cb (EvView *view, GParamSpec *pspec, EvWindow *window)
+{
+ int rotation;
+
+ rotation = ev_view_get_rotation (EV_VIEW (window->priv->view));
+
+ if (window->priv->uri) {
+ ev_metadata_manager_set_int (window->priv->uri, "rotation",
+ rotation);
+ }
+
+ ev_sidebar_thumbnails_refresh (EV_SIDEBAR_THUMBNAILS (window->priv->sidebar_thumbs),
+ rotation);
+}
+
static void
ev_window_dual_mode_changed_cb (EvView *view, GParamSpec *pspec, EvWindow *ev_window)
{
static void
ev_window_finalize (GObject *object)
{
- GList *windows = gtk_window_list_toplevels ();
+ gboolean empty = TRUE;
+ GList *list, *windows;
- if (windows == NULL) {
- ev_application_shutdown (EV_APP);
- } else {
- g_list_free (windows);
- }
+ windows = gtk_window_list_toplevels ();
+
+ for (list = windows; list; list = list->next) {
+ if (EV_IS_WINDOW (list->data)) {
+ empty = FALSE;
+ break;
+ }
+ }
+
+ if (empty)
+ ev_application_shutdown (EV_APP);
+
+ g_list_free (windows);
G_OBJECT_CLASS (ev_window_parent_class)->finalize (object);
}
EvWindow *window = EV_WINDOW (object);
EvWindowPrivate *priv = window->priv;
- if (priv->toolbar_model) {
- g_object_unref (priv->toolbar_model);
- g_free (priv->toolbar_file);
- priv->toolbar_model = NULL;
- priv->toolbar_file = NULL;
- }
-
- if (priv->recent_model) {
- g_object_unref (priv->recent_model);
- priv->recent_model = NULL;
- }
-
if (priv->recent_view) {
g_object_unref (priv->recent_view);
priv->recent_view = NULL;
priv->find_bar = NULL;
}
+ if (priv->uri) {
+ g_free (priv->uri);
+ priv->uri = NULL;
+ }
+
if (window->priv->fullscreen_timeout_source) {
g_source_destroy (window->priv->fullscreen_timeout_source);
window->priv->fullscreen_timeout_source = NULL;
{ "Help", NULL, N_("_Help") },
/* File menu */
- { "FileOpen", GTK_STOCK_OPEN, NULL, "<control>O",
+ { "FileOpen", GTK_STOCK_OPEN, N_("_Open..."), "<control>O",
N_("Open an existing document"),
G_CALLBACK (ev_window_cmd_file_open) },
{ "FileSaveAs", GTK_STOCK_SAVE_AS, N_("_Save a Copy..."), NULL,
N_("Save the current document with a new filename"),
G_CALLBACK (ev_window_cmd_save_as) },
- { "FilePrint", GTK_STOCK_PRINT, N_("Print..."), "<control>P",
+ { "FilePrint", GTK_STOCK_PRINT, N_("_Print..."), "<control>P",
N_("Print this document"),
G_CALLBACK (ev_window_cmd_file_print) },
- { "FileProperties", GTK_STOCK_PROPERTIES, N_("Properties"), "<alt>Return",
+ { "FileProperties", GTK_STOCK_PROPERTIES, N_("P_roperties"), "<alt>Return",
N_("View the properties of this document"),
G_CALLBACK (ev_window_cmd_file_properties) },
{ "FileCloseWindow", GTK_STOCK_CLOSE, NULL, "<control>W",
{ "GoForwardFast", NULL, "", "<shift>Page_Down",
N_("Go ten pages forward"),
G_CALLBACK (ev_window_cmd_go_forward) },
+ { "KpPlus", GTK_STOCK_ZOOM_IN, NULL, "KP_Add",
+ N_("Enlarge the document"),
+ G_CALLBACK (ev_window_cmd_view_zoom_in) },
+ { "KpMinus", GTK_STOCK_ZOOM_OUT, NULL, "KP_Subtract",
+ N_("Shrink the document"),
+ G_CALLBACK (ev_window_cmd_view_zoom_out) },
};
/* Toggle items */
{ "ViewStatusbar", NULL, N_("_Statusbar"), NULL,
N_("Show or hide the statusbar"),
G_CALLBACK (ev_window_view_statusbar_cb), TRUE },
- { "ViewSidebar", NULL, N_("Side _pane"), "F9",
+ { "ViewSidebar", NULL, N_("Side _Pane"), "F9",
N_("Show or hide the side pane"),
G_CALLBACK (ev_window_view_sidebar_cb), TRUE },
{ "ViewContinuous", EV_STOCK_VIEW_CONTINUOUS, N_("_Continuous"), NULL,
{ "ViewFullscreen", NULL, N_("_Fullscreen"), "F11",
N_("Expand the window to fill the screen"),
G_CALLBACK (ev_window_cmd_view_fullscreen) },
- { "ViewPresentation", NULL, N_("_Presentation"), "F12",
+ { "ViewPresentation", NULL, N_("_Presentation"), "F5",
N_("Run document as a presentation"),
G_CALLBACK (ev_window_cmd_view_presentation) },
{ "ViewBestFit", EV_STOCK_ZOOM_PAGE, N_("_Best Fit"), NULL,
gnome_vfs_uri_list_free (uri_list);
- ev_application_open_uri_list (EV_APP, uris);
+ ev_application_open_uri_list (EV_APP, uris, 0);
g_slist_free (uris);
static void
-set_view_actions_sensitivity (EvWindow *window, gboolean sensitive)
+ev_window_set_view_accels_sensitivity (EvWindow *window, gboolean sensitive)
{
if (window->priv->action_group) {
set_action_sensitive (window, "PageDown", sensitive);
set_action_sensitive (window, "Slash", sensitive);
set_action_sensitive (window, "Plus", sensitive);
set_action_sensitive (window, "Minus", sensitive);
+ set_action_sensitive (window, "KpPlus", sensitive);
+ set_action_sensitive (window, "KpMinus", sensitive);
}
}
-static void
+static gboolean
view_actions_focus_in_cb (GtkWidget *widget, GdkEventFocus *event, EvWindow *window)
{
update_chrome_flag (window, EV_CHROME_RAISE_TOOLBAR, NULL, FALSE);
set_action_sensitive (window, "ViewToolbar", TRUE);
- set_view_actions_sensitivity (window, TRUE);
+ ev_window_set_view_accels_sensitivity (window, TRUE);
+
+ return FALSE;
}
-static void
+static gboolean
view_actions_focus_out_cb (GtkWidget *widget, GdkEventFocus *event, EvWindow *window)
{
- set_view_actions_sensitivity (window, FALSE);
+ ev_window_set_view_accels_sensitivity (window, FALSE);
+
+ return FALSE;
}
static void
gtk_ui_manager_get_accel_group (ev_window->priv->ui_manager);
gtk_window_add_accel_group (GTK_WINDOW (ev_window), accel_group);
- set_view_actions_sensitivity (ev_window, FALSE);
+ ev_window_set_view_accels_sensitivity (ev_window, FALSE);
g_signal_connect (ev_window->priv->ui_manager, "connect_proxy",
G_CALLBACK (connect_proxy_cb), ev_window);
ev_window->priv->menubar,
FALSE, FALSE, 0);
- /* Toolbar editor */
- ev_window->priv->toolbar_model = egg_toolbars_model_new ();
-
- ev_window->priv->toolbar_file = g_build_filename
- (ev_dot_dir (), "evince_toolbar.xml", NULL);
-
- if (!g_file_test (ev_window->priv->toolbar_file, G_FILE_TEST_EXISTS)) {
- egg_toolbars_model_load (ev_window->priv->toolbar_model,
- DATADIR"/evince-toolbar.xml");
- } else {
- egg_toolbars_model_load (ev_window->priv->toolbar_model,
- ev_window->priv->toolbar_file);
- }
-
- egg_toolbars_model_set_flags (ev_window->priv->toolbar_model, 0,
- EGG_TB_MODEL_NOT_REMOVABLE);
-
/* This sucks, but there is no way to have a draw=no, expand=true separator
* in a GtkUIManager-built toolbar. So, just add another toolbar.
* See gtk+ bug 166489.
gtk_widget_show (toolbar_dock);
ev_window->priv->toolbar = egg_editable_toolbar_new_with_model
- (ev_window->priv->ui_manager, ev_window->priv->toolbar_model);
+ (ev_window->priv->ui_manager, ev_application_get_toolbars_model (EV_APP));
egg_editable_toolbar_show (EGG_EDITABLE_TOOLBAR (ev_window->priv->toolbar),
"DefaultToolBar");
gtk_box_pack_start (GTK_BOX (toolbar_dock), ev_window->priv->toolbar,
TRUE, TRUE, 0);
gtk_widget_show (ev_window->priv->toolbar);
- ev_window->priv->fullscreen_toolbar =
- gtk_ui_manager_get_widget (ev_window->priv->ui_manager, "/LeaveFullscreenToolbar");
- gtk_toolbar_set_show_arrow (GTK_TOOLBAR (ev_window->priv->fullscreen_toolbar), TRUE);
-
-
/* Add the main area */
ev_window->priv->hpaned = gtk_hpaned_new ();
g_signal_connect (ev_window->priv->hpaned,
"notify::continuous",
G_CALLBACK (ev_window_continuous_changed_cb),
ev_window);
+ g_signal_connect (ev_window->priv->view,
+ "notify::rotation",
+ G_CALLBACK (ev_window_rotation_changed_cb),
+ ev_window);
ev_window->priv->statusbar = ev_statusbar_new ();
gtk_box_pack_end (GTK_BOX (ev_window->priv->main_box),