From 0731d691df36936aed5b7687033597d0a6f2777c Mon Sep 17 00:00:00 2001 From: freetz Date: Sun, 20 Aug 2006 10:56:45 +0000 Subject: [PATCH] - make it work with 4.3 Changed files: fbpanel-build_fixes.patch -> 1.8 fbpanel-file_watcher.patch -> 1.2 --- fbpanel-build_fixes.patch | 186 ++++++++++++++++++++++++++----------- fbpanel-file_watcher.patch | 107 ++++++++++----------- 2 files changed, 180 insertions(+), 113 deletions(-) diff --git a/fbpanel-build_fixes.patch b/fbpanel-build_fixes.patch index e7b598f..02c0f6b 100644 --- a/fbpanel-build_fixes.patch +++ b/fbpanel-build_fixes.patch @@ -1,6 +1,119 @@ +diff -aurN fbpanel-4.3.orig/config/default.cfg fbpanel-4.3/config/default.cfg +--- fbpanel-4.3.orig/config/default.cfg 2005-05-21 17:44:18.000000000 +0200 ++++ fbpanel-4.3/config/default.cfg 2006-08-20 12:51:02.000000000 +0200 +@@ -50,7 +50,7 @@ + + # # Identify panel window type as dock + # # legal values are boolean +-# SetDockTpe = true ++# SetDockType = true + + # # Reserve panel's space so that it will not be covered by maximazied windows + # # legal values are boolean +@@ -126,11 +126,11 @@ + type = menu + config { + # name = menu +- image = PREFIX/share/fbpanel/images/Menu.png ++ image = /usr/share/fbpanel/images/Menu.png + + menu { + name = Networking +- image = PREFIX/share/fbpanel/images/Networking.png ++ image = /usr/share/fbpanel/images/Networking.png + item { + # image = + name = mozilla +@@ -147,19 +147,19 @@ + } + item { + name = Configure +- image = PREFIX/share/fbpanel/images/settings.png ++ image = /usr/share/fbpanel/images/settings.png + command = configure + } + separator { + } + item { + name = terminal +- image = PREFIX/share/fbpanel/images/GNOME-Terminal.png ++ image = /usr/share/fbpanel/images/GNOME-Terminal.png + action = xterm + } + item { + name = emacs +- image = PREFIX/share/fbpanel/images/Emacs.png ++ image = /usr/share/fbpanel/images/Emacs.png + action = emacs + } + +@@ -176,12 +176,12 @@ + type = launchbar + config { + button { +- image = PREFIX/share/fbpanel/images/GNOME-Terminal.png ++ image = /usr/share/fbpanel/images/GNOME-Terminal.png + tooltip = Terminal + action = xterm + } + button { +- image = PREFIX/share/fbpanel/images/Emacs.png ++ image = /usr/share/fbpanel/images/Emacs.png + tooltip = Emacs + action = emacs + } +@@ -203,21 +203,21 @@ + Plugin { + type = icons + config { +- DefaultIcon = PREFIX/share/fbpanel/images/default.xpm ++ DefaultIcon = /usr/share/fbpanel/images/default.xpm + application { +- Image = PREFIX/share/fbpanel/images/GNOME-Terminal.png ++ Image = /usr/share/fbpanel/images/GNOME-Terminal.png + ClassName = XTerm + } + application { +- Image = PREFIX/share/fbpanel/images/GNOME-Terminal.png ++ Image = /usr/share/fbpanel/images/GNOME-Terminal.png + ClassName = mlterm + } + application { +- Image = PREFIX/share/fbpanel/images/GNOME-Terminal.png ++ Image = /usr/share/fbpanel/images/GNOME-Terminal.png + ClassName = URxvt + } + application { +- Image = PREFIX/share/fbpanel/images/Emacs.png ++ Image = /usr/share/fbpanel/images/Emacs.png + AppName = emacs + ClassName = Emacs + } +diff -aurN fbpanel-4.3.orig/config/Makefile fbpanel-4.3/config/Makefile +--- fbpanel-4.3.orig/config/Makefile 2005-05-22 02:46:13.000000000 +0200 ++++ fbpanel-4.3/config/Makefile 2006-08-20 12:52:23.000000000 +0200 +@@ -17,11 +17,12 @@ + + + install: +- install -d $(PREFIX)/share/fbpanel +- install -m 644 $(TARGET) $(PREFIX)/share/fbpanel +- install -d $(PREFIX)/share/fbpanel/images +- install -m 644 images/*.png $(PREFIX)/share/fbpanel/images +- install -m 644 images/*.xpm $(PREFIX)/share/fbpanel/images ++ install -d $(DESTDIR)/etc/fbpanel ++ install -m 644 $(TARGET) $(DESTDIR)/etc/fbpanel ++ install -d $(DESTDIR)$(DATADIR)/fbpanel ++ install -d $(DESTDIR)$(DATADIR)/fbpanel/images ++ install -m 644 images/*.png $(DESTDIR)$(DATADIR)/fbpanel/images ++ install -m 644 images/*.xpm $(DESTDIR)$(DATADIR)/fbpanel/images + + uninstall: +- $(RM) -r $(PREFIX)/share/fbpanel/images/ ++ $(RM) -r $(DATADIR)/fbpanel/images/ diff -aurN fbpanel-4.3.orig/Makefile fbpanel-4.3/Makefile --- fbpanel-4.3.orig/Makefile 2005-05-31 16:55:50.000000000 +0200 -+++ fbpanel-4.3/Makefile 2005-06-01 09:44:55.000000000 +0200 ++++ fbpanel-4.3/Makefile 2006-08-20 12:48:23.000000000 +0200 @@ -48,8 +48,8 @@ $(RM) Makefile.config config.h @@ -14,80 +127,41 @@ diff -aurN fbpanel-4.3.orig/Makefile fbpanel-4.3/Makefile $(RM) $(PREFIX)/bin/$(TARGET) diff -aurN fbpanel-4.3.orig/Makefile.common fbpanel-4.3/Makefile.common --- fbpanel-4.3.orig/Makefile.common 2005-05-31 17:39:18.000000000 +0200 -+++ fbpanel-4.3/Makefile.common 2005-06-01 09:44:13.000000000 +0200 -@@ -89,7 +89,7 @@ ++++ fbpanel-4.3/Makefile.common 2006-08-20 12:48:57.000000000 +0200 +@@ -85,11 +85,13 @@ + RM = rm -f + CC = gcc + AR = ar +-LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -L/usr/X11R6/lib -lXmu ++LIBS = $(shell pkg-config --libs gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) -lXmu INCS2 = $(shell pkg-config --cflags gtk+-2.0 gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0) INCS := $(INCS2:-I%=-isystem %) -CFLAGS = -O2 ++LDFLAGS += -Wl,-export-dynamic ++ +CFLAGS = $(OPTFLAGS) ifeq (1,$(DEVEL)) override CFLAGS += -g endif -diff -aurN fbpanel-4.3.orig/config/Makefile fbpanel-4.3/config/Makefile ---- fbpanel-4.3.orig/config/Makefile 2005-05-22 02:46:13.000000000 +0200 -+++ fbpanel-4.3/config/Makefile 2005-06-01 09:52:49.000000000 +0200 -@@ -17,11 +17,12 @@ - - - install: -- install -d $(PREFIX)/share/fbpanel -- install -m 644 $(TARGET) $(PREFIX)/share/fbpanel -- install -d $(PREFIX)/share/fbpanel/images -- install -m 644 images/*.png $(PREFIX)/share/fbpanel/images -- install -m 644 images/*.xpm $(PREFIX)/share/fbpanel/images -+ install -d $(DESTDIR)/etc/fbpanel -+ install -m 644 $(TARGET) $(DESTDIR)/etc/fbpanel -+ install -d $(DESTDIR)$(PREFIX)/share/fbpanel -+ install -d $(DESTDIR)$(PREFIX)/share/fbpanel/images -+ install -m 644 images/*.png $(DESTDIR)$(PREFIX)/share/fbpanel/images -+ install -m 644 images/*.xpm $(DESTDIR)$(PREFIX)/share/fbpanel/images - - uninstall: - $(RM) -r $(PREFIX)/share/fbpanel/images/ diff -aurN fbpanel-4.3.orig/man/Makefile fbpanel-4.3/man/Makefile --- fbpanel-4.3.orig/man/Makefile 2005-05-22 02:51:08.000000000 +0200 -+++ fbpanel-4.3/man/Makefile 2005-06-01 09:46:59.000000000 +0200 ++++ fbpanel-4.3/man/Makefile 2006-08-20 12:52:45.000000000 +0200 @@ -17,8 +17,8 @@ install: all - install -d $(PREFIX)/share/man/man1 - install -m 644 $(TARGET) $(PREFIX)/share/man/man1 -+ install -d $(DESTDIR)$(PREFIX)/share/man/man1 -+ install -m 644 $(TARGET) $(DESTDIR)$(PREFIX)/share/man/man1 ++ install -d $(DESTDIR)$(DATADIR)/man/man1 ++ install -m 644 $(TARGET) $(DESTDIR)$(DATADIR)/man/man1 uninstall: - $(RM) $(PREFIX)/share/man/man1/$(TARGET) -diff -aurN fbpanel-4.3.orig/panel.c fbpanel-4.3/panel.c ---- fbpanel-4.3.orig/panel.c 2005-05-08 09:46:40.000000000 +0200 -+++ fbpanel-4.3/panel.c 2005-06-01 09:50:58.000000000 +0200 -@@ -706,8 +706,8 @@ - //ERR("Can't load %s\n", fname); - g_free(fname); - -- /* check private configuration directory */ -- fname = g_strdup_printf("%s/share/fbpanel/%s", PREFIX, profile); -+ /* check system-wide configuration directory */ -+ fname = g_strdup_printf("/etc/fbpanel/%s", profile); - fp = fopen(fname, "r"); - LOG(LOG_INFO, " %s %s\n", fname, fp ? "ok" : "no"); - if (fp) { -diff -aurN fbpanel-4.3.orig/plugin.c fbpanel-4.3/plugin.c ---- fbpanel-4.3.orig/plugin.c 2005-05-29 06:02:03.000000000 +0200 -+++ fbpanel-4.3/plugin.c 2005-06-01 09:49:53.000000000 +0200 -@@ -137,7 +137,7 @@ - LOG(LOG_INFO, " %s ... %s\n", str->str, m ? "ok" : "no"); - if (!m) { - DBG("error is %s\n", g_module_error()); -- g_string_printf(str, "%s/share/fbpanel/plugins/%s.so", PREFIX, type); -+ g_string_printf(str, "%s/lib/fbpanel/plugins/%s.so", PREFIX, type); - m = g_module_open(str->str, G_MODULE_BIND_LAZY); - LOG(LOG_INFO, " %s ... %s\n", str->str, m ? "ok" : "no"); - if (!m) { +- $(RM) $(PREFIX)/share/man/man1/$(TARGET) ++ $(RM) $(DATADIR)/man/man1/$(TARGET) diff -aurN fbpanel-4.3.orig/plugins/Makefile fbpanel-4.3/plugins/Makefile --- fbpanel-4.3.orig/plugins/Makefile 2005-05-31 17:45:06.000000000 +0200 -+++ fbpanel-4.3/plugins/Makefile 2005-06-01 09:48:12.000000000 +0200 ++++ fbpanel-4.3/plugins/Makefile 2006-08-20 12:48:23.000000000 +0200 @@ -47,8 +47,8 @@ ifeq (0,$(STATIC_PLUGINS)) @@ -101,7 +175,7 @@ diff -aurN fbpanel-4.3.orig/plugins/Makefile fbpanel-4.3/plugins/Makefile $(RM) -r $(PREFIX)/share/fbpanel/plugins/ diff -aurN fbpanel-4.3.orig/systray/Makefile fbpanel-4.3/systray/Makefile --- fbpanel-4.3.orig/systray/Makefile 2005-05-31 17:31:27.000000000 +0200 -+++ fbpanel-4.3/systray/Makefile 2005-06-01 09:49:08.000000000 +0200 ++++ fbpanel-4.3/systray/Makefile 2006-08-20 12:48:23.000000000 +0200 @@ -41,8 +41,8 @@ ifeq (0,$(STATIC_PLUGINS)) diff --git a/fbpanel-file_watcher.patch b/fbpanel-file_watcher.patch index 0469d7b..a133499 100644 --- a/fbpanel-file_watcher.patch +++ b/fbpanel-file_watcher.patch @@ -1,6 +1,6 @@ -diff -aurN fbpanel-4.1.orig/panel.c fbpanel-4.1/panel.c ---- fbpanel-4.1.orig/panel.c 2004-12-23 18:26:05.000000000 +0100 -+++ fbpanel-4.1/panel.c 2005-05-02 18:56:09.000000000 +0200 +diff -aurN fbpanel-4.3.orig/panel.c fbpanel-4.3/panel.c +--- fbpanel-4.3.orig/panel.c 2005-05-08 09:46:40.000000000 +0200 ++++ fbpanel-4.3/panel.c 2006-08-20 12:38:19.000000000 +0200 @@ -9,6 +9,7 @@ #include #include @@ -21,7 +21,7 @@ diff -aurN fbpanel-4.1.orig/panel.c fbpanel-4.1/panel.c static gchar version[] = VERSION; gchar *cprofile = "default"; -@@ -257,6 +263,26 @@ +@@ -243,6 +249,26 @@ panel_configure_event (GtkWidget *widget, GdkEventConfigure *e, panel *p) { ENTER; @@ -48,18 +48,17 @@ diff -aurN fbpanel-4.1.orig/panel.c fbpanel-4.1/panel.c if (e->width == p->cw && e->height == p->ch && e->x == p->cx && e->y == p->cy) RET(TRUE); p->cw = e->width; -@@ -705,6 +731,10 @@ - ENTER; - fname = g_strdup_printf("%s/.fbpanel/%s", getenv("HOME"), profile); - if ((fp = fopen(fname, "r"))) { +@@ -700,17 +726,25 @@ + fp = fopen(fname, "r"); + LOG(LOG_INFO, " %s %s\n", fname, fp ? "ok" : "no"); + if (fp) { + watched_file f; + f.filename = fname; + f.mtime = time(NULL); + g_array_append_val(config_files, f); cfgfile = fname; - if (verbose) - ERR("Using %s\n", fname); -@@ -713,9 +743,13 @@ + RET(fp); + } //ERR("Can't load %s\n", fname); g_free(fname); @@ -67,38 +66,40 @@ diff -aurN fbpanel-4.1.orig/panel.c fbpanel-4.1/panel.c - fname = g_strdup_printf("%s/share/fbpanel/%s", PREFIX, profile); + /* check system-wide configuration directory */ + fname = g_strdup_printf("/etc/fbpanel/%s", profile); - if ((fp = fopen(fname, "r"))) { + fp = fopen(fname, "r"); + LOG(LOG_INFO, " %s %s\n", fname, fp ? "ok" : "no"); + if (fp) { + watched_file f; + f.filename = fname; + f.mtime = time(NULL); + g_array_append_val(config_files, f); cfgfile = fname; - if (verbose) - ERR("Using %s\n", fname); -@@ -793,6 +827,19 @@ + RET(fp); + } +@@ -791,6 +825,19 @@ + } + signal(SIGUSR1, sig_usr); do { - if (verbose) - ERR("starting panel\n"); + if (config_files) + { -+ int i; -+ watched_file w; -+ for (i = 0; i < config_files->len; i++) -+ { -+ w = g_array_index(config_files, watched_file, i); -+ g_free(w.filename); -+ } -+ g_array_free(config_files, TRUE); -+ } ++ int i; ++ watched_file w; ++ for (i = 0; i < config_files->len; i++) ++ { ++ w = g_array_index(config_files, watched_file, i); ++ g_free(w.filename); ++ } ++ g_array_free(config_files, TRUE); ++ } + config_files = g_array_new(FALSE, FALSE, sizeof(watched_file)); -+ ++ if (!(pfp = open_profile(cprofile))) exit(1); p = g_new0(panel, 1); -diff -aurN fbpanel-4.1.orig/panel.h fbpanel-4.1/panel.h ---- fbpanel-4.1.orig/panel.h 2004-12-22 18:46:00.000000000 +0100 -+++ fbpanel-4.1/panel.h 2005-05-02 18:56:09.000000000 +0200 -@@ -95,6 +95,13 @@ +diff -aurN fbpanel-4.3.orig/panel.h fbpanel-4.3/panel.h +--- fbpanel-4.3.orig/panel.h 2005-05-07 12:26:55.000000000 +0200 ++++ fbpanel-4.3/panel.h 2006-08-20 12:38:19.000000000 +0200 +@@ -96,6 +96,13 @@ extern command commands[]; @@ -112,40 +113,32 @@ diff -aurN fbpanel-4.1.orig/panel.h fbpanel-4.1/panel.h extern gchar *cprofile; extern Atom a_UTF8_STRING; -diff -aurN fbpanel-4.1.orig/plugin.c fbpanel-4.1/plugin.c ---- fbpanel-4.1.orig/plugin.c 2004-12-22 20:58:55.000000000 +0100 -+++ fbpanel-4.1/plugin.c 2005-05-02 18:56:09.000000000 +0200 -@@ -129,7 +129,7 @@ - DBG("opening %s\n", str->str); +diff -aurN fbpanel-4.3.orig/plugin.c fbpanel-4.3/plugin.c +--- fbpanel-4.3.orig/plugin.c 2005-05-29 06:02:03.000000000 +0200 ++++ fbpanel-4.3/plugin.c 2006-08-20 12:38:19.000000000 +0200 +@@ -137,7 +137,7 @@ + LOG(LOG_INFO, " %s ... %s\n", str->str, m ? "ok" : "no"); if (!m) { - DBG("%s\n", g_module_error()); + DBG("error is %s\n", g_module_error()); - g_string_printf(str, "%s/share/fbpanel/plugins/%s.so", PREFIX, type); + g_string_printf(str, "%s/lib/fbpanel/plugins/%s.so", PREFIX, type); - m = g_module_open(str->str, G_MODULE_BIND_LOCAL | G_MODULE_BIND_LAZY); - DBG("opening %s\n", str->str); + m = g_module_open(str->str, G_MODULE_BIND_LAZY); + LOG(LOG_INFO, " %s ... %s\n", str->str, m ? "ok" : "no"); + if (!m) { +diff -aurN fbpanel-4.3.orig/plugins/menu.c fbpanel-4.3/plugins/menu.c +--- fbpanel-4.3.orig/plugins/menu.c 2005-05-21 06:58:55.000000000 +0200 ++++ fbpanel-4.3/plugins/menu.c 2006-08-20 12:38:19.000000000 +0200 +@@ -247,9 +247,13 @@ } -diff -aurN fbpanel-4.1.orig/plugins/menu.c fbpanel-4.1/plugins/menu.c ---- fbpanel-4.1.orig/plugins/menu.c 2004-12-22 15:51:55.000000000 +0100 -+++ fbpanel-4.1/plugins/menu.c 2005-05-02 19:02:01.000000000 +0200 -@@ -105,8 +105,11 @@ } - - if ((fi = fopen(name, "r"))) { + if ((fp = fopen(name, "r"))) { + watched_file f; + LOG(LOG_INFO, "Including %s\n", name); + m->files = g_slist_prepend(m->files, p->fp); + p->fp = fp; + f.filename = name; + f.mtime = time(NULL); + g_array_append_val(config_files, f); - ERR("Including %s\n", name); -- g_free(name); - } - else { + } else { ERR("Can't include %s\n", name); -@@ -336,7 +339,7 @@ - mi = read_submenu(p, 0); - //bg_set_transparent_background(mi, p->panel); - if (!mi) { -- ERR("menu: plugin init failde\n"); -+ ERR("menu: plugin init failed\n"); - goto error; } - gtk_menu_shell_append (GTK_MENU_SHELL (m->mainw), mi); -- 2.43.0