[gtk+/filechooserentry: 12/51] filechooserentry: Don't trim away the slash after directories
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/filechooserentry: 12/51] filechooserentry: Don't trim away the slash after directories
- Date: Mon, 7 Nov 2011 04:44:02 +0000 (UTC)
commit ed75309015d75e44e5775f602ce23d3a445bb838
Author: Benjamin Otte <otte redhat com>
Date: Thu Nov 3 22:05:38 2011 +0100
filechooserentry: Don't trim away the slash after directories
It's not necessary as the code appending the slashes checks for a slash
these days.
gtk/gtkfilechooserentry.c | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 4093bdc..c90872c 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -484,18 +484,6 @@ maybe_append_separator_to_file (GtkFileChooserEntry *chooser_entry,
return display_name;
}
-static char *
-trim_dir_separator_suffix (const char *str)
-{
- int len;
-
- len = strlen (str);
- if (len > 0 && G_IS_DIR_SEPARATOR (str[len - 1]))
- return g_strndup (str, len - 1);
- else
- return g_strdup (str);
-}
-
/* Determines if the completion model has entries with a common prefix relative
* to the current contents of the entry. Also, if there's one and only one such
* path, stores it in unique_path_ret.
@@ -562,7 +550,7 @@ find_common_prefix (GtkFileChooserEntry *chooser_entry,
{
if (!*common_prefix_ret)
{
- *common_prefix_ret = trim_dir_separator_suffix (display_name);
+ *common_prefix_ret = g_strdup (display_name);
*unique_file_ret = g_object_ref (file);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]