@@ -149,22 +149,33 @@ ientry_get_property(GObject *object,
149149 }
150150}
151151
152+ static void
153+ ientry_set_text (iEntry * ientry , const char * text )
154+ {
155+ GtkEntryBuffer * buffer = gtk_entry_get_buffer (GTK_ENTRY (ientry -> entry ));
156+
157+ g_signal_handlers_block_matched (G_OBJECT (buffer ),
158+ G_SIGNAL_MATCH_DATA , 0 , 0 , NULL , NULL , ientry );
159+
160+ if (text &&
161+ !g_str_equal (text , ientry -> text )) {
162+ gtk_entry_buffer_set_text (buffer , text , -1 );
163+ VIPS_SETSTR (ientry -> text , text );
164+ }
165+
166+ g_signal_handlers_unblock_matched (G_OBJECT (buffer ),
167+ G_SIGNAL_MATCH_DATA , 0 , 0 , NULL , NULL , ientry );
168+ }
169+
152170static void
153171ientry_set_property (GObject * object ,
154172 guint prop_id , const GValue * value , GParamSpec * pspec )
155173{
156174 iEntry * ientry = (iEntry * ) object ;
157175
158- const char * text ;
159-
160176 switch (prop_id ) {
161177 case PROP_TEXT :
162- text = g_value_get_string (value );
163- if (text &&
164- !g_str_equal (text , ientry -> text )) {
165- VIPS_SETSTR (ientry -> text , text );
166- gtk_editable_set_text (GTK_EDITABLE (ientry -> entry ), text );
167- }
178+ ientry_set_text (ientry , g_value_get_string (value ));
168179 break ;
169180
170181 case PROP_WIDTH_CHARS :
0 commit comments