#include "modest-validating-entry.h"
#include <modest-ui-constants.h>
-#include <gtk/gtksignal.h> /* For the gtk_signal_stop_emit_by_name() convenience function. */
#include <string.h> /* For strlen(). */
/* Include config.h so that _() works: */
#include <config.h>
#endif
-
-#ifdef MODEST_TOOLKIT_HILDON2
-G_DEFINE_TYPE (ModestValidatingEntry, modest_validating_entry, HILDON_TYPE_ENTRY);
-#else
+#ifdef USE_GTK_ENTRY
G_DEFINE_TYPE (ModestValidatingEntry, modest_validating_entry, GTK_TYPE_ENTRY);
+#else
+G_DEFINE_TYPE (ModestValidatingEntry, modest_validating_entry, HILDON_TYPE_ENTRY);
#endif
#define VALIDATING_ENTRY_GET_PRIVATE(o) \
}
if(!allow) {
- /* The signal documentation says
- * "by connecting to this signal and then stopping the signal with
- * gtk_signal_emit_stop(), it is possible to modify the inserted text,
- * or prevent it from being inserted entirely."
- */
- gtk_signal_emit_stop_by_name (GTK_OBJECT (self), "insert-text");
+ /* The signal documentation says: */
+ /* "by connecting to this signal and then stopping the signal with */
+ /* g_signal_stop_emission(), it is possible to modify the inserted text, */
+ g_signal_stop_emission_by_name (self, "insert-text");
}
}