Added editor layout with vertical tabs to save space; see issue #381
This commit is contained in:
@@ -321,6 +321,7 @@ MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Edit current image in external editor <b>Ctrl+E
|
||||
MAIN_BUTTON_UNFULLSCREEN;Exit fullscreen
|
||||
MAIN_FRAME_BATCHQUEUE;Batch Queue
|
||||
MAIN_FRAME_FILEBROWSER;File Browser
|
||||
MAIN_FRAME_EDITOR;Editor
|
||||
MAIN_FRAME_PLACES;Places
|
||||
MAIN_FRAME_PLACES_ADD;Add
|
||||
MAIN_FRAME_PLACES_DEL;Del
|
||||
@@ -502,6 +503,7 @@ PREFERENCES_SHOWDATETIME;Show date and time
|
||||
PREFERENCES_SHOWONLYRAW;Show only RAW files
|
||||
PREFERENCES_SHTHRESHOLD;Threshold for clipped shadows
|
||||
PREFERENCES_SINGLETAB;Single tab mode
|
||||
PREFERENCES_SINGLETABVERTAB;Single tab mode, vertical tabs
|
||||
PREFERENCES_STARTUPIMDIR;Image directory at startup
|
||||
PREFERENCES_TAB_BROWSER;File Browser
|
||||
PREFERENCES_TAB_COLORMGR;Color Management
|
||||
|
@@ -167,6 +167,27 @@ void BatchQueuePanel::arrangementButtonPressed () {
|
||||
void BatchQueuePanel::updateTab (int qsize)
|
||||
{
|
||||
Gtk::Notebook *nb =(Gtk::Notebook *)(this->get_parent());
|
||||
|
||||
if (options.mainNBVertical) {
|
||||
Gtk::VBox* vbb = Gtk::manage (new Gtk::VBox ());
|
||||
Gtk::Label* l;
|
||||
|
||||
if(!qsize ){
|
||||
vbb->pack_start (*Gtk::manage (new Gtk::Image (argv0+"/images/processing.png")));
|
||||
l=new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_BATCHQUEUE"));
|
||||
} else if( start->get_active () ){
|
||||
vbb->pack_start (*Gtk::manage (new Gtk::Image (argv0+"/images/processing-play.png")));
|
||||
l=new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_BATCHQUEUE")+" [" +Glib::ustring::format( qsize )+"]");
|
||||
} else {
|
||||
vbb->pack_start (*Gtk::manage (new Gtk::Image (argv0+"/images/processing-pause.png")));
|
||||
l=new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_BATCHQUEUE")+" [" +Glib::ustring::format( qsize )+"]" );
|
||||
}
|
||||
l->set_angle (90);
|
||||
vbb->pack_start (*l);
|
||||
vbb->set_spacing (2);
|
||||
vbb->show_all ();
|
||||
nb->set_tab_label(*this,*vbb);
|
||||
} else {
|
||||
Gtk::HBox* hbb = Gtk::manage (new Gtk::HBox ());
|
||||
if (!qsize ) {
|
||||
hbb->pack_start (*Gtk::manage (new Gtk::Image (argv0+"/images/processing.png")));
|
||||
@@ -182,6 +203,7 @@ void BatchQueuePanel::updateTab (int qsize)
|
||||
hbb->show_all ();
|
||||
nb->set_tab_label(*this,*hbb);
|
||||
}
|
||||
}
|
||||
|
||||
void BatchQueuePanel::queueSizeChanged (int qsize)
|
||||
{
|
||||
|
@@ -268,6 +268,7 @@ if (keyFile.has_group ("GUI")) {
|
||||
if (keyFile.has_key ("GUI", "ShowHistory")) showHistory = keyFile.get_boolean ("GUI", "ShowHistory");
|
||||
if (keyFile.has_key ("GUI", "ShowFilePanelState")) showFilePanelState= keyFile.get_integer ("GUI", "ShowFilePanelState");
|
||||
if (keyFile.has_key ("GUI", "ShowInfo")) showInfo = keyFile.get_boolean ("GUI", "ShowInfo");
|
||||
if (keyFile.has_key ("GUI", "MainNBVertical")) mainNBVertical = keyFile.get_boolean ("GUI", "MainNBVertical");
|
||||
if (keyFile.has_key ("GUI", "ShowClippedHighlights"))showClippedHighlights = keyFile.get_boolean ("GUI", "ShowClippedHighlights");
|
||||
if (keyFile.has_key ("GUI", "ShowClippedShadows")) showClippedShadows= keyFile.get_boolean ("GUI", "ShowClippedShadows");
|
||||
if (keyFile.has_key ("GUI", "FrameColor")) bgcolor = keyFile.get_integer ("GUI", "FrameColor");
|
||||
@@ -400,6 +401,7 @@ int Options::saveToFile (Glib::ustring fname) {
|
||||
keyFile.set_boolean ("GUI", "ShowHistory", showHistory);
|
||||
keyFile.set_integer ("GUI", "ShowFilePanelState", showFilePanelState);
|
||||
keyFile.set_boolean ("GUI", "ShowInfo", showInfo);
|
||||
keyFile.set_boolean ("GUI", "MainNBVertical", mainNBVertical);
|
||||
keyFile.set_boolean ("GUI", "ShowClippedHighlights", showClippedHighlights);
|
||||
keyFile.set_boolean ("GUI", "ShowClippedShadows", showClippedShadows);
|
||||
keyFile.set_integer ("GUI", "FrameColor", bgcolor);
|
||||
|
@@ -88,6 +88,7 @@ class Options {
|
||||
bool showHistory;
|
||||
int showFilePanelState; // 0: normal, 1: maximized, 2: normal, 3: hidden
|
||||
bool showInfo;
|
||||
bool mainNBVertical; // main notebook vertical tabs?
|
||||
int cropDPI;
|
||||
bool showClippedHighlights;
|
||||
bool showClippedShadows;
|
||||
|
@@ -329,12 +329,16 @@ Gtk::Widget* Preferences::getGeneralPanel () {
|
||||
editorLayout = new Gtk::ComboBoxText ();
|
||||
|
||||
editorLayout->append_text (M("PREFERENCES_SINGLETAB"));
|
||||
editorLayout->append_text (M("PREFERENCES_SINGLETABVERTAB"));
|
||||
editorLayout->append_text (M("PREFERENCES_MULTITAB"));
|
||||
editorLayout->append_text (M("PREFERENCES_MULTITABDUALMON"));
|
||||
editorLayout->set_active (1);
|
||||
editorLayout->set_active (2);
|
||||
|
||||
hbworkflow->pack_start (*flayoutlab, Gtk::PACK_SHRINK, 4);
|
||||
hbworkflow->pack_start (*editorLayout);
|
||||
Gtk::Label* lNextStart = new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")");
|
||||
hbworkflow->pack_end (*lNextStart, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
fworklflow->add (*hbworkflow);
|
||||
mvbsd->pack_start (*fworklflow, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
@@ -777,8 +781,9 @@ void Preferences::storePreferences () {
|
||||
moptions.baBehav[adjs->get_value (behavColumns.addsetid)] = adjs->get_value (behavColumns.badd);
|
||||
|
||||
int editorMode=editorLayout->get_active_row_number();
|
||||
moptions.tabbedUI = (editorMode>0);
|
||||
moptions.multiDisplayMode = editorMode==2 ? 1:0;
|
||||
moptions.tabbedUI = (editorMode>1);
|
||||
moptions.multiDisplayMode = editorMode==3 ? 1:0;
|
||||
moptions.mainNBVertical = editorMode==1;
|
||||
|
||||
moptions.overwriteOutputFile = chOverwriteOutputFile->get_active ();
|
||||
}
|
||||
@@ -861,9 +866,9 @@ void Preferences::fillPreferences () {
|
||||
loadParamsPreference->set_active (moptions.paramsLoadLocation);
|
||||
|
||||
if (!moptions.tabbedUI)
|
||||
editorLayout->set_active(0);
|
||||
editorLayout->set_active(moptions.mainNBVertical ? 1 : 0);
|
||||
else
|
||||
editorLayout->set_active(moptions.multiDisplayMode ? 2 : 1);
|
||||
editorLayout->set_active(moptions.multiDisplayMode ? 3 : 2);
|
||||
|
||||
darkFrameDir->set_filename( moptions.rtSettings.darkFramesPath );
|
||||
updateDFinfos();
|
||||
|
@@ -55,34 +55,56 @@ RTWindow::RTWindow () {
|
||||
fpanel->setParent (this);
|
||||
|
||||
// decorate tab
|
||||
if (options.mainNBVertical) {
|
||||
mainNB->set_tab_pos (Gtk::POS_LEFT);
|
||||
|
||||
Gtk::VBox* vbf = Gtk::manage (new Gtk::VBox ());
|
||||
vbf->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU)));
|
||||
Gtk::Label* l=new Gtk::Label (Glib::ustring(" ") + M("MAIN_FRAME_FILEBROWSER"));
|
||||
l->set_angle (90);
|
||||
vbf->pack_start (*l);
|
||||
vbf->set_spacing (2);
|
||||
vbf->show_all ();
|
||||
mainNB->append_page (*fpanel, *vbf);
|
||||
} else {
|
||||
Gtk::HBox* hbf = Gtk::manage (new Gtk::HBox ());
|
||||
hbf->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU)));
|
||||
hbf->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_FILEBROWSER"))));
|
||||
hbf->set_spacing (2);
|
||||
hbf->show_all ();
|
||||
mainNB->append_page (*fpanel, *hbf);
|
||||
}
|
||||
|
||||
bpanel = new BatchQueuePanel ();
|
||||
bpanel->setParent (this);
|
||||
|
||||
// decorate tab
|
||||
Gtk::HBox* hbb = Gtk::manage (new Gtk::HBox ());
|
||||
hbb->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::EXECUTE, Gtk::ICON_SIZE_MENU)));
|
||||
hbb->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE"))));
|
||||
hbb->set_spacing (2);
|
||||
hbb->show_all ();
|
||||
mainNB->append_page (*bpanel, *hbb);
|
||||
|
||||
// decorate tab, the label is unimportant since its updated in batchqueuepanel anyway
|
||||
Gtk::Label* lbq = new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE"));
|
||||
mainNB->append_page (*bpanel, *lbq);
|
||||
|
||||
epanel = new EditorPanel (fpanel);
|
||||
epanel->setParent (this);
|
||||
|
||||
// decorate tab
|
||||
if (options.mainNBVertical) {
|
||||
Gtk::VBox* vbe = Gtk::manage (new Gtk::VBox ());
|
||||
vbe->pack_start (*Gtk::manage (new Gtk::Image (argv0+"/images/logoicon16.png")));
|
||||
Gtk::Label* l=new Gtk::Label( Glib::ustring(" ") + M("MAIN_FRAME_EDITOR") );
|
||||
//l->set_markup(Glib::ustring("<b>Editor</b>")); Bold difficult to read
|
||||
l->set_angle (90);
|
||||
vbe->pack_start (*l);
|
||||
vbe->set_spacing (2);
|
||||
vbe->show_all ();
|
||||
mainNB->append_page (*epanel, *vbe);
|
||||
} else {
|
||||
Gtk::HBox* hbe = Gtk::manage (new Gtk::HBox ());
|
||||
hbe->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::EXECUTE, Gtk::ICON_SIZE_MENU)));
|
||||
hbe->pack_start (*Gtk::manage (new Gtk::Label("Editor")));
|
||||
hbe->pack_start (*Gtk::manage (new Gtk::Image (argv0+"/images/logoicon16.png")));
|
||||
hbe->pack_start (*Gtk::manage (new Gtk::Label(M("MAIN_FRAME_EDITOR"))));
|
||||
hbe->set_spacing (2);
|
||||
hbe->show_all ();
|
||||
mainNB->append_page (*epanel, *hbe);
|
||||
}
|
||||
|
||||
mainNB->set_current_page (mainNB->page_num (*fpanel));
|
||||
|
||||
signal_key_press_event().connect( sigc::mem_fun(*this, &RTWindow::keyPressed) );
|
||||
|
Reference in New Issue
Block a user