summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordeva <deva>2005-05-23 18:42:50 +0000
committerdeva <deva>2005-05-23 18:42:50 +0000
commit6afe92e834bebe7fa3cbc441444652f917419df6 (patch)
tree734919e1b81cf67bf1a2635c0ebb2ad33d0389b1 /src
parent10317df7721b93b4b6c4d38a75c5e13ca57bf97a (diff)
Error message windows is now modal with mainwindow as its parent.
Diffstat (limited to 'src')
-rw-r--r--src/info_gui.cc11
-rw-r--r--src/info_gui.h2
-rw-r--r--src/miav.cc11
3 files changed, 23 insertions, 1 deletions
diff --git a/src/info_gui.cc b/src/info_gui.cc
index 4536ed3..52bfa5c 100644
--- a/src/info_gui.cc
+++ b/src/info_gui.cc
@@ -53,6 +53,17 @@ InfoGui::~InfoGui()
{
}
+void InfoGui::setParent(QWidget *p)
+{
+ pthread_mutex_lock(&mutex);
+ // Beginning of safezone
+
+ parent = p;
+
+ // End of safezone
+ pthread_mutex_unlock(&mutex);
+}
+
void InfoGui::error(char *fmt, ...)
{
char buf[1024];
diff --git a/src/info_gui.h b/src/info_gui.h
index 6a5c97b..6547496 100644
--- a/src/info_gui.h
+++ b/src/info_gui.h
@@ -60,6 +60,8 @@ public:
void warn(char* fmt, ...);
void info(char* fmt, ...);
+ void setParent(QWidget *p);
+
private:
QApplication *qapp;
QWidget *parent;
diff --git a/src/miav.cc b/src/miav.cc
index c3f08fe..12c63be 100644
--- a/src/miav.cc
+++ b/src/miav.cc
@@ -31,6 +31,9 @@
/*
* $Log$
+ * Revision 1.11 2005/05/23 18:42:50 deva
+ * Error message windows is now modal with mainwindow as its parent.
+ *
* Revision 1.10 2005/05/22 15:49:22 deva
* Added multithreaded encoding support.
*
@@ -80,6 +83,7 @@ enum {
*/
int grab(int argc, char *argv[]) {
#ifdef USE_GUI
+
QApplication miav_grab( argc, argv );
InfoGui info(&miav_grab, NULL);
@@ -87,10 +91,15 @@ int grab(int argc, char *argv[]) {
MainWindow mainwindow(&miav_grab);
miav_grab.setMainWidget( &mainwindow );
+
+ info.setParent(&mainwindow);
return miav_grab.exec();
+
#else /* USE_GUI */
- printf("Error: MIaV was not compiled with GUI support...\n");
+
+ fprintf(stderr, "Error: MIaV was not compiled with GUI support...\n");
return 0;
+
#endif /* USE_GUI */
}