diff options
Diffstat (limited to 'src/ui/dialog/inkscape-preferences.cpp')
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 5d747807b..df2952f20 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -43,8 +43,8 @@ namespace Inkscape { namespace UI { namespace Dialog { -InkscapePreferences::InkscapePreferences(Behavior::BehaviorFactory behavior_factory) - : Dialog (behavior_factory, "dialogs.preferences", SP_VERB_DIALOG_DISPLAY), +InkscapePreferences::InkscapePreferences() + : UI::Widget::Panel ("", "dialogs.preferences", SP_VERB_DIALOG_DISPLAY), _max_dialog_width(0), _max_dialog_height(0), _current_page(0) @@ -52,19 +52,19 @@ InkscapePreferences::InkscapePreferences(Behavior::BehaviorFactory behavior_fact //get the width of a spinbutton Gtk::SpinButton* sb = new Gtk::SpinButton; sb->set_width_chars(6); - this->get_vbox()->add(*sb); - this->show_all_children(); - Gtk:: Requisition sreq; + _getContents()->add(*sb); + show_all_children(); + Gtk::Requisition sreq; sb->size_request(sreq); _sb_width = sreq.width; - this->get_vbox()->remove(*sb); + _getContents()->remove(*sb); delete sb; //Main HBox Gtk::HBox* hbox_list_page = Gtk::manage(new Gtk::HBox()); hbox_list_page->set_border_width(12); hbox_list_page->set_spacing(12); - this->get_vbox()->add(*hbox_list_page); + _getContents()->add(*hbox_list_page); //Pagelist Gtk::Frame* list_frame = Gtk::manage(new Gtk::Frame()); @@ -106,11 +106,13 @@ InkscapePreferences::InkscapePreferences(Behavior::BehaviorFactory behavior_fact initPageCMS(); initPageMisc(); + signalPresent().connect(sigc::mem_fun(*this, &InkscapePreferences::_presentPages)); + //calculate the size request for this dialog this->show_all_children(); _page_list.expand_all(); _page_list_model->foreach_iter(sigc::mem_fun(*this, &InkscapePreferences::SetMaxDialogSize)); - this->set_size_request(_max_dialog_width, _max_dialog_height); + _getContents()->set_size_request(_max_dialog_width, _max_dialog_height); _page_list.collapse_all(); } @@ -118,12 +120,6 @@ InkscapePreferences::~InkscapePreferences() { } -void InkscapePreferences::present() -{ - _page_list_model->foreach_iter(sigc::mem_fun(*this, &InkscapePreferences::PresentPage)); - Dialog::present(); -} - Gtk::TreeModel::iterator InkscapePreferences::AddPage(DialogPage& p, Glib::ustring title, int id) { return AddPage(p, title, Gtk::TreeModel::iterator() , id); @@ -871,6 +867,11 @@ void InkscapePreferences::on_pagelist_selection_changed() } } +void InkscapePreferences::_presentPages() +{ + _page_list_model->foreach_iter(sigc::mem_fun(*this, &InkscapePreferences::PresentPage)); +} + } // namespace Dialog } // namespace UI } // namespace Inkscape |
