summaryrefslogtreecommitdiff
path: root/invest-applet
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-22 17:47:06 +0300
committermonsta <[email protected]>2016-11-22 17:47:06 +0300
commitf7acf55db3ab4b97d60faae24555a07b6b08d43c (patch)
tree6feb99e63f801161642669b01c9ce0c217e60d0b /invest-applet
parent45354a60352e05eba7e66e24a171e713876d71e9 (diff)
downloadmate-applets-f7acf55db3ab4b97d60faae24555a07b6b08d43c.tar.bz2
mate-applets-f7acf55db3ab4b97d60faae24555a07b6b08d43c.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require mate-panel >= 1.17 WARNING: use GTK+3 build of libmateweather for this build. that lib is not migrated to GTK+3 only as we will possibly use libgweather instead of it.
Diffstat (limited to 'invest-applet')
-rw-r--r--invest-applet/invest/__init__.py2
-rw-r--r--invest-applet/invest/about.py4
-rw-r--r--invest-applet/invest/applet.py18
-rw-r--r--invest-applet/invest/chart.py3
-rw-r--r--invest-applet/invest/defs.py.in1
-rw-r--r--invest-applet/invest/help.py3
-rwxr-xr-xinvest-applet/invest/invest-applet.py2
-rwxr-xr-xinvest-applet/invest/mate-invest-chart2
-rw-r--r--invest-applet/invest/preferences.py3
-rw-r--r--invest-applet/invest/quotes.py5
-rw-r--r--invest-applet/invest/widgets.py3
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