mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Ask user to set his file manager in case he didn't set it yet when trying to
open folder. Based on the patch from eternalswd, thanks.
This commit is contained in:
parent
ff08e28470
commit
51376bd2be
4 changed files with 15 additions and 6 deletions
|
@ -2315,7 +2315,8 @@ HTTP W/ Auth</property>
|
|||
<widget class="GtkComboBoxEntry" id="combo_file_manager">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="items" translatable="yes">Konqueror
|
||||
<property name="items" translatable="yes">-- Choose one --
|
||||
Konqueror
|
||||
Nautilus
|
||||
Thunar</property>
|
||||
<child internal-child="entry">
|
||||
|
|
|
@ -179,4 +179,4 @@ class EncLevel:
|
|||
class ProxyType:
|
||||
none, socks4, socks5, socks5_pw, http, http_pw = range(6)
|
||||
class FileManager:
|
||||
konqueror, nautilus, thunar = range(3)
|
||||
choose_one, konqueror, nautilus, thunar = range(4)
|
||||
|
|
|
@ -625,11 +625,19 @@ class DelugeGTK:
|
|||
|
||||
def open_folder(self, widget):
|
||||
if self.config.get("open_folder_stock"):
|
||||
if self.config.get("file_manager") == 0:
|
||||
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") == 1:
|
||||
if self.config.get("file_manager") == common.FileManager.nautilus:
|
||||
file_manager = "nautilus"
|
||||
if self.config.get("file_manager") == 2:
|
||||
if 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")
|
||||
|
|
|
@ -40,7 +40,7 @@ import common
|
|||
import os.path
|
||||
|
||||
DEFAULT_PREFS = {
|
||||
"file_manager" : common.FileManager.nautilus,
|
||||
"file_manager" : common.FileManager.choose_one,
|
||||
"open_folder_stock" : True,
|
||||
"open_folder_custom" : False,
|
||||
"open_folder_location": "",
|
||||
|
|
Loading…
Add table
Reference in a new issue