diff options
| author | Karel Klic <kklic@redhat.com> | 2009-12-07 12:28:16 +0100 |
|---|---|---|
| committer | Karel Klic <kklic@redhat.com> | 2009-12-07 12:28:16 +0100 |
| commit | 9c20953d95a20d031896245f98a62f1e89d29c33 (patch) | |
| tree | 3f808a5be51cbe59e8c5947aeef743575c8cb6e4 /src | |
| parent | c7341fd8519a89af558b341f316931d851a747fc (diff) | |
| parent | fb72ac689ca4832fca215edc942ae01592ecfff8 (diff) | |
| download | abrt-9c20953d95a20d031896245f98a62f1e89d29c33.tar.gz abrt-9c20953d95a20d031896245f98a62f1e89d29c33.tar.xz abrt-9c20953d95a20d031896245f98a62f1e89d29c33.zip | |
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'src')
29 files changed, 732 insertions, 703 deletions
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp index c91b4e8..b73b41d 100644 --- a/src/Applet/CCApplet.cpp +++ b/src/Applet/CCApplet.cpp @@ -349,7 +349,7 @@ bool CApplet::load_icons() } -//int CApplet::AddEvent(int pUUID, const std::string& pProgname) +//int CApplet::AddEvent(int pUUID, const char *pProgname) //{ // m_mapEvents[pUUID] = "pProgname"; // SetIconTooltip(_("Pending events: %i"), m_mapEvents.size()); diff --git a/src/Applet/CCApplet.h b/src/Applet/CCApplet.h index 538eda5..6c47c0a 100644 --- a/src/Applet/CCApplet.h +++ b/src/Applet/CCApplet.h @@ -42,7 +42,7 @@ class CApplet int m_iAnimationStage; guint m_iAnimator; bool m_bIconsLoaded; - + enum ICON_STAGES { ICON_DEFAULT, @@ -71,7 +71,7 @@ class CApplet // or ask the daemon every time? // maybe just events which occured during current session // map:: -// int AddEvent(int pUUID, const std::string& pProgname); +// int AddEvent(int pUUID, const char *pProgname); // int RemoveEvent(int pUUID); protected: diff --git a/src/CLI/ABRTSocket.h b/src/CLI/ABRTSocket.h index 5d5383f..536e4b5 100644 --- a/src/CLI/ABRTSocket.h +++ b/src/CLI/ABRTSocket.h @@ -10,20 +10,20 @@ class CABRTSocket private: int m_nSocket; - void Send(const std::string& pMessage); + void Send(const char *pMessage); void Recv(std::string& pMessage); public: CABRTSocket(); ~CABRTSocket(); - void Connect(const std::string& pPath); + void Connect(const char *pPath); void Disconnect(); vector_crash_infos_t GetCrashInfos(); - map_crash_report_t CreateReport(const std::string& pUUID); + map_crash_report_t CreateReport(const char *pUUID); void Report(const map_crash_report_t& pReport); - void DeleteDebugDump(const std::string& pUUID); + void DeleteDebugDump(const char *pUUID); }; #endif /* ABRTSOCKET_H_ */ diff --git a/src/CLI/dbus.cpp b/src/CLI/dbus.cpp index 50ca651..2da9d74 100644 --- a/src/CLI/dbus.cpp +++ b/src/CLI/dbus.cpp @@ -121,9 +121,7 @@ vector_crash_infos_t call_GetCrashInfos() map_crash_report_t call_CreateReport(const char* uuid) { - /* Yes, call name is not "CreateReport" but "GetJobResult". - * We need to clean up the names one day. */ - DBusMessage* msg = new_call_msg("GetJobResult"); + DBusMessage* msg = new_call_msg("CreateReport"); dbus_message_append_args(msg, DBUS_TYPE_STRING, &uuid, DBUS_TYPE_INVALID); @@ -135,7 +133,7 @@ map_crash_report_t call_CreateReport(const char* uuid) dbus_message_iter_init(reply, &in_iter); int r = load_val(&in_iter, argout); if (r != ABRT_DBUS_LAST_FIELD) /* more values present, or bad type */ - error_msg_and_die("dbus call %s: return type mismatch", "GetJobResult"); + error_msg_and_die("dbus call %s: return type mismatch", "CreateReport"); dbus_message_unref(reply); return argout; } @@ -162,8 +160,6 @@ void call_DeleteDebugDump(const char* uuid) DBUS_TYPE_INVALID); DBusMessage *reply = send_get_reply_and_unref(msg); - //it returns a single boolean value, - //but we don't use it (yet?) dbus_message_unref(reply); } diff --git a/src/Daemon/CommLayerServer.h b/src/Daemon/CommLayerServer.h index 21c1b30..367c095 100644 --- a/src/Daemon/CommLayerServer.h +++ b/src/Daemon/CommLayerServer.h @@ -17,8 +17,8 @@ class CCommLayerServer { virtual void JobDone(const char* pDest, const char* pUUID) = 0; virtual void QuotaExceed(const char* str) {} - 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) {}; + virtual void Update(const char* pMessage, const char* peer, uint64_t pJobID) {}; + virtual void Warning(const char* pMessage, const char* peer, uint64_t pJobID) {}; }; #endif diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp index 2c2ca3a..646974d 100644 --- a/src/Daemon/CommLayerServerDBus.cpp +++ b/src/Daemon/CommLayerServerDBus.cpp @@ -88,23 +88,21 @@ void CCommLayerServerDBus::JobDone(const char* peer, const char* pUUID) send_flush_and_unref(msg); } -void CCommLayerServerDBus::Update(const std::string& pMessage, const char* peer, uint64_t job_id) +void CCommLayerServerDBus::Update(const char* pMessage, const char* peer, uint64_t job_id) { DBusMessage* msg = new_signal_msg("Update", peer); - const char* c_message = pMessage.c_str(); dbus_message_append_args(msg, - DBUS_TYPE_STRING, &c_message, + DBUS_TYPE_STRING, &pMessage, DBUS_TYPE_UINT64, &job_id, /* TODO: redundant parameter, remove from API */ DBUS_TYPE_INVALID); send_flush_and_unref(msg); } -void CCommLayerServerDBus::Warning(const std::string& pMessage, const char* peer, uint64_t job_id) +void CCommLayerServerDBus::Warning(const char* pMessage, const char* peer, uint64_t job_id) { DBusMessage* msg = new_signal_msg("Warning", peer); - const char* c_message = pMessage.c_str(); dbus_message_append_args(msg, - DBUS_TYPE_STRING, &c_message, + DBUS_TYPE_STRING, &pMessage, DBUS_TYPE_UINT64, &job_id, /* TODO: redundant parameter, remove from API */ DBUS_TYPE_INVALID); send_flush_and_unref(msg); @@ -145,7 +143,7 @@ static int handle_GetCrashInfos(DBusMessage* call, DBusMessage* reply) return 0; } -static int handle_CreateReport(DBusMessage* call, DBusMessage* reply) +static int handle_StartJob(DBusMessage* call, DBusMessage* reply) { int r; DBusMessageIter in_iter; @@ -178,7 +176,7 @@ static int handle_CreateReport(DBusMessage* call, DBusMessage* reply) return 0; } -static int handle_GetJobResult(DBusMessage* call, DBusMessage* reply) +static int handle_CreateReport(DBusMessage* call, DBusMessage* reply) { int r; DBusMessageIter in_iter; @@ -192,7 +190,7 @@ static int handle_GetJobResult(DBusMessage* call, DBusMessage* reply) } long unix_uid = get_remote_uid(call); - map_crash_report_t report = GetJobResult(pUUID, to_string(unix_uid).c_str(), /*force:*/ 0); + map_crash_report_t report = CreateReport(pUUID, to_string(unix_uid).c_str(), /*force:*/ 0); DBusMessageIter out_iter; dbus_message_iter_init_append(reply, &out_iter); @@ -315,11 +313,7 @@ static int handle_DeleteDebugDump(DBusMessage* call, DBusMessage* reply) } long unix_uid = get_remote_uid(call); - bool argout1 = DeleteDebugDump(argin1, to_string(unix_uid).c_str()); - - dbus_message_append_args(reply, - DBUS_TYPE_BOOLEAN, &argout1, - DBUS_TYPE_INVALID); + DeleteDebugDump(argin1, to_string(unix_uid).c_str()); send_flush_and_unref(reply); return 0; @@ -482,14 +476,14 @@ static DBusHandlerResult message_received(DBusConnection* conn, DBusMessage* msg int r = -1; if (strcmp(member, "GetCrashInfos") == 0) r = handle_GetCrashInfos(msg, reply); - else if (strcmp(member, "CreateReport") == 0) - r = handle_CreateReport(msg, reply); + else if (strcmp(member, "StartJob") == 0) + r = handle_StartJob(msg, reply); else if (strcmp(member, "Report") == 0) r = handle_Report(msg, reply); else if (strcmp(member, "DeleteDebugDump") == 0) r = handle_DeleteDebugDump(msg, reply); - else if (strcmp(member, "GetJobResult") == 0) - r = handle_GetJobResult(msg, reply); + else if (strcmp(member, "CreateReport") == 0) + r = handle_CreateReport(msg, reply); else if (strcmp(member, "GetPluginsInfo") == 0) r = handle_GetPluginsInfo(msg, reply); else if (strcmp(member, "GetPluginSettings") == 0) diff --git a/src/Daemon/CommLayerServerDBus.h b/src/Daemon/CommLayerServerDBus.h index f159c73..9bd7766 100644 --- a/src/Daemon/CommLayerServerDBus.h +++ b/src/Daemon/CommLayerServerDBus.h @@ -15,8 +15,8 @@ class CCommLayerServerDBus virtual void JobDone(const char* pDest, const char* pUUID); virtual void QuotaExceed(const char* str); - 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); + virtual void Update(const char* pMessage, const char* peer, uint64_t pJobID); + virtual void Warning(const char* pMessage, const char* peer, uint64_t pJobID); }; #endif diff --git a/src/Daemon/CommLayerServerSocket.cpp b/src/Daemon/CommLayerServerSocket.cpp index ee775c6..80dabb7 100644 --- a/src/Daemon/CommLayerServerSocket.cpp +++ b/src/Daemon/CommLayerServerSocket.cpp @@ -40,7 +40,7 @@ std::string CCommLayerServerSocket::GetSenderUID(int pSenderSocket) socklen_t len = sizeof(creds); if (getsockopt(pSenderSocket, SOL_SOCKET, SO_PEERCRED, &creds, &len) == -1) { - throw CABRTException(EXCEP_ERROR, "CCommLayerServerSocket::GetSenderUID(): Error can get sender uid."); + throw CABRTException(EXCEP_ERROR, "CCommLayerServerSocket::GetSenderUID(): error getting sender uid"); } return to_string(creds.uid); } diff --git a/src/Daemon/CommLayerServerSocket.h b/src/Daemon/CommLayerServerSocket.h index baca195..753b67a 100644 --- a/src/Daemon/CommLayerServerSocket.h +++ b/src/Daemon/CommLayerServerSocket.h @@ -26,9 +26,9 @@ class CCommLayerServerSocket : public CCommLayerServer CCommLayerServerSocket(); virtual ~CCommLayerServerSocket(); - virtual vector_crash_infos_t GetCrashInfos(const std::string& pSender); - virtual report_status_t Report(const map_crash_report_t& pReport, const std::string& pSender); - virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender); + virtual vector_crash_infos_t GetCrashInfos(const char *pSender); + virtual report_status_t Report(const map_crash_report_t& pReport, const char *pSender); + virtual void DeleteDebugDump(const char *pUUID, const char *pSender); - virtual void Crash(const std::string& arg1); + virtual void Crash(const char *arg1); }; diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp index b82823c..3684d60 100644 --- a/src/Daemon/CrashWatcher.cpp +++ b/src/Daemon/CrashWatcher.cpp @@ -62,22 +62,16 @@ vector_crash_infos_t GetCrashInfos(const char *pUID) const char *uuid = UUIDsUIDs[ii].first.c_str(); const char *uid = UUIDsUIDs[ii].second.c_str(); - res = GetCrashInfo(uuid, uid, info); + res = FillCrashInfo(uuid, uid, info); switch (res) { case MW_OK: retval.push_back(info); break; case MW_ERROR: - error_msg("Can't find dump directory for UUID %s, deleting from database", uuid); - DeleteCrashInfo(uuid, uid); - break; - case MW_FILE_ERROR: - error_msg("Can't open file in dump directory for UUID %s, deleting", uuid); - { - std::string debugDumpDir = DeleteCrashInfo(uuid, uid); - delete_debug_dump_dir(debugDumpDir.c_str()); - } + error_msg("Dump directory for UUID %s doesn't exist or misses crucial files, deleting", uuid); + /* Deletes both DB record and dump dir */ + DeleteDebugDump(uuid, uid); break; default: break; @@ -86,10 +80,6 @@ vector_crash_infos_t GetCrashInfos(const char *pUID) } catch (CABRTException& e) { - if (e.type() == EXCEP_FATAL) - { - throw e; - } error_msg("%s", e.what()); } @@ -99,16 +89,14 @@ vector_crash_infos_t GetCrashInfos(const char *pUID) } /* - * "GetJobResult" is a bit of a misnomer. - * It actually _creates_ a_ report_ and returns the result. - * It is called in two cases: - * (1) by CreateReport dbus call -> CreateReportThread(), in the thread - * (2) by GetJobResult dbus call + * Called in two cases: + * (1) by StartJob dbus call -> CreateReportThread(), in the thread + * (2) by CreateReport dbus call * In the second case, it finishes quickly, because previous - * CreateReport dbus call already did all the processing, and we just retrieve + * StartJob dbus call already did all the processing, and we just retrieve * the result from dump directory, which is fast. */ -map_crash_report_t GetJobResult(const char* pUUID, const char* pUID, int force) +map_crash_report_t CreateReport(const char* pUUID, const char* pUID, int force) { map_crash_info_t crashReport; @@ -128,12 +116,9 @@ map_crash_report_t GetJobResult(const char* pUUID, const char* pUID, int force) case MW_PLUGIN_ERROR: error_msg("Particular analyzer plugin isn't loaded or there is an error within plugin(s)"); break; - case MW_CORRUPTED: - case MW_FILE_ERROR: default: error_msg("Corrupted crash with UUID %s, deleting", pUUID); - std::string debugDumpDir = DeleteCrashInfo(pUUID, pUID); - delete_debug_dump_dir(debugDumpDir.c_str()); + DeleteDebugDump(pUUID, pUID); break; } return crashReport; @@ -155,9 +140,8 @@ static void* create_report(void* arg) try { - /* "GetJobResult" is a bit of a misnomer */ log("Creating report..."); - map_crash_info_t crashReport = GetJobResult(thread_data->UUID, thread_data->UID, thread_data->force); + map_crash_info_t crashReport = CreateReport(thread_data->UUID, thread_data->UID, thread_data->force); g_pCommLayer->JobDone(thread_data->peer, thread_data->UUID); } catch (CABRTException& e) @@ -207,21 +191,41 @@ int CreateReportThread(const char* pUUID, const char* pUID, int force, const cha return r; } -bool DeleteDebugDump(const char *pUUID, const char *pUID) + +/* Remove dump dir and its DB record */ +void DeleteDebugDump(const char *pUUID, const char *pUID) { try { - std::string debugDumpDir = DeleteCrashInfo(pUUID, pUID); - delete_debug_dump_dir(debugDumpDir.c_str()); + CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str()); + database->Connect(); + database_row_t row = database->GetRow(pUUID, pUID); + database->DeleteRow(pUUID, pUID); + database->DisConnect(); + + const char *dump_dir = row.m_sDebugDumpDir.c_str(); + if (dump_dir[0] != '\0') + delete_debug_dump_dir(dump_dir); + } + catch (CABRTException& e) + { + error_msg("%s", e.what()); + } +} + +void DeleteDebugDump_by_dir(const char *dump_dir) +{ + try + { + CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str()); + database->Connect(); + database->DeleteRows_by_dir(dump_dir); + database->DisConnect(); + + delete_debug_dump_dir(dump_dir); } catch (CABRTException& e) { - if (e.type() == EXCEP_FATAL) - { - throw e; - } error_msg("%s", e.what()); - return false; } - return true; } diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h index 995d2a1..a806436 100644 --- a/src/Daemon/CrashWatcher.h +++ b/src/Daemon/CrashWatcher.h @@ -50,7 +50,8 @@ class CCrashWatcher vector_crash_infos_t GetCrashInfos(const char *pUID); int CreateReportThread(const char* pUUID, const char* pUID, int force, const char* pSender); -map_crash_report_t GetJobResult(const char* pUUID, const char* pUID, int force); -bool DeleteDebugDump(const char *pUUID, const char *pUID); +map_crash_report_t CreateReport(const char* pUUID, const char* pUID, int force); +void DeleteDebugDump(const char *pUUID, const char *pUID); +void DeleteDebugDump_by_dir(const char *dump_dir); -#endif /*CRASHWATCHER_H_*/ +#endif diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index c2d2265..1fa324f 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -55,16 +55,16 @@ * - GetCrashInfos(): returns a vector_crash_infos_t (vector_map_vector_string_t) * of crashes for given uid * v[N]["executable"/"uid"/"kernel"/"backtrace"][N] = "contents" - * - CreateReport(UUID,force): starts creating a report for /var/cache/abrt/DIR with this UUID. + * - StartJob(UUID,force): starts creating a report for /var/cache/abrt/DIR with this UUID. * Returns job id (uint64). * After thread returns, when report creation thread has finished, * JobDone(client_dbus_ID,UUID) dbus signal is emitted. - * - GetJobResult(UUID): returns map_crash_report_t (map_vector_string_t) + * - CreateReport(UUID): returns map_crash_report_t (map_vector_string_t) * - Report(map_crash_report_t (map_vector_string_t[, map_map_string_t])): * "Please report this crash": calls Report() of all registered reporter plugins. * Returns report_status_t (map_vector_string_t) - the status of each call. * 2nd parameter is the contents of user's abrt.conf. - * - DeleteDebugDump(UUID): delete corresponding /var/cache/abrt/DIR. Returns bool + * - DeleteDebugDump(UUID): delete it from DB and delete corresponding /var/cache/abrt/DIR * - GetPluginsInfo(): returns vector_map_string_t * - GetPluginSettings(PluginName): returns map_plugin_settings_t (map_string_t) * - SetPluginSettings(PluginName, map_plugin_settings_t): returns void @@ -75,8 +75,8 @@ * * DBus signals we emit: * - Crash(progname,uid) - a new crash occurred (new /var/cache/abrt/DIR is found) - * - JobDone(client_dbus_ID,UUID) - see CreateReport above. - * Sent as unicast to the client which did CreateReport. + * - JobDone(client_dbus_ID,UUID) - see StartJob above. + * Sent as unicast to the client which did StartJob. * - Warning(msg,job_id) * - Update(msg,job_id) * Both are sent as unicast to last client set by set_client_name(name). @@ -84,7 +84,7 @@ * * TODO: * - JobDone signal does not need to pass any parameters - * - our clients never send multiple CreateReport's. + * - our clients never send multiple StartJob's. */ @@ -343,11 +343,6 @@ static void FindNewDumps(const char* pPath) VERB1 log("Already saved crash %s, deleting", itt->c_str()); delete_debug_dump_dir(itt->c_str()); break; - case MW_BLACKLISTED: - case MW_CORRUPTED: - case MW_PACKAGE_ERROR: - case MW_GPG_ERROR: - case MW_FILE_ERROR: default: log("Corrupted or bad crash %s (res:%d), deleting", itt->c_str(), (int)res); delete_debug_dump_dir(itt->c_str()); @@ -356,10 +351,6 @@ static void FindNewDumps(const char* pPath) } catch (CABRTException& e) { - if (e.type() == EXCEP_FATAL) - { - throw e; - } error_msg("%s", e.what()); } } @@ -474,7 +465,8 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin ) { log("Size of '%s' >= %u MB, deleting '%s'", DEBUG_DUMPS_DIR, g_settings_nMaxCrashReportsSize, worst_dir.c_str()); g_pCommLayer->QuotaExceed(_("Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf.")); - delete_debug_dump_dir(concat_path_file(DEBUG_DUMPS_DIR, worst_dir.c_str()).c_str()); + /* deletes both directory and DB record */ + DeleteDebugDump_by_dir(concat_path_file(DEBUG_DUMPS_DIR, worst_dir.c_str()).c_str()); worst_dir = ""; } @@ -544,12 +536,7 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin } catch (CABRTException& e) { - error_msg(e.what()); - if (e.type() == EXCEP_FATAL) - { - free(buf); - return -1; - } + error_msg("%s", e.what()); } catch (...) { diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am index fc4f5e2..18fcd81 100644 --- a/src/Daemon/Makefile.am +++ b/src/Daemon/Makefile.am @@ -26,7 +26,8 @@ abrtd_CPPFLAGS = \ $(DBUS_CFLAGS) \ $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) \ $(ENABLE_SOCKET_OR_DBUS) \ - -D_GNU_SOURCE + -D_GNU_SOURCE \ + -Wall abrtd_LDADD = \ ../../lib/Utils/libABRTUtils.la \ ../../lib/Utils/libABRTdUtils.la \ diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp index 94e27ae..e775764 100644 --- a/src/Daemon/MiddleWare.cpp +++ b/src/Daemon/MiddleWare.cpp @@ -247,7 +247,7 @@ mw_result_t CreateCrashReport(const char *pUUID, { CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str()); database->Connect(); - row = database->GetUUIDData(pUUID, pUID); + row = database->GetRow(pUUID, pUID); database->DisConnect(); } if (pUUID[0] == '\0' || row.m_sUUID != pUUID) @@ -348,7 +348,7 @@ void RunActionsAndReporters(const char *pDebugDumpDir) map_crash_report_t crashReport; DebugDumpToCrashReport(pDebugDumpDir, crashReport); VERB2 log("%s.Report(...)", it_ar->first.c_str()); - reporter->Report(crashReport, plugin_settings, it_ar->second); + reporter->Report(crashReport, plugin_settings, it_ar->second.c_str()); } else if (tp == ACTION) { @@ -490,7 +490,7 @@ report_status_t Report(const map_crash_report_t& pCrashReport, } #endif map_plugin_settings_t plugin_settings = pSettings[pluginName]; - std::string res = reporter->Report(pCrashReport, plugin_settings, it_r->second); + std::string res = reporter->Report(pCrashReport, plugin_settings, it_r->second.c_str()); #if 0 /* Using ~user/.abrt/ is bad wrt security */ if (home != "") @@ -514,24 +514,12 @@ report_status_t Report(const map_crash_report_t& pCrashReport, CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str()); database->Connect(); - database->SetReported(UUID, UID, message); + database->SetReported(UUID.c_str(), UID.c_str(), message.c_str()); database->DisConnect(); return ret; } -std::string DeleteCrashInfo(const char *pUUID, - const char *pUID) -{ - CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str()); - database->Connect(); - database_row_t row = database->GetUUIDData(pUUID, pUID); - database->Delete(pUUID, pUID); - database->DisConnect(); - - return row.m_sDebugDumpDir; -} - /** * Check whether particular debugdump directory is saved * in database. This check is done together with an UID of an user. @@ -700,7 +688,7 @@ void autoreport(const pair_string_string_t& reporter_options, const map_crash_re } map_plugin_settings_t plugin_settings; - std::string res = reporter->Report(crash_report, plugin_settings, reporter_options.second); + std::string res = reporter->Report(crash_report, plugin_settings, reporter_options.second.c_str()); } /** @@ -746,26 +734,31 @@ static void RunAnalyzerActions(const char *pAnalyzer, const char *pDebugDumpDir) * @return It return results of operation. See mw_result_t. */ static mw_result_t SaveDebugDumpToDatabase(const char *pUUID, - const char *pUID, - const char *pTime, - const char *pDebugDumpDir, - map_crash_info_t& pCrashInfo) + const char *pUID, + const char *pTime, + const char *pDebugDumpDir, + map_crash_info_t& pCrashInfo) { CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str()); database->Connect(); - database->Insert(pUUID, pUID, pDebugDumpDir, pTime); - database_row_t row = database->GetUUIDData(pUUID, pUID); + /* note: if [UUID,UID] record exists, pDebugDumpDir is not updated in the record */ + database->Insert_or_Update(pUUID, pUID, pDebugDumpDir, pTime); + database_row_t row = database->GetRow(pUUID, pUID); database->DisConnect(); - mw_result_t res = GetCrashInfo(pUUID, pUID, pCrashInfo); - if (row.m_sReported == "1") - { - log("Crash is already reported"); - return MW_REPORTED; - } - if (row.m_sCount != "1") + + mw_result_t res = FillCrashInfo(pUUID, pUID, pCrashInfo); + if (res == MW_OK) { - log("Crash is in database already"); - return MW_OCCURED; + if (row.m_sReported == "1") + { + log("Crash is already reported"); + return MW_REPORTED; + } + if (row.m_sCount != "1") + { + log("Crash is in database already"); + return MW_OCCURED; + } } return res; } @@ -775,13 +768,13 @@ std::string getDebugDumpDir(const char *pUUID, { CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str()); database->Connect(); - database_row_t row = database->GetUUIDData(pUUID, pUID); + database_row_t row = database->GetRow(pUUID, pUID); database->DisConnect(); return row.m_sDebugDumpDir; } mw_result_t SaveDebugDump(const char *pDebugDumpDir, - map_crash_info_t& pCrashInfo) + map_crash_info_t& pCrashInfo) { std::string UID; std::string time; @@ -823,14 +816,13 @@ mw_result_t SaveDebugDump(const char *pDebugDumpDir, return SaveDebugDumpToDatabase(lUUID.c_str(), uid_str, time.c_str(), pDebugDumpDir, pCrashInfo); } -mw_result_t GetCrashInfo(const char *pUUID, +mw_result_t FillCrashInfo(const char *pUUID, const char *pUID, map_crash_info_t& pCrashInfo) { - pCrashInfo.clear(); CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase.c_str()); database->Connect(); - database_row_t row = database->GetUUIDData(pUUID, pUID); + database_row_t row = database->GetRow(pUUID, pUID); database->DisConnect(); std::string package; @@ -849,13 +841,10 @@ mw_result_t GetCrashInfo(const char *pUUID, catch (CABRTException& e) { error_msg("%s", e.what()); - if (e.type() == EXCEP_DD_LOAD) - { - return MW_FILE_ERROR; - } return MW_ERROR; } + pCrashInfo.clear(); add_crash_data_to_crash_info(pCrashInfo, CD_EXECUTABLE, executable); add_crash_data_to_crash_info(pCrashInfo, CD_PACKAGE, package); add_crash_data_to_crash_info(pCrashInfo, CD_DESCRIPTION, description); diff --git a/src/Daemon/MiddleWare.h b/src/Daemon/MiddleWare.h index 3de287b..b2b58dc 100644 --- a/src/Daemon/MiddleWare.h +++ b/src/Daemon/MiddleWare.h @@ -105,16 +105,6 @@ report_status_t Report(const map_crash_report_t& pCrashReport, std::string getDebugDumpDir( const char *pUUID, const char *pUID); /** - * Deletes a row from database. If a deleting is - * successfull, it returns a debugdump directort, which is not - * deleted. Otherwise, it returns empty string. - * @param pUUID A local UUID of a crash. - * @param pUID An UID of an user. - * @return A debugdump directory. - */ -std::string DeleteCrashInfo(const char *pUUID, - const char *pUID); -/** * Saves debugdump into database. If saving is successful, * it fills crash info. * @param pDebugDumpDir A debugdump directory. @@ -122,7 +112,7 @@ std::string DeleteCrashInfo(const char *pUUID, * @return It return results of operation. See mw_result_t. */ mw_result_t SaveDebugDump(const char *pDebugDumpDir, - map_crash_info_t& pCrashInfo); + map_crash_info_t& pCrashInfo); /** * Get one crash info. If getting is successful, * then crash info is filled. @@ -131,9 +121,9 @@ mw_result_t SaveDebugDump(const char *pDebugDumpDir, * @param pCrashInfo A crash info. * @return It return results of operation. See mw_result_t. */ -mw_result_t GetCrashInfo(const char *pUUID, - const char *pUID, - map_crash_info_t& pCrashInfo); +mw_result_t FillCrashInfo(const char *pUUID, + const char *pUID, + map_crash_info_t& pCrashInfo); /** * Gets all local UUIDs and UIDs of crashes. These crashes * occurred when a particular user was logged in. diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp index 58151b2..82f22e8 100644 --- a/src/Daemon/PluginManager.cpp +++ b/src/Daemon/PluginManager.cpp @@ -286,11 +286,11 @@ CAnalyzer* CPluginManager::GetAnalyzer(const char *pName) map_plugins_t::iterator plugin = m_mapPlugins.find(pName); if (plugin == m_mapPlugins.end()) { - throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName)); + throw CABRTException(EXCEP_PLUGIN, "Plugin '%s' is not registered", pName); } if (m_mapABRTPlugins[pName]->GetType() != ANALYZER) { - throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not an analyzer plugin", pName)); + throw CABRTException(EXCEP_PLUGIN, "Plugin '%s' is not an analyzer plugin", pName); } return (CAnalyzer*)(plugin->second); } @@ -300,11 +300,11 @@ CReporter* CPluginManager::GetReporter(const char *pName) map_plugins_t::iterator plugin = m_mapPlugins.find(pName); if (plugin == m_mapPlugins.end()) { - throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName)); + throw CABRTException(EXCEP_PLUGIN, "Plugin '%s' is not registered", pName); } if (m_mapABRTPlugins[pName]->GetType() != REPORTER) { - throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not a reporter plugin", pName)); + throw CABRTException(EXCEP_PLUGIN, "Plugin '%s' is not a reporter plugin", pName); } return (CReporter*)(plugin->second); } @@ -314,11 +314,11 @@ CAction* CPluginManager::GetAction(const char *pName) map_plugins_t::iterator plugin = m_mapPlugins.find(pName); if (plugin == m_mapPlugins.end()) { - throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName)); + throw CABRTException(EXCEP_PLUGIN, "Plugin '%s' is not registered", pName); } if (m_mapABRTPlugins[pName]->GetType() != ACTION) { - throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not an action plugin", pName)); + throw CABRTException(EXCEP_PLUGIN, "Plugin '%s' is not an action plugin", pName); } return (CAction*)(plugin->second); } @@ -328,11 +328,11 @@ CDatabase* CPluginManager::GetDatabase(const char *pName) map_plugins_t::iterator plugin = m_mapPlugins.find(pName); if (plugin == m_mapPlugins.end()) { - throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName)); + throw CABRTException(EXCEP_PLUGIN, "Plugin '%s' is not registered", pName); } if (m_mapABRTPlugins[pName]->GetType() != DATABASE) { - throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not a database plugin", pName)); + throw CABRTException(EXCEP_PLUGIN, "Plugin '%s' is not a database plugin", pName); } return (CDatabase*)(plugin->second); } @@ -342,7 +342,7 @@ plugin_type_t CPluginManager::GetPluginType(const char *pName) map_plugins_t::iterator plugin = m_mapPlugins.find(pName); if (plugin == m_mapPlugins.end()) { - throw CABRTException(EXCEP_PLUGIN, ssprintf("Plugin '%s' is not registered", pName)); + throw CABRTException(EXCEP_PLUGIN, "Plugin '%s' is not registered", pName); } return m_mapABRTPlugins[pName]->GetType(); } diff --git a/src/Daemon/abrt-debuginfo-install b/src/Daemon/abrt-debuginfo-install index 23379b4..6278b63 100755 --- a/src/Daemon/abrt-debuginfo-install +++ b/src/Daemon/abrt-debuginfo-install @@ -148,7 +148,7 @@ print_package_names() { yumopts="-C" echo "`count_words $missing_debuginfo_files` missing debuginfos, getting package list from cache" >&2 else - echo "`count_words $missing_debuginfo_files` missing debuginfos, getting package list" >&2 + echo "`count_words $missing_debuginfo_files` missing debuginfos, getting package list from repositories" >&2 fi local cmd="yum $yumopts --enablerepo=*debuginfo* --quiet provides $missing_debuginfo_files" echo "$cmd" >"yum_provides.$1.OUT" diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py index 665f17a..85987e8 100644 --- a/src/Gui/CCDBusBackend.py +++ b/src/Gui/CCDBusBackend.py @@ -152,7 +152,7 @@ class DBusManager(gobject.GObject): # TODO: check that it is indeed OUR job: # remember uuid in getReport and compare here print "Our job for UUID %s is done." % uuid - dump = self.daemon().GetJobResult(uuid) + dump = self.daemon().CreateReport(uuid) if dump: self.emit("analyze-complete", dump) else: @@ -163,7 +163,7 @@ class DBusManager(gobject.GObject): def getReport(self, UUID, force=0): # 2nd param is "force recreating of backtrace etc" - self.daemon().CreateReport(UUID, force, timeout=60) + self.daemon().StartJob(UUID, force, timeout=60) def Report(self, report, reporters_settings = None): # map < Plguin_name vec <status, message> > diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py index 88d931b..7de389b 100644 --- a/src/Gui/CCMainWindow.py +++ b/src/Gui/CCMainWindow.py @@ -60,18 +60,11 @@ class MainWindow(): self.pBarWindow.set_transient_for(self.window) self.pBar = self.wTree.get_widget("pBar") - # set colours for description heading - self.wTree.get_widget("evDescription").modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("black")) - #init the dumps treeview self.dlist = self.wTree.get_widget("tvDumps") #rows of items with: - #icon, package_name, application, date, crash_rate, user (only if root), is_reported, ?object? - if os.getuid() == 0: - # root - self.dumpsListStore = gtk.ListStore(gtk.gdk.Pixbuf, str,str,str,str,str,bool, object) - else: - self.dumpsListStore = gtk.ListStore(gtk.gdk.Pixbuf, str,str,str,str,bool, object) + #icon, package_name, application, date, crash_rate, user, is_reported, ?object? + self.dumpsListStore = gtk.ListStore(gtk.gdk.Pixbuf, str,str,str,str,str,bool, object) # set filter self.modelfilter = self.dumpsListStore.filter_new() self.modelfilter.set_visible_func(self.filter_dumps, None) @@ -82,16 +75,15 @@ class MainWindow(): icon_column.cell.set_property('cell-background', "#C9C9C9") n = self.dlist.append_column(icon_column) icon_column.pack_start(icon_column.cell, False) - icon_column.set_attributes(icon_column.cell, pixbuf=(n-1), cell_background_set=5+(os.getuid() == 0)) + icon_column.set_attributes(icon_column.cell, pixbuf=(n-1), cell_background_set=6) # =============================================== columns = [None]*4 columns[0] = gtk.TreeViewColumn(_("Package")) columns[1] = gtk.TreeViewColumn(_("Application")) columns[2] = gtk.TreeViewColumn(_("Date")) columns[3] = gtk.TreeViewColumn(_("Crash count")) - if os.getuid() == 0: - column = gtk.TreeViewColumn(_("User")) - columns.append(column) + column = gtk.TreeViewColumn(_("User")) + columns.append(column) # create list for column in columns: n = self.dlist.append_column(column) @@ -100,7 +92,7 @@ class MainWindow(): #column.set_attributes(column.cell, ) # FIXME: use some relative indexing column.cell.set_property('cell-background', "#C9C9C9") - column.set_attributes(column.cell, text=(n-1), cell_background_set=5+(os.getuid() == 0)) + column.set_attributes(column.cell, text=(n-1), cell_background_set=6) column.set_resizable(True) #connect signals self.dlist.connect("cursor-changed", self.on_tvDumps_cursor_changed) @@ -204,18 +196,14 @@ class MainWindow(): icon = get_icon_for_package(self.theme, entry.getPackageName()) except: icon = None - if os.getuid() == 0: - user = "N/A" - if entry.getUID() != "-1": - try: - user = pwd.getpwuid(int(entry.getUID()))[0] - except Exception, e: - user = "UID: %s" % entry.getUID() - n = self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(), - entry.getTime("%c"), entry.getCount(), user, entry.isReported(), entry]) - else: - n = self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(), - entry.getTime("%c"), entry.getCount(), entry.isReported(), entry]) + user = "N/A" + if entry.getUID() != "-1": + try: + user = pwd.getpwuid(int(entry.getUID()))[0] + except Exception, e: + user = "UID: %s" % entry.getUID() + n = self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(), + entry.getTime("%c"), entry.getCount(), user, entry.isReported(), entry]) # activate the first row if any.. if n: # we can use (0,) as path for the first row, but what if API changes? @@ -230,7 +218,6 @@ class MainWindow(): if not path: self.wTree.get_widget("bDelete").set_sensitive(False) self.wTree.get_widget("bReport").set_sensitive(False) - self.wTree.get_widget("lDescription").set_label("") return self.wTree.get_widget("bDelete").set_sensitive(True) self.wTree.get_widget("bReport").set_sensitive(True) @@ -248,7 +235,6 @@ class MainWindow(): else: self.wTree.get_widget("lReported").set_markup(_("<b>Not reported!</b>")) lPackage = self.wTree.get_widget("lPackage") - self.wTree.get_widget("lDescription").set_label(dump.getDescription()) def on_bDelete_clicked(self, button, treeview): dumpsListStore, path = self.dlist.get_selection().get_selected_rows() @@ -257,11 +243,9 @@ class MainWindow(): # this should work until we keep the row object in the last position dump = dumpsListStore.get_value(dumpsListStore.get_iter(path[0]), dumpsListStore.get_n_columns()-1) try: - if self.ccdaemon.DeleteDebugDump(dump.getUUID()): - self.hydrate() - treeview.emit("cursor-changed") - else: - print "Couldn't delete" + self.ccdaemon.DeleteDebugDump(dump.getUUID()) + self.hydrate() + treeview.emit("cursor-changed") except Exception, e: print e diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py index 8e86ee4..d943c0d 100644 --- a/src/Gui/CCReporterDialog.py +++ b/src/Gui/CCReporterDialog.py @@ -96,7 +96,7 @@ class ReporterDialog(): if not (self.check_settings(daemon) and self.check_report()): dialog.stop_emission("response") self.wTree.get_widget("bSend").stop_emission("clicked") - + def on_send_toggled(self, cell, path, model): model[path][3] = not model[path][3] @@ -130,7 +130,7 @@ class ReporterDialog(): im = gtk.Image() im.set_from_stock(gtk.STOCK_APPLY, gtk.ICON_SIZE_MENU) box.remove(image) - box.pack_start(im) + box.pack_start(im, expand = False, fill = False) im.show() image.destroy() button.set_sensitive(False) @@ -155,12 +155,13 @@ class ReporterDialog(): vbWrongSettings = builder.get_object("vbWrongSettings") for plugin in wrong_conf_plugs: hbox = gtk.HBox() + hbox.set_spacing(6) image = gtk.Image() image.set_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_MENU) button = gtk.Button(plugin.getName()) button.connect("clicked", self.on_config_plugin_clicked, plugin, image) hbox.pack_start(button) - hbox.pack_start(image) + hbox.pack_start(image, expand = False, fill = False) vbWrongSettings.pack_start(hbox) vbWrongSettings.show_all() dialog.set_transient_for(self.window) @@ -216,26 +217,32 @@ class ReporterDialog(): except: package = None ebErrors = self.wTree.get_widget("ebErrors") + fReproducer = self.wTree.get_widget("fReproducer") + fComments = self.wTree.get_widget("fComments") lErrors = self.wTree.get_widget("lErrors") bSend = self.wTree.get_widget("bSend") # not usable report if int(self.report[item][CD_CONTENT]) < 3: ebErrors.show() - ebErrors.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("red")) + fReproducer.hide() + fComments.hide() if package: lErrors.set_markup( - "<span color=\"white\">%s</span>" % _("Reporting disabled because the backtrace is unusable.\nPlease try to install debuginfo manually using command:<span color=\"blue\"> debuginfo-install %s </span>\nthen use Refresh button to regenerate the backtrace." % package[0:package.rfind('-',0,package.rfind('-'))])) + _("Reporting disabled because the backtrace is unusable.\nPlease try to install debuginfo manually using command: <b>debuginfo-install %s</b> \nthen use Refresh button to regenerate the backtrace." % package[0:package.rfind('-',0,package.rfind('-'))])) else: - lErrors.set_markup("<span color=\"white\">%s</span>" % _("The backtrace is unusable, you can't report this!")) + lErrors.set_markup(_("The backtrace is unusable, you can't report this!")) bSend.set_sensitive(False) # probably usable 3 elif int(self.report[item][CD_CONTENT]) < 4: ebErrors.show() - ebErrors.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("yellow")) - lErrors.set_markup("<span color=\"black\">%s</span>" % _("The backtrace is incomplete, please make sure you provide good steps to reproduce.")) + fReproducer.hide() + fComments.hide() + lErrors.set_markup(_("The backtrace is incomplete, please make sure you provide good steps to reproduce.")) bSend.set_sensitive(True) else: ebErrors.hide() + fReproducer.show() + fComments.show() bSend.set_sensitive(True) if self.report[item][CD_TYPE] != CD_SYS: @@ -273,7 +280,7 @@ class ReporterDialog(): def check_report(self): # FIXME: what to do if user press "Not to send BT and then press cancel" - # it uncheck the backtrace and let him to edit it, and then user might + # it uncheck the backtrace and let him to edit it, and then user might # not noticed, that he is not sending the BT, so should we warn user about this # or check the BT automatically? attributes = ["item", "content", "editable", "send", "attachment"] diff --git a/src/Gui/ConfBackend.py b/src/Gui/ConfBackend.py index 72657f5..5e26f3e 100644 --- a/src/Gui/ConfBackend.py +++ b/src/Gui/ConfBackend.py @@ -15,7 +15,7 @@ class ConfBackendInitError(Exception): def __str__(self): return self.what - + class ConfBackendSaveError(Exception): def __init__(self, msg): Exception.__init__(self) diff --git a/src/Gui/PluginsSettingsDialog.py b/src/Gui/PluginsSettingsDialog.py index 39fc7a6..8453385 100644 --- a/src/Gui/PluginsSettingsDialog.py +++ b/src/Gui/PluginsSettingsDialog.py @@ -104,6 +104,7 @@ class PluginsSettingsDialog: n = self.pluginsListStore.append(plugin_rows[entry.getType()],["<b>%s</b>\n%s" % (entry.getName(), entry.Description), entry.Enabled == "yes", 1, 0, "white", entry]) self.pluginlist.expand_all() + def dehydrate(self): # we have nothing to save, plugin's does the work pass diff --git a/src/Gui/SettingsDialog.py b/src/Gui/SettingsDialog.py index cf42393..c2b292f 100644 --- a/src/Gui/SettingsDialog.py +++ b/src/Gui/SettingsDialog.py @@ -157,6 +157,7 @@ class SettingsDialog: def add_CronJob(self, job=None): hbox = gtk.HBox() + hbox.set_spacing(6) time = gtk.Entry() remove_image = gtk.Image() remove_image.set_from_stock("gtk-remove",gtk.ICON_SIZE_MENU) @@ -193,6 +194,7 @@ class SettingsDialog: def add_AnalyzerAction(self, action=None): #print "add_AnalyzerAction" hbox = gtk.HBox() + hbox.set_spacing(6) action_list = gtk.Entry() edit_actions = gtk.Button() edit_actions.set_tooltip_text("Edit actions") diff --git a/src/Gui/ccgui.glade b/src/Gui/ccgui.glade index e9fd96f..04bc26b 100644 --- a/src/Gui/ccgui.glade +++ b/src/Gui/ccgui.glade @@ -3,17 +3,22 @@ <!-- interface-requires gtk+ 2.14 --> <!-- interface-naming-policy toplevel-contextual --> <widget class="GtkWindow" id="pBarWindow"> + <property name="width_request">270</property> + <property name="border_width">12</property> <property name="title" translatable="yes">Please wait..</property> + <property name="resizable">False</property> <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="default_width">270</property> + <property name="transient_for">main_window3</property> <child> <widget class="GtkVBox" id="vbox1"> <property name="visible">True</property> + <property name="spacing">12</property> <child> - <widget class="GtkLabel" id="pbLabel"> + <widget class="GtkLabel" id="lStatus"> <property name="visible">True</property> - <property name="label" translatable="yes">Working...</property> + <property name="xalign">0</property> </widget> <packing> <property name="expand">False</property> @@ -23,43 +28,13 @@ <child> <widget class="GtkProgressBar" id="pBar"> <property name="visible">True</property> + <property name="text_xalign">0</property> </widget> <packing> <property name="expand">False</property> <property name="position">1</property> </packing> </child> - <child> - <widget class="GtkHBox" id="hbox1"> - <property name="visible">True</property> - <child> - <widget class="GtkArrow" id="arrow1"> - <property name="visible">True</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="lStatus"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes"> </property> - <property name="max_width_chars">8</property> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> </widget> </child> </widget> @@ -127,6 +102,7 @@ Zdenek Prikryl <zprikryl@redhat.com></property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> + <property name="always_show_image">True</property> </widget> </child> </widget> @@ -153,6 +129,7 @@ Zdenek Prikryl <zprikryl@redhat.com></property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> + <property name="always_show_image">True</property> </widget> </child> </widget> @@ -173,6 +150,7 @@ Zdenek Prikryl <zprikryl@redhat.com></property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> + <property name="always_show_image">True</property> </widget> </child> </widget> @@ -188,6 +166,7 @@ Zdenek Prikryl <zprikryl@redhat.com></property> <child> <widget class="GtkToolbar" id="toolbar1"> <property name="visible">True</property> + <property name="toolbar_style">both</property> <child> <widget class="GtkToolButton" id="bDelete"> <property name="visible">True</property> @@ -207,7 +186,7 @@ Zdenek Prikryl <zprikryl@redhat.com></property> <property name="sensitive">False</property> <property name="tooltip" translatable="yes">Report</property> <property name="label" translatable="yes">Report</property> - <property name="stock_id">gtk-save</property> + <property name="stock_id">gtk-go-up</property> </widget> <packing> <property name="expand">False</property> @@ -230,58 +209,48 @@ Zdenek Prikryl <zprikryl@redhat.com></property> </packing> </child> <child> - <widget class="GtkScrolledWindow" id="swDumps"> + <widget class="GtkVPaned" id="vpaned1"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> + <property name="border_width">12</property> + <property name="orientation">vertical</property> <child> - <widget class="GtkTreeView" id="tvDumps"> + <widget class="GtkScrolledWindow" id="swDumps"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">in</property> + <child> + <widget class="GtkTreeView" id="tvDumps"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </widget> + </child> </widget> + <packing> + <property name="resize">False</property> + <property name="shrink">False</property> + </packing> </child> - </widget> - <packing> - <property name="position">2</property> - </packing> - </child> - <child> - <widget class="GtkEventBox" id="evDescription"> - <property name="visible">True</property> - <child> - <widget class="GtkLabel" id="Description"> - <property name="visible">True</property> - <property name="xalign">0.05000000074505806</property> - <property name="label" translatable="yes"><span color="white">Description</span></property> - <property name="use_markup">True</property> - </widget> - </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">3</property> - </packing> - </child> - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="orientation">vertical</property> <child> - <widget class="GtkScrolledWindow" id="scrolledwindow1"> + <widget class="GtkScrolledWindow" id="scrolledwindow2"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hscrollbar_policy">automatic</property> <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">in</property> <child> - <widget class="GtkViewport" id="viewport1"> + <widget class="GtkViewport" id="viewport2"> <property name="visible">True</property> <property name="resize_mode">queue</property> + <property name="shadow_type">none</property> <child> - <widget class="GtkLabel" id="lDescription"> + <widget class="GtkLabel" id="lReported"> <property name="visible">True</property> - <property name="xalign">0.10000000149011612</property> - <property name="yalign">0.20000000298023224</property> + <property name="xalign">0</property> + <property name="yalign">0</property> + <property name="label" translatable="yes">Not Reported</property> <property name="selectable">True</property> </widget> </child> @@ -289,33 +258,22 @@ Zdenek Prikryl <zprikryl@redhat.com></property> </child> </widget> <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkLabel" id="lReported"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Not reported!</b></property> - <property name="use_markup">True</property> - <property name="justify">fill</property> - </widget> - <packing> - <property name="position">1</property> + <property name="resize">False</property> + <property name="shrink">True</property> </packing> </child> </widget> <packing> - <property name="position">4</property> + <property name="position">2</property> </packing> </child> <child> <widget class="GtkStatusbar" id="statusbar1"> <property name="visible">True</property> - <property name="spacing">2</property> </widget> <packing> <property name="expand">False</property> - <property name="position">5</property> + <property name="position">3</property> </packing> </child> </widget> @@ -329,6 +287,7 @@ Zdenek Prikryl <zprikryl@redhat.com></property> <property name="visible">True</property> <property name="use_underline">True</property> <property name="use_stock">True</property> + <property name="always_show_image">True</property> </widget> </child> <child> @@ -336,10 +295,11 @@ Zdenek Prikryl <zprikryl@redhat.com></property> <property name="label" translatable="yes">Report</property> <property name="visible">True</property> <property name="use_stock">False</property> + <property name="always_show_image">True</property> <child internal-child="image"> <widget class="GtkImage" id="image1"> <property name="visible">True</property> - <property name="stock">gtk-save</property> + <property name="stock">gtk-go-up</property> <property name="icon-size">1</property> </widget> </child> diff --git a/src/Gui/dialogs.glade b/src/Gui/dialogs.glade index 9d24864..b5e5273 100644 --- a/src/Gui/dialogs.glade +++ b/src/Gui/dialogs.glade @@ -3,8 +3,9 @@ <requires lib="gtk+" version="2.16"/> <!-- interface-naming-policy project-wide --> <object class="GtkDialog" id="ReportDialog"> - <property name="border_width">5</property> + <property name="border_width">6</property> <property name="title" translatable="yes">Report done</property> + <property name="resizable">False</property> <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="destroy_with_parent">True</property> @@ -14,13 +15,17 @@ <object class="GtkVBox" id="dialog-vbox2"> <property name="visible">True</property> <property name="orientation">vertical</property> - <property name="spacing">2</property> + <property name="spacing">12</property> <child> <object class="GtkHBox" id="main_hbox"> <property name="visible">True</property> + <property name="border_width">6</property> + <property name="spacing">12</property> <child> <object class="GtkImage" id="image1"> <property name="visible">True</property> + <property name="xalign">0</property> + <property name="yalign">0</property> <property name="stock">gtk-dialog-info</property> <property name="icon-size">6</property> </object> diff --git a/src/Gui/report.glade b/src/Gui/report.glade index 29c5c28..08777fb 100644 --- a/src/Gui/report.glade +++ b/src/Gui/report.glade @@ -3,161 +3,209 @@ <!-- interface-requires gtk+ 2.16 --> <!-- interface-naming-policy toplevel-contextual --> <widget class="GtkDialog" id="reporter_dialog"> - <property name="border_width">5</property> + <property name="border_width">6</property> <property name="title" translatable="yes">Report</property> + <property name="modal">True</property> <property name="window_position">center-on-parent</property> <property name="default_width">400</property> <property name="default_height">400</property> - <property name="type_hint">dialog</property> + <property name="type_hint">normal</property> <property name="has_separator">False</property> <child internal-child="vbox"> <widget class="GtkVBox" id="dialog-vbox4"> <property name="visible">True</property> <property name="orientation">vertical</property> - <property name="spacing">2</property> + <property name="spacing">12</property> <child> - <widget class="GtkVBox" id="vbox5"> + <widget class="GtkVBox" id="vbox1"> <property name="visible">True</property> <property name="orientation">vertical</property> + <property name="spacing">12</property> <child> - <widget class="GtkLabel" id="label10"> - <property name="visible">True</property> - <property name="label" translatable="yes">Report</property> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow5"> + <widget class="GtkVBox" id="vboxNonError"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> <child> - <widget class="GtkTreeView" id="tvReport"> + <widget class="GtkFrame" id="frame1"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <widget class="GtkAlignment" id="alignment3"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">in</property> + <child> + <widget class="GtkTreeView" id="tvReport"> + <property name="visible">True</property> + <property name="can_focus">True</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Following items will be send</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> + <packing> + <property name="position">0</property> + </packing> </child> - </widget> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <widget class="GtkEventBox" id="ebErrors"> - <property name="visible">True</property> <child> - <widget class="GtkLabel" id="lErrors"> + <widget class="GtkFrame" id="fReproducer"> <property name="visible">True</property> - <property name="label" translatable="yes"> </property> - <property name="use_markup">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <widget class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow3"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <child> + <widget class="GtkViewport" id="viewport1"> + <property name="visible">True</property> + <property name="resize_mode">queue</property> + <child> + <widget class="GtkTextView" id="tevHowToReproduce"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="wrap_mode">word-char</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>How to reproduce (in a few simple steps)</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> - </packing> - </child> - </widget> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <widget class="GtkEventBox" id="eventbox2"> - <property name="visible">True</property> <child> - <widget class="GtkLabel" id="lHowToReproduce"> + <widget class="GtkFrame" id="fComments"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="ypad">2</property> - <property name="label" translatable="yes">How to reproduce (in a few simple steps)</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <widget class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="left_padding">12</property> + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <child> + <widget class="GtkViewport" id="viewport2"> + <property name="visible">True</property> + <property name="resize_mode">queue</property> + <child> + <widget class="GtkTextView" id="tvComment"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="wrap_mode">word-char</property> + </widget> + </child> + </widget> + </child> + </widget> + </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Comment</b></property> + <property name="use_markup">True</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">2</property> + </packing> </child> </widget> <packing> - <property name="expand">False</property> <property name="position">0</property> </packing> </child> <child> - <widget class="GtkScrolledWindow" id="scrolledwindow2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> - <child> - <widget class="GtkTextView" id="tevHowToReproduce"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="wrap_mode">word-char</property> - </widget> - </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">2</property> - </packing> - </child> - <child> - <widget class="GtkVBox" id="vbox1"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <widget class="GtkEventBox" id="eventbox1"> + <widget class="GtkHBox" id="ebErrors"> <property name="visible">True</property> + <property name="spacing">12</property> <child> - <widget class="GtkLabel" id="lComment"> + <widget class="GtkImage" id="image1"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="ypad">2</property> - <property name="label" translatable="yes">Comment</property> + <property name="stock">gtk-dialog-warning</property> + <property name="icon-size">6</property> </widget> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> </child> - </widget> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <widget class="GtkScrolledWindow" id="scrolledwindow1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">automatic</property> - <property name="vscrollbar_policy">automatic</property> <child> - <widget class="GtkTextView" id="tvComment"> + <widget class="GtkLabel" id="lErrors"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="wrap_mode">word-char</property> + <property name="label" translatable="yes"> </property> + <property name="use_markup">True</property> </widget> + <packing> + <property name="position">1</property> + </packing> </child> </widget> <packing> <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> </widget> <packing> - <property name="expand">False</property> - <property name="position">3</property> + <property name="position">0</property> </packing> </child> <child internal-child="action_area"> @@ -212,7 +260,7 @@ <packing> <property name="expand">False</property> <property name="pack_type">end</property> - <property name="position">0</property> + <property name="position">1</property> </packing> </child> </widget> diff --git a/src/Gui/settings.glade b/src/Gui/settings.glade index 094286b..655c15b 100644 --- a/src/Gui/settings.glade +++ b/src/Gui/settings.glade @@ -5,175 +5,216 @@ <object class="GtkWindow" id="wPluginsSettings"> <property name="title" translatable="yes">Settings</property> <property name="modal">True</property> + <property name="window_position">center-on-parent</property> <property name="default_width">450</property> <property name="default_height">400</property> <child> - <object class="GtkVBox" id="vbox1"> + <object class="GtkVBox" id="vboxabc1"> <property name="visible">True</property> + <property name="border_width">12</property> <property name="orientation">vertical</property> + <property name="spacing">12</property> <child> - <placeholder/> - </child> - <child> - <object class="GtkScrolledWindow" id="scrolledwindow1"> + <object class="GtkVBox" id="vboxl1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hscrollbar_policy">never</property> - <property name="vscrollbar_policy">automatic</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> - <object class="GtkTreeView" id="tvSettings"> + <object class="GtkScrolledWindow" id="scrolledwindowx1"> <property name="visible">True</property> <property name="can_focus">True</property> - </object> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkExpander" id="exPluginDetails"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <child> - <object class="GtkVBox" id="vbox2"> - <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="resize_mode">immediate</property> + <property name="hscrollbar_policy">never</property> + <property name="vscrollbar_policy">automatic</property> + <property name="shadow_type">in</property> <child> - <object class="GtkLabel" id="lPluginName"> + <object class="GtkTreeView" id="tvSettings"> <property name="visible">True</property> - <property name="xalign">0.05000000074505806</property> - <property name="label" translatable="yes">Nothing selected</property> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="lPluginDescription"> - <property name="visible">True</property> - <property name="label" translatable="yes">Nothing selected</property> + <property name="can_focus">True</property> </object> - <packing> - <property name="position">1</property> - </packing> </child> + </object> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkExpander" id="expander1"> + <property name="visible">True</property> + <property name="can_focus">True</property> <child> - <object class="GtkTable" id="table1"> + <object class="GtkAlignment" id="alignment1"> <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">3</property> - <property name="homogeneous">True</property> - <child> - <object class="GtkLabel" id="label4"> - <property name="visible">True</property> - <property name="xalign">2.2351741291171123e-10</property> - <property name="xpad">5</property> - <property name="label" translatable="yes">Web Site:</property> - </object> - <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - </packing> - </child> + <property name="left_padding">12</property> <child> - <object class="GtkLabel" id="label2"> + <object class="GtkHBox" id="hboxx1"> <property name="visible">True</property> - <property name="xalign">2.2351741291171123e-10</property> - <property name="xpad">5</property> - <property name="label" translatable="yes">Author:</property> - </object> - <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label3"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="xpad">5</property> - <property name="label" translatable="yes">Version:</property> - </object> - <packing> - <property name="x_options">GTK_FILL</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="lPluginVersion"> - <property name="visible">True</property> - <property name="xalign">2.2351741291171123e-10</property> - <property name="label" translatable="yes">Nothing selected</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <object class="GtkLabel" id="lPluginAuthor"> - <property name="visible">True</property> - <property name="xalign">2.2351741291171123e-10</property> - <property name="label" translatable="yes">Nothing selected</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="lPluginWebSite"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Nothing selected</property> + <child> + <object class="GtkTable" id="table2"> + <property name="visible">True</property> + <property name="n_rows">5</property> + <property name="n_columns">2</property> + <property name="column_spacing">12</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Web Site:</property> + </object> + <packing> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">GTK_FILL</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label7"> + <property name="visible">True</property> + <property name="xalign">2.2351741291171123e-10</property> + <property name="label" translatable="yes">Author:</property> + </object> + <packing> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label8"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Version:</property> + </object> + <packing> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">GTK_FILL</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="lPluginVersion"> + <property name="visible">True</property> + <property name="xalign">2.2351741291171123e-10</property> + <property name="selectable">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">GTK_FILL</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="lPluginAuthor"> + <property name="visible">True</property> + <property name="xalign">2.2351741291171123e-10</property> + <property name="selectable">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="lPluginWebSite"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="selectable">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">GTK_FILL</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Description:</property> + </object> + <packing> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label10"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Name:</property> + </object> + </child> + <child> + <object class="GtkLabel" id="lPluginDescription"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="selectable">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="lPluginName"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="selectable">True</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> </object> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - </packing> </child> </object> - <packing> - <property name="position">2</property> - </packing> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Plugin details</b></property> + <property name="use_markup">True</property> + </object> </child> </object> - </child> - <child type="label"> - <object class="GtkLabel" id="label1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Plugin Details</property> - </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> </child> </object> <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">2</property> + <property name="position">0</property> </packing> </child> <child> - <object class="GtkHBox" id="hbox1"> + <object class="GtkHButtonBox" id="hbuttonbox1"> <property name="visible">True</property> - <property name="spacing">11</property> - <child> - <object class="GtkAlignment" id="alignment1"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> + <property name="spacing">12</property> + <property name="layout_style">end</property> <child> <object class="GtkButton" id="bConfigurePlugin"> <property name="label" translatable="yes">C_onfigure plugin</property> @@ -183,7 +224,9 @@ <property name="use_underline">True</property> </object> <packing> - <property name="position">1</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> </packing> </child> <child> @@ -195,23 +238,16 @@ <property name="use_stock">True</property> </object> <packing> - <property name="position">2</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> <packing> <property name="expand">False</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkStatusbar" id="statusbar1"> - <property name="visible">True</property> - <property name="spacing">2</property> - </object> - <packing> - <property name="expand">False</property> - <property name="position">4</property> + <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> @@ -220,21 +256,28 @@ <object class="GtkWindow" id="wGlobalSettings"> <property name="title" translatable="yes">Global Settings</property> <property name="modal">True</property> + <property name="window_position">center-on-parent</property> <property name="default_width">450</property> <property name="default_height">400</property> <child> <object class="GtkVBox" id="gsvbox1"> <property name="visible">True</property> + <property name="border_width">12</property> <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> <object class="GtkNotebook" id="notebook1"> <property name="visible">True</property> <property name="can_focus">True</property> + <property name="show_border">False</property> <child> <object class="GtkTable" id="common_table"> <property name="visible">True</property> + <property name="border_width">6</property> <property name="n_rows">5</property> <property name="n_columns">2</property> + <property name="column_spacing">12</property> + <property name="row_spacing">6</property> <child> <object class="GtkCheckButton" id="cbOpenGPGCheck"> <property name="label" translatable="yes">Check package GPG signature</property> @@ -258,6 +301,7 @@ <packing> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> </packing> </child> @@ -283,6 +327,7 @@ <packing> <property name="top_attach">2</property> <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> </packing> </child> @@ -296,6 +341,7 @@ <packing> <property name="top_attach">3</property> <property name="bottom_attach">4</property> + <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> </packing> </child> @@ -309,6 +355,7 @@ <packing> <property name="top_attach">4</property> <property name="bottom_attach">5</property> + <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> </packing> </child> @@ -331,6 +378,7 @@ <child> <object class="GtkHBox" id="blhbox"> <property name="visible">True</property> + <property name="spacing">6</property> <child> <object class="GtkEntry" id="eBlacklist"> <property name="visible">True</property> @@ -346,7 +394,6 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes">Edit blacklisted packages</property> <property name="image">imEdit</property> </object> <packing> @@ -367,6 +414,7 @@ <child> <object class="GtkHBox" id="gpghbox"> <property name="visible">True</property> + <property name="spacing">6</property> <child> <object class="GtkEntry" id="eOpenGPGPublicKeys"> <property name="visible">True</property> @@ -414,7 +462,9 @@ <child> <object class="GtkVBox" id="cron_vbox"> <property name="visible">True</property> + <property name="border_width">6</property> <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> <object class="GtkScrolledWindow" id="swCronJobs"> <property name="visible">True</property> @@ -425,6 +475,7 @@ <object class="GtkViewport" id="vpCronJobs"> <property name="visible">True</property> <property name="resize_mode">queue</property> + <property name="shadow_type">none</property> <child> <object class="GtkVBox" id="cjvbox1"> <property name="visible">True</property> @@ -480,31 +531,10 @@ </packing> </child> <child> - <object class="GtkHBox" id="cron_add_button_hbox"> + <object class="GtkHButtonBox" id="hbuttonboxy1"> <property name="visible">True</property> - <property name="homogeneous">True</property> - <child> - <object class="GtkAlignment" id="add_alignment1"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="add_alignment2"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> + <property name="spacing">12</property> + <property name="layout_style">end</property> <child> <object class="GtkButton" id="bAddCronJob"> <property name="label">gtk-add</property> @@ -514,12 +544,15 @@ <property name="use_stock">True</property> </object> <packing> - <property name="position">2</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> </packing> </child> </object> <packing> <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> @@ -541,84 +574,90 @@ <child> <object class="GtkVBox" id="actions_vbox"> <property name="visible">True</property> + <property name="border_width">6</property> <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> - <object class="GtkHBox" id="ahbox1"> + <object class="GtkScrolledWindow" id="scrolledwindow1"> <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> <child> - <object class="GtkLabel" id="lReporter"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Analyzer plugin</b></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="lAssociatedActions"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Associated action</b></property> - <property name="use_markup">True</property> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="action_lbl_align"> + <object class="GtkViewport" id="viewportA1"> <property name="visible">True</property> + <property name="resize_mode">queue</property> + <property name="shadow_type">none</property> <child> - <placeholder/> + <object class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkHBox" id="ahbox1"> + <property name="visible">True</property> + <child> + <object class="GtkLabel" id="lReporter"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Analyzer plugin</b></property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="lAssociatedActions"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Associated action</b></property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkAlignment" id="action_lbl_align"> + <property name="visible">True</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbActions"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="position">1</property> + </packing> + </child> + </object> </child> </object> - <packing> - <property name="position">2</property> - </packing> </child> </object> <packing> - <property name="expand">False</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkVBox" id="vbActions"> + <object class="GtkHButtonBox" id="hbuttonbox2"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkHBox" id="actions_button_hbox"> - <property name="visible">True</property> - <child> - <object class="GtkAlignment" id="act_align1"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkAlignment" id="act_align2"> - <property name="visible">True</property> - <child> - <placeholder/> - </child> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> + <property name="spacing">12</property> + <property name="layout_style">end</property> <child> <object class="GtkButton" id="bAddAction"> <property name="label">gtk-add</property> @@ -628,13 +667,16 @@ <property name="use_stock">True</property> </object> <packing> - <property name="position">2</property> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> </packing> </child> </object> <packing> <property name="expand">False</property> - <property name="position">2</property> + <property name="fill">False</property> + <property name="position">1</property> </packing> </child> </object> @@ -658,55 +700,36 @@ </packing> </child> <child> - <object class="GtkHBox" id="button_align_hbox"> + <object class="GtkHButtonBox" id="hbuttonboxx1"> <property name="visible">True</property> - <property name="homogeneous">True</property> + <property name="spacing">12</property> + <property name="layout_style">end</property> <child> - <object class="GtkAlignment" id=" button_alignment"> + <object class="GtkButton" id="bCancelSettings"> + <property name="label" translatable="yes">gtk-cancel</property> <property name="visible">True</property> - <child> - <placeholder/> - </child> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> </object> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">0</property> </packing> </child> <child> - <object class="GtkHBox" id="shbox1"> + <object class="GtkButton" id="bSaveSettings"> + <property name="label" translatable="yes">gtk-ok</property> <property name="visible">True</property> - <property name="spacing">14</property> - <property name="homogeneous">True</property> - <child> - <object class="GtkButton" id="bCancelSettings"> - <property name="label">gtk-cancel</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="use_stock">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkButton" id="bSaveSettings"> - <property name="label">gtk-ok</property> - <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="tooltip_text" translatable="yes">This function is not implemented yet!</property> - <property name="use_stock">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="position">1</property> - </packing> - </child> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> </object> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> @@ -724,21 +747,13 @@ <property name="upper">1000000</property> <property name="step_increment">1</property> </object> - <object class="GtkImage" id="imEdit"> - <property name="visible">True</property> - <property name="stock">gtk-edit</property> - <property name="icon-size">1</property> - </object> - <object class="GtkImage" id="imEdit1"> - <property name="visible">True</property> - <property name="stock">gtk-edit</property> - <property name="icon-size">1</property> - </object> <object class="GtkWindow" id="wGPGKeys"> <property name="title" translatable="yes">GPG Keys</property> <property name="modal">True</property> + <property name="window_position">center-on-parent</property> <property name="default_width">400</property> <property name="default_height">400</property> + <property name="transient_for">wGlobalSettings</property> <child> <object class="GtkVBox" id="gpgkeys_vbox"> <property name="visible">True</property> @@ -753,9 +768,11 @@ </packing> </child> <child> - <object class="GtkHBox" id="gpg_buttons_hbox"> + <object class="GtkHButtonBox" id="hbuttonboxblabla1"> <property name="visible">True</property> - <property name="homogeneous">True</property> + <property name="border_width">12</property> + <property name="spacing">12</property> + <property name="layout_style">end</property> <child> <object class="GtkButton" id="bAddGPGKey"> <property name="label">gtk-add</property> @@ -765,6 +782,8 @@ <property name="use_stock">True</property> </object> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">0</property> </packing> </child> @@ -777,6 +796,8 @@ <property name="use_stock">True</property> </object> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> @@ -789,6 +810,8 @@ <property name="use_stock">True</property> </object> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">2</property> </packing> </child> @@ -801,16 +824,29 @@ <property name="use_stock">True</property> </object> <packing> + <property name="expand">False</property> + <property name="fill">False</property> <property name="position">3</property> </packing> </child> </object> <packing> <property name="expand">False</property> + <property name="fill">False</property> <property name="position">1</property> </packing> </child> </object> </child> </object> + <object class="GtkImage" id="imEdit"> + <property name="visible">True</property> + <property name="stock">gtk-edit</property> + <property name="icon-size">1</property> + </object> + <object class="GtkImage" id="imEdit1"> + <property name="visible">True</property> + <property name="stock">gtk-edit</property> + <property name="icon-size">1</property> + </object> </interface> diff --git a/src/Gui/settings_wizard.glade b/src/Gui/settings_wizard.glade index feab435..e0d54a1 100644 --- a/src/Gui/settings_wizard.glade +++ b/src/Gui/settings_wizard.glade @@ -5,24 +5,47 @@ <object class="GtkDialog" id="WrongSettings"> <property name="border_width">5</property> <property name="title" translatable="yes">Wrong Settings Detected</property> + <property name="resizable">False</property> + <property name="window_position">center-on-parent</property> <property name="type_hint">normal</property> <property name="has_separator">False</property> <child internal-child="vbox"> <object class="GtkVBox" id="dialog-vbox3"> <property name="visible">True</property> <property name="orientation">vertical</property> - <property name="spacing">2</property> + <property name="spacing">6</property> <child> <object class="GtkVBox" id="ws_vbox1"> <property name="visible">True</property> <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> - <object class="GtkLabel" id="lWrongSettingsWarning"> + <object class="GtkHBox" id="hbox1"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>WARNING:</b> Wrong settings detected for some of the enabled reporter plugins, please use the buttons below to open respective configuration and fix it before you proceed, otherwise the reporting process can fail. + <property name="spacing">12</property> + <child> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="stock">gtk-dialog-warning</property> + <property name="icon-size">6</property> + </object> + <packing> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="lWrongSettingsWarning"> + <property name="visible">True</property> + <property name="label" translatable="yes">Wrong settings detected for some of the enabled reporter plugins, please use the buttons below to open respective configuration and fix it before you proceed, otherwise the reporting process can fail. </property> - <property name="use_markup">True</property> - <property name="wrap">True</property> + <property name="use_markup">True</property> + <property name="justify">fill</property> + <property name="wrap">True</property> + </object> + <packing> + <property name="position">1</property> + </packing> + </child> </object> <packing> <property name="position">0</property> @@ -32,6 +55,7 @@ <object class="GtkVBox" id="vbWrongSettings"> <property name="visible">True</property> <property name="orientation">vertical</property> + <property name="spacing">6</property> <child> <placeholder/> </child> diff --git a/src/Hooks/abrt-pyhook-helper.cpp b/src/Hooks/abrt-pyhook-helper.cpp index 08ccc12..0d15d78 100644 --- a/src/Hooks/abrt-pyhook-helper.cpp +++ b/src/Hooks/abrt-pyhook-helper.cpp @@ -1,5 +1,5 @@ /* - abrt-pyhook-helper.cpp - writes data to the /var/cache/abrt directory + abrt-pyhook-helper.cpp - writes data to the /var/cache/abrt directory with SUID bit Copyright (C) 2009 RedHat inc. |
