summaryrefslogtreecommitdiff
path: root/src/bin/main_window.c
diff options
context:
space:
mode:
authorFlavio Ceolin <flavio.ceolin@gmail.com>2014-08-12 23:43:41 -0300
committerFlavio Ceolin <flavio.ceolin@gmail.com>2014-08-14 23:38:49 -0300
commit861541dd018675773db7983dbee45bab586cae25 (patch)
tree6d9dc639d8f1c6a8d375a81afdee2d006dda967d /src/bin/main_window.c
parent68dd8bd3e1100e26d037de24416541df5525905d (diff)
Be prepared to advanced options on emixer
The advanced option is a view given by the backend to be shown on emixer application. The idea is allow advanced options of which backend to the user, for example something like paprefs for pulseaudio.
Diffstat (limited to 'src/bin/main_window.c')
-rw-r--r--src/bin/main_window.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/bin/main_window.c b/src/bin/main_window.c
index 5399d4c..a620b2c 100644
--- a/src/bin/main_window.c
+++ b/src/bin/main_window.c
@@ -4,12 +4,15 @@
4#include "sinks_view.h" 4#include "sinks_view.h"
5#include "sources_view.h" 5#include "sources_view.h"
6 6
7#include <emix.h>
8
7#define MAIN_WINDOW_DATA "mainwindow.data" 9#define MAIN_WINDOW_DATA "mainwindow.data"
8 10
9enum MAIN_SUBVIEWS { 11enum MAIN_SUBVIEWS {
10 PLAYBACKS, 12 PLAYBACKS,
11 OUTPUTS, 13 OUTPUTS,
12 INPUTS 14 INPUTS,
15 ADVANCED
13}; 16};
14 17
15typedef struct _Main_Window Main_Window; 18typedef struct _Main_Window Main_Window;
@@ -22,6 +25,7 @@ struct _Main_Window
22 Evas_Object *playbacks; 25 Evas_Object *playbacks;
23 Evas_Object *inputs; 26 Evas_Object *inputs;
24 Evas_Object *outputs; 27 Evas_Object *outputs;
28 Evas_Object *advanced_options;
25 Elm_Object_Item *toolbar_items[3]; 29 Elm_Object_Item *toolbar_items[3];
26 Elm_Object_Item *views[3]; 30 Elm_Object_Item *views[3];
27}; 31};
@@ -155,6 +159,20 @@ main_window_add(void)
155 evas_object_size_hint_align_set(mw->inputs, EVAS_HINT_FILL, EVAS_HINT_FILL); 159 evas_object_size_hint_align_set(mw->inputs, EVAS_HINT_FILL, EVAS_HINT_FILL);
156 evas_object_show(mw->inputs); 160 evas_object_show(mw->inputs);
157 161
162 /* Creating the advanced view */
163 mw->advanced_options = emix_advanced_options_add(mw->win);
164 if (mw->advanced_options)
165 {
166 evas_object_size_hint_weight_set(mw->advanced_options, EVAS_HINT_EXPAND,
167 EVAS_HINT_EXPAND);
168 evas_object_size_hint_align_set(mw->advanced_options, EVAS_HINT_FILL,
169 EVAS_HINT_FILL);
170 evas_object_show(mw->advanced_options);
171
172 mw->views[ADVANCED] = elm_naviframe_item_simple_push(mw->naviframe,
173 mw->advanced_options);
174 }
175
158 mw->views[INPUTS] = elm_naviframe_item_simple_push(mw->naviframe, 176 mw->views[INPUTS] = elm_naviframe_item_simple_push(mw->naviframe,
159 mw->inputs); 177 mw->inputs);
160 mw->views[OUTPUTS] = elm_naviframe_item_simple_push(mw->naviframe, 178 mw->views[OUTPUTS] = elm_naviframe_item_simple_push(mw->naviframe,