Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c53c713482 | ||
|
|
33fc8b2574 | ||
|
|
99a9f0689f | ||
|
|
58a0b9083b |
6 changed files with 161 additions and 30 deletions
0
.cvsignore → .gitignore
vendored
0
.cvsignore → .gitignore
vendored
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: xfce4-systemload-plugin
|
||||
# $Id$
|
||||
NAME := xfce4-systemload-plugin
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
59
xfce4-systemload-plugin-0.4.2-fix-bar-colors.patch
Normal file
59
xfce4-systemload-plugin-0.4.2-fix-bar-colors.patch
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
diff -u panel-plugin/systemload.c panel-plugin/systemload.c
|
||||
--- panel-plugin/systemload.c (working copy)
|
||||
+++ panel-plugin/systemload.c (working copy)
|
||||
@@ -256,17 +256,16 @@
|
||||
gtk_container_add(GTK_CONTAINER(global->monitor[count]->ebox),
|
||||
GTK_WIDGET(global->monitor[count]->box));
|
||||
|
||||
- rc = gtk_widget_get_modifier_style(GTK_WIDGET(global->monitor[count]->status));
|
||||
- if (!rc) {
|
||||
- rc = gtk_rc_style_new();
|
||||
- }
|
||||
- if (rc) {
|
||||
- rc->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BG;
|
||||
- rc->bg[GTK_STATE_PRELIGHT] =
|
||||
- global->monitor[count]->options.color;
|
||||
- }
|
||||
-
|
||||
- gtk_widget_modify_style(GTK_WIDGET(global->monitor[count]->status), rc);
|
||||
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor[count]->status),
|
||||
+ GTK_STATE_PRELIGHT,
|
||||
+ &global->monitor[count]->options.color);
|
||||
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor[count]->status),
|
||||
+ GTK_STATE_SELECTED,
|
||||
+ &global->monitor[count]->options.color);
|
||||
+ gtk_widget_modify_base(GTK_WIDGET(global->monitor[count]->status),
|
||||
+ GTK_STATE_SELECTED,
|
||||
+ &global->monitor[count]->options.color);
|
||||
+
|
||||
gtk_widget_show(GTK_WIDGET(global->monitor[count]->status));
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(global->monitor[count]->box),
|
||||
@@ -384,18 +383,15 @@
|
||||
gtk_label_set_text(GTK_LABEL(global->monitor[count]->label),
|
||||
global->monitor[count]->options.label_text);
|
||||
|
||||
- gtk_widget_hide(GTK_WIDGET(global->monitor[count]->status));
|
||||
- rc = gtk_widget_get_modifier_style(GTK_WIDGET(global->monitor[count]->status));
|
||||
- if (!rc) {
|
||||
- rc = gtk_rc_style_new();
|
||||
- }
|
||||
-
|
||||
- if (rc) {
|
||||
- rc->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BG;
|
||||
- rc->bg[GTK_STATE_PRELIGHT] = global->monitor[count]->options.color;
|
||||
- }
|
||||
-
|
||||
- gtk_widget_modify_style(GTK_WIDGET(global->monitor[count]->status), rc);
|
||||
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor[count]->status),
|
||||
+ GTK_STATE_PRELIGHT,
|
||||
+ &global->monitor[count]->options.color);
|
||||
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor[count]->status),
|
||||
+ GTK_STATE_SELECTED,
|
||||
+ &global->monitor[count]->options.color);
|
||||
+ gtk_widget_modify_base(GTK_WIDGET(global->monitor[count]->status),
|
||||
+ GTK_STATE_SELECTED,
|
||||
+ &global->monitor[count]->options.color);
|
||||
|
||||
if(global->monitor[count]->options.enabled)
|
||||
{
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
diff -Nur -x '*.orig' -x '*~' xfce4-systemload-plugin-0.4.2/panel-plugin/memswap.c xfce4-systemload-plugin-0.4.2.new/panel-plugin/memswap.c
|
||||
--- xfce4-systemload-plugin-0.4.2/panel-plugin/memswap.c 2007-01-17 19:01:09.000000000 +0100
|
||||
+++ xfce4-systemload-plugin-0.4.2.new/panel-plugin/memswap.c 2008-03-08 12:16:34.000000000 +0100
|
||||
@@ -48,6 +48,7 @@
|
||||
static unsigned long MTotal = 0;
|
||||
static unsigned long MFree = 0;
|
||||
static unsigned long MCached = 0;
|
||||
+static unsigned long MBuffers = 0;
|
||||
static unsigned long MUsed = 0;
|
||||
static unsigned long STotal = 0;
|
||||
static unsigned long SFree = 0;
|
||||
@@ -57,8 +58,8 @@
|
||||
{
|
||||
int fd;
|
||||
size_t n;
|
||||
- int o_MTotal, o_MFree, o_MCached, o_STotal, o_SFree;
|
||||
- char *b_MTotal, *b_MFree, *b_MCached, *b_STotal, *b_SFree;
|
||||
+ int o_MTotal, o_MFree, o_MCached, o_MBuffers, o_STotal, o_SFree;
|
||||
+ char *b_MTotal, *b_MFree, *b_MCached, *b_MBuffers, *b_STotal, *b_SFree;
|
||||
|
||||
if ((fd = open("/proc/meminfo", O_RDONLY)) < 0)
|
||||
{
|
||||
@@ -87,6 +88,10 @@
|
||||
if (b_MCached)
|
||||
o_MCached = sscanf(b_MCached + strlen("Cached"), ": %lu", &MCached);
|
||||
|
||||
+ b_MBuffers = strstr(MemInfoBuf, "Buffers");
|
||||
+ if (b_MBuffers)
|
||||
+ o_MBuffers = sscanf(b_MBuffers + strlen("Buffers"), ": %lu", &MBuffers);
|
||||
+
|
||||
b_STotal = strstr(MemInfoBuf, "SwapTotal");
|
||||
if (b_STotal)
|
||||
o_STotal = sscanf(b_STotal + strlen("SwapTotal"), ": %lu", &STotal);
|
||||
@@ -95,7 +100,7 @@
|
||||
if (b_SFree)
|
||||
o_SFree = sscanf(b_SFree + strlen("SwapFree"), ": %lu", &SFree);
|
||||
|
||||
- MFree += MCached;
|
||||
+ MFree = MFree + MCached + MBuffers;
|
||||
MUsed = MTotal - MFree;
|
||||
SUsed = STotal - SFree;
|
||||
*mem = MUsed * 100 / MTotal;
|
||||
23
xfce4-systemload-plugin-0.4.2-tooltip.patch
Normal file
23
xfce4-systemload-plugin-0.4.2-tooltip.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
|
||||
index cc96ec4..027e8fe 100644
|
||||
--- a/panel-plugin/systemload.c
|
||||
+++ b/panel-plugin/systemload.c
|
||||
@@ -315,11 +315,18 @@ monitor_control_new(XfcePanelPlugin *plugin)
|
||||
{
|
||||
int count;
|
||||
t_global_monitor *global;
|
||||
+ GtkSettings *settings;
|
||||
|
||||
tooltips = gtk_tooltips_new ();
|
||||
g_object_ref (tooltips);
|
||||
gtk_object_sink (GTK_OBJECT (tooltips));
|
||||
|
||||
+ /* reduce the default tooltip timeout to be smaller than the update
|
||||
+ * interval otherwise we won't see tooltips on GTK 2.16 or newer */
|
||||
+ settings = gtk_settings_get_default();
|
||||
+ if (g_object_class_find_property(G_OBJECT_GET_CLASS(settings), "gtk-tooltip-timeout"))
|
||||
+ g_object_set(settings, "gtk-tooltip-timeout", UPDATE_TIMEOUT - 10, NULL);
|
||||
+
|
||||
global = g_new(t_global_monitor, 1);
|
||||
global->plugin = plugin;
|
||||
global->timeout_id = 0;
|
||||
|
|
@ -1,12 +1,21 @@
|
|||
Name: xfce4-systemload-plugin
|
||||
Version: 0.4.2
|
||||
Release: 4%{?dist}
|
||||
Release: 8%{?dist}
|
||||
Summary: Systemload monitor for the Xfce panel
|
||||
|
||||
Group: User Interface/Desktops
|
||||
License: BSD
|
||||
URL: http://goodies.xfce.org/projects/panel-plugins/%{name}
|
||||
Source0: http://goodies.xfce.org/releases/%{name}/%{name}-%{version}.tar.bz2
|
||||
# allow custom bar colors in all themes
|
||||
# http://bugzilla.xfce.org/show_bug.cgi?id=1889
|
||||
Patch0: %{name}-0.4.2-fix-bar-colors.patch
|
||||
# memory usage in plugin is different from `free' output
|
||||
# http://bugzilla.xfce.org/show_bug.cgi?id=4215
|
||||
Patch1: %{name}-0.4.2-fix-wrong-free-memory-value.patch
|
||||
# make tooltips work with GTK 2.16
|
||||
# http://bugzilla.xfce.org/show_bug.cgi?id=5175
|
||||
Patch2: %{name}-0.4.2-tooltip.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: xfce4-panel-devel >= 4.3.99.1, libxfcegui4-devel >= 4.3.99.1, libxml2-devel
|
||||
|
|
@ -19,6 +28,11 @@ load, the memory in use, the swap space and the system uptime.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p0 -b .colors
|
||||
%patch1 -p1 -b .free
|
||||
%if 0%{?fedora} >= 11
|
||||
%patch2 -p1 -b .tooltip
|
||||
%endif
|
||||
|
||||
%build
|
||||
%configure --disable-static
|
||||
|
|
@ -39,32 +53,46 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%{_datadir}/xfce4/panel-plugins/*.desktop
|
||||
|
||||
%changelog
|
||||
* Wed Sep 09 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.2-8
|
||||
- Bring back tooltips in GTK >= 2.16 (#508637, bugzilla.xfce.org #5175)
|
||||
- Fix bar colors (#505214, bugzilla.xfce.org #1889)
|
||||
- Fix wrong free memory value (bugzilla.xfce.org #4215)
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sun Jan 18 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.2-5
|
||||
- Rebuild for Xfce 4.6 (Beta 3)
|
||||
|
||||
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.4.2-4
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Sat Aug 25 2007 Christoph Wickert <fedora christoph-wickert de> - 0.4.2-3
|
||||
* Sat Aug 25 2007 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.2-3
|
||||
- Rebuild for BuildID feature
|
||||
|
||||
* Sat Apr 28 2007 Christoph Wickert <fedora christoph-wickert de> - 0.4.2-2
|
||||
* Sat Apr 28 2007 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.2-2
|
||||
- Rebuild for Xfce 4.4.1
|
||||
|
||||
* Mon Jan 22 2007 Christoph Wickert <fedora christoph-wickert de> - 0.4.2-1
|
||||
* Mon Jan 22 2007 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.2-1
|
||||
- Update to 0.4.2 on Xfce 4.4.
|
||||
|
||||
* Fri Dec 22 2006 Christoph Wickert <fedora christoph-wickert de> - 0.4.1-1
|
||||
* Fri Dec 22 2006 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.1-1
|
||||
- Update to 0.4.1.
|
||||
|
||||
* Thu Oct 05 2006 Christoph Wickert <fedora christoph-wickert de> - 0.4.0-3
|
||||
* Thu Oct 05 2006 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.0-3
|
||||
- Bump release for devel checkin.
|
||||
|
||||
* Wed Sep 13 2006 Christoph Wickert <fedora christoph-wickert de> - 0.4.0-2
|
||||
* Wed Sep 13 2006 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.0-2
|
||||
- Rebuild for XFCE 4.3.99.1.
|
||||
- BR perl(XML::Parser).
|
||||
|
||||
* Mon Sep 04 2006 Christoph Wickert <fedora christoph-wickert de> - 0.4.0-1
|
||||
* Mon Sep 04 2006 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.0-1
|
||||
- Update to 0.4.0 on XFCE 4.3.90.2.
|
||||
|
||||
* Mon Sep 04 2006 Christoph Wickert <fedora christoph-wickert de> - 0.3.6-7
|
||||
* Mon Sep 04 2006 Christoph Wickert <cwickert@fedoraproject.org> - 0.3.6-7
|
||||
- Mass rebuild for Fedora Core 6.
|
||||
|
||||
* Tue Apr 11 2006 Christoph Wickert <fedora wickert at arcor de> - 0.3.6-6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue