Commit bc84d70d authored by Guido Gunther's avatar Guido Gunther Committed by Adrien Plazas
Browse files

HdyFold: Use glib-mkenums

This makes the enums clickable in the HdyLeaflet documentation,
HdyFold usable in GtkBuild and makes the code smaller.
parent 9ad04c4c
......@@ -3,6 +3,7 @@
#include "config.h"
#include "hdy-arrows.h"
#include "hdy-enums.h"
#include "hdy-fold.h"
#include "hdy-leaflet.h"
/*** END file-header ***/
......
......@@ -20,24 +20,3 @@
* Represents the fold of widgets and other objects which can be switched
* between folded and unfolded state on the fly, like HdyLeaflet.
*/
GType
hdy_fold_get_type (void)
{
static volatile gsize hdy_fold_type = 0;
if (g_once_init_enter (&hdy_fold_type)) {
static const GEnumValue values[] = {
{ HDY_FOLD_UNFOLDED, "HDY_FOLD_UNFOLDED", "unfolded" },
{ HDY_FOLD_FOLDED, "HDY_FOLD_FOLDED", "folded" },
{ 0, NULL, NULL },
};
GType type;
type = g_enum_register_static ("HdyFold", values);
g_once_init_leave (&hdy_fold_type, type);
}
return hdy_fold_type;
}
......@@ -12,18 +12,15 @@
#endif
#include <glib-object.h>
#include "hdy-enums.h"
G_BEGIN_DECLS
#define HDY_TYPE_FOLD (hdy_fold_get_type ())
typedef enum {
HDY_FOLD_UNFOLDED,
HDY_FOLD_FOLDED,
} HdyFold;
GType hdy_fold_get_type (void);
G_END_DECLS
#endif /* HDY_FOLD_H */
......@@ -8,6 +8,7 @@ libhandy_resources = gnome.compile_resources(
)
hdy_enum_headers = ['hdy-arrows.h',
'hdy-fold.h',
'hdy-leaflet.h',
]
......
Supports Markdown
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