aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/extantz
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-04 17:12:08 +1000
committerDavid Walter Seikel2014-05-04 17:12:08 +1000
commitf8fc00691417f628ba09e53552f7ac89cfd98faa (patch)
treed075a31f01c4b9563affef7556bf94fceea6c95a /src/extantz
parentAdd a file selector. (diff)
downloadSledjHamr-f8fc00691417f628ba09e53552f7ac89cfd98faa.zip
SledjHamr-f8fc00691417f628ba09e53552f7ac89cfd98faa.tar.gz
SledjHamr-f8fc00691417f628ba09e53552f7ac89cfd98faa.tar.bz2
SledjHamr-f8fc00691417f628ba09e53552f7ac89cfd98faa.tar.xz
New fangWin and Widget structures, and modify fangWin stuff to use them.
Diffstat (limited to 'src/extantz')
-rw-r--r--src/extantz/chat.c20
-rw-r--r--src/extantz/extantz.c10
-rw-r--r--src/extantz/extantz.h33
-rw-r--r--src/extantz/fangWin.c60
-rw-r--r--src/extantz/files.c20
-rw-r--r--src/extantz/woMan.c29
6 files changed, 118 insertions, 54 deletions
diff --git a/src/extantz/chat.c b/src/extantz/chat.c
index 4ad5033..ef40d08 100644
--- a/src/extantz/chat.c
+++ b/src/extantz/chat.c
@@ -1,19 +1,22 @@
1#include "extantz.h" 1#include "extantz.h"
2 2
3void chat_add(globals *ourGlobals) 3
4fangWin *chat_add(globals *ourGlobals)
4{ 5{
5 Evas_Object *win, *bx, *en; 6 fangWin *me;
7 Widget *wid;
8 Evas_Object *bx, *en;
6 9
7 win = fang_win_add(ourGlobals); 10 me = fang_win_add(ourGlobals);
8 11
9 bx = eo_add(ELM_OBJ_BOX_CLASS, win); 12 bx = eo_add(ELM_OBJ_BOX_CLASS, me->win);
10 eo_do(bx, 13 eo_do(bx,
11 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 14 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
12 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL) 15 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL)
13 ); 16 );
14 elm_win_resize_object_add(win, bx); 17 elm_win_resize_object_add(me->win, bx);
15 18
16 en = eo_add(ELM_OBJ_ENTRY_CLASS, win); 19 en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win);
17 elm_object_text_set(en, "History is shown here"); 20 elm_object_text_set(en, "History is shown here");
18 eo_do(en, 21 eo_do(en,
19 elm_obj_entry_scrollable_set(EINA_TRUE), 22 elm_obj_entry_scrollable_set(EINA_TRUE),
@@ -25,7 +28,7 @@ void chat_add(globals *ourGlobals)
25 elm_box_pack_end(bx, en); 28 elm_box_pack_end(bx, en);
26 eo_unref(en); 29 eo_unref(en);
27 30
28 en = eo_add(ELM_OBJ_ENTRY_CLASS, win); 31 en = eo_add(ELM_OBJ_ENTRY_CLASS, me->win);
29 elm_object_text_set(en, ""); 32 elm_object_text_set(en, "");
30 eo_do(en, 33 eo_do(en,
31 elm_obj_entry_scrollable_set(EINA_TRUE), 34 elm_obj_entry_scrollable_set(EINA_TRUE),
@@ -42,5 +45,6 @@ void chat_add(globals *ourGlobals)
42 evas_object_show(bx); 45 evas_object_show(bx);
43 eo_unref(bx); 46 eo_unref(bx);
44 47
45 fang_win_complete(ourGlobals, win, 30, 500, ourGlobals->win_w / 3, ourGlobals->win_h / 3); 48 fang_win_complete(ourGlobals, me, 30, 500, ourGlobals->win_w / 3, ourGlobals->win_h / 3);
49 return me;
46} 50}
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c
index 1d37ade..a9e5f3e 100644
--- a/src/extantz/extantz.c
+++ b/src/extantz/extantz.c
@@ -327,6 +327,7 @@ EAPI_MAIN int elm_main(int argc, char **argv)
327 Evas_Object *obj; 327 Evas_Object *obj;
328 EPhysics_World *world; 328 EPhysics_World *world;
329 GLData *gld = NULL; 329 GLData *gld = NULL;
330 fangWin *chat = NULL, *files = NULL, *woMan = NULL;
330 char buf[PATH_MAX]; 331 char buf[PATH_MAX];
331// Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't. 332// Eina_Bool gotWebKit = elm_need_web(); // Initialise ewebkit if it exists, or return EINA_FALSE if it don't.
332 333
@@ -410,9 +411,9 @@ EAPI_MAIN int elm_main(int argc, char **argv)
410 elm_win_resize_object_add(ourGlobals.win, ourGlobals.bx); 411 elm_win_resize_object_add(ourGlobals.win, ourGlobals.bx);
411 412
412// overlay_add(&ourGlobals); 413// overlay_add(&ourGlobals);
413 woMan_add(&ourGlobals); 414 woMan = woMan_add(&ourGlobals);
414 chat_add(&ourGlobals); 415 chat = chat_add(&ourGlobals);
415 files_add(&ourGlobals); 416// files = files_add(&ourGlobals);
416 417
417 // Gotta do this after adding the windows, otherwise the menu renders under the window. 418 // Gotta do this after adding the windows, otherwise the menu renders under the window.
418 // This sucks, gotta redefine this menu each time we create a new window? 419 // This sucks, gotta redefine this menu each time we create a new window?
@@ -447,6 +448,9 @@ EAPI_MAIN int elm_main(int argc, char **argv)
447 { 448 {
448 Evas_3D_Demo_fini(&ourGlobals); 449 Evas_3D_Demo_fini(&ourGlobals);
449 eo_unref(ourGlobals.tb); 450 eo_unref(ourGlobals.tb);
451 fang_win_del(&ourGlobals, woMan);
452 fang_win_del(&ourGlobals, chat);
453 fang_win_del(&ourGlobals, files);
450 eo_unref(ourGlobals.bx); 454 eo_unref(ourGlobals.bx);
451 evas_object_del(ourGlobals.win); 455 evas_object_del(ourGlobals.win);
452 } 456 }
diff --git a/src/extantz/extantz.h b/src/extantz/extantz.h
index 1cc76cd..a5fb794 100644
--- a/src/extantz/extantz.h
+++ b/src/extantz/extantz.h
@@ -123,6 +123,27 @@ typedef struct
123 short x, y, z; 123 short x, y, z;
124} ezLandmark; 124} ezLandmark;
125 125
126typedef struct _fangWin
127{
128 Evas_Object *win;
129 Eina_Clist widgets;
130 void *data;
131 Evas_Smart_Cb on_del;
132} fangWin;
133
134typedef struct _Widget
135{
136 char magic[8];
137 Evas_Object *obj;
138 Eina_Clist node;
139 char *label, *look, *action, *help;
140 // foreground / background colour
141 // thing
142 // types {}
143 // skangCoord x, y, w, h
144 void *data;
145 Evas_Smart_Cb on_del;
146} Widget;
126 147
127typedef struct _Scene_Data 148typedef struct _Scene_Data
128{ 149{
@@ -246,13 +267,15 @@ void Evas_3D_Demo_fini(globals *ourGlobals);
246 267
247void cameraAdd(globals *ourGlobals, Evas_Object *win); 268void cameraAdd(globals *ourGlobals, Evas_Object *win);
248 269
249Evas_Object *fang_win_add(globals *ourGlobals); 270fangWin *fang_win_add(globals *ourGlobals);
250void fang_win_complete(globals *ourGlobals, Evas_Object *win, int x, int y, int w, int h); 271void fang_win_complete(globals *ourGlobals, fangWin *win, int x, int y, int w, int h);
272void fang_win_del(globals *ourGlobals, fangWin *win);
251void overlay_add(globals *ourGlobals); 273void overlay_add(globals *ourGlobals);
274Widget *widgetAdd(fangWin *win);
252 275
253void chat_add(globals *ourGlobals); 276fangWin *chat_add(globals *ourGlobals);
254void files_add(globals *ourGlobals); 277fangWin *files_add(globals *ourGlobals);
255void woMan_add(globals *ourGlobals); 278fangWin *woMan_add(globals *ourGlobals);
256 279
257 280
258#ifdef __cplusplus 281#ifdef __cplusplus
diff --git a/src/extantz/fangWin.c b/src/extantz/fangWin.c
index e95910c..7a9f0d5 100644
--- a/src/extantz/fangWin.c
+++ b/src/extantz/fangWin.c
@@ -1,7 +1,6 @@
1#include "extantz.h" 1#include "extantz.h"
2 2
3 3
4
5// Elm inlined image windows needs this to change focus on mouse click. 4// Elm inlined image windows needs this to change focus on mouse click.
6// Evas style event callback. 5// Evas style event callback.
7static void _cb_mouse_down_elm(void *data, Evas *evas, Evas_Object *obj, void *event_info) 6static void _cb_mouse_down_elm(void *data, Evas *evas, Evas_Object *obj, void *event_info)
@@ -77,40 +76,60 @@ static void create_handles(Evas_Object *obj)
77 } 76 }
78} 77}
79 78
80Evas_Object *fang_win_add(globals *ourGlobals) 79fangWin *fang_win_add(globals *ourGlobals)
81{ 80{
82 Evas_Object *win, *bg; 81 fangWin *result;
82 Evas_Object *bg;
83
84 result = calloc(1, sizeof(fangWin));
85 eina_clist_init(&result->widgets);
83 86
84 // In theory this should create an EWS window, in practice, I'm not seeing any difference. 87 // In theory this should create an EWS window, in practice, I'm not seeing any difference.
85 // Guess I'll have to implement my own internal window manager. I don't think a basic one will be that hard. Famous last words. 88 // Guess I'll have to implement my own internal window manager. I don't think a basic one will be that hard. Famous last words.
86// elm_config_engine_set("ews"); 89// elm_config_engine_set("ews");
87 win = elm_win_add(ourGlobals->win, "inlined", ELM_WIN_INLINED_IMAGE); 90 result->win = elm_win_add(ourGlobals->win, "inlined", ELM_WIN_INLINED_IMAGE);
88 // On mouse down we try to shift focus to the backing image, this seems to be the correct thing to force focus onto it's widgets. 91 // On mouse down we try to shift focus to the backing image, this seems to be the correct thing to force focus onto it's widgets.
89 // According to the Elm inlined image window example, this is what's needed to. 92 // According to the Elm inlined image window example, this is what's needed to.
90 evas_object_event_callback_add(elm_win_inlined_image_object_get(win), EVAS_CALLBACK_MOUSE_DOWN, _cb_mouse_down_elm, NULL); 93 evas_object_event_callback_add(elm_win_inlined_image_object_get(result->win), EVAS_CALLBACK_MOUSE_DOWN, _cb_mouse_down_elm, NULL);
91 elm_win_alpha_set(win, EINA_TRUE); 94 elm_win_alpha_set(result->win, EINA_TRUE);
92 95
93 // Apparently transparent is not good enough for ELM backgrounds, so make it a rectangle. 96 // Apparently transparent is not good enough for ELM backgrounds, so make it a rectangle.
94 // Apparently coz ELM prefers stuff to have edjes. A bit over the top if all I want is a transparent rectangle. 97 // Apparently coz ELM prefers stuff to have edjes. A bit over the top if all I want is a transparent rectangle.
95 bg = evas_object_rectangle_add(evas_object_evas_get(win)); 98 bg = evas_object_rectangle_add(evas_object_evas_get(result->win));
96 evas_object_color_set(bg, 50, 0, 100, 100); 99 evas_object_color_set(bg, 50, 0, 100, 100);
97 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 100 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
98 elm_win_resize_object_add(win, bg); 101 elm_win_resize_object_add(result->win, bg);
99 evas_object_show(bg); 102 evas_object_show(bg);
100 103
101 return win; 104 return result;
102} 105}
103 106
104void fang_win_complete(globals *ourGlobals, Evas_Object *win, int x, int y, int w, int h) 107void fang_win_complete(globals *ourGlobals, fangWin *win, int x, int y, int w, int h)
105{ 108{
106 // image object for win is unlinked to its pos/size - so manual control 109 // image object for win is unlinked to its pos/size - so manual control
107 // this allows also for using map and other things with it. 110 // this allows also for using map and other things with it.
108 evas_object_move(elm_win_inlined_image_object_get(win), x, y); 111 evas_object_move(elm_win_inlined_image_object_get(win->win), x, y);
109 // Odd, it needs to be resized twice. WTF? 112 // Odd, it needs to be resized twice. WTF?
110 evas_object_resize(win, w, h); 113 evas_object_resize(win->win, w, h);
111 evas_object_resize(elm_win_inlined_image_object_get(win), w, h); 114 evas_object_resize(elm_win_inlined_image_object_get(win->win), w, h);
112 evas_object_show(win); 115 evas_object_show(win->win);
113 create_handles(elm_win_inlined_image_object_get(win)); 116 create_handles(elm_win_inlined_image_object_get(win->win));
117}
118
119void fang_win_del(globals *ourGlobals, fangWin *win)
120{
121 Widget *wid;
122
123 if (!win) return;
124
125 // Elm will delete our widgets, but if we are using eo, we need to unref them.
126 EINA_CLIST_FOR_EACH_ENTRY(wid, &win->widgets, Widget, node)
127 {
128 if (wid->on_del) wid->on_del(wid, wid->obj, NULL);
129 eo_unref(wid->obj);
130 }
131 if (win->on_del) win->on_del(win, win->win, NULL);
132 evas_object_del(win->win);
114} 133}
115 134
116void overlay_add(globals *ourGlobals) 135void overlay_add(globals *ourGlobals)
@@ -154,3 +173,14 @@ void overlay_add(globals *ourGlobals)
154 evas_object_resize(elm_win_inlined_image_object_get(gld->winwin), ourGlobals->win_w, ourGlobals->win_h); 173 evas_object_resize(elm_win_inlined_image_object_get(gld->winwin), ourGlobals->win_w, ourGlobals->win_h);
155 evas_object_show(gld->winwin); 174 evas_object_show(gld->winwin);
156} 175}
176
177Widget *widgetAdd(fangWin *win)
178{
179 Widget *result;
180
181 result = calloc(1, sizeof(Widget));
182 strcpy(result->magic, "Widget");
183 eina_clist_add_head(&win->widgets, &result->node);
184
185 return result;
186}
diff --git a/src/extantz/files.c b/src/extantz/files.c
index 7cfc5c0..84bf37b 100644
--- a/src/extantz/files.c
+++ b/src/extantz/files.c
@@ -153,19 +153,20 @@ static Eina_Bool _edje_filter(const char *path, Eina_Bool dir, void *data EINA_U
153 return EINA_FALSE; 153 return EINA_FALSE;
154} 154}
155 155
156void files_add(globals *ourGlobals) 156fangWin *files_add(globals *ourGlobals)
157{ 157{
158 Evas_Object *win, *bx, *vbox, *fs, *bt, *rd = NULL, *rdg = NULL, *hoversel; 158 fangWin *me;
159 Evas_Object *bx, *vbox, *fs, *bt, *rd = NULL, *rdg = NULL, *hoversel;
159 160
160 win = fang_win_add(ourGlobals); 161 me = fang_win_add(ourGlobals);
161 162
162 bx = eo_add(ELM_OBJ_BOX_CLASS, win); 163 bx = eo_add(ELM_OBJ_BOX_CLASS, me->win);
163 eo_do(bx, 164 eo_do(bx,
164 elm_obj_box_homogeneous_set(EINA_FALSE), 165 elm_obj_box_homogeneous_set(EINA_FALSE),
165 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 166 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
166 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL) 167 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL)
167 ); 168 );
168 elm_win_resize_object_add(win, bx); 169 elm_win_resize_object_add(me->win, bx);
169 170
170 fs = eo_add(ELM_OBJ_FILESELECTOR_CLASS, bx); 171 fs = eo_add(ELM_OBJ_FILESELECTOR_CLASS, bx);
171 eo_do(fs, 172 eo_do(fs,
@@ -198,7 +199,7 @@ void files_add(globals *ourGlobals)
198 199
199 eo_unref(fs); 200 eo_unref(fs);
200 201
201 vbox = eo_add(ELM_OBJ_BOX_CLASS, win); 202 vbox = eo_add(ELM_OBJ_BOX_CLASS, me->win);
202 eo_do(vbox, 203 eo_do(vbox,
203 elm_obj_box_homogeneous_set(EINA_FALSE), 204 elm_obj_box_homogeneous_set(EINA_FALSE),
204 elm_obj_box_horizontal_set(EINA_TRUE), 205 elm_obj_box_horizontal_set(EINA_TRUE),
@@ -236,7 +237,7 @@ void files_add(globals *ourGlobals)
236 237
237 238
238 hoversel = elm_hoversel_add(vbox); 239 hoversel = elm_hoversel_add(vbox);
239 elm_hoversel_hover_parent_set(hoversel, win); 240 elm_hoversel_hover_parent_set(hoversel, me->win);
240 evas_object_data_set(hoversel, "fileselector", fs); 241 evas_object_data_set(hoversel, "fileselector", fs);
241 elm_object_text_set(hoversel, "sorting"); 242 elm_object_text_set(hoversel, "sorting");
242 243
@@ -253,7 +254,7 @@ void files_add(globals *ourGlobals)
253 evas_object_show(hoversel); 254 evas_object_show(hoversel);
254 255
255 hoversel = elm_hoversel_add(vbox); 256 hoversel = elm_hoversel_add(vbox);
256 elm_hoversel_hover_parent_set(hoversel, win); 257 elm_hoversel_hover_parent_set(hoversel, me->win);
257 evas_object_data_set(hoversel, "fileselector", fs); 258 evas_object_data_set(hoversel, "fileselector", fs);
258 elm_object_text_set(hoversel, "size"); 259 elm_object_text_set(hoversel, "size");
259 260
@@ -270,5 +271,6 @@ void files_add(globals *ourGlobals)
270 evas_object_show(bx); 271 evas_object_show(bx);
271 eo_unref(bx); 272 eo_unref(bx);
272 273
273 fang_win_complete(ourGlobals, win, ourGlobals->win_w - 380, ourGlobals->win_w - 530, 350, 500); 274 fang_win_complete(ourGlobals, me, ourGlobals->win_w - 380, ourGlobals->win_w - 530, 350, 500);
275 return me;
274} 276}
diff --git a/src/extantz/woMan.c b/src/extantz/woMan.c
index 2e5e741..ffb063c 100644
--- a/src/extantz/woMan.c
+++ b/src/extantz/woMan.c
@@ -151,23 +151,23 @@ static void _grid_sel_cb(void *data, Evas_Object *obj, void *event_info)
151} 151}
152 152
153 153
154void woMan_add(globals *ourGlobals) 154fangWin *woMan_add(globals *ourGlobals)
155{ 155{
156// Evas_Object *win, *bg, *bx, *ic, *bb, *av, *en, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu; 156 fangWin *me;
157 Evas_Object *win, *bx, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu; 157 Evas_Object *bx, *bt, *nf, *tab, *tb, *gridList, *viewerList, *menu;
158 Elm_Object_Item *tb_it, *menu_it, *tab_it; 158 Elm_Object_Item *tb_it, *menu_it, *tab_it;
159 char buf[PATH_MAX]; 159 char buf[PATH_MAX];
160 int i; 160 int i;
161 161
162 win = fang_win_add(ourGlobals); 162 me = fang_win_add(ourGlobals);
163 163
164 bx = elm_box_add(win); 164 bx = elm_box_add(me->win);
165 elm_win_resize_object_add(win, bx); 165 elm_win_resize_object_add(me->win, bx);
166 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 166 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
167 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL); 167 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
168 168
169 // A tab thingy. 169 // A tab thingy.
170 tb = elm_toolbar_add(win); 170 tb = elm_toolbar_add(me->win);
171 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0.0); 171 evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, 0.0);
172 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL); 172 evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
173 elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_SCROLL); 173 elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_SCROLL);
@@ -177,7 +177,7 @@ void woMan_add(globals *ourGlobals)
177 elm_toolbar_item_menu_set(tb_it, EINA_TRUE); 177 elm_toolbar_item_menu_set(tb_it, EINA_TRUE);
178 // Priority is for when toolbar items are set to hide or menu when there are too many of them. They get hidden or put on the menu based on priority. 178 // Priority is for when toolbar items are set to hide or menu when there are too many of them. They get hidden or put on the menu based on priority.
179 elm_toolbar_item_priority_set(tb_it, 9999); 179 elm_toolbar_item_priority_set(tb_it, 9999);
180 elm_toolbar_menu_parent_set(tb, win); 180 elm_toolbar_menu_parent_set(tb, me->win);
181 menu = elm_toolbar_item_menu_get(tb_it); 181 menu = elm_toolbar_item_menu_get(tb_it);
182 182
183 menu_it = elm_menu_item_add(menu, NULL, NULL, "edit", NULL, NULL); 183 menu_it = elm_menu_item_add(menu, NULL, NULL, "edit", NULL, NULL);
@@ -192,7 +192,7 @@ void woMan_add(globals *ourGlobals)
192 elm_box_pack_end(bx, tb); 192 elm_box_pack_end(bx, tb);
193 evas_object_show(tb); 193 evas_object_show(tb);
194 194
195 gridList = elm_genlist_add(win); 195 gridList = elm_genlist_add(me->win);
196 grids = eina_hash_stringshared_new(free); 196 grids = eina_hash_stringshared_new(free);
197 evas_object_data_set(gridList, "glob", ourGlobals); 197 evas_object_data_set(gridList, "glob", ourGlobals);
198 198
@@ -241,7 +241,7 @@ void woMan_add(globals *ourGlobals)
241 } 241 }
242 242
243 // Viewers stuff 243 // Viewers stuff
244 viewerList = elm_genlist_add(win); 244 viewerList = elm_genlist_add(me->win);
245 viewer_gic = elm_genlist_item_class_new(); 245 viewer_gic = elm_genlist_item_class_new();
246 viewer_gic->item_style = "double_label"; 246 viewer_gic->item_style = "double_label";
247 viewer_gic->func.text_get = _viewer_label_get; 247 viewer_gic->func.text_get = _viewer_label_get;
@@ -263,18 +263,18 @@ void woMan_add(globals *ourGlobals)
263 } 263 }
264 264
265 // Toolbar pages 265 // Toolbar pages
266 nf = elm_naviframe_add(win); 266 nf = elm_naviframe_add(me->win);
267 evas_object_size_hint_weight_set(nf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 267 evas_object_size_hint_weight_set(nf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
268 evas_object_size_hint_align_set(nf, EVAS_HINT_FILL, EVAS_HINT_FILL); 268 evas_object_size_hint_align_set(nf, EVAS_HINT_FILL, EVAS_HINT_FILL);
269 evas_object_show(nf); 269 evas_object_show(nf);
270 270
271 sprintf(buf, "%s/%s", elm_app_data_dir_get(), img3); 271 sprintf(buf, "%s/%s", elm_app_data_dir_get(), img3);
272 tab = viewerList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Viewers", _promote, tab_it); 272 tab = viewerList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Viewers", _promote, tab_it);
273 tab = _content_image_new(win, strdup(buf)); tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Landmarks", _promote, tab_it); 273 tab = _content_image_new(me->win, strdup(buf)); tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Landmarks", _promote, tab_it);
274 tab = gridList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Grids", _promote, tab_it); 274 tab = gridList; tab_it = elm_naviframe_item_push(nf, NULL, NULL, NULL, tab, NULL); elm_naviframe_item_title_enabled_set(tab_it, EINA_FALSE, EINA_TRUE); elm_toolbar_item_append(tb, NULL, "Grids", _promote, tab_it);
275 elm_box_pack_end(bx, nf); 275 elm_box_pack_end(bx, nf);
276 276
277 bt = eo_add(ELM_OBJ_BUTTON_CLASS, win); 277 bt = eo_add(ELM_OBJ_BUTTON_CLASS, me->win);
278 elm_object_text_set(bt, "Login"); // No eo interface for this that I can find. 278 elm_object_text_set(bt, "Login"); // No eo interface for this that I can find.
279 eo_do(bt, 279 eo_do(bt,
280// evas_obj_text_set("Login"), 280// evas_obj_text_set("Login"),
@@ -287,5 +287,6 @@ void woMan_add(globals *ourGlobals)
287 eo_unref(bt); 287 eo_unref(bt);
288 evas_object_show(bx); 288 evas_object_show(bx);
289 289
290 fang_win_complete(ourGlobals, win, 30, 30, ourGlobals->win_w / 3, ourGlobals->win_h / 3); 290 fang_win_complete(ourGlobals, me, 30, 30, ourGlobals->win_w / 3, ourGlobals->win_h / 3);
291 return me;
291} 292}