gucharmap r1639 - trunk/gucharmap



Author: chpe
Date: Fri Mar 21 10:48:21 2008
New Revision: 1639
URL: http://svn.gnome.org/viewvc/gucharmap?rev=1639&view=rev

Log:
Add a way to select the chapter by locale.


Modified:
   trunk/gucharmap/Makefile.am
   trunk/gucharmap/gucharmap-chapters-model.c
   trunk/gucharmap/gucharmap-chapters-view.c
   trunk/gucharmap/gucharmap-chapters-view.h
   trunk/gucharmap/gucharmap-settings.c
   trunk/gucharmap/gucharmap-settings.h
   trunk/gucharmap/gucharmap.h

Modified: trunk/gucharmap/Makefile.am
==============================================================================
--- trunk/gucharmap/Makefile.am	(original)
+++ trunk/gucharmap/Makefile.am	Fri Mar 21 10:48:21 2008
@@ -71,17 +71,14 @@
 	$(GCONF_LIBS)	\
 	$(INTL_LIBS)
 
-libgucharmapmainincludedir = $(includedir)/gucharmap-2
-libgucharmapmaininclude_HEADERS = \
-	gucharmap.h \
-	$(NULL)
-
 libgucharmapincludedir = $(includedir)/gucharmap-2/gucharmap
 libgucharmapinclude_HEADERS = \
+	gucharmap.h \
 	gucharmap-block-chapters-model.h \
 	gucharmap-chapters-model.h \
 	gucharmap-chapters-view.h \
 	gucharmap-charmap.h \
+	gucharmap-chartable.h \
 	gucharmap-codepoint-list.h \
 	gucharmap-mini-fontsel.h \
 	gucharmap-script-chapters-model.h \

Modified: trunk/gucharmap/gucharmap-chapters-model.c
==============================================================================
--- trunk/gucharmap/gucharmap-chapters-model.c	(original)
+++ trunk/gucharmap/gucharmap-chapters-model.c	Fri Mar 21 10:48:21 2008
@@ -104,8 +104,8 @@
  **/
 gboolean
 gucharmap_chapters_model_character_to_iter (GucharmapChaptersModel *chapters,
-                                      gunichar           wc,
-                                      GtkTreeIter       *iter)
+                                            gunichar           wc,
+                                            GtkTreeIter       *iter)
 {
   g_return_val_if_fail (GUCHARMAP_IS_CHAPTERS_MODEL (chapters), FALSE);
 

Modified: trunk/gucharmap/gucharmap-chapters-view.c
==============================================================================
--- trunk/gucharmap/gucharmap-chapters-view.c	(original)
+++ trunk/gucharmap/gucharmap-chapters-view.c	Fri Mar 21 10:48:21 2008
@@ -250,3 +250,10 @@
 
   return gucharmap_chapters_model_get_book_codepoint_list (view->model);
 }
+
+gboolean
+gucharmap_chapters_view_select_locale (GucharmapChaptersView *view)
+{
+  return gucharmap_chapters_view_select_character (view,
+                                                   gucharmap_settings_get_locale_character ());
+}

Modified: trunk/gucharmap/gucharmap-chapters-view.h
==============================================================================
--- trunk/gucharmap/gucharmap-chapters-view.h	(original)
+++ trunk/gucharmap/gucharmap-chapters-view.h	Fri Mar 21 10:48:21 2008
@@ -77,6 +77,9 @@
 gchar *            gucharmap_chapters_view_get_selected  (GucharmapChaptersView *view);
 gboolean           gucharmap_chapters_view_set_selected  (GucharmapChaptersView *view,
                                                           const gchar       *name);
+
+gboolean           gucharmap_chapters_view_select_locale (GucharmapChaptersView *view);
+
 G_END_DECLS
 
 #endif /* #ifndef GUCHARMAP_CHAPTERS_VIEW_H */

Modified: trunk/gucharmap/gucharmap-settings.c
==============================================================================
--- trunk/gucharmap/gucharmap-settings.c	(original)
+++ trunk/gucharmap/gucharmap-settings.c	Fri Mar 21 10:48:21 2008
@@ -55,8 +55,8 @@
   return 0;
 }
 
-static gunichar
-get_default_last_char (void)
+gunichar
+gucharmap_settings_get_locale_character (void)
 {
   return get_first_non_underscore_char (_("_File")); /* use a super-common string */
 }
@@ -175,12 +175,12 @@
   gunichar c;
 
   if (!gucharmap_settings_initialized ()) {
-      return get_default_last_char ();
+      return gucharmap_settings_get_locale_character  ();
   }
 
   str = gconf_client_get_string (client, GCONF_PREFIX"/last_char", NULL);
   if (!str) {
-    return get_default_last_char ();
+    return gucharmap_settings_get_locale_character  ();
   }
 
   /* FIXME: use g_ascii_strtoull */
@@ -189,7 +189,7 @@
   if (c > 0 && c < UNICHAR_MAX)
     return c;
 
-  return get_default_last_char ();
+  return gucharmap_settings_get_locale_character  ();
 }
 
 void
@@ -279,7 +279,7 @@
 gunichar
 gucharmap_settings_get_last_char (void)
 {
-  return get_default_last_char ();
+  return gucharmap_settings_get_locale_character  ();
 }
 
 void

Modified: trunk/gucharmap/gucharmap-settings.h
==============================================================================
--- trunk/gucharmap/gucharmap-settings.h	(original)
+++ trunk/gucharmap/gucharmap-settings.h	Fri Mar 21 10:48:21 2008
@@ -37,6 +37,8 @@
 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 */

Modified: trunk/gucharmap/gucharmap.h
==============================================================================
--- trunk/gucharmap/gucharmap.h	(original)
+++ trunk/gucharmap/gucharmap.h	Fri Mar 21 10:48:21 2008
@@ -22,17 +22,17 @@
 
 #define __GUCHARMAP_GUCHARMAP_H_INSIDE__
 
-#include <gucharmap/gucharmap-chartable.h>
+#include <gucharmap/gucharmap-block-chapters-model.h>
+#include <gucharmap/gucharmap-chapters-model.h>
 #include <gucharmap/gucharmap-charmap.h>
-#include <gucharmap/gucharmap-window.h>
-#include <gucharmap/gucharmap-unicode-info.h>
-#include <gucharmap/gucharmap-mini-fontsel.h>
+#include <gucharmap/gucharmap-chartable.h>
 #include <gucharmap/gucharmap-codepoint-list.h>
-#include <gucharmap/gucharmap-script-codepoint-list.h>
-#include <gucharmap/gucharmap-chapters-model.h>
-#include <gucharmap/gucharmap-block-chapters-model.h>
+#include <gucharmap/gucharmap-mini-fontsel.h>
 #include <gucharmap/gucharmap-script-chapters-model.h>
+#include <gucharmap/gucharmap-script-codepoint-list.h>
 #include <gucharmap/gucharmap-search-dialog.h>
+#include <gucharmap/gucharmap-unicode-info.h>
+#include <gucharmap/gucharmap-window.h>
 
 #undef __GUCHARMAP_GUCHARMAP_H_INSIDE__
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]