double-click on torrent opens up containing folder and fix about dialog 'bug' on windows

This commit is contained in:
Marcos Pinto 2007-09-27 03:54:12 +00:00
parent e4effa22b1
commit 691cf5b34f
2 changed files with 9 additions and 4 deletions

View file

@ -407,13 +407,14 @@ class FilesDlg:
def get_priorities(self):
return self.files_manager.get_priorities()
def show_about_dialog(parent=None):
def show_about_dialog(window):
def url_hook(dialog, url):
common.open_url_in_browser(url)
gtk.about_dialog_set_url_hook(url_hook)
abt = gtk.glade.XML(common.get_glade_file("aboutdialog.glade")).get_widget("aboutdialog")
abt.set_position(gtk.WIN_POS_CENTER)
abt.set_transient_for(window)
abt.set_name(common.PROGRAM_NAME)
abt.set_version(common.PROGRAM_VERSION)
abt.set_authors(["Zach Tibbitts", "Alon Zakai", "Marcos Pinto", "Andrew Resch", "Alex Dedul"])

View file

@ -530,7 +530,7 @@ window, please enter your password"))
"queue_up": self.q_torrent_up,
"queue_down": self.q_torrent_down,
"queue_bottom": self.q_to_bottom,
"queue_top": self.q_to_top,
"queue_top": self.q_to_top
})
self.torrent_menu = torrent_glade.get_widget("torrent_menu")
# unique_ID, Q#, Status Icon, Name, Size, Progress, Message, Seeders,
@ -541,11 +541,12 @@ window, please enter your password"))
# Stores unique_ID -> gtk.TreeRowReference's mapping for quick look up
self.torrent_model_dict = {}
self.torrent_view.connect("row-activated", self.double_click_folder)
self.torrent_view.set_model(self.torrent_model)
self.torrent_view.set_rules_hint(True)
self.torrent_view.set_reorderable(True)
self.torrent_view.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
def peer(column, cell, model, iter, data):
c1, c2 = data
a = int(model.get_value(iter, c1))
@ -686,6 +687,9 @@ window, please enter your password"))
else:
return False
def double_click_folder(self, tree, path, view_column):
self.open_folder(view_column)
def open_folder(self, widget):
if self.config.get("open_folder_stock"):
if self.config.get("file_manager") == common.FileManager.xdg:
@ -742,7 +746,7 @@ window, please enter your password"))
pass
def show_about_dialog(self, arg=None):
dialogs.show_about_dialog()
dialogs.show_about_dialog(self.window)
def run_wizard(self, arg=None):
import wizard