mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
Bug 378334 - Plugins with image drop-list crash when image is closed
Let image and item combo boxes connect to their own "changed" signal first, and if the chosen image/item doesn't exist any longer, reinitialize the combo box and select the first item instead. Also fixes the type macros in gimpitemcombobox.h which were lacking a ')' and introduces an internal GimpItemComboBox class to hold the common functionality.
This commit is contained in:
parent
85ea7771d5
commit
4aaaa1a7fa
3 changed files with 187 additions and 110 deletions
|
@ -34,19 +34,19 @@ G_BEGIN_DECLS
|
|||
|
||||
#define GIMP_TYPE_DRAWABLE_COMBO_BOX (gimp_drawable_combo_box_get_type ())
|
||||
#define GIMP_DRAWABLE_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_DRAWABLE_COMBO_BOX, GimpDrawableComboBox))
|
||||
#define GIMP_IS_DRAWABLE_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DRAWABLE_COMBO_BOX)
|
||||
#define GIMP_IS_DRAWABLE_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_DRAWABLE_COMBO_BOX))
|
||||
|
||||
#define GIMP_TYPE_CHANNEL_COMBO_BOX (gimp_channel_combo_box_get_type ())
|
||||
#define GIMP_CHANNEL_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CHANNEL_COMBO_BOX, GimpChannelComboBox))
|
||||
#define GIMP_IS_CHANNEL_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CHANNEL_COMBO_BOX)
|
||||
#define GIMP_IS_CHANNEL_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CHANNEL_COMBO_BOX))
|
||||
|
||||
#define GIMP_TYPE_LAYER_COMBO_BOX (gimp_layer_combo_box_get_type ())
|
||||
#define GIMP_LAYER_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_LAYER_COMBO_BOX, GimpLayerComboBox))
|
||||
#define GIMP_IS_LAYER_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_LAYER_COMBO_BOX)
|
||||
#define GIMP_IS_LAYER_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_LAYER_COMBO_BOX))
|
||||
|
||||
#define GIMP_TYPE_VECTORS_COMBO_BOX (gimp_vectors_combo_box_get_type ())
|
||||
#define GIMP_VECTORS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_VECTORS_COMBO_BOX, GimpVectorsComboBox))
|
||||
#define GIMP_IS_VECTORS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_VECTORS_COMBO_BOX)
|
||||
#define GIMP_IS_VECTORS_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_VECTORS_COMBO_BOX))
|
||||
|
||||
|
||||
typedef gboolean (* GimpItemConstraintFunc) (gint32 image_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue