Add some const char* argument modifiers, remove unneeded static from
some local vars. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1029 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
75e6042821
commit
d5004f43e4
@ -1,3 +1,10 @@
|
||||
2006-11-25 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||
|
||||
* src/msgwindow.c, src/notebook.c, src/msgwindow.h, src/notebook.h:
|
||||
Add some const char* argument modifiers, remove unneeded static from
|
||||
some local vars.
|
||||
|
||||
|
||||
2006-11-24 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||
|
||||
* src/ui_utils.h, src/prefs.c, src/dialogs.c, src/ui_utils.c:
|
||||
|
@ -49,8 +49,8 @@ typedef struct
|
||||
gint file_idx; // idx of the field where the filename is or -1
|
||||
} ParseData;
|
||||
|
||||
static GdkColor dark = {0, 58832, 58832, 58832};
|
||||
static GdkColor white = {0, 65535, 65535, 65535};
|
||||
static const GdkColor dark = {0, 58832, 58832, 58832};
|
||||
static const GdkColor white = {0, 65535, 65535, 65535};
|
||||
|
||||
MessageWindow msgwindow;
|
||||
|
||||
@ -156,16 +156,16 @@ void msgwin_prepare_compiler_tree_view(void)
|
||||
|
||||
|
||||
// adds string to the compiler textview
|
||||
void msgwin_compiler_add(gint msg_color, gboolean scroll, gchar const *format, ...)
|
||||
void msgwin_compiler_add(gint msg_color, gboolean scroll, const gchar *format, ...)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GtkTreePath *path;
|
||||
GdkColor *color;
|
||||
static GdkColor red = {0, 65535, 0, 0};
|
||||
static GdkColor dark_red = {0, 65535 / 2, 0, 0};
|
||||
static GdkColor blue = {0, 0, 0, 65535};
|
||||
static GdkColor black = {0, 0, 0, 0};
|
||||
static gchar string[512];
|
||||
const GdkColor *color;
|
||||
const GdkColor red = {0, 65535, 0, 0};
|
||||
const GdkColor dark_red = {0, 65535 / 2, 0, 0};
|
||||
const GdkColor blue = {0, 0, 0, 65535};
|
||||
const GdkColor black = {0, 0, 0, 0};
|
||||
gchar string[512];
|
||||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
@ -206,7 +206,7 @@ void msgwin_show()
|
||||
|
||||
|
||||
// adds string to the msg treeview
|
||||
void msgwin_msg_add(gint line, gint idx, gchar *string)
|
||||
void msgwin_msg_add(gint line, gint idx, const gchar *string)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
static gint state = 0;
|
||||
@ -219,12 +219,12 @@ void msgwin_msg_add(gint line, gint idx, gchar *string)
|
||||
}
|
||||
|
||||
|
||||
// adds a status message
|
||||
void msgwin_status_add(gchar const *format, ...)
|
||||
// logs a status message (use ui_set_statusbar() to just display text on the statusbar)
|
||||
void msgwin_status_add(const gchar *format, ...)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
static gint state = 0;
|
||||
static gchar string[512];
|
||||
gchar string[512];
|
||||
gchar *statusmsg, *time_str;
|
||||
va_list args;
|
||||
|
||||
|
@ -74,12 +74,12 @@ void msgwin_prepare_compiler_tree_view(void);
|
||||
|
||||
void msgwin_show();
|
||||
|
||||
void msgwin_msg_add(gint line, gint idx, gchar *string);
|
||||
void msgwin_msg_add(gint line, gint idx, const gchar *string);
|
||||
|
||||
void msgwin_compiler_add(gint msg_color, gboolean scroll, gchar const *format, ...)
|
||||
void msgwin_compiler_add(gint msg_color, gboolean scroll, const gchar *format, ...)
|
||||
G_GNUC_PRINTF (3, 4);
|
||||
|
||||
void msgwin_status_add(gchar const *format, ...) G_GNUC_PRINTF (1, 2);
|
||||
void msgwin_status_add(const gchar *format, ...) G_GNUC_PRINTF (1, 2);
|
||||
|
||||
GtkWidget *msgwin_create_message_popup_menu(gint type);
|
||||
|
||||
|
@ -295,7 +295,7 @@ static void tab_count_changed()
|
||||
|
||||
|
||||
/* Returns index of notebook page, or -1 on error */
|
||||
gint notebook_new_tab(gint doc_idx, gchar *title, GtkWidget *page)
|
||||
gint notebook_new_tab(gint doc_idx, const gchar *title, GtkWidget *page)
|
||||
{
|
||||
GtkWidget *hbox, *but;
|
||||
GtkWidget *align;
|
||||
|
@ -27,7 +27,7 @@
|
||||
void notebook_init();
|
||||
|
||||
/* Returns index of notebook page, or -1 on error */
|
||||
gint notebook_new_tab(gint doc_idx, gchar *title, GtkWidget *page);
|
||||
gint notebook_new_tab(gint doc_idx, const gchar *title, GtkWidget *page);
|
||||
|
||||
// Always use this instead of gtk_notebook_remove_page().
|
||||
void notebook_remove_page(gint page_num);
|
||||
|
Loading…
x
Reference in New Issue
Block a user