aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2022-10-10 10:34:56 -0400
committerB. Stack <bgstack15@gmail.com>2022-10-10 10:34:56 -0400
commit4767a3eb78e2e8286160000c203d1b91357614f7 (patch)
treeb3ecf8f3ba45c40f95efc8bc024e36cd5a61a8ed
parentreadd all images (diff)
downloadfbxkb-orig.tar.gz
fbxkb-orig.tar.bz2
fbxkb-orig.zip
original 0.6 source codeorig
from debian's orig.tar.gz. The original app is from sourceforge: https://fbxkb.sourceforge.net/index.html
-rw-r--r--.pc/.quilt_patches1
-rw-r--r--.pc/.quilt_series1
-rw-r--r--.pc/.version1
-rw-r--r--Makefile5
-rw-r--r--Makefile.common15
-rw-r--r--debian/changelog54
-rw-r--r--debian/control20
-rw-r--r--debian/copyright29
-rw-r--r--debian/dirs2
-rw-r--r--debian/docs1
-rw-r--r--debian/menu2
-rw-r--r--debian/patches/cross.patch14
-rw-r--r--debian/patches/debian-changes-0.6-1.1.patch163
-rw-r--r--debian/patches/dont-forcibly-strip.patch15
-rw-r--r--debian/patches/drop-extra-deps.patch13
-rw-r--r--debian/patches/fix-for-dh.patch20
-rw-r--r--debian/patches/replace-deprecated-gtk.patch63
-rw-r--r--debian/patches/respect-dpkg-buildflags.patch26
-rw-r--r--debian/patches/series10
-rw-r--r--debian/patches/show-us-flag.patch14
-rw-r--r--debian/patches/spelling.patch37
-rw-r--r--debian/patches/use-g_strdup.patch25
-rwxr-xr-xdebian/rules11
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch2
-rw-r--r--eggtrayicon.c18
-rw-r--r--fbxkb.c103
l---------images/us,basic.png1
-rw-r--r--images/us,dvorak.pngbin574 -> 0 bytes
-rw-r--r--man/Makefile7
-rw-r--r--man/fbxkb.165
31 files changed, 109 insertions, 630 deletions
diff --git a/.pc/.quilt_patches b/.pc/.quilt_patches
deleted file mode 100644
index 6857a8d..0000000
--- a/.pc/.quilt_patches
+++ /dev/null
@@ -1 +0,0 @@
-debian/patches
diff --git a/.pc/.quilt_series b/.pc/.quilt_series
deleted file mode 100644
index c206706..0000000
--- a/.pc/.quilt_series
+++ /dev/null
@@ -1 +0,0 @@
-series
diff --git a/.pc/.version b/.pc/.version
deleted file mode 100644
index 0cfbf08..0000000
--- a/.pc/.version
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/Makefile b/Makefile
index 9de5446..282eb88 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,10 @@ endif
TARGET = fbxkb
$(TARGET): $(OBJ)
- $(CC) $(LDFLAGS) $(OBJ) -Wl,--as-needed $(LIBS) -o $@
+ $(CC) $(LDFLAGS) $(LIBS) $(OBJ) -o $@
+ifeq (,$(DEVEL))
+ strip $@
+endif
all: $(TARGET)
diff --git a/Makefile.common b/Makefile.common
index 1094938..8d5c4ef 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -15,15 +15,10 @@ endif
endif
endif
-ifdef DESTDIR
-PREFIX := $(DESTDIR)/$(PREFIX)
-endif
-
CC = gcc
-PKG_CONFIG ?= pkg-config
-LIBS = -lX11 $(shell $(PKG_CONFIG) --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
-INCS = $(shell $(PKG_CONFIG) --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
-CFLAGS ?= -O2 # overwriten by command line or env. variable
+LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
+INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
+CFLAGS = -O2 # overwriten by command line or env. variable
CFLAGS += -Wall # always nice to have
ifneq (,$(DEVEL))
CFLAGS := -g -Wall
@@ -33,10 +28,10 @@ endif
CFLAGS += -g -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
%.o: %.c
- $(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -c $<
+ $(CC) $(CFLAGS) $(INCS) -c $<
%.dep: %.c
- $(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -MM $< -o $@
+ $(CC) $(CFLAGS) $(INCS) -MM $< -o $@
.PHONY: all clean distclean install uninstall
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 0c3bf08..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,54 +0,0 @@
-fbxkb (0.6-3) unstable; urgency=medium
-
- [ Andreas Beckmann ]
- * QA upload.
- * Set Maintainer to Debian QA Group. (See: #980961) (Closes: #978624)
- * Switch to debhelper-compat (= 13).
-
- [ Helmut Grohne ]
- * Fix FTCBFS: (Closes: #901152)
- + cross.patch: make pkg-config substitutable.
- + Use the makefile build system as configure does not set up compilers.
-
- -- Andreas Beckmann <anbe@debian.org> Mon, 25 Jan 2021 20:58:57 +0100
-
-fbxkb (0.6-2.1) unstable; urgency=medium
-
- * Non-maintainer upload.
- * Add dependency on libgdk-pixbuf-xlib-2.0-dev. (Closes: #975673)
- - The dependency also fixes FTBFS with gtk/gtk.h. (Closes: #975771)
-
- -- Sudip Mukherjee <sudipm.mukherjee@gmail.com> Mon, 14 Dec 2020 20:31:49 +0000
-
-fbxkb (0.6-2) unstable; urgency=low
-
- * New maintainer (Closes: #767970)
- * Fix parsing of keyboard info, to show proper "us" flag. (Closes: #412254)
- * Use g_strdup() before passing strings to g_hash_table_insert(),
- to avoid use-after-free.
- * Remove deprecated gtk_set_locale() and change deprecated gdk_window_lookup()
- to gdk_x11_window_lookup_for_display().
- This fixes "pointer-trouble-at-implicit" lintian error.
- * Don't unconditionally strip fbxkb binary (Closes: #436824)
- * Removed unnecessary dependencies.
- * Added homepage, debian/watch, machine-readable debian/copyright.
- * Switched to source format 3.0 (quilt)
- * Bumped Standards-Version to 3.9.6
-
- -- Dmitry Borisyuk <q1werty@i.com.ua> Wed, 05 Nov 2014 17:38:46 +0200
-
-fbxkb (0.6-1.1) unstable; urgency=low
-
- * Non-maintainer upload. (Patch by Mònica Ramírez Arceda <monica@probeta.net>)
- * eggtrayicon.c, fbxkb.c: Replace deprecated gdk_display and GDK_DISPLAY()
- with gdk_x11_get_default_xdisplay().
- * Link to X11 to build with binutils-gold. (Closes: #554280)
-
- -- Konstantinos Margaritis <markos@debian.org> Fri, 31 Jan 2012 13:46:19 +0200
-
-fbxkb (0.6-1) unstable; urgency=low
-
- * Initial Release.
- * The correct manual page was added.
-
- -- Vadim Vatlin <vatlin@sthbel.ru> Wed, 10 Jan 2007 17:29:30 +0300
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 6b212a9..0000000
--- a/debian/control
+++ /dev/null
@@ -1,20 +0,0 @@
-Source: fbxkb
-Section: x11
-Priority: optional
-Maintainer: Debian QA Group <packages@qa.debian.org>
-Build-Depends:
- debhelper-compat (= 13),
- libgtk2.0-dev,
- libxmu-dev,
- libgdk-pixbuf-xlib-2.0-dev,
-Rules-Requires-Root: no
-Standards-Version: 3.9.6
-Homepage: http://fbxkb.sourceforge.net
-
-Package: fbxkb
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: X11 keyboard indicator and switcher
- It shows a flag of current keyboard in a systray area and
- allows you to switch to another one. It's written in C and
- uses the GTK+2.4 library only (no GNOME is needed).
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 2eb8e07..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,29 +0,0 @@
-Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: fbxkb
-Upstream-Contact: Anatoly Asviyan <aanatoly@users.sf.net>
-Source: http://fbxkb.sf.net/
-Comment:
- This package was debianized by Vadim Vatlin <vatlin@sthbel.ru> on
- Wed, 10 Jan 2007 17:29:30 +0300.
-
-Files: *
-Copyright: Copyright (C) 2002 Anatoly Asviyan (aka Arsen)
- Copyright (C) 2000 Peter Zelezny
-License: Expat
- Permission is hereby granted, free of charge, to any person obtaining a
- copy of this software and associated documentation files (the "Software"),
- to deal in the Software without restriction, including without
- limitation the rights to use, copy, modify, merge, publish, distribute,
- sublicense, and/or sell copies of the Software, and to permit persons to
- whom the Software is furnished to do so, subject to the following conditions:
- .
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
- .
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
- SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
- OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index 254c543..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/share/fbxkb/images
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 168e5d2..0000000
--- a/debian/docs
+++ /dev/null
@@ -1 +0,0 @@
-CREDITS
diff --git a/debian/menu b/debian/menu
deleted file mode 100644
index f8e1243..0000000
--- a/debian/menu
+++ /dev/null
@@ -1,2 +0,0 @@
-?package(fbxkb):needs="X11" section="Applications/System/Hardware"\
- title="fbxkb" command="/usr/bin/fbxkb"
diff --git a/debian/patches/cross.patch b/debian/patches/cross.patch
deleted file mode 100644
index 15575ea..0000000
--- a/debian/patches/cross.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- fbxkb-0.6.orig/Makefile.common
-+++ fbxkb-0.6/Makefile.common
-@@ -20,8 +20,9 @@
- endif
-
- CC = gcc
--LIBS = -lX11 $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
--INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
-+PKG_CONFIG ?= pkg-config
-+LIBS = -lX11 $(shell $(PKG_CONFIG) --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
-+INCS = $(shell $(PKG_CONFIG) --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
- CFLAGS ?= -O2 # overwriten by command line or env. variable
- CFLAGS += -Wall # always nice to have
- ifneq (,$(DEVEL))
diff --git a/debian/patches/debian-changes-0.6-1.1.patch b/debian/patches/debian-changes-0.6-1.1.patch
deleted file mode 100644
index 44046ed..0000000
--- a/debian/patches/debian-changes-0.6-1.1.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-Description: changes in version 0.6-1.1
- * Non-maintainer upload. (Patch by Mònica Ramírez Arceda <monica@probeta.net>)
- * eggtrayicon.c, fbxkb.c: Replace deprecated gdk_display and GDK_DISPLAY()
- with gdk_x11_get_default_xdisplay().
- * Link to X11 to build with binutils-gold. (Closes: #554280)
-Author: Konstantinos Margaritis <markos@debian.org>
-Bug-Debian: https://bugs.debian.org/554280
---- fbxkb-0.6.orig/fbxkb.c
-+++ fbxkb-0.6/fbxkb.c
-@@ -456,7 +456,7 @@ init()
-
- ENTER;
- sym2pix = g_hash_table_new(g_str_hash, (GEqualFunc) my_str_equal);
-- dpy = GDK_DISPLAY();
-+ dpy = gdk_x11_get_default_xdisplay();
- a_XKB_RULES_NAMES = XInternAtom(dpy, "_XKB_RULES_NAMES", False);
- if (a_XKB_RULES_NAMES == None)
- ERR("_XKB_RULES_NAMES - can't get this atom\n");
-@@ -536,7 +536,7 @@ Xerror_handler(Display * d, XErrorEvent
- char buf[256];
-
- ENTER;
-- XGetErrorText(GDK_DISPLAY(), ev->error_code, buf, 256);
-+ XGetErrorText(gdk_x11_get_default_xdisplay(), ev->error_code, buf, 256);
- ERR( "fbxkb : X error: %s\n", buf);
- RET();
- }
---- fbxkb-0.6.orig/eggtrayicon.c
-+++ fbxkb-0.6/eggtrayicon.c
-@@ -153,7 +153,7 @@ egg_tray_icon_send_manager_message (EggT
- #if HAVE_GTK_MULTIHEAD
- display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
- #else
-- display = gdk_display;
-+ display = gdk_x11_get_default_xdisplay();
- #endif
-
- gdk_error_trap_push ();
-@@ -181,7 +181,7 @@ egg_tray_icon_update_manager_window (Egg
- #if HAVE_GTK_MULTIHEAD
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
- #else
-- xdisplay = gdk_display;
-+ xdisplay = gdk_x11_get_default_xdisplay();
- #endif
-
- if (icon->manager_window != None)
-@@ -300,7 +300,7 @@ egg_tray_icon_new_for_screen (GdkScreen
- EggTrayIcon*
- egg_tray_icon_new (const gchar *name)
- {
-- return egg_tray_icon_new_for_xscreen (DefaultScreenOfDisplay (gdk_display), name);
-+ return egg_tray_icon_new_for_xscreen (DefaultScreenOfDisplay (gdk_x11_get_default_xdisplay()), name);
- }
-
- guint
-@@ -338,7 +338,7 @@ egg_tray_icon_send_message (EggTrayIcon
- #if HAVE_GTK_MULTIHEAD
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
- #else
-- xdisplay = gdk_display;
-+ xdisplay = gdk_x11_get_default_xdisplay();
- #endif
-
- ev.type = ClientMessage;
---- fbxkb-0.6.orig/man/Makefile
-+++ fbxkb-0.6/man/Makefile
-@@ -20,9 +20,8 @@ clean:
-
-
- install: all
--# install -d $(PREFIX)/share/man/man1
--# install -m 644 $(TARGET) $(PREFIX)/share/man/man1
-+ install -d $(PREFIX)/share/man/man1
-+ install -m 644 $(TARGET) $(PREFIX)/share/man/man1
-
- uninstall:
--# rm -f $(PREFIX)/share/man/man1/$(TARGET)
--
-+ rm -f $(PREFIX)/share/man/man1/$(TARGET)
---- fbxkb-0.6.orig/man/fbxkb.1
-+++ fbxkb-0.6/man/fbxkb.1
-@@ -1,70 +1,25 @@
- .\" man page originally for the Debian/GNU Linux system
--.TH FBPANEL "1" "February 2004" "fbxkb 2.2" "User Commands"
-+.TH FBXKB "1" "January 2007" "fbxkb 0.6" "User Commands"
- .SH NAME
--fbxkb \- a lightweight GTK2-based panel for UNIX desktop.
-+fbxkb \- a lightweight X11 keyboard switcher.
- .SH SYNOPSIS
- .B fbxkb
--[\fIOPTION\fR]
- .br
- .SH DESCRIPTION
- .PP
--fbxkb is desktop panel which provides graphical information and feedback about
--desktop activity and allows interaction with the window manager.
--It features:
--.HP
--\(bu taskbar \- shows a list of the managed windows (tasks)
--.HP
--\(bu pager \- thumbnailed view of the desktop.
--.HP
--\(bu launchbar \- buttons to quickly launch applications
--.HP
--\(bu show desktop \- button to iconify or shade all windows
--.HP
--\(bu image \- display an image
--.HP
--\(bu clock \- show the current time and/or date
--.HP
--\(bu system tray \- tray for XEMBED icons (aka docklets)
--.PP
--fbxkb requires NETWM (www.freedesktop.org) compliant window manager.
--You can run many instances of fbxkb each with its own configuration
--(see \fBOPTIONS\fR below).
-+fbxkb is X11 keyboard switcher, which provides visual information
-+about current keyboard. It shows a flag of current keyboard in a
-+systray area and allows you to switch to another one.
-+
-+fbxkb requires NETWM (www.freedesktop.org) compliant window manager.
-+It's written in C and uses the GTK+-2.4 library only (no GNOME is needed).
-
- Most updated info about fbxkb can be found on its home page:
- http://fbxkb.sf.net/
--
- .SH OPTIONS
- .TP
--\fB\-h\fR
--\- print help message and exit.
--.TP
--\fB\-v\fR
--\- print version and exit.
--.TP
--\fB\-p <name>\fR
--\- use the profile <name>. The profile is loaded from the file ~/.fbxkb/<name>.
--If that fails, fbxkb will load PREFIX/share/fbxkb/<name>. No \fB\-p\fR option is equivalent
--to \fB\-p default\fR
--.SH CUSTOMIZATION
--To change default settings, copy profile file to your home directory
--.br
-- mkdir -p ~/.fbxkb
-- cp PREFIX/share/fbxkb/default ~/.fbxkb
--.br
--and edit it. Default profile file contains comments and explanation inside,
--so it should be easy. For full list of options please visit fbxkb's home page.
--
--.SH FILES
--.TP
--PREFIX/share/fbxkb
--Directory with system-wide resources and default settings
--.TP
--~/.fbxkb/
--Directory with the user's private profiles
--.TP
--~/.fbxkb/default
--The user's default profile.
-+fbxkb hasn't options. It just works.
- .SH AUTHOR
- fbxkb was written by Anatoly Asviyan <aanatoly@users.sf.net>.
- This manual page was originally written for the
--Debian GNU/Linux system by Shyamal Prasad <shyamal@member.fsf.org>.
-+Debian GNU/Linux system by Vadim Vatlin <vatlin@sthbel.ru>.
diff --git a/debian/patches/dont-forcibly-strip.patch b/debian/patches/dont-forcibly-strip.patch
deleted file mode 100644
index c8b509b..0000000
--- a/debian/patches/dont-forcibly-strip.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Descrpition: Don't strip fbxkb binary in Makefile, let dh_strip do this
-Author: Dmitry Borisyuk <q1werty@i.com.ua>
-Bug-Debian: https://bugs.debian.org/436824
---- a/Makefile
-+++ b/Makefile
-@@ -31,9 +31,6 @@
- TARGET = fbxkb
- $(TARGET): $(OBJ)
- $(CC) $(LDFLAGS) $(LIBS) $(OBJ) -o $@
--ifeq (,$(DEVEL))
-- strip $@
--endif
-
- all: $(TARGET)
-
diff --git a/debian/patches/drop-extra-deps.patch b/debian/patches/drop-extra-deps.patch
deleted file mode 100644
index 4c3957e..0000000
--- a/debian/patches/drop-extra-deps.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Description: use --as-needed linker flag to avoid unnecessary dependencies
-Author: Dmitry Borisyuk <q1werty@i.com.ua>
---- a/Makefile
-+++ b/Makefile
-@@ -30,7 +30,7 @@
-
- TARGET = fbxkb
- $(TARGET): $(OBJ)
-- $(CC) $(LDFLAGS) $(LIBS) $(OBJ) -o $@
-+ $(CC) $(LDFLAGS) $(OBJ) -Wl,--as-needed $(LIBS) -o $@
-
- all: $(TARGET)
-
diff --git a/debian/patches/fix-for-dh.patch b/debian/patches/fix-for-dh.patch
deleted file mode 100644
index 7bafad2..0000000
--- a/debian/patches/fix-for-dh.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Description: some fixes to make it work with default debian/rules
- Adjust PREFIX if DESTDIR is defined - for dh_install* to work correctly
- Linker option -lX11 moved here from debian/rules
-Author: Dmitry Borisyuk <q1werty@i.com.ua>
---- a/Makefile.common
-+++ b/Makefile.common
-@@ -15,8 +15,12 @@
- endif
- endif
-
-+ifdef DESTDIR
-+PREFIX := $(DESTDIR)/$(PREFIX)
-+endif
-+
- CC = gcc
--LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
-+LIBS = -lX11 $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
- INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
- CFLAGS ?= -O2 # overwriten by command line or env. variable
- CFLAGS += -Wall # always nice to have
diff --git a/debian/patches/replace-deprecated-gtk.patch b/debian/patches/replace-deprecated-gtk.patch
deleted file mode 100644
index e4a2f15..0000000
--- a/debian/patches/replace-deprecated-gtk.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Description: Remove deprecated GTK functions
- Remove gtk_set_locale() and change gdk_window_lookup() to gdk_x11_window_lookup_for_display().
- Fixes "pointer-trouble-at-implicit" and "pointer-from-integer" warnings.
-Author: Dmitry Borisyuk <q1werty@i.com.ua>
---- a/eggtrayicon.c
-+++ b/eggtrayicon.c
-@@ -111,7 +111,7 @@
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
- icon->manager_window);
- #else
-- gdkwin = gdk_window_lookup (icon->manager_window);
-+ gdkwin = gdk_x11_window_lookup_for_display (gdk_display_get_default(), icon->manager_window);
- #endif
-
- gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
-@@ -120,7 +120,7 @@
- #if HAVE_GTK_MULTIHEAD
- root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
- #else
-- root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
-+ root_window = gdk_x11_window_lookup_for_display (gdk_display_get_default(), gdk_x11_get_default_root_xwindow ());
- #endif
-
- gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon);
-@@ -192,7 +192,7 @@
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
- icon->manager_window);
- #else
-- gdkwin = gdk_window_lookup (icon->manager_window);
-+ gdkwin = gdk_x11_window_lookup_for_display (gdk_display_get_default(), icon->manager_window);
- #endif
-
- gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
-@@ -218,7 +218,7 @@
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
- icon->manager_window);
- #else
-- gdkwin = gdk_window_lookup (icon->manager_window);
-+ gdkwin = gdk_x11_window_lookup_for_display (gdk_display_get_default(), icon->manager_window);
- #endif
-
- gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
-@@ -274,7 +274,7 @@
- #if HAVE_GTK_MULTIHEAD
- root_window = gdk_screen_get_root_window (gtk_widget_get_screen (screen));
- #else
-- root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
-+ root_window = gdk_x11_window_lookup_for_display (gdk_display_get_default(), gdk_x11_get_default_root_xwindow ());
- #endif
-
- /* Add a root window filter so that we get changes on MANAGER */
---- a/fbxkb.c
-+++ b/fbxkb.c
-@@ -510,8 +510,7 @@
- main(int argc, char *argv[], char *env[])
- {
- ENTER;
-- setlocale(LC_CTYPE, "");
-- gtk_set_locale();
-+ setlocale(LC_ALL, "");
- gtk_init(&argc, &argv);
- XSetLocaleModifiers("");
- XSetErrorHandler((XErrorHandler) Xerror_handler);
diff --git a/debian/patches/respect-dpkg-buildflags.patch b/debian/patches/respect-dpkg-buildflags.patch
deleted file mode 100644
index f972fbd..0000000
--- a/debian/patches/respect-dpkg-buildflags.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Description: Respect default {C,CPP}FLAGS from dpkg-buildflags
-Author: Dmitry Borisyuk <q1werty@i.com.ua>
---- a/Makefile.common
-+++ b/Makefile.common
-@@ -18,7 +18,7 @@
- CC = gcc
- LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu
- INCS = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0)
--CFLAGS = -O2 # overwriten by command line or env. variable
-+CFLAGS ?= -O2 # overwriten by command line or env. variable
- CFLAGS += -Wall # always nice to have
- ifneq (,$(DEVEL))
- CFLAGS := -g -Wall
-@@ -28,10 +28,10 @@
- CFLAGS += -g -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
-
- %.o: %.c
-- $(CC) $(CFLAGS) $(INCS) -c $<
-+ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -c $<
-
- %.dep: %.c
-- $(CC) $(CFLAGS) $(INCS) -MM $< -o $@
-+ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) -MM $< -o $@
-
- .PHONY: all clean distclean install uninstall
-
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 57e85e0..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,10 +0,0 @@
-debian-changes-0.6-1.1.patch
-show-us-flag.patch
-use-g_strdup.patch
-replace-deprecated-gtk.patch
-spelling.patch
-dont-forcibly-strip.patch
-respect-dpkg-buildflags.patch
-drop-extra-deps.patch
-fix-for-dh.patch
-cross.patch
diff --git a/debian/patches/show-us-flag.patch b/debian/patches/show-us-flag.patch
deleted file mode 100644
index 5c86190..0000000
--- a/debian/patches/show-us-flag.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Description: Fix parsing of keyboard info, to show proper "us" flag
-Author: Dmitry Borisyuk <q1werty@i.com.ua>
-Bug-Debian: https://bugs.debian.org/412254
---- a/fbxkb.c
-+++ b/fbxkb.c
-@@ -372,7 +372,7 @@
- *tmp = 0;
-
- DBG("map=%s no=%d\n", tok, no);
-- if (!strcmp(tok, "pc") || !strcmp(tok, "group"))
-+ if (!strcmp(tok, "pc") || (strlen(tok) != 2))
- continue;
-
- g_assert((no >= 0) && (no < ngroups));
diff --git a/debian/patches/spelling.patch b/debian/patches/spelling.patch
deleted file mode 100644
index 343cba3..0000000
--- a/debian/patches/spelling.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Description: Correct spelling
-Author: Dmitry Borisyuk <q1werty@i.com.ua>
---- a/fbxkb.c
-+++ b/fbxkb.c
-@@ -40,7 +40,7 @@
-
- #define IMGPREFIX PREFIX "/share/fbxkb/images/"
- /******************************************************************
-- * GLOBAL VARSIABLES *
-+ * GLOBAL VARIABLES *
- ******************************************************************/
-
- /* X11 common stuff */
-@@ -48,7 +48,7 @@
- static Display *dpy;
- static int xkb_event_type;
-
--/* internal state mashine */
-+/* internal state machine */
- static int cur_group;
- static int ngroups;
- static GHashTable *sym2pix;
-@@ -383,11 +383,11 @@
- }
- out:
- XkbFreeKeyboard(kbd_desc_ptr, 0, True);
-- // sanity check: group numbering must be continous
-+ // sanity check: group numbering must be continuous
- for (i = 0; (i < XkbNumKbdGroups) && (group2info[i].sym != NULL); i++);
- if (i != ngroups) {
-- ERR("kbd group numbering is not continous\n");
-- ERR("run 'xlsatoms | grep pc' to know what hapends\n");
-+ ERR("kbd group numbering is not continuous\n");
-+ ERR("run 'xlsatoms | grep pc' to know what happens\n");
- exit(1);
- }
- out_us:
diff --git a/debian/patches/use-g_strdup.patch b/debian/patches/use-g_strdup.patch
deleted file mode 100644
index 9651da2..0000000
--- a/debian/patches/use-g_strdup.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Description: Use g_strdup() to pass strings to g_hash_table_insert()
- Otherwise use-after-free happens soon.
-Author: Dmitry Borisyuk <q1werty@i.com.ua>
---- a/fbxkb.c
-+++ b/fbxkb.c
-@@ -266,7 +266,6 @@
- {
- GdkPixbuf *flag;
- static GString *s = NULL;
-- char tmp[3];
-
- ENTER;
- g_assert(sym != NULL && strlen(sym) > 1);
-@@ -281,10 +280,7 @@
- flag = gdk_pixbuf_new_from_file_at_size(s->str, 24, 24, NULL);
- if (!flag)
- RET(zzflag);
-- tmp[0] = sym[0];
-- tmp[1] = sym[1];
-- tmp[2] = 0;
-- g_hash_table_insert(sym2pix, tmp, flag);
-+ g_hash_table_insert(sym2pix, g_strdup(sym), flag);
- RET(flag);
- }
-
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 05a4f69..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-%:
- dh $@ --buildsystem=makefile
-
-override_dh_auto_configure:
- ./configure --prefix=/usr
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index ed4d1a1..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,2 +0,0 @@
-version=3
-http://sf.net/fbxkb/fbxkb-([0-9\.]+)\.tgz
diff --git a/eggtrayicon.c b/eggtrayicon.c
index abdd69c..1a6dcca 100644
--- a/eggtrayicon.c
+++ b/eggtrayicon.c
@@ -111,7 +111,7 @@ egg_tray_icon_unrealize (GtkWidget *widget)
gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
icon->manager_window);
#else
- gdkwin = gdk_x11_window_lookup_for_display (gdk_display_get_default(), icon->manager_window);
+ gdkwin = gdk_window_lookup (icon->manager_window);
#endif
gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
@@ -120,7 +120,7 @@ egg_tray_icon_unrealize (GtkWidget *widget)
#if HAVE_GTK_MULTIHEAD
root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
#else
- root_window = gdk_x11_window_lookup_for_display (gdk_display_get_default(), gdk_x11_get_default_root_xwindow ());
+ root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
#endif
gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon);
@@ -153,7 +153,7 @@ egg_tray_icon_send_manager_message (EggTrayIcon *icon,
#if HAVE_GTK_MULTIHEAD
display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
#else
- display = gdk_x11_get_default_xdisplay();
+ display = gdk_display;
#endif
gdk_error_trap_push ();
@@ -181,7 +181,7 @@ egg_tray_icon_update_manager_window (EggTrayIcon *icon)
#if HAVE_GTK_MULTIHEAD
xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
#else
- xdisplay = gdk_x11_get_default_xdisplay();
+ xdisplay = gdk_display;
#endif
if (icon->manager_window != None)
@@ -192,7 +192,7 @@ egg_tray_icon_update_manager_window (EggTrayIcon *icon)
gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
icon->manager_window);
#else
- gdkwin = gdk_x11_window_lookup_for_display (gdk_display_get_default(), icon->manager_window);
+ gdkwin = gdk_window_lookup (icon->manager_window);
#endif
gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
@@ -218,7 +218,7 @@ egg_tray_icon_update_manager_window (EggTrayIcon *icon)
gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
icon->manager_window);
#else
- gdkwin = gdk_x11_window_lookup_for_display (gdk_display_get_default(), icon->manager_window);
+ gdkwin = gdk_window_lookup (icon->manager_window);
#endif
gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
@@ -274,7 +274,7 @@ egg_tray_icon_new_for_xscreen (Screen *xscreen, const char *name)
#if HAVE_GTK_MULTIHEAD
root_window = gdk_screen_get_root_window (gtk_widget_get_screen (screen));
#else
- root_window = gdk_x11_window_lookup_for_display (gdk_display_get_default(), gdk_x11_get_default_root_xwindow ());
+ root_window = gdk_window_lookup (gdk_x11_get_default_root_xwindow ());
#endif
/* Add a root window filter so that we get changes on MANAGER */
@@ -300,7 +300,7 @@ egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
EggTrayIcon*
egg_tray_icon_new (const gchar *name)
{
- return egg_tray_icon_new_for_xscreen (DefaultScreenOfDisplay (gdk_x11_get_default_xdisplay()), name);
+ return egg_tray_icon_new_for_xscreen (DefaultScreenOfDisplay (gdk_display), name);
}
guint
@@ -338,7 +338,7 @@ egg_tray_icon_send_message (EggTrayIcon *icon,
#if HAVE_GTK_MULTIHEAD
xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
#else
- xdisplay = gdk_x11_get_default_xdisplay();
+ xdisplay = gdk_display;
#endif
ev.type = ClientMessage;
diff --git a/fbxkb.c b/fbxkb.c
index fb5f665..c6eccbc 100644
--- a/fbxkb.c
+++ b/fbxkb.c
@@ -40,7 +40,7 @@ typedef struct _kbd_info {
#define IMGPREFIX PREFIX "/share/fbxkb/images/"
/******************************************************************
- * GLOBAL VARIABLES *
+ * GLOBAL VARSIABLES *
******************************************************************/
/* X11 common stuff */
@@ -48,7 +48,7 @@ static Atom a_XKB_RULES_NAMES;
static Display *dpy;
static int xkb_event_type;
-/* internal state machine */
+/* internal state mashine */
static int cur_group;
static int ngroups;
static GHashTable *sym2pix;
@@ -170,7 +170,7 @@ app_menu_about(GtkWidget *widget, gpointer data)
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE,
- "fbxkb %s\nX11 Keyboard switcher\nOriginal author: Anatoly Asviyan <aanatoly@users.sf.net>\ncustomized for stackrpms by bgstack15", version);
+ "fbxkb %s\nX11 Keyboard switcher\nAuthor: Anatoly Asviyan <aanatoly@users.sf.net>", version);
/* Destroy the dialog when the user responds to it (e.g. clicks a button) */
g_signal_connect_swapped (about_dialog, "response",
G_CALLBACK (gtk_widget_hide),
@@ -205,12 +205,6 @@ static void docklet_destroyed(GtkWidget *widget, void *data)
RET();
}
-int scroll_input_method(int no) {
- no = (cur_group + no) % ngroups;
- DBG("no=%d\n", no);
- XkbLockGroup(dpy, XkbUseCoreKbd, no);
- return no;
-}
void docklet_clicked(GtkWidget *button, GdkEventButton *event, void *data)
{
@@ -219,9 +213,13 @@ void docklet_clicked(GtkWidget *button, GdkEventButton *event, void *data)
if (event->type != GDK_BUTTON_PRESS)
RET();
- if (event->button == 2) {
- scroll_input_method(1);
- } else if (event->button == 1) {
+ if (event->button == 1) {
+ int no;
+
+ no = (cur_group + 1) % ngroups;
+ DBG("no=%d\n", no);
+ XkbLockGroup(dpy, XkbUseCoreKbd, no);
+ } else if (event->button == 2) {
gtk_menu_popup(GTK_MENU(flag_menu), NULL, NULL, NULL, NULL, event->button, event->time);
} else if (event->button == 3) {
gtk_menu_popup(GTK_MENU(app_menu), NULL, NULL, NULL, NULL, event->button, event->time);
@@ -229,26 +227,6 @@ void docklet_clicked(GtkWidget *button, GdkEventButton *event, void *data)
RET();
}
-void docklet_scrolled(GtkWidget *button, GdkEventScroll *event, void *data) {
- char *i = NULL;
- int no = 0;
- switch (event->direction) {
- case GDK_SCROLL_UP:
- case GDK_SCROLL_LEFT:
- i = "up";
- no = -1;
- break;
- case GDK_SCROLL_DOWN:
- case GDK_SCROLL_RIGHT:
- i = "down";
- no = 1;
- break;
- }
- if (i) {
- scroll_input_method(no);
- }
-}
-
static int
docklet_create()
{
@@ -262,7 +240,6 @@ docklet_create()
g_signal_connect(G_OBJECT(docklet), "embedded", G_CALLBACK(docklet_embedded), NULL);
g_signal_connect(G_OBJECT(docklet), "destroy", G_CALLBACK(docklet_destroyed), NULL);
g_signal_connect(G_OBJECT(box), "button-press-event", G_CALLBACK(docklet_clicked), NULL);
- g_signal_connect(G_OBJECT(docklet), "scroll-event", G_CALLBACK(docklet_scrolled), NULL);
gtk_container_set_border_width(GTK_CONTAINER(box), 0);
@@ -280,7 +257,7 @@ docklet_create()
static gboolean
my_str_equal (gchar *a, gchar *b)
{
- return strcmp(a,b) == 0;
+ return (a[0] == b[0] && a[1] == b[1]);
}
@@ -289,6 +266,7 @@ sym2flag(char *sym)
{
GdkPixbuf *flag;
static GString *s = NULL;
+ char tmp[3];
ENTER;
g_assert(sym != NULL && strlen(sym) > 1);
@@ -296,16 +274,17 @@ sym2flag(char *sym)
if (flag)
RET(flag);
- if (!s)
- s = g_string_new(IMGPREFIX);
- else
- s = g_string_assign(s,IMGPREFIX);
- s = g_string_append(s, sym);
- s = g_string_append(s, ".png");
+ if (!s)
+ s = g_string_new(IMGPREFIX "tt.png");
+ s->str[s->len-6] = sym[0];
+ s->str[s->len-5] = sym[1];
flag = gdk_pixbuf_new_from_file_at_size(s->str, 24, 24, NULL);
if (!flag)
RET(zzflag);
- g_hash_table_insert(sym2pix, g_strdup(sym), flag);
+ tmp[0] = sym[0];
+ tmp[1] = sym[1];
+ tmp[2] = 0;
+ g_hash_table_insert(sym2pix, tmp, flag);
RET(flag);
}
@@ -366,7 +345,7 @@ read_kbd_description()
// parse kbd info
if (sym_name_atom != None) {
- char *sym_name, *tmp, *tok, *tmp2, *tmp3;
+ char *sym_name, *tmp, *tok;
int no;
sym_name = XGetAtomName(dpy, sym_name_atom);
@@ -377,7 +356,6 @@ read_kbd_description()
* 150 pc/pc(pc101)+pc/us+pc/ru(phonetic):2+group(shift_toggle)
* 470 pc(pc105)+us+ru(phonetic):2+il(phonetic):3+group(shifts_toggle)+group(switch)
*/
- tmp3 = malloc(30 * sizeof(char));
DBG("sym_name=%s\n", sym_name);
for (tok = strtok(sym_name, "+"); tok; tok = strtok(NULL, "+")) {
DBG("tok=%s\n", tok);
@@ -390,46 +368,30 @@ read_kbd_description()
} else {
no = 0;
}
- if((tmp2 = strchr(tok, '('))) {
- // these next two statements could be done cleverly in one statement but the compiler warns if you try it.
- // strip left paren, and then right paren
- tmp2++;
- tmp2[strlen(tmp2)-1] = '\0';
- }
- DBG("tmp2=%s\n", tmp2);
for (tmp = tok; isalpha(*tmp); tmp++);
*tmp = 0;
DBG("map=%s no=%d\n", tok, no);
- if (!strcmp(tok, "pc") || (strlen(tok) != 2))
+ if (!strcmp(tok, "pc") || !strcmp(tok, "group"))
continue;
g_assert((no >= 0) && (no < ngroups));
if (group2info[no].sym != NULL) {
ERR("xkb group #%d is already defined\n", no);
}
- strcpy(tmp3, tok);
- if (tmp2 != 0) {
- strcat(tmp3,",");
- // add variant to end of string for the png lookup
- strcat(tmp3,tmp2);
- *tmp2 = 0;
- }
- DBG("tmp3=%s\n",tmp3);
- group2info[no].sym = g_strdup(tmp3);
- group2info[no].flag = sym2flag(tmp3);
+ group2info[no].sym = g_strdup(tok);
+ group2info[no].flag = sym2flag(tok);
group2info[no].name = XGetAtomName(dpy, kbd_desc_ptr->names->groups[no]);
- *tmp3 = 0;
}
XFree(sym_name);
}
out:
XkbFreeKeyboard(kbd_desc_ptr, 0, True);
- // sanity check: group numbering must be continuous
+ // sanity check: group numbering must be continous
for (i = 0; (i < XkbNumKbdGroups) && (group2info[i].sym != NULL); i++);
if (i != ngroups) {
- ERR("kbd group numbering is not continuous\n");
- ERR("run 'xlsatoms | grep pc' to know what happens\n");
+ ERR("kbd group numbering is not continous\n");
+ ERR("run 'xlsatoms | grep pc' to know what hapends\n");
exit(1);
}
out_us:
@@ -454,7 +416,6 @@ static void update_flag(int no)
g_assert(k != NULL);
DBG("k->sym=%s\n", k->sym);
gtk_image_set_from_pixbuf(GTK_IMAGE(image), k->flag);
- gtk_widget_set_tooltip_text(docklet, k->name);
RET();
}
@@ -473,9 +434,8 @@ filter( XEvent *xev, GdkEvent *event, gpointer data)
if (xkbev->any.xkb_type == XkbStateNotify) {
DBG("XkbStateNotify: %d\n", xkbev->state.group);
cur_group = xkbev->state.group;
- if (cur_group < ngroups) {
+ if (cur_group < ngroups)
update_flag(cur_group);
- }
} else if (xkbev->any.xkb_type == XkbNewKeyboardNotify) {
DBG("XkbNewKeyboardNotify\n");
read_kbd_description();
@@ -496,7 +456,7 @@ init()
ENTER;
sym2pix = g_hash_table_new(g_str_hash, (GEqualFunc) my_str_equal);
- dpy = gdk_x11_get_default_xdisplay();
+ dpy = GDK_DISPLAY();
a_XKB_RULES_NAMES = XInternAtom(dpy, "_XKB_RULES_NAMES", False);
if (a_XKB_RULES_NAMES == None)
ERR("_XKB_RULES_NAMES - can't get this atom\n");
@@ -554,7 +514,8 @@ int
main(int argc, char *argv[], char *env[])
{
ENTER;
- setlocale(LC_ALL, "");
+ setlocale(LC_CTYPE, "");
+ gtk_set_locale();
gtk_init(&argc, &argv);
XSetLocaleModifiers("");
XSetErrorHandler((XErrorHandler) Xerror_handler);
@@ -575,7 +536,7 @@ Xerror_handler(Display * d, XErrorEvent * ev)
char buf[256];
ENTER;
- XGetErrorText(gdk_x11_get_default_xdisplay(), ev->error_code, buf, 256);
+ XGetErrorText(GDK_DISPLAY(), ev->error_code, buf, 256);
ERR( "fbxkb : X error: %s\n", buf);
RET();
}
diff --git a/images/us,basic.png b/images/us,basic.png
deleted file mode 120000
index ea19c57..0000000
--- a/images/us,basic.png
+++ /dev/null
@@ -1 +0,0 @@
-us.png \ No newline at end of file
diff --git a/images/us,dvorak.png b/images/us,dvorak.png
deleted file mode 100644
index 935a08e..0000000
--- a/images/us,dvorak.png
+++ /dev/null
Binary files differ
diff --git a/man/Makefile b/man/Makefile
index 2f8d321..0848d09 100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -20,8 +20,9 @@ clean:
install: all
- install -d $(PREFIX)/share/man/man1
- install -m 644 $(TARGET) $(PREFIX)/share/man/man1
+# install -d $(PREFIX)/share/man/man1
+# install -m 644 $(TARGET) $(PREFIX)/share/man/man1
uninstall:
- rm -f $(PREFIX)/share/man/man1/$(TARGET)
+# rm -f $(PREFIX)/share/man/man1/$(TARGET)
+
diff --git a/man/fbxkb.1 b/man/fbxkb.1
index 4ac232c..a2b34f6 100644
--- a/man/fbxkb.1
+++ b/man/fbxkb.1
@@ -1,25 +1,70 @@
.\" man page originally for the Debian/GNU Linux system
-.TH FBXKB "1" "January 2007" "fbxkb 0.6" "User Commands"
+.TH FBPANEL "1" "February 2004" "fbxkb 2.2" "User Commands"
.SH NAME
-fbxkb \- a lightweight X11 keyboard switcher.
+fbxkb \- a lightweight GTK2-based panel for UNIX desktop.
.SH SYNOPSIS
.B fbxkb
+[\fIOPTION\fR]
.br
.SH DESCRIPTION
.PP
-fbxkb is X11 keyboard switcher, which provides visual information
-about current keyboard. It shows a flag of current keyboard in a
-systray area and allows you to switch to another one.
-
-fbxkb requires NETWM (www.freedesktop.org) compliant window manager.
-It's written in C and uses the GTK+-2.4 library only (no GNOME is needed).
+fbxkb is desktop panel which provides graphical information and feedback about
+desktop activity and allows interaction with the window manager.
+It features:
+.HP
+\(bu taskbar \- shows a list of the managed windows (tasks)
+.HP
+\(bu pager \- thumbnailed view of the desktop.
+.HP
+\(bu launchbar \- buttons to quickly launch applications
+.HP
+\(bu show desktop \- button to iconify or shade all windows
+.HP
+\(bu image \- display an image
+.HP
+\(bu clock \- show the current time and/or date
+.HP
+\(bu system tray \- tray for XEMBED icons (aka docklets)
+.PP
+fbxkb requires NETWM (www.freedesktop.org) compliant window manager.
+You can run many instances of fbxkb each with its own configuration
+(see \fBOPTIONS\fR below).
Most updated info about fbxkb can be found on its home page:
http://fbxkb.sf.net/
+
.SH OPTIONS
.TP
-fbxkb hasn't options. It just works.
+\fB\-h\fR
+\- print help message and exit.
+.TP
+\fB\-v\fR
+\- print version and exit.
+.TP
+\fB\-p <name>\fR
+\- use the profile <name>. The profile is loaded from the file ~/.fbxkb/<name>.
+If that fails, fbxkb will load PREFIX/share/fbxkb/<name>. No \fB\-p\fR option is equivalent
+to \fB\-p default\fR
+.SH CUSTOMIZATION
+To change default settings, copy profile file to your home directory
+.br
+ mkdir -p ~/.fbxkb
+ cp PREFIX/share/fbxkb/default ~/.fbxkb
+.br
+and edit it. Default profile file contains comments and explanation inside,
+so it should be easy. For full list of options please visit fbxkb's home page.
+
+.SH FILES
+.TP
+PREFIX/share/fbxkb
+Directory with system-wide resources and default settings
+.TP
+~/.fbxkb/
+Directory with the user's private profiles
+.TP
+~/.fbxkb/default
+The user's default profile.
.SH AUTHOR
fbxkb was written by Anatoly Asviyan <aanatoly@users.sf.net>.
This manual page was originally written for the
-Debian GNU/Linux system by Vadim Vatlin <vatlin@sthbel.ru>.
+Debian GNU/Linux system by Shyamal Prasad <shyamal@member.fsf.org>.
bgstack15