Search
lxdream.org :: lxdream :: r887:8b3ee741c9d7
lxdream 0.9.1
released Jun 29
Download Now
changeset887:8b3ee741c9d7
parent886:2bc6d2329cce
child888:9892c970b95a
authornkeynes
dateMon Oct 20 06:11:10 2008 +0000 (12 years ago)
Fix const-correctness
src/gtkui/gtk_debug.c
src/gtkui/gtk_win.c
src/gtkui/gtkcb.c
src/gtkui/gtkui.h
1.1 --- a/src/gtkui/gtk_debug.c Mon Oct 20 05:08:31 2008 +0000
1.2 +++ b/src/gtkui/gtk_debug.c Mon Oct 20 06:11:10 2008 +0000
1.3 @@ -259,7 +259,7 @@
1.4 gtk_entry_set_text( data->page_field, addr );
1.5
1.6 if( !data->cpu->is_valid_page_func( from ) ) {
1.7 - arr[3] = _("This page is currently unmapped");
1.8 + arr[3] = (char *)_("This page is currently unmapped");
1.9 gtk_clist_append( data->disasm_list, arr );
1.10 gtk_clist_set_foreground( data->disasm_list, 0, &gui_colour_error );
1.11 } else {
2.1 --- a/src/gtkui/gtk_win.c Mon Oct 20 05:08:31 2008 +0000
2.2 +++ b/src/gtkui/gtk_win.c Mon Oct 20 06:11:10 2008 +0000
2.3 @@ -35,6 +35,7 @@
2.4 #include "display.h"
2.5 #include "gdrom/gdrom.h"
2.6 #include "gtkui/gtkui.h"
2.7 +#include "drivers/video_gl.h"
2.8
2.9
2.10 struct main_window_info {
2.11 @@ -336,7 +337,7 @@
2.12 return win;
2.13 }
2.14
2.15 -void main_window_set_status_text( main_window_t win, char *text )
2.16 +void main_window_set_status_text( main_window_t win, const char *text )
2.17 {
2.18 gtk_statusbar_pop( GTK_STATUSBAR(win->statusbar), 1 );
2.19 if( win->is_grabbed ) {
2.20 @@ -354,7 +355,7 @@
2.21
2.22 void main_window_set_running( main_window_t win, gboolean running )
2.23 {
2.24 - char *text = running ? _("Running") : _("Stopped");
2.25 + const char *text = running ? _("Running") : _("Stopped");
2.26 gtk_gui_enable_action( "Pause", running );
2.27 gtk_gui_enable_action( "Run", !running && dreamcast_can_run() );
2.28 main_window_set_status_text( win, text );
3.1 --- a/src/gtkui/gtkcb.c Mon Oct 20 05:08:31 2008 +0000
3.2 +++ b/src/gtkui/gtkcb.c Mon Oct 20 06:11:10 2008 +0000
3.3 @@ -25,7 +25,7 @@
3.4 #include "loader.h"
3.5
3.6
3.7 -static void add_file_pattern( GtkFileChooser *chooser, char *pattern, char *patname )
3.8 +static void add_file_pattern( GtkFileChooser *chooser, const char *pattern, const char *patname )
3.9 {
3.10 if( pattern != NULL ) {
3.11 GtkFileFilter *filter = gtk_file_filter_new();
3.12 @@ -39,8 +39,8 @@
3.13 }
3.14 }
3.15
3.16 -void open_file_dialog( char *title, file_callback_t action, char *pattern, char *patname,
3.17 - gchar const *initial_dir )
3.18 +void open_file_dialog( const char *title, file_callback_t action, const char *pattern, const char *patname,
3.19 + const gchar *initial_dir )
3.20 {
3.21 GtkWidget *file;
3.22 gchar *initial_path = get_absolute_path(initial_dir);
3.23 @@ -62,8 +62,8 @@
3.24 g_free(initial_path);
3.25 }
3.26
3.27 -void save_file_dialog( char *title, file_callback_t action, char *pattern, char *patname,
3.28 - gchar const *initial_dir )
3.29 +void save_file_dialog( const char *title, file_callback_t action, const char *pattern, const char *patname,
3.30 + const gchar *initial_dir )
3.31 {
3.32 GtkWidget *file;
3.33 gchar *initial_path = get_absolute_path(initial_dir);
4.1 --- a/src/gtkui/gtkui.h Mon Oct 20 05:08:31 2008 +0000
4.2 +++ b/src/gtkui/gtkui.h Mon Oct 20 06:11:10 2008 +0000
4.3 @@ -86,8 +86,8 @@
4.4
4.5
4.6 typedef gboolean (*file_callback_t)( const gchar *filename );
4.7 -void open_file_dialog( char *title, file_callback_t action, char *pattern, char *patname,
4.8 - gchar const *initial_dir );
4.9 +void open_file_dialog( const char *title, file_callback_t action, const char *pattern, const char *patname,
4.10 + const gchar *initial_dir );
4.11 /**
4.12 * Extract the keyval of the key event if no modifier keys were pressed -
4.13 * in other words get the keyval of the key by itself. The other way around
.