[gthumb: 1/20] [catalogs] fixed the edit_name value when no name is specified
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 1/20] [catalogs] fixed the edit_name value when no name is specified
- Date: Tue, 30 Mar 2010 19:32:13 +0000 (UTC)
commit f76d792c4fac0ed38b921a6af757272c413b08be
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Mar 28 14:24:23 2010 +0200
[catalogs] fixed the edit_name value when no name is specified
Use the catalog basename if no catalog name is specified.
extensions/catalogs/gth-catalog.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/extensions/catalogs/gth-catalog.c b/extensions/catalogs/gth-catalog.c
index 143d9e1..5b8d35f 100644
--- a/extensions/catalogs/gth-catalog.c
+++ b/extensions/catalogs/gth-catalog.c
@@ -705,7 +705,18 @@ get_edit_name (GFile *file,
g_string_append (display_name, _("Catalogs"));
}
else {
- if (name != NULL)
+ if (name == NULL) {
+ char *name;
+ char *utf8_name;
+
+ name = _g_uri_remove_extension (basename);
+ utf8_name = g_filename_to_utf8 (name, -1, NULL, NULL, NULL);
+ g_string_append (display_name, utf8_name);
+
+ g_free (utf8_name);
+ g_free (name);
+ }
+ else
g_string_append (display_name, name);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]