summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-entry.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-16 05:08:48 -0800
committerStefano Karapetsas <[email protected]>2012-11-16 05:08:48 -0800
commitdc66bc40724191f0068869773576dc4edf042c6f (patch)
tree74b9684feea188736b21f2c829f29befaaf2e9da /libcaja-private/caja-entry.c
parent935e1fed604f48e68d125d205c890a59f46f8f21 (diff)
parent1466df20591105550738a1d0784a623af9909abf (diff)
downloadcaja-dc66bc40724191f0068869773576dc4edf042c6f.tar.bz2
caja-dc66bc40724191f0068869773576dc4edf042c6f.tar.xz
Merge pull request #42 from jasmineaura/develop
Bring Caja up to speed, stage1
Diffstat (limited to 'libcaja-private/caja-entry.c')
-rw-r--r--libcaja-private/caja-entry.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libcaja-private/caja-entry.c b/libcaja-private/caja-entry.c
index 31b590c3..fb9ac38c 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)
@@ -123,7 +127,7 @@ caja_entry_key_press (GtkWidget *widget, GdkEventKey *event)
switch (event->keyval)
{
- case GDK_Tab:
+ case GDK_KEY_Tab:
/* The location bar entry wants TAB to work kind of
* like it does in the shell for command completion,
* so if we get a tab and there's a selection, we
@@ -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);
@@ -391,12 +395,10 @@ static void
caja_entry_class_init (CajaEntryClass *class)
{
GtkWidgetClass *widget_class;
- GtkObjectClass *object_class;
GObjectClass *gobject_class;
widget_class = GTK_WIDGET_CLASS (class);
gobject_class = G_OBJECT_CLASS (class);
- object_class = GTK_OBJECT_CLASS (class);
widget_class->button_press_event = caja_entry_button_press;
widget_class->button_release_event = caja_entry_button_release;
@@ -409,19 +411,17 @@ caja_entry_class_init (CajaEntryClass *class)
/* Set up signals */
signals[USER_CHANGED] = g_signal_new
("user_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (CajaEntryClass,
- user_changed),
+ G_STRUCT_OFFSET (CajaEntryClass, user_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[SELECTION_CHANGED] = g_signal_new
("selection_changed",
- G_TYPE_FROM_CLASS (object_class),
+ G_TYPE_FROM_CLASS (class),
G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (CajaEntryClass,
- selection_changed),
+ G_STRUCT_OFFSET (CajaEntryClass, selection_changed),
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);