@b4n requested changes on this pull request.
Looks mostly OK, but I'd like the few small fixes
In src/msgwindow.c:
> @@ -488,6 +508,30 @@ void msgwin_status_add(const gchar *format, ...) } } +/** + * Logs a status message *without* setting the status bar. + * + * Use @ref ui_set_statusbar() to display text on the statusbar. + * + * @param format @c printf()-style format string. + * @param ... Arguments for the @c format string. + **/ +GEANY_API_SYMBOL +void msgwin_status_add(const gchar *format, ...) +{ + GtkTreeIter iter;
unused variable
In src/msgwindow.c:
> @@ -488,6 +508,30 @@ void msgwin_status_add(const gchar *format, ...) } } +/** + * Logs a status message *without* setting the status bar. + * + * Use @ref ui_set_statusbar() to display text on the statusbar. + * + * @param format @c printf()-style format string. + * @param ... Arguments for the @c format string. + **/ +GEANY_API_SYMBOL +void msgwin_status_add(const gchar *format, ...) +{ + GtkTreeIter iter; + gchar *string; + gchar *statusmsg, *time_str;
unused variables
In src/msgwindow.c:
> @@ -410,7 +423,19 @@ void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar * } -/* adds string to the msg treeview */ +/** + * Adds a new message in the messages tab treeview in the messages window. + * + * If @a line and @a doc are set, clicking on this line jumps into the + * file which is specified by @a doc into the line specified with @a line. + * + * @param msg_color A color to be used for the text. It must be an element of #MsgColors. + * @param line The document's line where the message belongs to. Set to @c -1 to ignore. + * @param doc @nullable The document. Set to @c NULL to ignore. + * @param string Message to be added. + * + * @since @todo + **/ void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const gchar *string)
Needs a GEANY_API_SYMBOL
marker, doesn't it?
In src/msgwindow.h:
> void msgwin_compiler_add(gint msg_color, const gchar *format, ...) G_GNUC_PRINTF (2, 3); +void msgwin_compiler_add_string(gint msg_color, const gchar *msg);
you should remove the duplicated prototype from the GEANY_PRIVATE
section below
In src/msgwindow.h:
> void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...) G_GNUC_PRINTF (4, 5); +void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const char *msg);
Ditto for that one that already existed
In src/msgwindow.c:
> * - * @param msg_color A color to be used for the text. It must be an element of #MsgColors. - * @param format @c printf()-style format string. - * @param ... Arguments for the @c format string. + * @param msg_color A color to be used for the text. It must be an element of #MsgColors. + * @param format @c printf()-style format string. + * @param ... Arguments for the @c format string. + *
Could be interesting to add a @see msgwin_compiler_add_string()
, wouldn't it? And similar for the other functions. Just a suggestion though, but could avoid a little confusion for the C API users.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.