Commit 85ed0ae1 authored by Johan Dahlin's avatar Johan Dahlin Committed by Johan Dahlin

reviewed by: Tristan

2008-04-03  Johan Dahlin  <jdahlin@async.com.br>

    reviewed by: Tristan

    * gladeui/glade-project.c:
    * gladeui/glade-project.h:

    Add file format to GladeProject and public accessors.


svn path=/trunk/; revision=1766
parent 7f4d6839
2008-04-03 Johan Dahlin <jdahlin@async.com.br>
reviewed by: Tristan
* gladeui/glade-project.c:
* gladeui/glade-project.h:
Add file format to GladeProject and public accessors.
2008-04-03 Tristan Van Berkom <tvb@gnome.org>
* glade-widget, glade-property, glade-gtk (plugin),
......
......@@ -121,6 +121,8 @@ struct _GladeProjectPrivate
*/
time_t mtime; /* last UTC modification time of file, or 0 if it could not be read */
GladeProjectFormat format; /* file format */
};
......@@ -491,7 +493,9 @@ glade_project_init (GladeProject *project)
g_direct_equal,
NULL, g_free);
priv->unsaved_number = glade_id_allocator_allocate (get_unsaved_number_allocator ());
priv->unsaved_number = glade_id_allocator_allocate (get_unsaved_number_allocator ());
priv->format = GLADE_PROJECT_FORMAT_LIBGLADE;
}
static void
......@@ -2437,3 +2441,18 @@ glade_project_get_modified (GladeProject *project)
return project->priv->modified;
}
void
glade_project_set_format (GladeProject *project, GladeProjectFormat format)
{
g_return_if_fail (GLADE_IS_PROJECT (project));
project->priv->format = format;
}
GladeProjectFormat
glade_project_get_format (GladeProject *project)
{
g_return_val_if_fail (GLADE_IS_PROJECT (project), -1);
return project->priv->format;
}
......@@ -4,6 +4,7 @@
#include <gladeui/glade-widget.h>
#include <gladeui/glade-command.h>
#include <gladeui/glade-utils.h>
G_BEGIN_DECLS
......@@ -17,6 +18,13 @@ G_BEGIN_DECLS
typedef struct _GladeProjectPrivate GladeProjectPrivate;
typedef struct _GladeProjectClass GladeProjectClass;
typedef enum
{
GLADE_PROJECT_FORMAT_LIBGLADE,
GLADE_PROJECT_FORMAT_GTKBUILDER
} GladeProjectFormat;
struct _GladeProject
{
GObject parent_instance;
......@@ -158,6 +166,10 @@ void glade_project_set_instance_count (GladeProject *project, guint
gboolean glade_project_get_modified (GladeProject *project);
void glade_project_set_format (GladeProject *project, GladeProjectFormat format);
GladeProjectFormat glade_project_get_format (GladeProject *project);
G_END_DECLS
#endif /* __GLADE_PROJECT_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment