From 109b0fe4b16feb5112b2e4a15973154414566ceb Mon Sep 17 00:00:00 2001 From: Simon Budig Date: Tue, 8 May 2018 17:00:28 +0200 Subject: [PATCH] pygimp: some speculative Table->Grid changes --- plug-ins/pygimp/gimpfu.py | 14 +++++++------- plug-ins/pygimp/gimpui.defs | 4 ++-- plug-ins/pygimp/gimpui.override | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plug-ins/pygimp/gimpfu.py b/plug-ins/pygimp/gimpfu.py index 5149f3bec7..f517fec67b 100644 --- a/plug-ins/pygimp/gimpfu.py +++ b/plug-ins/pygimp/gimpfu.py @@ -717,11 +717,11 @@ def _interact(proc_name, start_params): vbox.pack_start(box, expand=False) box.show() - table = gtk.Table(len(params), 2, False) - table.set_row_spacings(6) - table.set_col_spacings(6) - vbox.pack_start(table, expand=False) - table.show() + grid = gtk.Grid () + grid.set_row_spacing(6) + grid.set_column_spacing(6) + vbox.pack_start(grid, expand=False) + grid.show() def response(dlg, id): if id == gtk.RESPONSE_OK: @@ -759,7 +759,7 @@ def _interact(proc_name, start_params): label = gtk.Label(desc) label.set_use_underline(True) label.set_alignment(0.0, 0.5) - table.attach(label, 1, 2, i, i+1, xoptions=gtk.FILL) + grid.attach(label, 1, i, 1, 1) label.show() # Remove accelerator markers from tooltips @@ -776,7 +776,7 @@ def _interact(proc_name, start_params): label.set_mnemonic_widget(wid) - table.attach(wid, 2,3, i,i+1, yoptions=0) + grid.attach(wid, 2, i, 1, 1) if pf_type != PF_TEXT: wid.set_tooltip_text(tooltip_text) diff --git a/plug-ins/pygimp/gimpui.defs b/plug-ins/pygimp/gimpui.defs index 1540534013..6fa49f817e 100644 --- a/plug-ins/pygimp/gimpui.defs +++ b/plug-ins/pygimp/gimpui.defs @@ -30,7 +30,7 @@ (define-object ChainButton (in-module "Gimp") - (parent "GtkTable") + (parent "GtkGrid") (c-name "GimpChainButton") (gtype-id "GIMP_TYPE_CHAIN_BUTTON") ) @@ -352,7 +352,7 @@ (define-object SizeEntry (in-module "Gimp") - (parent "GtkTable") + (parent "GtkGrid") (c-name "GimpSizeEntry") (gtype-id "GIMP_TYPE_SIZE_ENTRY") ) diff --git a/plug-ins/pygimp/gimpui.override b/plug-ins/pygimp/gimpui.override index 585198996c..39829deafc 100644 --- a/plug-ins/pygimp/gimpui.override +++ b/plug-ins/pygimp/gimpui.override @@ -54,7 +54,7 @@ import gtk.RadioButton as PyGtkRadioButton_Type import gtk.SpinButton as PyGtkSpinButton_Type import gtk.Entry as PyGtkEntry_Type import gtk.DrawingArea as PyGtkDrawingArea_Type -import gtk.Table as PyGtkTable_Type +import gtk.Grid as PyGtkGrid_Type import gtk.Frame as PyGtkFrame_Type import gtk.HBox as PyGtkHBox_Type import gtk.VBox as PyGtkVBox_Type