--- sonata/about.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/about.py	2017-01-02 23:41:16.245799994 +0100
@@ -20,6 +20,8 @@
 import gettext
 import os
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, GdkPixbuf
 
 from sonata import misc, ui
--- sonata/artwork.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/artwork.py	2017-01-02 23:41:37.584805301 +0100
@@ -23,6 +23,8 @@
 import shutil
 import threading # artwork_update starts a thread _artwork_update
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk, GdkPixbuf, GLib, GObject
 
 from sonata import img, ui, misc, consts, mpdhelper as mpdh
--- sonata/breadcrumbs.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/breadcrumbs.py	2017-01-02 23:42:21.093816289 +0100
@@ -17,6 +17,8 @@
 # You should have received a copy of the GNU General Public License
 # along with Sonata.  If not, see <http://www.gnu.org/licenses/>.
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk, Pango
 
 
--- sonata/current.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/current.py	2017-01-02 23:41:03.040796737 +0100
@@ -22,6 +22,8 @@
 import re
 import urllib.parse, urllib.request
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk, Pango, GLib
 
 from sonata import ui, misc, formatting
--- sonata/img.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/img.py	2017-01-02 23:41:34.596804555 +0100
@@ -19,6 +19,8 @@
 import itertools
 import os
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk, GdkPixbuf, GLib
 
 from sonata import consts
--- sonata/info.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/info.py	2017-01-02 23:40:47.879793023 +0100
@@ -22,6 +22,8 @@
 import logging
 import threading
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Pango, Gdk, GdkPixbuf, GLib
 
 from sonata import ui, misc, consts, mpdhelper as mpdh, img
--- sonata/launcher.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/launcher.py	2017-01-02 23:42:10.253813530 +0100
@@ -155,6 +155,8 @@
     ## Deal with GTK:
 
     if not args.skip_gui:
+        import gi
+        gi.require_version("Gtk", "3.0")
         # importing gtk does sys.setdefaultencoding("utf-8"), sets locale etc.
         from gi.repository import Gtk, Gdk
     else:
--- sonata/library.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/library.py	2017-01-02 23:40:59.564795883 +0100
@@ -23,6 +23,8 @@
 import threading # libsearchfilter_toggle starts thread libsearchfilter_loop
 import operator
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk, GdkPixbuf, GObject, GLib, Pango
 
 from sonata import ui, misc, consts, formatting, breadcrumbs, mpdhelper as mpdh
--- sonata/main.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/main.py	2017-01-02 23:41:54.461809537 +0100
@@ -33,6 +33,8 @@
 import tempfile
 import threading
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk, GdkPixbuf, Gio, GLib, Pango
 
 import pkg_resources
--- sonata/misc.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/misc.py	2017-01-02 23:41:12.333799027 +0100
@@ -23,6 +23,8 @@
 import logging
 import sys
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import GLib
 
 
--- sonata/mpdhelper.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/mpdhelper.py	2017-01-02 23:42:24.485817154 +0100
@@ -22,6 +22,8 @@
 import os
 import socket
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import GObject
 import mpd
 
--- sonata/playlists.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/playlists.py	2017-01-02 23:41:07.749797896 +0100
@@ -33,6 +33,8 @@
 
 import os
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Pango, Gdk
 
 from sonata import ui, misc, mpdhelper as mpdh
--- sonata/plugins/localmpd.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/plugins/localmpd.py	2017-01-02 23:41:48.333807996 +0100
@@ -18,6 +18,8 @@
 import subprocess, locale, os
 from pwd import getpwuid
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import GLib, Gtk
 
 from sonata.misc import escape_html
--- sonata/plugins/test.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/plugins/test.py	2017-01-02 23:41:51.388808763 +0100
@@ -20,6 +20,8 @@
 
 # nothing magical from here on
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk, GdkPixbuf, GObject, Pango
 
 from sonata.misc import escape_html
--- sonata/preferences.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/preferences.py	2017-01-02 23:41:44.464807024 +0100
@@ -29,6 +29,8 @@
 
 import gettext, hashlib
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk, GdkPixbuf
 
 from sonata.config import Config
--- sonata/streams.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/streams.py	2017-01-02 23:41:21.405801273 +0100
@@ -32,6 +32,8 @@
 import logging
 import os
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk, Pango
 
 from sonata import misc, ui
--- sonata/tagedit.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/tagedit.py	2017-01-02 23:40:55.678794930 +0100
@@ -29,6 +29,8 @@
 import os
 import re
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, GLib
 tagpy = None # module loaded when needed
 
--- sonata/tray.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/tray.py	2017-01-02 23:41:28.637803070 +0100
@@ -18,6 +18,8 @@
 
 import os
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, GLib
 
 from sonata import ui, img
--- sonata/ui.py	2016-01-31 15:36:20.000000000 +0100
+++ sonata/ui.py	2017-01-02 23:41:25.068802182 +0100
@@ -21,6 +21,8 @@
 import pkg_resources
 import sys
 
+import gi
+gi.require_version("Gtk", "3.0")
 from gi.repository import Gtk, Gdk
 
 
