gucharmap r1700 - trunk/gucharmap
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gucharmap r1700 - trunk/gucharmap
- Date: Fri, 21 Mar 2008 10:58:33 +0000 (GMT)
Author: chpe
Date: Fri Mar 21 10:58:33 2008
New Revision: 1700
URL: http://svn.gnome.org/viewvc/gucharmap?rev=1700&view=rev
Log:
Go back to implicit initialisation.
Removed:
trunk/gucharmap/gucharmap-init.h
Modified:
trunk/gucharmap/Makefile.am
trunk/gucharmap/gucharmap-block-chapters-model.c
trunk/gucharmap/gucharmap-charmap.c
trunk/gucharmap/gucharmap-init.c
trunk/gucharmap/gucharmap-mini-fontsel.c
trunk/gucharmap/gucharmap-private.h
trunk/gucharmap/gucharmap-script-chapters-model.c
trunk/gucharmap/gucharmap-script-codepoint-list.c
trunk/gucharmap/gucharmap-unicode-info.c
trunk/gucharmap/gucharmap.h
trunk/gucharmap/main.c
Modified: trunk/gucharmap/Makefile.am
==============================================================================
--- trunk/gucharmap/Makefile.am (original)
+++ trunk/gucharmap/Makefile.am Fri Mar 21 10:58:33 2008
@@ -42,7 +42,6 @@
gucharmap-codepoint-list.c \
gucharmap-codepoint-list.h \
gucharmap-init.c \
- gucharmap-init.h \
gucharmap-marshal.c \
gucharmap-marshal.h \
gucharmap-private.h \
@@ -93,7 +92,6 @@
gucharmap-chartable.h \
gucharmap-codepoint-list.h \
gucharmap.h \
- gucharmap-init.h \
gucharmap-script-chapters-model.h \
gucharmap-script-codepoint-list.h \
gucharmap-types.h \
Modified: trunk/gucharmap/gucharmap-block-chapters-model.c
==============================================================================
--- trunk/gucharmap/gucharmap-block-chapters-model.c (original)
+++ trunk/gucharmap/gucharmap-block-chapters-model.c Fri Mar 21 10:58:33 2008
@@ -128,6 +128,8 @@
{
GucharmapChaptersModelClass *chapters_class = GUCHARMAP_CHAPTERS_MODEL_CLASS (clazz);
+ _gucharmap_intl_ensure_initialized ();
+
chapters_class->title = _("Unicode Block");
chapters_class->character_to_iter = character_to_iter;
chapters_class->get_codepoint_list = get_codepoint_list;
Modified: trunk/gucharmap/gucharmap-charmap.c
==============================================================================
--- trunk/gucharmap/gucharmap-charmap.c (original)
+++ trunk/gucharmap/gucharmap-charmap.c Fri Mar 21 10:58:33 2008
@@ -119,6 +119,8 @@
{
GObjectClass *object_class = G_OBJECT_CLASS (clazz);
+ _gucharmap_intl_ensure_initialized ();
+
object_class->get_property = gucharmap_charmap_get_property;
object_class->set_property = gucharmap_charmap_set_property;
object_class->finalize = gucharmap_charmap_finalize;
Modified: trunk/gucharmap/gucharmap-init.c
==============================================================================
--- trunk/gucharmap/gucharmap-init.c (original)
+++ trunk/gucharmap/gucharmap-init.c Fri Mar 21 10:58:33 2008
@@ -20,15 +20,14 @@
#include <glib/gi18n-lib.h>
-#include "gucharmap-init.h"
+#include "gucharmap-private.h"
-static guint initialization_count;
-
-void gucharmap_init (void)
+G_GNUC_INTERNAL void
+_gucharmap_intl_ensure_initialized (void)
{
- g_return_if_fail (initialization_count == 0);
+ static gboolean initialised = FALSE;
- if (initialization_count++ > 0)
+ if (initialised)
return;
#ifdef ENABLE_NLS
@@ -39,10 +38,3 @@
#endif /* #ifdef ENABLE_NLS */
}
-void gucharmap_shutdown (void)
-{
- g_return_if_fail (initialization_count > 0);
-
- if (--initialization_count > 0)
- return;
-}
Modified: trunk/gucharmap/gucharmap-mini-fontsel.c
==============================================================================
--- trunk/gucharmap/gucharmap-mini-fontsel.c (original)
+++ trunk/gucharmap/gucharmap-mini-fontsel.c Fri Mar 21 10:58:33 2008
@@ -170,8 +170,6 @@
static void
gucharmap_mini_font_selection_class_init (GucharmapMiniFontSelectionClass *clazz)
{
- clazz->changed = NULL;
-
gucharmap_mini_font_selection_signals[CHANGED] =
g_signal_new (I_("changed"), gucharmap_mini_font_selection_get_type (),
G_SIGNAL_RUN_FIRST,
Modified: trunk/gucharmap/gucharmap-private.h
==============================================================================
--- trunk/gucharmap/gucharmap-private.h (original)
+++ trunk/gucharmap/gucharmap-private.h Fri Mar 21 10:58:33 2008
@@ -26,7 +26,9 @@
/* The last unicode character we support */
#define UNICHAR_MAX (0x0010FFFFUL)
-gboolean _gucharmap_unicode_has_nameslist_entry (gunichar uc);
+G_GNUC_INTERNAL void _gucharmap_intl_ensure_initialized (void);
+
+G_GNUC_INTERNAL gboolean _gucharmap_unicode_has_nameslist_entry (gunichar uc);
struct _GucharmapChaptersModel
Modified: trunk/gucharmap/gucharmap-script-chapters-model.c
==============================================================================
--- trunk/gucharmap/gucharmap-script-chapters-model.c (original)
+++ trunk/gucharmap/gucharmap-script-chapters-model.c Fri Mar 21 10:58:33 2008
@@ -127,6 +127,8 @@
{
GucharmapChaptersModelClass *chapters_class = GUCHARMAP_CHAPTERS_MODEL_CLASS (clazz);
+ _gucharmap_intl_ensure_initialized ();
+
chapters_class->title = _("Script");
chapters_class->character_to_iter = character_to_iter;
chapters_class->get_codepoint_list = get_codepoint_list;
Modified: trunk/gucharmap/gucharmap-script-codepoint-list.c
==============================================================================
--- trunk/gucharmap/gucharmap-script-codepoint-list.c (original)
+++ trunk/gucharmap/gucharmap-script-codepoint-list.c Fri Mar 21 10:58:33 2008
@@ -269,6 +269,8 @@
GucharmapCodepointListClass *codepoint_list_class = GUCHARMAP_CODEPOINT_LIST_CLASS (clazz);
GObjectClass *gobject_class = G_OBJECT_CLASS (clazz);
+ _gucharmap_intl_ensure_initialized ();
+
g_type_class_add_private (codepoint_list_class, sizeof (ScriptCodepointListPrivate));
codepoint_list_class->get_char = get_char;
Modified: trunk/gucharmap/gucharmap-unicode-info.c
==============================================================================
--- trunk/gucharmap/gucharmap-unicode-info.c (original)
+++ trunk/gucharmap/gucharmap-unicode-info.c Fri Mar 21 10:58:33 2008
@@ -62,6 +62,8 @@
{
static gchar buf[32];
+ _gucharmap_intl_ensure_initialized ();
+
if ((wc >= 0x3400 && wc <= 0x4DB5)
|| (wc >= 0x4e00 && wc <= 0x9fa5)
|| (wc >= 0x20000 && wc <= 0x2A6D6))
@@ -112,6 +114,8 @@
G_CONST_RETURN gchar *
gucharmap_get_unicode_category_name (gunichar wc)
{
+ _gucharmap_intl_ensure_initialized ();
+
switch (gucharmap_unichar_type (wc))
{
case G_UNICODE_CONTROL: return _("Other, Control");
@@ -349,7 +353,7 @@
return NULL;
}
-gboolean
+G_GNUC_INTERNAL gboolean
_gucharmap_unicode_has_nameslist_entry (gunichar uc)
{
return get_nameslist (uc) != NULL;
Modified: trunk/gucharmap/gucharmap.h
==============================================================================
--- trunk/gucharmap/gucharmap.h (original)
+++ trunk/gucharmap/gucharmap.h Fri Mar 21 10:58:33 2008
@@ -28,7 +28,6 @@
#include <gucharmap/gucharmap-charmap.h>
#include <gucharmap/gucharmap-chartable.h>
#include <gucharmap/gucharmap-codepoint-list.h>
-#include <gucharmap/gucharmap-init.h>
#include <gucharmap/gucharmap-script-chapters-model.h>
#include <gucharmap/gucharmap-script-codepoint-list.h>
#include <gucharmap/gucharmap-unicode-info.h>
Modified: trunk/gucharmap/main.c
==============================================================================
--- trunk/gucharmap/main.c (original)
+++ trunk/gucharmap/main.c Fri Mar 21 10:58:33 2008
@@ -55,7 +55,6 @@
exit (1);
}
- gucharmap_init ();
gucharmap_settings_initialize ();
g_set_application_name (_("Gucharmap"));
@@ -104,7 +103,6 @@
gtk_main ();
gucharmap_settings_shutdown ();
- gucharmap_shutdown ();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]