X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=torbrowser-launcher;h=e811242caf12fbf42fe54fa8152f7ee095b2751d;hb=499c971308c687c55cd0b203c6439b34510f77c8;hp=e2fe460c6e95bc4e352d749d49a8dd3ee2702cfd;hpb=20fc0898533efcf7eb8c9e9bb79b912f63745cc6;p=torbrowser-launcher.git diff --git a/torbrowser-launcher b/torbrowser-launcher index e2fe460..e811242 100755 --- a/torbrowser-launcher +++ b/torbrowser-launcher @@ -1,65 +1,30 @@ -#!/usr/bin/env python - -import os -import locale -import subprocess - -import pygtk -pygtk.require('2.0') -import gtk - -class Base: - def delete_event(self, widget, event, data=None): - return False - - def destroy(self, widget, data=None): - gtk.main_quit() - - def __init__(self): - self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) - self.window.set_title("Tor Browser Launcher - First Run") - self.window.set_border_width(10) - - self.window.connect("delete_event", self.delete_event) - self.window.connect("destroy", self.destroy) - - self.box = gtk.VBox(False, 20) - self.window.add(self.box) - - self.label = gtk.Label("The first time you run the Tor Browser Launcher you need to download the Tor Browser Bundle from https://www.torproject.org/. Would you like to do that now?") - self.label.set_line_wrap(True) - self.box.pack_start(self.label, True, True, 0) - self.label.show() - - self.button_box = gtk.HButtonBox() - self.button_box.set_layout(gtk.BUTTONBOX_SPREAD) - self.box.pack_start(self.button_box, True, True, 0) - self.button_box.show() - - self.download = gtk.Button("Download") - self.button_box.add(self.download) - self.download.show() - - self.exit = gtk.Button("Exit") - self.exit.connect("clicked", self.destroy, None) - self.button_box.add(self.exit) - self.exit.show() - - self.box.show() - self.window.show(); - - def main(self): - gtk.main() - -if __name__ == "__main__": - # figure out the language and architecture - language = locale.getdefaultlocale()[0].split('_')[0] - architecture = subprocess.check_output(['arch']).strip('\n') - - # todo: is TBB already installed? - # if yes, launch it - # if no, show first run dialog - - # first run dialog - base = Base() - base.main() +#!/usr/bin/env python3 +""" +Tor Browser Launcher +https://github.com/micahflee/torbrowser-launcher/ + +Copyright (c) 2013-2017 Micah Lee + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +""" +import torbrowser_launcher +torbrowser_launcher.main()