forked from AuroraMiddleware/gtk
Deprecation cleanup
Thu Oct 10 14:58:47 2002 Manish Singh <yosh@gimp.org> * gtk/gtkaccelgroup.c gtk/gtkarrow.[ch] gtk/gtkeventbox.[ch] gtk/gtkiconfactory.c gtk/gtkinvisible.[ch] gtk/gtktextchild.c: Deprecation cleanup
This commit is contained in:
parent
ac77076507
commit
62341005d1
@ -1,3 +1,9 @@
|
||||
Thu Oct 10 14:58:47 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkaccelgroup.c gtk/gtkarrow.[ch] gtk/gtkeventbox.[ch]
|
||||
gtk/gtkiconfactory.c gtk/gtkinvisible.[ch] gtk/gtktextchild.c:
|
||||
Deprecation cleanup
|
||||
|
||||
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Oct 10 14:58:47 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkaccelgroup.c gtk/gtkarrow.[ch] gtk/gtkeventbox.[ch]
|
||||
gtk/gtkiconfactory.c gtk/gtkinvisible.[ch] gtk/gtktextchild.c:
|
||||
Deprecation cleanup
|
||||
|
||||
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Oct 10 14:58:47 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkaccelgroup.c gtk/gtkarrow.[ch] gtk/gtkeventbox.[ch]
|
||||
gtk/gtkiconfactory.c gtk/gtkinvisible.[ch] gtk/gtktextchild.c:
|
||||
Deprecation cleanup
|
||||
|
||||
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Oct 10 14:58:47 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkaccelgroup.c gtk/gtkarrow.[ch] gtk/gtkeventbox.[ch]
|
||||
gtk/gtkiconfactory.c gtk/gtkinvisible.[ch] gtk/gtktextchild.c:
|
||||
Deprecation cleanup
|
||||
|
||||
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Oct 10 14:58:47 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkaccelgroup.c gtk/gtkarrow.[ch] gtk/gtkeventbox.[ch]
|
||||
gtk/gtkiconfactory.c gtk/gtkinvisible.[ch] gtk/gtktextchild.c:
|
||||
Deprecation cleanup
|
||||
|
||||
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
|
||||
|
@ -1,3 +1,9 @@
|
||||
Thu Oct 10 14:58:47 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkaccelgroup.c gtk/gtkarrow.[ch] gtk/gtkeventbox.[ch]
|
||||
gtk/gtkiconfactory.c gtk/gtkinvisible.[ch] gtk/gtktextchild.c:
|
||||
Deprecation cleanup
|
||||
|
||||
Thu Oct 10 14:41:05 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
|
||||
|
@ -23,15 +23,16 @@
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
#include "gtkaccelgroup.h"
|
||||
#include "gtkaccelmap.h"
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtksignal.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gtkaccelgroup.h"
|
||||
#include "gtkaccelmap.h"
|
||||
#include "gtkmain.h" /* For _gtk_boolean_handled_accumulator */
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
#include "gtkmarshalers.h"
|
||||
|
||||
|
||||
/* --- prototypes --- */
|
||||
static void gtk_accel_group_class_init (GtkAccelGroupClass *class);
|
||||
@ -66,42 +67,20 @@ gtk_accel_group_get_type (void)
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
(GClassInitFunc) gtk_accel_group_class_init,
|
||||
NULL, /* clas_finalize */
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkAccelGroup),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_accel_group_init,
|
||||
};
|
||||
|
||||
object_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GtkAccelGroup",
|
||||
object_type = g_type_register_static (G_TYPE_OBJECT, "GtkAccelGroup",
|
||||
&object_info, 0);
|
||||
}
|
||||
|
||||
return object_type;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
accel_activate_accumulator (GSignalInvocationHint *ihint,
|
||||
GValue *return_accu,
|
||||
const GValue *handler_return,
|
||||
gpointer data)
|
||||
{
|
||||
gboolean continue_emission;
|
||||
gboolean handler_val;
|
||||
|
||||
/* handler returns whether the accelerator was handled */
|
||||
handler_val = g_value_get_boolean (handler_return);
|
||||
|
||||
/* record that as result for this emission */
|
||||
g_value_set_boolean (return_accu, handler_val);
|
||||
|
||||
/* don't continue if accelerator was handled */
|
||||
continue_emission = !handler_val;
|
||||
|
||||
return continue_emission;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_accel_group_class_init (GtkAccelGroupClass *class)
|
||||
{
|
||||
@ -114,20 +93,28 @@ gtk_accel_group_class_init (GtkAccelGroupClass *class)
|
||||
object_class->finalize = gtk_accel_group_finalize;
|
||||
|
||||
class->accel_changed = NULL;
|
||||
signal_accel_activate = g_signal_new ("accel_activate",
|
||||
G_OBJECT_CLASS_TYPE (class),
|
||||
G_SIGNAL_DETAILED,
|
||||
0,
|
||||
accel_activate_accumulator, NULL,
|
||||
_gtk_marshal_BOOLEAN__OBJECT_UINT_FLAGS,
|
||||
G_TYPE_BOOLEAN, 3, G_TYPE_OBJECT, G_TYPE_UINT, GDK_TYPE_MODIFIER_TYPE);
|
||||
signal_accel_changed = g_signal_new ("accel_changed",
|
||||
G_OBJECT_CLASS_TYPE (class),
|
||||
G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED,
|
||||
G_STRUCT_OFFSET (GtkAccelGroupClass, accel_changed),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__UINT_FLAGS_BOXED,
|
||||
G_TYPE_NONE, 3, G_TYPE_UINT, GDK_TYPE_MODIFIER_TYPE, G_TYPE_CLOSURE);
|
||||
signal_accel_activate =
|
||||
g_signal_new ("accel_activate",
|
||||
G_OBJECT_CLASS_TYPE (class),
|
||||
G_SIGNAL_DETAILED,
|
||||
0,
|
||||
_gtk_boolean_handled_accumulator, NULL,
|
||||
_gtk_marshal_BOOLEAN__OBJECT_UINT_FLAGS,
|
||||
G_TYPE_BOOLEAN, 3,
|
||||
G_TYPE_OBJECT,
|
||||
G_TYPE_UINT,
|
||||
GDK_TYPE_MODIFIER_TYPE);
|
||||
signal_accel_changed =
|
||||
g_signal_new ("accel_changed",
|
||||
G_OBJECT_CLASS_TYPE (class),
|
||||
G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED,
|
||||
G_STRUCT_OFFSET (GtkAccelGroupClass, accel_changed),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__UINT_FLAGS_BOXED,
|
||||
G_TYPE_NONE, 3,
|
||||
G_TYPE_UINT,
|
||||
GDK_TYPE_MODIFIER_TYPE,
|
||||
G_TYPE_CLOSURE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -53,26 +53,28 @@ static void gtk_arrow_get_property (GObject *object,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_arrow_get_type (void)
|
||||
{
|
||||
static GtkType arrow_type = 0;
|
||||
static GType arrow_type = 0;
|
||||
|
||||
if (!arrow_type)
|
||||
{
|
||||
static const GtkTypeInfo arrow_info =
|
||||
static const GTypeInfo arrow_info =
|
||||
{
|
||||
"GtkArrow",
|
||||
sizeof (GtkArrow),
|
||||
sizeof (GtkArrowClass),
|
||||
(GtkClassInitFunc) gtk_arrow_class_init,
|
||||
(GtkObjectInitFunc) gtk_arrow_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_arrow_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkArrow),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_arrow_init,
|
||||
};
|
||||
|
||||
arrow_type = gtk_type_unique (GTK_TYPE_MISC, &arrow_info);
|
||||
arrow_type = g_type_register_static (GTK_TYPE_MISC, "GtkArrow",
|
||||
&arrow_info, 0);
|
||||
}
|
||||
|
||||
return arrow_type;
|
||||
@ -82,11 +84,9 @@ static void
|
||||
gtk_arrow_class_init (GtkArrowClass *class)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GtkObjectClass *object_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
|
||||
gobject_class = (GObjectClass*) class;
|
||||
object_class = (GtkObjectClass*) class;
|
||||
widget_class = (GtkWidgetClass*) class;
|
||||
|
||||
gobject_class->set_property = gtk_arrow_set_property;
|
||||
@ -182,7 +182,7 @@ gtk_arrow_new (GtkArrowType arrow_type,
|
||||
{
|
||||
GtkArrow *arrow;
|
||||
|
||||
arrow = gtk_type_new (GTK_TYPE_ARROW);
|
||||
arrow = g_object_new (GTK_TYPE_ARROW, NULL);
|
||||
|
||||
arrow->arrow_type = arrow_type;
|
||||
arrow->shadow_type = shadow_type;
|
||||
@ -217,7 +217,7 @@ gtk_arrow_set (GtkArrow *arrow,
|
||||
g_object_thaw_notify (G_OBJECT (arrow));
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (arrow))
|
||||
gtk_widget_queue_clear (GTK_WIDGET (arrow));
|
||||
gtk_widget_queue_draw (GTK_WIDGET (arrow));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,11 +38,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_ARROW (gtk_arrow_get_type ())
|
||||
#define GTK_ARROW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ARROW, GtkArrow))
|
||||
#define GTK_ARROW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ARROW, GtkArrowClass))
|
||||
#define GTK_IS_ARROW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ARROW))
|
||||
#define GTK_IS_ARROW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ARROW))
|
||||
#define GTK_ARROW_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_ARROW, GtkArrowClass))
|
||||
#define GTK_ARROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ARROW, GtkArrow))
|
||||
#define GTK_ARROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ARROW, GtkArrowClass))
|
||||
#define GTK_IS_ARROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ARROW))
|
||||
#define GTK_IS_ARROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ARROW))
|
||||
#define GTK_ARROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ARROW, GtkArrowClass))
|
||||
|
||||
|
||||
typedef struct _GtkArrow GtkArrow;
|
||||
@ -62,7 +62,7 @@ struct _GtkArrowClass
|
||||
};
|
||||
|
||||
|
||||
GtkType gtk_arrow_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_arrow_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_arrow_new (GtkArrowType arrow_type,
|
||||
GtkShadowType shadow_type);
|
||||
void gtk_arrow_set (GtkArrow *arrow,
|
||||
|
@ -24,7 +24,6 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "gtksignal.h"
|
||||
#include "gtkeventbox.h"
|
||||
|
||||
|
||||
@ -43,26 +42,28 @@ static gint gtk_event_box_expose (GtkWidget *widget,
|
||||
|
||||
static GtkBinClass *parent_class = NULL;
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_event_box_get_type (void)
|
||||
{
|
||||
static GtkType event_box_type = 0;
|
||||
static GType event_box_type = 0;
|
||||
|
||||
if (!event_box_type)
|
||||
{
|
||||
static const GtkTypeInfo event_box_info =
|
||||
static const GTypeInfo event_box_info =
|
||||
{
|
||||
"GtkEventBox",
|
||||
sizeof (GtkEventBox),
|
||||
sizeof (GtkEventBoxClass),
|
||||
(GtkClassInitFunc) gtk_event_box_class_init,
|
||||
(GtkObjectInitFunc) gtk_event_box_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_event_box_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkEventBox),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_event_box_init,
|
||||
};
|
||||
|
||||
event_box_type = gtk_type_unique (gtk_bin_get_type (), &event_box_info);
|
||||
event_box_type = g_type_register_static (GTK_TYPE_BIN, "GtkEventBox",
|
||||
&event_box_info, 0);
|
||||
}
|
||||
|
||||
return event_box_type;
|
||||
@ -92,7 +93,7 @@ gtk_event_box_init (GtkEventBox *event_box)
|
||||
GtkWidget*
|
||||
gtk_event_box_new (void)
|
||||
{
|
||||
return GTK_WIDGET (gtk_type_new (gtk_event_box_get_type ()));
|
||||
return g_object_new (GTK_TYPE_EVENT_BOX, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -38,11 +38,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_EVENT_BOX (gtk_event_box_get_type ())
|
||||
#define GTK_EVENT_BOX(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_EVENT_BOX, GtkEventBox))
|
||||
#define GTK_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
|
||||
#define GTK_IS_EVENT_BOX(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_EVENT_BOX))
|
||||
#define GTK_IS_EVENT_BOX_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EVENT_BOX))
|
||||
#define GTK_EVENT_BOX_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
|
||||
#define GTK_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_EVENT_BOX, GtkEventBox))
|
||||
#define GTK_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
|
||||
#define GTK_IS_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_EVENT_BOX))
|
||||
#define GTK_IS_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_EVENT_BOX))
|
||||
#define GTK_EVENT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_EVENT_BOX, GtkEventBoxClass))
|
||||
|
||||
|
||||
typedef struct _GtkEventBox GtkEventBox;
|
||||
@ -58,7 +58,7 @@ struct _GtkEventBoxClass
|
||||
GtkBinClass parent_class;
|
||||
};
|
||||
|
||||
GtkType gtk_event_box_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_event_box_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_event_box_new (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -24,6 +24,9 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <pango/pango-utils.h> /* For pango_scan_* */
|
||||
#include "gtkiconfactory.h"
|
||||
#include "stock-icons/gtkstockpixbufs.h"
|
||||
@ -31,9 +34,6 @@
|
||||
#include "gtksettings.h"
|
||||
#include "gtkstock.h"
|
||||
#include "gtkintl.h"
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
static GSList *all_icon_factories = NULL;
|
||||
|
||||
@ -73,15 +73,15 @@ static GtkIconSize icon_size_register_intern (const gchar *name,
|
||||
GType
|
||||
gtk_icon_factory_get_type (void)
|
||||
{
|
||||
static GType object_type = 0;
|
||||
static GType icon_factory_type = 0;
|
||||
|
||||
if (!object_type)
|
||||
if (!icon_factory_type)
|
||||
{
|
||||
static const GTypeInfo object_info =
|
||||
static const GTypeInfo icon_factory_info =
|
||||
{
|
||||
sizeof (GtkIconFactoryClass),
|
||||
(GBaseInitFunc) NULL,
|
||||
(GBaseFinalizeFunc) NULL,
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_icon_factory_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
@ -90,12 +90,12 @@ gtk_icon_factory_get_type (void)
|
||||
(GInstanceInitFunc) gtk_icon_factory_init,
|
||||
};
|
||||
|
||||
object_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GtkIconFactory",
|
||||
&object_info, 0);
|
||||
icon_factory_type =
|
||||
g_type_register_static (G_TYPE_OBJECT, "GtkIconFactory",
|
||||
&icon_factory_info, 0);
|
||||
}
|
||||
|
||||
return object_type;
|
||||
return icon_factory_type;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -158,7 +158,7 @@ gtk_icon_factory_finalize (GObject *object)
|
||||
GtkIconFactory*
|
||||
gtk_icon_factory_new (void)
|
||||
{
|
||||
return GTK_ICON_FACTORY (g_object_new (GTK_TYPE_ICON_FACTORY, NULL));
|
||||
return g_object_new (GTK_TYPE_ICON_FACTORY, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -252,7 +252,7 @@ gtk_icon_factory_add_default (GtkIconFactory *factory)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_ICON_FACTORY (factory));
|
||||
|
||||
g_object_ref (G_OBJECT (factory));
|
||||
g_object_ref (factory);
|
||||
|
||||
default_factories = g_slist_prepend (default_factories, factory);
|
||||
}
|
||||
@ -273,7 +273,7 @@ gtk_icon_factory_remove_default (GtkIconFactory *factory)
|
||||
|
||||
default_factories = g_slist_remove (default_factories, factory);
|
||||
|
||||
g_object_unref (G_OBJECT (factory));
|
||||
g_object_unref (factory);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -335,7 +335,7 @@ add_source (GtkIconSet *set,
|
||||
|
||||
gtk_icon_set_add_source (set, source);
|
||||
|
||||
g_object_unref (G_OBJECT (source->pixbuf));
|
||||
g_object_unref (source->pixbuf);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -1767,7 +1767,7 @@ gtk_icon_set_render_icon (GtkIconSet *icon_set,
|
||||
|
||||
if (icon)
|
||||
{
|
||||
g_object_ref (G_OBJECT (icon));
|
||||
g_object_ref (icon);
|
||||
return icon;
|
||||
}
|
||||
|
||||
@ -2030,7 +2030,7 @@ gtk_icon_source_copy (const GtkIconSource *source)
|
||||
copy->filename = g_strdup (source->filename);
|
||||
copy->size = source->size;
|
||||
if (copy->pixbuf)
|
||||
g_object_ref (G_OBJECT (copy->pixbuf));
|
||||
g_object_ref (copy->pixbuf);
|
||||
|
||||
return copy;
|
||||
}
|
||||
@ -2049,7 +2049,7 @@ gtk_icon_source_free (GtkIconSource *source)
|
||||
|
||||
g_free ((char*) source->filename);
|
||||
if (source->pixbuf)
|
||||
g_object_unref (G_OBJECT (source->pixbuf));
|
||||
g_object_unref (source->pixbuf);
|
||||
|
||||
g_free (source);
|
||||
}
|
||||
@ -2108,10 +2108,10 @@ gtk_icon_source_set_pixbuf (GtkIconSource *source,
|
||||
g_return_if_fail (source != NULL);
|
||||
|
||||
if (pixbuf)
|
||||
g_object_ref (G_OBJECT (pixbuf));
|
||||
g_object_ref (pixbuf);
|
||||
|
||||
if (source->pixbuf)
|
||||
g_object_unref (G_OBJECT (source->pixbuf));
|
||||
g_object_unref (source->pixbuf);
|
||||
|
||||
source->pixbuf = pixbuf;
|
||||
}
|
||||
@ -2433,7 +2433,7 @@ ensure_cache_up_to_date (GtkIconSet *icon_set)
|
||||
static void
|
||||
cached_icon_free (CachedIcon *icon)
|
||||
{
|
||||
g_object_unref (G_OBJECT (icon->pixbuf));
|
||||
g_object_unref (icon->pixbuf);
|
||||
|
||||
g_free (icon);
|
||||
}
|
||||
@ -2491,7 +2491,7 @@ add_to_cache (GtkIconSet *icon_set,
|
||||
|
||||
ensure_cache_up_to_date (icon_set);
|
||||
|
||||
g_object_ref (G_OBJECT (pixbuf));
|
||||
g_object_ref (pixbuf);
|
||||
|
||||
/* We have to ref the style, since if the style was finalized
|
||||
* its address could be reused by another style, creating a
|
||||
@ -2499,7 +2499,7 @@ add_to_cache (GtkIconSet *icon_set,
|
||||
*/
|
||||
|
||||
if (style)
|
||||
g_object_ref (G_OBJECT (style));
|
||||
g_object_ref (style);
|
||||
|
||||
|
||||
icon = g_new (CachedIcon, 1);
|
||||
@ -2597,7 +2597,7 @@ copy_cache (GtkIconSet *icon_set,
|
||||
if (icon_copy->style)
|
||||
attach_to_style (copy_recipient, icon_copy->style);
|
||||
|
||||
g_object_ref (G_OBJECT (icon_copy->pixbuf));
|
||||
g_object_ref (icon_copy->pixbuf);
|
||||
|
||||
icon_copy->size = icon->size;
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
*/
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include "gtksignal.h"
|
||||
#include "gtkinvisible.h"
|
||||
#include "gtkintl.h"
|
||||
|
||||
@ -59,26 +58,28 @@ static GObject *gtk_invisible_constructor (GType type,
|
||||
|
||||
static GObjectClass *parent_class;
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_invisible_get_type (void)
|
||||
{
|
||||
static GtkType invisible_type = 0;
|
||||
static GType invisible_type = 0;
|
||||
|
||||
if (!invisible_type)
|
||||
{
|
||||
static const GtkTypeInfo invisible_info =
|
||||
static const GTypeInfo invisible_info =
|
||||
{
|
||||
"GtkInvisible",
|
||||
sizeof (GtkInvisible),
|
||||
sizeof (GtkInvisibleClass),
|
||||
(GtkClassInitFunc) gtk_invisible_class_init,
|
||||
(GtkObjectInitFunc) gtk_invisible_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_invisible_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkInvisible),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_invisible_init,
|
||||
};
|
||||
|
||||
invisible_type = gtk_type_unique (GTK_TYPE_WIDGET, &invisible_info);
|
||||
invisible_type = g_type_register_static (GTK_TYPE_WIDGET, "GtkInvisible",
|
||||
&invisible_info, 0);
|
||||
}
|
||||
|
||||
return invisible_type;
|
||||
@ -124,7 +125,7 @@ gtk_invisible_init (GtkInvisible *invisible)
|
||||
GTK_WIDGET_UNSET_FLAGS (invisible, GTK_NO_WINDOW);
|
||||
GTK_WIDGET_SET_FLAGS (invisible, GTK_TOPLEVEL);
|
||||
|
||||
gtk_widget_ref (GTK_WIDGET (invisible));
|
||||
g_object_ref (invisible);
|
||||
gtk_object_sink (GTK_OBJECT (invisible));
|
||||
|
||||
invisible->has_user_ref_count = TRUE;
|
||||
@ -143,7 +144,7 @@ gtk_invisible_destroy (GtkObject *object)
|
||||
if (invisible->has_user_ref_count)
|
||||
{
|
||||
invisible->has_user_ref_count = FALSE;
|
||||
gtk_widget_unref (GTK_WIDGET (invisible));
|
||||
g_object_unref (invisible);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,11 +32,11 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_INVISIBLE (gtk_invisible_get_type ())
|
||||
#define GTK_INVISIBLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_INVISIBLE, GtkInvisible))
|
||||
#define GTK_INVISIBLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_INVISIBLE, GtkInvisibleClass))
|
||||
#define GTK_IS_INVISIBLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_INVISIBLE))
|
||||
#define GTK_IS_INVISIBLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_INVISIBLE))
|
||||
#define GTK_INVISIBLE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_INVISIBLE, GtkInvisibleClass))
|
||||
#define GTK_INVISIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_INVISIBLE, GtkInvisible))
|
||||
#define GTK_INVISIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_INVISIBLE, GtkInvisibleClass))
|
||||
#define GTK_IS_INVISIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_INVISIBLE))
|
||||
#define GTK_IS_INVISIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_INVISIBLE))
|
||||
#define GTK_INVISIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_INVISIBLE, GtkInvisibleClass))
|
||||
|
||||
|
||||
typedef struct _GtkInvisible GtkInvisible;
|
||||
@ -60,7 +60,7 @@ struct _GtkInvisibleClass
|
||||
void (*_gtk_reserved4) (void);
|
||||
};
|
||||
|
||||
GtkType gtk_invisible_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_invisible_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget* gtk_invisible_new (void);
|
||||
GtkWidget* gtk_invisible_new_for_screen (GdkScreen *screen);
|
||||
|
@ -83,7 +83,7 @@ pixbuf_segment_delete_func (GtkTextLineSegment *seg,
|
||||
gboolean tree_gone)
|
||||
{
|
||||
if (seg->body.pixbuf.pixbuf)
|
||||
g_object_unref (G_OBJECT (seg->body.pixbuf.pixbuf));
|
||||
g_object_unref (seg->body.pixbuf.pixbuf);
|
||||
|
||||
g_free (seg);
|
||||
|
||||
@ -137,7 +137,7 @@ _gtk_pixbuf_segment_new (GdkPixbuf *pixbuf)
|
||||
|
||||
seg->body.pixbuf.pixbuf = pixbuf;
|
||||
|
||||
g_object_ref (G_OBJECT (pixbuf));
|
||||
g_object_ref (pixbuf);
|
||||
|
||||
return seg;
|
||||
}
|
||||
@ -238,7 +238,7 @@ _gtk_widget_segment_new (GtkTextChildAnchor *anchor)
|
||||
seg->body.child.tree = NULL;
|
||||
seg->body.child.line = NULL;
|
||||
|
||||
g_object_ref (G_OBJECT (anchor));
|
||||
g_object_ref (anchor);
|
||||
|
||||
return seg;
|
||||
}
|
||||
@ -250,7 +250,7 @@ _gtk_widget_segment_add (GtkTextLineSegment *widget_segment,
|
||||
g_return_if_fail (widget_segment->type == >k_text_child_type);
|
||||
g_return_if_fail (widget_segment->body.child.tree != NULL);
|
||||
|
||||
g_object_ref (G_OBJECT (child));
|
||||
g_object_ref (child);
|
||||
|
||||
widget_segment->body.child.widgets =
|
||||
g_slist_prepend (widget_segment->body.child.widgets,
|
||||
@ -267,7 +267,7 @@ _gtk_widget_segment_remove (GtkTextLineSegment *widget_segment,
|
||||
g_slist_remove (widget_segment->body.child.widgets,
|
||||
child);
|
||||
|
||||
g_object_unref (G_OBJECT (child));
|
||||
g_object_unref (child);
|
||||
}
|
||||
|
||||
void
|
||||
@ -275,7 +275,7 @@ _gtk_widget_segment_ref (GtkTextLineSegment *widget_segment)
|
||||
{
|
||||
g_assert (widget_segment->type == >k_text_child_type);
|
||||
|
||||
g_object_ref (G_OBJECT (widget_segment->body.child.obj));
|
||||
g_object_ref (widget_segment->body.child.obj);
|
||||
}
|
||||
|
||||
void
|
||||
@ -283,7 +283,7 @@ _gtk_widget_segment_unref (GtkTextLineSegment *widget_segment)
|
||||
{
|
||||
g_assert (widget_segment->type == >k_text_child_type);
|
||||
|
||||
g_object_unref (G_OBJECT (widget_segment->body.child.obj));
|
||||
g_object_unref (widget_segment->body.child.obj);
|
||||
}
|
||||
|
||||
GtkTextLayout*
|
||||
@ -327,8 +327,7 @@ gtk_text_child_anchor_get_type (void)
|
||||
(GInstanceInitFunc) gtk_text_child_anchor_init,
|
||||
};
|
||||
|
||||
object_type = g_type_register_static (G_TYPE_OBJECT,
|
||||
"GtkTextChildAnchor",
|
||||
object_type = g_type_register_static (G_TYPE_OBJECT, "GtkTextChildAnchor",
|
||||
&object_info, 0);
|
||||
}
|
||||
|
||||
@ -364,8 +363,7 @@ gtk_text_child_anchor_class_init (GtkTextChildAnchorClass *klass)
|
||||
GtkTextChildAnchor*
|
||||
gtk_text_child_anchor_new (void)
|
||||
{
|
||||
return GTK_TEXT_CHILD_ANCHOR (g_object_new (GTK_TYPE_TEXT_CHILD_ANCHOR,
|
||||
NULL));
|
||||
return g_object_new (GTK_TYPE_TEXT_CHILD_ANCHOR, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -390,8 +388,7 @@ gtk_text_child_anchor_finalize (GObject *obj)
|
||||
tmp_list = seg->body.child.widgets;
|
||||
while (tmp_list)
|
||||
{
|
||||
g_object_unref (G_OBJECT (tmp_list->data));
|
||||
|
||||
g_object_unref (tmp_list->data);
|
||||
tmp_list = g_slist_next (tmp_list);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user