[nautilus/wip/gaction_reordered: 6/17] nautilus-view: Drop restore default zoom level
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/gaction_reordered: 6/17] nautilus-view: Drop restore default zoom level
- Date: Mon, 12 Jan 2015 16:15:33 +0000 (UTC)
commit 403a928e8a0aa0f4e3384b9e00829e462ab3d166
Author: Carlos Soriano <carlos sorian89 gmail com>
Date: Mon Jan 5 13:49:33 2015 +0100
nautilus-view: Drop restore default zoom level
In the same way that reset to defaults, we can drop this as well
src/nautilus-actions.h | 1 -
src/nautilus-canvas-view.c | 13 -------------
src/nautilus-empty-view.c | 6 ------
src/nautilus-list-view.c | 13 -------------
src/nautilus-shell-ui.xml | 1 -
src/nautilus-view.c | 18 ------------------
src/nautilus-view.h | 5 -----
src/nautilus-window-menus.c | 11 -----------
src/nautilus-window.c | 5 -----
9 files changed, 0 insertions(+), 73 deletions(-)
---
diff --git a/src/nautilus-actions.h b/src/nautilus-actions.h
index 0d848d7..58ac8c6 100644
--- a/src/nautilus-actions.h
+++ b/src/nautilus-actions.h
@@ -40,7 +40,6 @@
#define NAUTILUS_ACTION_HOME "Home"
#define NAUTILUS_ACTION_ZOOM_IN "Zoom In"
#define NAUTILUS_ACTION_ZOOM_OUT "Zoom Out"
-#define NAUTILUS_ACTION_ZOOM_NORMAL "Zoom Normal"
#define NAUTILUS_ACTION_SHOW_HIDDEN_FILES "Show Hidden Files"
#define NAUTILUS_ACTION_CLOSE "Close"
#define NAUTILUS_ACTION_SEARCH "Search"
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
index 4f7df2d..59ec7d5 100644
--- a/src/nautilus-canvas-view.c
+++ b/src/nautilus-canvas-view.c
@@ -936,18 +936,6 @@ nautilus_canvas_view_zoom_to_level (NautilusView *view,
nautilus_canvas_view_set_zoom_level (canvas_view, zoom_level, FALSE);
}
-static void
-nautilus_canvas_view_restore_default_zoom_level (NautilusView *view)
-{
- NautilusCanvasView *canvas_view;
-
- g_return_if_fail (NAUTILUS_IS_CANVAS_VIEW (view));
-
- canvas_view = NAUTILUS_CANVAS_VIEW (view);
- nautilus_view_zoom_to_level
- (view, get_default_zoom_level (canvas_view));
-}
-
static gboolean
nautilus_canvas_view_can_zoom_in (NautilusView *view)
{
@@ -2042,7 +2030,6 @@ nautilus_canvas_view_class_init (NautilusCanvasViewClass *klass)
nautilus_view_class->get_selection_for_file_transfer = nautilus_canvas_view_get_selection;
nautilus_view_class->is_empty = nautilus_canvas_view_is_empty;
nautilus_view_class->remove_file = nautilus_canvas_view_remove_file;
- nautilus_view_class->restore_default_zoom_level = nautilus_canvas_view_restore_default_zoom_level;
nautilus_view_class->reveal_selection = nautilus_canvas_view_reveal_selection;
nautilus_view_class->select_all = nautilus_canvas_view_select_all;
nautilus_view_class->select_first = nautilus_canvas_view_select_first;
diff --git a/src/nautilus-empty-view.c b/src/nautilus-empty-view.c
index 46cea33..09f8495 100644
--- a/src/nautilus-empty-view.c
+++ b/src/nautilus-empty-view.c
@@ -157,11 +157,6 @@ nautilus_empty_view_zoom_to_level (NautilusView *view,
{
}
-static void
-nautilus_empty_view_restore_default_zoom_level (NautilusView *view)
-{
-}
-
static gboolean
nautilus_empty_view_can_zoom_in (NautilusView *view)
{
@@ -260,7 +255,6 @@ nautilus_empty_view_class_init (NautilusEmptyViewClass *class)
nautilus_view_class->merge_menus = nautilus_empty_view_merge_menus;
nautilus_view_class->update_menus = nautilus_empty_view_update_menus;
nautilus_view_class->reset_to_defaults = nautilus_empty_view_reset_to_defaults;
- nautilus_view_class->restore_default_zoom_level = nautilus_empty_view_restore_default_zoom_level;
nautilus_view_class->reveal_selection = nautilus_empty_view_reveal_selection;
nautilus_view_class->select_all = nautilus_empty_view_select_all;
nautilus_view_class->set_selection = nautilus_empty_view_set_selection;
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 6c10a0f..7d4f180 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -3166,18 +3166,6 @@ nautilus_list_view_zoom_to_level (NautilusView *view,
nautilus_list_view_set_zoom_level (list_view, zoom_level, FALSE);
}
-static void
-nautilus_list_view_restore_default_zoom_level (NautilusView *view)
-{
- NautilusListView *list_view;
-
- g_return_if_fail (NAUTILUS_IS_LIST_VIEW (view));
-
- list_view = NAUTILUS_LIST_VIEW (view);
-
- nautilus_list_view_set_zoom_level (list_view, get_default_zoom_level (), FALSE);
-}
-
static gboolean
nautilus_list_view_can_zoom_in (NautilusView *view)
{
@@ -3574,7 +3562,6 @@ nautilus_list_view_class_init (NautilusListViewClass *class)
nautilus_view_class->merge_menus = nautilus_list_view_merge_menus;
nautilus_view_class->unmerge_menus = nautilus_list_view_unmerge_menus;
nautilus_view_class->update_menus = nautilus_list_view_update_menus;
- nautilus_view_class->restore_default_zoom_level = nautilus_list_view_restore_default_zoom_level;
nautilus_view_class->reveal_selection = nautilus_list_view_reveal_selection;
nautilus_view_class->select_all = nautilus_list_view_select_all;
nautilus_view_class->select_first = nautilus_list_view_select_first;
diff --git a/src/nautilus-shell-ui.xml b/src/nautilus-shell-ui.xml
index 73b506e..6efdbf7 100644
--- a/src/nautilus-shell-ui.xml
+++ b/src/nautilus-shell-ui.xml
@@ -21,7 +21,6 @@
<placeholder name="Zoom Items Placeholder">
<menuitem name="Zoom In" action="Zoom In"/>
<menuitem name="Zoom Out" action="Zoom Out"/>
- <menuitem name="Zoom Normal" action="Zoom Normal"/>
</placeholder>
<separator/>
<menuitem name="Stop" action="Stop"/>
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index 1ab395f..ec4cfa1 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -638,24 +638,6 @@ nautilus_view_supports_zooming (NautilusView *view)
return view->details->supports_zooming;
}
-/**
- * nautilus_view_restore_default_zoom_level:
- *
- * restore to the default zoom level by invoking the relevant subclass through the slot
- *
- **/
-void
-nautilus_view_restore_default_zoom_level (NautilusView *view)
-{
- g_return_if_fail (NAUTILUS_IS_VIEW (view));
-
- if (!nautilus_view_supports_zooming (view)) {
- return;
- }
-
- NAUTILUS_VIEW_CLASS (G_OBJECT_GET_CLASS (view))->restore_default_zoom_level (view);
-}
-
const char *
nautilus_view_get_view_id (NautilusView *view)
{
diff --git a/src/nautilus-view.h b/src/nautilus-view.h
index 08b3cd9..170e7f1 100644
--- a/src/nautilus-view.h
+++ b/src/nautilus-view.h
@@ -190,10 +190,6 @@ struct NautilusViewClass {
NautilusZoomLevel (* get_zoom_level) (NautilusView *view);
- /* restore_default_zoom_level is a function pointer that subclasses must override
- * to restore the zoom level of an object to a default setting. */
- void (* restore_default_zoom_level) (NautilusView *view);
-
/* can_zoom_in is a function pointer that subclasses must override to
* return whether the view is at maximum size (furthest-in zoom level) */
gboolean (* can_zoom_in) (NautilusView *view);
@@ -393,7 +389,6 @@ void nautilus_view_bump_zoom_level (NautilusView *v
int zoom_increment);
void nautilus_view_zoom_to_level (NautilusView *view,
NautilusZoomLevel level);
-void nautilus_view_restore_default_zoom_level (NautilusView *view);
gboolean nautilus_view_can_zoom_in (NautilusView *view);
gboolean nautilus_view_can_zoom_out (NautilusView *view);
NautilusZoomLevel nautilus_view_get_zoom_level (NautilusView *view);
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index 999d163..6814c7e 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -171,13 +171,6 @@ action_zoom_out_callback (GtkAction *action,
}
static void
-action_zoom_normal_callback (GtkAction *action,
- gpointer user_data)
-{
- nautilus_view_restore_default_zoom_level (get_current_view (user_data));
-}
-
-static void
action_up_callback (GtkAction *action,
gpointer user_data)
{
@@ -415,10 +408,6 @@ static const GtkActionEntry main_entries[] = {
/* label, accelerator */ "ZoomOutAccel", "<control>KP_Subtract",
/* tooltip */ NULL,
G_CALLBACK (action_zoom_out_callback) },
- /* name, stock id */ { NAUTILUS_ACTION_ZOOM_NORMAL, NULL,
- /* label, accelerator */ N_("Normal Si_ze"), "<control>0",
- /* tooltip */ N_("Use the normal view size"),
- G_CALLBACK (action_zoom_normal_callback) },
/* name, stock id */ { NAUTILUS_ACTION_GO_HOME, NAUTILUS_ICON_HOME,
/* label, accelerator */ N_("_Home"), "<alt>Home",
/* tooltip */ N_("Open your personal folder"),
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index ac78022..77f32f6 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1915,11 +1915,6 @@ nautilus_window_sync_zoom_widgets (NautilusWindow *window)
NAUTILUS_ACTION_ZOOM_OUT);
gtk_action_set_visible (action, supports_zooming);
gtk_action_set_sensitive (action, can_zoom_out);
-
- action = gtk_action_group_get_action (action_group,
- NAUTILUS_ACTION_ZOOM_NORMAL);
- gtk_action_set_visible (action, supports_zooming);
- gtk_action_set_sensitive (action, can_zoom);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]