diff options
| author | gustav_b <gustav_b@users.sourceforge.net> | 2007-11-22 00:14:41 +0000 |
|---|---|---|
| committer | gustav_b <gustav_b@users.sourceforge.net> | 2007-11-22 00:14:41 +0000 |
| commit | 5caa6ff4dfb7b538555d60fa2732272bf8b9828b (patch) | |
| tree | 65c6fb0232f8621fa6cecdcdf68d0790bd955777 /src/ui/dialog/tracedialog.cpp | |
| parent | Fix ordering of LPE parameters (no longer use map, just use vector) (diff) | |
| download | inkscape-5caa6ff4dfb7b538555d60fa2732272bf8b9828b.tar.gz inkscape-5caa6ff4dfb7b538555d60fa2732272bf8b9828b.zip | |
The dialog to panel refactoring:
* Made the current dialogs subclass the Panel class instead of the
Dialog class.
* Extended the Panel class with some functionality that the dialogs
relied on.
* Added a PanelDialog class which is a dialog container for a
single panel with the dialog behavior as a template parameter.
(* Fixed coding style for the Panel and Dialog class)
For details, see
http://www.nabble.com/Re%3A-Dockable-dialogs%2C-todo-list-p12728194.html
http://www.nabble.com/Re%3A-Inkscape-overcomes-Xara-in-Google-Trends-p13126622.html
(bzr r4126)
Diffstat (limited to 'src/ui/dialog/tracedialog.cpp')
| -rw-r--r-- | src/ui/dialog/tracedialog.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/ui/dialog/tracedialog.cpp b/src/ui/dialog/tracedialog.cpp index b7602b36a..84d7978fb 100644 --- a/src/ui/dialog/tracedialog.cpp +++ b/src/ui/dialog/tracedialog.cpp @@ -50,7 +50,7 @@ class TraceDialogImpl : public TraceDialog /** * Constructor */ - TraceDialogImpl(Behavior::BehaviorFactory behavior_factory); + TraceDialogImpl(); /** * Destructor @@ -376,11 +376,11 @@ void TraceDialogImpl::responseCallback(int response_id) /** * Constructor */ -TraceDialogImpl::TraceDialogImpl(Behavior::BehaviorFactory behavior_factory) : - TraceDialog(behavior_factory) +TraceDialogImpl::TraceDialogImpl() : + TraceDialog() { - Gtk::VBox *mainVBox = get_vbox(); + Gtk::Box *contents = _getContents(); #define MARGIN 2 //#### begin left panel @@ -664,32 +664,31 @@ TraceDialogImpl::TraceDialogImpl(Behavior::BehaviorFactory behavior_factory) : //#### Global stuff - mainVBox->pack_start(mainHBox); + contents->pack_start(mainHBox); //## The OK button - mainCancelButton = add_button(Gtk::Stock::STOP, GTK_RESPONSE_CANCEL); - if (mainCancelButton) - { - tips.set_tip((*mainCancelButton), _("Abort a trace in progress")); - mainCancelButton->set_sensitive(false); - } - mainOkButton = add_button(Gtk::Stock::OK, GTK_RESPONSE_OK); + mainCancelButton = addResponseButton(Gtk::Stock::STOP, GTK_RESPONSE_CANCEL); + if (mainCancelButton) { + tips.set_tip((*mainCancelButton), _("Abort a trace in progress")); + mainCancelButton->set_sensitive(false); + } + mainOkButton = addResponseButton(Gtk::Stock::OK, GTK_RESPONSE_OK); tips.set_tip((*mainOkButton), _("Execute the trace")); show_all_children(); //## Connect the signal - signal_response().connect( - sigc::mem_fun(*this, &TraceDialogImpl::responseCallback) ); + signalResponse().connect( + sigc::mem_fun(*this, &TraceDialogImpl::responseCallback)); } /** * Factory method. Use this to create a new TraceDialog */ -TraceDialog *TraceDialog::create(Behavior::BehaviorFactory behavior_factory) +TraceDialog &TraceDialog::getInstance() { - TraceDialog *dialog = new TraceDialogImpl(behavior_factory); - return dialog; + TraceDialog *dialog = new TraceDialogImpl(); + return *dialog; } |
