GUI for selecting crop overlay color; see issue #355

This commit is contained in:
Oliver Duis 2010-11-30 20:00:06 +01:00
parent e591a4884c
commit a66758ceff
4 changed files with 32 additions and 11 deletions

View File

@ -423,6 +423,10 @@ PREFERENCES_APPLNEXTSTARTUP;beim nächsten Programmstart aktiv
PREFERENCES_BATCH_PROCESSING;Batch-Verarbeitung
PREFERENCES_BEHAVIOR;Verhalten
PREFERENCES_BLINKCLIPPED;Zu helle/zu dunkle Bereiche blinken
PREFERENCES_CABLUE;Blau CA manuelle Korrektur
PREFERENCES_CABLUE;CA Blau manuelle Korrektur
PREFERENCES_CARED;CA Rot manuelle Korrektur
PREFERENCES_CARED;Rot CA manuelle Korrektur
PREFERENCES_CACHECLEARALL;Alles löschen
PREFERENCES_CACHECLEARPROFILES;Löschen der Profile
PREFERENCES_CACHECLEARTHUMBS;Löschen der Voransichten
@ -441,6 +445,7 @@ PREFERENCES_CLEARDLG_LINE2;Das kann einige Sekunden dauern.
PREFERENCES_CLEARDLG_TITLE;Bitte warten
PREFERENCES_CLIPPINGIND;Anzeige zu helle/zu dunkle Bereiche
PREFERENCES_CMETRICINTENT;Farbraumtransformation
PREFERENCES_CUTOVERLAYBRUSH;Zuschnitt Abdeckfarbe
PREFERENCES_DARKFRAME;Dunkelbild
PREFERENCES_DATEFORMAT;Datumsformat
PREFERENCES_DATEFORMATHINT;<i>Die folgenden Variablen können verwendet werden:</i>\n<b>%y</b><i> : Jahr</i>\n<b>%m</b><i> : Monat</i>\n<b>%d</b><i> : Tag</i>\n<i>\nDas Deutsche Datumsformat zum Beispiel ist:</i>\n<b>%d/%m/%y</b>
@ -617,6 +622,9 @@ TP_CROP_SELECTCROP;Ausschnitt wählen
TP_CROP_W;W
TP_CROP_X;x
TP_CROP_Y;y
TP_DEFRINGE_LABEL;Farbrandkorrekur
TP_DEFRINGE_RADIUS;Radius
TP_DEFRINGE_THRESHOLD;Schwelle
TP_DETAIL_AMOUNT;Stärke
TP_DIRPYRDENOISE_CHROMA;Chrominanz
TP_DIRPYRDENOISE_GAMMA;Gamma
@ -674,6 +682,7 @@ TP_ICM_INPUTCAMERA;Kamera-Standard
TP_ICM_INPUTCUSTOM;Benutzerdefiniert
TP_ICM_INPUTDLGLABEL;Wähle Eingabe-ICC-Profil...
TP_ICM_INPUTEMBEDDED;Verwende eingebettetes, wenn möglich
TP_ICM_INPUTNONE;Kein Profil
TP_ICM_INPUTPROFILE;Eingabeprofil
TP_ICM_LABEL;ICM
TP_ICM_NOICM;Kein ICM: sRGB-Ausgabe
@ -787,13 +796,3 @@ ZOOMPANEL_ZOOMOUT;Herauszoomen
!!!!!!!!!!!!!!!!!!!!!!!!!
! Untranslated keys follow; remove the ! prefix after an entry is translated.
!!!!!!!!!!!!!!!!!!!!!!!!!
!PREFERENCES_CABLUE;Blue CA manual correction
!PREFERENCES_CABLUE;CA Blue manual correction
!PREFERENCES_CARED;CA Red manual correction
!PREFERENCES_CARED;Red CA manual correction
!TP_DEFRINGE_LABEL;Defringe
!TP_DEFRINGE_RADIUS;Radius
!TP_DEFRINGE_THRESHOLD;Threshold
!TP_ICM_INPUTNONE;No profile

