diff --git a/onionr/onionr.py b/onionr/onionr.py index 285c74bf..90a4b441 100755 --- a/onionr/onionr.py +++ b/onionr/onionr.py @@ -110,9 +110,9 @@ class Onionr: # Copy default plugins into plugins folder if not os.path.exists(plugins.get_plugins_folder()): - if os.path.exists('default-plugins/'): - names = [f for f in os.listdir("default-plugins/") if not os.path.isfile(f)] - shutil.copytree('default-plugins/', plugins.get_plugins_folder()) + if os.path.exists('static-data/default-plugins/'): + names = [f for f in os.listdir("static-data/default-plugins/") if not os.path.isfile(f)] + shutil.copytree('static-data/default-plugins/', plugins.get_plugins_folder()) # Enable plugins for name in names: @@ -216,7 +216,7 @@ class Onionr: } # initialize plugins - events.event('init', onionr = self) + events.event('init', onionr = self, threaded = False) command = '' try: diff --git a/onionr/default-plugins/gui/main.py b/onionr/static-data/default_plugins/gui/main.py similarity index 94% rename from onionr/default-plugins/gui/main.py rename to onionr/static-data/default_plugins/gui/main.py index cc865dbe..093d8f9c 100644 --- a/onionr/default-plugins/gui/main.py +++ b/onionr/static-data/default_plugins/gui/main.py @@ -73,9 +73,10 @@ def openGUI(): nodeInfo = tkinter.Frame(root) keyInfo = tkinter.Frame(root) - - print(pluginapi.get_onionr().get_hostname()) - idText = pluginapi.get_onionr().get_hostname() + + hostname = pluginapi.get_onionr().get_hostname() + logger.debug('hostname: %s' % hostname) + idText = hostname idEntry = tkinter.Entry(nodeInfo) tkinter.Label(nodeInfo, text="Node Address: ").pack(side=tkinter.LEFT) @@ -100,14 +101,14 @@ def openGUI(): sendEntry.pack(side=tkinter.TOP, pady=5) sendBtn.pack(side=tkinter.TOP) - listbox = tkinter.Listbox(root, yscrollcommand=tkinter.scrollbar.set, height=15) + listbox = tkinter.Listbox(root, yscrollcommand=tkinter.Scrollbar.set, height=15) listbox.pack(fill=tkinter.BOTH, pady=25) daemonStatus = tkinter.Label(root, text="Onionr Daemon Status: unknown") daemonStatus.pack() - scrollbar.config(command=tkinter.listbox.yview) + scrollbar.config(command=tkinter.Listbox.yview) root.after(2000, update) root.mainloop() diff --git a/onionr/default-plugins/pluginmanager/main.py b/onionr/static-data/default_plugins/pluginmanager/main.py similarity index 100% rename from onionr/default-plugins/pluginmanager/main.py rename to onionr/static-data/default_plugins/pluginmanager/main.py