summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@fedoraproject.org>2006-10-24 03:58:50 +0000
committerMatthias Clasen <mclasen@fedoraproject.org>2006-10-24 03:58:50 +0000
commit63ca78e5a4ae321b9e2ce6693be1da7092f2a2e3 (patch)
tree0993f6c3c987693096c81ad5f9ed40f943bf016c
parent7bf49141a91b4cc576edb1a79cd479e258c91276 (diff)
fix cpufreq applet a bit
-rw-r--r--gnome-applets-2.16.0.1-cpufreq-changes.patch81
-rw-r--r--gnome-applets.spec8
2 files changed, 88 insertions, 1 deletions
diff --git a/gnome-applets-2.16.0.1-cpufreq-changes.patch b/gnome-applets-2.16.0.1-cpufreq-changes.patch
new file mode 100644
index 0000000..14d6b43
--- /dev/null
+++ b/gnome-applets-2.16.0.1-cpufreq-changes.patch
@@ -0,0 +1,81 @@
+--- gnome-applets-2.16.0.1/cpufreq/src/cpufreq-applet.c.cpufreq-changes 2006-10-23 23:44:40.000000000 -0400
++++ gnome-applets-2.16.0.1/cpufreq/src/cpufreq-applet.c 2006-10-23 23:45:42.000000000 -0400
+@@ -54,6 +54,7 @@
+ gboolean show_perc;
+ gboolean show_unit;
+ gboolean show_icon;
++ gboolean do_refresh;
+
+ CPUFreqMonitor *monitor;
+
+@@ -222,6 +223,8 @@
+ applet->size = panel_applet_get_size (PANEL_APPLET (applet));
+ applet->orient = panel_applet_get_orient (PANEL_APPLET (applet));
+
++ applet->do_refresh = TRUE;
++
+ gtk_widget_show (GTK_WIDGET (applet));
+ }
+
+@@ -663,7 +666,6 @@
+ gint perc;
+ guint cpu;
+ gchar *governor;
+- static gboolean do_refresh = TRUE;
+
+ cpu = cpufreq_monitor_get_cpu (monitor);
+ freq = cpufreq_monitor_get_frequency (monitor);
+@@ -713,9 +715,9 @@
+ g_free (text_tip);
+
+ /* Call refresh only the first time */
+- if (do_refresh) {
++ if (applet->do_refresh) {
+ cpufreq_applet_refresh (applet);
+- do_refresh = FALSE;
++ applet->do_refresh = FALSE;
+ }
+ }
+
+@@ -844,6 +846,18 @@
+ }
+
+ static void
++cpufreq_applet_prefs_cpu_changed (CPUFreqPrefs *prefs,
++ GParamSpec *arg1,
++ CPUFreqApplet *applet)
++{
++ gint cpu;
++
++ cpu = cpufreq_prefs_get_cpu (prefs);
++ cpufreq_monitor_set_cpu (applet->monitor, cpu);
++ cpufreq_applet_update (applet, applet->monitor);
++}
++
++static void
+ cpufreq_applet_setup (CPUFreqApplet *applet)
+ {
+ BonoboUIComponent *popup_component;
+@@ -873,9 +887,11 @@
+ "notify::show-text-mode",
+ G_CALLBACK (cpufreq_applet_prefs_show_mode_changed),
+ (gpointer) applet);
++ g_signal_connect (G_OBJECT (applet->prefs),
++ "notify::cpu",
++ G_CALLBACK (cpufreq_applet_prefs_cpu_changed),
++ (gpointer) applet);
+
+- cpufreq_applet_update_visibility (applet);
+-
+ /* Monitor */
+ applet->monitor = cpufreq_monitor_factory_create_monitor (
+ cpufreq_prefs_get_cpu (applet->prefs));
+@@ -884,6 +900,8 @@
+ G_CALLBACK (cpufreq_applet_update),
+ (gpointer) applet);
+
++ cpufreq_applet_update_visibility (applet);
++
+ /* Setup the menus */
+ panel_applet_setup_menu_from_file (PANEL_APPLET (applet),
+ DATADIR,
diff --git a/gnome-applets.spec b/gnome-applets.spec
index 632f0c3..802a4b4 100644
--- a/gnome-applets.spec
+++ b/gnome-applets.spec
@@ -33,7 +33,7 @@
Summary: Small applications for the GNOME panel
Name: gnome-applets
Version: 2.16.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 1
License: GPL
Group: User Interface/Desktops
@@ -59,6 +59,8 @@ Patch20: keyboard-drawing-redraw.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=356536
Patch25: gnome-applets-2.16.0.1-keyboard-indicator-segfault.patch
+Patch26: gnome-applets-2.16.0.1-cpufreq-changes.patch
+
URL: http://www.gnome.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@@ -149,6 +151,7 @@ small utilities for the GNOME panel.
%patch20 -p1 -b .redraw
%patch25 -p1 -b .keyboard-indicator-segfault
+%patch26 -p1 -b .cpufreq-changes
cp gswitchit/gswitchit-applet.png gswitchit/gswitchit-properties-capplet.png
@@ -337,6 +340,9 @@ fi
%{_libdir}/pkgconfig/gweather.pc
%changelog
+* Mon Oct 23 2006 Matthias Clasen <mclasen@redhat.com> - 1:2.16.1-2
+- Make the cpufreq applet pick up preference changes (#209168)
+
* Sat Oct 21 2006 Matthias Clasen <mclasen@redhat.com> - 1:2.16.1-1
- Update to 2.16.1
- Drop upstreamed patches