Revision: 1271
http://geeqie.svn.sourceforge.net/geeqie/?rev=1271&view=rev
Author: zas_
Date: 2008-11-23 22:05:27 +0000 (Sun, 23 Nov 2008)
Log Message:
-----------
Hide .gqv extension from collection name in collection window title and recent
menu list.
Modified Paths:
--------------
trunk/src/collect.c
trunk/src/layout_util.c
Modified: trunk/src/collect.c
===================================================================
--- trunk/src/collect.c 2008-11-23 16:16:09 UTC (rev 1270)
+++ trunk/src/collect.c 2008-11-23 22:05:27 UTC (rev 1271)
@@ -983,11 +983,24 @@
static void collection_window_update_title(CollectWindow *cw)
{
+ gboolean free_name = FALSE;
+ gchar *name;
gchar *buf;
if (!cw) return;
- buf = g_strdup_printf(_("%s - Collection - %s"), cw->cd->name,
GQ_APPNAME);
+ if (file_extension_match(cw->cd->name, GQ_COLLECTION_EXT))
+ {
+ name = remove_extension_from_path(cw->cd->name);
+ free_name = TRUE;
+ }
+ else
+ {
+ name = cw->cd->name;
+ }
+
+ buf = g_strdup_printf(_("%s - Collection - %s"), name, GQ_APPNAME);
+ if (free_name) g_free(name);
gtk_window_set_title(GTK_WINDOW(cw->window), buf);
g_free(buf);
}
Modified: trunk/src/layout_util.c
===================================================================
--- trunk/src/layout_util.c 2008-11-23 16:16:09 UTC (rev 1270)
+++ trunk/src/layout_util.c 2008-11-23 22:05:27 UTC (rev 1271)
@@ -1008,8 +1008,22 @@
while (list)
{
- item = menu_item_add_simple(menu, filename_from_path((gchar
*)list->data),
- G_CALLBACK(layout_menu_recent_cb),
lw);
+ const gchar *filename = filename_from_path((gchar *)list->data);
+ gchar *name;
+ gboolean free_name = FALSE;
+
+ if (file_extension_match(filename, GQ_COLLECTION_EXT))
+ {
+ name = remove_extension_from_path(filename);
+ free_name = TRUE;
+ }
+ else
+ {
+ name = (gchar *) filename;
+ }
+
+ item = menu_item_add_simple(menu, name,
G_CALLBACK(layout_menu_recent_cb), lw);
+ if (free_name) g_free(name);
g_object_set_data(G_OBJECT(item), "recent_index",
GINT_TO_POINTER(n));
list = list->next;
n++;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn