]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/patchdialog.cpp
Wrap more GTK
[xonotic/netradiant.git] / radiant / patchdialog.cpp
index a44fc1037d29661cfd74048516c210c025ba6552..0d8b2276ec1dfa8d13827bd49c3ccb1861c5649d 100644 (file)
@@ -160,7 +160,7 @@ public:
 ui::CheckButton m_enabled;
 ui::Entry m_horizontal;
 ui::Entry m_vertical;
-Subdivisions() : m_enabled( (GtkCheckButton *) 0 ), m_horizontal( nullptr ), m_vertical( nullptr ){
+Subdivisions() : m_enabled( (GtkCheckButton *) 0 ), m_horizontal( ui::null ), m_vertical( ui::null ){
 }
 void update(){
        PatchFixedSubdivisions subdivisions;
@@ -176,8 +176,8 @@ void update(){
        }
        else
        {
-               gtk_entry_set_text( m_horizontal, "" );
-               gtk_entry_set_text( m_vertical, "" );
+               m_horizontal.text("");
+               m_vertical.text("");
                gtk_widget_set_sensitive( GTK_WIDGET( m_horizontal ), FALSE );
                gtk_widget_set_sensitive( GTK_WIDGET( m_vertical ), FALSE );
        }
@@ -226,8 +226,8 @@ float m_fZ;
    float       m_fVShift; */
 int m_nCol;
 int m_nRow;
-ui::ComboBoxText m_pRowCombo{nullptr};
-ui::ComboBoxText m_pColCombo{nullptr};
+ui::ComboBoxText m_pRowCombo{ui::null};
+ui::ComboBoxText m_pColCombo{ui::null};
 std::size_t m_countRows;
 std::size_t m_countCols;
 
@@ -256,7 +256,7 @@ PatchInspector() :
 }
 
 bool visible(){
-       return gtk_widget_get_visible( GetWidget() );
+       return GetWidget().visible();
 }
 
 //  void UpdateInfo();
@@ -539,11 +539,11 @@ static void OnSpinChanged( GtkAdjustment *adj, gpointer data ){
 }
 
 static gint OnDialogKey( ui::Widget widget, GdkEventKey* event, gpointer data ){
-       if ( event->keyval == GDK_Return ) {
+       if ( event->keyval == GDK_KEY_Return ) {
                OnApply( ui::root, 0 );
                return TRUE;
        }
-       else if ( event->keyval == GDK_Escape ) {
+       else if ( event->keyval == GDK_KEY_Escape ) {
                g_PatchInspector.GetPatchInfo();
                return TRUE;
        }
@@ -888,7 +888,7 @@ ui::Window PatchInspector::BuildDialog(){
                                                                                          (GtkAttachOptions)( GTK_FILL ),
                                                                                          (GtkAttachOptions)( 0 ), 0, 0 );
                                                        gtk_widget_set_size_request( GTK_WIDGET( entry ), 50, -1 );
-                                                       g_object_set_data( G_OBJECT( window ), "hshift_entry", entry );
+                                                       g_object_set_data( G_OBJECT( window ), "hshift_entry", (void *) entry );
                                                        // we fill in this data, if no patch is selected the widgets are unmodified when the inspector is raised
                                                        // so we need to have at least one initialisation somewhere
                                                        entry_set_float( entry, g_pi_globals.shift[0] );