plug-ins/pygimp/gimpui.defs wrap the new GimpHintBox widget.

2006-09-06  Sven Neumann  <sven@gimp.org>

	* plug-ins/pygimp/gimpui.defs
	* plug-ins/pygimp/gimpui.override: wrap the new GimpHintBox
widget.

	* plug-ins/pygimp/gimpfu.py: use it to display the blurb.

	* plug-ins/pygimp/plug-ins/py-slice.py: added missing verb in
blurb.
This commit is contained in:
Sven Neumann 2006-09-05 23:11:12 +00:00 committed by Sven Neumann
parent 7b456db93f
commit 31b3de0788
5 changed files with 68 additions and 12 deletions

View File

@ -1,3 +1,12 @@
2006-09-06 Sven Neumann <sven@gimp.org>
* plug-ins/pygimp/gimpui.defs
* plug-ins/pygimp/gimpui.override: wrap the new GimpHintBox widget.
* plug-ins/pygimp/gimpfu.py: use it to display the blurb.
* plug-ins/pygimp/plug-ins/py-slice.py: added missing verb in blurb.
2006-09-05 Sven Neumann <sven@gimp.org>
* libgimpwidgets/Makefile.am

View File

@ -291,7 +291,7 @@ def _interact(proc_name, start_params):
import gimpui
import gtk
import pango
# import pango
defaults = _get_defaults(proc_name)
@ -509,16 +509,10 @@ def _interact(proc_name, start_params):
dialog.vbox.pack_start(vbox)
vbox.show()
label = gtk.Label(blurb)
label.set_line_wrap(True)
label.set_justify(gtk.JUSTIFY_LEFT)
attrs = pango.AttrList()
attrs.insert(pango.AttrStyle(pango.STYLE_ITALIC, 0, -1))
label.set_attributes(attrs)
vbox.pack_start(label, expand=False)
label.show()
if blurb:
box = gimpui.HintBox(blurb)
vbox.pack_start(box, expand=False)
box.show()
table = gtk.Table(len(params), 2, False)
table.set_row_spacings(6)

View File

@ -119,6 +119,13 @@
(gtype-id "GIMP_TYPE_FRAME")
)
(define-object HintBox
(in-module "Gimp")
(parent "GtkHBox")
(c-name "GimpHintBox")
(gtype-id "GIMP_TYPE_HINT_BOX")
)
(define-object IntComboBox
(in-module "Gimp")
(parent "GtkComboBox")
@ -1530,6 +1537,24 @@
;; From ../../libgimpwidgets/gimphintbox.h
(define-function gimp_hint_box_get_type
(c-name "gimp_hint_box_get_type")
(return-type "GType")
)
(define-function gimp_hint_box_new
(c-name "gimp_hint_box_new")
(is-constructor-of "GimpHintBox")
(return-type "GtkWidget*")
(parameters
'("const gchar*" "hint")
)
)
;; From ../../libgimpwidgets/gimpintstore.h
(define-function gimp_int_store_get_type

View File

@ -582,6 +582,34 @@ _wrap_gimp_dialog_new(PyGObject *self, PyObject *args, PyObject *kwargs)
%%
new-constructor GIMP_TYPE_DIALOG
%%
override gimp_hint_box_new kwargs
static int
_wrap_gimp_hint_box_new(PyGObject *self, PyObject *args, PyObject *kwargs)
{
const char *hint = NULL;
const char *stock_id = NULL;
static char *kwlist[] = { "hint", "stock-id", NULL };
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
"s|s:gimpui.GimpHintBox.__init__",
kwlist,
&hint, &stock_id))
return -1;
pygobject_construct(self,
"hint", hint,
stock_id != NULL ? "stock-id" : NULL, stock_id,
NULL);
if (!self->obj) {
PyErr_SetString(PyExc_RuntimeError,
"could not create GimpHintBox object");
return -1;
}
return 0;
}
%%
override gimp_color_button_get_color noargs
static PyObject *
_wrap_gimp_color_button_get_color(PyGObject *self)

View File

@ -411,7 +411,7 @@ End of the part generated by the GIMP
register(
"python-fu-slice",
"Cuts an image along its guides and images and a HTML table snippet",
"Cuts an image along its guides and create images and a HTML table snippet",
"""Add guides to an image. Then run this. It will cut along the guides,
and give you the html to reassemble the resulting images. If you
choose to generate javascript for onmouseover and clicked events, it