]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Merge commit 'a62c7302d3930875aafdc56696f370dbdc5ed40e' into garux-merge
authorThomas Debesse <dev@illwieckz.net>
Mon, 25 May 2020 18:12:20 +0000 (20:12 +0200)
committerThomas Debesse <dev@illwieckz.net>
Mon, 25 May 2020 18:12:20 +0000 (20:12 +0200)
1  2 
include/ishaders.h
plugins/entity/light.cpp
plugins/entity/miscmodel.cpp
plugins/entity/targetable.h
plugins/shaders/shaders.cpp
radiant/brushmanip.cpp
radiant/findtexturedialog.cpp
radiant/patchmanip.cpp
radiant/texwindow.cpp

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d9811d3e48c6f58d2b1780fa31f50f23e47cc3d6,8452a7604c588aa852d432a84bc7fe1cdcd52ff8..21db5d78c747cea7ead7b20d44f1dd26e0a46478
@@@ -138,69 -147,79 +138,71 @@@ ui::Window FindTextureDialog::BuildDial
  
        m_position_tracker.connect( dlg );
  
 -      hbox = gtk_hbox_new( FALSE, 5 );
 -      gtk_widget_show( hbox );
 -      gtk_container_add( GTK_CONTAINER( dlg ), GTK_WIDGET( hbox ) );
 +      auto hbox = ui::HBox( FALSE, 5 );
 +      hbox.show();
 +      dlg.add(hbox);
        gtk_container_set_border_width( GTK_CONTAINER( hbox ), 5 );
  
 -      vbox = gtk_vbox_new( FALSE, 5 );
 -      gtk_widget_show( vbox );
 -      gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), TRUE, TRUE, 0 );
 -
 -      table = gtk_table_new( 2, 2, FALSE );
 -      gtk_widget_show( table );
 -      gtk_box_pack_start( GTK_BOX( vbox ), GTK_WIDGET( table ), TRUE, TRUE, 0 );
 -      gtk_table_set_row_spacings( GTK_TABLE( table ), 5 );
 -      gtk_table_set_col_spacings( GTK_TABLE( table ), 5 );
 -
 -      label = gtk_label_new( "Find:" );
 -      gtk_widget_show( label );
 -      gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 0, 1,
 -                                        (GtkAttachOptions) ( GTK_FILL ),
 -                                        (GtkAttachOptions) ( 0 ), 0, 0 );
 +      auto vbox = ui::VBox( FALSE, 5 );
 +      vbox.show();
 +      hbox.pack_start( vbox, TRUE, TRUE, 0 );
 +
 +    auto table = ui::Table(2, 2, FALSE);
 +      table.show();
 +      vbox.pack_start( table, TRUE, TRUE, 0 );
 +    gtk_table_set_row_spacings(table, 5);
 +    gtk_table_set_col_spacings(table, 5);
 +
 +      label = ui::Label( "Find:" );
 +      label.show();
 +    table.attach(label, {0, 1, 0, 1}, {GTK_FILL, 0});
        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
  
-       label = ui::Label( "Replace:" );
 -      label = gtk_label_new( "Replace:*" );
