diff -ur src-old/choices.c src/choices.c --- src-old/choices.c 2007-12-06 20:19:28.000000000 +0100 +++ src/choices.c 2009-03-30 20:11:35.000000000 +0200 @@ -89,7 +89,7 @@ while (*cdir) { - guchar *path; + gchar *path; path = g_strconcat(*cdir, "/", dir, NULL); if (exists(path)) @@ -123,7 +123,7 @@ * The return values may be NULL - use built-in defaults. * g_free() the result. */ -guchar *choices_find_path_load(char *leaf, char *dir) +gchar *choices_find_path_load(char *leaf, char *dir) { gchar **cdir = dir_list; @@ -153,7 +153,7 @@ * * g_free() the result. */ -guchar *choices_find_path_save(char *leaf, char *dir, gboolean create) +gchar *choices_find_path_save(char *leaf, char *dir, gboolean create) { gchar *path, *retval; diff -ur src-old/choices.h src/choices.h --- src-old/choices.h 2007-10-04 21:08:31.000000000 +0200 +++ src/choices.h 2009-03-30 20:07:51.000000000 +0200 @@ -12,7 +12,7 @@ void choices_init (void); GPtrArray *choices_list_dirs (char *dir); void choices_free_list (GPtrArray *list); -guchar *choices_find_path_load(char *leaf, char *dir); -guchar *choices_find_path_save(char *leaf, char *dir, gboolean create); +gchar *choices_find_path_load(char *leaf, char *dir); +gchar *choices_find_path_save(char *leaf, char *dir, gboolean create); #endif /* _CHOICES_H */ diff -ur src-old/dpms.c src/dpms.c --- src-old/dpms.c 2007-10-04 21:08:31.000000000 +0200 +++ src/dpms.c 2009-03-30 21:48:48.000000000 +0200 @@ -32,12 +32,12 @@ if (!DPMSQueryExtension(dpy, &event, &error)) { - g_warning(_("DPMS extension not supported")); + g_warning("%s", _("DPMS extension not supported")); return FALSE; } if (!DPMSCapable(dpy)) { - g_warning(_("Display not capable of DPMS")); + g_warning("%s", _("Display not capable of DPMS")); return FALSE; } return TRUE; @@ -52,20 +52,20 @@ if (standby < 10 || suspend < 10 || off < 10) { - g_warning(_("DPMS timeout under 10 seconds, rounding up")); + g_warning("%s", _("DPMS timeout under 10 seconds, rounding up")); if (standby < 10) standby = 10; if (suspend < 10) suspend = 10; if (off < 10) off = 10; } if (!DPMSGetTimeouts(dpy, &old_standby, &old_suspend, &old_off)) { - g_warning(_("Unable to read previous DPMS timeouts")); + g_warning("%s", _("Unable to read previous DPMS timeouts")); old_standby = old_suspend = old_off = 0; } if (old_standby != standby || old_suspend != suspend || old_off != off) { if (!DPMSSetTimeouts(dpy, standby, suspend, off)) - g_warning(_("Unable to set DPMS timeouts")); + g_warning("%s", _("Unable to set DPMS timeouts")); } } @@ -78,13 +78,13 @@ return; if (!DPMSInfo(dpy, &old_power, &old_enabled)) { - g_warning(_("Unable to get DPMS state")); + g_warning("%s", _("Unable to get DPMS state")); old_enabled = ! enable; } if (old_enabled != enable) { if (!(enable ? DPMSEnable(dpy) : DPMSDisable(dpy))) - g_warning(_("Unable to set DPMS state")); + g_warning("%s", _("Unable to set DPMS state")); } } diff -ur src-old/i18n.c src/i18n.c --- src-old/i18n.c 2007-10-04 21:08:31.000000000 +0200 +++ src/i18n.c 2009-03-30 21:45:35.000000000 +0200 @@ -46,9 +46,9 @@ static GtkWidget *i18n_message = NULL; /* Static Prototypes */ -static void set_trans(const guchar *lang); +static void set_trans(const gchar *lang); static void trans_changed(void); -static GList *build_i18n_message(Option *option, xmlNode *node, guchar *label); +static GList *build_i18n_message(Option *option, xmlNode *node, gchar *label); /**************************************************************** * EXTERNAL INTERFACE * @@ -88,10 +88,10 @@ /* Load the 'Messages/.gmo' translation. * Special values 'None' and 'From LANG' are also allowed. */ -static void set_trans(const guchar *lang) +static void set_trans(const gchar *lang) { struct stat info; - guchar *path; + gchar *path; gchar *lang2 = NULL; g_return_if_fail(lang != NULL); @@ -124,7 +124,7 @@ g_free(path); } -static GList *build_i18n_message(Option *option, xmlNode *node, guchar *label) +static GList *build_i18n_message(Option *option, xmlNode *node, gchar *label) { GtkWidget *hbox, *image, *align; diff -ur src-old/log.c src/log.c --- src-old/log.c 2007-10-04 21:08:31.000000000 +0200 +++ src/log.c 2009-03-30 21:46:02.000000000 +0200 @@ -75,7 +75,7 @@ GdkInputCondition condition); static gint log_clicked(GtkWidget *text, GdkEventButton *bev, gpointer data); static void log_msg(const gchar *text, gint len); -static GList *show_log(Option *option, xmlNode *node, guchar *label); +static GList *show_log(Option *option, xmlNode *node, gchar *label); void show_message_log(void); static void log_own_errors(const gchar *log_domain, GLogLevelFlags log_level, @@ -366,7 +366,7 @@ g_print("%s\n", message); } -static void write_stderr(guchar *buffer, int len) +static void write_stderr(gchar *buffer, int len) { int pos = 0, sent; @@ -391,7 +391,7 @@ gint source, GdkInputCondition condition) { - guchar buffer[BUFFER_SIZE]; + gchar buffer[BUFFER_SIZE]; int got; got = read(source, buffer, BUFFER_SIZE); @@ -503,7 +503,7 @@ return 1; } -static GList *show_log(Option *option, xmlNode *node, guchar *label) +static GList *show_log(Option *option, xmlNode *node, gchar *label) { GtkWidget *button, *align; diff -ur src-old/main.c src/main.c --- src-old/main.c 2008-03-28 23:21:14.000000000 +0100 +++ src/main.c 2009-03-30 20:10:58.000000000 +0200 @@ -103,14 +103,14 @@ }; #endif -guchar *app_dir; +gchar *app_dir; int main(int argc, char **argv) { gboolean wait_mode = FALSE; gboolean messages = FALSE; gboolean no_xkb = FALSE; - guchar *rc_file; + gchar *rc_file; app_dir = g_strdup(getenv("APP_DIR")); @@ -227,7 +227,7 @@ void login_failure(int error) { GString *message; - guchar *login; + gchar *login; login = choices_find_path_load("Login", "ROX-Session"); if (!login) diff -ur src-old/main.h src/main.h --- src-old/main.h 2007-10-04 21:08:31.000000000 +0200 +++ src/main.h 2009-03-30 20:05:01.000000000 +0200 @@ -9,7 +9,7 @@ #define _MAIN_H extern int number_of_windows; -extern guchar *app_dir; +extern gchar *app_dir; extern gboolean test_mode; /* Prototypes */ diff -ur src-old/options.c src/options.c --- src-old/options.c 2007-10-04 21:08:31.000000000 +0200 +++ src/options.c 2009-03-30 21:50:41.000000000 +0200 @@ -132,18 +132,18 @@ static void load_options(xmlDoc *doc); static gboolean check_anything_changed(void); -static GList *build_label(Option *option, xmlNode *node, guchar *label); -static GList *build_spacer(Option *option, xmlNode *node, guchar *label); -static GList *build_frame(Option *option, xmlNode *node, guchar *label); - -static GList *build_toggle(Option *option, xmlNode *node, guchar *label); -static GList *build_slider(Option *option, xmlNode *node, guchar *label); -static GList *build_entry(Option *option, xmlNode *node, guchar *label); -static GList *build_numentry(Option *option, xmlNode *node, guchar *label); -static GList *build_radio_group(Option *option, xmlNode *node, guchar *label); -static GList *build_colour(Option *option, xmlNode *node, guchar *label); -static GList *build_menu(Option *option, xmlNode *node, guchar *label); -static GList *build_font(Option *option, xmlNode *node, guchar *label); +static GList *build_label(Option *option, xmlNode *node, gchar *label); +static GList *build_spacer(Option *option, xmlNode *node, gchar *label); +static GList *build_frame(Option *option, xmlNode *node, gchar *label); + +static GList *build_toggle(Option *option, xmlNode *node, gchar *label); +static GList *build_slider(Option *option, xmlNode *node, gchar *label); +static GList *build_entry(Option *option, xmlNode *node, gchar *label); +static GList *build_numentry(Option *option, xmlNode *node, gchar *label); +static GList *build_radio_group(Option *option, xmlNode *node, gchar *label); +static GList *build_colour(Option *option, xmlNode *node, gchar *label); +static GList *build_menu(Option *option, xmlNode *node, gchar *label); +static GList *build_font(Option *option, xmlNode *node, gchar *label); /**************************************************************** * EXTERNAL INTERFACE * @@ -210,7 +210,7 @@ */ void option_check_widget(Option *option) { - guchar *new = NULL; + gchar *new = NULL; if (updating_widgets) return; /* Not caused by the user... */ @@ -493,11 +493,11 @@ /* These are used during parsing... */ static xmlDocPtr options_doc = NULL; -#define DATA(node) (xmlNodeListGetString(options_doc, node->xmlChildrenNode, 1)) +#define DATA(node) (gchar*)(xmlNodeListGetString(options_doc, node->xmlChildrenNode, 1)) static void may_add_tip(GtkWidget *widget, xmlNode *element) { - guchar *data, *tip; + gchar *data, *tip; data = DATA(element); if (!data) @@ -511,12 +511,13 @@ } /* Returns zero if attribute is not present */ -static int get_int(xmlNode *node, guchar *attr) +static int get_int(xmlNode *node, gchar *attr) { - guchar *txt; + gchar *txt; int retval; + guchar* my_attr = (guchar *)attr; - txt = xmlGetProp(node, attr); + txt = (gchar*)xmlGetProp(node, my_attr); if (!txt) return 0; @@ -541,7 +542,7 @@ g_return_if_fail(node != NULL); g_return_if_fail(widget != NULL); - name = xmlGetProp(node, "sizegroup"); + name = xmlGetProp(node, (xmlChar*)"sizegroup"); if (!name) return; @@ -570,9 +571,9 @@ { GtkWidget *button; GtkRadioButton *prev_button = (GtkRadioButton *) prev; - guchar *label; + gchar *label; - label = xmlGetProp(radio, "label"); + label = (gchar*)xmlGetProp(radio, (xmlChar*)"label"); button = gtk_radio_button_new_with_label( prev_button ? gtk_radio_button_get_group(prev_button) @@ -583,7 +584,7 @@ may_add_tip(button, radio); g_object_set_data(G_OBJECT(button), "value", - xmlGetProp(radio, "value")); + xmlGetProp(radio, (xmlChar*)"value")); return button; } @@ -591,11 +592,11 @@ static void build_menu_item(xmlNode *node, GtkWidget *option_menu) { GtkWidget *item, *menu; - guchar *label; + gchar *label; - g_return_if_fail(strcmp(node->name, "item") == 0); + g_return_if_fail(strcmp((gchar*)node->name, "item") == 0); - label = xmlGetProp(node, "label"); + label = (gchar*)xmlGetProp(node, (xmlChar*)"label"); item = gtk_menu_item_new_with_label(_(label)); g_free(label); @@ -603,18 +604,18 @@ gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_widget_show_all(menu); - g_object_set_data(G_OBJECT(item), "value", xmlGetProp(node, "value")); + g_object_set_data(G_OBJECT(item), "value", xmlGetProp(node, (xmlChar*)"value")); } static void build_widget(xmlNode *widget, GtkWidget *box) { - const char *name = widget->name; + const char *name = (gchar*)widget->name; OptionBuildFn builder; - guchar *oname; + gchar *oname; Option *option; - guchar *label; + gchar *label; - label = xmlGetProp(widget, "label"); + label = (gchar*)xmlGetProp(widget, (xmlChar*)"label"); if (strcmp(name, "hbox") == 0 || strcmp(name, "vbox") == 0) { @@ -641,7 +642,7 @@ return; } - oname = xmlGetProp(widget, "name"); + oname = (gchar*)xmlGetProp(widget, (xmlChar*)"name"); if (oname) { @@ -685,12 +686,12 @@ static void build_section(xmlNode *section, GtkWidget *notebook, GtkTreeStore *tree_store, GtkTreeIter *parent) { - guchar *title = NULL; + gchar *title = NULL; GtkWidget *page; GtkTreeIter iter; xmlNode *widget; - title = xmlGetProp(section, "title"); + title = (gchar*)xmlGetProp(section, (xmlChar*)"title"); page = gtk_vbox_new(FALSE, 4); gtk_container_set_border_width(GTK_CONTAINER(page), 4); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page, NULL); @@ -704,7 +705,7 @@ { if (widget->type == XML_ELEMENT_NODE) { - if (strcmp(widget->name, "section") == 0) + if (strcmp((gchar*)widget->name, "section") == 0) build_section(widget, notebook, tree_store, &iter); else @@ -740,7 +741,7 @@ g_free(path); options = xmlDocGetRootElement(options_doc); - if (strcmp(options->name, "options") == 0) + if (strcmp((gchar*)options->name, "options") == 0) { GtkTreePath *treepath; @@ -928,14 +929,14 @@ /* Given the last radio button in the group, select whichever * radio button matches the given value. */ -static void radio_group_set_value(GtkRadioButton *last, guchar *value) +static void radio_group_set_value(GtkRadioButton *last, gchar *value) { GSList *next; for (next = gtk_radio_button_get_group(last); next; next = next->next) { GtkToggleButton *button = (GtkToggleButton *) next->data; - guchar *val; + gchar *val; val = g_object_get_data(G_OBJECT(button), "value"); g_return_if_fail(val != NULL); @@ -953,7 +954,7 @@ /* Given the last radio button in the group, return a copy of the * value for the selected radio item. */ -static guchar *radio_group_get_value(GtkRadioButton *last) +static gchar *radio_group_get_value(GtkRadioButton *last) { GSList *next; @@ -963,7 +964,7 @@ if (gtk_toggle_button_get_active(button)) { - guchar *val; + gchar *val; val = g_object_get_data(G_OBJECT(button), "value"); g_return_val_if_fail(val != NULL, NULL); @@ -976,7 +977,7 @@ } /* Select this item with this value */ -static void option_menu_set(GtkOptionMenu *om, guchar *value) +static void option_menu_set(GtkOptionMenu *om, gchar *value) { GtkWidget *menu; GList *list, *next; @@ -988,7 +989,7 @@ for (next = list; next; next = next->next) { GObject *item = (GObject *) next->data; - guchar *data; + gchar *data; data = g_object_get_data(item, "value"); g_return_if_fail(data != NULL); @@ -1006,7 +1007,7 @@ } /* Get the value (static) of the selected item */ -static guchar *option_menu_get(GtkOptionMenu *om) +static gchar *option_menu_get(GtkOptionMenu *om) { GtkWidget *menu, *item; @@ -1067,15 +1068,15 @@ Option *option = (Option *) value; xmlNodePtr tree; - tree = xmlNewTextChild(doc, NULL, "Option", option->value); - xmlSetProp(tree, "name", (gchar *) key); + tree = xmlNewTextChild(doc, NULL, (xmlChar*)"Option", (xmlChar*)option->value); + xmlSetProp(tree, (xmlChar*)"name", (guchar *) key); } static void save_options(void) { xmlDoc *doc; GList *next; - guchar *save, *save_new; + gchar *save, *save_new; save = choices_find_path_save("Options", PROJECT, TRUE); if (!save) @@ -1083,8 +1084,8 @@ save_new = g_strconcat(save, ".new", NULL); - doc = xmlNewDoc("1.0"); - xmlDocSetRootElement(doc, xmlNewDocNode(doc, NULL, "Options", NULL)); + doc = xmlNewDoc((xmlChar*)"1.0"); + xmlDocSetRootElement(doc, xmlNewDocNode(doc, NULL, (xmlChar*)"Options", NULL)); g_hash_table_foreach(option_hash, write_option, xmlDocGetRootElement(doc)); @@ -1184,7 +1185,7 @@ gtk_label_set_text(GTK_LABEL(option->widget), have_font ? option->value - : (guchar *) _("(use default)")); + : _("(use default)")); } static void update_colour(Option *option) @@ -1199,41 +1200,41 @@ * from the widget. */ -static guchar *read_toggle(Option *option) +static gchar *read_toggle(Option *option) { GtkToggleButton *toggle = GTK_TOGGLE_BUTTON(option->widget); return g_strdup_printf("%d", gtk_toggle_button_get_active(toggle)); } -static guchar *read_entry(Option *option) +static gchar *read_entry(Option *option) { return gtk_editable_get_chars(GTK_EDITABLE(option->widget), 0, -1); } -static guchar *read_numentry(Option *option) +static gchar *read_numentry(Option *option) { return g_strdup_printf("%d", (int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(option->widget))); } -static guchar *read_slider(Option *option) +static gchar *read_slider(Option *option) { return g_strdup_printf("%d", (int) gtk_range_get_adjustment(GTK_RANGE(option->widget))->value); } -static guchar *read_radio_group(Option *option) +static gchar *read_radio_group(Option *option) { return radio_group_get_value(GTK_RADIO_BUTTON(option->widget)); } -static guchar *read_menu(Option *option) +static gchar *read_menu(Option *option) { return g_strdup(option_menu_get(GTK_OPTION_MENU(option->widget))); } -static guchar *read_font(Option *option) +static gchar *read_font(Option *option) { GtkToggleButton *active; @@ -1244,7 +1245,7 @@ return g_strdup(gtk_label_get_text(GTK_LABEL(option->widget))); } -static guchar *read_colour(Option *option) +static gchar *read_colour(Option *option) { GtkStyle *style = GTK_BIN(option->widget)->child->style; @@ -1263,10 +1264,10 @@ /* Builders for decorations (no corresponding option) */ -static GList *build_label(Option *option, xmlNode *node, guchar *label) +static GList *build_label(Option *option, xmlNode *node, gchar *label) { GtkWidget *widget; - guchar *text; + gchar *text; int help; g_return_val_if_fail(option == NULL, NULL); @@ -1304,7 +1305,7 @@ return g_list_append(NULL, widget); } -static GList *build_spacer(Option *option, xmlNode *node, guchar *label) +static GList *build_spacer(Option *option, xmlNode *node, gchar *label) { GtkWidget *eb; @@ -1317,7 +1318,7 @@ return g_list_append(NULL, eb); } -static GList *build_frame(Option *option, xmlNode *node, guchar *label) +static GList *build_frame(Option *option, xmlNode *node, gchar *label) { GtkWidget *nbox, *frame, *label_widget; xmlNode *hw; @@ -1355,7 +1356,7 @@ * callbacks. */ -static GList *build_toggle(Option *option, xmlNode *node, guchar *label) +static GList *build_toggle(Option *option, xmlNode *node, gchar *label) { GtkWidget *toggle; @@ -1375,14 +1376,14 @@ return g_list_append(NULL, toggle); } -static GList *build_slider(Option *option, xmlNode *node, guchar *label) +static GList *build_slider(Option *option, xmlNode *node, gchar *label) { GtkAdjustment *adj; GtkWidget *hbox, *slide, *label_wid; int min, max; int fixed; int showvalue; - guchar *end; + gchar *end; g_return_val_if_fail(option != NULL, NULL); @@ -1404,7 +1405,7 @@ add_to_size_group(node, label_wid); } - end = xmlGetProp(node, "end"); + end = (gchar*)xmlGetProp(node, (xmlChar*)"end"); if (end) { gtk_box_pack_end(GTK_BOX(hbox), gtk_label_new(_(end)), @@ -1441,7 +1442,7 @@ return g_list_append(NULL, hbox); } -static GList *build_entry(Option *option, xmlNode *node, guchar *label) +static GList *build_entry(Option *option, xmlNode *node, gchar *label) { GtkWidget *hbox; GtkWidget *entry; @@ -1474,12 +1475,12 @@ return g_list_append(NULL, hbox); } -static GList *build_numentry(Option *option, xmlNode *node, guchar *label) +static GList *build_numentry(Option *option, xmlNode *node, gchar *label) { GtkWidget *hbox; GtkWidget *spin; GtkWidget *label_wid; - guchar *unit; + gchar *unit; int min, max, step, width; g_return_val_if_fail(option != NULL, NULL); @@ -1488,7 +1489,7 @@ max = get_int(node, "max"); step = get_int(node, "step"); width = get_int(node, "width"); - unit = xmlGetProp(node, "unit"); + unit = (gchar*)xmlGetProp(node, (xmlChar*)"unit"); hbox = gtk_hbox_new(FALSE, 4); @@ -1522,7 +1523,7 @@ return g_list_append(NULL, hbox); } -static GList *build_radio_group(Option *option, xmlNode *node, guchar *label) +static GList *build_radio_group(Option *option, xmlNode *node, gchar *label) { GList *list = NULL; GtkWidget *button = NULL; @@ -1579,7 +1580,7 @@ return list; } -static GList *build_colour(Option *option, xmlNode *node, guchar *label) +static GList *build_colour(Option *option, xmlNode *node, gchar *label) { GtkWidget *hbox, *da, *button, *label_wid; @@ -1611,7 +1612,7 @@ return g_list_append(NULL, hbox); } -static GList *build_menu(Option *option, xmlNode *node, guchar *label) +static GList *build_menu(Option *option, xmlNode *node, gchar *label) { GtkWidget *hbox, *om, *option_menu, *label_wid; xmlNode *item; @@ -1649,7 +1650,7 @@ return g_list_append(NULL, hbox); } -static GList *build_font(Option *option, xmlNode *node, guchar *label) +static GList *build_font(Option *option, xmlNode *node, gchar *label) { GtkWidget *hbox, *button; GtkWidget *active = NULL; @@ -1714,21 +1715,22 @@ root = xmlDocGetRootElement(doc); - g_return_if_fail(strcmp(root->name, "Options") == 0); + g_return_if_fail(strcmp((const gchar*)root->name, "Options") == 0); for (node = root->xmlChildrenNode; node; node = node->next) { - gchar *value, *name; + gchar *name; + gchar *value; if (node->type != XML_ELEMENT_NODE) continue; - if (strcmp(node->name, "Option") != 0) + if (strcmp((gchar*)node->name, "Option") != 0) continue; - name = xmlGetProp(node, "name"); + name = (gchar*)xmlGetProp(node, (xmlChar*)"name"); if (!name) continue; - value = xmlNodeGetContent(node); + value = (gchar*)xmlNodeGetContent(node); if (g_hash_table_lookup(loading, name)) g_warning("Duplicate option found!"); diff -ur src-old/options.h src/options.h --- src-old/options.h 2007-10-04 21:08:31.000000000 +0200 +++ src/options.h 2009-03-30 20:50:58.000000000 +0200 @@ -11,18 +11,18 @@ #include typedef void OptionNotify(void); -typedef GList * (*OptionBuildFn)(Option *option, xmlNode *node, guchar *label); +typedef GList * (*OptionBuildFn)(Option *option, xmlNode *node, gchar *label); struct _Option { - guchar *value; + gchar *value; long int_value; gboolean has_changed; - guchar *backup; /* Copy of value to Revert to */ + gchar *backup; /* Copy of value to Revert to */ GtkWidget *widget; /* NULL => No UI yet */ void (*update_widget)(Option *option); - guchar * (*read_widget)(Option *option); + gchar * (*read_widget)(Option *option); }; /* Prototypes */ diff -ur src-old/settings.c src/settings.c --- src-old/settings.c 2008-04-05 00:21:24.000000000 +0200 +++ src/settings.c 2009-03-30 21:39:37.000000000 +0200 @@ -159,7 +159,7 @@ { if (child->type != XML_ELEMENT_NODE) continue; - if (strcmp(child->name, "Setting") != 0) + if (strcmp((gchar*)child->name, "Setting") != 0) continue; set_from_xml(child); @@ -167,9 +167,9 @@ } else { - settings_doc = xmlNewDoc("1.0"); + settings_doc = xmlNewDoc((xmlChar*)"1.0"); xmlDocSetRootElement(settings_doc, - xmlNewDocNode(settings_doc, NULL, "Settings", NULL)); + xmlNewDocNode(settings_doc, NULL, (xmlChar*)"Settings", NULL)); if (manage_xsettings.int_value) { /* Override annoying defaults... */ @@ -188,8 +188,8 @@ xmlNode *node; node = get_node(name, TRUE); - xmlSetProp(node, "value", value); - xmlSetProp(node, "type", "string"); + xmlSetProp(node, (xmlChar*)"value", (xmlChar*)value); + xmlSetProp(node, (xmlChar*)"type", (xmlChar*)"string"); set_from_xml(node); activate_changes(); @@ -461,9 +461,9 @@ if (child->type != XML_ELEMENT_NODE) continue; - if (strcmp(child->name, "Setting") != 0) + if (strcmp((gchar*)child->name, "Setting") != 0) continue; - attr_name = xmlGetProp(child, "name"); + attr_name = (gchar*)xmlGetProp(child, (xmlChar*)"name"); if (!attr_name) { g_warning("Malformed "); @@ -479,8 +479,8 @@ if (!create_if_missing) return NULL; - child = xmlNewDocNode(settings_doc, NULL, "Setting", NULL); - xmlSetProp(child, "name", name); + child = xmlNewDocNode(settings_doc, NULL, (xmlChar*)"Setting", NULL); + xmlSetProp(child, (xmlChar*)"name", (xmlChar*)name); xmlAddChild(root, child); return child; } @@ -509,8 +509,8 @@ str = g_strdup_printf("%d", value); node = get_node(name, TRUE); - xmlSetProp(node, "value", str); - xmlSetProp(node, "type", "int"); + xmlSetProp(node, (xmlChar*)"value", (xmlChar*)str); + xmlSetProp(node, (xmlChar*)"type", (xmlChar*)"int"); g_free(str); @@ -583,7 +583,7 @@ ROX_XSETTINGS_NS, "GetSetting")) { DBusMessage *reply; - char *type, *value; + guchar *type, *value; xmlNode *node; if (!dbus_message_get_args(message, error, @@ -597,8 +597,8 @@ return dbus_message_new_error(message, MISSING_SETTING_ERROR, "Missing setting"); - type = xmlGetProp(node, "type"); - value = xmlGetProp(node, "value"); + type = xmlGetProp(node, (xmlChar*)"type"); + value = xmlGetProp(node, (xmlChar*)"value"); if (type && value) { reply = dbus_message_new_method_return(message); @@ -628,7 +628,7 @@ g_warning("ROX-Session is no longer the XSETTINGS manager!"); } -static void set_setting(char *name, char *value, char *type) +static void set_setting(gchar *name, gchar *value, gchar *type) { g_return_if_fail(name && type && value); @@ -665,13 +665,13 @@ static void set_from_xml(xmlNode *setting) { - char *name, *value, *type; + gchar *name, *value, *type; g_return_if_fail(!manage_xsettings.int_value || xsettings_manager != NULL); - name = xmlGetProp(setting, "name"); - type = xmlGetProp(setting, "type"); - value = xmlGetProp(setting, "value"); + name = (gchar*)xmlGetProp(setting, (xmlChar*)"name"); + type = (gchar*)xmlGetProp(setting, (xmlChar*)"type"); + value = (gchar*)xmlGetProp(setting, (xmlChar*)"value"); set_setting(name, value, type); diff -ur src-old/xkb.c src/xkb.c --- src-old/xkb.c 2007-10-04 21:08:31.000000000 +0200 +++ src/xkb.c 2009-03-30 21:41:45.000000000 +0200 @@ -112,7 +112,7 @@ if (delay <= 0) delay = 1; if (!XkbSetAutoRepeatRate(GDK_DISPLAY(), XkbUseCoreKbd, delay, interval)) - g_warning(_("Failed to set auto repeat rate/interval")); + g_warning("%s", _("Failed to set auto repeat rate/interval")); } else { @@ -131,7 +131,7 @@ /* get key state using XKB */ if (XkbGetIndicatorState (GDK_DISPLAY(), XkbUseCoreKbd, &states) != Success) - g_warning (_("error in reading keyboard indicator states")); + g_warning ("%s", _("error in reading keyboard indicator states")); return (states & code) ? TRUE : FALSE; } @@ -145,7 +145,7 @@ KeyCode code = XKeysymToKeycode(GDK_DISPLAY(), keysym); if (!XTestFakeKeyEvent (GDK_DISPLAY(), code, True, CurrentTime) || !XTestFakeKeyEvent (GDK_DISPLAY(), code, False, CurrentTime)) - g_warning (_("error while sending fake key events")); + g_warning ("%s", _("error while sending fake key events")); } }