rpms/kshutdown/FC-5 hi128-app-kshutdown.png, NONE, 1.1 hi64-app-kshutdown.png, NONE, 1.1 kshutdown-usr-actions-cpp.patch, NONE, 1.1 kshutdown-usr-actions-h.patch, NONE, 1.1 kshutdown.spec, 1.3, 1.4

Chitlesh GOORAH (chitlesh) fedora-extras-commits at redhat.com
Fri Apr 27 18:17:24 UTC 2007


Author: chitlesh

Update of /cvs/extras/rpms/kshutdown/FC-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv22681/FC-5

Modified Files:
	kshutdown.spec 
Added Files:
	hi128-app-kshutdown.png hi64-app-kshutdown.png 
	kshutdown-usr-actions-cpp.patch kshutdown-usr-actions-h.patch 
Log Message:


kshutdown-usr-actions-cpp.patch:

--- NEW FILE kshutdown-usr-actions-cpp.patch ---
--- kshutdown/actions.cpp	2006-05-24 07:49:50.000000000 +0200
+++ actions.cpp	2007-04-27 17:33:17.000000000 +0200
@@ -101,7 +101,7 @@
 
 	_totalExit = false;
 
-	Method method = Method_KDE;
+	Method method = Method_DefaultCommand;
 	QString command;
 
 	if (!isEnabled(action))
@@ -149,8 +149,8 @@
 			getMethod(action, method, command);
 			MiscUtils::runCommandBeforeAction("Logout");
 
-			if (method == Method_KDE)
-				return endSession(KApplication::ShutdownTypeNone, action);
+			//if (method == Method_KDE)
+			return endSession(KApplication::ShutdownTypeNone, action);
 
 			break;
 
@@ -271,7 +271,7 @@
 	KConfig *conf = kshutdownrc->config();
 	if (!conf->hasGroup(group))
 	{
-		method = Method_KDE;
+		method = Method_DefaultCommand;
 		command = defaultCommand;
 		// kdDebug() << "Action::getMethod: No group in config for action " << action << endl;
 
@@ -281,9 +281,9 @@
 	conf->setGroup(group);
 
 	// read method
-	method = (Method)conf->readNumEntry("Method", Method_KDE);
+	method = (Method)conf->readNumEntry("Method", Method_DefaultCommand);
 	if ((method < Method_KDE) || (method > Method_UserCommand))
-		method = Method_KDE;
+		method = Method_DefaultCommand;
 
 	switch (method)
 	{
@@ -296,7 +296,7 @@
 		case Method_UserCommand:
 			command = conf->readEntry("Command", defaultCommand);
 			if (command.isEmpty())
-				method = Method_KDE;
+				method = Method_DefaultCommand;
 			break;
 	}
 
@@ -387,7 +387,7 @@
 	QString command;
 	getMethod(LockScreen, method, command);
 	MiscUtils::runCommandBeforeAction("Lock Screen");
-	if (method == Method_KDE) {
+	if (method == Method_DefaultCommand) {
 		// test mode
 		if (_testMode) {
 			MiscUtils::showTestMessage(getName(LockScreen));

kshutdown-usr-actions-h.patch:

--- NEW FILE kshutdown-usr-actions-h.patch ---
--- kshutdown/actions.h	2007-03-23 21:54:34.000000000 +0100
+++ actions.h	2007-04-27 16:02:59.000000000 +0200
@@ -27,8 +27,8 @@
 	DEFAULT_LOCK_SCREEN_COMMAND("xscreensaver-command -lock"),
 // TODO: 2.0: logout command for GNOME (gnome-session-save --kill?)
 	DEFAULT_LOGOUT_COMMAND(""),
-	DEFAULT_REBOOT_COMMAND("/sbin/reboot"),
-	DEFAULT_SHUT_DOWN_COMMAND("/sbin/poweroff");
+	DEFAULT_REBOOT_COMMAND("/usr/bin/reboot"),
+	DEFAULT_SHUT_DOWN_COMMAND("/usr/bin/poweroff");

 #define ks_actions Action::getInstance()



Index: kshutdown.spec
===================================================================
RCS file: /cvs/extras/rpms/kshutdown/FC-5/kshutdown.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- kshutdown.spec	20 Apr 2007 10:53:04 -0000	1.3
+++ kshutdown.spec	27 Apr 2007 18:16:49 -0000	1.4
@@ -1,16 +1,23 @@
 Name:           kshutdown
 Version:        1.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        KShutDown is an advanced shut down utility for KDE
 
 Group:          Applications/System
 License:        GPL
 
 URL:            http://kshutdown.sourceforge.net/
-Source:         http://dl.sourceforge.net/sourceforge/kshutdown/kshutdown-%{version}.tar.bz2
+Source:         http://downloads.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
+Source1:        hi64-app-kshutdown.png
+#Source2: so that kshutdown.png looks beautiful on katapult
+Source2:        hi128-app-kshutdown.png
+Patch0:         %{name}-usr-actions-h.patch
+Patch1:         %{name}-usr-actions-cpp.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires:  desktop-file-utils, kdelibs-devel
+BuildRequires:  desktop-file-utils kdelibs-devel
+# needed in kshutdown/actions.h
+Requires:       xscreensaver-base
 
 %description
 KShutDown is an advanced shut down utility for KDE.
@@ -18,6 +25,9 @@
 %prep
 %setup -q
 
+%patch0 -p0 -b .usr.h
+%patch1 -p0 -b .usr.cpp
+
 %build
 %configure --disable-rpath
 %{__make} %{?_smp_mflags}
@@ -35,6 +45,11 @@
 
 %{__rm} -f %{buildroot}%{_datadir}/apps/%{name}/extras/{multimedia,system,shutdown}/.directory
 
+%{__mkdir} -p %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/
+%{__cp} -p %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
+%{__mkdir} -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/
+%{__cp} -p %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
+
 ## File lists
 # locale's
 %find_lang %{name} || touch %{name}.lang
@@ -80,12 +95,16 @@
 %{_libdir}/kde3/%{name}lockout_panelapplet.so
 %{_datadir}/applications/%{name}.desktop
 %{_datadir}/apps/%{name}
-%{_datadir}/apps/kconf_update/kshutdown.upd
+%{_datadir}/apps/kconf_update/%{name}.upd
 %{_datadir}/apps/kicker/applets/%{name}lockout.desktop
 %{_datadir}/icons/hicolor/??x??/apps/%{name}.png
-
+%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
 
 %Changelog
+* Fri Apr 27 2007 Chitlesh Goorah <chitlesh at fedoraproject.org> 1.0-2
+- patched the default values to allow user permissions on actions
+- added 64x64 and 128x128 png icons so that kshutdown looks beautiful on katapult
+
 * Sat Apr 20 2007 Chitlesh Goorah <chitlesh at fedoraproject.org> 1.0-1
 - New upstream release
 




More information about the fedora-extras-commits mailing list