[gimp] Corrected code to work with newer split Gimp and GimpUi bindings.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Corrected code to work with newer split Gimp and GimpUi bindings.
- Date: Mon, 8 Jun 2020 20:11:22 +0000 (UTC)
commit c16e310c368fd3bb9b4bf67c82e4b50bd6128830
Author: PhotonQyv <shenstone porter gmail com>
Date: Fri Jun 5 15:12:34 2020 +0000
Corrected code to work with newer split Gimp and GimpUi bindings.
plug-ins/python/palette-offset.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/python/palette-offset.py b/plug-ins/python/palette-offset.py
index 14d8c6b074..aa169a194a 100644
--- a/plug-ins/python/palette-offset.py
+++ b/plug-ins/python/palette-offset.py
@@ -16,6 +16,8 @@
import gi
gi.require_version('Gimp', '3.0')
from gi.repository import Gimp
+gi.require_version('GimpUi', '3.0')
+from gi.repository import GimpUi
from gi.repository import GObject
from gi.repository import GLib
from gi.repository import Gio
@@ -132,10 +134,10 @@ class PaletteOffset (Gimp.PlugIn):
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
- Gimp.ui_init ("palette-offset.py")
+ GimpUi.ui_init ("palette-offset.py")
use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
- dialog = Gimp.Dialog(use_header_bar=use_header_bar,
+ dialog = GimpUi.Dialog(use_header_bar=use_header_bar,
title=_("Offset Palette..."))
dialog.add_button("_Cancel", Gtk.ResponseType.CANCEL)
@@ -151,7 +153,7 @@ class PaletteOffset (Gimp.PlugIn):
label.show()
amount = self.set_property("amount", amount)
- spin = Gimp.prop_spin_button_new(self, "amount", 1.0, 5.0, 0)
+ spin = GimpUi.prop_spin_button_new(self, "amount", 1.0, 5.0, 0)
spin.set_activates_default(True)
box.pack_end(spin, False, False, 1)
spin.show()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]