gget r100 - trunk/gget
- From: johans svn gnome org
- To: svn-commits-list gnome org
- Subject: gget r100 - trunk/gget
- Date: Thu, 21 Aug 2008 09:38:39 +0000 (UTC)
Author: johans
Date: Thu Aug 21 09:38:39 2008
New Revision: 100
URL: http://svn.gnome.org/viewvc/gget?rev=100&view=rev
Log:
Renamed modules.
Added:
trunk/gget/config.py
- copied unchanged from r99, /trunk/gget/Configuration.py
trunk/gget/gui.py
- copied unchanged from r99, /trunk/gget/GUI.py
Removed:
trunk/gget/Configuration.py
trunk/gget/GUI.py
Modified:
trunk/gget/Application.py
trunk/gget/DBusService.py
trunk/gget/Download.py
trunk/gget/DownloadList.py
trunk/gget/DownloadManager.py
trunk/gget/MainWindow.py
trunk/gget/Makefile.am
trunk/gget/Notification.py
trunk/gget/TrayIcon.py
trunk/gget/Utils.py
trunk/gget/dialogs.py
Modified: trunk/gget/Application.py
==============================================================================
--- trunk/gget/Application.py (original)
+++ trunk/gget/Application.py Thu Aug 21 09:38:39 2008
@@ -31,13 +31,13 @@
import gnome
import DBusService
-import GUI
+import config
+import gui
from dialogs import AddDownloadDialog
from DownloadList import DownloadList
from DownloadManager import DownloadManager
from MainWindow import MainWindow
from TrayIcon import TrayIcon
-from Configuration import Configuration
from gget import NAME, VERSION, LOCALE_DIR
class Application:
@@ -47,7 +47,7 @@
gnome.init(NAME, VERSION)
gtk.gdk.threads_init()
- gtk.window_set_default_icon_list(*GUI.get_icon_list([16, 22, 24, 32]))
+ gtk.window_set_default_icon_list(*gui.get_icon_list([16, 22, 24, 32]))
self.download_list = DownloadList()
self.download_manager = DownloadManager()
@@ -106,7 +106,7 @@
elif o in ("-h", "--help"):
self.__print_usage()
- self.config = Configuration(debug)
+ self.config = config.Configuration(debug)
return args
def __print_usage(self):
Modified: trunk/gget/DBusService.py
==============================================================================
--- trunk/gget/DBusService.py (original)
+++ trunk/gget/DBusService.py Thu Aug 21 09:38:39 2008
@@ -23,10 +23,10 @@
import gtk.gdk
import Download
+import config
import dialogs
import Utils
from dialogs import AddDownloadDialog
-from Configuration import Configuration
from gget import NAME
try:
@@ -102,7 +102,7 @@
def __init__(self, bus_name, main_window):
dbus.service.Object.__init__(self, bus_name, MAIN_WINDOW_OBJ_PATH)
self.main_window = main_window
- self.config = Configuration()
+ self.config = config.Configuration()
# Methods
@@ -124,7 +124,7 @@
DOWNLOAD_MGR_OBJ_PATH)
self.dbus_service = dbus_service
self.download_list = download_list
- self.config = Configuration()
+ self.config = config.Configuration()
self.download_list.connect("download-added", self.__download_added)
self.download_list.connect("download-removed", self.__download_removed)
@@ -207,7 +207,7 @@
path = DOWNLOADS_OBJ_PATH + "/" + download.id
dbus.service.Object.__init__(self, bus_name, path)
self.download = download
- self.config = Configuration()
+ self.config = config.Configuration()
# Signals
Modified: trunk/gget/Download.py
==============================================================================
--- trunk/gget/Download.py (original)
+++ trunk/gget/Download.py Thu Aug 21 09:38:39 2008
@@ -28,10 +28,10 @@
import gnomevfs
import DBusService
-import GUI
+import gui
import Utils
import metalink
-from Configuration import Configuration
+from config import Configuration
from Notification import Notification
from gget import NAME
@@ -98,7 +98,7 @@
self.status = -1
self.mime_type = gnomevfs.get_file_mime_type(self.file_name)
- self.pixbuf = GUI.load_icon_from_mime_type(self.mime_type, 32)
+ self.pixbuf = gui.load_icon_from_mime_type(self.mime_type, 32)
if date_started == "":
self.date_started = datetime.datetime.now()
Modified: trunk/gget/DownloadList.py
==============================================================================
--- trunk/gget/DownloadList.py (original)
+++ trunk/gget/DownloadList.py Thu Aug 21 09:38:39 2008
@@ -24,9 +24,9 @@
import gobject
+import config
import Download
import Utils
-import Configuration
XML_HEADER = '<?xml version="1.0" encoding="UTF-8" ?>\n'
DOWNLOADS_FILE = "downloads.xml"
@@ -49,7 +49,7 @@
def __init(self, *args):
gobject.GObject.__init__(self)
- self.config = Configuration.Configuration()
+ self.config = config.Configuration()
self.downloads = []
def load_from_xml(self):
Modified: trunk/gget/DownloadManager.py
==============================================================================
--- trunk/gget/DownloadManager.py (original)
+++ trunk/gget/DownloadManager.py Thu Aug 21 09:38:39 2008
@@ -28,10 +28,9 @@
import metalink
+import config
import Download
-import GUI
import Utils
-import Configuration
from DownloadList import DownloadList
from gget import NAME, VERSION
@@ -51,7 +50,7 @@
def __init(self, *args):
gobject.GObject.__init__(self)
- self.config = Configuration.Configuration()
+ self.config = config.Configuration()
self.download_list = DownloadList()
self.download_list.connect("download-added", self.__download_added)
Modified: trunk/gget/MainWindow.py
==============================================================================
--- trunk/gget/MainWindow.py (original)
+++ trunk/gget/MainWindow.py Thu Aug 21 09:38:39 2008
@@ -29,9 +29,9 @@
import gnomevfs
import gnome.ui
-import Configuration
+import config
import Download
-import GUI
+import gui
import Utils
from dialogs import AboutDialog, AddDownloadDialog, DetailsDialog, ErrorDialog, PreferencesDialog, QuitDialog
from gget import NAME
@@ -91,7 +91,7 @@
def __get_widgets(self):
"""Get widgets from the glade file."""
- xml = gtk.glade.XML(GUI.glade_file, domain=NAME.lower())
+ xml = gtk.glade.XML(gui.glade_file, domain=NAME.lower())
self.window = xml.get_widget("main_window")
@@ -475,7 +475,7 @@
def __downloads_treeview_selection_changed(self, selection):
"""Called when selection changes. Sets download releated widgets and
their sensitivity."""
- downloads = GUI.get_selected_values(self.downloads_treeview)
+ downloads = gui.get_selected_values(self.downloads_treeview)
number_selected = selection.count_selected_rows()
# Disable tool buttons and menu items if nothing is selected, else
# enable the ones that should be
@@ -592,13 +592,13 @@
download = self.downloads_model[path][0]
if download:
if not download.is_metalink:
- GUI.open_file_on_screen(download.file, treeview.get_screen())
+ 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)
+ downloads = gui.get_selected_values(self.downloads_treeview)
if n_selected == 1:
if downloads:
self.open_imi.set_sensitive(not downloads[0].is_metalink)
@@ -635,7 +635,7 @@
self.__pause_selected_downloads(False)
def __pause_selected_downloads(self, pause=True):
- downloads = GUI.get_selected_values(self.downloads_treeview)
+ downloads = gui.get_selected_values(self.downloads_treeview)
if downloads:
for download in downloads:
if pause:
@@ -645,26 +645,26 @@
def __cancel_selected_downloads(self, widget):
"""Cancels the selected download in DownloadList."""
- downloads = GUI.get_selected_values(self.downloads_treeview)
+ downloads = gui.get_selected_values(self.downloads_treeview)
for download in downloads:
download.cancel()
def __remove_selected_downloads(self, widget=None):
"""Removes the selected download from DownloadList."""
- downloads = GUI.get_selected_values(self.downloads_treeview)
+ downloads = gui.get_selected_values(self.downloads_treeview)
for download in downloads:
self.download_list.remove_download(download)
def __open_imi_activate(self, imagemenuitem):
"""Opens the downloaded file with the associated program."""
- downloads = GUI.get_selected_values(self.downloads_treeview)
+ downloads = gui.get_selected_values(self.downloads_treeview)
if downloads:
- GUI.open_file_on_screen(downloads[0].file,
+ gui.open_file_on_screen(downloads[0].file,
imagemenuitem.get_screen())
def __open_folder_imi_activate(self, imagemenuitem):
"""Opens the folder containing the download."""
- downloads = GUI.get_selected_values(self.downloads_treeview)
+ downloads = gui.get_selected_values(self.downloads_treeview)
if downloads:
uri = gnomevfs.make_uri_from_input(downloads[0].path)
gnome.ui.url_show_on_screen(uri, imagemenuitem.get_screen())
@@ -672,7 +672,7 @@
def __details_selected_download(self, widget):
"""Shows details for the selected download. The details option will
only be availble when only one download in selected."""
- downloads = GUI.get_selected_values(self.downloads_treeview)
+ downloads = gui.get_selected_values(self.downloads_treeview)
if downloads:
DetailsDialog(downloads[0])
@@ -687,23 +687,23 @@
def __add_config_notifications(self):
"""Adds callbacks which gets called when configuration keys changes
in gconf."""
- self.config.add_notify(Configuration.KEY_SHOW_TOOLBAR,
+ self.config.add_notify(config.KEY_SHOW_TOOLBAR,
self.__show_toolbar_key_changed)
- self.config.add_notify(Configuration.KEY_TOOLBAR_STYLE,
+ self.config.add_notify(config.KEY_TOOLBAR_STYLE,
self.__toolbar_style_key_changed)
- self.config.add_notify(Configuration.KEY_SHOW_STATUS,
+ self.config.add_notify(config.KEY_SHOW_STATUS,
self.__show_status_key_changed)
- self.config.add_notify(Configuration.KEY_SHOW_CURRENT_SIZE,
+ self.config.add_notify(config.KEY_SHOW_CURRENT_SIZE,
self.__show_current_size_key_changed)
- self.config.add_notify(Configuration.KEY_SHOW_TOTAL_SIZE,
+ self.config.add_notify(config.KEY_SHOW_TOTAL_SIZE,
self.__show_total_size_key_changed)
- self.config.add_notify(Configuration.KEY_SHOW_PROGRESS,
+ self.config.add_notify(config.KEY_SHOW_PROGRESS,
self.__show_progress_key_changed)
- self.config.add_notify(Configuration.KEY_SHOW_SPEED,
+ self.config.add_notify(config.KEY_SHOW_SPEED,
self.__show_speed_key_changed)
- self.config.add_notify(Configuration.KEY_SHOW_ETA,
+ self.config.add_notify(config.KEY_SHOW_ETA,
self.__show_eta_key_changed)
- # self.config.add_notify(Configuration.KEY_SHOW_STATUSBAR,
+ # self.config.add_notify(config.KEY_SHOW_STATUSBAR,
# self.__show_statusbar_key_changed)
def __show_toolbar_key_changed(self, client, cnxn_id, entry, data):
@@ -804,7 +804,7 @@
self.downloads_model.append([download])
download.connect("update", self.__download_update)
download.connect("status-changed", self.__download_status_changed)
- GUI.queue_resize(self.downloads_treeview)
+ gui.queue_resize(self.downloads_treeview)
# Enable clear button if necessary
if not self.clear_tool_button.props.sensitive and download.status == \
@@ -830,7 +830,7 @@
if iter_to_remove:
self.downloads_model.remove(iter_to_remove)
- GUI.queue_resize(self.downloads_treeview)
+ gui.queue_resize(self.downloads_treeview)
self.clear_tool_button.props.sensitive = has_completed
Modified: trunk/gget/Makefile.am
==============================================================================
--- trunk/gget/Makefile.am (original)
+++ trunk/gget/Makefile.am Thu Aug 21 09:38:39 2008
@@ -1,13 +1,13 @@
ggetdir = $(pythondir)/gget
gget_PYTHON = \
Application.py \
- Configuration.py \
+ config.py \
DBusService.py \
dialogs.py \
Download.py \
DownloadList.py \
DownloadManager.py \
- GUI.py \
+ gui.py \
__init__.py \
metalink.py \
MainWindow.py \
Modified: trunk/gget/Notification.py
==============================================================================
--- trunk/gget/Notification.py (original)
+++ trunk/gget/Notification.py Thu Aug 21 09:38:39 2008
@@ -24,11 +24,11 @@
import gobject
import gnomevfs
-import GUI
+import gui
import dialogs
from gget import NAME
from TrayIcon import TrayIcon
-from Configuration import Configuration
+from config import Configuration
try:
import pynotify
except ImportError, ie:
@@ -56,7 +56,7 @@
if self.download.pixbuf:
self.notification.set_icon_from_pixbuf(self.download.pixbuf)
else:
- pixbuf = GUI.load_icon(NAME.lower(), 32, 32)
+ pixbuf = gui.load_icon(NAME.lower(), 32, 32)
self.notification.set_icon_from_pixbuf(pixbuf)
# Position notification at status icon if its shown
Modified: trunk/gget/TrayIcon.py
==============================================================================
--- trunk/gget/TrayIcon.py (original)
+++ trunk/gget/TrayIcon.py Thu Aug 21 09:38:39 2008
@@ -21,9 +21,9 @@
import gtk
import egg.trayicon
-import GUI
+import config
import dialogs
-import Configuration
+import gui
from gget import NAME
class TrayIcon(object):
@@ -39,7 +39,7 @@
def __init(self, *args):
self.main_window = args[0]
- self.config = Configuration.Configuration()
+ self.config = config.Configuration()
self.icon = egg.trayicon.TrayIcon(NAME)
@@ -111,7 +111,7 @@
add = dialogs.AddDownloadDialog()
add.dialog.show()
else:
- uri = GUI.get_uri_from_clipboard()
+ uri = gui.get_uri_from_clipboard()
if uri:
self.main_window.download_list.add_download(uri,
self.config.default_folder)
Modified: trunk/gget/Utils.py
==============================================================================
--- trunk/gget/Utils.py (original)
+++ trunk/gget/Utils.py Thu Aug 21 09:38:39 2008
@@ -29,7 +29,7 @@
import dbus
import dbus.glib
-from Configuration import Configuration
+from config import Configuration
def runned_from_source():
path = os.path.join(os.path.dirname(__file__), "..")
Modified: trunk/gget/dialogs.py
==============================================================================
--- trunk/gget/dialogs.py (original)
+++ trunk/gget/dialogs.py Thu Aug 21 09:38:39 2008
@@ -28,8 +28,8 @@
import gnomedesktop
import gnome.ui
-import GUI
-import Configuration
+import config
+import gui
import Download
import Utils
from DownloadManager import DownloadManager
@@ -61,7 +61,7 @@
class AddDownloadDialog:
def __init__(self, uri=""):
- self.config = Configuration.Configuration()
+ self.config = config.Configuration()
self.__get_widgets()
self.__connect_widgets()
@@ -73,7 +73,7 @@
if uri:
self.uri_entry.set_text(uri)
else:
- self.uri_entry.set_text(GUI.get_uri_from_clipboard() or "")
+ self.uri_entry.set_text(gui.get_uri_from_clipboard() or "")
# self.uri_entry.paste_clipboard()
# self.uri_entry.select_region(0, -1)
@@ -85,7 +85,7 @@
self.download = None
def __get_widgets(self):
- xml = gtk.glade.XML(GUI.glade_file, domain=NAME.lower())
+ xml = gtk.glade.XML(gui.glade_file, domain=NAME.lower())
self.dialog = xml.get_widget("add_dialog")
@@ -116,7 +116,7 @@
self.add_button.set_sensitive(False)
def __clipboard_owner_change(self, clipboard, event):
- uri = GUI.get_uri_from_clipboard()
+ uri = gui.get_uri_from_clipboard()
if uri:
self.uri_entry.set_text(uri)
# self.uri_entry.select_region(0, -1)
@@ -145,7 +145,7 @@
self.__connect_widgets()
if download.pixbuf:
- pixbuf = GUI.load_icon_from_mime_type(download.mime_type, 48)
+ 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)
@@ -169,7 +169,7 @@
self.dialog.show()
def __get_widgets(self):
- xml = gtk.glade.XML(GUI.glade_file, domain=NAME.lower())
+ xml = gtk.glade.XML(gui.glade_file, domain=NAME.lower())
self.dialog = xml.get_widget("details_dialog")
@@ -271,7 +271,7 @@
def __get_widgets(self):
"""Get widgets from the glade file."""
- xml = gtk.glade.XML(GUI.glade_file, domain=NAME.lower())
+ xml = gtk.glade.XML(gui.glade_file, domain=NAME.lower())
self.dialog = xml.get_widget("preferences_dialog")
@@ -413,33 +413,33 @@
def __add_config_notifications(self):
"""Adds callbacks which gets called when configuration keys changes
in gconf."""
- self.config.add_notify(Configuration.KEY_SHOW_STATUS_ICON,
+ self.config.add_notify(config.KEY_SHOW_STATUS_ICON,
self.__show_status_icon_key_changed)
- self.config.add_notify(Configuration.KEY_SHOW_MAIN_WINDOW,
+ self.config.add_notify(config.KEY_SHOW_MAIN_WINDOW,
self.__show_main_window_key_changed)
- self.config.add_notify(Configuration.KEY_SHOW_NOTIFICATIONS,
+ self.config.add_notify(config.KEY_SHOW_NOTIFICATIONS,
self.__show_notifications_key_changed)
- self.config.add_notify(Configuration.KEY_SHOW_QUIT_DIALOG,
+ self.config.add_notify(config.KEY_SHOW_QUIT_DIALOG,
self.__show_quit_dialog_key_changed)
- self.config.add_notify(Configuration.KEY_AUTOSTART,
+ self.config.add_notify(config.KEY_AUTOSTART,
self.__autostart_key_changed)
- self.config.add_notify(Configuration.KEY_ASK_FOR_LOCATION,
+ self.config.add_notify(config.KEY_ASK_FOR_LOCATION,
self.__ask_for_location_key_changed)
- self.config.add_notify(Configuration.KEY_DEFAULT_FOLDER,
+ self.config.add_notify(config.KEY_DEFAULT_FOLDER,
self.__default_folder_key_changed)
- self.config.add_notify(Configuration.KEY_CHECK_EXTENSIONS,
+ self.config.add_notify(config.KEY_CHECK_EXTENSIONS,
self.__check_extensions_key_changed)
- self.config.add_notify(Configuration.KEY_PROXY_MODE,
+ self.config.add_notify(config.KEY_PROXY_MODE,
self.__proxy_mode_key_changed)
- self.config.add_notify(Configuration.KEY_PROXY_HOST,
+ self.config.add_notify(config.KEY_PROXY_HOST,
self.__proxy_host_key_changed)
- self.config.add_notify(Configuration.KEY_PROXY_PORT,
+ self.config.add_notify(config.KEY_PROXY_PORT,
self.__proxy_port_key_changed)
- self.config.add_notify(Configuration.KEY_PROXY_AUTH,
+ self.config.add_notify(config.KEY_PROXY_AUTH,
self.__proxy_auth_key_changed)
- self.config.add_notify(Configuration.KEY_PROXY_USER,
+ self.config.add_notify(config.KEY_PROXY_USER,
self.__proxy_user_key_changed)
- self.config.add_notify(Configuration.KEY_PROXY_PASSWORD,
+ self.config.add_notify(config.KEY_PROXY_PASSWORD,
self.__proxy_password_key_changed)
def __show_status_icon_key_changed(self, client, cnxn_id, entry, data):
@@ -699,18 +699,18 @@
class QuitDialog:
def __init__(self):
- self.config = Configuration.Configuration()
+ self.config = config.Configuration()
self.__get_widgets()
self.__connect_widgets()
- self.config.add_notify(Configuration.KEY_SHOW_QUIT_DIALOG,
+ self.config.add_notify(config.KEY_SHOW_QUIT_DIALOG,
self.__show_quit_dialog_key_changed)
self.show_again_checkbutton.set_active(not self.config.show_quit_dialog)
def __get_widgets(self):
- xml = gtk.glade.XML(GUI.glade_file, domain=NAME.lower())
+ xml = gtk.glade.XML(gui.glade_file, domain=NAME.lower())
self.dialog = xml.get_widget("quit_dialog")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]