Commit ac770765 authored by Manish Singh's avatar Manish Singh Committed by Manish Singh

Deprecation cleanup

Thu Oct 10 14:41:05 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
        gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch]
        gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]:
        Deprecation cleanup
parent 4dad7105
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch]
gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]:
Deprecation cleanup
Thu Oct 10 14:35:31 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch]: Privately export
......
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch]
gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]:
Deprecation cleanup
Thu Oct 10 14:35:31 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch]: Privately export
......
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch]
gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]:
Deprecation cleanup
Thu Oct 10 14:35:31 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch]: Privately export
......
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch]
gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]:
Deprecation cleanup
Thu Oct 10 14:35:31 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch]: Privately export
......
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch]
gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]:
Deprecation cleanup
Thu Oct 10 14:35:31 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch]: Privately export
......
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch]
gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]:
Deprecation cleanup
Thu Oct 10 14:35:31 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkscrolledwindow.[ch]: Privately export
......
......@@ -57,7 +57,6 @@
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "gtksignal.h"
#include "gtktexttag.h"
#include "gtktexttagtable.h"
#include "gtktextlayout.h"
......@@ -425,9 +424,9 @@ _gtk_text_btree_new (GtkTextTagTable *table,
tree->end_iter_segment_byte_index = 0;
tree->end_iter_segment_char_offset = 0;
g_object_ref (G_OBJECT (tree->table));
g_object_ref (tree->table);
tree->tag_changed_handler = g_signal_connect (G_OBJECT (tree->table),
tree->tag_changed_handler = g_signal_connect (tree->table,
"tag_changed",
G_CALLBACK (tag_changed_cb),
tree);
......@@ -471,8 +470,8 @@ _gtk_text_btree_new (GtkTextTagTable *table,
seg->body.mark.not_deleteable = TRUE;
g_object_ref (G_OBJECT (tree->insert_mark));
g_object_ref (G_OBJECT (tree->selection_bound_mark));
g_object_ref (tree->insert_mark);
g_object_ref (tree->selection_bound_mark);
}
tree->refcount = 1;
......@@ -499,10 +498,10 @@ _gtk_text_btree_unref (GtkTextBTree *tree)
if (tree->refcount == 0)
{
g_signal_handler_disconnect (G_OBJECT (tree->table),
g_signal_handler_disconnect (tree->table,
tree->tag_changed_handler);
g_object_unref (G_OBJECT (tree->table));
g_object_unref (tree->table);
tree->table = NULL;
gtk_text_btree_node_destroy (tree, tree->root_node);
......@@ -517,9 +516,9 @@ _gtk_text_btree_unref (GtkTextBTree *tree)
tree->child_anchor_table = NULL;
}
g_object_unref (G_OBJECT (tree->insert_mark));
g_object_unref (tree->insert_mark);
tree->insert_mark = NULL;
g_object_unref (G_OBJECT (tree->selection_bound_mark));
g_object_unref (tree->selection_bound_mark);
tree->selection_bound_mark = NULL;
g_free (tree);
......@@ -2698,7 +2697,7 @@ _gtk_text_btree_release_mark_segment (GtkTextBTree *tree,
/* Remove the ref on the mark, which frees segment as a side effect
* if this is the last reference.
*/
g_object_unref (G_OBJECT (segment->body.mark.obj));
g_object_unref (segment->body.mark.obj);
}
void
......@@ -5778,7 +5777,7 @@ gtk_text_btree_get_tag_info (GtkTextBTree *tree,
info = g_new (GtkTextTagInfo, 1);
info->tag = tag;
g_object_ref (G_OBJECT (tag));
g_object_ref (tag);
info->tag_root = NULL;
info->toggle_count = 0;
......@@ -5826,7 +5825,7 @@ gtk_text_btree_remove_tag_info (GtkTextBTree *tree,
list->next = NULL;
g_slist_free (list);
g_object_unref (G_OBJECT (info->tag));
g_object_unref (info->tag);
g_free (info);
return;
......
......@@ -32,7 +32,6 @@
#include "gtkclipboard.h"
#include "gtkinvisible.h"
#include "gtkmarshalers.h"
#include "gtksignal.h"
#include "gtktextbuffer.h"
#include "gtktextbtree.h"
#include "gtktextiterprivate.h"
......@@ -148,10 +147,8 @@ gtk_text_buffer_get_type (void)
(GInstanceInitFunc) gtk_text_buffer_init
};
our_type = g_type_register_static (G_TYPE_OBJECT,
"GtkTextBuffer",
&our_info,
0);
our_type = g_type_register_static (G_TYPE_OBJECT, "GtkTextBuffer",
&our_info, 0);
}
return our_type;
......@@ -192,11 +189,11 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, insert_text),
NULL, NULL,
_gtk_marshal_VOID__BOXED_STRING_INT,
GTK_TYPE_NONE,
G_TYPE_NONE,
3,
GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE,
GTK_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
GTK_TYPE_INT);
G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE,
G_TYPE_INT);
signals[INSERT_PIXBUF] =
g_signal_new ("insert_pixbuf",
......@@ -205,7 +202,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, insert_pixbuf),
NULL, NULL,
_gtk_marshal_VOID__BOXED_OBJECT,
GTK_TYPE_NONE,
G_TYPE_NONE,
2,
GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE,
GDK_TYPE_PIXBUF);
......@@ -217,7 +214,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, insert_child_anchor),
NULL, NULL,
_gtk_marshal_VOID__BOXED_OBJECT,
GTK_TYPE_NONE,
G_TYPE_NONE,
2,
GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE,
GTK_TYPE_TEXT_CHILD_ANCHOR);
......@@ -229,7 +226,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, delete_range),
NULL, NULL,
_gtk_marshal_VOID__BOXED_BOXED,
GTK_TYPE_NONE,
G_TYPE_NONE,
2,
GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE,
GTK_TYPE_TEXT_ITER | G_SIGNAL_TYPE_STATIC_SCOPE);
......@@ -241,7 +238,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, changed),
NULL, NULL,
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE,
G_TYPE_NONE,
0);
signals[MODIFIED_CHANGED] =
......@@ -251,7 +248,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, modified_changed),
NULL, NULL,
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE,
G_TYPE_NONE,
0);
signals[MARK_SET] =
......@@ -261,7 +258,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, mark_set),
NULL, NULL,
_gtk_marshal_VOID__BOXED_OBJECT,
GTK_TYPE_NONE,
G_TYPE_NONE,
2,
GTK_TYPE_TEXT_ITER,
GTK_TYPE_TEXT_MARK);
......@@ -273,7 +270,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, mark_deleted),
NULL, NULL,
_gtk_marshal_VOID__OBJECT,
GTK_TYPE_NONE,
G_TYPE_NONE,
1,
GTK_TYPE_TEXT_MARK);
......@@ -284,7 +281,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, apply_tag),
NULL, NULL,
_gtk_marshal_VOID__OBJECT_BOXED_BOXED,
GTK_TYPE_NONE,
G_TYPE_NONE,
3,
GTK_TYPE_TEXT_TAG,
GTK_TYPE_TEXT_ITER,
......@@ -297,7 +294,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, remove_tag),
NULL, NULL,
_gtk_marshal_VOID__OBJECT_BOXED_BOXED,
GTK_TYPE_NONE,
G_TYPE_NONE,
3,
GTK_TYPE_TEXT_TAG,
GTK_TYPE_TEXT_ITER,
......@@ -310,7 +307,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, begin_user_action),
NULL, NULL,
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE,
G_TYPE_NONE,
0);
signals[END_USER_ACTION] =
......@@ -320,7 +317,7 @@ gtk_text_buffer_class_init (GtkTextBufferClass *klass)
G_STRUCT_OFFSET (GtkTextBufferClass, end_user_action),
NULL, NULL,
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE,
G_TYPE_NONE,
0);
}
......@@ -411,9 +408,7 @@ gtk_text_buffer_new (GtkTextTagTable *table)
{
GtkTextBuffer *text_buffer;
text_buffer = GTK_TEXT_BUFFER (g_object_new (GTK_TYPE_TEXT_BUFFER,
"tag_table", table,
NULL));
text_buffer = g_object_new (GTK_TYPE_TEXT_BUFFER, "tag_table", table, NULL);
return text_buffer;
}
......@@ -431,7 +426,7 @@ gtk_text_buffer_finalize (GObject *object)
if (buffer->tag_table)
{
_gtk_text_tag_table_remove_buffer (buffer->tag_table, buffer);
g_object_unref (G_OBJECT (buffer->tag_table));
g_object_unref (buffer->tag_table);
buffer->tag_table = NULL;
}
......@@ -529,7 +524,7 @@ gtk_text_buffer_real_insert_text (GtkTextBuffer *buffer,
_gtk_text_btree_insert (iter, text, len);
g_signal_emit (G_OBJECT (buffer), signals[CHANGED], 0);
g_signal_emit (buffer, signals[CHANGED], 0);
}
static void
......@@ -549,7 +544,7 @@ gtk_text_buffer_emit_insert (GtkTextBuffer *buffer,
if (len > 0)
{
g_signal_emit (G_OBJECT (buffer), signals[INSERT_TEXT], 0,
g_signal_emit (buffer, signals[INSERT_TEXT], 0,
iter, text, len);
}
}
......@@ -731,7 +726,7 @@ save_range (GtkTextIter *range_start,
r = g_new (Range, 1);
r->buffer = gtk_text_iter_get_buffer (range_start);
g_object_ref (G_OBJECT (r->buffer));
g_object_ref (r->buffer);
r->start_mark =
gtk_text_buffer_create_mark (gtk_text_iter_get_buffer (range_start),
......@@ -787,7 +782,7 @@ restore_range (Range *r)
if (gtk_text_iter_compare (r->range_end, r->whole_end) > 0)
*r->range_end = *r->whole_end;
g_object_unref (G_OBJECT (r->buffer));
g_object_unref (r->buffer);
g_free (r);
}
......@@ -1253,7 +1248,7 @@ gtk_text_buffer_real_delete_range (GtkTextBuffer *buffer,
/* may have deleted the selection... */
update_selection_clipboards (buffer);
g_signal_emit (G_OBJECT (buffer), signals[CHANGED], 0);
g_signal_emit (buffer, signals[CHANGED], 0);
}
static void
......@@ -1270,7 +1265,7 @@ gtk_text_buffer_emit_delete (GtkTextBuffer *buffer,
gtk_text_iter_order (start, end);
g_signal_emit (G_OBJECT (buffer),
g_signal_emit (buffer,
signals[DELETE_RANGE],
0,
start, end);
......@@ -1529,7 +1524,7 @@ gtk_text_buffer_real_insert_pixbuf (GtkTextBuffer *buffer,
{
_gtk_text_btree_insert_pixbuf (iter, pixbuf);
g_signal_emit (G_OBJECT (buffer), signals[CHANGED], 0);
g_signal_emit (buffer, signals[CHANGED], 0);
}
/**
......@@ -1558,7 +1553,7 @@ gtk_text_buffer_insert_pixbuf (GtkTextBuffer *buffer,
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
g_return_if_fail (gtk_text_iter_get_buffer (iter) == buffer);
g_signal_emit (G_OBJECT (buffer), signals[INSERT_PIXBUF], 0,
g_signal_emit (buffer, signals[INSERT_PIXBUF], 0,
iter, pixbuf);
}
......@@ -1574,7 +1569,7 @@ gtk_text_buffer_real_insert_anchor (GtkTextBuffer *buffer,
{
_gtk_text_btree_insert_child_anchor (iter, anchor);
g_signal_emit (G_OBJECT (buffer), signals[CHANGED], 0);
g_signal_emit (buffer, signals[CHANGED], 0);
}
/**
......@@ -1606,7 +1601,7 @@ gtk_text_buffer_insert_child_anchor (GtkTextBuffer *buffer,
g_return_if_fail (GTK_IS_TEXT_CHILD_ANCHOR (anchor));
g_return_if_fail (gtk_text_iter_get_buffer (iter) == buffer);
g_signal_emit (G_OBJECT (buffer), signals[INSERT_CHILD_ANCHOR], 0,
g_signal_emit (buffer, signals[INSERT_CHILD_ANCHOR], 0,
iter, anchor);
}
......@@ -1638,7 +1633,7 @@ gtk_text_buffer_create_child_anchor (GtkTextBuffer *buffer,
gtk_text_buffer_insert_child_anchor (buffer, iter, anchor);
g_object_unref (G_OBJECT (anchor));
g_object_unref (anchor);
return anchor;
}
......@@ -1663,15 +1658,15 @@ gtk_text_buffer_mark_set (GtkTextBuffer *buffer,
* default behavior.
*/
g_object_ref (G_OBJECT (mark));
g_object_ref (mark);
g_signal_emit (G_OBJECT (buffer),
g_signal_emit (buffer,
signals[MARK_SET],
0,
location,
mark);
g_object_unref (G_OBJECT (mark));
g_object_unref (mark);
}
/**
......@@ -1828,7 +1823,7 @@ gtk_text_buffer_delete_mark (GtkTextBuffer *buffer,
g_return_if_fail (!gtk_text_mark_get_deleted (mark));
g_return_if_fail (GTK_IS_TEXT_BUFFER (buffer));
g_object_ref (G_OBJECT (mark));
g_object_ref (mark);
_gtk_text_btree_remove_mark (get_btree (buffer), mark);
......@@ -1836,11 +1831,11 @@ gtk_text_buffer_delete_mark (GtkTextBuffer *buffer,
* removing the mark, rather than removing the mark in a default
* handler.
*/
g_signal_emit (G_OBJECT (buffer), signals[MARK_DELETED],
g_signal_emit (buffer, signals[MARK_DELETED],
0,
mark);
g_object_unref (G_OBJECT (mark));
g_object_unref (mark);
}
/**
......@@ -2134,11 +2129,11 @@ gtk_text_buffer_emit_tag (GtkTextBuffer *buffer,
gtk_text_iter_order (&start_tmp, &end_tmp);
if (apply)
g_signal_emit (G_OBJECT (buffer), signals[APPLY_TAG],
g_signal_emit (buffer, signals[APPLY_TAG],
0,
tag, &start_tmp, &end_tmp);
else
g_signal_emit (G_OBJECT (buffer), signals[REMOVE_TAG],
g_signal_emit (buffer, signals[REMOVE_TAG],
0,
tag, &start_tmp, &end_tmp);
}
......@@ -2617,7 +2612,7 @@ gtk_text_buffer_set_modified (GtkTextBuffer *buffer,
else
{
buffer->modified = fixed_setting;
g_signal_emit (G_OBJECT (buffer), signals[MODIFIED_CHANGED], 0);
g_signal_emit (buffer, signals[MODIFIED_CHANGED], 0);
}
}
......@@ -2948,7 +2943,7 @@ clipboard_text_received (GtkClipboard *clipboard,
post_paste_cleanup (request_data);
}
g_object_unref (G_OBJECT (buffer));
g_object_unref (buffer);
g_free (request_data);
}
......@@ -3025,7 +3020,7 @@ paste_from_buffer (ClipboardRequest *request_data,
GtkTextIter insert_point;
/* We're about to emit a bunch of signals, so be safe */
g_object_ref (G_OBJECT (src_buffer));
g_object_ref (src_buffer);
pre_paste_prep (request_data, &insert_point);
......@@ -3043,7 +3038,7 @@ paste_from_buffer (ClipboardRequest *request_data,
post_paste_cleanup (request_data);
g_object_unref (G_OBJECT (src_buffer));
g_object_unref (src_buffer);
g_free (request_data);
}
......@@ -3266,7 +3261,7 @@ gtk_text_buffer_paste_clipboard (GtkTextBuffer *buffer,
override_location, FALSE);
data->buffer = buffer;
g_object_ref (G_OBJECT (buffer));
g_object_ref (buffer);
data->interactive = TRUE;
data->default_editable = default_editable;
......@@ -3483,7 +3478,7 @@ gtk_text_buffer_begin_user_action (GtkTextBuffer *buffer)
if (buffer->user_action_count == 1)
{
/* Outermost nested user action begin emits the signal */
g_signal_emit (G_OBJECT (buffer), signals[BEGIN_USER_ACTION], 0);
g_signal_emit (buffer, signals[BEGIN_USER_ACTION], 0);
}
}
......@@ -3505,7 +3500,7 @@ gtk_text_buffer_end_user_action (GtkTextBuffer *buffer)
if (buffer->user_action_count == 0)
{
/* Ended the outermost-nested user action end, so emit the signal */
g_signal_emit (G_OBJECT (buffer), signals[END_USER_ACTION], 0);
g_signal_emit (buffer, signals[END_USER_ACTION], 0);
}
}
......
......@@ -124,8 +124,8 @@ gtk_text_render_state_new (GtkWidget *widget,
static void
gtk_text_render_state_destroy (GtkTextRenderState *state)
{
gdk_gc_unref (state->fg_gc);
gdk_gc_unref (state->bg_gc);
g_object_unref (state->fg_gc);
g_object_unref (state->bg_gc);
g_free (state);
}
......@@ -410,7 +410,7 @@ render_layout_line (GdkDrawable *drawable,
{
gdk_gc_set_clip_rectangle (render_state->fg_gc,
&render_state->clip_rect);
g_object_unref (G_OBJECT (mask));
g_object_unref (mask);
}
}
......@@ -426,7 +426,7 @@ render_layout_line (GdkDrawable *drawable,
if (widgets)
{
g_object_ref (G_OBJECT (widget));
g_object_ref (widget);
*widgets = g_list_prepend (*widgets, widget);
}
}
......
......@@ -77,7 +77,6 @@
*/
#define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
#include "gtksignal.h"
#include "gtkmarshalers.h"
#include "gtktextlayout.h"
#include "gtktextbtree.h"
......@@ -149,10 +148,8 @@ gtk_text_layout_get_type (void)
(GInstanceInitFunc) gtk_text_layout_init
};
our_type = g_type_register_static (G_TYPE_OBJECT,
"GtkTextLayout",
&our_info,
0);
our_type = g_type_register_static (G_TYPE_OBJECT, "GtkTextLayout",
&our_info, 0);
}
return our_type;
......@@ -178,7 +175,7 @@ gtk_text_layout_class_init (GtkTextLayoutClass *klass)
G_STRUCT_OFFSET (GtkTextLayoutClass, invalidated),
NULL, NULL,
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE,
G_TYPE_NONE,
0);
signals[CHANGED] =
......@@ -188,11 +185,11 @@ gtk_text_layout_class_init (GtkTextLayoutClass *klass)
G_STRUCT_OFFSET (GtkTextLayoutClass, changed),
NULL, NULL,
_gtk_marshal_VOID__INT_INT_INT,
GTK_TYPE_NONE,
G_TYPE_NONE,
3,
GTK_TYPE_INT,
GTK_TYPE_INT,
GTK_TYPE_INT);
G_TYPE_INT,
G_TYPE_INT,
G_TYPE_INT);
signals[ALLOCATE_CHILD] =
g_signal_new ("allocate_child",
......@@ -201,11 +198,11 @@ gtk_text_layout_class_init (GtkTextLayoutClass *klass)
G_STRUCT_OFFSET (GtkTextLayoutClass, allocate_child),
NULL, NULL,
_gtk_marshal_VOID__OBJECT_INT_INT,
GTK_TYPE_NONE,
G_TYPE_NONE,
3,
GTK_TYPE_OBJECT,
GTK_TYPE_INT,
GTK_TYPE_INT);
G_TYPE_INT,
G_TYPE_INT);
}
static void
......@@ -217,7 +214,7 @@ gtk_text_layout_init (GtkTextLayout *text_layout)
GtkTextLayout*
gtk_text_layout_new (void)
{
return GTK_TEXT_LAYOUT (g_object_new (gtk_text_layout_get_type (), NULL));
return g_object_new (GTK_TYPE_TEXT_LAYOUT, NULL);
}
static void
......@@ -245,12 +242,12 @@ gtk_text_layout_finalize (GObject *object)
if (layout->ltr_context)
{
g_object_unref (G_OBJECT (layout->ltr_context));
g_object_unref (layout->ltr_context);
layout->ltr_context = NULL;
}
if (layout->rtl_context)
{
g_object_unref (G_OBJECT (layout->rtl_context));
g_object_unref (layout->rtl_context);
layout->rtl_context = NULL;
}
......@@ -281,7 +278,7 @@ gtk_text_layout_set_buffer (GtkTextLayout *layout,
_gtk_text_btree_remove_view (_gtk_text_buffer_get_btree (layout->buffer),
layout);
g_object_unref (G_OBJECT (layout->buffer));
g_object_unref (layout->buffer);
layout->buffer = NULL;
}
......@@ -289,7 +286,7 @@ gtk_text_layout_set_buffer (GtkTextLayout *layout,
{
layout->buffer = buffer;
g_object_ref (G_OBJECT (buffer));
g_object_ref (buffer);
_gtk_text_btree_add_view (_gtk_text_buffer_get_btree (buffer), layout);
}
......@@ -332,16 +329,16 @@ gtk_text_layout_set_contexts (GtkTextLayout *layout,
g_return_if_fail (GTK_IS_TEXT_LAYOUT (layout));
if (layout->ltr_context)
g_object_unref (G_OBJECT (ltr_context));
g_object_unref (ltr_context);
layout->ltr_context = ltr_context;
g_object_ref (G_OBJECT (ltr_context));
g_object_ref (ltr_context);
if (layout->rtl_context)
g_object_unref (G_OBJECT (rtl_context));
g_object_unref (rtl_context);
layout->rtl_context = rtl_context;
g_object_ref (G_OBJECT (rtl_context));
g_object_ref (rtl_context);
DV (g_print ("invalidating all due to new pango contexts (%s)\n", G_STRLOC));
gtk_text_layout_invalidate_all (layout);
......@@ -518,7 +515,7 @@ gtk_text_layout_get_size (GtkTextLayout *layout,
static void
gtk_text_layout_invalidated (GtkTextLayout *layout)
{
g_signal_emit (G_OBJECT (layout), signals[INVALIDATED], 0);
g_signal_emit (layout, signals[INVALIDATED], 0);
}
void
......@@ -527,8 +524,7 @@ gtk_text_layout_changed (GtkTextLayout *layout,
gint old_height,
gint new_height)
{
g_signal_emit (G_OBJECT (layout), signals[CHANGED], 0,
y, old_height, new_height);
g_signal_emit (layout, signals[CHANGED], 0, y, old_height, new_height);
}
void
......@@ -1189,9 +1185,9 @@ gtk_text_attr_appearance_destroy (PangoAttribute *attr)
GtkTextAppearance *appearance = &((GtkTextAttrAppearance *)attr)->appearance;
if (appearance->bg_stipple)
gdk_drawable_unref (appearance->bg_stipple);
g_object_unref (appearance->bg_stipple);
if (appearance->fg_stipple)
gdk_drawable_unref (appearance->fg_stipple);
g_object_unref (appearance->fg_stipple);
g_free (attr);
}
......@@ -1245,9 +1241,9 @@ gtk_text_attr_appearance_new (const GtkTextAppearance *appearance)
result->appearance = *appearance;
if (appearance->bg_stipple)
gdk_drawable_ref (appearance->bg_stipple);
g_object_ref (appearance->bg_stipple);
if (appearance->fg_stipple)
gdk_drawable_ref (appearance->fg_stipple);
g_object_ref (appearance->fg_stipple);
return (PangoAttribute *)result;
}
......@@ -1540,7 +1536,7 @@ allocate_child_widgets (GtkTextLayout *text_layout,
NULL,
&extents);
g_signal_emit (G_OBJECT (text_layout),
g_signal_emit (text_layout,
signals[ALLOCATE_CHILD],
0,
shaped_object,
......@@ -1973,7 +1969,7 @@ gtk_text_layout_free_line_display (GtkTextLayout *layout,
if (display != layout->one_display_cache)
{
if (display->layout)
g_object_unref (G_OBJECT (display->layout));
g_object_unref (display->layout);
if (display->cursors)
{
......
......@@ -77,8 +77,7 @@ gtk_text_mark_get_type (void)
(GInstanceInitFunc) gtk_text_mark_init,
};
object_type = g_type_register_static (G_TYPE_OBJECT,
"GtkTextMark",
object_type = g_type_register_static (G_TYPE_OBJECT, "GtkTextMark",
&object_info, 0);
}
......
......@@ -51,11 +51,9 @@
#include "gtktexttag.h"
#include "gtktexttypes.h"
#include "gtktexttagtable.h"
#include "gtksignal.h"
#include "gtkmain.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
#include "gtktypebuiltins.h"
#include <stdlib.h>
#include <string.h>
......@@ -171,10 +169,8 @@ gtk_text_tag_get_type (void)
(GInstanceInitFunc) gtk_text_tag_init
};
our_type = g_type_register_static (G_TYPE_OBJECT,
"GtkTextTag",
&our_info,
0);
our_type = g_type_register_static (G_TYPE_OBJECT, "GtkTextTag",
&our_info, 0);
}
return our_type;
......@@ -620,7 +616,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
g_signal_new ("event",
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
GTK_SIGNAL_OFFSET (GtkTextTagClass, event),
G_STRUCT_OFFSET (GtkTextTagClass, event),
_gtk_boolean_handled_accumulator, NULL,
_gtk_marshal_BOOLEAN__OBJECT_BOXED_BOXED,
G_TYPE_BOOLEAN,
......@@ -653,9 +649,7 @@ gtk_text_tag_new (const gchar *name)
{
GtkTextTag *tag;
tag = GTK_TEXT_TAG (g_object_new (gtk_text_tag_get_type (),
"name", name,
NULL));