X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fmodal_dialog.hh;h=c53766237df20bd20ae5153c6eea872f1de5825c;hp=65bc61f79e54b286c3a511899888adaaa3ef2469;hb=d6990468d297a6cbee98e4d0d33ab37e1b2352c9;hpb=831f04d4bc19a390415ac0bbac4331c7a65509bc diff --git a/src/moof/modal_dialog.hh b/src/moof/modal_dialog.hh index 65bc61f..c537662 100644 --- a/src/moof/modal_dialog.hh +++ b/src/moof/modal_dialog.hh @@ -18,17 +18,15 @@ * supported, but only one can be used as determined at build time. */ -#include - -#if HAVE_CONFIG_H #include "config.h" -#endif + +#include #if defined(_WIN32) #include -#elif USE_GTK +#elif WITH_GTK #include -#elif USE_QT4 +#elif WITH_QT4 #include #include #include @@ -115,7 +113,7 @@ struct modal_dialog MessageBox(0, (text1 + "\n" + text2).c_str(), title.c_str(), MB_OK | icon_type); -#elif USE_GTK +#elif WITH_GTK int argc = 0; char** argv; @@ -142,8 +140,8 @@ struct modal_dialog "%s", text2.c_str()); gtk_window_set_title(GTK_WINDOW(dialog), title.c_str()); - std::string icon_path(PACKAGE".png"); - if (resource::find_path(icon_path)) + std::string icon_path = resource::find_file(PACKAGE".png"); + if (!icon_path.empty()) { GdkPixbuf* iconPixbuf = gdk_pixbuf_new_from_file(icon_path.c_str(), NULL); @@ -155,7 +153,7 @@ struct modal_dialog // FIXME - this doesn't seem to actually remove the window from the // screen when it closes -#elif USE_QT4 +#elif WITH_QT4 int argc = 0; char** argv; @@ -182,8 +180,8 @@ struct modal_dialog dialog.setInformativeText(text2.c_str()); dialog.setStandardButtons(QMessageBox::Close); - std::string icon_path(PACKAGE".png"); - if (resource::find_path(icon_path)) + std::string icon_path = resource::find_file(PACKAGE".png"); + if (!icon_path.empty()) { QIcon icon(icon_path.c_str()); dialog.setWindowIcon(icon);