struct _KnownPanes
{
PaneType type;
- gchar *id;
- gchar *title;
+ const gchar *id;
+ const gchar *title;
const gchar *config;
};
return vd;
}
-static void editor_verbose_window_fill(EditorVerboseData *vd, gchar *text, gint len)
+static void editor_verbose_window_fill(EditorVerboseData *vd, const gchar *text, gint len)
{
GtkTextBuffer *buffer;
GtkTextIter iter;
#include <stddef.h>
-char *keymap_template [] = {
+const char *keymap_template [] = {
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>",
"<!-- Created with Inkscape (http://www.inkscape.org/) -->",
"",
help_window_show("changelog");
}
-static char *keyboard_map_hardcoded[][2] = {
+static const char *keyboard_map_hardcoded[][2] = {
{"Scroll","Left"},
{"FastScroll", "<Shift>Left"},
{"Left Border", "<Primary>Left"},
return (gchar *)(_(path));
}
-static void layout_actions_setup_mark(LayoutWindow *lw, gint mark, gchar *name_tmpl,
- gchar *label_tmpl, gchar *accel_tmpl, gchar *tooltip_tmpl, GCallback cb)
+static void layout_actions_setup_mark(LayoutWindow *lw, gint mark, const gchar *name_tmpl,
+ const gchar *label_tmpl, const gchar *accel_tmpl, const gchar *tooltip_tmpl, GCallback cb)
{
gchar name[50];
gchar label[100];
struct signals
{
gint sig_no;
- gchar *sig_name;
+ const gchar *sig_name;
};
struct signals signals_list[7];
}
/* Run a command like system() but may output debug messages. */
-int runcmd(gchar *cmd)
+int runcmd(const gchar *cmd)
{
#if 1
return system(cmd);
gchar *utf8_validate_or_convert(const gchar *text);
gint utf8_compare(const gchar *s1, const gchar *s2, gboolean case_sensitive);
gchar *expand_tilde(const gchar *filename);
-int runcmd(gchar *cmd);
+int runcmd(const gchar *cmd);
gchar *decode_geo_parameters(const gchar *input_text);
gint date_get_first_day_of_week();
gchar *date_get_abbreviated_day_name(gint day);
return ret;
}
-void osd_template_insert(GHashTable *vars, gchar *keyword, gchar *value, OsdTemplateFlags flags)
+void osd_template_insert(GHashTable *vars, const gchar *keyword, const gchar *value, OsdTemplateFlags flags)
{
if (!value)
{
GtkWidget *osd_new(gint max_cols, GtkWidget *template_view);
gchar *image_osd_mkinfo(const gchar *str, FileData *fd, GHashTable *vars);
-void osd_template_insert(GHashTable *vars, gchar *keyword, gchar *value, OsdTemplateFlags flags);
+void osd_template_insert(GHashTable *vars, const gchar *keyword, const gchar *value, OsdTemplateFlags flags);
#endif
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
GtkWidget *notebook = (GtkWidget *)data;
gint i;
- static gchar *html_section[] =
+ static const gchar *html_section[] =
{
"GuideOptionsGeneral.html",
"GuideOptionsImage.html",
return TRUE;
}
-void write_bool_option(GString *str, gint UNUSED(indent), gchar *label, gint n)
+void write_bool_option(GString *str, gint UNUSED(indent), const gchar *label, gint n)
{
g_string_append_printf(str, "%s = \"%s\" ", label, n ? "true" : "false");
}
gboolean read_int_option_clamp(const gchar *option, const gchar *label, const gchar *value, gint *n, gint min, gint max);
void write_int_unit_option(GString *str, gint indent, gchar *label, gint n, gint subunits);
gboolean read_int_unit_option(const gchar *option, const gchar *label, const gchar *value, gint *n, gint subunits);
-void write_bool_option(GString *str, gint indent, gchar *label, gint n);
+void write_bool_option(GString *str, gint indent, const gchar *label, gint n);
gboolean read_bool_option(const gchar *option, const gchar *label, const gchar *value, gint *n);
#define WRITE_BOOL(_source_, _name_) write_bool_option(outstr, indent, #_name_, (_source_)._name_)
typedef struct _RemoteCommandEntry RemoteCommandEntry;
struct _RemoteCommandEntry {
- gchar *opt_s;
- gchar *opt_l;
+ const gchar *opt_s;
+ const gchar *opt_l;
void (*func)(const gchar *text, GIOChannel *channel, gpointer data);
gboolean needs_extra;
gboolean prefer_command_line;
- gchar *parameter;
- gchar *description;
+ const gchar *parameter;
+ const gchar *description;
};
static RemoteCommandEntry remote_commands[] = {
struct _hard_coded_window_keys {
GdkModifierType mask; /**< modifier key mask */
guint key_value; /**< GDK_keyval */
- gchar *text; /**< menu item label - NULL if end of list */
+ const gchar *text; /**< menu item label - NULL if end of list */
};
#endif
* string exec string and use results for command line
* !string use text following ! as command line, replacing optional %s with html file path
*/
-static gchar *html_browsers[] =
+static const gchar *html_browsers[] =
{
/* Our specific script */
GQ_APPNAME_LC "_html_browser", NULL,