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);
}
This diff is collapsed.
......@@ -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 ())
#define GTK_SOCKET(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SOCKET, GtkSocket))
#define GTK_SOCKET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SOCKET, GtkSocketClass))
#define GTK_IS_SOCKET(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SOCKET))
#define GTK_IS_SOCKET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SOCKET))
#define GTK_SOCKET_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_SOCKET, GtkSocketClass))
#define GTK_SOCKET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SOCKET, GtkSocket))
#define GTK_SOCKET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SOCKET, GtkSocketClass))
#define GTK_IS_SOCKET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SOCKET))
#define GTK_IS_SOCKET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SOCKET))
#define GTK_SOCKET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SOCKET, GtkSocketClass))
typedef struct _GtkSocket GtkSocket;
......@@ -83,8 +83,8 @@ struct _GtkSocketClass
};
GType gtk_socket_get_type (void) G_GNUC_CONST;
GtkWidget* gtk_socket_new (void);
GtkType gtk_socket_get_type (void) G_GNUC_CONST;
void gtk_socket_add_id (GtkSocket *socket,
GdkNativeWindow window_id);
......
This diff is collapsed.
......@@ -42,11 +42,11 @@ typedef enum
} GtkTreeViewDropPosition;
#define GTK_TYPE_TREE_VIEW (gtk_tree_view_get_type ())
#define GTK_TREE_VIEW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE_VIEW, GtkTreeView))
#define GTK_TREE_VIEW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_VIEW, GtkTreeViewClass))
#define GTK_IS_TREE_VIEW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE_VIEW))
#define GTK_IS_TREE_VIEW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_VIEW))
#define GTK_TREE_VIEW_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_TREE_VIEW, GtkTreeViewClass))
#define GTK_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_VIEW, GtkTreeView))
#define GTK_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_VIEW, GtkTreeViewClass))
#define GTK_IS_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_VIEW))
#define GTK_IS_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_VIEW))
#define GTK_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_VIEW, GtkTreeViewClass))
typedef struct _GtkTreeView GtkTreeView;
typedef struct _GtkTreeViewClass GtkTreeViewClass;
......@@ -127,7 +127,7 @@ typedef gboolean (*GtkTreeViewSearchEqualFunc) (GtkTreeModel *model,
/* Creators */
GtkType gtk_tree_view_get_type (void);
GType gtk_tree_view_get_type (void);
GtkWidget *gtk_tree_view_new (void);
GtkWidget *gtk_tree_view_new_with_model (GtkTreeModel *model);
......
......@@ -17,10 +17,10 @@
* Boston, MA 02111-1307, USA.
*/
#include <string.h>
#include "gtktreeviewcolumn.h"
#include "gtktreeview.h"
#include "gtktreeprivate.h"
#include "gtksignal.h"
#include "gtkbutton.h"
#include "gtkalignment.h"
#include "gtklabel.h"
......@@ -28,7 +28,6 @@
#include "gtkmarshalers.h"
#include "gtkarrow.h"
#include "gtkintl.h"
#include <string.h>
enum
{
......@@ -128,10 +127,10 @@ static GtkObjectClass *parent_class = NULL;
static guint tree_column_signals[LAST_SIGNAL] = { 0 };
GtkType
GType
gtk_tree_view_column_get_type (void)
{
static GtkType tree_column_type = 0;
static GType tree_column_type = 0;
if (!tree_column_type)
{
......@@ -148,7 +147,9 @@ gtk_tree_view_column_get_type (void)
(GInstanceInitFunc) gtk_tree_view_column_init,
};
tree_column_type = g_type_register_static (GTK_TYPE_OBJECT, "GtkTreeViewColumn", &tree_column_info, 0);
tree_column_type =
g_type_register_static (GTK_TYPE_OBJECT, "GtkTreeViewColumn",
&tree_column_info, 0);
}
return tree_column_type;
......@@ -171,12 +172,12 @@ gtk_tree_view_column_class_init (GtkTreeViewColumnClass *class)
tree_column_signals[CLICKED] =
g_signal_new ("clicked",
GTK_CLASS_TYPE (object_class),
G_OBJECT_CLASS_TYPE (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkTreeViewColumnClass, clicked),
NULL, NULL,
_gtk_marshal_VOID__VOID,
GTK_TYPE_NONE, 0);
G_TYPE_NONE, 0);
g_object_class_install_property (object_class,
PROP_VISIBLE,
......@@ -348,7 +349,7 @@ gtk_tree_view_column_finalize (GObject *object)
d (info->func_data);
}
gtk_tree_view_column_clear_attributes_by_info (tree_column, info);
g_object_unref (G_OBJECT (info->cell));
g_object_unref (info->cell);
g_free (info);
}
......@@ -555,12 +556,12 @@ gtk_tree_view_column_create_button (GtkTreeViewColumn *tree_column)
gtk_widget_set_parent_window (tree_column->button, tree_view->priv->header_window);
gtk_widget_set_parent (tree_column->button, GTK_WIDGET (tree_view));
g_signal_connect (G_OBJECT (tree_column->button), "event",
g_signal_connect (tree_column->button, "event",
G_CALLBACK (gtk_tree_view_column_button_event),
(gpointer) tree_column);
g_signal_connect (G_OBJECT (tree_column->button), "clicked",
(GtkSignalFunc) gtk_tree_view_column_button_clicked,
(gpointer) tree_column);
tree_column);
g_signal_connect (tree_column->button, "clicked",
G_CALLBACK (gtk_tree_view_column_button_clicked),
tree_column);
tree_column->alignment = gtk_alignment_new (tree_column->xalign, 0.5, 0.0, 0.0);
......@@ -575,9 +576,9 @@ gtk_tree_view_column_create_button (GtkTreeViewColumn *tree_column)
gtk_widget_show (child);
}
g_signal_connect (G_OBJECT (child), "mnemonic_activate",
g_signal_connect (child, "mnemonic_activate",
G_CALLBACK (gtk_tree_view_column_mnemonic_activate),
(gpointer) tree_column);
tree_column);
if (tree_column->xalign <= 0.5)
gtk_box_pack_end (GTK_BOX (hbox), tree_column->arrow, FALSE, FALSE, 0);
......@@ -674,7 +675,7 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column)
* left otherwise; do this by packing boxes, so flipping text direction will
* reverse things
*/
gtk_widget_ref (arrow);
g_object_ref (arrow);
gtk_container_remove (GTK_CONTAINER (hbox), arrow);
if (tree_column->xalign <= 0.5)
......@@ -687,7 +688,7 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column)
/* move it to the front */
gtk_box_reorder_child (GTK_BOX (hbox), arrow, 0);
}
gtk_widget_unref (arrow);
g_object_unref (arrow);
if (tree_column->show_sort_indicator)
gtk_widget_show (arrow);
......@@ -814,7 +815,7 @@ gtk_tree_view_column_button_event (GtkWidget *widget,
static void
gtk_tree_view_column_button_clicked (GtkWidget *widget, gpointer data)
{
g_signal_emit_by_name (G_OBJECT (data), "clicked");
g_signal_emit_by_name (data, "clicked");
}
static gboolean
......@@ -928,9 +929,9 @@ gtk_tree_view_column_setup_sort_column_id_callback (GtkTreeViewColumn *tree_colu
if (tree_column->sort_column_changed_signal == 0)
tree_column->sort_column_changed_signal =
g_signal_connect (G_OBJECT (model), "sort_column_changed",
GTK_SIGNAL_FUNC (gtk_tree_view_model_sort_column_changed),
tree_column);
g_signal_connect (model, "sort_column_changed",
G_CALLBACK (gtk_tree_view_model_sort_column_changed),
tree_column);
if (gtk_tree_sortable_get_sort_column_id (GTK_TREE_SORTABLE (model),
&real_sort_column_id,
......@@ -1013,9 +1014,11 @@ _gtk_tree_view_column_unset_model (GtkTreeViewColumn *column,
GtkTreeModel *old_model)
{
if (column->sort_column_changed_signal)
g_signal_handler_disconnect (G_OBJECT (old_model),
column->sort_column_changed_signal);
column->sort_column_changed_signal = 0;
{
g_signal_handler_disconnect (old_model,
column->sort_column_changed_signal);
column->sort_column_changed_signal = 0;
}
}
void
......@@ -1028,9 +1031,9 @@ _gtk_tree_view_column_set_tree_view (GtkTreeViewColumn *column,
gtk_tree_view_column_create_button (column);
column->property_changed_signal =
g_signal_connect_swapped (GTK_OBJECT (tree_view),
g_signal_connect_swapped (tree_view,
"notify::model",
GTK_SIGNAL_FUNC (gtk_tree_view_column_setup_sort_column_id_callback),
G_CALLBACK (gtk_tree_view_column_setup_sort_column_id_callback),
column);
gtk_tree_view_column_setup_sort_column_id_callback (column);
......@@ -1045,13 +1048,13 @@ _gtk_tree_view_column_unset_tree_view (GtkTreeViewColumn *column)
}
if (column->property_changed_signal)
{
g_signal_handler_disconnect (G_OBJECT (column->tree_view), column->property_changed_signal);
g_signal_handler_disconnect (column->tree_view, column->property_changed_signal);
column->property_changed_signal = 0;
}
if (column->sort_column_changed_signal)
{
g_signal_handler_disconnect (G_OBJECT (gtk_tree_view_get_model (GTK_TREE_VIEW (column->tree_view))),
g_signal_handler_disconnect (gtk_tree_view_get_model (GTK_TREE_VIEW (column->tree_view)),
column->sort_column_changed_signal);
column->sort_column_changed_signal = 0;
}
......@@ -1138,7 +1141,7 @@ gtk_tree_view_column_new (void)
{
GtkTreeViewColumn *tree_column;
tree_column = GTK_TREE_VIEW_COLUMN (gtk_type_new (GTK_TYPE_TREE_VIEW_COLUMN));
tree_column = g_object_new (GTK_TYPE_TREE_VIEW_COLUMN, NULL);
return tree_column;
}
......@@ -1225,7 +1228,7 @@ gtk_tree_view_column_pack_start (GtkTreeViewColumn *tree_column,
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
g_return_if_fail (! gtk_tree_view_column_get_cell_info (tree_column, cell));
g_object_ref (G_OBJECT (cell));
g_object_ref (cell);
gtk_object_sink (GTK_OBJECT (cell));
cell_info = g_new0 (GtkTreeViewColumnCellInfo, 1);
......@@ -1259,7 +1262,7 @@ gtk_tree_view_column_pack_end (GtkTreeViewColumn *tree_column,
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
g_return_if_fail (! gtk_tree_view_column_get_cell_info (tree_column, cell));
g_object_ref (G_OBJECT (cell));
g_object_ref (cell);
gtk_object_sink (GTK_OBJECT (cell));
cell_info = g_new0 (GtkTreeViewColumnCellInfo, 1);
......@@ -1290,7 +1293,7 @@ gtk_tree_view_column_clear (GtkTreeViewColumn *tree_column)
GtkTreeViewColumnCellInfo *info = (GtkTreeViewColumnCellInfo *)list->data;
gtk_tree_view_column_clear_attributes (tree_column, info->cell);
g_object_unref (G_OBJECT (info->cell));
g_object_unref (info->cell);
g_free (info);
}
......@@ -1976,12 +1979,12 @@ gtk_tree_view_column_set_widget (GtkTreeViewColumn *tree_column,
if (widget)
{
gtk_object_ref (GTK_OBJECT (widget));
g_object_ref (widget);
gtk_object_sink (GTK_OBJECT (widget));
}
if (tree_column->child)
gtk_object_unref (GTK_OBJECT (tree_column->child));
g_object_unref (tree_column->child);
tree_column->child = widget;
gtk_tree_view_column_update_button (tree_column);
......@@ -2114,13 +2117,13 @@ gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
{
if (tree_column->sort_clicked_signal)
{
g_signal_handler_disconnect (G_OBJECT (tree_column), tree_column->sort_clicked_signal);
g_signal_handler_disconnect (tree_column, tree_column->sort_clicked_signal);
tree_column->sort_clicked_signal = 0;
}
if (tree_column->sort_column_changed_signal)
{
g_signal_handler_disconnect (G_OBJECT (tree_column), tree_column->sort_column_changed_signal);
g_signal_handler_disconnect (tree_column, tree_column->sort_column_changed_signal);
tree_column->sort_column_changed_signal = 0;
}
......@@ -2132,7 +2135,7 @@ gtk_tree_view_column_set_sort_column_id (GtkTreeViewColumn *tree_column,
gtk_tree_view_column_set_clickable (tree_column, TRUE);
if (! tree_column->sort_clicked_signal)
tree_column->sort_clicked_signal = g_signal_connect (G_OBJECT (tree_column),
tree_column->sort_clicked_signal = g_signal_connect (tree_column,
"clicked",
G_CALLBACK (gtk_tree_view_column_sort),
NULL);
......
......@@ -20,21 +20,24 @@
#ifndef __GTK_TREE_VIEW_COLUMN_H__
#define __GTK_TREE_VIEW_COLUMN_H__
#include <gtk/gtkobject.h>
#include <glib-object.h>
#include <gtk/gtkcellrenderer.h>
#include <gtk/gtktreemodel.h>
#include <gtk/gtktreesortable.h>
/* Not needed, retained for compatibility -Yosh */
#include <gtk/gtkobject.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define GTK_TYPE_TREE_VIEW_COLUMN (gtk_tree_view_column_get_type ())
#define GTK_TREE_VIEW_COLUMN(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE_VIEW_COLUMN, GtkTreeViewColumn))
#define GTK_TREE_VIEW_COLUMN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_VIEW_COLUMN, GtkTreeViewColumnClass))
#define GTK_IS_TREE_VIEW_COLUMN(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE_VIEW_COLUMN))
#define GTK_IS_TREE_VIEW_COLUMN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_VIEW_COLUMN))
#define GTK_TREE_VIEW_COLUMN_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_TREE_VIEW_COLUMN, GtkTreeViewColumnClass))
#define GTK_TREE_VIEW_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_VIEW_COLUMN, GtkTreeViewColumn))
#define GTK_TREE_VIEW_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_VIEW_COLUMN, GtkTreeViewColumnClass))
#define GTK_IS_TREE_VIEW_COLUMN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_VIEW_COLUMN))
#define GTK_IS_TREE_VIEW_COLUMN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_VIEW_COLUMN))
#define GTK_TREE_VIEW_COLUMN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_VIEW_COLUMN, GtkTreeViewColumnClass))
typedef enum
{
......@@ -116,7 +119,7 @@ struct _GtkTreeViewColumnClass
void (*_gtk_reserved4) (void);
};
GtkType gtk_tree_view_column_get_type (void);
GType gtk_tree_view_column_get_type (void);
GtkTreeViewColumn *gtk_tree_view_column_new (void);
GtkTreeViewColumn *gtk_tree_view_column_new_with_attributes (const gchar *title,
GtkCellRenderer *cell,
......