]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/xywindow.cpp
GTK: wrap GTK_WIDGET
[xonotic/netradiant.git] / radiant / xywindow.cpp
index 61a7a021cdc645b57a8e08ec45aef153de05e876..9203f964bb34cf23b9045ced01a506a149f9641d 100644 (file)
@@ -551,7 +551,7 @@ void WXY_Print(){
        unsigned char* img;
        const char* filename;
 
-       filename = ui::file_dialog( GTK_WIDGET( MainFrame_getWindow() ), FALSE, "Save Image", 0, FILTER_BMP );
+       filename = ui::file_dialog( MainFrame_getWindow( ), FALSE, "Save Image", 0, FILTER_BMP );
        if ( !filename ) {
                return;
        }
@@ -861,7 +861,7 @@ XYWnd::~XYWnd(){
        onDestroyed();
 
        if ( m_mnuDrop ) {
-               gtk_widget_destroy( GTK_WIDGET( m_mnuDrop ) );
+               m_mnuDrop.destroy();
                m_mnuDrop = ui::Menu(ui::null);
        }
 
@@ -1113,7 +1113,7 @@ void pushMenu( const CopiedString& name ){
        m_stack.back().first.add(item);
 
        auto submenu = ui::Menu(ui::New);
-       gtk_menu_item_set_submenu( item, GTK_WIDGET( submenu ) );
+       gtk_menu_item_set_submenu( item, submenu  );
 
        m_stack.push_back( MenuPair( submenu, name ) );
 }
@@ -2570,7 +2570,7 @@ void realise(){
 void unrealise(){
        if ( ++m_unrealised == 1 ) {
                if ( XYWnd::m_mnuDrop ) {
-                       gtk_widget_destroy( GTK_WIDGET( XYWnd::m_mnuDrop ) );
+                       XYWnd::m_mnuDrop.destroy();
                        XYWnd::m_mnuDrop = ui::Menu(ui::null);
                }
        }