View File

@ -429,6 +429,7 @@ PREFERENCES_CARED;CA Red manual correction
PREFERENCES_CARED;Red CA manual correction
PREFERENCES_CLIPPINGIND;Clipping indication
PREFERENCES_CMETRICINTENT;Colorimetric Intent
PREFERENCES_CUTOVERLAYBRUSH;Cut overlay brush
PREFERENCES_DARKFRAME;Dark frame
PREFERENCES_DATEFORMAT;Date Format
PREFERENCES_DATEFORMATHINT;<i>You can use the following formatting strings:</i>\n<b>%y</b><i> : year</i>\n<b>%m</b><i> : month</i>\n<b>%d</b><i> : day</i>\n<i>\nFor example, the hungarian date format is:</i>\n<b>%y/%m/%d</b>

View File

@ -363,10 +363,17 @@ Gtk::Widget* Preferences::getGeneralPanel () {
Gtk::VBox* vbftheme = new Gtk::VBox ();
Gtk::HBox* hbUseSystemTheme = new Gtk::HBox ();
hbUseSystemTheme->set_border_width (4);
Gtk::Label* useNextStart = new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")");
chUseSystemTheme = new Gtk::CheckButton (M("PREFERENCES_USESYSTEMTHEME"));
Gtk::Label* useNextStart = new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")");
Gtk::Label* cutOverlayLabel = new Gtk::Label (M("PREFERENCES_CUTOVERLAYBRUSH") + ":");
butCropCol=new Gtk::ColorButton();
butCropCol->set_use_alpha(true);
hbUseSystemTheme->pack_start(*chUseSystemTheme, Gtk::PACK_SHRINK);
hbUseSystemTheme->pack_start (*useNextStart, Gtk::PACK_SHRINK, 4);
hbUseSystemTheme->pack_start (*cutOverlayLabel, Gtk::PACK_SHRINK, 36);
hbUseSystemTheme->pack_start (*butCropCol, Gtk::PACK_SHRINK);
vbftheme->pack_start(*hbUseSystemTheme, Gtk::PACK_SHRINK, 4);
hbtheme = new Gtk::HBox ();
@ -695,6 +702,13 @@ void Preferences::storePreferences () {
moptions.language = languages->get_active_text ();
moptions.theme = theme->get_active_text ();
moptions.useSystemTheme = chUseSystemTheme->get_active ();
Gdk::Color cropCol=butCropCol->get_color();
moptions.cutOverlayBrush[0]=cropCol.get_red_p();
moptions.cutOverlayBrush[1]=cropCol.get_green_p();
moptions.cutOverlayBrush[2]=cropCol.get_blue_p();
moptions.cutOverlayBrush[3]=butCropCol->get_alpha()/65535.0;
moptions.font = fontbutton->get_font_name();
#ifdef _WIN32
moptions.gimpDir = gimpDir->get_filename ();
@ -785,6 +799,12 @@ void Preferences::fillPreferences () {
languages->set_active_text (moptions.language);
theme->set_active_text (moptions.theme);
chUseSystemTheme->set_active(moptions.useSystemTheme);
Gdk::Color cropCol;
cropCol.set_rgb_p(moptions.cutOverlayBrush[0],moptions.cutOverlayBrush[1],moptions.cutOverlayBrush[2]);
butCropCol->set_color(cropCol);
butCropCol->set_alpha ( (unsigned short)(moptions.cutOverlayBrush[3]*65535.0));
fontbutton->set_font_name(moptions.font);
showDateTime->set_active (moptions.fbShowDateTime);
showBasicExif->set_active (moptions.fbShowBasicExif);

View File

@ -85,6 +85,7 @@ class Preferences : public Gtk::Dialog {
Gtk::HBox* hbtheme;
Gtk::CheckButton* chUseSystemTheme;
Gtk::FontButton* fontbutton;
Gtk::ColorButton* butCropCol;
Gtk::ComboBoxText* cformat;
Gtk::SpinButton* maxThumbSize;