messages.cpp revision dc510789faf00e5706e608c827700c397d75af5b
/*
* A very simple dialog for displaying Inkscape messages. Messages
* sent to g_log(), g_warning(), g_message(), ets, are routed here,
* in order to avoid messing with the startup console.
*
* 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
*/
{
//## Add a menu for clear()
//### Set up the text widget
messageText.set_editable(false);
// sick of this thing shrinking too much
message(_("Ready."));
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';
}
const gchar *messageText,
{
}
void Messages::captureLogMessages()
{
/*
This might likely need more code, to capture Gtkmm
*/
if ( !handlerDefault ) {
dialogLoggingFunction, (gpointer)this);
}
if ( !handlerGlibmm ) {
dialogLoggingFunction, (gpointer)this);
}
if ( !handlerAtkmm ) {
dialogLoggingFunction, (gpointer)this);
}
if ( !handlerPangomm ) {
dialogLoggingFunction, (gpointer)this);
}
if ( !handlerGdkmm ) {
dialogLoggingFunction, (gpointer)this);
}
if ( !handlerGtkmm ) {
dialogLoggingFunction, (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 discontinued");
}
} //namespace Dialog
} //namespace UI
} //namespace Inkscape
//#########################################################################
//## E N D O F F I L E
//#########################################################################