Changeset 587

Show
Ignore:
Timestamp:
09/28/07 20:08:23 (1 year ago)
Author:
shanoah
Message:

Gtk: Change testing windows to extra windows, as they seem to be stable enough.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/xtra/angband.glade

    r578 r587  
    284284 
    285285          <child> 
    286             <widget class="GtkMenuItem" id="testing_menu"> 
    287               <property name="visible">True</property> 
    288               <property name="label" translatable="yes">_Testing</property> 
     286            <widget class="GtkMenuItem" id="extra_menu"> 
     287              <property name="visible">True</property> 
     288              <property name="label" translatable="yes">_Extra</property> 
    289289              <property name="use_underline">True</property> 
    290290 
    291291              <child> 
    292                 <widget class="GtkMenu" id="testing_menu_menu"> 
     292                <widget class="GtkMenu" id="extra_menu_menu"> 
    293293 
    294294                  <child> 
  • trunk/src/main-gtk.c

    r578 r587  
    3232/*#define VERBOSE_DEBUG*/ 
    3333 
    34 /* 
    35  * This will disable testing features. 
    36  */ 
    37  /*#define DISABLE_GTK_TESTING*/ 
    38  
    3934static int max_win_width(term_data *td) 
    4035{ 
     
    118113         
    119114        s = cairo_rect_to_gdk(&r); 
    120         gdk_window_invalidate_rect(widget->window, &s, TRUE); 
     115        if (widget->window != NULL) 
     116        { 
     117                gdk_window_invalidate_rect(widget->window, &s, TRUE); 
     118        } 
    121119} 
    122120 
     
    15501548                g_signal_connect(xd->menu, "activate", G_CALLBACK(toggle_xtra_window), (gpointer) xd->name); 
    15511549                 
    1552                 #ifdef DISABLE_GTK_TESTING 
    1553                 gtk_widget_set_sensitive(xd->menu, FALSE); 
    1554                 #endif 
    1555                  
    15561550                xd->text_view = glade_xml_get_widget(gtk_xml, xd->text_view_name); 
    15571551                xd->drawing_area = glade_xml_get_widget(gtk_xml, xd->drawing_area_name); 
     
    18151809} 
    18161810 
    1817 #ifndef DISABLE_GTK_TESTING 
    18181811static void handle_map(game_event_type type, game_event_data *data, void *user) 
    18191812{ 
     
    18531846        } 
    18541847} 
    1855 #endif 
    18561848 
    18571849static void text_view_put(xtra_win_data *xd, const char *str, byte color) 
     
    18761868void gtk_log_fmt(byte c, cptr fmt, ...) 
    18771869{ 
    1878         #ifndef DISABLE_GTK_TESTING 
    18791870        xtra_win_data *xd = &xdata[4]; 
    1880         #endif 
    18811871         
    18821872        char *res, str[80]; 
     
    18841874        int n; 
    18851875         
    1886         #ifndef DISABLE_GTK_TESTING 
    18871876        if (GTK_IS_TEXT_VIEW(xd->text_view)) 
    18881877        { 
     
    18951884                init_color_tags(xd); 
    18961885        } 
    1897         #endif 
    18981886         
    18991887        /* Begin the Varargs Stuff */ 
     
    19131901        #endif 
    19141902         
    1915         #ifndef DISABLE_GTK_TESTING 
    19161903        if (GTK_IS_TEXT_VIEW(xd->text_view)) 
    19171904                text_view_print(xd, str, c); 
    19181905        else 
    1919         #endif 
    19201906                plog(str); 
    19211907} 
    19221908 
    1923 #ifndef DISABLE_GTK_TESTING 
    19241909/* 
    19251910 * Update our own personal message window. 
     
    24862471        gtk_log_fmt(TERM_WHITE, "Showing the statusline."); 
    24872472} 
    2488 #endif 
    24892473 
    24902474void init_handlers() 
     
    24972481        get_game_command = get_init_cmd; 
    24982482         
    2499         #ifndef DISABLE_GTK_TESTING 
    25002483        /* I plan to put everything on the sidebar together, so... */ 
    25012484        event_add_handler_set(my_player_events, N_ELEMENTS(my_player_events), handle_sidebar, NULL); 
     
    25182501        event_add_handler(EVENT_ENTER_DEATH, handle_death, NULL); 
    25192502        event_add_handler(EVENT_END, handle_end, NULL); 
    2520         #endif 
    25212503} 
    25222504