Some keyboard-shortcuts only work with US-keyboard-layout, Issue 2164

This commit is contained in:
Ingo
2014-01-01 23:22:42 +01:00
parent b633f0b762
commit 7a01e30d4f
8 changed files with 231 additions and 86 deletions

View File

@@ -1,8 +1,8 @@
EXPORT_BYPASS_COLORDENOISE;Bypass Colour denoise
EXPORT_BYPASS_RAW_CCSTEPS;Bypass [raw] False Colour Suppression
FILEBROWSER_COLORLABEL_TOOLTIP;Colour label\n\nUse dropdown menu or Shortcuts:\n<b>Shift-Ctrl-1</b> Red\n<b>Shift-Ctrl-2</b> Yellow\n<b>Shift-Ctrl-3</b> Green\n<b>Shift-Ctrl-4</b> Blue\n<b>Shift-Ctrl-5</b> Purple
FILEBROWSER_COLORLABEL_TOOLTIP;Colour label\n\nUse dropdown menu or Shortcuts:\n<b>Shift-Ctrl-0</b> No Label\n<b>Shift-Ctrl-1</b> Red\n<b>Shift-Ctrl-2</b> Yellow\n<b>Shift-Ctrl-3</b> Green\n<b>Shift-Ctrl-4</b> Blue\n<b>Shift-Ctrl-5</b> Purple
FILEBROWSER_POPUPCOLORLABEL;Colour label
FILEBROWSER_SHOWUNCOLORHINT;Show images without Colour label.\nShortcut: <b>Alt-`</b>
FILEBROWSER_SHOWUNCOLORHINT;Show images without Colour label.\nShortcut: <b>Alt-0</b>
HISTORY_MSG_46;Colour Denoising
HISTORY_MSG_69;Working Colour Space
HISTORY_MSG_70;Output Colour Space
@@ -24,9 +24,9 @@ ICMPANEL_OUTPUTDLGLABEL;Select Output Colour Profile...
ICMPANEL_OUTPUTPROFILE;Output Colour Profile
ICMPANEL_WORKINGPROFILE;Working Colour Profile
MAIN_TAB_COLOR;Colour
MAIN_TOOLTIP_BACKCOLOR0;Background colour of the preview: <b>Theme-based</b>\nShortcut: <b>8</b>
MAIN_TOOLTIP_BACKCOLOR0;Background colour of the preview: <b>Theme-based</b>\nShortcut: <b>9</b>
MAIN_TOOLTIP_BACKCOLOR1;Background colour of the preview: <b>Black</b>\nShortcut: <b>9</b>
MAIN_TOOLTIP_BACKCOLOR2;Background colour of the preview: <b>White</b>\nShortcut: <b>0</b>
MAIN_TOOLTIP_BACKCOLOR2;Background colour of the preview: <b>White</b>\nShortcut: <b>9</b>
PARTIALPASTE_COLORAPP;CIE Colour Appearance Model 2002
PARTIALPASTE_COLORBOOST;Colour boost
PARTIALPASTE_COLORDENOISE;Colour denoise
@@ -270,14 +270,14 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh
!FILEBROWSER_SHOWRECENTLYSAVEDHINT;Show images recently saved.\nShortcut: <b>Alt-7</b>
!FILEBROWSER_SHOWRECENTLYSAVEDNOTHINT;Show images not recently saved.\nShortcut: <b>Alt-6</b>
!FILEBROWSER_SHOWTRASHHINT;Show content of the trash.\nShortcut: <b>T</b>
!FILEBROWSER_SHOWUNRANKHINT;Show unranked images.\nShortcut: <b>`</b>
!FILEBROWSER_SHOWUNRANKHINT;Show unranked images.\nShortcut: <b>0</b>
!FILEBROWSER_STARTPROCESSINGHINT;Start processing the images in the queue
!FILEBROWSER_STARTPROCESSING;Start Processing
!FILEBROWSER_STOPPROCESSINGHINT;Stop processing the images in the queue
!FILEBROWSER_STOPPROCESSING;Stop Processing
!FILEBROWSER_THUMBSIZE;Thumbnail size
!FILEBROWSER_TOOLTIP_STOPPROCESSING;Start processing automatically when a new job arrives
!FILEBROWSER_UNRANK_TOOLTIP;Unrank\nShortcut: <b>Shift-~</b>
!FILEBROWSER_UNRANK_TOOLTIP;Unrank\nShortcut: <b>Shift-0</b>
!FILEBROWSER_USETEMPLATE;Use template:
!FILEBROWSER_ZOOMINHINT;Increase thumbnail size.\nShortcut: <b>+</b>\n\nShortcut in Single Editor Tab Mode: <b>Alt-+</b>
!FILEBROWSER_ZOOMOUTHINT;Decrease thumbnail size.\nShortcut: <b>-</b>\n\nShortcut in Single Editor Tab Mode: <b>Alt--</b>

