From 6eb94f0195bb9badfaebf9155d8d9bc8cd138907 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Tue, 20 Dec 2016 20:33:50 +0100 Subject: [PATCH] Fix for the terminal shot plugin to work with GTK3 from Vineeth Raj --- terminatorlib/plugins/terminalshot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/terminatorlib/plugins/terminalshot.py b/terminatorlib/plugins/terminalshot.py index a0e880df..86fa7795 100755 --- a/terminatorlib/plugins/terminalshot.py +++ b/terminatorlib/plugins/terminalshot.py @@ -6,6 +6,7 @@ terminals""" import os from gi.repository import Gtk +from gi.repository import GdkPixbuf import terminatorlib.plugin as plugin from terminatorlib.translation import _ from terminatorlib.util import widget_pixbuf @@ -44,7 +45,7 @@ class TerminalShot(plugin.MenuItem): pixbuf = orig_pixbuf.scale_simple(orig_pixbuf.get_width() / 2, orig_pixbuf.get_height() / 2, GdkPixbuf.InterpType.BILINEAR) - image = Gtk.image_new_from_pixbuf(pixbuf) + image = Gtk.Image.new_from_pixbuf(pixbuf) savedialog.set_preview_widget(image) savedialog.show_all() @@ -53,6 +54,6 @@ class TerminalShot(plugin.MenuItem): if response == Gtk.ResponseType.OK: path = os.path.join(savedialog.get_current_folder(), savedialog.get_filename()) - orig_pixbuf.save(path, 'png') + orig_pixbuf.savev(path, 'png', [], []) savedialog.destroy()