gnome-games r7176 - trunk/aisleriot
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7176 - trunk/aisleriot
- Date: Sun, 13 Jan 2008 22:07:44 +0000 (GMT)
Author: chpe
Date: Sun Jan 13 22:07:44 2008
New Revision: 7176
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7176&view=rev
Log:
Implement deslect-all (control-shit-A).
Modified:
trunk/aisleriot/board.c
trunk/aisleriot/board.h
Modified: trunk/aisleriot/board.c
==============================================================================
--- trunk/aisleriot/board.c (original)
+++ trunk/aisleriot/board.c Sun Jan 13 22:07:44 2008
@@ -204,6 +204,7 @@
MOVE_CURSOR,
TOGGLE_SELECTION,
SELECT_ALL,
+ DESELECT_ALL,
LAST_SIGNAL
};
@@ -2204,6 +2205,12 @@
}
static void
+aisleriot_board_deselect_all (AisleriotBoard *board)
+{
+ set_selection (board, NULL, -1, FALSE);
+}
+
+static void
aisleriot_board_toggle_selection (AisleriotBoard *board)
{
AisleriotBoardPrivate *priv = board->priv;
@@ -3224,6 +3231,7 @@
klass->activate = aisleriot_board_activate;
klass->move_cursor = aisleriot_board_move_cursor;
klass->select_all = aisleriot_board_select_all;
+ klass->deselect_all = aisleriot_board_deselect_all;
klass->toggle_selection = aisleriot_board_toggle_selection;
/* Keybinding signals */
@@ -3268,6 +3276,16 @@
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
+
+ signals[DESELECT_ALL] =
+ g_signal_new (I_("deselect-all"),
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (AisleriotBoardClass, deselect_all),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
#endif /* ENABLE_KEYNAV */
/* Properties */
@@ -3348,6 +3366,8 @@
"toggle-selection", 0);
gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK,
"select-all", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_a, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+ "deselect-all", 0);
/* Activate */
aisleriot_board_add_activate_binding (binding_set, GDK_Return, 0);
Modified: trunk/aisleriot/board.h
==============================================================================
--- trunk/aisleriot/board.h (original)
+++ trunk/aisleriot/board.h Sun Jan 13 22:07:44 2008
@@ -53,6 +53,7 @@
void (* activate) (AisleriotBoard *board);
void (* toggle_selection) (AisleriotBoard *board);
void (* select_all) (AisleriotBoard *board);
+ void (* deselect_all) (AisleriotBoard *board);
};
GType aisleriot_board_get_type (void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]