Update of /cvsroot/fink/packages/dists/stable/main/finkinfo/x11
In directory usw-pr-cvs1:/tmp/cvs-serv2813
Added Files:
fspanel-0.7-1.info fspanel-0.7-1.patch
Log Message:
Moved to stable based on positive feedback.
--- NEW FILE: fspanel-0.7-1.info ---
Package: fspanel
Version: 0.7
Revision: 1
Depends: x11
Source: http://www.chatjunkies.org/%n/%n-%v.tar.gz
Source-MD5: 5f4d0cafd52a04fd7f174f084b3520b8
Patch: %f.patch
PatchScript: <<
mv Makefile Makefile.old
mv Makefile.generic Makefile
<<
CompileScript: make
InstallScript: make install DESTDIR=%i
DocFiles: COPYING README
#
Maintainer: Jeremy Higgs <jhiggs@xxxxxxxxxxxxxx>
Homepage: http://www.chatjunkies.org/fspanel/
License: BSD
Description: Panel for listing open windows.
DescDetail: <<
fspanel is a program that lists all of the open windows in your window manager
along the bottom (or top) of the screen.
<<
DescPackaging: <<
Patch adds 'DESTDIR' support, installs directories and program correctly.
Patchscript moves Makefiles so that the right Makefile is used.
'get-wm-name' patch from fspanel website, author unknown, is added to properly
identify the names of windows.
<<
--- NEW FILE: fspanel-0.7-1.patch ---
diff -ru fspanel-0.7/Makefile.generic fspanel-0.7-patched/Makefile.generic
--- fspanel-0.7/Makefile.generic Sat Jun 9 19:48:56 2001
+++ fspanel-0.7-patched/Makefile.generic Fri Nov 2 21:16:35 2001
@@ -3,6 +3,8 @@
L_FLAGS = -L/usr/X11R6/lib -lX11 -lXpm
PROGNAME = fspanel
+DESTDIR =
+
$(PROGNAME): Makefile fspanel.c fspanel.h icon.xpm
$(CC) $(C_FLAGS) $(L_FLAGS) fspanel.c -o $(PROGNAME)
strip $(PROGNAME)
@@ -12,4 +14,5 @@
rm -f core *.o $(PROGNAME) nohup.out
install: $(PROGNAME)
- cp $(PROGNAME) /usr/local/bin
+ install -d -m 755 $(DESTDIR)/bin
+ install -c -m 755 $(PROGNAME) $(DESTDIR)/bin
diff -ru fspanel-0.7/fspanel.c fspanel-0.7-patched/fspanel.c
--- fspanel-0.7/fspanel.c Mon Jun 11 17:59:48 2001
+++ fspanel-0.7-patched/fspanel.c Fri Nov 2 22:07:27 2001
@@ -11,6 +11,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
+#include <locale.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -273,6 +274,9 @@
add_task (taskbar * tb, Window win, int focus)
{
task *tk, *list;
+ XTextProperty text_prop;
+ char **plist;
+ int pnum;
/* is this window on a different desktop? */
if (tb->my_desktop != find_desktop (win) || is_hidden (win))
@@ -281,7 +285,33 @@
tk = calloc (1, sizeof (task));
tk->win = win;
tk->focused = focus;
- tk->name = get_prop_data (win, XA_WM_NAME, XA_STRING, 0);
+
+ //proper way to get window name:
+ if(XGetWMName(dd, tk->win, &text_prop)) {
+ if (text_prop.value && text_prop.nitems > 0) {
+ if (text_prop.encoding == XA_STRING) {
+ tk->name = strdup((char *)text_prop.value);
+ XFree(text_prop.value);
+ } else {
+ text_prop.nitems = strlen((char *)text_prop.value);
+ if (XmbTextPropertyToTextList(dd, &text_prop, &plist, &pnum) >=
Success && pnum > 0 && *plist) {
+ XFree(text_prop.value);
+ tk->name = strdup(*plist);
+ XFreeStringList(plist);
+ } else {
+ tk->name = strdup((char *)text_prop.value);
+ XFree(text_prop.value);
+ }
+ }
+ } else {
+ /* the title is set, but it was set to none */
+ tk->name = strdup("");
+ }
+ } else {
+ /* the hint is probably not set */
+ tk->name = NULL;
+ }
+
tk->iconified = is_iconified (win);
get_task_kdeicon (tk);
@@ -960,6 +990,7 @@
time_t now;
struct tm *lt;
+ setlocale(LC_ALL,"");
dd = XOpenDisplay (NULL);
if (!dd)
return 0;
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
|