From: Marco Pesenti Gritti Date: Tue, 10 May 2005 17:18:46 +0000 (+0000) Subject: Remove some leftover code from jrb first continous attempt. Use the new X-Git-Tag: EVINCE_0_3_1~37 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=ba8b43149d216ed8737107ed0525dd367166b8dc;p=evince.git Remove some leftover code from jrb first continous attempt. Use the new 2005-05-10 Marco Pesenti Gritti * 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... --- diff --git a/ChangeLog b/ChangeLog index af010f72..d008a346 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-05-10 Marco Pesenti Gritti + + * 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... + 2005-05-10 Marco Pesenti Gritti * shell/ev-page-action.c: (update_pages_label), (connect_proxy): diff --git a/data/evince-toolbar.xml b/data/evince-toolbar.xml index d7e92cc7..eb10114a 100644 --- a/data/evince-toolbar.xml +++ b/data/evince-toolbar.xml @@ -1,8 +1,8 @@ - - + + diff --git a/shell/ev-window.c b/shell/ev-window.c index fe1c2263..2475de0a 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -70,9 +70,8 @@ #include 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 (); } @@ -2146,21 +2133,6 @@ find_bar_close_cb (EggFindBar *find_bar, update_chrome_flag (ev_window, EV_CHROME_FINDBAR, NULL, FALSE); } -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, @@ -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);