[gimp/wip/Jehan/GimpUi.init: 18/19] libgimp: 'gimp_ui' as priority prefix for GimpUi introspected module.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/GimpUi.init: 18/19] libgimp: 'gimp_ui' as priority prefix for GimpUi introspected module.
- Date: Sat, 26 Sep 2020 17:40:09 +0000 (UTC)
commit 46effd3adb893994a373590d3d8434be17175537
Author: Jehan <jehan girinstud io>
Date: Mon Sep 21 01:20:38 2020 +0200
libgimp: 'gimp_ui' as priority prefix for GimpUi introspected module.
Since meson 0.43.0 (below our current requirement), 'symbol_prefix'
argument of gnome.generate_gir() allows an ordered list. If I prepend
'gimp_ui', it makes any gimp_ui_*() function to not start with 'ui_'.
In particular, GimpUi.ui_init() becomes GimpUi.init() which is much less
redundant.
libgimp/meson.build | 2 +-
plug-ins/goat-exercises/goat-exercise-gjs.js | 2 +-
plug-ins/goat-exercises/goat-exercise-lua.lua | 2 +-
plug-ins/goat-exercises/goat-exercise-py3.py | 2 +-
plug-ins/python/colorxhtml.py | 2 +-
plug-ins/python/gradients-save-as-css.py | 2 +-
plug-ins/python/histogram-export.py | 2 +-
plug-ins/python/palette-offset.py | 2 +-
plug-ins/python/python-console/python-console.py | 2 +-
plug-ins/python/spyro-plus.py | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/libgimp/meson.build b/libgimp/meson.build
index cc8fd319d8..a346e6f965 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -446,7 +446,7 @@ else
nsversion: gimp_api_version,
namespace: 'GimpUi',
identifier_prefix: 'Gimp',
- symbol_prefix: 'gimp',
+ symbol_prefix: [ 'gimp_ui', 'gimp' ],
export_packages: 'gimp-ui-' + gimp_api_version,
header: 'libgimp/gimpui.h',
includes: [ libgimp_gir_includes, libgimp_gir[0] ],
diff --git a/plug-ins/goat-exercises/goat-exercise-gjs.js b/plug-ins/goat-exercises/goat-exercise-gjs.js
index 6eccebd039..99e88d75cd 100755
--- a/plug-ins/goat-exercises/goat-exercise-gjs.js
+++ b/plug-ins/goat-exercises/goat-exercise-gjs.js
@@ -73,7 +73,7 @@ var Goat = GObject.registerClass({
/* TODO: localization. */
if (run_mode == Gimp.RunMode.INTERACTIVE) {
- GimpUi.ui_init("goat-exercise-gjs");
+ GimpUi.init("goat-exercise-gjs");
/* TODO: help function and ID. */
let dialog = new GimpUi.Dialog({
title: "Exercise a goat (JavaScript)",
diff --git a/plug-ins/goat-exercises/goat-exercise-lua.lua b/plug-ins/goat-exercises/goat-exercise-lua.lua
index d359e4b78b..acbe636b69 100755
--- a/plug-ins/goat-exercises/goat-exercise-lua.lua
+++ b/plug-ins/goat-exercises/goat-exercise-lua.lua
@@ -40,7 +40,7 @@ function run(procedure, run_mode, image, drawable, args, run_data)
-- Not sure why run_mode has become a string instead of testing
-- against Gimp.RunMode.INTERACTIVE.
if run_mode == "INTERACTIVE" then
- GimpUi.ui_init("goat-exercise-lua");
+ GimpUi.init("goat-exercise-lua");
local dialog = GimpUi.Dialog {
title = "Exercise a goat (Lua)",
role = "goat-exercise-Lua",
diff --git a/plug-ins/goat-exercises/goat-exercise-py3.py b/plug-ins/goat-exercises/goat-exercise-py3.py
index f73a115853..0edec3152d 100755
--- a/plug-ins/goat-exercises/goat-exercise-py3.py
+++ b/plug-ins/goat-exercises/goat-exercise-py3.py
@@ -63,7 +63,7 @@ class Goat (Gimp.PlugIn):
gi.require_version('Gdk', '3.0')
from gi.repository import Gdk
- GimpUi.ui_init("palette-offset.py")
+ GimpUi.init("palette-offset.py")
dialog = GimpUi.Dialog(use_header_bar=True,
title=_("Exercise a goat (Python 3)"),
diff --git a/plug-ins/python/colorxhtml.py b/plug-ins/python/colorxhtml.py
index bb5946ab71..d030f73201 100755
--- a/plug-ins/python/colorxhtml.py
+++ b/plug-ins/python/colorxhtml.py
@@ -82,7 +82,7 @@ def save_colorxhtml(procedure, run_mode, image, drawable, file, args, data):
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
- Gimp.ui_init ("colorxhtml.py")
+ Gimp.init ("colorxhtml.py")
use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
dialog = Gtk.Dialog(use_header_bar=use_header_bar,
diff --git a/plug-ins/python/gradients-save-as-css.py b/plug-ins/python/gradients-save-as-css.py
index a8fd59de2b..6f74025580 100755
--- a/plug-ins/python/gradients-save-as-css.py
+++ b/plug-ins/python/gradients-save-as-css.py
@@ -74,7 +74,7 @@ def gradient_css_save(procedure, args, data):
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
- Gimp.ui_init ("gradients-save-as-css.py")
+ Gimp.init ("gradients-save-as-css.py")
use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
dialog = Gtk.FileChooserDialog(use_header_bar=use_header_bar,
diff --git a/plug-ins/python/histogram-export.py b/plug-ins/python/histogram-export.py
index a8fa7a204b..f8e933bc81 100644
--- a/plug-ins/python/histogram-export.py
+++ b/plug-ins/python/histogram-export.py
@@ -197,7 +197,7 @@ def run(procedure, run_mode, image, layer, args, data):
#config.set_property("output_format", output_format)
config.begin_run(image, run_mode, args)
- GimpUi.ui_init("histogram-export.py")
+ GimpUi.init("histogram-export.py")
use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
dialog = GimpUi.Dialog(use_header_bar=use_header_bar,
title=_("Histogram Export..."))
diff --git a/plug-ins/python/palette-offset.py b/plug-ins/python/palette-offset.py
index aa169a194a..3ce208a162 100644
--- a/plug-ins/python/palette-offset.py
+++ b/plug-ins/python/palette-offset.py
@@ -134,7 +134,7 @@ class PaletteOffset (Gimp.PlugIn):
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
- GimpUi.ui_init ("palette-offset.py")
+ GimpUi.init ("palette-offset.py")
use_header_bar = Gtk.Settings.get_default().get_property("gtk-dialogs-use-header")
dialog = GimpUi.Dialog(use_header_bar=use_header_bar,
diff --git a/plug-ins/python/python-console/python-console.py
b/plug-ins/python/python-console/python-console.py
index f40451a5ae..384c09658a 100755
--- a/plug-ins/python/python-console/python-console.py
+++ b/plug-ins/python/python-console/python-console.py
@@ -40,7 +40,7 @@ PROC_NAME = 'python-fu-console'
RESPONSE_BROWSE, RESPONSE_CLEAR, RESPONSE_SAVE = range(3)
def run(procedure, args, data):
- GimpUi.ui_init ("python-console.py")
+ GimpUi.init ("python-console.py")
namespace = {'__builtins__': __builtins__,
'__name__': '__main__', '__doc__': None,
diff --git a/plug-ins/python/spyro-plus.py b/plug-ins/python/spyro-plus.py
index 97a0c1f068..d2b7dd9deb 100755
--- a/plug-ins/python/spyro-plus.py
+++ b/plug-ins/python/spyro-plus.py
@@ -1805,7 +1805,7 @@ class SpyroWindow():
self.drawing_layer = self.spyro_layer
# Create the UI.
- GimpUi.ui_init(sys.argv[0])
+ GimpUi.init(sys.argv[0])
create_ui()
self.update_view() # Update UI to reflect the parameter values.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]