text entry widget question




I'm playing around with gtk, and noticed something that doesn't make
sense to me.  gtk_entry_set_text redraws the text when it's set.
gtk_entry_append_text and gtk_entry_prepend_text don't.

Is there a reason for this?

Also, when I upgraded from gtk+-971109 to gtk+-0.99.0 my code stopped
working (specifically, my labels aren't getting the strings drawn in
them) is there some interface change I missed due to the
internationalization stuff?

(if there isn't a reason for the not updating..  here's a patch :)

*** gtkentry.c  Sun Dec  7 11:25:47 1997
--- gtkentry.new        Fri Dec 19 21:27:22 1997
***************
*** 411,416 ****
--- 411,419 ----
    gtk_entry_insert_text (entry, text, strlen (text), &tmp_pos);
    entry->current_pos = tmp_pos;
  
+   if (GTK_WIDGET_DRAWABLE (entry))
+     gtk_entry_draw_text (entry);
+ 
    gtk_signal_emit (GTK_OBJECT (entry), entry_signals[SET_TEXT]);
  }
  
***************
*** 426,431 ****
--- 429,437 ----
    tmp_pos = 0;
    gtk_entry_insert_text (entry, text, strlen (text), &tmp_pos);
    entry->current_pos = tmp_pos;
+ 
+   if (GTK_WIDGET_DRAWABLE (entry))
+     gtk_entry_draw_text (entry);
  
    gtk_signal_emit (GTK_OBJECT (entry), entry_signals[SET_TEXT]);
  }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]