summaryrefslogtreecommitdiff
path: root/src/nautilus-location-dialog.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2005-10-18 14:22:54 +0000
committerAlexander Larsson <alexl@src.gnome.org>2005-10-18 14:22:54 +0000
commit675ad5e9c0fb6ddfa214eec648201257482d892f (patch)
tree3c4767a665206bb63bb21979211802ee80498c7c /src/nautilus-location-dialog.c
parent627737fb1723927509f38f302ef3fdf2a067c74b (diff)
downloadnautilus-675ad5e9c0fb6ddfa214eec648201257482d892f.tar.gz
Don't send slash to typeahead
2005-10-18 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-icon-container.c: (key_press_event): Don't send slash to typeahead * src/nautilus-location-dialog.[ch]: Add nautilus_location_dialog_set_location. * src/nautilus-navigation-window-menus.c: * src/nautilus-navigation-window.c: * src/nautilus-spatial-window.c: * src/nautilus-window.[ch]: Open location dialog/entry when you press '/'.
Diffstat (limited to 'src/nautilus-location-dialog.c')
-rw-r--r--src/nautilus-location-dialog.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nautilus-location-dialog.c b/src/nautilus-location-dialog.c
index a764953c3..6f6512e1a 100644
--- a/src/nautilus-location-dialog.c
+++ b/src/nautilus-location-dialog.c
@@ -201,7 +201,7 @@ nautilus_location_dialog_new (NautilusWindow *window)
location = nautilus_window_get_location (window);
if (location != NULL) {
- if(NAUTILUS_IS_DESKTOP_WINDOW (window)) {
+ if (NAUTILUS_IS_DESKTOP_WINDOW (window)) {
formatted_location = nautilus_get_desktop_directory ();
} else {
formatted_location = eel_format_uri_for_display (location);
@@ -212,6 +212,17 @@ nautilus_location_dialog_new (NautilusWindow *window)
g_free (formatted_location);
g_free (location);
}
+
+ gtk_widget_grab_focus (NAUTILUS_LOCATION_DIALOG (dialog)->details->entry);
return dialog;
}
+
+void
+nautilus_location_dialog_set_location (NautilusLocationDialog *dialog,
+ const char *location)
+{
+ nautilus_entry_set_text (NAUTILUS_ENTRY (NAUTILUS_LOCATION_DIALOG (dialog)->details->entry), location);
+ gtk_editable_select_region (GTK_EDITABLE (NAUTILUS_LOCATION_DIALOG (dialog)->details->entry), 0, 0);
+ gtk_editable_set_position (GTK_EDITABLE (NAUTILUS_LOCATION_DIALOG (dialog)->details->entry), -1);
+}