index 9228273d0ccbe8ee6ecb4a70c2203ec429cd84e2..31f9cc51e7f879bb4347d534b2fdd6bd70ff183c 100644 (file)
-/*
- * 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:
+/** @file
+ * @brief Messages dialog - implementation
+ */
+/* Authors:
* Bob Jamison
* Other dudes from The Inkscape Organization
*
* Constructor
*/
Messages::Messages()
- : Dialog ("dialogs.messages", SP_VERB_DIALOG_DEBUG)
+ : UI::Widget::Panel("", "/dialogs/messages", SP_VERB_DIALOG_DEBUG)
{
- Gtk::VBox *mainVBox = get_vbox();
+ Gtk::Box *contents = _getContents();
//## Add a menu for clear()
menuBar.items().push_back( Gtk::Menu_Helpers::MenuElem(_("_File"), fileMenu) );
sigc::mem_fun(*this, &Messages::captureLogMessages) ) );
fileMenu.items().push_back( Gtk::Menu_Helpers::MenuElem(_("Release log messages"),
sigc::mem_fun(*this, &Messages::releaseLogMessages) ) );
- mainVBox->pack_start(menuBar, Gtk::PACK_SHRINK);
+ contents->pack_start(menuBar, Gtk::PACK_SHRINK);
//### Set up the text widget
messageText.set_editable(false);
textScroll.add(messageText);
textScroll.set_policy(Gtk::POLICY_ALWAYS, Gtk::POLICY_ALWAYS);
- mainVBox->pack_start(textScroll);
+ contents->pack_start(textScroll);
+ // sick of this thing shrinking too much
+ set_size_request(400, 300);
+
show_all_children();
message(_("Ready."));
buffer->insert (buffer->end(), uMsg);
}
-
-void dialogLoggingFunction(const gchar *log_domain,
- GLogLevelFlags log_level,
+// dialogLoggingCallback is already used in debug.cpp
+static void dialogLoggingCallback(const gchar */*log_domain*/,
+ GLogLevelFlags /*log_level*/,
const gchar *messageText,
gpointer user_data)
{
G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG);
if ( !handlerDefault ) {
handlerDefault = g_log_set_handler(NULL, flags,
- dialogLoggingFunction, (gpointer)this);
+ dialogLoggingCallback, (gpointer)this);
}
if ( !handlerGlibmm ) {
handlerGlibmm = g_log_set_handler("glibmm", flags,
- dialogLoggingFunction, (gpointer)this);
+ dialogLoggingCallback, (gpointer)this);
}
if ( !handlerAtkmm ) {
handlerAtkmm = g_log_set_handler("atkmm", flags,
- dialogLoggingFunction, (gpointer)this);
+ dialogLoggingCallback, (gpointer)this);
}
if ( !handlerPangomm ) {
handlerPangomm = g_log_set_handler("pangomm", flags,
- dialogLoggingFunction, (gpointer)this);
+ dialogLoggingCallback, (gpointer)this);
}
if ( !handlerGdkmm ) {
handlerGdkmm = g_log_set_handler("gdkmm", flags,
- dialogLoggingFunction, (gpointer)this);
+ dialogLoggingCallback, (gpointer)this);
}
if ( !handlerGtkmm ) {
handlerGtkmm = g_log_set_handler("gtkmm", flags,
- dialogLoggingFunction, (gpointer)this);
+ dialogLoggingCallback, (gpointer)this);
}
- message("log capture started");
+ message((char*)"log capture started");
}
void Messages::releaseLogMessages()
g_log_remove_handler("gtkmm", handlerGtkmm);
handlerGtkmm = 0;
}
- message("log capture discontinued");
+ message((char*)"log capture discontinued");
}
} //namespace Dialog
} //namespace UI
} //namespace Inkscape
-//#########################################################################
-//## E N D O F F I L E
-//#########################################################################
+/*
+ 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 :