Greetings all,
This is a very simple patch that adds a "deselect" command/function to
FvwmIconMan. (By "command" I mean one that could be sent by
SendToModule, for example.) It simply deselects the currently
selected button, if any, making it a nice complement to the existing
"select" command.
The FvwmIconMan man page and ChangeLog have been updated, and the
patch is against the latest CVS. Due to the small size of the patch,
it might also be nice to backport it to the 2.4 branch. I can prepare
a diff, if this sort of backporting is OK.
-- Andrew
Index: ChangeLog
===================================================================
RCS file: /home/cvs/fvwm/fvwm/ChangeLog,v
retrieving revision 1.3005
diff -u -u -r1.3005 ChangeLog
--- ChangeLog 11 Sep 2007 18:48:57 -0000 1.3005
+++ ChangeLog 17 Sep 2007 02:27:40 -0000
@@ -1,3 +1,10 @@
+2007-09-16 Andrew Ayer <[EMAIL PROTECTED]>
+
+ * modules/FvwmIconMan/functions.c:
+ * modules/FvwmIconMan/readconfig.c:
+ * modules/FvwmIconMan/FvwmIconMan.1.in:
+ Added "deselect" command to FvwmIconMan.
+
2007-09-11 Dominik Vogt <dominik(dot)vogt(at)gmx(dot)de>
* fvwm/virtual.c (HandlePaging):
Index: NEWS
===================================================================
RCS file: /home/cvs/fvwm/fvwm/NEWS,v
retrieving revision 1.725
diff -u -u -r1.725 NEWS
--- NEWS 14 Sep 2007 22:43:35 -0000 1.725
+++ NEWS 17 Sep 2007 02:27:40 -0000
@@ -5,6 +5,10 @@
Changes in beta release 2.5.24 (not released yet)
+* New features:
+
+ - New FvwmIconMan command: deselect
+
* Bug Fixes:
- Sometimes a window jumped by half the screen's size when
Index: modules/FvwmIconMan/FvwmIconMan.1.in
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/FvwmIconMan.1.in,v
retrieving revision 1.9
diff -u -u -r1.9 FvwmIconMan.1.in
--- modules/FvwmIconMan/FvwmIconMan.1.in 7 Aug 2007 20:17:43 -0000
1.9
+++ modules/FvwmIconMan/FvwmIconMan.1.in 17 Sep 2007 02:27:40 -0000
@@ -554,6 +554,9 @@
The complement of bif. The branch is taken if \fIButton\fP evaluates to false,
by the criteria listed for bif.
+.IP "deselect"
+Deselects the currently selected button, if any.
+
.IP "gotobutton \fIButton\fP"
Sets current button to \fIButton\fP. If \fIButton\fP is an integer, then
the current button is set to \fIButton\fP modulo the number of buttons,
Index: modules/FvwmIconMan/functions.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/functions.c,v
retrieving revision 1.17
diff -u -u -r1.17 functions.c
--- modules/FvwmIconMan/functions.c 27 Jan 2007 11:33:16 -0000 1.17
+++ modules/FvwmIconMan/functions.c 17 Sep 2007 02:27:40 -0000
@@ -325,6 +325,16 @@
return 0;
}
+int builtin_deselect(int numargs, BuiltinArg *args)
+{
+ WinManager *man = get_current_man();
+ if (man)
+ {
+ move_highlight(man, NULL);
+ }
+ return 0;
+}
+
int builtin_sendcommand(int numargs, BuiltinArg *args)
{
WinData *win = get_current_win();
Index: modules/FvwmIconMan/readconfig.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/readconfig.c,v
retrieving revision 1.67
diff -u -u -r1.67 readconfig.c
--- modules/FvwmIconMan/readconfig.c 2 Jun 2007 22:27:55 -0000 1.67
+++ modules/FvwmIconMan/readconfig.c 17 Sep 2007 02:27:40 -0000
@@ -39,6 +39,7 @@
extern int builtin_gotomanager(int numargs, BuiltinArg *args);
extern int builtin_refresh(int numargs, BuiltinArg *args);
extern int builtin_select(int numargs, BuiltinArg *args);
+extern int builtin_deselect(int numargs, BuiltinArg *args);
extern int builtin_sendcommand(int numargs, BuiltinArg *args);
extern int builtin_bif(int numargs, BuiltinArg *args);
extern int builtin_bifn(int numargs, BuiltinArg *args);
@@ -65,6 +66,7 @@
FunctionType builtin_functions[] = {
{ "bif", builtin_bif, 2, { ButtonArg, JmpArg } },
{ "bifn", builtin_bifn, 2, { ButtonArg, JmpArg } },
+ { "deselect", builtin_deselect, 0, {0} },
{ "gotobutton", builtin_gotobutton, 1, { ButtonArg } },
{ "gotomanager", builtin_gotomanager, 1, { ManagerArg } },
{ "jmp", builtin_jmp, 1, { JmpArg } },