GTKUI: Display only folder not full path on path chooser
This commit is contained in:
parent
957f04912f
commit
85c5449ba8
|
@ -1097,17 +1097,13 @@ class PathChooserComboBox(gtk.HBox, StoredValuesPopup, gobject.GObject):
|
||||||
self.tooltips.set_tip(self.button_default, "Restore the default value in the text entry:\n%s" % self.default_text)
|
self.tooltips.set_tip(self.button_default, "Restore the default value in the text entry:\n%s" % self.default_text)
|
||||||
self.button_default.set_sensitive(True)
|
self.button_default.set_sensitive(True)
|
||||||
# Set text for the filechooser dialog button
|
# Set text for the filechooser dialog button
|
||||||
if not self.path_entry_visible:
|
if self.show_folder_name_on_button or not self.path_entry_visible:
|
||||||
# Show entire path
|
text = path_without_trailing_path_sep(text)
|
||||||
self.folder_name_label.set_text(text)
|
if not text is "/" and os.path.basename(text):
|
||||||
|
text = os.path.basename(text)
|
||||||
else:
|
else:
|
||||||
if self.show_folder_name_on_button:
|
text = ""
|
||||||
text = path_without_trailing_path_sep(text)
|
self.folder_name_label.set_text(text)
|
||||||
if not text is "/" and os.path.basename(text):
|
|
||||||
text = os.path.basename(text)
|
|
||||||
else:
|
|
||||||
text = ""
|
|
||||||
self.folder_name_label.set_text(text)
|
|
||||||
|
|
||||||
def set_sensitive(self, sensitive):
|
def set_sensitive(self, sensitive):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue