mirror of https://github.com/GNOME/gimp.git
Corrected code to work with newer split Gimp and GimpUi bindings.
This commit is contained in:
parent
a9421be414
commit
c16e310c36
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue