#include <gdk/gdkkeysyms.h>
#include "intl.h"
+#include "mainwindow.h"
#include "alertpanel.h"
#include "manage_window.h"
#include "utils.h"
#include "gtkutils.h"
#include "inc.h"
+#include "logwindow.h"
#define TITLE_FONT "-*-helvetica-medium-r-normal--17-*-*-*-*-*-*-*," \
"-*-*-medium-r-normal--16-*-*-*-*-*-*-*,*"
alertpanel_message(_("Error"), buf);
}
+/*!
+ *\brief display an error with a View Log button
+ *
+ */
+void alertpanel_error_log(const gchar *format, ...)
+{
+ va_list args;
+ int val;
+ MainWindow *mainwin;
+ gchar buf[256];
+
+ va_start(args, format);
+ g_vsnprintf(buf, sizeof(buf), format, args);
+ va_end(args);
+ strretchomp(buf);
+
+ mainwin = mainwindow_get_mainwindow();
+
+ if (mainwin && mainwin->logwin) {
+ val = alertpanel(_("Error"), buf, _("OK"), _("View log"), NULL);
+ if (val == G_ALERTALTERNATE)
+ log_window_show(mainwin->logwin);
+ } else
+ alertpanel_error(buf);
+}
+
static void alertpanel_show(void)
{
gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);