]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
Merge commit 'de5fcea3362fe1e6cb68ccfab792469a993da215' into garux-merge
authorThomas Debesse <dev@illwieckz.net>
Mon, 25 May 2020 23:43:55 +0000 (01:43 +0200)
committerThomas Debesse <dev@illwieckz.net>
Mon, 25 May 2020 23:43:55 +0000 (01:43 +0200)
1  2 
radiant/camwindow.cpp
radiant/camwindow.h
radiant/mainframe.cpp
radiant/xywindow.cpp
radiant/xywindow.h

index cc907200868cc3ba1140c11c80385bd9644685a2,1b36589bf6432ce3d3d49ec56ee580fdbad87594..358d1b51711fa7b4634d97996941c585bfe70dc1
@@@ -1915,32 -1910,32 +1911,32 @@@ void CameraSpeed_decrease()
  
  /// \brief Initialisation for things that have the same lifespan as this module.
  void CamWnd_Construct(){
 -      GlobalCommands_insert( "CenterView", FreeCaller<GlobalCamera_ResetAngles>(), Accelerator( GDK_End ) );
 +      GlobalCommands_insert( "CenterView", makeCallbackF(GlobalCamera_ResetAngles), Accelerator( GDK_KEY_End ) );
  
 -      GlobalToggles_insert( "ToggleCubicClip", FreeCaller<Camera_ToggleFarClip>(), ToggleItem::AddCallbackCaller( g_getfarclip_item ), Accelerator( '\\', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "CubicClipZoomIn", FreeCaller<Camera_CubeIn>(), Accelerator( '[', (GdkModifierType)GDK_CONTROL_MASK ) );
 -      GlobalCommands_insert( "CubicClipZoomOut", FreeCaller<Camera_CubeOut>(), Accelerator( ']', (GdkModifierType)GDK_CONTROL_MASK ) );
 +      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 ) );
 +      GlobalCommands_insert( "CubicClipZoomOut", makeCallbackF(Camera_CubeOut), Accelerator( ']', (GdkModifierType)GDK_CONTROL_MASK ) );
  
 -      GlobalCommands_insert( "UpFloor", FreeCaller<Camera_ChangeFloorUp>(), Accelerator( GDK_Prior ) );
 -      GlobalCommands_insert( "DownFloor", FreeCaller<Camera_ChangeFloorDown>(), Accelerator( GDK_Next ) );
 +      GlobalCommands_insert( "UpFloor", makeCallbackF(Camera_ChangeFloorUp), Accelerator( GDK_KEY_Prior ) );
 +      GlobalCommands_insert( "DownFloor", makeCallbackF(Camera_ChangeFloorDown), Accelerator( GDK_KEY_Next ) );
  
        GlobalToggles_insert( "ToggleCamera", ToggleShown::ToggleCaller( g_camera_shown ), ToggleItem::AddCallbackCaller( g_camera_shown.m_item ), Accelerator( 'C', (GdkModifierType)( GDK_SHIFT_MASK | GDK_CONTROL_MASK ) ) );
-       GlobalCommands_insert( "LookThroughSelected", makeCallbackF(GlobalCamera_LookThroughSelected) );
-       GlobalCommands_insert( "LookThroughCamera", makeCallbackF(GlobalCamera_LookThroughCamera) );
 -//    GlobalCommands_insert( "LookThroughSelected", FreeCaller<GlobalCamera_LookThroughSelected>() );
 -//    GlobalCommands_insert( "LookThroughCamera", FreeCaller<GlobalCamera_LookThroughCamera>() );
