Revision: 1086
http://geeqie.svn.sourceforge.net/geeqie/?rev=1086&view=rev
Author: zas_
Date: 2008-08-24 14:33:03 +0000 (Sun, 24 Aug 2008)
Log Message:
-----------
Slight code redundancy reduction.
Modified Paths:
--------------
trunk/src/ui_tabcomp.c
Modified: trunk/src/ui_tabcomp.c
===================================================================
--- trunk/src/ui_tabcomp.c 2008-08-24 14:14:37 UTC (rev 1085)
+++ trunk/src/ui_tabcomp.c 2008-08-24 14:33:03 UTC (rev 1086)
@@ -142,10 +142,9 @@
g_free(td);
}
-static gint tab_completion_emit_enter_signal(TabCompData *td)
+static gchar *tab_completion_get_text(TabCompData *td)
{
gchar *text;
- if (!td->enter_func) return FALSE;
text = g_strdup(gtk_entry_get_text(GTK_ENTRY(td->entry)));
@@ -156,6 +155,15 @@
g_free(t);
}
+ return text;
+}
+
+static gint tab_completion_emit_enter_signal(TabCompData *td)
+{
+ gchar *text;
+ if (!td->enter_func) return FALSE;
+
+ text = tab_completion_get_text(td);
td->enter_func(text, td->enter_data);
g_free(text);
@@ -167,15 +175,7 @@
gchar *text;
if (!td->tab_func) return;
- text = g_strdup(gtk_entry_get_text(GTK_ENTRY(td->entry)));
-
- if (text[0] == '~')
- {
- gchar *t = text;
- text = expand_tilde(text);
- g_free(t);
- }
-
+ text = tab_completion_get_text(td);
td->tab_func(text, td->tab_data);
g_free(text);
}
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