Make F2 work for renaming bookmarks. (#320822, Jaap A. Haitsma, patch by

2005-11-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c (shortcuts_key_press_event_cb): Make
	F2 work for renaming bookmarks.  (#320822, Jaap A. Haitsma, patch
	by Paolo Borelli)
This commit is contained in:
Matthias Clasen 2005-11-28 14:03:20 +00:00 committed by Matthias Clasen
parent 2aadb2dff2
commit 9228dcee29
3 changed files with 28 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-11-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (shortcuts_key_press_event_cb): Make
F2 work for renaming bookmarks. (#320822, Jaap A. Haitsma, patch
by Paolo Borelli)
2005-11-28 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):

View File

@ -1,3 +1,9 @@
2005-11-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (shortcuts_key_press_event_cb): Make
F2 work for renaming bookmarks. (#320822, Jaap A. Haitsma, patch
by Paolo Borelli)
2005-11-28 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkwindow-win32.c (gdk_window_set_urgency_hint):

View File

@ -2962,9 +2962,9 @@ remove_shortcut_cb (GtkMenuItem *item,
remove_selected_bookmarks (impl);
}
/* Rename the selected bookmark */
static void
rename_shortcut_cb (GtkMenuItem *item,
GtkFileChooserDefault *impl)
rename_selected_bookmark (GtkFileChooserDefault *impl)
{
GtkTreeIter iter;
GtkTreePath *path;
@ -2986,6 +2986,13 @@ rename_shortcut_cb (GtkMenuItem *item,
}
}
static void
rename_shortcut_cb (GtkMenuItem *item,
GtkFileChooserDefault *impl)
{
rename_selected_bookmark (impl);
}
/* Constructs the popup menu for the file list if needed */
static void
shortcuts_build_popup_menu (GtkFileChooserDefault *impl)
@ -6789,6 +6796,13 @@ shortcuts_key_press_event_cb (GtkWidget *widget,
return TRUE;
}
if ((event->keyval == GDK_F2)
&& (event->state & modifiers) == 0)
{
rename_selected_bookmark (impl);
return TRUE;
}
return FALSE;
}