Code

Merge and cleanup of GSoC C++-ification project.
[inkscape.git] / src / ui / dialog / session-player.cpp
index 97ef5618e56cb0747dc71d70749fff00bf29d883..d8ff8ca56efac3466e6e0c9c6abb636777eb3ebb 100644 (file)
@@ -1,11 +1,11 @@
-/**
- * Whiteboard session playback control dialog
- *
- * Authors:
+/** @file
+ * @brief Whiteboard session playback control dialog - implementation
+ */
+/* Authors:
  * David Yip <yipdw@rose-hulman.edu>
+ *   Abhishek Sharma
  *
  * Copyright (c) 2005 Authors
- *
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
@@ -25,8 +25,6 @@
 #include "desktop-handles.h"
 #include "document.h"
 
-#include "ui/stock.h"
-
 #include "jabber_whiteboard/node-tracker.h"
 #include "jabber_whiteboard/session-manager.h"
 #include "jabber_whiteboard/session-file-player.h"
@@ -50,7 +48,7 @@ SessionPlaybackDialog::create()
 SessionPlaybackDialogImpl::SessionPlaybackDialogImpl() 
        : _delay(100, 1, 5000, 10, 100), _delayentry(_delay)
 {
-       this->_desktop = SP_ACTIVE_DESKTOP;
+        this->_desktop = this->getDesktop();
        this->_sm = this->_desktop->whiteboard_session_manager();
        this->_sfp = this->_sm->session_player();
        this->_openfile.set_text(this->_sfp->filename());
@@ -121,14 +119,6 @@ SessionPlaybackDialogImpl::_construct()
        // Playback controls
        this->_playbackcontrols.set_show_arrow(false);
 
-       /* these are waiting for the Gtkmm conversion
-       this->_controls[0].set_stock_id(Stock::SESSION_PLAYBACK_REW);
-       this->_controls[1].set_stock_id(Stock::SESSION_PLAYBACK_STEPBACK);
-       this->_controls[2].set_stock_id(Stock::SESSION_PLAYBACK_PAUSE);
-       this->_controls[3].set_stock_id(Stock::SESSION_PLAYBACK_STEPFORWARD);
-       this->_controls[4].set_stock_id(Stock::SESSION_PLAYBACK_PLAY);
-       */
-
        this->_controls[0].set_label("Rewind");
        this->_controls[1].set_label("Go back one");
        this->_controls[2].set_label("Pause");
@@ -182,7 +172,8 @@ SessionPlaybackDialogImpl::_respCallback(int resp)
                        switch (result) {
                                case Gtk::RESPONSE_OK:
                                        this->_sm->clearDocument();
-                                       sp_document_done(sp_desktop_document(this->_desktop));
+                                       SPDocumentUndo::done(sp_desktop_document(this->_desktop), SP_VERB_NONE, 
+                                                        /* TODO: annotate */ "session-player.cpp:186");
                                        this->_sm->loadSessionFile(sessionfiledlg.get_filename());
                                        this->_openfile.set_text(this->_sfp->filename());
                                        break;
@@ -227,3 +218,14 @@ SessionPlaybackDialogImpl::_respCallback(int resp)
 }
 
 }
+
+/*
+  Local Variables:
+  mode:c++
+  c-file-style:"stroustrup"
+  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+  indent-tabs-mode:nil
+  fill-column:99
+  End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :