]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/ModalDialog.hh
removed doxygen; distcheck bugfix
[chaz/yoink] / src / Moof / ModalDialog.hh
index d56d8ea08f7dc217611bf17453574116975d9110..4ca199e0778f897d15c2c783816636f8e7852756 100644 (file)
@@ -15,7 +15,7 @@
 #include <string>
 
 #if HAVE_CONFIG_H
-#include "../config.h"
+#include "config.h"
 #endif
 
 #if defined(_WIN32)
@@ -132,10 +132,13 @@ struct ModalDialog
                                                                                                 "%s", text2.c_str());
                gtk_window_set_title(GTK_WINDOW(dialog), title.c_str());
 
-               std::string iconPath = Resource::getPath(PACKAGE".png");
-               GdkPixbuf* iconPixbuf = gdk_pixbuf_new_from_file(iconPath.c_str(),
-                                                                                                                NULL);
-               gtk_window_set_icon(GTK_WINDOW(dialog), iconPixbuf);
+               std::string iconPath(PACKAGE".png");
+               if (Resource::getPath(iconPath))
+               {
+                       GdkPixbuf* iconPixbuf = gdk_pixbuf_new_from_file(iconPath.c_str(),
+                                                                                                                        NULL);
+                       gtk_window_set_icon(GTK_WINDOW(dialog), iconPixbuf);
+               }
 
                gtk_dialog_run(GTK_DIALOG(dialog));
                gtk_widget_destroy(dialog);
@@ -169,9 +172,12 @@ struct ModalDialog
                dialog.setInformativeText(text2.c_str());
                dialog.setStandardButtons(QMessageBox::Close);
 
-               std::string iconPath = Resource::getPath(PACKAGE".png");
-               QIcon icon(iconPath.c_str());
-               dialog.setWindowIcon(icon);
+               std::string iconPath(PACKAGE".png");
+               if (Resource::getPath(iconPath))
+               {
+                       QIcon icon(iconPath.c_str());
+                       dialog.setWindowIcon(icon);
+               }
 
                dialog.exec();
 
This page took 0.020708 seconds and 4 git commands to generate.