[gnumeric] init: isolate hlink initialization.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] init: isolate hlink initialization.
- Date: Sun, 20 Oct 2013 18:00:41 +0000 (UTC)
commit f1d50f184155bcce85f2ee64db1630f3e13da636
Author: Morten Welinder <terra gnome org>
Date: Sat Oct 19 13:28:39 2013 -0400
init: isolate hlink initialization.
libgnumeric shouldn't have to know the list of possible url types.
ChangeLog | 5 +++++
src/hlink.c | 10 ++++++++++
src/hlink.h | 3 +++
src/libgnumeric.c | 7 +------
4 files changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 71f13a9..498ea1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-19 Morten Welinder <terra gnome org>
+
+ * src/hlink.c (_gnm_hlink_init): New function.
+ * src/libgnumeric.c (gnm_init): Use _gnm_hlink_init.
+
2013-10-07 Morten Welinder <terra gnome org>
* configure.ac: Post-release bump.
diff --git a/src/hlink.c b/src/hlink.c
index 3bff0b6..393f2da 100644
--- a/src/hlink.c
+++ b/src/hlink.c
@@ -312,3 +312,13 @@ gnm_hlink_external_class_init (GObjectClass *object_class)
GSF_CLASS (GnmHLinkExternal, gnm_hlink_external,
gnm_hlink_external_class_init, NULL,
GNM_HLINK_TYPE)
+
+void
+_gnm_hlink_init (void)
+{
+ /* make sure that all hlink types are registered */
+ gnm_hlink_cur_wb_get_type ();
+ gnm_hlink_url_get_type ();
+ gnm_hlink_email_get_type ();
+ gnm_hlink_external_get_type ();
+}
diff --git a/src/hlink.h b/src/hlink.h
index 257d955..dd703b8 100644
--- a/src/hlink.h
+++ b/src/hlink.h
@@ -30,6 +30,9 @@ GType gnm_hlink_url_get_type (void);
GType gnm_hlink_email_get_type (void);
GType gnm_hlink_external_get_type (void);
+/* Protected. */
+void _gnm_hlink_init (void);
+
G_END_DECLS
#endif /* _GNM_HLINK_H_ */
diff --git a/src/libgnumeric.c b/src/libgnumeric.c
index 61c1df9..b346deb 100644
--- a/src/libgnumeric.c
+++ b/src/libgnumeric.c
@@ -260,12 +260,7 @@ gnm_init (void)
print_init ();
gnm_autofill_init ();
sheet_objects_init ();
-
- /* make sure that all hlink types are registered */
- gnm_hlink_cur_wb_get_type ();
- gnm_hlink_url_get_type ();
- gnm_hlink_email_get_type ();
- gnm_hlink_external_get_type ();
+ _gnm_hlink_init ();
/* The statically linked in file formats */
gnm_xml_sax_read_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]