summaryrefslogtreecommitdiff
path: root/src/caja-location-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 /src/caja-location-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 'src/caja-location-entry.c')
-rw-r--r--src/caja-location-entry.c57
1 files changed, 30 insertions, 27 deletions
diff --git a/src/caja-location-entry.c b/src/caja-location-entry.c
index fac59e44..0a59a347 100644
--- a/src/caja-location-entry.c
+++ b/src/caja-location-entry.c
@@ -133,19 +133,19 @@ entry_would_have_inserted_characters (const GdkEventKey *event)
{
switch (event->keyval)
{
- case GDK_BackSpace:
- case GDK_Clear:
- case GDK_Insert:
- case GDK_Delete:
- case GDK_Home:
- case GDK_End:
- case GDK_KP_Home:
- case GDK_KP_End:
- case GDK_Left:
- case GDK_Right:
- case GDK_KP_Left:
- case GDK_KP_Right:
- case GDK_Return:
+ case GDK_KEY_BackSpace:
+ case GDK_KEY_Clear:
+ case GDK_KEY_Insert:
+ case GDK_KEY_Delete:
+ case GDK_KEY_Home:
+ case GDK_KEY_End:
+ case GDK_KEY_KP_Home:
+ case GDK_KEY_KP_End:
+ case GDK_KEY_Left:
+ case GDK_KEY_Right:
+ case GDK_KEY_KP_Left:
+ case GDK_KEY_KP_Right:
+ case GDK_KEY_Return:
return FALSE;
default:
if (event->keyval >= 0x20 && event->keyval <= 0xFF)
@@ -235,7 +235,7 @@ editable_event_after_callback (GtkEntry *entry,
* likely an auto-completion. We ignore shift / control since
* they can validly be used to extend the selection.
*/
- if ((keyevent->keyval == GDK_Right || keyevent->keyval == GDK_End) &&
+ if ((keyevent->keyval == GDK_KEY_Right || keyevent->keyval == GDK_KEY_End) &&
!(keyevent->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK)) &&
gtk_editable_get_selection_bounds (editable, NULL, NULL))
{
@@ -285,7 +285,11 @@ finalize (GObject *object)
}
static void
+#if GTK_CHECK_VERSION (3, 0, 0)
+destroy (GtkWidget *object)
+#else
destroy (GtkObject *object)
+#endif
{
CajaLocationEntry *entry;
@@ -301,7 +305,11 @@ destroy (GtkObject *object)
g_free (entry->details->current_directory);
entry->details->current_directory = NULL;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ EEL_CALL_PARENT (GTK_WIDGET_CLASS, destroy, (object));
+#else
EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object));
+#endif
}
static void
@@ -382,22 +390,17 @@ caja_location_entry_activate (GtkEntry *entry)
static void
caja_location_entry_class_init (CajaLocationEntryClass *class)
{
- GtkWidgetClass *widget_class;
- GObjectClass *gobject_class;
- GtkObjectClass *object_class;
- GtkEntryClass *entry_class;
+ GTK_WIDGET_CLASS (class)->focus_in_event = caja_location_entry_focus_in;
- widget_class = GTK_WIDGET_CLASS (class);
- widget_class->focus_in_event = caja_location_entry_focus_in;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ GTK_WIDGET_CLASS (class)->destroy = destroy;
+#else
+ GTK_OBJECT_CLASS (class)->destroy = destroy;
+#endif
- gobject_class = G_OBJECT_CLASS (class);
- gobject_class->finalize = finalize;
+ G_OBJECT_CLASS (class)->finalize = finalize;
- object_class = GTK_OBJECT_CLASS (class);
- object_class->destroy = destroy;
-
- entry_class = GTK_ENTRY_CLASS (class);
- entry_class->activate = caja_location_entry_activate;
+ GTK_ENTRY_CLASS (class)->activate = caja_location_entry_activate;
}
void