forked from AuroraMiddleware/gtk
Deprecation cleanup
Wed Oct 9 16:52:53 2002 Manish Singh <yosh@gimp.org> * gtk/gtkclipboard.[ch] gtk/gtkeditable.[ch] gtk/gtkgc.c gtk/gtkoptionmenu.[ch] gtk/gtkselection.c gtk/gtksizegroup.[ch]: Deprecation cleanup
This commit is contained in:
parent
9565f3ffb2
commit
8b6ce08115
@ -1,3 +1,9 @@
|
||||
Wed Oct 9 16:52:53 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkclipboard.[ch] gtk/gtkeditable.[ch] gtk/gtkgc.c
|
||||
gtk/gtkoptionmenu.[ch] gtk/gtkselection.c gtk/gtksizegroup.[ch]:
|
||||
Deprecation cleanup
|
||||
|
||||
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Oct 9 16:52:53 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkclipboard.[ch] gtk/gtkeditable.[ch] gtk/gtkgc.c
|
||||
gtk/gtkoptionmenu.[ch] gtk/gtkselection.c gtk/gtksizegroup.[ch]:
|
||||
Deprecation cleanup
|
||||
|
||||
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Oct 9 16:52:53 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkclipboard.[ch] gtk/gtkeditable.[ch] gtk/gtkgc.c
|
||||
gtk/gtkoptionmenu.[ch] gtk/gtkselection.c gtk/gtksizegroup.[ch]:
|
||||
Deprecation cleanup
|
||||
|
||||
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Oct 9 16:52:53 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkclipboard.[ch] gtk/gtkeditable.[ch] gtk/gtkgc.c
|
||||
gtk/gtkoptionmenu.[ch] gtk/gtkselection.c gtk/gtksizegroup.[ch]:
|
||||
Deprecation cleanup
|
||||
|
||||
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Oct 9 16:52:53 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkclipboard.[ch] gtk/gtkeditable.[ch] gtk/gtkgc.c
|
||||
gtk/gtkoptionmenu.[ch] gtk/gtkselection.c gtk/gtksizegroup.[ch]:
|
||||
Deprecation cleanup
|
||||
|
||||
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
|
||||
|
@ -1,3 +1,9 @@
|
||||
Wed Oct 9 16:52:53 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkclipboard.[ch] gtk/gtkeditable.[ch] gtk/gtkgc.c
|
||||
gtk/gtkoptionmenu.[ch] gtk/gtkselection.c gtk/gtksizegroup.[ch]:
|
||||
Deprecation cleanup
|
||||
|
||||
Wed Oct 9 15:23:48 2002 Manish Singh <yosh@gimp.org>
|
||||
|
||||
* gtk/gtkadjustment.[ch] gtk/gtkalignment.[ch] gtk/gtkentry.[ch]
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "gtkclipboard.h"
|
||||
#include "gtkinvisible.h"
|
||||
#include "gtkmain.h"
|
||||
#include "gtksignal.h"
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include "x11/gdkx.h"
|
||||
@ -116,7 +115,8 @@ gtk_clipboard_get_type (void)
|
||||
(GInstanceInitFunc) NULL,
|
||||
};
|
||||
|
||||
clipboard_type = g_type_register_static (G_TYPE_OBJECT, "GtkClipboard", &clipboard_info, 0);
|
||||
clipboard_type = g_type_register_static (G_TYPE_OBJECT, "GtkClipboard",
|
||||
&clipboard_info, 0);
|
||||
}
|
||||
|
||||
return clipboard_type;
|
||||
@ -283,18 +283,18 @@ make_clipboard_widget (GdkDisplay *display,
|
||||
{
|
||||
GtkWidget *widget = gtk_invisible_new_for_screen (gdk_display_get_default_screen (display));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (widget), "selection_received",
|
||||
GTK_SIGNAL_FUNC (selection_received), NULL);
|
||||
g_signal_connect (widget, "selection_received",
|
||||
G_CALLBACK (selection_received), NULL);
|
||||
|
||||
if (provider)
|
||||
{
|
||||
/* We need this for gdk_x11_get_server_time() */
|
||||
gtk_widget_add_events (widget, GDK_PROPERTY_CHANGE_MASK);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (widget), "selection_get",
|
||||
GTK_SIGNAL_FUNC (selection_get_cb), NULL);
|
||||
gtk_signal_connect (GTK_OBJECT (widget), "selection_clear_event",
|
||||
GTK_SIGNAL_FUNC (selection_clear_event_cb), NULL);
|
||||
g_signal_connect (widget, "selection_get",
|
||||
G_CALLBACK (selection_get_cb), NULL);
|
||||
g_signal_connect (widget, "selection_clear_event",
|
||||
G_CALLBACK (selection_clear_event_cb), NULL);
|
||||
}
|
||||
|
||||
return widget;
|
||||
@ -682,9 +682,7 @@ set_request_contents_info (GtkWidget *widget,
|
||||
if (!request_contents_key_id)
|
||||
request_contents_key_id = g_quark_from_static_string (request_contents_key);
|
||||
|
||||
gtk_object_set_data_by_id (GTK_OBJECT (widget),
|
||||
request_contents_key_id,
|
||||
info);
|
||||
g_object_set_qdata (G_OBJECT (widget), request_contents_key_id, info);
|
||||
}
|
||||
|
||||
static RequestContentsInfo *
|
||||
@ -693,8 +691,7 @@ get_request_contents_info (GtkWidget *widget)
|
||||
if (!request_contents_key_id)
|
||||
return NULL;
|
||||
else
|
||||
return gtk_object_get_data_by_id (GTK_OBJECT (widget),
|
||||
request_contents_key_id);
|
||||
return g_object_get_qdata (G_OBJECT (widget), request_contents_key_id);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -851,7 +848,7 @@ clipboard_received_func (GtkClipboard *clipboard,
|
||||
if (selection_data->length >= 0)
|
||||
results->data = gtk_selection_data_copy (selection_data);
|
||||
|
||||
g_main_quit (results->loop);
|
||||
g_main_loop_quit (results->loop);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -879,20 +876,20 @@ gtk_clipboard_wait_for_contents (GtkClipboard *clipboard,
|
||||
g_return_val_if_fail (target != GDK_NONE, NULL);
|
||||
|
||||
results.data = NULL;
|
||||
results.loop = g_main_new (TRUE);
|
||||
results.loop = g_main_loop_new (NULL, TRUE);
|
||||
|
||||
gtk_clipboard_request_contents (clipboard, target,
|
||||
clipboard_received_func,
|
||||
&results);
|
||||
|
||||
if (g_main_is_running (results.loop))
|
||||
if (g_main_loop_is_running (results.loop))
|
||||
{
|
||||
GDK_THREADS_LEAVE ();
|
||||
g_main_run (results.loop);
|
||||
g_main_loop_run (results.loop);
|
||||
GDK_THREADS_ENTER ();
|
||||
}
|
||||
|
||||
g_main_destroy (results.loop);
|
||||
g_main_loop_unref (results.loop);
|
||||
|
||||
return results.data;
|
||||
}
|
||||
@ -905,7 +902,7 @@ clipboard_text_received_func (GtkClipboard *clipboard,
|
||||
WaitResults *results = data;
|
||||
|
||||
results->data = g_strdup (text);
|
||||
g_main_quit (results->loop);
|
||||
g_main_loop_quit (results->loop);
|
||||
}
|
||||
|
||||
|
||||
@ -934,20 +931,20 @@ gtk_clipboard_wait_for_text (GtkClipboard *clipboard)
|
||||
g_return_val_if_fail (clipboard != NULL, NULL);
|
||||
|
||||
results.data = NULL;
|
||||
results.loop = g_main_new (TRUE);
|
||||
results.loop = g_main_loop_new (NULL, TRUE);
|
||||
|
||||
gtk_clipboard_request_text (clipboard,
|
||||
clipboard_text_received_func,
|
||||
&results);
|
||||
|
||||
if (g_main_is_running (results.loop))
|
||||
if (g_main_loop_is_running (results.loop))
|
||||
{
|
||||
GDK_THREADS_LEAVE ();
|
||||
g_main_run (results.loop);
|
||||
g_main_loop_run (results.loop);
|
||||
GDK_THREADS_ENTER ();
|
||||
}
|
||||
|
||||
g_main_destroy (results.loop);
|
||||
g_main_loop_unref (results.loop);
|
||||
|
||||
return results.data;
|
||||
}
|
||||
|
@ -29,8 +29,8 @@ extern "C" {
|
||||
#include <gtk/gtkselection.h>
|
||||
|
||||
#define GTK_TYPE_CLIPBOARD (gtk_clipboard_get_type ())
|
||||
#define GTK_CLIPBOARD(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CLIPBOARD, GtkClipboard))
|
||||
#define GTK_IS_CLIPBOARD(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CLIPBOARD))
|
||||
#define GTK_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CLIPBOARD, GtkClipboard))
|
||||
#define GTK_IS_CLIPBOARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CLIPBOARD))
|
||||
|
||||
typedef void (* GtkClipboardReceivedFunc) (GtkClipboard *clipboard,
|
||||
GtkSelectionData *selection_data,
|
||||
|
@ -28,16 +28,15 @@
|
||||
|
||||
#include "gtkeditable.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtksignal.h"
|
||||
|
||||
|
||||
static void gtk_editable_base_init (gpointer g_class);
|
||||
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_editable_get_type (void)
|
||||
{
|
||||
static GtkType editable_type = 0;
|
||||
static GType editable_type = 0;
|
||||
|
||||
if (!editable_type)
|
||||
{
|
||||
@ -48,7 +47,8 @@ gtk_editable_get_type (void)
|
||||
NULL, /* base_finalize */
|
||||
};
|
||||
|
||||
editable_type = g_type_register_static (G_TYPE_INTERFACE, "GtkEditable", &editable_info, 0);
|
||||
editable_type = g_type_register_static (G_TYPE_INTERFACE, "GtkEditable",
|
||||
&editable_info, 0);
|
||||
}
|
||||
|
||||
return editable_type;
|
||||
@ -68,25 +68,25 @@ gtk_editable_base_init (gpointer g_class)
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__STRING_INT_POINTER,
|
||||
G_TYPE_NONE, 3,
|
||||
GTK_TYPE_STRING,
|
||||
GTK_TYPE_INT,
|
||||
GTK_TYPE_POINTER);
|
||||
G_TYPE_STRING,
|
||||
G_TYPE_INT,
|
||||
G_TYPE_POINTER);
|
||||
g_signal_new ("delete_text",
|
||||
GTK_TYPE_EDITABLE,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkEditableClass, delete_text),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__INT_INT,
|
||||
GTK_TYPE_NONE, 2,
|
||||
GTK_TYPE_INT,
|
||||
GTK_TYPE_INT);
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_INT,
|
||||
G_TYPE_INT);
|
||||
g_signal_new ("changed",
|
||||
GTK_TYPE_EDITABLE,
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GtkEditableClass, changed),
|
||||
NULL, NULL,
|
||||
_gtk_marshal_VOID__VOID,
|
||||
GTK_TYPE_NONE, 0);
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
initialized = TRUE;
|
||||
}
|
||||
@ -190,7 +190,7 @@ gtk_editable_cut_clipboard (GtkEditable *editable)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_EDITABLE (editable));
|
||||
|
||||
gtk_signal_emit_by_name (GTK_OBJECT (editable), "cut_clipboard");
|
||||
g_signal_emit_by_name (editable, "cut_clipboard");
|
||||
}
|
||||
|
||||
void
|
||||
@ -198,7 +198,7 @@ gtk_editable_copy_clipboard (GtkEditable *editable)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_EDITABLE (editable));
|
||||
|
||||
gtk_signal_emit_by_name (GTK_OBJECT (editable), "copy_clipboard");
|
||||
g_signal_emit_by_name (editable, "copy_clipboard");
|
||||
}
|
||||
|
||||
void
|
||||
@ -206,7 +206,7 @@ gtk_editable_paste_clipboard (GtkEditable *editable)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_EDITABLE (editable));
|
||||
|
||||
gtk_signal_emit_by_name (GTK_OBJECT (editable), "paste_clipboard");
|
||||
g_signal_emit_by_name (editable, "paste_clipboard");
|
||||
}
|
||||
|
||||
void
|
||||
@ -215,9 +215,9 @@ gtk_editable_set_editable (GtkEditable *editable,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_EDITABLE (editable));
|
||||
|
||||
gtk_object_set (GTK_OBJECT (editable),
|
||||
"editable", is_editable != FALSE,
|
||||
NULL);
|
||||
g_object_set (G_OBJECT (editable),
|
||||
"editable", is_editable != FALSE,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -236,7 +236,7 @@ gtk_editable_get_editable (GtkEditable *editable)
|
||||
|
||||
g_return_val_if_fail (GTK_IS_EDITABLE (editable), FALSE);
|
||||
|
||||
gtk_object_get (GTK_OBJECT (editable), "editable", &value, NULL);
|
||||
g_object_get (G_OBJECT (editable), "editable", &value, NULL);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ struct _GtkEditableClass
|
||||
gint (* get_position) (GtkEditable *editable);
|
||||
};
|
||||
|
||||
GtkType gtk_editable_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_editable_get_type (void) G_GNUC_CONST;
|
||||
void gtk_editable_select_region (GtkEditable *editable,
|
||||
gint start,
|
||||
gint end);
|
||||
|
@ -100,7 +100,7 @@ static void
|
||||
free_gc_drawable (gpointer data)
|
||||
{
|
||||
GtkGCDrawable *drawable = data;
|
||||
g_object_unref (G_OBJECT (drawable->drawable));
|
||||
g_object_unref (drawable->drawable);
|
||||
g_free (drawable);
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ gtk_gc_new (gpointer key)
|
||||
static void
|
||||
gtk_gc_destroy (gpointer value)
|
||||
{
|
||||
gdk_gc_destroy ((GdkGC*) value);
|
||||
g_object_unref (value);
|
||||
}
|
||||
|
||||
static guint
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "gtkmenuitem.h"
|
||||
#include "gtkoptionmenu.h"
|
||||
#include "gtkmarshalers.h"
|
||||
#include "gtksignal.h"
|
||||
#include "gdk/gdkkeysyms.h"
|
||||
|
||||
|
||||
@ -94,7 +93,7 @@ static void gtk_option_menu_show_all (GtkWidget *widget);
|
||||
static void gtk_option_menu_hide_all (GtkWidget *widget);
|
||||
static gboolean gtk_option_menu_mnemonic_activate (GtkWidget *widget,
|
||||
gboolean group_cycling);
|
||||
static GtkType gtk_option_menu_child_type (GtkContainer *container);
|
||||
static GType gtk_option_menu_child_type (GtkContainer *container);
|
||||
static gint gtk_option_menu_scroll_event (GtkWidget *widget,
|
||||
GdkEventScroll *event);
|
||||
|
||||
@ -115,26 +114,29 @@ static GtkButtonClass *parent_class = NULL;
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_option_menu_get_type (void)
|
||||
{
|
||||
static GtkType option_menu_type = 0;
|
||||
static GType option_menu_type = 0;
|
||||
|
||||
if (!option_menu_type)
|
||||
{
|
||||
static const GtkTypeInfo option_menu_info =
|
||||
static const GTypeInfo option_menu_info =
|
||||
{
|
||||
"GtkOptionMenu",
|
||||
sizeof (GtkOptionMenu),
|
||||
sizeof (GtkOptionMenuClass),
|
||||
(GtkClassInitFunc) gtk_option_menu_class_init,
|
||||
(GtkObjectInitFunc) gtk_option_menu_init,
|
||||
/* reserved_1 */ NULL,
|
||||
/* reserved_2 */ NULL,
|
||||
(GtkClassInitFunc) NULL,
|
||||
NULL, /* base_init */
|
||||
NULL, /* base_finalize */
|
||||
(GClassInitFunc) gtk_option_menu_class_init,
|
||||
NULL, /* class_finalize */
|
||||
NULL, /* class_data */
|
||||
sizeof (GtkOptionMenu),
|
||||
0, /* n_preallocs */
|
||||
(GInstanceInitFunc) gtk_option_menu_init,
|
||||
};
|
||||
|
||||
option_menu_type = gtk_type_unique (gtk_button_get_type (), &option_menu_info);
|
||||
option_menu_type =
|
||||
g_type_register_static (GTK_TYPE_BUTTON, "GtkOptionMenu",
|
||||
&option_menu_info, 0);
|
||||
}
|
||||
|
||||
return option_menu_type;
|
||||
@ -155,7 +157,7 @@ gtk_option_menu_class_init (GtkOptionMenuClass *class)
|
||||
button_class = (GtkButtonClass*) class;
|
||||
container_class = (GtkContainerClass*) class;
|
||||
|
||||
parent_class = gtk_type_class (gtk_button_get_type ());
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
|
||||
signals[CHANGED] =
|
||||
g_signal_new ("changed",
|
||||
@ -204,10 +206,10 @@ gtk_option_menu_class_init (GtkOptionMenuClass *class)
|
||||
G_PARAM_READABLE));
|
||||
}
|
||||
|
||||
static GtkType
|
||||
static GType
|
||||
gtk_option_menu_child_type (GtkContainer *container)
|
||||
{
|
||||
return GTK_TYPE_NONE;
|
||||
return G_TYPE_NONE;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -225,7 +227,7 @@ gtk_option_menu_init (GtkOptionMenu *option_menu)
|
||||
GtkWidget*
|
||||
gtk_option_menu_new (void)
|
||||
{
|
||||
return GTK_WIDGET (gtk_type_new (gtk_option_menu_get_type ()));
|
||||
return g_object_new (GTK_TYPE_OPTION_MENU, NULL);
|
||||
}
|
||||
|
||||
GtkWidget*
|
||||
@ -248,8 +250,12 @@ gtk_option_menu_detacher (GtkWidget *widget,
|
||||
g_return_if_fail (option_menu->menu == (GtkWidget*) menu);
|
||||
|
||||
gtk_option_menu_remove_contents (option_menu);
|
||||
gtk_signal_disconnect_by_data (GTK_OBJECT (option_menu->menu),
|
||||
option_menu);
|
||||
g_signal_handlers_disconnect_by_func (option_menu->menu,
|
||||
gtk_option_menu_selection_done,
|
||||
option_menu);
|
||||
g_signal_handlers_disconnect_by_func (option_menu->menu,
|
||||
gtk_option_menu_calc_size,
|
||||
option_menu);
|
||||
|
||||
option_menu->menu = NULL;
|
||||
g_object_notify (G_OBJECT (option_menu), "menu");
|
||||
@ -273,12 +279,12 @@ gtk_option_menu_set_menu (GtkOptionMenu *option_menu,
|
||||
|
||||
gtk_option_menu_calc_size (option_menu);
|
||||
|
||||
gtk_signal_connect_after (GTK_OBJECT (option_menu->menu), "selection_done",
|
||||
G_CALLBACK (gtk_option_menu_selection_done),
|
||||
g_signal_connect_after (option_menu->menu, "selection_done",
|
||||
G_CALLBACK (gtk_option_menu_selection_done),
|
||||
option_menu);
|
||||
g_signal_connect_swapped (option_menu->menu, "size_request",
|
||||
G_CALLBACK (gtk_option_menu_calc_size),
|
||||
option_menu);
|
||||
gtk_signal_connect_object (GTK_OBJECT (option_menu->menu), "size_request",
|
||||
(GtkSignalFunc) gtk_option_menu_calc_size,
|
||||
GTK_OBJECT (option_menu));
|
||||
|
||||
if (GTK_WIDGET (option_menu)->parent)
|
||||
gtk_widget_queue_resize (GTK_WIDGET (option_menu));
|
||||
@ -710,7 +716,7 @@ gtk_option_menu_changed (GtkOptionMenu *option_menu)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_OPTION_MENU (option_menu));
|
||||
|
||||
g_signal_emit (G_OBJECT (option_menu), signals[CHANGED], 0);
|
||||
g_signal_emit (option_menu, signals[CHANGED], 0);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -754,10 +760,10 @@ gtk_option_menu_item_destroy_cb (GtkWidget *widget,
|
||||
|
||||
if (child)
|
||||
{
|
||||
gtk_widget_ref (child);
|
||||
g_object_ref (child);
|
||||
gtk_option_menu_remove_contents (option_menu);
|
||||
gtk_widget_destroy (child);
|
||||
gtk_widget_unref (child);
|
||||
g_object_unref (child);
|
||||
|
||||
gtk_option_menu_select_first_sensitive (option_menu);
|
||||
}
|
||||
@ -780,7 +786,7 @@ gtk_option_menu_update_contents (GtkOptionMenu *option_menu)
|
||||
option_menu->menu_item = gtk_menu_get_active (GTK_MENU (option_menu->menu));
|
||||
if (option_menu->menu_item)
|
||||
{
|
||||
gtk_widget_ref (option_menu->menu_item);
|
||||
g_object_ref (option_menu->menu_item);
|
||||
child = GTK_BIN (option_menu->menu_item)->child;
|
||||
if (child)
|
||||
{
|
||||
@ -789,10 +795,10 @@ gtk_option_menu_update_contents (GtkOptionMenu *option_menu)
|
||||
gtk_widget_reparent (child, GTK_WIDGET (option_menu));
|
||||
}
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (option_menu->menu_item), "state_changed",
|
||||
GTK_SIGNAL_FUNC (gtk_option_menu_item_state_changed_cb), option_menu);
|
||||
gtk_signal_connect (GTK_OBJECT (option_menu->menu_item), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_option_menu_item_destroy_cb), option_menu);
|
||||
g_signal_connect (option_menu->menu_item, "state_changed",
|
||||
G_CALLBACK (gtk_option_menu_item_state_changed_cb), option_menu);
|
||||
g_signal_connect (option_menu->menu_item, "destroy",
|
||||
G_CALLBACK (gtk_option_menu_item_destroy_cb), option_menu);
|
||||
|
||||
gtk_widget_size_request (child, &child_requisition);
|
||||
gtk_widget_size_allocate (GTK_WIDGET (option_menu),
|
||||
@ -824,14 +830,14 @@ gtk_option_menu_remove_contents (GtkOptionMenu *option_menu)
|
||||
gtk_widget_reparent (child, option_menu->menu_item);
|
||||
}
|
||||
|
||||
gtk_signal_disconnect_by_func (GTK_OBJECT (option_menu->menu_item),
|
||||
GTK_SIGNAL_FUNC (gtk_option_menu_item_state_changed_cb),
|
||||
option_menu);
|
||||
gtk_signal_disconnect_by_func (GTK_OBJECT (option_menu->menu_item),
|
||||
GTK_SIGNAL_FUNC (gtk_option_menu_item_destroy_cb),
|
||||
option_menu);
|
||||
g_signal_handlers_disconnect_by_func (option_menu->menu_item,
|
||||
gtk_option_menu_item_state_changed_cb,
|
||||
option_menu);
|
||||
g_signal_handlers_disconnect_by_func (option_menu->menu_item,
|
||||
gtk_option_menu_item_destroy_cb,
|
||||
option_menu);
|
||||
|
||||
gtk_widget_unref (option_menu->menu_item);
|
||||
g_object_unref (option_menu->menu_item);
|
||||
option_menu->menu_item = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -38,11 +38,11 @@ extern "C" {
|
||||
|
||||
|
||||
#define GTK_TYPE_OPTION_MENU (gtk_option_menu_get_type ())
|
||||
#define GTK_OPTION_MENU(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_OPTION_MENU, GtkOptionMenu))
|
||||
#define GTK_OPTION_MENU_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_OPTION_MENU, GtkOptionMenuClass))
|
||||
#define GTK_IS_OPTION_MENU(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_OPTION_MENU))
|
||||
#define GTK_IS_OPTION_MENU_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_OPTION_MENU))
|
||||
#define GTK_OPTION_MENU_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_OPTION_MENU, GtkOptionMenuClass))
|
||||
#define GTK_OPTION_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_OPTION_MENU, GtkOptionMenu))
|
||||
#define GTK_OPTION_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_OPTION_MENU, GtkOptionMenuClass))
|
||||
#define GTK_IS_OPTION_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_OPTION_MENU))
|
||||
#define GTK_IS_OPTION_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_OPTION_MENU))
|
||||
#define GTK_OPTION_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_OPTION_MENU, GtkOptionMenuClass))
|
||||
|
||||
|
||||
typedef struct _GtkOptionMenu GtkOptionMenu;
|
||||
@ -73,7 +73,7 @@ struct _GtkOptionMenuClass
|
||||
};
|
||||
|
||||
|
||||
GtkType gtk_option_menu_get_type (void) G_GNUC_CONST;
|
||||
GType gtk_option_menu_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget* gtk_option_menu_new (void);
|
||||
GtkWidget* gtk_option_menu_get_menu (GtkOptionMenu *option_menu);
|
||||
void gtk_option_menu_set_menu (GtkOptionMenu *option_menu,
|
||||
|
@ -57,7 +57,6 @@
|
||||
|
||||
#include "gtkmain.h"
|
||||
#include "gtkselection.h"
|
||||
#include "gtksignal.h"
|
||||
|
||||
/* #define DEBUG_SELECTION */
|
||||
|
||||
@ -458,7 +457,7 @@ gtk_selection_target_list_get (GtkWidget *widget,
|
||||
GList *tmp_list;
|
||||
GList *lists;
|
||||
|
||||
lists = gtk_object_get_data (GTK_OBJECT (widget), gtk_selection_handler_key);
|
||||
lists = g_object_get_data (G_OBJECT (widget), gtk_selection_handler_key);
|
||||
|
||||
tmp_list = lists;
|
||||
while (tmp_list)
|
||||
@ -474,7 +473,7 @@ gtk_selection_target_list_get (GtkWidget *widget,
|
||||
sellist->list = gtk_target_list_new (NULL, 0);
|
||||
|
||||
lists = g_list_prepend (lists, sellist);
|
||||
gtk_object_set_data (GTK_OBJECT (widget), gtk_selection_handler_key, lists);
|
||||
g_object_set_data (G_OBJECT (widget), gtk_selection_handler_key, lists);
|
||||
|
||||
return sellist->list;
|
||||
}
|
||||
@ -486,7 +485,7 @@ gtk_selection_target_list_remove (GtkWidget *widget)
|
||||
GList *tmp_list;
|
||||
GList *lists;
|
||||
|
||||
lists = gtk_object_get_data (GTK_OBJECT (widget), gtk_selection_handler_key);
|
||||
lists = g_object_get_data (G_OBJECT (widget), gtk_selection_handler_key);
|
||||
|
||||
tmp_list = lists;
|
||||
while (tmp_list)
|
||||
@ -500,7 +499,7 @@ gtk_selection_target_list_remove (GtkWidget *widget)
|
||||
}
|
||||
|
||||
g_list_free (lists);
|
||||
gtk_object_set_data (GTK_OBJECT (widget), gtk_selection_handler_key, NULL);
|
||||
g_object_set_data (G_OBJECT (widget), gtk_selection_handler_key, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -519,7 +518,7 @@ gtk_selection_clear_targets (GtkWidget *widget,
|
||||
GList *tmp_list;
|
||||
GList *lists;
|
||||
|
||||
lists = gtk_object_get_data (GTK_OBJECT (widget), gtk_selection_handler_key);
|
||||
lists = g_object_get_data (G_OBJECT (widget), gtk_selection_handler_key);
|
||||
|
||||
tmp_list = lists;
|
||||
while (tmp_list)
|
||||
@ -537,7 +536,7 @@ gtk_selection_clear_targets (GtkWidget *widget,
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (widget), gtk_selection_handler_key, lists);
|
||||
g_object_set_data (G_OBJECT (widget), gtk_selection_handler_key, lists);
|
||||
}
|
||||
|
||||
void
|
||||
@ -1734,9 +1733,9 @@ gtk_selection_retrieval_report (GtkRetrievalInfo *info,
|
||||
data.data = buffer;
|
||||
data.display = gtk_widget_get_display (info->widget);
|
||||
|
||||
gtk_signal_emit_by_name (GTK_OBJECT(info->widget),
|
||||
"selection_received",
|
||||
&data, time);
|
||||
g_signal_emit_by_name (info->widget,
|
||||
"selection_received",
|
||||
&data, time);
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
@ -1769,10 +1768,10 @@ gtk_selection_invoke_handler (GtkWidget *widget,
|
||||
if (target_list &&
|
||||
gtk_target_list_find (target_list, data->target, &info))
|
||||
{
|
||||
gtk_signal_emit_by_name (GTK_OBJECT (widget),
|
||||
"selection_get",
|
||||
data,
|
||||
info, time);
|
||||
g_signal_emit_by_name (widget,
|
||||
"selection_get",
|
||||
data,
|
||||
info, time);
|
||||
}
|
||||
else
|
||||
gtk_selection_default_handler (widget, data);
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "gtkcontainer.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtksignal.h"
|
||||
#include "gtksizegroup.h"
|
||||
|
||||
enum {
|
||||
@ -256,10 +255,10 @@ gtk_size_group_init (GtkSizeGroup *size_group)
|
||||
size_group->have_height = 0;
|
||||
}
|
||||
|
||||
GtkType
|
||||
GType
|
||||
gtk_size_group_get_type (void)
|
||||
{
|
||||
static GtkType size_group_type = 0;
|
||||
static GType size_group_type = 0;
|
||||
|
||||
if (!size_group_type)
|
||||
{
|
||||
@ -276,7 +275,8 @@ gtk_size_group_get_type (void)
|
||||
(GInstanceInitFunc) gtk_size_group_init,
|
||||
};
|
||||
|
||||
size_group_type = g_type_register_static (G_TYPE_OBJECT, "GtkSizeGroup", &size_group_info, 0);
|
||||
size_group_type = g_type_register_static (G_TYPE_OBJECT, "GtkSizeGroup",
|
||||
&size_group_info, 0);
|
||||
}
|
||||
|
||||
return size_group_type;
|
||||
@ -420,10 +420,11 @@ gtk_size_group_add_widget (GtkSizeGroup *size_group,
|
||||
|
||||
size_group->widgets = g_slist_prepend (size_group->widgets, widget);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (widget), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_size_group_widget_destroyed), size_group);
|
||||
g_signal_connect (widget, "destroy",
|
||||
G_CALLBACK (gtk_size_group_widget_destroyed),
|
||||
size_group);
|
||||
|
||||
g_object_ref (G_OBJECT (size_group));
|
||||
g_object_ref (size_group);
|
||||
}
|
||||
|
||||
queue_resize_on_group (size_group);
|
||||
@ -446,8 +447,9 @@ gtk_size_group_remove_widget (GtkSizeGroup *size_group,
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (g_slist_find (size_group->widgets, widget));
|
||||
|
||||
gtk_signal_disconnect_by_func (GTK_OBJECT (widget),
|
||||
GTK_SIGNAL_FUNC (gtk_size_group_widget_destroyed), size_group);
|
||||
g_signal_handlers_disconnect_by_func (widget,
|
||||
gtk_size_group_widget_destroyed,
|
||||
size_group);
|
||||
|
||||
groups = get_size_groups (widget);
|
||||
groups = g_slist_remove (groups, size_group);
|
||||
@ -457,7 +459,7 @@ gtk_size_group_remove_widget (GtkSizeGroup *size_group,
|
||||
queue_resize_on_group (size_group);
|
||||
gtk_widget_queue_resize (widget);
|
||||
|
||||
g_object_unref (G_OBJECT (size_group));
|
||||
g_object_unref (size_group);
|
||||
}
|
||||
|
||||
static gint
|
||||
@ -488,7 +490,9 @@ do_size_request (GtkWidget *widget)
|
||||
if (GTK_WIDGET_REQUEST_NEEDED (widget))
|
||||
{
|
||||
gtk_widget_ensure_style (widget);
|
||||
gtk_signal_emit_by_name (GTK_OBJECT (widget), "size_request", &widget->requisition);
|
||||
g_signal_emit_by_name (widget,
|
||||
"size_request",
|
||||
&widget->requisition);
|
||||
|
||||
GTK_PRIVATE_UNSET_FLAG (widget, GTK_REQUEST_NEEDED);
|
||||
}
|
||||
|
@ -28,11 +28,11 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define GTK_TYPE_SIZE_GROUP (gtk_size_group_get_type ())
|
||||
#define GTK_SIZE_GROUP(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SIZE_GROUP, GtkSizeGroup))
|
||||
#define GTK_SIZE_GROUP_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SIZE_GROUP, GtkSizeGroupClass))
|
||||
#define GTK_IS_SIZE_GROUP(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SIZE_GROUP))
|
||||
#define GTK_IS_SIZE_GROUP_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SIZE_GROUP))
|
||||
#define GTK_SIZE_GROUP_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_SIZE_GROUP, GtkSizeGroupClass))
|
||||
#define GTK_SIZE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SIZE_GROUP, GtkSizeGroup))
|
||||
#define GTK_SIZE_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SIZE_GROUP, GtkSizeGroupClass))
|
||||
#define GTK_IS_SIZE_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SIZE_GROUP))
|
||||
#define GTK_IS_SIZE_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SIZE_GROUP))
|
||||
#define GTK_SIZE_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SIZE_GROUP, GtkSizeGroupClass))
|
||||
|
||||
|
||||
typedef struct _GtkSizeGroup GtkSizeGroup;
|
||||
|
Loading…
Reference in New Issue
Block a user