Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1ee60f036 | ||
|
|
e6613f6709 | ||
|
|
ca1f15402a | ||
|
|
384948f0c4 | ||
|
|
f748f55589 | ||
|
|
eb86875919 |
6 changed files with 190 additions and 36 deletions
0
.cvsignore → .gitignore
vendored
0
.cvsignore → .gitignore
vendored
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: xfce4-netload-plugin
|
||||
# $Id$
|
||||
NAME := xfce4-netload-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)
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
diff -ur xfce4-netload-plugin-0.4.0.orig/panel-plugin/Makefile.am xfce4-netload-plugin-0.4.0/panel-plugin/Makefile.am
|
||||
--- xfce4-netload-plugin-0.4.0.orig/panel-plugin/Makefile.am 2005-09-30 10:53:07.000000000 +0300
|
||||
+++ xfce4-netload-plugin-0.4.0/panel-plugin/Makefile.am 2007-01-21 23:09:59.000000000 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
-DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
|
||||
@LIBXFCE4PANEL_CFLAGS@
|
||||
|
||||
-xfce4_netload_plugin_LDFLAGS = \
|
||||
+xfce4_netload_plugin_LDADD = \
|
||||
@SOLLIBS@ \
|
||||
@LIBXFCE4PANEL_LIBS@
|
||||
|
||||
87
xfce4-netload-plugin-0.4.0-fix-bar-colors.patch
Normal file
87
xfce4-netload-plugin-0.4.0-fix-bar-colors.patch
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
Index: panel-plugin/netload.c
|
||||
===================================================================
|
||||
--- panel-plugin/netload.c (revision 3275)
|
||||
+++ panel-plugin/netload.c (working copy)
|
||||
@@ -257,7 +257,6 @@ static void run_update (t_global_monitor
|
||||
static void monitor_set_orientation (XfcePanelPlugin *plugin, GtkOrientation orientation,
|
||||
t_global_monitor *global)
|
||||
{
|
||||
- GtkRcStyle *rc;
|
||||
gint i;
|
||||
|
||||
if (global->timeout_id)
|
||||
@@ -316,19 +315,16 @@ static void monitor_set_orientation (Xfc
|
||||
|
||||
for (i = 0; i < SUM; i++)
|
||||
{
|
||||
- rc = gtk_widget_get_modifier_style(GTK_WIDGET(global->monitor->status[i]));
|
||||
- if (!rc)
|
||||
- {
|
||||
- rc = gtk_rc_style_new();
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- rc->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BG;
|
||||
- rc->bg[GTK_STATE_PRELIGHT] =
|
||||
- global->monitor->options.color[i];
|
||||
- }
|
||||
-
|
||||
- gtk_widget_modify_style(GTK_WIDGET(global->monitor->status[i]), rc);
|
||||
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor->status[i]),
|
||||
+ GTK_STATE_PRELIGHT,
|
||||
+ &global->monitor->options.color[i]);
|
||||
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor->status[i]),
|
||||
+ GTK_STATE_SELECTED,
|
||||
+ &global->monitor->options.color[i]);
|
||||
+ gtk_widget_modify_base(GTK_WIDGET(global->monitor->status[i]),
|
||||
+ GTK_STATE_SELECTED,
|
||||
+ &global->monitor->options.color[i]);
|
||||
+
|
||||
gtk_widget_show(GTK_WIDGET(global->monitor->status[i]));
|
||||
|
||||
gtk_box_pack_start(GTK_BOX(global->monitor->box),
|
||||
@@ -413,7 +409,6 @@ static t_global_monitor * monitor_new(Xf
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
static void setup_monitor(t_global_monitor *global, gboolean supress_warnings)
|
||||
{
|
||||
- GtkRcStyle *rc;
|
||||
gint i;
|
||||
|
||||
gtk_widget_hide(GTK_WIDGET(global->monitor->box));
|
||||
@@ -423,27 +418,15 @@ static void setup_monitor(t_global_monit
|
||||
|
||||
for (i = 0; i < SUM; i++)
|
||||
{
|
||||
- gtk_widget_hide(GTK_WIDGET(global->monitor->status[i]));
|
||||
- rc = gtk_widget_get_modifier_style(GTK_WIDGET(global->monitor->status[i]));
|
||||
-
|
||||
- if (!rc) {
|
||||
- rc = gtk_rc_style_new();
|
||||
- } else {
|
||||
- /* to free the style safely in any case */
|
||||
- gtk_rc_style_ref(rc);
|
||||
- }
|
||||
-
|
||||
- if (rc) {
|
||||
- rc->color_flags[GTK_STATE_PRELIGHT] |= GTK_RC_BG;
|
||||
- rc->color_flags[GTK_STATE_SELECTED] |= GTK_RC_BASE;
|
||||
- rc->bg[GTK_STATE_PRELIGHT] = global->monitor->options.color[i];
|
||||
- rc->base[GTK_STATE_SELECTED] = global->monitor->options.color[i];
|
||||
-
|
||||
- gtk_widget_modify_style(GTK_WIDGET(global->monitor->status[i]), rc);
|
||||
- gtk_rc_style_unref(rc);
|
||||
- }
|
||||
-
|
||||
- gtk_widget_show(GTK_WIDGET(global->monitor->status[i]));
|
||||
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor->status[i]),
|
||||
+ GTK_STATE_PRELIGHT,
|
||||
+ &global->monitor->options.color[i]);
|
||||
+ gtk_widget_modify_bg(GTK_WIDGET(global->monitor->status[i]),
|
||||
+ GTK_STATE_SELECTED,
|
||||
+ &global->monitor->options.color[i]);
|
||||
+ gtk_widget_modify_base(GTK_WIDGET(global->monitor->status[i]),
|
||||
+ GTK_STATE_SELECTED,
|
||||
+ &global->monitor->options.color[i]);
|
||||
|
||||
/* Maximum */
|
||||
if( global->monitor->options.auto_max )
|
||||
86
xfce4-netload-plugin-0.4.0-tooltip.patch
Normal file
86
xfce4-netload-plugin-0.4.0-tooltip.patch
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
--- ./panel-plugin/netload.c.orig 2005-10-09 12:08:01.000000000 +0300
|
||||
+++ ./panel-plugin/netload.c 2009-05-23 20:50:22.000000000 +0300
|
||||
@@ -30,8 +30,6 @@
|
||||
#include <libxfce4panel/xfce-panel-plugin.h>
|
||||
|
||||
|
||||
-static GtkTooltips *tooltips = NULL;
|
||||
-
|
||||
#define BORDER 8
|
||||
|
||||
/* Defaults */
|
||||
@@ -219,7 +217,7 @@
|
||||
"Incoming: %s kByte/s\nOutgoing: %s kByte/s\nTotal: %s kByte/s"),
|
||||
get_name(&(global->monitor->data)), ip ? ip : _("no IP address"),
|
||||
HISTSIZE_CALCULATE, buffer[IN], buffer[OUT], buffer[TOT]);
|
||||
- gtk_tooltips_set_tip(tooltips, GTK_WIDGET(global->ebox), caption, NULL);
|
||||
+ gtk_widget_set_tooltip_text(GTK_WIDGET(global->ebox), caption);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -237,6 +235,14 @@
|
||||
|
||||
if (global->monitor->options.update_interval > 0)
|
||||
{
|
||||
+#if GLIB_CHECK_VERSION( 2,14,0 )
|
||||
+ if (global->monitor->options.update_interval % 1000 == 0)
|
||||
+ {
|
||||
+ global->timeout_id = g_timeout_add_seconds(global->monitor->
|
||||
+ options.update_interval / 1000, (GtkFunction)update_monitors, global);
|
||||
+ }
|
||||
+ else
|
||||
+#endif
|
||||
global->timeout_id = g_timeout_add( global->monitor->options.update_interval,
|
||||
(GtkFunction)update_monitors, global);
|
||||
}
|
||||
@@ -368,11 +374,6 @@
|
||||
global->plugin = plugin;
|
||||
xfce_panel_plugin_add_action_widget (plugin, global->ebox);
|
||||
|
||||
- if (!tooltips)
|
||||
- {
|
||||
- tooltips = gtk_tooltips_new();
|
||||
- }
|
||||
-
|
||||
global->monitor = g_new(t_monitor, 1);
|
||||
global->monitor->options.label_text = g_strdup(DEFAULT_TEXT);
|
||||
global->monitor->options.network_device = g_strdup("");
|
||||
@@ -819,6 +820,10 @@
|
||||
GtkWidget *sep1, *sep2;
|
||||
GtkBox *update_hbox;
|
||||
GtkWidget *update_label, *update_unit_label;
|
||||
+#if GLIB_CHECK_VERSION( 2,14,0 )
|
||||
+ GtkBox *update_hint_hbox;
|
||||
+ GtkWidget *update_hint_label;
|
||||
+#endif
|
||||
GtkWidget *color_label[SUM];
|
||||
GtkWidget *align;
|
||||
GtkBox *color_hbox[SUM];
|
||||
@@ -935,7 +940,7 @@
|
||||
gtk_misc_set_alignment(GTK_MISC(update_label), 0, 0.5);
|
||||
gtk_box_pack_start(GTK_BOX(update_hbox), GTK_WIDGET(update_label), FALSE, FALSE, 0);
|
||||
|
||||
- global->monitor->update_spinner = gtk_spin_button_new_with_range (0.1, 10.0, 0.05);
|
||||
+ global->monitor->update_spinner = gtk_spin_button_new_with_range (1.0, 10.0, 0.25);
|
||||
gtk_spin_button_set_digits( GTK_SPIN_BUTTON(global->monitor->update_spinner), 2 );
|
||||
gtk_spin_button_set_value( GTK_SPIN_BUTTON(global->monitor->update_spinner),
|
||||
global->monitor->options.update_interval / 1000.0 );
|
||||
@@ -948,6 +953,18 @@
|
||||
|
||||
gtk_widget_show_all(GTK_WIDGET(update_hbox));
|
||||
gtk_size_group_add_widget(sg, update_label);
|
||||
+
|
||||
+#if GLIB_CHECK_VERSION( 2,14,0 )
|
||||
+ /* Update interval hint */
|
||||
+ update_hint_hbox = GTK_BOX(gtk_hbox_new(FALSE, 5));
|
||||
+ update_hint_label = gtk_label_new(_("Note: Whole seconds are more power-efficient"));
|
||||
+ gtk_label_set_line_wrap(GTK_LABEL(update_hint_label), TRUE);
|
||||
+ gtk_box_pack_start(GTK_BOX(update_hint_hbox), GTK_WIDGET(update_hint_label),
|
||||
+ FALSE, FALSE, 0);
|
||||
+ gtk_box_pack_start(GTK_BOX(global->monitor->opt_vbox),
|
||||
+ GTK_WIDGET(update_hint_hbox), FALSE, FALSE, 0);
|
||||
+ gtk_widget_show_all(GTK_WIDGET(update_hint_hbox));
|
||||
+#endif
|
||||
|
||||
|
||||
sep1 = gtk_hseparator_new();
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
Name: xfce4-netload-plugin
|
||||
Version: 0.4.0
|
||||
Release: 9%{?dist}
|
||||
Release: 12%{?dist}
|
||||
Summary: Network-load monitor for the Xfce panel
|
||||
|
||||
Group: User Interface/Desktops
|
||||
License: GPLv2
|
||||
URL: http://goodies.xfce.org/projects/panel-plugins/%{name}
|
||||
Source0: http://goodies.xfce.org/releases/%{name}/%{name}-%{version}.tar.bz2
|
||||
Patch0: xfce4-netload-0.4.0-asneeded.patch
|
||||
# from upstream's svn rev 3275
|
||||
Patch0: xfce4-netload-plugin-0.4.0-fix-bar-colors.patch
|
||||
Patch1: xfce4-netload-plugin-0.4.0-tooltip.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: xfce4-panel-devel >= 4.3.20, libxfcegui4-devel >= 4.3.20, libxml2-devel
|
||||
|
|
@ -19,7 +21,10 @@ A network-load monitor plugin for the Xfce panel.
|
|||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .asneeded
|
||||
%patch0 -p0 -b .color
|
||||
%if 0%{?fedora} >= 11
|
||||
%patch1 -p1 -b .tooltip
|
||||
%endif
|
||||
|
||||
%build
|
||||
%configure --disable-static
|
||||
|
|
@ -40,6 +45,15 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%{_datadir}/xfce4/panel-plugins/*.desktop
|
||||
|
||||
%changelog
|
||||
* Wed Sep 09 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.0-12
|
||||
- Fix bar colors (#505214)
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Mon Jun 29 2009 Christoph Wickert <cwickert@fedoraproject.org> - 0.4.0-10
|
||||
- Bring back tooltips in GTK 2.16 with Dimitar Zhekov's patch (#508637)
|
||||
|
||||
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue