diff options
author | monsta <[email protected]> | 2016-11-22 17:47:06 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-11-22 17:47:06 +0300 |
commit | f7acf55db3ab4b97d60faae24555a07b6b08d43c (patch) | |
tree | 6feb99e63f801161642669b01c9ce0c217e60d0b /invest-applet/invest/applet.py | |
parent | 45354a60352e05eba7e66e24a171e713876d71e9 (diff) | |
download | mate-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/invest/applet.py')
-rw-r--r-- | invest-applet/invest/applet.py | 18 |
1 files changed, 5 insertions, 13 deletions
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() |