summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorFlavio Ceolin <flavio.ceolin@gmail.com>2014-04-12 23:27:22 -0300
committerFlavio Ceolin <flavio.ceolin@gmail.com>2014-05-01 17:33:43 -0300
commitd585681b922703ad5e0e81b1f139e417b8ce823e (patch)
tree05a3fc68b9a2f5cb9bf82a428978f3e7a4d31d06 /src/bin
parentbe2f03d897d4bfbbe3a9bc66d6169bf067f8546e (diff)
Adding portuguese translation
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/main_window.c45
-rw-r--r--src/bin/playbacks_view.c4
-rw-r--r--src/bin/sinks_view.c4
3 files changed, 28 insertions, 25 deletions
diff --git a/src/bin/main_window.c b/src/bin/main_window.c
index 6783384..cb55c1c 100644
--- a/src/bin/main_window.c
+++ b/src/bin/main_window.c
@@ -13,12 +13,6 @@ enum MAIN_SUBVIEWS {
13 INPUTS 13 INPUTS
14}; 14};
15 15
16static const char *_views[] = {
17 "Playback",
18 "Output Devices",
19 "Input Devices"
20};
21
22typedef struct _Main_Window Main_Window; 16typedef struct _Main_Window Main_Window;
23struct _Main_Window 17struct _Main_Window
24{ 18{
@@ -73,7 +67,6 @@ main_window_add(void)
73{ 67{
74 Main_Window *mw; 68 Main_Window *mw;
75 Evas_Object *tmp, *box; 69 Evas_Object *tmp, *box;
76 unsigned int i;
77 70
78 elm_theme_extension_add(NULL, EPULSE_THEME); 71 elm_theme_extension_add(NULL, EPULSE_THEME);
79 mw = calloc(1, sizeof(Main_Window)); 72 mw = calloc(1, sizeof(Main_Window));
@@ -88,7 +81,7 @@ main_window_add(void)
88 evas_object_data_set(tmp, MAIN_WINDOW_DATA, mw); 81 evas_object_data_set(tmp, MAIN_WINDOW_DATA, mw);
89 evas_object_event_callback_add(tmp, EVAS_CALLBACK_DEL, _del_cb, mw); 82 evas_object_event_callback_add(tmp, EVAS_CALLBACK_DEL, _del_cb, mw);
90 elm_win_autodel_set(tmp, EINA_TRUE); 83 elm_win_autodel_set(tmp, EINA_TRUE);
91 elm_win_title_set(tmp, "Efl Volume Control"); 84 elm_win_title_set(tmp, _("Efl Volume Control"));
92 mw->win = tmp; 85 mw->win = tmp;
93 86
94 tmp = elm_bg_add(mw->win); 87 tmp = elm_bg_add(mw->win);
@@ -120,37 +113,47 @@ main_window_add(void)
120 evas_object_show(tmp); 113 evas_object_show(tmp);
121 mw->naviframe = tmp; 114 mw->naviframe = tmp;
122 115
123 for (i = 0; i < EINA_C_ARRAY_LENGTH(_views); i++) 116 mw->toolbar_items[0] = elm_toolbar_item_append(mw->toolbar, NULL,
124 { 117 _("Playback"),
125 mw->toolbar_items[i] = elm_toolbar_item_append(mw->toolbar, NULL, 118 _toolbar_item_cb, mw);
126 _views[i], 119 mw->toolbar_items[1] = elm_toolbar_item_append(mw->toolbar, NULL,
127 _toolbar_item_cb, mw); 120 _("Outputs"),
128 } 121 _toolbar_item_cb, mw);
122 mw->toolbar_items[2] = elm_toolbar_item_append(mw->toolbar, NULL,
123 _("Inputs"),
124 _toolbar_item_cb, mw);
129 125
130 evas_object_smart_callback_add(mw->win, "delete,request", 126 evas_object_smart_callback_add(mw->win, "delete,request",
131 _delete_request_cb, mw); 127 _delete_request_cb, mw);
132 128
133 /* Creating the playbacks view */ 129 /* Creating the playbacks view */
134 mw->playbacks = playbacks_view_add(mw->win); 130 mw->playbacks = playbacks_view_add(mw->win);
135 evas_object_size_hint_weight_set(mw->playbacks, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 131 evas_object_size_hint_weight_set(mw->playbacks, EVAS_HINT_EXPAND,
136 evas_object_size_hint_align_set(mw->playbacks, EVAS_HINT_FILL, EVAS_HINT_FILL); 132 EVAS_HINT_EXPAND);
133 evas_object_size_hint_align_set(mw->playbacks, EVAS_HINT_FILL,
134 EVAS_HINT_FILL);
137 evas_object_show(mw->playbacks); 135 evas_object_show(mw->playbacks);
138 136
139 /* Creating the outputs view */ 137 /* Creating the outputs view */
140 mw->outputs = sinks_view_add(mw->win); 138 mw->outputs = sinks_view_add(mw->win);
141 evas_object_size_hint_weight_set(mw->outputs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 139 evas_object_size_hint_weight_set(mw->outputs, EVAS_HINT_EXPAND,
140 EVAS_HINT_EXPAND);
142 evas_object_size_hint_align_set(mw->outputs, EVAS_HINT_FILL, EVAS_HINT_FILL); 141 evas_object_size_hint_align_set(mw->outputs, EVAS_HINT_FILL, EVAS_HINT_FILL);
143 evas_object_show(mw->outputs); 142 evas_object_show(mw->outputs);
144 143
145 /* Creating the inputs view */ 144 /* Creating the inputs view */
146 mw->inputs = sources_view_add(mw->win); 145 mw->inputs = sources_view_add(mw->win);
147 evas_object_size_hint_weight_set(mw->inputs, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 146 evas_object_size_hint_weight_set(mw->inputs, EVAS_HINT_EXPAND,
147 EVAS_HINT_EXPAND);
148 evas_object_size_hint_align_set(mw->inputs, EVAS_HINT_FILL, EVAS_HINT_FILL); 148 evas_object_size_hint_align_set(mw->inputs, EVAS_HINT_FILL, EVAS_HINT_FILL);
149 evas_object_show(mw->inputs); 149 evas_object_show(mw->inputs);
150 150
151 mw->views[INPUTS] = elm_naviframe_item_simple_push(mw->naviframe, mw->inputs); 151 mw->views[INPUTS] = elm_naviframe_item_simple_push(mw->naviframe,
152 mw->views[OUTPUTS] = elm_naviframe_item_simple_push(mw->naviframe, mw->outputs); 152 mw->inputs);
153 mw->views[PLAYBACKS] = elm_naviframe_item_simple_push(mw->naviframe, mw->playbacks); 153 mw->views[OUTPUTS] = elm_naviframe_item_simple_push(mw->naviframe,
154 mw->outputs);
155 mw->views[PLAYBACKS] = elm_naviframe_item_simple_push(mw->naviframe,
156 mw->playbacks);
154 157
155 return mw->win; 158 return mw->win;
156 159
diff --git a/src/bin/playbacks_view.c b/src/bin/playbacks_view.c
index 98edff4..80d6a33 100644
--- a/src/bin/playbacks_view.c
+++ b/src/bin/playbacks_view.c
@@ -280,8 +280,8 @@ _item_content_get(void *data, Evas_Object *obj, const char *part)
280 EINA_SAFETY_ON_NULL_RETURN_VAL(item, NULL); 280 EINA_SAFETY_ON_NULL_RETURN_VAL(item, NULL);
281 281
282 elm_object_style_set(item, "toggle"); 282 elm_object_style_set(item, "toggle");
283 elm_object_part_text_set(item, "off", "Mute"); 283 elm_object_translatable_part_text_set(item, "off", N_("Mute"));
284 elm_object_part_text_set(item, "on", "Unmute"); 284 elm_object_translatable_part_text_set(item, "on", N_("Unmute"));
285 285
286 elm_check_state_set(item, input->mute); 286 elm_check_state_set(item, input->mute);
287 elm_check_state_pointer_set(item, &input->mute); 287 elm_check_state_pointer_set(item, &input->mute);
diff --git a/src/bin/sinks_view.c b/src/bin/sinks_view.c
index 57bca43..b8514fd 100644
--- a/src/bin/sinks_view.c
+++ b/src/bin/sinks_view.c
@@ -241,8 +241,8 @@ _item_content_get(void *data, Evas_Object *obj, const char *part)
241 EINA_SAFETY_ON_NULL_RETURN_VAL(item, NULL); 241 EINA_SAFETY_ON_NULL_RETURN_VAL(item, NULL);
242 242
243 elm_object_style_set(item, "toggle"); 243 elm_object_style_set(item, "toggle");
244 elm_object_part_text_set(item, "off", "Mute"); 244 elm_object_translatable_part_text_set(item, "off", N_("Mute"));
245 elm_object_part_text_set(item, "on", "Unmute"); 245 elm_object_translatable_part_text_set(item, "on", N_("Unmute"));
246 246
247 elm_check_state_set(item, sink->mute); 247 elm_check_state_set(item, sink->mute);
248 elm_check_state_pointer_set(item, &sink->mute); 248 elm_check_state_pointer_set(item, &sink->mute);