From: gnome-perl (bugzilla.gnome.o. <bug...@gn...> - 2010-04-24 20:16:13
|
https://bugzilla.gnome.org/show_bug.cgi?id=616634 gnome-perl | Gtk2 | unspecified Torsten Schoenfeld <kaffeetisch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159417|none |needs-work status| | --- Comment #13 from Torsten Schoenfeld <kaf...@gm...> 2010-04-24 20:16:01 UTC --- Review of attachment 159417: --> (https://bugzilla.gnome.org/review?bug=616634&attachment=159417) Looks good in general. A few comments: ::: xs/GtkEntryBuffer.xs @@ +45,3 @@ +MAX_SIZE (class) + CODE: + RETVAL = GTK_ENTRY_BUFFER_MAX_SIZE; I think it is better to use the constants wrapping machinery for this. Just adding a line "GTK_ENTRY_BUFFER_MAX_SIZE newSVuv" to a newly created "constants-2.18" file should do the trick. @@ +50,3 @@ + +GtkEntryBuffer_noinc * +gtk_entry_buffer_new (class, const gchar *initial_chars=NULL, gint n_initial_chars=-1) I don't think there is any precedence of having such a string length argument in the Perl API. Is it really necessary? Or can you just use the gchar_length typemap as in GtkTextBuffer.xs? If a user wants to show only a substring, he can still use substr(). Similar comments apply to insert_text() and emit_inserted_text() below. @@ +75,3 @@ +void gtk_entry_buffer_insert_text (GtkEntryBuffer *buffer, guint position, const gchar *chars, gint n_chars=-1); + +guint gtk_entry_buffer_delete_text (GtkEntryBuffer *buffer, guint position=0, gint n_chars=-1); I don't think the default -1 for n_chars makes sense here. -- Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. |