]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge commit 'dfc3e9c2a59fec2feaf5c808f316eed17ea227e2' into garux-merge
authorThomas Debesse <dev@illwieckz.net>
Tue, 12 Feb 2019 02:19:18 +0000 (03:19 +0100)
committerThomas Debesse <dev@illwieckz.net>
Tue, 12 Feb 2019 02:19:18 +0000 (03:19 +0100)
1  2 
radiant/filterbar.cpp
radiant/mainframe.cpp
setup/data/tools/bitmaps/cap_curve.png

index 6f9958cc7bc986d174d368cba4d3aa96bf985f91,918f3d808b3ae12d9420333a71cf333fc14229bb..424280ce2f9da105cbe6b710b0e2832819e13d9d
@@@ -173,77 -166,55 +173,77 @@@ gboolean Structural_button_press( ui::W
  }
  
  
 -GtkToolbar* create_filter_toolbar(){
 -                      GtkToolbar* filter_toolbar = GTK_TOOLBAR( gtk_toolbar_new() );
 -                      gtk_widget_show( GTK_WIDGET( filter_toolbar ) );
 -                      g_signal_connect( G_OBJECT( filter_toolbar ), "enter_notify_event", G_CALLBACK( ToggleActions0 ), 0 );
 +ui::Toolbar create_filter_toolbar(){
 +                      auto filter_toolbar = ui::Toolbar::from( gtk_toolbar_new() );
 +                      gtk_orientable_set_orientation( GTK_ORIENTABLE(filter_toolbar), GTK_ORIENTATION_HORIZONTAL );
 +                      gtk_toolbar_set_style( filter_toolbar, GTK_TOOLBAR_ICONS );
 +                      filter_toolbar.show();
  
 -                      GtkToggleButton* button;
  
 -                      toolbar_append_toggle_button( filter_toolbar, "World (ALT + 1)", "f-world.png", "FilterWorldBrushes" );
 +                      auto space = [&]() {
 +                              auto btn = ui::ToolItem::from(gtk_separator_tool_item_new());
 +                                      btn.show();
 +                                      filter_toolbar.add(btn);
 +                      };
  
 -                      button = toolbar_append_toggle_button( filter_toolbar, "Structural (CTRL + SHIFT + D)\nRightClick: MakeStructural", "f-structural.png", "FilterStructural" );
 -                      g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Structural_button_press ), 0 );
 +                      g_signal_connect( G_OBJECT( filter_toolbar ), "enter_notify_event", G_CALLBACK( ToggleActions0 ), 0 );
 +
 +                      toolbar_append_toggle_button( filter_toolbar, "World (ALT + 1)", "f-world.png", "FilterWorldBrushes" );
  
 -                      button = toolbar_append_toggle_button( filter_toolbar, "Details (CTRL + D)\nRightClick: MakeDetail", "f-details.png", "FilterDetails" );
 -                      g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Detail_button_press ), 0 );
 +                      {
-                               auto button = toolbar_append_toggle_button( filter_toolbar, "Details (CTRL + D)\nRightClick: MakeDetail", "f-details.png", "FilterDetails" );
-                               g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Detail_button_press ), 0 );
++                              auto button = toolbar_append_toggle_button( filter_toolbar, "Structural (CTRL + SHIFT + D)\nRightClick: MakeStructural", "f-structural.png", "FilterStructural" );
++                              g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Structural_button_press ), 0 );
 +                      }
  
