app: GimpMotionBuffer: remove empty constructed()
and move buffer destruction from dispose() to finalize().
This commit is contained in:
@ -55,7 +55,6 @@ enum
|
|||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
|
||||||
static void gimp_motion_buffer_constructed (GObject *object);
|
|
||||||
static void gimp_motion_buffer_dispose (GObject *object);
|
static void gimp_motion_buffer_dispose (GObject *object);
|
||||||
static void gimp_motion_buffer_finalize (GObject *object);
|
static void gimp_motion_buffer_finalize (GObject *object);
|
||||||
static void gimp_motion_buffer_set_property (GObject *object,
|
static void gimp_motion_buffer_set_property (GObject *object,
|
||||||
@ -115,7 +114,6 @@ gimp_motion_buffer_class_init (GimpMotionBufferClass *klass)
|
|||||||
GDK_TYPE_MODIFIER_TYPE,
|
GDK_TYPE_MODIFIER_TYPE,
|
||||||
G_TYPE_BOOLEAN);
|
G_TYPE_BOOLEAN);
|
||||||
|
|
||||||
object_class->constructed = gimp_motion_buffer_constructed;
|
|
||||||
object_class->dispose = gimp_motion_buffer_dispose;
|
object_class->dispose = gimp_motion_buffer_dispose;
|
||||||
object_class->finalize = gimp_motion_buffer_finalize;
|
object_class->finalize = gimp_motion_buffer_finalize;
|
||||||
object_class->set_property = gimp_motion_buffer_set_property;
|
object_class->set_property = gimp_motion_buffer_set_property;
|
||||||
@ -129,13 +127,6 @@ gimp_motion_buffer_init (GimpMotionBuffer *buffer)
|
|||||||
buffer->event_queue = g_array_new (FALSE, FALSE, sizeof (GimpCoords));
|
buffer->event_queue = g_array_new (FALSE, FALSE, sizeof (GimpCoords));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_motion_buffer_constructed (GObject *object)
|
|
||||||
{
|
|
||||||
if (G_OBJECT_CLASS (parent_class)->constructed)
|
|
||||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_motion_buffer_dispose (GObject *object)
|
gimp_motion_buffer_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
@ -147,6 +138,14 @@ gimp_motion_buffer_dispose (GObject *object)
|
|||||||
buffer->event_delay_timeout = 0;
|
buffer->event_delay_timeout = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_motion_buffer_finalize (GObject *object)
|
||||||
|
{
|
||||||
|
GimpMotionBuffer *buffer = GIMP_MOTION_BUFFER (object);
|
||||||
|
|
||||||
if (buffer->event_history)
|
if (buffer->event_history)
|
||||||
{
|
{
|
||||||
g_array_free (buffer->event_history, TRUE);
|
g_array_free (buffer->event_history, TRUE);
|
||||||
@ -159,12 +158,6 @@ gimp_motion_buffer_dispose (GObject *object)
|
|||||||
buffer->event_queue = NULL;
|
buffer->event_queue = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gimp_motion_buffer_finalize (GObject *object)
|
|
||||||
{
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,8 +230,10 @@ gimp_motion_buffer_end_stroke (GimpMotionBuffer *buffer)
|
|||||||
* gimp_motion_buffer_motion_event:
|
* gimp_motion_buffer_motion_event:
|
||||||
* @buffer:
|
* @buffer:
|
||||||
* @coords:
|
* @coords:
|
||||||
* @inertia_factor:
|
|
||||||
* @time:
|
* @time:
|
||||||
|
* @scale_x:
|
||||||
|
* @scale_y:
|
||||||
|
* @event_fill:
|
||||||
*
|
*
|
||||||
* This function evaluates the event to decide if the change is big
|
* This function evaluates the event to decide if the change is big
|
||||||
* enough to need handling and returns FALSE, if change is less than
|
* enough to need handling and returns FALSE, if change is less than
|
||||||
@ -255,7 +250,8 @@ gimp_motion_buffer_end_stroke (GimpMotionBuffer *buffer)
|
|||||||
* each tool. If they were to use this distance, more resouces on
|
* each tool. If they were to use this distance, more resouces on
|
||||||
* recalculating the same value would be saved.
|
* recalculating the same value would be saved.
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value: %TRUE if the motion was significant enough to be
|
||||||
|
* processed, %FALSE otherwise.
|
||||||
**/
|
**/
|
||||||
gboolean
|
gboolean
|
||||||
gimp_motion_buffer_motion_event (GimpMotionBuffer *buffer,
|
gimp_motion_buffer_motion_event (GimpMotionBuffer *buffer,
|
||||||
|
Reference in New Issue
Block a user