@elextr commented on this pull request.
>
if (main_status.main_window_realized)
- dialogs_show_msgbox(GTK_MESSAGE_WARNING, warn_msg,
display_filename);
+ dialogs_show_msgbox(GTK_MESSAGE_WARNING, "%s",
warn_msg);
+
+ ui_set_statusbar(TRUE, "%s", warn_msg);
> What [do](https://docs.gtk.org/glib/func.GNUC_PRINTF.html)
> [you](https://github.com/geany/geany/blob/eef67ecc200a6cf07f277c28282facf9854cd2ea/src/ui_utils.h#L108)
>
> [mean](https://github.com/geany/geany/blob/eef67ecc200a6cf07f277c28282facf9854cd2ea/src/msgwindow.h#L60)?
Oh, its only on the declaration, I looked at the
[definition](https://github.com/geany/geany/blob/eef67ecc200a6cf07f277c28282facf9854cd2ea/src/ui_utils.c#L167),
ok.
> which I use in the patch.
which patch?
My point was that `ui_set_statusbar` printfs the input then calls
`msgwin_status_add` with `%s` to re-printf the result string that it just
printfed ((mis)using printf as a verb), so maybe that should use
`msgwin_status_add_string()`?
> 12 out of 87 calls pass "%s"
Not inconsiderable. In this case you need to printf the string before sending
it to the status bar because it is used in the dialog, but since status bar is
always doing GTK with the result the cost of re-printfing possibly is
immaterial.
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3665#discussion_r1376949119
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3665/review/[email protected]>