[CF-Devel] split window saved positions (patch)
Johnny Shelley
jshelley at ictransnet.com
Mon Sep 30 02:07:04 CDT 2002
This patch fixes split window saved sizes. Previously, each window would
default to a rather ugly width and height unless the default height was
exceeded, at which point user specified width would be respected.
johnny
PGP Public Key available from:
http://www.keyserver.net:11371/pks/lookup?op=get&search=0x17BF1DD3
-------------- next part --------------
Index: gx11.c
===================================================================
RCS file: /cvsroot/crossfire/client/gtk/gx11.c,v
retrieving revision 1.20
diff -c -r1.20 gx11.c
*** gx11.c 22 Aug 2002 12:36:42 -0000 1.20
--- gx11.c 30 Sep 2002 06:59:27 -0000
***************
*** 4879,4910 ****
else fprintf(stderr,"Found bogus line in window position file:\n%s %s\n", buf, cp);
} else {
if (!strcmp(buf,"win_game:")) {
! gtk_widget_set_uposition (gtkwin_root, wx, wy);
! gtk_widget_set_usize (gtkwin_root, w, h);
}
if (!want_config[CONFIG_SPLITWIN]) {
fprintf(stderr,"Found bogus line in window position file:\n%s %s\n", buf, cp);
continue;
}
if (!strcmp(buf,"win_stats:")) {
! gtk_widget_set_uposition (gtkwin_stats, wx, wy);
! gtk_widget_set_usize (gtkwin_stats, w, h);
}
if (!strcmp(buf,"win_info:")) {
! gtk_widget_set_uposition (gtkwin_info, wx, wy);
! gtk_widget_set_usize (gtkwin_info, w, h);
}
if (!strcmp(buf,"win_inv:")) {
! gtk_widget_set_uposition (gtkwin_inv, wx, wy);
! gtk_widget_set_usize (gtkwin_inv, w, h);
}
if (!strcmp(buf,"win_look:")) {
! gtk_widget_set_uposition (gtkwin_look, wx, wy);
! gtk_widget_set_usize (gtkwin_look, w, h);
}
if (!strcmp(buf,"win_message:")) {
! gtk_widget_set_uposition (gtkwin_message, wx, wy);
! gtk_widget_set_usize (gtkwin_message, w, h);
}
} /* else if split windows */
} /* while fgets */
--- 4879,4904 ----
else fprintf(stderr,"Found bogus line in window position file:\n%s %s\n", buf, cp);
} else {
if (!strcmp(buf,"win_game:")) {
! gdk_window_move_resize(gtkwin_root->window, wx, wy, w, h);
}
if (!want_config[CONFIG_SPLITWIN]) {
fprintf(stderr,"Found bogus line in window position file:\n%s %s\n", buf, cp);
continue;
}
if (!strcmp(buf,"win_stats:")) {
! gdk_window_move_resize(gtkwin_stats->window, wx, wy, w, h);
}
if (!strcmp(buf,"win_info:")) {
! gdk_window_move_resize(gtkwin_info->window, wx, wy, w, h);
}
if (!strcmp(buf,"win_inv:")) {
! gdk_window_move_resize(gtkwin_inv->window, wx, wy, w, h);
}
if (!strcmp(buf,"win_look:")) {
! gdk_window_move_resize(gtkwin_look->window, wx, wy, w, h);
}
if (!strcmp(buf,"win_message:")) {
! gdk_window_move_resize(gtkwin_message->window, wx, wy, w, h);
}
} /* else if split windows */
} /* while fgets */
More information about the crossfire
mailing list