From abd9ac7aea792e2d7b819e543abd901bae05c4e9 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 10 May 2007 23:01:55 +0100 Subject: Remove separator between Search and Recently Used shortcuts This commit fixes this issue found in review: > I don't think the separator between Search and Recent files adds anything, > really. It looks a bit odd to me to have a bunch of single items with > separators between them. Signed-off-by: Emmanuele Bassi --- gtk/gtkfilechooserdefault.c | 18 ++---------------- 1 files changed, 2 insertions(+), 16 deletions(-) diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index 0ad4b6c..bc5a8c0 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -273,7 +273,6 @@ search_is_possible (GtkFileChooserDefault *impl) /* Interesting places in the shortcuts bar */ typedef enum { SHORTCUTS_SEARCH, - SHORTCUTS_SEARCH_SEPARATOR, SHORTCUTS_RECENT, SHORTCUTS_RECENT_SEPARATOR, SHORTCUTS_HOME, @@ -1017,7 +1016,7 @@ error_dialog (GtkFileChooserDefault *impl, const GtkFilePath *path, GError *error) { - if (G_LIKELY (error)) + if (error) { char *uri = NULL; char *text; @@ -1971,11 +1970,6 @@ shortcuts_get_index (GtkFileChooserDefault *impl, n += impl->has_search ? 1 : 0; - if (where == SHORTCUTS_SEARCH_SEPARATOR) - goto out; - - n += impl->has_search ? 1 : 0; - if (where == SHORTCUTS_RECENT) goto out; @@ -2107,8 +2101,7 @@ shortcuts_insert_separator (GtkFileChooserDefault *impl, { GtkTreeIter iter; - g_assert (where == SHORTCUTS_SEARCH_SEPARATOR || - where == SHORTCUTS_RECENT_SEPARATOR || + g_assert (where == SHORTCUTS_RECENT_SEPARATOR || where == SHORTCUTS_BOOKMARKS_SEPARATOR || where == SHORTCUTS_CURRENT_FOLDER_SEPARATOR); @@ -2322,7 +2315,6 @@ shortcuts_model_create (GtkFileChooserDefault *impl) if (search_is_possible (impl)) { shortcuts_append_search (impl); - shortcuts_insert_separator (impl, SHORTCUTS_SEARCH_SEPARATOR); } if (impl->recent_manager) @@ -4671,12 +4663,6 @@ shortcuts_combo_filter_func (GtkTreeModel *model, idx = shortcuts_get_index (impl, SHORTCUTS_SEARCH); if (idx == indices[0]) retval = FALSE; - else - { - idx = shortcuts_get_index (impl, SHORTCUTS_SEARCH_SEPARATOR); - if (idx == indices[0]) - retval = FALSE; - } } if (impl->has_recent) -- 1.4.4.2