X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkentrybuffer.c;h=2190a10f71a416b9887c8af090eb9289a0f7c030;hb=894f84c623f2e280376be2945159fbf354377913;hp=9a51d5e8472ad9593af04f6acae3afd78cb8d4e5;hpb=b5dab96b45e48756363e24baad955608f5a99102;p=~andy%2Fgtk diff --git a/gtk/gtkentrybuffer.c b/gtk/gtkentrybuffer.c index 9a51d5e84..2190a10f7 100644 --- a/gtk/gtkentrybuffer.c +++ b/gtk/gtkentrybuffer.c @@ -12,9 +12,7 @@ * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ #include "config.h" @@ -24,7 +22,6 @@ #include "gtkmarshalers.h" #include "gtkprivate.h" #include "gtkwidget.h" -#include "gtkalias.h" #include @@ -70,13 +67,13 @@ static guint signals[LAST_SIGNAL] = { 0 }; struct _GtkEntryBufferPrivate { - gint max_length; - /* Only valid if this class is not derived */ gchar *normal_text; gsize normal_text_size; gsize normal_text_bytes; guint normal_text_chars; + + gint max_length; }; G_DEFINE_TYPE (GtkEntryBuffer, gtk_entry_buffer, G_TYPE_OBJECT); @@ -347,10 +344,13 @@ gtk_entry_buffer_class_init (GtkEntryBufferClass *klass) * * Since: 2.18 */ - g_object_class_install_property (gobject_class, PROP_TEXT, - g_param_spec_string ("text", P_("Text"), - P_("The contents of the buffer"), - "", GTK_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, + PROP_TEXT, + g_param_spec_string ("text", + P_("Text"), + P_("The contents of the buffer"), + "", + GTK_PARAM_READWRITE)); /** * GtkEntryBuffer:length: @@ -359,10 +359,13 @@ gtk_entry_buffer_class_init (GtkEntryBufferClass *klass) * * Since: 2.18 */ - g_object_class_install_property (gobject_class, PROP_LENGTH, - g_param_spec_uint ("length", P_("Text length"), - P_("Length of the text currently in the buffer"), - 0, GTK_ENTRY_BUFFER_MAX_SIZE, 0, GTK_PARAM_READABLE)); + g_object_class_install_property (gobject_class, + PROP_LENGTH, + g_param_spec_uint ("length", + P_("Text length"), + P_("Length of the text currently in the buffer"), + 0, GTK_ENTRY_BUFFER_MAX_SIZE, 0, + GTK_PARAM_READABLE)); /** * GtkEntryBuffer:max-length: @@ -371,13 +374,16 @@ gtk_entry_buffer_class_init (GtkEntryBufferClass *klass) * * Since: 2.18 */ - g_object_class_install_property (gobject_class, PROP_MAX_LENGTH, - g_param_spec_uint ("max-length", P_("Maximum length"), - P_("Maximum number of characters for this entry. Zero if no maximum"), - 0, GTK_ENTRY_BUFFER_MAX_SIZE, 0, GTK_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, + PROP_MAX_LENGTH, + g_param_spec_int ("max-length", + P_("Maximum length"), + P_("Maximum number of characters for this entry. Zero if no maximum"), + 0, GTK_ENTRY_BUFFER_MAX_SIZE, 0, + GTK_PARAM_READWRITE)); /** - * GtkEntry::inserted-text: + * GtkEntryBuffer::inserted-text: * @buffer: a #GtkEntryBuffer * @position: the position the text was inserted at. * @chars: The text that was inserted. @@ -399,7 +405,7 @@ gtk_entry_buffer_class_init (GtkEntryBufferClass *klass) G_TYPE_UINT); /** - * GtkEntry::deleted-text: + * GtkEntryBuffer::deleted-text: * @buffer: a #GtkEntryBuffer * @position: the position the text was deleted at. * @n_chars: The number of characters that were deleted. @@ -425,7 +431,7 @@ gtk_entry_buffer_class_init (GtkEntryBufferClass *klass) /** * gtk_entry_buffer_new: - * @initial_chars: initial buffer text, or %NULL + * @initial_chars: (allow-none): initial buffer text, or %NULL * @n_initial_chars: number of characters in @initial_chars, or -1 * * Create a new GtkEntryBuffer object. @@ -740,6 +746,3 @@ gtk_entry_buffer_emit_deleted_text (GtkEntryBuffer *buffer, g_return_if_fail (GTK_IS_ENTRY_BUFFER (buffer)); g_signal_emit (buffer, signals[DELETED_TEXT], 0, position, n_chars); } - -#define __GTK_ENTRY_BUFFER_C__ -#include "gtkaliasdef.c"