[gtk+/bgo141154-filechooser-icon-view: 12/23] View mode assert for new_folder_button_clicked



commit 00fe8b8c09c5c750c59c053ff9379dc3e466b53c
Author: Simo KivimÃki <simo kivimaki fi>
Date:   Sat Apr 16 12:24:49 2011 +0300

    View mode assert for new_folder_button_clicked

 gtk/gtkfilechooserdefault.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 023a117..9687eaa 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -2244,6 +2244,11 @@ new_folder_button_clicked (GtkButton             *button,
   GtkTreeIter iter;
   GtkTreePath *path;
 
+  /* icon view available only in the GTK_FILE_CHOOSER_ACTION_OPEN where
+   * new folder button is not visible
+   */
+  g_assert (impl->view_mode == VIEW_MODE_LIST);
+
   if (!impl->browse_files_model)
     return; /* FIXME: this sucks.  Disable the New Folder button or something. */
 
@@ -2262,7 +2267,6 @@ new_folder_button_clicked (GtkButton             *button,
 			    path,
 			    impl->list_name_column,
 			    TRUE);
-  /* icon view ignored because there's no possibility to create new folder */
 
   gtk_tree_path_free (path);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]