messages.cpp revision 1465264c884b85cfcf11750488449f0cc6fd9203
/**
* @file
* Messages dialog - implementation.
*/
/* Authors:
* Bob Jamison
* Other dudes from The Inkscape Organization
*
* Copyright (C) 2004, 2005 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "messages.h"
#include "verbs.h"
namespace Inkscape {
namespace UI {
namespace Dialog {
//#########################################################################
//## E V E N T S
//#########################################################################
/**
* Also a public method. Remove all text from the dialog
*/
{
}
//#########################################################################
//## C O N S T R U C T O R / D E S T R U C T O R
//#########################################################################
/**
* Constructor
*/
{
/*
* Menu replaced with buttons
*
menuBar.items().push_back( Gtk::Menu_Helpers::MenuElem(_("_File"), fileMenu) );
fileMenu.items().push_back( Gtk::Menu_Helpers::MenuElem(_("_Clear"),
sigc::mem_fun(*this, &Messages::clear) ) );
fileMenu.items().push_back( Gtk::Menu_Helpers::MenuElem(_("Capture log messages"),
sigc::mem_fun(*this, &Messages::captureLogMessages) ) );
fileMenu.items().push_back( Gtk::Menu_Helpers::MenuElem(_("Release log messages"),
sigc::mem_fun(*this, &Messages::releaseLogMessages) ) );
contents->pack_start(menuBar, Gtk::PACK_SHRINK);
*/
//### Set up the text widget
messageText.set_editable(false);
// sick of this thing shrinking too much
message(_("Ready."));
/*
* TODO - Setting this preference doesn't capture messages that the user can see.
* Inkscape creates an instance of a dialog on startup and sends messages there, but when the user
* opens the dialog View > Messages the DialogManager creates a new instance of this class that is not capturing messages.
*
* message(_("Enable log display by setting dialogs.debug 'redirect' attribute to 1 in preferences.xml"));
*/
handlerDefault = 0;
handlerGlibmm = 0;
handlerAtkmm = 0;
handlerPangomm = 0;
handlerGdkmm = 0;
handlerGtkmm = 0;
}
{
}
//#########################################################################
//## M E T H O D S
//#########################################################################
{
uMsg += '\n';
}
// dialogLoggingCallback is already used in debug.cpp
GLogLevelFlags /*log_level*/,
const gchar *messageText,
{
}
void Messages::toggleCapture()
{
if (checkCapture.get_active()) {
} else {
}
}
void Messages::captureLogMessages()
{
/*
This might likely need more code, to capture Gtkmm
*/
if ( !handlerDefault ) {
dialogLoggingCallback, (gpointer)this);
}
if ( !handlerGlibmm ) {
dialogLoggingCallback, (gpointer)this);
}
if ( !handlerAtkmm ) {
dialogLoggingCallback, (gpointer)this);
}
if ( !handlerPangomm ) {
dialogLoggingCallback, (gpointer)this);
}
if ( !handlerGdkmm ) {
dialogLoggingCallback, (gpointer)this);
}
if ( !handlerGtkmm ) {
dialogLoggingCallback, (gpointer)this);
}
message(_("Log capture started."));
}
void Messages::releaseLogMessages()
{
if ( handlerDefault ) {
handlerDefault = 0;
}
if ( handlerGlibmm ) {
handlerGlibmm = 0;
}
if ( handlerAtkmm ) {
handlerAtkmm = 0;
}
if ( handlerPangomm ) {
handlerPangomm = 0;
}
if ( handlerGdkmm ) {
handlerGdkmm = 0;
}
if ( handlerGtkmm ) {
handlerGtkmm = 0;
}
message(_("Log capture stopped."));
}
} //namespace Dialog
} //namespace UI
} //namespace Inkscape
/*
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 :