Change to gi imports
Thomas Ross
4 years ago
19 | 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | 20 | """ |
21 | 21 | |
22 | import pygtk | |
23 | ||
24 | pygtk.require("2.0") | |
25 | import gtk | |
22 | import gi | |
23 | ||
24 | ||
25 | gi.require_version("Gtk", "3.0") | |
26 | from gi.repository import Gtk, Gdk, GdkPixbuf, GObject, GLib | |
26 | 27 | import os, sys, getopt, configparser, string, gc |
27 | import random, urllib.request, gobject, gettext, locale | |
28 | import random, urllib.request, gettext, locale | |
28 | 29 | import stat, time, subprocess, shutil, filecmp |
29 | 30 | import tempfile, socket, threading |
30 | 31 | |
53 | 54 | print("xmouse.so module not found, some screenshot capabilities will be disabled.") |
54 | 55 | |
55 | 56 | try: |
56 | import gconf | |
57 | from gi.repository import GConf | |
57 | 58 | except: |
58 | 59 | pass |
59 | ||
60 | if gtk.gtk_version < (2, 10, 0): | |
61 | sys.stderr.write("Mirage requires GTK+ 2.10.0 or newer..\n") | |
62 | sys.exit(1) | |
63 | if gtk.pygtk_version < (2, 12, 0): | |
64 | sys.stderr.write("Mirage requires PyGTK 2.12.0 or newer.\n") | |
65 | sys.exit(1) | |
66 | 60 | |
67 | 61 | |
68 | 62 | def valid_int(inputstring): |