[gthumb/gthumb-3-4] rename folder: use the display name if the edit name is not available
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-3-4] rename folder: use the display name if the edit name is not available
- Date: Tue, 4 Jul 2017 16:20:01 +0000 (UTC)
commit a59045b982e26e534455f33437b1421ab86270a6
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Jul 1 19:27:32 2017 +0200
rename folder: use the display name if the edit name is not available
gthumb/gth-folder-tree.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/gth-folder-tree.c b/gthumb/gth-folder-tree.c
index bcec3f2..606db85 100644
--- a/gthumb/gth-folder-tree.c
+++ b/gthumb/gth-folder-tree.c
@@ -1887,6 +1887,7 @@ gth_folder_tree_start_editing (GthFolderTree *folder_tree,
RenameData *data;
GtkWidget *toplevel;
GtkWidget *dialog;
+ const char *edit_name;
if (! gth_folder_tree_get_iter (folder_tree, file, &iter, NULL))
return;
@@ -1914,8 +1915,11 @@ gth_folder_tree_start_editing (GthFolderTree *folder_tree,
&iter,
COLUMN_FILE_DATA, &file_data,
-1);
- gtk_entry_set_text (GTK_ENTRY (gth_request_dialog_get_entry (GTH_REQUEST_DIALOG (dialog))),
- g_file_info_get_edit_name (file_data->info));
+ edit_name = g_file_info_get_edit_name (file_data->info);
+ if (edit_name == NULL)
+ edit_name = g_file_info_get_display_name (file_data->info);
+ if (edit_name != NULL)
+ gtk_entry_set_text (GTK_ENTRY (gth_request_dialog_get_entry (GTH_REQUEST_DIALOG (dialog))),
edit_name);
gtk_widget_show (dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]