[nautilus] files-view: Remove unused API
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] files-view: Remove unused API
- Date: Sat, 24 Mar 2018 08:57:13 +0000 (UTC)
commit 52141cbba52f94d1643d5f8d0e5db7d95b7a341d
Author: Rahul Verma <rv404674 gmail com>
Date: Fri Mar 23 18:11:47 2018 +0530
files-view: Remove unused API
nautilus_files_view_handle_scroll_event() is being called only once by nautilus_files_view_scroll_event()
in the whole nautilus code base.
So remove it's declaration from it's header file, and move it's code to
nautilus_files_view_scroll_event() directly.
Note - nautilus_files_view_handle_scroll_event() used to be used by compact view, which was removed in
commit https://gitlab.gnome.org/GNOME/nautilus/commit/241e462024070d9f79f4816256fc00ff5119e25f
src/nautilus-files-view.c | 27 +++++++--------------------
src/nautilus-files-view.h | 4 +---
2 files changed, 8 insertions(+), 23 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index a18cd8cf8..fe276e277 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -8914,14 +8914,17 @@ nautilus_files_view_set_property (GObject *object,
}
}
-
-gboolean
-nautilus_files_view_handle_scroll_event (NautilusFilesView *directory_view,
- GdkEventScroll *event)
+/* handle Ctrl+Scroll, which will cause a zoom-in/out */
+static gboolean
+nautilus_files_view_scroll_event (GtkWidget *widget,
+ GdkEventScroll *event)
{
+ NautilusFilesView *directory_view;
static gdouble total_delta_y = 0;
gdouble delta_x, delta_y;
+ directory_view = NAUTILUS_FILES_VIEW (widget);
+
if (event->state & GDK_CONTROL_MASK)
{
switch (event->direction)
@@ -8983,22 +8986,6 @@ nautilus_files_view_handle_scroll_event (NautilusFilesView *directory_view,
return FALSE;
}
-/* handle Shift+Scroll, which will cause a zoom-in/out */
-static gboolean
-nautilus_files_view_scroll_event (GtkWidget *widget,
- GdkEventScroll *event)
-{
- NautilusFilesView *directory_view;
-
- directory_view = NAUTILUS_FILES_VIEW (widget);
- if (nautilus_files_view_handle_scroll_event (directory_view, event))
- {
- return TRUE;
- }
-
- return FALSE;
-}
-
static void
action_reload_enabled_changed (GActionGroup *action_group,
diff --git a/src/nautilus-files-view.h b/src/nautilus-files-view.h
index b774b983c..ea51e53f7 100644
--- a/src/nautilus-files-view.h
+++ b/src/nautilus-files-view.h
@@ -280,8 +280,6 @@ gboolean nautilus_files_view_should_show_file (Nautil
NautilusFile *file);
gboolean nautilus_files_view_should_sort_directories_first (NautilusFilesView *view);
void nautilus_files_view_ignore_hidden_file_preferences (NautilusFilesView *view);
-gboolean nautilus_files_view_handle_scroll_event (NautilusFilesView *view,
- GdkEventScroll *event);
void nautilus_files_view_add_subdirectory (NautilusFilesView *view,
NautilusDirectory *directory);
@@ -329,4 +327,4 @@ void nautilus_files_view_action_show_hidden_files (NautilusFilesV
GActionGroup * nautilus_files_view_get_action_group (NautilusFilesView *view);
GtkWidget* nautilus_files_view_get_content_widget (NautilusFilesView *view);
-G_END_DECLS
\ No newline at end of file
+G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]