Use a GtkComboBox in SELECT_FOLDER mode (#157726).
2004-12-15 James M. Cape <jcape@ignore-your.tv> * gtk/gtkfilechooserbutton.c (struct _GtkFileChooserButtonPrivate) (gtk_file_chooser_button_init) (gtk_file_chooser_button_file_chooser_iface_init) (gtk_file_chooser_button_add_shortcut_folder) (gtk_file_chooser_button_remove_shortcut_folder) (gtk_file_chooser_button_constructor) (gtk_file_chooser_button_set_property) (gtk_file_chooser_button_destroy) (gtk_file_chooser_button_finalize) (get_icon_theme) (get_display_name_for_path) (model_get_type_position) (model_free_row_data) (model_add_special) (model_add_other) (model_add_volumes) (model_add_bookmarks) (model_update_current_folder) (model_remove_rows) (filter_model_visible_func) (combo_box_row_separator_func) (name_cell_data_func) (update_combo_box) (fs_volumes_changed_cb) (fs_bookmarks_changed_cb) (combo_box_changed_cb) (change_icon_size): Use a GtkComboBox in SELECT_FOLDER mode (#157726). * gtk/gtkfilechooserbutton.c: * gtk/gtkfilechooserbutton.h (gtk_file_chooser_button_new) (gtk_file_chooser_button_new_with_backend): Add @action to constructors to match other GtkFileChooser impls. API CHANGE. * docs/tools/widgets.c (create_file_button): * tests/testfilechooserbutton.c (main): Update callers. * docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml: Reflect API change. * tests/testfilechooserbutton.c: Add LGPL license. (main): Added GOption parser for --backend and --right-to-left cmd line args. (add_pwds_parent_as_shortcut_clicked_cb) (del_pwds_parent_as_shortcut_clicked_cb) (tests_button_clicked_cb): Add shortcut_folders test. (chooser_current_folder_changed_cb) (chooser_selection_changed_cb) (chooser_file_activated_cb) (chooser_update_preview_cb): Print URIS, not filenames.
This commit is contained in:
committed by
James M. Cape
parent
43f8526198
commit
b418bf3aa4
@ -74,6 +74,7 @@ This should not be accessed directly. Use the accessor functions below.
|
||||
</para>
|
||||
|
||||
@title:
|
||||
@action:
|
||||
@Returns:
|
||||
|
||||
|
||||
@ -83,6 +84,7 @@ This should not be accessed directly. Use the accessor functions below.
|
||||
</para>
|
||||
|
||||
@title:
|
||||
@action:
|
||||
@backend:
|
||||
@Returns:
|
||||
|
||||
|
||||
@ -444,13 +444,14 @@ create_file_button (void)
|
||||
vbox = gtk_vbox_new (FALSE, 12);
|
||||
vbox2 = gtk_vbox_new (FALSE, 3);
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
picker = gtk_file_chooser_button_new ("File Chooser Button");
|
||||
picker = gtk_file_chooser_button_new ("File Chooser Button",
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
gtk_widget_set_size_request (picker, 150, -1);
|
||||
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (picker), "/etc/yum.conf");
|
||||
gtk_container_add (GTK_CONTAINER (align), picker);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), align, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2),
|
||||
gtk_label_new ("File Button (Open)"),
|
||||
gtk_label_new ("File Button (Files)"),
|
||||
FALSE, FALSE, 0);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
@ -461,15 +462,14 @@ create_file_button (void)
|
||||
|
||||
vbox2 = gtk_vbox_new (FALSE, 3);
|
||||
align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
|
||||
picker = gtk_file_chooser_button_new ("File Chooser Button");
|
||||
gtk_file_chooser_set_action (GTK_FILE_CHOOSER (picker),
|
||||
GTK_FILE_CHOOSER_ACTION_SAVE);
|
||||
picker = gtk_file_chooser_button_new ("File Chooser Button",
|
||||
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||
gtk_widget_set_size_request (picker, 150, -1);
|
||||
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (picker), "/etc/yum.conf");
|
||||
gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (picker), "/");
|
||||
gtk_container_add (GTK_CONTAINER (align), picker);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2), align, FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox2),
|
||||
gtk_label_new ("File Button (Save)"),
|
||||
gtk_label_new ("File Button (Select Folder)"),
|
||||
FALSE, FALSE, 0);
|
||||
gtk_box_pack_start (GTK_BOX (vbox),
|
||||
vbox2, TRUE, TRUE, 0);
|
||||
|
||||
Reference in New Issue
Block a user