index b46aacaaef4f96ca8bafa327a30678c6ffd54e45..60d0b73781a47d1bbb7d4247af9496a4f70dfbe3 100644 (file)
* Authors:
* David Yip <yipdw@rose-hulman.edu>
* Bob Jamison (Pedro port)
+ * Abhishek Sharma
*
* Copyright (c) 2005 Authors
*
#include "ui/view/view-widget.h"
-#include "application/application.h"
-#include "application/editor.h"
-
#include "document-private.h"
#include "interface.h"
#include "sp-namedview.h"
void SessionManager::showClient()
{
- SessionManager::instance().gui.show();
+ SessionManager::instance().gui.show();
}
-SessionManager&
-SessionManager::instance()
+SessionManager &SessionManager::instance()
{
- if (!sessionManagerInstance)
+ if (!sessionManagerInstance) {
sessionManagerInstance = new SessionManager();
- return *sessionManagerInstance;
+ }
+ return *sessionManagerInstance;
}
SessionManager::SessionManager()
{
Pedro::Element* root = event.getDOM();
if (root == NULL) {
- g_warning("Received null DOM; ignoring message.");
- return;
+ g_warning("Received null DOM; ignoring message.");
+ return;
}
Pedro::DOMString session = root->getTagAttribute("wb", "session");
if (invitations.size() > 0)
{
// There's an invitation to process; process it.
- Invitation invitation = invitations.front();
+ Invitation invitation = invitations.front();
Glib::ustring from = invitation.first;
Glib::ustring sessionId = invitation.second;
- Glib::ustring primary =
+ Glib::ustring primary =
"<span weight=\"bold\" size=\"larger\">" +
String::ucompose(_("<b>%1</b> has invited you to a whiteboard session."), from) +
"</span>\n\n" +
@@ -381,25 +379,16 @@ makeInkboardDocument(int code, gchar const* rootname, State::SessionType type, G
// in file.cpp.
//
// \see sp_file_new
-SPDesktop*
-makeInkboardDesktop(SPDocument* doc)
+SPDesktop *makeInkboardDesktop(SPDocument* doc)
{
- SPDesktop* dt;
+ SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL));
+ g_return_val_if_fail(dtw != NULL, NULL);
+ doc->doUnref();
- if (NSApplication::Application::getNewGui())
- dt = NSApplication::Editor::createDesktop(doc);
-
- else
- {
- SPViewWidget *dtw = sp_desktop_widget_new(sp_document_namedview(doc, NULL));
- g_return_val_if_fail(dtw != NULL, NULL);
- doc->doUnref();
-
- sp_create_window(dtw, TRUE);
- dt = static_cast<SPDesktop*>(dtw->view);
- sp_namedview_window_from_document(dt);
- sp_namedview_update_layers_from_document(dt);
- }
+ sp_create_window(dtw, TRUE);
+ SPDesktop *dt = static_cast<SPDesktop*>(dtw->view);
+ sp_namedview_window_from_document(dt);
+ sp_namedview_update_layers_from_document(dt);
return dt;
}
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :