Add eek_init().
This commit is contained in:
@ -54,6 +54,7 @@ libeek_private_headers = \
|
|||||||
$(srcdir)/eek-theme-node.h
|
$(srcdir)/eek-theme-node.h
|
||||||
|
|
||||||
libeek_sources = \
|
libeek_sources = \
|
||||||
|
$(srcdir)/eek.c \
|
||||||
$(srcdir)/eek-layout.c \
|
$(srcdir)/eek-layout.c \
|
||||||
$(srcdir)/eek-element.c \
|
$(srcdir)/eek-element.c \
|
||||||
$(srcdir)/eek-container.c \
|
$(srcdir)/eek-container.c \
|
||||||
|
|||||||
14
eek/eek.c
Normal file
14
eek/eek.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "eek.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
eek_init (void)
|
||||||
|
{
|
||||||
|
g_type_init ();
|
||||||
|
|
||||||
|
/* preload Eek* types for EekKeyboard deserialization */
|
||||||
|
g_type_class_ref (EEK_TYPE_KEYBOARD);
|
||||||
|
g_type_class_ref (EEK_TYPE_SECTION);
|
||||||
|
g_type_class_ref (EEK_TYPE_KEY);
|
||||||
|
g_type_class_ref (EEK_TYPE_SYMBOL);
|
||||||
|
g_type_class_ref (EEK_TYPE_KEYSYM);
|
||||||
|
}
|
||||||
@ -32,4 +32,6 @@
|
|||||||
#include "eek-serializable.h"
|
#include "eek-serializable.h"
|
||||||
#include "eek-theme.h"
|
#include "eek-theme.h"
|
||||||
|
|
||||||
|
void eek_init (void);
|
||||||
|
|
||||||
#endif /* EEK_H */
|
#endif /* EEK_H */
|
||||||
|
|||||||
@ -122,12 +122,7 @@ main (int argc, char **argv)
|
|||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* preload Eek* types for EekKeyboard deserialization */
|
eek_init ();
|
||||||
g_type_class_ref (EEK_TYPE_KEYBOARD);
|
|
||||||
g_type_class_ref (EEK_TYPE_SECTION);
|
|
||||||
g_type_class_ref (EEK_TYPE_KEY);
|
|
||||||
g_type_class_ref (EEK_TYPE_SYMBOL);
|
|
||||||
g_type_class_ref (EEK_TYPE_KEYSYM);
|
|
||||||
|
|
||||||
option_context = g_option_context_new ("eekboard-desktop-client");
|
option_context = g_option_context_new ("eekboard-desktop-client");
|
||||||
g_option_context_add_main_entries (option_context, options, NULL);
|
g_option_context_add_main_entries (option_context, options, NULL);
|
||||||
|
|||||||
@ -91,14 +91,9 @@ main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
|
eek_init ();
|
||||||
|
|
||||||
/* preload Eek* types for EekKeyboard deserialization */
|
g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
|
||||||
g_type_class_ref (EEK_TYPE_KEYBOARD);
|
|
||||||
g_type_class_ref (EEK_TYPE_SECTION);
|
|
||||||
g_type_class_ref (EEK_TYPE_KEY);
|
|
||||||
g_type_class_ref (EEK_TYPE_SYMBOL);
|
|
||||||
g_type_class_ref (EEK_TYPE_KEYSYM);
|
|
||||||
|
|
||||||
if (opt_system)
|
if (opt_system)
|
||||||
bus_type = G_BUS_TYPE_SYSTEM;
|
bus_type = G_BUS_TYPE_SYSTEM;
|
||||||
|
|||||||
Reference in New Issue
Block a user