Mercurial > pidgin.yaz
changeset 18385:e3280ccdc305
merge of '38bb0ef32354096ae738327b3b59d13debe796c3'
and '62d96ecdec1a52234282e7ceda9fda4452ef0955'
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 30 Jun 2007 23:13:15 +0000 |
parents | 9eb2f4d27990 (diff) 794a527c8198 (current diff) |
children | 95c45d72c6e7 |
files | |
diffstat | 3 files changed, 68 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/finch.1.in Sat Jun 30 23:12:10 2007 +0000 +++ b/doc/finch.1.in Sat Jun 30 23:13:15 2007 +0000 @@ -110,14 +110,26 @@ Bring up the menu (if there is one) for a window. Note that currently only the buddylist has a menu. .TP -.B Alt \+ Shift \+ . +.B Alt \+ / +Show a list of available key-bindings for the current widget in focus. +.TP +.B Alt \+ \> Switch to the next workspace .TP -.B Alt \+ Shift \+ , +.B Alt \+ \< Switch to the previous workspace .TP +.B Alt \+ t +Tag (or untag) the current window +.TP +.B Alt \+ T +Attached all the tag windows to the current workspace +.TP .B Alt \+ s Show the workspace list +.TP +.B F9 +Create a new workspace and switch to it .SH FILES \fI~/.gntrc\fR: configuration file for gnt applications. @@ -135,7 +147,9 @@ .br # To use some custom window-manager .br -wm = /usr/local/lib/purple/s.so +wm = /usr/local/lib/gnt/s.so +.br +# There's also a custom window manager called irssi.so .br # Remember window-positions based on the titles (on by default) .br @@ -308,6 +322,8 @@ .br pagedown = page-down .br +backspace = move-parent +.br # Following is the default binding for the context-menu .br menu = context-menu @@ -377,6 +393,16 @@ .br a-l = refresh-screen .br +a-s = workspace-list +.br +a-t = window-tag +.br +a-T = place-tagged +.br +a-C = toggle-clipboard +.br +a-/ = help-for-widget +.br # The following action is still incomplete, and doesn't have a default binding .br # switch-window-n @@ -387,8 +413,18 @@ [GntS::binding] .br a-b = toggle-buddylist + +# For the irssi window manager .br -a-C = toggle-clipboard +[Irssi::binding] +.br +a-L = move-right +.br +a-H = move-left +.br +a-J = move-down +.br +a-K = move-up .SH Conversation Commands There are a few helpful commands in addition to the regular commands. You can
--- a/finch/gntconv.c Sat Jun 30 23:12:10 2007 +0000 +++ b/finch/gntconv.c Sat Jun 30 23:13:15 2007 +0000 @@ -140,13 +140,6 @@ break; } g_free(error); -#if 0 - gnt_text_view_append_text_with_flags(GNT_TEXT_VIEW(ggconv->tv), - _("Commands are not supported yet. Message was NOT sent."), - GNT_TEXT_FLAG_DIM | GNT_TEXT_FLAG_UNDERLINE); - gnt_text_view_next_line(GNT_TEXT_VIEW(ggconv->tv)); - gnt_text_view_scroll(GNT_TEXT_VIEW(ggconv->tv), 0); -#endif } else { @@ -451,6 +444,13 @@ } static void +completion_cb(GntEntry *entry, const char *start, const char *end) +{ + if (start == entry->start) + gnt_widget_key_pressed(GNT_WIDGET(entry), ": "); +} + +static void finch_create_conversation(PurpleConversation *conv) { FinchConv *ggc = conv->ui_data; @@ -542,6 +542,7 @@ gnt_text_view_attach_scroll_widget(GNT_TEXT_VIEW(ggc->tv), ggc->entry); g_signal_connect_after(G_OBJECT(ggc->entry), "key_pressed", G_CALLBACK(entry_key_pressed), ggc); + g_signal_connect(G_OBJECT(ggc->entry), "completion", G_CALLBACK(completion_cb), NULL); g_signal_connect(G_OBJECT(ggc->window), "destroy", G_CALLBACK(closing_window), ggc); gnt_widget_set_position(ggc->window, purple_prefs_get_int(PREF_ROOT "/position/x"),
--- a/finch/libgnt/gntentry.c Sat Jun 30 23:12:10 2007 +0000 +++ b/finch/libgnt/gntentry.c Sat Jun 30 23:13:15 2007 +0000 @@ -25,6 +25,7 @@ #include "gntbox.h" #include "gntentry.h" +#include "gntmarshal.h" #include "gntstyle.h" #include "gnttree.h" #include "gntutils.h" @@ -32,6 +33,7 @@ enum { SIG_TEXT_CHANGED, + SIG_COMPLETION, SIGS, }; static guint signals[SIGS] = { 0 }; @@ -69,9 +71,12 @@ complete_suggest(GntEntry *entry, const char *text) { gboolean changed = FALSE; + int offstart = 0, offend = 0; + if (entry->word) { char *s = get_beginning_of_word(entry); const char *iter = text; + offstart = g_utf8_pointer_to_offset(entry->start, s); while (*iter && toupper(*s) == toupper(*iter)) { if (*s != *iter) changed = TRUE; @@ -81,10 +86,17 @@ 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); return changed; } @@ -687,6 +699,14 @@ g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + signals[SIG_COMPLETION] = + g_signal_new("completion", + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + 0, NULL, NULL, + gnt_closure_marshal_VOID__POINTER_POINTER, + G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER); + gnt_bindable_class_register_action(bindable, "cursor-home", move_start, GNT_KEY_CTRL_A, NULL); gnt_bindable_register_binding(bindable, "cursor-home", GNT_KEY_HOME, NULL);