freebsd-ports/sysutils/polkit-kde/files/patch-0.99.1
Max Brazhnikov a613cc24ea - Update to 0.99.1
- Trim Makefile header
- Update COMMENT
- Convert to USES
- Add NLS option

Obtained from:	area51
2013-03-22 13:41:12 +00:00

405 lines
16 KiB
Groff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--- ./AuthDialog.cpp.orig 2010-12-09 00:40:22.000000000 +0100
+++ ./AuthDialog.cpp 2012-09-17 16:49:43.368128434 +0200
@@ -195,10 +195,13 @@
qobject_cast<QStandardItemModel *>(userCB->model())->item(userCB->count()-1)->setEnabled(false);
// For each user
+ int index = 1; // Start at 1 because of the "Select User" entry
+ int currentUserIndex = -1;
+ const KUser currentUser;
foreach(const PolkitQt1::Identity &identity, identities) {
// First check to see if the user is valid
kDebug() << "User: " << identity.toString();
- KUser user(identity.toString().remove("unix-user:"));
+ const KUser user(identity.toString().remove("unix-user:"));
if (!user.isValid()) {
kWarning() << "User invalid: " << user.loginName();
continue;
@@ -207,7 +210,7 @@
// Display user Full Name IF available
QString display;
if (!user.property(KUser::FullName).toString().isEmpty()) {
- display = user.property(KUser::FullName).toString() + " (" + user.loginName() + ')';
+ display = i18nc("%1 is the full user name, %2 is the user login name", "%1 (%2)", user.property(KUser::FullName).toString(), user.loginName());
} else {
display = user.loginName();
}
@@ -221,11 +224,18 @@
}
// appends the user item
userCB->addItem(icon, display, qVariantFromValue<QString> (identity.toString()));
+
+ if (user == currentUser) {
+ currentUserIndex = index;
+ }
+ ++index;
}
// Show the widget and set focus
+ if (currentUserIndex != -1) {
+ userCB->setCurrentIndex(currentUserIndex);
+ }
userCB->show();
- userCB->setFocus();
}
}
@@ -291,7 +301,7 @@
notification->setPixmap(icon);
notification->setActions(QStringList() << i18n("Switch to dialog") << i18n("Cancel"));
- connect(notification, SIGNAL(activated(unsigned int)), this, SLOT(notificationActivated(unsigned int)));
+ connect(notification, SIGNAL(activated(uint)), this, SLOT(notificationActivated(uint)));
notification->sendEvent();
}
@@ -350,8 +360,8 @@
vendorUL->hide();
}
- connect(vendorUL, SIGNAL(leftClickedUrl(const QString&)), SLOT(openUrl(const QString&)));
- connect(action_label, SIGNAL(leftClickedUrl(const QString&)), SLOT(openAction(const QString&)));
+ connect(vendorUL, SIGNAL(leftClickedUrl(QString)), SLOT(openUrl(QString)));
+ connect(action_label, SIGNAL(leftClickedUrl(QString)), SLOT(openAction(QString)));
}
void AuthDetails::openUrl(const QString& url)
--- ./AuthDialog.ui.orig 2010-12-09 00:40:22.000000000 +0100
+++ ./AuthDialog.ui 2012-09-17 16:49:43.368128434 +0200
@@ -114,39 +114,6 @@
</property>
</widget>
</item>
- <item row="4" column="1" colspan="3" >
- <widget class="QCheckBox" name="cbRemember" >
- <property name="text" >
- <string>Remember authorization</string>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="5" column="2" colspan="2" >
- <widget class="QCheckBox" name="cbSessionOnly" >
- <property name="text" >
- <string>For this session only</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1" >
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>15</width>
- <height>10</height>
- </size>
- </property>
- </spacer>
- </item>
<item row="1" column="1" colspan="3" >
<widget class="KComboBox" name="userCB" />
</item>
--- ./CMakeLists.txt.orig 2012-09-17 15:27:08.868100544 +0200
+++ ./CMakeLists.txt 2012-09-17 16:49:43.368128434 +0200
@@ -34,7 +34,7 @@
install(TARGETS polkit-kde-authentication-agent-1 DESTINATION ${LIBEXEC_INSTALL_DIR})
-install(FILES ${CMAKE_BINARY_DIR}/polkit-kde-authentication-agent-1.desktop DESTINATION ${KDE4_AUTOSTART_INSTALL_DIR})
+install(FILES ${CMAKE_BINARY_DIR}/polkit-kde-authentication-agent-1.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})
install(FILES policykit1-kde.notifyrc DESTINATION ${DATA_INSTALL_DIR}/policykit1-kde)
--- ./cmake/modules/FindPolkitQt-1.cmake.orig 2010-12-09 00:40:22.000000000 +0100
+++ ./cmake/modules/FindPolkitQt-1.cmake 2012-09-17 16:49:43.368128434 +0200
@@ -1,37 +0,0 @@
-# - Try to find PolkitQt-1
-# Once done this will define
-#
-# POLKITQT-1_FOUND - system has Polkit-qt
-# POLKITQT-1_INCLUDE_DIR - the Polkit-qt include directory
-# POLKITQT-1_LIBRARIES - Link these to use all Polkit-qt libs
-# POLKITQT-1_CORE_LIBRARY - Link this to use the polkit-qt-core library only
-# POLKITQT-1_GUI_LIBRARY - Link this to use GUI elements in polkit-qt (polkit-qt-gui)
-# POLKITQT-1_AGENT_LIBRARY - Link this to use the agent wrapper in polkit-qt
-# POLKITQT-1_DEFINITIONS - Compiler switches required for using Polkit-qt
-#
-# The minimum required version of PolkitQt-1 can be specified using the
-# standard syntax, e.g. find_package(PolkitQt-1 1.0)
-
-# Copyright (c) 2010, Dario Freddi, <drf@kde.org>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-# Support POLKITQT-1_MIN_VERSION for compatibility:
-if ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION )
- set ( PolkitQt-1_FIND_VERSION ${POLKITQT-1_MIN_VERSION} )
-endif ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION )
-
-set( _PolkitQt-1_FIND_QUIETLY ${PolkitQt-1_FIND_QUIETLY} )
-find_package( PolkitQt-1 ${PolkitQt-1_FIND_VERSION} QUIET NO_MODULE PATHS ${LIB_INSTALL_DIR}/PolkitQt-1/cmake )
-set( PolkitQt-1_FIND_QUIETLY ${_PolkitQt-1_FIND_QUIETLY} )
-
-include( FindPackageHandleStandardArgs )
-find_package_handle_standard_args( PolkitQt-1 DEFAULT_MSG PolkitQt-1_CONFIG )
-
-if (POLKITQT-1_FOUND)
- if (NOT POLKITQT-1_INSTALL_DIR STREQUAL CMAKE_INSTALL_PREFIX)
- message("WARNING: Installation prefix does not match PolicyKit install prefixes. You probably will need to move files installed "
- "in POLICY_FILES_INSTALL_DIR and by dbus_add_activation_system_service to the ${POLKITQT-1_INSTALL_DIR} prefix")
- endif (NOT POLKITQT-1_INSTALL_DIR STREQUAL CMAKE_INSTALL_PREFIX)
-endif (POLKITQT-1_FOUND)
--- ./main.cpp.orig 2010-12-09 00:40:22.000000000 +0100
+++ ./main.cpp 2012-09-17 16:49:43.368128434 +0200
@@ -21,6 +21,7 @@
#include <KCmdLineArgs>
#include <KAboutData>
#include <KLocale>
+#include <KCrash>
#include "policykitkde.h"
@@ -39,6 +40,8 @@
return 0;
}
+ KCrash::setFlags(KCrash::AutoRestart);
+
PolicyKitKDE agent;
agent.disableSessionManagement();
agent.exec();
--- ./policykit1-kde.notifyrc.orig 2010-12-09 00:40:22.000000000 +0100
+++ ./policykit1-kde.notifyrc 2012-09-17 16:49:43.368128434 +0200
@@ -1,91 +1,177 @@
[Global]
IconName=dialog-password
Comment=PolicyKit authentication dialog
+Comment[ar]=مربع حوار الاستيثاق PolicyKit
+Comment[bs]=PolicyKit dijalog provjere identiteta
+Comment[ca]=Diàleg d'autenticació del PolicyKit
+Comment[ca@valencia]=Diàleg d'autenticació del PolicyKit
Comment[cs]=Ověřovací dialog PolicyKitu
Comment[da]=PolicyKit autentificeringsdialog
Comment[de]=PolicyKit-Berechtigungsdialog
+Comment[el]=PolicyKit διάλογος πιστοποίησης
+Comment[en_GB]=PolicyKit authentication dialogue
Comment[es]=Diálogo de autenticación de PolicyKit
Comment[et]=PolicyKiti autentimisdialoog
+Comment[fi]=PolicyKit-tunnistautumisikkuna
Comment[fr]=Boîte de dialogue d'authentification de PolicyKit
+Comment[gl]=Diálogo de autenticación de PolicyKit
+Comment[hr]=PolicyKit-ov dijaloški prozor za autentifikaciju
Comment[hu]=PolicyKit hitelesítési párbeszédablak
Comment[it]=Finestra di autenticazione di PolicyKit
-Comment[km]=ប្រអប់​ផ្ទៀង​ផ្ទាត់​ភាព​ត្រឹមត្រូវ​ PolicyKit
+Comment[km]=ប្រអប់​ផ្ទៀង​ផ្ទាត់​ភាព​ត្រឹមត្រូវ​ PolicyKit
+Comment[lt]=PolicyKit tapatumo nustatymo dialogas
Comment[ms]=Dialog pengesahan PolicyKit
Comment[nb]=PolicyKit autentiseringsdialog
Comment[nds]=Regelsett-Identiteetprööv-Dialoog
Comment[nl]=Authenticatiedialoog van PolicyKit
Comment[pa]=ਪਾਲਸੀਕਿੱਟ ਪਰਮਾਣਕਿਤਾ ਡਾਈਲਾਗ
+Comment[pl]=Okno dialogowe uwierzytelnienia PolicyKit
Comment[pt]=Janela de autenticação do PolicyKit
Comment[pt_BR]=Diálogo de autenticação do PolicyKit
+Comment[ro]=Dialog de autentificare PolicyKit
Comment[ru]=Диалоговое окно аутентификации PolicyKit
+Comment[sl]=Pogovorno okno overitve PolicyKit
+Comment[sr]=Полисикитов дијалог за аутентификовање
+Comment[sr@ijekavian]=Полисикитов дијалог за аутентификовање
+Comment[sr@ijekavianlatin]=PolicyKitov dijalog za autentifikovanje
+Comment[sr@latin]=PolicyKitov dijalog za autentifikovanje
Comment[sv]=Policykit behörighetsdialogruta
+Comment[tr]=PolicyKit kimlik doğrulama penceresi
+Comment[ug]=PolicyKit سالاھىيەت دەلىللەش سۆزلەشكۈسى
Comment[uk]=Діалогове вікно розпізнавання PolicyKit
+Comment[vi]=Hộp thoại xác thực PolicyKit
Comment[x-test]=xxPolicyKit authentication dialogxx
+Comment[zh_CN]=PolicyKit 认证对话框
Comment[zh_TW]=PolicyKit 認證對話框
Name=policykit1-kde
+Name[ar]=policykit1-kde
+Name[bs]=policykit1-kde
+Name[ca]=policykit1-kde
+Name[ca@valencia]=policykit1-kde
Name[cs]=policykit1-kde
Name[da]=policykit1-kde
Name[de]=policykit1-kde
+Name[el]=policykit1-kde
+Name[en_GB]=policykit1-kde
Name[es]=policykit1-kde
Name[et]=policykit1-kde
+Name[fi]=policykit1-kde
Name[fr]=policykit1-kde
+Name[gl]=policykit1-kde
+Name[hr]=policykit1-kde
Name[hu]=policykit1-kde
Name[it]=policykit1-kde
Name[km]=policykit1-kde
+Name[lt]=policykit1-kde
Name[ms]=policykit1-kde
Name[nb]=policykit1-kde
Name[nds]=Regelsett1-KDE
Name[nl]=policykit1-kde
Name[pa]=policykit1-kde
+Name[pl]=policykit1-kde
Name[pt]=policykit1-kde
Name[pt_BR]=policykit1-kde
+Name[ro]=policykit1-kde
Name[ru]=policykit1-kde
+Name[sk]=policykit1-kde
+Name[sl]=policykit1-kde
+Name[sr]=Полисикит1КДЕ
+Name[sr@ijekavian]=Полисикит1КДЕ
+Name[sr@ijekavianlatin]=PolicyKit1KDE
+Name[sr@latin]=PolicyKit1KDE
Name[sv]=policykit1-kde
+Name[tr]=policykit1-kde
+Name[ug]=policykit1-kde
Name[uk]=policykit1-kde
+Name[vi]=policykit1-kde
Name[x-test]=xxpolicykit1-kdexx
+Name[zh_CN]=policykit1-kde
Name[zh_TW]=policykit1-kde
[Event/authenticate]
Name=authenticate
+Name[ar]=الاستيثاق
+Name[bs]=autentifikacija
+Name[ca]=autentica
+Name[ca@valencia]=autentica
Name[cs]=ověřit
Name[da]=autentificér
Name[de]=Berechtigen
+Name[el]=πιστοποίηση
+Name[en_GB]=authenticate
Name[es]=autenticarse
Name[et]=Autentimine
-Name[fr]=authentifier
+Name[fi]=tunnistaudu
+Name[fr]=s'authentifier
+Name[gl]=autenticar
+Name[hr]=autentifikacija
Name[hu]=hitelesítés
Name[it]=autenticazione
Name[km]=ផ្ទៀង​ផ្ទាត់​ភាព​ត្រឹម​ត្រូវ​
+Name[lt]=nustatyti tapatybę
Name[ms]=pengesahan
Name[nb]=autentiser
Name[nds]=Identiteet pröven
Name[nl]=authenticatie
Name[pa]=ਪਰਮਾਣਕਿਤਾ
+Name[pl]=uwierzytelnij
Name[pt]=autenticar
Name[pt_BR]=autenticar
+Name[ro]=autentificare
Name[ru]=аутентификация
+Name[sl]=overi
+Name[sr]=Аутентификовање
+Name[sr@ijekavian]=Аутентификовање
+Name[sr@ijekavianlatin]=Autentifikovanje
+Name[sr@latin]=Autentifikovanje
Name[sv]=behörighetskontrollera
+Name[tr]=yetkilendir
+Name[ug]=سالاھىيەت دەلىللەش
Name[uk]=розпізнавання
+Name[vi]=xác thực
Name[x-test]=xxauthenticatexx
+Name[zh_CN]=认证
Name[zh_TW]=認證
Comment=You are required to authenticate
+Comment[ar]=أنت مطالب بالاستيثاق
+Comment[bs]=Trebate se autentificirati
+Comment[ca]=Se us demana que us autentiqueu
+Comment[ca@valencia]=Se vos demana que vos autentiqueu
Comment[cs]=Je vyžadováno ověření totožnosti
Comment[da]=Du skal autentificere
Comment[de]=Sie benötigen eine Berechtigung
+Comment[el]=Απαιτείται να πιστοποιηθείτε
+Comment[en_GB]=You are required to authenticate
Comment[es]=Es necesario que se autentique
Comment[et]=Vajalik on autentimine
+Comment[fi]=Tunnistautuminen vaaditaan
Comment[fr]=Vous devez vous authentifier
+Comment[gl]=Debe identificarse.
+Comment[hr]=Potrebno je autentificirati se
Comment[hu]=Hitelesítés szükséges
Comment[it]=Devi effettuare l'autenticazione
+Comment[km]=អ្នក​ត្រូវ​បាន​ស្នើ​ ដើម្បី​ផ្ទៀង​ផ្ទាត់​ភាព​ត្រឹម​ត្រូវ​
+Comment[lt]=Reikia nustatyti jūsų tapatybę
Comment[nb]=Du må autentisere
Comment[nds]=Identiteetprööv deit noot
Comment[nl]=Authenticeren is verplicht
Comment[pa]=ਤੁਹਾਨੂੰ ਪਰਮਾਣਿਤ ਹੋਣ ਦੀ ਲੋੜ ਹੈ
+Comment[pl]=Musisz się uwierzytelnić
Comment[pt]=É necessária a sua autenticação
Comment[pt_BR]=É necessária a sua autenticação
+Comment[ro]=Vi se solicită autentificarea
Comment[ru]=Необходимо выполнить аутентификацию
+Comment[sl]=Zahtevana je overitev
+Comment[sr]=Треба да се аутентификујете
+Comment[sr@ijekavian]=Треба да се аутентификујете
+Comment[sr@ijekavianlatin]=Treba da se autentifikujete
+Comment[sr@latin]=Treba da se autentifikujete
Comment[sv]=Det krävs att din behörighet kontrolleras
+Comment[tr]=Kimlik doğrulaması yapmanız gerekiyor
+Comment[ug]=سالاھىيىتىڭىزنى دەلىللەش زۆرۈر
Comment[uk]=Вам слід пройти розпізнавання
+Comment[vi]=Bạn được yêu cầu phải xác thực
Comment[x-test]=xxYou are required to authenticatexx
+Comment[zh_CN]=您需要认证
Comment[zh_TW]=您需要認證
Action=Popup
--- ./policykitlistener.cpp.orig 2010-12-09 00:40:22.000000000 +0100
+++ ./policykitlistener.cpp 2012-09-17 16:49:43.368128434 +0200
@@ -22,6 +22,7 @@
#include "AuthDialog.h"
#include <KDebug>
+#include <KWindowSystem>
#include <PolkitQt1/Agent/Listener>
#include <PolkitQt1/Agent/Session>
@@ -80,9 +81,6 @@
m_cookie = cookie;
m_result = result;
m_session.clear();
- if (identities.length() == 1) {
- m_selectedUser = identities[0];
- }
m_inProgress = true;
@@ -100,8 +98,15 @@
kDebug() << "WinId of the dialog is " << m_dialog.data()->winId() << m_dialog.data()->effectiveWinId();
m_dialog.data()->setOptions();
m_dialog.data()->show();
+ KWindowSystem::forceActiveWindow(m_dialog.data()->winId());
kDebug() << "WinId of the shown dialog is " << m_dialog.data()->winId() << m_dialog.data()->effectiveWinId();
+ if (identities.length() == 1) {
+ m_selectedUser = identities[0];
+ } else {
+ m_selectedUser = m_dialog.data()->adminUserSelected();
+ }
+
m_numTries = 0;
tryAgain();
}
@@ -115,7 +120,7 @@
// We will create new session only when some user is selected
if (m_selectedUser.isValid()) {
m_session = new Session(m_selectedUser, m_cookie, m_result);
- connect(m_session.data(), SIGNAL(request(QString, bool)), this, SLOT(request(QString, bool)));
+ connect(m_session.data(), SIGNAL(request(QString,bool)), this, SLOT(request(QString,bool)));
connect(m_session.data(), SIGNAL(completed(bool)), this, SLOT(completed(bool)));
connect(m_session.data(), SIGNAL(showError(QString)), this, SLOT(showError(QString)));