-GtkWindow* FindTextureDialog::BuildDialog()
-{
- GtkWidget* vbox, *hbox, *table, *label;
- GtkWidget* button, *check, *entry;
-
- GtkWindow* dlg = create_floating_window("Find / Replace Texture(s)", m_parent);
-
- hbox = gtk_hbox_new (FALSE, 5);
- gtk_widget_show (hbox);
- gtk_container_add(GTK_CONTAINER(dlg), GTK_WIDGET(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);
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
-
- label = gtk_label_new ("Replace:");
- gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 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",
- G_CALLBACK(find_focus_in), 0);
- AddDialogData(*GTK_ENTRY(entry), m_strFind);
- GlobalTextureEntryCompletion::instance().connect(GTK_ENTRY(entry));
-
- entry = gtk_entry_new();
- 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",
- 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",
- G_CALLBACK(OnApply), 0);
- gtk_widget_set_usize (button, 60, -2);
-
- 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",
- G_CALLBACK(OnClose), 0);
- gtk_widget_set_usize (button, 60, -2);
-
- return dlg;
+GtkWindow* FindTextureDialog::BuildDialog(){
+ GtkWidget* vbox, *hbox, *table, *label;
+ GtkWidget* button, *check, *entry;
+
+ GtkWindow* dlg = create_floating_window( "Find / Replace Texture(s)", m_parent );
+
+ hbox = gtk_hbox_new( FALSE, 5 );
+ gtk_widget_show( hbox );
+ gtk_container_add( GTK_CONTAINER( dlg ), GTK_WIDGET( 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 );
+ gtk_misc_set_alignment( GTK_MISC( label ), 0, 0.5 );
+
+ label = gtk_label_new( "Replace:" );
+ gtk_widget_show( label );
+ gtk_table_attach( GTK_TABLE( table ), label, 0, 1, 1, 2,
+ (GtkAttachOptions) ( GTK_FILL ),
+ (GtkAttachOptions) ( 0 ), 0, 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",
+ G_CALLBACK( find_focus_in ), 0 );
+ AddDialogData( *GTK_ENTRY( entry ), m_strFind );
+ GlobalTextureEntryCompletion::instance().connect( GTK_ENTRY( entry ) );
+
+ entry = gtk_entry_new();
+ 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",
+ 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",
+ G_CALLBACK( OnApply ), 0 );
+ gtk_widget_set_usize( button, 60, -2 );
+
+ 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",
+ G_CALLBACK( OnClose ), 0 );
+ gtk_widget_set_usize( button, 60, -2 );
+
+ return dlg;