aboutsummaryrefslogtreecommitdiff
path: root/misc/hotkeys
diff options
context:
space:
mode:
authorRong-En Fan <rafan@FreeBSD.org>2007-03-02 11:39:30 +0000
committerRong-En Fan <rafan@FreeBSD.org>2007-03-02 11:39:30 +0000
commita7f32949b09d5dd4a1ba9766ce6a769be68b162c (patch)
treec1673480e2b2613fed026a09e29f8d5d7de5f2ba /misc/hotkeys
parent3e20469d4839a22da14d158bcfe9adaa9708dfbf (diff)
downloadports-a7f32949b09d5dd4a1ba9766ce6a769be68b162c.tar.gz
ports-a7f32949b09d5dd4a1ba9766ce6a769be68b162c.zip
- Fix xosd display: xosd_init() is deprecated
- Add some more configurable features Submitted by: Alexey Privalov <lubeg at rootshell.be>
Notes
Notes: svn path=/head/; revision=186343
Diffstat (limited to 'misc/hotkeys')
-rw-r--r--misc/hotkeys/Makefile2
-rw-r--r--misc/hotkeys/files/patch-src-conf.c20
-rw-r--r--misc/hotkeys/files/patch-src-hotkeys.c35
3 files changed, 46 insertions, 11 deletions
diff --git a/misc/hotkeys/Makefile b/misc/hotkeys/Makefile
index e79e107f909b..ce6ad2a8552d 100644
--- a/misc/hotkeys/Makefile
+++ b/misc/hotkeys/Makefile
@@ -6,7 +6,7 @@
PORTNAME= hotkeys
PORTVERSION= 0.5.7.1
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= misc
MASTER_SITES= http://ypwong.org/hotkeys/${PORTVERSION}/ \
${MASTER_SITE_XCONTRIB}
diff --git a/misc/hotkeys/files/patch-src-conf.c b/misc/hotkeys/files/patch-src-conf.c
index 303adee7049b..318f09abc9a4 100644
--- a/misc/hotkeys/files/patch-src-conf.c
+++ b/misc/hotkeys/files/patch-src-conf.c
@@ -1,5 +1,5 @@
---- src/conf.c.orig Wed Nov 27 14:30:08 2002
-+++ src/conf.c Sun May 11 16:01:17 2003
+--- src/conf.c.orig Thu Nov 28 03:30:08 2002
++++ src/conf.c Fri Mar 2 19:26:23 2007
@@ -25,7 +25,7 @@
#include "common.h"
@@ -19,3 +19,19 @@
/*
"Screendump", "xwd -root",
*/
+@@ -75,9 +78,14 @@
+ // "osd_font", "-*-lucidatypewriter-bold-r-normal-*-*-250-*-*-*-*-*-*",
+ "osd_font", "lucidasanstypewriter-bold-24",
+ "osd_color", "LawnGreen",
++ "osd_shadow_color", "Black",
++ "osd_shadow_offset", "3",
+ "osd_timeout", "3",
+ "osd_position", "bottom",
+- "osd_offset", "25",
++ "osd_align", "center",
++ "osd_hoffset", "25",
++ "osd_voffset", "25",
++ "osd_bar_length", "25",
+ NULL, NULL
+ };
+
diff --git a/misc/hotkeys/files/patch-src-hotkeys.c b/misc/hotkeys/files/patch-src-hotkeys.c
index 04c34adb6311..77b057adf370 100644
--- a/misc/hotkeys/files/patch-src-hotkeys.c
+++ b/misc/hotkeys/files/patch-src-hotkeys.c
@@ -1,5 +1,5 @@
---- src/hotkeys.c.orig Tue Dec 3 14:26:32 2002
-+++ src/hotkeys.c Wed Jun 11 23:54:54 2003
+--- src/hotkeys.c.orig Wed Dec 4 03:26:32 2002
++++ src/hotkeys.c Fri Mar 2 19:27:17 2007
@@ -54,7 +54,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -260,15 +260,34 @@
}
#endif
break; /* break the for loop */
-@@ -1444,6 +1459,7 @@
- 3 /* shadow offset */,
- 3 /* number_lines */
- );
+@@ -1435,15 +1450,17 @@
+ #ifdef HAVE_LIBXOSD
+ if ( osd )
+ {
+- osd = xosd_init(xstrdup(getConfig("osd_font")),
+- /* I dunno why, but you must call strdup here... */
+- xstrdup(getConfig("osd_color")),
+- atoi(getConfig("osd_timeout")),
+- strncmp(getConfig("osd_position"),"top",3)?XOSD_bottom:XOSD_top,
+- atoi(getConfig("osd_offset")),
+- 3 /* shadow offset */,
+- 3 /* number_lines */
+- );
++ osd = xosd_create(3);
++ xosd_set_pos(osd, strncmp(getConfig("osd_position"),"top",3)?XOSD_bottom:XOSD_top);
++ xosd_set_bar_length(osd, atoi(getConfig("osd_bar_length")));
++ xosd_set_colour(osd, xstrdup(getConfig("osd_color")));
++ xosd_set_shadow_colour(osd, xstrdup(getConfig("osd_shadow_color")));
++ xosd_set_shadow_offset(osd, atoi(getConfig("osd_shadow_offset")));
++ xosd_set_horizontal_offset(osd, atoi(getConfig("osd_hoffset")));
++ xosd_set_vertical_offset(osd, atoi(getConfig("osd_voffset")));
++ xosd_set_font(osd, xstrdup(getConfig("osd_font")));
++ xosd_set_align(osd, strncmp(getConfig("osd_align"),"left",4)?((!strncmp(getConfig("osd_align"),"center",6))?XOSD_center:XOSD_right):XOSD_left);
+ xosd_set_align(osd, XOSD_center);
}
#endif
}
-@@ -1592,6 +1608,7 @@
+@@ -1592,6 +1609,7 @@
doMute();
} else
/* APM stuffs */
@@ -276,7 +295,7 @@
if ( ev.message.keycode == (kbd.defCmds)[sleepKey].key ||
ev.message.keycode == (kbd.defCmds)[wakeupKey].key ) {
sleepState(STANDBY);
-@@ -1601,8 +1618,9 @@
+@@ -1601,8 +1619,9 @@
}
else
{