~ubuntu-branches/ubuntu/jaunty/geany/jaunty

« back to all changes in this revision

Viewing changes to src/msgwindow.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2007-02-25 21:12:13 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070225211213-jk4d4vxtgji0rj74
Tags: 0.10.2-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 *      msgwindow.c - this file is part of Geany, a fast and lightweight IDE
3
3
 *
4
 
 *      Copyright 2006 Enrico Troeger <enrico.troeger@uvena.de>
 
4
 *      Copyright 2005-2007 Enrico Tröger <enrico.troeger@uvena.de>
 
5
 *      Copyright 2006-2007 Nick Treleaven <nick.treleaven@btinternet.com>
5
6
 *
6
7
 *      This program is free software; you can redistribute it and/or modify
7
8
 *      it under the terms of the GNU General Public License as published by
17
18
 *      along with this program; if not, write to the Free Software
18
19
 *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
20
 *
20
 
 * $Id: msgwindow.c 1090 2006-12-13 16:41:25Z ntrel $
 
21
 * $Id: msgwindow.c 1269 2007-02-12 17:21:57Z eht16 $
21
22
 */
22
23
 
23
24
 
185
186
 
186
187
static const GdkColor color_error = {0, 65535, 0, 0};
187
188
 
 
189
void msgwin_compiler_add_fmt(gint msg_color, const gchar *format, ...)
 
190
{
 
191
        gchar string[512];
 
192
        va_list args;
 
193
 
 
194
        va_start(args, format);
 
195
        g_vsnprintf(string, 512, format, args);
 
196
        va_end(args);
 
197
        msgwin_compiler_add(msg_color, string);
 
198
}
 
199
 
 
200
 
188
201
// adds string to the compiler textview
189
 
void msgwin_compiler_add(gint msg_color, const gchar *format, ...)
 
202
void msgwin_compiler_add(gint msg_color, const gchar *msg)
190
203
{
191
204
        GtkTreeIter iter;
192
205
        GtkTreePath *path;
194
207
        const GdkColor dark_red = {0, 65535 / 2, 0, 0};
195
208
        const GdkColor blue = {0, 0, 0, 0xD000};        // not too bright ;-)
196
209
        const GdkColor black = {0, 0, 0, 0};
197
 
        gchar string[512];
198
 
        va_list args;
199
 
 
200
 
        va_start(args, format);
201
 
        g_vsnprintf(string, 512, format, args);
202
 
        va_end(args);
203
210
 
204
211
        switch (msg_color)
205
212
        {
210
217
        }
211
218
 
212
219
        gtk_list_store_append(msgwindow.store_compiler, &iter);
213
 
        gtk_list_store_set(msgwindow.store_compiler, &iter, 0, color, 1, string, -1);
 
220
        gtk_list_store_set(msgwindow.store_compiler, &iter, 0, color, 1, msg, -1);
214
221
 
215
222
        if (app->msgwindow_visible)
216
223
        {