forked from enlightenment/efl
Fixing some compiler warnings on filesector widgets.
SVN revision: 48024
This commit is contained in:
parent
7aceaa4a41
commit
24b1c5d025
|
@ -173,25 +173,30 @@ _contract_req(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
|
|||
|
||||
/*** PRIVATES ***/
|
||||
static int
|
||||
_sel_do(struct sel_data *data)
|
||||
_sel_do(void *data)
|
||||
{
|
||||
Widget_Data *wd = elm_widget_data_get(data->fs);
|
||||
const char *path = data->path;
|
||||
struct sel_data *sd;
|
||||
const char *path;
|
||||
Widget_Data *wd;
|
||||
const char *p;
|
||||
|
||||
sd = data;
|
||||
wd = elm_widget_data_get(sd->fs);
|
||||
path = sd->path;
|
||||
|
||||
if (ecore_file_is_dir(path))
|
||||
{
|
||||
// printf("SELECTED DIR: %s\n", path);
|
||||
if (wd->expand)
|
||||
{
|
||||
_do_anchors(data->fs, path);
|
||||
_do_anchors(sd->fs, path);
|
||||
if (wd->entry2) elm_entry_entry_set(wd->entry2, "");
|
||||
}
|
||||
else
|
||||
{
|
||||
// keep a ref to path 'couse it will be destroyed by _populate
|
||||
p = eina_stringshare_add(path);
|
||||
_populate(data->fs, p, NULL);
|
||||
_populate(sd->fs, p, NULL);
|
||||
eina_stringshare_del(p);
|
||||
}
|
||||
goto end;
|
||||
|
@ -203,11 +208,11 @@ _sel_do(struct sel_data *data)
|
|||
elm_entry_entry_set(wd->entry2, ecore_file_file_get(path));
|
||||
}
|
||||
|
||||
evas_object_smart_callback_call(data->fs, SIG_SELECTED, (void*)path);
|
||||
evas_object_smart_callback_call(sd->fs, SIG_SELECTED, (void*)path);
|
||||
|
||||
end:
|
||||
wd->sel_idler = NULL;
|
||||
free(data);
|
||||
free(sd);
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
|
@ -680,7 +685,6 @@ elm_fileselector_expandable_set(Evas_Object *obj, Eina_Bool expand)
|
|||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype);
|
||||
Widget_Data *wd;
|
||||
char *parent;
|
||||
|
||||
wd = elm_widget_data_get(obj);
|
||||
if (!wd) return;
|
||||
|
@ -786,7 +790,6 @@ elm_fileselector_selected_set(Evas_Object *obj, const char *path)
|
|||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
Elm_Genlist_Item *it;
|
||||
if (!wd) return EINA_FALSE;
|
||||
|
||||
if (ecore_file_is_dir(path)) _populate(obj, path, NULL);
|
||||
|
|
|
@ -208,9 +208,9 @@ _new_window_add(Widget_Data *wd)
|
|||
}
|
||||
|
||||
static void
|
||||
_fs_launch(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
_fs_launch(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
|
||||
{
|
||||
Evas_Object *fs_btn, *win, *iw, *fs;
|
||||
Evas_Object *fs_btn, *win, *iw;
|
||||
Eina_Bool win_fallback;
|
||||
Widget_Data *wd;
|
||||
|
||||
|
@ -283,7 +283,7 @@ _selection_done(void *data, Evas_Object *obj, void *event_info)
|
|||
|
||||
win = evas_object_data_del(fs_btn, "win");
|
||||
|
||||
evas_object_smart_callback_call(fs_btn, SIG_FILE_CHOSEN, file);
|
||||
evas_object_smart_callback_call(fs_btn, SIG_FILE_CHOSEN, event_info);
|
||||
if (file) eina_stringshare_replace(&wd->fsd.path, file);
|
||||
|
||||
wd->fs = NULL;
|
||||
|
@ -578,9 +578,9 @@ elm_fileselector_button_expandable_set(Evas_Object *obj, Eina_Bool value)
|
|||
EAPI Eina_Bool
|
||||
elm_fileselector_button_expandable_get(Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return NULL;
|
||||
if (!wd) return EINA_FALSE;
|
||||
|
||||
return wd->fsd.expandable;
|
||||
}
|
||||
|
@ -615,9 +615,9 @@ elm_fileselector_button_folder_only_set(Evas_Object *obj, Eina_Bool value)
|
|||
EAPI Eina_Bool
|
||||
elm_fileselector_button_folder_only_get(Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return NULL;
|
||||
if (!wd) return EINA_FALSE;
|
||||
|
||||
return wd->fsd.folder_only;
|
||||
}
|
||||
|
@ -652,9 +652,9 @@ elm_fileselector_button_is_save_set(Evas_Object *obj, Eina_Bool value)
|
|||
EAPI Eina_Bool
|
||||
elm_fileselector_button_is_save_get(Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return NULL;
|
||||
if (!wd) return EINA_FALSE;
|
||||
|
||||
return wd->fsd.is_save;
|
||||
}
|
||||
|
@ -690,9 +690,9 @@ elm_fileselector_button_inwin_mode_set(Evas_Object *obj, Eina_Bool value)
|
|||
EAPI Eina_Bool
|
||||
elm_fileselector_button_inwin_mode_get(Evas_Object *obj)
|
||||
{
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
|
||||
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
|
||||
Widget_Data *wd = elm_widget_data_get(obj);
|
||||
if (!wd) return NULL;
|
||||
if (!wd) return EINA_FALSE;
|
||||
|
||||
return wd->inwin_mode;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue