FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 01-19-2012, 11:44 AM
Vratislav Podzimek
 
Default Set sensitivity for the preview button (KeyboardSpoke) when something is selected

---
pyanaconda/ui/gui/spokes/keyboard.py | 6 +++++-
pyanaconda/ui/gui/spokes/keyboard.ui | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 9852b8f..4b55367 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -134,11 +134,13 @@ class KeyboardSpoke(NormalSpoke):
self._upButton = self.builder.get_object("upButton")
self._downButton = self.builder.get_object("downButton")
self._removeButton = self.builder.get_object("removeLayoutButton")
+ self._previewButton = self.builder.get_object("previewButton")

# Start with no buttons enabled, since nothing is selected.
self._upButton.set_sensitive(False)
self._downButton.set_sensitive(False)
self._removeButton.set_sensitive(False)
+ self._previewButton.set_sensitive(False)

def _addLayout(self, store, name):
store.append([name])
@@ -208,12 +210,14 @@ class KeyboardSpoke(NormalSpoke):
self._upButton.set_sensitive(False)
self._downButton.set_sensitive(False)
self._removeButton.set_sensitive(False)
+ self._previewButton.set_sensitive(False)
return

(store, selected) = selection.get_selected_rows()

- # If something's selected, always enable the remove button.
+ # If something's selected, always enable the remove and preview buttons.
self._removeButton.set_sensitive(True)
+ self._previewButton.set_sensitive(True)

# Disable the Up button if the top row's selected, and disable the
# Down button if the bottom row's selected.
diff --git a/pyanaconda/ui/gui/spokes/keyboard.ui b/pyanaconda/ui/gui/spokes/keyboard.ui
index de1c1f6..c471287 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.ui
+++ b/pyanaconda/ui/gui/spokes/keyboard.ui
@@ -343,7 +343,7 @@ any layout to the top of the list to select it as the default.</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="settingsButton">
+ <object class="GtkButton" id="previewButton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
--
1.7.4.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org