-                               auto button = toolbar_append_toggle_button( filter_toolbar, "Structural (CTRL + SHIFT + D)\nRightClick: MakeStructural", "f-structural.png", "FilterStructural" );
-                               g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Structural_button_press ), 0 );
 +                      {
++                              auto button = toolbar_append_toggle_button( filter_toolbar, "Details (CTRL + D)\nRightClick: MakeDetail", "f-details.png", "FilterDetails" );
++                              g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Detail_button_press ), 0 );
 +                      }
  
                        toolbar_append_toggle_button( filter_toolbar, "Patches (CTRL + P)", "patch_wireframe.png", "FilterPatches" );
 -                      gtk_toolbar_append_space( GTK_TOOLBAR( filter_toolbar ) );
 -
 -                      button = toolbar_append_toggle_button( filter_toolbar, "Areaportals (ALT + 3)\nRightClick: toggle tex\n\tnoDraw\n\tnoDrawNonSolid", "f-areaportal.png", "FilterAreaportals" );
 -                      g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Areaportals_button_press ), 0 );
 +                      space();
  
 +                      {
 +                              auto button = toolbar_append_toggle_button( filter_toolbar, "Areaportals (ALT + 3)\nRightClick: toggle tex\n\tnoDraw\n\tnoDrawNonSolid", "f-areaportal.png", "FilterAreaportals" );
 +                              g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Areaportals_button_press ), 0 );
 +                      }
  
  
                        toolbar_append_toggle_button( filter_toolbar, "Translucent (ALT + 4)", "f-translucent.png", "FilterTranslucent" );
  
 -                      button = toolbar_append_toggle_button( filter_toolbar, "Liquids (ALT + 5)\nRightClick: toggle tex\n\twaterCaulk\n\tlavaCaulk\n\tslimeCaulk", "f-liquids.png", "FilterLiquids" );
 -                      g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Liquids_button_press ), 0 );
 +                      {
 +                              auto button = toolbar_append_toggle_button( filter_toolbar, "Liquids (ALT + 5)\nRightClick: toggle tex\n\twaterCaulk\n\tlavaCaulk\n\tslimeCaulk", "f-liquids.png", "FilterLiquids" );
 +                              g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Liquids_button_press ), 0 );
 +                      }
  
 -                      button = toolbar_append_toggle_button( filter_toolbar, "Caulk (ALT + 6)\nRightClick: tex Caulk", "f-caulk.png", "FilterCaulk" );
 -                      g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Caulk_button_press ), 0 );
 +                      {
 +                              auto button = toolbar_append_toggle_button( filter_toolbar, "Caulk (ALT + 6)\nRightClick: tex Caulk", "f-caulk.png", "FilterCaulk" );
 +                              g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Caulk_button_press ), 0 );
 +                      }
  
 -                      button = toolbar_append_toggle_button( filter_toolbar, "Clips (ALT + 7)\nRightClick: toggle tex\n\tplayerClip\n\tweapClip", "f-clip.png", "FilterClips" );
 -                      g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Clip_button_press ), 0 );
 +                      {
 +                              auto button = toolbar_append_toggle_button( filter_toolbar, "Clips (ALT + 7)\nRightClick: toggle tex\n\tplayerClip\n\tweapClip", "f-clip.png", "FilterClips" );
 +                              g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Clip_button_press ), 0 );
 +                      }
  
 -                      button = toolbar_append_toggle_button( filter_toolbar, "HintsSkips (CTRL + H)\nRightClick: toggle tex\n\thint\n\thintLocal\n\thintSkip", "f-hint.png", "FilterHintsSkips" );
 -                      g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Hint_button_press ), 0 );
 +                      {
 +                              auto button = toolbar_append_toggle_button( filter_toolbar, "HintsSkips (CTRL + H)\nRightClick: toggle tex\n\thint\n\thintLocal\n\thintSkip", "f-hint.png", "FilterHintsSkips" );
 +                              g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Hint_button_press ), 0 );
 +                      }
  
                        //toolbar_append_toggle_button( filter_toolbar, "Paths (ALT + 8)", "texture_lock.png", "FilterPaths" );
 -                      gtk_toolbar_append_space( GTK_TOOLBAR( filter_toolbar ) );
 +                      space();
                        toolbar_append_toggle_button( filter_toolbar, "Entities (ALT + 2)", "f-entities.png", "FilterEntities" );
-                       toolbar_append_toggle_button( filter_toolbar, "Lights (ALT + 0)", "lightinspector.png", "FilterLights" );
+                       toolbar_append_toggle_button( filter_toolbar, "Lights (ALT + 0)", "f-lights.png", "FilterLights" );
                        toolbar_append_toggle_button( filter_toolbar, "Models (SHIFT + M)", "f-models.png", "FilterModels" );
  
 -                      button = toolbar_append_toggle_button( filter_toolbar, "Triggers (CTRL + SHIFT + T)\nRightClick: tex Trigger", "f-triggers.png", "FilterTriggers" );
 -                      g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Trigger_button_press ), 0 );
 +                      {
 +                              auto button = toolbar_append_toggle_button( filter_toolbar, "Triggers (CTRL + SHIFT + T)\nRightClick: tex Trigger", "f-triggers.png", "FilterTriggers" );
 +                              g_signal_connect( G_OBJECT( button ), "button_press_event", G_CALLBACK( Trigger_button_press ), 0 );
 +                      }
  
                        //toolbar_append_toggle_button( filter_toolbar, "Decals (SHIFT + D)", "f-decals.png", "FilterDecals" );
 -                      gtk_toolbar_append_space( GTK_TOOLBAR( filter_toolbar ) );
 +                      space();
                        toolbar_append_button( filter_toolbar, "InvertFilters", "f-invert.png", "InvertFilters" );
                        toolbar_append_button( filter_toolbar, "ResetFilters", "f-reset.png", "ResetFilters" );
                        return filter_toolbar;
index 196a60df37464afe89faf0d1cb1f3246cb99a7c3,172c14395eb6e804ebe61897cb5a7e4e8d0b3cb1..208d8043b79a416b15cb1fa3dba8f78bd7d582c5
@@@ -2948,8 -2804,16 +2948,13 @@@ void MainFrame::Create()
                }
        }
  
 -
 -
 -
 -      GtkWidget* main_statusbar = create_main_statusbar( m_pStatusLabel );
 -      gtk_box_pack_end( GTK_BOX( vbox ), main_statusbar, FALSE, TRUE, 2 );
+       /*GtkToolbar* plugin_toolbar = create_plugin_toolbar();
+       if ( !g_Layout_enablePluginToolbar.m_value ) {
+               gtk_widget_hide( GTK_WIDGET( plugin_toolbar ) );
+       }*/
 +      ui::Widget main_statusbar = create_main_statusbar(reinterpret_cast<ui::Widget *>(m_pStatusLabel));
 +      vbox.pack_end(main_statusbar, FALSE, TRUE, 2);
  
        GroupDialog_constructWindow( window );
        g_page_entity = GroupDialog_addPage( "Entities", EntityInspector_constructWindow( GroupDialog_getWindow() ), RawStringExportCaller( "Entities" ) );
index 6ce1c0c16ccf248e9971ab7ad9c1d88e4e8aad2b,0000000000000000000000000000000000000000..a46d1dd5df795d6ae3524c2522a682bff97d8a86
mode 100644,000000..100644
Binary files differ