possibly fixd everything
This commit is contained in:
@@ -47,7 +47,7 @@ def load_keys():
|
|||||||
fernet = Fernet(cryptoKey)
|
fernet = Fernet(cryptoKey)
|
||||||
|
|
||||||
def load_config():
|
def load_config():
|
||||||
global conn_info, settings
|
global conn_info, settings, hist_info
|
||||||
loaded_json = ""
|
loaded_json = ""
|
||||||
try:
|
try:
|
||||||
with open(HOMEDIR+"/.config/rdpconnect/history.json", "r") as history_file:
|
with open(HOMEDIR+"/.config/rdpconnect/history.json", "r") as history_file:
|
||||||
@@ -83,6 +83,7 @@ def load_config():
|
|||||||
print("[WARN] FILE: "+HOMEDIR+"/.config/rdpconnect/settings.json doesn't exist")
|
print("[WARN] FILE: "+HOMEDIR+"/.config/rdpconnect/settings.json doesn't exist")
|
||||||
|
|
||||||
class HistoryWindow(Gtk.Window):
|
class HistoryWindow(Gtk.Window):
|
||||||
|
global hist_info
|
||||||
def __init__(self, **kargs):
|
def __init__(self, **kargs):
|
||||||
super().__init__(**kargs, title='History')
|
super().__init__(**kargs, title='History')
|
||||||
|
|
||||||
@@ -102,6 +103,8 @@ class HistoryWindow(Gtk.Window):
|
|||||||
|
|
||||||
self.set_child(self.scroll)
|
self.set_child(self.scroll)
|
||||||
|
|
||||||
|
self.show()
|
||||||
|
|
||||||
def addRow(self, entry, index):
|
def addRow(self, entry, index):
|
||||||
runb = Gtk.Button(label=entry)
|
runb = Gtk.Button(label=entry)
|
||||||
runb.connect("clicked", self.apply_contents)
|
runb.connect("clicked", self.apply_contents)
|
||||||
@@ -234,6 +237,7 @@ class PreferencesWindow(Gtk.Window):
|
|||||||
|
|
||||||
|
|
||||||
class MyApp(Adw.Application):
|
class MyApp(Adw.Application):
|
||||||
|
global hist_info
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
self.connect('activate', self.on_activate)
|
self.connect('activate', self.on_activate)
|
||||||
@@ -293,9 +297,9 @@ class MyApp(Adw.Application):
|
|||||||
action.connect('activate', self.on_about)
|
action.connect('activate', self.on_about)
|
||||||
self.add_action(action)
|
self.add_action(action)
|
||||||
|
|
||||||
action = Gio.SimpleAction(name='history')
|
#action = Gio.SimpleAction(name='history')
|
||||||
action.connect('activate', self.on_history)
|
#action.connect('activate', self.on_history)
|
||||||
self.add_action(action)
|
#self.add_action(action)
|
||||||
|
|
||||||
def on_about(self, action, param):
|
def on_about(self, action, param):
|
||||||
about_dialog = Gtk.AboutDialog(transient_for=self.win, modal=True)
|
about_dialog = Gtk.AboutDialog(transient_for=self.win, modal=True)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
. <?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<!-- Created with Cambalache 0.92.2 -->
|
<!-- Created with Cambalache 0.92.2 -->
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-name preferences.ui -->
|
<!-- interface-name preferences.ui -->
|
||||||
|
|||||||
Reference in New Issue
Block a user