aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-06-02 01:19:10 +0800
committerChristian Persch <chpe@src.gnome.org>2005-06-02 01:19:10 +0800
commit9bad75b60b731ab75c99b2b8e90cf7ee02321f64 (patch)
tree8382fd921ea359a8949f27803cb3d264ef387ebb /lib/egg
parentcf4acf385ff54b405b0a582aa4bff2f32ff8d89a (diff)
downloadgsoc2013-epiphany-9bad75b60b731ab75c99b2b8e90cf7ee02321f64.tar.gz
gsoc2013-epiphany-9bad75b60b731ab75c99b2b8e90cf7ee02321f64.tar.zst
gsoc2013-epiphany-9bad75b60b731ab75c99b2b8e90cf7ee02321f64.zip
Fix more signed/unsigned problems with gcc 4.0. Patch by Martin
2005-06-01 Christian Persch <chpe@cvs.gnome.org> * lib/egg/egg-editable-toolbar.c: (drag_data_get_cb), (drag_data_received_cb): * lib/egg/egg-toolbar-editor.c: (drag_data_get_cb), (parse_item_list), (egg_toolbar_editor_load_actions): * lib/egg/egg-toolbars-model.c: (egg_toolbars_model_to_xml), (egg_toolbars_model_save), (parse_item_list), (parse_toolbars): * src/ephy-notebook.c: * src/ephy-window.c: Fix more signed/unsigned problems with gcc 4.0. Patch by Martin Kretzschmar, bug #306169.
Diffstat (limited to 'lib/egg')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c8
-rwxr-xr-xlib/egg/egg-toolbar-editor.c11
-rwxr-xr-xlib/egg/egg-toolbars-model.c42
3 files changed, 32 insertions, 29 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 199e9e621..4c3074480 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -249,7 +249,8 @@ drag_data_get_cb (GtkWidget *widget,
}
gtk_selection_data_set (selection_data,
- selection_data->target, 8, target, strlen (target));
+ selection_data->target, 8,
+ (const guchar *)target, strlen (target));
g_free (target);
}
@@ -444,7 +445,8 @@ drag_data_received_cb (GtkWidget *widget,
target = gtk_drag_dest_find_target (widget, context, NULL);
type = egg_toolbars_model_get_item_type (etoolbar->priv->model, target);
- id = egg_toolbars_model_get_item_id (etoolbar->priv->model, type, selection_data->data);
+ id = egg_toolbars_model_get_item_id (etoolbar->priv->model, type,
+ (const char*)selection_data->data);
/* This function can be called for two reasons
*
@@ -480,7 +482,7 @@ drag_data_received_cb (GtkWidget *widget,
pos = gtk_toolbar_get_drop_index (GTK_TOOLBAR (widget), x, y);
toolbar_pos = get_toolbar_position (etoolbar, widget);
- if (data_is_separator (selection_data->data))
+ if (data_is_separator ((const char*)selection_data->data))
{
egg_toolbars_model_add_separator (etoolbar->priv->model,
toolbar_pos, pos);
diff --git a/lib/egg/egg-toolbar-editor.c b/lib/egg/egg-toolbar-editor.c
index 185703819..bd79724a8 100755
--- a/lib/egg/egg-toolbar-editor.c
+++ b/lib/egg/egg-toolbar-editor.c
@@ -366,7 +366,8 @@ drag_data_get_cb (GtkWidget *widget,
}
gtk_selection_data_set (selection_data,
- selection_data->target, 8, target, strlen (target));
+ selection_data->target, 8,
+ (const guchar *)target, strlen (target));
}
static gchar *
@@ -602,12 +603,12 @@ parse_item_list (EggToolbarEditor *t,
{
while (child)
{
- if (xmlStrEqual (child->name, "toolitem"))
+ if (xmlStrEqual (child->name, (const xmlChar*) "toolitem"))
{
xmlChar *name;
- name = xmlGetProp (child, "name");
- egg_toolbar_editor_add_action (t, name);
+ name = xmlGetProp (child, (const xmlChar*) "name");
+ egg_toolbar_editor_add_action (t, (const char*)name);
xmlFree (name);
}
child = child->next;
@@ -675,7 +676,7 @@ egg_toolbar_editor_load_actions (EggToolbarEditor *editor,
while (child)
{
- if (xmlStrEqual (child->name, "available"))
+ if (xmlStrEqual (child->name, (const xmlChar*) "available"))
{
parse_item_list (editor, child->children);
}
diff --git a/lib/egg/egg-toolbars-model.c b/lib/egg/egg-toolbars-model.c
index 0ecfcd193..56f4c8fbf 100755
--- a/lib/egg/egg-toolbars-model.c
+++ b/lib/egg/egg-toolbars-model.c
@@ -113,16 +113,16 @@ egg_toolbars_model_to_xml (EggToolbarsModel *t)
tl = t->priv->toolbars;
xmlIndentTreeOutput = TRUE;
- doc = xmlNewDoc ("1.0");
- doc->children = xmlNewDocNode (doc, NULL, "toolbars", NULL);
+ doc = xmlNewDoc ((const xmlChar*) "1.0");
+ doc->children = xmlNewDocNode (doc, NULL, (const xmlChar*) "toolbars", NULL);
for (l1 = tl->children; l1 != NULL; l1 = l1->next)
{
xmlNodePtr tnode;
EggToolbarsToolbar *toolbar = l1->data;
- tnode = xmlNewChild (doc->children, NULL, "toolbar", NULL);
- xmlSetProp (tnode, "name", toolbar->name);
+ tnode = xmlNewChild (doc->children, NULL, (const xmlChar*) "toolbar", NULL);
+ xmlSetProp (tnode, (const xmlChar*) "name", (const xmlChar*) toolbar->name);
for (l2 = l1->children; l2 != NULL; l2 = l2->next)
{
@@ -131,16 +131,16 @@ egg_toolbars_model_to_xml (EggToolbarsModel *t)
if (item->separator)
{
- node = xmlNewChild (tnode, NULL, "separator", NULL);
+ node = xmlNewChild (tnode, NULL, (const xmlChar*) "separator", NULL);
}
else
{
char *data;
- node = xmlNewChild (tnode, NULL, "toolitem", NULL);
+ node = xmlNewChild (tnode, NULL, (const xmlChar*) "toolitem", NULL);
data = egg_toolbars_model_get_item_data (t, item->type, item->id);
- xmlSetProp (node, "type", item->type);
- xmlSetProp (node, "name", data);
+ xmlSetProp (node, (const xmlChar*) "type", (const xmlChar*) item->type);
+ xmlSetProp (node, (const xmlChar*) "name", (const xmlChar*) data);
g_free (data);
}
}
@@ -217,7 +217,7 @@ egg_toolbars_model_save (EggToolbarsModel *t,
doc = egg_toolbars_model_to_xml (t);
root = xmlDocGetRootElement (doc);
- xmlSetProp (root, "version", version);
+ xmlSetProp (root, (const xmlChar*) "version", (const xmlChar*) version);
safe_save_xml (xml_file, doc);
xmlFreeDoc (doc);
}
@@ -368,31 +368,31 @@ parse_item_list (EggToolbarsModel *t,
{
while (child)
{
- if (xmlStrEqual (child->name, "toolitem"))
+ if (xmlStrEqual (child->name, (const xmlChar*) "toolitem"))
{
xmlChar *name, *type;
char *id;
- name = xmlGetProp (child, "name");
- type = xmlGetProp (child, "type");
+ name = xmlGetProp (child, (const xmlChar*) "name");
+ type = xmlGetProp (child, (const xmlChar*) "type");
if (type == NULL)
{
- type = xmlStrdup (EGG_TOOLBAR_ITEM_TYPE);
+ type = xmlCharStrdup (EGG_TOOLBAR_ITEM_TYPE);
}
if (name != NULL && name[0] != '\0' && type != NULL)
{
- id = egg_toolbars_model_get_item_id (t, type, name);
+ id = egg_toolbars_model_get_item_id (t, (const char*)type, (const char*)name);
if (id != NULL)
{
- egg_toolbars_model_add_item (t, position, -1, id, type);
+ egg_toolbars_model_add_item (t, position, -1, id, (const char*)type);
}
g_free (id);
}
xmlFree (name);
xmlFree (type);
}
- else if (xmlStrEqual (child->name, "separator"))
+ else if (xmlStrEqual (child->name, (const xmlChar*) "separator"))
{
egg_toolbars_model_add_separator (t, position, -1);
}
@@ -428,18 +428,18 @@ parse_toolbars (EggToolbarsModel *t,
{
while (child)
{
- if (xmlStrEqual (child->name, "toolbar"))
+ if (xmlStrEqual (child->name, (const xmlChar*) "toolbar"))
{
xmlChar *name;
xmlChar *style;
int position;
- name = xmlGetProp (child, "name");
- position = egg_toolbars_model_add_toolbar (t, -1, name);
+ name = xmlGetProp (child, (const xmlChar*) "name");
+ position = egg_toolbars_model_add_toolbar (t, -1, (const char*) name);
xmlFree (name);
- style = xmlGetProp (child, "style");
- if (style && xmlStrEqual (style, "icons-only"))
+ style = xmlGetProp (child, (const xmlChar*) "style");
+ if (style && xmlStrEqual (style, (const xmlChar*) "icons-only"))
{
/* FIXME: use toolbar position instead of 0 */
egg_toolbars_model_set_flags (t, 0, EGG_TB_MODEL_ICONS);