Renamed from shortcuts_unselect_all(); now selects the row that

2004-03-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_find_current_folder):
	Renamed from shortcuts_unselect_all(); now selects the row that
	corresponds to the current folder, if any.  Fixes #135916.

	* gtk/gtkpathbar.h: Added prototypes for _gtk_path_bar_up() and
	_gtk_path_bar_down().
This commit is contained in:
Federico Mena Quintero 2004-03-15 06:51:58 +00:00 committed by Federico Mena Quintero
parent 0abde22904
commit f956e3ae0a
7 changed files with 63 additions and 4 deletions

View File

@ -1,3 +1,12 @@
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_find_current_folder):
Renamed from shortcuts_unselect_all(); now selects the row that
corresponds to the current folder, if any. Fixes #135916.
* gtk/gtkpathbar.h: Added prototypes for _gtk_path_bar_up() and
_gtk_path_bar_down().
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c: Surround the

View File

@ -1,3 +1,12 @@
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_find_current_folder):
Renamed from shortcuts_unselect_all(); now selects the row that
corresponds to the current folder, if any. Fixes #135916.
* gtk/gtkpathbar.h: Added prototypes for _gtk_path_bar_up() and
_gtk_path_bar_down().
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c: Surround the

View File

@ -1,3 +1,12 @@
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_find_current_folder):
Renamed from shortcuts_unselect_all(); now selects the row that
corresponds to the current folder, if any. Fixes #135916.
* gtk/gtkpathbar.h: Added prototypes for _gtk_path_bar_up() and
_gtk_path_bar_down().
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c: Surround the

View File

@ -1,3 +1,12 @@
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_find_current_folder):
Renamed from shortcuts_unselect_all(); now selects the row that
corresponds to the current folder, if any. Fixes #135916.
* gtk/gtkpathbar.h: Added prototypes for _gtk_path_bar_up() and
_gtk_path_bar_down().
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c: Surround the

View File

@ -1,3 +1,12 @@
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (shortcuts_find_current_folder):
Renamed from shortcuts_unselect_all(); now selects the row that
corresponds to the current folder, if any. Fixes #135916.
* gtk/gtkpathbar.h: Added prototypes for _gtk_path_bar_up() and
_gtk_path_bar_down().
2004-03-15 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c: Surround the

View File

@ -887,14 +887,26 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
} while (gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model),&iter));
}
/* Clears the selection in the shortcuts tree */
/* If a shortcut corresponds to the current folder, selects it */
static void
shortcuts_unselect_all (GtkFileChooserDefault *impl)
shortcuts_find_current_folder (GtkFileChooserDefault *impl)
{
GtkTreeSelection *selection;
int pos;
GtkTreePath *path;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_shortcuts_tree_view));
gtk_tree_selection_unselect_all (selection);
pos = shortcut_find_position (impl, impl->current_folder);
if (pos == -1)
{
gtk_tree_selection_unselect_all (selection);
return;
}
path = gtk_tree_path_new_from_indices (pos, -1);
gtk_tree_selection_select_path (selection, path);
gtk_tree_path_free (path);
}
/* Returns whether a path is a folder */
@ -3708,7 +3720,7 @@ gtk_file_chooser_default_set_current_folder (GtkFileChooser *chooser,
/* Refresh controls */
shortcuts_unselect_all (impl);
shortcuts_find_current_folder (impl);
g_signal_emit_by_name (impl, "current-folder-changed", 0);

View File

@ -75,6 +75,8 @@ void _gtk_path_bar_set_file_system (GtkPathBar *path_bar,
gboolean _gtk_path_bar_set_path (GtkPathBar *path_bar,
const GtkFilePath *file_path,
GError **error);
void _gtk_path_bar_up (GtkPathBar *path_bar);
void _gtk_path_bar_down (GtkPathBar *path_bar);
G_END_DECLS