Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-05-10 17:18:46 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-05-10 17:18:46 (GMT)
commitba8b43149d216ed8737107ed0525dd367166b8dc (patch)
tree029fd065c71817e7474dccf211060e426d6301c0 /shell
parent5112457d6c321bde178c3577eb37bd0ee62bc209 (diff)
Remove some leftover code from jrb first continous attempt. Use the new
2005-05-10 Marco Pesenti Gritti <mpg@redhat.com> * data/evince-toolbar.xml: * shell/ev-window.c: (update_action_sensitivity), (ev_window_setup_document), (ev_window_set_page_mode), (ev_window_init): Remove some leftover code from jrb first continous attempt. Use the new actions, we still need good icons though...
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-window.c52
1 files changed, 5 insertions, 47 deletions
diff --git a/shell/ev-window.c b/shell/ev-window.c
index fe1c226..2475de0 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -70,9 +70,8 @@
#include <string.h>
typedef enum {
- PAGE_MODE_SINGLE_PAGE,
- PAGE_MODE_CONTINUOUS_PAGE,
- PAGE_MODE_PASSWORD,
+ PAGE_MODE_DOCUMENT,
+ PAGE_MODE_PASSWORD
} EvWindowPageMode;
typedef enum {
@@ -244,15 +243,6 @@ update_action_sensitivity (EvWindow *ev_window)
set_action_sensitive (ev_window, "GoLastPage", FALSE);
}
- /* Page View radio group */
- if (document) {
- set_action_sensitive (ev_window, "SinglePage", page_mode != PAGE_MODE_PASSWORD);
- set_action_sensitive (ev_window, "ContinuousPage", page_mode != PAGE_MODE_PASSWORD);
- } else {
- set_action_sensitive (ev_window, "SinglePage", FALSE);
- set_action_sensitive (ev_window, "ContinuousPage", FALSE);
- }
-
/* Toolbar-specific actions: */
set_action_sensitive (ev_window, PAGE_SELECTOR_ACTION, has_pages);
set_action_sensitive (ev_window, ZOOM_CONTROL_ACTION, has_pages);
@@ -608,7 +598,7 @@ ev_window_setup_document (EvWindow *ev_window)
ev_window, 0);
}
- ev_window_set_page_mode (ev_window, PAGE_MODE_SINGLE_PAGE);
+ ev_window_set_page_mode (ev_window, PAGE_MODE_DOCUMENT);
ev_sidebar_set_document (sidebar, document);
@@ -1649,15 +1639,12 @@ ev_window_set_page_mode (EvWindow *window,
window->priv->page_mode = page_mode;
switch (page_mode) {
- case PAGE_MODE_SINGLE_PAGE:
+ case PAGE_MODE_DOCUMENT:
child = window->priv->view;
break;
case PAGE_MODE_PASSWORD:
child = window->priv->password_view;
break;
- case PAGE_MODE_CONTINUOUS_PAGE:
- child = window->priv->page_view;
- break;
default:
g_assert_not_reached ();
}
@@ -2147,21 +2134,6 @@ find_bar_close_cb (EggFindBar *find_bar,
}
static void
-ev_window_page_mode_cb (GtkRadioAction *action,
- GtkRadioAction *activated_action,
- EvWindow *window)
-{
- int mode;
-
- mode = gtk_radio_action_get_current_value (action);
-
- g_assert (mode == PAGE_MODE_CONTINUOUS_PAGE ||
- mode == PAGE_MODE_SINGLE_PAGE);
-
- ev_window_set_page_mode (window, (EvWindowPageMode) mode);
-}
-
-static void
find_bar_search_changed_cb (EggFindBar *find_bar,
GParamSpec *param,
EvWindow *ev_window)
@@ -2446,15 +2418,6 @@ static const GtkToggleActionEntry toggle_entries[] = {
G_CALLBACK (ev_window_cmd_view_page_width) },
};
-static const GtkRadioActionEntry page_view_entries[] = {
- { "SinglePage", GTK_STOCK_DND, N_("Single"), NULL,
- N_("Show the document one page at a time"),
- PAGE_MODE_SINGLE_PAGE },
- { "ContinuousPage", GTK_STOCK_DND_MULTIPLE, N_("Multi"), NULL,
- N_("Show the full document at once"),
- PAGE_MODE_CONTINUOUS_PAGE }
-};
-
static void
drag_data_received_cb (GtkWidget *widget, GdkDragContext *context,
gint x, gint y, GtkSelectionData *selection_data,
@@ -2673,7 +2636,7 @@ ev_window_init (EvWindow *ev_window)
ev_window->priv = EV_WINDOW_GET_PRIVATE (ev_window);
- ev_window->priv->page_mode = PAGE_MODE_SINGLE_PAGE;
+ ev_window->priv->page_mode = PAGE_MODE_DOCUMENT;
update_window_title (NULL, NULL, ev_window);
ev_window->priv->main_box = gtk_vbox_new (FALSE, 0);
@@ -2688,11 +2651,6 @@ ev_window_init (EvWindow *ev_window)
gtk_action_group_add_toggle_actions (action_group, toggle_entries,
G_N_ELEMENTS (toggle_entries),
ev_window);
- gtk_action_group_add_radio_actions (action_group, page_view_entries,
- G_N_ELEMENTS (page_view_entries),
- ev_window->priv->page_mode,
- G_CALLBACK (ev_window_page_mode_cb),
- ev_window);
set_action_properties (action_group);
register_custom_actions (ev_window, action_group);