Added Ctrl+s keyboard shortcut to start/stop the queue when the Queue tab is focused. Issue 2822

This commit is contained in:
DrSlony 2015-06-28 13:44:05 +02:00
parent 90229e99f6
commit 4b0e8e94cc
2 changed files with 17 additions and 5 deletions

View File

@ -181,9 +181,9 @@ FILEBROWSER_SHOWRECENTLYSAVEDNOTHINT;Show unsaved images.\nShortcut: <b>Alt-6</b
FILEBROWSER_SHOWTRASHHINT;Show contents of trash.\nShortcut: <b>Ctrl-t</b>
FILEBROWSER_SHOWUNCOLORHINT;Show images without a color label.\nShortcut: <b>Alt-0</b>
FILEBROWSER_SHOWUNRANKHINT;Show unranked images.\nShortcut: <b>0</b>
FILEBROWSER_STARTPROCESSINGHINT;Start processing the images in the queue.
FILEBROWSER_STARTPROCESSINGHINT;Start processing the images in the queue.\n\nShortcut: <b>Ctrl</b>+<b>s</b>
FILEBROWSER_STARTPROCESSING;Start processing
FILEBROWSER_STOPPROCESSINGHINT;Stop processing the images in the queue.
FILEBROWSER_STOPPROCESSINGHINT;Stop processing the images in the queue.\n\nShortcut: <b>Ctrl</b>+<b>s</b>
FILEBROWSER_STOPPROCESSING;Stop processing
FILEBROWSER_THUMBSIZE;Thumbnail size
FILEBROWSER_TOOLTIP_STOPPROCESSING;Start processing automatically when a new job arrives.

View File

@ -58,8 +58,8 @@ BatchQueuePanel::BatchQueuePanel (FileCatalog* aFileCatalog) {
start = Gtk::manage (new Gtk::ToggleButton (M("FILEBROWSER_STARTPROCESSING")));
stop = Gtk::manage (new Gtk::ToggleButton (M("FILEBROWSER_STOPPROCESSING")));
autoStart = Gtk::manage (new Gtk::CheckButton (M("BATCHQUEUE_AUTOSTART")));
start->set_tooltip_text (M("FILEBROWSER_STARTPROCESSINGHINT"));
stop->set_tooltip_text (M("FILEBROWSER_STOPPROCESSINGHINT"));
start->set_tooltip_markup (M("FILEBROWSER_STARTPROCESSINGHINT"));
stop->set_tooltip_markup (M("FILEBROWSER_STOPPROCESSINGHINT"));
autoStart->set_tooltip_text (M("FILEBROWSER_TOOLTIP_STOPPROCESSING"));
start->set_active (false);
stop->set_active (true);
@ -331,5 +331,17 @@ void BatchQueuePanel::formatChanged (Glib::ustring f) {
}
bool BatchQueuePanel::handleShortcutKey (GdkEventKey* event) {
return batchQueue->keyPressed (event);
bool ctrl = event->state & GDK_CONTROL_MASK;
if (ctrl){
switch(event->keyval) {
case GDK_s:
if (start->get_active()) {
stopBatchProc();
} else {
startBatchProc();
}
return true;
}
}
return batchQueue->keyPressed (event);
}