diff options
author | infirit <[email protected]> | 2014-02-04 22:57:59 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-02-04 22:57:59 +0100 |
commit | e07db99e4ab834f562bd1d1234a5827ae5ef4747 (patch) | |
tree | 8e60c06cf7a663aac0473efe03f254de4176cce9 /invest-applet | |
parent | 9f48b8cec28f20c1936b90bc424783823e6e9226 (diff) | |
download | mate-applets-e07db99e4ab834f562bd1d1234a5827ae5ef4747.tar.bz2 mate-applets-e07db99e4ab834f562bd1d1234a5827ae5ef4747.tar.xz |
invest-applet: Add gtk3 support
Diffstat (limited to 'invest-applet')
-rw-r--r-- | invest-applet/invest/__init__.py | 8 | ||||
-rw-r--r-- | invest-applet/invest/about.py | 4 | ||||
-rw-r--r-- | invest-applet/invest/applet.py | 5 | ||||
-rw-r--r-- | invest-applet/invest/chart.py | 3 | ||||
-rw-r--r-- | invest-applet/invest/defs.py.in | 1 | ||||
-rw-r--r-- | invest-applet/invest/help.py | 3 | ||||
-rwxr-xr-x | invest-applet/invest/invest-applet.py | 6 | ||||
-rwxr-xr-x | invest-applet/invest/mate-invest-chart | 2 | ||||
-rw-r--r-- | invest-applet/invest/preferences.py | 4 | ||||
-rw-r--r-- | invest-applet/invest/quotes.py | 4 | ||||
-rw-r--r-- | invest-applet/invest/widgets.py | 3 |
11 files changed, 27 insertions, 16 deletions
diff --git a/invest-applet/invest/__init__.py b/invest-applet/invest/__init__.py index beb299c1..da6a2512 100644 --- a/invest-applet/invest/__init__.py +++ b/invest-applet/invest/__init__.py @@ -3,8 +3,11 @@ from os.path import join, exists, isdir, isfile, dirname, abspath, expanduser from types import ListType import datetime +# Autotools set the actual data_dir in defs.py +from defs import * + import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", GTK_API_VERSION) from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject @@ -14,8 +17,7 @@ import cPickle import networkmanager -# Autotools set the actual data_dir in defs.py -from defs import * + DEBUGGING = False diff --git a/invest-applet/invest/about.py b/invest-applet/invest/about.py index 9599c687..1cbd336a 100644 --- a/invest-applet/invest/about.py +++ b/invest-applet/invest/about.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- from os.path import join from gettext import gettext as _ -from mate_invest.defs import VERSION +from mate_invest.defs import VERSION, GTK_API_VERSION import mate_invest import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", GTK_API_VERSION) from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GdkPixbuf diff --git a/invest-applet/invest/applet.py b/invest-applet/invest/applet.py index 1a7cbc90..4d877da6 100644 --- a/invest-applet/invest/applet.py +++ b/invest-applet/invest/applet.py @@ -1,8 +1,9 @@ import os, time from os.path import * +import mate_invest.defs import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", mate_invest.defs.GTK_API_VERSION) from gi.repository import Gtk from gi.repository import Gdk @@ -13,7 +14,7 @@ from gi.repository import MatePanelApplet GObject.threads_init() from gettext import gettext as _ -import mate_invest, mate_invest.about, mate_invest.chart, mate_invest.preferences, mate_invest.defs +import mate_invest, mate_invest.about, mate_invest.chart, mate_invest.preferences from mate_invest.quotes import QuoteUpdater from mate_invest.widgets import * diff --git a/invest-applet/invest/chart.py b/invest-applet/invest/chart.py index 0899351d..044a2209 100644 --- a/invest-applet/invest/chart.py +++ b/invest-applet/invest/chart.py @@ -1,7 +1,8 @@ #!/usr/bin/env python +from mate_invest.defs import GTK_API_VERSION import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", GTK_API_VERSION) from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GdkPixbuf diff --git a/invest-applet/invest/defs.py.in b/invest-applet/invest/defs.py.in index 3985ea38..a503005e 100644 --- a/invest-applet/invest/defs.py.in +++ b/invest-applet/invest/defs.py.in @@ -8,3 +8,4 @@ MATELOCALEDIR = "@MATELOCALEDIR@" BUILDERDIR = "@BUILDERDIR@" NETWORKMANAGER_VERSION = "@NETWORKMANAGER_VERSION@" PKGDATADIR = "@PKGDATADIR@" +GTK_API_VERSION = "@GTK_API_VERSION@" diff --git a/invest-applet/invest/help.py b/invest-applet/invest/help.py index a203f782..81c74fac 100644 --- a/invest-applet/invest/help.py +++ b/invest-applet/invest/help.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- +from mate_invest.defs import GTK_API_VERSION import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", GTK_API_VERSION) from gi.repository import Gtk from gi.repository import Gdk diff --git a/invest-applet/invest/invest-applet.py b/invest-applet/invest/invest-applet.py index 4fa883fc..b8d5b5d5 100755 --- a/invest-applet/invest/invest-applet.py +++ b/invest-applet/invest/invest-applet.py @@ -1,8 +1,8 @@ #!/usr/bin/env python -# +import mate_invest.defs import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", mate_invest.GTK_API_VERSION) from gi.repository import Gtk from gi.repository import GObject from gi.repository import MatePanelApplet @@ -22,7 +22,7 @@ else: sys.path.insert(0, abspath("@PYTHONDIR@")) # Now the path is set, import our applet -import mate_invest, mate_invest.applet, mate_invest.defs, mate_invest.help +import mate_invest, mate_invest.applet, mate_invest.help # Prepare i18n import gettext, locale diff --git a/invest-applet/invest/mate-invest-chart b/invest-applet/invest/mate-invest-chart index 5c8ed9d3..78653479 100755 --- a/invest-applet/invest/mate-invest-chart +++ b/invest-applet/invest/mate-invest-chart @@ -3,7 +3,7 @@ import sys, mate_invest.chart import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", mate_invest.defs.GTK_API_VERSION) from gi.repository import Gtk # Prepare i18n diff --git a/invest-applet/invest/preferences.py b/invest-applet/invest/preferences.py index f531a51e..48fb0169 100644 --- a/invest-applet/invest/preferences.py +++ b/invest-applet/invest/preferences.py @@ -1,8 +1,10 @@ from gettext import gettext as _ import locale from os.path import join + +from mate_invest.defs import GTK_API_VERSION import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", GTK_API_VERSION) from gi.repository import Gtk from gi.repository import GObject import mate_invest diff --git a/invest-applet/invest/quotes.py b/invest-applet/invest/quotes.py index 448c13bd..0a48dc1e 100644 --- a/invest-applet/invest/quotes.py +++ b/invest-applet/invest/quotes.py @@ -1,6 +1,8 @@ from os.path import join +from mate_invest.defs import GTK_API_VERSION + import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", GTK_API_VERSION) from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GdkPixbuf diff --git a/invest-applet/invest/widgets.py b/invest-applet/invest/widgets.py index d7ff9228..a0319034 100644 --- a/invest-applet/invest/widgets.py +++ b/invest-applet/invest/widgets.py @@ -1,8 +1,9 @@ import os, time from os.path import * +from mate_invest.defs import GTK_API_VERSION import gi -gi.require_version("Gtk", "2.0") +gi.require_version("Gtk", GTK_API_VERSION) from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject |