diff options
Diffstat (limited to 'invest-applet/invest')
-rw-r--r-- | invest-applet/invest/__init__.py | 2 | ||||
-rw-r--r-- | invest-applet/invest/about.py | 4 | ||||
-rw-r--r-- | invest-applet/invest/applet.py | 18 | ||||
-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 | 2 | ||||
-rwxr-xr-x | invest-applet/invest/mate-invest-chart | 2 | ||||
-rw-r--r-- | invest-applet/invest/preferences.py | 3 | ||||
-rw-r--r-- | invest-applet/invest/quotes.py | 5 | ||||
-rw-r--r-- | invest-applet/invest/widgets.py | 3 |
11 files changed, 15 insertions, 31 deletions
diff --git a/invest-applet/invest/__init__.py b/invest-applet/invest/__init__.py index 8835f7d6..0bc70f94 100644 --- a/invest-applet/invest/__init__.py +++ b/invest-applet/invest/__init__.py @@ -7,7 +7,7 @@ import datetime from defs import * import gi -gi.require_version("Gtk", GTK_API_VERSION) +gi.require_version("Gtk", "3.0") from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject diff --git a/invest-applet/invest/about.py b/invest-applet/invest/about.py index 87feaf92..97e33f27 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, GTK_API_VERSION +from mate_invest.defs import VERSION import mate_invest import gi -gi.require_version("Gtk", GTK_API_VERSION) +gi.require_version("Gtk", "3.0") 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 117faa6e..82001ed3 100644 --- a/invest-applet/invest/applet.py +++ b/invest-applet/invest/applet.py @@ -3,7 +3,7 @@ from os.path import * import mate_invest.defs import gi -gi.require_version("Gtk", mate_invest.defs.GTK_API_VERSION) +gi.require_version("Gtk", "3.0") from gi.repository import Gtk from gi.repository import Gdk @@ -135,18 +135,10 @@ class InvestmentsListWindow(Gtk.Window): #(wx, wy) = self.get_origin() window = self.applet.get_window() - if GTK_API_VERSION == '3.0': - screen = window.get_screen() - monitor = screen.get_monitor_geometry (screen.get_monitor_at_window (window)) - (ret, ax, ay) = window.get_origin() - (ignored, ignored, aw, ah) = window.get_geometry() - else: - screen = self.applet.get_screen() - monitor = Gdk.Rectangle(0, 0, 0, 0) - ax = ay = 0 - self.applet.window.get_origin(ax, ay) - (aw, ah) = self.applet.window.get_size () - screen.get_monitor_geometry (screen.get_monitor_at_window (self.applet.window), monitor) + screen = window.get_screen() + monitor = screen.get_monitor_geometry (screen.get_monitor_at_window (window)) + (ret, ax, ay) = window.get_origin() + (ignored, ignored, aw, ah) = window.get_geometry() (ww, wh) = self.get_size() diff --git a/invest-applet/invest/chart.py b/invest-applet/invest/chart.py index e12424a6..eb5322cb 100644 --- a/invest-applet/invest/chart.py +++ b/invest-applet/invest/chart.py @@ -1,8 +1,7 @@ #!/usr/bin/env python -from mate_invest.defs import GTK_API_VERSION import gi -gi.require_version("Gtk", GTK_API_VERSION) +gi.require_version("Gtk", "3.0") 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 41efe69a..9a39484f 100644 --- a/invest-applet/invest/defs.py.in +++ b/invest-applet/invest/defs.py.in @@ -7,4 +7,3 @@ GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@" MATELOCALEDIR = "@MATELOCALEDIR@" BUILDERDIR = "@BUILDERDIR@" PKGDATADIR = "@PKGDATADIR@" -GTK_API_VERSION = "@GTK_API_VERSION@" diff --git a/invest-applet/invest/help.py b/invest-applet/invest/help.py index 4a6b1cd3..ec0a6dbe 100644 --- a/invest-applet/invest/help.py +++ b/invest-applet/invest/help.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- -from mate_invest.defs import GTK_API_VERSION import gi -gi.require_version("Gtk", GTK_API_VERSION) +gi.require_version("Gtk", "3.0") 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 b8d5b5d5..b1e10578 100755 --- a/invest-applet/invest/invest-applet.py +++ b/invest-applet/invest/invest-applet.py @@ -2,7 +2,7 @@ import mate_invest.defs import gi -gi.require_version("Gtk", mate_invest.GTK_API_VERSION) +gi.require_version("Gtk", "3.0") from gi.repository import Gtk from gi.repository import GObject from gi.repository import MatePanelApplet diff --git a/invest-applet/invest/mate-invest-chart b/invest-applet/invest/mate-invest-chart index 78653479..6c3ed184 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", mate_invest.defs.GTK_API_VERSION) +gi.require_version("Gtk", "3.0") from gi.repository import Gtk # Prepare i18n diff --git a/invest-applet/invest/preferences.py b/invest-applet/invest/preferences.py index 48fb0169..40cd72f3 100644 --- a/invest-applet/invest/preferences.py +++ b/invest-applet/invest/preferences.py @@ -2,9 +2,8 @@ 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", GTK_API_VERSION) +gi.require_version("Gtk", "3.0") 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 4fba6bfa..5331e007 100644 --- a/invest-applet/invest/quotes.py +++ b/invest-applet/invest/quotes.py @@ -1,8 +1,7 @@ from os.path import join, getmtime -from mate_invest.defs import GTK_API_VERSION import gi -gi.require_version("Gtk", GTK_API_VERSION) +gi.require_version("Gtk", "3.0") from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GdkPixbuf @@ -474,5 +473,3 @@ class QuoteUpdater(Gtk.ListStore): break return res -#if Gtk.pygtk_version < (2,8,0): -# GObject.type_register(QuoteUpdater) diff --git a/invest-applet/invest/widgets.py b/invest-applet/invest/widgets.py index a0319034..8d15a5ed 100644 --- a/invest-applet/invest/widgets.py +++ b/invest-applet/invest/widgets.py @@ -1,9 +1,8 @@ import os, time from os.path import * -from mate_invest.defs import GTK_API_VERSION import gi -gi.require_version("Gtk", GTK_API_VERSION) +gi.require_version("Gtk", "3.0") from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject |