Tweaks to default file manager.

This commit is contained in:
Alex Dedul 2007-08-10 19:28:46 +00:00
parent a011e939c9
commit d51a674490
3 changed files with 515 additions and 523 deletions

File diff suppressed because it is too large Load Diff

View File

@ -178,5 +178,6 @@ class EncLevel:
class ProxyType:
none, socks4, socks5, socks5_pw, http, http_pw = range(6)
class FileManager:
choose_one, konqueror, nautilus, thunar, xdg = range(5)
xdg, konqueror, nautilus, thunar = range(4)

View File

@ -625,22 +625,14 @@ class DelugeGTK:
def open_folder(self, widget):
if self.config.get("open_folder_stock"):
if self.config.get("file_manager") == common.FileManager.choose_one:
msgBox = gtk.MessageDialog(parent = None, buttons = gtk.BUTTONS_OK,
message_format = (_("Please set a default file manager in the Other tab in the Preferences.")))
msgBox.set_position(gtk.WIN_POS_CENTER_ALWAYS)
msgBox.set_transient_for(self.window)
msgBox.run()
msgBox.destroy()
return
if self.config.get("file_manager") == common.FileManager.konqueror:
file_manager = "konqueror"
if self.config.get("file_manager") == common.FileManager.nautilus:
file_manager = "nautilus"
if self.config.get("file_manager") == common.FileManager.thunar:
file_manager = "thunar"
if self.config.get("file_manager") == common.FileManager.xdg:
file_manager = "xdg-open"
elif self.config.get("file_manager") == common.FileManager.konqueror:
file_manager = "konqueror"
elif self.config.get("file_manager") == common.FileManager.nautilus:
file_manager = "nautilus"
elif self.config.get("file_manager") == common.FileManager.thunar:
file_manager = "thunar"
elif self.config.get("open_folder_custom"):
file_manager = self.config.get("open_folder_location")