diff -Nurd -X work/diff_ignore freeciv.current/client/gui-gtk/citydlg.c work/client/gui-gtk/citydlg.c --- freeciv.current/client/gui-gtk/citydlg.c Wed Aug 22 09:44:59 2001 +++ work/client/gui-gtk/citydlg.c Thu Aug 23 15:22:45 2001 @@ -73,6 +73,7 @@ GtkWidget *pollution_label; GtkWidget *sub_form; GtkWidget *map_canvas; + GtkWidget *map_canvas_pixmap; GdkPixmap *map_canvas_store; GtkWidget *building_label; GtkWidget *progress_label; @@ -382,12 +383,31 @@ /**************************************************************** ... *****************************************************************/ -static gint city_map_canvas_expose(GtkWidget *w, GdkEventExpose *ev, +static void draw_map_canvas(struct city_dialog *pdialog) +{ + struct Sprite tmp; + + gtk_pixcomm_clear(GTK_PIXCOMM(pdialog->map_canvas_pixmap), TRUE); + + tmp.pixmap = pdialog->map_canvas_store; + tmp.has_mask = 0; + tmp.width = canvas_width; + tmp.height = canvas_height; + + gtk_pixcomm_copyto(GTK_PIXCOMM(pdialog->map_canvas_pixmap), + &tmp, 0, 0, TRUE); +} + +/**************************************************************** +... +*****************************************************************/ +static gint city_map_canvas_expose(GtkWidget * w, GdkEventExpose * ev, gpointer data) { - struct city_dialog *pdialog = (struct city_dialog *)data; - gdk_draw_pixmap(pdialog->map_canvas->window, civ_gc, pdialog->map_canvas_store, - 0, 0, 0, 0, canvas_width, canvas_height); + struct city_dialog *pdialog = (struct city_dialog *) data; + + draw_map_canvas(pdialog); + return TRUE; } @@ -575,19 +595,21 @@ frame=gtk_frame_new(NULL); gtk_box_pack_start(GTK_BOX(box), frame, TRUE, FALSE, 0); - pdialog->map_canvas = gtk_drawing_area_new(); - pdialog->map_canvas_store = gdk_pixmap_new(root_window, - canvas_width, canvas_height, -1); - + pdialog->map_canvas = gtk_event_box_new(); gtk_widget_set_events(pdialog->map_canvas, - GDK_EXPOSURE_MASK|GDK_BUTTON_PRESS_MASK); + GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK); - gtk_drawing_area_size(GTK_DRAWING_AREA(pdialog->map_canvas), - canvas_width, canvas_height); + pdialog->map_canvas_pixmap = gtk_pixcomm_new(root_window, + canvas_width, + canvas_height); + gtk_container_add(GTK_CONTAINER(pdialog->map_canvas), + pdialog->map_canvas_pixmap); gtk_container_add(GTK_CONTAINER(frame), pdialog->map_canvas); - gtk_widget_realize (pdialog->map_canvas); + pdialog->map_canvas_store = + gdk_pixmap_new(root_window, canvas_width, canvas_height, -1); + /* "production queue" vbox */ box=gtk_vbox_new(FALSE, 5); gtk_box_pack_start(GTK_BOX(pdialog->sub_form), box, TRUE, TRUE, 0); @@ -1414,10 +1436,6 @@ } } } city_map_iterate_end; - - /* draw to real window */ - gdk_draw_pixmap(pdialog->map_canvas->window, civ_gc, pdialog->map_canvas_store, - 0, 0, 0, 0, canvas_width, canvas_height); } /**************************************************************** @@ -1453,10 +1471,6 @@ y * NORMAL_TILE_HEIGHT); } } - - /* draw to real window */ - gdk_draw_pixmap(pdialog->map_canvas->window, civ_gc, pdialog->map_canvas_store, - 0, 0, 0, 0, canvas_width, canvas_height); } /**************************************************************** @@ -1469,6 +1483,9 @@ } else { city_dialog_update_map_ovh(pdialog); } + + /* draw to real window */ + draw_map_canvas(pdialog); } /**************************************************************** @@ -2213,8 +2230,8 @@ GTK_SIGNAL_FUNC(change_list_callback), pdialog); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_widget_set_usize(scrolled, 310, 350); + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_widget_set_usize(scrolled, -2, 350); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(cshell)->vbox), scrolled, TRUE, TRUE, 0); diff -Nurd -X work/diff_ignore freeciv.current/client/gui-gtk/cityrep.c work/client/gui-gtk/cityrep.c --- freeciv.current/client/gui-gtk/cityrep.c Tue Jun 26 20:04:01 2001 +++ work/client/gui-gtk/cityrep.c Thu Aug 23 15:22:45 2001 @@ -451,9 +451,9 @@ gtk_clist_set_selection_mode(GTK_CLIST (city_list), GTK_SELECTION_EXTENDED); scrolled = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(scrolled), city_list); - gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolled ), - GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); - gtk_widget_set_usize(city_list, 620, 250); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled), + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_widget_set_usize(scrolled, -2, 350); gtk_signal_connect(GTK_OBJECT(city_list), "select_row", GTK_SIGNAL_FUNC(city_report_list_callback), NULL);