error-file.cpp revision 1989682aa0e9162a46a309839ea541ff98bd83c1
/*
* Authors:
* Ted Gould <ted@gould.cx>
*
* Copyright (C) 2005 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "ui/dialog/extensions.h"
#include "inkscape.h"
#include "preferences.h"
#include "extension/extension.h"
#include "error-file.h"
/** The name and group of the preference to say whether the error
dialog should be shown on startup. */
#define PREFERENCE_ID "/dialogs/extension-error/show-on-startup"
namespace Inkscape {
namespace Extension {
/** \brief An initializer which builds the dialog
Really a simple function. Basically the message dialog itself gets
built with the first initializer. The next step is to add in the
message, and attach the filename for the error file. After that
the checkbox is built, and has the call back attached to it. Also,
it is set based on the preferences setting for show on startup (really,
it should always be checked if you can see the dialog, but it is
probably good to check anyway).
*/
ErrorFileNotice::ErrorFileNotice (void) :
"", /* message */
false, /* use markup */
true /* modal */
)
{
/* This is some filler text, needs to change before relase */
Glib::ustring dialog_text(_("<span weight=\"bold\" size=\"larger\">One or more extensions failed to load</span>\n\nThe failed extensions have been skipped. Inkscape will continue to run normally but those extensions will be unavailable. For details to troubleshoot this problem, please refer to the error log located at: "));
set_message(dialog_text, true);
#if WITH_GTKMM_3_0
#else
#endif
/* This is some filler text, needs to change before relase */
checkbutton->show();
set_resizable(true);
return;
}
/** \brief Sets the preferences based on the checkbox value */
void
ErrorFileNotice::checkbox_toggle (void)
{
// std::cout << "Toggle value" << std::endl;
}
/** \brief Shows the dialog
This function only shows the dialog if the preferences say that the
user wants to see the dialog, otherwise it just exits.
*/
int
ErrorFileNotice::run (void)
{
return 0;
}
}; }; /* namespace Inkscape, Extension */
/*
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 :