Compare commits

...

23 Commits

Author SHA1 Message Date
Federico Mena Quintero
e466f089a6 Use the correct function to count selected rows 2012-10-17 14:52:10 -05:00
Federico Mena Quintero
9ecd0d7918 Fix function name 2012-10-17 14:45:32 -05:00
Simo Kivimäki
d94a2fc92b Updating also view mode combo box selection when loading GSettings. 2012-10-17 14:39:59 -05:00
Federico Mena Quintero
97e8f9f717 Use a folder icon for the edited folder name when in icon-view mode 2012-10-17 14:39:57 -05:00
Federico Mena Quintero
7629a773c0 Start editing the icon view in an idle handler
Apparently, GtkIconView will erroneously put the editable entry at (0, 0) and will
not size-allocate it properly, if the editing is started right after adding the new,
editable item.  GtkIconView wants to run its layout cycle before starting an
editing operation.  So, we install an idle handler after adding the editable item,
and start editing in the handler itself.
2012-10-17 14:39:57 -05:00
Federico Mena Quintero
8a0cf6b850 Save the list/icon view mode in GSettings 2012-10-17 14:39:57 -05:00
Simo Kivimäki
d752c30dbb Allow create folder also in icon view. Entering the file name does not work! 2012-10-17 14:39:22 -05:00
Federico Mena Quintero
23c5c8f86e Rename awkwardly-named fields for icon sizes
list_icon_size -> icon_size_for_list_view
icon_icon_size -> icon_size_for_icon_view
2012-10-17 14:39:21 -05:00
Simo Kivimäki
f1bd150678 Not trying to use list view columns in the icon view. 2012-10-17 14:39:21 -05:00
Simo Kivimäki
35b73f157e Update_cell_renderer_attributes skipped in the icon view. 2012-10-17 14:37:22 -05:00
Simo Kivimäki
ee3a416f34 Handling current view correctly in change_icon_theme 2012-10-17 14:35:18 -05:00
Simo Kivimäki
00fe8b8c09 View mode assert for new_folder_button_clicked 2012-10-17 14:35:18 -05:00
Simo Kivimäki
b2ce089e83 Fixed copying selection from old view to the target view
Commit 2c53dbdb2ce3b942f0a7 set view to NULL too early.
2012-10-17 14:35:18 -05:00
Federico Mena Quintero
6b8dcd9f09 Move some variable declarations
We prefer declarations in the beginning of blocks.
2012-10-17 14:35:18 -05:00
Federico Mena Quintero
d39295e655 Remove an unused typedef 2012-10-17 14:35:18 -05:00
Federico Mena Quintero
5ab5122ce6 Don't frob the treeview if that's not the current view mode
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-17 14:33:32 -05:00
Federico Mena Quintero
5b9d331871 Clarify the names of two macros
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-17 14:32:10 -05:00
Federico Mena Quintero
147df8dbe4 Set the model on the current view with a bit less code
A tiny bit less code, by setting the 'model' property instead of
calling explicit functions for each view type.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-10-17 14:32:09 -05:00
Simo Kivimäki
2c88c0b622 GtkFileChooserDefault: View mode combo box and changing between the icon and list view widgets
Also always using current view and model

relates to https://bugzilla.gnome.org/show_bug.cgi?id=141154
2012-10-17 14:32:09 -05:00
Simo Kivimäki
7dad20e8b8 GtkFileChooserDefault: Populating icon view's icon to file system model
relates to https://bugzilla.gnome.org/show_bug.cgi?id=141154
2012-10-17 14:31:37 -05:00
Simo Kivimäki
df98df6cea GtkFileChooserDefault: Setting selection multiple mode also for icon view
relates to https://bugzilla.gnome.org/show_bug.cgi?id=141154
2012-10-17 14:31:36 -05:00
Simo Kivimäki
64279816d7 GtkFileChooserDefault: Alternative icon view widget
relates to https://bugzilla.gnome.org/show_bug.cgi?id=141154
2012-10-17 14:29:29 -05:00
Simo Kivimäki
6395b40c0f Abstraction functions for tree view and icon view selection handling and setting model
relates to https://bugzilla.gnome.org/show_bug.cgi?id=141154
2012-10-17 14:26:48 -05:00
3 changed files with 800 additions and 219 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -31,6 +31,7 @@
#include "gtktreestore.h"
#include "gtktreeview.h"
#include "gtkbox.h"
#include "gtkiconview.h"
G_BEGIN_DECLS
@@ -139,6 +140,11 @@ typedef enum {
RELOAD_HAS_FOLDER /* We have a folder, although it may not be completely loaded yet; no need to reload */
} ReloadState;
typedef enum {
VIEW_MODE_LIST,
VIEW_MODE_ICON
} ViewMode;
typedef enum {
LOCATION_MODE_PATH_BAR,
LOCATION_MODE_FILENAME_ENTRY
@@ -173,7 +179,10 @@ struct _GtkFileChooserDefault
GtkWidget *browse_shortcuts_popup_menu;
GtkWidget *browse_shortcuts_popup_menu_remove_item;
GtkWidget *browse_shortcuts_popup_menu_rename_item;
GtkWidget *browse_files_scrolled_window;
GtkWidget *browse_files_current_view;
GtkWidget *browse_files_tree_view;
GtkWidget *browse_files_icon_view;
GtkWidget *browse_files_popup_menu;
GtkWidget *browse_files_popup_menu_add_shortcut_item;
GtkWidget *browse_files_popup_menu_hidden_files_item;
@@ -190,6 +199,7 @@ struct _GtkFileChooserDefault
GtkWidget *browse_select_a_folder_label;
GtkWidget *browse_select_a_folder_icon;
GtkTreeModel *current_model;
GtkFileSystemModel *browse_files_model;
char *browse_files_last_selected_name;
@@ -213,6 +223,9 @@ struct _GtkFileChooserDefault
GtkWidget *extra_align;
GtkWidget *extra_widget;
GtkWidget *view_mode_combo_box;
ViewMode view_mode;
GtkWidget *location_button;
GtkWidget *location_entry_box;
GtkWidget *location_label;
@@ -269,10 +282,14 @@ struct _GtkFileChooserDefault
char *edited_new_text;
gulong settings_signal_id;
int icon_size;
int icon_size_for_list_view;
int icon_size_for_icon_view;
GSource *focus_entry_idle;
GSource *start_editing_icon_view_idle;
GtkTreePath *start_editing_icon_view_path;
gulong toplevel_set_focus_id;
GtkWidget *toplevel_last_focus_widget;

View File

@@ -33,6 +33,11 @@
<value nick='descending' value='1'/>
</enum>
<enum id='org.gtk.Settings.FileChooser.ViewMode'>
<value nick='list-view' value='0'/>
<value nick='icon-view' value='1'/>
</enum>
<schema id='org.gtk.Settings.FileChooser'>
<key name='last-folder-uri' type='s'>
<default>""</default>
@@ -40,6 +45,9 @@
<key name='location-mode' enum='org.gtk.Settings.FileChooser.LocationMode'>
<default>'path-bar'</default>
</key>
<key name='view-mode' enum='org.gtk.Settings.FileChooser.ViewMode'>
<default>'list-view'</default>
</key>
<key name='show-hidden' type='b'>
<default>false</default>
</key>