From d8a8ebaf837624a0e3db38ba022114366056ceb7 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Thu, 3 Dec 2015 19:08:07 +0200 Subject: [PATCH 01/37] add gitignore --- .config/rules.mk | 18 +++++++++++++++--- .gitignore | 4 ++++ data/.gitignore | 0 data/config/.gitignore | 2 ++ data/images/.gitignore | 0 data/man/.gitignore | 1 + exec/.gitignore | 1 + panel/.gitignore | 25 +++++++++++++++++++++++++ plugins/.gitignore | 0 plugins/battery/.gitignore | 3 +++ plugins/chart/.gitignore | 3 +++ plugins/cpu/.gitignore | 3 +++ plugins/dclock/.gitignore | 3 +++ plugins/deskno/.gitignore | 3 +++ plugins/deskno2/.gitignore | 3 +++ plugins/genmon/.gitignore | 3 +++ plugins/icons/.gitignore | 3 +++ plugins/image/.gitignore | 3 +++ plugins/launchbar/.gitignore | 3 +++ plugins/mem/.gitignore | 3 +++ plugins/mem2/.gitignore | 3 +++ plugins/menu/.gitignore | 5 +++++ plugins/meter/.gitignore | 3 +++ plugins/net/.gitignore | 3 +++ plugins/pager/.gitignore | 3 +++ plugins/separator/.gitignore | 3 +++ plugins/space/.gitignore | 3 +++ plugins/systray/.gitignore | 9 +++++++++ plugins/taskbar/.gitignore | 3 +++ plugins/tclock/.gitignore | 3 +++ plugins/volume/.gitignore | 3 +++ plugins/wincmd/.gitignore | 3 +++ po/.gitignore | 0 scripts/.gitignore | 0 34 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 data/.gitignore create mode 100644 data/config/.gitignore create mode 100644 data/images/.gitignore create mode 100644 data/man/.gitignore create mode 100644 exec/.gitignore create mode 100644 panel/.gitignore create mode 100644 plugins/.gitignore create mode 100644 plugins/battery/.gitignore create mode 100644 plugins/chart/.gitignore create mode 100644 plugins/cpu/.gitignore create mode 100644 plugins/dclock/.gitignore create mode 100644 plugins/deskno/.gitignore create mode 100644 plugins/deskno2/.gitignore create mode 100644 plugins/genmon/.gitignore create mode 100644 plugins/icons/.gitignore create mode 100644 plugins/image/.gitignore create mode 100644 plugins/launchbar/.gitignore create mode 100644 plugins/mem/.gitignore create mode 100644 plugins/mem2/.gitignore create mode 100644 plugins/menu/.gitignore create mode 100644 plugins/meter/.gitignore create mode 100644 plugins/net/.gitignore create mode 100644 plugins/pager/.gitignore create mode 100644 plugins/separator/.gitignore create mode 100644 plugins/space/.gitignore create mode 100644 plugins/systray/.gitignore create mode 100644 plugins/taskbar/.gitignore create mode 100644 plugins/tclock/.gitignore create mode 100644 plugins/volume/.gitignore create mode 100644 plugins/wincmd/.gitignore create mode 100644 po/.gitignore create mode 100644 scripts/.gitignore diff --git a/.config/rules.mk b/.config/rules.mk index 79e4983..a840495 100644 --- a/.config/rules.mk +++ b/.config/rules.mk @@ -38,7 +38,7 @@ SPACE := $(EMPTY) $(EMPTY) # recurion rules # ############################################### -RGOALS = all clean install svnignore +RGOALS = all clean install svnignore gitignore .PHONY : $(RGOALS) $(SUBDIRS) $(RGOALS) : $(SUBDIRS) @@ -155,7 +155,11 @@ endif endif ifeq ($(origin CFLAGS),undefined) -CFLAGS = -O2 +ifeq ($(origin DEBUG),undefined) +CFLAGS = -O2 -Wall +else +CFLAGS = -O0 -Wall +endif endif ifneq ($(origin DEBUG),undefined) override CFLAGS += -g @@ -285,7 +289,7 @@ endif clean: ifneq (,$(CLEANLIST)) - $(call summary,CLEAN ,) + $(call summary,CLEAN ,) $Qrm -rf $(CLEANLIST) endif @@ -324,3 +328,11 @@ svnignore: svn propset svn:ignore --file $$prop .; \ rm -f $$prop +help_target :: + @echo "gitignore - tell git to ignore files in a cleanlist" + +gitignore: + $Qfor i in $(DISTCLEANLIST) $(CLEANLIST); do echo "$$i"; \ + done > .gitignore + $Qgit add .gitignore + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b4da2c6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +config.mk +config.h +repl.py +.config/*.pyc diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/data/config/.gitignore b/data/config/.gitignore new file mode 100644 index 0000000..133e0b7 --- /dev/null +++ b/data/config/.gitignore @@ -0,0 +1,2 @@ +default +pager diff --git a/data/images/.gitignore b/data/images/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/data/man/.gitignore b/data/man/.gitignore new file mode 100644 index 0000000..b0e7d13 --- /dev/null +++ b/data/man/.gitignore @@ -0,0 +1 @@ +fbpanel.1 diff --git a/exec/.gitignore b/exec/.gitignore new file mode 100644 index 0000000..4b7430e --- /dev/null +++ b/exec/.gitignore @@ -0,0 +1 @@ +make_profile diff --git a/panel/.gitignore b/panel/.gitignore new file mode 100644 index 0000000..7742cf7 --- /dev/null +++ b/panel/.gitignore @@ -0,0 +1,25 @@ +bg.o +bg.d +ev.o +ev.d +gconf.o +gconf.d +gconf_panel.o +gconf_panel.d +gconf_plugins.o +gconf_plugins.d +gtkbar.o +gtkbar.d +gtkbgbox.o +gtkbgbox.d +misc.o +misc.d +panel.o +panel.d +plugin.o +plugin.d +run.o +run.d +xconf.o +xconf.d +fbpanel diff --git a/plugins/.gitignore b/plugins/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/plugins/battery/.gitignore b/plugins/battery/.gitignore new file mode 100644 index 0000000..77a32d7 --- /dev/null +++ b/plugins/battery/.gitignore @@ -0,0 +1,3 @@ +battery.o +battery.d +libbattery.so diff --git a/plugins/chart/.gitignore b/plugins/chart/.gitignore new file mode 100644 index 0000000..829128a --- /dev/null +++ b/plugins/chart/.gitignore @@ -0,0 +1,3 @@ +chart.o +chart.d +libchart.so diff --git a/plugins/cpu/.gitignore b/plugins/cpu/.gitignore new file mode 100644 index 0000000..b68da54 --- /dev/null +++ b/plugins/cpu/.gitignore @@ -0,0 +1,3 @@ +cpu.o +cpu.d +libcpu.so diff --git a/plugins/dclock/.gitignore b/plugins/dclock/.gitignore new file mode 100644 index 0000000..b1331e4 --- /dev/null +++ b/plugins/dclock/.gitignore @@ -0,0 +1,3 @@ +dclock.o +dclock.d +libdclock.so diff --git a/plugins/deskno/.gitignore b/plugins/deskno/.gitignore new file mode 100644 index 0000000..c1ad8ce --- /dev/null +++ b/plugins/deskno/.gitignore @@ -0,0 +1,3 @@ +deskno.o +deskno.d +libdeskno.so diff --git a/plugins/deskno2/.gitignore b/plugins/deskno2/.gitignore new file mode 100644 index 0000000..63dbedf --- /dev/null +++ b/plugins/deskno2/.gitignore @@ -0,0 +1,3 @@ +deskno2.o +deskno2.d +libdeskno2.so diff --git a/plugins/genmon/.gitignore b/plugins/genmon/.gitignore new file mode 100644 index 0000000..0ed635a --- /dev/null +++ b/plugins/genmon/.gitignore @@ -0,0 +1,3 @@ +genmon.o +genmon.d +libgenmon.so diff --git a/plugins/icons/.gitignore b/plugins/icons/.gitignore new file mode 100644 index 0000000..e61efdd --- /dev/null +++ b/plugins/icons/.gitignore @@ -0,0 +1,3 @@ +icons.o +icons.d +libicons.so diff --git a/plugins/image/.gitignore b/plugins/image/.gitignore new file mode 100644 index 0000000..a9f34b9 --- /dev/null +++ b/plugins/image/.gitignore @@ -0,0 +1,3 @@ +image.o +image.d +libimage.so diff --git a/plugins/launchbar/.gitignore b/plugins/launchbar/.gitignore new file mode 100644 index 0000000..c07f3ac --- /dev/null +++ b/plugins/launchbar/.gitignore @@ -0,0 +1,3 @@ +launchbar.o +launchbar.d +liblaunchbar.so diff --git a/plugins/mem/.gitignore b/plugins/mem/.gitignore new file mode 100644 index 0000000..4adf20f --- /dev/null +++ b/plugins/mem/.gitignore @@ -0,0 +1,3 @@ +mem.o +mem.d +libmem.so diff --git a/plugins/mem2/.gitignore b/plugins/mem2/.gitignore new file mode 100644 index 0000000..e08398d --- /dev/null +++ b/plugins/mem2/.gitignore @@ -0,0 +1,3 @@ +mem2.o +mem2.d +libmem2.so diff --git a/plugins/menu/.gitignore b/plugins/menu/.gitignore new file mode 100644 index 0000000..b8b598a --- /dev/null +++ b/plugins/menu/.gitignore @@ -0,0 +1,5 @@ +menu.o +menu.d +system_menu.o +system_menu.d +libmenu.so diff --git a/plugins/meter/.gitignore b/plugins/meter/.gitignore new file mode 100644 index 0000000..7f853ba --- /dev/null +++ b/plugins/meter/.gitignore @@ -0,0 +1,3 @@ +meter.o +meter.d +libmeter.so diff --git a/plugins/net/.gitignore b/plugins/net/.gitignore new file mode 100644 index 0000000..3161da5 --- /dev/null +++ b/plugins/net/.gitignore @@ -0,0 +1,3 @@ +net.o +net.d +libnet.so diff --git a/plugins/pager/.gitignore b/plugins/pager/.gitignore new file mode 100644 index 0000000..10debd8 --- /dev/null +++ b/plugins/pager/.gitignore @@ -0,0 +1,3 @@ +pager.o +pager.d +libpager.so diff --git a/plugins/separator/.gitignore b/plugins/separator/.gitignore new file mode 100644 index 0000000..a8ff622 --- /dev/null +++ b/plugins/separator/.gitignore @@ -0,0 +1,3 @@ +separator.o +separator.d +libseparator.so diff --git a/plugins/space/.gitignore b/plugins/space/.gitignore new file mode 100644 index 0000000..9df367b --- /dev/null +++ b/plugins/space/.gitignore @@ -0,0 +1,3 @@ +space.o +space.d +libspace.so diff --git a/plugins/systray/.gitignore b/plugins/systray/.gitignore new file mode 100644 index 0000000..3233d74 --- /dev/null +++ b/plugins/systray/.gitignore @@ -0,0 +1,9 @@ +egg-marshal.o +egg-marshal.d +eggtraymanager.o +eggtraymanager.d +fixedtip.o +fixedtip.d +main.o +main.d +libtray.so diff --git a/plugins/taskbar/.gitignore b/plugins/taskbar/.gitignore new file mode 100644 index 0000000..ad7eefa --- /dev/null +++ b/plugins/taskbar/.gitignore @@ -0,0 +1,3 @@ +taskbar.o +taskbar.d +libtaskbar.so diff --git a/plugins/tclock/.gitignore b/plugins/tclock/.gitignore new file mode 100644 index 0000000..e7c28f6 --- /dev/null +++ b/plugins/tclock/.gitignore @@ -0,0 +1,3 @@ +tclock.o +tclock.d +libtclock.so diff --git a/plugins/volume/.gitignore b/plugins/volume/.gitignore new file mode 100644 index 0000000..1e9969e --- /dev/null +++ b/plugins/volume/.gitignore @@ -0,0 +1,3 @@ +volume.o +volume.d +libvolume.so diff --git a/plugins/wincmd/.gitignore b/plugins/wincmd/.gitignore new file mode 100644 index 0000000..09b285e --- /dev/null +++ b/plugins/wincmd/.gitignore @@ -0,0 +1,3 @@ +wincmd.o +wincmd.d +libwincmd.so diff --git a/po/.gitignore b/po/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/scripts/.gitignore b/scripts/.gitignore new file mode 100644 index 0000000..e69de29 From 86ddfe3083cb1cc8062283553ac38bea83118609 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Thu, 3 Dec 2015 19:24:36 +0200 Subject: [PATCH 02/37] rename `margin` parameter to `xmargin` [#2] --- panel/gconf_panel.c | 10 +++++----- panel/misc.c | 22 +++++++++++----------- panel/panel.c | 2 +- panel/panel.h | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/panel/gconf_panel.c b/panel/gconf_panel.c index a88e60a..9269a21 100644 --- a/panel/gconf_panel.c +++ b/panel/gconf_panel.c @@ -7,7 +7,7 @@ static GtkWidget *dialog; static GtkWidget *width_spin, *width_opt; -static GtkWidget *margin_spin; +static GtkWidget *xmargin_spin; static GtkWidget *allign_opt; static gconf_block *gl_block; @@ -182,7 +182,7 @@ geom_changed(gconf_block *b) ENTER; i = gtk_combo_box_get_active(GTK_COMBO_BOX(allign_opt)); - gtk_widget_set_sensitive(margin_spin, (i != ALLIGN_CENTER)); + gtk_widget_set_sensitive(xmargin_spin, (i != ALLIGN_CENTER)); i = gtk_combo_box_get_active(GTK_COMBO_BOX(width_opt)); gtk_widget_set_sensitive(width_spin, (i != WIDTH_REQUEST)); if (i == WIDTH_PERCENT) @@ -237,10 +237,10 @@ mk_geom_block(xconf *xc) gconf_block_add(geom_block, w, FALSE); allign_opt = w; - w = gconf_edit_int(geom_block, xconf_get(xc, "margin"), 0, 300); - gconf_block_add(geom_block, gtk_label_new(_("Margin")), FALSE); + w = gconf_edit_int(geom_block, xconf_get(xc, "xmargin"), 0, 300); + gconf_block_add(geom_block, gtk_label_new(_("X Margin")), TRUE); gconf_block_add(geom_block, w, FALSE); - margin_spin = w; + xmargin_spin = w; gconf_block_add(gl_block, geom_block->main, TRUE); diff --git a/panel/misc.c b/panel/misc.c index 16173a8..98d85fa 100644 --- a/panel/misc.c +++ b/panel/misc.c @@ -523,7 +523,7 @@ get_net_wm_window_type(Window win, net_wm_window_type *nwwt) static void -calculate_width(int scrw, int wtype, int allign, int margin, +calculate_width(int scrw, int wtype, int allign, int xmargin, int *panw, int *x) { ENTER; @@ -542,22 +542,22 @@ calculate_width(int scrw, int wtype, int allign, int margin, *panw = scrw; if (allign != ALLIGN_CENTER) { - if (margin > scrw) { - ERR( "margin is bigger then edge size %d > %d. Ignoring margin\n", - margin, scrw); - margin = 0; + if (xmargin > scrw) { + ERR( "xmargin is bigger then edge size %d > %d. Ignoring xmargin\n", + xmargin, scrw); + xmargin = 0; } if (wtype == WIDTH_PERCENT) - //*panw = MAX(scrw - margin, *panw); + //*panw = MAX(scrw - xmargin, *panw); ; else - *panw = MIN(scrw - margin, *panw); + *panw = MIN(scrw - xmargin, *panw); } DBG("OUT panw=%d\n", *panw); if (allign == ALLIGN_LEFT) - *x += margin; + *x += xmargin; else if (allign == ALLIGN_RIGHT) { - *x += scrw - *panw - margin; + *x += scrw - *panw - xmargin; if (*x < 0) *x = 0; } else if (allign == ALLIGN_CENTER) @@ -588,7 +588,7 @@ calculate_position(panel *np) if (np->edge == EDGE_TOP || np->edge == EDGE_BOTTOM) { np->aw = np->width; np->ax = minx; - calculate_width(sswidth, np->widthtype, np->allign, np->margin, + calculate_width(sswidth, np->widthtype, np->allign, np->xmargin, &np->aw, &np->ax); np->ah = np->height; np->ah = MIN(PANEL_HEIGHT_MAX, np->ah); @@ -598,7 +598,7 @@ calculate_position(panel *np) } else { np->ah = np->width; np->ay = miny; - calculate_width(ssheight, np->widthtype, np->allign, np->margin, + calculate_width(ssheight, np->widthtype, np->allign, np->xmargin, &np->ah, &np->ay); np->aw = np->height; np->aw = MIN(PANEL_HEIGHT_MAX, np->aw); diff --git a/panel/panel.c b/panel/panel.c index 10470e2..099e8ac 100644 --- a/panel/panel.c +++ b/panel/panel.c @@ -657,7 +657,7 @@ panel_parse_global(xconf *xc) XCG(xc, "heighttype", &p->heighttype, enum, heighttype_enum); XCG(xc, "width", &p->width, int); XCG(xc, "height", &p->height, int); - XCG(xc, "margin", &p->margin, int); + XCG(xc, "xmargin", &p->xmargin, int); /* properties */ XCG(xc, "setdocktype", &p->setdocktype, enum, bool_enum); diff --git a/panel/panel.h b/panel/panel.h index 4dac183..4328f3c 100644 --- a/panel/panel.h +++ b/panel/panel.h @@ -50,7 +50,7 @@ typedef struct _panel int ax, ay, aw, ah; /* prefferd allocation of a panel */ int cx, cy, cw, ch; /* current allocation (as reported by configure event) allocation */ - int allign, edge, margin; + int allign, edge, xmargin; GtkOrientation orientation; int widthtype, width; int heighttype, height; From 29d309e4771846f8df16e4fce11e1fe8249beefc Mon Sep 17 00:00:00 2001 From: Anatoly Date: Thu, 3 Dec 2015 19:30:27 +0200 Subject: [PATCH 03/37] add `ymargin` config option [#2] --- panel/gconf_panel.c | 7 ++++++- panel/panel.c | 1 + panel/panel.h | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/panel/gconf_panel.c b/panel/gconf_panel.c index 9269a21..6863a7b 100644 --- a/panel/gconf_panel.c +++ b/panel/gconf_panel.c @@ -7,7 +7,7 @@ static GtkWidget *dialog; static GtkWidget *width_spin, *width_opt; -static GtkWidget *xmargin_spin; +static GtkWidget *xmargin_spin, *ymargin_spin; static GtkWidget *allign_opt; static gconf_block *gl_block; @@ -242,6 +242,11 @@ mk_geom_block(xconf *xc) gconf_block_add(geom_block, w, FALSE); xmargin_spin = w; + w = gconf_edit_int(geom_block, xconf_get(xc, "ymargin"), 0, 300); + gconf_block_add(geom_block, gtk_label_new(_("Y Margin")), FALSE); + gconf_block_add(geom_block, w, FALSE); + ymargin_spin = w; + gconf_block_add(gl_block, geom_block->main, TRUE); /* empty row */ diff --git a/panel/panel.c b/panel/panel.c index 099e8ac..e8733c3 100644 --- a/panel/panel.c +++ b/panel/panel.c @@ -658,6 +658,7 @@ panel_parse_global(xconf *xc) XCG(xc, "width", &p->width, int); XCG(xc, "height", &p->height, int); XCG(xc, "xmargin", &p->xmargin, int); + XCG(xc, "ymargin", &p->ymargin, int); /* properties */ XCG(xc, "setdocktype", &p->setdocktype, enum, bool_enum); diff --git a/panel/panel.h b/panel/panel.h index 4328f3c..af1cf3d 100644 --- a/panel/panel.h +++ b/panel/panel.h @@ -50,7 +50,7 @@ typedef struct _panel int ax, ay, aw, ah; /* prefferd allocation of a panel */ int cx, cy, cw, ch; /* current allocation (as reported by configure event) allocation */ - int allign, edge, xmargin; + int allign, edge, xmargin, ymargin; GtkOrientation orientation; int widthtype, width; int heighttype, height; From 4416364737a526b72e08f9cd3b8aa53b10c4e780 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Thu, 3 Dec 2015 19:43:22 +0200 Subject: [PATCH 04/37] use `ymargin` option for horiz layouts [#2] --- panel/misc.c | 5 ++++- panel/panel.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/panel/misc.c b/panel/misc.c index 98d85fa..0e7ce67 100644 --- a/panel/misc.c +++ b/panel/misc.c @@ -593,7 +593,10 @@ calculate_position(panel *np) np->ah = np->height; np->ah = MIN(PANEL_HEIGHT_MAX, np->ah); np->ah = MAX(PANEL_HEIGHT_MIN, np->ah); - np->ay = miny + ((np->edge == EDGE_TOP) ? 0 : (ssheight - np->ah)); + if (np->edge == EDGE_TOP) + np->ay = np->ymargin; + else + np->ay = ssheight - np->ah - np->ymargin; } else { np->ah = np->width; diff --git a/panel/panel.c b/panel/panel.c index e8733c3..7ae2356 100644 --- a/panel/panel.c +++ b/panel/panel.c @@ -68,14 +68,14 @@ panel_set_wm_strut(panel *p) break; case EDGE_TOP: i = 2; - data[i] = p->ah; + data[i] = p->ah + p->ymargin; data[4 + i*2] = p->ax; data[5 + i*2] = p->ax + p->aw; if (p->autohide) data[i] = p->height_when_hidden; break; case EDGE_BOTTOM: i = 3; - data[i] = p->ah; + data[i] = p->ah + p->ymargin; data[4 + i*2] = p->ax; data[5 + i*2] = p->ax + p->aw; if (p->autohide) data[i] = p->height_when_hidden; From a332527dd5341125389f6c1cc40404e9dc7e3e34 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Thu, 3 Dec 2015 20:04:18 +0200 Subject: [PATCH 05/37] use `ymargin` for verical layouts [closes #2] --- panel/misc.c | 5 ++++- panel/panel.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/panel/misc.c b/panel/misc.c index 0e7ce67..af048f7 100644 --- a/panel/misc.c +++ b/panel/misc.c @@ -606,7 +606,10 @@ calculate_position(panel *np) np->aw = np->height; np->aw = MIN(PANEL_HEIGHT_MAX, np->aw); np->aw = MAX(PANEL_HEIGHT_MIN, np->aw); - np->ax = minx + ((np->edge == EDGE_LEFT) ? 0 : (sswidth - np->aw)); + if (np->edge == EDGE_LEFT) + np->ax = np->ymargin; + else + np->ax = sswidth - np->aw - np->ymargin; } if (!np->aw) np->aw = 1; diff --git a/panel/panel.c b/panel/panel.c index 7ae2356..637c6e3 100644 --- a/panel/panel.c +++ b/panel/panel.c @@ -54,14 +54,14 @@ panel_set_wm_strut(panel *p) switch (p->edge) { case EDGE_LEFT: i = 0; - data[i] = p->aw; + data[i] = p->aw + p->ymargin; data[4 + i*2] = p->ay; data[5 + i*2] = p->ay + p->ah; if (p->autohide) data[i] = p->height_when_hidden; break; case EDGE_RIGHT: i = 1; - data[i] = p->aw; + data[i] = p->aw + p->ymargin; data[4 + i*2] = p->ay; data[5 + i*2] = p->ay + p->ah; if (p->autohide) data[i] = p->height_when_hidden; From 420434965838b341d39258b1ea46f079dd3a8744 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Thu, 3 Dec 2015 20:07:46 +0200 Subject: [PATCH 06/37] add CHANGELOG.md --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e495e85 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ + +## Version: develop +Date: 2015-12-03 20:05:14 + + * [#2] Include option for vertical (y) and horizontal (x) margin + +[#2]: https://github.com/aanatoly/fbpanel/issues/2 From 6af1ce6ca3bd35f92bc16776f133cdbaf4328b31 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Fri, 4 Dec 2015 02:39:15 +0200 Subject: [PATCH 07/37] make app compile with -Werror flag [#6] --- .config/rules.mk | 4 ++-- panel/ev.c | 2 +- panel/misc.c | 18 +++++++++++------- plugins/image/image.c | 4 ++-- plugins/pager/pager.c | 3 ++- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.config/rules.mk b/.config/rules.mk index a840495..77d2cf4 100644 --- a/.config/rules.mk +++ b/.config/rules.mk @@ -156,9 +156,9 @@ endif ifeq ($(origin CFLAGS),undefined) ifeq ($(origin DEBUG),undefined) -CFLAGS = -O2 -Wall +CFLAGS = -O2 -Wall -Werror else -CFLAGS = -O0 -Wall +CFLAGS = -O0 -Wall -Werror endif endif ifneq ($(origin DEBUG),undefined) diff --git a/panel/ev.c b/panel/ev.c index a2a04cf..f75e8dd 100644 --- a/panel/ev.c +++ b/panel/ev.c @@ -191,7 +191,7 @@ fb_ev_new() static void fb_ev_finalize (GObject *object) { - FbEv *ev; + FbEv *ev G_GNUC_UNUSED; ev = FB_EV (object); //XFreeGC(ev->dpy, ev->gc); diff --git a/panel/misc.c b/panel/misc.c index af048f7..63430d8 100644 --- a/panel/misc.c +++ b/panel/misc.c @@ -671,15 +671,19 @@ guint32 gcolor2rgb24(GdkColor *color) { guint32 i; - guint16 r, g, b; ENTER; - - r = color->red * 0xFF / 0xFFFF; - g = color->green * 0xFF / 0xFFFF; - b = color->blue * 0xFF / 0xFFFF; - DBG("%x %x %x ==> %x %x %x\n", color->red, color->green, color->blue, r, g, b); - +#ifdef DEBUGPRN + { + guint16 r, g, b; + + r = color->red * 0xFF / 0xFFFF; + g = color->green * 0xFF / 0xFFFF; + b = color->blue * 0xFF / 0xFFFF; + DBG("%x %x %x ==> %x %x %x\n", color->red, color->green, color->blue, + r, g, b); + } +#endif i = (color->red * 0xFF / 0xFFFF) & 0xFF; i <<= 8; i |= (color->green * 0xFF / 0xFFFF) & 0xFF; diff --git a/plugins/image/image.c b/plugins/image/image.c index 5a6cbe0..c034657 100644 --- a/plugins/image/image.c +++ b/plugins/image/image.c @@ -68,8 +68,8 @@ image_constructor(plugin_instance *p) ratio * ((float) gdk_pixbuf_get_height(gp)), GDK_INTERP_HYPER); gdk_pixbuf_render_pixmap_and_mask(gps, &img->pix, &img->mask, 127); - gdk_pixbuf_unref(gp); - gdk_pixbuf_unref(gps); + g_object_unref(gp); + g_object_unref(gps); wid = gtk_image_new_from_pixmap(img->pix, img->mask); } diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c index b2bc877..ebe2052 100644 --- a/plugins/pager/pager.c +++ b/plugins/pager/pager.c @@ -707,7 +707,8 @@ pager_bg_changed(FbBg *bg, pager_priv *pg) static void pager_rebuild_all(FbEv *ev, pager_priv *pg) { - int desknum, curdesk, dif, i; + int desknum, dif, i; + int curdesk G_GNUC_UNUSED; ENTER; desknum = pg->desknum; From 91f29b7deb34f346ddbe36f840bd6d3910e4fb3e Mon Sep 17 00:00:00 2001 From: Anatoly Date: Fri, 4 Dec 2015 02:42:51 +0200 Subject: [PATCH 08/37] ensure panel is visible [#6] The bug is this. If `request` width was set, starting width is 1. If `round corner` was set, spacing around main box is greater then 0. In this situation gtk2 generates one configure event less, which make panel's state machine never reach a `show all` state, so panel remains unmapped. I can't understand why it so, so I just added a workaround - extra show event. --- panel/panel.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/panel/panel.c b/panel/panel.c index 637c6e3..33edc7a 100644 --- a/panel/panel.c +++ b/panel/panel.c @@ -200,6 +200,14 @@ panel_size_req(GtkWidget *widget, GtkRequisition *req, panel *p) RET(); } + +static void +panel_size_alloc (GtkWidget *widget, GdkRectangle *a, gpointer data) +{ + DBG("alloc %d %d\n", a->width, a->height); +} + + static void make_round_corners(panel *p) { @@ -217,6 +225,10 @@ make_round_corners(panel *p) r = MIN(w, h) / 2; DBG("chaning radius to %d\n", r); } + if (r < 4) { + DBG("radius too small\n"); + RET(); + } b = gdk_pixmap_new(NULL, w, h, 1); gc = gdk_gc_new(GDK_DRAWABLE(b)); gdk_gc_set_foreground(gc, &black); @@ -256,7 +268,7 @@ panel_configure_event(GtkWidget *widget, GdkEventConfigure *e, panel *p) p->cx = e->x; p->cy = e->y; - /* if panel size is not we have requested, just wait, it will */ + /* if panel size is not what we have requested, just wait, it will */ if (e->width != p->aw || e->height != p->ah) { DBG("size_req not yet ready. exiting\n"); RET(FALSE); @@ -270,22 +282,24 @@ panel_configure_event(GtkWidget *widget, GdkEventConfigure *e, panel *p) } /* panel is at right place, lets go on */ + DBG("panel is at right place, lets go on\n"); if (p->transparent) { - fb_bg_notify_changed_bg(p->bg); DBG("remake bg image\n"); + fb_bg_notify_changed_bg(p->bg); } if (p->setstrut) { - panel_set_wm_strut(p); DBG("set_wm_strut\n"); + panel_set_wm_strut(p); } if (p->round_corners) { - make_round_corners(p); DBG("make_round_corners\n"); + make_round_corners(p); + } gtk_widget_show(p->topgwin); if (p->setstrut) { - panel_set_wm_strut(p); DBG("set_wm_strut\n"); + panel_set_wm_strut(p); } RET(FALSE); @@ -544,6 +558,8 @@ panel_start_gui(panel *p) (GCallback) panel_destroy_event, p); g_signal_connect(G_OBJECT(p->topgwin), "size-request", (GCallback) panel_size_req, p); + g_signal_connect(G_OBJECT(p->topgwin), "size-allocate", + (GCallback) panel_size_alloc, p); g_signal_connect(G_OBJECT(p->topgwin), "map-event", (GCallback) panel_mapped, p); g_signal_connect(G_OBJECT(p->topgwin), "configure-event", @@ -603,8 +619,8 @@ panel_start_gui(panel *p) gtk_box_pack_start(GTK_BOX(p->lbox), p->box, TRUE, TRUE, (p->round_corners) ? p->round_corners_radius : 0); if (p->round_corners) { - make_round_corners(p); DBG("make_round_corners\n"); + make_round_corners(p); } /* start window creation process */ gtk_widget_show_all(p->topgwin); @@ -740,6 +756,15 @@ panel_parse_plugin(xconf *xc) p->plugins = g_list_append(p->plugins, plug); } +static gboolean +panel_show_anyway(gpointer data) +{ + ENTER; + gtk_widget_show_all(p->topgwin); + return FALSE; +} + + static void panel_start(xconf *xc) { @@ -753,6 +778,7 @@ panel_start(xconf *xc) panel_parse_global(xconf_find(xc, "global", 0)); for (i = 0; (pxc = xconf_find(xc, "plugin", i)); i++) panel_parse_plugin(pxc); + g_timeout_add(200, panel_show_anyway, NULL); RET(); } From fdef345340f2a8e479b24ef40d512957d8a7d26a Mon Sep 17 00:00:00 2001 From: Anatoly Date: Fri, 4 Dec 2015 03:10:21 +0200 Subject: [PATCH 09/37] get rid of 'ignoring return value` warning --- plugins/cpu/cpu.c | 4 ++-- plugins/deskno2/deskno2.c | 2 +- plugins/genmon/genmon.c | 2 +- plugins/net/net.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/cpu/cpu.c b/plugins/cpu/cpu.c index b148ad8..fef3ca8 100644 --- a/plugins/cpu/cpu.c +++ b/plugins/cpu/cpu.c @@ -46,8 +46,8 @@ cpu_get_load_real(struct cpu_stat *cpu) stat = fopen("/proc/stat", "r"); if(!stat) return -1; - fscanf(stat, "cpu %lu %lu %lu %lu %lu", &cpu->u, &cpu->n, &cpu->s, - &cpu->i, &cpu->w); + if (fscanf(stat, "cpu %lu %lu %lu %lu %lu", &cpu->u, &cpu->n, &cpu->s, + &cpu->i, &cpu->w)); fclose(stat); return 0; } diff --git a/plugins/deskno2/deskno2.c b/plugins/deskno2/deskno2.c index 213a041..1ea39c8 100644 --- a/plugins/deskno2/deskno2.c +++ b/plugins/deskno2/deskno2.c @@ -25,7 +25,7 @@ typedef struct { static void clicked(GtkWidget *widget, deskno_priv *dc) { - system("xfce-setting-show workspaces"); + if (system("xfce-setting-show workspaces")); } static void diff --git a/plugins/genmon/genmon.c b/plugins/genmon/genmon.c index 7f3ef30..274ed6b 100644 --- a/plugins/genmon/genmon.c +++ b/plugins/genmon/genmon.c @@ -47,7 +47,7 @@ text_update(genmon_priv *gm) ENTER; fp = popen(gm->command, "r"); - fgets(text, sizeof(text), fp); + if (fgets(text, sizeof(text), fp)); pclose(fp); len = strlen(text) - 1; if (len >= 0) { diff --git a/plugins/net/net.c b/plugins/net/net.c index 92e2d30..2a60f44 100644 --- a/plugins/net/net.c +++ b/plugins/net/net.c @@ -60,8 +60,8 @@ net_get_load_real(net_priv *c, struct net_stat *net) stat = fopen("/proc/net/dev", "r"); if(!stat) return -1; - fgets(buf, 256, stat); - fgets(buf, 256, stat); + if (fgets(buf, 256, stat)); + if (fgets(buf, 256, stat)); while (!s && !feof(stat) && fgets(buf, 256, stat)) s = g_strrstr(buf, c->iface); From 29dac1c7871f045745b5cd3d61b1861190191cfd Mon Sep 17 00:00:00 2001 From: Anatoly Date: Fri, 4 Dec 2015 03:21:31 +0200 Subject: [PATCH 10/37] update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e495e85..2869a46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ ## Version: develop -Date: 2015-12-03 20:05:14 +Date: 2015-12-04 03:10:21 + * [#6] Rounded corners don't work with widthtype=request * [#2] Include option for vertical (y) and horizontal (x) margin +[#6]: https://github.com/aanatoly/fbpanel/issues/6 [#2]: https://github.com/aanatoly/fbpanel/issues/2 From 8cf442354655e6ab50a924d6e81eed749474f367 Mon Sep 17 00:00:00 2001 From: "martin.slouf" Date: Fri, 4 Dec 2015 09:44:04 +0100 Subject: [PATCH 11/37] Add support for battery info obtained from /sys Support parsing of battery information form /sys filesystem. Useful for newer Linux kernels. --- plugins/battery/Makefile | 8 +- plugins/battery/battery.c | 2 +- plugins/battery/os_linux.c | 20 +- plugins/battery/power_supply.c | 347 +++++++++++++++++++++++++++++++++ plugins/battery/power_supply.h | 64 ++++++ 5 files changed, 432 insertions(+), 9 deletions(-) create mode 100644 plugins/battery/power_supply.c create mode 100644 plugins/battery/power_supply.h diff --git a/plugins/battery/Makefile b/plugins/battery/Makefile index 5ddda22..6967680 100644 --- a/plugins/battery/Makefile +++ b/plugins/battery/Makefile @@ -2,9 +2,9 @@ TOPDIR := ../.. -battery_src = battery.c -battery_cflags = -DPLUGIN $(GTK2_CFLAGS) -battery_libs = $(GTK2_LIBS) -battery_type = lib +battery_src = battery.c power_supply.c +battery_cflags = -DPLUGIN $(GTK2_CFLAGS) +battery_libs = $(GTK2_LIBS) +battery_type = lib include $(TOPDIR)/.config/rules.mk diff --git a/plugins/battery/battery.c b/plugins/battery/battery.c index 4f5b186..ab736e3 100644 --- a/plugins/battery/battery.c +++ b/plugins/battery/battery.c @@ -120,7 +120,7 @@ static plugin_class class = { .count = 0, .type = "battery", .name = "battery usage", - .version = "1.0", + .version = "1.1", .description = "Display battery usage", .priv_size = sizeof(battery_priv), .constructor = battery_constructor, diff --git a/plugins/battery/os_linux.c b/plugins/battery/os_linux.c index 34909b0..658e8b4 100644 --- a/plugins/battery/os_linux.c +++ b/plugins/battery/os_linux.c @@ -1,11 +1,11 @@ - #include #include +#include "power_supply.h" + #define LEN 100 #define PROC_ACPI "/proc/acpi/battery/" - static gboolean get_token_eq(gchar *buf, gchar *token, gchar *value, gboolean *ret) { @@ -114,7 +114,7 @@ battery_update_os_proc(battery_priv *c) } g_dir_close(dir); -out: + out: g_string_free(path, TRUE); RET(ret); } @@ -123,7 +123,19 @@ static gboolean battery_update_os_sys(battery_priv *c) { ENTER; - RET(FALSE); + // author: bubak4@github (aka. martinslouf@users.sourceforge.net) + c->exist = FALSE; + power_supply* ps = power_supply_new(); + power_supply_parse(ps); + if (g_sequence_get_length(ps->bat_list) > 0) { + gboolean ac_online = power_supply_is_ac_online(ps); + gdouble bat_capacity = power_supply_get_bat_capacity(ps); + c->exist = TRUE; + c->charging = ac_online; + c->level = (gfloat) bat_capacity; + } + power_supply_free(ps); + RET(c->exist); } static gboolean diff --git a/plugins/battery/power_supply.c b/plugins/battery/power_supply.c new file mode 100644 index 0000000..f33dd4d --- /dev/null +++ b/plugins/battery/power_supply.c @@ -0,0 +1,347 @@ +// Time-stamp: < power_supply.c (2015-12-04 09:42) > +// author: bubak4@github (aka. martinslouf@users.sourceforge.net) + +#include +#include +#include + +#include "power_supply.h" + +#define DEBUG 0 + +#define STRING_LEN 100 + +#define SYS_ACPI_PATH "/sys/class/power_supply/" +#define SYS_ACPI_TYPE_FILE "type" +#define SYS_ACPI_TYPE_AC "Mains\n" +#define SYS_ACPI_TYPE_BAT "Battery\n" +#define SYS_ACPI_UEVENT_FILE "uevent" +#define SYS_ACPI_UEVENT_NAME_KEY "POWER_SUPPLY_NAME" +#define SYS_ACPI_UEVENT_AC_ONLINE_KEY "POWER_SUPPLY_ONLINE" +#define SYS_ACPI_UEVENT_AC_ONLINE_VALUE "1" +#define SYS_ACPI_UEVENT_BAT_STATUS_KEY "POWER_SUPPLY_STATUS" +/* Recent kernels. */ +#define SYS_ACPI_UEVENT_BAT_CAPACITY_KEY "POWER_SUPPLY_CAPACITY" +/* + * Older kernlels -- capacity is computed as division of: + * POWER_SUPPLY_ENERGY_NOW / POWER_SUPPLY_ENERGY_FULL + * or + * POWER_SUPPLY_CHARGE_NOW / POWER_SUPPLY_CHARGE_FULL + */ +#define SYS_ACPI_UEVENT_BAT_ENERGY_FULL_KEY "POWER_SUPPLY_ENERGY_FULL" +#define SYS_ACPI_UEVENT_BAT_ENERGY_NOW_KEY "POWER_SUPPLY_ENERGY_NOW" +#define SYS_ACPI_UEVENT_BAT_CHARGE_FULL_KEY "POWER_SUPPLY_CHARGE_FULL" +#define SYS_ACPI_UEVENT_BAT_CHARGE_NOW_KEY "POWER_SUPPLY_CHARGE_NOW" + +/* Debug function to print out uevent file key-value pairs. */ +static void +uevent_ghfunc(gpointer key, gpointer value, gpointer user_data) +{ + gchar* k = (gchar*) key; + gchar* v = (gchar*) value; + g_fprintf(stderr, "'%s' => '%s'\n", k, v); +} + +/* Parses uevent file returning the result as GHashTable. */ +static GHashTable* +uevent_parse(gchar* filename) +{ + GHashTable* hash = NULL; + GString* key = g_string_sized_new(STRING_LEN); + GString* value = g_string_sized_new(STRING_LEN); + gchar* buf = NULL; + guint buf_len = 0; + gchar c; + guint i; + gboolean equals_sign_found = FALSE; + + if (g_file_test(filename, G_FILE_TEST_IS_REGULAR)) { + if (g_file_get_contents(filename, &buf, 0, NULL)) { + hash = g_hash_table_new_full(&g_str_hash, &g_str_equal, &g_free, &g_free); + buf_len = strlen(buf); + + for (i = 0; i < buf_len; ++i) { + c = buf[i]; + if (c == '=' && !equals_sign_found) { + equals_sign_found = TRUE; + } else if (c == '\n' && equals_sign_found) { + equals_sign_found = FALSE; + g_hash_table_insert(hash, g_strdup(key->str), g_strdup(value->str)); + g_string_truncate(key, 0); + g_string_truncate(value, 0); + } else { + if (equals_sign_found) { + g_string_append_c(value, c); + } else { + g_string_append_c(key, c); + } + } + } + if (DEBUG) { + g_hash_table_foreach(hash, &uevent_ghfunc, NULL); + } + } + } + + g_free(buf); + g_string_free(key, TRUE); + g_string_free(value, TRUE); + + return hash; +} + +static ac* +ac_new(gchar* path) +{ + ac* tmp = g_new(ac, 1); + tmp->path = path; + tmp->name = NULL; + tmp->online = FALSE; + return tmp; +} + +static void +ac_free(gpointer p) +{ + ac* tmp = (ac*) p; + g_free(tmp->path); + g_free(tmp->name); + g_free(tmp); + if (DEBUG) { + g_fprintf(stderr, "ac_free %p\n", p); + } +} + +static void +ac_print(gpointer p, gpointer user_data) +{ + ac* tmp = (ac*) p; + g_fprintf(stderr, "AC\n path: %s\n name: %s\n online: %d\n", tmp->path, tmp->name, tmp->online); +} + +/* Parses information about AC power supply based on ac->path. */ +static ac* +ac_parse(ac* ac) +{ + GHashTable* hash; + gchar* tmp_value; + + if (ac->path != NULL) { + hash = uevent_parse(ac->path); + if (hash != NULL) { + // ac name + tmp_value = (gchar*) g_hash_table_lookup(hash, SYS_ACPI_UEVENT_NAME_KEY); + if (tmp_value != NULL) { + ac->name = g_strdup(tmp_value); + } + + // ac online + tmp_value = (gchar*) g_hash_table_lookup(hash, SYS_ACPI_UEVENT_AC_ONLINE_KEY); + if (tmp_value != NULL) { + ac->online = strcmp(SYS_ACPI_UEVENT_AC_ONLINE_VALUE, tmp_value) == 0; + } + + g_hash_table_destroy(hash); + } + } + + return ac; +} + +static bat* +bat_new(gchar* path) +{ + bat* tmp = g_new(bat, 1); + tmp->path = path; + tmp->name = NULL; + tmp->status = NULL; + tmp->capacity = -1.0d; + return tmp; +} + +static void +bat_free(gpointer p) +{ + bat* tmp = (bat*) p; + g_free(tmp->path); + g_free(tmp->name); + g_free(tmp->status); + g_free(tmp); + if (DEBUG) { + g_fprintf(stderr, "bat_free %p\n", p); + } +} + +static void +bat_print(gpointer p, gpointer user_data) +{ + bat* tmp = (bat*) p; + g_fprintf(stderr, "BATTERY\n path: %s\n name: %s\n status: %s\n capacity: %f\n", tmp->path, tmp->name, tmp->status, tmp->capacity); +} + +/* Parses information about BATTERY power supply based on bat->path. */ +static bat* +bat_parse(bat* bat) +{ + GHashTable* hash; + gchar* tmp_value; + + if (bat->path != NULL) { + hash = uevent_parse(bat->path); + if (hash != NULL) { + // battery name + tmp_value = (gchar*) g_hash_table_lookup(hash, SYS_ACPI_UEVENT_NAME_KEY); + if (tmp_value != NULL) { + bat->name = g_strdup(tmp_value); + } + + // battery status + tmp_value = (gchar*) g_hash_table_lookup(hash, SYS_ACPI_UEVENT_BAT_STATUS_KEY); + if (tmp_value != NULL) { + bat->status = g_strdup(tmp_value); + } + + // battery remaining capacity + tmp_value = (gchar*) g_hash_table_lookup(hash, SYS_ACPI_UEVENT_BAT_CAPACITY_KEY); + if (tmp_value != NULL) { + bat->capacity = g_ascii_strtod(tmp_value, NULL); + } else { // for older kernels + tmp_value = (gchar*) g_hash_table_lookup(hash, SYS_ACPI_UEVENT_BAT_ENERGY_NOW_KEY); + gdouble tmp = -1.0d; + if (tmp_value != NULL) { // ac off + tmp = g_ascii_strtod(tmp_value, NULL); + tmp_value = (gchar*) g_hash_table_lookup(hash, SYS_ACPI_UEVENT_BAT_ENERGY_FULL_KEY); + if (tmp_value != NULL && tmp > 0.0d) { + tmp = tmp / g_ascii_strtod(tmp_value, NULL) * 100.0d; + bat->capacity = tmp; + } + } else { + tmp_value = (gchar*) g_hash_table_lookup(hash, SYS_ACPI_UEVENT_BAT_CHARGE_NOW_KEY); + if (tmp_value != NULL) { // ac on + tmp = g_ascii_strtod(tmp_value, NULL); + tmp_value = (gchar*) g_hash_table_lookup(hash, SYS_ACPI_UEVENT_BAT_CHARGE_FULL_KEY); + if (tmp_value != NULL && tmp > 0.0d) { + tmp = tmp / g_ascii_strtod(tmp_value, NULL) * 100.0d; + bat->capacity = tmp; + } + } + } + } + + g_hash_table_destroy(hash); + } + } + + return bat; +} + +extern power_supply* +power_supply_new() { + power_supply* tmp = g_new(power_supply, 1); + tmp->ac_list = g_sequence_new(&ac_free); + tmp->bat_list = g_sequence_new(&bat_free); + return tmp; +} + +extern void +power_supply_free(gpointer p) { + power_supply* tmp = (power_supply*) p; + g_sequence_free(tmp->ac_list); + g_sequence_free(tmp->bat_list); + g_free(tmp); + if (DEBUG) { + g_fprintf(stderr, "power_supply_free %p\n", p); + } +} + +/* Parses power supplies on the current system. */ +extern power_supply* +power_supply_parse(power_supply* ps) { + GDir* dir = NULL; + const gchar* tmp; + GString* filename = g_string_sized_new(STRING_LEN); + guint len = 0; + gchar* contents; + + if (g_file_test(SYS_ACPI_PATH, G_FILE_TEST_IS_DIR)) { + dir = g_dir_open(SYS_ACPI_PATH, 0, NULL); + if (dir != NULL) { + while ((tmp = g_dir_read_name(dir)) != NULL) { + g_string_append(filename, SYS_ACPI_PATH); + g_string_append(filename, tmp); + g_string_append_c(filename, G_DIR_SEPARATOR); + len = filename->len; + g_string_append(filename, SYS_ACPI_TYPE_FILE); + if (g_file_test(filename->str, G_FILE_TEST_IS_REGULAR)) { + g_file_get_contents(filename->str, &contents, 0, NULL); + g_string_truncate(filename, len); + g_string_append(filename, SYS_ACPI_UEVENT_FILE); + if (strcmp(SYS_ACPI_TYPE_AC, contents) == 0) { + ac* tmp = ac_new(g_strdup(filename->str)); + ac_parse(tmp); + g_sequence_append(ps->ac_list, tmp); + } else if (strcmp(SYS_ACPI_TYPE_BAT, contents) == 0) { + bat* tmp = bat_new(g_strdup(filename->str)); + bat_parse(tmp); + g_sequence_append(ps->bat_list, tmp); + } else { + g_fprintf(stderr, "unsupported power supply type %s", contents); + } + g_free(contents); + } + g_string_truncate(filename, 0); + } + g_dir_close(dir); + } + } + + g_string_free(filename, TRUE); + + if (DEBUG) { + g_sequence_foreach(ps->ac_list, &ac_print, NULL); + g_sequence_foreach(ps->bat_list, &bat_print, NULL); + } + + return ps; +} + +extern gboolean +power_supply_is_ac_online(power_supply* ps) +{ + gboolean ac_online = FALSE; + GSequenceIter* it; + ac* ac_power; + if (ps->ac_list != NULL) { + it = g_sequence_get_begin_iter(ps->ac_list); + while (!g_sequence_iter_is_end(it)) { + ac_power = (ac*) g_sequence_get(it); + if (ac_power->online) { + ac_online = TRUE; + break; + } + it = g_sequence_iter_next(it); + } + } + return ac_online; +} + +extern gdouble +power_supply_get_bat_capacity(power_supply* ps) +{ + gdouble total_bat_capacity = 0.0d; + guint bat_count = 0; + GSequenceIter* it; + bat* battery; + if (ps->bat_list != NULL) { + it = g_sequence_get_begin_iter(ps->bat_list); + while (!g_sequence_iter_is_end(it)) { + battery = (bat*) g_sequence_get(it); + if (battery->capacity > 0.0d) { + total_bat_capacity = total_bat_capacity + battery->capacity; + } + bat_count++; + it = g_sequence_iter_next(it); + } + } + return total_bat_capacity / bat_count; +} diff --git a/plugins/battery/power_supply.h b/plugins/battery/power_supply.h new file mode 100644 index 0000000..67f6a86 --- /dev/null +++ b/plugins/battery/power_supply.h @@ -0,0 +1,64 @@ +// Time-stamp: < power_supply.h (2015-12-04 09:42) > +// author: bubak4@github (aka. martinslouf@users.sourceforge.net) + +#ifndef POWER_SUPPLY_H +#define POWER_SUPPLY_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + /* Struct representing AC power supply. */ + typedef struct { + /* Path to uevent file. */ + gchar* path; + gchar* name; + gboolean online; + } ac; + + /* Struct representing BATTERY power supply. */ + typedef struct { + /* Path to uevent file. */ + gchar* path; + gchar* name; + gchar* status; + /* In percent 0.0--100.0. */ + gdouble capacity; + } bat; + + /* Struct representing all the power supplies on current system. */ + typedef struct { + /* List of ac structs. */ + GSequence* ac_list; + /* List of bat structs. */ + GSequence* bat_list; + } power_supply; + + /* Allocate memory for struct power_supply. */ + extern power_supply* power_supply_new(); + + /* Free memory allocated by power_supply_new(). */ + extern void power_supply_free(gpointer p); + + /* Parses power supplies on the current system. */ + extern power_supply* power_supply_parse(); + + /* + * Return TRUE if AC power is on (ie. at least one AC adapter is on). + */ + extern gboolean power_supply_is_ac_online(power_supply* ps); + + /* + * Return total BATTERY capacity (as percentage of capacity) on the + * system as an average of all batteries capacity div by number of + * batteries. + */ + extern gdouble power_supply_get_bat_capacity(power_supply* ps); + +#ifdef __cplusplus +} +#endif + +#endif /* POWER_SUPPLY_H */ From 81f8a98a690aad7b547569bde7216790ff7ae415 Mon Sep 17 00:00:00 2001 From: "martin.slouf" Date: Fri, 4 Dec 2015 09:48:25 +0100 Subject: [PATCH 12/37] Simple test to check /sys battery plugin extension --- plugins/battery/Makefile-test | 19 +++++++++++++++++++ plugins/battery/main.c | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 plugins/battery/Makefile-test create mode 100644 plugins/battery/main.c diff --git a/plugins/battery/Makefile-test b/plugins/battery/Makefile-test new file mode 100644 index 0000000..c06e335 --- /dev/null +++ b/plugins/battery/Makefile-test @@ -0,0 +1,19 @@ +# -*- mode: Makefile -*- +# Time-stamp: < Makefile-test (2015-12-04 09:40) > +# author: bubak4@github (aka. martinslouf@users.sourceforge.net) + +CC = gcc -Wall -g -O0 `pkg-config --cflags --libs glib-2.0` + +all: main + +clean: + rm -rf *.o main + +main: main.c power_supply.o + $(CC) main.c power_supply.o -o $@ + +power_supply.o: power_supply.h power_supply.c + $(CC) -c power_supply.c -o $@ + +valgrind: main + G_DEBUG=gc-friendly G_SLICE=always-malloc valgrind --leak-check=yes ./main diff --git a/plugins/battery/main.c b/plugins/battery/main.c new file mode 100644 index 0000000..6cea9c2 --- /dev/null +++ b/plugins/battery/main.c @@ -0,0 +1,22 @@ +// Time-stamp: < main.c (2015-12-04 09:40) > +// run with: make -k -f Makefile-test valgrind +// author: bubak4@github (aka. martinslouf@users.sourceforge.net) + +#include +#include + +#include "power_supply.h" + +int main(int argc, char** args) +{ + power_supply* ps = power_supply_new(); + power_supply_parse(ps); + gboolean ac_online = power_supply_is_ac_online(ps); + gdouble bat_capacity = power_supply_get_bat_capacity(ps); + + power_supply_free(ps); + + g_fprintf(stdout, "ac_online: %d\nbat_capacity: %f\n", ac_online, bat_capacity); + + return 0; +} From 7dd9d0f7cf617045b52f4ece2abc53fe4894ae50 Mon Sep 17 00:00:00 2001 From: "martin.slouf" Date: Fri, 4 Dec 2015 19:04:16 +0100 Subject: [PATCH 13/37] Reformat to meet project guidelines. --- plugins/battery/Makefile-test | 3 +- plugins/battery/main.c | 3 +- plugins/battery/os_linux.c | 1 - plugins/battery/power_supply.c | 3 +- plugins/battery/power_supply.h | 103 +++++++++++++++------------------ 5 files changed, 50 insertions(+), 63 deletions(-) diff --git a/plugins/battery/Makefile-test b/plugins/battery/Makefile-test index c06e335..3dc7095 100644 --- a/plugins/battery/Makefile-test +++ b/plugins/battery/Makefile-test @@ -1,6 +1,5 @@ # -*- mode: Makefile -*- -# Time-stamp: < Makefile-test (2015-12-04 09:40) > -# author: bubak4@github (aka. martinslouf@users.sourceforge.net) +# Time-stamp: < Makefile-test (2015-12-04 19:02) > CC = gcc -Wall -g -O0 `pkg-config --cflags --libs glib-2.0` diff --git a/plugins/battery/main.c b/plugins/battery/main.c index 6cea9c2..6be4a20 100644 --- a/plugins/battery/main.c +++ b/plugins/battery/main.c @@ -1,6 +1,5 @@ -// Time-stamp: < main.c (2015-12-04 09:40) > +// Time-stamp: < main.c (2015-12-04 19:02) > // run with: make -k -f Makefile-test valgrind -// author: bubak4@github (aka. martinslouf@users.sourceforge.net) #include #include diff --git a/plugins/battery/os_linux.c b/plugins/battery/os_linux.c index 658e8b4..6523b4f 100644 --- a/plugins/battery/os_linux.c +++ b/plugins/battery/os_linux.c @@ -123,7 +123,6 @@ static gboolean battery_update_os_sys(battery_priv *c) { ENTER; - // author: bubak4@github (aka. martinslouf@users.sourceforge.net) c->exist = FALSE; power_supply* ps = power_supply_new(); power_supply_parse(ps); diff --git a/plugins/battery/power_supply.c b/plugins/battery/power_supply.c index f33dd4d..ab3f359 100644 --- a/plugins/battery/power_supply.c +++ b/plugins/battery/power_supply.c @@ -1,5 +1,4 @@ -// Time-stamp: < power_supply.c (2015-12-04 09:42) > -// author: bubak4@github (aka. martinslouf@users.sourceforge.net) +// Time-stamp: < power_supply.c (2015-12-04 19:01) > #include #include diff --git a/plugins/battery/power_supply.h b/plugins/battery/power_supply.h index 67f6a86..ba5e3ed 100644 --- a/plugins/battery/power_supply.h +++ b/plugins/battery/power_supply.h @@ -1,64 +1,55 @@ -// Time-stamp: < power_supply.h (2015-12-04 09:42) > -// author: bubak4@github (aka. martinslouf@users.sourceforge.net) +// Time-stamp: < power_supply.h (2015-12-04 19:01) > #ifndef POWER_SUPPLY_H #define POWER_SUPPLY_H #include -#ifdef __cplusplus -extern "C" { -#endif - - /* Struct representing AC power supply. */ - typedef struct { - /* Path to uevent file. */ - gchar* path; - gchar* name; - gboolean online; - } ac; - - /* Struct representing BATTERY power supply. */ - typedef struct { - /* Path to uevent file. */ - gchar* path; - gchar* name; - gchar* status; - /* In percent 0.0--100.0. */ - gdouble capacity; - } bat; - - /* Struct representing all the power supplies on current system. */ - typedef struct { - /* List of ac structs. */ - GSequence* ac_list; - /* List of bat structs. */ - GSequence* bat_list; - } power_supply; - - /* Allocate memory for struct power_supply. */ - extern power_supply* power_supply_new(); - - /* Free memory allocated by power_supply_new(). */ - extern void power_supply_free(gpointer p); - - /* Parses power supplies on the current system. */ - extern power_supply* power_supply_parse(); - - /* - * Return TRUE if AC power is on (ie. at least one AC adapter is on). - */ - extern gboolean power_supply_is_ac_online(power_supply* ps); - - /* - * Return total BATTERY capacity (as percentage of capacity) on the - * system as an average of all batteries capacity div by number of - * batteries. - */ - extern gdouble power_supply_get_bat_capacity(power_supply* ps); - -#ifdef __cplusplus -} -#endif +/* Struct representing AC power supply. */ +typedef struct { + /* Path to uevent file. */ + gchar* path; + gchar* name; + gboolean online; +} ac; + +/* Struct representing BATTERY power supply. */ +typedef struct { + /* Path to uevent file. */ + gchar* path; + gchar* name; + gchar* status; + /* In percent 0.0--100.0. */ + gdouble capacity; +} bat; + +/* Struct representing all the power supplies on current system. */ +typedef struct { + /* List of ac structs. */ + GSequence* ac_list; + /* List of bat structs. */ + GSequence* bat_list; +} power_supply; + +/* Allocate memory for struct power_supply. */ +power_supply* power_supply_new(); + +/* Free memory allocated by power_supply_new(). */ +void power_supply_free(gpointer p); + +/* Parses power supplies on the current system. */ +power_supply* power_supply_parse(); + +/* + * Return TRUE if AC power is on (ie. at least one AC adapter is on). + */ +gboolean power_supply_is_ac_online(power_supply* ps); + +/* + * Return total BATTERY capacity (as percentage of capacity) on the + * system as an average of all batteries capacity div by number of + * batteries. + */ +gdouble power_supply_get_bat_capacity(power_supply* ps); #endif /* POWER_SUPPLY_H */ From 44e5c9d6a58c69cc9c0fb187cae0176d7dbf6101 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Fri, 4 Dec 2015 21:50:28 +0200 Subject: [PATCH 14/37] update changelog ref #8 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2869a46..a0ab8d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## Version: develop -Date: 2015-12-04 03:10:21 +Date: 2015-12-04 21:15:18 * [#6] Rounded corners don't work with widthtype=request * [#2] Include option for vertical (y) and horizontal (x) margin From 14d1578795c310f755294550066501d56ba0b77e Mon Sep 17 00:00:00 2001 From: Anatoly Date: Fri, 4 Dec 2015 21:52:31 +0200 Subject: [PATCH 15/37] update changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0ab8d3..c0d78c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ ## Version: develop -Date: 2015-12-04 21:15:18 +Date: 2015-12-04 21:50:28 + * [#8] Fix for issue #5 (make battery plugin work with /sys) * [#6] Rounded corners don't work with widthtype=request + * [#5] make battery plugin work with /sys * [#2] Include option for vertical (y) and horizontal (x) margin +[#8]: https://github.com/aanatoly/fbpanel/pull/8 [#6]: https://github.com/aanatoly/fbpanel/issues/6 +[#5]: https://github.com/aanatoly/fbpanel/issues/5 [#2]: https://github.com/aanatoly/fbpanel/issues/2 From e7bb91c281c7cfdb0f1b9b79871e2b0c05416c4e Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 00:46:57 +0200 Subject: [PATCH 16/37] update install doc [#11] --- INSTALL | 17 ----------------- INSTALL.md | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 17 deletions(-) delete mode 100644 INSTALL create mode 100644 INSTALL.md diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 8e73413..0000000 --- a/INSTALL +++ /dev/null @@ -1,17 +0,0 @@ -Installation: - -1. Default way -Most users (99.99%) should use this way :-) - - ./configure - make - su - - make install - -2. Litle customization -Run ./configure --help to see supported options, then goto step 1 - - - - - diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..329a09d --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,27 @@ +# Installation: + +## User install +Build and install it +``` +./configure --prefix=$HOME/.local +make +make install +``` + +Then add `~/.local/bin/` to your `PATH`. Add this line to `~/.bashrc` +``` +export PATH=$HOME/.local/bin:$PATH +``` + +## System Install +Build and install it +``` +./configure +make +su -c "make install" +``` + +# Dependencies +Deps: + * core - gtk2 2.17 or higher + * plugin `foo` - bar 1.0 From 0191f754598ed543da67f693acd90718f6059079 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 00:56:06 +0200 Subject: [PATCH 17/37] add skeleton for `user` plugin [#11] --- plugins/Makefile | 3 +- plugins/user/.gitignore | 3 + plugins/user/Makefile | 10 ++ plugins/user/user.c | 229 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 244 insertions(+), 1 deletion(-) create mode 100644 plugins/user/.gitignore create mode 100644 plugins/user/Makefile create mode 100644 plugins/user/user.c diff --git a/plugins/Makefile b/plugins/Makefile index 346efd3..2990136 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -24,6 +24,7 @@ SUBDIRS := battery \ taskbar \ tclock \ volume \ - wincmd + wincmd \ + user include $(TOPDIR)/.config/rules.mk diff --git a/plugins/user/.gitignore b/plugins/user/.gitignore new file mode 100644 index 0000000..1d3635d --- /dev/null +++ b/plugins/user/.gitignore @@ -0,0 +1,3 @@ +user.o +user.d +libnet.so diff --git a/plugins/user/Makefile b/plugins/user/Makefile new file mode 100644 index 0000000..0de8231 --- /dev/null +++ b/plugins/user/Makefile @@ -0,0 +1,10 @@ +## miniconf makefiles ## 1.1 ## + +TOPDIR := ../.. + +net_src = user.c +net_cflags = -DPLUGIN $(GTK2_CFLAGS) +net_libs = $(GTK2_LIBS) +net_type = lib + +include $(TOPDIR)/.config/rules.mk diff --git a/plugins/user/user.c b/plugins/user/user.c new file mode 100644 index 0000000..cc6fa64 --- /dev/null +++ b/plugins/user/user.c @@ -0,0 +1,229 @@ + + +#include "../chart/chart.h" +#include +#include + +//#define DEBUGPRN +#include "dbg.h" + +#if defined(__FreeBSD__) +#include +#include +#include +#include +#include +#include +#endif + + +#define CHECK_PERIOD 2 /* second */ + +struct user_stat { + gulong tx, rx; +}; + +typedef struct { + chart_priv chart; + struct user_stat user_prev; + int timer; + char *iface; +#if defined(__FreeBSD__) + size_t ifmib_row; +#endif + gint max_tx; + gint max_rx; + gulong max; + gchar *colors[2]; +} user_priv; + +static chart_class *k; + + +static void user_destructor(plugin_instance *p); + + +#if defined __linux__ + +#define init_user_stats(x) + +static int +user_get_load_real(user_priv *c, struct user_stat *user) +{ + FILE *stat; + char buf[256], *s = NULL; + + stat = fopen("/proc/net/dev", "r"); + if(!stat) + return -1; + if (fgets(buf, 256, stat)); + if (fgets(buf, 256, stat)); + + while (!s && !feof(stat) && fgets(buf, 256, stat)) + s = g_strrstr(buf, c->iface); + fclose(stat); + if (!s) + return -1; + s = g_strrstr(s, ":"); + if (!s) + return -1; + s++; + if (sscanf(s, + "%lu %*d %*d %*d %*d %*d %*d %*d %lu", + &user->rx, &user->tx)!= 2) { + DBG("can't read %s statistics\n", c->iface); + return -1; + } + return 0; +} + +#elif defined(__FreeBSD__) +static void +init_user_stats(user_priv *c) +{ + int mib[6] = { + CTL_NET, + PF_LINK, + NETLINK_GENERIC, + IFMIB_SYSTEM, + IFMIB_IFCOUNT + }; + u_int count = 0; + struct ifmibdata ifmd; + size_t len = sizeof(count); + + c->ifmib_row = 0; + if (sysctl(mib, 5, (void *)&count, &len, NULL, 0) != 0) + return; + + mib[3] = IFMIB_IFDATA; + mib[5] = IFDATA_GENERAL; + len = sizeof(ifmd); + for (mib[4] = 1; mib[4] <= count; mib[4]++) { + if (sysctl(mib, 6, (void *)&ifmd, &len, NULL, 0) != 0) + continue; + if (strcmp(ifmd.ifmd_name, c->iface) == 0) { + c->ifmib_row = mib[4]; + break; + } + } +} + +static int +user_get_load_real(user_priv *c, struct user_stat *user) +{ + int mib[6] = { + CTL_NET, + PF_LINK, + NETLINK_GENERIC, + IFMIB_IFDATA, + c->ifmib_row, + IFDATA_GENERAL + }; + struct ifmibdata ifmd; + size_t len = sizeof(ifmd); + + if (!c->ifmib_row) + return -1; + + if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &ifmd, &len, NULL, 0) != 0) + return -1; + + user->tx = ifmd.ifmd_data.ifi_obytes; + user->rx = ifmd.ifmd_data.ifi_ibytes; + return 0; +} + +#endif + +static int +user_get_load(user_priv *c) +{ + struct user_stat user, user_diff; + float total[2]; + char buf[256]; + + ENTER; + memset(&user, 0, sizeof(user)); + memset(&user_diff, 0, sizeof(user_diff)); + memset(&total, 0, sizeof(total)); + + if (user_get_load_real(c, &user)) + goto end; + + user_diff.tx = ((user.tx - c->user_prev.tx) >> 10) / CHECK_PERIOD; + user_diff.rx = ((user.rx - c->user_prev.rx) >> 10) / CHECK_PERIOD; + + c->user_prev = user; + total[0] = (float)(user_diff.tx) / c->max; + total[1] = (float)(user_diff.rx) / c->max; + +end: + DBG("%f %f %ul %ul\n", total[0], total[1], user_diff.tx, user_diff.rx); + k->add_tick(&c->chart, total); + g_snprintf(buf, sizeof(buf), "%s:\nD %lu Kbs, U %lu Kbs", + c->iface, user_diff.rx, user_diff.tx); + gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, buf); + RET(TRUE); +} + +static int +user_constructor(plugin_instance *p) +{ + user_priv *c; + + if (!(k = class_get("chart"))) + RET(0); + if (!PLUGIN_CLASS(k)->constructor(p)) + RET(0); + c = (user_priv *) p; + + c->iface = "eth0"; + c->max_rx = 120; + c->max_tx = 12; + c->colors[0] = "violet"; + c->colors[1] = "blue"; + XCG(p->xc, "interface", &c->iface, str); + XCG(p->xc, "RxLimit", &c->max_rx, int); + XCG(p->xc, "TxLimit", &c->max_tx, int); + XCG(p->xc, "TxColor", &c->colors[0], str); + XCG(p->xc, "RxColor", &c->colors[1], str); + + init_user_stats(c); + + c->max = c->max_rx + c->max_tx; + k->set_rows(&c->chart, 2, c->colors); + gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, "User"); + user_get_load(c); + c->timer = g_timeout_add(CHECK_PERIOD * 1000, + (GSourceFunc) user_get_load, (gpointer) c); + RET(1); +} + + +static void +user_destructor(plugin_instance *p) +{ + user_priv *c = (user_priv *) p; + + ENTER; + if (c->timer) + g_source_remove(c->timer); + PLUGIN_CLASS(k)->destructor(p); + class_put("chart"); + RET(); +} + + +static plugin_class class = { + .count = 0, + .type = "user", + .name = "User menu", + .version = "1.0", + .description = "User photo and menu of user actions", + .priv_size = sizeof(user_priv), + + .constructor = user_constructor, + .destructor = user_destructor, +}; +static plugin_class *class_ptr = (plugin_class *) &class; From 5c6094392246150fe7a46cbfd358be104eba2136 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 01:21:37 +0200 Subject: [PATCH 18/37] base `user` on `menu` [#11] change `menu` to serve as base class change `user` to base upon `menu` --- plugins/menu/menu.c | 34 +++----- plugins/menu/menu.h | 26 ++++++ plugins/user/user.c | 192 +++----------------------------------------- 3 files changed, 50 insertions(+), 202 deletions(-) create mode 100644 plugins/menu/menu.h diff --git a/plugins/menu/menu.c b/plugins/menu/menu.c index ef1c4fe..a45c00e 100644 --- a/plugins/menu/menu.c +++ b/plugins/menu/menu.c @@ -11,23 +11,11 @@ #include "bg.h" #include "gtkbgbox.h" #include "run.h" +#include "menu.h" //#define DEBUGPRN #include "dbg.h" -#define MENU_DEFAULT_ICON_SIZE 22 - -typedef struct { - plugin_instance plugin; - GtkWidget *menu, *bg; - int iconsize, paneliconsize; - xconf *xc; - guint tout, rtout; - gboolean has_system_menu; - time_t btime; - gint icon_size; -} menu_priv; - xconf *xconf_new_from_systemmenu(); gboolean systemmenu_changed(time_t btime); static void menu_create(plugin_instance *p); @@ -375,16 +363,18 @@ menu_destructor(plugin_instance *p) } -static plugin_class class = { - .count = 0, - .type = "menu", - .name = "Menu", - .version = "1.0", - .description = "Menu", - .priv_size = sizeof(menu_priv), +static menu_class class = { + .plugin = { + .count = 0, + .type = "menu", + .name = "Menu", + .version = "1.0", + .description = "Menu", + .priv_size = sizeof(menu_priv), - .constructor = menu_constructor, - .destructor = menu_destructor, + .constructor = menu_constructor, + .destructor = menu_destructor, + } }; static plugin_class *class_ptr = (plugin_class *) &class; diff --git a/plugins/menu/menu.h b/plugins/menu/menu.h new file mode 100644 index 0000000..f7b5429 --- /dev/null +++ b/plugins/menu/menu.h @@ -0,0 +1,26 @@ +#ifndef MENU_H +#define MENU_H + + +#include "plugin.h" +#include "panel.h" + +#define MENU_DEFAULT_ICON_SIZE 22 + +typedef struct { + plugin_instance plugin; + GtkWidget *menu, *bg; + int iconsize, paneliconsize; + xconf *xc; + guint tout, rtout; + gboolean has_system_menu; + time_t btime; + gint icon_size; +} menu_priv; + +typedef struct { + plugin_class plugin; +} menu_class; + + +#endif diff --git a/plugins/user/user.c b/plugins/user/user.c index cc6fa64..42b36f0 100644 --- a/plugins/user/user.c +++ b/plugins/user/user.c @@ -1,202 +1,36 @@ -#include "../chart/chart.h" +#include "../menu/menu.h" #include #include //#define DEBUGPRN #include "dbg.h" -#if defined(__FreeBSD__) -#include -#include -#include -#include -#include -#include -#endif - - -#define CHECK_PERIOD 2 /* second */ - -struct user_stat { - gulong tx, rx; -}; - typedef struct { - chart_priv chart; - struct user_stat user_prev; - int timer; - char *iface; -#if defined(__FreeBSD__) - size_t ifmib_row; -#endif - gint max_tx; - gint max_rx; - gulong max; - gchar *colors[2]; + menu_priv chart; + gint dummy; } user_priv; -static chart_class *k; +static menu_class *k; static void user_destructor(plugin_instance *p); -#if defined __linux__ - -#define init_user_stats(x) - -static int -user_get_load_real(user_priv *c, struct user_stat *user) -{ - FILE *stat; - char buf[256], *s = NULL; - - stat = fopen("/proc/net/dev", "r"); - if(!stat) - return -1; - if (fgets(buf, 256, stat)); - if (fgets(buf, 256, stat)); - - while (!s && !feof(stat) && fgets(buf, 256, stat)) - s = g_strrstr(buf, c->iface); - fclose(stat); - if (!s) - return -1; - s = g_strrstr(s, ":"); - if (!s) - return -1; - s++; - if (sscanf(s, - "%lu %*d %*d %*d %*d %*d %*d %*d %lu", - &user->rx, &user->tx)!= 2) { - DBG("can't read %s statistics\n", c->iface); - return -1; - } - return 0; -} - -#elif defined(__FreeBSD__) -static void -init_user_stats(user_priv *c) -{ - int mib[6] = { - CTL_NET, - PF_LINK, - NETLINK_GENERIC, - IFMIB_SYSTEM, - IFMIB_IFCOUNT - }; - u_int count = 0; - struct ifmibdata ifmd; - size_t len = sizeof(count); - - c->ifmib_row = 0; - if (sysctl(mib, 5, (void *)&count, &len, NULL, 0) != 0) - return; - - mib[3] = IFMIB_IFDATA; - mib[5] = IFDATA_GENERAL; - len = sizeof(ifmd); - for (mib[4] = 1; mib[4] <= count; mib[4]++) { - if (sysctl(mib, 6, (void *)&ifmd, &len, NULL, 0) != 0) - continue; - if (strcmp(ifmd.ifmd_name, c->iface) == 0) { - c->ifmib_row = mib[4]; - break; - } - } -} - -static int -user_get_load_real(user_priv *c, struct user_stat *user) -{ - int mib[6] = { - CTL_NET, - PF_LINK, - NETLINK_GENERIC, - IFMIB_IFDATA, - c->ifmib_row, - IFDATA_GENERAL - }; - struct ifmibdata ifmd; - size_t len = sizeof(ifmd); - - if (!c->ifmib_row) - return -1; - - if (sysctl(mib, sizeof(mib)/sizeof(mib[0]), &ifmd, &len, NULL, 0) != 0) - return -1; - - user->tx = ifmd.ifmd_data.ifi_obytes; - user->rx = ifmd.ifmd_data.ifi_ibytes; - return 0; -} - -#endif - -static int -user_get_load(user_priv *c) -{ - struct user_stat user, user_diff; - float total[2]; - char buf[256]; - - ENTER; - memset(&user, 0, sizeof(user)); - memset(&user_diff, 0, sizeof(user_diff)); - memset(&total, 0, sizeof(total)); - - if (user_get_load_real(c, &user)) - goto end; - - user_diff.tx = ((user.tx - c->user_prev.tx) >> 10) / CHECK_PERIOD; - user_diff.rx = ((user.rx - c->user_prev.rx) >> 10) / CHECK_PERIOD; - - c->user_prev = user; - total[0] = (float)(user_diff.tx) / c->max; - total[1] = (float)(user_diff.rx) / c->max; - -end: - DBG("%f %f %ul %ul\n", total[0], total[1], user_diff.tx, user_diff.rx); - k->add_tick(&c->chart, total); - g_snprintf(buf, sizeof(buf), "%s:\nD %lu Kbs, U %lu Kbs", - c->iface, user_diff.rx, user_diff.tx); - gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, buf); - RET(TRUE); -} - static int user_constructor(plugin_instance *p) { - user_priv *c; + user_priv *c G_GNUC_UNUSED = (user_priv *) p; - if (!(k = class_get("chart"))) + if (!(k = class_get("menu"))) RET(0); + // FIXME: if `gravatar` is set, download it and set `image` + // ... if (!PLUGIN_CLASS(k)->constructor(p)) RET(0); - c = (user_priv *) p; - - c->iface = "eth0"; - c->max_rx = 120; - c->max_tx = 12; - c->colors[0] = "violet"; - c->colors[1] = "blue"; - XCG(p->xc, "interface", &c->iface, str); - XCG(p->xc, "RxLimit", &c->max_rx, int); - XCG(p->xc, "TxLimit", &c->max_tx, int); - XCG(p->xc, "TxColor", &c->colors[0], str); - XCG(p->xc, "RxColor", &c->colors[1], str); - - init_user_stats(c); - - c->max = c->max_rx + c->max_tx; - k->set_rows(&c->chart, 2, c->colors); - gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, "User"); - user_get_load(c); - c->timer = g_timeout_add(CHECK_PERIOD * 1000, - (GSourceFunc) user_get_load, (gpointer) c); + + gtk_widget_set_tooltip_markup(p->pwid, "User"); RET(1); } @@ -204,13 +38,11 @@ user_constructor(plugin_instance *p) static void user_destructor(plugin_instance *p) { - user_priv *c = (user_priv *) p; + user_priv *c G_GNUC_UNUSED = (user_priv *) p; ENTER; - if (c->timer) - g_source_remove(c->timer); PLUGIN_CLASS(k)->destructor(p); - class_put("chart"); + class_put("menu"); RET(); } From e0ec989cb67d1aa8032ca1a14f323fcc2da94257 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 02:13:20 +0200 Subject: [PATCH 19/37] fix print in makefile [#11] --- .config/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/rules.mk b/.config/rules.mk index 77d2cf4..17e5bb1 100644 --- a/.config/rules.mk +++ b/.config/rules.mk @@ -267,7 +267,7 @@ install: endef % : %.in - @echo "TEXT $@" + @echo " TEXT $@" $Q$(TOPDIR)/repl.py < $^ > $@ From 08a7c4a86764ca87b72bb3d6c3aadb5575e65061 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 02:14:14 +0200 Subject: [PATCH 20/37] set `user` plugin default icon [#11] set `user` plugin default icon to `avatar-default` --- panel/xconf.h | 3 +++ plugins/user/Makefile | 8 ++++---- plugins/user/user.c | 9 ++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/panel/xconf.h b/panel/xconf.h index b63ad06..2b05a14 100644 --- a/panel/xconf.h +++ b/panel/xconf.h @@ -45,5 +45,8 @@ void xconf_set_enum(xconf *x, int val, xconf_enum *e); #define XCG(xc, name, var, type, extra...) \ xconf_get_ ## type(xconf_find(xc, name, 0), var, ## extra) +#define XCS(xc, name, var, type, extra...) \ + xconf_set_ ## type(xconf_get(xc, name), var, ## extra) + #endif diff --git a/plugins/user/Makefile b/plugins/user/Makefile index 0de8231..8025a41 100644 --- a/plugins/user/Makefile +++ b/plugins/user/Makefile @@ -2,9 +2,9 @@ TOPDIR := ../.. -net_src = user.c -net_cflags = -DPLUGIN $(GTK2_CFLAGS) -net_libs = $(GTK2_LIBS) -net_type = lib +user_src = user.c +user_cflags = -DPLUGIN $(GTK2_CFLAGS) +user_libs = $(GTK2_LIBS) +user_type = lib include $(TOPDIR)/.config/rules.mk diff --git a/plugins/user/user.c b/plugins/user/user.c index 42b36f0..56a260d 100644 --- a/plugins/user/user.c +++ b/plugins/user/user.c @@ -1,5 +1,5 @@ - +#include "misc.h" #include "../menu/menu.h" #include #include @@ -22,11 +22,18 @@ static int user_constructor(plugin_instance *p) { user_priv *c G_GNUC_UNUSED = (user_priv *) p; + gchar *image = NULL; + gchar *icon = NULL; if (!(k = class_get("menu"))) RET(0); // FIXME: if `gravatar` is set, download it and set `image` // ... + XCG(p->xc, "image", &image, str); + image = expand_tilda(image); + XCG(p->xc, "icon", &icon, str); + if (!(image || icon)) + XCS(p->xc, "icon", "avatar-default", value); if (!PLUGIN_CLASS(k)->constructor(p)) RET(0); From b8abac984e2499ff77773dcee144cae8305df6a3 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 02:18:01 +0200 Subject: [PATCH 21/37] update gitignore [#11] --- plugins/battery/.gitignore | 2 ++ plugins/user/.gitignore | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/battery/.gitignore b/plugins/battery/.gitignore index 77a32d7..45a985d 100644 --- a/plugins/battery/.gitignore +++ b/plugins/battery/.gitignore @@ -1,3 +1,5 @@ battery.o battery.d +power_supply.o +power_supply.d libbattery.so diff --git a/plugins/user/.gitignore b/plugins/user/.gitignore index 1d3635d..f220c49 100644 --- a/plugins/user/.gitignore +++ b/plugins/user/.gitignore @@ -1,3 +1,3 @@ user.o user.d -libnet.so +libuser.so From e58125296249685577b68e34d718f72044808916 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 03:44:30 +0200 Subject: [PATCH 22/37] gravatar fetch works [#11] --- panel/run.c | 29 ++++++++++++++++-- panel/run.h | 2 +- plugins/menu/menu.c | 1 + plugins/user/user.c | 73 +++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 98 insertions(+), 7 deletions(-) diff --git a/panel/run.c b/panel/run.c index 342c2a5..2d721b1 100644 --- a/panel/run.c +++ b/panel/run.c @@ -5,14 +5,14 @@ void run_app(gchar *cmd) { GError *error = NULL; - + ENTER; if (!cmd) RET(); - + if (!g_spawn_command_line_async(cmd, &error)) { - GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, + GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", error->message); @@ -22,3 +22,26 @@ run_app(gchar *cmd) } RET(); } + + +GPid +run_app_argv(gchar **argv) +{ + GError *error = NULL; + GSpawnFlags flags = G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH; + GPid pid; + + ENTER; + // flags |= G_SPAWN_STDOUT_TO_DEV_NULL; + if (!g_spawn_async(NULL, argv, NULL, flags, NULL, NULL, &pid, &error)) { + GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + "%s", error->message); + gtk_dialog_run(GTK_DIALOG(dialog)); + gtk_widget_destroy(dialog); + g_error_free(error); + } + + RET(pid); +} diff --git a/panel/run.h b/panel/run.h index 6093116..31c9979 100644 --- a/panel/run.h +++ b/panel/run.h @@ -4,6 +4,6 @@ #include void run_app(gchar *cmd); -void run_command(gchar *cmd); +GPid run_app_argv(gchar **argv); #endif diff --git a/plugins/menu/menu.c b/plugins/menu/menu.c index a45c00e..9e0183d 100644 --- a/plugins/menu/menu.c +++ b/plugins/menu/menu.c @@ -359,6 +359,7 @@ menu_destructor(plugin_instance *p) g_signal_handlers_disconnect_by_func(G_OBJECT(icon_theme), schedule_rebuild_menu, p); menu_destroy(m); + gtk_widget_destroy(m->bg); RET(); } diff --git a/plugins/user/user.c b/plugins/user/user.c index 56a260d..c1cfd50 100644 --- a/plugins/user/user.c +++ b/plugins/user/user.c @@ -1,15 +1,21 @@ #include "misc.h" +#include "run.h" #include "../menu/menu.h" #include #include +#include +#include -//#define DEBUGPRN + +#define DEBUGPRN #include "dbg.h" typedef struct { menu_priv chart; gint dummy; + guint sid; + GPid pid; } user_priv; static menu_class *k; @@ -17,6 +23,59 @@ static menu_class *k; static void user_destructor(plugin_instance *p); +#define GRAVATAR_LEN 300 + +static void +fetch_gravatar_done(GPid pid, gint status, gpointer data) +{ + user_priv *c G_GNUC_UNUSED = data; + plugin_instance *p G_GNUC_UNUSED = data; + // FIXME: select more secure path + gchar *image = "/tmp/gravatar"; + + ENTER; + DBG("status %d\n", status); + g_spawn_close_pid(c->pid); + c->pid = 0; + c->sid = 0; + + if (!status) { + DBG("rebuild menu\n"); + XCS(p->xc, "image", image, value); + // FIXME: should we unset "icon"? + XCS(p->xc, "icon", NULL, value); + PLUGIN_CLASS(k)->destructor(p); + PLUGIN_CLASS(k)->constructor(p); + } + RET(); +} + + +static gboolean +fetch_gravatar(gpointer data) +{ + user_priv *c G_GNUC_UNUSED = data; + plugin_instance *p G_GNUC_UNUSED = data; + GChecksum *cs; + gchar *gravatar = NULL; + gchar buf[GRAVATAR_LEN]; + // FIXME: select more secure path + gchar *image = "/tmp/gravatar"; + gchar *argv[] = { "wget", "-O", image, buf, NULL }; + + ENTER; + cs = g_checksum_new(G_CHECKSUM_MD5); + XCG(p->xc, "gravataremail", &gravatar, str); + g_checksum_update(cs, (guchar *) gravatar, -1); + snprintf(buf, sizeof(buf), "http://www.gravatar.com/avatar/%s", + g_checksum_get_string(cs)); + g_checksum_free(cs); + DBG("gravatar '%s'\n", buf); + c->pid = run_app_argv(argv); + c->sid = g_child_watch_add(c->pid, fetch_gravatar_done, data); + RET(FALSE); +} + static int user_constructor(plugin_instance *p) @@ -24,19 +83,23 @@ user_constructor(plugin_instance *p) user_priv *c G_GNUC_UNUSED = (user_priv *) p; gchar *image = NULL; gchar *icon = NULL; + gchar *gravatar = NULL; + ENTER; if (!(k = class_get("menu"))) RET(0); // FIXME: if `gravatar` is set, download it and set `image` // ... XCG(p->xc, "image", &image, str); - image = expand_tilda(image); XCG(p->xc, "icon", &icon, str); if (!(image || icon)) XCS(p->xc, "icon", "avatar-default", value); if (!PLUGIN_CLASS(k)->constructor(p)) RET(0); - + XCG(p->xc, "gravataremail", &gravatar, str); + DBG("gravatar email '%s'\n", gravatar); + if (gravatar) + g_timeout_add(300, fetch_gravatar, p); gtk_widget_set_tooltip_markup(p->pwid, "User"); RET(1); } @@ -49,6 +112,10 @@ user_destructor(plugin_instance *p) ENTER; PLUGIN_CLASS(k)->destructor(p); + if (c->pid) + kill(c->pid, SIGKILL); + if (c->sid) + g_source_remove(c->sid); class_put("menu"); RET(); } From 417dc130ed92a496864214e6ad038f0cbf7d5db7 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 04:05:40 +0200 Subject: [PATCH 23/37] hide wget stdout [#11] --- panel/run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/run.c b/panel/run.c index 2d721b1..4f3a676 100644 --- a/panel/run.c +++ b/panel/run.c @@ -32,7 +32,7 @@ run_app_argv(gchar **argv) GPid pid; ENTER; - // flags |= G_SPAWN_STDOUT_TO_DEV_NULL; + flags |= G_SPAWN_STDOUT_TO_DEV_NULL; if (!g_spawn_async(NULL, argv, NULL, flags, NULL, NULL, &pid, &error)) { GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, From 06dbbd9b8f4e8bfabc3eccef31772137f9a901b3 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 04:06:14 +0200 Subject: [PATCH 24/37] add `xconf_get_strdup` func [#11] --- panel/xconf.c | 7 +++++++ panel/xconf.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/panel/xconf.c b/panel/xconf.c index a207267..2b6a9c7 100644 --- a/panel/xconf.c +++ b/panel/xconf.c @@ -196,6 +196,13 @@ void xconf_get_str(xconf *x, gchar **val) } +void xconf_get_strdup(xconf *x, gchar **val) +{ + if (x && x->value) + *val = g_strdup(x->value); +} + + void xconf_get_int(xconf *x, int *val) { gchar *s; diff --git a/panel/xconf.h b/panel/xconf.h index 2b05a14..66e0c01 100644 --- a/panel/xconf.h +++ b/panel/xconf.h @@ -38,7 +38,7 @@ xconf *xconf_get(xconf *x, gchar *name); void xconf_get_int(xconf *x, int *val); void xconf_get_enum(xconf *x, int *val, xconf_enum *e); void xconf_get_str(xconf *x, gchar **val); - +void xconf_get_strdup(xconf *x, gchar **val); void xconf_set_int(xconf *x, int val); void xconf_set_enum(xconf *x, int val, xconf_enum *e); From 25aa3c4cbf8021c237c14d5d60bc6036884808d3 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 04:10:31 +0200 Subject: [PATCH 25/37] preserve old image value [#11] --- plugins/user/user.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/plugins/user/user.c b/plugins/user/user.c index c1cfd50..8854d62 100644 --- a/plugins/user/user.c +++ b/plugins/user/user.c @@ -31,7 +31,7 @@ fetch_gravatar_done(GPid pid, gint status, gpointer data) user_priv *c G_GNUC_UNUSED = data; plugin_instance *p G_GNUC_UNUSED = data; // FIXME: select more secure path - gchar *image = "/tmp/gravatar"; + gchar *image, *icon; ENTER; DBG("status %d\n", status); @@ -39,13 +39,22 @@ fetch_gravatar_done(GPid pid, gint status, gpointer data) c->pid = 0; c->sid = 0; - if (!status) { - DBG("rebuild menu\n"); + if (status) + RET(); + DBG("rebuild menu\n"); + XCG(p->xc, "icon", &icon, strdup); + XCG(p->xc, "image", &image, strdup); + XCS(p->xc, "image", image, value); + xconf_del(xconf_find(p->xc, "icon", 0), FALSE); + PLUGIN_CLASS(k)->destructor(p); + PLUGIN_CLASS(k)->constructor(p); + if (image) { XCS(p->xc, "image", image, value); - // FIXME: should we unset "icon"? - XCS(p->xc, "icon", NULL, value); - PLUGIN_CLASS(k)->destructor(p); - PLUGIN_CLASS(k)->constructor(p); + g_free(image); + } + if (icon) { + XCS(p->xc, "icon", icon, value); + g_free(icon); } RET(); } @@ -61,7 +70,7 @@ fetch_gravatar(gpointer data) gchar buf[GRAVATAR_LEN]; // FIXME: select more secure path gchar *image = "/tmp/gravatar"; - gchar *argv[] = { "wget", "-O", image, buf, NULL }; + gchar *argv[] = { "wget", "-q", "-O", image, buf, NULL }; ENTER; cs = g_checksum_new(G_CHECKSUM_MD5); @@ -88,8 +97,6 @@ user_constructor(plugin_instance *p) ENTER; if (!(k = class_get("menu"))) RET(0); - // FIXME: if `gravatar` is set, download it and set `image` - // ... XCG(p->xc, "image", &image, str); XCG(p->xc, "icon", &icon, str); if (!(image || icon)) From c1f3bb4df84cf13a553c174697d851019f88e784 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 04:26:53 +0200 Subject: [PATCH 26/37] add `border` param to menu config [#11] --- plugins/menu/menu.c | 6 ++++-- plugins/user/user.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/menu/menu.c b/plugins/menu/menu.c index 9e0183d..93bfa3b 100644 --- a/plugins/menu/menu.c +++ b/plugins/menu/menu.c @@ -262,19 +262,21 @@ make_button(plugin_instance *p, xconf *xc) int w, h; menu_priv *m; gchar *fname, *iname; + int border; ENTER; m = (menu_priv *) p; + XCG(xc, "border", &border, int); /* XXX: this code is duplicated in every plugin. * Lets run it once in a panel */ if (p->panel->orientation == GTK_ORIENTATION_HORIZONTAL) { w = -1; - h = p->panel->max_elem_height; + h = p->panel->max_elem_height - border; } else { - w = p->panel->max_elem_height; + w = p->panel->max_elem_height - border; h = -1; } fname = iname = NULL; diff --git a/plugins/user/user.c b/plugins/user/user.c index 8854d62..26a0f43 100644 --- a/plugins/user/user.c +++ b/plugins/user/user.c @@ -31,7 +31,7 @@ fetch_gravatar_done(GPid pid, gint status, gpointer data) user_priv *c G_GNUC_UNUSED = data; plugin_instance *p G_GNUC_UNUSED = data; // FIXME: select more secure path - gchar *image, *icon; + gchar *image = NULL, *icon = NULL; ENTER; DBG("status %d\n", status); From 5a370053e6a1a1d914f7918d9db2ec63e931231d Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 04:47:44 +0200 Subject: [PATCH 27/37] Revert "add `border` param to menu config" This reverts commit c1f3bb4df84cf13a553c174697d851019f88e784. --- plugins/menu/menu.c | 6 ++---- plugins/user/user.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/menu/menu.c b/plugins/menu/menu.c index 93bfa3b..9e0183d 100644 --- a/plugins/menu/menu.c +++ b/plugins/menu/menu.c @@ -262,21 +262,19 @@ make_button(plugin_instance *p, xconf *xc) int w, h; menu_priv *m; gchar *fname, *iname; - int border; ENTER; m = (menu_priv *) p; - XCG(xc, "border", &border, int); /* XXX: this code is duplicated in every plugin. * Lets run it once in a panel */ if (p->panel->orientation == GTK_ORIENTATION_HORIZONTAL) { w = -1; - h = p->panel->max_elem_height - border; + h = p->panel->max_elem_height; } else { - w = p->panel->max_elem_height - border; + w = p->panel->max_elem_height; h = -1; } fname = iname = NULL; diff --git a/plugins/user/user.c b/plugins/user/user.c index 26a0f43..8854d62 100644 --- a/plugins/user/user.c +++ b/plugins/user/user.c @@ -31,7 +31,7 @@ fetch_gravatar_done(GPid pid, gint status, gpointer data) user_priv *c G_GNUC_UNUSED = data; plugin_instance *p G_GNUC_UNUSED = data; // FIXME: select more secure path - gchar *image = NULL, *icon = NULL; + gchar *image, *icon; ENTER; DBG("status %d\n", status); From c9ee7deeb97954ecbc6df32d2b54b709a4f2d17d Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 04:55:03 +0200 Subject: [PATCH 28/37] use `-g3` gcc debug option [#11] --- .config/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/rules.mk b/.config/rules.mk index 17e5bb1..bacca3d 100644 --- a/.config/rules.mk +++ b/.config/rules.mk @@ -162,7 +162,7 @@ CFLAGS = -O0 -Wall -Werror endif endif ifneq ($(origin DEBUG),undefined) -override CFLAGS += -g +override CFLAGS += -g3 endif override CFLAGS += -I$(TOPDIR) $(CFLAGS_EXTRA) From 33cb6252fcb453f6a9c5b20e350b46e96b42e8c5 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 04:55:28 +0200 Subject: [PATCH 29/37] init pointers in user plugin [#11] --- plugins/user/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/user/user.c b/plugins/user/user.c index 8854d62..26a0f43 100644 --- a/plugins/user/user.c +++ b/plugins/user/user.c @@ -31,7 +31,7 @@ fetch_gravatar_done(GPid pid, gint status, gpointer data) user_priv *c G_GNUC_UNUSED = data; plugin_instance *p G_GNUC_UNUSED = data; // FIXME: select more secure path - gchar *image, *icon; + gchar *image = NULL, *icon = NULL; ENTER; DBG("status %d\n", status); From da023a356d9422d4a0d7c4df6f63175c350d2b01 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 05:07:08 +0200 Subject: [PATCH 30/37] remove debug output --- plugins/user/user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/user/user.c b/plugins/user/user.c index 26a0f43..0395677 100644 --- a/plugins/user/user.c +++ b/plugins/user/user.c @@ -8,7 +8,7 @@ #include -#define DEBUGPRN +//#define DEBUGPRN #include "dbg.h" typedef struct { From 0d19b60704b5ab6d31f7f0db274508d7740284b4 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 05:08:15 +0200 Subject: [PATCH 31/37] update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d78c3..2b031e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,14 @@ ## Version: develop -Date: 2015-12-04 21:50:28 +Date: 2015-12-05 05:07:08 + * [#11] new plugin: user menu with gravatar icon * [#8] Fix for issue #5 (make battery plugin work with /sys) * [#6] Rounded corners don't work with widthtype=request * [#5] make battery plugin work with /sys * [#2] Include option for vertical (y) and horizontal (x) margin +[#11]: https://github.com/aanatoly/fbpanel/issues/11 [#8]: https://github.com/aanatoly/fbpanel/pull/8 [#6]: https://github.com/aanatoly/fbpanel/issues/6 [#5]: https://github.com/aanatoly/fbpanel/issues/5 From 123fa896a62af089a3271c13057f56ba9201743f Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 05:10:22 +0200 Subject: [PATCH 32/37] rm obsolete comment --- plugins/user/user.c | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/user/user.c b/plugins/user/user.c index 0395677..62b4ff7 100644 --- a/plugins/user/user.c +++ b/plugins/user/user.c @@ -30,7 +30,6 @@ fetch_gravatar_done(GPid pid, gint status, gpointer data) { user_priv *c G_GNUC_UNUSED = data; plugin_instance *p G_GNUC_UNUSED = data; - // FIXME: select more secure path gchar *image = NULL, *icon = NULL; ENTER; From 41b340a1b86a136ae244765f529985700d6cd032 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 07:38:59 +0200 Subject: [PATCH 33/37] position menu near widget edge [closes #12] --- panel/misc.c | 76 ++++++++++++++++++++------------------- plugins/taskbar/taskbar.c | 5 +-- 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/panel/misc.c b/panel/misc.c index 63430d8..2a0e0d7 100644 --- a/panel/misc.c +++ b/panel/misc.c @@ -705,50 +705,54 @@ gdk_color_to_RRGGBB(GdkColor *color) void menu_pos(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, GtkWidget *widget) { - int ox, oy, w, h; + int w, h; ENTER; - if (widget) { - gdk_window_get_origin(widget->window, &ox, &oy); - ox += widget->allocation.x; - oy += widget->allocation.y; - } else { - gdk_display_get_pointer(gdk_display_get_default(), NULL, &ox, &oy, NULL); - ox -= 20; - if (ox < 0) - ox = 0; - oy -= 10; - if (oy < 0) - oy = 0; + *push_in = TRUE; + if (!widget) { + gdk_display_get_pointer(gdk_display_get_default(), NULL, x, y, NULL); + DBG("mouse pos: x %d, y %d\n", *x, *y); + DBG("menu pos: x %d, y %d\n", *x, *y); + RET(); } - w = GTK_WIDGET(menu)->requisition.width; - h = GTK_WIDGET(menu)->requisition.height; - if (the_panel->orientation == GTK_ORIENTATION_HORIZONTAL) { - // x - *x = ox; - if (*x + w > gdk_screen_width()) - *x = gdk_screen_width() - w; - // y - if (the_panel->edge == EDGE_TOP) - *y = the_panel->ah; - else - *y = gdk_screen_height() - the_panel->ah - h; + DBG("widget: x %d, y %d, w %d, h %d\n", + widget->allocation.x, + widget->allocation.y, + widget->allocation.width, + widget->allocation.height); + gdk_window_get_origin(widget->window, x, y); + DBG("window pos: x %d, y %d\n", *x, *y); + DBG("edge: %s\n", num2str(edge_enum, the_panel->edge, "xz")); + if (the_panel->edge == EDGE_TOP) { + *y += widget->allocation.height; + *y += widget->allocation.y; + *x += widget->allocation.x; + } else if (the_panel->edge == EDGE_LEFT) { + *x += widget->allocation.width; + *y += widget->allocation.y; + *x += widget->allocation.x; } else { - // x - if (the_panel->edge == EDGE_LEFT) - *x = the_panel->aw; - else - *x = gdk_screen_width() - the_panel->aw - w; - // y - *y = oy; - if (*y + h > gdk_screen_height()) - *y = gdk_screen_height() - h; + w = GTK_WIDGET(menu)->requisition.width; + h = GTK_WIDGET(menu)->requisition.height; + if (the_panel->edge == EDGE_BOTTOM) { + *x += widget->allocation.x; + *y += widget->allocation.y; + *y -= h; + if (*y < 0) + *y = 0; + } else if (the_panel->edge == EDGE_RIGHT) { + *y += widget->allocation.y; + *x -= w; + *x -= widget->allocation.x; + if (*x < 0) + *x = 0; + } } - DBG("w-h %d %d\n", w, h); - *push_in = TRUE; + DBG("menu pos: x %d, y %d\n", *x, *y); RET(); } + gchar * indent(int level) { diff --git a/plugins/taskbar/taskbar.c b/plugins/taskbar/taskbar.c index 507615f..be81796 100644 --- a/plugins/taskbar/taskbar.c +++ b/plugins/taskbar/taskbar.c @@ -847,10 +847,7 @@ tk_callback_button_release_event(GtkWidget *widget, GdkEventButton *event, */ tk->tb->menutask = tk; gtk_menu_popup (GTK_MENU (tk->tb->menu), NULL, NULL, - (GtkMenuPositionFunc)menu_pos, - tk->tb->plugin.panel->orientation == GTK_ORIENTATION_HORIZONTAL - ? NULL : widget, - event->button, event->time); + (GtkMenuPositionFunc)menu_pos, widget, event->button, event->time); } gtk_button_released(GTK_BUTTON(widget)); From 3b5ab39027d9c6d242b961de06b0a2b115e5fbe6 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 07:43:37 +0200 Subject: [PATCH 34/37] whitespace cleanup --- panel/bg.c | 16 +++++------ panel/ev.c | 20 ++++++------- panel/gconf.c | 24 ++++++++-------- panel/gconf_panel.c | 66 +++++++++++++++++++++---------------------- panel/gconf_plugins.c | 18 ++++++------ panel/gtkbar.c | 18 ++++++------ panel/gtkbar.h | 2 +- panel/gtkbgbox.c | 42 +++++++++++++-------------- panel/gtkbgbox.h | 2 +- panel/misc.c | 32 ++++++++++----------- panel/misc.h | 2 +- panel/panel.c | 36 +++++++++++------------ panel/panel.h | 4 +-- panel/plugin.h | 12 ++++---- panel/xconf.c | 14 ++++----- 15 files changed, 154 insertions(+), 154 deletions(-) diff --git a/panel/bg.c b/panel/bg.c index 70b7bbf..e22431b 100644 --- a/panel/bg.c +++ b/panel/bg.c @@ -101,7 +101,7 @@ fb_bg_class_init (FbBgClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); ENTER; - signals [CHANGED] = + signals [CHANGED] = g_signal_new ("changed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, @@ -154,7 +154,7 @@ fb_bg_finalize (GObject *object) bg = FB_BG (object); XFreeGC(bg->dpy, bg->gc); default_bg = NULL; - + RET(); } @@ -190,7 +190,7 @@ fb_bg_get_xrootpmap_real(FbBg *bg) ret = *((Pixmap *)prop); c = -c ; //to quit loop } - XFree(prop); + XFree(prop); } } while (--c > 0); } @@ -206,7 +206,7 @@ fb_bg_get_xroot_pix_for_area(FbBg *bg, gint x, gint y, { GdkPixmap *gbgpix; Pixmap bgpix; - + ENTER; if (bg->pixmap == None) RET(NULL); @@ -235,7 +235,7 @@ fb_bg_get_xroot_pix_for_win(FbBg *bg, GtkWidget *widget) if (bg->pixmap == None) RET(NULL); - win = GDK_WINDOW_XWINDOW(widget->window); + win = GDK_WINDOW_XWINDOW(widget->window); if (!XGetGeometry(bg->dpy, win, &dummy, &x, &y, &width, &height, &border, &depth)) { DBG2("XGetGeometry failed\n"); @@ -263,7 +263,7 @@ fb_bg_composite(GdkDrawable *base, GdkGC *gc, guint32 tintcolor, gint alpha) GdkPixbuf *ret, *ret2; int w, h; static GdkColormap *cmap = NULL; - + ENTER; gdk_drawable_get_size (base, &w, &h); if (!cmap) { @@ -274,7 +274,7 @@ fb_bg_composite(GdkDrawable *base, GdkGC *gc, guint32 tintcolor, gint alpha) if (!ret) RET(); DBG("here w=%d h=%d\n", w, h); - ret2 = gdk_pixbuf_composite_color_simple(ret, w, h, + ret2 = gdk_pixbuf_composite_color_simple(ret, w, h, GDK_INTERP_HYPER, 255-alpha, MIN(w, h), tintcolor, tintcolor); DBG("here\n"); if (!ret2) { @@ -297,7 +297,7 @@ fb_bg_changed(FbBg *bg) bg->pixmap = fb_bg_get_xrootpmap_real(bg); if (bg->pixmap != None) { XGCValues gcv; - + gcv.tile = bg->pixmap; XChangeGC(bg->dpy, bg->gc, GCTile, &gcv); DBG("changed\n"); diff --git a/panel/ev.c b/panel/ev.c index f75e8dd..b240560 100644 --- a/panel/ev.c +++ b/panel/ev.c @@ -59,7 +59,7 @@ struct _FbEv { Window active_window; Window *client_list; Window *client_list_stacking; - + Window xroot; Atom id; GC gc; @@ -113,7 +113,7 @@ fb_ev_class_init (FbEvClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - signals [EV_CURRENT_DESKTOP] = + signals [EV_CURRENT_DESKTOP] = g_signal_new ("current_desktop", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, @@ -121,7 +121,7 @@ fb_ev_class_init (FbEvClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - signals [EV_NUMBER_OF_DESKTOPS] = + signals [EV_NUMBER_OF_DESKTOPS] = g_signal_new ("number_of_desktops", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, @@ -129,7 +129,7 @@ fb_ev_class_init (FbEvClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - signals [EV_DESKTOP_NAMES] = + signals [EV_DESKTOP_NAMES] = g_signal_new ("desktop_names", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, @@ -137,7 +137,7 @@ fb_ev_class_init (FbEvClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - signals [EV_ACTIVE_WINDOW] = + signals [EV_ACTIVE_WINDOW] = g_signal_new ("active_window", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, @@ -145,7 +145,7 @@ fb_ev_class_init (FbEvClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - signals [EV_CLIENT_LIST_STACKING] = + signals [EV_CLIENT_LIST_STACKING] = g_signal_new ("client_list_stacking", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, @@ -153,7 +153,7 @@ fb_ev_class_init (FbEvClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - signals [EV_CLIENT_LIST] = + signals [EV_CLIENT_LIST] = g_signal_new ("client_list", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, @@ -274,11 +274,11 @@ fb_ev_current_desktop(FbEv *ev) ev->current_desktop = *data; XFree (data); } else - ev->current_desktop = 0; + ev->current_desktop = 0; } RET(ev->current_desktop); } - + int fb_ev_number_of_desktops(FbEv *ev) { @@ -291,7 +291,7 @@ fb_ev_number_of_desktops(FbEv *ev) ev->number_of_desktops = *data; XFree (data); } else - ev->number_of_desktops = 0; + ev->number_of_desktops = 0; } RET(ev->number_of_desktops); diff --git a/panel/gconf.c b/panel/gconf.c index a41c0e9..6d0c85c 100644 --- a/panel/gconf.c +++ b/panel/gconf.c @@ -25,7 +25,7 @@ gconf_block_new(GCallback cb, gpointer data, int indent) gtk_widget_set_size_request(w, indent, -1); gtk_box_pack_start(GTK_BOX(b->main), w, FALSE, FALSE, 0); } - + /* area */ w = gtk_vbox_new(FALSE, 2); gtk_box_pack_start(GTK_BOX(b->main), w, FALSE, FALSE, 0); @@ -47,11 +47,11 @@ void gconf_block_add(gconf_block *b, GtkWidget *w, gboolean new_row) { GtkWidget *hbox; - + if (!b->rows || new_row) { GtkWidget *s; - + new_row = TRUE; hbox = gtk_hbox_new(FALSE, 8); b->rows = g_slist_prepend(b->rows, hbox); @@ -80,7 +80,7 @@ static void gconf_edit_int_cb(GtkSpinButton *w, xconf *xc) { int i; - + i = (int) gtk_spin_button_get_value(w); xconf_set_int(xc, i); } @@ -112,7 +112,7 @@ static void gconf_edit_enum_cb(GtkComboBox *w, xconf *xc) { int i; - + i = gtk_combo_box_get_active(w); DBG("%s=%d\n", xc->name, i); xconf_set_enum(xc, i, g_object_get_data(G_OBJECT(w), "enum")); @@ -153,7 +153,7 @@ static void gconf_edit_bool_cb(GtkToggleButton *w, xconf *xc) { int i; - + i = gtk_toggle_button_get_active(w); DBG("%s=%d\n", xc->name, i); xconf_set_enum(xc, i, bool_enum); @@ -169,7 +169,7 @@ gconf_edit_boolean(gconf_block *b, xconf *xc, gchar *text) xconf_set_enum(xc, i, bool_enum); w = gtk_check_button_new_with_label(text); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(w), i); - + g_signal_connect(G_OBJECT(w), "toggled", G_CALLBACK(gconf_edit_bool_cb), xc); if (b && b->cb) @@ -190,7 +190,7 @@ gconf_edit_color_cb(GtkColorButton *w, xconf *xc) { GdkColor c; xconf *xc_alpha; - + gtk_color_button_get_color(GTK_COLOR_BUTTON(w), &c); xconf_set_value(xc, gdk_color_to_RRGGBB(&c)); if ((xc_alpha = g_object_get_data(G_OBJECT(w), "alpha"))) @@ -204,18 +204,18 @@ gconf_edit_color_cb(GtkColorButton *w, xconf *xc) GtkWidget * gconf_edit_color(gconf_block *b, xconf *xc_color, xconf *xc_alpha) { - + GtkWidget *w; GdkColor c; gdk_color_parse(xconf_get_value(xc_color), &c); - + w = gtk_color_button_new(); gtk_color_button_set_color(GTK_COLOR_BUTTON(w), &c); if (xc_alpha) { gint a; - + xconf_get_int(xc_alpha, &a); a <<= 8; /* scale to 0..FFFF from 0..FF */ gtk_color_button_set_alpha(GTK_COLOR_BUTTON(w), (guint16) a); @@ -223,7 +223,7 @@ gconf_edit_color(gconf_block *b, xconf *xc_color, xconf *xc_alpha) } gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(w), xc_alpha != NULL); - + g_signal_connect(G_OBJECT(w), "color-set", G_CALLBACK(gconf_edit_color_cb), xc_color); if (b && b->cb) diff --git a/panel/gconf_panel.c b/panel/gconf_panel.c index 6863a7b..25d55cc 100644 --- a/panel/gconf_panel.c +++ b/panel/gconf_panel.c @@ -31,7 +31,7 @@ static void effects_changed(gconf_block *b) { int i; - + ENTER; XCG(b->data, "transparent", &i, enum, bool_enum); gtk_widget_set_sensitive(color_block->main, i); @@ -48,7 +48,7 @@ static void mk_effects_block(xconf *xc) { GtkWidget *w; - + ENTER; /* label */ @@ -71,7 +71,7 @@ mk_effects_block(xconf *xc) w = gconf_edit_color(color_block, xconf_get(xc, "tintcolor"), xconf_get(xc, "alpha")); gconf_block_add(color_block, w, FALSE); - + gconf_block_add(effects_block, color_block->main, TRUE); /* round corners */ @@ -101,12 +101,12 @@ mk_effects_block(xconf *xc) w = gtk_label_new(_("pixels")); gconf_block_add(ah_block, w, FALSE); gconf_block_add(effects_block, ah_block->main, TRUE); - + w = gconf_edit_int(effects_block, xconf_get(xc, "maxelemheight"), 0, 128); gconf_block_add(effects_block, gtk_label_new(_("Max Element Height")), TRUE); gconf_block_add(effects_block, w, FALSE); gconf_block_add(gl_block, effects_block->main, TRUE); - + /* empty row */ gconf_block_add(gl_block, gtk_label_new(" "), TRUE); } @@ -118,18 +118,18 @@ static void prop_changed(gconf_block *b) { int i = 0; - + ENTER; XCG(b->data, "setlayer", &i, enum, bool_enum); gtk_widget_set_sensitive(layer_block->main, i); RET(); } - + static void mk_prop_block(xconf *xc) { GtkWidget *w; - + ENTER; /* label */ @@ -141,15 +141,15 @@ mk_prop_block(xconf *xc) /* properties */ prop_block = gconf_block_new((GCallback)prop_changed, xc, 10); - /* strut */ + /* strut */ w = gconf_edit_boolean(prop_block, xconf_get(xc, "setpartialstrut"), _("Do not cover by maximized windows")); gconf_block_add(prop_block, w, TRUE); - + w = gconf_edit_boolean(prop_block, xconf_get(xc, "setdocktype"), _("Set 'Dock' type")); gconf_block_add(prop_block, w, TRUE); - + /* set layer */ w = gconf_edit_boolean(prop_block, xconf_get(xc, "setlayer"), _("Set stacking layer")); @@ -165,9 +165,9 @@ mk_prop_block(xconf *xc) gconf_block_add(layer_block, w, FALSE); gconf_block_add(prop_block, layer_block->main, TRUE); - + gconf_block_add(gl_block, prop_block->main, TRUE); - + /* empty row */ gconf_block_add(gl_block, gtk_label_new(" "), TRUE); } @@ -179,7 +179,7 @@ static void geom_changed(gconf_block *b) { int i, j; - + ENTER; i = gtk_combo_box_get_active(GTK_COMBO_BOX(allign_opt)); gtk_widget_set_sensitive(xmargin_spin, (i != ALLIGN_CENTER)); @@ -195,12 +195,12 @@ geom_changed(gconf_block *b) } RET(); } - + static void mk_geom_block(xconf *xc) { GtkWidget *w; - + ENTER; /* label */ @@ -211,17 +211,17 @@ mk_geom_block(xconf *xc) /* geometry */ geom_block = gconf_block_new((GCallback)geom_changed, xc, 10); - + w = gconf_edit_int(geom_block, xconf_get(xc, "width"), 0, 2300); gconf_block_add(geom_block, gtk_label_new(_("Width")), TRUE); gconf_block_add(geom_block, w, FALSE); width_spin = w; - + w = gconf_edit_enum(geom_block, xconf_get(xc, "widthtype"), widthtype_enum); gconf_block_add(geom_block, w, FALSE); width_opt = w; - + w = gconf_edit_int(geom_block, xconf_get(xc, "height"), 0, 300); gconf_block_add(geom_block, gtk_label_new(_("Height")), TRUE); gconf_block_add(geom_block, w, FALSE); @@ -236,7 +236,7 @@ mk_geom_block(xconf *xc) gconf_block_add(geom_block, gtk_label_new(_("Allignment")), TRUE); gconf_block_add(geom_block, w, FALSE); allign_opt = w; - + w = gconf_edit_int(geom_block, xconf_get(xc, "xmargin"), 0, 300); gconf_block_add(geom_block, gtk_label_new(_("X Margin")), TRUE); gconf_block_add(geom_block, w, FALSE); @@ -252,12 +252,12 @@ mk_geom_block(xconf *xc) /* empty row */ gconf_block_add(gl_block, gtk_label_new(" "), TRUE); } - + static GtkWidget * mk_tab_global(xconf *xc) { GtkWidget *page; - + ENTER; page = gtk_vbox_new(FALSE, 1); gtk_container_set_border_width(GTK_CONTAINER(page), 10); @@ -269,11 +269,11 @@ mk_tab_global(xconf *xc) mk_effects_block(xc); gtk_widget_show_all(page); - + geom_changed(geom_block); effects_changed(effects_block); prop_changed(prop_block); - + RET(page); } @@ -282,19 +282,19 @@ mk_tab_profile(xconf *xc) { GtkWidget *page, *label; gchar *s1; - + ENTER; page = gtk_vbox_new(FALSE, 1); gtk_container_set_border_width(GTK_CONTAINER(page), 10); - + s1 = g_strdup_printf(_("You're using '%s' profile, stored at\n" "%s"), panel_get_profile(), panel_get_profile_file()); label = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(label), s1); gtk_box_pack_start(GTK_BOX(page), label, FALSE, TRUE, 0); g_free(s1); - - gtk_widget_show_all(page); + + gtk_widget_show_all(page); RET(page); } @@ -302,7 +302,7 @@ static void dialog_response_event(GtkDialog *_dialog, gint rid, xconf *xc) { xconf *oxc = g_object_get_data(G_OBJECT(dialog), "oxc"); - + ENTER; if (rid == GTK_RESPONSE_APPLY || rid == GTK_RESPONSE_OK) @@ -350,7 +350,7 @@ mk_dialog(xconf *oxc) GtkWidget *sw, *nb, *label; gchar *name; xconf *xc; - + ENTER; DBG("creating dialog\n"); //name = g_strdup_printf("fbpanel settings: <%s> profile", cprofile); @@ -372,7 +372,7 @@ mk_dialog(xconf *oxc) xc = xconf_dup(oxc); g_object_set_data(G_OBJECT(dialog), "oxc", xc); xc = xconf_dup(oxc); - + g_signal_connect (G_OBJECT(dialog), "response", (GCallback) dialog_response_event, xc); // g_signal_connect (G_OBJECT(dialog), "destroy", @@ -384,7 +384,7 @@ mk_dialog(xconf *oxc) gtk_window_set_default_size(GTK_WINDOW(dialog), 400, 500); gtk_window_set_icon_from_file(GTK_WINDOW(dialog), IMGPREFIX "/logo.png", NULL); - + nb = gtk_notebook_new(); gtk_notebook_set_show_border (GTK_NOTEBOOK(nb), FALSE); gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), nb); @@ -413,7 +413,7 @@ configure(xconf *xc) { ENTER; DBG("dialog %p\n", dialog); - if (!dialog) + if (!dialog) dialog = mk_dialog(xc); gtk_widget_show(dialog); RET(); diff --git a/panel/gconf_plugins.c b/panel/gconf_plugins.c index a8be874..408359e 100644 --- a/panel/gconf_plugins.c +++ b/panel/gconf_plugins.c @@ -24,12 +24,12 @@ mk_model(xconf *xc) xconf *pxc; int i; gchar *type; - + store = gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); for (i = 0; (pxc = xconf_find(xc, "plugin", i)); i++) { XCG(pxc, "type", &type, str); - gtk_tree_store_append(store, &iter, NULL); + gtk_tree_store_append(store, &iter, NULL); gtk_tree_store_set (store, &iter, TYPE_COL, type, NAME_COL, "Martin Heidegger", @@ -61,7 +61,7 @@ mk_view() GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *select; - + tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes("Type", @@ -81,7 +81,7 @@ mk_buttons() GtkWidget *bm, *b, *w; bm = gtk_hbox_new(FALSE, 3); - + w = gtk_button_new_from_stock(GTK_STOCK_ADD); gtk_box_pack_start(GTK_BOX(bm), w, FALSE, TRUE, 0); @@ -89,7 +89,7 @@ mk_buttons() gtk_box_pack_start(GTK_BOX(bm), b, FALSE, TRUE, 0); bbox = b; gtk_widget_set_sensitive(bbox, FALSE); - + w = gtk_button_new_from_stock(GTK_STOCK_EDIT); gtk_box_pack_start(GTK_BOX(b), w, FALSE, TRUE, 0); w = gtk_button_new_from_stock(GTK_STOCK_DELETE); @@ -106,18 +106,18 @@ GtkWidget * mk_tab_plugins(xconf *xc) { GtkWidget *page, *w; - + ENTER; page = gtk_vbox_new(FALSE, 1); gtk_container_set_border_width(GTK_CONTAINER(page), 10); mk_model(xc); - + w = mk_view(); gtk_box_pack_start(GTK_BOX(page), w, TRUE, TRUE, 0); w = mk_buttons(); gtk_box_pack_start(GTK_BOX(page), w, FALSE, TRUE, 0); - - gtk_widget_show_all(page); + + gtk_widget_show_all(page); RET(page); } diff --git a/panel/gtkbar.c b/panel/gtkbar.c index 8d285cc..74369f1 100644 --- a/panel/gtkbar.c +++ b/panel/gtkbar.c @@ -21,7 +21,7 @@ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #include "gtkbar.h" @@ -119,7 +119,7 @@ gtk_bar_size_request(GtkWidget *widget, GtkRequisition *requisition) GtkBoxChild *child; GList *children; gint nvis_children, rows, cols, dim; - + nvis_children = 0; children = box->children; while (children) { @@ -128,9 +128,9 @@ gtk_bar_size_request(GtkWidget *widget, GtkRequisition *requisition) if (GTK_WIDGET_VISIBLE(child->widget)) { GtkRequisition child_requisition; - + /* Do not remove child request !!! Label's proper layout depends - * on request running before alloc. */ + * on request running before alloc. */ gtk_widget_size_request(child->widget, &child_requisition); nvis_children++; } @@ -149,7 +149,7 @@ gtk_bar_size_request(GtkWidget *widget, GtkRequisition *requisition) cols = dim; rows = (gint) ceilf((float) nvis_children / cols); } - + requisition->width = bar->child_width * cols + box->spacing * (cols - 1); requisition->height = bar->child_height * rows @@ -178,7 +178,7 @@ gtk_bar_size_allocate(GtkWidget *widget, GtkAllocation *allocation) while (children) { child = children->data; children = children->next; - + if (GTK_WIDGET_VISIBLE (child->widget)) nvis_children += 1; } @@ -206,7 +206,7 @@ gtk_bar_size_allocate(GtkWidget *widget, GtkAllocation *allocation) DBG("child alloc: width=%d height=%d\n", child_allocation.width, child_allocation.height); - + child_allocation.x = allocation->x; child_allocation.y = allocation->y; children = box->children; @@ -214,7 +214,7 @@ gtk_bar_size_allocate(GtkWidget *widget, GtkAllocation *allocation) while (children) { child = children->data; children = children->next; - + if (GTK_WIDGET_VISIBLE (child->widget)) { DBG("allocate x=%d y=%d\n", child_allocation.x, child_allocation.y); @@ -241,7 +241,7 @@ gtk_bar_expose (GtkWidget *widget, GdkEventExpose *event) if (GTK_WIDGET_DRAWABLE (widget)) { int w, h; - + DBG("w, h = %d,%d\n", w, h); if (!GTK_WIDGET_APP_PAINTABLE (widget)) gtk_paint_flat_box (widget->style, widget->window, diff --git a/panel/gtkbar.h b/panel/gtkbar.h index 5698026..7e0f3f5 100644 --- a/panel/gtkbar.h +++ b/panel/gtkbar.h @@ -21,7 +21,7 @@ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #ifndef __GTK_BAR_H__ diff --git a/panel/gtkbgbox.c b/panel/gtkbgbox.c index 166d416..29a24cc 100644 --- a/panel/gtkbgbox.c +++ b/panel/gtkbgbox.c @@ -21,7 +21,7 @@ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #include @@ -61,7 +61,7 @@ static gboolean gtk_bgbox_configure_event(GtkWidget *widget, GdkEventConfigure * #if 0 static gboolean gtk_bgbox_destroy_event (GtkWidget *widget, GdkEventAny *event); static gboolean gtk_bgbox_delete_event (GtkWidget *widget, GdkEventAny *event); -#endif +#endif static void gtk_bgbox_finalize (GObject *object); @@ -125,7 +125,7 @@ gtk_bgbox_init (GtkBgbox *bgbox) ENTER; GTK_WIDGET_UNSET_FLAGS (bgbox, GTK_NO_WINDOW); - + priv = GTK_BGBOX_GET_PRIVATE (bgbox); priv->bg_type = BG_NONE; priv->sid = 0; @@ -161,19 +161,19 @@ gtk_bgbox_finalize (GObject *object) RET(); } -static GdkFilterReturn +static GdkFilterReturn gtk_bgbox_event_filter(GdkXEvent *xevent, GdkEvent *event, GtkWidget *widget) { XEvent *ev = (XEvent *) xevent; ENTER; if (ev->type == ConfigureNotify) { - gtk_widget_queue_draw(widget); + gtk_widget_queue_draw(widget); //gtk_bgbox_style_set(widget, NULL); - DBG("ConfigureNotify %d %d %d %d\n", - ev->xconfigure.x, - ev->xconfigure.y, - ev->xconfigure.width, + DBG("ConfigureNotify %d %d %d %d\n", + ev->xconfigure.x, + ev->xconfigure.y, + ev->xconfigure.width, ev->xconfigure.height ); } @@ -192,7 +192,7 @@ gtk_bgbox_realize (GtkWidget *widget) GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); border_width = GTK_CONTAINER (widget)->border_width; - + attributes.x = widget->allocation.x + border_width; attributes.y = widget->allocation.y + border_width; attributes.width = widget->allocation.width - 2*border_width; @@ -208,13 +208,13 @@ gtk_bgbox_realize (GtkWidget *widget) | GDK_STRUCTURE_MASK; priv = GTK_BGBOX_GET_PRIVATE (widget); - + attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.wclass = GDK_INPUT_OUTPUT; - + attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; - + widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data (widget->window, widget); @@ -246,7 +246,7 @@ gtk_bgbox_configure_event (GtkWidget *widget, GdkEventConfigure *e) ENTER; DBG("geom: size (%d, %d). pos (%d, %d)\n", e->width, e->height, e->x, e->y); RET(FALSE); - + } static void @@ -260,7 +260,7 @@ gtk_bgbox_size_request (GtkWidget *widget, GtkRequisition *requisition) if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) { GtkRequisition child_requisition; - + gtk_widget_size_request (bin->child, &child_requisition); requisition->width += child_requisition.width; @@ -280,7 +280,7 @@ gtk_bgbox_size_allocate (GtkWidget *widget, GtkAllocation *wa) GtkAllocation ca; GtkBgboxPrivate *priv; int same_alloc, border; - + ENTER; same_alloc = !memcmp(&widget->allocation, wa, sizeof(*wa)); DBG("same alloc = %d\n", same_alloc); @@ -294,16 +294,16 @@ gtk_bgbox_size_allocate (GtkWidget *widget, GtkAllocation *wa) ca.y = border; ca.width = MAX (wa->width - border * 2, 0); ca.height = MAX (wa->height - border * 2, 0); - + if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_NO_WINDOW (widget) && !same_alloc) { priv = GTK_BGBOX_GET_PRIVATE (widget); DBG("move resize pos=%d,%d geom=%dx%d\n", wa->x, wa->y, wa->width, - wa->height); + wa->height); gdk_window_move_resize (widget->window, wa->x, wa->y, wa->width, wa->height); gtk_bgbox_set_background(widget, priv->bg_type, priv->tintcolor, priv->alpha); } - + if (bin->child) gtk_widget_size_allocate (bin->child, &ca); RET(); @@ -374,7 +374,7 @@ static void gtk_bgbox_set_bg_root(GtkWidget *widget, GtkBgboxPrivate *priv) { priv = GTK_BGBOX_GET_PRIVATE (widget); - + ENTER; priv->pixmap = fb_bg_get_xroot_pix_for_win(priv->bg, widget); if (!priv->pixmap || priv->pixmap == GDK_NO_BG) { @@ -397,7 +397,7 @@ static void gtk_bgbox_set_bg_inherit(GtkWidget *widget, GtkBgboxPrivate *priv) { priv = GTK_BGBOX_GET_PRIVATE (widget); - + ENTER; gdk_window_set_back_pixmap(widget->window, NULL, TRUE); RET(); diff --git a/panel/gtkbgbox.h b/panel/gtkbgbox.h index 16c2ac6..3bd815d 100644 --- a/panel/gtkbgbox.h +++ b/panel/gtkbgbox.h @@ -21,7 +21,7 @@ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS * file for a list of people on the GTK+ Team. See the ChangeLog * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. + * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ #ifndef __GTK_BGBOX_H__ diff --git a/panel/misc.c b/panel/misc.c index 2a0e0d7..3b5ae94 100644 --- a/panel/misc.c +++ b/panel/misc.c @@ -426,7 +426,7 @@ get_net_wm_desktop(Window win) if (data) { desk = *data; XFree (data); - } else + } else DBG("can't get desktop num for win 0x%lx", win); RET(desk); } @@ -667,7 +667,7 @@ get_button_spacing(GtkRequisition *req, GtkContainer *parent, gchar *name) } -guint32 +guint32 gcolor2rgb24(GdkColor *color) { guint32 i; @@ -783,11 +783,11 @@ indent(int level) * file from @fname * icon named "missing-image" as a fallabck, if @use_fallback is TRUE. * Returns pixbuf or NULL on failure - * - * Result pixbuf is always smaller then MAX_SIZE + * + * Result pixbuf is always smaller then MAX_SIZE */ GdkPixbuf * -fb_pixbuf_new(gchar *iname, gchar *fname, int width, int height, +fb_pixbuf_new(gchar *iname, gchar *fname, int width, int height, gboolean use_fallback) { GdkPixbuf *pb = NULL; @@ -807,7 +807,7 @@ fb_pixbuf_new(gchar *iname, gchar *fname, int width, int height, } /* Creates hilighted version of front image to reflect mouse enter - */ + */ static GdkPixbuf * fb_pixbuf_make_back_image(GdkPixbuf *front, gulong hicolor) { @@ -852,7 +852,7 @@ fb_pixbuf_make_press_image(GdkPixbuf *front) tmp = gdk_pixbuf_scale_simple(front, w, h, GDK_INTERP_HYPER); if (press && tmp) { gdk_pixbuf_fill(press, 0); - gdk_pixbuf_copy_area(tmp, + gdk_pixbuf_copy_area(tmp, 0, 0, // src_x, src_y w, h, // width, height press, // dest_pixbuf @@ -899,7 +899,7 @@ fb_image_new(gchar *iname, gchar *fname, int width, int height) image = gtk_image_new(); conf = g_new0(fb_image_conf_t, 1); /* exits if fails */ - g_object_set_data(G_OBJECT(image), "conf", conf); + g_object_set_data(G_OBJECT(image), "conf", conf); conf->itc_id = g_signal_connect_after (G_OBJECT(icon_theme), "changed", (GCallback) fb_image_icon_theme_changed, image); g_signal_connect (G_OBJECT(image), @@ -914,7 +914,7 @@ fb_image_new(gchar *iname, gchar *fname, int width, int height) RET(image); } - + /* Frees image's resources */ static void @@ -929,7 +929,7 @@ fb_image_free(GObject *image) g_free(conf->iname); g_free(conf->fname); for (i = 0; i < PIXBBUF_NUM; i++) - if (conf->pix[i]) + if (conf->pix[i]) g_object_unref(G_OBJECT(conf->pix[i])); g_free(conf); RET(); @@ -951,7 +951,7 @@ fb_image_icon_theme_changed(GtkIconTheme *icon_theme, GtkWidget *image) g_object_unref(G_OBJECT(conf->pix[i])); conf->pix[i] = NULL; } - conf->pix[0] = fb_pixbuf_new(conf->iname, conf->fname, + conf->pix[0] = fb_pixbuf_new(conf->iname, conf->fname, conf->width, conf->height, TRUE); conf->pix[1] = fb_pixbuf_make_back_image(conf->pix[0], conf->hicolor); conf->pix[2] = fb_pixbuf_make_press_image(conf->pix[1]); @@ -972,7 +972,7 @@ static gboolean fb_button_pressed(GtkWidget *widget, GdkEventButton *event); * Additionaly, fb_button highlightes an image on mouse enter and runs simple * animation when clicked. * FIXME: @label parameter is currently ignored - */ + */ GtkWidget * fb_button_new(gchar *iname, gchar *fname, int width, int height, gulong hicolor, gchar *label) @@ -1008,7 +1008,7 @@ fb_button_new(gchar *iname, gchar *fname, int width, int height, /* Flips front and back images upon mouse cross event - GDK_ENTER_NOTIFY * or GDK_LEAVE_NOTIFY - */ + */ static gboolean fb_button_cross(GtkImage *widget, GdkEventCrossing *event) { @@ -1026,7 +1026,7 @@ fb_button_cross(GtkImage *widget, GdkEventCrossing *event) conf->i = i; gtk_image_set_from_pixbuf(GTK_IMAGE(widget), conf->pix[i]); } - DBG("%s/%s - %s - pix[%d]=%p\n", conf->iname, conf->fname, + DBG("%s/%s - %s - pix[%d]=%p\n", conf->iname, conf->fname, (event->type == GDK_LEAVE_NOTIFY) ? "out" : "in", conf->i, conf->pix[conf->i]); RET(TRUE); @@ -1044,8 +1044,8 @@ fb_button_pressed(GtkWidget *widget, GdkEventButton *event) i = 2; } else { if ((event->x >=0 && event->x < widget->allocation.width) - && (event->y >=0 && event->y < widget->allocation.height)) - i = 1; + && (event->y >=0 && event->y < widget->allocation.height)) + i = 1; else i = 0; } diff --git a/panel/misc.h b/panel/misc.h index e603fa4..3e31114 100644 --- a/panel/misc.h +++ b/panel/misc.h @@ -36,7 +36,7 @@ void get_button_spacing(GtkRequisition *req, GtkContainer *parent, gchar *name); guint32 gcolor2rgb24(GdkColor *color); gchar *gdk_color_to_RRGGBB(GdkColor *color); -GdkPixbuf *fb_pixbuf_new(gchar *iname, gchar *fname, int width, int height, +GdkPixbuf *fb_pixbuf_new(gchar *iname, gchar *fname, int width, int height, gboolean use_fallback); GtkWidget *fb_image_new(gchar *iname, gchar *fname, int width, int height); GtkWidget *fb_button_new(gchar *iname, gchar *fname, int width, int height, diff --git a/panel/panel.c b/panel/panel.c index 33edc7a..811be95 100644 --- a/panel/panel.c +++ b/panel/panel.c @@ -158,8 +158,8 @@ panel_event_filter(GdkXEvent *xevent, GdkEvent *event, panel *p) // XA_CARDINAL, &p->wa_len); //print_wmdata(p); } else if (at == a_XROOTPMAP_ID) { - if (p->transparent) - fb_bg_notify_changed_bg(p->bg); + if (p->transparent) + fb_bg_notify_changed_bg(p->bg); } else if (at == a_NET_DESKTOP_GEOMETRY) { DBG("a_NET_DESKTOP_GEOMETRY\n"); gtk_main_quit(); @@ -310,8 +310,8 @@ panel_configure_event(GtkWidget *widget, GdkEventConfigure *e, panel *p) ****************************************************/ /* Autohide is behaviour when panel hides itself when mouse is "far enough" - * and pops up again when mouse comes "close enough". - * Formally, it's a state machine with 3 states that driven by mouse + * and pops up again when mouse comes "close enough". + * Formally, it's a state machine with 3 states that driven by mouse * coordinates and timer: * 1. VISIBLE - ensures that panel is visible. When/if mouse goes "far enough" * switches to WAITING state @@ -345,14 +345,14 @@ panel_mapped(GtkWidget *widget, GdkEvent *event, panel *p) RET(FALSE); } -static gboolean +static gboolean mouse_watch(panel *p) { gint x, y; ENTER; gdk_display_get_pointer(gdk_display_get_default(), NULL, &x, &y, NULL); - + /* Reduce sensitivity area p->ah_far = ((x < p->cx - GAP) || (x > p->cx + p->cw + GAP) || (y < p->cy - GAP) || (y > p->cy + p->ch + GAP)); @@ -467,9 +467,9 @@ about() gchar *authors[] = { "Anatoly Asviyan ", NULL }; ENTER; - gtk_show_about_dialog(NULL, + gtk_show_about_dialog(NULL, "authors", authors, - "comments", "Lightweight GTK+ desktop panel", + "comments", "Lightweight GTK+ desktop panel", "license", "GPLv2", "program-name", PROJECT_NAME, "version", PROJECT_VERSION, @@ -506,7 +506,7 @@ panel_make_menu(panel *p) g_signal_connect(G_OBJECT(mi), "activate", (GCallback)about, p); gtk_widget_show (mi); - + RET(menu); } @@ -591,7 +591,7 @@ panel_start_gui(panel *p) /* ensure configure event */ XMoveWindow(GDK_DISPLAY(), p->topxwin, 20, 20); XSync(GDK_DISPLAY(), False); - + gtk_widget_set_app_paintable(p->topgwin, TRUE); calculate_position(p); gtk_window_move(GTK_WINDOW(p->topgwin), p->ax, p->ay); @@ -631,7 +631,7 @@ panel_start_gui(panel *p) if (p->setstrut) panel_set_wm_strut(p); - + XSelectInput(GDK_DISPLAY(), GDK_ROOT_WINDOW(), PropertyChangeMask); gdk_window_add_filter(gdk_get_default_root_window(), (GdkFilterFunc)panel_event_filter, p); @@ -664,7 +664,7 @@ panel_parse_global(xconf *xc) p->spacing = 0; p->setlayer = FALSE; p->layer = LAYER_ABOVE; - + /* Read config */ /* geometry */ XCG(xc, "edge", &p->edge, enum, edge_enum); @@ -683,7 +683,7 @@ panel_parse_global(xconf *xc) XCG(xc, "heightwhenhidden", &p->height_when_hidden, int); XCG(xc, "setlayer", &p->setlayer, enum, bool_enum); XCG(xc, "layer", &p->layer, enum, layer_enum); - + /* effects */ XCG(xc, "roundcorners", &p->round_corners, enum, bool_enum); XCG(xc, "roundcornersradius", &p->round_corners_radius, int); @@ -691,7 +691,7 @@ panel_parse_global(xconf *xc) XCG(xc, "alpha", &p->alpha, int); XCG(xc, "tintcolor", &p->tintcolor_name, str); XCG(xc, "maxelemheight", &p->max_elem_height, int); - + /* Sanity checks */ if (!gdk_color_parse(p->tintcolor_name, &p->gtintcolor)) gdk_color_parse("white", &p->gtintcolor); @@ -736,7 +736,7 @@ panel_parse_plugin(xconf *xc) { plugin_instance *plug = NULL; gchar *type = NULL; - + ENTER; xconf_get_str(xconf_find(xc, "type", 0), &type); if (!type || !(plug = plugin_load(type))) { @@ -770,7 +770,7 @@ panel_start(xconf *xc) { int i; xconf *pxc; - + ENTER; fbev = fb_ev_new(); @@ -796,7 +796,7 @@ panel_stop(panel *p) { ENTER; - if (p->autohide) + if (p->autohide) ah_stop(p); g_list_foreach(p->plugins, delete_plugin, NULL); g_list_free(p->plugins); @@ -867,7 +867,7 @@ static void do_argv(int argc, char *argv[]) { int i; - + for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) { usage(); diff --git a/panel/panel.h b/panel/panel.h index af1cf3d..c07bc9f 100644 --- a/panel/panel.h +++ b/panel/panel.h @@ -47,7 +47,7 @@ typedef struct _panel guint32 tintcolor; GdkColor gtintcolor; gchar *tintcolor_name; - + int ax, ay, aw, ah; /* prefferd allocation of a panel */ int cx, cy, cw, ch; /* current allocation (as reported by configure event) allocation */ int allign, edge, xmargin, ymargin; @@ -66,7 +66,7 @@ typedef struct _panel gint ah_far; gint layer; gint setlayer; - + int ah_dx, ah_dy; // autohide shift for x and y int height_when_hidden; guint hide_tout; diff --git a/panel/plugin.h b/panel/plugin.h index 23e43be..14ff038 100644 --- a/panel/plugin.h +++ b/panel/plugin.h @@ -25,14 +25,14 @@ typedef struct { char *version; char *description; int priv_size; - + int (*constructor)(struct _plugin_instance *this); void (*destructor)(struct _plugin_instance *this); void (*save_config)(struct _plugin_instance *this, FILE *fp); GtkWidget *(*edit_config)(struct _plugin_instance *this); } plugin_class; -#define PLUGIN_CLASS(class) ((plugin_class *) class) +#define PLUGIN_CLASS(class) ((plugin_class *) class) typedef struct _plugin_instance{ plugin_class *class; @@ -57,11 +57,11 @@ void class_register(plugin_class *p); void class_unregister(plugin_class *p); #ifdef PLUGIN -static plugin_class *class_ptr; -static void ctor(void) __attribute__ ((constructor)); +static plugin_class *class_ptr; +static void ctor(void) __attribute__ ((constructor)); static void ctor(void) { class_register(class_ptr); } -static void dtor(void) __attribute__ ((destructor)); -static void dtor(void) { class_unregister(class_ptr); } +static void dtor(void) __attribute__ ((destructor)); +static void dtor(void) { class_unregister(class_ptr); } #endif #endif diff --git a/panel/xconf.c b/panel/xconf.c index 2b6a9c7..d49ede0 100644 --- a/panel/xconf.c +++ b/panel/xconf.c @@ -36,7 +36,7 @@ void xconf_append_sons(xconf *dst, xconf *src) { GSList *e; xconf *tmp; - + if (!dst || !src) return; for (e = src->sons; e; e = g_slist_next(e)) @@ -74,7 +74,7 @@ void xconf_del(xconf *x, gboolean sons_only) { GSList *s; xconf *x2; - + if (!x) return; DBG("%s %s\n", x->name, x->value); @@ -99,7 +99,7 @@ void xconf_set_value(xconf *x, gchar *value) xconf_del(x, TRUE); g_free(x->value); x->value = g_strdup(value); - + } void xconf_set_value_ref(xconf *x, gchar *value) @@ -107,7 +107,7 @@ void xconf_set_value_ref(xconf *x, gchar *value) xconf_del(x, TRUE); g_free(x->value); x->value = value; - + } void xconf_set_int(xconf *x, int i) @@ -375,15 +375,15 @@ gboolean xconf_cmp(xconf *a, xconf *b) { GSList *as, *bs; - + if (!(a || b)) return FALSE; if (!(a && b)) return TRUE; - + if (g_ascii_strcasecmp(a->name, b->name)) return TRUE; - + if (g_strcmp0(a->value, b->value)) return TRUE; for (as = a->sons, bs = b->sons; as && bs; From 159ac986f54b6873fc3337c0b73f54ede9108bb6 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 07:44:17 +0200 Subject: [PATCH 35/37] update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b031e2..5dbb7fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,15 @@ ## Version: develop -Date: 2015-12-05 05:07:08 +Date: 2015-12-05 07:43:37 + * [#12] fix menu position for top panel * [#11] new plugin: user menu with gravatar icon * [#8] Fix for issue #5 (make battery plugin work with /sys) * [#6] Rounded corners don't work with widthtype=request * [#5] make battery plugin work with /sys * [#2] Include option for vertical (y) and horizontal (x) margin +[#12]: https://github.com/aanatoly/fbpanel/issues/12 [#11]: https://github.com/aanatoly/fbpanel/issues/11 [#8]: https://github.com/aanatoly/fbpanel/pull/8 [#6]: https://github.com/aanatoly/fbpanel/issues/6 From 1997f1ca30c939e66d8aeb19d656eb5c37bdae21 Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 08:25:36 +0200 Subject: [PATCH 36/37] new short readme with screenshot [closes #4] readme with screenshot that point to project web site --- README | 64 -------------------------------------------------- README.md | 7 ++++++ data/shot.png | Bin 0 -> 31120 bytes 3 files changed, 7 insertions(+), 64 deletions(-) delete mode 100644 README create mode 100644 README.md create mode 100644 data/shot.png diff --git a/README b/README deleted file mode 100644 index 2d884bb..0000000 --- a/README +++ /dev/null @@ -1,64 +0,0 @@ - fbpanel - -NAME - fbpanel is a lightweight GTK2-based panel for UNIX desktop - -SYNOPSYS - fbpanel [OPTION]... - -DESCRIPTION - fbpanel is desktop panel which provides graphical information and feedback about - desktop activity and allows interaction with the window manager. - It features: - o taskbar - show list of the managed windows (tasks) - o pager - thumbnailed view of the desktop - o launchbar - buttons to quickly launch applications - o show desktop - button to iconify or shade all windows - o image - display an image - o clock - show the current time and/or date - o system tray - tray for XEMBED icons (aka docklets) - o space - just seize space - o menu - menu with text and images - o deskno - display desktop number and name - fbpanel requires NETWM (www.freedesktop.org) compliant window manager. - - You can run many instances of fbpanel each with its own configuration - (see OPTIONS below). - - Most updated info about fbpanel can be found on its home page: - http://fbpanel.sf.net/ - -OPTIONS - --help -- print this help and exit - --version -- print version and exit - --log -- set log level 0-5. 0 - none 5 - chatty - --configure -- launch configuration utility - --profile name -- use specified profile - - -h -- same as --help - -p -- same as --profile - -v -- same as --version - -C -- same as --configure - - -CUSTOMIZATION - To change default settings, copy profile file to your home directory - mkdir -p ~/.fbpanel - cp /usr/share/fbpanel/default ~/.fbpanel - and edit it. Default profile file contains comments and explanation inside, - so it should be easy. For full list of options please visit fbpanel's home page - -FILES - /usr/share/fbpanel - Directory with system wide resources and default settings - - ~/.fbpanel/ - Directory with user's private configurations - - ~/.fbpanel/default - Default profile - -AUTHORS - Anatoly Asviyan - - diff --git a/README.md b/README.md new file mode 100644 index 0000000..605d51c --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# fbpanel +A lightweight gtk2 panel for Linux desktop. + +Please visit [project web site](http://aanatoly.github.io/fbpanel/) +for more information. + +![shot](/data/shot.png) diff --git a/data/shot.png b/data/shot.png new file mode 100644 index 0000000000000000000000000000000000000000..59a6c7f4d2ceea7c060e86bf778b2453619ff78c GIT binary patch literal 31120 zcmV)%K#jkNP)ZfvlPu_TYOC0SRqbalsX ze1~)P-fQK@+WWlkmE|#}!;c(){_dxDIA@=|*Iv)Fp0)Nq^v*l3NGXa4lR9Q1f~rEH z3W9U&oM)!|3W%Ais;Zm1s(efmQ%p%jBqd2P#-zl=?1+hoK+NnwoJ3+wL_8QYgW=G7 z@4aJY0u&HQDMkA~NWJ&YIZ=rzg22qoB!ZMQMx;cd3^0gOOfhs4qljn{sF12>t}8zp z4!71fR>q_Ge15RMKcCM<5)loDP17_)5RsT-7rGFF0w5yJKg>+bj-6u%P>KSj(Qvf7 zvO?@)7w7YKHk)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C33BxRjLwsEhjbk12bg z7hGzKk`g}%#gA(iY#+i@7QL86W%;#44-=ARwClDS+AS*VAZJdAeMyM4$pQ4KhKd^$ zRH6u#DZCEbn9e8AN*{;S=|GDCh;Zf{avx=s*^Dxayw!{}5Mj;=zznGt~?eF=FLrotQ&&XuoKCT)>SGeL7VV08j)gkk#!J5P|G_6CCTY+6`c$PRT}) zaz~e+nKM8Dq!7SjGYUFj0nzvcW>NY|1T&}=z}fc#J6IQ+9TjUz7U}#Afv(Ts(3~tA n40`bnek=XqaKhQhM)`jMNm2Ku{QlK{00000NkvXXu0mjfDR%C7 literal 0 HcmV?d00001 From 6819a53463ad3d085e81f6aed75a3cda2e9b78ae Mon Sep 17 00:00:00 2001 From: Anatoly Date: Sat, 5 Dec 2015 08:33:46 +0200 Subject: [PATCH 37/37] version bump to 7.0 + changelog update --- CHANGELOG.md | 6 ++++-- po/fr_FR.UTF-8.po | 2 +- po/ru_RU.UTF-8.po | 2 +- version | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dbb7fb..1f8790f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,13 @@ -## Version: develop -Date: 2015-12-05 07:43:37 +## Version: 7.0 +Date: 2015-12-05 08:25:36 * [#12] fix menu position for top panel * [#11] new plugin: user menu with gravatar icon * [#8] Fix for issue #5 (make battery plugin work with /sys) * [#6] Rounded corners don't work with widthtype=request * [#5] make battery plugin work with /sys + * [#4] update README * [#2] Include option for vertical (y) and horizontal (x) margin [#12]: https://github.com/aanatoly/fbpanel/issues/12 @@ -14,4 +15,5 @@ Date: 2015-12-05 07:43:37 [#8]: https://github.com/aanatoly/fbpanel/pull/8 [#6]: https://github.com/aanatoly/fbpanel/issues/6 [#5]: https://github.com/aanatoly/fbpanel/issues/5 +[#4]: https://github.com/aanatoly/fbpanel/issues/4 [#2]: https://github.com/aanatoly/fbpanel/issues/2 diff --git a/po/fr_FR.UTF-8.po b/po/fr_FR.UTF-8.po index c3eb657..d738765 100644 --- a/po/fr_FR.UTF-8.po +++ b/po/fr_FR.UTF-8.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: fbpanel 6.2\n" +"Project-Id-Version: fbpanel 7.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-09-30 02:07+0200\n" "PO-Revision-Date: 2010-09-30 02:07+0200\n" diff --git a/po/ru_RU.UTF-8.po b/po/ru_RU.UTF-8.po index d04468e..0af1fe9 100644 --- a/po/ru_RU.UTF-8.po +++ b/po/ru_RU.UTF-8.po @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: fbpanel 6.2\n" +"Project-Id-Version: fbpanel 7.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-09-30 02:02+0200\n" "PO-Revision-Date: 2010-09-30 02:02+0200\n" diff --git a/version b/version index 0cda48a..4fedf1d 100644 --- a/version +++ b/version @@ -1 +1 @@ -6.2 +7.0