summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cut-n-paste/zoom-control/ephy-zoom.c2
-rw-r--r--cut-n-paste/zoom-control/ephy-zoom.h4
-rw-r--r--data/atril-previewer-ui.xml2
-rw-r--r--data/atril-toolbar.xml2
-rw-r--r--data/atril-ui.xml2
-rw-r--r--data/org.mate.Atril.gschema.xml2
-rw-r--r--libview/ev-document-model.h3
-rw-r--r--libview/ev-view.c42
-rw-r--r--previewer/ev-previewer-window.c16
-rw-r--r--shell/ev-window.c44
10 files changed, 60 insertions, 59 deletions
diff --git a/cut-n-paste/zoom-control/ephy-zoom.c b/cut-n-paste/zoom-control/ephy-zoom.c
index bc456ecc..9c289f2c 100644
--- a/cut-n-paste/zoom-control/ephy-zoom.c
+++ b/cut-n-paste/zoom-control/ephy-zoom.c
@@ -31,7 +31,7 @@ ephy_zoom_get_zoom_level_index (float level)
float previous, current, mean;
/* Handle our options at the beginning of the list. */
- if (level == EPHY_ZOOM_BEST_FIT) {
+ if (level == EPHY_ZOOM_FIT_PAGE) {
return 0;
} else if (level == EPHY_ZOOM_FIT_WIDTH) {
return 1;
diff --git a/cut-n-paste/zoom-control/ephy-zoom.h b/cut-n-paste/zoom-control/ephy-zoom.h
index b77b3733..895e76a9 100644
--- a/cut-n-paste/zoom-control/ephy-zoom.h
+++ b/cut-n-paste/zoom-control/ephy-zoom.h
@@ -32,7 +32,7 @@
G_BEGIN_DECLS
-#define EPHY_ZOOM_BEST_FIT (-3.0)
+#define EPHY_ZOOM_FIT_PAGE (-3.0)
#define EPHY_ZOOM_FIT_WIDTH (-4.0)
#define EPHY_ZOOM_EXPAND_WINDOW_TO_FIT (-5.0)
#define EPHY_ZOOM_SEPARATOR (-6.0)
@@ -46,7 +46,7 @@ struct
zoom_levels[] =
{
- { N_("Best Fit"), EPHY_ZOOM_BEST_FIT },
+ { N_("Fit Page"), EPHY_ZOOM_FIT_PAGE },
{ N_("Fit Page Width"), EPHY_ZOOM_FIT_WIDTH },
{ N_("Expand Window to Fit"), EPHY_ZOOM_EXPAND_WINDOW_TO_FIT },
{ NULL, EPHY_ZOOM_SEPARATOR },
diff --git a/data/atril-previewer-ui.xml b/data/atril-previewer-ui.xml
index 896b472e..1c659242 100644
--- a/data/atril-previewer-ui.xml
+++ b/data/atril-previewer-ui.xml
@@ -6,7 +6,7 @@
<toolitem name="PageSelector" action="PageSelector"/>
<separator/>
<toolitem name="ViewPageWidth" action="ViewPageWidth"/>
- <toolitem name="ViewBestFit" action="ViewBestFit"/>
+ <toolitem name="ViewFitPage" action="ViewFitPage"/>
<toolitem name="ViewZoomIn" action="ViewZoomIn"/>
<toolitem name="ViewZoomOut" action="ViewZoomOut"/>
<separator/>
diff --git a/data/atril-toolbar.xml b/data/atril-toolbar.xml
index 34144185..5fbf012e 100644
--- a/data/atril-toolbar.xml
+++ b/data/atril-toolbar.xml
@@ -14,7 +14,7 @@
<toolitem name="ViewZoom"/>
<toolitem name="ViewZoomIn"/>
<toolitem name="ViewZoomOut"/>
- <toolitem name="ViewBestFit"/>
+ <toolitem name="ViewFitPage"/>
<toolitem name="ViewPageWidth"/>
<toolitem name="ViewFullscreen"/>
<toolitem name="ViewPresentation"/>
diff --git a/data/atril-ui.xml b/data/atril-ui.xml
index 579651e5..dc9035c9 100644
--- a/data/atril-ui.xml
+++ b/data/atril-ui.xml
@@ -47,7 +47,7 @@
<separator/>
<menuitem name="ViewZoomInMenu" action="ViewZoomIn"/>
<menuitem name="ViewZoomOutMenu" action="ViewZoomOut"/>
- <menuitem name="ViewBestFitMenu" action="ViewBestFit"/>
+ <menuitem name="ViewFitPageMenu" action="ViewFitPage"/>
<menuitem name="ViewPageWidthMenu" action="ViewPageWidth"/>
<menuitem name="ViewExpandWindowMenu" action="ViewExpandWindow"/>
<separator/>
diff --git a/data/org.mate.Atril.gschema.xml b/data/org.mate.Atril.gschema.xml
index 0b2ee18f..f2db7253 100644
--- a/data/org.mate.Atril.gschema.xml
+++ b/data/org.mate.Atril.gschema.xml
@@ -1,7 +1,7 @@
<schemalist>
<enum id="org.mate.Atril.SizingMode">
- <value nick="best-fit" value="0"/>
+ <value nick="fit-page" value="0"/>
<value nick="fit-width" value="1"/>
<value nick="free" value="2"/>
</enum>
diff --git a/libview/ev-document-model.h b/libview/ev-document-model.h
index 29794a3b..4c81c49c 100644
--- a/libview/ev-document-model.h
+++ b/libview/ev-document-model.h
@@ -34,7 +34,8 @@ G_BEGIN_DECLS
#define EV_IS_DOCUMENT_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EV_TYPE_DOCUMENT_MODEL))
typedef enum {
- EV_SIZING_BEST_FIT,
+ EV_SIZING_FIT_PAGE,
+ EV_SIZING_BEST_FIT = EV_SIZING_FIT_PAGE, /* Deprecated */
EV_SIZING_FIT_WIDTH,
EV_SIZING_FREE,
} EvSizingMode;
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 72abcb86..60c1a1ac 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -225,7 +225,7 @@ static double zoom_for_size_fit_height (gdouble doc_width,
gdouble doc_height,
int target_width,
int target_height);
-static double zoom_for_size_best_fit (gdouble doc_width,
+static double zoom_for_size_fit_page (gdouble doc_width,
gdouble doc_height,
int target_width,
int target_height);
@@ -1556,7 +1556,7 @@ goto_fitr_dest (EvView *view, EvLinkDest *dest)
left = ev_link_dest_get_left (dest, &change_left);
top = ev_link_dest_get_top (dest, &change_top);
- zoom = zoom_for_size_best_fit (ev_link_dest_get_right (dest) - left,
+ zoom = zoom_for_size_fit_page (ev_link_dest_get_right (dest) - left,
ev_link_dest_get_bottom (dest) - top,
allocation.width,
allocation.height);
@@ -1647,11 +1647,11 @@ goto_fit_dest (EvView *view, EvLinkDest *dest)
page = ev_link_dest_get_page (dest);
ev_document_get_page_size (view->document, page, &doc_width, &doc_height);
- zoom = zoom_for_size_best_fit (doc_width, doc_height,
+ zoom = zoom_for_size_fit_page (doc_width, doc_height,
allocation.width,
allocation.height);
- ev_document_model_set_sizing_mode (view->model, EV_SIZING_BEST_FIT);
+ ev_document_model_set_sizing_mode (view->model, EV_SIZING_FIT_PAGE);
ev_document_model_set_scale (view->model, zoom);
ev_view_change_page (view, page);
@@ -3172,7 +3172,7 @@ ev_view_size_request_continuous_dual_page (EvView *view,
switch (view->sizing_mode) {
case EV_SIZING_FIT_WIDTH:
- case EV_SIZING_BEST_FIT:
+ case EV_SIZING_FIT_PAGE:
requisition->width = 1;
break;
@@ -3201,7 +3201,7 @@ ev_view_size_request_continuous (EvView *view,
switch (view->sizing_mode) {
case EV_SIZING_FIT_WIDTH:
- case EV_SIZING_BEST_FIT:
+ case EV_SIZING_FIT_PAGE:
requisition->width = 1;
break;
@@ -3226,7 +3226,7 @@ ev_view_size_request_dual_page (EvView *view,
GtkBorder border;
gint width, height;
- if (view->sizing_mode == EV_SIZING_BEST_FIT) {
+ if (view->sizing_mode == EV_SIZING_FIT_PAGE) {
requisition->width = 1;
requisition->height = 1;
@@ -3261,7 +3261,7 @@ ev_view_size_request_single_page (EvView *view,
GtkBorder border;
gint width, height;
- if (view->sizing_mode == EV_SIZING_BEST_FIT) {
+ if (view->sizing_mode == EV_SIZING_FIT_PAGE) {
requisition->width = 1;
requisition->height = 1;
@@ -3296,7 +3296,7 @@ ev_view_size_request (GtkWidget *widget,
*/
if (!view->internal_size_request &&
(view->sizing_mode == EV_SIZING_FIT_WIDTH ||
- view->sizing_mode == EV_SIZING_BEST_FIT)) {
+ view->sizing_mode == EV_SIZING_FIT_PAGE)) {
GtkAllocation allocation;
gtk_widget_get_allocation (widget, &allocation);
@@ -3362,7 +3362,7 @@ ev_view_size_allocate (GtkWidget *widget,
return;
if (view->sizing_mode == EV_SIZING_FIT_WIDTH ||
- view->sizing_mode == EV_SIZING_BEST_FIT) {
+ view->sizing_mode == EV_SIZING_FIT_PAGE) {
GtkRequisition req;
ev_view_zoom_for_size (view,
@@ -5876,7 +5876,7 @@ zoom_for_size_fit_height (gdouble doc_width,
}
static double
-zoom_for_size_best_fit (gdouble doc_width,
+zoom_for_size_fit_page (gdouble doc_width,
gdouble doc_height,
int target_width,
int target_height)
@@ -5919,8 +5919,8 @@ ev_view_zoom_for_size_continuous_and_dual_page (EvView *view,
if (view->sizing_mode == EV_SIZING_FIT_WIDTH) {
scale = zoom_for_size_fit_width (doc_width, doc_height, width - sb_size, height);
- } else if (view->sizing_mode == EV_SIZING_BEST_FIT)
- scale = zoom_for_size_best_fit (doc_width, doc_height, width - sb_size, height);
+ } else if (view->sizing_mode == EV_SIZING_FIT_PAGE)
+ scale = zoom_for_size_fit_page (doc_width, doc_height, width - sb_size, height);
else
g_assert_not_reached ();
@@ -5955,8 +5955,8 @@ ev_view_zoom_for_size_continuous (EvView *view,
if (view->sizing_mode == EV_SIZING_FIT_WIDTH) {
scale = zoom_for_size_fit_width (doc_width, doc_height, width - sb_size, height);
- } else if (view->sizing_mode == EV_SIZING_BEST_FIT)
- scale = zoom_for_size_best_fit (doc_width, doc_height, width - sb_size, height);
+ } else if (view->sizing_mode == EV_SIZING_FIT_PAGE)
+ scale = zoom_for_size_fit_page (doc_width, doc_height, width - sb_size, height);
else
g_assert_not_reached ();
@@ -5997,8 +5997,8 @@ ev_view_zoom_for_size_dual_page (EvView *view,
sb_size = ev_view_get_scrollbar_size (view, GTK_ORIENTATION_VERTICAL);
scale = zoom_for_size_fit_width (doc_width, doc_height, width - sb_size, height);
- } else if (view->sizing_mode == EV_SIZING_BEST_FIT)
- scale = zoom_for_size_best_fit (doc_width, doc_height, width, height);
+ } else if (view->sizing_mode == EV_SIZING_FIT_PAGE)
+ scale = zoom_for_size_fit_page (doc_width, doc_height, width, height);
else
g_assert_not_reached ();
@@ -6027,8 +6027,8 @@ ev_view_zoom_for_size_single_page (EvView *view,
sb_size = ev_view_get_scrollbar_size (view, GTK_ORIENTATION_VERTICAL);
scale = zoom_for_size_fit_width (doc_width, doc_height, width - sb_size, height);
- } else if (view->sizing_mode == EV_SIZING_BEST_FIT)
- scale = zoom_for_size_best_fit (doc_width, doc_height, width, height);
+ } else if (view->sizing_mode == EV_SIZING_FIT_PAGE)
+ scale = zoom_for_size_fit_page (doc_width, doc_height, width, height);
else
g_assert_not_reached ();
@@ -6042,7 +6042,7 @@ ev_view_zoom_for_size (EvView *view,
{
g_return_if_fail (EV_IS_VIEW (view));
g_return_if_fail (view->sizing_mode == EV_SIZING_FIT_WIDTH ||
- view->sizing_mode == EV_SIZING_BEST_FIT);
+ view->sizing_mode == EV_SIZING_FIT_PAGE);
g_return_if_fail (width >= 0);
g_return_if_fail (height >= 0);
@@ -6067,7 +6067,7 @@ ev_view_page_fits (EvView *view,
GtkAllocation allocation;
double size;
- if (view->sizing_mode == EV_SIZING_BEST_FIT)
+ if (view->sizing_mode == EV_SIZING_FIT_PAGE)
return TRUE;
if (orientation == GTK_ORIENTATION_HORIZONTAL &&
diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c
index 2571ac8d..5094fcf5 100644
--- a/previewer/ev-previewer-window.c
+++ b/previewer/ev-previewer-window.c
@@ -146,12 +146,12 @@ ev_previewer_window_zoom_out (GtkAction *action,
}
static void
-ev_previewer_window_zoom_best_fit (GtkToggleAction *action,
+ev_previewer_window_zoom_fit_page (GtkToggleAction *action,
EvPreviewerWindow *window)
{
ev_document_model_set_sizing_mode (window->model,
gtk_toggle_action_get_active (action) ?
- EV_SIZING_BEST_FIT : EV_SIZING_FREE);
+ EV_SIZING_FIT_PAGE : EV_SIZING_FREE);
}
static void
@@ -352,9 +352,9 @@ static const GtkActionEntry accel_entries[] = {
};
static const GtkToggleActionEntry toggle_action_entries[] = {
- { "ViewBestFit", EV_STOCK_ZOOM_PAGE, N_("_Best Fit"), NULL,
+ { "ViewFitPage", EV_STOCK_ZOOM_PAGE, N_("Fit Pa_ge"), NULL,
N_("Make the current document fill the window"),
- G_CALLBACK (ev_previewer_window_zoom_best_fit) },
+ G_CALLBACK (ev_previewer_window_zoom_fit_page) },
{ "ViewPageWidth", EV_STOCK_ZOOM_WIDTH, N_("Fit Page _Width"), NULL,
N_("Make the current document fill the window width"),
G_CALLBACK (ev_previewer_window_zoom_page_width) }
@@ -379,14 +379,14 @@ view_sizing_mode_changed (EvDocumentModel *model,
EvSizingMode sizing_mode = ev_document_model_get_sizing_mode (model);
GtkAction *action;
- action = gtk_action_group_get_action (window->action_group, "ViewBestFit");
+ action = gtk_action_group_get_action (window->action_group, "ViewFitPage");
g_signal_handlers_block_by_func (action,
- G_CALLBACK (ev_previewer_window_zoom_best_fit),
+ G_CALLBACK (ev_previewer_window_zoom_fit_page),
window);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action),
- sizing_mode == EV_SIZING_BEST_FIT);
+ sizing_mode == EV_SIZING_FIT_PAGE);
g_signal_handlers_unblock_by_func (action,
- G_CALLBACK (ev_previewer_window_zoom_best_fit),
+ G_CALLBACK (ev_previewer_window_zoom_fit_page),
window);
action = gtk_action_group_get_action (window->action_group, "ViewPageWidth");
diff --git a/shell/ev-window.c b/shell/ev-window.c
index d91344f2..add31cc2 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -342,7 +342,7 @@ static void ev_attachment_popup_cmd_open_attachment (GtkAction *action,
EvWindow *window);
static void ev_attachment_popup_cmd_save_attachment_as (GtkAction *action,
EvWindow *window);
-static void ev_window_cmd_view_best_fit (GtkAction *action,
+static void ev_window_cmd_view_fit_page (GtkAction *action,
EvWindow *ev_window);
static void ev_window_cmd_view_page_width (GtkAction *action,
EvWindow *ev_window);
@@ -493,7 +493,7 @@ ev_window_setup_action_sensitivity (EvWindow *ev_window)
ev_window_set_action_sensitive (ev_window, "ViewContinuous", has_pages && !(document->iswebdocument));
ev_window_set_action_sensitive (ev_window, "ViewDual", has_pages && !(document->iswebdocument));
ev_window_set_action_sensitive (ev_window, "ViewDualOddLeft", has_pages);
- ev_window_set_action_sensitive (ev_window, "ViewBestFit", has_pages && !(document->iswebdocument));
+ ev_window_set_action_sensitive (ev_window, "ViewFitPage", has_pages && !(document->iswebdocument));
ev_window_set_action_sensitive (ev_window, "ViewPageWidth", has_pages && !(document->iswebdocument));
ev_window_set_action_sensitive (ev_window, "ViewReload", has_pages);
ev_window_set_action_sensitive (ev_window, "ViewAutoscroll", has_pages && !(document->iswebdocument));
@@ -595,7 +595,7 @@ ev_window_update_actions (EvWindow *ev_window)
}
sizing_mode = ev_document_model_get_sizing_mode (ev_window->priv->model);
- if (has_pages && sizing_mode != EV_SIZING_FIT_WIDTH && sizing_mode != EV_SIZING_BEST_FIT) {
+ if (has_pages && sizing_mode != EV_SIZING_FIT_WIDTH && sizing_mode != EV_SIZING_FIT_PAGE) {
GtkAction *action;
float zoom;
float real_zoom;
@@ -699,28 +699,28 @@ update_sizing_buttons (EvWindow *window)
{
GtkActionGroup *action_group = window->priv->action_group;
GtkAction *action;
- gboolean best_fit, page_width;
+ gboolean fit_page, page_width;
switch (ev_document_model_get_sizing_mode (window->priv->model)) {
- case EV_SIZING_BEST_FIT:
- best_fit = TRUE;
+ case EV_SIZING_FIT_PAGE:
+ fit_page = TRUE;
page_width = FALSE;
break;
case EV_SIZING_FIT_WIDTH:
- best_fit = FALSE;
+ fit_page = FALSE;
page_width = TRUE;
break;
default:
- best_fit = page_width = FALSE;
+ fit_page = page_width = FALSE;
break;
}
- action = gtk_action_group_get_action (action_group, "ViewBestFit");
+ action = gtk_action_group_get_action (action_group, "ViewFitPage");
g_signal_handlers_block_by_func
- (action, G_CALLBACK (ev_window_cmd_view_best_fit), window);
- gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), best_fit);
+ (action, G_CALLBACK (ev_window_cmd_view_fit_page), window);
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), fit_page);
g_signal_handlers_unblock_by_func
- (action, G_CALLBACK (ev_window_cmd_view_best_fit), window);
+ (action, G_CALLBACK (ev_window_cmd_view_fit_page), window);
action = gtk_action_group_get_action (action_group, "ViewPageWidth");
g_signal_handlers_block_by_func
@@ -731,9 +731,9 @@ update_sizing_buttons (EvWindow *window)
action = gtk_action_group_get_action (window->priv->action_group,
ZOOM_CONTROL_ACTION);
- if (best_fit) {
+ if (fit_page) {
ephy_zoom_action_set_zoom_level (EPHY_ZOOM_ACTION (action),
- EPHY_ZOOM_BEST_FIT);
+ EPHY_ZOOM_FIT_PAGE);
} else if (page_width) {
if (!window->priv->document || (window->priv->document && !window->priv->document->iswebdocument)) {
ephy_zoom_action_set_zoom_level (EPHY_ZOOM_ACTION (action),
@@ -3963,12 +3963,12 @@ ev_window_cmd_dual_odd_pages_left (GtkAction *action, EvWindow *ev_window)
}
static void
-ev_window_cmd_view_best_fit (GtkAction *action, EvWindow *ev_window)
+ev_window_cmd_view_fit_page (GtkAction *action, EvWindow *ev_window)
{
ev_window_stop_presentation (ev_window, TRUE);
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
- ev_document_model_set_sizing_mode (ev_window->priv->model, EV_SIZING_BEST_FIT);
+ ev_document_model_set_sizing_mode (ev_window->priv->model, EV_SIZING_FIT_PAGE);
} else {
ev_document_model_set_sizing_mode (ev_window->priv->model, EV_SIZING_FREE);
}
@@ -5756,8 +5756,8 @@ zoom_control_changed_cb (EphyZoomAction *action,
return;
}
- if (zoom == EPHY_ZOOM_BEST_FIT) {
- mode = EV_SIZING_BEST_FIT;
+ if (zoom == EPHY_ZOOM_FIT_PAGE) {
+ mode = EV_SIZING_FIT_PAGE;
} else if (zoom == EPHY_ZOOM_FIT_WIDTH) {
mode = EV_SIZING_FIT_WIDTH;
} else {
@@ -6322,9 +6322,9 @@ static const GtkToggleActionEntry toggle_entries[] = {
{ "ViewPresentation", EV_STOCK_RUN_PRESENTATION, N_("Pre_sentation"), "F5",
N_("Run document as a presentation"),
G_CALLBACK (ev_window_cmd_view_presentation) },
- { "ViewBestFit", EV_STOCK_ZOOM_PAGE, N_("_Best Fit"), NULL,
+ { "ViewFitPage", EV_STOCK_ZOOM_PAGE, N_("Fit Pa_ge"), NULL,
N_("Make the current document fill the window"),
- G_CALLBACK (ev_window_cmd_view_best_fit) },
+ G_CALLBACK (ev_window_cmd_view_fit_page) },
{ "ViewPageWidth", EV_STOCK_ZOOM_WIDTH, N_("Fit Page _Width"), NULL,
N_("Make the current document fill the window width"),
G_CALLBACK (ev_window_cmd_view_page_width) },
@@ -6557,9 +6557,9 @@ set_action_properties (GtkActionGroup *action_group)
/*translators: this is the label for toolbar button*/
g_object_set (action, "short_label", _("Zoom Out"), NULL);
- action = gtk_action_group_get_action (action_group, "ViewBestFit");
+ action = gtk_action_group_get_action (action_group, "ViewFitPage");
/*translators: this is the label for toolbar button*/
- g_object_set (action, "short_label", _("Best Fit"), NULL);
+ g_object_set (action, "short_label", _("Fit Page"), NULL);
action = gtk_action_group_get_action (action_group, "ViewPageWidth");
/*translators: this is the label for toolbar button*/