Changeset 264

Show
Ignore:
Timestamp:
06/26/08 02:52:02 (2 months ago)
Author:
mattn
Message:

* fixed a lot of compiler warnings (mostly const char * stuff and use of uninitialized data)
* add support for translating radiant (just marked three strings, more to come)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • GtkRadiant/trunk/contrib/bkgrnd2d/dialog.cpp

    r185 r264  
    2929 
    3030#include <gtk/gtk.h> 
     31#include <glib/gi18n.h> 
    3132 
    3233#include "bkgrnd2d.h" 
     
    105106        const char *newfile; 
    106107        char *t; 
    107          
     108 
    108109        //TODO GetMapName saves the map. eeep! 
    109110        //also with no map, returns unnamed.map, otherwise returns full path 
    110111//      Syn_Printf(MSG_PREFIX "GetMapName() %s\n", 
    111112//                              g_FuncTable.m_pfnGetMapName()); 
    112          
     113 
    113114        ct = g_FuncTable.m_pfnReadProjectKey("basepath"); 
    114115        // TODO shouldn't need this stuff 
     
    124125 
    125126        strcpy(browsedir,ct); 
    126         // make sure we have a trailing /  
     127        // make sure we have a trailing / 
    127128        if(browsedir[strlen(browsedir) - 1] != '/') 
    128129                strcat(browsedir,"/"); 
     
    137138                // lop off the file part 
    138139                t = browsedir + strlen(browsedir) - 1; 
    139                 while (t != browsedir && *t != '/')  
     140                while (t != browsedir && *t != '/') 
    140141                        t--; 
    141142                *t = 0; 
    142143        } 
    143144        Syn_Printf(MSG_PREFIX "browse directory %s\n",browsedir); 
    144          
     145 
    145146//does NOT need freeing contrary to include/qerplugin.h comments 
    146147//TODO bug/patch for comments 
     
    203204        } 
    204205// A vbox to hold everything 
    205         m_pWidget = gtk_vbox_new(FALSE,0);  
     206        m_pWidget = gtk_vbox_new(FALSE,0); 
    206207// Frame for file row 
    207208        frame = gtk_frame_new("File"); 
     
    227228        gtk_tooltips_set_tip (pTooltips, w, "Select a file", NULL); 
    228229  gtk_widget_show (w); 
    229          
     230 
    230231        w = gtk_button_new_with_label ("Reload"); 
    231232        g_signal_connect (G_OBJECT (w), "clicked", G_CALLBACK (reload_callback), 
     
    349350 
    350351  gtk_widget_show ( pNotebook ); 
    351          
     352 
    352353        gtk_widget_realize( pDialogWnd ); 
    353354} 
  • GtkRadiant/trunk/contrib/bobtoolz/StdAfx.h

    r199 r264  
    3131#include <gdk/gdkkeysyms.h> 
    3232#include <gtk/gtk.h> 
     33#include <glib/gi18n.h> 
    3334#include <stdio.h> 
    3435#include <stdlib.h> 
     
    5455#define MB_YESNO                    0x00000004L 
    5556#define MB_RETRYCANCEL              0x00000005L 
    56   
    57   
     57 
     58 
    5859#define MB_ICONHAND                 0x00000010L 
    5960#define MB_ICONQUESTION             0x00000020L 
    6061#define MB_ICONEXCLAMATION          0x00000030L 
    6162#define MB_ICONASTERISK             0x00000040L 
    62   
     63 
    6364#define MB_USERICON                 0x00000080L 
    6465#define MB_ICONWARNING              MB_ICONEXCLAMATION 
     
    6667#define MB_ICONINFORMATION          MB_ICONASTERISK 
    6768#define MB_ICONSTOP                 MB_ICONHAND 
    68   
     69 
    6970#define MB_TYPEMASK                 0x0000000FL 
    7071#define MB_ICONMASK                 0x000000F0L 
     
    7273#define MB_MODEMASK                 0x00003000L 
    7374#define MB_MISCMASK                 0x0000C000L 
    74   
     75 
    7576#define IDOK                1 
    7677#define IDCANCEL            2 
     
    99100 
    100101#endif 
    101   
     102 
    102103#if defined(__cplusplus) 
    103104#ifndef _REFGUID_DEFINED 
  • GtkRadiant/trunk/contrib/camera/camera.h

    r183 r264  
    3737 
    3838#include <gtk/gtk.h> 
     39#include <glib/gi18n.h> 
    3940 
    4041#include "str.h" 
  • GtkRadiant/trunk/contrib/gtkgensurf/gendlgs.cpp

    r218 r264  
    1919 
    2020#include <gtk/gtk.h> 
     21#include <glib/gi18n.h> 
    2122#include <stdio.h> 
    2223#include <stdlib.h> 
     
    11701171        GTK_WIDGET (g_object_get_data (G_OBJECT (g_pWnd), "main_antialiasing")), 
    11711172        "The lines in the preview window are antialiased for better quality", 
    1172         "");  
     1173        ""); 
    11731174 
    11741175  // General tab 
     
    11921193        "bitmaps. GenSurf will work with any 256-color bitmap, but gray scale bitmaps are a bit " 
    11931194        "more intuitive.", 
    1194         "" );  
     1195        "" ); 
    11951196  gtk_tooltips_set_tip(GTK_TOOLTIPS (tooltips), 
    11961197        GTK_WIDGET (wave_radios[4]), 
     
    13971398                        "From bitmap", "Fractal" }; 
    13981399  char *orientations[] = { "Ground surface", "Ceiling", "Wall facing 0", "Wall facing 90", 
    1399                            "Wall facing 180","Wall facing 270" };  
     1400                           "Wall facing 180","Wall facing 270" }; 
    14001401 
    14011402  g_pWnd = dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL); 
     
    23522353        } 
    23532354        return FALSE; 
    2354          
     2355 
    23552356} /* AboutDlgProc */ 
    23562357 
     
    23652366} 
    23662367 
    2367 #endif  
     2368#endif 
  • GtkRadiant/trunk/contrib/gtkgensurf/gensurf.cpp

    r195 r264  
    1919 
    2020#include <gtk/gtk.h> 
     21#include <glib/gi18n.h> 
    2122#include <stdio.h> 
    2223#include <stdlib.h> 
     
    331332  va_end (argptr); 
    332333 
    333   return string;        
     334  return string; 
    334335} 
    335336 
     
    402403  if (name != NULL) 
    403404  { 
    404     char key[32], text[32];  
     405    char key[32], text[32]; 
    405406    int i, j; 
    406407 
  • GtkRadiant/trunk/contrib/gtkgensurf/gensurf.h

    r183 r264  
    2222 
    2323#include <gtk/gtk.h> 
     24#include <glib/gi18n.h> 
    2425 
    2526#include "qerplugin.h" 
  • GtkRadiant/trunk/contrib/prtview/prtview.cpp

    r185 r264  
    5656#define CLIP "Clip" 
    5757 
    58 void InitInstance ()  
     58void InitInstance () 
    5959{ 
    6060#ifdef _WIN32 
     
    129129} 
    130130 
    131 void SaveConfig ()  
     131void SaveConfig () 
    132132{ 
    133133  INISetInt(RENDER_2D, portals.show_2d, "Draw in 2D windows"); 
     
    163163  char line[1024], *ptr; 
    164164  FILE *rc; 
    165    
     165 
    166166  rc = fopen (filename, "rt"); 
    167    
     167 
    168168  if (rc == NULL) 
    169169    return false; 
    170    
     170 
    171171  while (fgets (line, 1024, rc) != 0) 
    172172  { 
     
    174174    if (line[0] != '[') 
    175175      continue; 
    176      
     176 
    177177    ptr = strchr (line, ']'); 
    178178    *ptr = '\0'; 
    179      
     179 
    180180    if (strcmp (&line[1], section) == 0) 
    181181    { 
     
    183183      { 
    184184        ptr = strchr (line, '='); 
    185          
     185 
    186186        if (ptr == NULL) 
    187187        { 
     
    191191        } 
    192192        *ptr = '\0'; 
    193          
     193 
    194194        if (strcmp (line, key) == 0) 
    195195        { 
    196196          strcpy (value, ptr+1); 
    197197          fclose (rc); 
    198            
    199           while (value[strlen (value)-1] == 10 ||  
     198 
     199          while (value[strlen (value)-1] == 10 || 
    200200            value[strlen (value)-1] == 13 || 
    201201            value[strlen (value)-1] == 32) 
    202             value[strlen (value)-1] = 0;  
     202            value[strlen (value)-1] = 0; 
    203203          return true; 
    204204        } 
     
    262262      } 
    263263    } 
    264   }  
     264  } 
    265265 
    266266  if (!found) 
     
    284284        if (strcmp (line, key) == 0) 
    285285          break; 
    286   
     286 
    287287        *ptr = '='; 
    288288        fputs (line, rc); 
     
    297297    while (fgets (line, 1024, old_rc) != NULL) 
    298298      fputs (line, rc); 
    299      
     299 
    300300    fclose (old_rc); 
    301301 
     
    312312#endif 
    313313 
    314 int INIGetInt(char *key, int def) 
     314int INIGetInt(const char *key, int def) 
    315315{ 
    316316#if defined(__linux__) || defined(__APPLE__) 
     
    326326} 
    327327 
    328 void INISetInt(char *key, int val, char *comment /* = NULL */) 
     328void INISetInt(const char *key, int val, const char *comment /* = NULL */) 
    329329{ 
    330330  char s[1000]; 
     
    364364//extern "C" LPCSTR WINAPI QERPlug_Init (HMODULE hApp, GtkWidget* hwndMain) 
    365365extern "C" const char* QERPlug_Init (void *hApp, void* pMainWidget) 
    366 {   
     366{ 
    367367  // Setup defaults & load config 
    368368  InitInstance(); 
    369    
     369 
    370370  return "Portal Viewer for Q3Radiant"; 
    371371} 
     
    488488  bool RequestAPI(APIDescriptor_t *pAPI); 
    489489  const char* GetInfo(); 
    490    
     490 
    491491  CSynapseClientPrtView() { } 
    492492  virtual ~CSynapseClientPrtView() { } 
     
    512512  g_pSynapseServer->IncRef(); 
    513513  Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf()); 
    514      
     514 
    515515  g_SynapseClient.AddAPI(PLUGIN_MAJOR, PRTVIEW_MINOR, sizeof(_QERPluginTable)); 
    516516 
  • GtkRadiant/trunk/contrib/prtview/stdafx.h

    r195 r264  
    2222 
    2323#include <gtk/gtk.h> 
     24#include <glib/gi18n.h> 
    2425 
    2526#if defined(__linux__) || defined(__APPLE__) 
     
    7071#define UPDATE_ALL (UPDATE_2D | UPDATE_3D) 
    7172 
    72 int INIGetInt(char *key, int def); 
    73 void INISetInt(char *key, int val, char *comment = NULL); 
     73int INIGetInt(const char *key, int def); 
     74void INISetInt(const char *key, int val, const char *comment = NULL); 
    7475 
    7576extern bool interfaces_started; 
  • GtkRadiant/trunk/contrib/ufoai/plugin.cpp

    r211 r264  
    5151typedef struct toolbar_button_info_s 
    5252{ 
    53         char *image; 
    54         char *text; 
    55         char *tip; 
     53        const char *image; 
     54        const char *text; 
     55        const char *tip; 
    5656        void (*func)(); 
    5757        IToolbarButton::EType type; 
     
    6262        { 
    6363                "ufoai_actorclip.bmp", 
    64                 "Filter actorclip"
    65                 "Actorclip"
     64                _("Filter actorclip")
     65                _("Actorclip")
    6666                DoActorClipFiltering, 
    6767                IToolbarButton::eToggleButton 
     
    6969        { 
    7070                "ufoai_weaponclip.bmp", 
    71                 "Filter weaponclip"
    72                 "Weaponclip"
     71                _("Filter weaponclip")
     72                _("Weaponclip")
    7373                DoWeaponClipFiltering, 
    7474                IToolbarButton::eToggleButton 
     
    7676        { 
    7777                "ufoai_nodraw.bmp", 
    78                 "Filter nodraw"
    79                 "NoDraw"
     78                _("Filter nodraw")
     79                _("NoDraw")
    8080                DoNoDrawFiltering, 
    8181                IToolbarButton::eToggleButton 
     
    8383        { 
    8484                "ufoai_stepon.bmp", 
    85                 "Filter stepon"
    86                 "Stepon"
     85                _("Filter stepon")
     86                _("Stepon")
    8787                DoSteponFiltering, 
    8888                IToolbarButton::eToggleButton 
  • GtkRadiant/trunk/include/ifilters.h

    r209 r264  
    3131 
    3232// adds a new filter 
    33 typedef bfilter_t* (* PFN_QERPLUG_FILTERADD) (int type, int bmask, char *str, int exclude); 
     33typedef bfilter_t* (* PFN_QERPLUG_FILTERADD) (int type, int bmask, const char *str, int exclude); 
    3434 
    3535// performs the filtering 
  • GtkRadiant/trunk/include/iundo.h

    r183 r264  
    2626 
    2727//start operation 
    28 typedef void (*PFN_UNDOSTART) (char *operation); 
     28typedef void (*PFN_UNDOSTART) (const char *operation); 
    2929//end operation 
    3030typedef void (*PFN_UNDOEND) (void); 
  • GtkRadiant/trunk/include/qerplugin.h

    r209 r264  
    5151#endif 
    5252 
    53 // the editor will look for plugins in two places, the plugins path  
     53// the editor will look for plugins in two places, the plugins path 
    5454// under the application path, and the path under the basepath as defined 
    5555// in the project (.qe4) file. 
    5656// 
    5757// you can drop any number of new texture, model format DLL's in the standard plugin path 
    58 // but only one plugin that overrides map loading/saving, surface dialog, surface flags, etc..  
    59 // should be used at one time.. if multiples are loaded then the last one loaded will be the  
     58// but only one plugin that overrides map loading/saving, surface dialog, surface flags, etc.. 
     59// should be used at one time.. if multiples are loaded then the last one loaded will be the 
    6060// active one 
    6161// 
     
    6363// it is assumed the plugin will have a matching function as defined below 
    6464// to correlate to the implied functionality 
    65 //  
     65// 
    6666 
    6767#define RADIANT_MAJOR "radiant" 
     
    8383{ 
    8484  char m_TextureExtension[QER_MAX_NAMELEN];   // the extension these textures have 
    85   qboolean m_bHiColor;    // if textures are NOT high color, the default  
     85  qboolean m_bHiColor;    // if textures are NOT high color, the default 
    8686                      // palette (as described inthe qe4 file will be used for gamma correction) 
    87                       // if they are high color, gamma and shading are computed on the fly  
     87                      // if they are high color, gamma and shading are computed on the fly 
    8888                      // based on the rgba data 
    8989  //--bool m_bIsShader;   // will probably do q3 shaders this way when i merge 
     
    9696{ 
    9797  _QERTextureLoad() 
    98   {  
     98  { 
    9999    memset(reinterpret_cast<void*>(this), 0, sizeof(_QERTextureLoad)); 
    100100  }; 
     
    165165// by passing in appropriate alpha data or by setting the appropriate surface flags 
    166166// expected by q2 (which the editor will use.. ) 
    167 typedef void (WINAPI *PFN_QERPLUG_LOADTEXTURE)(const char* pFilename);  
     167typedef void (WINAPI *PFN_QERPLUG_LOADTEXTURE)(const char* pFilename); 
    168168 
    169169// v1.6 
     
    207207  const GUID *interface_GUID; 
    208208  const char* interface_name; 
    209   const char* version_name;  
     209  const char* version_name; 
    210210} moduleentry_t; 
    211211 
     
    269269// 2. the selected brush list (brushes the user has selected) 
    270270// 3. the active brush list (brushes in the map that are not selected) 
    271 //  
     271// 
    272272// In general, the same things can be done to brush handles (face manip, delete brushhandle, etc.. ) in each 
    273 // list. There are a few exceptions.  
    274 // 1. You cannot commit a selected or active brush handle to the map. This is because it is already in the map.  
     273// list. There are a few exceptions. 
     274// 1. You cannot commit a selected or active brush handle to the map. This is because it is already in the map. 
    275275// 2. You cannot bind brush handles from the selected or active brush list to an entity. As of v1.0 of the plugins 
    276276// the only way for a plugin to create entities is to create a brush handles (or a list of handles) and then bind 
    277277// them to an entity. This will commit the brush(s) and/or the entities to the map as well. 
    278 //  
     278// 
    279279// To use the active or selected brush lists, you must first allocate them (which returns a count) and then 
    280 // release them when you are finish manipulating brushes in one of those lists.  
     280// release them when you are finish manipulating brushes in one of those lists. 
    281281 
    282282//++timo NOTE : the #defines here are never used, but can help finding where things are done in the editor 
     
    312312#define QERAPP_SETCURRENTTEXTURE "QERApp_SetCurrentTexture" 
    313313 
    314 // selection  
     314// selection 
    315315#define QERAPP_DELETESELECTION "QERApp_DeleteSelection" 
    316316#define QERAPP_SELECTBRUSH "QERApp_SelectBrush"                                 // PGM 
     
    348348// FIXME: new primtives do not work in v1.00 
    349349// primitives are new types of things in the map 
    350 // for instance, the Q3 curves could have been done as  
    351 // primitives instead of being built in  
     350// for instance, the Q3 curves could have been done as 
     351// primitives instead of being built in 
    352352// it will be a plugins responsibility to hook the map load and save funcs to load 
    353353// and/or save any additional data (like new primitives of some type) 
     
    357357// FIXME: go backwards on this a bit.. orient it more towards the temp brush mode as it will be cleaner 
    358358// basically a plugin will hook the map load and save and will add the primitives to the map.. this will 
    359 // produce a temporary 'primitive' brush and the appropriate renderer will be called as well as the  
     359// produce a temporary 'primitive' brush and the appropriate renderer will be called as well as the 
    360360// edit handler (for edge drags, sizes, rotates, etc.. ) and the vertex maker will be called when vertex 
    361361// mode is attemped on the brush.. there will need to be a GetPrimitiveBounds callback in the edit handler 
    362 // so the brush can resize appropriately as needed.. this might be the plugins responsibility to set the  
     362// so the brush can resize appropriately as needed.. this might be the plugins responsibility to set the 
    363363// sibling brushes size.. it will then be the plugins responsibility to hook map save to save the primitives 
    364364// as the editor will discard any temp primitive brushes.. (there probably needs to be some kind of sanity check 
     
    496496typedef int (WINAPI * PFN_QERAPP_REQUESTINTERFACE)( REFGUID, void* ); 
    497497// use this one for errors, Radiant will stop after the "edit preferences" dialog 
    498 typedef void (WINAPI * PFN_QERAPP_ERROR)(char* pMsg, ...); 
     498typedef void (WINAPI * PFN_QERAPP_ERROR)(const char* pMsg, ...); 
    499499// use to gain read access to the project epairs 
    500500// FIXME: removed, accessed through QERPlug_RegisterPluginEntities with the IEpair interface 
     
    611611typedef char* (* PFN_GETMAPFILENAME)(); 
    612612 
    613 typedef bfilter_t* (* PFN_QERPLUG_FILTERADD)(int type, int bmask, char *str, int exclude); 
     613typedef bfilter_t* (* PFN_QERPLUG_FILTERADD)(int type, int bmask, const char *str, int exclude); 
    614614 
    615615typedef void (* PFN_QERPLUG_FILTERACTIVATE) (void); 
  • GtkRadiant/trunk/include/qertypes.h

    r222 r264  
    323323        texdef_t                                texdef; 
    324324        plane_t                                 plane; 
    325          
     325 
    326326        // Nurail: Face Undo 
    327327        int                             undoId; 
     
    386386#define PATCH_BSPLINE     0x10000000    // bspline 
    387387 
    388 #define PATCH_TYPEMASK     0x00000fff    //  
    389 #define PATCH_BTYPEMASK    0x0000f000    //  
    390 #define PATCH_STYLEMASK    0xffff0000    //  
     388#define PATCH_TYPEMASK     0x00000fff    // 
     389#define PATCH_BTYPEMASK    0x0000f000    // 
     390#define PATCH_STYLEMASK    0xffff0000    // 
    391391 
    392392typedef struct { 
     
    469469  qboolean      patchBrush; 
    470470  qboolean      hiddenBrush; 
    471    
     471 
    472472  //int nPatchID; 
    473473 
     
    576576#define W_XZ          0x0200  //--| only used for patch vertex manip stuff 
    577577#define W_YZ          0x0400  //--| 
    578 #define W_GROUP       0x0800  
    579 #define W_MEDIA       0x1000  
     578#define W_GROUP       0x0800 
     579#define W_MEDIA       0x1000 
    580580#define W_ALL                   0xFFFFFFFF 
    581581 
     
    694694}; 
    695695// MODEL END 
    696     
     696 
    697697typedef struct entity_s 
    698698{ 
     
    757757                                                        // 6=brush->face->texdef.contents (q2) 
    758758        int             mask; 
    759         char  *string; 
     759        const char    *string; 
    760760        bool    active; 
    761761}; 
     
    808808  float     d_gridsize; 
    809809  qboolean  d_bSmallGrid; // we use this flag to hack our way into editing of <1 grids 
    810          
     810 
    811811  int      d_num_entities; 
    812          
     812 
    813813  entity_t *d_project_entity; 
    814814 
     
    840840 
    841841  SavedInfo_t  d_savedinfo; 
    842          
     842 
    843843  int          d_workcount; 
    844          
     844 
    845845  // connect entities uses the last two brushes selected 
    846846  int            d_select_count; 
     
    848848  vec3_t       d_select_translate;    // for dragging w/o making new display lists 
    849849  select_t     d_select_mode; 
    850          
     850 
    851851  int          d_parsed_brushes; 
    852          
     852 
    853853  qboolean     show_blocks; 
    854854  int                  blockSize; 
     
    857857  // a lot of this data should be in a property bag and available to the other modules through an API 
    858858  // this is generated from game configuration and the project settings, and should be still be part of it 
    859          
     859 
    860860  // tells if we are internally using brush primitive (texture coordinates and map format) 
    861861  // this is a shortcut for IntForKey( g_qeglobals.d_project_entity, "brush_primit" ) 
     
    878878  qboolean     bOldBrushes; 
    879879  qboolean     bPrimitBrushes; 
    880          
     880 
    881881  vec3_t       d_vAreaTL; 
    882882  vec3_t       d_vAreaBR; 
    883          
     883 
    884884  // tells if we are using .INI files for prefs instead of registry 
    885885  qboolean      use_ini; 
     
    888888  // disabled all INI / registry read write .. used when shutting down after registry cleanup 
    889889  qboolean disable_ini; 
    890          
     890 
    891891  // tells we are using a BSP frontend plugin 
    892892  qboolean      bBSPFrontendPlugin; 
     
    905905  bool m_bOpenGLCompressionSupported; 
    906906  bool m_bS3CompressionSupported; 
    907    
     907 
    908908  // set to true after OpenGL has been initialized and extensions have been tested 
    909909  bool m_bOpenGLReady; 
  • GtkRadiant/trunk/plugins/surface/surfacedialog.cpp

    r185 r264  
    3030 
    3131#include <gtk/gtk.h> 
     32#include <glib/gi18n.h> 
    3233#include <gdk/gdkkeysyms.h> 
    3334 
     
    319320 
    320321  blank[0] = 0; 
    321    
     322 
    322323  if (texdef_face_list_empty()) 
    323324  { 
     
    328329  else if ( !is_TextureName_conflicting ) 
    329330  { 
    330     temp_texdef_face_list = get_texdef_face_list();  
     331    temp_texdef_face_list = get_texdef_face_list(); 
    331332    tmp_texdef = (texdef_t *) &get_texdef_face_list()->texdef; 
    332333    items = g_list_append( items, (gpointer) tmp_texdef->GetName() ); 
     
    354355    strcpy (old_texture_entry, blank); 
    355356  } 
    356    
     357 
    357358  gtk_combo_set_popdown_strings (GTK_COMBO (texture_combo), items); 
    358359  g_list_free(items); 
     
    376377  if(count == 0) 
    377378    count = GetSelectedFaceCount(); 
    378      
     379 
    379380  g_texdef_face_vector.resize(count); 
    380381 
     
    384385    GetSelFacesTexdef( get_texdef_face_list() ); 
    385386  } 
    386    
     387 
    387388  IsFaceConflicting(); 
    388   PopulateTextureComboList();  
     389  PopulateTextureComboList(); 
    389390  ZeroOffsetValues(); 
    390391} 
     
    432433  if (!g_bListenUpdate) 
    433434    return; 
    434      
     435 
    435436  if (!SurfaceInspector) 
    436437    return; 
     
    439440  while (gtk_events_pending ()) 
    440441    gtk_main_iteration (); 
    441      
     442 
    442443  if (g_surfwin) 
    443444  { 
     
    460461  if (!SurfaceInspector) 
    461462    create_SurfaceInspector (); 
    462    
     463 
    463464  ShowDlg(); 
    464465  SetTexMods (); 
     
    547548  if (!g_surfwin) 
    548549    return; 
    549      
     550 
    550551  pt = &texturewin->texdef; 
    551552 
     
    555556    texdef_offset.SetName(SHADER_NOT_FOUND); 
    556557 
    557   
     558 
    558559  spin = GTK_SPIN_BUTTON (hshift_offset_spinbutton); 
    559560  gtk_spin_button_set_value (spin, texdef_offset.shift[0]); 
     
    561562  adjust->step_increment = l_pIncrement->shift[0]; 
    562563  gtk_spin_button_set_value (GTK_SPIN_BUTTON(hshift_step_spinbutton), l_pIncrement->shift[0]); 
    563    
     564 
    564565  spin = GTK_SPIN_BUTTON (hshift_value_spinbutton); 
    565566  adjust = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin)); 
    566567  adjust->step_increment = l_pIncrement->shift[0]; 
    567    
     568 
    568569 
    569570  spin = GTK_SPIN_BUTTON (vshift_offset_spinbutton); 
     
    572573  adjust->step_increment = l_pIncrement->shift[1]; 
    573574  gtk_spin_button_set_value (GTK_SPIN_BUTTON(vshift_step_spinbutton), l_pIncrement->shift[1]); 
    574    
     575 
    575576  spin = GTK_SPIN_BUTTON (vshift_value_spinbutton); 
    576577  adjust = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin)); 
     
    588589  adjust->step_increment = l_pIncrement->scale[0]; 
    589590 
    590    
     591 
    591592  spin = GTK_SPIN_BUTTON (vscale_offset_spinbutton); 
    592593  gtk_spin_button_set_value (spin, texdef_offset.scale[1]); 
     
    594595  adjust->step_increment = l_pIncrement->scale[1]; 
    595596  gtk_spin_button_set_value (GTK_SPIN_BUTTON(vscale_step_spinbutton), l_pIncrement->scale[1]); 
    596    
     597 
    597598  spin = GTK_SPIN_BUTTON (vscale_value_spinbutton); 
    598599  adjust = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin)); 
    599600  adjust->step_increment = l_pIncrement->scale[1]; 
    600    
     601 
    601602 
    602603  spin = GTK_SPIN_BUTTON (rotate_offset_spinbutton); 
     
    605606  adjust->step_increment = l_pIncrement->rotate; 
    606607  gtk_spin_button_set_value (GTK_SPIN_BUTTON(rotate_step_spinbutton), l_pIncrement->rotate); 
    607    
     608 
    608609  spin = GTK_SPIN_BUTTON (rotate_value_spinbutton); 
    609610  adjust = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (spin)); 
    610611  adjust->step_increment = l_pIncrement->rotate; 
    611612 
    612    
     613 
    613614  g_bListenChanged = true; 
    614615 
     
    656657GtkWidget* create_SurfaceInspector (void) 
    657658{ 
    658    
     659 
    659660  GtkWidget *label; 
    660661  GtkWidget *hseparator; 
     
    694695  gtk_container_set_border_width (GTK_CONTAINER (SurfaceInspector), 4); 
    695696  gtk_window_set_title (GTK_WINDOW (SurfaceInspector), "Surface Inspector"); 
    696    
     697 
    697698  SetWinPos_from_Prefs(SurfaceInspector); 
    698699 
     
    725726  g_object_set_data (G_OBJECT (GTK_COMBO (texture_combo)->popwin), 
    726727                     "KeepMeAround", texture_combo); 
    727   gtk_combo_disable_activate ( (GtkCombo*) texture_combo);                   
     728  gtk_combo_disable_activate ( (GtkCombo*) texture_combo); 
    728729  gtk_widget_show (texture_combo); 
    729730  gtk_box_pack_start (GTK_BOX (hbox1), texture_combo, TRUE, TRUE, 0); 
     
    10261027  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (vscale_value_spinbutton), TRUE); 
    10271028  gtk_widget_set_sensitive( GTK_WIDGET( vscale_value_spinbutton ), FALSE ); 
    1028    
     1029 
    10291030  rotate_value_spinbutton_adj = gtk_adjustment_new (0.0, -360.0, 360.0, 1.0, 10.0, 10.0); 
    10301031  rotate_value_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rotate_value_spinbutton_adj), 1, 0); 
     
    10371038  gtk_widget_set_sensitive( GTK_WIDGET( rotate_value_spinbutton ), FALSE ); 
    10381039 
    1039   // Offset Spins                  
     1040  // Offset Spins 
    10401041  hshift_offset_spinbutton_adj = gtk_adjustment_new (0.0, -8192.0, 8192.0, 2.0, 8.0, 8.0); 
    10411042  hshift_offset_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (hshift_offset_spinbutton_adj), 0, 2); 
     
    13241325 
    13251326 
    1326   g_signal_connect ( (gpointer) SurfaceInspector,  
    1327                       "delete_event",  
    1328                       G_CALLBACK (delete_event_callback),  
     1327  g_signal_connect ( (gpointer) SurfaceInspector, 
     1328                      "delete_event", 
     1329                      G_CALLBACK (delete_event_callback), 
    13291330                      NULL ); 
    13301331  g_signal_connect ((gpointer) SurfaceInspector, "destroy", 
    13311332                    G_CALLBACK (gtk_widget_destroy), 
    13321333                    NULL); 
    1333    
     1334 
    13341335  g_signal_connect ((gpointer) texture_combo_entry, "key_press_event", 
    13351336                    G_CALLBACK (on_texture_combo_entry_key_press_event), 
     
    13381339                    G_CALLBACK (on_texture_combo_entry_activate), 
    13391340                    NULL); 
    1340                      
    1341    
     1341 
     1342 
    13421343  g_signal_connect ((gpointer) hshift_offset_spinbutton, "value_changed", 
    13431344                    G_CALLBACK (on_hshift_offset_spinbutton_value_changed), 
     
    13551356                    G_CALLBACK (on_rotate_offset_spinbutton_value_changed), 
    13561357                    NULL); 
    1357    
     1358 
    13581359  g_signal_connect ((gpointer) hshift_value_spinbutton, "value_changed", 
    13591360                    G_CALLBACK (on_hshift_value_spinbutton_value_changed), 
     
    13711372                    G_CALLBACK (on_rotate_value_spinbutton_value_changed), 
    13721373                    NULL); 
    1373    
     1374 
    13741375  g_signal_connect ((gpointer) hshift_step_spinbutton, "value_changed", 
    13751376                    G_CALLBACK (on_hshift_step_spinbutton_value_changed), 
     
    13871388                    G_CALLBACK (on_rotate_step_spinbutton_value_changed), 
    13881389                    NULL); 
    1389    
     1390