[pybliographer] Pyblio: make is_interactive works for pygtk and pygobject
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pybliographer] Pyblio: make is_interactive works for pygtk and pygobject
- Date: Fri, 30 Mar 2018 03:30:33 +0000 (UTC)
commit 537f8eb954ceae478f7fd81f99ef351e25dd21ea
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Fri Mar 30 00:00:16 2018 -0300
Pyblio: make is_interactive works for pygtk and pygobject
Pyblio/Resource.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/Pyblio/Resource.py b/Pyblio/Resource.py
index bd6d27e..81d03cd 100644
--- a/Pyblio/Resource.py
+++ b/Pyblio/Resource.py
@@ -44,7 +44,9 @@ CHOOSER_ACTIONS = ('enter/edit', 'select', 'select-directory',
def is_interactive ():
- return sys.modules.has_key ('gtk')
+ r = sys.modules.has_key('gtk') or \
+ sys.modules.has_key('gi.repository.Gtk')
+ return r
class ResourceDirector (object):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]