Commit 2a69c419 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

added gimp_boolean_handled_accum().

2004-06-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp-utils.[ch]: added gimp_boolean_handled_accum().

	* app/core/gimp.c
	* app/widgets/gimpcontrollerinfo.c: use it.
parent 75e6fc56
2004-06-17 Michael Natterer <mitch@gimp.org>
* app/core/gimp-utils.[ch]: added gimp_boolean_handled_accum().
* app/core/gimp.c
* app/widgets/gimpcontrollerinfo.c: use it.
2004-06-17 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontainer.c (gimp_container_deserialize): add newly
......
......@@ -154,3 +154,19 @@ gimp_get_default_language (const gchar *category)
return lang;
}
gboolean
gimp_boolean_handled_accum (GSignalInvocationHint *ihint,
GValue *return_accu,
const GValue *handler_return,
gpointer dummy)
{
gboolean continue_emission;
gboolean signal_handled;
signal_handled = g_value_get_boolean (handler_return);
g_value_set_boolean (return_accu, signal_handled);
continue_emission = ! signal_handled;
return continue_emission;
}
......@@ -42,5 +42,10 @@ gint64 gimp_g_list_get_memsize (GList *list,
gchar * gimp_get_default_language (const gchar *category);
gboolean gimp_boolean_handled_accum (GSignalInvocationHint *ihint,
GValue *return_accu,
const GValue *handler_return,
gpointer dummy);
#endif /* __APP_GIMP_UTILS_H__ */
......@@ -138,30 +138,11 @@ gimp_get_type (void)
return object_type;
}
gboolean
gimp_boolean_handled_accumulator (GSignalInvocationHint *ihint,
GValue *return_accu,
const GValue *handler_return,
gpointer dummy)
{
gboolean continue_emission;
gboolean signal_handled;
signal_handled = g_value_get_boolean (handler_return);
g_value_set_boolean (return_accu, signal_handled);
continue_emission = ! signal_handled;
return continue_emission;
}
static void
gimp_class_init (GimpClass *klass)
{
GObjectClass *object_class;
GimpObjectClass *gimp_object_class;
object_class = G_OBJECT_CLASS (klass);
gimp_object_class = GIMP_OBJECT_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
......@@ -190,7 +171,7 @@ gimp_class_init (GimpClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpClass, exit),
gimp_boolean_handled_accumulator, NULL,
gimp_boolean_handled_accum, NULL,
gimp_marshal_BOOLEAN__BOOLEAN,
G_TYPE_BOOLEAN, 1,
G_TYPE_BOOLEAN);
......
......@@ -36,6 +36,7 @@
#include "config/gimpconfigwriter.h"
#include "config/gimpscanner.h"
#include "core/gimp-utils.h"
#include "core/gimpmarshal.h"
#include "gimpcontrollerinfo.h"
......@@ -132,22 +133,6 @@ gimp_controller_info_get_type (void)
return controller_type;
}
gboolean
gimp_controller_info_boolean_handled_accumulator (GSignalInvocationHint *ihint,
GValue *return_accu,
const GValue *handler_return,
gpointer dummy)
{
gboolean continue_emission;
gboolean signal_handled;
signal_handled = g_value_get_boolean (handler_return);
g_value_set_boolean (return_accu, signal_handled);
continue_emission = ! signal_handled;
return continue_emission;
}
static void
gimp_controller_info_class_init (GimpControllerInfoClass *klass)
{
......@@ -176,7 +161,7 @@ gimp_controller_info_class_init (GimpControllerInfoClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpControllerInfoClass, event_mapped),
gimp_controller_info_boolean_handled_accumulator, NULL,
gimp_boolean_handled_accum, NULL,
gimp_marshal_BOOLEAN__OBJECT_POINTER_STRING,
G_TYPE_BOOLEAN, 3,
G_TYPE_OBJECT,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment