diff options
author | Arik Devens <arik@src.gnome.org> | 2001-02-13 11:05:39 +0000 |
---|---|---|
committer | Arik Devens <arik@src.gnome.org> | 2001-02-13 11:05:39 +0000 |
commit | 25dcf28b44ff1d4bb0dce83270677d071cd1fa81 (patch) | |
tree | 0e4c1cf0b66afe5d1c9d5f17daa198906322e8bc /libnautilus-extensions/nautilus-entry.c | |
parent | f02bf5997c4f8a42974f3b0b8ae5ce656b66ff12 (diff) | |
download | nautilus-25dcf28b44ff1d4bb0dce83270677d071cd1fa81.tar.gz |
Fixed bugs 5837, 6463, 6478, and 6506 by making tilde support work alot better in nautilus.
Diffstat (limited to 'libnautilus-extensions/nautilus-entry.c')
-rw-r--r-- | libnautilus-extensions/nautilus-entry.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libnautilus-extensions/nautilus-entry.c b/libnautilus-extensions/nautilus-entry.c index 97e16d3b6..b7c227be7 100644 --- a/libnautilus-extensions/nautilus-entry.c +++ b/libnautilus-extensions/nautilus-entry.c @@ -124,6 +124,7 @@ nautilus_entry_initialize (NautilusEntry *entry) entry->user_edit = TRUE; entry->special_tab_handling = FALSE; entry->cursor_obscured = FALSE; + entry->expand_tilde = FALSE; /* Allow pointer motion events so we can expose an obscured cursor if necessary */ gtk_widget_set_events (widget, gtk_widget_get_events (widget) | GDK_POINTER_MOTION_MASK); @@ -159,7 +160,6 @@ nautilus_entry_destroy (GtkObject *object) NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object)); } - static void obscure_cursor (NautilusEntry *entry) { @@ -210,6 +210,14 @@ nautilus_entry_key_press (GtkWidget *widget, GdkEventKey *event) */ gtk_widget_activate (widget); return TRUE; + + case GDK_slash: + if (entry->expand_tilde) { + if (g_strcasecmp (gtk_entry_get_text (GTK_ENTRY (entry)), "~") == 0) { + gtk_entry_set_text (GTK_ENTRY (entry), g_get_home_dir ()); + } + } + break; default: break; |