changeset 1451:0e67a5992d51

gint -> gboolean where applicable.
author zas_
date Mon, 16 Mar 2009 18:19:11 +0000
parents ba0cd2792260
children 67b40740122e
files src/ui_utildlg.c src/ui_utildlg.h
diffstat 2 files changed, 21 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/src/ui_utildlg.c	Sun Mar 15 23:22:17 2009 +0000
+++ b/src/ui_utildlg.c	Mon Mar 16 18:19:11 2009 +0000
@@ -49,7 +49,7 @@
 {
 	GenericDialog *gd = data;
 	void (*func)(GenericDialog *, gpointer);
-	gint auto_close;
+	gboolean auto_close;
 
 	func = g_object_get_data(G_OBJECT(widget), "dialog_function");
 	auto_close = gd->auto_close;
@@ -58,14 +58,14 @@
 	if (auto_close) generic_dialog_close(gd);
 }
 
-static gint generic_dialog_default_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean generic_dialog_default_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
 	GenericDialog *gd = data;
 
 	if (event->keyval == GDK_Return && GTK_WIDGET_HAS_FOCUS(widget)
 	    && gd->default_cb)
 		{
-		gint auto_close;
+		gboolean auto_close;
 
 		auto_close = gd->auto_close;
 		gd->default_cb(gd, gd->data);
@@ -83,7 +83,7 @@
 			 G_CALLBACK(generic_dialog_default_key_press_cb), gd);
 }
 
-static gint generic_dialog_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+static gboolean generic_dialog_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
 	GenericDialog *gd = data;
 
@@ -96,10 +96,10 @@
 	return FALSE;
 }
 
-static gint generic_dialog_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
+static gboolean generic_dialog_delete_cb(GtkWidget *w, GdkEventAny *event, gpointer data)
 {
 	GenericDialog *gd = data;
-	gint auto_close;
+	gboolean auto_close;
 
 	auto_close = gd->auto_close;
 
@@ -121,7 +121,7 @@
 					     G_CALLBACK(generic_dialog_show_cb), gd);
 }
 
-gint generic_dialog_get_alternative_button_order(GtkWidget *widget)
+gboolean generic_dialog_get_alternative_button_order(GtkWidget *widget)
 {
 	GtkSettings *settings;
 	GObjectClass *klass;
@@ -138,10 +138,10 @@
 }
 
 GtkWidget *generic_dialog_add_button(GenericDialog *gd, const gchar *stock_id, const gchar *text,
-				     void (*func_cb)(GenericDialog *, gpointer), gint is_default)
+				     void (*func_cb)(GenericDialog *, gpointer), gboolean is_default)
 {
 	GtkWidget *button;
-	gint alternative_order;
+	gboolean alternative_order;
 
 	button = pref_button_new(NULL, stock_id, text, FALSE,
 				 G_CALLBACK(generic_dialog_click_cb), gd);
@@ -209,7 +209,7 @@
 static void generic_dialog_setup(GenericDialog *gd,
 				 const gchar *title,
 				 const gchar *role,
-				 GtkWidget *parent, gint auto_close,
+				 GtkWidget *parent, gboolean auto_close,
 				 void (*cancel_cb)(GenericDialog *, gpointer), gpointer data)
 {
 	GtkWidget *vbox;
@@ -282,7 +282,7 @@
 
 GenericDialog *generic_dialog_new(const gchar *title,
 				  const gchar *role,
-				  GtkWidget *parent, gint auto_close,
+				  GtkWidget *parent, gboolean auto_close,
 				  void (*cancel_cb)(GenericDialog *, gpointer), gpointer data)
 {
 	GenericDialog *gd;
@@ -350,7 +350,7 @@
 }
 
 GtkWidget *file_dialog_add_button(FileDialog *fdlg, const gchar *stock_id, const gchar *text,
-				  void (*func_cb)(FileDialog *, gpointer), gint is_default)
+				  void (*func_cb)(FileDialog *, gpointer), gboolean is_default)
 {
 	return generic_dialog_add_button(GENERIC_DIALOG(fdlg), stock_id, text,
 					 (gpointer)func_cb, is_default);
@@ -425,7 +425,7 @@
 			 G_CALLBACK(file_dialog_entry_cb), fdlg);
 }
 
