Added some keyboard shortcuts; see end of issue #83

This commit is contained in:
Oliver Duis
2010-12-10 21:44:29 +01:00
parent 0d77945409
commit 529831e10b
8 changed files with 37 additions and 9 deletions

View File

@@ -366,8 +366,8 @@ MAIN_TAB_TRANSFORM;Verändern
MAIN_TOGGLE_BEFORE_AFTER;V|N
MAIN_TOOLTIP_HIDEFP;Zeigen/Verstecken von Verzeichnis- und Datei-Browser (Taste F)
MAIN_TOOLTIP_HIDEHP;Zeigen/Verstecken linke Seite (Abfolge der Änderungen, Taste H)
MAIN_TOOLTIP_INDCLIPPEDH;zu helle Bereiche blinken
MAIN_TOOLTIP_INDCLIPPEDS;zu dunkle Bereiche blinken
MAIN_TOOLTIP_INDCLIPPEDH;zu helle Bereiche blinken (Taste <)
MAIN_TOOLTIP_INDCLIPPEDS;zu dunkle Bereiche blinken (Taste >)
MAIN_TOOLTIP_PREFERENCES;Einstellungen ändern
MAIN_TOOLTIP_QINFO;Kurze Info über das Bild
MAIN_TOOLTIP_SAVE;Speichere Bild im Standard-Verzeichnis

View File

@@ -354,8 +354,8 @@ MAIN_TAB_TRANSFORM;Transform
MAIN_TOGGLE_BEFORE_AFTER;B|A
MAIN_TOOLTIP_HIDEFP;Show/hide the bottom panel (directory and file browser) <b>F</b>
MAIN_TOOLTIP_HIDEHP;Show/hide the left panel (including the history) <b>H</b>
MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication
MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication
MAIN_TOOLTIP_INDCLIPPEDH;Clipped highlight indication (Key <)
MAIN_TOOLTIP_INDCLIPPEDS;Clipped shadow indication (Key >)
MAIN_TOOLTIP_PREFERENCES;Set preferences
MAIN_TOOLTIP_QINFO;Quick info on the image <b>I</b>
MAIN_TOOLTIP_SAVE;Save image to the default folder

View File

@@ -1,7 +1,6 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -675,6 +674,13 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
iarea->imageArea->zoomPanel->zoomFitClicked();
return true;
case GDK_less:
iarea->imageArea->indClippedPanel->toggleClipped(true);
return true;
case GDK_greater:
iarea->imageArea->indClippedPanel->toggleClipped(false);
return true;
case GDK_F5:
openThm->openDefaultViewer(event->state & GDK_SHIFT_MASK ? 2 : 1);
return true;

View File

@@ -437,6 +437,14 @@ bool FileBrowser::keyPressed (GdkEventKey* event) {
openDefaultViewer (dest);
return true;
}
else if (event->keyval==GDK_Page_Up) {
scrollPage(GDK_SCROLL_UP);
return true;
}
else if (event->keyval==GDK_Page_Down) {
scrollPage(GDK_SCROLL_DOWN);
return true;
}
return false;
}

View File

@@ -1,7 +1,6 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -45,7 +44,14 @@ IndicateClippedPanel::IndicateClippedPanel (ImageArea* ia) : imageArea(ia) {
show_all ();
}
void IndicateClippedPanel::buttonToggled () {
// inverts a toggle programmatically
void IndicateClippedPanel::toggleClipped (bool highlights) {
if (highlights)
indclippedh->set_active(!indclippedh->get_active());
else
indclippeds->set_active(!indclippeds->get_active());
}
void IndicateClippedPanel::buttonToggled () {
imageArea->queue_draw ();
}

View File

@@ -1,7 +1,6 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -34,6 +33,8 @@ class IndicateClippedPanel : public Gtk::HBox {
void buttonToggled ();
void toggleClipped (bool highlights); // inverts a toggle programmatically
bool showClippedShadows () { return indclippeds->get_active (); }
bool showClippedHighlights () { return indclippedh->get_active (); }
};

View File

@@ -68,13 +68,19 @@ void ThumbBrowserBase::scrollChanged () {
}
void ThumbBrowserBase::scroll (int direction) {
if (arrangement==TB_Vertical)
vscroll.set_value (vscroll.get_value() + (direction==GDK_SCROLL_DOWN ? +1 : -1) * vscroll.get_adjustment()->get_step_increment());
else
hscroll.set_value (hscroll.get_value() + (direction==GDK_SCROLL_DOWN ? +1 : -1) * hscroll.get_adjustment()->get_step_increment());
}
void ThumbBrowserBase::scrollPage (int direction) {
if (arrangement==TB_Vertical)
vscroll.set_value (vscroll.get_value() + (direction==GDK_SCROLL_DOWN ? +1 : -1) * vscroll.get_adjustment()->get_page_increment());
else
hscroll.set_value (hscroll.get_value() + (direction==GDK_SCROLL_DOWN ? +1 : -1) * hscroll.get_adjustment()->get_page_increment());
}
void ThumbBrowserBase::resizeThumbnailArea (int w, int h) {
inW = w;

View File

@@ -69,6 +69,7 @@ class ThumbBrowserBase : public Gtk::VBox {
void configScrollBars ();
void scrollChanged ();
void scroll (int direction);
void scrollPage (int direction);
protected: