summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Pablo Ugarte <jpu@src.gnome.org>2006-09-29 15:38:25 +0000
committerJuan Pablo Ugarte <jpu@src.gnome.org>2006-09-29 15:38:25 +0000
commit05c04a83ece42586d725c37689a374443aaf5ece (patch)
treeebcb2524fd3884d8ac47d46a01d63d1484c4cb8f
parentbda0f64207b2cfdfe64daf459e66c8efd2d555b6 (diff)
downloadglade-05c04a83ece42586d725c37689a374443aaf5ece.tar.gz
Renamed every function to avoid namming clash with libglade (now Anjuta 2
* src/glade-parser.[ch]: Renamed every function to avoid namming clash with libglade (now Anjuta 2 can continue with glade3 plugin) * src/glade-project.c: adapted to new functions names.
-rw-r--r--ChangeLog7
-rw-r--r--src/glade-parser.c49
-rw-r--r--src/glade-parser.h30
-rw-r--r--src/glade-project.c10
4 files changed, 48 insertions, 48 deletions
diff --git a/ChangeLog b/ChangeLog
index 95964df5..18c91032 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-09-29 Juan Pablo Ugarte <juanpablougarte@gmail.com>
+
+ * src/glade-parser.[ch]: Renamed every function to avoid namming clash
+ with libglade (now Anjuta 2 can continue with glade3 plugin)
+
+ * src/glade-project.c: adapted to new functions names.
+
2006-09-22 Juan Pablo Ugarte <juanpablougarte@gmail.com>
* src/glade-property-class.c: fixed bug 353126
diff --git a/src/glade-parser.c b/src/glade-parser.c
index 6a9fa038..697bbd68 100644
--- a/src/glade-parser.c
+++ b/src/glade-parser.c
@@ -434,7 +434,7 @@ glade_parser_start_document(GladeParseState *state)
state->widget_depth = 0;
state->content = g_string_sized_new(128);
- state->interface = glade_interface_new ();
+ state->interface = glade_parser_interface_new ();
state->widget = NULL;
state->prop_type = PROP_NONE;
@@ -1117,12 +1117,12 @@ widget_info_free(GladeWidgetInfo *info)
}
/**
- * glade_interface_new
+ * glade_parser_interface_new
*
* Returns a newly allocated GladeInterface.
*/
GladeInterface *
-glade_interface_new ()
+glade_parser_interface_new ()
{
GladeInterface *interface;
interface = g_new0 (GladeInterface, 1);
@@ -1135,13 +1135,13 @@ glade_interface_new ()
}
/**
- * glade_interface_destroy
+ * glade_parser_interface_destroy
* @interface: the GladeInterface structure.
*
* Frees a GladeInterface structure.
*/
void
-glade_interface_destroy(GladeInterface *interface)
+glade_parser_interface_destroy (GladeInterface *interface)
{
gint i;
@@ -1166,7 +1166,7 @@ glade_interface_destroy(GladeInterface *interface)
}
/**
- * glade_parser_parse_file
+ * glade_parser_interface_new_from_file
* @file: the filename of the glade XML file.
* @domain: the translation domain for the XML file.
*
@@ -1180,7 +1180,7 @@ glade_interface_destroy(GladeInterface *interface)
* Returns: the GladeInterface structure for the XML file.
*/
GladeInterface *
-glade_parser_parse_file(const gchar *file, const gchar *domain)
+glade_parser_interface_new_from_file (const gchar *file, const gchar *domain)
{
GladeParseState state = { 0 };
@@ -1202,7 +1202,7 @@ glade_parser_parse_file(const gchar *file, const gchar *domain)
GLADE_UI_ERROR,
_("Errors parsing glade file %s"), file);
if (state.interface)
- glade_interface_destroy (state.interface);
+ glade_parser_interface_destroy (state.interface);
return NULL;
}
if (state.state != PARSER_FINISH) {
@@ -1210,14 +1210,14 @@ glade_parser_parse_file(const gchar *file, const gchar *domain)
GLADE_UI_ERROR,
_("Errors parsing glade file %s"), file);
if (state.interface)
- glade_interface_destroy(state.interface);
+ glade_parser_interface_destroy(state.interface);
return NULL;
}
return state.interface;
}
/**
- * glade_parser_parse_buffer
+ * glade_parser_interface_new_from_buffer
* @buffer: a buffer in memory containing XML data.
* @len: the length of @buffer.
* @domain: the translation domain for the XML file.
@@ -1232,7 +1232,9 @@ glade_parser_parse_file(const gchar *file, const gchar *domain)
* Returns: the GladeInterface structure for the XML buffer.
*/
GladeInterface *
-glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain)
+glade_parser_interface_new_from_buffer (const gchar *buffer,
+ gint len,
+ const gchar *domain)
{
GladeParseState state = { 0 };
@@ -1245,13 +1247,13 @@ glade_parser_parse_buffer(const gchar *buffer, gint len, const gchar *domain)
if (xmlSAXUserParseMemory(&glade_parser, &state, buffer, len) < 0) {
g_warning("document not well formed!");
if (state.interface)
- glade_interface_destroy (state.interface);
+ glade_parser_interface_destroy (state.interface);
return NULL;
}
if (state.state != PARSER_FINISH) {
g_warning("did not finish in PARSER_FINISH state!");
if (state.interface)
- glade_interface_destroy(state.interface);
+ glade_parser_interface_destroy(state.interface);
return NULL;
}
return state.interface;
@@ -1612,7 +1614,7 @@ glade_interface_buffer (GladeInterface *interface,
}
/**
- * glade_interface_dump_full
+ * glade_parser_interface_dump
* @interface: the GladeInterface
* @filename: the filename to write the interface data to.
* @error: a #GError for error handleing.
@@ -1623,7 +1625,9 @@ glade_interface_buffer (GladeInterface *interface,
* Returns whether the write was successfull or not.
*/
gboolean
-glade_interface_dump_full(GladeInterface *interface, const gchar *filename, GError **error)
+glade_parser_interface_dump (GladeInterface *interface,
+ const gchar *filename,
+ GError **error)
{
GIOChannel *fd;
gpointer buffer;
@@ -1650,21 +1654,6 @@ glade_interface_dump_full(GladeInterface *interface, const gchar *filename, GErr
return (retval == G_IO_STATUS_NORMAL) ? TRUE : FALSE;
}
-/**
- * glade_interface_dump
- * @interface: the GladeInterface
- * @filename: the filename to write the interface data to.
- *
- * This function dumps the contents of a GladeInterface into a file as
- * XML. It was originaly intended as a debugging tool.
- */
-void
-glade_interface_dump(GladeInterface *interface, const gchar *filename)
-{
- glade_interface_dump_full(interface, filename, NULL);
-}
-
-
G_CONST_RETURN gchar *
glade_parser_pvalue_from_winfo (GladeWidgetInfo *winfo,
const gchar *pname)
diff --git a/src/glade-parser.h b/src/glade-parser.h
index 75eee2ff..d849161f 100644
--- a/src/glade-parser.h
+++ b/src/glade-parser.h
@@ -129,19 +129,23 @@ struct _GladeInterface {
};
/* the actual functions ... */
-GladeInterface *glade_interface_new (void);
-GladeInterface *glade_parser_parse_file (const gchar *file,
- const gchar *domain);
-GladeInterface *glade_parser_parse_buffer (const gchar *buffer, gint len,
- const gchar *domain);
-void glade_interface_destroy (GladeInterface *interface);
-void glade_interface_dump (GladeInterface *interface,
- const gchar *filename);
-gboolean glade_interface_dump_full (GladeInterface *interface,
- const gchar *filename,
- GError **error);
-G_CONST_RETURN gchar *glade_parser_pvalue_from_winfo (GladeWidgetInfo *winfo,
- const gchar *pname);
+GladeInterface *glade_parser_interface_new (void);
+
+GladeInterface *glade_parser_interface_new_from_file (const gchar *file,
+ const gchar *domain);
+
+GladeInterface *glade_parser_interface_new_from_buffer (const gchar *buffer,
+ gint len,
+ const gchar *domain);
+
+void glade_parser_interface_destroy (GladeInterface *interface);
+
+gboolean glade_parser_interface_dump (GladeInterface *interface,
+ const gchar *filename,
+ GError **error);
+
+G_CONST_RETURN gchar *glade_parser_pvalue_from_winfo (GladeWidgetInfo *winfo,
+ const gchar *pname);
G_END_DECLS
diff --git a/src/glade-project.c b/src/glade-project.c
index 59148dc2..add6cd86 100644
--- a/src/glade-project.c
+++ b/src/glade-project.c
@@ -1391,7 +1391,7 @@ glade_project_write (GladeProject *project)
gchar **strv = NULL;
guint i;
- interface = glade_interface_new ();
+ interface = glade_parser_interface_new ();
if ((required = glade_project_required_libs (project)) != NULL)
{
@@ -1573,7 +1573,7 @@ glade_project_open (const gchar *path)
g_return_val_if_fail (path != NULL, NULL);
if ((interface =
- glade_parser_parse_file (path, NULL)) != NULL)
+ glade_parser_interface_new_from_file (path, NULL)) != NULL)
{
if ((project =
glade_project_new_from_interface (interface,
@@ -1585,7 +1585,7 @@ glade_project_open (const gchar *path)
glade_project_fix_object_props (project);
}
- glade_interface_destroy (interface);
+ glade_parser_interface_destroy (interface);
}
@@ -1656,8 +1656,8 @@ glade_project_save (GladeProject *project, const gchar *path, GError **error)
return FALSE;
}
- ret = glade_interface_dump_full (interface, path, error);
- glade_interface_destroy (interface);
+ ret = glade_parser_interface_dump (interface, path, error);
+ glade_parser_interface_destroy (interface);
canonical_path = glade_util_canonical_path (path);
g_assert (canonical_path);