diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 8a7469639..39d161ed2 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -640,6 +640,8 @@ PREFERENCES_OUTDIRTEMPLATE;Utiliser le modèle PREFERENCES_OUTDIRTEMPLATEHINT;Vous pouvez utiliser les paramètres de chaîne formatées suivants:\n%f, %d1, %d2, ..., %p1, %p2, ...\n\nCes paramètres de chaînes formatées se réfèrent aux dossiers et sous-chemins du chemin du fichier RAW.\n\nPar exemple, si /home/tom/image/02-09-2006/dsc0012.nefa été ouvert, la signification des paramètres est:\n%f=dsc0012, %d1=02-09-2006, %d2=image, ...\n%p1=/home/tom/image/02-09-2006, %p2=/home/tom/image, p3=/home/tom, ...\n\nSi vous voulez enregistrer l'image de sortie là où se trouve l'original, écrivez:\n%p1/%f\n\nSi vous voulez enregistrer l'image de sortie dans un dossier 'convertis' situé dans le dossier de l'original, écrivez:\n%p1/convertis/%f\n\nSi vous voulez enregistrer l'image de sortie dans le dossier '/home/tom/convertis' en conservant le même sous-dossier de dates, écrivez:\n%p2/convertis/%d1/%f PREFERENCES_OVERLAY_FILENAMES;Superposer les noms de fichier sur les vignettes PREFERENCES_OVERWRITEOUTPUTFILE;Écraser le fichier s'il existe déjà +PREFERENCES_PANFACTORFRAME;Accélération du déplacement +PREFERENCES_PANFACTORLABEL;Facteur PREFERENCES_PARSEDEXT;Extensions considérées PREFERENCES_PARSEDEXTADD;Ajout de l'extension PREFERENCES_PARSEDEXTADDHINT;Tapez une extension et cliquez ce bouton pour l'ajouter à la liste diff --git a/rtdata/languages/default b/rtdata/languages/default index 7c761a8de..ed2abf661 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -635,6 +635,8 @@ PREFERENCES_OUTDIRTEMPLATE;Use Template PREFERENCES_OUTDIRTEMPLATEHINT;You can use the following formatting strings:\n%f, %d1, %d2, ..., %p1, %p2, ..., %r\n\nThese formatting strings refer to the different parts of the photo's pathname, or some attributes of the photo.\n\n%r will be replaced by the rank of the photo. If the photo is unranked, %r will be replaced by '0'. If the photo is in trash bin, %r will be replaced by 'x'.\n\nFor example, if the photo being processed has the following pathname:\n/home/tom/photos/2010-10-31/dsc0042.nef\nthe meaning of the formatting strings are:\n%d4 = home\n%d3 = tom\n%d2 = photos\n%d1 = 2010-10-31\n%f = dsc0042\n%p1 = /home/tom/photos/2010-10-31/\n%p2 = /home/tom/photos/\n%p3 = /home/tom/\n%p4 = /home/\n\nIf you want to save the output image where the original is, write:\n%p1/%f\n\nIf you want to save the output image in a directory named "converted" located in the directory of the opened image, write:\n%p1/converted/%f\n\nIf you want to save the output image in a directory named "/home/tom/photos/converted/2010-10-31", write:\n%p2/converted/%d1/%f PREFERENCES_OVERLAY_FILENAMES;Overlay filenames on thumbnails PREFERENCES_OVERWRITEOUTPUTFILE;Overwrite existing output files +PREFERENCES_PANFACTORFRAME;Panning acceleration +PREFERENCES_PANFACTORLABEL;Factor PREFERENCES_PARSEDEXT;Parsed Extensions PREFERENCES_PARSEDEXTADD;Add Extension PREFERENCES_PARSEDEXTADDHINT;Type an extension and press this button to append list diff --git a/rtgui/cropwindow.cc b/rtgui/cropwindow.cc index 8a3c1ccba..b057a0776 100644 --- a/rtgui/cropwindow.cc +++ b/rtgui/cropwindow.cc @@ -380,8 +380,9 @@ void CropWindow::pointerMoved (int x, int y) { iarea->redraw (); } else if (state==SCropImgMove) { - action_x = (press_x - x) / zoomSteps[cropZoom].zoom; - action_y = (press_y - y) / zoomSteps[cropZoom].zoom; + double accel = options.panAccelFactor * zoomSteps[cropZoom].zoom; + action_x = (press_x - x) / zoomSteps[cropZoom].zoom * accel; + action_y = (press_y - y) / zoomSteps[cropZoom].zoom * accel; for (std::list::iterator i=listeners.begin(); i!=listeners.end(); i++) (*i)->cropPositionChanged (this); iarea->redraw (); diff --git a/rtgui/options.cc b/rtgui/options.cc index 57eca23d3..126432aff 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -86,6 +86,7 @@ void Options::setDefaults () { browserToolPanelHeight = 300; historyPanelWidth = 230; // was 150 lastScale = 5; // was 4 + panAccelFactor = 5; lastCropSize = 1; fbOnlyRaw = false; fbShowDateTime = true; @@ -383,6 +384,7 @@ if (keyFile.has_group ("GUI")) { if (keyFile.has_key ("GUI", "BrowserToolPanelHeight"))browserToolPanelHeight = keyFile.get_integer ("GUI", "BrowserToolPanelHeight"); if (keyFile.has_key ("GUI", "HistoryPanelWidth")) historyPanelWidth = keyFile.get_integer ("GUI", "HistoryPanelWidth"); if (keyFile.has_key ("GUI", "LastPreviewScale")) lastScale = keyFile.get_integer ("GUI", "LastPreviewScale"); + if (keyFile.has_key ("GUI", "PanAccelFactor")) panAccelFactor = keyFile.get_integer ("GUI", "PanAccelFactor"); if (keyFile.has_key ("GUI", "LastCropSize")) lastCropSize = keyFile.get_integer ("GUI", "LastCropSize"); if (keyFile.has_key ("GUI", "ShowHistory")) showHistory = keyFile.get_boolean ("GUI", "ShowHistory"); if (keyFile.has_key ("GUI", "ShowFilePanelState")) showFilePanelState= keyFile.get_integer ("GUI", "ShowFilePanelState"); @@ -553,6 +555,7 @@ int Options::saveToFile (Glib::ustring fname) { keyFile.set_integer ("GUI", "BrowserToolPanelHeight", browserToolPanelHeight); keyFile.set_integer ("GUI", "HistoryPanelWidth", historyPanelWidth); keyFile.set_integer ("GUI", "LastPreviewScale", lastScale); + keyFile.set_integer ("GUI", "PanAccelFactor", panAccelFactor); keyFile.set_integer ("GUI", "LastCropSize", lastCropSize); keyFile.set_boolean ("GUI", "ShowHistory", showHistory); keyFile.set_integer ("GUI", "ShowFilePanelState", showFilePanelState); diff --git a/rtgui/options.h b/rtgui/options.h index bbfb18e3d..ab41dd893 100644 --- a/rtgui/options.h +++ b/rtgui/options.h @@ -78,6 +78,7 @@ class Options { int preferencesWidth; int preferencesHeight; int lastScale; + int panAccelFactor; int lastCropSize; bool fbOnlyRaw; bool fbShowDateTime; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 3f845ddc3..c19247bbc 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -555,22 +555,42 @@ Gtk::Widget* Preferences::getGeneralPanel () { hbcd->pack_start (*frl, true, true, 0); //----- + Gtk::VBox* dfpfvb = Gtk::manage( new Gtk::VBox () ); + dfpfvb->set_spacing (4); + Gtk::Frame* fdf = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DATEFORMATFRAME")) ); Gtk::HBox* hb6 = Gtk::manage( new Gtk::HBox () ); hb6->set_border_width (4); hb6->set_spacing (4); - Gtk::VBox* dfvb = Gtk::manage( new Gtk::VBox () ); - Gtk::Label* dflab = Gtk::manage( new Gtk::Label (M("PREFERENCES_DATEFORMAT")+":") ); + Gtk::Label* dflab = Gtk::manage( new Gtk::Label (M("PREFERENCES_DATEFORMAT")+":", Gtk::ALIGN_LEFT)); hb6->pack_start (*dflab, Gtk::PACK_SHRINK,4); dateformat = Gtk::manage( new Gtk::Entry () ); dateformat->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); dflab->set_tooltip_markup (M("PREFERENCES_DATEFORMATHINT")); - hb6->pack_start (*dateformat); - dfvb->pack_start (*hb6, Gtk::PACK_SHRINK, 4); - fdf->add (*dfvb); + hb6->pack_start (*dflab, Gtk::PACK_SHRINK, 0); + hb6->pack_end (*dateformat, Gtk::PACK_SHRINK, 0); + fdf->add (*hb6); - hbcd->pack_start (*fdf, true, true, 0); + dfpfvb->pack_start (*fdf, true, true, 0); + +//----- + Gtk::Frame* pff = Gtk::manage( new Gtk::Frame (M("PREFERENCES_PANFACTORFRAME")) ); + + Gtk::HBox* pfhb = Gtk::manage( new Gtk::HBox () ); + pfhb->set_border_width(4); + pfhb->set_spacing(4); + Gtk::Label* pfl = Gtk::manage( new Gtk::Label (M("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_LEFT)); + panFactor = Gtk::manage( new Gtk::SpinButton () ); + panFactor->set_digits (0); + panFactor->set_increments (1, 5); + panFactor->set_range (1, 10); + pfhb->pack_start (*pfl, Gtk::PACK_SHRINK, 0); + pfhb->pack_end (*panFactor, Gtk::PACK_SHRINK, 0); + pff->add (*pfhb); + + dfpfvb->pack_start (*pff, true, true, 0); + hbcd->pack_start (*dfpfvb, Gtk::PACK_SHRINK, 4); mvbsd->pack_start (*hbcd, Gtk::PACK_SHRINK, 4); //----- @@ -912,6 +932,7 @@ void Preferences::storePreferences () { moptions.defProfRaw = rprofiles->get_active_text(); moptions.defProfImg = iprofiles->get_active_text(); moptions.dateFormat = dateformat->get_text(); + moptions.panAccelFactor = (int)panFactor->get_value(); moptions.fbShowDateTime = showDateTime->get_active (); moptions.fbShowBasicExif = showBasicExif->get_active (); moptions.menuGroupRank = ckbmenuGroupRank->get_active(); @@ -1033,6 +1054,7 @@ void Preferences::fillPreferences () { rprofiles->set_active_text (moptions.defProfRaw); iprofiles->set_active_text (moptions.defProfImg); dateformat->set_text (moptions.dateFormat); + panFactor->set_value(moptions.panAccelFactor); if (safe_file_test (moptions.rtSettings.monitorProfile, Glib::FILE_TEST_EXISTS)) monProfile->set_filename (moptions.rtSettings.monitorProfile); if (moptions.rtSettings.monitorProfile.empty()) diff --git a/rtgui/preferences.h b/rtgui/preferences.h index e998682a9..663b6abe3 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -83,6 +83,8 @@ class Preferences : public Gtk::Dialog { Gtk::SpinButton* hlThresh; Gtk::SpinButton* shThresh; + Gtk::SpinButton* panFactor; + Gtk::ComboBoxText* intent; Gtk::ComboBoxText* theme;