Browse Source

rename qt gui -> classic

283
thomasv 12 years ago
parent
commit
c5f5e92d17
  1. 4
      electrum
  2. 4
      lib/gui.py
  3. 6
      lib/gui_lite.py
  4. 4
      lib/gui_qt.py

4
electrum

@ -158,13 +158,13 @@ if __name__ == '__main__':
#this entire if/else block is just concerned with importing the #this entire if/else block is just concerned with importing the
#right GUI toolkit based the GUI command line option given #right GUI toolkit based the GUI command line option given
if cmd == 'gui': if cmd == 'gui':
pref_gui = config.get('gui','qt') pref_gui = config.get('gui','classic')
if pref_gui == 'gtk': if pref_gui == 'gtk':
try: try:
import lib.gui as gui import lib.gui as gui
except ImportError: except ImportError:
import electrum.gui as gui import electrum.gui as gui
elif pref_gui == 'qt': elif pref_gui in ['classic', 'qt']:
try: try:
import lib.gui_qt as gui import lib.gui_qt as gui
except ImportError: except ImportError:

4
lib/gui.py

@ -274,11 +274,11 @@ def run_settings_dialog(wallet, parent):
gui_box.pack_start(gui_label,False, False, 10) gui_box.pack_start(gui_label,False, False, 10)
gui_combo = gtk.combo_box_new_text() gui_combo = gtk.combo_box_new_text()
gui_combo.append_text('Lite') gui_combo.append_text('Lite')
gui_combo.append_text('Qt') gui_combo.append_text('Classic')
gui_combo.append_text('Gtk') gui_combo.append_text('Gtk')
gui_combo.show() gui_combo.show()
gui_box.pack_start(gui_combo,False, False, 10) gui_box.pack_start(gui_combo,False, False, 10)
gui_names = ['lite','qt','gtk'] gui_names = ['lite','classic','gtk']
gui_combo.set_active( gui_names.index( wallet.config.get("gui","lite")) ) gui_combo.set_active( gui_names.index( wallet.config.get("gui","lite")) )
gui_box.show() gui_box.show()
add_help_button(gui_box, "Select which GUI mode to use at start up.") add_help_button(gui_box, "Select which GUI mode to use at start up.")

6
lib/gui_lite.py

@ -64,8 +64,8 @@ class ElectrumGui(QObject):
qtVersion = qVersion() qtVersion = qVersion()
if not(int(qtVersion[0]) >= 4 and int(qtVersion[2]) >= 7): if not(int(qtVersion[0]) >= 4 and int(qtVersion[2]) >= 7):
app = QApplication(sys.argv) app = QApplication(sys.argv)
QMessageBox.warning(None,"Could not start Lite GUI.", "Electrum was unable to load the 'Lite GUI' because it needs Qt version >= 4.7.\nChanging your config to use the 'Qt' GUI") QMessageBox.warning(None,"Could not start Lite GUI.", "Electrum was unable to load the 'Lite GUI' because it needs Qt version >= 4.7.\nChanging your config to use the 'Classic' GUI")
self.config.set_key('gui','qt',True) self.config.set_key('gui','classic',True)
sys.exit(0) sys.exit(0)
@ -220,7 +220,7 @@ class MiniWindow(QDialog):
backup_wallet = extra_menu.addAction( _("&Create wallet backup")) backup_wallet = extra_menu.addAction( _("&Create wallet backup"))
backup_wallet.triggered.connect(self.backup_wallet) backup_wallet.triggered.connect(self.backup_wallet)
expert_gui = view_menu.addAction(_("&Pro Mode")) expert_gui = view_menu.addAction(_("&Classic GUI"))
expert_gui.triggered.connect(expand_callback) expert_gui.triggered.connect(expand_callback)
themes_menu = view_menu.addMenu(_("&Themes")) themes_menu = view_menu.addMenu(_("&Themes"))
selected_theme = self.actuator.selected_theme() selected_theme = self.actuator.selected_theme()

4
lib/gui_qt.py

@ -1299,8 +1299,8 @@ class ElectrumWindow(QMainWindow):
gui_label=QLabel(_('Default GUI') + ':') gui_label=QLabel(_('Default GUI') + ':')
grid.addWidget(gui_label , 7, 0) grid.addWidget(gui_label , 7, 0)
gui_combo = QComboBox() gui_combo = QComboBox()
gui_combo.addItems(['Lite', 'Qt', 'Gtk']) gui_combo.addItems(['Lite', 'Classic', 'Gtk'])
gui_combo.setCurrentIndex(gui_combo.findText(self.config.get("gui","lite").capitalize())) gui_combo.setCurrentIndex(gui_combo.findText(self.config.get("gui","classic").capitalize()))
grid.addWidget(gui_combo, 7, 1) grid.addWidget(gui_combo, 7, 1)
grid.addWidget(HelpButton(_('Select which GUI mode to use at start up. ')), 7, 2) grid.addWidget(HelpButton(_('Select which GUI mode to use at start up. ')), 7, 2)
if not self.config.is_modifiable('gui'): if not self.config.is_modifiable('gui'):

Loading…
Cancel
Save