Changeset 974

Show
Ignore:
Timestamp:
07/04/08 04:09:04 (2 months ago)
Author:
shanoah
Message:

Clean up a few warnings in the gtk code, and don't show equippy chars in char creation.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/gtk/cairo-utils.c

    r918 r974  
    301301        if (surface != NULL) 
    302302        { 
     303        cairo_rectangle_t r; 
     304        PangoLayout *layout; 
     305        PangoFontDescription *temp_font; 
     306                 
    303307        cr = cairo_create(surface); 
    304308        #ifndef USE_PANGO 
    305309        draw_toy_text(cr, font, actual, x, y, n, a, s); 
    306310        #else 
    307         cairo_rectangle_t r; 
    308         PangoLayout *layout; 
    309         PangoFontDescription *temp_font; 
    310311         
    311312        if (cr !=NULL) 
     
    370371void draw_toy_text(cairo_t *cr, font_info *font, measurements *actual, int x, int y, int n, byte a, cptr s) 
    371372{ 
    372         char str[n]; 
     373        char str[255]; 
    373374        cairo_rectangle_t r; 
    374375         
  • trunk/src/gtk/main-gtk.c

    r918 r974  
    289289        if (t != -1) 
    290290        { 
    291                 xd = &xdata[t]; 
    292          
    293291                int x = 0, y = 0, w = 0, h = 0; 
    294292                GdkRectangle r; 
     293                 
     294                xd = &xdata[t]; 
    295295         
    296296                if (GTK_WIDGET_VISIBLE(xd->win)) 
     
    641641        PangoFontDescription *temp_font; 
    642642        char buf[80]; 
    643         int i, j = 0; 
     643        unsigned int i, j = 0; 
    644644 
    645645        my_strcpy(td->font.name, font_name, sizeof(td->font.name)); 
     
    715715        const char *temp, *s; 
    716716        int i, t = 0; 
     717        xtra_win_data *xd; 
    717718         
    718719        s = gtk_widget_get_name(GTK_WIDGET(widget)); 
     
    724725        } 
    725726         
    726         xtra_win_data *xd=&xdata[t]; 
     727        xd=&xdata[t]; 
    727728         
    728729        temp = gtk_font_button_get_font_name(widget); 
     
    763764static bool save_dialog_box(bool save) 
    764765{ 
     766        GtkFileFilter *filter; 
    765767        GtkWidget *selector_wid; 
    766768        GtkFileChooser *selector; 
     
    818820 
    819821        /* Restrict the showing of pointless files */ 
    820         GtkFileFilter *filter; 
    821822        filter = gtk_file_filter_new(); 
    822823        gtk_file_filter_add_custom(filter, GTK_FILE_FILTER_DISPLAY_NAME, file_open_filter, NULL, NULL); 
     
    12131214{ 
    12141215        int i; 
    1215         ang_file *fff; 
    1216          
     1216           
    12171217        #ifdef GTK_DEBUG 
    12181218        glog( "Loading Prefs."); 
    12191219        #endif 
    1220         load_term_prefs(fff); 
     1220        load_term_prefs(); 
    12211221         
    12221222        for (i = 0; i < num_term; i++) 
     
    12321232                 
    12331233                if ((td->location.x <= 0) && (td->location.y <= 0)) td->location.x = td->location.y = 100; 
    1234                 if ((td->font.name == "") || (strlen(td->font.name)<2))  
     1234                if ((td->font.name == NULL) || (strlen(td->font.name)<2))  
    12351235                        my_strcpy(td->font.name, "Monospace 12", sizeof(td->font.name)); 
    12361236                 
     
    12551255                xtra_win_data *xd = &xdata[i]; 
    12561256                 
    1257                 if ((xd->font.name == "") || (strlen(xd->font.name)<2))  
     1257                if ((xd->font.name == NULL) || (strlen(xd->font.name)<2))  
    12581258                        my_strcpy(xd->font.name, "Monospace 10", sizeof(xd->font.name)); 
    12591259 
     
    23962396        object_type *o_ptr; 
    23972397 
    2398         /* No equippy chars if  we're in bigtile mode */ 
    2399         if ((use_bigtile) || (arg_graphics != 0)
     2398        /* No equippy chars if  we're in bigtile mode or creating a char */ 
     2399        if ((use_bigtile) || (arg_graphics != 0) || (!character_generated)
    24002400        { 
    24012401                return; 
  • trunk/src/gtk/main-gtk.h

    r932 r974  
    161161        EVENT_MONSTERHEALTH, 
    162162 
    163         EVENT_PLAYERSPEED, 
     163        EVENT_PLAYERSPEED,  
    164164        EVENT_DUNGEONLEVEL, 
    165165}; 
     
    184184/*  Path to the Gtk settings file */ 
    185185static char settings[1024]; 
    186 static game_command cmd = { CMD_NULL, 0 };  
     186static game_command cmd = { CMD_NULL, 0, {0} };  
    187187 
    188188/* Abstracted out for future changes */