]> git.lizzy.rs Git - torbrowser-launcher.git/commitdiff
settings dialog well under way. doesnt save changes yet though (#29)
authorMicah Lee <micahflee@riseup.net>
Tue, 16 Apr 2013 16:51:40 +0000 (09:51 -0700)
committerMicah Lee <micahflee@riseup.net>
Tue, 16 Apr 2013 16:51:40 +0000 (09:51 -0700)
torbrowser-launcher

index 586678a61ecb2b0f8e4847dbf595250779bc6caf..497fab084980b57b12ad4c168dfccfdb46a8b1d9 100755 (executable)
@@ -263,24 +263,70 @@ class TBLSettings:
         self.window.connect("destroy", self.destroy)
         
         # build the rest of the UI
-        self.box = gtk.VBox(False, 20)
+        self.box = gtk.VBox(False, 10)
         self.window.add(self.box)
+        self.box.show()
+
+        self.hbox = gtk.HBox(False, 10)
+        self.box.pack_start(self.hbox, True, True, 0)
+        self.hbox.show()
+
+        self.settings_box = gtk.VBox(False, 10)
+        self.hbox.pack_start(self.settings_box, True, True, 0)
+        self.settings_box.show()
+
+        self.labels_box = gtk.VBox(False, 10)
+        self.hbox.pack_start(self.labels_box, True, True, 0)
+        self.labels_box.show()
+
+        # preferred version
+        self.pref_ver_box = gtk.HBox(False, 10)
+        self.settings_box.pack_start(self.pref_ver_box, True, True, 0)
+        self.pref_ver_box.show()
+
+        self.pref_ver_label = gtk.Label(_('I prefer'))
+        self.pref_ver_label.set_line_wrap(True)
+        self.pref_ver_box.pack_start(self.pref_ver_label, True, True, 0)
+        self.pref_ver_label.show()
+
+        options = [
+            _('Tor Browser Bundle - stable'), 
+            _('Tor Browser Bundle - alpha'), 
+            _('Obsfproxy Tor Browser Bundle - stable'), 
+            _('Obsfproxy Tor Browser Bundle - alpha')
+        ]
+        self.pref_ver = gtk.combo_box_new_text()
+        for option in options:
+            self.pref_ver.append_text(option)
+        self.pref_ver.set_active(0)
+        self.pref_ver_box.pack_start(self.pref_ver, True, True, 0)
+        self.pref_ver.show()
+
+        # download over tor
+        self.tor_update_checkbox = gtk.CheckButton(_("Check for and download updates over Tor"))
+        self.settings_box.pack_start(self.tor_update_checkbox, True, True, 0)
+        self.tor_update_checkbox.show()
+
+        # check for updates
+        self.update_checkbox = gtk.CheckButton(_("Check for updates next launch"))
+        self.settings_box.pack_start(self.update_checkbox, True, True, 0)
+        self.update_checkbox.show()
 
         # labels
         if(self.common.settings['installed_version']):
-            self.label1 = gtk.Label(_('Installed version: {0}').format(self.common.settings['installed_version']))
+            self.label1 = gtk.Label(_('Installed version:\n{0}').format(self.common.settings['installed_version']))
         else:
-            self.label1 = gtk.Label(_('Tor Browser Bundle not installed'))
+            self.label1 = gtk.Label(_('Not installed'))
         self.label1.set_line_wrap(True)
-        self.box.pack_start(self.label1, True, True, 0)
+        self.labels_box.pack_start(self.label1, True, True, 0)
         self.label1.show()
 
         if(self.common.settings['last_update_check_timestamp'] > 0):
-            self.label1 = gtk.Label(_('Last checked for updates: {0}').format(time.strftime("%B %d, %Y %I:%M %P", time.gmtime(self.common.settings['last_update_check_timestamp']))))
+            self.label1 = gtk.Label(_('Last checked for updates:\n{0}').format(time.strftime("%B %d, %Y %I:%M %P", time.gmtime(self.common.settings['last_update_check_timestamp']))))
         else:
             self.label1 = gtk.Label(_('Never checked for updates'))
         self.label1.set_line_wrap(True)
-        self.box.pack_start(self.label1, True, True, 0)
+        self.labels_box.pack_start(self.label1, True, True, 0)
         self.label1.show()
 
         # button box
@@ -288,7 +334,6 @@ class TBLSettings:
         self.button_box.set_layout(gtk.BUTTONBOX_SPREAD)
         self.box.pack_start(self.button_box, True, True, 0)
         self.button_box.show()
-        
 
         # save and launch button
         save_launch_image = gtk.Image()
@@ -318,7 +363,6 @@ class TBLSettings:
         self.cancel_button.show()
 
         # show the window
-        self.box.show()
         self.window.show()
 
         # start gtk