From: Marcus Wikström Date: Thu, 11 Feb 2010 09:43:46 +0000 (+0200) Subject: doubletap to view comic in browser added X-Git-Url: http://git.maemo.org/git/?p=comic-widget;a=commitdiff_plain;h=2c5d4b523e80bd9d81ad66b9c89c2400b6466fa1 doubletap to view comic in browser added --- diff --git a/build_setup.py b/build_setup.py index a259423..fc5c8f0 100644 --- a/build_setup.py +++ b/build_setup.py @@ -37,9 +37,9 @@ if __name__ == "__main__": # p.prer 1000 emove="""#!/bin/sh # chmod +x /usr/bin/mclock.py""" #Set here your pre remove script version = "0.4.3" #Version of your software, e.g. "1.2.0" or "0.8.2" - build = "3" #Build number, e.g. "1" for the first build of this version of your software. Increment for later re-builds of the same version of your software. + build = "4" #Build number, e.g. "1" for the first build of this version of your software. Increment for later re-builds of the same version of your software. #Text with changelog information to be displayed in the package "Details" tab of the Maemo Application Manager - changeloginformation = "added jump options, fixed icon... again" + changeloginformation = "you can now view the locally stored comic in the browser by doubletapping the picture" dir_name = "src" #Name of the subfolder containing your package source files (e.g. usr\share\icons\hicolor\scalable\myappicon.svg, usr\lib\myapp\somelib.py). We suggest to leave it named src in all projects and will refer to that in the wiki article on maemo.org #Thanks to DareTheHair from talk.maemo.org for this snippet that recursively builds the file list for root, dirs, files in os.walk(dir_name): diff --git a/debian/changelog b/debian/changelog index 3310d36..034c9d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -comic-widget (0.4.3-3) stable; urgency=low +comic-widget (0.4.3-4) stable; urgency=low - added jump options, fixed icon... again + you can now view the locally stored comic in the browser by doubletapping the picture - -- Marcus Wikstrom Wed, 10 Feb 2010 02:13:53 +0000 + -- Marcus Wikstrom Thu, 11 Feb 2010 11:28:34 +0000 diff --git a/debian/control b/debian/control index f300e5c..80e9425 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,6 @@ Package: comic-widget Architecture: all Depends: python2.5, python-osso, python-gtk2, python-hildon, python-hildondesktop, python2.5-cairo, hildon-desktop-python-loader Description: A widget that displays comics taken from the web. -XSBC-Bugtracker: XSBC-Bugtracker: http://bugs.maemo.org XB-Maemo-Icon-26: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAA AAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oBHxUqM4A9NzUAAAAZdEVYdENv diff --git a/debian/copyright b/debian/copyright index 40758d0..c98f872 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ -This package was py2debianized(0.5.3) by Marcus Wikstrom on -Wed, 10 Feb 2010 02:13:53 +0000. +This package was py2debianized(0.5.1) by Marcus Wikstrom on +Thu, 11 Feb 2010 11:28:34 +0000. It was downloaded from diff --git a/debian/rules b/debian/rules old mode 100755 new mode 100644 diff --git a/extras-devel/comic-widget_0.4.3-4.changes b/extras-devel/comic-widget_0.4.3-4.changes new file mode 100644 index 0000000..10253fb --- /dev/null +++ b/extras-devel/comic-widget_0.4.3-4.changes @@ -0,0 +1,17 @@ +Maintainer: Marcus Wikstrom +Format: 1.7 +Source: comic-widget +Version: 0.4.3-4 +Architecture: all +Date: Thu, 11 Feb 2010 09:28:40 +0000 +Distribution: fremantle +Urgency: low +Description: + A widget that displays comics taken from the web. +Changes: + you can now view the locally stored comic in the browser by doubletapping the picture +Changed-By: Marcus Wikstrom +Files: + 2ff7fdfb669b214c74341820b002b185 42198 user/desktop extras-devel comic-widget_0.4.3-4.tar.gz + c6966be3a80139449c9767e439c67292 349 user/desktop extras-devel comic-widget_0.4.3-4.dsc + diff --git a/extras-devel/comic-widget_0.4.3-4.dsc b/extras-devel/comic-widget_0.4.3-4.dsc new file mode 100644 index 0000000..8f7ad37 --- /dev/null +++ b/extras-devel/comic-widget_0.4.3-4.dsc @@ -0,0 +1,10 @@ +Source: comic-widget +Version: 0.4.3-4 +Maintainer: Marcus Wikstrom +Architecture: all +Format: 1.0 +Build-Depends: python2.5, python-osso, python-gtk2, python-hildon, python-hildondesktop, python2.5-cairo, hildon-desktop-python-loader +Standards-Version: 0.4.3-4 +Files: + 2ff7fdfb669b214c74341820b002b185 42198 comic-widget_0.4.3-4.tar.gz + diff --git a/extras-devel/comic-widget_0.4.3-4.tar.gz b/extras-devel/comic-widget_0.4.3-4.tar.gz new file mode 100644 index 0000000..d99043c Binary files /dev/null and b/extras-devel/comic-widget_0.4.3-4.tar.gz differ diff --git a/src/usr/lib/hildon-desktop/comicwidget.py b/src/usr/lib/hildon-desktop/comicwidget.py index 9404067..c4c8228 100644 --- a/src/usr/lib/hildon-desktop/comicwidget.py +++ b/src/usr/lib/hildon-desktop/comicwidget.py @@ -278,6 +278,7 @@ class ComicDb(): except: return 0 + def store_last(self, sid = 0): try: idf = open(self.dbfile + ".last", 'w') @@ -1082,9 +1083,11 @@ class ComicHomePlugin(hildondesktop.HomePluginItem): self.e_goweb.add(self.label) self.e_goweb.set_events(gtk.gdk.BUTTON_RELEASE_MASK) - self.e_goweb.connect("button-release-event", self.view_comic) + self.e_goweb.connect("button-release-event", self.view_comic_web) self.e_open.add(self.comic_image) + self.e_open.set_events(gtk.gdk.BUTTON_PRESS_MASK) + self.e_open.connect("button-press-event", self.view_comic) # self.e_switch.add(self.switch) self.e_switch.set_events(gtk.gdk.BUTTON_PRESS_MASK|gtk.gdk.BUTTON_RELEASE_MASK|gtk.gdk.LEAVE_NOTIFY) @@ -1287,12 +1290,20 @@ class ComicHomePlugin(hildondesktop.HomePluginItem): self.draw(widget, "0") # no fancy cairo stuff here. simply launches url in browser. - def view_comic(self, widget, event): + def view_comic_web(self, widget, event): if not event.type == gtk.gdk.BUTTON_RELEASE: return False link = self.db.get_link() self.osso_rpc.rpc_run_with_defaults("osso_browser", "open_new_window", (link,)) + # simply launches image in browser. + def view_comic(self, widget, event): + if not event.type == gtk.gdk._2BUTTON_PRESS: + return False + #link = self.db.get_link() + link = 'file:///home/user/MyDocs/.comics/' + self.db.comic + '/' + self.db.db[self.db.currentcomic]['filename'] + self.osso_rpc.rpc_run_with_defaults("osso_browser", "open_new_window", (link,)) + # this function modifies the image to fit the widget and then returns it.