set_property('visible', bool) becomes show()/hide() depending on bool val
This commit is contained in:
parent
dd5eaf1ab9
commit
91d058fda4
|
@ -58,8 +58,8 @@ class Preferences_window:
|
||||||
def on_preferences_window_show(self, widget):
|
def on_preferences_window_show(self, widget):
|
||||||
self.notebook.set_current_page(0)
|
self.notebook.set_current_page(0)
|
||||||
if os.name == 'nt': # if windows, player must not be visible
|
if os.name == 'nt': # if windows, player must not be visible
|
||||||
self.xml.get_widget('soundplayer_hbox').set_property('visible', False)
|
self.xml.get_widget('soundplayer_hbox').hide()
|
||||||
self.trayicon_checkbutton.set_property('visible', False)
|
self.trayicon_checkbutton.hide()
|
||||||
|
|
||||||
theme_combobox = self.xml.get_widget('theme_combobox')
|
theme_combobox = self.xml.get_widget('theme_combobox')
|
||||||
model = theme_combobox.get_model()
|
model = theme_combobox.get_model()
|
||||||
|
@ -67,11 +67,9 @@ class Preferences_window:
|
||||||
theme = model[active][0]
|
theme = model[active][0]
|
||||||
fonts_colors_table = self.xml.get_widget('fonts_colors_table')
|
fonts_colors_table = self.xml.get_widget('fonts_colors_table')
|
||||||
if theme == 'Custom':
|
if theme == 'Custom':
|
||||||
#fonts_colors_table.set_sensitive(True)
|
fonts_colors_table.show()
|
||||||
fonts_colors_table.set_property('visible', True)
|
|
||||||
else:
|
else:
|
||||||
#fonts_colors_table.set_sensitive(False)
|
fonts_colors_table.hide()
|
||||||
fonts_colors_table.set_property('visible', False)
|
|
||||||
|
|
||||||
def on_preferences_window_key_press_event(self, widget, event):
|
def on_preferences_window_key_press_event(self, widget, event):
|
||||||
if event.keyval == gtk.keysyms.Escape: # ESCAPE
|
if event.keyval == gtk.keysyms.Escape: # ESCAPE
|
||||||
|
@ -183,11 +181,9 @@ class Preferences_window:
|
||||||
theme = model[active][0]
|
theme = model[active][0]
|
||||||
fonts_colors_table = self.xml.get_widget('fonts_colors_table')
|
fonts_colors_table = self.xml.get_widget('fonts_colors_table')
|
||||||
if theme == 'Custom':
|
if theme == 'Custom':
|
||||||
#fonts_colors_table.set_sensitive(True)
|
fonts_colors_table.show()
|
||||||
fonts_colors_table.set_property('visible', True)
|
|
||||||
else:
|
else:
|
||||||
#fonts_colors_table.set_sensitive(False)
|
fonts_colors_table.hide()
|
||||||
fonts_colors_table.set_property('visible', False)
|
|
||||||
for w in color_widgets:
|
for w in color_widgets:
|
||||||
widg = self.xml.get_widget(w)
|
widg = self.xml.get_widget(w)
|
||||||
if theme == 'Custom':
|
if theme == 'Custom':
|
||||||
|
|
Loading…
Reference in New Issue