diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | lib/CommLayer/CommLayerInner.cpp | 10 | ||||
-rw-r--r-- | po/pl.po | 98 | ||||
-rw-r--r-- | src/Daemon/CommLayerServer.h | 1 | ||||
-rw-r--r-- | src/Daemon/CommLayerServerDBus.cpp | 10 | ||||
-rw-r--r-- | src/Daemon/CommLayerServerDBus.h | 1 | ||||
-rw-r--r-- | src/Daemon/CommLayerServerSocket.cpp | 5 | ||||
-rw-r--r-- | src/Daemon/CommLayerServerSocket.h | 2 | ||||
-rw-r--r-- | src/Daemon/CrashWatcher.cpp | 2 | ||||
-rw-r--r-- | src/Daemon/Daemon.cpp | 6 | ||||
-rw-r--r-- | src/Daemon/Makefile.am | 7 | ||||
-rw-r--r-- | src/Daemon/MiddleWare.cpp | 2 | ||||
-rw-r--r-- | src/Daemon/Polkit.cpp | 2 | ||||
-rw-r--r-- | src/Daemon/Polkit.h | 2 |
14 files changed, 53 insertions, 96 deletions
diff --git a/configure.ac b/configure.ac index e6b4dd7b..e7b66ad6 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ PKG_CHECK_MODULES([NSS], [nss]) PKG_CHECK_MODULES([XMLRPC_CPP], [xmlrpc++]) PKG_CHECK_MODULES([XMLRPC_CLIENT_CPP], [xmlrpc_client++]) PKG_CHECK_MODULES([XMLRPC_CLIENT_CPP], [python]) +PKG_CHECK_MODULES([POLKIT],[polkit-gobject-1]) AC_CHECK_HEADER([sys/inotify.h], [], [AC_MSG_ERROR([sys/inotify.h is needed to build abrt])]) diff --git a/lib/CommLayer/CommLayerInner.cpp b/lib/CommLayer/CommLayerInner.cpp index 5450b41c..b5b8db78 100644 --- a/lib/CommLayer/CommLayerInner.cpp +++ b/lib/CommLayer/CommLayerInner.cpp @@ -44,7 +44,10 @@ void warn_client(const std::string& pMessage) const char* peer = (ki != s_mapClientID.end() ? ki->second.c_str() : NULL); pthread_mutex_unlock(&s_map_mutex); - s_pObs->Warning(pMessage, peer, key); + if (peer) + s_pObs->Warning(pMessage, peer, key); + else /* Bug: someone tries to warn_client() without set_client_name()!? */ + log("Hmm, stray %s: '%s'", __func__, pMessage.c_str()); } void update_client(const std::string& pMessage) @@ -59,5 +62,8 @@ void update_client(const std::string& pMessage) const char* peer = (ki != s_mapClientID.end() ? ki->second.c_str() : NULL); pthread_mutex_unlock(&s_map_mutex); - s_pObs->Status(pMessage, peer, key); + if (peer) + s_pObs->Status(pMessage, peer, key); + else + log("Hmm, stray %s: '%s'", __func__, pMessage.c_str()); } @@ -6,9 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: pl\n" "Report-Msgid-Bugs-To: jmoskovc@redhat.com\n" -"POT-Creation-Date: 2009-09-07 14:45+0000\n" -"PO-Revision-Date: 2009-09-07 19:56+0200\n" -"Last-Translator: Tomasz Chrzczonowicz <chrzczonowicz@gmail.com>\n" +"POT-Creation-Date: 2009-09-08 16:06+0000\n" +"PO-Revision-Date: 2009-09-08 18:10+0200\n" +"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n" "Language-Team: Polish <fedora-trans-pl@redhat.com>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -44,11 +44,11 @@ msgstr "Wtyczki baz danych" msgid "Can't connect to dbus" msgstr "Nie można połączyć się z D-Bus" -#: ../src/Gui/CCDBusBackend.py:144 ../src/Gui/CCDBusBackend.py:163 +#: ../src/Gui/CCDBusBackend.py:144 ../src/Gui/CCDBusBackend.py:164 msgid "Please check if abrt daemon is running." msgstr "Sprawdź, czy demon abrt jest uruchomiony." -#: ../src/Gui/CCDBusBackend.py:181 +#: ../src/Gui/CCDBusBackend.py:182 msgid "" "Daemon did't return valid report info\n" "Debuginfo is missing?" @@ -64,7 +64,7 @@ msgstr " " msgid "(C) 2009 Red Hat, Inc." msgstr "(C) 2009 Red Hat, Inc." -#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:215 +#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:223 msgid "<b>Not reported!</b>" msgstr "<b>Nie zgłoszono!</b>" @@ -85,14 +85,18 @@ msgid "Delete" msgstr "Usuń" #: ../src/Gui/ccgui.glade.h:8 +msgid "Global settings" +msgstr "Ustawienia systemowe" + +#: ../src/Gui/ccgui.glade.h:9 msgid "Please wait.." msgstr "Proszę czekać..." -#: ../src/Gui/ccgui.glade.h:9 ../src/Gui/report.glade.h:2 +#: ../src/Gui/ccgui.glade.h:10 ../src/Gui/report.glade.h:2 msgid "Report" msgstr "Zgłoś" -#: ../src/Gui/ccgui.glade.h:10 +#: ../src/Gui/ccgui.glade.h:11 msgid "" "This program is free software; you can redistribute it and/or modify it " "under the terms of the GNU General Public License as published by the Free " @@ -122,43 +126,43 @@ msgstr "" "Powszechnej Licencji Publicznej GNU (GNU General Public License); jeśli nie " "- proszę odwiedzić stronę internetową <http://www.gnu.org/licenses/>." -#: ../src/Gui/ccgui.glade.h:15 +#: ../src/Gui/ccgui.glade.h:16 msgid "Working..." msgstr "Praca w toku..." -#: ../src/Gui/ccgui.glade.h:16 +#: ../src/Gui/ccgui.glade.h:17 msgid "_Edit" msgstr "_Edycja" -#: ../src/Gui/ccgui.glade.h:17 +#: ../src/Gui/ccgui.glade.h:18 msgid "_File" msgstr "_Plik" -#: ../src/Gui/ccgui.glade.h:18 +#: ../src/Gui/ccgui.glade.h:19 msgid "_Help" msgstr "Pomo_c" -#: ../src/Gui/CCMainWindow.py:86 +#: ../src/Gui/CCMainWindow.py:87 msgid "Package" msgstr "Pakiet" -#: ../src/Gui/CCMainWindow.py:87 +#: ../src/Gui/CCMainWindow.py:88 msgid "Application" msgstr "Aplikacja" -#: ../src/Gui/CCMainWindow.py:88 +#: ../src/Gui/CCMainWindow.py:89 msgid "Date" msgstr "Data" -#: ../src/Gui/CCMainWindow.py:89 +#: ../src/Gui/CCMainWindow.py:90 msgid "Crash Rate" msgstr "Częstotliwość awarii" -#: ../src/Gui/CCMainWindow.py:91 +#: ../src/Gui/CCMainWindow.py:92 msgid "User" msgstr "Użytkownik" -#: ../src/Gui/CCMainWindow.py:157 +#: ../src/Gui/CCMainWindow.py:165 #, python-format msgid "" "Unable to finish current task!\n" @@ -167,7 +171,7 @@ msgstr "" "Nie można zakończyć bieżącego zadania!\n" "%s" -#: ../src/Gui/CCMainWindow.py:174 +#: ../src/Gui/CCMainWindow.py:182 #, python-format msgid "" "Error while loading the dumplist, please check if abrt daemon is running\n" @@ -177,11 +181,11 @@ msgstr "" "uruchomiony\n" " %s" -#: ../src/Gui/CCMainWindow.py:207 +#: ../src/Gui/CCMainWindow.py:215 msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n" msgstr "<b>Ta awaria została już zgłoszona. Raporty można znaleźć na:</b>\n" -#: ../src/Gui/CCMainWindow.py:267 +#: ../src/Gui/CCMainWindow.py:275 msgid "" "Unable to get report!\n" "Debuginfo is missing?" @@ -189,7 +193,7 @@ msgstr "" "Nie można uzyskać raportu!\n" "Brak pakietów debuginfo?" -#: ../src/Gui/CCMainWindow.py:279 +#: ../src/Gui/CCMainWindow.py:287 #, python-format msgid "" "Reporting failed!\n" @@ -198,7 +202,7 @@ msgstr "" "Zgłoszenie nie powiodło się!\n" "%s" -#: ../src/Gui/CCMainWindow.py:311 +#: ../src/Gui/CCMainWindow.py:319 #, python-format msgid "Error getting the report: %s" msgstr "Błąd podczas uzyskiwania raportu: %s" @@ -251,45 +255,9 @@ msgstr "Wyślij" msgid "gtk-cancel" msgstr "gtk-cancel" -#: ../src/Gui/SettingsDialog.py:22 -msgid "Can't load gui description for SettingsDialog!" -msgstr "Nie można wczytać opisu GUI dla SettingsDialog!" - -#: ../src/Gui/SettingsDialog.py:34 -msgid "Name" -msgstr "Nazwa" - -#: ../src/Gui/SettingsDialog.py:52 -msgid "Enabled" -msgstr "Włączone" - -#: ../src/Gui/SettingsDialog.py:117 -msgid "Can't get plugin description" -msgstr "Nie można uzyskać opisu wtyczki" - -#: ../src/Gui/SettingsDialog.py:125 -#, python-format -msgid "" -"Error while opening plugin settings UI: \n" -"\n" -"%s" -msgstr "" -"Błąd podczas otwierania interfejsu użytkownika ustawień wtyczki: \n" -"\n" -"%s" - -#: ../src/Gui/SettingsDialog.py:135 -#, python-format -msgid "" -"Can't save plugin settings:\n" -" %s" -msgstr "" -"Nie można zapisać ustawień wtyczki:\n" -" %s" - -#: ../src/Gui/SettingsDialog.py:141 -msgid "unknown response from settings dialog" -msgstr "nieznana odpowiedź od okna dialogowego ustawień" +#: ../src/Gui/SettingsDialog.py:44 +msgid "Select a plugin" +msgstr "Wybierz wtyczkę" #: ../src/Applet/Applet.cpp:45 #, c-format @@ -395,15 +363,15 @@ msgstr "Uzyskiwanie wyjątku..." msgid "Getting local universal unique identification..." msgstr "Uzyskiwanie lokalnego uniwersalnego, unikalnego identyfikatora..." -#: ../lib/Plugins/CCpp.cpp:453 +#: ../lib/Plugins/CCpp.cpp:455 msgid "Getting global universal unique identification..." msgstr "Uzyskiwanie globalnego uniwersalnego, unikalnego identyfikatora..." -#: ../lib/Plugins/CCpp.cpp:471 +#: ../lib/Plugins/CCpp.cpp:473 msgid "Starting report creation..." msgstr "Uruchamianie tworzenia raportu..." -#: ../lib/Plugins/CCpp.cpp:493 +#: ../lib/Plugins/CCpp.cpp:495 #, c-format msgid "Skip debuginfo installation for package %s" msgstr "Pomiń instalację pakietu debuginfo dla pakietu %s" diff --git a/src/Daemon/CommLayerServer.h b/src/Daemon/CommLayerServer.h index 0b1027ac..e87c5c4b 100644 --- a/src/Daemon/CommLayerServer.h +++ b/src/Daemon/CommLayerServer.h @@ -17,7 +17,6 @@ class CCommLayerServer { virtual void JobDone(const char* pDest, const char* pUUID) = 0; virtual void JobStarted(const char* pDest) {}; - virtual void Error(const std::string& pMessage, const char* peer) {} virtual void Update(const std::string& pMessage, const char* peer, uint64_t pJobID) {}; virtual void Warning(const std::string& pMessage, const char* peer, uint64_t pJobID) {}; }; diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp index c6908f5f..eb1d133f 100644 --- a/src/Daemon/CommLayerServerDBus.cpp +++ b/src/Daemon/CommLayerServerDBus.cpp @@ -393,16 +393,6 @@ void CCommLayerServerDBus::JobDone(const char* peer, const char* pUUID) send_flush_and_unref(msg); } -void CCommLayerServerDBus::Error(const std::string& pMessage, const char* peer) -{ - DBusMessage* msg = new_signal_msg("Error", peer); - const char* c_message = pMessage.c_str(); - dbus_message_append_args(msg, - DBUS_TYPE_STRING, &c_message, - DBUS_TYPE_INVALID); - send_flush_and_unref(msg); -} - void CCommLayerServerDBus::Update(const std::string& pMessage, const char* peer, uint64_t job_id) { DBusMessage* msg = new_signal_msg("Update", peer); diff --git a/src/Daemon/CommLayerServerDBus.h b/src/Daemon/CommLayerServerDBus.h index 3a8822de..e1185c5c 100644 --- a/src/Daemon/CommLayerServerDBus.h +++ b/src/Daemon/CommLayerServerDBus.h @@ -15,7 +15,6 @@ class CCommLayerServerDBus virtual void JobStarted(const char* pDest); virtual void JobDone(const char* pDest, const char* pUUID); - virtual void Error(const std::string& pMessage, const char* peer); virtual void Update(const std::string& pMessage, const char* peer, uint64_t pJobID); virtual void Warning(const std::string& pMessage, const char* peer, uint64_t pJobID); }; diff --git a/src/Daemon/CommLayerServerSocket.cpp b/src/Daemon/CommLayerServerSocket.cpp index 8f1fd4fe..b643aaa9 100644 --- a/src/Daemon/CommLayerServerSocket.cpp +++ b/src/Daemon/CommLayerServerSocket.cpp @@ -245,8 +245,3 @@ void CCommLayerServerSocket::Crash(const std::string& arg1) { //Send("(CRASH)New Crash Detected: " + arg1); } - -void CCommLayerServerSocket::Error(const std::string& arg1, const char* peer) -{ - //Send("(ERROR)Error: " + arg1); -} diff --git a/src/Daemon/CommLayerServerSocket.h b/src/Daemon/CommLayerServerSocket.h index 0ee47014..f598841b 100644 --- a/src/Daemon/CommLayerServerSocket.h +++ b/src/Daemon/CommLayerServerSocket.h @@ -32,6 +32,4 @@ class CCommLayerServerSocket : public CCommLayerServer virtual void Crash(const std::string& arg1); virtual void JobStarted(const char* pDest) {}; - - virtual void Error(const std::string& arg1, const char* peer); }; diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index 6c4d6545..826dc9e6 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -168,7 +168,7 @@ static void* create_report(void* arg) { if (e.type() == EXCEP_FATAL) { - set_client_name(NULL); + set_client_name(NULL); /* free strduped strings */ free(thread_data->UUID); free(thread_data->UID); diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index a7c97372..28a6c8a2 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -75,12 +75,12 @@ * Sent as unicast to the client which did CreateReport. * - JobDone(client_dbus_ID,UUID) - see CreateReport above. * Sent as unicast to the client which did CreateReport. - * - Error(msg) - * - Warning(msg[,job_id]) + * - Warning(msg,job_id) * - Update(msg,job_id) + * Both are sent as unicast to last client set by set_client_name(name). + * If set_client_name(NULL) was done, they are not sent. * * TODO: - * - Error/Warning/Update dbus signals must be unicast too * - API does not really need JobStarted dbus signal at all, and JobDone signal * does not need to pass any parameters - out clients never sent multiple * CreateReport's. diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am index 934016a9..17823d63 100644 --- a/src/Daemon/Makefile.am +++ b/src/Daemon/Makefile.am @@ -13,7 +13,8 @@ abrtd_SOURCES = \ CommLayerServerSocket.h CommLayerServerSocket.cpp \ CommLayerServerDBus.h CommLayerServerDBus.cpp \ Daemon.cpp Daemon.h \ - Settings.h Settings.cpp + Settings.h Settings.cpp \ + Polkit.h Polkit.cpp abrtd_CPPFLAGS = \ -I$(srcdir)/../../inc \ -I$(srcdir)/../../lib/MiddleWare \ @@ -25,11 +26,11 @@ abrtd_CPPFLAGS = \ -DCONF_DIR=\"$(CONF_DIR)\" \ -DVAR_RUN=\"$(VAR_RUN)\" \ $(GLIB_CFLAGS) $(DBUS_CFLAGS) \ - $(ENABLE_SOCKET_OR_DBUS) + $(ENABLE_SOCKET_OR_DBUS) $(POLKIT_CFLAGS) abrtd_LDADD = \ ../../lib/MiddleWare/libABRTMiddleWare.la \ ../../lib/CommLayer/libABRTCommLayer.la \ - $(DL_LIBS) $(DBUS_LIBS) $(RPM_LIBS) + $(DL_LIBS) $(DBUS_LIBS) $(RPM_LIBS) $(POLKIT_LIBS) dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/ dist_dbusabrtconf_DATA = dbus-abrt.conf diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 4f499d68..8c880b8c 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -173,7 +173,7 @@ mw_result_t CreateCrashReport(const std::string& pUUID, const std::string& pUID, map_crash_report_t& pCrashReport) { - VERB2 log("CreateCrashReport('%s','%',result)", pUUID.c_str(), pUID.c_str()); + VERB2 log("CreateCrashReport('%s','%s',result)", pUUID.c_str(), pUID.c_str()); database_row_t row; if (pUUID != "") diff --git a/src/Daemon/Polkit.cpp b/src/Daemon/Polkit.cpp index 8c8e3884..722b788c 100644 --- a/src/Daemon/Polkit.cpp +++ b/src/Daemon/Polkit.cpp @@ -24,7 +24,7 @@ #include "Polkit.h" -PolkitResult polkit_check_authorization(char* dbus_name,char *action_id) +PolkitResult polkit_check_authorization(const char* dbus_name,const char *action_id) { PolkitAuthority *authority; PolkitSubject *subject; diff --git a/src/Daemon/Polkit.h b/src/Daemon/Polkit.h index bb03822f..04aca64f 100644 --- a/src/Daemon/Polkit.h +++ b/src/Daemon/Polkit.h @@ -34,6 +34,6 @@ POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE*/ PolkitChallenge = 0x03 } PolkitResult; -PolkitResult polkit_check_authorization(char * dbus_name,char *action_id); +PolkitResult polkit_check_authorization(const char * dbus_name,const char *action_id); #endif |