[nautilus] all: remove NautilusZoomAction
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] all: remove NautilusZoomAction
- Date: Thu, 17 Feb 2011 16:32:55 +0000 (UTC)
commit 38dea32b3da5610990348be37c3f9454cec54773
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Feb 16 16:27:26 2011 -0500
all: remove NautilusZoomAction
Now that we don't use it on the toolbar anymore, it's useless to keep
around.
src/Makefile.am | 2 -
src/nautilus-navigation-window-menus.c | 11 --
src/nautilus-window-manage-views.c | 1 -
src/nautilus-window-menus.c | 19 +++-
src/nautilus-window-private.h | 5 -
src/nautilus-window.c | 37 ------
src/nautilus-zoom-action.c | 203 --------------------------------
src/nautilus-zoom-action.h | 57 ---------
8 files changed, 16 insertions(+), 319 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index c7c3e83..8153f37 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -162,8 +162,6 @@ nautilus_SOURCES = \
nautilus-window-types.h \
nautilus-x-content-bar.c \
nautilus-x-content-bar.h \
- nautilus-zoom-action.c \
- nautilus-zoom-action.h \
nautilus-zoom-control.c \
nautilus-zoom-control.h \
$(NULL)
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index d440c8c..3269e07 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -30,7 +30,6 @@
#include "nautilus-actions.h"
#include "nautilus-notebook.h"
#include "nautilus-navigation-action.h"
-#include "nautilus-zoom-action.h"
#include "nautilus-view-as-action.h"
#include "nautilus-application.h"
#include "nautilus-bookmark-list.h"
@@ -807,16 +806,6 @@ nautilus_navigation_window_initialize_actions (NautilusNavigationWindow *window)
g_object_unref (action);
- action = g_object_new (NAUTILUS_TYPE_ZOOM_ACTION,
- "name", "Zoom",
- "label", _("_Zoom"),
- "window", window,
- "is_important", FALSE,
- NULL);
- gtk_action_group_add_action (action_group,
- action);
- g_object_unref (action);
-
action = g_object_new (NAUTILUS_TYPE_VIEW_AS_ACTION,
"name", "ViewAs",
"label", _("_View As"),
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 7625dde..e100edd 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -39,7 +39,6 @@
#include "nautilus-trash-bar.h"
#include "nautilus-view-factory.h"
#include "nautilus-x-content-bar.h"
-#include "nautilus-zoom-control.h"
#include "nautilus-navigation-window-pane.h"
#include <eel/eel-accessibility.h>
#include <eel/eel-debug.h>
diff --git a/src/nautilus-window-menus.c b/src/nautilus-window-menus.c
index fcd1770..10beba5 100644
--- a/src/nautilus-window-menus.c
+++ b/src/nautilus-window-menus.c
@@ -212,25 +212,38 @@ action_reload_callback (GtkAction *action,
nautilus_window_slot_reload (slot);
}
+static NautilusView *
+get_current_view (NautilusWindow *window)
+{
+ NautilusWindowSlot *slot;
+ NautilusView *view;
+
+ slot = nautilus_window_get_active_slot (window);
+ view = nautilus_window_slot_get_current_view (slot);
+
+ return view;
+}
+
static void
action_zoom_in_callback (GtkAction *action,
gpointer user_data)
{
- nautilus_window_zoom_in (NAUTILUS_WINDOW (user_data));
+
+ nautilus_view_bump_zoom_level (get_current_view (user_data), 1);
}
static void
action_zoom_out_callback (GtkAction *action,
gpointer user_data)
{
- nautilus_window_zoom_out (NAUTILUS_WINDOW (user_data));
+ nautilus_view_bump_zoom_level (get_current_view (user_data), -1);
}
static void
action_zoom_normal_callback (GtkAction *action,
gpointer user_data)
{
- nautilus_window_zoom_to_default (NAUTILUS_WINDOW (user_data));
+ nautilus_view_restore_default_zoom_level (get_current_view (user_data));
}
static void
diff --git a/src/nautilus-window-private.h b/src/nautilus-window-private.h
index dc2db4c..e397cf8 100644
--- a/src/nautilus-window-private.h
+++ b/src/nautilus-window-private.h
@@ -179,11 +179,6 @@ void nautilus_menus_append_bookmark_to_menu (Nautil
GCallback refresh_callback,
NautilusBookmarkFailedCallback failed_callback);
void nautilus_window_update_find_menu_item (NautilusWindow *window);
-void nautilus_window_zoom_in (NautilusWindow *window);
-void nautilus_window_zoom_out (NautilusWindow *window);
-void nautilus_window_zoom_to_level (NautilusWindow *window,
- NautilusZoomLevel level);
-void nautilus_window_zoom_to_default (NautilusWindow *window);
NautilusWindowSlot *nautilus_window_open_slot (NautilusWindowPane *pane,
NautilusWindowOpenSlotFlags flags);
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index ad47291..f5e9748 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -352,43 +352,6 @@ nautilus_window_prompt_for_location (NautilusWindow *window,
prompt_for_location, (window, initial));
}
-static NautilusView *
-nautilus_window_get_active_view (NautilusWindow *window)
-{
- NautilusWindowSlot *slot;
- NautilusView *view;
-
- slot = window->details->active_pane->active_slot;
- view = slot->content_view;
-
- return view;
-}
-
-void
-nautilus_window_zoom_in (NautilusWindow *window)
-{
- nautilus_view_bump_zoom_level (nautilus_window_get_active_view (window), 1);
-}
-
-void
-nautilus_window_zoom_to_level (NautilusWindow *window,
- NautilusZoomLevel level)
-{
- nautilus_view_zoom_to_level (nautilus_window_get_active_view (window), level);
-}
-
-void
-nautilus_window_zoom_out (NautilusWindow *window)
-{
- nautilus_view_bump_zoom_level (nautilus_window_get_active_view (window), -1);
-}
-
-void
-nautilus_window_zoom_to_default (NautilusWindow *window)
-{
- nautilus_view_restore_default_zoom_level (nautilus_window_get_active_view (window));
-}
-
/* Code should never force the window taller than this size.
* (The user can still stretch the window taller if desired).
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]