[Freeciv-Dev] [patch #1684] Make unit_info_label fixed-size as intended
URL: http://gna.org/patch/?1684 Summary: Make unit_info_label fixed-size as intended Project: Freeciv Submitted by: jon_severinsson Submitted on: måndag 2010-05-31 den 23:42 Category: client Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: This is the first patch in a short series intended to improve the gtk gui on netbook sized displays. Looking at the comments for get_unit_info_label_text2 in client/text.c it is obvious that the returned sting is supposed to always contain exactly 4 lines, so that the unit info label doesn't resize itself. However, when multiple units are selected it will instead contain exactly 5 lines, whether the extra line is necessary or not, and thus force a resize of the label. This patch removes the extra line. In most cases it will only remove a blank line. However, if 4 or more different types of units are selected the unit info box would previously include the amount of the 3 most common types and a summary of the rest, while with the patch it will only list the 2 most common types and a summary of the rest. ___ File Attachments: --- Date: måndag 2010-05-31 den 23:42 Name: freeciv-2.2.1-fix-unit-info-label-fixed-size.patch Size: 1001 B By: jon_severinsson http://gna.org/patch/download.php?file_id=9228 ___ Reply to this item at: http://gna.org/patch/?1684 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1685] Remove unnecessary padding around unit_info_label
URL: http://gna.org/patch/?1685 Summary: Remove unnecessary padding around unit_info_label Project: Freeciv Submitted by: jon_severinsson Submitted on: måndag 2010-05-31 den 23:42 Category: client-gtk-2.0 Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: This is the second patch in a short series intended to improve the gtk gui on netbook sized displays. In the gtk gui the unit_info_label is wrapped in a scrolling window that *never* scrolls, and thus only adds ugly and unnecessary padding around the label. This patch removes the superfluous scrolling window. ___ File Attachments: --- Date: måndag 2010-05-31 den 23:42 Name: freeciv-2.2.1-reduce-unit-info-box-padding.patch Size: 1010 B By: jon_severinsson http://gna.org/patch/download.php?file_id=9229 ___ Reply to this item at: http://gna.org/patch/?1685 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1686] Remove more info-hint on small displays
URL: http://gna.org/patch/?1686 Summary: Remove more info-hint on small displays Project: Freeciv Submitted by: jon_severinsson Submitted on: måndag 2010-05-31 den 23:43 Category: client-gtk-2.0 Priority: 3 - Low Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: This is the third patch in a short series intended to improve the gtk gui on netbook sized displays. The (Click for more info) hint in the info label may be useful for new players, but on small displays it takes up valuable screen real-estate for very little gain. This patch removes the line when the gui_gtk2_small_display_layout configuration option is enabled. ___ File Attachments: --- Date: måndag 2010-05-31 den 23:43 Name: freeciv-2.2.1-reduce-info-panel-size-on-small-display-layout.patch Size: 852 B By: jon_severinsson http://gna.org/patch/download.php?file_id=9230 ___ Reply to this item at: http://gna.org/patch/?1686 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1687] Move the citizen bar next to the city name
URL: http://gna.org/patch/?1687 Summary: Move the citizen bar next to the city name Project: Freeciv Submitted by: jon_severinsson Submitted on: måndag 2010-05-31 den 23:43 Category: client-gtk-2.0 Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: This is the fourth patch in a short series intended to improve the gtk gui on netbook sized displays. The city dialogue is to tall to fit on netbook sized displays. This patch moves the citizen bar up one row, next to the city name, and thus reduces the height of the window. This has the side effect that the citizen bar can be accessed from all tabs in the window, but I don't see that as being problematic. Also please note that because there now is something to the right of the bar, the pixcomm widget must be resized (or rather truncated when drawn) to it's current width instead of just continue empty. This prompted a minor change in how the + and - icons in edit mode is treated (they are now considered citizen when counting citizens, thus the change in NUM_CITIZENS_SHOWN). Clicking on the + and - doesn't actually do anything at the moment, and this patch doesn't change that fact (as it doesn't touch citizens_callback()). ___ File Attachments: --- Date: måndag 2010-05-31 den 23:43 Name: freeciv-2.2.1-move-citizen-bar-next-to-city-name.patch Size: 4 kB By: jon_severinsson http://gna.org/patch/download.php?file_id=9231 ___ Reply to this item at: http://gna.org/patch/?1687 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1688] Merge bottom and top notebooks on small display layout
URL: http://gna.org/patch/?1688 Summary: Merge bottom and top notebooks on small display layout Project: Freeciv Submitted by: jon_severinsson Submitted on: tisdag 2010-06-01 den 10:47 Category: client-gtk-2.0 Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: This is the fifth patch in a short series intended to improve the gtk gui on netbook sized displays. On small displays you won't fit two notebooks (aka tabwidgets) on the screen at the same time, so you have to scroll between them, which voids all benefits of having two. Much simpler to just use one in that case. This patch merges the bottom and top notebooks when the gui_gtk2_small_display_layout configuration option is enabled. The combined notebook behaves like the top notebook normally does (eg tabs at the bottom, can not be detached) but includes the pages normally included in the bottom one. Note, however, that the gui_gtk2_split_bottom_notebook option is still honoured and will put the messages tab in a separate full-height notebook to the right of the combined notebook, but I don't see that as a common use case. This patch could be improved on by making the chat tab detachable when it lives in the non-detachable combined notebook, provided it reattach when the window is closed. However, I'm not familiar enough with gtk to figure out how to do so in a reasonable amount of time, and I don't see detaching the chat window a common use case on netbooks and other devices with limited screen real-estate, so it's not a high priority for me. ___ File Attachments: --- Date: tisdag 2010-06-01 den 10:47 Name: freeciv-2.2.1-merge-bottom-and-top-notebooks-on-small-display-layout.patch Size: 4 kB By: jon_severinsson http://gna.org/patch/download.php?file_id=9233 ___ Reply to this item at: http://gna.org/patch/?1688 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1689] Reduce the width allocated to the help checkbox in the Research tab
URL: http://gna.org/patch/?1689 Summary: Reduce the width allocated to the help checkbox in the Research tab Project: Freeciv Submitted by: jon_severinsson Submitted on: tisdag 2010-06-01 den 11:51 Category: client-gtk-2.0 Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: This is the sixth patch in a short series intended to improve the gtk gui on netbook sized displays. The Researching and Goal frames on the Research tab will cause the main window to grow beyond 1024px width when using a language with longer words than English (in my case Swedish, glödlampor vs bulbs being the main offender). This patch solves this by only allocating one fifth of the width to the help checkbox rather than a third, and thus giving the other columns 20% more space. It could alternately be solved by letting the widgets flow, but that wouldn't look as good... ___ File Attachments: --- Date: tisdag 2010-06-01 den 11:51 Name: freeciv-2.2.1-reduce-science-help-checkbox-width.patch Size: 3 kB By: jon_severinsson http://gna.org/patch/download.php?file_id=9234 ___ Reply to this item at: http://gna.org/patch/?1689 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1689] Reduce the width allocated to the help checkbox in the Research tab
Additional Item Attachment, patch #1689 (project freeciv): File name: freeciv-2.2.1-reduce-science-help-checkbox-width-v2.patch Size:2 KB ___ Reply to this item at: http://gna.org/patch/?1689 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1701] Reduce the minimum width of the city report dialogue
URL: http://gna.org/patch/?1701 Summary: Reduce the minimum width of the city report dialogue Project: Freeciv Submitted by: jon_severinsson Submitted on: fredag 2010-06-11 den 14:58 Category: client-gtk-2.0 Priority: 3 - Low Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: This is an additional patch in my series intended to improve the gtk gui on netbook sized displays. The city report dialogue is fine when first opened, but once a city producing anything is selected, a Total Buy Cost: %d label will make it way to wide, and thus force scrolling. This patch will case this label to be ellipsized (eg ...Cost: %d) if it won't fit without forcing scrolling. Fixing this required the use of gtk_label_set_ellipsize(), which was introduced in Gtk+ 2.6. As such this patch will also increase the minimum Gtk+ version from 2.4 to 2.6, but as 2.6 was released over six (6) years ago, I don't think this is a problem. ___ File Attachments: --- Date: fredag 2010-06-11 den 14:58 Name: freeciv-2.2.1-reduce-city-report-minimum-width.patch Size: 3 kB By: jon_severinsson http://gna.org/patch/download.php?file_id=9296 ___ Reply to this item at: http://gna.org/patch/?1701 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1701] Reduce the minimum width of the city report dialogue
Follow-up Comment #2, patch #1701 (project freeciv): Well, it works without any macro for me (both on Gentoo with gkt+-2.18.9 and on Ubuntu with gtk+-2.18.3), but then it works with the GTK_LABEL() macro too (just tested), so try that one. Also, please note that I've only tested this on the 2.2 branch, so it might conflict with some other change in trunk. If this doesn't help I'll have to investigate that. (file #9300) ___ Additional Item Attachment: File name: freeciv-2.2.1-reduce-science-help-checkbox-width-v2.patch Size:2 KB ___ Reply to this item at: http://gna.org/patch/?1701 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1687] Move the citizen bar next to the city name
Follow-up Comment #2, patch #1687 (project freeciv): The problem is the size of the first line and the alignment. At the moment the city name (+ population + status) moves around if one switches the city. How can it be fixed to start at half the width of the window? This is trivial. If you want the text to be centred in the right half you only need to change hbox = gtk_hbox_new(FALSE, 0); to hbox = gtk_hbox_new(TRUE, 0);. If you want the text to be left-aligned in the right half you will additionally have to add gtk_misc_set_alignment(GTK_MISC(pdialog-name_label), 0.0f, 0.5f); to the / City name label here / section. Attaching an updated patch as well as a backport to the 2.2 branch. (The backport is mainly for my own use, as I want it in the 2.2 deb I use on my netbook, but if you want to commit it to svn feel free to do so). (file #9307, file #9308) ___ Additional Item Attachment: File name: freeciv-trunk-move-citizen-bar-next-to-city-name-v2.patch Size:10 KB File name: freeciv-2.2-move-citizen-bar-next-to-city-name-v2.patch Size:5 KB ___ Reply to this item at: http://gna.org/patch/?1687 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1688] Merge bottom and top notebooks on small display layout
Follow-up Comment #3, patch #1688 (project freeciv): Perhaps it would be an idea to add the city dialog as an tab to the main notebook for such small displays. This would reduce the number of widows opened ... Probably not, as the city dialogue need the full 1024 px width, and not just the 899 px left for the notebook tabs... BTW, on my netbook I have kwin rules so that windows with window class freeciv and window role toplevel, city, and worklist starts maximized without borders. With this setup having the city dialogue as a separate windows works out great. ___ Reply to this item at: http://gna.org/patch/?1688 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1689] Reduce the width allocated to the help checkbox in the Research tab
Follow-up Comment #2, patch #1689 (project freeciv): I did fix some long line to 78 characters but else the patch is fine. Ok, I'll try to remember to check for that in the future... ___ Reply to this item at: http://gna.org/patch/?1689 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1687] Move the citizen bar next to the city name
Follow-up Comment #4, patch #1687 (project freeciv): As it is a cosmetic change which allows to play freeciv on netbooks I think this should go into 2.2.2. So no need to patch your own version anymore ... Great! Please note that I found a typo in my backport (removed one variable to much, fixed in the attacked version). Did you test the gtk2 city dialog of development branch? After the variable city radii were included I did change its layout. Perhaps it would be possible to save some height/width there (especially the production section on the overview page)? I didn't until today, but here are some first thoughts: The minimum width is still set by the production tab (at least in Swedish translation, this is very dependent on the length of column headers and the wonder names), so no change there. The new position and additional height of the info box is great, it's not as if supported and present units need the full widow width. Currently I'm using kwin to force the window height, which cuts of several lines from the info box in 2.2, so that change should probably be back-ported. The line break in the Production progress-bar/drop-down-menu is imho stupid and should be reverted, as it unnecessarily eats pixels from the Improvements list. But the big problem with trunk city dialogue is the oversized city map. It forces both the Overview and the Happiness tabs to be way to tall. On the overview map forcing the window height will cut it's height in about half and only show the middle of it, which is enough to show the default radii, but it registers clicks as if it was the upper half of the map, making managing your workers manually impossible. The only solution I can think of that still keeps compatibility with the variable radii feature is to put the city map in a GtkScrolledWindow that adds a scrollbar when the height gets to small. (file #9309) ___ Additional Item Attachment: File name: freeciv-2.2-move-citizen-bar-next-to-city-name-v2.patch Size:5 KB ___ Reply to this item at: http://gna.org/patch/?1687 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1701] Reduce the minimum width of the city report dialogue
Follow-up Comment #5, patch #1701 (project freeciv): Sorry, it appear I managed to attach the wrong file, but no harm done, as you managed to create it yourself, based on my description. Anyway, I applied your patch on a fresh trunk checkout, and tested the result (on my desktop, but in a forced 1024x575 px window thus emulating my netbook), and it does work as intended. The default selection of displayed columns does force the *list* to scroll in order to fit in the *tab*, but the *tab* is not so wide that it forces the entire *window* to scroll. ___ Reply to this item at: http://gna.org/patch/?1701 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1687] Move the citizen bar next to the city name
Follow-up Comment #6, patch #1687 (project freeciv): but it is needed to reduce the size of the production progressbar (test it with: 'Magellans Expedition (W) [+] 200/400') Good point, I guess it stays. Which topology are you using? For topology 3 it is OK. I'm using topology 5. For me, topology 3 is not OK either. Do you have a screenshot? Attached. The problem is that to toggle the worker in (1) I have to click on (2) and toggling the worker in (3) is impossible. Also note that this only happens if you configure your window manager (in my case kwin) to force the window size to fit the screen. If I don't do that, I will instead have a window that continues outside the screen (see second screen-shot) If the optimization of the gtk city dialog needs more discussion this should go into a separate ticket ... It does, but I will have to do some thinking first. (file #9312, file #9313) ___ Additional Item Attachment: File name: freeciv-trunk-citydialogue-overview.png Size:263 KB File name: freeciv-trunk-citydialogue-overview-no-forced-size.png Size:161 KB ___ Reply to this item at: http://gna.org/patch/?1687 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1702] add scrolling bars to the city map
Follow-up Comment #2, patch #1702 (project freeciv): missing: center city map on start and after switching to another city I gave this a stab, attaching an updated patch for S2_2. Not exactly beautiful code, but it does what it's supposed to. (file #9341) ___ Additional Item Attachment: File name: freeciv-2.2-add-scrolling-bars-to-the-city-map.patch Size:7 KB ___ Reply to this item at: http://gna.org/patch/?1702 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [patch #1711] Increase the height of the info box in the happines tab in the city dialogue
URL: http://gna.org/patch/?1711 Summary: Increase the height of the info box in the happines tab in the city dialogue Project: Freeciv Submitted by: jon_severinsson Submitted on: fredag 2010-06-18 den 19:26 Category: client-gtk-2.0 Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: ___ Details: The happiness tab of the city dialogue is taller than the available area on my my netbook's screen, which forces the last few lines of the info box to be hidden behind the happiness box. This is not critical as all information is available in the overview tab, but as the happiness box does not need the entire width of the window, I rearranged the widgets and is attaching a patch here. The patch requires the following patches in the series to be applied first in order to apply cleanly to S2_2, but only the first patch is necessary for the concept to be valid. patch #1704: [backport] update city dialog for gtk-2.0 patch #1687: Move the citizen bar next to the city name patch #1702: add scrolling bars to the city map patch #1708: fix happiness page if resized ___ File Attachments: --- Date: fredag 2010-06-18 den 19:26 Name: freeciv-2.2-increase-height-of-happiness-info-box.patch Size: 4 kB By: jon_severinsson http://gna.org/patch/download.php?file_id=9342 ___ Reply to this item at: http://gna.org/patch/?1711 ___ Meddelandet skickades via/av Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev