diff src/dupe.c @ 1420:3a9fb1b52559

Use gboolean where applicable, for the sake of consistency.
author zas_
date Thu, 12 Mar 2009 21:06:37 +0000
parents a0bd58a6535f
children cf4029d10d38
line wrap: on
line diff
--- a/src/dupe.c	Wed Mar 11 23:36:01 2009 +0000
+++ b/src/dupe.c	Thu Mar 12 21:06:37 2009 +0000
@@ -91,7 +91,7 @@
  */
 
 
-static void dupe_window_update_count(DupeWindow *dw, gint count_only)
+static void dupe_window_update_count(DupeWindow *dw, gboolean count_only)
 {
 	gchar *text;
 
@@ -133,7 +133,7 @@
 	return (n * ((n + 1) / 2));
 }
 
-static void dupe_window_update_progress(DupeWindow *dw, const gchar *status, gdouble value, gint force)
+static void dupe_window_update_progress(DupeWindow *dw, const gchar *status, gdouble value, gboolean force)
 {
 	const gchar *status_text;
 
@@ -681,13 +681,13 @@
 	return g_list_reverse(list);
 }
 
-static gint dupe_listview_item_is_selected(DupeWindow *dw, DupeItem *di, GtkWidget *listview)
+static gboolean dupe_listview_item_is_selected(DupeWindow *dw, DupeItem *di, GtkWidget *listview)
 {
 	GtkTreeModel *store;
 	GtkTreeSelection *selection;
 	GList *slist;
 	GList *work;
-	gint found = FALSE;
+	gboolean found = FALSE;
 
 	selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview));
 	slist = gtk_tree_selection_get_selected_rows(selection, &store);
@@ -788,7 +788,7 @@
 	dupe_match_unlink_child(b, a);
 }
 
-static void dupe_match_link_clear(DupeItem *parent, gint unlink_children)
+static void dupe_match_link_clear(DupeItem *parent, gboolean unlink_children)
 {
 	GList *work;
 
@@ -1112,7 +1112,7 @@
  * ------------------------------------------------------------------
  */
 
-static gint dupe_match(DupeItem *a, DupeItem *b, DupeMatchType mask, gdouble *rank, gint fast)
+static gboolean dupe_match(DupeItem *a, DupeItem *b, DupeMatchType mask, gdouble *rank, gint fast)
 {
 	*rank = 0.0;
 
@@ -1420,7 +1420,7 @@
 	return NULL;
 }
 
-static gint dupe_check_cb(gpointer data)
+static gboolean dupe_check_cb(gpointer data)
 {
 	DupeWindow *dw = data;
 
@@ -1696,7 +1696,7 @@
 	dupe_window_update_count(dw, FALSE);
 }
 
-static gint dupe_item_remove_by_path(DupeWindow *dw, const gchar *path)
+static gboolean dupe_item_remove_by_path(DupeWindow *dw, const gchar *path)
 {
 	DupeItem *di;
 
@@ -1709,7 +1709,7 @@
 }
 
 static void dupe_files_add(DupeWindow *dw, CollectionData *collection, CollectInfo *info,
-			   FileData *fd, gint recurse)
+			   FileData *fd, gboolean recurse)
 {
 	DupeItem *di = NULL;
 
@@ -1777,7 +1777,7 @@
 	dupe_check_start(dw);
 }
 
-void dupe_window_add_files(DupeWindow *dw, GList *list, gint recurse)
+void dupe_window_add_files(DupeWindow *dw, GList *list, gboolean recurse)
 {
 	GList *work;
 
@@ -2293,7 +2293,7 @@
 	return menu;
 }
 
-static gint dupe_listview_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean dupe_listview_press_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
 {
 	DupeWindow *dw = data;
 	GtkTreeModel *store;
@@ -2376,7 +2376,7 @@
 	return FALSE;
 }
 
-static gint dupe_listview_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
+static gboolean dupe_listview_release_cb(GtkWidget *widget, GdkEventButton *bevent, gpointer data)
 {
 	DupeWindow *dw = data;
 	GtkTreeModel *store;
@@ -2555,11 +2555,8 @@
 static GtkWidget *dupe_menu_popup_second(DupeWindow *dw, DupeItem *di)
 {
 	GtkWidget *menu;
-	gint notempty;
-	gint on_row;
-
-	on_row = (di != NULL);
-	notempty = (dw->second_list != NULL);
+	gboolean notempty = (dw->second_list != NULL);
+	gboolean on_row = (di != NULL);
 
 	menu = popup_menu_short_lived();
 	menu_item_add_sensitive(menu, _("_View"), on_row,
@@ -2724,7 +2721,7 @@
 		     "cell-background-set", set, NULL);
 }
 
-static void dupe_listview_add_column(DupeWindow *dw, GtkWidget *listview, gint n, const gchar *title, gint image, gint right_justify)
+static void dupe_listview_add_column(DupeWindow *dw, GtkWidget *listview, gint n, const gchar *title, gboolean image, gboolean right_justify)
 {
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *renderer;
@@ -2768,7 +2765,7 @@
 	gtk_tree_view_append_column(GTK_TREE_VIEW(listview), column);
 }
 
-static void dupe_listview_set_height(GtkWidget *listview, gint thumb)
+static void dupe_listview_set_height(GtkWidget *listview, gboolean thumb)
 {
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *cell;
@@ -2855,11 +2852,11 @@
 	*y = cy;
 }
 
-static gint dupe_window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean dupe_window_keypress_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
 	DupeWindow *dw = data;
-	gint stop_signal = FALSE;
-	gint on_second;
+	gboolean stop_signal = FALSE;
+	gboolean on_second;
 	GtkWidget *listview;
 	GtkTreeModel *store;
 	GtkTreeSelection *selection;
@@ -3470,7 +3467,7 @@
 		}
 }
 
-static void dupe_dest_set(GtkWidget *widget, gint enable)
+static void dupe_dest_set(GtkWidget *widget, gboolean enable)
 {
 	if (enable)
 		{