summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-02-29 15:39:01 +0100
committerraveit65 <[email protected]>2020-03-25 12:40:29 +0100
commitfbcbacb489100dbb876de3b2f5226f87e8f10092 (patch)
tree3baff19256d500cc3fd52bd848415faa623c9e60 /src
parent05e729bf081b377db659c5a98fc7ef912eb5f092 (diff)
downloadengrampa-fbcbacb489100dbb876de3b2f5226f87e8f10092.tar.bz2
engrampa-fbcbacb489100dbb876de3b2f5226f87e8f10092.tar.xz
gtk-utils: Remove _gtk_count_selected
Diffstat (limited to 'src')
-rw-r--r--src/fr-window.c2
-rw-r--r--src/gtk-utils.c23
-rw-r--r--src/gtk-utils.h1
3 files changed, 1 insertions, 25 deletions
diff --git a/src/fr-window.c b/src/fr-window.c
index b01af1a..d44711d 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -3590,7 +3590,7 @@ fr_window_get_file_list (FrWindow *window)
int
fr_window_get_n_selected_files (FrWindow *window)
{
- return _gtk_count_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (window->priv->list_view)));
+ return gtk_tree_selection_count_selected_rows (gtk_tree_view_get_selection (GTK_TREE_VIEW (window->priv->list_view)));
}
diff --git a/src/gtk-utils.c b/src/gtk-utils.c
index 7a6ce1d..263773a 100644
--- a/src/gtk-utils.c
+++ b/src/gtk-utils.c
@@ -28,29 +28,6 @@
#define LOAD_BUFFER_SIZE 65536
-static void
-count_selected (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer data)
-{
- int *n = data;
- *n = *n + 1;
-}
-
-
-int
-_gtk_count_selected (GtkTreeSelection *selection)
-{
- int n = 0;
-
- if (selection == NULL)
- return 0;
- gtk_tree_selection_selected_foreach (selection, count_selected, &n);
- return n;
-}
-
-
GtkWidget*
_gtk_message_dialog_new (GtkWindow *parent,
GtkDialogFlags flags,
diff --git a/src/gtk-utils.h b/src/gtk-utils.h
index 9d43078..3d6c260 100644
--- a/src/gtk-utils.h
+++ b/src/gtk-utils.h
@@ -27,7 +27,6 @@
#include <gio/gio.h>
#include <gtk/gtk.h>
-int _gtk_count_selected (GtkTreeSelection *selection);
GtkWidget* _gtk_message_dialog_new (GtkWindow *parent,
GtkDialogFlags flags,
const char *icon_name,