Merge branch 'dev' into browse-subfolder
This commit is contained in:
@@ -85,7 +85,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
trashButtonBox = Gtk::manage( new Gtk::Box(Gtk::ORIENTATION_VERTICAL) );
|
||||
Gtk::Button* emptyT = Gtk::manage( new Gtk::Button ());
|
||||
emptyT->set_tooltip_markup (M("FILEBROWSER_EMPTYTRASHHINT"));
|
||||
emptyT->set_image (*Gtk::manage(new RTImage ("trash-delete.png")));
|
||||
emptyT->set_image (*Gtk::manage(new RTImage ("trash-delete", Gtk::ICON_SIZE_LARGE_TOOLBAR)));
|
||||
emptyT->signal_pressed().connect (sigc::mem_fun(*this, &FileCatalog::emptyTrash));
|
||||
trashButtonBox->pack_start (*emptyT, Gtk::PACK_SHRINK, 4);
|
||||
emptyT->show ();
|
||||
@@ -95,8 +95,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
hbToolBar1 = Gtk::manage(new Gtk::Box ());
|
||||
|
||||
//setup BrowsePath
|
||||
iRefreshWhite = new RTImage("refresh-small.png");
|
||||
iRefreshRed = new RTImage("refresh-red-small.png");
|
||||
iRefreshWhite = new RTImage("refresh-small", Gtk::ICON_SIZE_BUTTON);
|
||||
iRefreshRed = new RTImage("refresh-red-small", Gtk::ICON_SIZE_BUTTON);
|
||||
|
||||
BrowsePath = Gtk::manage(new Gtk::Entry ());
|
||||
BrowsePath->set_width_chars (50);
|
||||
@@ -115,7 +115,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("cancel-small.png");
|
||||
iQueryClear = new RTImage("cancel-small", Gtk::ICON_SIZE_BUTTON);
|
||||
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("");
|
||||
@@ -153,8 +153,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
pack_start (*stb, Gtk::PACK_SHRINK);
|
||||
|
||||
tbLeftPanel_1 = new Gtk::ToggleButton ();
|
||||
iLeftPanel_1_Show = new RTImage("panel-to-right.png");
|
||||
iLeftPanel_1_Hide = new RTImage("panel-to-left.png");
|
||||
iLeftPanel_1_Show = new RTImage("panel-to-right", Gtk::ICON_SIZE_LARGE_TOOLBAR);
|
||||
iLeftPanel_1_Hide = new RTImage("panel-to-left", Gtk::ICON_SIZE_LARGE_TOOLBAR);
|
||||
|
||||
tbLeftPanel_1->set_relief(Gtk::RELIEF_NONE);
|
||||
tbLeftPanel_1->set_active (true);
|
||||
@@ -166,11 +166,11 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
vSepiLeftPanel = new Gtk::Separator(Gtk::ORIENTATION_VERTICAL);
|
||||
buttonBar->pack_start (*vSepiLeftPanel, Gtk::PACK_SHRINK);
|
||||
|
||||
iFilterClear = new RTImage ("filter-clear.png");
|
||||
igFilterClear = new RTImage ("filter.png");
|
||||
iFilterClear = new RTImage ("filter-clear", Gtk::ICON_SIZE_LARGE_TOOLBAR);
|
||||
igFilterClear = new RTImage ("filter", Gtk::ICON_SIZE_LARGE_TOOLBAR);
|
||||
bFilterClear = Gtk::manage(new Gtk::ToggleButton ());
|
||||
bFilterClear->set_active (true);
|
||||
bFilterClear->set_image(*iFilterClear);// (*Gtk::manage(new RTImage ("filter-clear.png")));
|
||||
bFilterClear->set_image(*iFilterClear);
|
||||
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);
|
||||
@@ -184,8 +184,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
fltrLabelbox = Gtk::manage (new Gtk::Box());
|
||||
fltrLabelbox->get_style_context()->add_class("smallbuttonbox");
|
||||
|
||||
iUnRanked = new RTImage ("star-gold-hollow-small.png");
|
||||
igUnRanked = new RTImage ("star-hollow-small.png");
|
||||
iUnRanked = new RTImage ("star-gold-hollow-small", Gtk::ICON_SIZE_BUTTON);
|
||||
igUnRanked = new RTImage ("star-hollow-small", Gtk::ICON_SIZE_BUTTON);
|
||||
bUnRanked = Gtk::manage( new Gtk::ToggleButton () );
|
||||
bUnRanked->get_style_context()->add_class("smallbutton");
|
||||
bUnRanked->set_active (false);
|
||||
@@ -197,8 +197,8 @@ 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 ("star-gold-small.png");
|
||||
igranked[i] = new RTImage ("star-small.png");
|
||||
iranked[i] = new RTImage ("star-gold-small", Gtk::ICON_SIZE_BUTTON);
|
||||
igranked[i] = new RTImage ("star-small", Gtk::ICON_SIZE_BUTTON);
|
||||
iranked[i]->show ();
|
||||
igranked[i]->show ();
|
||||
bRank[i] = Gtk::manage( new Gtk::ToggleButton () );
|
||||
@@ -212,11 +212,11 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
|
||||
// Toolbar
|
||||
// Similar image arrays in filebrowser.cc
|
||||
std::array<std::string, 6> clabelActiveIcons = {"circle-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-gray-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"};
|
||||
std::array<std::string, 6> clabelActiveIcons = {"circle-gray-small", "circle-red-small", "circle-yellow-small", "circle-green-small", "circle-blue-small", "circle-purple-small"};
|
||||
std::array<std::string, 6> clabelInactiveIcons = {"circle-empty-gray-small", "circle-empty-red-small", "circle-empty-yellow-small", "circle-empty-green-small", "circle-empty-blue-small", "circle-empty-purple-small"};
|
||||
|
||||
iUnCLabeled = new RTImage(clabelActiveIcons[0]);
|
||||
igUnCLabeled = new RTImage(clabelInactiveIcons[0]);
|
||||
iUnCLabeled = new RTImage(clabelActiveIcons[0], Gtk::ICON_SIZE_BUTTON);
|
||||
igUnCLabeled = new RTImage(clabelInactiveIcons[0], Gtk::ICON_SIZE_BUTTON);
|
||||
bUnCLabeled = Gtk::manage(new Gtk::ToggleButton());
|
||||
bUnCLabeled->get_style_context()->add_class("smallbutton");
|
||||
bUnCLabeled->set_active(false);
|
||||
@@ -228,8 +228,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
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(clabelActiveIcons[i+1]);
|
||||
igCLabeled[i] = new RTImage(clabelInactiveIcons[i+1]);
|
||||
iCLabeled[i] = new RTImage(clabelActiveIcons[i+1], Gtk::ICON_SIZE_BUTTON);
|
||||
igCLabeled[i] = new RTImage(clabelInactiveIcons[i+1], Gtk::ICON_SIZE_BUTTON);
|
||||
iCLabeled[i]->show();
|
||||
igCLabeled[i]->show();
|
||||
bCLabel[i] = Gtk::manage(new Gtk::ToggleButton());
|
||||
@@ -269,10 +269,10 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
// 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");
|
||||
iEdited[0] = new RTImage ("tick-hollow-small", Gtk::ICON_SIZE_BUTTON);
|
||||
igEdited[0] = new RTImage ("tick-hollow-small", Gtk::ICON_SIZE_BUTTON);
|
||||
iEdited[1] = new RTImage ("tick-small", Gtk::ICON_SIZE_BUTTON);
|
||||
igEdited[1] = new RTImage ("tick-small", Gtk::ICON_SIZE_BUTTON);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
iEdited[i]->show ();
|
||||
@@ -294,10 +294,10 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
// 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");
|
||||
iRecentlySaved[0] = new RTImage ("saved-no-small", Gtk::ICON_SIZE_BUTTON);
|
||||
igRecentlySaved[0] = new RTImage ("saved-no-small", Gtk::ICON_SIZE_BUTTON);
|
||||
iRecentlySaved[1] = new RTImage ("saved-yes-small", Gtk::ICON_SIZE_BUTTON);
|
||||
igRecentlySaved[1] = new RTImage ("saved-yes-small", Gtk::ICON_SIZE_BUTTON);
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
iRecentlySaved[i]->show ();
|
||||
@@ -322,8 +322,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
buttonBar->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK);
|
||||
|
||||
// Trash
|
||||
iTrashShowEmpty = new RTImage("trash-empty-show.png") ;
|
||||
iTrashShowFull = new RTImage("trash-full-show.png") ;
|
||||
iTrashShowEmpty = new RTImage("trash-empty-show", Gtk::ICON_SIZE_LARGE_TOOLBAR) ;
|
||||
iTrashShowFull = new RTImage("trash-full-show", Gtk::ICON_SIZE_LARGE_TOOLBAR) ;
|
||||
|
||||
bTrash = Gtk::manage( new Gtk::ToggleButton () );
|
||||
bTrash->set_image (*iTrashShowEmpty);
|
||||
@@ -332,8 +332,8 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
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.png");
|
||||
iNotTrash = new RTImage("trash-hide-deleted", Gtk::ICON_SIZE_LARGE_TOOLBAR) ;
|
||||
iOriginal = new RTImage("filter-original", Gtk::ICON_SIZE_LARGE_TOOLBAR);
|
||||
|
||||
bNotTrash = Gtk::manage( new Gtk::ToggleButton () );
|
||||
bNotTrash->set_image (*iNotTrash);
|
||||
@@ -410,7 +410,7 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
categoryButtons[19] = bOriginal;
|
||||
|
||||
exifInfo = Gtk::manage(new Gtk::ToggleButton ());
|
||||
exifInfo->set_image (*Gtk::manage(new RTImage ("info.png")));
|
||||
exifInfo->set_image (*Gtk::manage(new RTImage ("info", Gtk::ICON_SIZE_LARGE_TOOLBAR)));
|
||||
exifInfo->set_relief (Gtk::RELIEF_NONE);
|
||||
exifInfo->set_tooltip_markup (M("FILEBROWSER_SHOWEXIFINFO"));
|
||||
exifInfo->set_active( options.showFileNames );
|
||||
@@ -420,13 +420,13 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
// thumbnail zoom
|
||||
Gtk::Box* zoomBox = Gtk::manage( new Gtk::Box () );
|
||||
zoomInButton = Gtk::manage( new Gtk::Button () );
|
||||
zoomInButton->set_image (*Gtk::manage(new RTImage ("magnifier-plus.png")));
|
||||
zoomInButton->set_image (*Gtk::manage(new RTImage ("magnifier-plus", Gtk::ICON_SIZE_LARGE_TOOLBAR)));
|
||||
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 ("magnifier-minus.png")));
|
||||
zoomOutButton->set_image (*Gtk::manage(new RTImage ("magnifier-minus", Gtk::ICON_SIZE_LARGE_TOOLBAR)));
|
||||
zoomOutButton->signal_pressed().connect (sigc::mem_fun(*this, &FileCatalog::zoomOut));
|
||||
zoomOutButton->set_relief (Gtk::RELIEF_NONE);
|
||||
zoomOutButton->set_tooltip_markup (M("FILEBROWSER_ZOOMOUTHINT"));
|
||||
@@ -435,17 +435,14 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||
buttonBar->pack_start (*zoomBox, Gtk::PACK_SHRINK);
|
||||
buttonBar->pack_start (*Gtk::manage(new Gtk::Separator(Gtk::ORIENTATION_VERTICAL)), Gtk::PACK_SHRINK);
|
||||
|
||||
//iRightArrow = new RTImage("right.png");
|
||||
//iRightArrow_red = new RTImage("right_red.png");
|
||||
|
||||
// if it IS a single row toolbar
|
||||
if (options.FileBrowserToolbarSingleRow) {
|
||||
buttonBar->pack_start (*hbToolBar1, Gtk::PACK_EXPAND_WIDGET, 0);
|
||||
}
|
||||
|
||||
tbRightPanel_1 = new Gtk::ToggleButton ();
|
||||
iRightPanel_1_Show = new RTImage("panel-to-left.png");
|
||||
iRightPanel_1_Hide = new RTImage("panel-to-right.png");
|
||||
iRightPanel_1_Show = new RTImage("panel-to-left", Gtk::ICON_SIZE_LARGE_TOOLBAR);
|
||||
iRightPanel_1_Hide = new RTImage("panel-to-right", Gtk::ICON_SIZE_LARGE_TOOLBAR);
|
||||
|
||||
tbRightPanel_1->set_relief(Gtk::RELIEF_NONE);
|
||||
tbRightPanel_1->set_active (true);
|
||||
@@ -538,7 +535,7 @@ void FileCatalog::on_realize()
|
||||
{
|
||||
|
||||
Gtk::Box::on_realize();
|
||||
Pango::FontDescription fontd = get_pango_context()->get_font_description ();
|
||||
Pango::FontDescription fontd = get_style_context()->get_font();
|
||||
fileBrowser->get_pango_context()->set_font_description (fontd);
|
||||
// batchQueue->get_pango_context()->set_font_description (fontd);
|
||||
}
|
||||
@@ -776,7 +773,8 @@ void FileCatalog::_refreshProgressBar ()
|
||||
// create tab label once
|
||||
Gtk::Notebook *nb = (Gtk::Notebook *)(filepanel->get_parent());
|
||||
Gtk::Grid* grid = Gtk::manage(new Gtk::Grid());
|
||||
progressImage = Gtk::manage(new RTImage("folder-closed.png"));
|
||||
setExpandAlignProperties (grid, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER);
|
||||
progressImage = Gtk::manage(new RTImage("folder-closed", Gtk::ICON_SIZE_LARGE_TOOLBAR));
|
||||
progressLabel = Gtk::manage(new Gtk::Label(M("MAIN_FRAME_FILEBROWSER")));
|
||||
grid->attach_next_to(*progressImage, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
|
||||
grid->attach_next_to(*progressLabel, options.mainNBVertical ? Gtk::POS_TOP : Gtk::POS_RIGHT, 1, 1);
|
||||
@@ -790,14 +788,14 @@ void FileCatalog::_refreshProgressBar ()
|
||||
}
|
||||
}
|
||||
if (!previewsToLoad) {
|
||||
progressImage->changeImage("folder-closed.png");
|
||||
progressImage->set_from_icon_name("folder-closed", Gtk::ICON_SIZE_LARGE_TOOLBAR);
|
||||
int filteredCount = min(fileBrowser->getNumFiltered(), previewsLoaded);
|
||||
progressLabel->set_text(M("MAIN_FRAME_FILEBROWSER") +
|
||||
(filteredCount != previewsLoaded ? " [" + Glib::ustring::format(filteredCount) + "/" : " (")
|
||||
+ Glib::ustring::format(previewsLoaded) +
|
||||
(filteredCount != previewsLoaded ? "]" : ")"));
|
||||
} else {
|
||||
progressImage->changeImage("magnifier.png");
|
||||
progressImage->set_from_icon_name("magnifier", Gtk::ICON_SIZE_LARGE_TOOLBAR);
|
||||
progressLabel->set_text(M("MAIN_FRAME_FILEBROWSER") + " ["
|
||||
+ Glib::ustring::format(previewsLoaded) + "/"
|
||||
+ Glib::ustring::format(previewsToLoad) + "]" );
|
||||
@@ -1397,11 +1395,11 @@ bool FileCatalog::isInTabMode() const
|
||||
void FileCatalog::categoryButtonToggled (Gtk::ToggleButton* b, bool isMouseClick)
|
||||
{
|
||||
|
||||
//was control key pressed
|
||||
bool control_down = modifierKey & GDK_CONTROL_MASK;
|
||||
//was control key pressed (ignored if was not mouse click)
|
||||
bool control_down = modifierKey & GDK_CONTROL_MASK && isMouseClick;
|
||||
|
||||
//was shift key pressed
|
||||
bool shift_down = modifierKey & GDK_SHIFT_MASK;
|
||||
//was shift key pressed (ignored if was not mouse click)
|
||||
bool shift_down = modifierKey & GDK_SHIFT_MASK && isMouseClick;
|
||||
|
||||
// The event is process here, we can clear modifierKey now, it'll be set again on the next even
|
||||
modifierKey = 0;
|
||||
@@ -2324,7 +2322,7 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event)
|
||||
|
||||
#ifdef __WIN32__
|
||||
|
||||
if (!alt && !shift && !altgr) { // shift is reserved for ranking
|
||||
if (!alt && shift && !altgr) {
|
||||
switch(event->hardware_keycode) {
|
||||
case 0x30:
|
||||
categoryButtonToggled(bUnRanked, false);
|
||||
@@ -2412,7 +2410,7 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event)
|
||||
|
||||
#else
|
||||
|
||||
if (!alt && !shift && !altgr) { // shift is reserved for ranking
|
||||
if (!alt && shift && !altgr) {
|
||||
switch(event->hardware_keycode) {
|
||||
case 0x13:
|
||||
categoryButtonToggled(bUnRanked, false);
|
||||
|
Reference in New Issue
Block a user