summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-05 13:56:30 +0200
committerJasmine Hassan <[email protected]>2012-11-16 09:45:50 +0200
commit42e70735c78d12d88ff9ec2d1c44d3edbadd29b5 (patch)
tree4910af372ad75a44ef05503d5a56492835ad6fce
parent40cd5a93ced42275631a3d86ad68219aa73cb7a3 (diff)
downloadcaja-42e70735c78d12d88ff9ec2d1c44d3edbadd29b5.tar.bz2
caja-42e70735c78d12d88ff9ec2d1c44d3edbadd29b5.tar.xz
[editable-label|entry] use GtkEditableClass on GTK2, GtkEditableInterface on GTK3
editable-label: rename GtkEditableClass->GtkEditableInterface http://git.gnome.org/browse/nautilus/commit/?id=a58bbde4ca6b11eeb1bca5fa4e62e60c0b26271b entry: rename GtkEditableClass->GtkEditableInterface http://git.gnome.org/browse/nautilus/commit/?id=aeb53075ed55dc2a2ef3228917ded1b8029bfdff
-rw-r--r--eel/eel-editable-label.c5
-rw-r--r--libcaja-private/caja-entry.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/eel/eel-editable-label.c b/eel/eel-editable-label.c
index 50329345..08128009 100644
--- a/eel/eel-editable-label.c
+++ b/eel/eel-editable-label.c
@@ -41,6 +41,7 @@
#if !GTK_CHECK_VERSION (3, 0, 0)
#define cairo_region_t GdkRegion
#define cairo_region_destroy gdk_region_destroy
+#define GtkEditableInterface GtkEditableClass
#endif
enum
@@ -67,7 +68,7 @@ enum
static guint signals[LAST_SIGNAL] = { 0 };
-static void eel_editable_label_editable_init (GtkEditableClass *iface);
+static void eel_editable_label_editable_init (GtkEditableInterface *iface);
static void eel_editable_label_class_init (EelEditableLabelClass *klass);
static void eel_editable_label_init (EelEditableLabel *label);
static void eel_editable_label_set_property (GObject *object,
@@ -514,7 +515,7 @@ eel_editable_label_class_init (EelEditableLabelClass *class)
}
static void
-eel_editable_label_editable_init (GtkEditableClass *iface)
+eel_editable_label_editable_init (GtkEditableInterface *iface)
{
iface->do_insert_text = editable_insert_text_emit;
iface->do_delete_text = editable_delete_text_emit;
diff --git a/libcaja-private/caja-entry.c b/libcaja-private/caja-entry.c
index 31b590c3..fa3669eb 100644
--- a/libcaja-private/caja-entry.c
+++ b/libcaja-private/caja-entry.c
@@ -35,6 +35,10 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
+#if !GTK_CHECK_VERSION(3, 0, 0)
+#define GtkEditableInterface GtkEditableClass
+#endif
+
struct CajaEntryDetails
{
gboolean user_edit;
@@ -51,13 +55,13 @@ enum
};
static guint signals[LAST_SIGNAL];
-static void caja_entry_editable_init (GtkEditableClass *iface);
+static void caja_entry_editable_init (GtkEditableInterface *iface);
G_DEFINE_TYPE_WITH_CODE (CajaEntry, caja_entry, GTK_TYPE_ENTRY,
G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE,
caja_entry_editable_init));
-static GtkEditableClass *parent_editable_interface = NULL;
+static GtkEditableInterface *parent_editable_interface = NULL;
static void
caja_entry_init (CajaEntry *entry)
@@ -373,7 +377,7 @@ caja_entry_selection_clear (GtkWidget *widget,
}
static void
-caja_entry_editable_init (GtkEditableClass *iface)
+caja_entry_editable_init (GtkEditableInterface *iface)
{
parent_editable_interface = g_type_interface_peek_parent (iface);