index 3e8ee72a19e95b2951c2ef1b65c7c583000a543d..035fc5a2f9c9294fd1292dc719d1186e8778351b 100644 (file)
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2008 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
#include "jabber_whiteboard/pedrogui.h"
#include "jabber_whiteboard/session-manager.h"
+#include <glibmm/i18n.h>
#include <stdarg.h>
//#########################################################################
-void Roster::doubleClickCallback(const Gtk::TreeModel::Path &path,
- Gtk::TreeViewColumn *col)
+void Roster::doubleClickCallback(const Gtk::TreeModel::Path &/*path*/,
+ Gtk::TreeViewColumn */*col*/)
{
Glib::RefPtr<Gtk::TreeModel> model = rosterView.get_model();
Glib::RefPtr<Gtk::TreeSelection> sel = rosterView.get_selection();
//#########################################################################
//# U S E R L I S T
//#########################################################################
-void UserList::doubleClickCallback(const Gtk::TreeModel::Path &path,
- Gtk::TreeViewColumn *col)
+void UserList::doubleClickCallback(const Gtk::TreeModel::Path &/*path*/,
+ Gtk::TreeViewColumn */*col*/)
{
Glib::RefPtr<Gtk::TreeModel> model = userList.get_model();
Glib::RefPtr<Gtk::TreeSelection> sel = userList.get_selection();
bool GroupChatWindow::receivePresence(const DOMString &fromNick,
bool presence,
const DOMString &show,
- const DOMString &status)
+ const DOMString &/*status*/)
{
DOMString presStr = "";
void ConnectDialog::doubleClickCallback(
- const Gtk::TreeModel::Path &path,
- Gtk::TreeViewColumn *col)
+ const Gtk::TreeModel::Path &/*path*/,
+ Gtk::TreeViewColumn */*col*/)
{
Glib::RefPtr<Gtk::TreeModel> model = accountView.get_model();
Glib::RefPtr<Gtk::TreeSelection> sel = accountView.get_selection();
table.resize(6, 2);
get_vbox()->pack_start(table);
- parent.client.setHost("broadway.dynalias.com");
+ parent.client.setHost("enter server name");
parent.client.setPort(5222);
parent.client.setUsername("");
parent.client.setPassword("");
- parent.client.setResource("pedroXmpp");
+ parent.client.setResource("inkscape");
hostLabel.set_text("Host");
table.attach(hostLabel, 0, 1, 0, 1);
{
va_list args;
va_start(args, fmt);
- vsnprintf(writeBuf, writeBufLen, fmt, args);
+ gchar * buffer = g_strdup_vprintf(fmt, args);
va_end(args) ;
- Gtk::MessageDialog dlg(writeBuf,
+ Gtk::MessageDialog dlg(buffer,
false,
Gtk::MESSAGE_ERROR,
Gtk::BUTTONS_OK,
true);
dlg.run();
+ g_free(buffer);
}
void PedroGui::status(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- vsnprintf(writeBuf, writeBufLen, fmt, args);
+ gchar * buffer = g_strdup_vprintf(fmt, args);
va_end(args) ;
- messageList.postMessage("STATUS", writeBuf);
+ messageList.postMessage("STATUS", buffer);
+ g_free(buffer);
}
//################################
bool PedroGui::chatMessage(const DOMString &from, const DOMString &data)
{
- if(data.size() < 1)
+ if(data.size() > 0)
{
std::vector<ChatWindow *>::iterator iter;
for (iter=chats.begin() ; iter != chats.end() ; iter++)
case XmppEvent::EVENT_STATUS:
{
//printf("##### STATUS: %s\n", event.getData().c_str());
- status(event.getData().c_str());
+ status("%s", event.getData().c_str());
break;
}
case XmppEvent::EVENT_ERROR:
{
//printf("##### ERROR: %s\n", event.getData().c_str());
- error(event.getData().c_str());
+ error("%s", event.getData().c_str());
padlockDisable();
break;
}
void PedroGui::quitCallback()
{
- Gtk::Main::quit();
+ client.disconnect();
+ hide();
+ //Severe overkill! :-)
+ //Gtk::Main::quit();
}
void PedroGui::aboutCallback()
{
Gtk::AboutDialog dlg;
+ dlg.set_name("Inkboard");
std::vector<Glib::ustring>authors;
- authors.push_back("Bob Jamison");
+ authors.push_back("David Yip <yipdw@rose-hulman.edu>");
+ authors.push_back("Dale Harvey <harveyd@gmail.com>");
dlg.set_authors(authors);
- DOMString comments = "A simple XMPP gui client ";
- comments.append("Based on the Pedro XMPP client");
+ DOMString comments = _("Shared SVG whiteboard tool.");
+ comments.append(_("Based on the Pedro XMPP client"));
dlg.set_comments(comments);
dlg.set_version("1.0");
dlg.run();