Session Viewer: Add a warning dialog on loading
This commit is contained in:
parent
da800b7abb
commit
cbdfaf62a7
|
@ -50,11 +50,14 @@ import Database
|
||||||
import Filters
|
import Filters
|
||||||
import Charset
|
import Charset
|
||||||
|
|
||||||
|
DEBUG = False
|
||||||
|
|
||||||
class GuiSessionViewer (threading.Thread):
|
class GuiSessionViewer (threading.Thread):
|
||||||
def __init__(self, config, querylist, mainwin, debug=True):
|
def __init__(self, config, querylist, mainwin, debug=True):
|
||||||
self.debug = debug
|
self.debug = debug
|
||||||
self.conf = config
|
self.conf = config
|
||||||
self.sql = querylist
|
self.sql = querylist
|
||||||
|
self.window = mainwin
|
||||||
|
|
||||||
self.liststore = None
|
self.liststore = None
|
||||||
|
|
||||||
|
@ -153,6 +156,28 @@ class GuiSessionViewer (threading.Thread):
|
||||||
|
|
||||||
# make sure Hand column is not displayed
|
# make sure Hand column is not displayed
|
||||||
#[x for x in self.columns if x[0] == 'hand'][0][1] = False
|
#[x for x in self.columns if x[0] == 'hand'][0][1] = False
|
||||||
|
if DEBUG == False:
|
||||||
|
warning_string = """
|
||||||
|
Session Viewer is proof of concept code only, and contains many bugs.
|
||||||
|
|
||||||
|
Feel free to use the viewer, but there is no guarantee that the data is accurate.
|
||||||
|
|
||||||
|
If you are interested in developing the code further please contact us via the usual channels.
|
||||||
|
|
||||||
|
Thankyou
|
||||||
|
"""
|
||||||
|
self.warning_box(warning_string)
|
||||||
|
|
||||||
|
def warning_box(self, str, diatitle=_("FPDB WARNING")):
|
||||||
|
diaWarning = gtk.Dialog(title=diatitle, parent=self.window, flags=gtk.DIALOG_DESTROY_WITH_PARENT, buttons=(gtk.STOCK_OK,gtk.RESPONSE_OK))
|
||||||
|
|
||||||
|
label = gtk.Label(str)
|
||||||
|
diaWarning.vbox.add(label)
|
||||||
|
label.show()
|
||||||
|
|
||||||
|
response = diaWarning.run()
|
||||||
|
diaWarning.destroy()
|
||||||
|
return response
|
||||||
|
|
||||||
def get_vbox(self):
|
def get_vbox(self):
|
||||||
"""returns the vbox of this thread"""
|
"""returns the vbox of this thread"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user