diff options
author | David Walter Seikel | 2016-01-21 20:29:45 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-01-21 20:29:45 +1000 |
commit | e77157ca1b62d6e282bfdf17a7f4eb44d9a5ba86 (patch) | |
tree | 2867e76072186b58132ee9d461350c6ed5c744fa /src | |
parent | Rejig the structure of windows a lot. (diff) | |
download | SledjHamr-e77157ca1b62d6e282bfdf17a7f4eb44d9a5ba86.zip SledjHamr-e77157ca1b62d6e282bfdf17a7f4eb44d9a5ba86.tar.gz SledjHamr-e77157ca1b62d6e282bfdf17a7f4eb44d9a5ba86.tar.bz2 SledjHamr-e77157ca1b62d6e282bfdf17a7f4eb44d9a5ba86.tar.xz |
Random cleanups.
Diffstat (limited to '')
-rw-r--r-- | src/extantz/extantz.c | 12 | ||||
-rw-r--r-- | src/extantz/files.c | 32 | ||||
-rw-r--r-- | src/libraries/winFang.edc | 7 |
3 files changed, 24 insertions, 27 deletions
diff --git a/src/extantz/extantz.c b/src/extantz/extantz.c index 7fc2d81..f55fa16 100644 --- a/src/extantz/extantz.c +++ b/src/extantz/extantz.c | |||
@@ -687,7 +687,6 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
687 | Eventually uses WF_GRID for widget layout, though could in future use WF_BOX for some of them. | 687 | Eventually uses WF_GRID for widget layout, though could in future use WF_BOX for some of them. |
688 | files.c | 688 | files.c |
689 | winFang A normally hidden window with a file requestor, and other Elm widgets. | 689 | winFang A normally hidden window with a file requestor, and other Elm widgets. |
690 | ? elm_layout_box_append(me->win, WF_BOX, vbox); | ||
691 | scenriAdd() | 690 | scenriAdd() |
692 | 3D scene and node stuff | 691 | 3D scene and node stuff |
693 | ELM_IMAGE_CLASS Evas_3D render target. | 692 | ELM_IMAGE_CLASS Evas_3D render target. |
@@ -703,18 +702,17 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
703 | winFang World manager internal window, with it's own menu and toolbar stuff. | 702 | winFang World manager internal window, with it's own menu and toolbar stuff. |
704 | Uses the same menu code as the main menus below. | 703 | Uses the same menu code as the main menus below. |
705 | But with added pager stuff. | 704 | But with added pager stuff. |
706 | elm_layout_box_append(me->win, WF_BOX, nf); Elm naviframe for the tab pages. | ||
707 | elm_layout_box_append(me->win, WF_BOX, bt); Elm Login button. | ||
708 | love | 705 | love |
709 | main menus | 706 | main menus |
710 | makeMainMenu() | 707 | makeMainMenu() |
711 | ELM_TOOLBAR_CLASS Holder toolbar. | 708 | ELM_TOOLBAR_CLASS Holder toolbar. |
709 | Swallowed by WF_TOOLBAR | ||
712 | menuAdd() | 710 | menuAdd() |
713 | ? various calls to various object creation functions, TODO - which maybe I can replace with EO stuff? | 711 | ? various calls to various object creation functions, TODO - which maybe I can replace with EO stuff? |
714 | elm_toolbar_item_append() | 712 | elm_toolbar_item_append() |
715 | elm_menu_item_add() | 713 | elm_menu_item_add() |
716 | makeMainMenuFinish() | 714 | makeMainMenuFinish() |
717 | elm_object_part_content_set(win->layout, WF_TOOLBAR, tb); | 715 | The swallow. |
718 | isToolbar signal sent to layout. | 716 | isToolbar signal sent to layout. |
719 | elm_toolbar_item_append() | 717 | elm_toolbar_item_append() |
720 | 718 | ||
@@ -739,9 +737,9 @@ EAPI_MAIN int elm_main(int argc, char **argv) | |||
739 | widgetAdd Will either append it to WF_BOX, or pack it into WF_GRID using supplied coords and size. | 737 | widgetAdd Will either append it to WF_BOX, or pack it into WF_GRID using supplied coords and size. |
740 | Used by skang for creating widgets. | 738 | Used by skang for creating widgets. |
741 | Used by purkle for it's main widgets (in C), in WF_BOX. | 739 | Used by purkle for it's main widgets (in C), in WF_BOX. |
742 | ? Used by files for WT_FILES, but not the rest, this ends up inside WF_BOX, though it has it's own vbox. | 740 | Used by woMan for it's main widgets (in C), in WF_BOX. |
743 | ?? This vbox is an ELM_BOX_CLASS, er but - | 741 | Used by files for WT_FILES, but not the rest, this ends up inside WF_BOX, along with a hbox at the end. |
744 | ??? elm_obj_box_horizontal_set(EINA_TRUE) | 742 | Used by LSLGuiMess for the widgets (in Lua) in WF_GRID. |
745 | TODO - what happens when we mix BOX and GRID widgets? Perhaps GRID should live inside BOX? | 743 | TODO - what happens when we mix BOX and GRID widgets? Perhaps GRID should live inside BOX? |
746 | 744 | ||
747 | */ | 745 | */ |
diff --git a/src/extantz/files.c b/src/extantz/files.c index c27cd9c..535e250 100644 --- a/src/extantz/files.c +++ b/src/extantz/files.c | |||
@@ -144,7 +144,7 @@ winFang *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa | |||
144 | { | 144 | { |
145 | winFang *me = NULL; | 145 | winFang *me = NULL; |
146 | Widget *wid; | 146 | Widget *wid; |
147 | Evas_Object *vbox, *fs, *bt, *rd = NULL, *rdg = NULL, *hoversel; | 147 | Evas_Object *hbox, *fs, *bt, *rd = NULL, *rdg = NULL, *hoversel; |
148 | 148 | ||
149 | me = winFangAdd(ourGlobals->mainWindow, 10, 500, 300, 500, "file selector", "files", ourGlobals->world); | 149 | me = winFangAdd(ourGlobals->mainWindow, 10, 500, 300, 500, "file selector", "files", ourGlobals->world); |
150 | 150 | ||
@@ -176,13 +176,13 @@ winFang *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa | |||
176 | // Call back for double click or Enter pressed on file. | 176 | // Call back for double click or Enter pressed on file. |
177 | evas_object_smart_callback_add(fs, "activated", my_fileselector_activated, me); | 177 | evas_object_smart_callback_add(fs, "activated", my_fileselector_activated, me); |
178 | 178 | ||
179 | vbox = eo_add(ELM_BOX_CLASS, me->win, | 179 | hbox = eo_add(ELM_BOX_CLASS, me->win, |
180 | elm_obj_box_homogeneous_set(EINA_FALSE), | 180 | elm_obj_box_homogeneous_set(EINA_FALSE), |
181 | elm_obj_box_horizontal_set(EINA_TRUE), | 181 | elm_obj_box_horizontal_set(EINA_TRUE), |
182 | evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL) | 182 | evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL) |
183 | ); | 183 | ); |
184 | 184 | ||
185 | hoversel = eo_add(ELM_HOVERSEL_CLASS, vbox, | 185 | hoversel = eo_add(ELM_HOVERSEL_CLASS, hbox, |
186 | elm_obj_hoversel_hover_parent_set(me->win), | 186 | elm_obj_hoversel_hover_parent_set(me->win), |
187 | eo_key_data_set("fileselector", fs), | 187 | eo_key_data_set("fileselector", fs), |
188 | elm_obj_hoversel_item_add("name(asc)", NULL, ELM_ICON_NONE, _sort_selected_cb, (const void *) ELM_FILESELECTOR_SORT_BY_FILENAME_ASC), | 188 | elm_obj_hoversel_item_add("name(asc)", NULL, ELM_ICON_NONE, _sort_selected_cb, (const void *) ELM_FILESELECTOR_SORT_BY_FILENAME_ASC), |
@@ -196,9 +196,9 @@ winFang *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa | |||
196 | efl_gfx_visible_set(EINA_TRUE) | 196 | efl_gfx_visible_set(EINA_TRUE) |
197 | ); | 197 | ); |
198 | elm_object_text_set(hoversel, "sorting"); | 198 | elm_object_text_set(hoversel, "sorting"); |
199 | elm_box_pack_end(vbox, hoversel); | 199 | elm_box_pack_end(hbox, hoversel); |
200 | 200 | ||
201 | hoversel = eo_add(ELM_HOVERSEL_CLASS, vbox, | 201 | hoversel = eo_add(ELM_HOVERSEL_CLASS, hbox, |
202 | elm_obj_hoversel_hover_parent_set(me->win), | 202 | elm_obj_hoversel_hover_parent_set(me->win), |
203 | eo_key_data_set("fileselector", fs), | 203 | eo_key_data_set("fileselector", fs), |
204 | elm_obj_hoversel_item_add("tiny", NULL, ELM_ICON_NONE, _tiny_icon_clicked, fs), | 204 | elm_obj_hoversel_item_add("tiny", NULL, ELM_ICON_NONE, _tiny_icon_clicked, fs), |
@@ -208,36 +208,36 @@ winFang *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa | |||
208 | efl_gfx_visible_set(EINA_TRUE) | 208 | efl_gfx_visible_set(EINA_TRUE) |
209 | ); | 209 | ); |
210 | elm_object_text_set(hoversel, "size"); | 210 | elm_object_text_set(hoversel, "size"); |
211 | elm_box_pack_end(vbox, hoversel); | 211 | elm_box_pack_end(hbox, hoversel); |
212 | // Make sure it starts off as small, works around "hitting grid mode before hitting size not showing anything" bug. | 212 | // Make sure it starts off as small, works around "hitting grid mode before hitting size not showing anything" bug. |
213 | _small_icon_clicked(fs, hoversel, NULL); | 213 | _small_icon_clicked(fs, hoversel, NULL); |
214 | 214 | ||
215 | 215 | ||
216 | bt = eo_add(ELM_CHECK_CLASS, vbox, | 216 | bt = eo_add(ELM_CHECK_CLASS, hbox, |
217 | elm_obj_check_state_set(elm_fileselector_hidden_visible_get(fs)), | 217 | elm_obj_check_state_set(elm_fileselector_hidden_visible_get(fs)), |
218 | efl_gfx_visible_set(EINA_TRUE) | 218 | efl_gfx_visible_set(EINA_TRUE) |
219 | ); | 219 | ); |
220 | elm_object_text_set(bt, "hidden"); | 220 | elm_object_text_set(bt, "hidden"); |
221 | evas_object_smart_callback_add(bt, "changed", _hidden_clicked, fs); | 221 | evas_object_smart_callback_add(bt, "changed", _hidden_clicked, fs); |
222 | elm_box_pack_end(vbox, bt); | 222 | elm_box_pack_end(hbox, bt); |
223 | 223 | ||
224 | rdg = rd = eo_add(ELM_RADIO_CLASS, vbox, | 224 | rdg = rd = eo_add(ELM_RADIO_CLASS, hbox, |
225 | elm_obj_radio_state_value_set(ELM_FILESELECTOR_GRID), | 225 | elm_obj_radio_state_value_set(ELM_FILESELECTOR_GRID), |
226 | efl_gfx_visible_set(EINA_TRUE) | 226 | efl_gfx_visible_set(EINA_TRUE) |
227 | ); | 227 | ); |
228 | elm_object_text_set(rd, "grid"); | 228 | elm_object_text_set(rd, "grid"); |
229 | elm_box_pack_end(vbox, rd); | 229 | elm_box_pack_end(hbox, rd); |
230 | evas_object_smart_callback_add(rd, "changed", _mode_changed_cb, fs); | 230 | evas_object_smart_callback_add(rd, "changed", _mode_changed_cb, fs); |
231 | // Make it start in grid mode. It defaults to list mode, so this swaps it over. | 231 | // Make it start in grid mode. It defaults to list mode, so this swaps it over. |
232 | _mode_changed_cb(fs, rd, NULL); | 232 | _mode_changed_cb(fs, rd, NULL); |
233 | 233 | ||
234 | rd = eo_add(ELM_RADIO_CLASS, vbox, | 234 | rd = eo_add(ELM_RADIO_CLASS, hbox, |
235 | elm_obj_radio_state_value_set(ELM_FILESELECTOR_LIST), | 235 | elm_obj_radio_state_value_set(ELM_FILESELECTOR_LIST), |
236 | efl_gfx_visible_set(EINA_TRUE) | 236 | efl_gfx_visible_set(EINA_TRUE) |
237 | ); | 237 | ); |
238 | elm_radio_group_add(rd, rdg); | 238 | elm_radio_group_add(rd, rdg); |
239 | elm_object_text_set(rd, "list"); | 239 | elm_object_text_set(rd, "list"); |
240 | elm_box_pack_end(vbox, rd); | 240 | elm_box_pack_end(hbox, rd); |
241 | evas_object_smart_callback_add(rd, "changed", _mode_changed_cb, fs); | 241 | evas_object_smart_callback_add(rd, "changed", _mode_changed_cb, fs); |
242 | 242 | ||
243 | bt = eo_add(ELM_BUTTON_CLASS, me->win, | 243 | bt = eo_add(ELM_BUTTON_CLASS, me->win, |
@@ -245,17 +245,17 @@ winFang *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa | |||
245 | ); | 245 | ); |
246 | elm_object_text_set(bt, "OK"); | 246 | elm_object_text_set(bt, "OK"); |
247 | evas_object_smart_callback_add(bt, "clicked", _OK_clicked, me); | 247 | evas_object_smart_callback_add(bt, "clicked", _OK_clicked, me); |
248 | elm_box_pack_end(vbox, bt); | 248 | elm_box_pack_end(hbox, bt); |
249 | 249 | ||
250 | bt = eo_add(ELM_BUTTON_CLASS, me->win, | 250 | bt = eo_add(ELM_BUTTON_CLASS, me->win, |
251 | efl_gfx_visible_set(EINA_TRUE) | 251 | efl_gfx_visible_set(EINA_TRUE) |
252 | ); | 252 | ); |
253 | elm_object_text_set(bt, "CANCEL"); | 253 | elm_object_text_set(bt, "CANCEL"); |
254 | evas_object_smart_callback_add(bt, "clicked", _CANCEL_clicked, me); | 254 | evas_object_smart_callback_add(bt, "clicked", _CANCEL_clicked, me); |
255 | elm_box_pack_end(vbox, bt); | 255 | elm_box_pack_end(hbox, bt); |
256 | 256 | ||
257 | elm_box_pack_end(me->box, vbox); | 257 | elm_box_pack_end(me->box, hbox); |
258 | evas_object_show(vbox); | 258 | evas_object_show(hbox); |
259 | winFangCalcMinSize(me); | 259 | winFangCalcMinSize(me); |
260 | 260 | ||
261 | winFangHide(me); | 261 | winFangHide(me); |
diff --git a/src/libraries/winFang.edc b/src/libraries/winFang.edc index 2b409ef..2aa5838 100644 --- a/src/libraries/winFang.edc +++ b/src/libraries/winFang.edc | |||
@@ -20,12 +20,12 @@ collections | |||
20 | part | 20 | part |
21 | { name: "winFang/background"; | 21 | { name: "winFang/background"; |
22 | type: SWALLOW; | 22 | type: SWALLOW; |
23 | mouse_events: 1; | 23 | mouse_events: 0; |
24 | 24 | ||
25 | description | 25 | description |
26 | { state: "default" 0.0; | 26 | { state: "default" 0.0; |
27 | } | 27 | } |
28 | } // winFang/background | 28 | } |
29 | 29 | ||
30 | part | 30 | part |
31 | { name: "winFang/underlay"; | 31 | { name: "winFang/underlay"; |
@@ -35,7 +35,7 @@ collections | |||
35 | description | 35 | description |
36 | { state: "default" 0.0; | 36 | { state: "default" 0.0; |
37 | } | 37 | } |
38 | } // winFang/underlay | 38 | } |
39 | 39 | ||
40 | part | 40 | part |
41 | { name: "winFang/title"; | 41 | { name: "winFang/title"; |
@@ -168,4 +168,3 @@ collections | |||
168 | } | 168 | } |
169 | } | 169 | } |
170 | } | 170 | } |
171 | |||