View File

@@ -99,7 +99,7 @@ FILEBROWSER_CACHECLEARFROMFULL;Clear from cache - full
FILEBROWSER_CACHECLEARFROMPARTIAL;Clear from cache - partial
FILEBROWSER_CACHE;Cache
FILEBROWSER_CLEARPROFILE;Clear
FILEBROWSER_COLORLABEL_TOOLTIP;Color label\n\nUse dropdown menu or Shortcuts:\n<b>Shift-Ctrl-1</b> Red\n<b>Shift-Ctrl-2</b> Yellow\n<b>Shift-Ctrl-3</b> Green\n<b>Shift-Ctrl-4</b> Blue\n<b>Shift-Ctrl-5</b> Purple
FILEBROWSER_COLORLABEL_TOOLTIP;Color label\n\nUse dropdown menu or Shortcuts:\n<b>Shift-Ctrl-0</b> No Label\n<b>Shift-Ctrl-1</b> Red\n<b>Shift-Ctrl-2</b> Yellow\n<b>Shift-Ctrl-3</b> Green\n<b>Shift-Ctrl-4</b> Blue\n<b>Shift-Ctrl-5</b> Purple
FILEBROWSER_COPYPROFILE;Copy
FILEBROWSER_CURRENT_NAME;Current name:
FILEBROWSER_DARKFRAME;Dark frame
@@ -185,15 +185,15 @@ FILEBROWSER_SHOWRANK5HINT;Show images ranked as 5 star.\nShortcut: <b>5</b>
FILEBROWSER_SHOWRECENTLYSAVEDHINT;Show images recently saved.\nShortcut: <b>Alt-7</b>
FILEBROWSER_SHOWRECENTLYSAVEDNOTHINT;Show images not recently saved.\nShortcut: <b>Alt-6</b>
FILEBROWSER_SHOWTRASHHINT;Show content of the trash.\nShortcut: <b>T</b>
FILEBROWSER_SHOWUNCOLORHINT;Show images without Color label.\nShortcut: <b>Alt-`</b>
FILEBROWSER_SHOWUNRANKHINT;Show unranked images.\nShortcut: <b>`</b>
FILEBROWSER_SHOWUNCOLORHINT;Show images without 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_STARTPROCESSING;Start Processing
FILEBROWSER_STOPPROCESSINGHINT;Stop processing the images in the queue
FILEBROWSER_STOPPROCESSING;Stop Processing
FILEBROWSER_THUMBSIZE;Thumbnail size
FILEBROWSER_TOOLTIP_STOPPROCESSING;Start processing automatically when a new job arrives
FILEBROWSER_UNRANK_TOOLTIP;Unrank\nShortcut: <b>Shift-~</b>
FILEBROWSER_UNRANK_TOOLTIP;Unrank\nShortcut: <b>Shift-0</b>
FILEBROWSER_USETEMPLATE;Use template:
FILEBROWSER_ZOOMINHINT;Increase thumbnail size.\nShortcut: <b>+</b>\n\nShortcut in Single Editor Tab Mode: <b>Alt-+</b>
FILEBROWSER_ZOOMOUTHINT;Decrease thumbnail size.\nShortcut: <b>-</b>\n\nShortcut in Single Editor Tab Mode: <b>Alt--</b>
@@ -614,9 +614,9 @@ MAIN_TAB_TAGGING;Tagging
MAIN_TAB_TRANSFORM;Transform
MAIN_TAB_TRANSFORM_TOOLTIP;Shortcut: <b>Alt-t</b>
MAIN_TOGGLE_BEFORE_AFTER;B|A
MAIN_TOOLTIP_BACKCOLOR0;Background color of the preview: <b>Theme-based</b>\nShortcut: <b>8</b>
MAIN_TOOLTIP_BACKCOLOR0;Background color of the preview: <b>Theme-based</b>\nShortcut: <b>9</b>
MAIN_TOOLTIP_BACKCOLOR1;Background color of the preview: <b>Black</b>\nShortcut: <b>9</b>
MAIN_TOOLTIP_BACKCOLOR2;Background color of the preview: <b>White</b>\nShortcut: <b>0</b>
MAIN_TOOLTIP_BACKCOLOR2;Background color of the preview: <b>White</b>\nShortcut: <b>9</b>
MAIN_TOOLTIP_BEFOREAFTERLOCK;<b>Lock</b> / <b>Unlock</b> the <b>Before</b> view\n\n<b>Lock</b>: keep the <b>Before</b> view unchanged.\nUseful to evaluate the cumulative effect of multiple tools.\nAdditionally, comparisons can be made to any state in the History\n\n<b>Unlock</b>: the <b>Before</b> view will follow the <b>After</b> view one step behind, showing the image before the effect of the currently used tool.
MAIN_TOOLTIP_HIDEFP;Show/Hide the bottom panel (directory and file browser).\nShortcut: <b>f</b>
MAIN_TOOLTIP_HIDEHP;Show/Hide the left panel (including the history).\nShortcut: <b>l</b>

