Merge branch 'dev' into testoutputprofile

This commit is contained in:
Hombre
2018-07-22 03:25:49 +02:00
2033 changed files with 40818 additions and 190141 deletions

View File

@@ -74,7 +74,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
trashButtonBox = Gtk::manage( new Gtk::VBox );
Gtk::Button* emptyT = Gtk::manage( new Gtk::Button ());
emptyT->set_tooltip_markup (M("FILEBROWSER_EMPTYTRASHHINT"));
emptyT->set_image (*Gtk::manage(new RTImage ("trash.png")));
emptyT->set_image (*Gtk::manage(new RTImage ("trash-delete.png")));
emptyT->signal_pressed().connect (sigc::mem_fun(*this, &FileCatalog::emptyTrash));
trashButtonBox->pack_start (*emptyT, Gtk::PACK_SHRINK, 4);
emptyT->show ();
@@ -84,8 +84,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
hbToolBar1 = Gtk::manage(new Gtk::HBox ());
//setup BrowsePath
iRefreshWhite = new RTImage("refresh-white.png");
iRefreshRed = new RTImage("refresh-red.png");
iRefreshWhite = new RTImage("refresh-small.png");
iRefreshRed = new RTImage("refresh-red-small.png");
BrowsePath = Gtk::manage(new Gtk::Entry ());
BrowsePath->set_width_chars (50);
@@ -104,7 +104,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
BrowsePath->signal_key_press_event().connect(sigc::mem_fun(*this, &FileCatalog::BrowsePath_key_pressed));
//setup Query
iQueryClear = new RTImage("gtk-close-small.png");
iQueryClear = new RTImage("cancel-small.png");
Gtk::Label* labelQuery = Gtk::manage(new Gtk::Label(M("FILEBROWSER_QUERYLABEL")));
Query = Gtk::manage(new Gtk::Entry ()); // cannot use Gtk::manage here as FileCatalog::getFilter will fail on Query->get_text()
Query->set_text("");
@@ -149,11 +149,11 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
vSepiLeftPanel = new Gtk::VSeparator ();
buttonBar->pack_start (*vSepiLeftPanel, Gtk::PACK_SHRINK);
iFilterClear = new RTImage ("filterclear.png");
iFilterClear = new RTImage ("filter-clear.png");
igFilterClear = new RTImage ("filter.png");
bFilterClear = Gtk::manage(new Gtk::ToggleButton ());
bFilterClear->set_active (true);
bFilterClear->set_image(*iFilterClear);// (*Gtk::manage(new RTImage ("filterclear.png")));
bFilterClear->set_image(*iFilterClear);// (*Gtk::manage(new RTImage ("filter-clear.png")));
bFilterClear->set_relief (Gtk::RELIEF_NONE);
bFilterClear->set_tooltip_markup (M("FILEBROWSER_SHOWDIRHINT"));
bFilterClear->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
@@ -163,11 +163,14 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
fltrVbox1 = Gtk::manage (new Gtk::VBox());
fltrRankbox = Gtk::manage (new Gtk::HBox());
fltrRankbox->get_style_context()->add_class("smallbuttonbox");
fltrLabelbox = Gtk::manage (new Gtk::HBox());
fltrLabelbox->get_style_context()->add_class("smallbuttonbox");
iUnRanked = new RTImage ("ratednot.png");
igUnRanked = new RTImage ("ratednotg.png");
iUnRanked = new RTImage ("star-gold-hollow-small.png");
igUnRanked = new RTImage ("star-hollow-small.png");
bUnRanked = Gtk::manage( new Gtk::ToggleButton () );
bUnRanked->get_style_context()->add_class("smallbutton");
bUnRanked->set_active (false);
bUnRanked->set_image (*igUnRanked);
bUnRanked->set_relief (Gtk::RELIEF_NONE);
@@ -177,11 +180,12 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
bUnRanked->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
for (int i = 0; i < 5; i++) {
iranked[i] = new RTImage ("rated.png");
igranked[i] = new RTImage ("grayrated.png");
iranked[i] = new RTImage ("star-gold-small.png");
igranked[i] = new RTImage ("star-small.png");
iranked[i]->show ();
igranked[i]->show ();
bRank[i] = Gtk::manage( new Gtk::ToggleButton () );
bRank[i]->get_style_context()->add_class("smallbutton");
bRank[i]->set_image (*igranked[i]);
bRank[i]->set_relief (Gtk::RELIEF_NONE);
fltrRankbox->pack_start (*bRank[i], Gtk::PACK_SHRINK);
@@ -189,26 +193,32 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
bRank[i]->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
}
iUnCLabeled = new RTImage ("clabel0.png");
igUnCLabeled = new RTImage ("cglabel0.png");
bUnCLabeled = Gtk::manage(new Gtk::ToggleButton ());
bUnCLabeled->set_active (false);
bUnCLabeled->set_image (*igUnCLabeled);
bUnCLabeled->set_relief (Gtk::RELIEF_NONE);
bUnCLabeled->set_tooltip_markup (M("FILEBROWSER_SHOWUNCOLORHINT"));
// Same image arrays in filebrowser.cc
std::array<std::string, 6> clabelActiveIcons = {"circle-empty-gray-small.png", "circle-red-small.png", "circle-yellow-small.png", "circle-green-small.png", "circle-blue-small.png", "circle-purple-small.png"};
std::array<std::string, 6> clabelInactiveIcons = {"circle-empty-darkgray-small.png", "circle-empty-red-small.png", "circle-empty-yellow-small.png", "circle-empty-green-small.png", "circle-empty-blue-small.png", "circle-empty-purple-small.png"};
iUnCLabeled = new RTImage(clabelActiveIcons[0]);
igUnCLabeled = new RTImage(clabelInactiveIcons[0]);
bUnCLabeled = Gtk::manage(new Gtk::ToggleButton());
bUnCLabeled->get_style_context()->add_class("smallbutton");
bUnCLabeled->set_active(false);
bUnCLabeled->set_image(*igUnCLabeled);
bUnCLabeled->set_relief(Gtk::RELIEF_NONE);
bUnCLabeled->set_tooltip_markup(M("FILEBROWSER_SHOWUNCOLORHINT"));
bCateg[7] = bUnCLabeled->signal_toggled().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::categoryButtonToggled), bUnCLabeled, true));
fltrLabelbox->pack_start (*bUnCLabeled, Gtk::PACK_SHRINK);
fltrLabelbox->pack_start(*bUnCLabeled, Gtk::PACK_SHRINK);
bUnCLabeled->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
for (int i = 0; i < 5; i++) {
iCLabeled[i] = new RTImage (Glib::ustring::compose("%1%2%3", "clabel", i + 1, ".png"));
igCLabeled[i] = new RTImage (Glib::ustring::compose("%1%2%3", "cglabel", i + 1, ".png"));
iCLabeled[i]->show ();
igCLabeled[i]->show ();
bCLabel[i] = Gtk::manage(new Gtk::ToggleButton ());
bCLabel[i]->set_image (*igCLabeled[i]);
bCLabel[i]->set_relief (Gtk::RELIEF_NONE);
fltrLabelbox->pack_start (*bCLabel[i], Gtk::PACK_SHRINK);
iCLabeled[i] = new RTImage(clabelActiveIcons[i+1]);
igCLabeled[i] = new RTImage(clabelInactiveIcons[i+1]);
iCLabeled[i]->show();
igCLabeled[i]->show();
bCLabel[i] = Gtk::manage(new Gtk::ToggleButton());
bCLabel[i]->get_style_context()->add_class("smallbutton");
bCLabel[i]->set_image(*igCLabeled[i]);
bCLabel[i]->set_relief(Gtk::RELIEF_NONE);
fltrLabelbox->pack_start(*bCLabel[i], Gtk::PACK_SHRINK);
bCateg[i + 8] = bCLabel[i]->signal_toggled().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::categoryButtonToggled), bCLabel[i], true));
bCLabel[i]->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
}
@@ -233,17 +243,23 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
fltrVbox2 = Gtk::manage (new Gtk::VBox());
fltrEditedBox = Gtk::manage (new Gtk::HBox());
fltrEditedBox->get_style_context()->add_class("smallbuttonbox");
fltrRecentlySavedBox = Gtk::manage (new Gtk::HBox());
fltrRecentlySavedBox->get_style_context()->add_class("smallbuttonbox");
// bEdited
iEdited[0] = new RTImage ("editednot-small.png");
igEdited[0] = new RTImage ("editednotg-small.png");
iEdited[1] = new RTImage ("edited-small.png");
igEdited[1] = new RTImage ("editedg-small.png");
// TODO The "g" variant was the more transparent variant of the icon, used
// when the button was not toggled. Simplify this, change to ordinary
// togglebutton, use CSS for opacity change.
iEdited[0] = new RTImage ("tick-hollow-small.png");
igEdited[0] = new RTImage ("tick-hollow-small.png");
iEdited[1] = new RTImage ("tick-small.png");
igEdited[1] = new RTImage ("tick-small.png");
for (int i = 0; i < 2; i++) {
iEdited[i]->show ();
bEdited[i] = Gtk::manage(new Gtk::ToggleButton ());
bEdited[i]->get_style_context()->add_class("smallbutton");
bEdited[i]->set_active (false);
bEdited[i]->set_image (*igEdited[i]);
bEdited[i]->set_relief (Gtk::RELIEF_NONE);
@@ -257,14 +273,18 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
bEdited[1]->set_tooltip_markup (M("FILEBROWSER_SHOWEDITEDHINT"));
// RecentlySaved
iRecentlySaved[0] = new RTImage ("savednot.png");
igRecentlySaved[0] = new RTImage ("savednotg.png");
iRecentlySaved[1] = new RTImage ("saved.png");
igRecentlySaved[1] = new RTImage ("savedg.png");
// TODO The "g" variant was the more transparent variant of the icon, used
// when the button was not toggled. Simplify this, change to ordinary
// togglebutton, use CSS for opacity change.
iRecentlySaved[0] = new RTImage ("saved-no-small.png");
igRecentlySaved[0] = new RTImage ("saved-no-small.png");
iRecentlySaved[1] = new RTImage ("saved-yes-small.png");
igRecentlySaved[1] = new RTImage ("saved-yes-small.png");
for (int i = 0; i < 2; i++) {
iRecentlySaved[i]->show ();
bRecentlySaved[i] = Gtk::manage(new Gtk::ToggleButton ());
bRecentlySaved[i]->get_style_context()->add_class("smallbutton");
bRecentlySaved[i]->set_active (false);
bRecentlySaved[i]->set_image (*igRecentlySaved[i]);
bRecentlySaved[i]->set_relief (Gtk::RELIEF_NONE);
@@ -284,18 +304,18 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
buttonBar->pack_start (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK);
// Trash
iTrashEmpty = new RTImage("trash-show-empty.png") ;
iTrashFull = new RTImage("trash-show-full.png") ;
iTrashShowEmpty = new RTImage("trash-empty-show.png") ;
iTrashShowFull = new RTImage("trash-full-show.png") ;
bTrash = Gtk::manage( new Gtk::ToggleButton () );
bTrash->set_image (*iTrashEmpty);
bTrash->set_image (*iTrashShowEmpty);
bTrash->set_relief (Gtk::RELIEF_NONE);
bTrash->set_tooltip_markup (M("FILEBROWSER_SHOWTRASHHINT"));
bCateg[17] = bTrash->signal_toggled().connect (sigc::bind(sigc::mem_fun(*this, &FileCatalog::categoryButtonToggled), bTrash, true));
bTrash->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event), false);
iNotTrash = new RTImage("trash-hide-deleted.png") ;
iOriginal = new RTImage("filter-original-2.png");
iOriginal = new RTImage("filter-original.png");
bNotTrash = Gtk::manage( new Gtk::ToggleButton () );
bNotTrash->set_image (*iNotTrash);
@@ -374,13 +394,13 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
// thumbnail zoom
Gtk::HBox* zoomBox = Gtk::manage( new Gtk::HBox () );
zoomInButton = Gtk::manage( new Gtk::Button () );
zoomInButton->set_image (*Gtk::manage(new RTImage ("gtk-zoom-in.png")));
zoomInButton->set_image (*Gtk::manage(new RTImage ("magnifier-plus.png")));
zoomInButton->signal_pressed().connect (sigc::mem_fun(*this, &FileCatalog::zoomIn));
zoomInButton->set_relief (Gtk::RELIEF_NONE);
zoomInButton->set_tooltip_markup (M("FILEBROWSER_ZOOMINHINT"));
zoomBox->pack_end (*zoomInButton, Gtk::PACK_SHRINK);
zoomOutButton = Gtk::manage( new Gtk::Button () );
zoomOutButton->set_image (*Gtk::manage(new RTImage ("gtk-zoom-out.png")));
zoomOutButton->set_image (*Gtk::manage(new RTImage ("magnifier-minus.png")));
zoomOutButton->signal_pressed().connect (sigc::mem_fun(*this, &FileCatalog::zoomOut));
zoomOutButton->set_relief (Gtk::RELIEF_NONE);
zoomOutButton->set_tooltip_markup (M("FILEBROWSER_ZOOMOUTHINT"));
@@ -461,8 +481,8 @@ FileCatalog::~FileCatalog()
delete igUnRanked;
delete iUnCLabeled;
delete igUnCLabeled;
delete iTrashEmpty;
delete iTrashFull;
delete iTrashShowEmpty;
delete iTrashShowFull;
delete iNotTrash;
delete iOriginal;
delete iRefreshWhite;
@@ -692,7 +712,7 @@ void FileCatalog::_refreshProgressBar ()
Gtk::Label *label = nullptr;
if (!previewsToLoad ) {
grid->attach_next_to(*Gtk::manage (new RTImage ("gtk-directory.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
grid->attach_next_to(*Gtk::manage (new RTImage ("folder-closed.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
int filteredCount = min(fileBrowser->getNumFiltered(), previewsLoaded);
label = Gtk::manage (new Gtk::Label (M("MAIN_FRAME_FILEBROWSER") +
@@ -700,7 +720,7 @@ void FileCatalog::_refreshProgressBar ()
+ Glib::ustring::format(previewsLoaded) +
(filteredCount != previewsLoaded ? "]" : ")")));
} else {
grid->attach_next_to(*Gtk::manage (new RTImage ("gtk-find.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
grid->attach_next_to(*Gtk::manage (new RTImage ("magnifier.png")), options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
label = Gtk::manage (new Gtk::Label (M("MAIN_FRAME_FILEBROWSER") + " [" + Glib::ustring::format(std::fixed, std::setprecision(0), std::setw(3), (double)previewsLoaded / previewsToLoad * 100 ) + "%]" ));
filepanel->loadingThumbs("", (double)previewsLoaded / previewsToLoad);
}
@@ -1964,9 +1984,9 @@ void FileCatalog::setFilterPanel (FilterPanel* fpanel)
void FileCatalog::trashChanged ()
{
if (trashIsEmpty()) {
bTrash->set_image(*iTrashEmpty);
bTrash->set_image(*iTrashShowEmpty);
} else {
bTrash->set_image(*iTrashFull);
bTrash->set_image(*iTrashShowFull);
}
}