X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-recpt-editor.c;h=4ef9fc9a077cd0177d0fa59c44c7094a0f304ceb;hp=6416f6259724da1884cd9b40aa768626394fa826;hb=ecd20f1229f24b99f53f395dc7341984c128a340;hpb=ebb389af84a5ee605201db15183ead40750454b1 diff --git a/src/widgets/modest-recpt-editor.c b/src/widgets/modest-recpt-editor.c index 6416f62..4ef9fc9 100644 --- a/src/widgets/modest-recpt-editor.c +++ b/src/widgets/modest-recpt-editor.c @@ -44,6 +44,12 @@ #include #include +/* FIXNE: we should have no maemo-deps in widgets/ */ +#ifndef MODEST_TOOLKIT_GTK +#include "maemo/modest-hildon-includes.h" +#endif /*!MODEST_TOOLKIT_GTK*/ + + static GObjectClass *parent_class = NULL; #define RECIPIENT_TAG_ID "recpt-id" @@ -147,7 +153,7 @@ modest_recpt_editor_add_recipients (ModestRecptEditor *recpt_editor, const gchar ModestRecptEditorPrivate *priv; GtkTextBuffer *buffer = NULL; GtkTextIter iter; - gchar * string_to_add; + gchar *string_to_add; g_return_if_fail (MODEST_IS_RECPT_EDITOR (recpt_editor)); priv = MODEST_RECPT_EDITOR_GET_PRIVATE (recpt_editor); @@ -167,13 +173,14 @@ modest_recpt_editor_add_recipients (ModestRecptEditor *recpt_editor, const gchar g_signal_handlers_block_by_func (buffer, modest_recpt_editor_on_insert_text, recpt_editor); - gtk_text_buffer_insert (buffer, &iter, recipients, -1); + gtk_text_buffer_insert (buffer, &iter, string_to_add, -1); g_signal_handlers_unblock_by_func (buffer, modest_recpt_editor_on_insert_text, recpt_editor); if (GTK_WIDGET_REALIZED (recpt_editor)) gtk_widget_queue_resize (GTK_WIDGET (recpt_editor)); + g_free (string_to_add); } void @@ -334,8 +341,10 @@ modest_recpt_editor_instance_init (GTypeInstance *instance, gpointer g_class) priv->text_view = gtk_text_view_new (); /* Auto-capitalization is the default, so let's turn it off: */ +#ifdef MAEMO_CHANGES hildon_gtk_text_view_set_input_mode (GTK_TEXT_VIEW (priv->text_view), HILDON_GTK_INPUT_MODE_FULL); +#endif priv->recipients = NULL; @@ -548,7 +557,12 @@ modest_recpt_editor_on_insert_text (GtkTextBuffer *buffer, if (!is_valid_insert (text, len)) { gchar *new_text = create_valid_text (text, len); g_signal_stop_emission_by_name (G_OBJECT (buffer), "insert-text"); + g_signal_handlers_block_by_func (buffer, modest_recpt_editor_on_insert_text, + editor); gtk_text_buffer_insert (buffer, location, new_text, -1); + g_signal_handlers_unblock_by_func (buffer, + modest_recpt_editor_on_insert_text, + editor); g_free (new_text); return; }