whiteboard-connect.cpp revision 12107abbb78a8201106786c55ec2dda6b2cdab2d
/**
* Whiteboard connection establishment dialog
*
* Authors:
* David Yip <yipdw@rose-hulman.edu>
* Jason Segal, Jonas Collaros, Stephen Montgomery, Brandi Soggs, Matthew Weinstock (original C/Gtk version)
*
* Copyright (c) 2004-2005 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <gtk/gtkdialog.h>
#include <gtkmm/checkbutton.h>
#include "inkscape.h"
#include "desktop.h"
#include "message-stack.h"
#include "prefs-utils.h"
#include "jabber_whiteboard/session-manager.h"
#include "message-context.h"
#include "ui/dialog/whiteboard-connect.h"
#include "util/ucompose.hpp"
namespace Inkscape {
namespace UI {
namespace Dialog {
{
return new WhiteboardConnectDialogImpl();
}
{
this->setSessionManager();
this->_construct();
this->get_vbox()->show_all_children();
}
{
}
void WhiteboardConnectDialogImpl::present()
{
}
void
{
this->_desktop = SP_ACTIVE_DESKTOP;
}
void
{
// Construct dialog interface
this->_password.set_visibility(false);
// Buttons
this->_ok.signal_clicked().connect(sigc::bind< 0 >(sigc::mem_fun(*this, &WhiteboardConnectDialogImpl::_respCallback), GTK_RESPONSE_OK));
this->_cancel.signal_clicked().connect(sigc::bind< 0 >(sigc::mem_fun(*this, &WhiteboardConnectDialogImpl::_respCallback), GTK_RESPONSE_CANCEL));
this->_usessl.signal_clicked().connect(sigc::mem_fun(*this, &WhiteboardConnectDialogImpl::_useSSLClickedCallback));
// Pack widgets into main vbox
}
void
{
if (resp == GTK_RESPONSE_OK) {
bool usessl;
Glib::ustring msg = String::ucompose(_("Establishing connection to Jabber server <b>%1</b> as user <b>%2</b>"), server, username);
case FAILED_TO_CONNECT:
break;
case INVALID_AUTH:
msg = String::ucompose(_("Authentication failed on Jabber server <b>%1</b> as <b>%2</b>"), server, username);
break;
case SSL_INITIALIZATION_ERROR:
msg = String::ucompose(_("SSL initialization failed when connecting to Jabber server <b>%1</b>"), server);
break;
case CONNECT_SUCCESS:
// Save preferences
break;
default:
break;
}
}
this->hide();
}
void
{
if (this->_usessl.get_active()) {
// String::ucompose seems to format numbers according to locale; unfortunately,
// I'm not yet sure how to turn that off
//this->_port.set_text(String::ucompose("%1", LM_CONNECTION_DEFAULT_PORT_SSL));
} else {
}
}
}
}
}
/*
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:encoding=utf-8:textwidth=99 :