elementary/fileselector_button, fileselector_entry, spinner - support language,change...
authorChunEon Park <chuneon.park@samsung.com>
Tue, 23 Apr 2013 13:12:09 +0000 (22:12 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 04:23:32 +0000 (13:23 +0900)
commit f6ac80e64a1d645bb57d2e80ee7789bbbe298e24
Author: ChunEon Park <hermet>@hermet.pe.kr>
Date: Tue Apr 23 21:00:50 2013 +0900

src/lib/elc_fileselector_button.c
src/lib/elc_fileselector_button.h
src/lib/elc_fileselector_entry.c
src/lib/elc_fileselector_entry.h
src/lib/elm_spinner.c
src/lib/elm_spinner.h

index 1b11476..af443db 100644 (file)
@@ -8,8 +8,11 @@ EAPI const char ELM_FILESELECTOR_BUTTON_SMART_NAME[] =
 #define DEFAULT_WINDOW_TITLE "Select a file"
 
 static const char SIG_FILE_CHOSEN[] = "file,chosen";
+static const char SIG_LANG_CHANGED[] = "language,changed";
+
 static const Evas_Smart_Cb_Description _smart_callbacks[] = {
    {SIG_FILE_CHOSEN, "s"},
+   {SIG_LANG_CHANGED, ""},
    {NULL, NULL}
 };
 
@@ -19,6 +22,13 @@ EVAS_SMART_SUBCLASS_NEW
   elm_button_smart_class_get, _smart_callbacks);
 
 static Eina_Bool
+_elm_fileselector_button_smart_translate(Evas_Object *obj)
+{
+   evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
+   return EINA_TRUE;
+}
+
+static Eina_Bool
 _elm_fileselector_button_smart_theme(Evas_Object *obj)
 {
    char buf[4096];
@@ -197,6 +207,7 @@ _elm_fileselector_button_smart_set_user(
    ELM_WIDGET_CLASS(sc)->base.del = _elm_fileselector_button_smart_del;
 
    ELM_WIDGET_CLASS(sc)->theme = _elm_fileselector_button_smart_theme;
+   ELM_WIDGET_CLASS(sc)->translate = _elm_fileselector_button_smart_translate;
 
    ELM_BUTTON_CLASS(sc)->admits_autorepeat = EINA_FALSE;
 }
index 57afad3..7e5839b 100644 (file)
@@ -36,6 +36,7 @@
  * - @c "file,chosen" - the user has selected a path, whose string
  *   pointer comes as the @c event_info data (a stringshared
  *   string)
+ * - @c "language,changed" - the program's language changed
  *
  * Default text parts of the fileselector_button widget that you can use for
  * are:
index fbc1009..69e8148 100644 (file)
@@ -19,6 +19,8 @@ static const char SIG_SELECTION_COPY[] = "selection,copy";
 static const char SIG_SELECTION_CUT[] = "selection,cut";
 static const char SIG_UNPRESSED[] = "unpressed";
 static const char SIG_FILE_CHOSEN[] = "file,chosen";
+static const char SIG_LANG_CHANGED[] = "language,changed";
+
 static const Evas_Smart_Cb_Description _smart_callbacks[] =
 {
    {SIG_CHANGED, ""},
@@ -34,6 +36,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] =
    {SIG_SELECTION_CUT, ""},
    {SIG_UNPRESSED, ""},
    {SIG_FILE_CHOSEN, "s"},
+   {SIG_LANG_CHANGED, ""},
    {NULL, NULL}
 };
 
@@ -92,6 +95,13 @@ _ACTIVATED_fwd(void *data,
    evas_object_smart_callback_call(data, SIG_ACTIVATED, event_info);
 }
 
+static Eina_Bool
+_elm_fileselector_entry_smart_translate(Evas_Object *obj)
+{
+   evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
+   return EINA_TRUE;
+}
+
 static void
 _elm_fileselector_entry_smart_sizing_eval(Evas_Object *obj)
 {
@@ -342,6 +352,7 @@ _elm_fileselector_entry_smart_set_user(Elm_Fileselector_Entry_Smart_Class *sc)
 
    ELM_WIDGET_CLASS(sc)->disable = _elm_fileselector_entry_smart_disable;
    ELM_WIDGET_CLASS(sc)->theme = _elm_fileselector_entry_smart_theme;
+   ELM_WIDGET_CLASS(sc)->translate = _elm_fileselector_entry_smart_translate;
 
    ELM_WIDGET_CLASS(sc)->focus_next = _elm_fileselector_entry_smart_focus_next;
    ELM_WIDGET_CLASS(sc)->focus_direction = NULL;
index 7aa39b3..37b2e1e 100644 (file)
@@ -48,6 +48,7 @@
  * - @c "file,chosen" - The user has selected a path via the file
  *   selector entry's internal file selector, whose string pointer
  *   comes as the @c event_info data (a stringshared string)
+ * - @c "language,changed" - the program's language changed
  *
  * Default text parts of the fileselector_button widget that you can use for
  * are:
index 0e82aa4..3679e89 100644 (file)
@@ -7,9 +7,12 @@ EAPI const char ELM_SPINNER_SMART_NAME[] = "elm_spinner";
 
 static const char SIG_CHANGED[] = "changed";
 static const char SIG_DELAY_CHANGED[] = "delay,changed";
+static const char SIG_LANG_CHANGED[] = "language,changed";
+
 static const Evas_Smart_Cb_Description _smart_callbacks[] = {
    {SIG_CHANGED, ""},
    {SIG_DELAY_CHANGED, ""},
+   {SIG_LANG_CHANGED, ""},
    {NULL, NULL}
 };
 
@@ -17,6 +20,13 @@ EVAS_SMART_SUBCLASS_NEW
   (ELM_SPINNER_SMART_NAME, _elm_spinner, Elm_Spinner_Smart_Class,
   Elm_Layout_Smart_Class, elm_layout_smart_class_get, _smart_callbacks);
 
+static Eina_Bool
+_elm_spinner_smart_translate(Evas_Object *obj)
+{
+   evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL);
+   return EINA_TRUE;
+}
+
 static void
 _entry_show(Elm_Spinner_Smart_Data *sd)
 {
@@ -776,6 +786,7 @@ _elm_spinner_smart_set_user(Elm_Spinner_Smart_Class *sc)
    ELM_LAYOUT_CLASS(sc)->sizing_eval = _elm_spinner_smart_sizing_eval;
 
    ELM_WIDGET_CLASS(sc)->theme = _elm_spinner_smart_theme;
+   ELM_WIDGET_CLASS(sc)->translate = _elm_spinner_smart_translate;
 
    /* access */
    if (_elm_config->access_mode)
index 63324df..c9ea0ee 100644 (file)
@@ -31,6 +31,7 @@
  *    the user.  This will be called only when the user stops dragging
  *    for a very short period or when they release their finger/mouse,
  *    so it avoids possibly expensive reactions to the value change.
+ * - @c "language,changed" - the program's language changed
  *
  * Available styles for it:
  * - @c "default";