Panel hiding enhancements on behalf of Michael Ezra; See issue #458
Before Width: | Height: | Size: 752 B After Width: | Height: | Size: 3.2 KiB |
BIN
rtdata/images/folder_bw.png
Normal file
After Width: | Height: | Size: 355 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
rtdata/images/panel_to_left.png
Normal file
After Width: | Height: | Size: 692 B |
BIN
rtdata/images/panel_to_right.png
Normal file
After Width: | Height: | Size: 699 B |
BIN
rtdata/images/right.png
Normal file
After Width: | Height: | Size: 612 B |
BIN
rtdata/images/right_red.png
Normal file
After Width: | Height: | Size: 609 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 411 B |
Before Width: | Height: | Size: 405 B After Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 480 B |
Before Width: | Height: | Size: 600 B After Width: | Height: | Size: 728 B |
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 627 B |
@@ -49,6 +49,8 @@ FILEBROWSER_ADDDELTEMPLATE;Add/Del templates...
|
|||||||
FILEBROWSER_APPLYPROFILE;Apply profile
|
FILEBROWSER_APPLYPROFILE;Apply profile
|
||||||
FILEBROWSER_ARRANGEMENTHINT;Change between vertical/horizontal alignment of thumbnails
|
FILEBROWSER_ARRANGEMENTHINT;Change between vertical/horizontal alignment of thumbnails
|
||||||
FILEBROWSER_AUTODARKFRAME;Auto dark frame
|
FILEBROWSER_AUTODARKFRAME;Auto dark frame
|
||||||
|
FILEBROWSER_BROWSEPATHHINT;Type path to browse (Ctrl-Enter in File Browser)
|
||||||
|
FILEBROWSER_BROWSEPATHBUTTONHINT;Click to browse to the chosen path
|
||||||
FILEBROWSER_CLEARPROFILE;Clear profile
|
FILEBROWSER_CLEARPROFILE;Clear profile
|
||||||
FILEBROWSER_COPYPROFILE;Copy profile
|
FILEBROWSER_COPYPROFILE;Copy profile
|
||||||
FILEBROWSER_CURRENT_NAME;Current name:
|
FILEBROWSER_CURRENT_NAME;Current name:
|
||||||
@@ -322,8 +324,11 @@ MAIN_BUTTON_SENDTOEDITOR;Send to editor
|
|||||||
MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Edit current image in external editor <b>Ctrl+E</b>
|
MAIN_BUTTON_SENDTOEDITOR_TOOLTIP;Edit current image in external editor <b>Ctrl+E</b>
|
||||||
MAIN_BUTTON_UNFULLSCREEN;Exit fullscreen
|
MAIN_BUTTON_UNFULLSCREEN;Exit fullscreen
|
||||||
MAIN_FRAME_BATCHQUEUE;Batch Queue
|
MAIN_FRAME_BATCHQUEUE;Batch Queue
|
||||||
|
MAIN_FRAME_BATCHQUEUE_TOOLTIP; Batch Queue <b>Ctrl-F3</b>
|
||||||
MAIN_FRAME_EDITOR;Editor
|
MAIN_FRAME_EDITOR;Editor
|
||||||
|
MAIN_FRAME_EDITOR_TOOLTIP; Editor <b>Ctrl-F4</b>
|
||||||
MAIN_FRAME_FILEBROWSER;File Browser
|
MAIN_FRAME_FILEBROWSER;File Browser
|
||||||
|
MAIN_FRAME_FILEBROWSER_TOOLTIP; File Browser <b>Ctrl-F2</b>
|
||||||
MAIN_FRAME_PLACES;Places
|
MAIN_FRAME_PLACES;Places
|
||||||
MAIN_FRAME_PLACES_ADD;Add
|
MAIN_FRAME_PLACES_ADD;Add
|
||||||
MAIN_FRAME_PLACES_DEL;Del
|
MAIN_FRAME_PLACES_DEL;Del
|
||||||
@@ -363,6 +368,7 @@ MAIN_TOOLTIP_QINFO;Quick info on the image <b>I</b>
|
|||||||
MAIN_TOOLTIP_SAVE;Save image to the default folder
|
MAIN_TOOLTIP_SAVE;Save image to the default folder
|
||||||
MAIN_TOOLTIP_SAVEAS;Save image to a selected folder
|
MAIN_TOOLTIP_SAVEAS;Save image to a selected folder
|
||||||
MAIN_TOOLTIP_TOGGLE;Toggle before/after view <b>B</b>
|
MAIN_TOOLTIP_TOGGLE;Toggle before/after view <b>B</b>
|
||||||
|
MAIN_TOOLTIP_SHOWHIDELP1;Show/hide the left panel <b>H</b>
|
||||||
NAVIGATOR_B_NA;B = n/a
|
NAVIGATOR_B_NA;B = n/a
|
||||||
NAVIGATOR_B_VALUE;B = %1
|
NAVIGATOR_B_VALUE;B = %1
|
||||||
NAVIGATOR_G_NA;G = n/a
|
NAVIGATOR_G_NA;G = n/a
|
||||||
@@ -585,8 +591,8 @@ TP_CHMIXER_LABEL;Channel Mixer
|
|||||||
TP_CHMIXER_RED;Red
|
TP_CHMIXER_RED;Red
|
||||||
TP_COARSETRAF_DEGREE;degree:
|
TP_COARSETRAF_DEGREE;degree:
|
||||||
TP_COARSETRAF_TOOLTIP_HFLIP;Flip horizontally
|
TP_COARSETRAF_TOOLTIP_HFLIP;Flip horizontally
|
||||||
TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left
|
TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left <b>[</b>
|
||||||
TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right
|
TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right <b>]</b>
|
||||||
TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically
|
TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically
|
||||||
TP_COLORBOOST_ACHANNEL;Channel "a"
|
TP_COLORBOOST_ACHANNEL;Channel "a"
|
||||||
TP_COLORBOOST_AMOUNT;Amount
|
TP_COLORBOOST_AMOUNT;Amount
|
||||||
|
@@ -187,6 +187,7 @@ void BatchQueuePanel::updateTab (int qsize)
|
|||||||
l->set_angle (90);
|
l->set_angle (90);
|
||||||
vbb->pack_start (*l);
|
vbb->pack_start (*l);
|
||||||
vbb->set_spacing (2);
|
vbb->set_spacing (2);
|
||||||
|
vbb->set_tooltip_markup (M("MAIN_FRAME_BATCHQUEUE_TOOLTIP"));
|
||||||
vbb->show_all ();
|
vbb->show_all ();
|
||||||
nb->set_tab_label(*this,*vbb);
|
nb->set_tab_label(*this,*vbb);
|
||||||
} else {
|
} else {
|
||||||
@@ -202,6 +203,7 @@ void BatchQueuePanel::updateTab (int qsize)
|
|||||||
hbb->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE")+" [" +Glib::ustring::format( qsize )+"]" )));
|
hbb->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_BATCHQUEUE")+" [" +Glib::ustring::format( qsize )+"]" )));
|
||||||
}
|
}
|
||||||
hbb->set_spacing (2);
|
hbb->set_spacing (2);
|
||||||
|
hbb->set_tooltip_markup (M("MAIN_FRAME_BATCHQUEUE_TOOLTIP"));
|
||||||
hbb->show_all ();
|
hbb->show_all ();
|
||||||
nb->set_tab_label(*this,*hbb);
|
nb->set_tab_label(*this,*hbb);
|
||||||
}
|
}
|
||||||
|
@@ -51,8 +51,8 @@ CoarsePanel::CoarsePanel () : ToolPanel () {
|
|||||||
vflip->set_relief(Gtk::RELIEF_NONE);
|
vflip->set_relief(Gtk::RELIEF_NONE);
|
||||||
pack_start (*vflip);
|
pack_start (*vflip);
|
||||||
|
|
||||||
rotate_left->set_tooltip_text (M("TP_COARSETRAF_TOOLTIP_ROTLEFT"));
|
rotate_left->set_tooltip_markup (M("TP_COARSETRAF_TOOLTIP_ROTLEFT"));
|
||||||
rotate_right->set_tooltip_text (M("TP_COARSETRAF_TOOLTIP_ROTRIGHT"));
|
rotate_right->set_tooltip_markup (M("TP_COARSETRAF_TOOLTIP_ROTRIGHT"));
|
||||||
vflip->set_tooltip_text (M("TP_COARSETRAF_TOOLTIP_VFLIP"));
|
vflip->set_tooltip_text (M("TP_COARSETRAF_TOOLTIP_VFLIP"));
|
||||||
hflip->set_tooltip_text (M("TP_COARSETRAF_TOOLTIP_HFLIP"));
|
hflip->set_tooltip_text (M("TP_COARSETRAF_TOOLTIP_HFLIP"));
|
||||||
|
|
||||||
|
@@ -88,16 +88,19 @@ EditorPanel::EditorPanel (FilePanel* filePanel) : beforePreviewHandler(NULL), be
|
|||||||
Gtk::VSeparator* vseph = Gtk::manage (new Gtk::VSeparator ());
|
Gtk::VSeparator* vseph = Gtk::manage (new Gtk::VSeparator ());
|
||||||
|
|
||||||
hidehp = Gtk::manage (new Gtk::ToggleButton ());
|
hidehp = Gtk::manage (new Gtk::ToggleButton ());
|
||||||
Gtk::Label* hidehpLabel = Gtk::manage (new Gtk::Label ());
|
|
||||||
hidehpLabel->set_markup ("<b>H</b>");
|
iHistoryShow = new Gtk::Image(argv0+"/images/panel_to_right.png");
|
||||||
Gtk::Image* hpimg = Gtk::manage (new Gtk::Image (argv0+"/images/left.png"));
|
iHistoryHide = new Gtk::Image(argv0+"/images/panel_to_left.png");
|
||||||
Gtk::HBox* hidehpBox = Gtk::manage (new Gtk::HBox ());
|
|
||||||
hidehpBox->pack_start (*hpimg, Gtk::PACK_SHRINK, 2);
|
|
||||||
hidehpBox->pack_start (*hidehpLabel, Gtk::PACK_SHRINK, 2);
|
|
||||||
hidehp->add (*hidehpBox);
|
|
||||||
hidehp->set_relief(Gtk::RELIEF_NONE);
|
hidehp->set_relief(Gtk::RELIEF_NONE);
|
||||||
hidehp->set_active (options.showHistory);
|
hidehp->set_active (options.showHistory);
|
||||||
hidehp->set_tooltip_markup (M("MAIN_TOOLTIP_HIDEHP"));
|
hidehp->set_tooltip_markup (M("MAIN_TOOLTIP_HIDEHP"));
|
||||||
|
if (options.showHistory){
|
||||||
|
hidehp->set_image (*iHistoryHide);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
hidehp->set_image (*iHistoryShow);
|
||||||
|
}
|
||||||
|
|
||||||
Gtk::VSeparator* vsepcl = Gtk::manage (new Gtk::VSeparator ());
|
Gtk::VSeparator* vsepcl = Gtk::manage (new Gtk::VSeparator ());
|
||||||
Gtk::VSeparator* vsepz2 = Gtk::manage (new Gtk::VSeparator ());
|
Gtk::VSeparator* vsepz2 = Gtk::manage (new Gtk::VSeparator ());
|
||||||
@@ -661,6 +664,13 @@ void EditorPanel::hideHistoryActivated () {
|
|||||||
if (hidehp->get_active())
|
if (hidehp->get_active())
|
||||||
hpanedl->pack1 (*leftbox, false, true);
|
hpanedl->pack1 (*leftbox, false, true);
|
||||||
options.showHistory = hidehp->get_active();
|
options.showHistory = hidehp->get_active();
|
||||||
|
|
||||||
|
if (options.showHistory){
|
||||||
|
hidehp->set_image (*iHistoryHide);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
hidehp->set_image (*iHistoryShow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
|
bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
|
||||||
@@ -671,6 +681,13 @@ bool EditorPanel::handleShortcutKey (GdkEventKey* event) {
|
|||||||
if (!ctrl) {
|
if (!ctrl) {
|
||||||
// Normal
|
// Normal
|
||||||
switch(event->keyval) {
|
switch(event->keyval) {
|
||||||
|
case GDK_bracketright:
|
||||||
|
tpc->coarse->rotateRight();
|
||||||
|
return true;
|
||||||
|
case GDK_bracketleft:
|
||||||
|
tpc->coarse->rotateLeft();
|
||||||
|
return true;
|
||||||
|
|
||||||
case GDK_h:
|
case GDK_h:
|
||||||
case GDK_H:
|
case GDK_H:
|
||||||
hidehp->set_active (!hidehp->get_active());
|
hidehp->set_active (!hidehp->get_active());
|
||||||
|
@@ -60,6 +60,7 @@ class EditorPanel : public Gtk::VBox,
|
|||||||
Gtk::HBox* statusBox;
|
Gtk::HBox* statusBox;
|
||||||
Gtk::Image* red;
|
Gtk::Image* red;
|
||||||
Gtk::Image* green;
|
Gtk::Image* green;
|
||||||
|
Gtk::Image *iHistoryShow, *iHistoryHide;
|
||||||
Gtk::VBox* leftbox, *vboxright;
|
Gtk::VBox* leftbox, *vboxright;
|
||||||
|
|
||||||
Gtk::Button* queueimg;
|
Gtk::Button* queueimg;
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include <filecatalog.h>
|
#include <filecatalog.h>
|
||||||
|
#include <filepanel.h>
|
||||||
#include <options.h>
|
#include <options.h>
|
||||||
#include <cachemanager.h>
|
#include <cachemanager.h>
|
||||||
#include <multilangmgr.h>
|
#include <multilangmgr.h>
|
||||||
@@ -27,6 +28,7 @@
|
|||||||
#include <thumbimageupdater.h>
|
#include <thumbimageupdater.h>
|
||||||
#include <safegtk.h>
|
#include <safegtk.h>
|
||||||
|
|
||||||
|
|
||||||
#define CHECKTIME 2000
|
#define CHECKTIME 2000
|
||||||
|
|
||||||
extern Glib::ustring argv0;
|
extern Glib::ustring argv0;
|
||||||
@@ -44,7 +46,17 @@ int _directoryUpdater (void* cat) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb) : selectedDirectoryId(1), listener(NULL), fslistener(NULL), hasValidCurrentEFS(false), filterPanel(NULL), coarsePanel(cp), toolBar(tb) {
|
FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel) :
|
||||||
|
selectedDirectoryId(1),
|
||||||
|
listener(NULL),
|
||||||
|
fslistener(NULL),
|
||||||
|
dirlistener(NULL),
|
||||||
|
hasValidCurrentEFS(false),
|
||||||
|
filterPanel(NULL),
|
||||||
|
coarsePanel(cp),
|
||||||
|
toolBar(tb),
|
||||||
|
filepanel(filepanel) {
|
||||||
|
|
||||||
inTabMode=false;
|
inTabMode=false;
|
||||||
|
|
||||||
// construct and initialize thumbnail browsers
|
// construct and initialize thumbnail browsers
|
||||||
@@ -68,10 +80,23 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb) : selectedDirectoryId(1)
|
|||||||
buttonBar = new Gtk::HBox ();
|
buttonBar = new Gtk::HBox ();
|
||||||
pack_start (*buttonBar, Gtk::PACK_SHRINK);
|
pack_start (*buttonBar, Gtk::PACK_SHRINK);
|
||||||
|
|
||||||
|
buttonBar->pack_start (*(new Gtk::VSeparator), Gtk::PACK_SHRINK);
|
||||||
|
|
||||||
|
tbLeftPanel_1 = new Gtk::ToggleButton ();
|
||||||
|
iLeftPanel_1_Show = new Gtk::Image(argv0+"/images/panel_to_right.png");
|
||||||
|
iLeftPanel_1_Hide = new Gtk::Image(argv0+"/images/panel_to_left.png");
|
||||||
|
|
||||||
|
tbLeftPanel_1->set_relief(Gtk::RELIEF_NONE);
|
||||||
|
tbLeftPanel_1->set_active (true);
|
||||||
|
tbLeftPanel_1->set_tooltip_markup (M("MAIN_TOOLTIP_SHOWHIDELP1"));
|
||||||
|
tbLeftPanel_1->set_image (*iLeftPanel_1_Hide);
|
||||||
|
tbLeftPanel_1->signal_toggled().connect( sigc::mem_fun(*this, &FileCatalog::tbLeftPanel_1_Activated) );
|
||||||
|
buttonBar->pack_start (*tbLeftPanel_1, Gtk::PACK_SHRINK);
|
||||||
|
|
||||||
buttonBar->pack_start (*(new Gtk::VSeparator), Gtk::PACK_SHRINK);
|
buttonBar->pack_start (*(new Gtk::VSeparator), Gtk::PACK_SHRINK);
|
||||||
bDir = new Gtk::ToggleButton ();
|
bDir = new Gtk::ToggleButton ();
|
||||||
bDir->set_active (true);
|
bDir->set_active (true);
|
||||||
bDir->set_image (*(new Gtk::Image (argv0+"/images/folder.png")));
|
bDir->set_image (*(new Gtk::Image (argv0+"/images/folder_bw.png")));
|
||||||
bDir->set_relief (Gtk::RELIEF_NONE);
|
bDir->set_relief (Gtk::RELIEF_NONE);
|
||||||
bDir->set_tooltip_markup (M("FILEBROWSER_SHOWDIRHINT"));
|
bDir->set_tooltip_markup (M("FILEBROWSER_SHOWDIRHINT"));
|
||||||
bDir->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event),false);
|
bDir->signal_button_press_event().connect (sigc::mem_fun(*this, &FileCatalog::capture_event),false);
|
||||||
@@ -164,6 +189,25 @@ FileCatalog::FileCatalog (CoarsePanel* cp, ToolBar* tb) : selectedDirectoryId(1)
|
|||||||
|
|
||||||
buttonBar->pack_start (*zoomBox, Gtk::PACK_SHRINK);
|
buttonBar->pack_start (*zoomBox, Gtk::PACK_SHRINK);
|
||||||
|
|
||||||
|
// add browserPath
|
||||||
|
buttonBar->pack_start (*(new Gtk::VSeparator), Gtk::PACK_SHRINK);
|
||||||
|
|
||||||
|
iRightArrow = new Gtk::Image(argv0+"/images/right.png");
|
||||||
|
iRightArrow_red = new Gtk::Image(argv0+"/images/right_red.png");
|
||||||
|
|
||||||
|
BrowsePath = new Gtk::Entry ();
|
||||||
|
BrowsePath->set_width_chars (50); // !!! add this value to options
|
||||||
|
BrowsePath->set_tooltip_markup (M("FILEBROWSER_BROWSEPATHHINT"));
|
||||||
|
Gtk::HBox* hbBrowsePath = new Gtk::HBox ();
|
||||||
|
buttonBrowsePath = new Gtk::Button ();
|
||||||
|
buttonBrowsePath->set_image (*iRightArrow);
|
||||||
|
buttonBrowsePath->set_tooltip_markup (M("FILEBROWSER_BROWSEPATHBUTTONHINT"));
|
||||||
|
buttonBrowsePath->set_relief (Gtk::RELIEF_NONE);
|
||||||
|
hbBrowsePath->pack_start (*BrowsePath);
|
||||||
|
hbBrowsePath->pack_start (*buttonBrowsePath,Gtk::PACK_SHRINK, 4);
|
||||||
|
buttonBar->pack_start (*hbBrowsePath, Gtk::PACK_EXPAND_WIDGET,4);
|
||||||
|
buttonBrowsePath->signal_clicked().connect( sigc::mem_fun(*this, &FileCatalog::buttonBrowsePathPressed) );
|
||||||
|
|
||||||
buttonBar->pack_end (*coarsePanel, Gtk::PACK_SHRINK);
|
buttonBar->pack_end (*coarsePanel, Gtk::PACK_SHRINK);
|
||||||
buttonBar->pack_end (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK, 4);
|
buttonBar->pack_end (*Gtk::manage(new Gtk::VSeparator), Gtk::PACK_SHRINK, 4);
|
||||||
buttonBar->pack_end (*toolBar, Gtk::PACK_SHRINK);
|
buttonBar->pack_end (*toolBar, Gtk::PACK_SHRINK);
|
||||||
@@ -262,6 +306,8 @@ void FileCatalog::dirSelected (const Glib::ustring& dirname, const Glib::ustring
|
|||||||
addAndOpenFile (openfile);
|
addAndOpenFile (openfile);
|
||||||
|
|
||||||
selectedDirectory = dir->get_parse_name();
|
selectedDirectory = dir->get_parse_name();
|
||||||
|
BrowsePath->set_text (selectedDirectory);
|
||||||
|
buttonBrowsePath->set_image (*iRightArrow);
|
||||||
fileNameList = getFileList ();
|
fileNameList = getFileList ();
|
||||||
|
|
||||||
for (unsigned int i=0; i<fileNameList.size(); i++) {
|
for (unsigned int i=0; i<fileNameList.size(); i++) {
|
||||||
@@ -898,6 +944,38 @@ void FileCatalog::trashChanged () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileCatalog::buttonBrowsePathPressed () {
|
||||||
|
Glib::ustring sel = BrowsePath->get_text();
|
||||||
|
// validate the path
|
||||||
|
if (safe_file_test(sel, Glib::FILE_TEST_IS_DIR) && dirlistener){
|
||||||
|
dirlistener->selectDir (sel);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
// error, likely path not found: show red arrow
|
||||||
|
buttonBrowsePath->set_image (*iRightArrow_red);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileCatalog::tbLeftPanel_1_visible (bool visible){
|
||||||
|
if (visible)
|
||||||
|
tbLeftPanel_1->show();
|
||||||
|
else
|
||||||
|
tbLeftPanel_1->hide();
|
||||||
|
}
|
||||||
|
void FileCatalog::tbLeftPanel_1_Activated () {
|
||||||
|
removeIfThere (filepanel->dirpaned, filepanel->placespaned, false);
|
||||||
|
if (tbLeftPanel_1->get_active())
|
||||||
|
filepanel->dirpaned->pack1 (*filepanel->placespaned, false, true);
|
||||||
|
|
||||||
|
tbLeftPanel_1_Active = tbLeftPanel_1->get_active();
|
||||||
|
|
||||||
|
if (tbLeftPanel_1_Active){
|
||||||
|
tbLeftPanel_1->set_image (*iLeftPanel_1_Hide);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
tbLeftPanel_1->set_image (*iLeftPanel_1_Show);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
bool FileCatalog::handleShortcutKey (GdkEventKey* event) {
|
bool FileCatalog::handleShortcutKey (GdkEventKey* event) {
|
||||||
|
|
||||||
bool ctrl = event->state & GDK_CONTROL_MASK;
|
bool ctrl = event->state & GDK_CONTROL_MASK;
|
||||||
@@ -932,14 +1010,31 @@ bool FileCatalog::handleShortcutKey (GdkEventKey* event) {
|
|||||||
case GDK_T:
|
case GDK_T:
|
||||||
categoryButtonToggled(bTrash);
|
categoryButtonToggled(bTrash);
|
||||||
return true;
|
return true;
|
||||||
|
case GDK_Return:
|
||||||
|
case GDK_KP_Enter:
|
||||||
|
FileCatalog::buttonBrowsePathPressed ();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ctrl) {
|
if (!ctrl) {
|
||||||
switch(event->keyval) {
|
switch(event->keyval) {
|
||||||
|
|
||||||
|
case GDK_bracketright:
|
||||||
|
coarsePanel->rotateRight();
|
||||||
|
return true;
|
||||||
|
case GDK_bracketleft:
|
||||||
|
coarsePanel->rotateLeft();
|
||||||
|
return true;
|
||||||
|
|
||||||
|
case GDK_h:
|
||||||
|
case GDK_H:
|
||||||
|
tbLeftPanel_1->set_active (!tbLeftPanel_1->get_active());
|
||||||
|
return true;
|
||||||
case GDK_i:
|
case GDK_i:
|
||||||
case GDK_I:
|
case GDK_I:
|
||||||
exifInfo->set_active (!exifInfo->get_active());
|
exifInfo->set_active (!exifInfo->get_active());
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case GDK_plus:
|
case GDK_plus:
|
||||||
case GDK_equal:
|
case GDK_equal:
|
||||||
zoomIn();
|
zoomIn();
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windirmonitor.h>
|
#include <windirmonitor.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <dirbrowserremoteinterface.h>
|
||||||
#include <dirselectionlistener.h>
|
#include <dirselectionlistener.h>
|
||||||
#include <filebrowser.h>
|
#include <filebrowser.h>
|
||||||
#include <procthread.h>
|
#include <procthread.h>
|
||||||
@@ -34,6 +35,8 @@
|
|||||||
#include <toolbar.h>
|
#include <toolbar.h>
|
||||||
#include <filterpanel.h>
|
#include <filterpanel.h>
|
||||||
#include <previewloader.h>
|
#include <previewloader.h>
|
||||||
|
#include <multilangmgr.h>
|
||||||
|
|
||||||
|
|
||||||
class DirEntry {
|
class DirEntry {
|
||||||
|
|
||||||
@@ -46,7 +49,7 @@ class DirEntry {
|
|||||||
return fullName.casefold() < other.fullName.casefold();
|
return fullName.casefold() < other.fullName.casefold();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
class FilePanel;
|
||||||
class FileCatalog : public Gtk::VBox,
|
class FileCatalog : public Gtk::VBox,
|
||||||
public DirSelectionListener,
|
public DirSelectionListener,
|
||||||
public PreviewLoaderListener,
|
public PreviewLoaderListener,
|
||||||
@@ -57,7 +60,7 @@ class FileCatalog : public Gtk::VBox,
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
||||||
|
FilePanel* filepanel;
|
||||||
Gtk::HBox* hBox;
|
Gtk::HBox* hBox;
|
||||||
Glib::ustring selectedDirectory;
|
Glib::ustring selectedDirectory;
|
||||||
int selectedDirectoryId;
|
int selectedDirectoryId;
|
||||||
@@ -67,9 +70,12 @@ class FileCatalog : public Gtk::VBox,
|
|||||||
FileSelectionListener* listener;
|
FileSelectionListener* listener;
|
||||||
FileSelectionChangeListener* fslistener;
|
FileSelectionChangeListener* fslistener;
|
||||||
ImageAreaToolListener* iatlistener;
|
ImageAreaToolListener* iatlistener;
|
||||||
|
DirBrowserRemoteInterface* dirlistener;
|
||||||
|
|
||||||
Gtk::HBox* buttonBar;
|
Gtk::HBox* buttonBar;
|
||||||
Gtk::HBox* buttonBar2;
|
Gtk::HBox* buttonBar2;
|
||||||
|
Gtk::ToggleButton* tbLeftPanel_1;
|
||||||
|
bool tbLeftPanel_1_Active;
|
||||||
Gtk::ToggleButton* bDir;
|
Gtk::ToggleButton* bDir;
|
||||||
Gtk::ToggleButton* bUnRanked;
|
Gtk::ToggleButton* bUnRanked;
|
||||||
Gtk::ToggleButton* bRank[5];
|
Gtk::ToggleButton* bRank[5];
|
||||||
@@ -78,7 +84,10 @@ class FileCatalog : public Gtk::VBox,
|
|||||||
Gtk::ToggleButton* exifInfo;
|
Gtk::ToggleButton* exifInfo;
|
||||||
sigc::connection bCateg[8];
|
sigc::connection bCateg[8];
|
||||||
Gtk::Image* iranked[5], *igranked[5];
|
Gtk::Image* iranked[5], *igranked[5];
|
||||||
Gtk::Image *iTrashEmpty, *iTrashFull;
|
Gtk::Image *iTrashEmpty, *iTrashFull, *iRightArrow_red, *iRightArrow, *iLeftPanel_1_Show, *iLeftPanel_1_Hide;
|
||||||
|
Gtk::Entry* BrowsePath;
|
||||||
|
Gtk::Button* buttonBrowsePath;
|
||||||
|
sigc::connection BrowsePathconn;
|
||||||
|
|
||||||
double hScrollPos[8];
|
double hScrollPos[8];
|
||||||
double vScrollPos[8];
|
double vScrollPos[8];
|
||||||
@@ -126,7 +135,7 @@ class FileCatalog : public Gtk::VBox,
|
|||||||
CoarsePanel* coarsePanel;
|
CoarsePanel* coarsePanel;
|
||||||
ToolBar* toolBar;
|
ToolBar* toolBar;
|
||||||
|
|
||||||
FileCatalog (CoarsePanel* cp, ToolBar* tb);
|
FileCatalog (CoarsePanel* cp, ToolBar* tb, FilePanel* filepanel);
|
||||||
void dirSelected (const Glib::ustring& dirname, const Glib::ustring& openfile="");
|
void dirSelected (const Glib::ustring& dirname, const Glib::ustring& openfile="");
|
||||||
void closeDir ();
|
void closeDir ();
|
||||||
void refreshEditedState (const std::set<Glib::ustring>& efiles);
|
void refreshEditedState (const std::set<Glib::ustring>& efiles);
|
||||||
@@ -160,6 +169,8 @@ class FileCatalog : public Gtk::VBox,
|
|||||||
void setFileSelectionListener (FileSelectionListener* l) { listener = l; }
|
void setFileSelectionListener (FileSelectionListener* l) { listener = l; }
|
||||||
void setFileSelectionChangeListener (FileSelectionChangeListener* l) { fslistener = l; }
|
void setFileSelectionChangeListener (FileSelectionChangeListener* l) { fslistener = l; }
|
||||||
void setImageAreaToolListener (ImageAreaToolListener* l) { iatlistener = l; }
|
void setImageAreaToolListener (ImageAreaToolListener* l) { iatlistener = l; }
|
||||||
|
void setDirBrowserRemoteInterface (DirBrowserRemoteInterface* l) { dirlistener = l; }
|
||||||
|
|
||||||
void setFilterPanel (FilterPanel* fpanel);
|
void setFilterPanel (FilterPanel* fpanel);
|
||||||
void exifInfoButtonToggled();
|
void exifInfoButtonToggled();
|
||||||
void categoryButtonToggled (Gtk::ToggleButton* b);
|
void categoryButtonToggled (Gtk::ToggleButton* b);
|
||||||
@@ -175,6 +186,10 @@ class FileCatalog : public Gtk::VBox,
|
|||||||
void zoomIn ();
|
void zoomIn ();
|
||||||
void zoomOut ();
|
void zoomOut ();
|
||||||
|
|
||||||
|
void buttonBrowsePathPressed ();
|
||||||
|
void tbLeftPanel_1_Activated ();
|
||||||
|
void tbLeftPanel_1_visible (bool visible);
|
||||||
|
|
||||||
void openNextImage () { fileBrowser->openNextImage(); }
|
void openNextImage () { fileBrowser->openNextImage(); }
|
||||||
void openPrevImage () { fileBrowser->openPrevImage(); }
|
void openPrevImage () { fileBrowser->openPrevImage(); }
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@ FilePanel::FilePanel () : parent(NULL) {
|
|||||||
dirpaned->pack1 (*placespaned, false, true);
|
dirpaned->pack1 (*placespaned, false, true);
|
||||||
|
|
||||||
tpc = new BatchToolPanelCoordinator (this);
|
tpc = new BatchToolPanelCoordinator (this);
|
||||||
fileCatalog = new FileCatalog (tpc->coarse, tpc->getToolBar());
|
fileCatalog = new FileCatalog (tpc->coarse, tpc->getToolBar(), this);
|
||||||
ribbonPane = new Gtk::Paned();
|
ribbonPane = new Gtk::Paned();
|
||||||
ribbonPane->add(*fileCatalog);
|
ribbonPane->add(*fileCatalog);
|
||||||
ribbonPane->set_size_request(50,150);
|
ribbonPane->set_size_request(50,150);
|
||||||
@@ -66,6 +66,7 @@ FilePanel::FilePanel () : parent(NULL) {
|
|||||||
dirBrowser->addDirSelectionListener (recentBrowser);
|
dirBrowser->addDirSelectionListener (recentBrowser);
|
||||||
dirBrowser->addDirSelectionListener (placesBrowser);
|
dirBrowser->addDirSelectionListener (placesBrowser);
|
||||||
fileCatalog->setFileSelectionListener (this);
|
fileCatalog->setFileSelectionListener (this);
|
||||||
|
fileCatalog->setDirBrowserRemoteInterface (dirBrowser);
|
||||||
|
|
||||||
rightBox = new Gtk::HBox ();
|
rightBox = new Gtk::HBox ();
|
||||||
rightBox->set_size_request(50,100);
|
rightBox->set_size_request(50,100);
|
||||||
|
@@ -38,8 +38,6 @@ class FilePanel : public Gtk::HPaned,
|
|||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Gtk::Paned* placespaned;
|
|
||||||
Gtk::HPaned* dirpaned;
|
|
||||||
//DirBrowser* dirBrowser;
|
//DirBrowser* dirBrowser;
|
||||||
PlacesBrowser* placesBrowser;
|
PlacesBrowser* placesBrowser;
|
||||||
RecentBrowser* recentBrowser;
|
RecentBrowser* recentBrowser;
|
||||||
@@ -57,6 +55,9 @@ class FilePanel : public Gtk::HPaned,
|
|||||||
public:
|
public:
|
||||||
FilePanel ();
|
FilePanel ();
|
||||||
|
|
||||||
|
Gtk::Paned* placespaned;
|
||||||
|
Gtk::HPaned* dirpaned;
|
||||||
|
|
||||||
DirBrowser* dirBrowser;
|
DirBrowser* dirBrowser;
|
||||||
FilterPanel* filterPanel;
|
FilterPanel* filterPanel;
|
||||||
FileCatalog* fileCatalog;
|
FileCatalog* fileCatalog;
|
||||||
|
@@ -84,6 +84,7 @@ RTWindow::RTWindow ()
|
|||||||
l->set_angle (90);
|
l->set_angle (90);
|
||||||
vbf->pack_start (*l);
|
vbf->pack_start (*l);
|
||||||
vbf->set_spacing (2);
|
vbf->set_spacing (2);
|
||||||
|
vbf->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
|
||||||
vbf->show_all ();
|
vbf->show_all ();
|
||||||
mainNB->append_page (*fpanel, *vbf);
|
mainNB->append_page (*fpanel, *vbf);
|
||||||
} else {
|
} else {
|
||||||
@@ -91,6 +92,7 @@ RTWindow::RTWindow ()
|
|||||||
hbf->pack_start (*Gtk::manage (new Gtk::Image (Gtk::Stock::DIRECTORY, Gtk::ICON_SIZE_MENU)));
|
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->pack_start (*Gtk::manage (new Gtk::Label (M("MAIN_FRAME_FILEBROWSER"))));
|
||||||
hbf->set_spacing (2);
|
hbf->set_spacing (2);
|
||||||
|
hbf->set_tooltip_markup (M("MAIN_FRAME_FILEBROWSER_TOOLTIP"));
|
||||||
hbf->show_all ();
|
hbf->show_all ();
|
||||||
mainNB->append_page (*fpanel, *hbf);
|
mainNB->append_page (*fpanel, *hbf);
|
||||||
}
|
}
|
||||||
@@ -115,6 +117,7 @@ RTWindow::RTWindow ()
|
|||||||
l->set_angle (90);
|
l->set_angle (90);
|
||||||
vbe->pack_start (*l);
|
vbe->pack_start (*l);
|
||||||
vbe->set_spacing (2);
|
vbe->set_spacing (2);
|
||||||
|
vbe->set_tooltip_markup (M("MAIN_FRAME_EDITOR_TOOLTIP"));
|
||||||
vbe->show_all ();
|
vbe->show_all ();
|
||||||
mainNB->append_page (*epanel, *vbe);
|
mainNB->append_page (*epanel, *vbe);
|
||||||
} else {
|
} else {
|
||||||
@@ -122,6 +125,7 @@ RTWindow::RTWindow ()
|
|||||||
hbe->pack_start (*Gtk::manage (new Gtk::Image (argv0+"/images/logoicon16.png")));
|
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->pack_start (*Gtk::manage (new Gtk::Label(M("MAIN_FRAME_EDITOR"))));
|
||||||
hbe->set_spacing (2);
|
hbe->set_spacing (2);
|
||||||
|
hbe->set_tooltip_markup (M("MAIN_FRAME_EDITOR_TOOLTIP"));
|
||||||
hbe->show_all ();
|
hbe->show_all ();
|
||||||
mainNB->append_page (*epanel, *hbe);
|
mainNB->append_page (*epanel, *hbe);
|
||||||
}
|
}
|
||||||
@@ -257,6 +261,26 @@ void RTWindow::remEditorPanel (EditorPanel* ep) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RTWindow::keyPressed (GdkEventKey* event) {
|
bool RTWindow::keyPressed (GdkEventKey* event) {
|
||||||
|
|
||||||
|
bool ctrl = event->state & GDK_CONTROL_MASK;
|
||||||
|
bool shift = event->state & GDK_SHIFT_MASK;
|
||||||
|
|
||||||
|
if (ctrl) {
|
||||||
|
switch(event->keyval) {
|
||||||
|
case GDK_F2: // file browser panel
|
||||||
|
mainNB->set_current_page (mainNB->page_num (*fpanel));
|
||||||
|
return true;
|
||||||
|
case GDK_F3: // batch queue panel
|
||||||
|
mainNB->set_current_page (mainNB->page_num (*bpanel));
|
||||||
|
return true;
|
||||||
|
case GDK_F4: //single tab mode, editor panel
|
||||||
|
if (isSingleTabMode() && epanel) {
|
||||||
|
mainNB->set_current_page (mainNB->page_num (*epanel));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(event->keyval == GDK_F11) {
|
if(event->keyval == GDK_F11) {
|
||||||
toggle_fullscreen();
|
toggle_fullscreen();
|
||||||
}
|
}
|
||||||
@@ -377,6 +401,7 @@ void RTWindow::MoveFileBrowserToMain()
|
|||||||
epanel->catalogPane->remove(*fCatalog);
|
epanel->catalogPane->remove(*fCatalog);
|
||||||
fpanel->ribbonPane->add(*fCatalog);
|
fpanel->ribbonPane->add(*fCatalog);
|
||||||
fCatalog->enableTabMode(false);
|
fCatalog->enableTabMode(false);
|
||||||
|
fCatalog->tbLeftPanel_1_visible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,6 +414,7 @@ void RTWindow::MoveFileBrowserToEditor()
|
|||||||
epanel->catalogPane->add(*fCatalog);
|
epanel->catalogPane->add(*fCatalog);
|
||||||
fCatalog->enableTabMode(true);
|
fCatalog->enableTabMode(true);
|
||||||
fCatalog->refreshHeight();
|
fCatalog->refreshHeight();
|
||||||
|
fCatalog->tbLeftPanel_1_visible(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|