Gtk: use mnemonics in menu

This commit is contained in:
zvon 2020-04-01 15:55:37 +02:00
parent ae2c015fad
commit adf4a11874
4 changed files with 51 additions and 36 deletions

31
cs.po
View File

@ -53,6 +53,9 @@ msgstr "Je toto správný název seriálu?"
msgid "Insert the correct show name:" msgid "Insert the correct show name:"
msgstr "Zadejte správný název seriálu:" msgstr "Zadejte správný název seriálu:"
msgid "_Database"
msgstr "_Databáze"
msgid "Database" msgid "Database"
msgstr "Databáze" msgstr "Databáze"
@ -302,26 +305,26 @@ msgstr "Pole pro adresář je prázdné"
msgid "Rename confirmation" msgid "Rename confirmation"
msgstr "Potvrzení přejmenování" msgstr "Potvrzení přejmenování"
msgid "File" msgid "_File"
msgstr "Soubor" msgstr "_Soubor"
msgid "Exit" msgid "_Exit"
msgstr "Ukončit" msgstr "_Ukončit"
msgid "Update database" msgid "_Update database"
msgstr "Aktualizovat databázi" msgstr "_Aktualizovat databázi"
msgid "Refresh database" msgid "_Refresh database"
msgstr "Obnovit databázi" msgstr "_Obnovit databázi"
msgid "Clean database" msgid "_Clean database"
msgstr "Vyčistit databázi" msgstr "_Vyčistit databázi"
msgid "Manage database" msgid "_Manage database"
msgstr "Spravovat databázi" msgstr "_Spravovat databázi"
msgid "Change pattern" msgid "Change _pattern"
msgstr "Změnit vzor" msgstr "_Změnit vzor"
msgid "Process" msgid "Process"
msgstr "Zpracovat" msgstr "Zpracovat"

View File

@ -53,6 +53,9 @@ msgstr "Is this the right show name?"
msgid "Insert the correct show name:" msgid "Insert the correct show name:"
msgstr "Insert the correct show name:" msgstr "Insert the correct show name:"
msgid "_Database"
msgstr "_Database"
msgid "Database" msgid "Database"
msgstr "Database" msgstr "Database"
@ -302,26 +305,26 @@ msgstr "Directory field is empty"
msgid "Rename confirmation" msgid "Rename confirmation"
msgstr "Rename confirmation" msgstr "Rename confirmation"
msgid "File" msgid "_File"
msgstr "File" msgstr "_File"
msgid "Exit" msgid "_Exit"
msgstr "Exit" msgstr "_Exit"
msgid "Update database" msgid "_Update database"
msgstr "Update database" msgstr "_Update database"
msgid "Refresh database" msgid "_Refresh database"
msgstr "Refresh database" msgstr "_Refresh database"
msgid "Clean database" msgid "_Clean database"
msgstr "Clean database" msgstr "_Clean database"
msgid "Manage database" msgid "_Manage database"
msgstr "Manage database" msgstr "_Manage database"
msgid "Change pattern" msgid "Change _pattern"
msgstr "Change pattern" msgstr "Change _pattern"
msgid "Process" msgid "Process"
msgstr "Process" msgstr "Process"

View File

