# HG changeset patch # User masneyb # Date 1154181075 0 # Node ID 96ce71cd7bf5eeaee729d22578394455e8205b22 # Parent b0e277040f829aabe876724144161267b5e92051 2006-7-29 Brian Masney * src/gtk/bookmarks.c (edit_bookmarks) - fixed the keybindings in the bookmarks dialog. Also added mnemonics to all of the entries. (closes #329820) * src/gtk/gftp-gtk.c (CreateMenus) - added keybindings to most of the entries in the local and remote menus. Also added mnemonics to all of the entries. diff -r b0e277040f82 -r 96ce71cd7bf5 ChangeLog --- a/ChangeLog Fri Jul 28 18:46:18 2006 +0000 +++ b/ChangeLog Sat Jul 29 13:51:15 2006 +0000 @@ -1,6 +1,15 @@ +2006-7-29 Brian Masney + * src/gtk/bookmarks.c (edit_bookmarks) - fixed the keybindings in the + bookmarks dialog. Also added mnemonics to all of the entries. + (closes #329820) + + * src/gtk/gftp-gtk.c (CreateMenus) - added keybindings to most of the + entries in the local and remote menus. Also added mnemonics to all of + the entries. + 2006-7-28 Brian Masney * src/gtk/gftp-gtk.h src/gtk/gftp-gtk.c - remember the last protocol - that was used in the toolbar + that was used in the toolbar (closes #314330) * src/gtk/gftp-gtk.c src/gtk/gftp-gtk.h src/gtk/misc-gtk.c - warning fixes when creating the system menus. Removed some unused global @@ -3504,7 +3513,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.459 2006/07/28 11:51:09 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.460 2006/07/29 13:51:12 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r b0e277040f82 -r 96ce71cd7bf5 src/gtk/bookmarks.c --- a/src/gtk/bookmarks.c Fri Jul 28 18:46:18 2006 +0000 +++ b/src/gtk/bookmarks.c Sat Jul 29 13:51:15 2006 +0000 @@ -1212,17 +1212,18 @@ void edit_bookmarks (gpointer data) { + GtkAccelGroup * accel_group; GtkItemFactory * ifactory; GtkWidget * scroll; GtkItemFactoryEntry menu_items[] = { {N_("/_File"), NULL, 0, 0, MN_("")}, {N_("/File/tearoff"), NULL, 0, 0, MN_("")}, - {N_("/File/New Folder..."), NULL, new_folder_entry, 0, MN_(NULL)}, - {N_("/File/New Item..."), NULL, new_item_entry, 0, MS_(GTK_STOCK_NEW)}, - {N_("/File/Delete"), NULL, delete_entry, 0, MS_(GTK_STOCK_DELETE)}, - {N_("/File/Properties..."), NULL, edit_entry, 0, MS_(GTK_STOCK_PROPERTIES)}, + {N_("/File/New _Folder..."), NULL, new_folder_entry, 0, MN_(NULL)}, + {N_("/File/New _Item..."), NULL, new_item_entry, 0, MS_(GTK_STOCK_NEW)}, + {N_("/File/_Delete"), NULL, delete_entry, 0, MS_(GTK_STOCK_DELETE)}, + {N_("/File/_Properties..."), NULL, edit_entry, 0, MS_(GTK_STOCK_PROPERTIES)}, {N_("/File/sep"), NULL, 0, 0, MN_("")}, - {N_("/File/Close"), NULL, gtk_widget_destroy, 0, MS_(GTK_STOCK_CLOSE)} + {N_("/File/_Close"), NULL, gtk_widget_destroy, 0, MS_(GTK_STOCK_CLOSE)} }; #if GTK_MAJOR_VERSION == 1 GtkWidget * tempwid; @@ -1263,7 +1264,9 @@ gdk_window_set_icon_name (edit_bookmarks_dialog->window, gftp_version); } - ifactory = item_factory_new (GTK_TYPE_MENU_BAR, "", NULL, NULL); + accel_group = gtk_accel_group_new (); + ifactory = item_factory_new (GTK_TYPE_MENU_BAR, "", accel_group, + NULL); create_item_factory (ifactory, 7, menu_items, NULL); create_item_factory (ifactory, 1, menu_items + 7, edit_bookmarks_dialog); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (edit_bookmarks_dialog)->vbox), @@ -1284,6 +1287,8 @@ create_item_factory (edit_factory, 6, menu_items + 2, edit_bookmarks_dialog); + gtk_window_add_accel_group (GTK_WINDOW (edit_bookmarks_dialog), accel_group); + tree = gtk_ctree_new (1, 0); gtk_clist_set_selection_mode (GTK_CLIST (tree), GTK_SELECTION_BROWSE); gtk_clist_set_reorderable (GTK_CLIST (tree), 1); diff -r b0e277040f82 -r 96ce71cd7bf5 src/gtk/gftp-gtk.c --- a/src/gtk/gftp-gtk.c Fri Jul 28 18:46:18 2006 +0000 +++ b/src/gtk/gftp-gtk.c Sat Jul 29 13:51:15 2006 +0000 @@ -242,20 +242,20 @@ CreateMenus (GtkWidget * parent) { int local_len, remote_len, len, i, trans_len, log_len, tools_len, log_start; - GtkAccelGroup *accel_group; + GtkAccelGroup * accel_group; intptr_t ascii_transfers; GtkWidget * tempwid; static GtkItemFactoryEntry menu_items[] = { {N_("/_FTP"), NULL, 0, 0, MN_("")}, {N_("/FTP/tearoff"), NULL, 0, 0, MN_("")}, - {N_("/FTP/Window _1"), NULL, change_setting, GFTP_MENU_ITEM_WIN1, + {N_("/FTP/Window _1"), "1", change_setting, GFTP_MENU_ITEM_WIN1, MN_("")}, - {N_("/FTP/Window _2"), NULL, change_setting, GFTP_MENU_ITEM_WIN2, + {N_("/FTP/Window _2"), "2", change_setting, GFTP_MENU_ITEM_WIN2, MN_("/FTP/Window 1")}, {N_("/FTP/sep"), NULL, 0, 0, MN_("")}, - {N_("/FTP/Ascii"), NULL, change_setting, GFTP_MENU_ITEM_ASCII, + {N_("/FTP/_Ascii"), NULL, change_setting, GFTP_MENU_ITEM_ASCII, MN_("")}, - {N_("/FTP/Binary"), NULL, change_setting, GFTP_MENU_ITEM_BINARY, + {N_("/FTP/_Binary"), NULL, change_setting, GFTP_MENU_ITEM_BINARY, MN_("/FTP/Ascii")}, {N_("/FTP/sep"), NULL, 0, 0, MN_("")}, {N_("/FTP/_Preferences..."), NULL, options_dialog, 0, @@ -264,48 +264,58 @@ {N_("/FTP/_Quit"), "Q", _gftp_menu_exit, 0, MS_(GTK_STOCK_QUIT)}, {N_("/_Local"), NULL, 0, 0, MN_("")}, {N_("/Local/tearoff"), NULL, 0, 0, MN_("")}, - {N_("/Local/Open Location..."), "", openurl_dialog, 0, MS_(GTK_STOCK_OPEN)}, - {N_("/Local/_Disconnect"), "", gftpui_disconnect, 0, MS_(GTK_STOCK_CLOSE)}, + {N_("/Local/_Open Location..."), "O", openurl_dialog, 0, + MS_(GTK_STOCK_OPEN)}, + {N_("/Local/D_isconnect"), "I", gftpui_disconnect, 0, MS_(GTK_STOCK_CLOSE)}, {N_("/Local/sep"), NULL, 0, 0, MN_("")}, - {N_("/Local/Change Filespec..."), NULL, change_filespec, 0, MN_(NULL)}, + {N_("/Local/Change _Filespec..."), "F", change_filespec, 0, + MN_(NULL)}, {N_("/Local/_Show selected"), NULL, show_selected, 0, MN_(NULL)}, - {N_("/Local/Select _All"), NULL, selectall, 0, MN_(NULL)}, + {N_("/Local/Select _All"), "A", selectall, 0, MN_(NULL)}, {N_("/Local/Select All Files"), NULL, selectallfiles, 0, MN_(NULL)}, {N_("/Local/Deselect All"), NULL, deselectall, 0, MN_(NULL)}, {N_("/Local/sep"), NULL, 0, 0, MN_("")}, {N_("/Local/Save Directory Listing..."), NULL, save_directory_listing, 0, MN_(NULL)}, {N_("/Local/Send SITE Command..."), NULL, gftpui_site_dialog, 0, MN_(NULL)}, - {N_("/Local/Change Directory"), NULL, gftpui_chdir_dialog, 0, MN_(NULL)}, - {N_("/Local/_Permissions..."), NULL, chmod_dialog, 0, MN_(NULL)}, + {N_("/Local/_Change Directory"), NULL, gftpui_chdir_dialog, 0, MN_(NULL)}, + {N_("/Local/_Permissions..."), "P", chmod_dialog, 0, + MN_(NULL)}, {N_("/Local/_New Folder..."), "N", gftpui_mkdir_dialog, 0, MN_(NULL)}, - {N_("/Local/Re_name..."), "F2", gftpui_rename_dialog, 0, MN_(NULL)}, - {N_("/Local/Delete..."), NULL, delete_dialog, 0, MN_(NULL)}, - {N_("/Local/_Edit..."), NULL, edit_dialog, 0, MN_(NULL)}, - {N_("/Local/_View..."), NULL, view_dialog, 0, MN_(NULL)}, - {N_("/Local/_Refresh"), NULL, gftp_gtk_refresh, 0, MS_(GTK_STOCK_REFRESH)}, + {N_("/Local/Rena_me..."), "M", gftpui_rename_dialog, 0, + MN_(NULL)}, + {N_("/Local/_Delete..."), "D", delete_dialog, 0, + MN_(NULL)}, + {N_("/Local/_Edit..."), "E", edit_dialog, 0, MN_(NULL)}, + {N_("/Local/_View..."), "V", view_dialog, 0, MN_(NULL)}, + {N_("/Local/_Refresh"), "R", gftp_gtk_refresh, 0, + MS_(GTK_STOCK_REFRESH)}, {N_("/_Remote"), NULL, 0, 0, MN_("")}, {N_("/Remote/tearoff"), NULL, 0, 0, MN_("")}, {N_("/Remote/_Open Location..."), "O", openurl_dialog, 0, MS_(GTK_STOCK_OPEN)}, - {N_("/Remote/_Disconnect"), "D", gftpui_disconnect, 0, + {N_("/Remote/D_isconnect"), "D", gftpui_disconnect, 0, MS_(GTK_STOCK_CLOSE)}, {N_("/Remote/sep"), NULL, 0, 0, MN_("")}, - {N_("/Remote/Change Filespec..."), NULL, change_filespec, 0, MN_(NULL)}, + {N_("/Remote/Change _Filespec..."), "F", change_filespec, 0, + MN_(NULL)}, {N_("/Remote/_Show selected"), NULL, show_selected, 0, MN_(NULL)}, - {N_("/Remote/Select _All"), NULL, selectall, 0, MN_(NULL)}, + {N_("/Remote/Select _All"), "A", selectall, 0, MN_(NULL)}, {N_("/Remote/Select All Files"), NULL, selectallfiles, 0, MN_(NULL)}, {N_("/Remote/Deselect All"), NULL, deselectall, 0, MN_(NULL)}, {N_("/Remote/sep"), NULL, 0, 0, MN_("")}, {N_("/Remote/Save Directory Listing..."), NULL, save_directory_listing, 0, MN_(NULL)}, {N_("/Remote/Send SITE Command..."), NULL, gftpui_site_dialog, 0, MN_(NULL)}, - {N_("/Remote/Change Directory"), NULL, gftpui_chdir_dialog, 0, MN_(NULL)}, - {N_("/Remote/_Permisssions..."), NULL, chmod_dialog, 0, MN_(NULL)}, - {N_("/Remote/_New Folder..."), NULL, gftpui_mkdir_dialog, 0, MN_(NULL)}, - {N_("/Remote/Re_name..."), NULL, gftpui_rename_dialog, 0, MN_(NULL)}, - {N_("/Remote/Delete..."), NULL, delete_dialog, 0, MN_(NULL)}, - {N_("/Remote/_Edit..."), NULL, edit_dialog, 0, MN_(NULL)}, - {N_("/Remote/_View..."), NULL, view_dialog, 0, MN_(NULL)}, - {N_("/Remote/_Refresh"), NULL, gftp_gtk_refresh, 0, MS_(GTK_STOCK_REFRESH)}, + {N_("/Remote/_Change Directory"), NULL, gftpui_chdir_dialog, 0, MN_(NULL)}, + {N_("/Remote/_Permisssions..."), "P", chmod_dialog, 0, MN_(NULL)}, + {N_("/Remote/_New Folder..."), "N", gftpui_mkdir_dialog, 0, + MN_(NULL)}, + {N_("/Remote/Rena_me..."), "M", gftpui_rename_dialog, 0, + MN_(NULL)}, + {N_("/Remote/_Delete..."), "D", delete_dialog, 0, MN_(NULL)}, + {N_("/Remote/_Edit..."), "E", edit_dialog, 0, MN_(NULL)}, + {N_("/Remote/_View..."), "V", view_dialog, 0, MN_(NULL)}, + {N_("/Remote/_Refresh"), "R", gftp_gtk_refresh, 0, + MS_(GTK_STOCK_REFRESH)}, {N_("/_Bookmarks"), NULL, 0, 0, MN_("")}, {N_("/Bookmarks/tearoff"), NULL, 0, 0, MN_("")}, {N_("/Bookmarks/Add _Bookmark"), "B", add_bookmark, 0, @@ -314,20 +324,20 @@ {N_("/Bookmarks/sep"), NULL, 0, 0, MN_("")}, {N_("/_Transfer"), NULL, 0, 0, MN_("")}, {N_("/Transfer/tearoff"), NULL, 0, 0, MN_("")}, - {N_("/Transfer/Start"), NULL, start_transfer, 0, MN_(NULL)}, - {N_("/Transfer/Stop"), NULL, stop_transfer, 0, + {N_("/Transfer/_Start"), NULL, start_transfer, 0, MN_(NULL)}, + {N_("/Transfer/St_op"), NULL, stop_transfer, 0, MS_(GTK_STOCK_STOP)}, {N_("/Transfer/sep"), NULL, 0, 0, MN_("")}, - {N_("/Transfer/Skip Current File"), NULL, skip_transfer, 0, MN_(NULL)}, - {N_("/Transfer/Remove File"), NULL, remove_file_transfer, 0, + {N_("/Transfer/Skip _Current File"), NULL, skip_transfer, 0, MN_(NULL)}, + {N_("/Transfer/_Remove File"), NULL, remove_file_transfer, 0, MS_(GTK_STOCK_DELETE)}, - {N_("/Transfer/Move File Up"), NULL, move_transfer_up, 0, + {N_("/Transfer/Move File _Up"), NULL, move_transfer_up, 0, MS_(GTK_STOCK_GO_UP)}, - {N_("/Transfer/Move File Down"), NULL, move_transfer_down, 0, + {N_("/Transfer/Move File _Down"), NULL, move_transfer_down, 0, MS_(GTK_STOCK_GO_DOWN)}, {N_("/Transfer/sep"), NULL, 0, 0, MN_("")}, - {N_("/Transfer/Retrieve Files"), "R", get_files, 0, MN_(NULL)}, - {N_("/Transfer/Put Files"), "P", put_files, 0, MN_(NULL)}, + {N_("/Transfer/_Retrieve Files"), "R", get_files, 0, MN_(NULL)}, + {N_("/Transfer/_Put Files"), "P", put_files, 0, MN_(NULL)}, {N_("/L_og"), NULL, 0, 0, MN_("")}, {N_("/Log/tearoff"), NULL, 0, 0, MN_("")}, {N_("/Log/_Clear"), NULL, clearlog, 0, MS_(GTK_STOCK_CLEAR)},