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

Deprecation cleanup

Sun Oct 13 16:55:49 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkdnd.c gtk/gtkradiobutton.[ch]: Deprecation cleanup

        * gtk/Makefile.am: Added disable deprecation flags

        * demos/pixbuf-init.c demos/gtk-demo/changedisplay.c: minor clean up
parent 37278865
Sun Oct 13 16:55:49 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkdnd.c gtk/gtkradiobutton.[ch]: Deprecation cleanup
* gtk/Makefile.am: Added disable deprecation flags
* demos/pixbuf-init.c demos/gtk-demo/changedisplay.c: minor clean up
Sun Oct 13 16:20:41 2002 Manish Singh <yosh@gimp.org>
* tests/pixbuf-randomly-modified.c tests/prop-editor.c
......
Sun Oct 13 16:55:49 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkdnd.c gtk/gtkradiobutton.[ch]: Deprecation cleanup
* gtk/Makefile.am: Added disable deprecation flags
* demos/pixbuf-init.c demos/gtk-demo/changedisplay.c: minor clean up
Sun Oct 13 16:20:41 2002 Manish Singh <yosh@gimp.org>
* tests/pixbuf-randomly-modified.c tests/prop-editor.c
......
Sun Oct 13 16:55:49 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkdnd.c gtk/gtkradiobutton.[ch]: Deprecation cleanup
* gtk/Makefile.am: Added disable deprecation flags
* demos/pixbuf-init.c demos/gtk-demo/changedisplay.c: minor clean up
Sun Oct 13 16:20:41 2002 Manish Singh <yosh@gimp.org>
* tests/pixbuf-randomly-modified.c tests/prop-editor.c
......
Sun Oct 13 16:55:49 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkdnd.c gtk/gtkradiobutton.[ch]: Deprecation cleanup
* gtk/Makefile.am: Added disable deprecation flags
* demos/pixbuf-init.c demos/gtk-demo/changedisplay.c: minor clean up
Sun Oct 13 16:20:41 2002 Manish Singh <yosh@gimp.org>
* tests/pixbuf-randomly-modified.c tests/prop-editor.c
......
Sun Oct 13 16:55:49 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkdnd.c gtk/gtkradiobutton.[ch]: Deprecation cleanup
* gtk/Makefile.am: Added disable deprecation flags
* demos/pixbuf-init.c demos/gtk-demo/changedisplay.c: minor clean up
Sun Oct 13 16:20:41 2002 Manish Singh <yosh@gimp.org>
* tests/pixbuf-randomly-modified.c tests/prop-editor.c
......
Sun Oct 13 16:55:49 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkdnd.c gtk/gtkradiobutton.[ch]: Deprecation cleanup
* gtk/Makefile.am: Added disable deprecation flags
* demos/pixbuf-init.c demos/gtk-demo/changedisplay.c: minor clean up
Sun Oct 13 16:20:41 2002 Manish Singh <yosh@gimp.org>
* tests/pixbuf-randomly-modified.c tests/prop-editor.c
......
......@@ -551,12 +551,12 @@ destroy_info (ChangeDisplayInfo *info)
GSList *tmp_list;
g_signal_handlers_disconnect_by_func (manager,
(gpointer) display_opened_cb,
display_opened_cb,
info);
for (tmp_list = displays; tmp_list; tmp_list = tmp_list->next)
g_signal_handlers_disconnect_by_func (tmp_list->data,
(gpointer) display_closed_cb,
display_closed_cb,
info);
g_slist_free (tmp_list);
......
......@@ -12,16 +12,8 @@ file_exists (const char *filename)
}
void
pixbuf_init ()
pixbuf_init (void)
{
if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la"))
putenv ("GDK_PIXBUF_MODULE_FILE=../gdk-pixbuf/gdk-pixbuf.loaders");
}
......@@ -16,6 +16,8 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir) -I../gdk \
-I$(top_srcdir)/gdk \
-I$(top_srcdir)/gdk-pixbuf -I../gdk-pixbuf \
-DG_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
@GTK_DEBUG_FLAGS@ \
@GTK_DEP_CFLAGS@ \
@STRIP_END@
......
This diff is collapsed.
......@@ -26,12 +26,12 @@
#include "gtklabel.h"
#include "gtkradiobutton.h"
#include "gtksignal.h"
#include "gtkintl.h"
enum {
ARG_0,
ARG_GROUP
PROP_0,
PROP_GROUP
};
......@@ -43,36 +43,41 @@ static gboolean gtk_radio_button_focus (GtkWidget *widget,
static void gtk_radio_button_clicked (GtkButton *button);
static void gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
GdkRectangle *area);
static void gtk_radio_button_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_radio_button_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_radio_button_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_radio_button_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static GtkCheckButtonClass *parent_class = NULL;
GtkType
GType
gtk_radio_button_get_type (void)
{
static GtkType radio_button_type = 0;
static GType radio_button_type = 0;
if (!radio_button_type)
{
static const GtkTypeInfo radio_button_info =
static const GTypeInfo radio_button_info =
{
"GtkRadioButton",
sizeof (GtkRadioButton),
sizeof (GtkRadioButtonClass),
(GtkClassInitFunc) gtk_radio_button_class_init,
(GtkObjectInitFunc) gtk_radio_button_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_radio_button_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkRadioButton),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_radio_button_init,
};
radio_button_type = gtk_type_unique (gtk_check_button_get_type (), &radio_button_info);
radio_button_type =
g_type_register_static (GTK_TYPE_CHECK_BUTTON, "GtkRadioButton",
&radio_button_info, 0);
}
return radio_button_type;
......@@ -81,22 +86,30 @@ gtk_radio_button_get_type (void)
static void
gtk_radio_button_class_init (GtkRadioButtonClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkButtonClass *button_class;
GtkCheckButtonClass *check_button_class;
GtkWidgetClass *widget_class;
gobject_class = G_OBJECT_CLASS (class);
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
button_class = (GtkButtonClass*) class;
check_button_class = (GtkCheckButtonClass*) class;
parent_class = gtk_type_class (gtk_check_button_get_type ());
parent_class = g_type_class_peek_parent (class);
gtk_object_add_arg_type ("GtkRadioButton::group", GTK_TYPE_RADIO_BUTTON, GTK_ARG_WRITABLE, ARG_GROUP);
gobject_class->set_property = gtk_radio_button_set_property;
gobject_class->get_property = gtk_radio_button_get_property;
object_class->set_arg = gtk_radio_button_set_arg;
object_class->get_arg = gtk_radio_button_get_arg;
g_object_class_install_property (gobject_class,
PROP_GROUP,
g_param_spec_object ("group",
_("Group"),
_("The radio button whose group this widget belongs."),
GTK_TYPE_RADIO_BUTTON,
G_PARAM_WRITABLE));
object_class->destroy = gtk_radio_button_destroy;
widget_class->focus = gtk_radio_button_focus;
......@@ -123,43 +136,46 @@ gtk_radio_button_init (GtkRadioButton *radio_button)
}
static void
gtk_radio_button_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_radio_button_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkRadioButton *radio_button;
radio_button = GTK_RADIO_BUTTON (object);
switch (arg_id)
switch (prop_id)
{
GSList *slist;
case ARG_GROUP:
if (GTK_VALUE_OBJECT (*arg))
slist = gtk_radio_button_get_group ((GtkRadioButton*) GTK_VALUE_OBJECT (*arg));
case PROP_GROUP:
if (G_VALUE_HOLDS_OBJECT (value))
slist = gtk_radio_button_get_group ((GtkRadioButton*) g_value_get_object (value));
else
slist = NULL;
gtk_radio_button_set_group (radio_button, slist);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_radio_button_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_radio_button_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkRadioButton *radio_button;
radio_button = GTK_RADIO_BUTTON (object);
switch (arg_id)
switch (prop_id)
{
default:
arg->type = GTK_TYPE_INVALID;
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
......@@ -211,7 +227,7 @@ gtk_radio_button_new (GSList *group)
{
GtkRadioButton *radio_button;
radio_button = gtk_type_new (gtk_radio_button_get_type ());
radio_button = g_object_new (GTK_TYPE_RADIO_BUTTON, NULL);
if (group)
gtk_radio_button_set_group (radio_button, group);
......@@ -508,7 +524,7 @@ gtk_radio_button_clicked (GtkButton *button)
toggle_button = GTK_TOGGLE_BUTTON (button);
toggled = FALSE;
gtk_widget_ref (GTK_WIDGET (button));
g_object_ref (GTK_WIDGET (button));
if (toggle_button->active)
{
......@@ -575,7 +591,7 @@ gtk_radio_button_clicked (GtkButton *button)
gtk_widget_queue_draw (GTK_WIDGET (button));
gtk_widget_unref (GTK_WIDGET (button));
g_object_unref (button);
}
static void
......
......@@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_RADIO_BUTTON (gtk_radio_button_get_type ())
#define GTK_RADIO_BUTTON(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_RADIO_BUTTON, GtkRadioButton))
#define GTK_RADIO_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_RADIO_BUTTON, GtkRadioButtonClass))
#define GTK_IS_RADIO_BUTTON(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_RADIO_BUTTON))
#define GTK_IS_RADIO_BUTTON_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RADIO_BUTTON))
#define GTK_RADIO_BUTTON_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_RADIO_BUTTON, GtkRadioButtonClass))
#define GTK_RADIO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_RADIO_BUTTON, GtkRadioButton))
#define GTK_RADIO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_RADIO_BUTTON, GtkRadioButtonClass))
#define GTK_IS_RADIO_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_RADIO_BUTTON))
#define GTK_IS_RADIO_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RADIO_BUTTON))
#define GTK_RADIO_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_RADIO_BUTTON, GtkRadioButtonClass))
typedef struct _GtkRadioButton GtkRadioButton;
......@@ -67,7 +67,7 @@ struct _GtkRadioButtonClass
};
GtkType gtk_radio_button_get_type (void) G_GNUC_CONST;
GType gtk_radio_button_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_radio_button_new (GSList *group);
GtkWidget* gtk_radio_button_new_from_widget (GtkRadioButton *group);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment