FileChooserDialog with ACTION_SELECT_FOLDER dies



Hi,

if I run stock FileChooserDialog example from gtkmm source code with 
--g-fatal-warnings, click on "Choose Folder" button and attempt to
create a new folder and then select it, the example dies:

Gtk-CRITICAL **: file gtktreemodelsort.c: line 1275
(gtk_tree_model_sort_real_unref_node): assertion `GTK_TREE_MODEL_SORT
(tree_model)->stamp == iter->stamp' failed aborting...
Abort (core dumped)

Bottom 14 frames:

#1  0x00c0ee49 in raise () from /lib/tls/libc.so.6
#2  0x00c10872 in abort () from /lib/tls/libc.so.6
#3  0x00256d27 in g_logv () from /usr/lib/libglib-2.0.so.0
#4  0x00256d64 in g_log () from /usr/lib/libglib-2.0.so.0
#5  0x03a0182b in gtk_tree_model_sort_real_unref_node
(tree_model=0x9fc9460, iter=0xfee40490,
    propagate_unref=1) at gtktreemodelsort.c:1275
#6  0x03a01931 in gtk_tree_model_sort_unref_node (tree_model=0x0,
iter=0x0)
    at gtktreemodelsort.c:1311
#7  0x039f8eef in gtk_tree_model_unref_node (tree_model=0x9fc9460,
iter=0xfee40490)
    at gtktreemodel.c:1250
#8  0x039f9e44 in gtk_tree_row_reference_unref_path (path=0x9ff37b8,
model=0x9fc9460, depth=1)
    at gtktreemodel.c:1750
#9  0x039fa36c in gtk_tree_row_reference_free (reference=0x9ff37a8) at
gtktreemodel.c:1958
#10 0x03a1cb3f in gtk_tree_view_set_model (tree_view=0x9fc5b08,
model=0x9ff3480)
    at gtktreeview.c:8639
#11 0x038ef2cc in set_list_model (impl=0x9e45000) at
gtkfilechooserdefault.c:3649
#12 0x038ef518 in gtk_file_chooser_default_set_current_folder
(chooser=0x9e45000, path=0x0,
    error=0xfee405f8) at gtkfilechooserdefault.c:3729
#13 0x038e5460 in _gtk_file_chooser_set_current_folder_path
(chooser=0x9e45000, path=0x9fc76a0,
    error=0xfee405f8) at gtkfilechooser.c:891
#14 0x038ea0aa in change_folder_and_display_error (impl=0x9e45000,
path=0x9fc76a0)
    at gtkfilechooserdefault.c:769
---------------------------------------------

The dialog lets me create and assign a new folder name, but then it
wouldn't show the name in the file list. When I try to go one directory
up it crashes. The folder is created in the file system.

% pkg-config --modversion gtkmm-2.4
2.4.4

This happens on Fedora Core 2.

Is there a way to disable 'Create Folder' button in the top right corner
of the dialog?

I examined the interface and set_action() take only an enum value (one
of four). The stock example rightfully uses
Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER in 
on_button_folder_clicked() which accoding to Gtk+ documentation should
disable 'Create Folder' button (if my interpretation is correct):

"Indicates an Open mode for selecting folders. 
 The file chooser will let the user pick an existing folder."

Any hint?

thanks,
-Vlad
-- 
_____________________________________________________________
Vladislav Grinchenko       http://home.comcast.net/~3rdshift/
                                 e-mail: 3rdshift comcast net
                                                   
      Focus on quality, and productivity will follow.
_____________________________________________________________




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