Replace GtkObject with Gobject in gtk+2 build
This commit is contained in:
@@ -120,20 +120,12 @@ pluma_history_entry_get_property (GObject *object,
|
||||
}
|
||||
|
||||
static void
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
pluma_history_entry_dispose (GObject *object)
|
||||
#else
|
||||
pluma_history_entry_destroy (GtkObject *object)
|
||||
#endif
|
||||
{
|
||||
pluma_history_entry_set_enable_completion (PLUMA_HISTORY_ENTRY (object),
|
||||
FALSE);
|
||||
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
G_OBJECT_CLASS (pluma_history_entry_parent_class)->dispose (object);
|
||||
#else
|
||||
GTK_OBJECT_CLASS (pluma_history_entry_parent_class)->destroy (object);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -158,18 +150,11 @@ static void
|
||||
pluma_history_entry_class_init (PlumaHistoryEntryClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
#if !GTK_CHECK_VERSION (3, 0, 0)
|
||||
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
|
||||
#endif
|
||||
|
||||
object_class->set_property = pluma_history_entry_set_property;
|
||||
object_class->get_property = pluma_history_entry_get_property;
|
||||
object_class->finalize = pluma_history_entry_finalize;
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
object_class->dispose = pluma_history_entry_dispose;
|
||||
#else
|
||||
gtkobject_class->destroy = pluma_history_entry_destroy;
|
||||
#endif
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_HISTORY_ID,
|
||||
|
@@ -100,11 +100,7 @@ enum
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static void
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
pluma_notebook_dispose (GObject *object)
|
||||
#else
|
||||
pluma_notebook_destroy (GtkObject *object)
|
||||
#endif
|
||||
{
|
||||
PlumaNotebook *notebook = PLUMA_NOTEBOOK (object);
|
||||
|
||||
@@ -124,28 +120,17 @@ pluma_notebook_destroy (GtkObject *object)
|
||||
notebook->priv->destroy_has_run = TRUE;
|
||||
}
|
||||
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
G_OBJECT_CLASS (pluma_notebook_parent_class)->dispose (object);
|
||||
#else
|
||||
GTK_OBJECT_CLASS (pluma_notebook_parent_class)->destroy (object);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
pluma_notebook_class_init (PlumaNotebookClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
#if !GTK_CHECK_VERSION (3, 0, 0)
|
||||
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
|
||||
#endif
|
||||
GtkNotebookClass *notebook_class = GTK_NOTEBOOK_CLASS (klass);
|
||||
|
||||
object_class->finalize = pluma_notebook_finalize;
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
object_class->dispose = pluma_notebook_dispose;
|
||||
#else
|
||||
gtkobject_class->destroy = pluma_notebook_destroy;
|
||||
#endif
|
||||
|
||||
notebook_class->change_current_page = pluma_notebook_change_current_page;
|
||||
|
||||
@@ -261,13 +246,6 @@ find_tab_num_at_pos (PlumaNotebook *notebook,
|
||||
|
||||
tab_pos = gtk_notebook_get_tab_pos (GTK_NOTEBOOK (notebook));
|
||||
|
||||
#if !GTK_CHECK_VERSION (3, 0, 0)
|
||||
if (GTK_NOTEBOOK (notebook)->first_tab == NULL)
|
||||
{
|
||||
return AFTER_ALL_TABS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* For some reason unfullscreen + quick click can
|
||||
cause a wrong click event to be reported to the tab */
|
||||
if (!is_in_notebook_window (notebook, abs_x, abs_y))
|
||||
@@ -689,11 +667,7 @@ pluma_notebook_new (void)
|
||||
|
||||
static void
|
||||
pluma_notebook_switch_page_cb (GtkNotebook *notebook,
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
GtkWidget *page,
|
||||
#else
|
||||
GtkNotebookPage *page,
|
||||
#endif
|
||||
guint page_num,
|
||||
gpointer data)
|
||||
{
|
||||
|
@@ -108,11 +108,7 @@ struct _PlumaViewPrivate
|
||||
/* The search entry completion is shared among all the views */
|
||||
GtkListStore *search_completion_model = NULL;
|
||||
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
static void pluma_view_dispose (GObject *object);
|
||||
#else
|
||||
static void pluma_view_destroy (GtkObject *object);
|
||||
#endif
|
||||
static void pluma_view_finalize (GObject *object);
|
||||
static gint pluma_view_focus_out (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
@@ -198,19 +194,12 @@ static void
|
||||
pluma_view_class_init (PlumaViewClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
#if !GTK_CHECK_VERSION (3, 0, 0)
|
||||
GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
|
||||
#endif
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
GtkTextViewClass *text_view_class = GTK_TEXT_VIEW_CLASS (klass);
|
||||
|
||||
GtkBindingSet *binding_set;
|
||||
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
object_class->dispose = pluma_view_dispose;
|
||||
#else
|
||||
gtkobject_class->destroy = pluma_view_destroy;
|
||||
#endif
|
||||
object_class->finalize = pluma_view_finalize;
|
||||
|
||||
widget_class->focus_out_event = pluma_view_focus_out;
|
||||
@@ -419,11 +408,7 @@ pluma_view_init (PlumaView *view)
|
||||
}
|
||||
|
||||
static void
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
pluma_view_dispose (GObject *object)
|
||||
#else
|
||||
pluma_view_destroy (GtkObject *object)
|
||||
#endif
|
||||
{
|
||||
PlumaView *view;
|
||||
|
||||
@@ -448,11 +433,7 @@ pluma_view_destroy (GtkObject *object)
|
||||
current_buffer_removed (view);
|
||||
g_signal_handlers_disconnect_by_func (view, on_notify_buffer_cb, NULL);
|
||||
|
||||
#if GTK_CHECK_VERSION (3, 0, 0)
|
||||
(* G_OBJECT_CLASS (pluma_view_parent_class)->dispose) (object);
|
||||
#else
|
||||
(* GTK_OBJECT_CLASS (pluma_view_parent_class)->destroy) (object);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user