Merge with trunk

This commit is contained in:
andreyskv
2010-10-04 21:51:45 -07:00
20 changed files with 133 additions and 49 deletions

View File

@@ -40,6 +40,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel) : beforePreviewHandler(NULL), be
// build left side panel
leftbox = new Gtk::VBox ();
leftbox->set_border_width (4);
leftbox->set_size_request(100,250);
histogramPanel = Gtk::manage (new HistogramPanel ());
histogramPanel->set_size_request (-1, 150);
@@ -122,6 +123,8 @@ EditorPanel::EditorPanel (FilePanel* filePanel) : beforePreviewHandler(NULL), be
// build right side panel
vboxright = new Gtk::VBox (false, 0);
vboxright->set_size_request(100,250);
vboxright->set_border_width (4);
vboxright->pack_start (*histogramPanel, Gtk::PACK_SHRINK, 4);
vboxright->pack_start (*ppframe, Gtk::PACK_SHRINK, 4);
@@ -197,12 +200,15 @@ EditorPanel::EditorPanel (FilePanel* filePanel) : beforePreviewHandler(NULL), be
viewpaned->pack2(*editbox, true, true);
Gtk::Frame* vbfr = Gtk::manage (new Gtk::Frame ());
Gtk::Frame* vbfr = Gtk::manage (new Gtk::Frame ());
vbfr->add (*viewpaned);
vbfr->set_size_request(100,250);
hpanedl->pack2(*vbfr, true, true);
hpanedr->pack1(*hpanedl, true, true);
hpanedr->pack2(*vboxright, false, true);
hpanedl->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &EditorPanel::leftPaneButtonReleased) );
hpanedr->signal_button_release_event().connect_notify( sigc::mem_fun(*this, &EditorPanel::rightPaneButtonReleased) );
pack_start (*hpanedr);
show_all ();
@@ -271,6 +277,43 @@ EditorPanel::~EditorPanel () {
delete catalogPane;
}
void EditorPanel::leftPaneButtonReleased(GdkEventButton *event) {
if (event->button == 1) {
// Button 1 released : it's a resize
options.historyPanelWidth = hpanedl->get_position();
}
/*else if (event->button == 3) {
}*/
}
void EditorPanel::rightPaneButtonReleased(GdkEventButton *event) {
if (event->button == 1) {
int winW, winH;
parent->get_size(winW, winH);
// Button 1 released : it's a resize
options.toolPanelWidth = winW - hpanedr->get_position();
}
/*else if (event->button == 3) {
}*/
}
void EditorPanel::setAspect () {
int winW, winH;
parent->get_size(winW, winH);
hpanedl->set_position(options.historyPanelWidth);
hpanedr->set_position(winW - options.toolPanelWidth);
// initialize components
if (info->get_active() != options.showInfo)
info->set_active (options.showInfo);
}
void EditorPanel::on_realize () {
Gtk::VBox::on_realize ();
// This line is needed to avoid autoexpansion of the window :-/
vboxright->set_size_request (options.toolPanelWidth, -1);
}
void EditorPanel::open (Thumbnail* tmb, rtengine::InitialImage* isrc) {
if (ipc) close();
@@ -891,13 +934,10 @@ bool EditorPanel::idle_sentToGimp(ProgressConnector<int> *pc,rtengine::IImage16*
return false;
}
/*
void EditorPanel::saveOptions () {
//options.historyPanelWidth = hpanedl->get_position ();//older code
//options.toolPanelWidth = vboxright->get_width ();//older code
//options.toolPanelWidth = hpanedr->get_position ();//Hombre's change which screws up OSX build
}
*/
void EditorPanel::historyBeforeLineChanged (const rtengine::procparams::ProcParams& params) {