comparison src/utilops.c @ 1452:67b40740122e

gint -> gboolean where applicable.
author zas_
date Mon, 16 Mar 2009 19:11:39 +0000
parents 03384485676d
children 24a12aa0cb54
comparison
equal deleted inserted replaced
1451:0e67a5992d51 1452:67b40740122e
45 #define DIALOG_DEF_IMAGE_DIM_Y 150 45 #define DIALOG_DEF_IMAGE_DIM_Y 150
46 46
47 static void generic_dialog_add_image(GenericDialog *gd, GtkWidget *box, 47 static void generic_dialog_add_image(GenericDialog *gd, GtkWidget *box,
48 FileData *fd1, const gchar *header1, 48 FileData *fd1, const gchar *header1,
49 FileData *fd2, const gchar *header2, 49 FileData *fd2, const gchar *header2,
50 gint show_filename) 50 gboolean show_filename)
51 { 51 {
52 ImageWindow *imd; 52 ImageWindow *imd;
53 GtkWidget *hbox = NULL; 53 GtkWidget *hbox = NULL;
54 GtkWidget *vbox; 54 GtkWidget *vbox;
55 GtkWidget *label = NULL; 55 GtkWidget *label = NULL;
152 *-------------------------------------------------------------------------- 152 *--------------------------------------------------------------------------
153 */ 153 */
154 154
155 GenericDialog *file_util_gen_dlg(const gchar *title, 155 GenericDialog *file_util_gen_dlg(const gchar *title,
156 const gchar *role, 156 const gchar *role,
157 GtkWidget *parent, gint auto_close, 157 GtkWidget *parent, gboolean auto_close,
158 void (*cancel_cb)(GenericDialog *, gpointer), gpointer data) 158 void (*cancel_cb)(GenericDialog *, gpointer), gpointer data)
159 { 159 {
160 GenericDialog *gd; 160 GenericDialog *gd;
161 161
162 gd = generic_dialog_new(title, role, parent, auto_close, cancel_cb, data); 162 gd = generic_dialog_new(title, role, parent, auto_close, cancel_cb, data);
409 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); 409 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
410 gtk_tree_selection_select_iter(selection, &iter); 410 gtk_tree_selection_select_iter(selection, &iter);
411 } 411 }
412 } 412 }
413 413
414 static GtkWidget *file_util_dialog_add_list(GtkWidget *box, GList *list, gint full_paths, gboolean with_sidecars) 414 static GtkWidget *file_util_dialog_add_list(GtkWidget *box, GList *list, gboolean full_paths, gboolean with_sidecars)
415 { 415 {
416 GtkWidget *scrolled; 416 GtkWidget *scrolled;
417 GtkWidget *view; 417 GtkWidget *view;
418 GtkListStore *store; 418 GtkListStore *store;
419 419
1129 GtkTreeSelection *selection; 1129 GtkTreeSelection *selection;
1130 GtkTreeIter iter; 1130 GtkTreeIter iter;
1131 const gchar *front; 1131 const gchar *front;
1132 const gchar *end; 1132 const gchar *end;
1133 const gchar *format; 1133 const gchar *format;
1134 gint valid; 1134 gboolean valid;
1135 gint start_n; 1135 gint start_n;
1136 gint padding; 1136 gint padding;
1137 gint n; 1137 gint n;
1138 gint mode; 1138 gint mode;
1139 1139
1229 ud->update_idle_id = -1; 1229 ud->update_idle_id = -1;
1230 return FALSE; 1230 return FALSE;
1231 } 1231 }
1232 1232
1233 static void file_util_rename_preview_order_cb(GtkTreeModel *treemodel, GtkTreePath *tpath, 1233 static void file_util_rename_preview_order_cb(GtkTreeModel *treemodel, GtkTreePath *tpath,
1234 GtkTreeIter *iter, gpointer data) 1234 GtkTreeIter *iter, gpointer data)
1235 { 1235 {
1236 UtilityData *ud = data; 1236 UtilityData *ud = data;
1237 1237
1238 if (ud->update_idle_id != -1) return; 1238 if (ud->update_idle_id != -1) return;
1239 1239
1240 ud->update_idle_id = g_idle_add(file_util_rename_idle_cb, ud); 1240 ud->update_idle_id = g_idle_add(file_util_rename_idle_cb, ud);
1241 } 1241 }
1242 1242
1243 1243
1244 static gboolean file_util_preview_cb(GtkTreeSelection *selection, GtkTreeModel *store, 1244 static gboolean file_util_preview_cb(GtkTreeSelection *selection, GtkTreeModel *store,
1245 GtkTreePath *tpath, gboolean path_currently_selected, 1245 GtkTreePath *tpath, gboolean path_currently_selected,
1246 gpointer data) 1246 gpointer data)
1247 { 1247 {
1248 UtilityData *ud = data; 1248 UtilityData *ud = data;
1249 GtkTreeIter iter; 1249 GtkTreeIter iter;
1250 FileData *fd = NULL; 1250 FileData *fd = NULL;
1251 1251
1383 1383
1384 gtk_widget_show(GENERIC_DIALOG(fdlg)->dialog); 1384 gtk_widget_show(GENERIC_DIALOG(fdlg)->dialog);
1385 } 1385 }
1386 1386
1387 1387
1388 static GtkWidget *furm_simple_vlabel(GtkWidget *box, const gchar *text, gint expand) 1388 static GtkWidget *furm_simple_vlabel(GtkWidget *box, const gchar *text, gboolean expand)
1389 { 1389 {
1390 GtkWidget *vbox; 1390 GtkWidget *vbox;
1391 GtkWidget *label; 1391 GtkWidget *label;
1392 1392
1393 vbox = gtk_vbox_new(FALSE, 0); 1393 vbox = gtk_vbox_new(FALSE, 0);
1738 ud->messages.desc_source_fd = ""; 1738 ud->messages.desc_source_fd = "";
1739 ud->messages.fail = _("Move failed"); 1739 ud->messages.fail = _("Move failed");
1740 1740
1741 file_util_dialog_run(ud); 1741 file_util_dialog_run(ud);
1742 } 1742 }
1743
1743 static void file_util_copy_full(FileData *source_fd, GList *source_list, const gchar *dest_path, GtkWidget *parent, UtilityPhase phase) 1744 static void file_util_copy_full(FileData *source_fd, GList *source_list, const gchar *dest_path, GtkWidget *parent, UtilityPhase phase)
1744 { 1745 {
1745 UtilityData *ud; 1746 UtilityData *ud;
1746 GList *flist = filelist_copy(source_list); 1747 GList *flist = filelist_copy(source_list);
1747 1748