Patch for issue #75 (removed exit button, moved preferences to left) submitted by ffsup2

This commit is contained in:
Wyatt Olson
2010-04-24 07:46:51 -06:00
parent 452bbbfd6b
commit 8a656a268c
2 changed files with 2 additions and 15 deletions

View File

@@ -73,24 +73,17 @@ RTWindow::RTWindow () {
Gtk::HBox* bottomBox = Gtk::manage (new Gtk::HBox ()); Gtk::HBox* bottomBox = Gtk::manage (new Gtk::HBox ());
mainBox->pack_start (*bottomBox, Gtk::PACK_SHRINK, 1); mainBox->pack_start (*bottomBox, Gtk::PACK_SHRINK, 1);
Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com")); Gtk::LinkButton* rtWeb = Gtk::manage (new Gtk::LinkButton ("http://rawtherapee.com"));
bottomBox->pack_start (*rtWeb, Gtk::PACK_SHRINK, 1);
Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES"))); Gtk::Button* preferences = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_PREFERENCES")));
preferences->set_image (*Gtk::manage(new Gtk::Image (Gtk::StockID("gtk-preferences"), Gtk::ICON_SIZE_BUTTON))); preferences->set_image (*Gtk::manage(new Gtk::Image (Gtk::StockID("gtk-preferences"), Gtk::ICON_SIZE_BUTTON)));
preferences->set_relief (Gtk::RELIEF_NONE); preferences->set_relief (Gtk::RELIEF_NONE);
preferences->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::showPreferences) ); preferences->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::showPreferences) );
Gtk::Button* exit = Gtk::manage (new Gtk::Button (M("MAIN_BUTTON_EXIT"))); bottomBox->pack_start (*preferences, Gtk::PACK_SHRINK, 0);
exit->set_image (*Gtk::manage(new Gtk::Image (Gtk::StockID("gtk-quit"), Gtk::ICON_SIZE_BUTTON))); bottomBox->pack_start (*rtWeb, Gtk::PACK_SHRINK, 4);
exit->set_relief (Gtk::RELIEF_NONE);
exit->signal_clicked().connect( sigc::mem_fun(*this, &RTWindow::onExit) );
bottomBox->pack_start (*rtWeb, Gtk::PACK_SHRINK, 1);
bottomBox->pack_end (*exit, Gtk::PACK_SHRINK, 1);
bottomBox->pack_end (*preferences, Gtk::PACK_SHRINK, 8);
Glib::RefPtr<Gtk::RcStyle> style = Gtk::RcStyle::create (); Glib::RefPtr<Gtk::RcStyle> style = Gtk::RcStyle::create ();
style->set_xthickness (0); style->set_xthickness (0);
style->set_ythickness (0); style->set_ythickness (0);
rtWeb->modify_style (style); rtWeb->modify_style (style);
preferences->modify_style (style); preferences->modify_style (style);
exit->modify_style (style);
add (*mainBox); add (*mainBox);
show_all (); show_all ();
@@ -174,11 +167,6 @@ void RTWindow::addBatchQueueJob (BatchQueueEntry* bqe, bool head) {
fpanel->queue_draw (); fpanel->queue_draw ();
} }
void RTWindow::onExit () {
on_delete_event (NULL);
}
bool RTWindow::on_delete_event(GdkEventAny* event) { bool RTWindow::on_delete_event(GdkEventAny* event) {
fpanel->saveOptions (); fpanel->saveOptions ();

View File

@@ -47,7 +47,6 @@ class RTWindow : public Gtk::Window {
void imageDeveloped (Glib::ustring fname); // called by the batchqueue when it finishes an image void imageDeveloped (Glib::ustring fname); // called by the batchqueue when it finishes an image
void showPreferences (); void showPreferences ();
void onExit ();
void on_realize (); void on_realize ();
}; };