Cleaning up the Preference's GUI, starting from the General tab

This commit is contained in:
Hombre
2015-10-07 23:59:50 +02:00
parent 9dcb00045d
commit d8e4709458
5 changed files with 182 additions and 142 deletions

View File

@@ -787,15 +787,22 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
Gtk::Widget* Preferences::getGeneralPanel ()
{
Gtk::VBox* mvbsd = Gtk::manage( new Gtk::VBox () );
Gtk::Grid* mvbsd = Gtk::manage( new Gtk::Grid () );
mvbsd->set_column_spacing(4);
mvbsd->set_row_spacing(4);
Gtk::Frame* fworklflow = Gtk::manage (new Gtk::Frame (M("PREFERENCES_WORKFLOW")));
Gtk::VBox* vbworkflow = Gtk::manage (new Gtk::VBox (false, 4));
vbworkflow->set_border_width (4);
fworklflow->set_border_width(4);
setExpandAlignProperties(fworklflow, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
Gtk::Grid* workflowGrid = Gtk::manage (new Gtk::Grid());
workflowGrid->set_column_spacing(4);
workflowGrid->set_row_spacing(4);
setExpandAlignProperties(workflowGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::HBox* hbworkflow = Gtk::manage (new Gtk::HBox (false, 4));
Gtk::Label* flayoutlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_EDITORLAYOUT") + ":"));
setExpandAlignProperties(flayoutlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
editorLayout = Gtk::manage (new Gtk::ComboBoxText ());
setExpandAlignProperties(editorLayout, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
editorLayout->append (M("PREFERENCES_SINGLETAB"));
editorLayout->append (M("PREFERENCES_SINGLETABVERTAB"));
editorLayout->append (M("PREFERENCES_MULTITAB"));
@@ -803,61 +810,72 @@ Gtk::Widget* Preferences::getGeneralPanel ()
editorLayout->set_active (2);
editorLayout->signal_changed().connect (sigc::mem_fun(*this, &Preferences::layoutComboChanged));
layoutComboChanged(); // update the tooltip
hbworkflow->pack_start (*flayoutlab, Gtk::PACK_SHRINK);
hbworkflow->pack_start (*editorLayout);
Gtk::Label* lNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
hbworkflow->pack_end (*lNextStart, Gtk::PACK_SHRINK);
vbworkflow->pack_start (*hbworkflow, Gtk::PACK_SHRINK);
setExpandAlignProperties(lNextStart, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*flayoutlab, Gtk::POS_LEFT, 1, 1);
workflowGrid->attach_next_to(*editorLayout, *flayoutlab, Gtk::POS_RIGHT, 1, 1);
workflowGrid->attach_next_to(*lNextStart, *editorLayout, Gtk::POS_RIGHT, 1, 1);
Gtk::HBox* curveBBoxPosHB = Gtk::manage (new Gtk::HBox (false, 4));
Gtk::Label* curveBBoxPosL = Gtk::manage (new Gtk::Label (M("PREFERENCES_CURVEBBOXPOS") + ":"));
Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")"));
setExpandAlignProperties(curveBBoxPosL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
curveBBoxPosC = Gtk::manage (new Gtk::ComboBoxText ());
setExpandAlignProperties(curveBBoxPosC, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_ABOVE"));
curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_RIGHT"));
curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_BELOW"));
curveBBoxPosC->append (M("PREFERENCES_CURVEBBOXPOS_LEFT"));
curveBBoxPosC->set_active (1);
curveBBoxPosHB->pack_start (*curveBBoxPosL, Gtk::PACK_SHRINK);
curveBBoxPosHB->pack_start (*curveBBoxPosC);
curveBBoxPosHB->pack_start (*curveBBoxPosRestartL, Gtk::PACK_SHRINK);
vbworkflow->pack_start (*curveBBoxPosHB, Gtk::PACK_SHRINK);
Gtk::Label* curveBBoxPosRestartL = Gtk::manage (new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")"));
setExpandAlignProperties(curveBBoxPosRestartL, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*curveBBoxPosL, *flayoutlab, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*curveBBoxPosC, *editorLayout, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*curveBBoxPosRestartL, *lNextStart, Gtk::POS_BOTTOM, 1, 1);
Gtk::HBox* hbworkflow2 = Gtk::manage( new Gtk::HBox () );
ckbHistogramPositionLeft = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMPOSITIONLEFT")) );
hbworkflow2->pack_start (*ckbHistogramPositionLeft);
setExpandAlignProperties(ckbHistogramPositionLeft, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbHistogramWorking = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_HISTOGRAMWORKING")) );
setExpandAlignProperties(ckbHistogramWorking, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbHistogramWorking->set_tooltip_markup (M("PREFERENCES_HISTOGRAM_TOOLTIP"));
hbworkflow2->pack_start (*ckbHistogramWorking);
vbworkflow->pack_start (*hbworkflow2, Gtk::PACK_SHRINK);
workflowGrid->attach_next_to(*ckbHistogramPositionLeft, *curveBBoxPosL, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*ckbHistogramWorking, *curveBBoxPosC, Gtk::POS_BOTTOM, 2, 1);
Gtk::HBox* hbworkflow3 = Gtk::manage( new Gtk::HBox () );
ckbFileBrowserToolbarSingleRow = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_FILEBROWSERTOOLBARSINGLEROW")) );
setExpandAlignProperties(ckbFileBrowserToolbarSingleRow, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbShowFilmStripToolBar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SHOWFILMSTRIPTOOLBAR")) );
hbworkflow3->pack_start (*ckbFileBrowserToolbarSingleRow);
hbworkflow3->pack_start (*ckbShowFilmStripToolBar);
vbworkflow->pack_start (*hbworkflow3, Gtk::PACK_SHRINK);
setExpandAlignProperties(ckbShowFilmStripToolBar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*ckbFileBrowserToolbarSingleRow, *ckbHistogramPositionLeft, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*ckbShowFilmStripToolBar, *ckbHistogramWorking, Gtk::POS_BOTTOM, 2, 1);
Gtk::HBox* hbworkflow4 = Gtk::manage( new Gtk::HBox (false, 4) );
Gtk::Label* hb4label = Gtk::manage( new Gtk::Label (M("PREFERENCES_TP_LABEL")) );
hbworkflow4->pack_start (*hb4label, Gtk::PACK_SHRINK);
setExpandAlignProperties(hb4label, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbHideTPVScrollbar = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_VSCROLLBAR")) );
hbworkflow4->pack_start (*ckbHideTPVScrollbar, Gtk::PACK_SHRINK);
setExpandAlignProperties(ckbHideTPVScrollbar, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
ckbUseIconNoText = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_TP_USEICONORTEXT")) );
hbworkflow4->pack_start (*ckbUseIconNoText, Gtk::PACK_SHRINK);
vbworkflow->pack_start (*hbworkflow4, Gtk::PACK_SHRINK);
setExpandAlignProperties(ckbUseIconNoText, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
workflowGrid->attach_next_to(*hb4label, *ckbFileBrowserToolbarSingleRow, Gtk::POS_BOTTOM, 1, 1);
workflowGrid->attach_next_to(*ckbHideTPVScrollbar, *hb4label, Gtk::POS_RIGHT, 1, 1);
workflowGrid->attach_next_to(*ckbUseIconNoText, *ckbHideTPVScrollbar, Gtk::POS_RIGHT, 1, 1);
fworklflow->add (*vbworkflow);
mvbsd->pack_start (*fworklflow, Gtk::PACK_SHRINK);
fworklflow->add (*workflowGrid);
mvbsd->attach_next_to(*fworklflow, Gtk::POS_TOP, 2, 1);
// ---------------------------------------------
Gtk::Frame* flang = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTLANG")) );
Gtk::HBox* hblang = Gtk::manage( new Gtk::HBox () );
hblang->set_border_width (4);
flang->set_border_width(4);
setExpandAlignProperties(flang, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
Gtk::Grid* langGrid = Gtk::manage( new Gtk::Grid() );
langGrid->set_column_spacing(4);
langGrid->set_row_spacing(4);
setExpandAlignProperties(langGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
ckbLangAutoDetect = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_LANGAUTODETECT")) );
setExpandAlignProperties(ckbLangAutoDetect, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
Gtk::Label* langlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTLANG") + ":") );
setExpandAlignProperties(langlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
languages = Gtk::manage( new Gtk::ComboBoxText () );
setExpandAlignProperties(languages, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
std::vector<Glib::ustring> langs;
parseDir (argv0 + "/languages", langs, "");
@@ -869,43 +887,35 @@ Gtk::Widget* Preferences::getGeneralPanel ()
}
Gtk::Label* langw = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
hblang->pack_start (*ckbLangAutoDetect, Gtk::PACK_SHRINK, 4);
hblang->pack_start (*langlab, Gtk::PACK_SHRINK, 8);
hblang->pack_start (*languages);
hblang->pack_end (*langw, Gtk::PACK_SHRINK, 4);
flang->add (*hblang);
mvbsd->pack_start (*flang, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(langw, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
langGrid->attach_next_to(*ckbLangAutoDetect, Gtk::POS_LEFT, 1, 1);
langGrid->attach_next_to(*langlab, *ckbLangAutoDetect, Gtk::POS_RIGHT, 1, 1);
langGrid->attach_next_to(*languages, *langlab, Gtk::POS_RIGHT, 1, 1);
langGrid->attach_next_to(*langw, *languages, Gtk::POS_RIGHT, 1, 1);
flang->add (*langGrid);
mvbsd->attach_next_to(*flang, *fworklflow, Gtk::POS_BOTTOM, 2, 1);
langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::langAutoDetectToggled));
// ---------------------------------------------
Gtk::Frame* ftheme = Gtk::manage( new Gtk::Frame (M("PREFERENCES_DEFAULTTHEME")) );
Gtk::VBox* vbftheme = Gtk::manage( new Gtk::VBox () );
vbftheme->set_border_width(4);
vbftheme->set_spacing(4);
Gtk::HBox* hbUseSystemTheme = Gtk::manage( new Gtk::HBox () );
hbUseSystemTheme->set_spacing(4);
chUseSystemTheme = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_USESYSTEMTHEME")) );
Gtk::Label* useNextStart = Gtk::manage( new Gtk::Label (Glib::ustring("(") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
Gtk::Label* cutOverlayLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUTOVERLAYBRUSH") + ":") );
butCropCol = Gtk::manage( new Gtk::ColorButton() );
butCropCol->set_use_alpha(true);
Gtk::Label* navGuideLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_NAVGUIDEBRUSH") + ":") );
butNavGuideCol = Gtk::manage( new Gtk::ColorButton() );
butNavGuideCol->set_use_alpha(true);
ftheme->set_border_width(4);
setExpandAlignProperties(ftheme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
Gtk::Grid* themeGrid = Gtk::manage( new Gtk::Grid() );
themeGrid->set_column_spacing(4);
themeGrid->set_row_spacing(4);
setExpandAlignProperties(themeGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
chUseSystemTheme = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_USESYSTEMTHEME")+" ("+ M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
setExpandAlignProperties(chUseSystemTheme, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
slimUI = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_SLIMUI")) );
hbUseSystemTheme->pack_start(*chUseSystemTheme, Gtk::PACK_SHRINK);
hbUseSystemTheme->pack_start (*useNextStart, Gtk::PACK_SHRINK, 0);
hbUseSystemTheme->pack_end(*slimUI, Gtk::PACK_SHRINK, 0);
vbftheme->pack_start(*hbUseSystemTheme, Gtk::PACK_SHRINK, 0);
setExpandAlignProperties(slimUI, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
themeGrid->attach_next_to(*chUseSystemTheme, Gtk::POS_LEFT, 2, 1);
themeGrid->attach_next_to(*slimUI, *chUseSystemTheme, Gtk::POS_RIGHT, 2, 1);
hbtheme = Gtk::manage( new Gtk::HBox () );
hbtheme->set_spacing (4);
Gtk::Label* themelab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTTHEME") + ":") );
setExpandAlignProperties(themelab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
theme = Gtk::manage( new Gtk::ComboBoxText () );
setExpandAlignProperties(theme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
theme->set_active (0);
std::vector<Glib::ustring> themes;
@@ -916,150 +926,173 @@ Gtk::Widget* Preferences::getGeneralPanel ()
}
Gtk::Label* fontlab = Gtk::manage( new Gtk::Label (M("PREFERENCES_SELECTFONT") + ":") );
setExpandAlignProperties(fontlab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
fontbutton = Gtk::manage( new Gtk::FontButton ());
setExpandAlignProperties(fontbutton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
fontbutton->set_use_size(true);
fontbutton->set_font_name(options.font);
hbtheme->pack_start (*themelab, Gtk::PACK_SHRINK, 0);
hbtheme->pack_start (*theme);
hbtheme->pack_start (*fontlab, Gtk::PACK_SHRINK, 0);
hbtheme->pack_start (*fontbutton);
vbftheme->pack_start(*hbtheme, Gtk::PACK_SHRINK, 0);
themeGrid->attach_next_to(*themelab, *chUseSystemTheme, Gtk::POS_BOTTOM, 1, 1);
themeGrid->attach_next_to(*theme, *themelab, Gtk::POS_RIGHT, 1, 1);
themeGrid->attach_next_to(*fontlab, *theme, Gtk::POS_RIGHT, 1, 1);
themeGrid->attach_next_to(*fontbutton, *fontlab, Gtk::POS_RIGHT, 1, 1);
Gtk::Grid* cropcolorGrid = Gtk::manage( new Gtk::Grid () );
cropcolorGrid->set_column_spacing(4);
cropcolorGrid->set_row_spacing(4);
Gtk::Label* cutOverlayLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_CUTOVERLAYBRUSH") + ":") );
setExpandAlignProperties(cutOverlayLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
butCropCol = Gtk::manage( new Gtk::ColorButton() );
setExpandAlignProperties(butCropCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
butCropCol->set_use_alpha(true);
cropcolorGrid->attach_next_to(*cutOverlayLabel, Gtk::POS_LEFT, 1, 1);
cropcolorGrid->attach_next_to(*butCropCol, *cutOverlayLabel, Gtk::POS_RIGHT, 1, 1);
Gtk::HBox* hbcolorchooser = Gtk::manage( new Gtk::HBox () );
hbcolorchooser->set_spacing(4);
Gtk::Grid* navguidecolGrid = Gtk::manage( new Gtk::Grid () );
navguidecolGrid->set_column_spacing(4);
navguidecolGrid->set_row_spacing(4);
Gtk::Label* navGuideLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_NAVGUIDEBRUSH") + ":") );
setExpandAlignProperties(navGuideLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
butNavGuideCol = Gtk::manage( new Gtk::ColorButton() );
setExpandAlignProperties(butNavGuideCol, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
butNavGuideCol->set_use_alpha(true);
navguidecolGrid->attach_next_to(*navGuideLabel, Gtk::POS_LEFT, 1, 1);
navguidecolGrid->attach_next_to(*butNavGuideCol, *navGuideLabel, Gtk::POS_RIGHT, 1, 1);
hbcolorchooser->pack_start (*cutOverlayLabel, Gtk::PACK_SHRINK, 0);
hbcolorchooser->pack_start (*butCropCol, Gtk::PACK_SHRINK, 0);
hbcolorchooser->pack_end (*butNavGuideCol, Gtk::PACK_SHRINK, 0);
hbcolorchooser->pack_end (*navGuideLabel, Gtk::PACK_SHRINK, 0);
vbftheme->pack_start(*hbcolorchooser, Gtk::PACK_SHRINK, 0);
themeGrid->attach_next_to(*cropcolorGrid, *themelab, Gtk::POS_BOTTOM, 2, 1);
themeGrid->attach_next_to(*navguidecolGrid, *cropcolorGrid, Gtk::POS_RIGHT, 2, 1);
ftheme->add (*themeGrid);
mvbsd->attach_next_to(*ftheme, *flang, Gtk::POS_BOTTOM, 2, 1);
ftheme->add (*vbftheme);
mvbsd->pack_start (*ftheme, Gtk::PACK_SHRINK, 0);
// ---------------------------------------------
//-----
Gtk::Frame* fclip = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLIPPINGIND")));
fclip->set_border_width(4);
setExpandAlignProperties(fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::Grid* clipGrid = Gtk::manage( new Gtk::Grid() );
clipGrid->set_column_spacing(4);
clipGrid->set_row_spacing(4);
setExpandAlignProperties(clipGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::HBox* hbcd = Gtk::manage( new Gtk::HBox (true) );
hbcd->set_spacing(4);
Gtk::Frame* frl = Gtk::manage( new Gtk::Frame (M("PREFERENCES_CLIPPINGIND")));
Gtk::VBox* vbrl = Gtk::manage( new Gtk::VBox () );
vbrl->set_border_width(4);
vbrl->set_spacing (4);
Gtk::HBox* vbhl = Gtk::manage( new Gtk::HBox () );
vbhl->set_spacing(4);
Gtk::Label* hll = Gtk::manage( new Gtk::Label (M("PREFERENCES_HLTHRESHOLD") + ": "));
setExpandAlignProperties(hll, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
hlThresh = Gtk::manage( new Gtk::SpinButton () );
setExpandAlignProperties(hlThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE);
hlThresh->set_digits (0);
hlThresh->set_increments (1, 10);
hlThresh->set_range (0, 255);
vbhl->pack_start (*hll, Gtk::PACK_SHRINK, 0);
vbhl->pack_end (*hlThresh, Gtk::PACK_SHRINK, 0);
clipGrid->attach_next_to(*hll, Gtk::POS_LEFT, 1, 1);
clipGrid->attach_next_to(*hlThresh, *hll, Gtk::POS_RIGHT, 1, 1);
vbrl->pack_start (*vbhl, Gtk::PACK_SHRINK, 0);
Gtk::HBox* vbsh = Gtk::manage( new Gtk::HBox () );
vbsh->set_spacing (4);
Gtk::Label* shl = Gtk::manage( new Gtk::Label (M("PREFERENCES_SHTHRESHOLD") + ": ") );
setExpandAlignProperties(shl, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
shThresh = Gtk::manage( new Gtk::SpinButton () );
setExpandAlignProperties(shThresh, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE);
shThresh->show ();
shThresh->set_digits (0);
shThresh->set_increments (1, 10);
shThresh->set_range (0, 255);
vbsh->pack_start (*shl, Gtk::PACK_SHRINK, 0);
vbsh->pack_end (*shThresh, Gtk::PACK_SHRINK, 0);
vbrl->pack_start (*vbsh, Gtk::PACK_SHRINK, 0);
clipGrid->attach_next_to(*shl, *hll, Gtk::POS_BOTTOM, 1, 1);
clipGrid->attach_next_to(*shThresh, *shl, Gtk::POS_RIGHT, 1, 1);
frl->add (*vbrl);
hbcd->pack_start (*frl, true, true, 0);
fclip->add (*clipGrid);
mvbsd->attach_next_to(*fclip, *ftheme, Gtk::POS_BOTTOM, 1, 1);
//---
// ---------------------------------------------
Gtk::Frame* navigationFrame = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NAVIGATIONFRAME")) );
Gtk::VBox* navigationVBox = Gtk::manage( new Gtk::VBox () );
navigationVBox->set_border_width(4);
Gtk::Frame* fnav = Gtk::manage( new Gtk::Frame (M("PREFERENCES_NAVIGATIONFRAME")) );
fnav->set_border_width(4);
setExpandAlignProperties(fclip, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::Grid* navigationGrid = Gtk::manage( new Gtk::Grid() );
navigationGrid->set_column_spacing(4);
navigationGrid->set_row_spacing(4);
setExpandAlignProperties(fclip, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::HBox* panFactorHBox = Gtk::manage( new Gtk::HBox () );
Gtk::Label* panFactorLabel = Gtk::manage( new Gtk::Label (M("PREFERENCES_PANFACTORLABEL") + ":", Gtk::ALIGN_START));
setExpandAlignProperties(panFactorLabel, true, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
panFactor = Gtk::manage( new Gtk::SpinButton () );
setExpandAlignProperties(panFactor, false, false, Gtk::ALIGN_END, Gtk::ALIGN_BASELINE);
panFactor->set_digits (0);
panFactor->set_increments (1, 5);
panFactor->set_range (1, 10);
panFactorHBox->pack_start (*panFactorLabel);
panFactorHBox->pack_end (*panFactor, Gtk::PACK_SHRINK);
navigationGrid->attach_next_to(*panFactorLabel, Gtk::POS_LEFT, 1, 1);
navigationGrid->attach_next_to(*panFactor, *panFactorLabel, Gtk::POS_RIGHT, 1, 1);
rememberZoomPanCheckbutton = Gtk::manage( new Gtk::CheckButton (M("PREFERENCES_REMEMBERZOOMPAN")) );
setExpandAlignProperties(rememberZoomPanCheckbutton, false, false, Gtk::ALIGN_START, Gtk::ALIGN_BASELINE);
rememberZoomPanCheckbutton->set_tooltip_text(M("PREFERENCES_REMEMBERZOOMPAN_TOOLTIP"));
navigationVBox->pack_start (*panFactorHBox, Gtk::PACK_SHRINK);
navigationVBox->pack_start (*rememberZoomPanCheckbutton, Gtk::PACK_SHRINK);
navigationFrame->add (*navigationVBox);
navigationGrid->attach_next_to(*rememberZoomPanCheckbutton, *panFactorLabel, Gtk::POS_BOTTOM, 2, 1);
hbcd->pack_start (*navigationFrame);
mvbsd->pack_start (*hbcd, Gtk::PACK_SHRINK, 0);
fnav->add (*navigationGrid);
mvbsd->attach_next_to(*fnav, *fclip, Gtk::POS_RIGHT, 1, 1);
//-----
// ---------------------------------------------
Gtk::Frame* fdg = Gtk::manage( new Gtk::Frame (M("PREFERENCES_EXTERNALEDITOR")) );
Gtk::VBox* dgvb = Gtk::manage( new Gtk::VBox () );
fdg->set_border_width(4);
setExpandAlignProperties(fdg, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::Grid* externaleditorGrid = Gtk::manage( new Gtk::Grid() );
externaleditorGrid->set_column_spacing(4);
externaleditorGrid->set_row_spacing(4);
setExpandAlignProperties(externaleditorGrid, false, false, Gtk::ALIGN_FILL, Gtk::ALIGN_FILL);
Gtk::HBox* hb7c = Gtk::manage( new Gtk::HBox () );
edOther = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_EDITORCMDLINE") + ":"));
hb7c->pack_start (*edOther, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(edOther, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
editorToSendTo = Gtk::manage( new Gtk::Entry () );
hb7c->pack_start (*editorToSendTo);
setExpandAlignProperties(editorToSendTo, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_BASELINE);
Gtk::RadioButton::Group ge = edOther->get_group();
#ifdef __APPLE__
Gtk::HBox* hb7 = Gtk::manage( new Gtk::HBox () );
edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") );
hb7->pack_start (*edGimp, Gtk::PACK_SHRINK, 4);
dgvb->pack_start (*hb7, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
edGimp->set_group (ge);
externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 2, 1);
Gtk::HBox* hb7b = Gtk::manage( new Gtk::HBox () );
edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":"));
hb7b->pack_start (*edPS, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) );
hb7b->pack_start (*psDir);
dgvb->pack_start (*hb7b, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
externaleditorGrid->attach_next_to(*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*psDir, *edPS, Gtk::POS_RIGHT, 1, 1);
edPS->set_group (ge);
externaleditorGrid->attach_next_to(*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1);
#elif defined WIN32
Gtk::HBox* hb7 = Gtk::manage( new Gtk::HBox () );
edGimp = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_GIMPPATH") + ":") );
hb7->pack_start (*edGimp, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
gimpDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_GIMPPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) );
hb7->pack_start (*gimpDir);
dgvb->pack_start (*hb7, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(gimpDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 1, 1);
externaleditorGrid->attach_next_to(*gimpDir, *edGimp, Gtk::POS_RIGHT, 1, 1);
edGimp->set_group (ge);
Gtk::HBox* hb7b = Gtk::manage( new Gtk::HBox ());
edPS = Gtk::manage( new Gtk::RadioButton (M("PREFERENCES_PSPATH") + ":") );
hb7b->pack_start (*edPS, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(edPS, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
psDir = Gtk::manage( new Gtk::FileChooserButton (M("PREFERENCES_PSPATH"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER) );
hb7b->pack_start (*psDir);
dgvb->pack_start (*hb7b, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(psDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
externaleditorGrid->attach_next_to(*edPS, *edGimp, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*psDir, *edPS, Gtk::POS_RIGHT, 1, 1);
edPS->set_group (ge);
externaleditorGrid->attach_next_to(*edOther, *edPS, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1);
#else
Gtk::HBox* hb7 = Gtk::manage( new Gtk::HBox () );
edGimp = Gtk::manage( new Gtk::RadioButton ("GIMP") );
hb7->pack_start (*edGimp, Gtk::PACK_SHRINK, 4);
dgvb->pack_start (*hb7, Gtk::PACK_SHRINK, 4);
setExpandAlignProperties(edGimp, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
externaleditorGrid->attach_next_to(*edGimp, Gtk::POS_TOP, 2, 1);
edGimp->set_group (ge);
externaleditorGrid->attach_next_to(*edOther, *edGimp, Gtk::POS_BOTTOM, 1, 1);
externaleditorGrid->attach_next_to(*editorToSendTo, *edOther, Gtk::POS_RIGHT, 1, 1);
#endif
dgvb->pack_start (*hb7c, Gtk::PACK_SHRINK, 4);
dgvb->set_border_width (4);
fdg->add (*dgvb);
mvbsd->pack_start (*fdg, Gtk::PACK_SHRINK, 4);
mvbsd->set_border_width (4);
fdg->add (*externaleditorGrid);
mvbsd->attach_next_to(*fdg, *fclip, Gtk::POS_BOTTOM, 2, 1);
langAutoDetectConn = ckbLangAutoDetect->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::langAutoDetectToggled));
tconn = theme->signal_changed().connect( sigc::mem_fun(*this, &Preferences::themeChanged) );
sconn = slimUI->signal_clicked().connect( sigc::mem_fun(*this, &Preferences::themeChanged) );
fconn = fontbutton->signal_font_set().connect( sigc::mem_fun(*this, &Preferences::fontChanged) );
@@ -2098,10 +2131,10 @@ void Preferences::useThemeChanged()
{
if(!chUseSystemTheme->get_active()) {
hbtheme->set_sensitive(true);
theme->set_sensitive(true);
fontbutton->set_sensitive(true);
} else {
hbtheme->set_sensitive(false);
theme->set_sensitive(false);
fontbutton->set_sensitive(false);
}
}