(not completely clear from the screenshots below because github normalizes image widths to fit the display area)
Before the patch
<img width="976" alt="Screenshot 2024-11-21 at 14 55 39" src="https://github.com/user-attachments/assets/acfabbb4-cbbf-468d-aa06-e748b6eb9...;
After the patch
<img width="810" alt="Screenshot 2024-11-21 at 15 00 01" src="https://github.com/user-attachments/assets/84b13619-04fb-4e40-a42e-faa9b09cd...;
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/4061
-- Commit Summary --
* Split label in saveactions preferences to make the dialog less wide
-- File Changes --
M plugins/saveactions.c (2)
-- Patch Links --
https://github.com/geany/geany/pull/4061.patch https://github.com/geany/geany/pull/4061.diff
@eht16 approved this pull request.
Err, doesn't GTK offer a widget that can reflow automatically? Manually inserting newlines is a mess, especially w.r.t. translations?
Err, doesn't GTK offer a widget that can reflow automatically? Manually inserting newlines is a mess, especially w.r.t. translations?
Well, there's `geany_wrap_label_new()` but it's not exported to plugins and I'm not sure if it behaves 100% correctly - when you open Tools->Plugin manager, it's used for the top label but emits lots of errors to the console:
``` (geany:3677166): Gtk-WARNING **: 11:16:48.477: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)
(geany:3677166): Gtk-WARNING **: 11:16:48.477: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)
(geany:3677166): Gtk-WARNING **: 11:16:48.477: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node scrolledwindow, owner GtkScrolledWindow)
(geany:3677166): Gtk-WARNING **: 11:16:48.477: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node scrolledwindow, owner GtkScrolledWindow)
(geany:3677166): Gtk-CRITICAL **: 11:16:48.477: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
(geany:3677166): Gtk-CRITICAL **: 11:16:48.477: gtk_widget_get_preferred_width_for_height: assertion 'height >= 0' failed
(geany:3677166): Gtk-WARNING **: 11:16:48.477: gtk_widget_size_allocate(): attempt to allocate widget with width 11 and height -23
(geany:3677166): Gtk-CRITICAL **: 11:16:48.477: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar ```
Apart from that I don't know anything (but I don't know GTK :-)
Err, doesn't GTK offer a widget that can reflow automatically? Manually inserting newlines is a mess, especially w.r.t. translations?
We have GeanyWrapLabel for such cases, at least in GTK2 times this was necessary. Maybe GTK3 has something better included in the meantime.
GeanyWrapLabel is not part of the plugin API I think, so @techee's approach might be good enough.
Also, in this case, maybe even better option is to use ``` Date/_Time format for backup files (see https://docs.gtk.org/glib/method.DateTime.format.html): ``` I think it's pretty clear the URL is about format specifiers. What do you think?
There's also another long string in the plugin that makes the dialog wide: ``` _("<i>If you set the Instant Save directory to a directory " "which is not automatically cleared,\nyou will need to cleanup instantly saved files " "manually. The Instant Save plugin will not delete the created files.</i>")); ``` I think it could be simplified do something like this: ``` The plugin will not delete the files created in this directory. ``` (I think the rest of the message is kind of redundant.)
@techee pushed 1 commit.
e6c39c6e92a8c70e0bfb307bd9241c6f836dd021 Make saveaction preference strings shorter
There's also another long string in the plugin that makes the dialog wide:
I just updated the strings to the values I proposed. The result looks much better IMO:
<img width="703" alt="Screenshot 2024-11-30 at 16 29 41" src="https://github.com/user-attachments/assets/2f504ad4-c4f6-4924-8327-ec544d4491ac">
<img width="703" alt="Screenshot 2024-11-30 at 16 29 34" src="https://github.com/user-attachments/assets/ae112ef1-79f7-40d4-9afa-7a1268aa05c7">
Unless there are any objections, I'd merge this in about a week.
Merged #4061 into master.
github-comments@lists.geany.org