glade3 r1766 - in trunk: . gladeui
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r1766 - in trunk: . gladeui
- Date: Thu, 3 Apr 2008 21:36:39 +0100 (BST)
Author: johan
Date: Thu Apr 3 21:36:39 2008
New Revision: 1766
URL: http://svn.gnome.org/viewvc/glade3?rev=1766&view=rev
Log:
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.
Modified:
trunk/ChangeLog
trunk/gladeui/glade-project.c
trunk/gladeui/glade-project.h
Modified: trunk/gladeui/glade-project.c
==============================================================================
--- trunk/gladeui/glade-project.c (original)
+++ trunk/gladeui/glade-project.c Thu Apr 3 21:36:39 2008
@@ -121,6 +121,8 @@
*/
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 @@
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 @@
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;
+}
Modified: trunk/gladeui/glade-project.h
==============================================================================
--- trunk/gladeui/glade-project.h (original)
+++ trunk/gladeui/glade-project.h Thu Apr 3 21:36:39 2008
@@ -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 @@
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 @@
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__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]