gget r51 - trunk/gget
- From: johans svn gnome org
- To: svn-commits-list gnome org
- Subject: gget r51 - trunk/gget
- Date: Tue, 5 Aug 2008 09:08:24 +0000 (UTC)
Author: johans
Date: Tue Aug 5 09:08:24 2008
New Revision: 51
URL: http://svn.gnome.org/viewvc/gget?rev=51&view=rev
Log:
Various fixes.
Modified:
trunk/gget/DetailsDialog.py
trunk/gget/Download.py
trunk/gget/MainWindow.py
trunk/gget/Notification.py
Modified: trunk/gget/DetailsDialog.py
==============================================================================
--- trunk/gget/DetailsDialog.py (original)
+++ trunk/gget/DetailsDialog.py Tue Aug 5 09:08:24 2008
@@ -37,7 +37,8 @@
self.__connect_widgets()
if download.pixbuf:
- self.image.set_from_pixbuf(download.pixbuf)
+ pixbuf = GUI.load_icon_from_mime_type(download.mime_type, 48)
+ self.image.set_from_pixbuf(pixbuf)
else:
self.image.set_from_icon_name(NAME.lower(), gtk.ICON_SIZE_DIALOG)
Modified: trunk/gget/Download.py
==============================================================================
--- trunk/gget/Download.py (original)
+++ trunk/gget/Download.py Tue Aug 5 09:08:24 2008
@@ -73,11 +73,11 @@
if folder:
self.path = folder
- # if uri.endswith(".metalink") or metalink.urlhead(uri,
- # metalink=True)["content-type"].startswith(metalink.MIME_TYPE):
- # self.is_metalink = True
- # else:
- # self.is_metalink = False
+ if uri.endswith(".metalink") or metalink.urlhead(uri,
+ metalink=True)["content-type"].startswith(metalink.MIME_TYPE):
+ self.is_metalink = True
+ else:
+ self.is_metalink = False
self.file = os.path.join(path, self.file_name)
Modified: trunk/gget/MainWindow.py
==============================================================================
--- trunk/gget/MainWindow.py (original)
+++ trunk/gget/MainWindow.py Tue Aug 5 09:08:24 2008
@@ -586,14 +586,17 @@
associated program."""
download = self.downloads_model[path][0]
if download:
- GUI.open_file_on_screen(download.file, treeview.get_screen())
+ if not download.is_metalink:
+ GUI.open_file_on_screen(download.file, treeview.get_screen())
def __downloads_treeview_button_press_event(self, treeview, event, menu):
"""Show context menu for downloads treeview"""
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
n_selected = self.downloads_treeview_selection.count_selected_rows()
+ downloads = GUI.get_selected_values(self.downloads_treeview)
if n_selected == 1:
- self.open_imi.set_sensitive(True)
+ if downloads:
+ self.open_imi.set_sensitive(not downloads[0].is_metalink)
self.open_folder_imi.set_sensitive(True)
self.details_imi.set_sensitive(True)
menu.popup(None, None, None, event.button, event.time)
Modified: trunk/gget/Notification.py
==============================================================================
--- trunk/gget/Notification.py (original)
+++ trunk/gget/Notification.py Tue Aug 5 09:08:24 2008
@@ -68,8 +68,9 @@
self.notification.set_timeout(TIMEOUT) # One minute
- self.notification.add_action("file", _("Open"),
- self.__action_invoked)
+ if not download.is_metalink:
+ self.notification.add_action("file", _("Open"),
+ self.__action_invoked)
self.notification.add_action("folder", _("Open folder"),
self.__action_invoked)
self.notification.connect("closed", self.__closed)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]