++//    GlobalCommands_insert( "LookThroughSelected", makeCallbackF(GlobalCamera_LookThroughSelected) );
++//    GlobalCommands_insert( "LookThroughCamera", makeCallbackF(GlobalCamera_LookThroughCamera) );
  
        if ( g_pGameDescription->mGameType == "doom3" ) {
 -              GlobalCommands_insert( "TogglePreview", FreeCaller<CamWnd_TogglePreview>(), Accelerator( GDK_F3 ) );
 +              GlobalCommands_insert( "TogglePreview", makeCallbackF(CamWnd_TogglePreview), Accelerator( GDK_KEY_F3 ) );
        }
  
 -      GlobalCommands_insert( "CameraSpeedInc", FreeCaller<CameraSpeed_increase>(), Accelerator( GDK_KP_Add, (GdkModifierType)GDK_SHIFT_MASK ) );
 -      GlobalCommands_insert( "CameraSpeedDec", FreeCaller<CameraSpeed_decrease>(), Accelerator( GDK_KP_Subtract, (GdkModifierType)GDK_SHIFT_MASK ) );
 +      GlobalCommands_insert( "CameraSpeedInc", makeCallbackF(CameraSpeed_increase), Accelerator( GDK_KEY_KP_Add, (GdkModifierType)GDK_SHIFT_MASK ) );
 +      GlobalCommands_insert( "CameraSpeedDec", makeCallbackF(CameraSpeed_decrease), Accelerator( GDK_KEY_KP_Subtract, (GdkModifierType)GDK_SHIFT_MASK ) );
  
 -      GlobalShortcuts_insert( "CameraForward", Accelerator( GDK_Up ) );
 -      GlobalShortcuts_insert( "CameraBack", Accelerator( GDK_Down ) );
 -      GlobalShortcuts_insert( "CameraLeft", Accelerator( GDK_Left ) );
 -      GlobalShortcuts_insert( "CameraRight", Accelerator( GDK_Right ) );
 -      GlobalShortcuts_insert( "CameraStrafeRight", Accelerator( 'D' ) );
 -      GlobalShortcuts_insert( "CameraStrafeLeft", Accelerator( 'A' ) );
 +      GlobalShortcuts_insert( "CameraForward", Accelerator( GDK_KEY_Up ) );
 +      GlobalShortcuts_insert( "CameraBack", Accelerator( GDK_KEY_Down ) );
 +      GlobalShortcuts_insert( "CameraLeft", Accelerator( GDK_KEY_Left ) );
 +      GlobalShortcuts_insert( "CameraRight", Accelerator( GDK_KEY_Right ) );
 +      GlobalShortcuts_insert( "CameraStrafeRight", Accelerator( GDK_KEY_period ) );
 +      GlobalShortcuts_insert( "CameraStrafeLeft", Accelerator( GDK_KEY_comma ) );
  
        GlobalShortcuts_insert( "CameraUp", accelerator_null() );
        GlobalShortcuts_insert( "CameraDown", accelerator_null() );
index ded8aefcba9456471890a6b1af02b647965a9b3e,c40c8fb08be89a1da6b13046602b042d4914a140..a838e18ab1a9b3449f301caa297189bee4a971cb
@@@ -39,8 -41,8 +39,7 @@@ void CamWnd_setParent( CamWnd& camwnd, 
  
  void GlobalCamera_setCamWnd( CamWnd& camwnd );
  
- void fill_view_camera_menu( ui::Menu menu );
 -typedef struct _GtkToolbar GtkToolbar;
 -void CamWnd_constructToolbar( GtkToolbar* toolbar );
 +void CamWnd_constructToolbar( ui::Toolbar toolbar );
  void CamWnd_registerShortcuts();
  
  void GlobalCamera_Benchmark();
index 7860a5b98e0f44b7aab5e899be91aff9b532caeb,233a9133c5033bc01848908ccd490fee40383efb..c2efdc3aa34452176c32071912c63f5273c03534
@@@ -2046,30 -1897,16 +2046,16 @@@ ui::MenuItem create_edit_menu()
        return edit_menu_item;
  }
  
- void fill_view_xy_top_menu( ui::Menu menu ){
-       create_check_menu_item_with_mnemonic( menu, "XY (Top) View", "ToggleView" );
- }
- void fill_view_yz_side_menu( ui::Menu menu ){
-       create_check_menu_item_with_mnemonic( menu, "YZ (Side) View", "ToggleSideView" );
- }
- void fill_view_xz_front_menu( ui::Menu menu ){
-       create_check_menu_item_with_mnemonic( menu, "XZ (Front) View", "ToggleFrontView" );
- }
  
 -GtkWidget* g_toggle_z_item = 0;
 -GtkWidget* g_toggle_console_item = 0;
 -GtkWidget* g_toggle_entity_item = 0;
 -GtkWidget* g_toggle_entitylist_item = 0;
 +ui::Widget g_toggle_z_item{ui::null};
 +ui::Widget g_toggle_console_item{ui::null};
 +ui::Widget g_toggle_entity_item{ui::null};
 +ui::Widget g_toggle_entitylist_item{ui::null};
  
 -GtkMenuItem* create_view_menu( MainFrame::EViewStyle style ){
 +ui::MenuItem create_view_menu( MainFrame::EViewStyle style ){
        // View menu
 -      GtkMenuItem* view_menu_item = new_sub_menu_item_with_mnemonic( "Vie_w" );
 -      GtkMenu* menu = GTK_MENU( gtk_menu_item_get_submenu( view_menu_item ) );
 +      auto view_menu_item = new_sub_menu_item_with_mnemonic( "Vie_w" );
 +      auto menu = ui::Menu::from( gtk_menu_item_get_submenu( view_menu_item ) );
        if ( g_Layout_enableDetachableMenus.m_value ) {
                menu_tearoff( menu );
        }
Simple merge
Simple merge