dlg.add(hbox);
gtk_container_set_border_width(GTK_CONTAINER(hbox), 10);
- char const *label_text = "Version 1.000\n\n"
+ const char *label_text = "Version 1.000\n\n"
"Gtk port by Leonardo Zide\nleo@lokigames.com\n\n"
"Written by Geoffrey DeWan\ngdewan@prairienet.org\n\n"
"Built against NetRadiant " RADIANT_VERSION "\n"
return "";
}
void dispatch( const char* command, float* vMin, float* vMax, bool bSingleBrush ){
- char const *message = NULL;
+ const char *message = NULL;
if ( string_equal( command, "About" ) ) {
- char const *version_string = "UFO:AI Plugin (http://ufoai.sf.net)\nBuild: " __DATE__
+ const char *version_string = "UFO:AI Plugin (http://ufoai.sf.net)\nBuild: " __DATE__
"\nRadiant version: " RADIANT_VERSION
"\nPlugin version: " PLUGIN_VERSION
"\nAuthor: Martin Gerhardy (tlh2000/mattn)\n";
#if !defined( INCLUDED_UFOAI_LEVEL_H )
#define INCLUDED_UFOAI_LEVEL_H
-void assign_default_values_to_worldspawn(bool override, char const **returnMsg);
-void check_map_values(char const **returnMsg);
+void assign_default_values_to_worldspawn(bool override, const char **returnMsg);
+void check_map_values(const char **returnMsg);
void get_team_count(const char *classname, int *count, int *team);
#endif
namespace ui {
- bool init(int *argc, char **argv[], char const *parameter_string, char const **error)
+ bool init(int *argc, char **argv[], const char *parameter_string, const char **error)
{
gtk_disable_setlocale();
static GOptionEntry entries[] = {{}};
- char const *translation_domain = NULL;
+ const char *translation_domain = NULL;
GError *gerror = NULL;
bool ret = gtk_init_with_args(argc, argv, parameter_string, entries, translation_domain, &gerror) != 0;
if (!ret) {
TextView::TextView(ui::New_t) : TextView(GTK_TEXT_VIEW(gtk_text_view_new()))
{}
- void ITextView::text(char const *str)
+ void ITextView::text(const char *str)
{
GtkTextBuffer *buffer = gtk_text_view_get_buffer(this);
gtk_text_buffer_set_text(buffer, str, -1);
Label::Label(const char *label) : Label(GTK_LABEL(gtk_label_new(label)))
{}
- void ILabel::text(char const *str)
+ void ILabel::text(const char *str)
{
gtk_label_set_text(this, str);
}
gtk_entry_set_max_length(this, static_cast<gint>(max_length));
}
- char const *IEntry::text()
+ const char *IEntry::text()
{
return gtk_entry_get_text(this);
}
- void IEntry::text(char const *str)
+ void IEntry::text(const char *str)
{
return gtk_entry_set_text(this, str);
}
namespace ui {
- bool init(int *argc, char **argv[], char const *parameter_string, char const **error);
+ bool init(int *argc, char **argv[], const char *parameter_string, const char **error);
void main();
{ g_object_unref(_handle); }
template<class Lambda>
- gulong connect(char const *detailed_signal, Lambda &&c_handler, void *data);
+ gulong connect(const char *detailed_signal, Lambda &&c_handler, void *data);
template<class Lambda>
- gulong connect(char const *detailed_signal, Lambda &&c_handler, Object data);
+ gulong connect(const char *detailed_signal, Lambda &&c_handler, Object data);
};
static_assert(sizeof(Object) == sizeof(Object::native), "object slicing");
WRAP(TextView, Container, _GtkTextView, (),
,
- void text(char const *str);
+ void text(const char *str);
);
WRAP(Toolbar, Container, _GtkToolbar, (),
WRAP(Label, Widget, _GtkLabel, (),
explicit Label(const char *label);
,
- void text(char const *str);
+ void text(const char *str);
);
WRAP(Image, Widget, _GtkImage, (),
WRAP(Entry, Widget, _GtkEntry, (IEditable, ICellEditable),
explicit Entry(std::size_t max_length);
,
- char const *text();
- void text(char const *str);
+ const char *text();
+ void text(const char *str);
);
class Adjustment;
#define this (*static_cast<self>(this))
template<class Lambda>
- gulong Object::connect(char const *detailed_signal, Lambda &&c_handler, void *data)
+ gulong Object::connect(const char *detailed_signal, Lambda &&c_handler, void *data)
{
return g_signal_connect(G_OBJECT(this), detailed_signal, c_handler, data);
}
template<class Lambda>
- gulong Object::connect(char const *detailed_signal, Lambda &&c_handler, Object data)
+ gulong Object::connect(const char *detailed_signal, Lambda &&c_handler, Object data)
{
return g_signal_connect(G_OBJECT(this), detailed_signal, c_handler, (_GtkObject *) data);
}
returns a vector containing the tags
*/
- char const *expression;
+ const char *expression;
if ( shader == NULL ) { // get all tags from all shaders
expression = "/root/*/*/tag";
returns a set containing the shaders (with path)
*/
- char const *expression = "/root/*/*[not(child::tag)]";
+ const char *expression = "/root/*/*[not(child::tag)]";
xmlXPathObjectPtr xpathPtr = XpathEval( expression );
xmlNodeSetPtr nodePtr;
returns a set containing all used tags
*/
- char const *expression = "/root/*/*/tag";
+ const char *expression = "/root/*/*/tag";
xmlXPathObjectPtr xpathPtr = XpathEval( expression );
xmlNodeSetPtr nodePtr;
#include "cmdlib.h"
int g_argc;
-char const** g_argv;
+const char** g_argv;
-void args_init( int argc, char const* argv[] ){
+void args_init( int argc, const char* argv[] ){
int i, j, k;
for ( i = 1; i < argc; i++ )
g_argv = argv;
}
-char const *gamedetect_argv_buffer[1024];
-void gamedetect_found_game( char const *game, char *path ){
+const char *gamedetect_argv_buffer[1024];
+void gamedetect_found_game( const char *game, char *path ){
int argc;
static char buf[128];
g_argv = gamedetect_argv_buffer;
}
-bool gamedetect_check_game( char const *gamefile, const char *checkfile1, const char *checkfile2, char *buf /* must have 64 bytes free after bufpos */, int bufpos ){
+bool gamedetect_check_game( const char *gamefile, const char *checkfile1, const char *checkfile2, char *buf /* must have 64 bytes free after bufpos */, int bufpos ){
buf[bufpos] = '/';
strcpy( buf + bufpos + 1, checkfile1 );
;
/// brief Returns the filename of the executable belonging to the current process, or 0 if not found.
-char const* getexename( char *buf ){
+const char* getexename( char *buf ){
/* Now read the symbolic link */
int ret = readlink( LINK_NAME, buf, PATH_MAX );
return buf;
}
-void environment_init( int argc, char const* argv[] ){
+void environment_init( int argc, const char* argv[] ){
// Give away unnecessary root privileges.
// Important: must be done before calling gtk_init().
char *loginname;
#include <windows.h>
-void environment_init( int argc, char const* argv[] ){
+void environment_init( int argc, const char* argv[] ){
args_init( argc, argv );
{
#if !defined( INCLUDED_ENVIRONMENT_H )
#define INCLUDED_ENVIRONMENT_H
-void environment_init( int argc, char const* argv[] );
+void environment_init( int argc, const char* argv[] );
const char* environment_get_home_path();
const char* environment_get_app_path();
extern int g_argc;
-extern char const** g_argv;
+extern const char** g_argv;
#endif
}
{
- char const *label_text = "NetRadiant " RADIANT_VERSION "\n"
+ const char *label_text = "NetRadiant " RADIANT_VERSION "\n"
__DATE__ "\n\n"
RADIANT_ABOUTMSG "\n\n"
"This program is free software\n"
#endif
const char* mapname = NULL;
- char const *error = NULL;
+ const char *error = NULL;
if ( !ui::init( &argc, &argv, "<filename.map>", &error) ) {
g_print( "%s\n", error );
return -1;
GlobalDebugMessageHandler::instance().setHandler( GlobalPopupDebugMessageHandler::instance() );
- environment_init(argc, (char const **) argv);
+ environment_init(argc, (const char **) argv);
paths_init();