#include "hildon-composite-widget.h"
#include <hildon-widgets/hildon-input-mode-hint.h>
#include <hildon-widgets/hildon-defines.h>
+#include "hildon-libs-enum-types.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
hildon_number_editor_finalize (GObject *self);
static gboolean
-hildon_number_editor_error_handler(HildonNumberEditor *editor,
+hildon_number_editor_range_error(HildonNumberEditor *editor,
HildonNumberEditorErrorType type);
static gboolean
widget_class->size_allocate = hildon_number_editor_size_allocate;
widget_class->focus = hildon_composite_widget_focus;
- editor_class->error_handler = hildon_number_editor_error_handler;
+ editor_class->range_error = hildon_number_editor_range_error;
/* Because we derived our widget from GtkContainer, we should override
forall method */
HildonNumberEditor_signal[RANGE_ERROR] =
g_signal_new("range_error", HILDON_TYPE_NUMBER_EDITOR,
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET
- (HildonNumberEditorClass, error_handler),
+ (HildonNumberEditorClass, range_error),
g_signal_accumulator_true_handled, NULL,
- _hildon_marshal_BOOLEAN__INT,
- G_TYPE_BOOLEAN, 1, G_TYPE_INT);
+ _hildon_marshal_BOOLEAN__ENUM,
+ G_TYPE_BOOLEAN, 1, HILDON_TYPE_NUMBER_EDITOR_ERROR_TYPE);
}
static void
{
HildonNumberEditorPrivate *priv;
+ GDK_THREADS_ENTER ();
+
g_assert(HILDON_IS_NUMBER_EDITOR(editor));
/* Update value based on button held */
priv = HILDON_NUMBER_EDITOR_GET_PRIVATE(editor);
change_numbers(editor, priv->button_type);
+ GDK_THREADS_LEAVE ();
+
return TRUE;
}
}
static gboolean
-hildon_number_editor_error_handler(HildonNumberEditor *editor,
+hildon_number_editor_range_error(HildonNumberEditor *editor,
HildonNumberEditorErrorType type)
{
static gboolean
hildon_number_editor_select_all (HildonNumberEditorPrivate *priv)
{
+ GDK_THREADS_ENTER ();
gtk_editable_select_region(GTK_EDITABLE(priv->num_entry), 0, -1);
priv->select_all_idle_id = 0;
+ GDK_THREADS_LEAVE ();
return FALSE;
}