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

Deprecation cleanup

Sun Oct 13 12:29:15 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
        gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
        Deprecation cleanup

        * gtk/gtkcolorseldialog.c: make window not resizable (lost
        accidently in the previous cleanup)
parent fb716863
Sun Oct 13 12:29:15 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
Deprecation cleanup
* gtk/gtkcolorseldialog.c: make window not resizable (lost
accidently in the previous cleanup)
Sun Oct 13 20:20:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktooltips.c (gtk_tooltips_force_window): Make tooltip
......@@ -18,7 +27,7 @@ Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Sun Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Don't invalidate
a widget if it or one of its ancestors isn't mapped.
......
Sun Oct 13 12:29:15 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
Deprecation cleanup
* gtk/gtkcolorseldialog.c: make window not resizable (lost
accidently in the previous cleanup)
Sun Oct 13 20:20:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktooltips.c (gtk_tooltips_force_window): Make tooltip
......@@ -18,7 +27,7 @@ Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Sun Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Don't invalidate
a widget if it or one of its ancestors isn't mapped.
......
Sun Oct 13 12:29:15 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
Deprecation cleanup
* gtk/gtkcolorseldialog.c: make window not resizable (lost
accidently in the previous cleanup)
Sun Oct 13 20:20:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktooltips.c (gtk_tooltips_force_window): Make tooltip
......@@ -18,7 +27,7 @@ Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Sun Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Don't invalidate
a widget if it or one of its ancestors isn't mapped.
......
Sun Oct 13 12:29:15 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
Deprecation cleanup
* gtk/gtkcolorseldialog.c: make window not resizable (lost
accidently in the previous cleanup)
Sun Oct 13 20:20:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktooltips.c (gtk_tooltips_force_window): Make tooltip
......@@ -18,7 +27,7 @@ Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Sun Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Don't invalidate
a widget if it or one of its ancestors isn't mapped.
......
Sun Oct 13 12:29:15 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
Deprecation cleanup
* gtk/gtkcolorseldialog.c: make window not resizable (lost
accidently in the previous cleanup)
Sun Oct 13 20:20:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktooltips.c (gtk_tooltips_force_window): Make tooltip
......@@ -18,7 +27,7 @@ Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Sun Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Don't invalidate
a widget if it or one of its ancestors isn't mapped.
......
Sun Oct 13 12:29:15 2002 Manish Singh <yosh@gimp.org>
* gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
Deprecation cleanup
* gtk/gtkcolorseldialog.c: make window not resizable (lost
accidently in the previous cleanup)
Sun Oct 13 20:20:51 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtktooltips.c (gtk_tooltips_force_window): Make tooltip
......@@ -18,7 +27,7 @@ Sun Oct 13 18:50:14 2002 Soeren Sandmann <sandmann@daimi.au.dk>
#94616, Ben Martin;
#94772, sbaillie@bigpond.net.au;
Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
Sun Oct 13 17:41:53 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwidget.c (gtk_widget_queue_clear_area): Don't invalidate
a widget if it or one of its ancestors isn't mapped.
......
This diff is collapsed.
......@@ -36,11 +36,11 @@ extern "C" {
#define GTK_TYPE_COLOR_SELECTION (gtk_color_selection_get_type ())
#define GTK_COLOR_SELECTION(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelection))
#define GTK_COLOR_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass))
#define GTK_IS_COLOR_SELECTION(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COLOR_SELECTION))
#define GTK_IS_COLOR_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_SELECTION))
#define GTK_COLOR_SELECTION_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass))
#define GTK_COLOR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelection))
#define GTK_COLOR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass))
#define GTK_IS_COLOR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_COLOR_SELECTION))
#define GTK_IS_COLOR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COLOR_SELECTION))
#define GTK_COLOR_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_COLOR_SELECTION, GtkColorSelectionClass))
typedef struct _GtkColorSelection GtkColorSelection;
......@@ -77,7 +77,7 @@ struct _GtkColorSelectionClass
/* ColorSelection */
GtkType gtk_color_selection_get_type (void) G_GNUC_CONST;
GType gtk_color_selection_get_type (void) G_GNUC_CONST;
GtkWidget *gtk_color_selection_new (void);
gboolean gtk_color_selection_get_has_opacity_control (GtkColorSelection *colorsel);
void gtk_color_selection_set_has_opacity_control (GtkColorSelection *colorsel,
......
......@@ -119,6 +119,7 @@ gtk_color_selection_dialog_new (const gchar *title)
colorseldiag = g_object_new (GTK_TYPE_COLOR_SELECTION_DIALOG, NULL);
gtk_window_set_title (GTK_WINDOW (colorseldiag), title);
gtk_window_set_resizable (GTK_WINDOW (colorseldiag), FALSE);
return GTK_WIDGET (colorseldiag);
}
......@@ -39,7 +39,6 @@
#include "gtklistitem.h"
#include "gtkscrolledwindow.h"
#include "gtkmain.h"
#include "gtksignal.h"
#include "gtkwindow.h"
#include "gdk/gdkkeysyms.h"
#include "gtkcombo.h"
......@@ -107,7 +106,6 @@ static gint gtk_combo_entry_key_press (GtkEntry *widget,
static gint gtk_combo_window_key_press (GtkWidget *window,
GdkEventKey *event,
GtkCombo *combo);
static void gtk_combo_item_destroy (GtkObject *object);
static void gtk_combo_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void gtk_combo_set_property (GObject *object,
......@@ -128,10 +126,11 @@ gtk_combo_class_init (GtkComboClass * klass)
GtkWidgetClass *widget_class;
gobject_class = (GObjectClass *) klass;
parent_class = gtk_type_class (GTK_TYPE_HBOX);
oclass = (GtkObjectClass *) klass;
widget_class = (GtkWidgetClass *) klass;
parent_class = g_type_class_peek_parent (klass);
gobject_class->set_property = gtk_combo_set_property;
gobject_class->get_property = gtk_combo_get_property;
......@@ -189,7 +188,7 @@ gtk_combo_destroy (GtkObject *object)
if (combo->popwin)
{
gtk_widget_destroy (combo->popwin);
gtk_widget_unref (combo->popwin);
g_object_unref (combo->popwin);
combo->popwin = NULL;
}
......@@ -215,7 +214,7 @@ gtk_combo_entry_key_press (GtkEntry * entry, GdkEventKey * event, GtkCombo * com
if ( !GTK_LIST (combo->list)->children )
return FALSE;
gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "key_press_event");
g_signal_stop_emission_by_name (entry, "key_press_event");
cmpl = g_completion_new ((GCompletionFunc)gtk_combo_func);
g_completion_add_items (cmpl, GTK_LIST (combo->list)->children);
......@@ -258,7 +257,7 @@ gtk_combo_entry_key_press (GtkEntry * entry, GdkEventKey * event, GtkCombo * com
if (li)
{
gtk_list_select_child (GTK_LIST (combo->list), GTK_WIDGET (li->data));
gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "key_press_event");
g_signal_stop_emission_by_name (entry, "key_press_event");
return TRUE;
}
}
......@@ -275,7 +274,7 @@ gtk_combo_entry_key_press (GtkEntry * entry, GdkEventKey * event, GtkCombo * com
if (li)
{
gtk_list_select_child (GTK_LIST (combo->list), GTK_WIDGET (li->data));
gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "key_press_event");
g_signal_stop_emission_by_name (entry, "key_press_event");
return TRUE;
}
}
......@@ -301,7 +300,7 @@ gtk_combo_window_key_press (GtkWidget *window,
}
}
gtk_signal_emit_stop_by_name (GTK_OBJECT (window), "key_press_event");
g_signal_stop_emission_by_name (window, "key_press_event");
return TRUE;
}
......@@ -354,13 +353,13 @@ gtk_combo_func (GtkListItem * li)
GtkWidget *label;
gchar *ltext = NULL;
ltext = (gchar *) gtk_object_get_data (GTK_OBJECT (li), gtk_combo_string_key);
ltext = g_object_get_data (G_OBJECT (li), gtk_combo_string_key);
if (!ltext)
{
label = GTK_BIN (li)->child;
if (!label || !GTK_IS_LABEL (label))
return NULL;
gtk_label_get (GTK_LABEL (label), &ltext);
ltext = (gchar *) gtk_label_get_text (GTK_LABEL (label));
}
return ltext;
}
......@@ -395,7 +394,7 @@ gtk_combo_entry_focus_out (GtkEntry * entry, GdkEventFocus * event, GtkCombo * c
/* this is needed because if we call gtk_widget_grab_focus()
it isn't guaranteed it's the *last* call before the main-loop,
so the focus can be lost anyway...
the signal_emit_stop doesn't seem to work either...
the signal_stop_emission doesn't seem to work either...
*/
focus_idle = g_idle_source_new ();
g_source_set_closure (focus_idle,
......@@ -403,7 +402,7 @@ gtk_combo_entry_focus_out (GtkEntry * entry, GdkEventFocus * event, GtkCombo * c
G_OBJECT (combo)));
g_source_attach (focus_idle, NULL);
/*gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "focus_out_event"); */
/*g_signal_stop_emission_by_name (entry, "focus_out_event"); */
return TRUE;
}
return FALSE;
......@@ -520,7 +519,7 @@ gtk_combo_popup_list (GtkCombo * combo)
}
gtk_window_move (GTK_WINDOW (combo->popwin), x, y);
gtk_widget_set_usize (combo->popwin, width, height);
gtk_widget_set_size_request (combo->popwin, width, height);
gtk_widget_show (combo->popwin);
gtk_widget_grab_focus (combo->popwin);
......@@ -610,7 +609,7 @@ gtk_combo_update_entry (GtkList * list, GtkCombo * combo)
char *text;
gtk_grab_remove (GTK_WIDGET (combo));
gtk_signal_handler_block (GTK_OBJECT (list), combo->list_change_id);
g_signal_handler_block (list, combo->list_change_id);
if (list->selection)
{
text = gtk_combo_func (GTK_LIST_ITEM (list->selection->data));
......@@ -618,7 +617,7 @@ gtk_combo_update_entry (GtkList * list, GtkCombo * combo)
text = "";
gtk_entry_set_text (GTK_ENTRY (combo->entry), text);
}
gtk_signal_handler_unblock (GTK_OBJECT (list), combo->list_change_id);
g_signal_handler_unblock (list, combo->list_change_id);
}
static void
......@@ -630,13 +629,13 @@ gtk_combo_update_list (GtkEntry * entry, GtkCombo * combo)
gtk_grab_remove (GTK_WIDGET (combo));
gtk_signal_handler_block (GTK_OBJECT (entry), combo->entry_change_id);
g_signal_handler_block (entry, combo->entry_change_id);
if (slist && slist->data)
gtk_list_unselect_child (list, GTK_WIDGET (slist->data));
li = gtk_combo_find (combo);
if (li)
gtk_list_select_child (list, GTK_WIDGET (li));
gtk_signal_handler_unblock (GTK_OBJECT (entry), combo->entry_change_id);
g_signal_handler_unblock (entry, combo->entry_change_id);
}
static gint
......@@ -768,7 +767,7 @@ combo_event_box_realize (GtkWidget *widget)
GdkCursor *cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget),
GDK_TOP_LEFT_ARROW);
gdk_window_set_cursor (widget->window, cursor);
gdk_cursor_destroy (cursor);
gdk_cursor_unref (cursor);
}
static void
......@@ -794,25 +793,27 @@ gtk_combo_init (GtkCombo * combo)
GTK_WIDGET_UNSET_FLAGS (combo->button, GTK_CAN_FOCUS);
gtk_widget_show (combo->entry);
gtk_widget_show (combo->button);
combo->entry_change_id = gtk_signal_connect (GTK_OBJECT (combo->entry), "changed",
(GtkSignalFunc) gtk_combo_update_list, combo);
gtk_signal_connect (GTK_OBJECT (combo->entry), "key_press_event",
(GtkSignalFunc) gtk_combo_entry_key_press, combo);
gtk_signal_connect_after (GTK_OBJECT (combo->entry), "focus_out_event",
(GtkSignalFunc) gtk_combo_entry_focus_out, combo);
combo->activate_id = gtk_signal_connect (GTK_OBJECT (combo->entry), "activate",
(GtkSignalFunc) gtk_combo_activate, combo);
gtk_signal_connect (GTK_OBJECT (combo->button), "button_press_event",
(GtkSignalFunc) gtk_combo_popup_button_press, combo);
gtk_signal_connect (GTK_OBJECT (combo->button), "leave_notify_event",
(GtkSignalFunc) gtk_combo_popup_button_leave, combo);
combo->entry_change_id = g_signal_connect (combo->entry, "changed",
G_CALLBACK (gtk_combo_update_list),
combo);
g_signal_connect (combo->entry, "key_press_event",
G_CALLBACK (gtk_combo_entry_key_press), combo);
g_signal_connect_after (combo->entry, "focus_out_event",
G_CALLBACK (gtk_combo_entry_focus_out), combo);
combo->activate_id = g_signal_connect (combo->entry, "activate",
G_CALLBACK (gtk_combo_activate),
combo);
g_signal_connect (combo->button, "button_press_event",
G_CALLBACK (gtk_combo_popup_button_press), combo);
g_signal_connect (combo->button, "leave_notify_event",
G_CALLBACK (gtk_combo_popup_button_leave), combo);
combo->popwin = gtk_window_new (GTK_WINDOW_POPUP);
gtk_widget_ref (combo->popwin);
g_object_ref (combo->popwin);
gtk_window_set_resizable (GTK_WINDOW (combo->popwin), FALSE);
gtk_signal_connect (GTK_OBJECT (combo->popwin), "key_press_event",
GTK_SIGNAL_FUNC (gtk_combo_window_key_press), combo);
g_signal_connect (combo->popwin, "key_press_event",
G_CALLBACK (gtk_combo_window_key_press), combo);
gtk_widget_set_events (combo->popwin, GDK_KEY_PRESS_MASK);
......@@ -850,21 +851,24 @@ gtk_combo_init (GtkCombo * combo)
gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (combo->popup)));
gtk_widget_show (combo->list);
combo->list_change_id = gtk_signal_connect (GTK_OBJECT (combo->list), "selection_changed",
(GtkSignalFunc) gtk_combo_update_entry, combo);
gtk_signal_connect (GTK_OBJECT (combo->popwin), "key_press_event",
(GtkSignalFunc) gtk_combo_list_key_press, combo);
gtk_signal_connect (GTK_OBJECT (combo->popwin), "button_press_event",
GTK_SIGNAL_FUNC (gtk_combo_button_press), combo);
combo->list_change_id = g_signal_connect (combo->list,
"selection_changed",
G_CALLBACK (gtk_combo_update_entry),
combo);
g_signal_connect (combo->popwin, "key_press_event",
G_CALLBACK (gtk_combo_list_key_press), combo);
g_signal_connect (combo->popwin, "button_press_event",
G_CALLBACK (gtk_combo_button_press), combo);
g_signal_connect (combo->list, "event_after",
G_CALLBACK (gtk_combo_button_event_after), combo);
gtk_signal_connect (GTK_OBJECT (combo->list), "event_after",
(GtkSignalFunc) gtk_combo_button_event_after, combo);
/* We connect here on the button, because we'll have a grab on it
* when the event occurs. But we are actually interested in enters
* for the combo->list.
*/
gtk_signal_connect (GTK_OBJECT (combo->button), "enter_notify_event",
GTK_SIGNAL_FUNC (gtk_combo_list_enter), combo);
g_signal_connect (combo->button, "enter_notify_event",
G_CALLBACK (gtk_combo_list_enter), combo);
}
static void
......@@ -889,33 +893,37 @@ gtk_combo_unrealize (GtkWidget *widget)
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
}
GtkType
GType
gtk_combo_get_type (void)
{
static GtkType combo_type = 0;
static GType combo_type = 0;
if (!combo_type)
{
static const GtkTypeInfo combo_info =
static const GTypeInfo combo_info =
{
"GtkCombo",
sizeof (GtkCombo),
sizeof (GtkComboClass),
(GtkClassInitFunc) gtk_combo_class_init,
(GtkObjectInitFunc) gtk_combo_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) gtk_combo_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GtkCombo),
0, /* n_preallocs */
(GInstanceInitFunc) gtk_combo_init,
};
combo_type = gtk_type_unique (GTK_TYPE_HBOX, &combo_info);
combo_type = g_type_register_static (GTK_TYPE_HBOX, "GtkCombo",
&combo_info, 0);
}
return combo_type;
}
GtkWidget*
gtk_combo_new (void)
{
return GTK_WIDGET (gtk_type_new (GTK_TYPE_COMBO));
return g_object_new (GTK_TYPE_COMBO, NULL);
}
void
......@@ -1008,48 +1016,14 @@ gtk_combo_set_popdown_strings (GtkCombo * combo, GList * strings)
}
}
static void
gtk_combo_item_destroy (GtkObject * object)
{
gchar *key;
key = gtk_object_get_data (object, gtk_combo_string_key);
if (key)
{
gtk_object_remove_data (object, gtk_combo_string_key);
g_free (key);
}
}
void
gtk_combo_set_item_string (GtkCombo * combo, GtkItem * item, const gchar * item_value)
{
gchar *val;
gint connected = 0;
g_return_if_fail (GTK_IS_COMBO (combo));
g_return_if_fail (item != NULL);
val = gtk_object_get_data (GTK_OBJECT (item), gtk_combo_string_key);
if (val)
{
g_free (val);
connected = 1;
}
if (item_value)
{
val = g_strdup (item_value);
gtk_object_set_data (GTK_OBJECT (item), gtk_combo_string_key, val);
if (!connected)
gtk_signal_connect (GTK_OBJECT (item), "destroy",
(GtkSignalFunc) gtk_combo_item_destroy, val);
}
else
{
gtk_object_set_data (GTK_OBJECT (item), gtk_combo_string_key, NULL);
if (connected)
gtk_signal_disconnect_by_data(GTK_OBJECT (item), val);
}
g_object_set_data_full (G_OBJECT (item), gtk_combo_string_key,
g_strdup (item_value), g_free);
}
static void
......@@ -1084,7 +1058,7 @@ gtk_combo_disable_activate (GtkCombo* combo)
g_return_if_fail (GTK_IS_COMBO (combo));
if ( combo->activate_id ) {
gtk_signal_disconnect (GTK_OBJECT(combo->entry), combo->activate_id);
g_signal_handler_disconnect (combo->entry, combo->activate_id);
combo->activate_id = 0;
}
}
......
......@@ -35,11 +35,11 @@ extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_COMBO (gtk_combo_get_type ())
#define GTK_COMBO(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_COMBO, GtkCombo))
#define GTK_COMBO_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_COMBO, GtkComboClass))
#define GTK_IS_COMBO(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_COMBO))
#define GTK_IS_COMBO_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COMBO))
#define GTK_COMBO_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_COMBO, GtkComboClass))
#define GTK_COMBO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_COMBO, GtkCombo))
#define GTK_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_COMBO, GtkComboClass))
#define GTK_IS_COMBO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_COMBO))
#define GTK_IS_COMBO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_COMBO))
#define GTK_COMBO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_COMBO, GtkComboClass))
typedef struct _GtkCombo GtkCombo;
......@@ -77,7 +77,7 @@ struct _GtkComboClass {
void (*_gtk_reserved4) (void);
};
GtkType gtk_combo_get_type (void) G_GNUC_CONST;
GType gtk_combo_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_combo_new (void);
/* the text in the entry must be or not be in the list */
......
......@@ -83,10 +83,10 @@ enum {
static guint plug_signals[LAST_SIGNAL] = { 0 };
GtkType
GType
gtk_plug_get_type ()
{
static GtkType plug_type = 0;
static GType plug_type = 0;
if (!plug_type)
{
......@@ -103,7 +103,8 @@ gtk_plug_get_type ()
(GInstanceInitFunc) gtk_plug_init,
};
plug_type = g_type_register_static (GTK_TYPE_WINDOW, "GtkPlug", &plug_info, 0);
plug_type = g_type_register_static (GTK_TYPE_WINDOW, "GtkPlug",
&plug_info, 0);
}
return plug_type;
......@@ -117,8 +118,8 @@ gtk_plug_class_init (GtkPlugClass *class)
GtkWindowClass *window_class = (GtkWindowClass *)class;
GtkContainerClass *container_class = (GtkContainerClass *)class;
parent_class = gtk_type_class (GTK_TYPE_WINDOW);
bin_class = gtk_type_class (GTK_TYPE_BIN);
parent_class = g_type_class_peek_parent (class);
bin_class = g_type_class_peek (GTK_TYPE_BIN);
gobject_class->finalize = gtk_plug_finalize;
......@@ -148,7 +149,7 @@ gtk_plug_class_init (GtkPlugClass *class)
G_STRUCT_OFFSET (GtkPlugClass, embedded),
NULL, NULL,
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
G_TYPE_NONE, 0);
}
static void
......@@ -244,7 +245,7 @@ _gtk_plug_add_to_socket (GtkPlug *plug,
gtk_widget_set_parent (widget, GTK_WIDGET (socket));
g_signal_emit_by_name (G_OBJECT (socket), "plug_added", 0);
g_signal_emit_by_name (socket, "plug_added", 0);
}
static void
......@@ -311,7 +312,7 @@ _gtk_plug_remove_from_socket (GtkPlug *plug,
gtk_plug_set_is_child (plug, FALSE);
g_signal_emit_by_name (G_OBJECT (socket), "plug_removed", &result);
g_signal_emit_by_name (socket, "plug_removed", &result);
if (!result)
gtk_widget_destroy (GTK_WIDGET (socket));
......@@ -379,7 +380,7 @@ gtk_plug_construct_for_display (GtkPlug *plug,
}
if (plug->socket_window)
g_signal_emit (G_OBJECT (plug), plug_signals[EMBEDDED], 0);
g_signal_emit (plug, plug_signals[EMBEDDED], 0);
}
}
......@@ -414,7 +415,7 @@ gtk_plug_new_for_display (GdkDisplay *display,
{
GtkPlug *plug;
plug = GTK_PLUG (gtk_type_new (GTK_TYPE_PLUG));
plug = g_object_new (GTK_TYPE_PLUG, NULL);
gtk_plug_construct_for_display (plug, display, socket_id);
return GTK_WIDGET (plug);
}
......@@ -466,7 +467,7 @@ gtk_plug_unrealize (GtkWidget *widget)
if (plug->socket_window != NULL)
{
gdk_window_set_user_data (plug->socket_window, NULL);
gdk_window_unref (plug->socket_window);
g_object_unref (plug->socket_window);
plug->socket_window = NULL;
}
......@@ -1108,7 +1109,7 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
GtkWidget *widget = GTK_WIDGET (plug);
gdk_window_set_user_data (plug->socket_window, NULL);
gdk_window_unref (plug->socket_window);
g_object_unref (plug->socket_window);
plug->socket_window = NULL;
/* Emit a delete window, as if the user attempted
......@@ -1157,7 +1158,7 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
g_hash_table_foreach (plug->grabbed_keys, add_grabbed_key_always, plug);
if (!was_embedded)
g_signal_emit (G_OBJECT (plug), plug_signals[EMBEDDED], 0);
g_signal_emit (plug, plug_signals[EMBEDDED], 0);
}
done:
......
......@@ -38,11 +38,11 @@ extern "C" {
#define GTK_TYPE_PLUG (gtk_plug_get_type ())
#define GTK_PLUG(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_PLUG, GtkPlug))
#define GTK_PLUG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_PLUG, GtkPlugClass))
#define GTK_IS_PLUG(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_PLUG))
#define GTK_IS_PLUG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PLUG))
#define GTK_PLUG_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_PLUG, GtkPlugClass))
#define GTK_PLUG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_PLUG, GtkPlug))
#define GTK_PLUG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_PLUG, GtkPlugClass))
#define GTK_IS_PLUG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_PLUG))
#define GTK_IS_PLUG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_PLUG))
#define GTK_PLUG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_PLUG, GtkPlugClass))
typedef struct _GtkPlug GtkPlug;
......@@ -75,7 +75,7 @@ struct _GtkPlugClass
};
GtkType gtk_plug_get_type (void) G_GNUC_CONST;
GType gtk_plug_get_type (void) G_GNUC_CONST;
#ifndef GDK_MULTIHEAD_SAFE
void gtk_plug_construct (GtkPlug *plug,
......
......@@ -33,7 +33,6 @@
#include "gtkwindow.h"
#include "gtkplug.h"
#include "gtkprivate.h"
#include "gtksignal.h"
#include "gtksocket.h"
#include "gtkdnd.h"
......@@ -135,10 +134,10 @@ gtk_socket_get_private (GtkSocket *socket)
return private;
}
GtkType
GType
gtk_socket_get_type (void)
{
static GtkType socket_type = 0;
static GType socket_type = 0;
if (!socket_type)
{
......@@ -155,7 +154,8 @@ gtk_socket_get_type (void)
(GInstanceInitFunc) gtk_socket_init,
};
socket_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkSocket", &socket_info, 0);
socket_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkSocket",
&socket_info, 0);
}
return socket_type;
......@@ -183,7 +183,7 @@ gtk_socket_class_init (GtkSocketClass *class)
widget_class = (GtkWidgetClass*) class;
container_class = (GtkContainerClass*) class;
parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
parent_class = g_type_class_peek_parent (class);
gobject_class->finalize = gtk_socket_finalize;
gobject_class->notify = gtk_socket_notify;
......@@ -207,7 +207,7 @@ gtk_socket_class_init (GtkSocketClass *class)
G_STRUCT_OFFSET (GtkSocketClass, plug_added),
NULL, NULL,
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
G_TYPE_NONE, 0);
socket_signals[PLUG_REMOVED] =
g_signal_new ("plug_removed",
G_OBJECT_CLASS_TYPE (class),
......@@ -656,7 +656,6 @@ remove_grabbed_key (GtkSocket *socket,
accel_entry->closure);
return;
}
}
g_warning ("GtkSocket: request to remove non-present grabbed key %u,%#x\n",
......@@ -735,9 +734,11 @@ gtk_socket_hierarchy_changed (GtkWidget *widget,
{
gtk_window_remove_accel_group (GTK_WINDOW (socket->toplevel), socket->accel_group);
g_signal_handlers_disconnect_by_func (socket->toplevel,
(gpointer) socket_update_focus_in, socket);
socket_update_focus_in,
socket);
g_signal_handlers_disconnect_by_func (socket->toplevel,
(gpointer) socket_update_active, socket);
socket_update_active,
socket);
}
socket->toplevel = toplevel;
......@@ -987,7 +988,7 @@ gtk_socket_add_window (GtkSocket *socket,
if (gdk_error_trap_pop ())
{
gdk_window_unref (socket->plug_window);
g_object_unref (socket->plug_window);
socket->plug_window = NULL;
return;
}
......@@ -1044,7 +1045,7 @@ gtk_socket_add_window (GtkSocket *socket,
}
if (socket->plug_window)
g_signal_emit (G_OBJECT (socket), socket_signals[PLUG_ADDED], 0);
g_signal_emit (socket, socket_signals[PLUG_ADDED], 0);
}
......@@ -1322,7 +1323,7 @@ gtk_socket_filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
gtk_socket_end_embedding (socket);
g_object_ref (widget);
g_signal_emit (G_OBJECT (widget), socket_signals[PLUG_REMOVED], 0, &result);
g_signal_emit (widget, socket_signals[PLUG_REMOVED], 0, &result);
if (!result)
gtk_widget_destroy (widget);
g_object_unref (widget);
......
......@@ -34,11 +34,11 @@ extern "C" {
#define GTK_TYPE_SOCKET (gtk_socket_get_type ())