mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore: Gtk: Now using xmessage for Panic to avoid crashing with KDE
git-svn-id: svn://ultimatepp.org/upp/trunk@8188 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
dca80af845
commit
74c624bc7b
1 changed files with 9 additions and 5 deletions
|
|
@ -26,11 +26,15 @@ void _DBG_Ungrab(void)
|
|||
void Ctrl::PanicMsgBox(const char *title, const char *text)
|
||||
{
|
||||
LLOG("PanicMsgBox " << title << ": " << text);
|
||||
_DBG_Ungrab();
|
||||
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_CLOSE, "%s: %s", title, text);
|
||||
gtk_dialog_run(GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy(dialog);
|
||||
if(system("which xmessage") == 0)
|
||||
system(String().Cat() << "xmessage -center \"" << title << "\n" << text << "\"");
|
||||
else {
|
||||
_DBG_Ungrab();
|
||||
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,
|
||||
GTK_BUTTONS_CLOSE, "%s: %s", title, text);
|
||||
gtk_dialog_run(GTK_DIALOG (dialog));
|
||||
gtk_widget_destroy(dialog);
|
||||
}
|
||||
__BREAK__;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue