X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fmodal_dialog.hh;h=4498692c9a3a79bade1539f6f778bd71fde20fc8;hp=01dfc624795afe3d10c9e90fceca0f6663f62918;hb=6c9943707d4f33035830eba0587a61a34eaecbc2;hpb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c diff --git a/src/moof/modal_dialog.hh b/src/moof/modal_dialog.hh index 01dfc62..4498692 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 -#if defined(_WIN32) +#include + +#if PLATFORM_WIN32 #include -#elif USE_GTK +#elif WITH_GUI_GTK #include -#elif USE_QT4 +#elif WITH_GUI_QT4 #include #include #include @@ -96,7 +94,7 @@ struct modal_dialog break; } -#if defined(_WIN32) +#if PLATFORM_WIN32 int icon_type; switch (type) @@ -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_GUI_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(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_GUI_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(icon_path)) + std::string icon_path = resource::find_file(PACKAGE".png"); + if (!icon_path.empty()) { QIcon icon(icon_path.c_str()); dialog.setWindowIcon(icon);