Feature #1288
closedGTK client remember size of the options dlog
Added by Dean Brown 2 months ago. Updated 8 days ago.
0%
Description
Similar to #1287, the qt client does it.
I haven't figured out how to yet, but will try.
Files
1288-1time.patch (3.38 KB) 1288-1time.patch | Dean Brown, 04/13/2025 04:13 AM | ||
1288-alltime.patch (15.7 KB) 1288-alltime.patch | Dean Brown, 04/13/2025 04:13 AM | ||
1288-gtk5-alltime.patch (1.61 KB) 1288-gtk5-alltime.patch | Dean Brown, 04/16/2025 01:56 AM | ||
1288combined.patch (17 KB) 1288combined.patch | Dean Brown, 05/04/2025 11:58 PM | ||
1288-3_1+3_2Better.patch (3.37 KB) 1288-3_1+3_2Better.patch | Dean Brown, 06/03/2025 07:34 AM | ||
1288-3_3+MainBetter.patch (13.8 KB) 1288-3_3+MainBetter.patch | Dean Brown, 06/03/2025 07:57 AM |
Updated by Dean Brown 2 months ago
- File 1288-1time.patch 1288-1time.patch added
- File 1288-alltime.patch 1288-alltime.patch added
Found fixes for gtk3.22 & gtk4.
The 1time patch made from 3.1 branch, doesn't touch freeciv-client-rc-* file, saves the size during one runtime.
The alltime patch made from main branch, affects freeciv-client-rc-* file, saves the size across runtimes. This patch was created after the patch "#1287-main.patch" from issue #1287 was done.
Updated by Dean Brown 2 months ago
- File 1288-gtk5-alltime.patch 1288-gtk5-alltime.patch added
copy the fix into gtk5
Updated by Dean Brown about 1 month ago
- File 1288combined.patch 1288combined.patch added
Replace files 1288-alltime.patch and 1288-gtk5-alltime.patch with 1288combined.patch
Updated by Marko Lindqvist 30 days ago
- Some gtk-style "function ()" calls instead of freeciv style "function()"
- You should not add dummy options for already removed clients
- I'm not sure it's an improvement to replace dynamically adjusting option dialog width with hardcoded value that will be sensible/correct only for some users (font size etc).
Updated by Dean Brown 22 days ago
Updated by Marko Lindqvist 22 days ago
- Blocked by Feature #1287: GTK client remember size of help dlg added
Updated by Marko Lindqvist 22 days ago
Instructions for patch creation in https://www.freeciv.org/wiki/How_to_Contribute#How_to_create_patch_file_with_Git should be good also for working with a stack of patches, if you want to develop this patch already on top of #1287.
Updated by Dean Brown 13 days ago
- File 1288-3_1+3_2Better.patch 1288-3_1+3_2Better.patch added
- File 1288-3_3+MainBetter.patch 1288-3_3+MainBetter.patch added
Better patches.
"function ()" calls -> "function()"
removed gtk2 and gtk3 stuff
The original code had hardcoded values in
gtk_window_set_default_size(GTK_WINDOW(pdialog->shell), -1, 480);
For the 3_1+3_2 patch I kept the -1, 480 values for initializing the added variables.
For the 3_3+Main patch, I kept the 480 value for GUI_GTK..._OPTIONSDLG_DEFAULT_YSIZE,
but using -1 value for GUI_GTK..._OPTIONSDLG_DEFAULT_XSIZE doesn't work because it needs to be >= GUI_GTK..._OPTIONSDLG_MIN_XSIZE.
So I used 128 for both the default and minimum value, and it tests OK.
Updated by Dean Brown 13 days ago
Forgot to add, the 3_3+Main patch now also does the migrate_options_from_gtk...()
Updated by Marko Lindqvist 12 days ago
Maybe we finish this with the way it's now, but for the future development:
I now started thinking that these should not be options (that you also can set in the options dialog). I assume that the actual dialog size and option field are not even properly synced (value shown in the optiondlg field is not updated when the size is saved from a window)
I think the right way for this to work would be that these dialog size options would not appear in the options dialog at all.
Updated by Marko Lindqvist 12 days ago
- Status changed from New to In Review
- Assignee set to Marko Lindqvist
Updated by Marko Lindqvist 12 days ago
Marko Lindqvist wrote in #note-11:
I assume that the actual dialog size and option field are not even properly synced
e.g.:
1) Open Options dialog
2) Open Help dialog
3) Adjust size of the help dialog
4) Close help dialog
5) Reopen help dialog, and observe that it has kept its size
6) Close help dialog
7) Click 'Apply' in the options dialog
8) Reopen help dialog, and observe that its size is now back to the very original one
Updated by Dean Brown 12 days ago
You are correct, never occurred to me you could have both dialogs open at the same time. Closing the help dialog triggers writing the freeciv-client-rc-* file, and 'Apply' in the options dialog does also. Whoever does it last wins. Having the options dialog update its help dialog settings while it's open would be a can of worms and likely not a good idea. Same problem with the city dialog size. I just tried and found you can have all 3 dialogs open!
Agree for the future - dialog size options should not appear in the options dialog at all.