summaryrefslogtreecommitdiff
path: root/src
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
parentbe2f03d897d4bfbbe3a9bc66d6169bf067f8546e (diff)
Adding portuguese translation
Diffstat (limited to 'src')
-rw-r--r--src/bin/main_window.c45
-rw-r--r--src/bin/playbacks_view.c4
-rw-r--r--src/bin/sinks_view.c4
-rw-r--r--src/lib/common.h2
-rw-r--r--src/module/e_mod_main.c16
5 files changed, 38 insertions, 33 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);
diff --git a/src/lib/common.h b/src/lib/common.h
index 66b3925..4c9ec9b 100644
--- a/src/lib/common.h
+++ b/src/lib/common.h
@@ -13,6 +13,8 @@
13#include <stdio.h> 13#include <stdio.h>
14#include <string.h> 14#include <string.h>
15 15
16#include "translation.h"
17
16#define EPULSE_THEME PACKAGE_DATA_DIR"/data/themes/default.edj" 18#define EPULSE_THEME PACKAGE_DATA_DIR"/data/themes/default.edj"
17 19
18EAPI extern int _log_domain; 20EAPI extern int _log_domain;
diff --git a/src/module/e_mod_main.c b/src/module/e_mod_main.c
index 09dc41a..e5d72ca 100644
--- a/src/module/e_mod_main.c
+++ b/src/module/e_mod_main.c
@@ -159,7 +159,7 @@ _actions_register(void)
159 if (mixer_context->actions.incr) 159 if (mixer_context->actions.incr)
160 { 160 {
161 mixer_context->actions.incr->func.go = _volume_increase_cb; 161 mixer_context->actions.incr->func.go = _volume_increase_cb;
162 e_action_predef_name_set("Pulse Mixer", "Increase Volume", 162 e_action_predef_name_set("Pulse Mixer", _("Increase Volume"),
163 "volume_increase", NULL, NULL, 0); 163 "volume_increase", NULL, NULL, 0);
164 } 164 }
165 165
@@ -167,7 +167,7 @@ _actions_register(void)
167 if (mixer_context->actions.decr) 167 if (mixer_context->actions.decr)
168 { 168 {
169 mixer_context->actions.decr->func.go = _volume_decrease_cb; 169 mixer_context->actions.decr->func.go = _volume_decrease_cb;
170 e_action_predef_name_set("Pulse Mixer", "Decrease Volume", 170 e_action_predef_name_set("Pulse Mixer", _("Decrease Volume"),
171 "volume_decrease", NULL, NULL, 0); 171 "volume_decrease", NULL, NULL, 0);
172 } 172 }
173 173
@@ -175,7 +175,7 @@ _actions_register(void)
175 if (mixer_context->actions.mute) 175 if (mixer_context->actions.mute)
176 { 176 {
177 mixer_context->actions.mute->func.go = _volume_mute_cb; 177 mixer_context->actions.mute->func.go = _volume_mute_cb;
178 e_action_predef_name_set("Pulse Mixer", "Mute volume", "volume_mute", 178 e_action_predef_name_set("Pulse Mixer", _("Mute volume"), "volume_mute",
179 NULL, NULL, 0); 179 NULL, NULL, 0);
180 } 180 }
181 181
@@ -188,21 +188,21 @@ _actions_unregister(void)
188{ 188{
189 if (mixer_context->actions.incr) 189 if (mixer_context->actions.incr)
190 { 190 {
191 e_action_predef_name_del("Pulse Mixer", "Volume Increase"); 191 e_action_predef_name_del("Pulse Mixer", _("Volume Increase"));
192 e_action_del("volume_increase"); 192 e_action_del("volume_increase");
193 mixer_context->actions.incr = NULL; 193 mixer_context->actions.incr = NULL;
194 } 194 }
195 195
196 if (mixer_context->actions.decr) 196 if (mixer_context->actions.decr)
197 { 197 {
198 e_action_predef_name_del("Pulse Mixer", "Volume Mute"); 198 e_action_predef_name_del("Pulse Mixer", _("Volume Mute"));
199 e_action_del("volume_decrease"); 199 e_action_del("volume_decrease");
200 mixer_context->actions.decr = NULL; 200 mixer_context->actions.decr = NULL;
201 } 201 }
202 202
203 if (mixer_context->actions.mute) 203 if (mixer_context->actions.mute)
204 { 204 {
205 e_action_predef_name_del("Pulse Mixer", "Voume Mute"); 205 e_action_predef_name_del("Pulse Mixer", _("Volume Mute"));
206 e_action_del("volume_mute"); 206 e_action_del("volume_mute");
207 mixer_context->actions.mute = NULL; 207 mixer_context->actions.mute = NULL;
208 } 208 }
@@ -353,7 +353,7 @@ _popup_new(Instance *inst)
353 e_widget_list_object_append(list, inst->slider, 1, 1, 0.5); 353 e_widget_list_object_append(list, inst->slider, 1, 1, 0.5);
354 354
355 inst->mute = mixer_context->sink_default->mute; 355 inst->mute = mixer_context->sink_default->mute;
356 inst->check = e_widget_check_add(evas, "Mute", 356 inst->check = e_widget_check_add(evas, _("Mute"),
357 &inst->mute); 357 &inst->mute);
358 e_widget_list_object_append(list, inst->check, 1, 9, 0.5); 358 e_widget_list_object_append(list, inst->check, 1, 9, 0.5);
359 evas_object_smart_callback_add(inst->check, "changed", _check_changed_cb, 359 evas_object_smart_callback_add(inst->check, "changed", _check_changed_cb,
@@ -394,7 +394,7 @@ _menu_new(Instance *inst, Evas_Event_Mouse_Down *ev)
394 m = e_menu_new(); 394 m = e_menu_new();
395 395
396 mi = e_menu_item_new(m); 396 mi = e_menu_item_new(m);
397 e_menu_item_label_set(mi, "Advanced"); 397 e_menu_item_label_set(mi, _("Advanced"));
398 e_util_menu_item_theme_icon_set(mi, "configure"); 398 e_util_menu_item_theme_icon_set(mi, "configure");
399 e_menu_item_callback_set(mi, _menu_cb, inst); 399 e_menu_item_callback_set(mi, _menu_cb, inst);
400 400