mirror of https://github.com/GNOME/gimp.git
libgimpwidgets: Reverting GimpPickButton for 80f09fac
Temporarily reverting as the private struct is shared between various OS versions of the object and needs to be accessible. A different approach will be needed to resolve, and until then, I'd like the Debian pipeline to work properly.
This commit is contained in:
parent
80f09fac59
commit
f759b17e45
|
@ -17,11 +17,11 @@
|
||||||
#define __GIMP_PICK_BUTTON_PRIVATE_H__
|
#define __GIMP_PICK_BUTTON_PRIVATE_H__
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GimpPickButtonPrivate
|
struct _GimpPickButtonPrivate
|
||||||
{
|
{
|
||||||
GdkCursor *cursor;
|
GdkCursor *cursor;
|
||||||
GtkWidget *grab_widget;
|
GtkWidget *grab_widget;
|
||||||
} GimpPickButtonPrivate;
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* ! __GIMP_PICK_BUTTON_PRIVATE_H__ */
|
#endif /* ! __GIMP_PICK_BUTTON_PRIVATE_H__ */
|
||||||
|
|
|
@ -65,8 +65,6 @@ enum
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GET_PRIVATE(obj) ((GimpPickButtonPrivate *) gimp_pick_button_get_instance_private ((GimpPickButton *) (obj)))
|
|
||||||
|
|
||||||
|
|
||||||
static void gimp_pick_button_dispose (GObject *object);
|
static void gimp_pick_button_dispose (GObject *object);
|
||||||
|
|
||||||
|
@ -114,6 +112,8 @@ gimp_pick_button_init (GimpPickButton *button)
|
||||||
{
|
{
|
||||||
GtkWidget *image;
|
GtkWidget *image;
|
||||||
|
|
||||||
|
button->priv = gimp_pick_button_get_instance_private (button);
|
||||||
|
|
||||||
image = gtk_image_new_from_icon_name (GIMP_ICON_COLOR_PICK_FROM_SCREEN,
|
image = gtk_image_new_from_icon_name (GIMP_ICON_COLOR_PICK_FROM_SCREEN,
|
||||||
GTK_ICON_SIZE_BUTTON);
|
GTK_ICON_SIZE_BUTTON);
|
||||||
gtk_container_add (GTK_CONTAINER (button), image);
|
gtk_container_add (GTK_CONTAINER (button), image);
|
||||||
|
@ -128,20 +128,18 @@ gimp_pick_button_init (GimpPickButton *button)
|
||||||
static void
|
static void
|
||||||
gimp_pick_button_dispose (GObject *object)
|
gimp_pick_button_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
GimpPickButton *button = GIMP_PICK_BUTTON (object);
|
GimpPickButton *button = GIMP_PICK_BUTTON (object);
|
||||||
GimpPickButtonPrivate *priv = GET_PRIVATE (button);
|
|
||||||
|
|
||||||
|
if (button->priv->cursor)
|
||||||
if (priv->cursor)
|
|
||||||
{
|
{
|
||||||
g_object_unref (priv->cursor);
|
g_object_unref (button->priv->cursor);
|
||||||
priv->cursor = NULL;
|
button->priv->cursor = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->grab_widget)
|
if (button->priv->grab_widget)
|
||||||
{
|
{
|
||||||
gtk_widget_destroy (priv->grab_widget);
|
gtk_widget_destroy (button->priv->grab_widget);
|
||||||
priv->grab_widget = NULL;
|
button->priv->grab_widget = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||||
|
|
|
@ -26,8 +26,23 @@
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_TYPE_PICK_BUTTON (gimp_pick_button_get_type ())
|
#define GIMP_TYPE_PICK_BUTTON (gimp_pick_button_get_type ())
|
||||||
G_DECLARE_DERIVABLE_TYPE (GimpPickButton, gimp_pick_button, GIMP, PICK_BUTTON, GtkButton)
|
#define GIMP_PICK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PICK_BUTTON, GimpPickButton))
|
||||||
|
#define GIMP_PICK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PICK_BUTTON, GimpPickButtonClass))
|
||||||
|
#define GIMP_IS_PICK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PICK_BUTTON))
|
||||||
|
#define GIMP_IS_PICK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PICK_BUTTON))
|
||||||
|
#define GIMP_PICK_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PICK_BUTTON, GimpPickButtonClass))
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GimpPickButtonPrivate GimpPickButtonPrivate;
|
||||||
|
typedef struct _GimpPickButtonClass GimpPickButtonClass;
|
||||||
|
|
||||||
|
struct _GimpPickButton
|
||||||
|
{
|
||||||
|
GtkButton parent_instance;
|
||||||
|
|
||||||
|
GimpPickButtonPrivate *priv;
|
||||||
|
};
|
||||||
|
|
||||||
struct _GimpPickButtonClass
|
struct _GimpPickButtonClass
|
||||||
{
|
{
|
||||||
|
@ -48,6 +63,7 @@ struct _GimpPickButtonClass
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
GType gimp_pick_button_get_type (void) G_GNUC_CONST;
|
||||||
GtkWidget * gimp_pick_button_new (void);
|
GtkWidget * gimp_pick_button_new (void);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue