summaryrefslogtreecommitdiff
path: root/gtk/gtkfilechooserentry.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2011-11-03 17:32:44 +0100
committerBenjamin Otte <otte@redhat.com>2011-12-16 20:09:11 +0100
commit2b9ecd97060f4ffa1ff1963719d5b266469f020b (patch)
tree7c5455ce426311a000369ff246e8f5c1528a1c80 /gtk/gtkfilechooserentry.c
parent8389922de9c5747f0fa5948ecfcefbd6c83cf97c (diff)
downloadgtk+-2b9ecd97060f4ffa1ff1963719d5b266469f020b.tar.gz
filechooserentry: Only append / to directory names once
Since 069d78ed31fc1c0a9cb7621d27fe10d7b974315b the / is appended to directories upon constructing the display name, so there is no need to do it later.
Diffstat (limited to 'gtk/gtkfilechooserentry.c')
-rw-r--r--gtk/gtkfilechooserentry.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index c90872cbbd..d745b51ecd 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -321,7 +321,6 @@ match_selected_callback (GtkEntryCompletion *completion,
char *display_name;
GFile *file;
gint pos;
- gboolean dummy;
gtk_tree_model_get (model, iter,
DISPLAY_NAME_COLUMN, &display_name,
@@ -337,8 +336,6 @@ match_selected_callback (GtkEntryCompletion *completion,
return FALSE;
}
- display_name = maybe_append_separator_to_file (chooser_entry, file, display_name, &dummy);
-
pos = chooser_entry->file_part_pos;
/* We don't set in_change here as we want to update the current_folder
@@ -617,29 +614,6 @@ find_common_prefix (GtkFileChooserEntry *chooser_entry,
return TRUE;
}
-static gboolean
-char_after_cursor_is_directory_separator (GtkFileChooserEntry *chooser_entry)
-{
- int cursor_pos;
- gboolean result;
-
- result = FALSE;
-
- cursor_pos = gtk_editable_get_position (GTK_EDITABLE (chooser_entry));
- if (cursor_pos < gtk_entry_get_text_length (GTK_ENTRY (chooser_entry)))
- {
- char *next_char_str;
-
- next_char_str = gtk_editable_get_chars (GTK_EDITABLE (chooser_entry), cursor_pos, cursor_pos + 1);
- if (G_IS_DIR_SEPARATOR (*next_char_str))
- result = TRUE;
-
- g_free (next_char_str);
- }
-
- return result;
-}
-
typedef enum {
INVALID_INPUT, /* what the user typed is bogus */
NO_MATCH, /* no matches based on what the user typed */
@@ -694,18 +668,6 @@ append_common_prefix (GtkFileChooserEntry *chooser_entry,
if (unique_file)
{
- if (!char_after_cursor_is_directory_separator (chooser_entry))
- {
- gboolean appended;
-
- common_prefix = maybe_append_separator_to_file (chooser_entry,
- unique_file,
- common_prefix,
- &appended);
- if (appended)
- prefix_expands_the_file_part = TRUE;
- }
-
g_object_unref (unique_file);
if (prefix_expands_the_file_part)