aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/extantz/files.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/extantz/files.c45
1 files changed, 20 insertions, 25 deletions
diff --git a/src/extantz/files.c b/src/extantz/files.c
index 024e2df..06cd257 100644
--- a/src/extantz/files.c
+++ b/src/extantz/files.c
@@ -148,8 +148,7 @@ fangWin *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa
148 148
149 me = fang_win_add(ourGlobals); 149 me = fang_win_add(ourGlobals);
150 150
151 bx = eo_add(ELM_OBJ_BOX_CLASS, me->win); 151 bx = eo_add(ELM_OBJ_BOX_CLASS, me->win,
152 eo_do(bx,
153 elm_obj_box_homogeneous_set(EINA_FALSE), 152 elm_obj_box_homogeneous_set(EINA_FALSE),
154 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 153 evas_obj_size_hint_weight_set(EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
155 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL) 154 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL)
@@ -189,16 +188,13 @@ fangWin *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa
189 // Call back for double click or Enter pressed on file. 188 // Call back for double click or Enter pressed on file.
190 evas_object_smart_callback_add(fs, "activated", my_fileselector_activated, me); 189 evas_object_smart_callback_add(fs, "activated", my_fileselector_activated, me);
191 190
192 vbox = eo_add(ELM_OBJ_BOX_CLASS, me->win); 191 vbox = eo_add(ELM_OBJ_BOX_CLASS, me->win,
193 eo_do(vbox,
194 elm_obj_box_homogeneous_set(EINA_FALSE), 192 elm_obj_box_homogeneous_set(EINA_FALSE),
195 elm_obj_box_horizontal_set(EINA_TRUE), 193 elm_obj_box_horizontal_set(EINA_TRUE),
196 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL) 194 evas_obj_size_hint_align_set(EVAS_HINT_FILL, EVAS_HINT_FILL)
197 ); 195 );
198 196
199 hoversel = eo_add(ELM_OBJ_HOVERSEL_CLASS, vbox); 197 hoversel = eo_add(ELM_OBJ_HOVERSEL_CLASS, vbox,
200 elm_object_text_set(hoversel, "sorting");
201 eo_do(hoversel,
202 elm_obj_hoversel_hover_parent_set(me->win), 198 elm_obj_hoversel_hover_parent_set(me->win),
203 eo_key_data_set("fileselector", fs, NULL), 199 eo_key_data_set("fileselector", fs, NULL),
204 elm_obj_hoversel_item_add("name(asc)", NULL, ELM_ICON_NONE, _sort_selected_cb, (const void *) ELM_FILESELECTOR_SORT_BY_FILENAME_ASC), 200 elm_obj_hoversel_item_add("name(asc)", NULL, ELM_ICON_NONE, _sort_selected_cb, (const void *) ELM_FILESELECTOR_SORT_BY_FILENAME_ASC),
@@ -211,12 +207,11 @@ fangWin *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa
211 elm_obj_hoversel_item_add("time(desc)", NULL, ELM_ICON_NONE, _sort_selected_cb, (const void *) ELM_FILESELECTOR_SORT_BY_MODIFIED_DESC), 207 elm_obj_hoversel_item_add("time(desc)", NULL, ELM_ICON_NONE, _sort_selected_cb, (const void *) ELM_FILESELECTOR_SORT_BY_MODIFIED_DESC),
212 evas_obj_visibility_set(EINA_TRUE) 208 evas_obj_visibility_set(EINA_TRUE)
213 ); 209 );
210 elm_object_text_set(hoversel, "sorting");
214 elm_box_pack_end(vbox, hoversel); 211 elm_box_pack_end(vbox, hoversel);
215 eo_unref(hoversel); 212 eo_unref(hoversel);
216 213
217 hoversel = eo_add(ELM_OBJ_HOVERSEL_CLASS, vbox); 214 hoversel = eo_add(ELM_OBJ_HOVERSEL_CLASS, vbox,
218 elm_object_text_set(hoversel, "size");
219 eo_do(hoversel,
220 elm_obj_hoversel_hover_parent_set(me->win), 215 elm_obj_hoversel_hover_parent_set(me->win),
221 eo_key_data_set("fileselector", fs, NULL), 216 eo_key_data_set("fileselector", fs, NULL),
222 elm_obj_hoversel_item_add("tiny", NULL, ELM_ICON_NONE, _tiny_icon_clicked, fs), 217 elm_obj_hoversel_item_add("tiny", NULL, ELM_ICON_NONE, _tiny_icon_clicked, fs),
@@ -225,57 +220,57 @@ fangWin *filesAdd(globals *ourGlobals, char *path, Eina_Bool multi, Eina_Bool sa
225 elm_obj_hoversel_item_add("big", NULL, ELM_ICON_NONE, _big_icon_clicked, fs), 220 elm_obj_hoversel_item_add("big", NULL, ELM_ICON_NONE, _big_icon_clicked, fs),
226 evas_obj_visibility_set(EINA_TRUE) 221 evas_obj_visibility_set(EINA_TRUE)
227 ); 222 );
223 elm_object_text_set(hoversel, "size");
228 elm_box_pack_end(vbox, hoversel); 224 elm_box_pack_end(vbox, hoversel);
229 // Make sure it starts off as small, works around "hitting grid mode before hitting size not showing anything" bug. 225 // Make sure it starts off as small, works around "hitting grid mode before hitting size not showing anything" bug.
230 _small_icon_clicked(fs, hoversel, NULL); 226 _small_icon_clicked(fs, hoversel, NULL);
231 eo_unref(hoversel); 227 eo_unref(hoversel);
232 228
233 229
234 bt = eo_add(ELM_OBJ_CHECK_CLASS, vbox); 230 bt = eo_add(ELM_OBJ_CHECK_CLASS, vbox,
235 elm_object_text_set(bt, "hidden"); 231 elm_obj_check_state_set(elm_fileselector_hidden_visible_get(fs)),
236 eo_do(bt,
237 elm_obj_check_state_set(elm_fileselector_hidden_visible_get(fs)),
238 evas_obj_visibility_set(EINA_TRUE) 232 evas_obj_visibility_set(EINA_TRUE)
239 ); 233 );
234 elm_object_text_set(bt, "hidden");
240 evas_object_smart_callback_add(bt, "changed", _hidden_clicked, fs); 235 evas_object_smart_callback_add(bt, "changed", _hidden_clicked, fs);
241 elm_box_pack_end(vbox, bt); 236 elm_box_pack_end(vbox, bt);
242 eo_unref(bt); 237 eo_unref(bt);
243 238
244 rdg = rd = eo_add(ELM_OBJ_RADIO_CLASS, vbox); 239 rdg = rd = eo_add(ELM_OBJ_RADIO_CLASS, vbox,
245 elm_object_text_set(rd, "grid");
246 eo_do(rd,
247 elm_obj_radio_state_value_set(ELM_FILESELECTOR_GRID), 240 elm_obj_radio_state_value_set(ELM_FILESELECTOR_GRID),
248 evas_obj_visibility_set(EINA_TRUE) 241 evas_obj_visibility_set(EINA_TRUE)
249 ); 242 );
243 elm_object_text_set(rd, "grid");
250 elm_box_pack_end(vbox, rd); 244 elm_box_pack_end(vbox, rd);
251 evas_object_smart_callback_add(rd, "changed", _mode_changed_cb, fs); 245 evas_object_smart_callback_add(rd, "changed", _mode_changed_cb, fs);
252 // Make it start in grid mode. It defaults to list mode, so this swaps it over. 246 // Make it start in grid mode. It defaults to list mode, so this swaps it over.
253 _mode_changed_cb(fs, rd, NULL); 247 _mode_changed_cb(fs, rd, NULL);
254 eo_unref(rd); 248 eo_unref(rd);
255 249
256 rd = eo_add(ELM_OBJ_RADIO_CLASS, vbox); 250 rd = eo_add(ELM_OBJ_RADIO_CLASS, vbox,
257 elm_radio_group_add(rd, rdg);
258 elm_object_text_set(rd, "list");
259 eo_do(rd,
260 elm_obj_radio_state_value_set(ELM_FILESELECTOR_LIST), 251 elm_obj_radio_state_value_set(ELM_FILESELECTOR_LIST),
261 evas_obj_visibility_set(EINA_TRUE) 252 evas_obj_visibility_set(EINA_TRUE)
262 ); 253 );
254 elm_radio_group_add(rd, rdg);
255 elm_object_text_set(rd, "list");
263 elm_box_pack_end(vbox, rd); 256 elm_box_pack_end(vbox, rd);
264 evas_object_smart_callback_add(rd, "changed", _mode_changed_cb, fs); 257 evas_object_smart_callback_add(rd, "changed", _mode_changed_cb, fs);
265 eo_unref(rd); 258 eo_unref(rd);
266 // No need to unref this, it's taken care of already. 259 // No need to unref this, it's taken care of already.
267 //eo_unref(rdg); 260 //eo_unref(rdg);
268 261
269 bt = eo_add(ELM_OBJ_BUTTON_CLASS, me->win); 262 bt = eo_add(ELM_OBJ_BUTTON_CLASS, me->win,
263 evas_obj_visibility_set(EINA_TRUE)
264 );
270 elm_object_text_set(bt, "OK"); 265 elm_object_text_set(bt, "OK");
271 eo_do(bt, evas_obj_visibility_set(EINA_TRUE));
272 evas_object_smart_callback_add(bt, "clicked", _OK_clicked, me); 266 evas_object_smart_callback_add(bt, "clicked", _OK_clicked, me);
273 elm_box_pack_end(vbox, bt); 267 elm_box_pack_end(vbox, bt);
274 eo_unref(bt); 268 eo_unref(bt);
275 269
276 bt = eo_add(ELM_OBJ_BUTTON_CLASS, me->win); 270 bt = eo_add(ELM_OBJ_BUTTON_CLASS, me->win,
271 evas_obj_visibility_set(EINA_TRUE)
272 );
277 elm_object_text_set(bt, "CANCEL"); 273 elm_object_text_set(bt, "CANCEL");
278 eo_do(bt, evas_obj_visibility_set(EINA_TRUE));
279 evas_object_smart_callback_add(bt, "clicked", _CANCEL_clicked, me); 274 evas_object_smart_callback_add(bt, "clicked", _CANCEL_clicked, me);
280 elm_box_pack_end(vbox, bt); 275 elm_box_pack_end(vbox, bt);
281 eo_unref(bt); 276 eo_unref(bt);