[nautilus/wip/antoniof/new-list-view: 6/7] files-view: Drop zoom_level_percentage vfunc
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/new-list-view: 6/7] files-view: Drop zoom_level_percentage vfunc
- Date: Wed, 25 May 2022 11:32:52 +0000 (UTC)
commit 4afe0a737376718bef89e7afdbb595aa4c0269a6
Author: António Fernandes <antoniof gnome org>
Date: Sat Apr 9 17:13:32 2022 +0100
files-view: Drop zoom_level_percentage vfunc
The menu used to display a percentage string. That's not the case
anymore and this has been generating compiler warnings about unused
function. Drop it.
src/nautilus-files-view.c | 8 --------
src/nautilus-files-view.h | 3 ---
src/nautilus-list-view.c | 15 ---------------
src/nautilus-view-icon-controller.c | 10 ----------
4 files changed, 36 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index a0dcb41ed..109d991c2 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -991,14 +991,6 @@ nautilus_files_view_restore_standard_zoom_level (NautilusFilesView *view)
NAUTILUS_FILES_VIEW_CLASS (G_OBJECT_GET_CLASS (view))->restore_standard_zoom_level (view);
}
-static gfloat
-nautilus_files_view_get_zoom_level_percentage (NautilusFilesView *view)
-{
- g_return_val_if_fail (NAUTILUS_IS_FILES_VIEW (view), 1);
-
- return NAUTILUS_FILES_VIEW_CLASS (G_OBJECT_GET_CLASS (view))->get_zoom_level_percentage (view);
-}
-
static gboolean
nautilus_files_view_is_zoom_level_default (NautilusFilesView *view)
{
diff --git a/src/nautilus-files-view.h b/src/nautilus-files-view.h
index 0e1bd2e28..e1882b7ba 100644
--- a/src/nautilus-files-view.h
+++ b/src/nautilus-files-view.h
@@ -165,9 +165,6 @@ struct _NautilusFilesViewClass {
* return whether the view is at minimum size (furthest-out zoom level) */
gboolean (* can_zoom_out) (NautilusFilesView *view);
- /* The current zoom level as a percentage of the default. */
- gfloat (* get_zoom_level_percentage) (NautilusFilesView *view);
-
gboolean (*is_zoom_level_default) (NautilusFilesView *view);
/* reveal_selection is a function pointer that subclasses may
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index c3953badf..a3ad6946c 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -3341,20 +3341,6 @@ nautilus_list_view_can_zoom_out (NautilusFilesView *view)
return NAUTILUS_LIST_VIEW (view)->details->zoom_level > NAUTILUS_LIST_ZOOM_LEVEL_SMALL;
}
-static gfloat
-nautilus_list_view_get_zoom_level_percentage (NautilusFilesView *view)
-{
- NautilusListView *list_view;
- guint icon_size;
-
- g_return_val_if_fail (NAUTILUS_IS_LIST_VIEW (view), 1.0);
-
- list_view = NAUTILUS_LIST_VIEW (view);
- icon_size = nautilus_list_model_get_icon_size_for_zoom_level (list_view->details->zoom_level);
-
- return (gfloat) icon_size / NAUTILUS_LIST_ICON_SIZE_STANDARD;
-}
-
static gboolean
nautilus_list_view_is_zoom_level_default (NautilusFilesView *view)
{
@@ -3863,7 +3849,6 @@ nautilus_list_view_class_init (NautilusListViewClass *class)
nautilus_files_view_class->bump_zoom_level = nautilus_list_view_bump_zoom_level;
nautilus_files_view_class->can_zoom_in = nautilus_list_view_can_zoom_in;
nautilus_files_view_class->can_zoom_out = nautilus_list_view_can_zoom_out;
- nautilus_files_view_class->get_zoom_level_percentage = nautilus_list_view_get_zoom_level_percentage;
nautilus_files_view_class->is_zoom_level_default = nautilus_list_view_is_zoom_level_default;
nautilus_files_view_class->click_policy_changed = nautilus_list_view_click_policy_changed;
nautilus_files_view_class->clear = nautilus_list_view_clear;
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index 1c5f0a314..ecac79883 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -630,15 +630,6 @@ real_restore_standard_zoom_level (NautilusFilesView *files_view)
g_variant_new_int32 (NAUTILUS_GRID_ZOOM_LEVEL_LARGE));
}
-static gfloat
-real_get_zoom_level_percentage (NautilusFilesView *files_view)
-{
- NautilusViewIconController *self = NAUTILUS_VIEW_ICON_CONTROLLER (files_view);
-
- return (gfloat) get_icon_size_for_zoom_level (self->zoom_level) /
- NAUTILUS_GRID_ICON_SIZE_LARGE;
-}
-
static gboolean
real_is_zoom_level_default (NautilusFilesView *files_view)
{
@@ -1620,7 +1611,6 @@ nautilus_view_icon_controller_class_init (NautilusViewIconControllerClass *klass
files_view_class->scroll_to_file = real_scroll_to_file;
files_view_class->select_first = real_select_first;
files_view_class->restore_standard_zoom_level = real_restore_standard_zoom_level;
- files_view_class->get_zoom_level_percentage = real_get_zoom_level_percentage;
files_view_class->is_zoom_level_default = real_is_zoom_level_default;
files_view_class->compute_rename_popover_pointing_to = real_compute_rename_popover_pointing_to;
files_view_class->reveal_for_selection_context_menu = real_reveal_for_selection_context_menu;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]