]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/url.cpp
Wrap GTK
[xonotic/netradiant.git] / radiant / url.cpp
index b86702e7727cc2996afd648e3b8debe691f0fea8..ed33cb2f7a09c0a69db3b09b290cfec46117f427 100644 (file)
@@ -28,7 +28,7 @@
 #include <gdk/gdkwin32.h>
 #include <shellapi.h>
 bool open_url( const char* url ){
-       return ShellExecute( (HWND)GDK_WINDOW_HWND( GTK_WIDGET( MainFrame_getWindow() )->window ), "open", url, 0, 0, SW_SHOW ) > (HINSTANCE)32;
+       return ShellExecute( (HWND)GDK_WINDOW_HWND( gtk_widget_get_window( MainFrame_getWindow() ) ), "open", url, 0, 0, SW_SHOW ) > (HINSTANCE)32;
 }
 #endif
 
@@ -55,6 +55,6 @@ void OpenURL( const char *url ){
        // let's put a little comment
        globalOutputStream() << "OpenURL: " << url << "\n";
        if ( !open_url( url ) ) {
-               gtk_MessageBox( GTK_WIDGET( MainFrame_getWindow() ), "Failed to launch browser!" );
+               MainFrame_getWindow().alert( "Failed to launch browser!" );
        }
 }