summaryrefslogtreecommitdiffstats
path: root/src/Gui
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2010-01-19 14:52:53 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2010-01-19 14:52:53 +0100
commit8ddcb9404d65bc6b09910099988fe6a0f33fe250 (patch)
tree2214c48219c8f3cf1b4110113467fa92d38bfa84 /src/Gui
parent04d69684f58d851ab604b2ed5eeb04f373efd4d8 (diff)
parentb348085ac9f3d4a7ded81026bffa962a065bdf97 (diff)
downloadabrt-8ddcb9404d65bc6b09910099988fe6a0f33fe250.tar.gz
abrt-8ddcb9404d65bc6b09910099988fe6a0f33fe250.tar.xz
abrt-8ddcb9404d65bc6b09910099988fe6a0f33fe250.zip
resolve conflict
Diffstat (limited to 'src/Gui')
-rw-r--r--src/Gui/CCDump.py34
-rw-r--r--src/Gui/CCDumpList.py5
-rw-r--r--src/Gui/CCMainWindow.py1
-rw-r--r--src/Gui/CCReport.py30
-rw-r--r--src/Gui/CCReporterDialog.py4
-rw-r--r--src/Gui/CC_gui_functions.py2
-rw-r--r--src/Gui/Makefile.am2
7 files changed, 24 insertions, 54 deletions
diff --git a/src/Gui/CCDump.py b/src/Gui/CCDump.py
index 212d4410..96d036c4 100644
--- a/src/Gui/CCDump.py
+++ b/src/Gui/CCDump.py
@@ -1,9 +1,11 @@
# -*- coding: utf-8 -*-
from datetime import datetime
-TYPE = 0
-EDITABLE = 1
-CONTENT = 2
+from abrt_utils import _, init_logging, log, log1, log2
+
+CD_TYPE = 0
+CD_EDITABLE = 1
+CD_CONTENT = 2
class Dump():
"""Class for mapping the debug dump to python object"""
@@ -19,40 +21,40 @@ class Dump():
self.Reported = None
def getUUID(self):
- return self.UUID[CONTENT]
+ return self.UUID[CD_CONTENT]
def getUID(self):
- return self.UID[CONTENT]
+ return self.UID[CD_CONTENT]
def getCount(self):
- return self.Count[CONTENT]
+ return self.Count[CD_CONTENT]
def getExecutable(self):
- return self.Executable[CONTENT]
+ return self.Executable[CD_CONTENT]
def getPackage(self):
- return self.Package[CONTENT]
+ return self.Package[CD_CONTENT]
def isReported(self):
- return self.Reported[CONTENT] == "1"
+ return self.Reported[CD_CONTENT] == "1"
def getMessage(self):
if not self.Message:
- return []
- #return self.Message[CONTENT].split('\n')
- return self.Message[CONTENT]
+ return "" #[]
+ #return self.Message[CD_CONTENT].split('\n')
+ return self.Message[CD_CONTENT]
def getTime(self,format):
#print format
if format:
try:
- return datetime.fromtimestamp(int(self.Time[CONTENT])).strftime(format)
+ return datetime.fromtimestamp(int(self.Time[CD_CONTENT])).strftime(format)
except Exception, e:
print e
- return int(self.Time[CONTENT])
+ return int(self.Time[CD_CONTENT])
def getPackageName(self):
- return self.Package[CONTENT][:self.Package[CONTENT].find("-")]
+ return self.Package[CD_CONTENT][:self.Package[CD_CONTENT].find("-")]
def getDescription(self):
- return self.Description[CONTENT]
+ return self.Description[CD_CONTENT]
diff --git a/src/Gui/CCDumpList.py b/src/Gui/CCDumpList.py
index a8657e0b..9888b10f 100644
--- a/src/Gui/CCDumpList.py
+++ b/src/Gui/CCDumpList.py
@@ -2,6 +2,8 @@
import CCDBusBackend
from CCDump import Dump
+from abrt_utils import _, init_logging, log, log1, log2
+
class DumpList(list):
"""Class to store list of debug dumps"""
def __init__(self,dbus_manager=None):
@@ -16,8 +18,7 @@ class DumpList(list):
for row in rows:
entry = Dump()
for column in row:
- #if column == "Reported":
- # print "DumpList adding %s:%s" % (column,row[column])
+ log2(" DumpList.%s='%s'", column, row[column])
entry.__dict__[column] = row[column]
self.append(entry)
except Exception, e:
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index 70f780a9..a8101d49 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -28,7 +28,6 @@ from CCDumpList import getDumpList, DumpList
from CCReporterDialog import ReporterDialog
from PluginsSettingsDialog import PluginsSettingsDialog
from SettingsDialog import SettingsDialog
-from CCReport import Report
from PluginList import getPluginInfoList
import ABRTExceptions
diff --git a/src/Gui/CCReport.py b/src/Gui/CCReport.py
deleted file mode 100644
index 90c8a3b5..00000000
--- a/src/Gui/CCReport.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- coding: utf-8 -*-
-
-class Report():
- """Class for mapping the report to pyhon object"""
- def __init__(self, report):
- self.UUID = None
- self.Architecture = None
- self.Kernel = None
- self.Release = None
- self.Executable = None
- self.CmdLine = None
- self.Package = None
- self.TextData1 = None
- self.TextData2 = None
- self.BinaryData1 = None
- self.BinaryData2 = None
- for item in report:
- self.__dict__[item] = report[item]
-
- def getUUID(self):
- return self.UUID
-
- def getArchitecture(self):
- return self.Architecture
-
- def getExecutable(self):
- return self.Executable
-
- def getPackage(self):
- return self.Package
diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py
index 47cf9089..2cba6074 100644
--- a/src/Gui/CCReporterDialog.py
+++ b/src/Gui/CCReporterDialog.py
@@ -6,7 +6,6 @@ import gtk.glade
import pango
import sys
from CC_gui_functions import *
-from CCReport import Report
import CellRenderers
from ABRTPlugin import PluginInfo
from PluginSettingsUI import PluginSettingsUI
@@ -22,7 +21,6 @@ CD_CONTENT = 2
CD_SYS = "s"
CD_BIN = "b"
CD_TXT = "t"
-CD_ATT = "a"
# response
REFRESH = -50
@@ -245,7 +243,7 @@ class ReporterDialog():
if self.report[item][CD_TYPE] != CD_SYS:
# item name 0| value 1| editable? 2| toggled? 3| visible?(attachment)4
# FIXME: handle editable fields
- if self.report[item][CD_TYPE] in [CD_ATT,CD_BIN]:
+ if self.report[item][CD_TYPE] == CD_BIN:
self.builder.get_object("fAttachment").show()
vbAttachments = self.builder.get_object("vbAttachments")
toggle = gtk.CheckButton(self.report[item][CD_CONTENT])
diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py
index 0379f205..a9c47faf 100644
--- a/src/Gui/CC_gui_functions.py
+++ b/src/Gui/CC_gui_functions.py
@@ -234,5 +234,5 @@ def show_log(log, parent=None):
if __name__ == "__main__":
window = gtk.Window()
- gui_report_dialog("<b>Bugzilla</b>: <span foreground='red'>CReporterBugzilla::Report(): CReporterBugzilla::Login(): RPC response indicates failure. The username or password you entered is not valid.</span>\n<b>Logger</b>: Report was stored into: /var/log/abrt-logger", window)
+ gui_report_dialog("<b>Bugzilla</b>: <span foreground='red'>CReporterBugzilla::Report(): CReporterBugzilla::Login(): RPC response indicates failure. The username or password you entered is not valid.</span>\n<b>Logger</b>: Report was stored into: /var/log/abrt.log", window)
gtk.main()
diff --git a/src/Gui/Makefile.am b/src/Gui/Makefile.am
index 60a7bfe3..3cac1ee8 100644
--- a/src/Gui/Makefile.am
+++ b/src/Gui/Makefile.am
@@ -3,7 +3,7 @@
bin_SCRIPTS = abrt-gui
PYTHON_FILES = CCDBusBackend.py CCDumpList.py CCDump.py CC_gui_functions.py \
- CCReporterDialog.py CCReport.py abrt_utils.py \
+ CCReporterDialog.py abrt_utils.py \
CCMainWindow.py CellRenderers.py ABRTExceptions.py \
SettingsDialog.py ABRTPlugin.py PluginList.py PluginSettingsUI.py \
PluginsSettingsDialog.py ConfBackend.py