Commit 23cb5af2 authored by Christian Persch's avatar Christian Persch

Split the window, mini-fontsel, search-dialog and settings out of the library. They aren't

generic enough, but currently only useful for gucharmap itself.
Also gets rid of the gconf dependency on libgucharmap.

svn path=/trunk/; revision=1673
parent dbcc3a2f
......@@ -35,14 +35,10 @@ libgucharmap_la_SOURCES = \
gucharmap-codepoint-list.c gucharmap-codepoint-list.h \
gucharmap-init.c gucharmap-init.h \
gucharmap-marshal.c gucharmap-marshal.h \
gucharmap-mini-fontsel.c gucharmap-mini-fontsel.h \
gucharmap-private.h \
gucharmap-private.h \
gucharmap-script-chapters-model.c gucharmap-script-chapters-model.h \
gucharmap-script-codepoint-list.c gucharmap-script-codepoint-list.h \
gucharmap-search-dialog.h gucharmap-search-dialog.c \
gucharmap-settings.h gucharmap-settings.c \
gucharmap-unicode-info.c gucharmap-unicode-info.h \
gucharmap-window.c gucharmap-window.h \
unicode-blocks.h unicode-categories.h unicode-names.h \
unicode-nameslist.h unicode-scripts.h unicode-unihan.h \
$(NULL)
......@@ -58,7 +54,6 @@ libgucharmap_la_CPPFLAGS = \
libgucharmap_la_CFLAGS = \
$(PANGO_CFLAGS) \
$(GTK_CFLAGS) \
$(GCONF_CFLAGS) \
$(WARN_CFLAGS) \
$(AM_CFLAGS)
......@@ -69,7 +64,6 @@ libgucharmap_la_LDFLAGS = \
libgucharmap_la_LIBADD = \
$(GTK_LIBS) \
$(GCONF_LIBS) \
$(INTL_LIBS)
libgucharmapincludedir = $(includedir)/gucharmap-2/gucharmap
......@@ -82,19 +76,25 @@ libgucharmapinclude_HEADERS = \
gucharmap-codepoint-list.h \
gucharmap.h \
gucharmap-init.h \
gucharmap-mini-fontsel.h \
gucharmap-script-chapters-model.h \
gucharmap-script-codepoint-list.h \
gucharmap-search-dialog.h \
gucharmap-settings.h \
gucharmap-types.h \
gucharmap-unicode-info.h \
gucharmap-window.h \
$(NULL)
bin_PROGRAMS = gucharmap
gucharmap_SOURCES = main.c
gucharmap_SOURCES = \
gucharmap-mini-fontsel.c \
gucharmap-mini-fontsel.h \
gucharmap-search-dialog.c \
gucharmap-search-dialog.h \
gucharmap-settings.c \
gucharmap-settings.h \
gucharmap-window.c \
gucharmap-window.h \
main.c \
$(NULL)
gucharmap_CPPFLAGS = \
-I$(top_srcdir) \
......
......@@ -20,7 +20,6 @@
#include <config.h>
#include <glib/gi18n-lib.h>
#include "gucharmap-block-chapters-model.h"
#include "gucharmap-settings.h"
#include "unicode-blocks.h"
#include "gucharmap-private.h"
......
......@@ -19,7 +19,7 @@
#include <config.h>
#include <string.h>
#include <gtk/gtk.h>
#include "gucharmap-settings.h"
#include "gucharmap-unicode-info.h"
#include "gucharmap-chapters-view.h"
#include "gucharmap-private.h"
#include "unicode-blocks.h"
......@@ -255,5 +255,5 @@ gboolean
gucharmap_chapters_view_select_locale (GucharmapChaptersView *view)
{
return gucharmap_chapters_view_select_character (view,
gucharmap_settings_get_locale_character ());
gucharmap_unicode_get_locale_character ());
}
......@@ -27,7 +27,6 @@
#include "gucharmap-charmap.h"
#include "gucharmap-unicode-info.h"
#include "gucharmap-marshal.h"
#include "gucharmap-settings.h"
#include "gucharmap-private.h"
enum
......@@ -39,13 +38,13 @@ enum
enum {
PROP_0,
PROP_CHAPTERS_MODEL
PROP_CHAPTERS_MODEL,
PROP_ACTIVE_CHAPTER,
PROP_ACTIVE_CHARACTER,
};
static guint gucharmap_charmap_signals[NUM_SIGNALS];
gboolean _gucharmap_unicode_has_nameslist_entry (gunichar uc);
static void gucharmap_charmap_class_init (GucharmapCharmapClass *klass);
static void gucharmap_charmap_init (GucharmapCharmap *charmap);
......@@ -65,6 +64,30 @@ gucharmap_charmap_finalize (GObject *object)
G_OBJECT_CLASS (gucharmap_charmap_parent_class)->finalize (object);
}
static void
gucharmap_charmap_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GucharmapCharmap *charmap = GUCHARMAP_CHARMAP (object);
switch (prop_id) {
case PROP_CHAPTERS_MODEL:
g_value_set_object (value, gucharmap_charmap_get_chapters_model (charmap));
break;
case PROP_ACTIVE_CHAPTER:
g_value_take_string (value, gucharmap_chapters_view_get_selected (charmap->chapters_view));
break;
case PROP_ACTIVE_CHARACTER:
g_value_set_uint (value, gucharmap_charmap_get_active_character (charmap));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gucharmap_charmap_set_property (GObject *object,
guint prop_id,
......@@ -77,6 +100,13 @@ gucharmap_charmap_set_property (GObject *object,
case PROP_CHAPTERS_MODEL:
gucharmap_charmap_set_chapters_model (charmap, g_value_get_object (value));
break;
case PROP_ACTIVE_CHAPTER:
gucharmap_chapters_view_set_selected (charmap->chapters_view,
g_value_get_string (value));
break;
case PROP_ACTIVE_CHARACTER:
gucharmap_charmap_set_active_character (charmap, g_value_get_uint (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -88,6 +118,7 @@ gucharmap_charmap_class_init (GucharmapCharmapClass *clazz)
{
GObjectClass *object_class = G_OBJECT_CLASS (clazz);
object_class->get_property = gucharmap_charmap_get_property;
object_class->set_property = gucharmap_charmap_set_property;
object_class->finalize = gucharmap_charmap_finalize;
......@@ -105,11 +136,39 @@ gucharmap_charmap_class_init (GucharmapCharmapClass *clazz)
NULL, NULL, _gucharmap_marshal_VOID__UINT_UINT, G_TYPE_NONE,
2, G_TYPE_UINT, G_TYPE_UINT);
g_object_class_install_property (object_class,
PROP_CHAPTERS_MODEL,
g_param_spec_object ("chapters-model", NULL, NULL,
GUCHARMAP_TYPE_CHAPTERS_MODEL,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
g_object_class_install_property
(object_class,
PROP_CHAPTERS_MODEL,
g_param_spec_object ("chapters-model", NULL, NULL,
GUCHARMAP_TYPE_CHAPTERS_MODEL,
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT |
G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB));
g_object_class_install_property
(object_class,
PROP_ACTIVE_CHAPTER,
g_param_spec_string ("active-chapter", NULL, NULL,
NULL,
G_PARAM_READWRITE |
G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB));
g_object_class_install_property
(object_class,
PROP_ACTIVE_CHARACTER,
g_param_spec_uint ("active-character", NULL, NULL,
0,
UNICHAR_MAX,
0,
G_PARAM_READWRITE |
G_PARAM_STATIC_NAME |
G_PARAM_STATIC_NICK |
G_PARAM_STATIC_BLURB));
}
static void
......@@ -548,13 +607,6 @@ set_details (GucharmapCharmap *charmap,
#endif /* #if ENABLE_UNIHAN */
}
static gboolean
gucharmap_active_char_save (gpointer last_char)
{
gucharmap_settings_set_last_char (GPOINTER_TO_UINT (last_char));
return FALSE;
}
static void
chartable_status_message (GucharmapCharmap *charmap,
const gchar *message)
......@@ -576,11 +628,12 @@ chartable_sync_active_char (GtkWidget *widget,
wc = gucharmap_chartable_get_active_character (charmap->chartable);
/* Forward the notification */
g_object_notify (G_OBJECT (charmap), "active-character");
if (charmap->showing_details_page)
set_details (charmap, wc);
g_idle_add (gucharmap_active_char_save, GUINT_TO_POINTER(wc));
gs = g_string_sized_new (256);
g_string_append_printf (gs, "U+%4.4X %s", wc,
gucharmap_get_unicode_name (wc));
......@@ -634,7 +687,7 @@ follow_if_link (GucharmapCharmap *charmap,
g_signal_emit (charmap, gucharmap_charmap_signals[LINK_CLICKED], 0,
gucharmap_chartable_get_active_character (charmap->chartable),
uc);
gucharmap_charmap_go_to_character (charmap, uc);
gucharmap_charmap_set_active_character (charmap, uc);
break;
}
}
......@@ -825,6 +878,8 @@ chapters_view_selection_changed_cb (GtkTreeSelection *selection,
codepoint_list = gucharmap_chapters_view_get_codepoint_list (charmap->chapters_view);
gucharmap_chartable_set_codepoint_list (charmap->chartable, codepoint_list);
g_object_unref (codepoint_list);
g_object_notify (G_OBJECT (charmap), "active-chapter");
}
static void
......@@ -995,19 +1050,37 @@ gucharmap_charmap_set_font_desc (GucharmapCharmap *charmap,
}
void
gucharmap_charmap_go_to_character (GucharmapCharmap *charmap,
gunichar wc)
gucharmap_charmap_set_active_character (GucharmapCharmap *charmap,
gunichar wc)
{
gboolean status;
/* FIXME: move wc validation up here? */
if (wc > UNICHAR_MAX)
return;
status = gucharmap_chapters_view_select_character (charmap->chapters_view, wc);
if (!status)
if (!gucharmap_chapters_view_select_character (charmap->chapters_view, wc)) {
g_warning ("gucharmap_chapters_view_select_character failed (U+%04X)\n", wc);
return;
}
gucharmap_chartable_set_active_character (charmap->chartable, wc);
}
if (wc <= UNICHAR_MAX)
gucharmap_chartable_set_active_character (charmap->chartable, wc);
gunichar
gucharmap_charmap_get_active_character (GucharmapCharmap *charmap)
{
return gucharmap_chartable_get_active_character (charmap->chartable);
}
void
gucharmap_charmap_set_active_chapter (GucharmapCharmap *charmap,
const gchar *chapter)
{
gucharmap_chapters_view_set_selected (charmap->chapters_view, chapter);
}
char *
gucharmap_charmap_get_active_chapter (GucharmapCharmap *charmap)
{
return gucharmap_chapters_view_get_selected (charmap->chapters_view);
}
/**
......@@ -1026,19 +1099,27 @@ void
gucharmap_charmap_set_chapters_model (GucharmapCharmap *charmap,
GucharmapChaptersModel *model)
{
GObject *object = G_OBJECT (charmap);
gunichar wc;
g_object_freeze_notify (object);
g_object_notify (G_OBJECT (charmap), "chapters-model");
gucharmap_chapters_view_set_model (charmap->chapters_view, model);
if (!model)
if (!model) {
g_object_thaw_notify (object);
return;
}
if (charmap->last_character_set)
if (charmap->last_character_set) {
wc = gucharmap_chartable_get_active_character (charmap->chartable);
else
wc = gucharmap_settings_get_last_char ();
gucharmap_charmap_set_active_character (charmap, wc);
}
gucharmap_charmap_go_to_character (charmap, wc);
charmap->last_character_set = TRUE;
g_object_thaw_notify (object);
}
GucharmapChaptersModel *
......@@ -1060,4 +1141,3 @@ gucharmap_charmap_get_book_codepoint_list (GucharmapCharmap *charmap)
codepoint_list = (GucharmapCodepointList *) gucharmap_chapters_view_get_book_codepoint_list (charmap->chapters_view);
return g_object_ref (codepoint_list);
}
......@@ -46,8 +46,13 @@ GType gucharmap_charmap_get_type (void);
GtkWidget * gucharmap_charmap_new (void);
void gucharmap_charmap_go_to_character (GucharmapCharmap *charmap,
gunichar uc);
void gucharmap_charmap_set_active_character (GucharmapCharmap *charmap,
gunichar uc);
gunichar gucharmap_charmap_get_active_character (GucharmapCharmap *charmap);
void gucharmap_charmap_set_active_chapter (GucharmapCharmap *charmap,
const gchar *chapter);
char * gucharmap_charmap_get_active_chapter (GucharmapCharmap *charmap);
void gucharmap_charmap_set_font (GucharmapCharmap *charmap,
const gchar *font_name);
......
......@@ -21,7 +21,6 @@
#include <glib/gi18n-lib.h>
#include "gucharmap-init.h"
#include "gucharmap-settings.h"
static guint initialization_count;
......@@ -38,8 +37,6 @@ void gucharmap_init (void)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
#endif /* #ifdef ENABLE_NLS */
gucharmap_settings_initialize ();
}
void gucharmap_shutdown (void)
......@@ -48,6 +45,4 @@ void gucharmap_shutdown (void)
if (--initialization_count > 0)
return;
gucharmap_settings_shutdown ();
}
......@@ -23,8 +23,8 @@
#include <stdlib.h>
#include <string.h>
#include "gucharmap-mini-fontsel.h"
#include "gucharmap-marshal.h"
#include "gucharmap-private.h"
#define I_(string) g_intern_static_string (string)
enum
{
......
......@@ -16,15 +16,10 @@
* 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA
*/
#if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION)
#error "Only <gucharmap/gucharmap.h> can be included directly."
#endif
#ifndef GUCHARMAP_MINI_FONTSEL_H
#define GUCHARMAP_MINI_FONTSEL_H
#include <gtk/gtk.h>
#include <gucharmap/gucharmap-types.h>
G_BEGIN_DECLS
......@@ -39,6 +34,34 @@ G_BEGIN_DECLS
#define GUCHARMAP_IS_MINI_FONT_SELECTION(obj) \
G_TYPE_CHECK_INSTANCE_TYPE ((obj), gucharmap_mini_font_selection_get_type ())
typedef struct _GucharmapMiniFontSelection GucharmapMiniFontSelection;
typedef struct _GucharmapMiniFontSelectionClass GucharmapMiniFontSelectionClass;
struct _GucharmapMiniFontSelection
{
GtkHBox parent;
GtkListStore *family_store;
GtkWidget *family; /* combo box */
GtkWidget *bold; /* toggle button*/
GtkWidget *italic; /* toggle button*/
GtkObject *size_adj;
GtkWidget *size; /* spin button */
PangoFontDescription *font_desc;
gint default_size;
};
struct _GucharmapMiniFontSelectionClass
{
GtkHBoxClass parent_class;
void (* changed) (GucharmapMiniFontSelection *fontsel);
};
GType gucharmap_mini_font_selection_get_type (void);
GtkWidget * gucharmap_mini_font_selection_new (void);
gboolean gucharmap_mini_font_selection_set_font_name (GucharmapMiniFontSelection *fontsel,
......
......@@ -26,6 +26,8 @@
/* The last unicode character we support */
#define UNICHAR_MAX (0x0010FFFFUL)
gboolean _gucharmap_unicode_has_nameslist_entry (gunichar uc);
struct _GucharmapChaptersModel
{
......@@ -222,31 +224,6 @@ struct _GucharmapCodepointListClass
};
struct _GucharmapMiniFontSelection
{
GtkHBox parent;
GtkListStore *family_store;
GtkWidget *family; /* combo box */
GtkWidget *bold; /* toggle button*/
GtkWidget *italic; /* toggle button*/
GtkObject *size_adj;
GtkWidget *size; /* spin button */
PangoFontDescription *font_desc;
gint default_size;
};
struct _GucharmapMiniFontSelectionClass
{
GtkHBoxClass parent_class;
void (* changed) (GucharmapMiniFontSelection *fontsel);
};
struct _GucharmapScriptChaptersModel
{
GucharmapChaptersModel parent;
......@@ -269,31 +246,14 @@ struct _GucharmapScriptCodepointListClass
};
struct _GucharmapSearchDialog
{
GtkDialog parent;
};
struct _GucharmapSearchDialogClass
{
GtkDialogClass parent_class;
/* signals */
void (* search_start) (void);
void (* search_finish) (gunichar found_char);
};
struct _GucharmapWindow
struct _GucharmapFontCodepointList
{
GtkWindow parent;
GucharmapCodepointList parent;
GucharmapCharmap *charmap;
PangoCoverage *coverage;
};
struct _GucharmapWindowClass
struct _GucharmapFontCodepointListClass
{
GtkWindowClass parent_class;
GucharmapCodepointListClass parent_class;
};
GdkCursor * _gucharmap_window_progress_cursor (void);
......@@ -26,7 +26,6 @@
#include "gucharmap-unicode-info.h"
#include "gucharmap-script-chapters-model.h"
#include "gucharmap-script-codepoint-list.h"
#include "gucharmap-settings.h"
#include "gucharmap-private.h"
static void
......
......@@ -23,12 +23,11 @@
#include <string.h>
#include "gucharmap-search-dialog.h"
#include "gucharmap-window.h"
#include "gucharmap-unicode-info.h"
#include "gucharmap-marshal.h"
#include "gucharmap-private.h"
#define GUCHARMAP_SEARCH_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), gucharmap_search_dialog_get_type (), GucharmapSearchDialogPrivate))
#define I_(string) g_intern_static_string (string)
enum
{
SEARCH_START,
......
......@@ -18,21 +18,34 @@
/* GucharmapSearchDialog handles all aspects of searching */
#if !defined (__GUCHARMAP_GUCHARMAP_H_INSIDE__) && !defined (GUCHARMAP_COMPILATION)
#error "Only <gucharmap/gucharmap.h> can be included directly."
#endif
#ifndef GUCHARMAP_SEARCH_DIALOG_H
#define GUCHARMAP_SEARCH_DIALOG_H
#include <gtk/gtk.h>
#include <gucharmap/gucharmap-types.h>
#include <gucharmap/gucharmap-window.h>
#include <gucharmap/gucharmap.h>
#include "gucharmap-window.h"
G_BEGIN_DECLS
#define GUCHARMAP_SEARCH_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), gucharmap_search_dialog_get_type (), GucharmapSearchDialog))
typedef struct _GucharmapSearchDialog GucharmapSearchDialog;
typedef struct _GucharmapSearchDialogClass GucharmapSearchDialogClass;
struct _GucharmapSearchDialog
{
GtkDialog parent;
};
struct _GucharmapSearchDialogClass
{
GtkDialogClass parent_class;
/* signals */
void (* search_start) (void);
void (* search_finish) (gunichar found_char);
};
typedef enum
{
GUCHARMAP_DIRECTION_BACKWARD = -1,
......
......@@ -24,46 +24,22 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
#include "gucharmap-chapters-model.h"
#include <gucharmap/gucharmap.h>
#include "gucharmap-settings.h"
#include "gucharmap-private.h"
#if HAVE_GCONF
#include <gconf/gconf-client.h>
static GConfClient *client;
#endif
/* The last unicode character we support */
/* keep in sync with gucharmap-private.h! */
#define UNICHAR_MAX (0x0010FFFFUL)
#define WINDOW_STATE_TIMEOUT 1000 /* ms */
#define GCONF_PREFIX "/apps/gucharmap"
static gunichar
get_first_non_underscore_char (const char *str)
{
const char *p;
if (!str)
return 0;
for (p = str; p && *p; p = g_utf8_find_next_char (p, NULL))
{
gunichar ch;
ch = g_utf8_get_char (p);
if (g_unichar_isalpha (ch))
return ch;
}
return 0;
}
gunichar
gucharmap_settings_get_locale_character (void)
{
return get_first_non_underscore_char (_("_File")); /* use a super-common string */
}
static GucharmapChaptersMode
get_default_chapters_mode (void)
{
......@@ -178,13 +154,13 @@ gucharmap_settings_get_last_char (void)
guint64 value;
if (!gucharmap_settings_initialized ()) {
return gucharmap_settings_get_locale_character ();
return gucharmap_unicode_get_locale_character ();
}
str = gconf_client_get_string (client, GCONF_PREFIX"/last_char", NULL);
if (!str || !g_str_has_prefix (str, "U+")) {
g_free (str);
return gucharmap_settings_get_locale_character ();
return gucharmap_unicode_get_locale_character ();
}
endptr = NULL;
......@@ -192,7 +168,7 @@ gucharmap_settings_get_last_char (void)
value = g_ascii_strtoull (str + 2 /* skip the "U+" */, &endptr, 16);
if (errno || endptr == str || value > UNICHAR_MAX) {
g_free (str);
return gucharmap_settings_get_locale_character ();
return gucharmap_unicode_get_locale_character ();
}
return (gunichar) value;
......@@ -285,7 +261,7 @@ gucharmap_settings_set_font (gchar *fontname)
gunichar
gucharmap_settings_get_last_char (void)
{
return gucharmap_settings_get_locale_character ();
return gucharmap_unicode_get_locale_character ();
}
void
......
......@@ -37,8 +37,6 @@ gboolean gucharmap_settings_get_snap_pow2 (void);
void gucharmap_settings_set_snap_pow2 (gboolean snap_pow2);
void gucharmap_settings_add_window (GtkWindow *window);
gunichar gucharmap_settings_get_locale_character (void);
G_END_DECLS
#endif /* #ifndef GUCHARMAP_SETTINGS_H */
......@@ -24,21 +24,12 @@
#ifndef GUCHARMAP_TYPES_H
#define GUCHARMAP_TYPES_H
typedef struct _GucharmapWindow GucharmapWindow;
typedef struct _GucharmapWindowClass GucharmapWindowClass;
typedef struct _GucharmapSearchDialog GucharmapSearchDialog;
typedef struct _GucharmapSearchDialogClass GucharmapSearchDialogClass;
typedef struct _GucharmapScriptCodepointList GucharmapScriptCodepointList;
typedef struct _GucharmapScriptCodepointListClass GucharmapScriptCodepointListClass;
typedef struct _GucharmapScriptChaptersModel GucharmapScriptChaptersModel;
typedef struct _GucharmapScriptChaptersModelClass GucharmapScriptChaptersModelClass;
typedef struct _GucharmapMiniFontSelection GucharmapMiniFontSelection;
typedef struct _GucharmapMiniFontSelectionClass GucharmapMiniFontSelectionClass;
typedef struct _GucharmapCodepointList GucharmapCodepointList;
typedef struct _GucharmapCodepointListClass GucharmapCodepointListClass;
......
......@@ -313,8 +313,6 @@ get_nameslist (gunichar uc)
return NULL;
}
gboolean _gucharmap_unicode_has_nameslist_entry (gunichar uc);
gboolean
_gucharmap_unicode_has_nameslist_entry (gunichar uc)
{
......@@ -582,3 +580,40 @@ gucharmap_unichar_isgraph (gunichar uc)
&& t != G_UNICODE_SPACE_SEPARATOR);
}
static gunichar
get_first_non_underscore_char (const char *str)
{
const char *p;
if (!str)
return 0;
for (p = str; p && *p; p = g_utf8_find_next_char (p, NULL))
{
gunichar ch;
ch = g_utf8_get_char (p);
if (g_unichar_isalpha (ch))
return ch;
}
return 0;
}
/**
* gucharmap_unicode_get_locale_character:
*
* Determines a character that's commonly used in the current
* locale's script.
*
* Returns: a unicode character
*/
gunichar
gucharmap_unicode_get_locale_character (void)
{
GtkStockItem item;
if (!gtk_stock_lookup (GTK_STOCK_FILE, &item))
return 0;
return get_first_non_underscore_char (item.label);
}
......@@ -58,6 +58,9 @@ gboolean gucharmap_unichar_isgraph (gunichar wc)
G_CONST_RETURN gchar ** gucharmap_unicode_list_scripts (void);
G_CONST_RETURN gchar * gucharmap_unicode_get_script_for_char (gunichar wc);
/* doesn't really belong here, but no better place was available */