From: MyoungJune Park Date: Fri, 4 Dec 2015 03:18:34 +0000 (+0900) Subject: remove the unused line for system_settings tutorial X-Git-Tag: tizen_3.0/TD_SYNC/20161201~291 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3677b36773984691206b40bc08e519cc95ad5dd1;p=sdk%2Fonline-doc.git remove the unused line for system_settings tutorial Change-Id: I66be7eff2e2a2de24368e46387d43b82049b63e3 Signed-off-by: MyoungJune Park --- diff --git a/org.tizen.tutorials/html/native/system/system_setting_tutorial_n.htm b/org.tizen.tutorials/html/native/system/system_setting_tutorial_n.htm index 3a7c0ea..392365d 100644 --- a/org.tizen.tutorials/html/native/system/system_setting_tutorial_n.htm +++ b/org.tizen.tutorials/html/native/system/system_setting_tutorial_n.htm @@ -5,13 +5,13 @@ - + - System Settings: Getting Miscellaneous System Settings and Preferences + System Settings: Getting Miscellaneous System Settings and Preferences @@ -25,7 +25,7 @@ +

Related Info

- +

System Settings: Getting Miscellaneous System Settings and Preferences

-

This tutorial demonstrates how you can manage and monitor system settings.

- +

This tutorial demonstrates how you can manage and monitor system settings.

+

Warm-up

-

Become familiar with the System Settings API basics by learning about:

+

Become familiar with the System Settings API basics by learning about:

+

Managing System Settings

@@ -61,14 +61,14 @@
  • Define auxiliary structures:

    -struct 
    +struct
     _ret_type_define
     {
        system_settings_key_e key;
        int returns;
     };
     
    -typedef 
    +typedef
     enum
     {
        _RET_BOO = 0,
    @@ -76,7 +76,7 @@ enum
        _RET_STRING
     } _SYSTEM_SETTINGS_TYPES;
     
    -struct _ret_type_define 
    +struct _ret_type_define
     _ret_type[] =
     {
        {
    @@ -118,7 +118,7 @@ _info_key[SYS_INFO_COUNT]=
     
     
  • Obtain the setting data.

    The available settings are defined in the system_settings_key_e enumerator (in mobile and wearable applications).

    - +

    Read the data using the following functions, according to the data type of the value you want to read:

    • system_settings_get_value_int()
    • @@ -165,10 +165,8 @@ for (i = 0; i < SYS_INFO_COUNT; i++)
    • Monitor changes in the setting values.

      1. To monitor when a system setting value changes, set a callback using the system_settings_set_changed_cb() function with the appropriate key as the first parameter.

        -

        Because the SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE setting does not support the callback function, you must iterate through the SYS_INFO_COUNT - 1 records.

        -
        -for (i = 0; i < SYS_INFO_COUNT - 1; i++)
        +for (i = 0; i < SYS_INFO_COUNT; i++)
         {
            system_settings_set_changed_cb(_ret_type[i].key, _system_settings_changed_cb, 0);
         }
        @@ -178,7 +176,7 @@ for (i = 0; i < SYS_INFO_COUNT - 1; i++)
         

        The system_settings_key_e key refers to the key that has changed.

        -static void 
        +static void
         _system_settings_changed_cb(system_settings_key_e key, void *user_data)
         {
            dlog_print(DLOG_ERROR, LOG_TAG, "Runtime Info changed: %s", _info_key[key]);
        @@ -188,15 +186,15 @@ _system_settings_changed_cb(system_settings_key_e key, void *user_data)
         
      2. When the callbacks are no longer needed, unset them:

        -for (i = 0; i < SYS_INFO_COUNT - 1; i++)
        +for (i = 0; i < SYS_INFO_COUNT; i++)
         {
            system_settings_unset_changed_cb(_ret_type[i].key, _system_settings_changed_cb, 0);
         }
         
    • - - + +