Changeset 293
- Timestamp:
- 07/05/08 02:14:52 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GtkRadiant/trunk/contrib/bobtoolz/dialogs/dialogs-gtk.cpp
r185 r293 23 23 #include "../lists.h" 24 24 #include "../misc.h" 25 #include <glib/gi18n.h> 25 26 26 27 /*-------------------------------- … … 79 80 GtkWidget *parent; 80 81 int *loop, *ret; 81 82 82 83 parent = gtk_widget_get_toplevel (widget); 83 84 loop = (int*)g_object_get_data (G_OBJECT (parent), "loop"); 84 85 ret = (int*)g_object_get_data (G_OBJECT (parent), "ret"); 85 86 86 87 *loop = 0; 87 88 *ret = (int)data; 88 89 } 89 90 90 91 static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data) 91 92 { 92 93 int *loop; 93 94 94 95 gtk_widget_hide (widget); 95 96 loop = (int*)g_object_get_data (G_OBJECT (widget), "loop"); … … 223 224 GtkWidget *window, *w, *vbox, *hbox; 224 225 int mode = (uType & MB_TYPEMASK), ret, loop = 1; 225 226 226 227 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 227 228 gtk_signal_connect (GTK_OBJECT (window), "delete_event", … … 234 235 g_object_set_data (G_OBJECT (window), "ret", &ret); 235 236 gtk_widget_realize (window); 236 237 237 238 vbox = gtk_vbox_new (FALSE, 10); 238 239 gtk_container_add (GTK_CONTAINER (window), vbox); 239 240 gtk_widget_show (vbox); 240 241 241 242 w = gtk_label_new (lpText); 242 243 gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2); 243 244 gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT); 244 245 gtk_widget_show (w); 245 246 246 247 w = gtk_hseparator_new (); 247 248 gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2); 248 249 gtk_widget_show (w); 249 250 250 251 hbox = gtk_hbox_new (FALSE, 10); 251 252 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 252 253 gtk_widget_show (hbox); 253 254 254 255 if (mode == MB_OK) 255 256 { … … 272 273 gtk_widget_grab_default (w); 273 274 gtk_widget_show (w); 274 275 275 276 w = gtk_button_new_with_label ("Cancel"); 276 277 gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); … … 289 290 gtk_widget_grab_default (w); 290 291 gtk_widget_show (w); 291 292 292 293 w = gtk_button_new_with_label ("No"); 293 294 gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); … … 295 296 GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDNO)); 296 297 gtk_widget_show (w); 297 298 298 299 w = gtk_button_new_with_label ("Cancel"); 299 300 gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); … … 312 313 gtk_widget_grab_default (w); 313 314 gtk_widget_show (w); 314 315 315 316 w = gtk_button_new_with_label ("No"); 316 317 gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); … … 320 321 ret = IDNO; 321 322 } 322 323 323 324 gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER); 324 325 gtk_widget_show (window); 325 326 gtk_grab_add (window); 326 327 327 328 while (loop) 328 329 gtk_main_iteration (); 329 330 330 331 gtk_grab_remove (window); 331 332 gtk_widget_destroy (window); 332 333 333 334 return ret; 334 335 } … … 340 341 GtkWidget *check1, *check2; 341 342 int ret, loop = 1; 342 343 343 344 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 344 345 345 346 gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 346 347 gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); … … 353 354 354 355 gtk_widget_realize (window); 355 356 357 356 357 358 358 359 vbox = gtk_vbox_new (FALSE, 10); 359 360 gtk_container_add (GTK_CONTAINER (window), vbox); 360 361 gtk_widget_show (vbox); 361 362 362 363 // ---- vbox ---- 363 364 … … 376 377 check1 = gtk_check_button_new_with_label("Include Detail Brushes"); 377 378 gtk_box_pack_start (GTK_BOX (vbox), check1, FALSE, FALSE, 0); 378 gtk_widget_show (check1); 379 gtk_widget_show (check1); 379 380 380 381 check2 = gtk_check_button_new_with_label("Select Duplicate Brushes Only"); 381 382 gtk_box_pack_start (GTK_BOX (vbox), check2, FALSE, FALSE, 0); 382 gtk_widget_show (check2); 383 gtk_widget_show (check2); 383 384 384 385 hbox = gtk_hbox_new (FALSE, 10); 385 386 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 386 387 gtk_widget_show (hbox); 387 388 388 389 // ---- hbox ---- ok/cancel buttons 389 390 … … 395 396 gtk_widget_grab_default (w); 396 397 gtk_widget_show (w); 397 398 398 399 w = gtk_button_new_with_label ("Cancel"); 399 400 gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); … … 403 404 404 405 // ---- /hbox ---- 405 406 406 407 // ---- /vbox ---- 407 408 … … 409 410 gtk_widget_show (window); 410 411 gtk_grab_add (window); 411 412 412 413 while (loop) 413 414 gtk_main_iteration (); … … 420 421 rs->bUseDetail = gtk_toggle_button_get_active((GtkToggleButton*)check1) ? true : false; 421 422 rs->bDuplicateOnly = gtk_toggle_button_get_active((GtkToggleButton*)check2) ? true : false; 422 423 423 424 gtk_grab_remove (window); 424 425 gtk_widget_destroy (window); … … 435 436 436 437 int ret, loop = 1; 437 438 438 439 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 439 440 440 441 gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 441 442 gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); … … 448 449 449 450 gtk_widget_realize (window); 450 451 452 451 452 453 453 454 vbox = gtk_vbox_new (FALSE, 10); 454 455 gtk_container_add (GTK_CONTAINER (window), vbox); 455 456 gtk_widget_show (vbox); 456 457 457 458 // ---- vbox ---- 458 459 … … 460 461 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 461 462 gtk_widget_show (hbox); 462 463 463 464 // ---- hbox ---- 464 465 465 466 466 467 vbox2 = gtk_vbox_new (FALSE, 10); 467 468 gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 2); 468 469 gtk_widget_show (vbox2); 469 470 470 471 // ---- vbox2 ---- 471 472 … … 503 504 gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT); 504 505 gtk_widget_show (w); 505 506 506 507 // ---- /hbox2 ---- 507 508 … … 509 510 510 511 511 512 512 513 vbox2 = gtk_vbox_new (FALSE, 10); 513 514 gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 2); 514 515 gtk_widget_show (vbox2); 515 516 516 517 // ---- vbox2 ---- 517 518 … … 519 520 gtk_box_pack_start (GTK_BOX (vbox2), check1, FALSE, FALSE, 0); 520 521 gtk_widget_show (check1); 521 522 522 523 523 524 check2 = gtk_check_button_new_with_label("Inverse Polygon"); 524 525 gtk_box_pack_start (GTK_BOX (vbox2), check2, FALSE, FALSE, 0); 525 526 gtk_widget_show (check2); 526 527 527 528 528 529 check3 = gtk_check_button_new_with_label("Align Top Edge"); 529 530 gtk_box_pack_start (GTK_BOX (vbox2), check3, FALSE, FALSE, 0); 530 531 gtk_widget_show (check3); 531 532 532 533 // ---- /vbox2 ---- 533 534 534 535 // ---- /hbox ---- 535 536 536 537 hbox = gtk_hbox_new (FALSE, 10); 537 538 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 538 539 gtk_widget_show (hbox); 539 540 540 541 // ---- hbox ---- 541 542 … … 547 548 gtk_widget_grab_default (w); 548 549 gtk_widget_show (w); 549 550 550 551 w = gtk_button_new_with_label ("Cancel"); 551 552 gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); … … 555 556 556 557 // ---- /hbox ---- 557 558 558 559 // ---- /vbox ---- 559 560 … … 561 562 gtk_widget_show (window); 562 563 gtk_grab_add (window); 563 564 564 565 bool dialogError = TRUE; 565 566 while (dialogError) … … 568 569 while (loop) 569 570 gtk_main_iteration (); 570 571 571 572 dialogError = FALSE; 572 573 … … 599 600 int DoBuildStairsBox(BuildStairsRS* rs) 600 601 { 601 // i made widgets for just about everything ... i think that's what i need to do dunno tho 602 // i made widgets for just about everything ... i think that's what i need to do dunno tho 602 603 GtkWidget *window, *w, *vbox, *hbox; 603 604 GtkWidget *textStairHeight, *textRiserTex, *textMainTex; … … 613 614 614 615 window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); 615 616 616 617 gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 617 618 gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 618 619 619 620 gtk_window_set_title( GTK_WINDOW( window ), "Stair Builder" ); 620 621 621 622 gtk_container_border_width( GTK_CONTAINER( window ), 10 ); 622 623 … … 626 627 gtk_widget_realize (window); 627 628 628 // new vbox 629 // new vbox 629 630 vbox = gtk_vbox_new( FALSE, 10 ); 630 631 gtk_container_add( GTK_CONTAINER( window ), vbox ); … … 634 635 gtk_container_add( GTK_CONTAINER( vbox ), hbox ); 635 636 gtk_widget_show( hbox ); 636 637 637 638 // dunno if you want this text or not ... 638 639 w = gtk_label_new( text ); … … 643 644 gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); 644 645 gtk_widget_show( w ); 645 646 646 647 // ------------------------- // indenting == good way of keeping track of lines :) 647 648 … … 650 651 gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); 651 652 gtk_widget_show( hbox ); 652 653 textStairHeight = gtk_entry_new_with_max_length( 256 ); 653 654 textStairHeight = gtk_entry_new_with_max_length( 256 ); 654 655 gtk_box_pack_start( GTK_BOX( hbox ), textStairHeight, FALSE, FALSE, 1 ); 655 656 gtk_widget_show( textStairHeight ); … … 674 675 gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); 675 676 gtk_widget_show( hbox ); 676 677 677 678 // radio buttons confuse me ... 678 679 // but this _looks_ right … … 686 687 687 688 radioDirection = gtk_radio_button_group( GTK_RADIO_BUTTON( radioNorth ) ); 688 689 689 690 radioSouth = gtk_radio_button_new_with_label( radioDirection, "South" ); 690 691 gtk_box_pack_start( GTK_BOX( hbox ), radioSouth, FALSE, FALSE, 2 ); … … 718 719 gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); 719 720 gtk_widget_show( hbox ); 720 721 721 722 radioOldStyle = gtk_radio_button_new_with_label( NULL, "Original" ); 722 723 gtk_box_pack_start( GTK_BOX( hbox ), radioOldStyle, FALSE, FALSE, 0 ); … … 728 729 gtk_box_pack_start( GTK_BOX( hbox ), radioBobStyle, FALSE, FALSE, 0 ); 729 730 gtk_widget_show( radioBobStyle ); 730 731 731 732 radioStyle = gtk_radio_button_group( GTK_RADIO_BUTTON( radioBobStyle ) ); 732 733 … … 734 735 gtk_box_pack_start( GTK_BOX( hbox ), radioCornerStyle, FALSE, FALSE, 0 ); 735 736 gtk_widget_show( radioCornerStyle ); 736 737 // err, the q3r has an if or something so you need bob style checked before this 737 738 // err, the q3r has an if or something so you need bob style checked before this 738 739 // is "ungreyed out" but you'll need to do that, as i suck :) 739 740 … … 746 747 gtk_widget_show( checkUseDetail ); 747 748 748 // --------------------------- // 749 // --------------------------- // 749 750 750 751 hbox = gtk_hbox_new( FALSE, 10 ); … … 790 791 gtk_widget_grab_default( w ); 791 792 gtk_widget_show( w ); 792 793 793 794 w = gtk_button_new_with_label( "Cancel" ); 794 795 gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); 795 796 gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); 796 797 gtk_widget_show( w ); 797 798 798 799 ret = IDCANCEL; 799 800 … … 802 803 gtk_widget_show (window); 803 804 gtk_grab_add (window); 804 805 805 806 bool dialogError = TRUE; 806 807 while (dialogError) … … 809 810 while (loop) 810 811 gtk_main_iteration (); 811 812 812 813 dialogError = FALSE; 813 814 … … 845 846 return ret; 846 847 // -djbob 847 848 848 849 // there we go, all done ... on my end at least, not bad for a night's work 849 850 } … … 856 857 GtkWidget *comboMain, *comboTrim; 857 858 GtkWidget *buttonSetMain, *buttonSetTrim; 858 GtkWidget *radioNS, *radioEW; 859 GtkWidget *radioNS, *radioEW; 859 860 GSList *radioOrientation; 860 861 TwinWidget tw1, tw2; … … 862 863 863 864 loop = 1; 864 865 865 866 window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); 866 867 867 868 gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 868 869 gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 869 870 870 871 gtk_window_set_title( GTK_WINDOW( window ), "Door Builder" ); 871 872 872 873 gtk_container_border_width( GTK_CONTAINER( window ), 10 ); 873 874 … … 876 877 877 878 gtk_widget_realize (window); 878 879 879 880 char buffer[256]; 880 881 GList *listMainTextures = NULL; … … 882 883 LoadGList(GetFilename(buffer, "plugins/bt/door-tex.txt"), &listMainTextures); 883 884 LoadGList(GetFilename(buffer, "plugins/bt/door-tex-trim.txt"), &listTrimTextures); 884 885 885 886 vbox = gtk_vbox_new( FALSE, 10 ); 886 887 gtk_container_add( GTK_CONTAINER( window ), vbox ); … … 948 949 gtk_box_pack_start( GTK_BOX( hbox ), checkScaleTrimV, FALSE, FALSE, 0 ); 949 950 gtk_widget_show( checkScaleTrimV ); 950 951 // --------------------- // 951 952 // --------------------- // 952 953 953 954 hbox = gtk_hbox_new( FALSE, 10 ); … … 972 973 973 974 // ------------------- // 974 975 975 976 hbox = gtk_hbox_new( FALSE, 10 ); 976 977 gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); … … 1001 1002 gtk_widget_show( w ); 1002 1003 1003 // argh more radio buttons! 1004 // argh more radio buttons! 1004 1005 radioNS = gtk_radio_button_new_with_label( NULL, "North - South" ); 1005 1006 gtk_box_pack_start( GTK_BOX( hbox ), radioNS, FALSE, FALSE, 0 ); … … 1030 1031 gtk_widget_grab_default( w ); 1031 1032 gtk_widget_show( w ); 1032 1033 1033 1034 w = gtk_button_new_with_label( "Cancel" ); 1034 1035 gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); … … 1043 1044 gtk_widget_show (window); 1044 1045 gtk_grab_add (window); 1045 1046 1046 1047 while (loop) 1047 1048 gtk_main_iteration (); … … 1059 1060 else if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radioEW))) 1060 1061 rs->nOrientation = DIRECTION_EW; 1061 1062 1062 1063 gtk_grab_remove (window); 1063 1064 gtk_widget_destroy (window); … … 1075 1076 1076 1077 int ret, loop = 1; 1077 1078 1078 1079 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 1079 1080 1080 1081 gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 1081 1082 gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); … … 1088 1089 1089 1090 gtk_widget_realize (window); 1090 1091 1092 1091 1092 1093 1093 1094 vbox = gtk_vbox_new (FALSE, 10); 1094 1095 gtk_container_add (GTK_CONTAINER (window), vbox); 1095 1096 gtk_widget_show (vbox); 1096 1097 1097 1098 // ---- vbox ---- 1098 1099 … … 1100 1101 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 1101 1102 gtk_widget_show (hbox); 1102 1103 1103 1104 // ---- hbox ---- 1104 1105 … … 1118 1119 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 1119 1120 gtk_widget_show (hbox); 1120 1121 1121 1122 // ---- hbox ---- 1122 1123 … … 1141 1142 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 1142 1143 gtk_widget_show (hbox); 1143 1144 1144 1145 // ---- hbox ---- 1145 1146 … … 1155 1156 1156 1157 // ---- /hbox ---- 1157 1158 1158 1159 w = gtk_hseparator_new(); 1159 1160 gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); … … 1187 1188 gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); 1188 1189 gtk_widget_show( w ); 1189 1190 1190 1191 GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); 1191 1192 gtk_widget_grab_default( w ); … … 1195 1196 gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); 1196 1197 gtk_widget_show( w ); 1197 1198 1198 1199 w = gtk_button_new_with_label( "Cancel" ); 1199 1200 gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); 1200 1201 gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); 1201 1202 gtk_widget_show( w ); 1202 1203 1203 1204 ret = IDCANCEL; 1204 1205 … … 1208 1209 gtk_widget_show (window); 1209 1210 gtk_grab_add (window); 1210 1211 1211 1212 bool dialogError = TRUE; 1212 1213 while (dialogError) … … 1215 1216 while (loop) 1216 1217 gtk_main_iteration (); 1217 1218 1218 1219 dialogError = FALSE; 1219 1220 … … 1244 1245 GtkWidget *window, *w, *vbox, *hbox; 1245 1246 int ret, loop = 1; 1246 1247 1247 1248 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 1248 1249 1249 1250 gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 1250 1251 gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); … … 1257 1258 1258 1259 gtk_widget_realize (window); 1259 1260 1261 1260 1261 1262 1262 1263 vbox = gtk_vbox_new (FALSE, 10); 1263 1264 gtk_container_add (GTK_CONTAINER (window), vbox); 1264 1265 gtk_widget_show (vbox); 1265 1266 1266 1267 // ---- vbox ---- 1267 1268 … … 1279 1280 gtk_widget_grab_default (w); 1280 1281 gtk_widget_show (w); 1281 1282 1282 1283 w = gtk_button_new_with_label ("Blue->Red"); 1283 1284 gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); … … 1292 1293 1293 1294 // ---- /hbox ---- 1294 1295 1295 1296 // ---- /vbox ---- 1296 1297 … … 1298 1299 gtk_widget_show (window); 1299 1300 gtk_grab_add (window); 1300 1301 1301 1302 while (loop) 1302 1303 gtk_main_iteration (); … … 1315 1316 1316 1317 int ret, loop = 1; 1317 1318 1318 1319 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 1319 1320 1320 1321 gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 1321 1322 gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); … … 1328 1329 1329 1330 gtk_widget_realize (window); 1330 1331 1331 1332 vbox = gtk_vbox_new (FALSE, 10); 1332 1333 gtk_container_add (GTK_CONTAINER (window), vbox); 1333 1334 gtk_widget_show (vbox); 1334 1335 1335 1336 // ---- vbox ---- 1336 1337 … … 1338 1339 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 1339 1340 gtk_widget_show (hbox); 1340 1341 1341 1342 // ---- hbox ---- 1342 1343 … … 1353 1354 // ---- /hbox ---- 1354 1355 1355 frame = gtk_frame_new ( "Reset Texture Names");1356 frame = gtk_frame_new (_("Reset Texture Names")); 1356 1357 gtk_widget_show (frame); 1357 1358 gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); … … 1401 1402 // ---- /frame ---- 1402 1403 1403 frame = gtk_frame_new ( "Reset Scales");1404 frame = gtk_frame_new (_("Reset Scales")); 1404 1405 gtk_widget_show (frame); 1405 1406 gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); … … 1457 1458 // ---- /frame ---- 1458 1459 1459 frame = gtk_frame_new ( "Reset Shift");1460 frame = gtk_frame_new (_("Reset Shift")); 1460 1461 gtk_widget_show (frame); 1461 1462 gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); … … 1513 1514 // ---- /frame ---- 1514 1515 1515 frame = gtk_frame_new ( "Reset Rotation");1516 frame = gtk_frame_new (_("Reset Rotation")); 1516 1517 gtk_widget_show (frame); 1517 1518 gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); … … 1550 1551 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 1551 1552 gtk_widget_show (hbox); 1552 1553 1553 1554 // ---- hbox ---- 1554 1555 … … 1560 1561 gtk_widget_grab_default (w); 1561 1562 gtk_widget_show (w); 1562 1563 1563 1564 w = gtk_button_new_with_label ("Use All Brushes"); 1564 1565 gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); … … 1573 1574 1574 1575 // ---- /hbox ---- 1575 1576 1576 1577 // ---- /vbox ---- 1577 1578 … … 1579 1580 gtk_widget_show (window); 1580 1581 gtk_grab_add (window); 1581 1582 1582 1583 Update_TextureReseter(); 1583 1584 … … 1588 1589 while (loop) 1589 1590 gtk_main_iteration (); 1590 1591 1591 1592 dialogError = FALSE; 1592 1593 … … 1645 1646 1646 1647 int ret, loop = 1; 1647 1648 1648 1649 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 1649 1650 1650 1651 gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 1651 1652 gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); … … 1658 1659 1659 1660 gtk_widget_realize (window); 1660 1661 1661 1662 vbox = gtk_vbox_new (FALSE, 10); 1662 1663 gtk_container_add (GTK_CONTAINER (window), vbox); 1663 1664 gtk_widget_show (vbox); 1664 1665 1665 1666 // ---- vbox ---- 1666 1667 … … 1671 1672 // ---- /hbox ---- 1672 1673 1673 frame = gtk_frame_new ( "Radii");1674 frame = gtk_frame_new (_("Radii")); 1674 1675 gtk_widget_show (frame); 1675 1676 gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); … … 1714 1715 1715 1716 1716 frame = gtk_frame_new ( "Angles");1717 frame = gtk_frame_new (_("Angles")); 1717 1718 gtk_widget_show (frame); 1718 1719 gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); … … 1756 1757 1757 1758 1758 frame = gtk_frame_new ( "Height");1759 frame = gtk_frame_new (_("Height")); 1759 1760 gtk_widget_show (frame); 1760 1761 gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); … … 1799 1800 1800 1801 1801 frame = gtk_frame_new ( "Points");1802 frame = gtk_frame_new (_("Points")); 1802 1803 gtk_widget_show (frame); 1803 1804 gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); … … 1829 1830 gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 1830 1831 gtk_widget_show (hbox); 1831 1832 1832 1833 // ---- hbox ---- 1833 1834 … … 1839 1840 gtk_widget_grab_default (w); 1840 1841 gtk_widget_show (w); 1841 1842 1842 1843 w = gtk_button_new_with_label ("Cancel"); 1843 1844 gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); … … 1847 1848 1848 1849 // ---- /hbox ---- 1849 1850 1850 1851 1851 1852 … … 1853 1854 gtk_widget_show (window); 1854 1855 gtk_grab_add (window); 1855 1856 1856 1857 bool dialogError = TRUE; 1857 1858 while (dialogError) … … 1860 1861 while (loop) 1861 1862 gtk_main_iteration (); 1862 1863 1863 1864 dialogError = FALSE; 1864 1865 GtkRadiant/trunk/plugins/surface_heretic2/surfaceflagsdialog_heretic2.cpp
r283 r293 22 22 #include <gtk/gtk.h> 23 23 #include <gdk/gdkkeysyms.h> 24 #include <glib/gi18n.h> 24 25 25 26 #include "surfdlg_plugin.h" … … 193 194 void SetFlagButtons_Heretic2(texdef_to_face_t *texdef_face_list, bool b_isListEmpty) 194 195 { 195 int i;196 196 int contents = 0; 197 197 int flags = 0; … … 959 959 int i, count=0; 960 960 gchar *result; 961 int entry_value;962 texdef_t *pt;963 brush_t *b;964 face_t *f;965 961 966 962 // Limit input to digits, throwing out anything else … … 999 995 GtkWidget *hbox4; 1000 996 GtkWidget *label4; 1001 GtkWidget *vbox4;1002 997 GtkWidget *table3; 1003 998 GtkWidget *label5; … … 1010 1005 1011 1006 1012 frame1 = gtk_frame_new ( "Brush/Face Flags");1007 frame1 = gtk_frame_new (_("Brush/Face Flags")); 1013 1008 gtk_widget_show (frame1); 1014 1009 gtk_container_add (GTK_CONTAINER (surfacedialog_widget), frame1); … … 1026 1021 gtk_box_pack_start (GTK_BOX (vbox3), table1, TRUE, TRUE, 0); 1027 1022 1028 surface_lightbutton = gtk_toggle_button_new_with_mnemonic ( "Light");1023 surface_lightbutton = gtk_toggle_button_new_with_mnemonic (_("Light")); 1029 1024 gtk_widget_show (surface_lightbutton); 1030 1025 gtk_table_attach (GTK_TABLE (table1), surface_lightbutton, 0, 1, 0, 1, … … 1032 1027 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1033 1028 1034 surface_slickbutton = gtk_toggle_button_new_with_mnemonic ( "Slick");1029 surface_slickbutton = gtk_toggle_button_new_with_mnemonic (_("Slick")); 1035 1030 gtk_widget_show (surface_slickbutton); 1036 1031 gtk_table_attach (GTK_TABLE (table1), surface_slickbutton, 1, 2, 0, 1, … … 1038 1033 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1039 1034 1040 surface_skybutton = gtk_toggle_button_new_with_mnemonic ( "Sky");1035 surface_skybutton = gtk_toggle_button_new_with_mnemonic (_("Sky")); 1041 1036 gtk_widget_show (surface_skybutton); 1042 1037 gtk_table_attach (GTK_TABLE (table1), surface_skybutton, 2, 3, 0, 1, … … 1044 1039 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1045 1040 1046 surface_warpbutton = gtk_toggle_button_new_with_mnemonic ( "Warp");1041 surface_warpbutton = gtk_toggle_button_new_with_mnemonic (_("Warp")); 1047 1042 gtk_widget_show (surface_warpbutton); 1048 1043 gtk_table_attach (GTK_TABLE (table1), surface_warpbutton, 3, 4, 0, 1, … … 1050 1045 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1051 1046 1052 surface_trans33button = gtk_toggle_button_new_with_mnemonic ( "Trans33");1047 surface_trans33button = gtk_toggle_button_new_with_mnemonic (_("Trans33")); 1053 1048 gtk_widget_show (surface_trans33button); 1054 1049 gtk_table_attach (GTK_TABLE (table1), surface_trans33button, 0, 1, 1, 2, … … 1056 1051 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1057 1052 1058 surface_trans66button = gtk_toggle_button_new_with_mnemonic ( "Trans66");1053 surface_trans66button = gtk_toggle_button_new_with_mnemonic (_("Trans66")); 1059 1054 gtk_widget_show (surface_trans66button); 1060 1055 gtk_table_attach (GTK_TABLE (table1), surface_trans66button, 1, 2, 1, 2, … … 1062 1057 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1063 1058 1064 surface_flowingbutton = gtk_toggle_button_new_with_mnemonic ( "Flowing");1059 surface_flowingbutton = gtk_toggle_button_new_with_mnemonic (_("Flowing")); 1065 1060 gtk_widget_show (surface_flowingbutton); 1066 1061 gtk_table_attach (GTK_TABLE (table1), surface_flowingbutton, 2, 3, 1, 2, … … 1068 1063 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1069 1064 1070 surface_nodrawbutton = gtk_toggle_button_new_with_mnemonic ( "NoDraw");1065 surface_nodrawbutton = gtk_toggle_button_new_with_mnemonic (_("NoDraw")); 1071 1066 gtk_widget_show (surface_nodrawbutton); 1072 1067 gtk_table_attach (GTK_TABLE (table1), surface_nodrawbutton, 3, 4, 1, 2, … … 1074 1069 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1075 1070 1076 surface_tallwallbutton = gtk_toggle_button_new_with_mnemonic ( "TallWall");1071 surface_tallwallbutton = gtk_toggle_button_new_with_mnemonic (_("TallWall")); 1077 1072 gtk_widget_show (surface_tallwallbutton); 1078 1073 gtk_table_attach (GTK_TABLE (table1), surface_tallwallbutton, 0, 1, 2, 3, … … 1080 1075 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1081 1076 1082 surface_alphatexbutton = gtk_toggle_button_new_with_mnemonic ( "AlphaTex");1077 surface_alphatexbutton = gtk_toggle_button_new_with_mnemonic (_("AlphaTex")); 1083 1078 gtk_widget_show (surface_alphatexbutton); 1084 1079 gtk_table_attach (GTK_TABLE (table1), surface_alphatexbutton, 1, 2, 2, 3, … … 1086 1081 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1087 1082 1088 surface_animspeedbutton = gtk_toggle_button_new_with_mnemonic ( "AnimSpeed");1083 surface_animspeedbutton = gtk_toggle_button_new_with_mnemonic (_("AnimSpeed")); 1089 1084 gtk_widget_show (surface_animspeedbutton); 1090 1085 gtk_table_attach (GTK_TABLE (table1), surface_animspeedbutton, 2, 3, 2, 3, … … 1092 1087 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 1093 1088 1094 surface_undulatebutton = gtk_toggle_button_new_with_mnemonic ( "Undulate");1089 surface_undulatebutton = gtk_toggle_button_new_with_mnemonic (_("Undulate")); 1095 1090 gtk_widget_show (surface_undulatebutton); 1096 1091 gtk_table_attach (GTK_TABLE (table1), surface_undulatebutton, 3, 4, 2, 3, … … 1108 1103 gtk_container_add (GTK_CONTAINER (frame2), hbox4); 1109 1104 1110 surf_gravel_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, "Gravel");1105 surf_gravel_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Gravel")); 1111 1106 gtk_widget_show (surf_gravel_radiobutton); 1112 1107 gtk_box_pack_start (GTK_BOX (hbox4), surf_gravel_radiobutton, TRUE, FALSE, 0); 1113 1108 1114 surf_metal_radiobutton = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON(surf_gravel_radiobutton), "Metal");1109 surf_metal_radiobutton = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON(surf_gravel_radiobutton), _("Metal"));
