[Github-comments] [geany/geany] Add option to use status window to warn about unwritable project files (PR #2953)

xiota notifications at xxxxx
Sun Nov 7 18:28:26 UTC 2021


> I'm wondering if this is really necessary. Errors on saving files should be noticed by users, usually one probably wants to fix the cause instead of ignoring it.

If this were for files being edited, I'd agree.  But this is for project files.  Since Geany functionality otherwise remains intact, this is more of a "warning" than an "error".

Geany also *frequently* saves project files, even when no changes have been made.  This can lead to dozens of popups.  If the warning cannot be redirected to the status window, it would be reasonable to change the warning behavior to show at most one popup per project file per session.

When I open the plugin manager, Geany sends a number oferror messages to stderr.  Imagine if even just the "critical" errors created pop-ups?
```
(geany:5239): Gtk-WARNING **: 09:57:22.467: Negative content width -17 (allocation 1, extents 9x9) while allocating gadget (node entry, owner GtkEntry)

(geany:5239): Gtk-WARNING **: 09:57:22.467: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node entry, owner GtkEntry)

(geany:5239): Gtk-WARNING **: 09:57:22.467: Negative content width -1 (allocation 1, extents 1x1) while allocating gadget (node scrolledwindow, owner GtkScrolledWindow)

(geany:5239): Gtk-WARNING **: 09:57:22.467: Negative content height -1 (allocation 1, extents 1x1) while allocating gadget (node scrolledwindow, owner GtkScrolledWindow)

(geany:5239): Gtk-WARNING **: 09:57:22.467: Negative content width -9 (allocation 1, extents 5x5) while allocating gadget (node scrollbar, owner GtkScrollbar)

(geany:5239): Gtk-CRITICAL **: 09:57:22.467: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(geany:5239): Gtk-CRITICAL **: 09:57:22.467: gtk_widget_get_preferred_width_for_height: assertion 'height >= 0' failed

(geany:5239): Gtk-WARNING **: 09:57:22.467: gtk_widget_size_allocate(): attempt to allocate widget with width 16 and height -29

(geany:5239): Gtk-WARNING **: 09:57:22.467: Negative content height -9 (allocation 1, extents 5x5) while allocating gadget (node scrollbar, owner GtkScrollbar)

(geany:5239): Gtk-CRITICAL **: 09:57:22.467: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
```




> I noticed the use case in #2863 but I'm not sure whether this is worth a new option and handling it at all.

Geany previously allowed users to have read-only project files without nagging them.  According to reasoning used against me in another PR, the change to showing popup warnings represents removal of capability without fully considering use cases.  There is even a known use case with at least one user who is affected.  (While for my other PR, there is no known use case or affected user.)

Rather than handling each warning separately, a general warning function could be used that's passed a parameter that sends the warning to a popup, the status window, stderr, etc.  If such a function already exists, then the project warnings could be modified to use them, rather than unconditionally using popups.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2953#issuecomment-962658959
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211107/445aac14/attachment.htm>


More information about the Github-comments mailing list