gget r62 - in trunk: epiphany-extension gget po
- From: johans svn gnome org
- To: svn-commits-list gnome org
- Subject: gget r62 - in trunk: epiphany-extension gget po
- Date: Sat, 9 Aug 2008 22:03:17 +0000 (UTC)
Author: johans
Date: Sat Aug 9 22:03:17 2008
New Revision: 62
URL: http://svn.gnome.org/viewvc/gget?rev=62&view=rev
Log:
Fixes.
Modified:
trunk/epiphany-extension/gget-epiphany.py
trunk/epiphany-extension/gget.ephy-extension
trunk/gget/Makefile.am
trunk/po/POTFILES.in
Modified: trunk/epiphany-extension/gget-epiphany.py
==============================================================================
--- trunk/epiphany-extension/gget-epiphany.py (original)
+++ trunk/epiphany-extension/gget-epiphany.py Sat Aug 9 22:03:17 2008
@@ -19,16 +19,36 @@
# along with GGet; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+import os
+
+import dbus
import epiphany
+SERVICE = "org.gnome.GGet"
+MAIN_WINDOW_OBJ_PATH = "/org/gnome/GGet/MainWindow"
+DOWNLOAD_MGR_OBJ_PATH = "/org/gnome/GGet/DownloadManager"
+
class GGetEpiphanyPlugin():
def __init__(self):
self.shell = epiphany.ephy_shell_get_default()
- self.shell.connect("handle-content", self.__handle_content)
+ self.embed_single = self.shell.get_embed_single()
+ self.embed_single.connect("handle-content", self.__handle_content)
def __handle_content(self, shell, mime_type, uri):
- print mime_type
- print uri
+ if not uri:
+ return False
+
+ starter_bus = dbus.StarterBus()
+ try:
+ main_window = starter_bus.get_object(SERVICE, MAIN_WINDOW_OBJ_PATH)
+ download_manager = starter_bus.get_object(SERVICE,
+ DOWNLOAD_MGR_OBJ_PATH)
+ except Exception, e:
+ return False
+
+ main_window.Present()
+ download_manager.AddDownload(uri, os.getcwd())
+ return True
plugin = GGetEpiphanyPlugin()
Modified: trunk/epiphany-extension/gget.ephy-extension
==============================================================================
--- trunk/epiphany-extension/gget.ephy-extension (original)
+++ trunk/epiphany-extension/gget.ephy-extension Sat Aug 9 22:03:17 2008
@@ -7,4 +7,4 @@
[Loader]
Type=python
-Module=gget
+Module=gget-epiphany
Modified: trunk/gget/Makefile.am
==============================================================================
--- trunk/gget/Makefile.am (original)
+++ trunk/gget/Makefile.am Sat Aug 9 22:03:17 2008
@@ -2,6 +2,7 @@
gget_PYTHON = \
AboutDialog.py \
AddDownloadDialog.py \
+ Application.py \
Configuration.py \
DBusService.py \
DetailsDialog.py \
@@ -11,7 +12,6 @@
GUI.py \
__init__.py \
metalink.py \
- Main.py \
MainWindow.py \
Notification.py \
PreferencesDialog.py \
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Sat Aug 9 22:03:17 2008
@@ -4,10 +4,10 @@
data/gget.glade
data/gget.schemas.in
gget/AboutDialog.py
+gget/Application.py
gget/Configuration.py
gget/DBusService.py
gget/GUI.py
-gget/Main.py
gget/MainWindow.py
gget/Notification.py
gget/PreferencesDialog.py
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]