]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
radiant: less deprecated GTK2 stuff, they are even not supported in GTK3
authorThomas Debesse <dev@illwieckz.net>
Tue, 21 Jun 2022 21:54:24 +0000 (23:54 +0200)
committerThomas Debesse <dev@illwieckz.net>
Tue, 21 Jun 2022 21:54:24 +0000 (23:54 +0200)
radiant/camwindow.cpp
radiant/entityinspector.cpp
radiant/entitylist.cpp
radiant/mainframe.cpp
radiant/patchmanip.cpp
radiant/xywindow.cpp

index c9f713297e44f5b0dc26b4ef2330227cfe056f13..945eac950f3597eb7ebf891c0d6bba52d06ab81e 100644 (file)
@@ -2067,7 +2067,7 @@ void CameraSpeed_decrease(){
 /// \brief Initialisation for things that have the same lifespan as this module.
 void CamWnd_Construct(){
        GlobalCommands_insert( "CenterView", makeCallbackF(GlobalCamera_ResetAngles), Accelerator( GDK_KEY_End ) );
-       GlobalCommands_insert( "CameraFocusOnSelected", makeCallbackF( GlobalCamera_FocusOnSelected ), Accelerator( GDK_Tab ) );
+       GlobalCommands_insert( "CameraFocusOnSelected", makeCallbackF( GlobalCamera_FocusOnSelected ), Accelerator( GDK_KEY_Tab ) );
 
        GlobalToggles_insert( "ToggleCubicClip", makeCallbackF(Camera_ToggleFarClip), ToggleItem::AddCallbackCaller( g_getfarclip_item ), Accelerator( '\\', (GdkModifierType)GDK_CONTROL_MASK ) );
        GlobalCommands_insert( "CubicClipZoomIn", makeCallbackF(Camera_CubeIn), Accelerator( '[', (GdkModifierType)GDK_CONTROL_MASK ) );
@@ -2115,7 +2115,7 @@ void CamWnd_Construct(){
        GlobalShortcuts_insert( "CameraFreeMoveUp", accelerator_null() );
        GlobalShortcuts_insert( "CameraFreeMoveDown", accelerator_null() );
 
-       GlobalShortcuts_insert( "CameraFreeFocus", Accelerator( GDK_Tab ) );
+       GlobalShortcuts_insert( "CameraFreeFocus", Accelerator( GDK_KEY_Tab ) );
 
        GlobalToggles_insert( "ShowStats", makeCallbackF(ShowStatsToggle), ToggleItem::AddCallbackCaller( g_show_stats ) );
 
index 60e68c187c3b25dd2fb5ec5903e42d48f7114071..deb7680098dbebabd84d217c5d1642eb0c0b708b 100644 (file)
@@ -35,8 +35,6 @@
 #include <set>
 #include <gdk/gdkkeysyms.h>
 #include <uilib/uilib.h>
-#include <gtk/gtkstock.h>
-
 
 #include "os/path.h"
 #include "eclasslib.h"
@@ -1237,7 +1235,7 @@ void EntityInspector_clearKeyValue(){
 }
 
 static gint EntityInspector_clearKeyValueKB( GtkEntry* widget, GdkEventKey* event, gpointer data ){
-       if ( event->keyval == GDK_Delete ) {
+       if ( event->keyval == GDK_KEY_Delete ) {
                EntityInspector_clearKeyValue();
                return TRUE;
        }
@@ -1360,7 +1358,7 @@ static gint EntityEntry_keypress( ui::Entry widget, GdkEventKey* event, gpointer
                }
                return TRUE;
        }
-       if ( event->keyval == GDK_Tab ) {
+       if ( event->keyval == GDK_KEY_Tab ) {
                if ( widget._handle == g_entityKeyEntry._handle ) {
                        gtk_window_set_focus( widget.window(), g_entityValueEntry );
                }
@@ -1370,7 +1368,7 @@ static gint EntityEntry_keypress( ui::Entry widget, GdkEventKey* event, gpointer
                }
                return TRUE;
        }
-       if ( event->keyval == GDK_Escape ) {
+       if ( event->keyval == GDK_KEY_Escape ) {
                // gtk_window_set_focus( widget.window(), NULL );
                return TRUE;
        }
@@ -1387,14 +1385,14 @@ void EntityInspector_destroyWindow( ui::Widget widget, gpointer data ){
 }
 
 static gint EntityInspector_hideWindowKB( GtkWidget* widget, GdkEventKey* event, gpointer data ){
-       //if ( event->keyval == GDK_Escape && GTK_WIDGET_VISIBLE( GTK_WIDGET( widget ) ) ) {
-       if ( event->keyval == GDK_Escape  ) {
+       //if ( event->keyval == GDK_KEY_Escape && GTK_WIDGET_VISIBLE( GTK_WIDGET( widget ) ) ) {
+       if ( event->keyval == GDK_KEY_Escape  ) {
                //GroupDialog_showPage( g_page_entity );
                gtk_widget_hide( GTK_WIDGET( GroupDialog_getWindow() ) );
                return TRUE;
        }
        /* this doesn't work, if tab is bound (func is not called then) */
-       if ( event->keyval == GDK_Tab ) {
+       if ( event->keyval == GDK_KEY_Tab ) {
                gtk_window_set_focus( GTK_WINDOW( gtk_widget_get_toplevel( GTK_WIDGET( widget ) ) ), GTK_WIDGET( g_entityKeyEntry ) );
                return TRUE;
        }
index 6c2d0889fce1eadd82ae64a943584f0bbb398ca5..6dc57fc918bcbf951b911d6d1799a9065259777c 100644 (file)
@@ -26,7 +26,6 @@
 #include <uilib/uilib.h>
 #include <gtk/gtk.h>
 #include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkvbox.h>
 
 #include "string/string.h"
 #include "scenelib.h"
index 5bd047720a77cc68fbff4d9d47cffe39f52d2df2..d93a7dc7903b643deed934ed50ba718ca8cbc782 100644 (file)
@@ -3779,7 +3779,7 @@ void MainFrame_Construct(){
        GlobalCommands_insert( "ArbitraryScale", makeCallbackF(DoScaleDlg), Accelerator( 'S', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
 
        GlobalCommands_insert( "BuildMenuCustomize", makeCallbackF(DoBuildMenu) );
-       GlobalCommands_insert( "Build_runRecentExecutedBuild", makeCallbackF(Build_runRecentExecutedBuild), Accelerator( GDK_F5 ) );
+       GlobalCommands_insert( "Build_runRecentExecutedBuild", makeCallbackF(Build_runRecentExecutedBuild), Accelerator( GDK_KEY_F5 ) );
 
        GlobalCommands_insert( "FindBrush", makeCallbackF(DoFind) );
 
@@ -3816,8 +3816,8 @@ void MainFrame_Construct(){
        GlobalCommands_insert( "ChooseClipperColor", makeCallback( g_ColoursMenu.m_clipper ) );
        GlobalCommands_insert( "ChooseOrthoViewNameColor", makeCallback( g_ColoursMenu.m_viewname ) );
 
-       GlobalCommands_insert( "Fullscreen", makeCallbackF( MainFrame_toggleFullscreen ), Accelerator( GDK_F11 ) );
-       GlobalCommands_insert( "MaximizeView", makeCallbackF( Maximize_View ), Accelerator( GDK_F12 ) );
+       GlobalCommands_insert( "Fullscreen", makeCallbackF( MainFrame_toggleFullscreen ), Accelerator( GDK_KEY_F11 ) );
+       GlobalCommands_insert( "MaximizeView", makeCallbackF( Maximize_View ), Accelerator( GDK_KEY_F12 ) );
 
 
        GlobalCommands_insert( "CSGSubtract", makeCallbackF(CSG_Subtract), Accelerator( 'U', (GdkModifierType)GDK_SHIFT_MASK ) );
index 173611ad2b0dcd4891460e2037823bc454b4b0ef..5dc313b4195ff978b509ddd8019a6d83c4dbb4b7 100644 (file)
@@ -795,12 +795,12 @@ void Patch_registerCommands(){
        GlobalCommands_insert( "PatchCone", makeCallbackF(Patch_Cone) );
        GlobalCommands_insert( "PatchSphere", makeCallbackF(Patch_Sphere) );
        GlobalCommands_insert( "SimplePatchMesh", makeCallbackF(Patch_Plane), Accelerator( 'P', (GdkModifierType)GDK_SHIFT_MASK ) );
-       GlobalCommands_insert( "PatchInsertFirstColumn", makeCallbackF(Patch_InsertFirstColumn), Accelerator( GDK_KP_Add, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "PatchInsertFirstColumn", makeCallbackF(Patch_InsertFirstColumn), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
        GlobalCommands_insert( "PatchInsertLastColumn", makeCallbackF(Patch_InsertLastColumn) );
-       GlobalCommands_insert( "PatchInsertFirstRow", makeCallbackF(Patch_InsertFirstRow), Accelerator( GDK_KP_Add, (GdkModifierType)GDK_CONTROL_MASK ) );
+       GlobalCommands_insert( "PatchInsertFirstRow", makeCallbackF(Patch_InsertFirstRow), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)GDK_CONTROL_MASK ) );
        GlobalCommands_insert( "PatchInsertLastRow", makeCallbackF(Patch_InsertLastRow) );
        GlobalCommands_insert( "PatchDeleteFirstColumn", makeCallbackF(Patch_DeleteFirstColumn) );
-       GlobalCommands_insert( "PatchDeleteLastColumn", makeCallbackF(Patch_DeleteLastColumn), Accelerator( GDK_KP_Subtract, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "PatchDeleteLastColumn", makeCallbackF(Patch_DeleteLastColumn), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
        GlobalCommands_insert( "PatchDeleteFirstRow", makeCallbackF(Patch_DeleteFirstRow) );
        GlobalCommands_insert( "PatchDeleteLastRow", makeCallbackF(Patch_DeleteLastRow) );
        GlobalCommands_insert( "InvertCurve", makeCallbackF(Patch_Invert), Accelerator( 'I', (GdkModifierType)GDK_CONTROL_MASK ) );
index 742e33264987ca394d05b9d06c26ea99b62852aa..c06994c4fa90df0765d4ef1fae205952bd124c4a 100644 (file)
@@ -3247,8 +3247,8 @@ void XYWindow_Construct(){
        GlobalCommands_insert( "ViewSide", makeCallbackF(XY_Side), Accelerator( GDK_KEY_KP_Page_Down ) );
        GlobalCommands_insert( "ViewFront", makeCallbackF(XY_Front), Accelerator( GDK_KEY_KP_End ) );
        GlobalCommands_insert( "Zoom100", makeCallbackF(XY_Zoom100) );
-       GlobalCommands_insert( "CenterXYView", makeCallbackF(XY_Centralize), Accelerator( GDK_Tab, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "XYFocusOnSelected", makeCallbackF(XY_Focus), Accelerator( GDK_grave ) );
+       GlobalCommands_insert( "CenterXYView", makeCallbackF(XY_Centralize), Accelerator( GDK_KEY_Tab, (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
+       GlobalCommands_insert( "XYFocusOnSelected", makeCallbackF(XY_Focus), Accelerator( GDK_KEY_grave ) );
 
        GlobalPreferenceSystem().registerPreference( "ClipCaulk", make_property_string( g_clip_useCaulk ) );