-void file_dialog_add_filter(FileDialog *fdlg, const gchar *filter, const gchar *filter_desc, gint set)
+void file_dialog_add_filter(FileDialog *fdlg, const gchar *filter, const gchar *filter_desc, gboolean set)
 {
 	if (!fdlg->entry) return;
 	path_selection_add_filter(fdlg->entry, filter, filter_desc, set);
@@ -437,7 +437,7 @@
 	path_selection_clear_filter(fdlg->entry);
 }
 
-void file_dialog_sync_history(FileDialog *fdlg, gint dir_only)
+void file_dialog_sync_history(FileDialog *fdlg, gboolean dir_only)
 {
 	if (!fdlg->dest_path) return;
 
--- a/src/ui_utildlg.h	Sun Mar 15 23:22:17 2009 +0000
+++ b/src/ui_utildlg.h	Mon Mar 16 18:19:11 2009 +0000
@@ -24,7 +24,7 @@
 
 	GtkWidget *hbox;	/* button hbox */
 
-	gint auto_close;
+	gboolean auto_close;
 
 	void (*default_cb)(GenericDialog *, gpointer);
 	void (*cancel_cb)(GenericDialog *, gpointer);
@@ -42,7 +42,6 @@
 	GtkWidget *entry;
 
 	gint type;
-	gint multiple_files;
 
 	FileData *source_fd;
 	GList *source_list;
@@ -54,18 +53,18 @@
 /* When parent is not NULL, the dialog is set as a transient of the window containing parent */
 GenericDialog *generic_dialog_new(const gchar *title,
 				  const gchar *role,
-				  GtkWidget *parent, gint auto_close,
+				  GtkWidget *parent, gboolean auto_close,
 				  void (*cancel_cb)(GenericDialog *, gpointer), gpointer data);
 void generic_dialog_close(GenericDialog *gd);
 
 GtkWidget *generic_dialog_add_button(GenericDialog *gd, const gchar *stock_id, const gchar *text,
-				     void (*func_cb)(GenericDialog *, gpointer), gint is_default);
+				     void (*func_cb)(GenericDialog *, gpointer), gboolean is_default);
 void generic_dialog_attach_default(GenericDialog *gd, GtkWidget *widget);
 
 GtkWidget *generic_dialog_add_message(GenericDialog *gd, const gchar *icon_stock_id,
 				      const gchar *heading, const gchar *text);
 
-gint generic_dialog_get_alternative_button_order(GtkWidget *widget);
+gboolean generic_dialog_get_alternative_button_order(GtkWidget *widget);
 
 GenericDialog *warning_dialog(const gchar *heading, const gchar *text,
 			      const gchar *icon_stock_id, GtkWidget *parent);
@@ -77,7 +76,7 @@
 void file_dialog_close(FileDialog *fd);
 
 GtkWidget *file_dialog_add_button(FileDialog *fd, const gchar *stock_id, const gchar *text,
-				  void (*func_cb)(FileDialog *, gpointer), gint is_default);
+				  void (*func_cb)(FileDialog *, gpointer), gboolean is_default);
 
 /* default_path is default base directory, and is only used if no history
  *  exists for history_key (HOME is used if default_path is NULL).
@@ -87,9 +86,9 @@
 void file_dialog_add_path_widgets(FileDialog *fd, const gchar *default_path, const gchar *path,
 				  const gchar *history_key, const gchar *filter, const gchar *filter_desc);
 
-void file_dialog_add_filter(FileDialog *fd, const gchar *filter, const gchar *filter_desc, gint set);
+void file_dialog_add_filter(FileDialog *fd, const gchar *filter, const gchar *filter_desc, gboolean set);
 void file_dialog_clear_filter(FileDialog *fd);
-void file_dialog_sync_history(FileDialog *fd, gint dir_only);
+void file_dialog_sync_history(FileDialog *fd, gboolean dir_only);
 
 
 #endif