Changeset 293

Show
Ignore:
Timestamp:
07/05/08 02:14:52 (3 months ago)
Author:
mattn
Message:

* more translateable strings
* fixed warnings about unused variables

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • GtkRadiant/trunk/contrib/bobtoolz/dialogs/dialogs-gtk.cpp

    r185 r293  
    2323#include "../lists.h" 
    2424#include "../misc.h" 
     25#include <glib/gi18n.h> 
    2526 
    2627/*-------------------------------- 
     
    7980        GtkWidget *parent; 
    8081        int *loop, *ret; 
    81   
     82 
    8283        parent = gtk_widget_get_toplevel (widget); 
    8384        loop = (int*)g_object_get_data (G_OBJECT (parent), "loop"); 
    8485        ret = (int*)g_object_get_data (G_OBJECT (parent), "ret"); 
    85   
     86 
    8687        *loop = 0; 
    8788        *ret = (int)data; 
    8889} 
    89   
     90 
    9091static gint dialog_delete_callback (GtkWidget *widget, GdkEvent* event, gpointer data) 
    9192{ 
    9293        int *loop; 
    93   
     94 
    9495        gtk_widget_hide (widget); 
    9596        loop = (int*)g_object_get_data (G_OBJECT (widget), "loop"); 
     
    223224        GtkWidget *window, *w, *vbox, *hbox; 
    224225        int mode = (uType & MB_TYPEMASK), ret, loop = 1; 
    225   
     226 
    226227        window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
    227228        gtk_signal_connect (GTK_OBJECT (window), "delete_event", 
     
    234235        g_object_set_data (G_OBJECT (window), "ret", &ret); 
    235236        gtk_widget_realize (window); 
    236   
     237 
    237238        vbox = gtk_vbox_new (FALSE, 10); 
    238239        gtk_container_add (GTK_CONTAINER (window), vbox); 
    239240        gtk_widget_show (vbox); 
    240   
     241 
    241242        w = gtk_label_new (lpText); 
    242243        gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2); 
    243244        gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT); 
    244245        gtk_widget_show (w); 
    245   
     246 
    246247        w = gtk_hseparator_new (); 
    247248        gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 2); 
    248249        gtk_widget_show (w); 
    249   
     250 
    250251        hbox = gtk_hbox_new (FALSE, 10); 
    251252        gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    252253        gtk_widget_show (hbox); 
    253   
     254 
    254255        if (mode == MB_OK) 
    255256        { 
     
    272273                gtk_widget_grab_default (w); 
    273274                gtk_widget_show (w); 
    274   
     275 
    275276                w = gtk_button_new_with_label ("Cancel"); 
    276277                gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); 
     
    289290                gtk_widget_grab_default (w); 
    290291                gtk_widget_show (w); 
    291   
     292 
    292293                w = gtk_button_new_with_label ("No"); 
    293294                gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); 
     
    295296                        GTK_SIGNAL_FUNC (dialog_button_callback), GINT_TO_POINTER (IDNO)); 
    296297                gtk_widget_show (w); 
    297   
     298 
    298299                w = gtk_button_new_with_label ("Cancel"); 
    299300                gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); 
     
    312313                gtk_widget_grab_default (w); 
    313314                gtk_widget_show (w); 
    314   
     315 
    315316                w = gtk_button_new_with_label ("No"); 
    316317                gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); 
     
    320321                ret = IDNO; 
    321322        } 
    322   
     323 
    323324        gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER); 
    324325        gtk_widget_show (window); 
    325326        gtk_grab_add (window); 
    326   
     327 
    327328        while (loop) 
    328329                gtk_main_iteration (); 
    329   
     330 
    330331        gtk_grab_remove (window); 
    331332        gtk_widget_destroy (window); 
    332   
     333 
    333334        return ret; 
    334335} 
     
    340341        GtkWidget *check1, *check2; 
    341342        int ret, loop = 1; 
    342   
     343 
    343344        window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
    344          
     345 
    345346        gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 
    346347        gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 
     
    353354 
    354355        gtk_widget_realize (window); 
    355   
    356  
    357          
     356 
     357 
     358 
    358359        vbox = gtk_vbox_new (FALSE, 10); 
    359360        gtk_container_add (GTK_CONTAINER (window), vbox); 
    360361        gtk_widget_show (vbox); 
    361   
     362 
    362363        // ---- vbox ---- 
    363364 
     
    376377                check1 = gtk_check_button_new_with_label("Include Detail Brushes"); 
    377378                gtk_box_pack_start (GTK_BOX (vbox), check1, FALSE, FALSE, 0); 
    378                 gtk_widget_show (check1);               
     379                gtk_widget_show (check1); 
    379380 
    380381                check2 = gtk_check_button_new_with_label("Select Duplicate Brushes Only"); 
    381382                gtk_box_pack_start (GTK_BOX (vbox), check2, FALSE, FALSE, 0); 
    382                 gtk_widget_show (check2);               
     383                gtk_widget_show (check2); 
    383384 
    384385                hbox = gtk_hbox_new (FALSE, 10); 
    385386                gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    386387                gtk_widget_show (hbox); 
    387          
     388 
    388389                // ---- hbox ---- ok/cancel buttons 
    389390 
     
    395396                gtk_widget_grab_default (w); 
    396397                gtk_widget_show (w); 
    397   
     398 
    398399                w = gtk_button_new_with_label ("Cancel"); 
    399400                gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); 
     
    403404 
    404405                // ---- /hbox ---- 
    405   
     406 
    406407        // ---- /vbox ---- 
    407408 
     
    409410        gtk_widget_show (window); 
    410411        gtk_grab_add (window); 
    411   
     412 
    412413        while (loop) 
    413414                gtk_main_iteration (); 
     
    420421  rs->bUseDetail = gtk_toggle_button_get_active((GtkToggleButton*)check1) ? true : false; 
    421422        rs->bDuplicateOnly = gtk_toggle_button_get_active((GtkToggleButton*)check2) ? true : false; 
    422   
     423 
    423424        gtk_grab_remove (window); 
    424425        gtk_widget_destroy (window); 
     
    435436 
    436437        int ret, loop = 1; 
    437   
     438 
    438439        window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
    439          
     440 
    440441        gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 
    441442        gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 
     
    448449 
    449450        gtk_widget_realize (window); 
    450   
    451  
    452          
     451 
     452 
     453 
    453454        vbox = gtk_vbox_new (FALSE, 10); 
    454455        gtk_container_add (GTK_CONTAINER (window), vbox); 
    455456        gtk_widget_show (vbox); 
    456   
     457 
    457458        // ---- vbox ---- 
    458459 
     
    460461                gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    461462                gtk_widget_show (hbox); 
    462          
     463 
    463464                // ---- hbox ---- 
    464465 
    465          
     466 
    466467                        vbox2 = gtk_vbox_new (FALSE, 10); 
    467468                        gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 2); 
    468469                        gtk_widget_show (vbox2); 
    469   
     470 
    470471                        // ---- vbox2 ---- 
    471472 
     
    503504                                        gtk_label_set_justify (GTK_LABEL (w), GTK_JUSTIFY_LEFT); 
    504505                                        gtk_widget_show (w); 
    505                                  
     506 
    506507                                // ---- /hbox2 ---- 
    507508 
     
    509510 
    510511 
    511                          
     512 
    512513                        vbox2 = gtk_vbox_new (FALSE, 10); 
    513514                        gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 2); 
    514515                        gtk_widget_show (vbox2); 
    515   
     516 
    516517                        // ---- vbox2 ---- 
    517518 
     
    519520                                gtk_box_pack_start (GTK_BOX (vbox2), check1, FALSE, FALSE, 0); 
    520521                                gtk_widget_show (check1); 
    521   
     522 
    522523 
    523524                                check2 = gtk_check_button_new_with_label("Inverse Polygon"); 
    524525                                gtk_box_pack_start (GTK_BOX (vbox2), check2, FALSE, FALSE, 0); 
    525526                                gtk_widget_show (check2); 
    526   
     527 
    527528 
    528529                                check3 = gtk_check_button_new_with_label("Align Top Edge"); 
    529530                                gtk_box_pack_start (GTK_BOX (vbox2), check3, FALSE, FALSE, 0); 
    530531                                gtk_widget_show (check3); 
    531   
     532 
    532533                        // ---- /vbox2 ---- 
    533534 
    534535                // ---- /hbox ---- 
    535   
     536 
    536537                hbox = gtk_hbox_new (FALSE, 10); 
    537538                gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    538539                gtk_widget_show (hbox); 
    539          
     540 
    540541                // ---- hbox ---- 
    541542 
     
    547548                        gtk_widget_grab_default (w); 
    548549                        gtk_widget_show (w); 
    549   
     550 
    550551                        w = gtk_button_new_with_label ("Cancel"); 
    551552                        gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); 
     
    555556 
    556557                // ---- /hbox ---- 
    557          
     558 
    558559        // ---- /vbox ---- 
    559560 
     
    561562        gtk_widget_show (window); 
    562563        gtk_grab_add (window); 
    563   
     564 
    564565        bool dialogError = TRUE; 
    565566        while (dialogError) 
     
    568569                while (loop) 
    569570                        gtk_main_iteration (); 
    570   
     571 
    571572                dialogError = FALSE; 
    572573 
     
    599600int DoBuildStairsBox(BuildStairsRS* rs) 
    600601{ 
    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 
    602603        GtkWidget       *window, *w, *vbox, *hbox; 
    603604        GtkWidget       *textStairHeight, *textRiserTex, *textMainTex; 
     
    613614 
    614615        window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); 
    615          
     616 
    616617        gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 
    617618        gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 
    618619 
    619620        gtk_window_set_title( GTK_WINDOW( window ), "Stair Builder" ); 
    620          
     621 
    621622        gtk_container_border_width( GTK_CONTAINER( window ), 10 ); 
    622623 
     
    626627        gtk_widget_realize (window); 
    627628 
    628         // new vbox  
     629        // new vbox 
    629630        vbox = gtk_vbox_new( FALSE, 10 ); 
    630631        gtk_container_add( GTK_CONTAINER( window ), vbox ); 
     
    634635        gtk_container_add( GTK_CONTAINER( vbox ), hbox ); 
    635636        gtk_widget_show( hbox ); 
    636          
     637 
    637638        // dunno if you want this text or not ... 
    638639        w = gtk_label_new( text ); 
     
    643644        gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); 
    644645        gtk_widget_show( w ); 
    645          
     646 
    646647        // ------------------------- // indenting == good way of keeping track of lines :) 
    647648 
     
    650651                gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); 
    651652                gtk_widget_show( hbox ); 
    652          
    653                 textStairHeight = gtk_entry_new_with_max_length( 256 );  
     653 
     654                textStairHeight = gtk_entry_new_with_max_length( 256 ); 
    654655                gtk_box_pack_start( GTK_BOX( hbox ), textStairHeight, FALSE, FALSE, 1 ); 
    655656                gtk_widget_show( textStairHeight ); 
     
    674675                gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); 
    675676                gtk_widget_show( hbox ); 
    676                  
     677 
    677678                // radio buttons confuse me ... 
    678679                // but this _looks_ right 
     
    686687 
    687688                radioDirection = gtk_radio_button_group( GTK_RADIO_BUTTON( radioNorth ) ); 
    688                  
     689 
    689690                radioSouth = gtk_radio_button_new_with_label( radioDirection, "South" ); 
    690691                gtk_box_pack_start( GTK_BOX( hbox ), radioSouth, FALSE, FALSE, 2 ); 
     
    718719                gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); 
    719720                gtk_widget_show( hbox ); 
    720          
     721 
    721722                radioOldStyle = gtk_radio_button_new_with_label( NULL, "Original" ); 
    722723                gtk_box_pack_start( GTK_BOX( hbox ), radioOldStyle, FALSE, FALSE, 0 ); 
     
    728729                gtk_box_pack_start( GTK_BOX( hbox ), radioBobStyle, FALSE, FALSE, 0 ); 
    729730                gtk_widget_show( radioBobStyle ); 
    730          
     731 
    731732                radioStyle = gtk_radio_button_group( GTK_RADIO_BUTTON( radioBobStyle ) ); 
    732733 
     
    734735                gtk_box_pack_start( GTK_BOX( hbox ), radioCornerStyle, FALSE, FALSE, 0 ); 
    735736                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 
    738739                // is "ungreyed out" but you'll need to do that, as i suck :) 
    739740 
     
    746747                gtk_widget_show( checkUseDetail ); 
    747748 
    748         // --------------------------- //  
     749        // --------------------------- // 
    749750 
    750751        hbox = gtk_hbox_new( FALSE, 10 ); 
     
    790791        gtk_widget_grab_default( w ); 
    791792        gtk_widget_show( w ); 
    792                  
     793 
    793794        w = gtk_button_new_with_label( "Cancel" ); 
    794795        gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); 
    795796        gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); 
    796797        gtk_widget_show( w ); 
    797                  
     798 
    798799        ret = IDCANCEL; 
    799800 
     
    802803        gtk_widget_show (window); 
    803804        gtk_grab_add (window); 
    804   
     805 
    805806        bool dialogError = TRUE; 
    806807        while (dialogError) 
     
    809810                while (loop) 
    810811                        gtk_main_iteration (); 
    811   
     812 
    812813                dialogError = FALSE; 
    813814 
     
    845846        return ret; 
    846847// -djbob 
    847          
     848 
    848849        // there we go, all done ... on my end at least, not bad for a night's work 
    849850} 
     
    856857        GtkWidget       *comboMain, *comboTrim; 
    857858        GtkWidget       *buttonSetMain, *buttonSetTrim; 
    858         GtkWidget       *radioNS, *radioEW;  
     859        GtkWidget       *radioNS, *radioEW; 
    859860        GSList          *radioOrientation; 
    860861        TwinWidget      tw1, tw2; 
     
    862863 
    863864        loop = 1; 
    864          
     865 
    865866        window = gtk_window_new( GTK_WINDOW_TOPLEVEL ); 
    866          
     867 
    867868        gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 
    868869        gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 
    869870 
    870871        gtk_window_set_title( GTK_WINDOW( window ), "Door Builder" ); 
    871          
     872 
    872873        gtk_container_border_width( GTK_CONTAINER( window ), 10 ); 
    873874 
     
    876877 
    877878        gtk_widget_realize (window); 
    878          
     879 
    879880        char buffer[256]; 
    880881        GList           *listMainTextures = NULL; 
     
    882883        LoadGList(GetFilename(buffer, "plugins/bt/door-tex.txt"), &listMainTextures); 
    883884        LoadGList(GetFilename(buffer, "plugins/bt/door-tex-trim.txt"), &listTrimTextures); 
    884          
     885 
    885886        vbox = gtk_vbox_new( FALSE, 10 ); 
    886887        gtk_container_add( GTK_CONTAINER( window ), vbox ); 
     
    948949                gtk_box_pack_start( GTK_BOX( hbox ), checkScaleTrimV, FALSE, FALSE, 0 ); 
    949950                gtk_widget_show( checkScaleTrimV ); 
    950                          
    951         // --------------------- //  
     951 
     952        // --------------------- // 
    952953 
    953954                hbox = gtk_hbox_new( FALSE, 10 ); 
     
    972973 
    973974        // ------------------- // 
    974                  
     975 
    975976                hbox = gtk_hbox_new( FALSE, 10 ); 
    976977                gtk_box_pack_start( GTK_BOX( vbox ), hbox, FALSE, FALSE, 0 ); 
     
    10011002                gtk_widget_show( w ); 
    10021003 
    1003                 // argh more radio buttons!  
     1004                // argh more radio buttons! 
    10041005                radioNS = gtk_radio_button_new_with_label( NULL, "North - South" ); 
    10051006                gtk_box_pack_start( GTK_BOX( hbox ), radioNS, FALSE, FALSE, 0 ); 
     
    10301031                gtk_widget_grab_default( w ); 
    10311032                gtk_widget_show( w ); 
    1032                  
     1033 
    10331034                w = gtk_button_new_with_label( "Cancel" ); 
    10341035                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); 
     
    10431044        gtk_widget_show (window); 
    10441045        gtk_grab_add (window); 
    1045   
     1046 
    10461047        while (loop) 
    10471048                gtk_main_iteration (); 
     
    10591060        else if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radioEW))) 
    10601061                rs->nOrientation = DIRECTION_EW; 
    1061   
     1062 
    10621063        gtk_grab_remove (window); 
    10631064        gtk_widget_destroy (window); 
     
    10751076 
    10761077        int ret, loop = 1; 
    1077   
     1078 
    10781079        window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
    1079          
     1080 
    10801081        gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 
    10811082        gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 
     
    10881089 
    10891090        gtk_widget_realize (window); 
    1090   
    1091  
    1092          
     1091 
     1092 
     1093 
    10931094        vbox = gtk_vbox_new (FALSE, 10); 
    10941095        gtk_container_add (GTK_CONTAINER (window), vbox); 
    10951096        gtk_widget_show (vbox); 
    1096   
     1097 
    10971098        // ---- vbox ---- 
    10981099 
     
    11001101                gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    11011102                gtk_widget_show (hbox); 
    1102          
     1103 
    11031104                // ---- hbox ---- 
    11041105 
     
    11181119                gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    11191120                gtk_widget_show (hbox); 
    1120          
     1121 
    11211122                // ---- hbox ---- 
    11221123 
     
    11411142                gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    11421143                gtk_widget_show (hbox); 
    1143          
     1144 
    11441145                // ---- hbox ---- 
    11451146 
     
    11551156 
    11561157                // ---- /hbox ---- 
    1157          
     1158 
    11581159                w = gtk_hseparator_new(); 
    11591160                gtk_box_pack_start( GTK_BOX( vbox ), w, FALSE, FALSE, 0 ); 
     
    11871188                gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDYES ) ); 
    11881189                gtk_widget_show( w ); 
    1189                  
     1190 
    11901191                GTK_WIDGET_SET_FLAGS( w, GTK_CAN_DEFAULT ); 
    11911192                gtk_widget_grab_default( w ); 
     
    11951196                gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDNO ) ); 
    11961197                gtk_widget_show( w ); 
    1197                  
     1198 
    11981199                w = gtk_button_new_with_label( "Cancel" ); 
    11991200                gtk_box_pack_start( GTK_BOX( hbox ), w, TRUE, TRUE, 0 ); 
    12001201                gtk_signal_connect( GTK_OBJECT( w ), "clicked", GTK_SIGNAL_FUNC( dialog_button_callback ), GINT_TO_POINTER( IDCANCEL ) ); 
    12011202                gtk_widget_show( w ); 
    1202                  
     1203 
    12031204                ret = IDCANCEL; 
    12041205 
     
    12081209        gtk_widget_show (window); 
    12091210        gtk_grab_add (window); 
    1210   
     1211 
    12111212        bool dialogError = TRUE; 
    12121213        while (dialogError) 
     
    12151216                while (loop) 
    12161217                        gtk_main_iteration (); 
    1217   
     1218 
    12181219                dialogError = FALSE; 
    12191220 
     
    12441245        GtkWidget *window, *w, *vbox, *hbox; 
    12451246        int ret, loop = 1; 
    1246   
     1247 
    12471248        window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
    1248          
     1249 
    12491250        gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 
    12501251        gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 
     
    12571258 
    12581259        gtk_widget_realize (window); 
    1259   
    1260  
    1261          
     1260 
     1261 
     1262 
    12621263        vbox = gtk_vbox_new (FALSE, 10); 
    12631264        gtk_container_add (GTK_CONTAINER (window), vbox); 
    12641265        gtk_widget_show (vbox); 
    1265   
     1266 
    12661267        // ---- vbox ---- 
    12671268 
     
    12791280                gtk_widget_grab_default (w); 
    12801281                gtk_widget_show (w); 
    1281   
     1282 
    12821283                w = gtk_button_new_with_label ("Blue->Red"); 
    12831284                gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); 
     
    12921293 
    12931294                // ---- /hbox ---- 
    1294   
     1295 
    12951296        // ---- /vbox ---- 
    12961297 
     
    12981299        gtk_widget_show (window); 
    12991300        gtk_grab_add (window); 
    1300   
     1301 
    13011302        while (loop) 
    13021303                gtk_main_iteration (); 
     
    13151316 
    13161317        int ret, loop = 1; 
    1317   
     1318 
    13181319        window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
    1319          
     1320 
    13201321        gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 
    13211322        gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 
     
    13281329 
    13291330        gtk_widget_realize (window); 
    1330          
     1331 
    13311332        vbox = gtk_vbox_new (FALSE, 10); 
    13321333        gtk_container_add (GTK_CONTAINER (window), vbox); 
    13331334        gtk_widget_show (vbox); 
    1334   
     1335 
    13351336        // ---- vbox ---- 
    13361337 
     
    13381339        gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    13391340        gtk_widget_show (hbox); 
    1340          
     1341 
    13411342        // ---- hbox ---- 
    13421343 
     
    13531354        // ---- /hbox ---- 
    13541355 
    1355         frame = gtk_frame_new ("Reset Texture Names"); 
     1356        frame = gtk_frame_new (_("Reset Texture Names")); 
    13561357    gtk_widget_show (frame); 
    13571358    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); 
     
    14011402        // ---- /frame ---- 
    14021403 
    1403     frame = gtk_frame_new ("Reset Scales"); 
     1404    frame = gtk_frame_new (_("Reset Scales")); 
    14041405    gtk_widget_show (frame); 
    14051406    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); 
     
    14571458        // ---- /frame ---- 
    14581459 
    1459     frame = gtk_frame_new ("Reset Shift"); 
     1460    frame = gtk_frame_new (_("Reset Shift")); 
    14601461    gtk_widget_show (frame); 
    14611462    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); 
     
    15131514        // ---- /frame ---- 
    15141515 
    1515     frame = gtk_frame_new ("Reset Rotation"); 
     1516    frame = gtk_frame_new (_("Reset Rotation")); 
    15161517    gtk_widget_show (frame); 
    15171518    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); 
     
    15501551        gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    15511552        gtk_widget_show (hbox); 
    1552          
     1553 
    15531554        // ---- hbox ---- 
    15541555 
     
    15601561        gtk_widget_grab_default (w); 
    15611562        gtk_widget_show (w); 
    1562   
     1563 
    15631564        w = gtk_button_new_with_label ("Use All Brushes"); 
    15641565        gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); 
     
    15731574 
    15741575        // ---- /hbox ---- 
    1575          
     1576 
    15761577        // ---- /vbox ---- 
    15771578 
     
    15791580        gtk_widget_show (window); 
    15801581        gtk_grab_add (window); 
    1581   
     1582 
    15821583        Update_TextureReseter(); 
    15831584 
     
    15881589                while (loop) 
    15891590                        gtk_main_iteration (); 
    1590   
     1591 
    15911592                dialogError = FALSE; 
    15921593 
     
    16451646 
    16461647        int ret, loop = 1; 
    1647   
     1648 
    16481649        window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
    1649          
     1650 
    16501651        gtk_signal_connect (GTK_OBJECT (window), "delete_event", GTK_SIGNAL_FUNC (dialog_delete_callback), NULL); 
    16511652        gtk_signal_connect (GTK_OBJECT (window), "destroy", GTK_SIGNAL_FUNC (gtk_widget_destroy), NULL); 
     
    16581659 
    16591660        gtk_widget_realize (window); 
    1660          
     1661 
    16611662        vbox = gtk_vbox_new (FALSE, 10); 
    16621663        gtk_container_add (GTK_CONTAINER (window), vbox); 
    16631664        gtk_widget_show (vbox); 
    1664   
     1665 
    16651666        // ---- vbox ---- 
    16661667 
     
    16711672        // ---- /hbox ---- 
    16721673 
    1673         frame = gtk_frame_new ("Radii"); 
     1674        frame = gtk_frame_new (_("Radii")); 
    16741675    gtk_widget_show (frame); 
    16751676    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); 
     
    17141715 
    17151716 
    1716         frame = gtk_frame_new ("Angles"); 
     1717        frame = gtk_frame_new (_("Angles")); 
    17171718    gtk_widget_show (frame); 
    17181719    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); 
     
    17561757 
    17571758 
    1758         frame = gtk_frame_new ("Height"); 
     1759        frame = gtk_frame_new (_("Height")); 
    17591760    gtk_widget_show (frame); 
    17601761    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); 
     
    17991800 
    18001801 
    1801         frame = gtk_frame_new ("Points"); 
     1802        frame = gtk_frame_new (_("Points")); 
    18021803    gtk_widget_show (frame); 
    18031804    gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, TRUE, 0); 
     
    18291830                gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 2); 
    18301831                gtk_widget_show (hbox); 
    1831          
     1832 
    18321833                // ---- hbox ---- 
    18331834 
     
    18391840                        gtk_widget_grab_default (w); 
    18401841                        gtk_widget_show (w); 
    1841   
     1842 
    18421843                        w = gtk_button_new_with_label ("Cancel"); 
    18431844                        gtk_box_pack_start (GTK_BOX (hbox), w, TRUE, TRUE, 0); 
     
    18471848 
    18481849                // ---- /hbox ---- 
    1849          
     1850 
    18501851 
    18511852 
     
    18531854        gtk_widget_show (window); 
    18541855        gtk_grab_add (window); 
    1855   
     1856 
    18561857        bool dialogError = TRUE; 
    18571858        while (dialogError) 
     
    18601861                while (loop) 
    18611862                        gtk_main_iteration (); 
    1862   
     1863 
    18631864                dialogError = FALSE; 
    18641865 
  • GtkRadiant/trunk/plugins/surface_heretic2/surfaceflagsdialog_heretic2.cpp

    r283 r293  
    2222#include <gtk/gtk.h> 
    2323#include <gdk/gdkkeysyms.h> 
     24#include <glib/gi18n.h> 
    2425 
    2526#include "surfdlg_plugin.h" 
     
    193194void SetFlagButtons_Heretic2(texdef_to_face_t *texdef_face_list, bool b_isListEmpty) 
    194195{ 
    195   int i; 
    196196  int contents = 0; 
    197197  int flags = 0; 
     
    959959  int i, count=0; 
    960960  gchar *result; 
    961   int entry_value; 
    962   texdef_t *pt; 
    963   brush_t *b; 
    964   face_t *f; 
    965961 
    966962  // Limit input to digits, throwing out anything else 
     
    999995  GtkWidget *hbox4; 
    1000996  GtkWidget *label4; 
    1001   GtkWidget *vbox4; 
    1002997  GtkWidget *table3; 
    1003998  GtkWidget *label5; 
     
    10101005 
    10111006 
    1012   frame1 = gtk_frame_new ("Brush/Face Flags"); 
     1007  frame1 = gtk_frame_new (_("Brush/Face Flags")); 
    10131008  gtk_widget_show (frame1); 
    10141009  gtk_container_add (GTK_CONTAINER (surfacedialog_widget), frame1); 
     
    10261021  gtk_box_pack_start (GTK_BOX (vbox3), table1, TRUE, TRUE, 0); 
    10271022 
    1028   surface_lightbutton = gtk_toggle_button_new_with_mnemonic ("Light"); 
     1023  surface_lightbutton = gtk_toggle_button_new_with_mnemonic (_("Light")); 
    10291024  gtk_widget_show (surface_lightbutton); 
    10301025  gtk_table_attach (GTK_TABLE (table1), surface_lightbutton, 0, 1, 0, 1, 
     
    10321027                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10331028 
    1034   surface_slickbutton = gtk_toggle_button_new_with_mnemonic ("Slick"); 
     1029  surface_slickbutton = gtk_toggle_button_new_with_mnemonic (_("Slick")); 
    10351030  gtk_widget_show (surface_slickbutton); 
    10361031  gtk_table_attach (GTK_TABLE (table1), surface_slickbutton, 1, 2, 0, 1, 
     
    10381033                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10391034 
    1040   surface_skybutton = gtk_toggle_button_new_with_mnemonic ("Sky"); 
     1035  surface_skybutton = gtk_toggle_button_new_with_mnemonic (_("Sky")); 
    10411036  gtk_widget_show (surface_skybutton); 
    10421037  gtk_table_attach (GTK_TABLE (table1), surface_skybutton, 2, 3, 0, 1, 
     
    10441039                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10451040 
    1046   surface_warpbutton = gtk_toggle_button_new_with_mnemonic ("Warp"); 
     1041  surface_warpbutton = gtk_toggle_button_new_with_mnemonic (_("Warp")); 
    10471042  gtk_widget_show (surface_warpbutton); 
    10481043  gtk_table_attach (GTK_TABLE (table1), surface_warpbutton, 3, 4, 0, 1, 
     
    10501045                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10511046 
    1052   surface_trans33button = gtk_toggle_button_new_with_mnemonic ("Trans33"); 
     1047  surface_trans33button = gtk_toggle_button_new_with_mnemonic (_("Trans33")); 
    10531048  gtk_widget_show (surface_trans33button); 
    10541049  gtk_table_attach (GTK_TABLE (table1), surface_trans33button, 0, 1, 1, 2, 
     
    10561051                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10571052 
    1058   surface_trans66button = gtk_toggle_button_new_with_mnemonic ("Trans66"); 
     1053  surface_trans66button = gtk_toggle_button_new_with_mnemonic (_("Trans66")); 
    10591054  gtk_widget_show (surface_trans66button); 
    10601055  gtk_table_attach (GTK_TABLE (table1), surface_trans66button, 1, 2, 1, 2, 
     
    10621057                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10631058 
    1064   surface_flowingbutton = gtk_toggle_button_new_with_mnemonic ("Flowing"); 
     1059  surface_flowingbutton = gtk_toggle_button_new_with_mnemonic (_("Flowing")); 
    10651060  gtk_widget_show (surface_flowingbutton); 
    10661061  gtk_table_attach (GTK_TABLE (table1), surface_flowingbutton, 2, 3, 1, 2, 
     
    10681063                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10691064 
    1070   surface_nodrawbutton = gtk_toggle_button_new_with_mnemonic ("NoDraw"); 
     1065  surface_nodrawbutton = gtk_toggle_button_new_with_mnemonic (_("NoDraw")); 
    10711066  gtk_widget_show (surface_nodrawbutton); 
    10721067  gtk_table_attach (GTK_TABLE (table1), surface_nodrawbutton, 3, 4, 1, 2, 
     
    10741069                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10751070 
    1076   surface_tallwallbutton = gtk_toggle_button_new_with_mnemonic ("TallWall"); 
     1071  surface_tallwallbutton = gtk_toggle_button_new_with_mnemonic (_("TallWall")); 
    10771072  gtk_widget_show (surface_tallwallbutton); 
    10781073  gtk_table_attach (GTK_TABLE (table1), surface_tallwallbutton, 0, 1, 2, 3, 
     
    10801075                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10811076 
    1082   surface_alphatexbutton = gtk_toggle_button_new_with_mnemonic ("AlphaTex"); 
     1077  surface_alphatexbutton = gtk_toggle_button_new_with_mnemonic (_("AlphaTex")); 
    10831078  gtk_widget_show (surface_alphatexbutton); 
    10841079  gtk_table_attach (GTK_TABLE (table1), surface_alphatexbutton, 1, 2, 2, 3, 
     
    10861081                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10871082 
    1088   surface_animspeedbutton = gtk_toggle_button_new_with_mnemonic ("AnimSpeed"); 
     1083  surface_animspeedbutton = gtk_toggle_button_new_with_mnemonic (_("AnimSpeed")); 
    10891084  gtk_widget_show (surface_animspeedbutton); 
    10901085  gtk_table_attach (GTK_TABLE (table1), surface_animspeedbutton, 2, 3, 2, 3, 
     
    10921087                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); 
    10931088 
    1094   surface_undulatebutton = gtk_toggle_button_new_with_mnemonic ("Undulate"); 
     1089  surface_undulatebutton = gtk_toggle_button_new_with_mnemonic (_("Undulate")); 
    10951090  gtk_widget_show (surface_undulatebutton); 
    10961091  gtk_table_attach (GTK_TABLE (table1), surface_undulatebutton, 3, 4, 2, 3, 
     
    11081103  gtk_container_add (GTK_CONTAINER (frame2), hbox4); 
    11091104 
    1110   surf_gravel_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, "Gravel"); 
     1105  surf_gravel_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Gravel")); 
    11111106  gtk_widget_show (surf_gravel_radiobutton); 
    11121107  gtk_box_pack_start (GTK_BOX (hbox4), surf_gravel_radiobutton, TRUE, FALSE, 0); 
    11131108 
    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"));