pidgin: 1db3debf: move-start (home) and move-last (end) ac...
sadrul at pidgin.im
sadrul at pidgin.im
Wed Feb 3 11:06:48 EST 2010
-----------------------------------------------------------------
Revision: 1db3debff58b6c25ed54db5d39b49a8469d9c98d
Ancestor: b72486b98465afa17d32904e999cc9621fcdea9a
Author: sadrul at pidgin.im
Date: 2010-02-03T16:05:28
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1db3debff58b6c25ed54db5d39b49a8469d9c98d
Modified files:
ChangeLog doc/finch.1.in finch/libgnt/gnttree.c
ChangeLog:
move-start (home) and move-last (end) actions for trees.
-------------- next part --------------
============================================================
--- ChangeLog 966499d7cc6fa4f34b31b1af65254bb44e97d853
+++ ChangeLog 5f4d8a04f67b88e8f2cd192109e6501957fca3cb
@@ -44,6 +44,12 @@ version 2.6.6 (??/??/20??):
request form. (Thanks to Florian Zeitz for finding this problem)
* Search friends by email-addresses in the buddy list. (Luoh Ren-Shan)
+ Finch:
+ * Rebindable 'move-first' and 'move-last' actions for tree widgets. So
+ it is possible to jump to the first or last entry in the buddy list
+ (and other such lists) by pressing home or end key (defaults)
+ respectively.
+
version 2.6.5 (01/08/2010):
libpurple:
* TLS certificates are actually stored to the local cache once again
============================================================
--- doc/finch.1.in be51f409fc9cabd1712ecd2e8fcb5093f88fb252
+++ doc/finch.1.in d782b05ee1a44e5e415a10e75d94921f2d9a2d34
@@ -366,6 +366,10 @@ backspace = move-parent
.br
backspace = move-parent
.br
+home = move-first
+.br
+end = move-last
+.br
# Following is the default binding for the context-menu
.br
menu = context-menu
============================================================
--- finch/libgnt/gnttree.c cf84b9a2bf3e25dddcf98f887da5be719f57c33d
+++ finch/libgnt/gnttree.c 0702acfb183de2a27c33b50caa8647584df9d99e
@@ -957,6 +957,45 @@ end_search_action(GntBindable *bindable,
return TRUE;
}
+static gboolean
+move_first_action(GntBindable *bind, GList *null)
+{
+ GntTree *tree = GNT_TREE(bind);
+ GntTreeRow *row = tree->root;
+ GntTreeRow *old = tree->current;
+ if (row && !row_matches_search(row))
+ row = get_next(row);
+ if (row) {
+ tree->current = row;
+ redraw_tree(tree);
+ if (old != tree->current)
+ tree_selection_changed(tree, old, tree->current);
+ }
+
+ return TRUE;
+}
+
+static gboolean
+move_last_action(GntBindable *bind, GList *null)
+{
+ GntTree *tree = GNT_TREE(bind);
+ GntTreeRow *old = tree->current;
+ GntTreeRow *row = tree->bottom;
+ GntTreeRow *next;
+
+ while ((next = get_next(row)))
+ row = next;
+
+ if (row) {
+ tree->current = row;
+ redraw_tree(tree);
+ if (old != tree->current)
+ tree_selection_changed(tree, old, tree->current);
+ }
+
+ return TRUE;
+}
+
static void
gnt_tree_set_property(GObject *obj, guint prop_id, const GValue *value,
GParamSpec *spec)
@@ -1076,6 +1115,10 @@ gnt_tree_class_init(GntTreeClass *klass)
"/", NULL);
gnt_bindable_class_register_action(bindable, "end-search", end_search_action,
"\033", NULL);
+ gnt_bindable_class_register_action(bindable, "move-first", move_first_action,
+ GNT_KEY_HOME, NULL);
+ gnt_bindable_class_register_action(bindable, "move-last", move_last_action,
+ GNT_KEY_END, NULL);
gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), bindable);
GNTDEBUG;
More information about the Commits
mailing list