++      label = ui::Label( "Replace:*" );
+       gtk_widget_set_tooltip_text( label, "Empty = search mode" );
 -      gtk_widget_show( label );
 -      gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
 -                                        (GtkAttachOptions) ( GTK_FILL ),
 -                                        (GtkAttachOptions) ( 0 ), 0, 0 );
 +      label.show();
 +    table.attach(label, {0, 1, 1, 2}, {GTK_FILL, 0});
        gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
  
 -      entry = gtk_entry_new();
 -      gtk_widget_show( entry );
 -      gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 0, 1,
 -                                        (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
 -                                        (GtkAttachOptions) ( 0 ), 0, 0 );
 -      g_signal_connect( G_OBJECT( entry ), "focus_in_event",
 +      entry = ui::Entry(ui::New);
 +      entry.show();
 +    table.attach(entry, {1, 2, 0, 1}, {GTK_EXPAND | GTK_FILL, 0});
 +      entry.connect( "focus_in_event",
                                          G_CALLBACK( find_focus_in ), 0 );
 -      AddDialogData( *GTK_ENTRY( entry ), m_strFind );
 -      GlobalTextureEntryCompletion::instance().connect( GTK_ENTRY( entry ) );
 +      AddDialogData( entry, m_strFind );
 +      GlobalTextureEntryCompletion::instance().connect( entry );
  
 -      entry = gtk_entry_new();
 +      entry = ui::Entry(ui::New);
+       gtk_widget_set_tooltip_text( entry, "Empty = search mode" );
 -      gtk_widget_show( entry );
 -      gtk_table_attach( GTK_TABLE( table ), entry, 1, 2, 1, 2,
 -                                        (GtkAttachOptions) ( GTK_EXPAND | GTK_FILL ),
 -                                        (GtkAttachOptions) ( 0 ), 0, 0 );
 -      g_signal_connect( G_OBJECT( entry ), "focus_in_event",
 +      entry.show();
 +    table.attach(entry, {1, 2, 1, 2}, {GTK_EXPAND | GTK_FILL, 0});
 +      entry.connect( "focus_in_event",
                                          G_CALLBACK( replace_focus_in ), 0 );
 -      AddDialogData( *GTK_ENTRY( entry ), m_strReplace );
 -      GlobalTextureEntryCompletion::instance().connect( GTK_ENTRY( entry ) );
 -
 -      check = gtk_check_button_new_with_label( "Within selected brushes only" );
 -      gtk_widget_show( check );
 -      gtk_box_pack_start( GTK_BOX( vbox ), check, TRUE, TRUE, 0 );
 -      AddDialogData( *GTK_TOGGLE_BUTTON( check ), m_bSelectedOnly );
 -
 -      vbox = gtk_vbox_new( FALSE, 5 );
 -      gtk_widget_show( vbox );
 -      gtk_box_pack_start( GTK_BOX( hbox ), GTK_WIDGET( vbox ), FALSE, FALSE, 0 );
 -
 -      button = gtk_button_new_with_label( "Apply" );
 -      gtk_widget_show( button );
 -      gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 );
 -      g_signal_connect( G_OBJECT( button ), "clicked",
 +      AddDialogData( entry, m_strReplace );
 +      GlobalTextureEntryCompletion::instance().connect( entry );
 +
 +      auto check = ui::CheckButton( "Within selected brushes only" );
 +      check.show();
 +      vbox.pack_start( check, TRUE, TRUE, 0 );
 +      AddDialogData( check, m_bSelectedOnly );
 +
 +      vbox = ui::VBox( FALSE, 5 );
 +      vbox.show();
 +      hbox.pack_start( vbox, FALSE, FALSE, 0 );
 +
 +      button = ui::Button( "Apply" );
 +      button.show();
 +      vbox.pack_start( button, FALSE, FALSE, 0 );
 +      button.connect( "clicked",
                                          G_CALLBACK( OnApply ), 0 );
 -      gtk_widget_set_usize( button, 60, -2 );
 +      button.dimensions(60, -1);
  
 -      button = gtk_button_new_with_label( "Close" );
 -      gtk_widget_show( button );
 -      gtk_box_pack_start( GTK_BOX( vbox ), button, FALSE, FALSE, 0 );
 -      g_signal_connect( G_OBJECT( button ), "clicked",
 +      button = ui::Button( "Close" );
 +      button.show();
 +      vbox.pack_start( button, FALSE, FALSE, 0 );
 +      button.connect( "clicked",
                                          G_CALLBACK( OnClose ), 0 );
 -      gtk_widget_set_usize( button, 60, -2 );
 +      button.dimensions(60, -1);
  
        return dlg;
  }
Simple merge
index 6b9fa79531ad551cbc2833b2afbda8f9abda6260,60e9c101f65dd5984cf690cfe96ddfa0023cfbdf..772f80b199dd47919e899c9d9006ab2e6b54e340
@@@ -109,44 -111,7 +109,44 @@@ void TextureGroups_addWad( TextureGroup
  #endif
        }
  }
 -typedef ReferenceCaller1<TextureGroups, const char*, TextureGroups_addWad> TextureGroupsAddWadCaller;
 +
 +typedef ReferenceCaller<TextureGroups, void(const char*), TextureGroups_addWad> TextureGroupsAddWadCaller;
 +
 +namespace
 +{
 +bool g_TextureBrowser_shaderlistOnly = false;
 +bool g_TextureBrowser_fixedSize = true;
 +bool g_TextureBrowser_filterMissing = false;
 +bool g_TextureBrowser_filterFallback = true;
- bool g_TextureBrowser_enableAlpha = true;
++bool g_TextureBrowser_enableAlpha = false;
 +}
 +
 +CopiedString g_notex;
 +CopiedString g_shadernotex;
 +
 +bool isMissing(const char* name);
 +
 +bool isNotex(const char* name);
 +
 +bool isMissing(const char* name){
 +      if ( string_equal( g_notex.c_str(), name ) ) {
 +              return true;
 +      }
 +      if ( string_equal( g_shadernotex.c_str(), name ) ) {
 +              return true;
 +      }
 +      return false;
 +}
 +
 +bool isNotex(const char* name){
 +      if ( string_equal_suffix( name, "/" DEFAULT_NOTEX_BASENAME ) ) {
 +              return true;
 +      }
 +      if ( string_equal_suffix( name, "/" DEFAULT_SHADERNOTEX_BASENAME ) ) {
 +              return true;
 +      }
 +      return false;
 +}
  
  void TextureGroups_addShader( TextureGroups& groups, const char* shaderName ){
        const char* texture = path_make_relative( shaderName, "textures/" );