[arch-commits] Commit in gnome-activity-journal/repos/community-any (11 files)
Balló György
bgyorgy at archlinux.org
Wed Sep 5 18:35:13 UTC 2018
Date: Wednesday, September 5, 2018 @ 18:35:12
Author: bgyorgy
Revision: 376996
archrelease: copy trunk to community-any
Added:
gnome-activity-journal/repos/community-any/PKGBUILD
(from rev 376995, gnome-activity-journal/trunk/PKGBUILD)
gnome-activity-journal/repos/community-any/bluebird_histogram.patch
(from rev 376995, gnome-activity-journal/trunk/bluebird_histogram.patch)
gnome-activity-journal/repos/community-any/disable-set-background.patch
(from rev 376995, gnome-activity-journal/trunk/disable-set-background.patch)
gnome-activity-journal/repos/community-any/fix-indicator-icon.patch
(from rev 376995, gnome-activity-journal/trunk/fix-indicator-icon.patch)
gnome-activity-journal/repos/community-any/make-libgnomeui-optional.patch
(from rev 376995, gnome-activity-journal/trunk/make-libgnomeui-optional.patch)
gnome-activity-journal/repos/community-any/optional-gconf.patch
(from rev 376995, gnome-activity-journal/trunk/optional-gconf.patch)
Deleted:
gnome-activity-journal/repos/community-any/PKGBUILD
gnome-activity-journal/repos/community-any/bluebird_histogram.patch
gnome-activity-journal/repos/community-any/disable-set-background.patch
gnome-activity-journal/repos/community-any/fix-indicator-icon.patch
gnome-activity-journal/repos/community-any/make-libgnomeui-optional.patch
--------------------------------+
PKGBUILD | 109 +++++++++---------
bluebird_histogram.patch | 30 ++---
disable-set-background.patch | 66 +++++------
fix-indicator-icon.patch | 30 ++---
make-libgnomeui-optional.patch | 226 +++++++++++++++++++-------------------
optional-gconf.patch | 228 +++++++++++++++++++++++++++++++++++++++
6 files changed, 461 insertions(+), 228 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2018-09-05 18:34:56 UTC (rev 376995)
+++ PKGBUILD 2018-09-05 18:35:12 UTC (rev 376996)
@@ -1,52 +0,0 @@
-# $Id$
-# Maintainer: Balló György <ballogyor+arch at gmail dot com>
-
-pkgname=gnome-activity-journal
-pkgver=0.8.0
-pkgrel=10
-pkgdesc="Tool for easily browsing and finding files on your computer using the Zeitgeist engine"
-arch=('any')
-url="https://launchpad.net/gnome-activity-journal"
-license=('GPL')
-depends=('python2-dbus' 'python2-gconf' 'python2-xdg' 'zeitgeist')
-makedepends=('python2-distutils-extra')
-optdepends=('python2-pygments: get thumbnail of text files')
-source=(https://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.gz{,.asc}
- disable-set-background.patch
- bluebird_histogram.patch
- fix-indicator-icon.patch
- make-libgnomeui-optional.patch)
-validpgpkeys=('7C0FF088052C082B442454171CFC22F3363DEAE3') # Siegfried-Angel Gevatter Pujals
-md5sums=('46e493f090b41a49cfce422203791bc0'
- 'SKIP'
- '23f0ead4fe6161e6aa71c8ad19ac5695'
- '075953e6cc1f88d2fc588488957550ee'
- 'b757b0c8e5ff06eb50d30f5028c5691b'
- 'a158b002cf33efcfefb4fa06d7ef7da5')
-
-prepare() {
- cd $pkgname-$pkgver
- sed -i 's@^#!.*python$@#!/usr/bin/python2@' src/config.py gnome-activity-journal
-
- # https://bugs.launchpad.net/gnome-activity-journal/+bug/882557
- patch -Np1 -i "$srcdir/disable-set-background.patch"
-
- # https://bugs.launchpad.net/gnome-activity-journal/+bug/924988
- patch -Np1 -i "$srcdir/bluebird_histogram.patch"
-
- # Use icon name instead of full path to fix indicator icon
- patch -Np1 -i "$srcdir/fix-indicator-icon.patch"
-
- # https://bugs.launchpad.net/gnome-activity-journal/+bug/871130
- patch -Np1 -i "$srcdir/make-libgnomeui-optional.patch"
-}
-
-build() {
- cd $pkgname-$pkgver
- python2 setup.py build
-}
-
-package() {
- cd $pkgname-$pkgver
- python2 setup.py install --root=$pkgdir/ --optimize=1
-}
Copied: gnome-activity-journal/repos/community-any/PKGBUILD (from rev 376995, gnome-activity-journal/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2018-09-05 18:35:12 UTC (rev 376996)
@@ -0,0 +1,57 @@
+# $Id$
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+
+pkgname=gnome-activity-journal
+pkgver=0.8.0
+pkgrel=11
+pkgdesc="Tool for easily browsing and finding files on your computer using the Zeitgeist engine"
+arch=('any')
+url="https://launchpad.net/gnome-activity-journal"
+license=('GPL')
+depends=('pygtk' 'python2-dbus' 'python2-xdg' 'zeitgeist')
+makedepends=('python2-distutils-extra')
+optdepends=('python2-pygments: get thumbnail of text files')
+source=(https://launchpad.net/$pkgname/${pkgver%.*}/$pkgver/+download/$pkgname-$pkgver.tar.gz{,.asc}
+ disable-set-background.patch
+ bluebird_histogram.patch
+ fix-indicator-icon.patch
+ make-libgnomeui-optional.patch
+ optional-gconf.patch)
+validpgpkeys=('7C0FF088052C082B442454171CFC22F3363DEAE3') # Siegfried-Angel Gevatter Pujals
+sha256sums=('c1be611ecfc433df038c71857c7ca80cc0f40c8943cfb6a7be91ef0022cd4f7e'
+ 'SKIP'
+ '129a601ac9539501fc692edc9d02d60527d8a71fe9a65eb0ab36dae5d501142e'
+ 'd4432ef650e8155c8534482d5b836e877f48bd026c933dc523838db6cb072c44'
+ '529216e6cc4bf32565c04ebc1ad6afbb2f79a3194828de2b5491280f550a41ad'
+ 'ef89b213ceb1500fae8c72cdf2da2717da59d997e09bce9e027753ea07cdea0c'
+ '1eb4d253c31f1405f882b518f9eb1352c6a88ba737a22b3bce7113f1c1cc8896')
+
+prepare() {
+ cd $pkgname-$pkgver
+ sed -i 's@^#!.*python$@#!/usr/bin/python2@' src/config.py gnome-activity-journal
+
+ # https://bugs.launchpad.net/gnome-activity-journal/+bug/882557
+ patch -Np1 -i ../disable-set-background.patch
+
+ # https://bugs.launchpad.net/gnome-activity-journal/+bug/924988
+ patch -Np1 -i ../bluebird_histogram.patch
+
+ # Use icon name instead of full path to fix indicator icon
+ patch -Np1 -i ../fix-indicator-icon.patch
+
+ # https://bugs.launchpad.net/gnome-activity-journal/+bug/871130
+ patch -Np1 -i ../make-libgnomeui-optional.patch
+
+ # Make gconf dependency optional
+ patch -Np1 -i ../optional-gconf.patch
+}
+
+build() {
+ cd $pkgname-$pkgver
+ python2 setup.py build
+}
+
+package() {
+ cd $pkgname-$pkgver
+ python2 setup.py install --root="$pkgdir" --optimize=1
+}
Deleted: bluebird_histogram.patch
===================================================================
--- bluebird_histogram.patch 2018-09-05 18:34:56 UTC (rev 376995)
+++ bluebird_histogram.patch 2018-09-05 18:35:12 UTC (rev 376996)
@@ -1,15 +0,0 @@
---- a/src/external.py
-+++ b/src/external.py
-@@ -41,7 +41,11 @@
- _restarted = False
-
- def __init__(self):
-- self._extension = CLIENT._iface.get_extension("Log", "journal/activity")
-+ if CLIENT.get_version() >= [0, 8, 99]:
-+ self._extension = CLIENT._iface.get_extension("Histogram", "journal/activity")
-+ else:
-+ self._extension = CLIENT._iface.get_extension("Log", "journal/activity")
-+
-
- def _show_error(self):
- dialog = gtk.MessageDialog(
Copied: gnome-activity-journal/repos/community-any/bluebird_histogram.patch (from rev 376995, gnome-activity-journal/trunk/bluebird_histogram.patch)
===================================================================
--- bluebird_histogram.patch (rev 0)
+++ bluebird_histogram.patch 2018-09-05 18:35:12 UTC (rev 376996)
@@ -0,0 +1,15 @@
+--- a/src/external.py
++++ b/src/external.py
+@@ -41,7 +41,11 @@
+ _restarted = False
+
+ def __init__(self):
+- self._extension = CLIENT._iface.get_extension("Log", "journal/activity")
++ if CLIENT.get_version() >= [0, 8, 99]:
++ self._extension = CLIENT._iface.get_extension("Histogram", "journal/activity")
++ else:
++ self._extension = CLIENT._iface.get_extension("Log", "journal/activity")
++
+
+ def _show_error(self):
+ dialog = gtk.MessageDialog(
Deleted: disable-set-background.patch
===================================================================
--- disable-set-background.patch 2018-09-05 18:34:56 UTC (rev 376995)
+++ disable-set-background.patch 2018-09-05 18:35:12 UTC (rev 376996)
@@ -1,33 +0,0 @@
-diff -Naur gnome-activity-journal-0.8.0.orig/src/activity_widgets.py gnome-activity-journal-0.8.0/src/activity_widgets.py
---- gnome-activity-journal-0.8.0.orig/src/activity_widgets.py 2011-07-16 17:58:23.000000000 +0200
-+++ gnome-activity-journal-0.8.0/src/activity_widgets.py 2011-11-15 02:15:30.603371223 +0100
-@@ -1689,7 +1689,6 @@
- context = widget.window.cairo_create()
- layout = self.create_pango_layout(" ")
- width = event.area.width
-- widget.style.set_background(window, gtk.STATE_NORMAL)
- context.set_source_rgba(*self.line_color)
- context.set_line_width(2)
- self.draw_lines(window, context, layout, width)
-diff -Naur gnome-activity-journal-0.8.0.orig/src/histogram.py gnome-activity-journal-0.8.0/src/histogram.py
---- gnome-activity-journal-0.8.0.orig/src/histogram.py 2011-05-21 14:29:27.000000000 +0200
-+++ gnome-activity-journal-0.8.0/src/histogram.py 2011-11-15 02:15:37.776270364 +0100
-@@ -157,7 +157,6 @@
- """
- The major drawing method that the expose event calls directly
- """
-- widget.style.set_background(widget.window, gtk.STATE_NORMAL)
- context = widget.window.cairo_create()
- self.expose(widget, event, context)
-
-diff -Naur gnome-activity-journal-0.8.0.orig/src/supporting_widgets.py gnome-activity-journal-0.8.0/src/supporting_widgets.py
---- gnome-activity-journal-0.8.0.orig/src/supporting_widgets.py 2011-05-21 14:29:27.000000000 +0200
-+++ gnome-activity-journal-0.8.0/src/supporting_widgets.py 2011-11-15 02:15:45.059162848 +0100
-@@ -94,7 +94,6 @@
- self.context = context
-
- self.font_name = self.style.font_desc.get_family()
-- widget.style.set_background(widget.window, gtk.STATE_NORMAL)
-
- # set a clip region for the expose event
- context.rectangle(event.area.x, event.area.y, event.area.width, event.area.height)
Copied: gnome-activity-journal/repos/community-any/disable-set-background.patch (from rev 376995, gnome-activity-journal/trunk/disable-set-background.patch)
===================================================================
--- disable-set-background.patch (rev 0)
+++ disable-set-background.patch 2018-09-05 18:35:12 UTC (rev 376996)
@@ -0,0 +1,33 @@
+diff -Naur gnome-activity-journal-0.8.0.orig/src/activity_widgets.py gnome-activity-journal-0.8.0/src/activity_widgets.py
+--- gnome-activity-journal-0.8.0.orig/src/activity_widgets.py 2011-07-16 17:58:23.000000000 +0200
++++ gnome-activity-journal-0.8.0/src/activity_widgets.py 2011-11-15 02:15:30.603371223 +0100
+@@ -1689,7 +1689,6 @@
+ context = widget.window.cairo_create()
+ layout = self.create_pango_layout(" ")
+ width = event.area.width
+- widget.style.set_background(window, gtk.STATE_NORMAL)
+ context.set_source_rgba(*self.line_color)
+ context.set_line_width(2)
+ self.draw_lines(window, context, layout, width)
+diff -Naur gnome-activity-journal-0.8.0.orig/src/histogram.py gnome-activity-journal-0.8.0/src/histogram.py
+--- gnome-activity-journal-0.8.0.orig/src/histogram.py 2011-05-21 14:29:27.000000000 +0200
++++ gnome-activity-journal-0.8.0/src/histogram.py 2011-11-15 02:15:37.776270364 +0100
+@@ -157,7 +157,6 @@
+ """
+ The major drawing method that the expose event calls directly
+ """
+- widget.style.set_background(widget.window, gtk.STATE_NORMAL)
+ context = widget.window.cairo_create()
+ self.expose(widget, event, context)
+
+diff -Naur gnome-activity-journal-0.8.0.orig/src/supporting_widgets.py gnome-activity-journal-0.8.0/src/supporting_widgets.py
+--- gnome-activity-journal-0.8.0.orig/src/supporting_widgets.py 2011-05-21 14:29:27.000000000 +0200
++++ gnome-activity-journal-0.8.0/src/supporting_widgets.py 2011-11-15 02:15:45.059162848 +0100
+@@ -94,7 +94,6 @@
+ self.context = context
+
+ self.font_name = self.style.font_desc.get_family()
+- widget.style.set_background(widget.window, gtk.STATE_NORMAL)
+
+ # set a clip region for the expose event
+ context.rectangle(event.area.x, event.area.y, event.area.width, event.area.height)
Deleted: fix-indicator-icon.patch
===================================================================
--- fix-indicator-icon.patch 2018-09-05 18:34:56 UTC (rev 376995)
+++ fix-indicator-icon.patch 2018-09-05 18:35:12 UTC (rev 376996)
@@ -1,15 +0,0 @@
-diff -Naur gnome-activity-journal-0.8.0.orig/src/Indicator.py gnome-activity-journal-0.8.0/src/Indicator.py
---- gnome-activity-journal-0.8.0.orig/src/Indicator.py 2011-07-16 18:57:07.000000000 +0200
-+++ gnome-activity-journal-0.8.0/src/Indicator.py 2011-11-15 02:51:27.156163756 +0100
-@@ -37,9 +37,9 @@
- A widget that implements the appindicator for ubuntu
- """
- def __init__(self, main_window):
-- path = get_icon_path("hicolor/scalable/apps/gnome-activity-journal.svg")
-+ icon = "gnome-activity-journal"
- name = _("Activity Journal")
-- appindicator.Indicator.__init__(self, name, path, \
-+ appindicator.Indicator.__init__(self, name, icon, \
- appindicator.CATEGORY_APPLICATION_STATUS)
-
- self.main_window = main_window
Copied: gnome-activity-journal/repos/community-any/fix-indicator-icon.patch (from rev 376995, gnome-activity-journal/trunk/fix-indicator-icon.patch)
===================================================================
--- fix-indicator-icon.patch (rev 0)
+++ fix-indicator-icon.patch 2018-09-05 18:35:12 UTC (rev 376996)
@@ -0,0 +1,15 @@
+diff -Naur gnome-activity-journal-0.8.0.orig/src/Indicator.py gnome-activity-journal-0.8.0/src/Indicator.py
+--- gnome-activity-journal-0.8.0.orig/src/Indicator.py 2011-07-16 18:57:07.000000000 +0200
++++ gnome-activity-journal-0.8.0/src/Indicator.py 2011-11-15 02:51:27.156163756 +0100
+@@ -37,9 +37,9 @@
+ A widget that implements the appindicator for ubuntu
+ """
+ def __init__(self, main_window):
+- path = get_icon_path("hicolor/scalable/apps/gnome-activity-journal.svg")
++ icon = "gnome-activity-journal"
+ name = _("Activity Journal")
+- appindicator.Indicator.__init__(self, name, path, \
++ appindicator.Indicator.__init__(self, name, icon, \
+ appindicator.CATEGORY_APPLICATION_STATUS)
+
+ self.main_window = main_window
Deleted: make-libgnomeui-optional.patch
===================================================================
--- make-libgnomeui-optional.patch 2018-09-05 18:34:56 UTC (rev 376995)
+++ make-libgnomeui-optional.patch 2018-09-05 18:35:12 UTC (rev 376996)
@@ -1,113 +0,0 @@
-diff -Naur gnome-activity-journal-0.8.0.orig/src/common.py gnome-activity-journal-0.8.0/src/common.py
---- gnome-activity-journal-0.8.0.orig/src/common.py 2011-07-16 18:27:43.000000000 +0200
-+++ gnome-activity-journal-0.8.0/src/common.py 2011-10-09 07:04:07.011645989 +0200
-@@ -29,7 +29,6 @@
- import gobject
- import gettext
- import gio
--import gnome.ui
- import glib
- import gtk
- import os
-@@ -44,6 +43,12 @@
- import zipfile
-
- try:
-+ import gnome.ui
-+ gnomeui = True
-+except ImportError:
-+ gnomeui = None
-+
-+try:
- import pygments
- except ImportError:
- pygments = None
-@@ -72,10 +77,11 @@
- SIZE_TEXT_TIMELINEVIEW = ["small", "medium", "large", "x-large"]
- SIZE_TEXT_THUMBVIEW = ["x-small", "small", "large", "xx-large"]
-
--THUMBNAIL_FACTORIES = {
-- SIZE_NORMAL: gnome.ui.ThumbnailFactory("normal"),
-- SIZE_LARGE: gnome.ui.ThumbnailFactory("large")
--}
-+if gnomeui:
-+ THUMBNAIL_FACTORIES = {
-+ SIZE_NORMAL: gnome.ui.ThumbnailFactory("normal"),
-+ SIZE_LARGE: gnome.ui.ThumbnailFactory("large")
-+ }
- ICON_THEME = gtk.icon_theme_get_default()
-
- #FIXME i know it's ugly. Btw this is only a temp solution. It will be removed
-@@ -878,39 +884,41 @@
- try:
- thumb = THUMBS[size][self.uri]
- except KeyError:
-+ thumb = None
-- factory = THUMBNAIL_FACTORIES[size]
-- location = factory.lookup(self.uri, self.mtime)
-- if location:
-- thumb, mtime = THUMBS[size][self.uri] = \
-- (gtk.gdk.pixbuf_new_from_file(location), self.mtime)
-- else:
-- if factory.has_valid_failed_thumbnail(self.uri, self.mtime):
-- thumb = THUMBS[size][self.uri] = None
-+ if gnomeui:
-+ factory = THUMBNAIL_FACTORIES[size]
-+ location = factory.lookup(self.uri, self.mtime)
-+ if location:
-+ thumb, mtime = THUMBS[size][self.uri] = \
-+ (gtk.gdk.pixbuf_new_from_file(location), self.mtime)
- else:
-- thumb = factory.generate_thumbnail(self.uri, self.mime_type)
-- if thumb is None:
-- # maybe we are able to use a custom thumbnailer here
-- if filter(lambda name: "application-vnd.oasis.opendocument" in name, self.icon_names):
-- thumb = create_opendocument_thumb(self._file_object.get_path())
-- elif "text-x-generic" in self.icon_names or "text-x-script" in self.icon_names:
-- try:
-- thumb = create_text_thumb(self, size, 1)
-- except Exception:
-- thumb = None
-- elif "audio-x-generic" in self.icon_names:
-- pass
-- #FIXME
-- #thumb = self.get_audio_cover(size)
-- if thumb is None:
-- factory.create_failed_thumbnail(self.uri, self.mtime)
-+ if factory.has_valid_failed_thumbnail(self.uri, self.mtime):
-+ thumb = THUMBS[size][self.uri] = None
- else:
-- width, height = thumb.get_width(), thumb.get_height()
-- if width > size[0] or height > size[1]:
-- scale = min(float(size[0])/width, float(size[1])/height)
-- thumb = gnome.ui.thumbnail_scale_down_pixbuf(
-- thumb, int(scale*width), int(scale*height))
-- factory.save_thumbnail(thumb, self.uri, self.mtime)
-- THUMBS[size][self.uri] = (thumb, self.mtime)
-+ thumb = factory.generate_thumbnail(self.uri, self.mime_type)
-+ if thumb is None:
-+ # maybe we are able to use a custom thumbnailer here
-+ if filter(lambda name: "application-vnd.oasis.opendocument" in name, self.icon_names):
-+ thumb = create_opendocument_thumb(self._file_object.get_path())
-+ elif "text-x-generic" in self.icon_names or "text-x-script" in self.icon_names:
-+ try:
-+ thumb = create_text_thumb(self, size, 1)
-+ except Exception:
-+ thumb = None
-+ elif "audio-x-generic" in self.icon_names:
-+ pass
-+ #FIXME
-+ #thumb = self.get_audio_cover(size)
-+ if thumb is None:
-+ factory.create_failed_thumbnail(self.uri, self.mtime)
-+ else:
-+ width, height = thumb.get_width(), thumb.get_height()
-+ if width > size[0] or height > size[1]:
-+ scale = min(float(size[0])/width, float(size[1])/height)
-+ thumb = gnome.ui.thumbnail_scale_down_pixbuf(
-+ thumb, int(scale*width), int(scale*height))
-+ factory.save_thumbnail(thumb, self.uri, self.mtime)
-+ THUMBS[size][self.uri] = (thumb, self.mtime)
- else:
- if thumb is not None:
- if thumb[1] != self.mtime:
Copied: gnome-activity-journal/repos/community-any/make-libgnomeui-optional.patch (from rev 376995, gnome-activity-journal/trunk/make-libgnomeui-optional.patch)
===================================================================
--- make-libgnomeui-optional.patch (rev 0)
+++ make-libgnomeui-optional.patch 2018-09-05 18:35:12 UTC (rev 376996)
@@ -0,0 +1,113 @@
+diff -Naur gnome-activity-journal-0.8.0.orig/src/common.py gnome-activity-journal-0.8.0/src/common.py
+--- gnome-activity-journal-0.8.0.orig/src/common.py 2011-07-16 18:27:43.000000000 +0200
++++ gnome-activity-journal-0.8.0/src/common.py 2011-10-09 07:04:07.011645989 +0200
+@@ -29,7 +29,6 @@
+ import gobject
+ import gettext
+ import gio
+-import gnome.ui
+ import glib
+ import gtk
+ import os
+@@ -44,6 +43,12 @@
+ import zipfile
+
+ try:
++ import gnome.ui
++ gnomeui = True
++except ImportError:
++ gnomeui = None
++
++try:
+ import pygments
+ except ImportError:
+ pygments = None
+@@ -72,10 +77,11 @@
+ SIZE_TEXT_TIMELINEVIEW = ["small", "medium", "large", "x-large"]
+ SIZE_TEXT_THUMBVIEW = ["x-small", "small", "large", "xx-large"]
+
+-THUMBNAIL_FACTORIES = {
+- SIZE_NORMAL: gnome.ui.ThumbnailFactory("normal"),
+- SIZE_LARGE: gnome.ui.ThumbnailFactory("large")
+-}
++if gnomeui:
++ THUMBNAIL_FACTORIES = {
++ SIZE_NORMAL: gnome.ui.ThumbnailFactory("normal"),
++ SIZE_LARGE: gnome.ui.ThumbnailFactory("large")
++ }
+ ICON_THEME = gtk.icon_theme_get_default()
+
+ #FIXME i know it's ugly. Btw this is only a temp solution. It will be removed
+@@ -878,39 +884,41 @@
+ try:
+ thumb = THUMBS[size][self.uri]
+ except KeyError:
++ thumb = None
+- factory = THUMBNAIL_FACTORIES[size]
+- location = factory.lookup(self.uri, self.mtime)
+- if location:
+- thumb, mtime = THUMBS[size][self.uri] = \
+- (gtk.gdk.pixbuf_new_from_file(location), self.mtime)
+- else:
+- if factory.has_valid_failed_thumbnail(self.uri, self.mtime):
+- thumb = THUMBS[size][self.uri] = None
++ if gnomeui:
++ factory = THUMBNAIL_FACTORIES[size]
++ location = factory.lookup(self.uri, self.mtime)
++ if location:
++ thumb, mtime = THUMBS[size][self.uri] = \
++ (gtk.gdk.pixbuf_new_from_file(location), self.mtime)
+ else:
+- thumb = factory.generate_thumbnail(self.uri, self.mime_type)
+- if thumb is None:
+- # maybe we are able to use a custom thumbnailer here
+- if filter(lambda name: "application-vnd.oasis.opendocument" in name, self.icon_names):
+- thumb = create_opendocument_thumb(self._file_object.get_path())
+- elif "text-x-generic" in self.icon_names or "text-x-script" in self.icon_names:
+- try:
+- thumb = create_text_thumb(self, size, 1)
+- except Exception:
+- thumb = None
+- elif "audio-x-generic" in self.icon_names:
+- pass
+- #FIXME
+- #thumb = self.get_audio_cover(size)
+- if thumb is None:
+- factory.create_failed_thumbnail(self.uri, self.mtime)
++ if factory.has_valid_failed_thumbnail(self.uri, self.mtime):
++ thumb = THUMBS[size][self.uri] = None
+ else:
+- width, height = thumb.get_width(), thumb.get_height()
+- if width > size[0] or height > size[1]:
+- scale = min(float(size[0])/width, float(size[1])/height)
+- thumb = gnome.ui.thumbnail_scale_down_pixbuf(
+- thumb, int(scale*width), int(scale*height))
+- factory.save_thumbnail(thumb, self.uri, self.mtime)
+- THUMBS[size][self.uri] = (thumb, self.mtime)
++ thumb = factory.generate_thumbnail(self.uri, self.mime_type)
++ if thumb is None:
++ # maybe we are able to use a custom thumbnailer here
++ if filter(lambda name: "application-vnd.oasis.opendocument" in name, self.icon_names):
++ thumb = create_opendocument_thumb(self._file_object.get_path())
++ elif "text-x-generic" in self.icon_names or "text-x-script" in self.icon_names:
++ try:
++ thumb = create_text_thumb(self, size, 1)
++ except Exception:
++ thumb = None
++ elif "audio-x-generic" in self.icon_names:
++ pass
++ #FIXME
++ #thumb = self.get_audio_cover(size)
++ if thumb is None:
++ factory.create_failed_thumbnail(self.uri, self.mtime)
++ else:
++ width, height = thumb.get_width(), thumb.get_height()
++ if width > size[0] or height > size[1]:
++ scale = min(float(size[0])/width, float(size[1])/height)
++ thumb = gnome.ui.thumbnail_scale_down_pixbuf(
++ thumb, int(scale*width), int(scale*height))
++ factory.save_thumbnail(thumb, self.uri, self.mtime)
++ THUMBS[size][self.uri] = (thumb, self.mtime)
+ else:
+ if thumb is not None:
+ if thumb[1] != self.mtime:
Copied: gnome-activity-journal/repos/community-any/optional-gconf.patch (from rev 376995, gnome-activity-journal/trunk/optional-gconf.patch)
===================================================================
--- optional-gconf.patch (rev 0)
+++ optional-gconf.patch 2018-09-05 18:35:12 UTC (rev 376996)
@@ -0,0 +1,228 @@
+diff -Naur gnome-activity-journal-0.8.0.orig/setup.cfg gnome-activity-journal-0.8.0/setup.cfg
+--- gnome-activity-journal-0.8.0.orig/setup.cfg 2010-01-29 18:07:45.000000000 +0100
++++ gnome-activity-journal-0.8.0/setup.cfg 2018-09-05 17:58:05.384745926 +0200
+@@ -2,4 +2,3 @@
+ domain=gnome-activity-journal
+ bug_contact=zeitgeist at lists.launchpad.net
+ desktop_files=[('share/applications', ('extra/gnome-activity-journal.desktop.in',))]
+-schemas_files=[('share/gconf/schemas', ('extra/gnome-activity-journal.schemas.in',))]
+diff -Naur gnome-activity-journal-0.8.0.orig/src/activity_widgets.py gnome-activity-journal-0.8.0/src/activity_widgets.py
+--- gnome-activity-journal-0.8.0.orig/src/activity_widgets.py 2018-09-05 17:55:34.170365000 +0200
++++ gnome-activity-journal-0.8.0/src/activity_widgets.py 2018-09-05 18:52:35.875289887 +0200
+@@ -498,8 +498,12 @@
+ if self.subject.uri.startswith("http"):
+ self.icon = self.content_obj.get_actor_pixbuf(24)
+ else:
+- self.icon = self.content_obj.get_icon(
+- can_thumb=settings.get('small_thumbnails', False), border=0)
++ if settings:
++ self.icon = self.content_obj.get_icon(
++ can_thumb=settings.get('small_thumbnails', False), border=0)
++ else:
++ self.icon = self.content_obj.get_icon(
++ can_thumb=False, border=0)
+ else:
+ self.icon = None
+ self.btn.set_relief(gtk.RELIEF_NONE)
+diff -Naur gnome-activity-journal-0.8.0.orig/src/config.py gnome-activity-journal-0.8.0/src/config.py
+--- gnome-activity-journal-0.8.0.orig/src/config.py 2018-09-05 17:55:34.167032000 +0200
++++ gnome-activity-journal-0.8.0/src/config.py 2018-09-05 20:13:33.052030404 +0200
+@@ -34,7 +34,10 @@
+ try:
+ from fungtk.quickconf import QuickConf
+ except ImportError:
+- from quickconf import QuickConf
++ try:
++ from quickconf import QuickConf
++ except ImportError:
++ QuickConf = None
+
+ from zeitgeist.datamodel import Event, Subject, Interpretation, Manifestation, \
+ ResultType
+@@ -60,7 +63,10 @@
+ if not os.path.exists(USER_PLUGIN_PATH) or not os.path.isdir(USER_PLUGIN_PATH):
+ USER_PLUGIN_PATH = None
+
+-settings = QuickConf("/apps/gnome-activity-journal")
++if QuickConf:
++ settings = QuickConf("/apps/gnome-activity-journal")
++else:
++ settings = None
+
+ def _get_path(path):
+ return os.path.join(BASE_PATH, path)
+@@ -165,7 +171,10 @@
+ str __plugin_name__: plugin name
+ str __description__: description of the plugin
+ """
+- plugin_settings = QuickConf("/apps/gnome-activity-journal/plugins")
++ if QuickConf:
++ plugin_settings = QuickConf("/apps/gnome-activity-journal/plugins")
++ else:
++ plugin_settings = None
+
+ def __init__(self, client, store, window):
+ self.plugins = {}
+@@ -203,13 +212,14 @@
+ return plugins
+
+ def load_plugins(self, plugins):
+- for plugin_name, plugin_module in plugins:
+- try:
+- state = self.plugin_settings.get(plugin_name, False)
+- if not state: continue # If the plugin is not True it will not be loaded
+- self.activate(plugin_module)
+- except Exception, e:
+- print "Loading %s failed." % plugin_name, e
++ if QuickConf:
++ for plugin_name, plugin_module in plugins:
++ try:
++ state = self.plugin_settings.get(plugin_name, False)
++ if not state: continue # If the plugin is not True it will not be loaded
++ self.activate(plugin_module)
++ except Exception, e:
++ print "Loading %s failed." % plugin_name, e
+
+ def __get_plugin_from_name(self, plugin=None, name=None):
+ if not plugin:
+diff -Naur gnome-activity-journal-0.8.0.orig/src/Indicator.py gnome-activity-journal-0.8.0/src/Indicator.py
+--- gnome-activity-journal-0.8.0.orig/src/Indicator.py 2018-09-05 17:55:34.177032000 +0200
++++ gnome-activity-journal-0.8.0/src/Indicator.py 2018-09-05 18:57:58.794690933 +0200
+@@ -148,10 +148,11 @@
+ def __init__(self, main_window):
+ self.tray = None
+ self.main_window = main_window
+- if settings.get("tray_icon", False):
+- self._create_tray_icon(self.main_window)
++ if settings:
++ if settings.get("tray_icon", False):
++ self._create_tray_icon(self.main_window)
+
+- settings.connect("tray_icon", self._on_tray_conf_changed)
++ settings.connect("tray_icon", self._on_tray_conf_changed)
+
+ def _create_tray_icon(self, main_window):
+ if HAS_INDICATOR: self.tray = Indicator(main_window)
+diff -Naur gnome-activity-journal-0.8.0.orig/src/main.py gnome-activity-journal-0.8.0/src/main.py
+--- gnome-activity-journal-0.8.0.orig/src/main.py 2011-05-21 14:42:13.000000000 +0200
++++ gnome-activity-journal-0.8.0/src/main.py 2018-09-05 18:56:10.259160164 +0200
+@@ -341,10 +341,11 @@
+ min(max(int(screen[2] * 0.80), min_size[0]), screen[2]),
+ min(max(int(screen[3] * 0.75), min_size[1]), screen[3])
+ ]
+- if settings["window_width"] and settings["window_width"] <= screen[2]:
+- size[0] = settings['window_width']
+- if settings["window_height"] and settings["window_height"] <= screen[3]:
+- size[1] = settings["window_height"]
++ if settings:
++ if settings["window_width"] and settings["window_width"] <= screen[2]:
++ size[0] = settings['window_width']
++ if settings["window_height"] and settings["window_height"] <= screen[3]:
++ size[1] = settings["window_height"]
+
+ self.set_geometry_hints(min_width=1024, min_height=360)
+ self.resize(size[0], size[1])
+@@ -399,17 +400,19 @@
+ self.set_title(_("%s to %s") % (start, end) + " - " + _("Activity Journal"))
+
+ def on_delete(self, w, event):
+- x, y = self.get_size()
+- settings["window_width"] = x
+- settings["window_height"] = y
+- if settings.get("tray_icon", False):
+- self.set_visibility(False)
+- return True
++ if settings:
++ x, y = self.get_size()
++ settings["window_width"] = x
++ settings["window_height"] = y
++ if settings.get("tray_icon", False):
++ self.set_visibility(False)
++ return True
+
+ def quit_and_save(self, *args):
+- x, y = self.get_size()
+- settings["window_width"] = x
+- settings["window_height"] = y
++ if settings:
++ x, y = self.get_size()
++ settings["window_width"] = x
++ settings["window_height"] = y
+ gtk.main_quit()
+
+ def quit(self, *args):
+diff -Naur gnome-activity-journal-0.8.0.orig/src/supporting_widgets.py gnome-activity-journal-0.8.0/src/supporting_widgets.py
+--- gnome-activity-journal-0.8.0.orig/src/supporting_widgets.py 2018-09-05 17:55:34.170365000 +0200
++++ gnome-activity-journal-0.8.0/src/supporting_widgets.py 2018-09-05 20:05:26.316133461 +0200
+@@ -1586,7 +1586,8 @@
+ self.connect("row-activated" , self.on_activate)
+
+ def set_state(self, entry, state):
+- PluginManager.plugin_settings._gconf.set_bool(entry.key, state)
++ if PluginManager.plugin_settings:
++ PluginManager.plugin_settings._gconf.set_bool(entry.key, state)
+
+ def on_activate(self, widget, path, column):
+ model = self.get_model()
+@@ -1599,21 +1600,22 @@
+ self.manager.deactivate(name=bname)
+
+ def set_items(self, manager):
+- entries = manager.plugin_settings._gconf.all_entries(PluginManager.plugin_settings._root)
+- store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_BOOLEAN, gobject.TYPE_PYOBJECT)
+- for entry in entries:
+- bname = os.path.basename(entry.key)
+- if manager.plugins.has_key(bname):
+- # Load the plugin if the plugin is found
+- module = manager.plugins[bname]
+- name = "<b>" + module.__plugin_name__ + "</b>"
+- desc = "\n<small>" + module.__description__ + "</small>"
+- store.append( [name+desc, False if entry.value is None else entry.value.get_bool(), entry])
+- else:
+- # Remove the key if no plugin is found
+- manager.plugin_settings._gconf.unset(entry.key)
+- self.manager = manager
+- self.set_model(store)
++ if manager.plugin_settings:
++ entries = manager.plugin_settings._gconf.all_entries(PluginManager.plugin_settings._root)
++ store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_BOOLEAN, gobject.TYPE_PYOBJECT)
++ for entry in entries:
++ bname = os.path.basename(entry.key)
++ if manager.plugins.has_key(bname):
++ # Load the plugin if the plugin is found
++ module = manager.plugins[bname]
++ name = "<b>" + module.__plugin_name__ + "</b>"
++ desc = "\n<small>" + module.__description__ + "</small>"
++ store.append( [name+desc, False if entry.value is None else entry.value.get_bool(), entry])
++ else:
++ # Remove the key if no plugin is found
++ manager.plugin_settings._gconf.unset(entry.key)
++ self.manager = manager
++ self.set_model(store)
+
+ def __init__(self, parent=None):
+ super(PreferencesDialog, self).__init__()
+@@ -1642,14 +1644,15 @@
+ #Configuration page
+ vbox = gtk.VBox()
+ vbox.set_border_width(5)
+- hbox_tray = gtk.HBox()
+- label = gtk.Label(_("Show icon in system tray"))
+- self.check_button = gtk.CheckButton()
+- self.check_button.set_active(settings.get("tray_icon", False))
+- self.check_button.connect("toggled", self.on_check_toggled)
+- hbox_tray.pack_start(self.check_button,False,False)
+- hbox_tray.pack_start(label, False,False)
+- vbox.pack_start(hbox_tray,False,False)
++ if settings:
++ hbox_tray = gtk.HBox()
++ label = gtk.Label(_("Show icon in system tray"))
++ self.check_button = gtk.CheckButton()
++ self.check_button.set_active(settings.get("tray_icon", False))
++ self.check_button.connect("toggled", self.on_check_toggled)
++ hbox_tray.pack_start(self.check_button,False,False)
++ hbox_tray.pack_start(label, False,False)
++ vbox.pack_start(hbox_tray,False,False)
+ notebook.append_page(vbox, gtk.Label( _("Configuration")))
+
+ self.connect("delete-event", lambda *args: (True, self.hide())[0])
More information about the arch-commits
mailing list