@ -245,6 +245,7 @@ MainWindow::MainWindow( const Glib::RefPtr< Gtk::Application > &ptr )
box->pack_start( *button_quit, false, true ); box->pack_start( *button_quit, false, true );
auto *item = new Gtk::MenuItem(); auto *item = new Gtk::MenuItem();
item->set_use_underline(true);
auto *submenu = new Gtk::Menu(); auto *submenu = new Gtk::Menu();
menu->append( *item ); menu->append( *item );
@ -255,6 +256,7 @@ MainWindow::MainWindow( const Glib::RefPtr< Gtk::Application > &ptr )
// Exit item for File menu // Exit item for File menu
item = new Gtk::MenuItem(); item = new Gtk::MenuItem();
item->set_use_underline(true);
item->set_label( _( EXIT ) ); item->set_label( _( EXIT ) );
item->signal_activate().connect( item->signal_activate().connect(
@ -264,6 +266,7 @@ MainWindow::MainWindow( const Glib::RefPtr< Gtk::Application > &ptr )
// Database menu // Database menu
item = new Gtk::MenuItem(); item = new Gtk::MenuItem();
item->set_use_underline(true);
submenu = new Gtk::Menu(); submenu = new Gtk::Menu();
item->set_label( _( DATABASE ) ); item->set_label( _( DATABASE ) );
@ -272,6 +275,7 @@ MainWindow::MainWindow( const Glib::RefPtr< Gtk::Application > &ptr )
// Update database // Update database
item = new Gtk::MenuItem(); item = new Gtk::MenuItem();
item->set_use_underline(true);
item->set_label( _( UPDATE_DB ) ); item->set_label( _( UPDATE_DB ) );
item->signal_activate().connect( item->signal_activate().connect(
sigc::mem_fun( *this, &MainWindow::dbUpdate ) ); sigc::mem_fun( *this, &MainWindow::dbUpdate ) );
@ -280,6 +284,7 @@ MainWindow::MainWindow( const Glib::RefPtr< Gtk::Application > &ptr )
// Refresh database // Refresh database
item = new Gtk::MenuItem(); item = new Gtk::MenuItem();
item->set_use_underline(true);
item->set_label( _( REFRESH_DB ) ); item->set_label( _( REFRESH_DB ) );
item->signal_activate().connect( item->signal_activate().connect(
sigc::mem_fun( *this, &MainWindow::dbRefresh ) ); sigc::mem_fun( *this, &MainWindow::dbRefresh ) );
@ -288,6 +293,7 @@ MainWindow::MainWindow( const Glib::RefPtr< Gtk::Application > &ptr )
// Clean database // Clean database
item = new Gtk::MenuItem(); item = new Gtk::MenuItem();
item->set_use_underline(true);
item->set_label( _( CLEAN_DB ) ); item->set_label( _( CLEAN_DB ) );
item->signal_activate().connect( item->signal_activate().connect(
sigc::mem_fun( *this, &MainWindow::dbClean ) ); sigc::mem_fun( *this, &MainWindow::dbClean ) );
@ -296,6 +302,7 @@ MainWindow::MainWindow( const Glib::RefPtr< Gtk::Application > &ptr )
// Manage database // Manage database
item = new Gtk::MenuItem(); item = new Gtk::MenuItem();
item->set_use_underline(true);
item->set_label( _( MANAGE_DB ) ); item->set_label( _( MANAGE_DB ) );
item->signal_activate().connect( item->signal_activate().connect(
sigc::mem_fun( *this, &MainWindow::dbManage ) ); sigc::mem_fun( *this, &MainWindow::dbManage ) );
@ -303,6 +310,7 @@ MainWindow::MainWindow( const Glib::RefPtr< Gtk::Application > &ptr )
submenu->append( *item ); submenu->append( *item );
item = new Gtk::MenuItem(); item = new Gtk::MenuItem();
item->set_use_underline(true);
item->set_label( _( CHANGE_DB_PATTERN ) ); item->set_label( _( CHANGE_DB_PATTERN ) );
item->signal_activate().connect( item->signal_activate().connect(
sigc::mem_fun( *this, &MainWindow::dbPattern ) ); sigc::mem_fun( *this, &MainWindow::dbPattern ) );

View File

@ -11,7 +11,8 @@
#define SHOW_CONFIRM "Is this the right show name?" #define SHOW_CONFIRM "Is this the right show name?"
#define SHOW_REENTER "Insert the correct show name:" #define SHOW_REENTER "Insert the correct show name:"
#define DATABASE "Database" #define DATABASE "_Database"
#define GUI_WINDOW_DATABASE "Database"
#define GUI_WINDOW_PROGRESS "Progress" #define GUI_WINDOW_PROGRESS "Progress"
#define GUI_WINDOW_SEARCH "Select show" #define GUI_WINDOW_SEARCH "Select show"
#define GUI_WINDOW_SEASON "Choose seasons" #define GUI_WINDOW_SEASON "Choose seasons"
@ -107,13 +108,13 @@
#define PATTERN_ESC_SEQ "Pattern escape sequences" #define PATTERN_ESC_SEQ "Pattern escape sequences"
#define DIR_EMPTY "Directory field is empty" #define DIR_EMPTY "Directory field is empty"
#define RENAME_CONFIRM "Rename confirmation" #define RENAME_CONFIRM "Rename confirmation"
#define ID_FILE "File" #define ID_FILE "_File"
#define EXIT "Exit" #define EXIT "_Exit"
#define UPDATE_DB "Update database" #define UPDATE_DB "_Update database"
#define REFRESH_DB "Refresh database" #define REFRESH_DB "_Refresh database"
#define CLEAN_DB "Clean database" #define CLEAN_DB "_Clean database"
#define MANAGE_DB "Manage database" #define MANAGE_DB "_Manage database"
#define CHANGE_DB_PATTERN "Change pattern" #define CHANGE_DB_PATTERN "Change _pattern"
#define PROCESS "Process" #define PROCESS "Process"
#define CHOOSE_DIR "Choose directory" #define CHOOSE_DIR "Choose directory"
#define PATTERN_HELP "Pattern help" #define PATTERN_HELP "Pattern help"