rpms/xfce4-systemload-plugin/devel xfce4-systemload-plugin-0.4.2-fix-bar-colors.patch, NONE, 1.1 xfce4-systemload-plugin-0.4.2-fix-wrong-free-memory-value.patch, NONE, 1.1 xfce4-systemload-plugin-0.4.2-tooltip.patch, NONE, 1.1 xfce4-systemload-plugin.spec, 1.15, 1.16

Christoph Wickert cwickert at fedoraproject.org
Wed Sep 9 21:00:14 UTC 2009


Author: cwickert

Update of /cvs/pkgs/rpms/xfce4-systemload-plugin/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20699

Modified Files:
	xfce4-systemload-plugin.spec 
Added Files:
	xfce4-systemload-plugin-0.4.2-fix-bar-colors.patch 
	xfce4-systemload-plugin-0.4.2-fix-wrong-free-memory-value.patch 
	xfce4-systemload-plugin-0.4.2-tooltip.patch 
Log Message:
* Wed Sep 09 2009 Christoph Wickert <cwickert at 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)


xfce4-systemload-plugin-0.4.2-fix-bar-colors.patch:
 systemload.c |   42 +++++++++++++++++++-----------------------
 1 file changed, 19 insertions(+), 23 deletions(-)

--- NEW FILE xfce4-systemload-plugin-0.4.2-fix-bar-colors.patch ---
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)
         {

xfce4-systemload-plugin-0.4.2-fix-wrong-free-memory-value.patch:
 memswap.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--- NEW FILE xfce4-systemload-plugin-0.4.2-fix-wrong-free-memory-value.patch ---
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;

xfce4-systemload-plugin-0.4.2-tooltip.patch:
 systemload.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- NEW FILE xfce4-systemload-plugin-0.4.2-tooltip.patch ---
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;


Index: xfce4-systemload-plugin.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xfce4-systemload-plugin/devel/xfce4-systemload-plugin.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- xfce4-systemload-plugin.spec	27 Jul 2009 07:56:34 -0000	1.15
+++ xfce4-systemload-plugin.spec	9 Sep 2009 21:00:13 -0000	1.16
@@ -1,12 +1,21 @@
 Name:		xfce4-systemload-plugin
 Version:	0.4.2
-Release:	7%{?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 
 
 %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,6 +53,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/xfce4/panel-plugins/*.desktop
 
 %changelog
+* Wed Sep 09 2009 Christoph Wickert <cwickert at 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 at lists.fedoraproject.org> - 0.4.2-7
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list