View File

@@ -843,8 +843,12 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
bool ctrl = event->state & GDK_CONTROL_MASK;
bool shift = event->state & GDK_SHIFT_MASK;
bool alt = event->state & GDK_MOD1_MASK;
bool alt = event->state & GDK_MOD1_MASK;
#ifdef __WIN32__
bool altgr = event->state & GDK_MOD2_MASK;
#else
bool altgr = event->state & GDK_MOD5_MASK;
#endif
// Editor Layout
switch(event->keyval) {
@@ -883,7 +887,17 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
}
break;
}
#ifdef __WIN32__
if (!alt && !ctrl && !altgr && event->hardware_keycode == 0x39 ) {
iareapanel->imageArea->previewModePanel->togglebackColor();
return true;
}
#else
if (!alt && !ctrl && !altgr && event->hardware_keycode == 0x12 ) {
iareapanel->imageArea->previewModePanel->togglebackColor();
return true;
}
#endif
if (!alt){
if (!ctrl) {
// Normal
@@ -894,7 +908,6 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
case GDK_bracketleft:
tpc->coarse->rotateLeft();
return true;
case GDK_i:
case GDK_I:
info->set_active (!info->get_active());
@@ -913,17 +926,13 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
case GDK_z://GDK_1
iareapanel->imageArea->zoomPanel->zoom11Clicked();
return true;
case GDK_8: //background color of the preview 0
iareapanel->imageArea->previewModePanel->togglebackColor0();
return true;
case GDK_9: //background color of the preview 1
iareapanel->imageArea->previewModePanel->togglebackColor1();
return true;
case GDK_0: //background color of the preview 2
iareapanel->imageArea->previewModePanel->togglebackColor2();
return true;
/*
#ifndef __WIN32__
case GDK_9: // toggle background color of the preview
iareapanel->imageArea->previewModePanel->togglebackColor();
return true;
#endif
*/
case GDK_r: //preview mode Red
iareapanel->imageArea->previewModePanel->toggleR();
return true;
@@ -996,7 +1005,7 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
}
} //if (!ctrl)
} //if (!alt)
if (alt){
switch (event->keyval) {
case GDK_s:

View File

@@ -894,10 +894,10 @@ void FileBrowser::openDefaultViewer (int destination) {
}
bool FileBrowser::keyPressed (GdkEventKey* event) {
bool ctrl = event->state & GDK_CONTROL_MASK;
bool shift = event->state & GDK_SHIFT_MASK;
bool alt = event->state & GDK_MOD1_MASK;
bool altgr = event->state & GDK_MOD2_MASK;
if ((event->keyval==GDK_C || event->keyval==GDK_c) && ctrl) {
copyProfile ();
@@ -982,52 +982,98 @@ bool FileBrowser::keyPressed (GdkEventKey* event) {
scrollPage(GDK_SCROLL_DOWN);
return true;
}
else if (shift && !ctrl && !alt) { // rank
switch(event->keyval) {
case GDK_asciitilde:
#ifdef __WIN32__
else if (shift && !ctrl && !alt && !altgr) { // rank
switch(event->hardware_keycode) {
case 0x30: // 0-key
requestRanking (0);
return true;
case GDK_exclam:
case 0x31: // 1-key
requestRanking (1);
return true;
case GDK_at:
case 0x32: // 2-key
requestRanking (2);
return true;
case GDK_numbersign:
case 0x33: // 3-key
requestRanking (3);
return true;
case GDK_dollar:
case 0x34: // 4-key
requestRanking (4);
return true;
case GDK_percent:
case 0x35: // 5-key
requestRanking (5);
return true;
}
}
else if (shift && ctrl && !alt) { // color labels
switch(event->keyval) {
case GDK_asciitilde:
else if (shift && ctrl && !alt && !altgr) { // color labels
switch(event->hardware_keycode) {
case 0x30: // 0-key
requestColorLabel (0);
return true;
case GDK_exclam:
case 0x31: // 1-key
requestColorLabel (1);
return true;
case GDK_at:
case 0x32: // 2-key
requestColorLabel (2);
return true;
case GDK_numbersign:
case 0x33: // 3-key
requestColorLabel (3);
return true;
case GDK_dollar:
case 0x34: // 4-key
requestColorLabel (4);
return true;
case GDK_percent:
case 0x35: // 5-key
requestColorLabel (5);
return true;
}
}
#else
else if (shift && !ctrl && !alt) { // rank
switch(event->hardware_keycode) {
case 0x13:
requestRanking (0);
return true;
case 0x0a:
requestRanking (1);
return true;
case 0x0b:
requestRanking (2);
return true;
case 0x0c:
requestRanking (3);
return true;
case 0x0d:
requestRanking (4);
return true;
case 0x0e:
requestRanking (5);
return true;
}
}
else if (shift && ctrl && !alt) { // color labels
switch(event->hardware_keycode) {
case 0x13:
requestColorLabel (0);
return true;
case 0x0a:
requestColorLabel (1);
return true;
case 0x0b:
requestColorLabel (2);
return true;
case 0x0c:
requestColorLabel (3);
return true;
case 0x0d:
requestColorLabel (4);
return true;
case 0x0e:
requestColorLabel (5);
return true;
}
}
#endif
return false;
}

View File

@@ -142,7 +142,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
igFilterClear = new RTImage ("filter.png");
bFilterClear = Gtk::manage(new Gtk::ToggleButton ());
bFilterClear->set_active (true);
bFilterClear->set_image(*iFilterClear);//(*Gtk::manage(new RTImage ("filterclear.png")));
bFilterClear->set_image(*iFilterClear);// (*Gtk::manage(new RTImage ("filterclear.png")));
bFilterClear->set_relief (Gtk::RELIEF_NONE);
bFilterClear->set_tooltip_markup (M("FILEBROWSER_SHOWDIRHINT"));
bFilterClear->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event),false);
@@ -1747,8 +1747,12 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) {
bool ctrl = event->state & GDK_CONTROL_MASK;
bool shift = event->state & GDK_SHIFT_MASK;
bool alt = event->state & GDK_MOD1_MASK;
bool alt = event->state & GDK_MOD1_MASK;
#ifdef __WIN32__
bool altgr = event->state & GDK_MOD2_MASK;
#else
bool altgr = event->state & GDK_MOD5_MASK;
#endif
modifierKey = event->state;
// GUI Layout
@@ -1776,33 +1780,38 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) {
return true;
}
}
if (!alt && !shift) { // shift is reserved for ranking
switch(event->keyval) {
case GDK_grave:
#ifdef __WIN32__
if (!alt && !shift && !altgr) { // shift is reserved for ranking
switch(event->hardware_keycode) {
case 0x30:
categoryButtonToggled(bUnRanked,false);
return true;
case GDK_1:
categoryButtonToggled(bRank[0],false);
return true;
case GDK_2:
categoryButtonToggled(bRank[1],false);
return true;
case GDK_3:
categoryButtonToggled(bRank[2],false);
return true;
case GDK_4:
categoryButtonToggled(bRank[3],false);
return true;
case GDK_5:
categoryButtonToggled(bRank[4],false);
return true;
case GDK_6:
categoryButtonToggled(bEdited[0],false);
return true;
case GDK_7:
categoryButtonToggled(bEdited[1],false);
return true;
case 0x31:
categoryButtonToggled(bRank[0],false);
return true;
case 0x32:
categoryButtonToggled(bRank[1],false);
return true;
case 0x33:
categoryButtonToggled(bRank[2],false);
return true;
case 0x34:
categoryButtonToggled(bRank[3],false);
return true;
case 0x35:
categoryButtonToggled(bRank[4],false);
return true;
case 0x36:
categoryButtonToggled(bEdited[0],false);
return true;
case 0x37:
categoryButtonToggled(bEdited[1],false);
return true;
}
}
if (!alt && !shift) {
switch(event->keyval) {
case GDK_Return:
case GDK_KP_Enter:
@@ -1815,34 +1824,104 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) {
}
if (alt && !shift) { // shift is reserved for color labeling
switch(event->keyval) {
case GDK_grave:
switch(event->hardware_keycode) {
case 0x30:
categoryButtonToggled(bUnCLabeled,false);
return true;
case GDK_1:
case 0x31:
categoryButtonToggled(bCLabel[0],false);
return true;
case GDK_2:
case 0x32:
categoryButtonToggled(bCLabel[1],false);
return true;
case GDK_3:
case 0x33:
categoryButtonToggled(bCLabel[2],false);
return true;
case GDK_4:
case 0x34:
categoryButtonToggled(bCLabel[3],false);
return true;
case GDK_5:
case 0x35:
categoryButtonToggled(bCLabel[4],false);
return true;
case GDK_6:
case 0x36:
categoryButtonToggled(bRecentlySaved[0],false);
return true;
case GDK_7:
case 0x37:
categoryButtonToggled(bRecentlySaved[1],false);
return true;
}
}
#else
if (!alt && !shift && !altgr) { // shift is reserved for ranking
switch(event->hardware_keycode) {
case 0x13:
categoryButtonToggled(bUnRanked,false);
return true;
case 0x0a:
categoryButtonToggled(bRank[0],false);
return true;
case 0x0b:
categoryButtonToggled(bRank[1],false);
return true;
case 0x0c:
categoryButtonToggled(bRank[2],false);
return true;
case 0x0d:
categoryButtonToggled(bRank[3],false);
return true;
case 0x0e:
categoryButtonToggled(bRank[4],false);
return true;
case 0x0f:
categoryButtonToggled(bEdited[0],false);
return true;
case 0x10:
categoryButtonToggled(bEdited[1],false);
return true;
}
}
if (!alt && !shift) {
switch(event->keyval) {
case GDK_Return:
case GDK_KP_Enter:
if (BrowsePath->is_focus()){
FileCatalog::buttonBrowsePathPressed ();
return true;
}
break;
}
}
if (alt && !shift) { // shift is reserved for color labeling
switch(event->hardware_keycode) {
case 0x13:
categoryButtonToggled(bUnCLabeled,false);
return true;
case 0x0a:
categoryButtonToggled(bCLabel[0],false);
return true;
case 0x0b:
categoryButtonToggled(bCLabel[1],false);
return true;
case 0x0c:
categoryButtonToggled(bCLabel[2],false);
return true;
case 0x0d:
categoryButtonToggled(bCLabel[3],false);
return true;
case 0x0e:
categoryButtonToggled(bCLabel[4],false);
return true;
case 0x0f:
categoryButtonToggled(bRecentlySaved[0],false);
return true;
case 0x10:
categoryButtonToggled(bRecentlySaved[1],false);
return true;
}
}
#endif
if (!ctrl && !alt) {
switch(event->keyval) {
case GDK_d:

View File

@@ -207,6 +207,16 @@ int PreviewModePanel::GetbackColor(){
return backColor;
}
void PreviewModePanel::togglebackColor(){
int backColor = GetbackColor();
if(backColor == 0)
togglebackColor1();
else if(backColor == 1)
togglebackColor2();
else
togglebackColor0();
}
void PreviewModePanel::buttonToggled_backColor (Gtk::ToggleButton* tbbackColor) {

View File

@@ -57,6 +57,7 @@ class PreviewModePanel : public Gtk::HBox {
void togglebackColor0();
void togglebackColor1();
void togglebackColor2();
void togglebackColor();
sigc::connection connR, connB, connG, connL, connFocusMask, connbackColor0, connbackColor1, connbackColor2;
@@ -68,7 +69,7 @@ class PreviewModePanel : public Gtk::HBox {
bool showB () { return previewB->get_active (); }
bool showL () { return previewL->get_active (); }
bool showFocusMask () { return previewFocusMask->get_active (); }
int GetbackColor();
int GetbackColor();
};

View File

@@ -579,7 +579,7 @@ bool ThumbBrowserBase::Internal::on_query_tooltip (int x, int y, bool keyboard_t
}
}
if (ttip!="") {
tooltip->set_text (ttip);
tooltip->set_markup (ttip);
return true;
}
else