diff options
author | Chris Lumens <clumens@redhat.com> | 2013-02-06 14:51:31 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2013-02-07 16:53:52 -0500 |
commit | 20b027211e466c48266cadb9f3ad60650dabdc66 (patch) | |
tree | 2d51ab4e4b085365068d53e8825679d07d33f9d5 /pyanaconda | |
parent | 443a8b85e9e5c2246e9fdbac31f1be1333fc59a4 (diff) | |
download | anaconda-20b027211e466c48266cadb9f3ad60650dabdc66.tar.gz anaconda-20b027211e466c48266cadb9f3ad60650dabdc66.tar.xz anaconda-20b027211e466c48266cadb9f3ad60650dabdc66.zip |
Convert the mount point entry to one containing a drop down.
The idea here is that it makes things like "swap" more discoverable because
the user can pick them, plus it gets rid of the tooltip that is not at all
accessible.
Diffstat (limited to 'pyanaconda')
-rw-r--r-- | pyanaconda/ui/gui/spokes/custom.glade | 38 | ||||
-rw-r--r-- | pyanaconda/ui/gui/spokes/custom.py | 8 |
2 files changed, 28 insertions, 18 deletions
diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade index 39e386691..6319a50ba 100644 --- a/pyanaconda/ui/gui/spokes/custom.glade +++ b/pyanaconda/ui/gui/spokes/custom.glade @@ -205,21 +205,6 @@ after creating the mount point below.</property> </packing> </child> <child> - <object class="GtkEntry" id="addMountPointEntry"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip_text" translatable="yes">eg: "/", "/home", "swap" (minus the quotation marks)</property> - <property name="invisible_char">●</property> - <property name="completion">mountPointCompletion</property> - </object> - <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> - </packing> - </child> - <child> <object class="GtkBox" id="addLabelWarningBox"> <property name="can_focus">False</property> <property name="valign">start</property> @@ -278,6 +263,28 @@ use. Try something else?</property> </packing> </child> <child> + <object class="GtkComboBoxText" id="addMountPointEntry"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="has_entry">True</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <child internal-child="entry"> + <object class="GtkEntry" id="comboboxtext-entry"> + <property name="can_focus">True</property> + <property name="buffer">mountPointEntryBuffer</property> + <property name="completion">mountPointCompletion</property> + </object> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> <placeholder/> </child> </object> @@ -1981,6 +1988,7 @@ use. Try something else?</property> <object class="GtkEntryCompletion" id="mountPointCompletion"> <property name="model">mountPointStore</property> </object> + <object class="GtkEntryBuffer" id="mountPointEntryBuffer"/> <object class="GtkListStore" id="mountPointStore"> <columns> <!-- column-name path --> diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 8d00108b9..503ff1195 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -192,7 +192,7 @@ def validate_mountpoint(mountpoint, used_mountpoints, strict=True): return valid class AddDialog(GUIObject): - builderObjects = ["addDialog", "mountPointStore", "mountPointCompletion"] + builderObjects = ["addDialog", "mountPointStore", "mountPointCompletion", "mountPointEntryBuffer"] mainWidgetName = "addDialog" uiFile = "spokes/custom.glade" @@ -205,13 +205,14 @@ class AddDialog(GUIObject): store = self.builder.get_object("mountPointStore") populate_mountpoint_store(store, self.mountpoints) + self.builder.get_object("addMountPointEntry").set_model(store) completion = self.builder.get_object("mountPointCompletion") completion.set_text_column(0) completion.set_popup_completion(True) def on_add_confirm_clicked(self, button, *args): - self.mountpoint = self.builder.get_object("addMountPointEntry").get_text() + self.mountpoint = self.builder.get_object("addMountPointEntry").get_active_text() self._error = validate_mountpoint(self.mountpoint, self.mountpoints, strict=False) self._warningLabel.set_text(_(mountpoint_validation_msgs[self._error])) @@ -417,7 +418,8 @@ class HelpDialog(GUIObject): class CustomPartitioningSpoke(NormalSpoke, StorageChecker): builderObjects = ["customStorageWindow", "sizeAdjustment", "partitionStore", "raidStoreFiltered", "raidLevelStore", - "addImage", "removeImage", "settingsImage"] + "addImage", "removeImage", "settingsImage", + "mountPointCompletion", "mountPointStore"] mainWidgetName = "customStorageWindow" uiFile = "spokes/custom.glade" |