diff options
Diffstat (limited to '')
-rw-r--r-- | src/extantz/files.c | 32 |
1 files changed, 16 insertions, 16 deletions
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); |