diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-09-17 12:16:48 +0200 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-09-17 12:16:48 +0200 |
commit | 5a86973be999b43581e814412f0d52885abac5d4 (patch) | |
tree | 1ddbb5af77013dec00b4234ee583aff41eb43cae /src/Applet/CCApplet.cpp | |
parent | 9a742f012b9154c34d046dc67ba9ad904512ab60 (diff) | |
download | abrt-5a86973be999b43581e814412f0d52885abac5d4.tar.gz abrt-5a86973be999b43581e814412f0d52885abac5d4.tar.xz abrt-5a86973be999b43581e814412f0d52885abac5d4.zip |
add dbus signalization when quota exceeded
Diffstat (limited to 'src/Applet/CCApplet.cpp')
-rw-r--r-- | src/Applet/CCApplet.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp index 3893c77a..7b1a7f1b 100644 --- a/src/Applet/CCApplet.cpp +++ b/src/Applet/CCApplet.cpp @@ -193,6 +193,26 @@ void CApplet::Crash(const std::string& progname, const std::string& uid ) } } +void CApplet::QuotaExceed(const char* str) +{ + if (m_pSessionDBus->has_name("com.redhat.abrt.gui")) + { + return; + } + else + { + if(m_pQuotaExceedHandler) + { + m_pQuotaExceedHandler(str); + } + else + { + std::cout << _("This is default handler, you should register your own with ConnectQuotaExceedHandler") << std::endl; + std::cout.flush(); + } + } +} + void CApplet::DaemonStateChange_cb(bool running, void* data) { CApplet *applet = (CApplet *)data; @@ -211,6 +231,11 @@ void CApplet::ConnectCrashHandler(void (*pCrashHandler)(const char *progname)) m_pCrashHandler = pCrashHandler; } +void CApplet::ConnectQuotaExceedHandler(void (*pQuotaExceedHandler)(const char *progname)) +{ + m_pQuotaExceedHandler = pQuotaExceedHandler; +} + void CApplet::SetIconTooltip(const char *format, ...) { va_list args; |