[Github-comments] [geany/geany] GI compatible msgwin_*_add (#1748)
Colomban Wendling
notifications at xxxxx
Wed Jan 24 19:32:48 UTC 2018
b4n requested changes on this pull request.
Looks mostly OK, but I'd like the few small fixes
> @@ -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
> @@ -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
> @@ -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?
>
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
>
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
> *
- * @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 or view it on GitHub:
https://github.com/geany/geany/pull/1748#pullrequestreview-91299682
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180124/321302bc/attachment-0001.html>
More information about the Github-comments
mailing list