[Pkg-xfce-commits] r261 - in goodies/xfce4-cpufreq-plugin/debian: . patches

Stefan Ott cockroach-guest at costa.debian.org
Fri Oct 7 12:42:17 UTC 2005


Author: cockroach-guest
Date: 2005-10-07 12:42:16 +0000 (Fri, 07 Oct 2005)
New Revision: 261

Added:
   goodies/xfce4-cpufreq-plugin/debian/patches/
   goodies/xfce4-cpufreq-plugin/debian/patches/00list
   goodies/xfce4-cpufreq-plugin/debian/patches/01_warning-message.patch
Modified:
   goodies/xfce4-cpufreq-plugin/debian/rules
Log:
Added the warning-message patch


Added: goodies/xfce4-cpufreq-plugin/debian/patches/00list
===================================================================
--- goodies/xfce4-cpufreq-plugin/debian/patches/00list	2005-10-07 09:11:57 UTC (rev 260)
+++ goodies/xfce4-cpufreq-plugin/debian/patches/00list	2005-10-07 12:42:16 UTC (rev 261)
@@ -0,0 +1 @@
+01_warning-message.patch

Added: goodies/xfce4-cpufreq-plugin/debian/patches/01_warning-message.patch
===================================================================
--- goodies/xfce4-cpufreq-plugin/debian/patches/01_warning-message.patch	2005-10-07 09:11:57 UTC (rev 260)
+++ goodies/xfce4-cpufreq-plugin/debian/patches/01_warning-message.patch	2005-10-07 12:42:16 UTC (rev 261)
@@ -0,0 +1,49 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_warning-message.dpatch by  <stefan at desire.ch>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix for the treeview crash when no sensors were available
+ at DPATCH@
+--- xfce4-cpufreq-0.1-orig/cpufreq.c	2005-07-15 19:36:59.000000000 +0200
++++ xfce4-cpufreq-0.1/cpufreq.c	2005-10-05 17:46:33.000000000 +0200
+@@ -65,6 +65,8 @@
+ 	int cpu;
+ 	int timeoutid;
+ 
++	gboolean showed_warning;
++
+ 	GdkColor colorLow;
+ 	GdkColor colorHi;
+ 
+@@ -136,6 +138,10 @@
+ 
+ 	if (cur == 0) /* error */
+ 	{
++		if (c->showed_warning) return TRUE;
++
++		c->showed_warning = TRUE;
++
+ 		GtkWindow* win = GTK_WINDOW(gtk_widget_get_toplevel(c->vbox));
+ 		
+ 		if (c->cpu == 0) /* MUST work, unless cpufreq support is not available */
+@@ -146,8 +152,10 @@
+ 			gtk_dialog_run(GTK_DIALOG(d));
+ 			gtk_widget_destroy(d);
+ 
+-			/* hide the useless widgets */
+-			gtk_widget_hide(c->vbox);
++			gtk_widget_modify_bg(c->pbar, GTK_STATE_PRELIGHT, &(c->colorLow));
++			gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(c->pbar), 1);
++			gtk_label_set_markup(GTK_LABEL(c->label), "error");
++
+ 			return TRUE; /* not an indicator of success */
+ 		}
+ 		else /* some other error, fall back to 0 */
+@@ -239,6 +247,7 @@
+ 	c->cpu = 0;
+ 	c->orientation = VERTICAL; /* a very good default */
+ 	c->nr_cpus = get_nr_cpus();
++	c->showed_warning = FALSE;
+ 	
+ 	/* determine min/max */
+ 	cpufreq_get_hardware_limits(c->cpu, &c->min, &c->max);


Property changes on: goodies/xfce4-cpufreq-plugin/debian/patches/01_warning-message.patch
___________________________________________________________________
Name: svn:executable
   + *

Modified: goodies/xfce4-cpufreq-plugin/debian/rules
===================================================================
--- goodies/xfce4-cpufreq-plugin/debian/rules	2005-10-07 09:11:57 UTC (rev 260)
+++ goodies/xfce4-cpufreq-plugin/debian/rules	2005-10-07 12:42:16 UTC (rev 261)
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
 
+include /usr/share/cdbs/1/rules/dpatch.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/makefile-vars.mk
 




More information about the Pkg-xfce-commits mailing list