SF.net SVN: geany:[3326] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Fri Dec 5 17:30:07 UTC 2008
Revision: 3326
http://geany.svn.sourceforge.net/geany/?rev=3326&view=rev
Author: ntrel
Date: 2008-12-05 17:30:06 +0000 (Fri, 05 Dec 2008)
Log Message:
-----------
Rename msgwin_compiler_add -> msgwin_compiler_add_string.
Rename msgwin_msg_add -> msgwin_msg_add_string.
Rename msgwin_compiler_add_fmt -> msgwin_compiler_add.
Rename msgwin_msg_add_fmt -> msgwin_msg_add.
This fixes 2 geanyfunctions.h macros, and is more consistent with
msgwin_status_add().
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/geanyfunctions.h
trunk/src/build.c
trunk/src/msgwindow.c
trunk/src/msgwindow.h
trunk/src/plugindata.h
trunk/src/plugins.c
trunk/src/search.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-12-05 17:26:30 UTC (rev 3325)
+++ trunk/ChangeLog 2008-12-05 17:30:06 UTC (rev 3326)
@@ -10,6 +10,14 @@
Deprecate GeanyFunctions::p_msgwindow.
* plugins/saveactions.c:
Fix use of filetypes_array.
+ * src/build.c, src/plugindata.h, src/msgwindow.c, src/msgwindow.h,
+ src/search.c, src/plugins.c, plugins/geanyfunctions.h:
+ Rename msgwin_compiler_add -> msgwin_compiler_add_string.
+ Rename msgwin_msg_add -> msgwin_msg_add_string.
+ Rename msgwin_compiler_add_fmt -> msgwin_compiler_add.
+ Rename msgwin_msg_add_fmt -> msgwin_msg_add.
+ This fixes 2 geanyfunctions.h macros, and is more consistent with
+ msgwin_status_add().
2008-12-04 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/plugins/geanyfunctions.h
===================================================================
--- trunk/plugins/geanyfunctions.h 2008-12-05 17:26:30 UTC (rev 3325)
+++ trunk/plugins/geanyfunctions.h 2008-12-05 17:30:06 UTC (rev 3326)
@@ -188,10 +188,10 @@
geany_functions->p_dialogs->show_save_as
#define msgwin_status_add \
geany_functions->p_msgwin->status_add
-#define msgwin_compiler_add_fmt \
- geany_functions->p_msgwin->compiler_add_fmt
-#define msgwin_msg_add_fmt \
- geany_functions->p_msgwin->msg_add_fmt
+#define msgwin_compiler_add \
+ geany_functions->p_msgwin->compiler_add
+#define msgwin_msg_add \
+ geany_functions->p_msgwin->msg_add
#define msgwin_clear_tab \
geany_functions->p_msgwin->clear_tab
#define msgwin_switch_tab \
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2008-12-05 17:26:30 UTC (rev 3325)
+++ trunk/src/build.c 2008-12-05 17:30:06 UTC (rev 3326)
@@ -480,7 +480,7 @@
gtk_list_store_clear(msgwindow.store_compiler);
gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), MSG_COMPILER);
- msgwin_compiler_add_fmt(COLOR_BLUE, _("%s (in directory: %s)"), utf8_cmd_string, utf8_working_dir);
+ msgwin_compiler_add(COLOR_BLUE, _("%s (in directory: %s)"), utf8_cmd_string, utf8_working_dir);
g_free(utf8_working_dir);
g_free(utf8_cmd_string);
@@ -862,7 +862,7 @@
}
g_free(filename);
}
- msgwin_compiler_add(color, msg);
+ msgwin_compiler_add_string(color, msg);
g_free(msg);
}
@@ -916,7 +916,7 @@
if (failure)
{
msg = _("Compilation failed.");
- msgwin_compiler_add(COLOR_DARK_RED, msg);
+ msgwin_compiler_add_string(COLOR_DARK_RED, msg);
/* If msgwindow is hidden, user will want to display it to see the error */
if (! ui_prefs.msgwindow_visible)
{
@@ -930,7 +930,7 @@
else
{
msg = _("Compilation finished successfully.");
- msgwin_compiler_add(COLOR_BLUE, msg);
+ msgwin_compiler_add_string(COLOR_BLUE, msg);
if (! ui_prefs.msgwindow_visible ||
gtk_notebook_get_current_page(GTK_NOTEBOOK(msgwindow.notebook)) != MSG_COMPILER)
ui_set_statusbar(FALSE, "%s", msg);
Modified: trunk/src/msgwindow.c
===================================================================
--- trunk/src/msgwindow.c 2008-12-05 17:26:30 UTC (rev 3325)
+++ trunk/src/msgwindow.c 2008-12-05 17:30:06 UTC (rev 3326)
@@ -219,10 +219,10 @@
* Adds a new message in the compiler tab treeview in the messages window.
*
* @param msg_color A color to be used for the text. It must be an element of #MsgColors.
- * @param format Printf()-style format string.
+ * @param format @c printf()-style format string.
* @param ... Arguments for the @c format string.
**/
-void msgwin_compiler_add_fmt(gint msg_color, const gchar *format, ...)
+void msgwin_compiler_add(gint msg_color, const gchar *format, ...)
{
gchar string[512];
va_list args;
@@ -230,11 +230,11 @@
va_start(args, format);
g_vsnprintf(string, 512, format, args);
va_end(args);
- msgwin_compiler_add(msg_color, string);
+ msgwin_compiler_add_string(msg_color, string);
}
-void msgwin_compiler_add(gint msg_color, const gchar *msg)
+void msgwin_compiler_add_string(gint msg_color, const gchar *msg)
{
GtkTreeIter iter;
GtkTreePath *path;
@@ -277,10 +277,10 @@
* @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 -1 to ignore.
* @param doc The document. Set to @c NULL to ignore.
- * @param format Printf()-style format string.
+ * @param format @c printf()-style format string.
* @param ... Arguments for the @c format string.
**/
-void msgwin_msg_add_fmt(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...)
+void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...)
{
gchar string[512];
va_list args;
@@ -289,12 +289,12 @@
g_vsnprintf(string, 512, format, args);
va_end(args);
- msgwin_msg_add(msg_color, line, doc, string);
+ msgwin_msg_add_string(msg_color, line, doc, string);
}
/* adds string to the msg treeview */
-void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *string)
+void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const gchar *string)
{
GtkTreeIter iter;
const GdkColor *color = get_color(msg_color);
@@ -321,7 +321,7 @@
* Log a status message *without* setting the status bar.
* (Use ui_set_statusbar() to display text on the statusbar)
*
- * @param format Printf()-style format string.
+ * @param format @c printf()-style format string.
* @param ... Arguments for the @c format string.
**/
void msgwin_status_add(const gchar *format, ...)
Modified: trunk/src/msgwindow.h
===================================================================
--- trunk/src/msgwindow.h 2008-12-05 17:26:30 UTC (rev 3325)
+++ trunk/src/msgwindow.h 2008-12-05 17:30:06 UTC (rev 3326)
@@ -84,14 +84,14 @@
void msgwin_clear_tab(gint tabnum);
-void msgwin_msg_add_fmt(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...)
+void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...)
G_GNUC_PRINTF (4, 5);
-void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *string);
+void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const gchar *string);
-void msgwin_compiler_add_fmt(gint msg_color, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
+void msgwin_compiler_add(gint msg_color, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
-void msgwin_compiler_add(gint msg_color, const gchar *msg);
+void msgwin_compiler_add_string(gint msg_color, const gchar *msg);
void msgwin_status_add(const gchar *format, ...) G_GNUC_PRINTF (1, 2);
Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h 2008-12-05 17:26:30 UTC (rev 3325)
+++ trunk/src/plugindata.h 2008-12-05 17:30:06 UTC (rev 3326)
@@ -407,7 +407,7 @@
typedef struct MsgWinFuncs
{
/* status_add() does not set the status bar - use ui->set_statusbar() instead. */
- void (*status_add) (const gchar *format, ...);
+ void (*status_add) (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
void (*compiler_add) (gint msg_color, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
void (*msg_add) (gint msg_color, gint line, struct GeanyDocument *doc,
const gchar *format, ...) G_GNUC_PRINTF (4, 5);
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2008-12-05 17:26:30 UTC (rev 3325)
+++ trunk/src/plugins.c 2008-12-05 17:30:06 UTC (rev 3326)
@@ -238,8 +238,8 @@
static MsgWinFuncs msgwin_funcs = {
&msgwin_status_add,
- &msgwin_compiler_add_fmt,
- &msgwin_msg_add_fmt,
+ &msgwin_compiler_add,
+ &msgwin_msg_add,
&msgwin_clear_tab,
&msgwin_switch_tab
};
Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c 2008-12-05 17:26:30 UTC (rev 3325)
+++ trunk/src/search.c 2008-12-05 17:30:06 UTC (rev 3326)
@@ -1313,7 +1313,7 @@
str = g_strdup_printf(_("%s %s -- %s (in directory: %s)"),
tool_prefs.grep_cmd, opts, utf8_search_text, dir);
utf8_str = utils_get_utf8_from_locale(str);
- msgwin_msg_add(COLOR_BLUE, -1, NULL, utf8_str);
+ msgwin_msg_add_string(COLOR_BLUE, -1, NULL, utf8_str);
utils_free_pointers(2, str, utf8_str, NULL);
ret = TRUE;
}
@@ -1387,7 +1387,7 @@
else
utf8_msg = msg;
- msgwin_msg_add(COLOR_BLACK, -1, NULL, utf8_msg);
+ msgwin_msg_add_string(COLOR_BLACK, -1, NULL, utf8_msg);
if (utf8_msg != msg)
g_free(utf8_msg);
@@ -1468,7 +1468,7 @@
"Search completed with %d match.",
"Search completed with %d matches.", count);
- msgwin_msg_add_fmt(COLOR_BLUE, -1, NULL, text, count);
+ msgwin_msg_add(COLOR_BLUE, -1, NULL, text, count);
ui_set_statusbar(FALSE, text, count);
break;
}
@@ -1476,7 +1476,7 @@
msg = _("No matches found.");
color = COLOR_BLUE;
default:
- msgwin_msg_add(color, -1, NULL, msg);
+ msgwin_msg_add_string(color, -1, NULL, msg);
ui_set_statusbar(FALSE, "%s", msg);
break;
}
@@ -1514,7 +1514,7 @@
count++;
line = sci_get_line_from_position(doc->editor->sci, pos);
buffer = sci_get_line(doc->editor->sci, line);
- msgwin_msg_add_fmt(COLOR_BLACK, line + 1, doc,
+ msgwin_msg_add(COLOR_BLACK, line + 1, doc,
"%s:%d : %s", short_file_name, line + 1, g_strstrip(buffer));
g_free(buffer);
@@ -1555,7 +1555,7 @@
if (! found) /* no matches were found */
{
ui_set_statusbar(FALSE, _("No matches found for \"%s\"."), search_text);
- msgwin_msg_add_fmt(COLOR_BLUE, -1, NULL, _("No matches found for \"%s\"."), search_text);
+ msgwin_msg_add(COLOR_BLUE, -1, NULL, _("No matches found for \"%s\"."), search_text);
}
else
{
@@ -1564,7 +1564,7 @@
ui_set_statusbar(FALSE, ngettext(
"Found %d match for \"%s\".", "Found %d matches for \"%s\".", count),
count, search_text);
- msgwin_msg_add_fmt(COLOR_BLUE, -1, NULL, ngettext(
+ msgwin_msg_add(COLOR_BLUE, -1, NULL, ngettext(
"Found %d match for \"%s\".", "Found %d matches for \"%s\".", count),
count, search_text);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list