Changeset 647
- Timestamp:
- 01/02/08 09:13:06 (9 months ago)
- Files:
-
- trunk/src/main-gtk.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main-gtk.c
r646 r647 30 30 *Write all debugger messages to the command line, as well as the debugger window. 31 31 */ 32 /*#define VERBOSE_DEBUG*/ 32 #define VERBOSE_DEBUG 33 33 34 34 #ifdef GTK_DEBUG … … 129 129 130 130 load_font_by_name(td, td->font.name); 131 term_data_re size(td);131 term_data_redraw(td); 132 132 return(TRUE); 133 133 } … … 167 167 } 168 168 169 static void term_data_resize(term_data *td)170 {171 term *old = Term;172 173 /* Activate the term */174 Term_activate(&td->t);175 176 Term_resize(td->cols, td->rows);177 178 /* Redraw the contents */179 Term_redraw();180 181 /* Flush the output */182 Term_fresh();183 Term_key_push(KTRL('R'));184 Term_activate(old);185 }186 187 169 void set_row_and_cols(term_data *td) 188 170 { … … 200 182 201 183 if ((cols != td->cols) || (rows != td->rows)) 202 term_data_re size(td);184 term_data_redraw(td); 203 185 } 204 186 … … 214 196 s = gtk_widget_get_name(widget); 215 197 sscanf(s, "term_drawing_area_%d", &t); 216 /*glog("Configuring '%s'", s);*/198 217 199 if (t != -1) 218 200 { … … 248 230 * It may not even do that any more... 249 231 */ 250 /*if (((w != 200) && (h != 190)) || ((w <= 100) && (h <= 100)))251 { */232 if (((w != 200) && (h != 190)) || ((w <= 100) && (h <= 100))) 233 { 252 234 if (w != 0) td->size.w = w; 253 235 if (h != 0) td->size.h = h; 236 254 237 set_row_and_cols(td); 255 /*}*/ 238 term_data_redraw(td); 239 240 /* Hack -- Force redraw */ 241 if (game_in_progress) 242 { 243 reset_visuals(TRUE); 244 Term_key_push(KTRL('R')); 245 } 246 } 256 247 257 248 #ifdef GTK_DEBUG … … 558 549 /* Activate the term passed to it, not term 0! */ 559 550 Term_activate(&td->t); 551 552 Term_resize(td->cols, td->rows); 560 553 561 554 /* Redraw the contents */ … … 1422 1415 cairo_clear(xd->surface, r, TERM_DARK); 1423 1416 } 1417 1418 if (xd->event != 0) 1419 { 1420 event_signal(xd->event); 1421 } 1424 1422 } 1425 1423 return(TRUE); … … 1789 1787 1790 1788 err = gtk_font_button_set_font_name(GTK_FONT_BUTTON(temp_widget), td->font.name); 1789 1790 set_window_size(td); 1791 1791 } 1792 1792 } … … 1807 1807 /* Activate the window screen */ 1808 1808 Term_activate(&data[i].t); 1809 1810 set_window_size(td);1811 1809 1812 1810 if (i == 0) td->visible = TRUE;
