[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/gnome-applets/FC-5 gnome-applets-2.14.3-cpufreq.patch, NONE, 1.1 gnome-applets.spec, 1.136, 1.137



Author: mclasen

Update of /cvs/dist/rpms/gnome-applets/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv26118

Modified Files:
	gnome-applets.spec 
Added Files:
	gnome-applets-2.14.3-cpufreq.patch 
Log Message:
fix cpufreq applet


gnome-applets-2.14.3-cpufreq.patch:
 cpufreq-applet.c |   19 +------------------
 cpufreq-popup.c  |   18 ++----------------
 2 files changed, 3 insertions(+), 34 deletions(-)

--- NEW FILE gnome-applets-2.14.3-cpufreq.patch ---
--- gnome-applets-2.14.3/cpufreq/src/cpufreq-applet.c.cpufreq	2006-08-27 17:38:46.000000000 -0400
+++ gnome-applets-2.14.3/cpufreq/src/cpufreq-applet.c	2006-08-27 17:40:24.000000000 -0400
@@ -265,31 +265,14 @@
 gboolean
 cpufreq_applet_selector_is_available (void)
 {
-	struct stat *info;
         gchar       *path = NULL;
 
         path = g_find_program_in_path ("cpufreq-selector");
         if (!path)
                 return FALSE;
-
-        if (geteuid () == 0)
-                return TRUE;
-
-        info = (struct stat *) g_malloc (sizeof (struct stat));
-
-        if ((lstat (path, info)) != -1) {
-                if ((info->st_mode & S_ISUID) && (info->st_uid == 0)) {
-                        g_free (info);
-                        g_free (path);
-                                    
-                        return TRUE;
-                }
-        }
-
-        g_free (info);
         g_free (path);
 
-        return FALSE;
+        return TRUE;
 }
 
 static void
--- gnome-applets-2.14.3/cpufreq/src/cpufreq-popup.c.cpufreq	2006-08-27 17:36:36.000000000 -0400
+++ gnome-applets-2.14.3/cpufreq/src/cpufreq-popup.c	2006-08-27 17:38:34.000000000 -0400
@@ -123,7 +123,6 @@
 cpufreq_popup_set_frequency (GtkWidget *widget, gpointer gdata)
 {
         gint   freq, cpu;
-        gchar *path = NULL;
         gchar *command;
         cpufreq_t *cf;
         
@@ -131,17 +130,11 @@
         freq = cf->freq;
         cpu = cf->cpu;
 
-        path = g_find_program_in_path ("cpufreq-selector");
-
-        if (!path)
-                return;
-           
-        command = g_strdup_printf ("%s -f %d -c %d", path, freq, cpu);
+        command = g_strdup_printf ("/usr/bin/cpufreq-selector -f %d -c %d", freq, cpu);
 
         g_spawn_command_line_async (command, NULL); /* TODO: error */
 
         g_free (command);
-        g_free (path);
 }
 
 static void
@@ -149,7 +142,6 @@
 {
 	gint cpu;
 	gchar *governor;
-	gchar *path = NULL;
 	gchar *command;
 	cpugov_t *cg;
         
@@ -157,17 +149,11 @@
 	governor = cg->gov;
 	cpu = cg->cpu;
 
-	path = g_find_program_in_path ("cpufreq-selector");
-
-	if (!path)
-		return;
-
-	command = g_strdup_printf ("%s -g %s -c %d", path, governor, cpu);
+	command = g_strdup_printf ("/usr/bin/cpufreq-selector -g %s -c %d", governor, cpu);
 
 	g_spawn_command_line_async (command, NULL); /* TODO: error */
 
 	g_free (command);
-	g_free (path);
 }
 
 static void


Index: gnome-applets.spec
===================================================================
RCS file: /cvs/dist/rpms/gnome-applets/FC-5/gnome-applets.spec,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -r1.136 -r1.137
--- gnome-applets.spec	2 Aug 2006 15:11:33 -0000	1.136
+++ gnome-applets.spec	27 Aug 2006 21:40:51 -0000	1.137
@@ -27,7 +27,7 @@
 Patch0:		gnome-applets-2.10.1-use-old-modemlights.patch
 Patch2:		gnome-applets-2.10.1-use-builtin-apm.patch
 Patch3:		gnome-applets-2.3.6-ppp-command.patch
-Patch4:		gnome-applets-2.14.2-cpufreq.patch
+Patch4:		gnome-applets-2.14.3-cpufreq.patch
 Patch5:	        gnome-applets-2.13.4-warning.patch
 Patch6:	        gnome-applets-2.13.90-stock-ticker.patch
 Patch9:	        gnome-applets-2.14.0-gswitchit-export-dynamic.patch


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]