diff options
author | Stefano Karapetsas <[email protected]> | 2013-10-30 00:56:56 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-10-30 00:56:56 +0100 |
commit | 7f0ccea48196a0da9523db3d566ee8020cd742a1 (patch) | |
tree | 4a66f87edcc70ca3949c750148df218c9a41ba28 /pluma/pluma-history-entry.c | |
parent | 5f87f646777bf5b09610bbc6eed8fafd007f34c6 (diff) | |
download | pluma-7f0ccea48196a0da9523db3d566ee8020cd742a1.tar.bz2 pluma-7f0ccea48196a0da9523db3d566ee8020cd742a1.tar.xz |
pluma: Add GTK3 support
Diffstat (limited to 'pluma/pluma-history-entry.c')
-rw-r--r-- | pluma/pluma-history-entry.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pluma/pluma-history-entry.c b/pluma/pluma-history-entry.c index 0511553f..bb772594 100644 --- a/pluma/pluma-history-entry.c +++ b/pluma/pluma-history-entry.c @@ -64,7 +64,11 @@ struct _PlumaHistoryEntryPrivate GSettings *settings; }; +#if GTK_CHECK_VERSION (3, 0, 0) +G_DEFINE_TYPE(PlumaHistoryEntry, pluma_history_entry, GTK_TYPE_COMBO_BOX_TEXT) +#else G_DEFINE_TYPE(PlumaHistoryEntry, pluma_history_entry, GTK_TYPE_COMBO_BOX_ENTRY) +#endif static void pluma_history_entry_set_property (GObject *object, @@ -116,12 +120,20 @@ 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 @@ -146,12 +158,18 @@ 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, |