im.pidgin.pidgin: b4353646b7529c2dd814bc707b8b269efe420120
sadrul at pidgin.im
sadrul at pidgin.im
Fri Nov 30 22:56:55 EST 2007
-----------------------------------------------------------------
Revision: b4353646b7529c2dd814bc707b8b269efe420120
Ancestor: 4f34d1416ba5fc3c07a51632945cd443793e682f
Author: sadrul at pidgin.im
Date: 2007-11-30T22:36:33
Branch: im.pidgin.pidgin
Modified files:
finch/libgnt/gntentry.c
ChangeLog:
Emit the 'completion' signal when tab is pressed from a suggest word.
-------------- next part --------------
============================================================
--- finch/libgnt/gntentry.c 1226b105ba750769e98f0c2828d3590fb799cf19
+++ finch/libgnt/gntentry.c 1b46f2e528635e67d2a8a92a708a3de556032f58
@@ -140,7 +140,6 @@ complete_suggest(GntEntry *entry, const
static gboolean
complete_suggest(GntEntry *entry, const char *text)
{
- gboolean changed = FALSE;
int offstart = 0, offend = 0;
if (entry->word) {
@@ -148,27 +147,22 @@ complete_suggest(GntEntry *entry, const
const char *iter = text;
offstart = g_utf8_pointer_to_offset(entry->start, s);
while (*iter && toupper(*s) == toupper(*iter)) {
- if (*s != *iter)
- changed = TRUE;
*s++ = *iter++;
}
if (*iter) {
gnt_entry_key_pressed(GNT_WIDGET(entry), iter);
- changed = TRUE;
}
offend = g_utf8_pointer_to_offset(entry->start, entry->cursor);
} else {
offstart = 0;
gnt_entry_set_text_internal(entry, text);
- changed = TRUE;
offend = g_utf8_strlen(text, -1);
}
- if (changed)
- g_signal_emit(G_OBJECT(entry), signals[SIG_COMPLETION], 0,
- entry->start + offstart, entry->start + offend);
+ g_signal_emit(G_OBJECT(entry), signals[SIG_COMPLETION], 0,
+ entry->start + offstart, entry->start + offend);
update_kill_ring(entry, ENTRY_JAIL, NULL, 0);
- return changed;
+ return TRUE;
}
static int
More information about the Commits
mailing list