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/undo-history.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/undo-history.cpp')
| -rw-r--r-- | src/ui/dialog/undo-history.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ui/dialog/undo-history.cpp b/src/ui/dialog/undo-history.cpp index 344c446e0..b808e57de 100644 --- a/src/ui/dialog/undo-history.cpp +++ b/src/ui/dialog/undo-history.cpp @@ -102,12 +102,12 @@ static void on_document_replaced(SPDesktop* desktop, SPDocument*); static void on_activate_desktop(Inkscape::Application*, SPDesktop* desktop, void*); static void on_deactivate_desktop(Inkscape::Application*, SPDesktop* desktop, void*); -UndoHistory* -UndoHistory::create(Behavior::BehaviorFactory behavior_factory) +UndoHistory& UndoHistory::getInstance() { - if (_instance) return _instance; - _instance = new UndoHistory(behavior_factory); - return _instance; + if (!_instance) + _instance = new UndoHistory(); + + return *_instance; } void @@ -131,19 +131,19 @@ UndoHistory::setDesktop(SPDesktop* desktop) _callback_connections[EventLog::CALLB_SELECTION_CHANGE].block(false); } -UndoHistory::UndoHistory(Behavior::BehaviorFactory behavior_factory) - : Dialog (behavior_factory, "dialogs.undo-history", SP_VERB_DIALOG_UNDO_HISTORY), +UndoHistory::UndoHistory() + : UI::Widget::Panel ("", "dialogs.undo-history", SP_VERB_DIALOG_UNDO_HISTORY), _desktop (SP_ACTIVE_DESKTOP), _document (SP_ACTIVE_DOCUMENT), _event_log (_desktop ? _desktop->event_log : NULL), _columns (_event_log ? &_event_log->getColumns() : NULL), _event_list_selection (_event_list_view.get_selection()) { - if( !_document || !_event_log || !_columns ) return; + if ( !_document || !_event_log || !_columns ) return; set_size_request(300, 200); - get_vbox()->pack_start(_scrolled_window); + _getContents()->pack_start(_scrolled_window); _scrolled_window.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); _event_list_store = _event_log->getEventListStore(); |
