Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a utility file for the app, currently only has a display
error function. git-svn-id: https://subversion.cs.uiuc.edu/svn/bang/eoh2009@75 69d76c3e-0761-0410-948c-9895a8bb34fc
- Loading branch information
nbysani2
committed
Jan 28, 2009
1 parent
6db3502
commit 4b4685f
Showing
4 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include"bang-machine-utils.h" | ||
#include<gtk/gtk.h> | ||
|
||
|
||
void BMACHINE_error_dialog(char *error) { | ||
|
||
static GtkWidget *err_dialog = NULL; | ||
if (err_dialog) { | ||
gtk_message_dialog_set_markup(GTK_MESSAGE_DIALOG(err_dialog),error); | ||
} else { | ||
err_dialog = gtk_message_dialog_new(NULL, | ||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, | ||
GTK_MESSAGE_ERROR, | ||
GTK_BUTTONS_OK, | ||
error); | ||
|
||
} | ||
|
||
gtk_dialog_run(GTK_DIALOG(err_dialog)); | ||
gtk_widget_hide(err_dialog); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#ifndef __BANG_MACHINE_UTILS | ||
#define __BANG_MACHINE_UTILS | ||
void BMACHINE_error_dialog(char *error); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters