2007-06-06 18:14:38 -07:00
|
|
|
#include "e.h"
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
typedef struct _E_Config_Data
|
2007-12-04 08:34:11 -08:00
|
|
|
{
|
|
|
|
const char *title, *icon, *dialog, *filename;
|
2012-06-22 00:30:50 -07:00
|
|
|
Eina_Bool show_autostart;
|
2007-12-04 08:34:11 -08:00
|
|
|
} E_Config_Data;
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
typedef struct _E_Config_App_List
|
2007-12-04 08:34:11 -08:00
|
|
|
{
|
2011-02-27 03:30:20 -08:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
2012-06-22 00:30:50 -07:00
|
|
|
Evas_Object *o_list, *o_add, *o_del, *o_desc;
|
2013-02-04 23:51:50 -08:00
|
|
|
Eina_List *desks, *icons;
|
|
|
|
Ecore_Idler *idler;
|
2011-02-27 03:30:20 -08:00
|
|
|
} E_Config_App_List;
|
|
|
|
|
|
|
|
struct _E_Config_Dialog_Data
|
|
|
|
{
|
2012-06-22 00:30:50 -07:00
|
|
|
E_Config_Data *data;
|
|
|
|
Evas_Object *o_list, *o_up, *o_down, *o_del;
|
|
|
|
Eina_List *apps;
|
|
|
|
Ecore_Timer *fill_delay;
|
2011-02-27 03:30:20 -08:00
|
|
|
E_Config_App_List apps_user;
|
|
|
|
E_Config_App_List apps_xdg; /* xdg autostart apps */
|
2007-12-04 08:34:11 -08:00
|
|
|
};
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2010-04-03 08:37:24 -07:00
|
|
|
/* local function prototypes */
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
static E_Config_Dialog *_create_dialog(E_Comp *comp, E_Config_Data *data);
|
2012-06-22 00:30:50 -07:00
|
|
|
static void *_create_data(E_Config_Dialog *cfd);
|
|
|
|
static void _free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
|
|
|
static Evas_Object *_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata);
|
|
|
|
static int _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata);
|
|
|
|
static Eina_List *_load_menu(const char *path);
|
|
|
|
static Eina_List *_load_order(const char *path);
|
|
|
|
static int _save_menu(E_Config_Dialog_Data *cfdata);
|
|
|
|
static int _save_order(E_Config_Dialog_Data *cfdata);
|
|
|
|
static void _fill_apps_list(E_Config_App_List *apps);
|
|
|
|
static void _fill_xdg_list(E_Config_App_List *apps);
|
|
|
|
static void _fill_order_list(E_Config_Dialog_Data *cfdata);
|
|
|
|
static void _cb_apps_list_selected(void *data);
|
|
|
|
static void _cb_order_list_selected(void *data);
|
|
|
|
static int _cb_desks_name(const void *data1, const void *data2);
|
|
|
|
static int _cb_desks_sort(const void *data1, const void *data2);
|
|
|
|
static void _cb_add(void *data, void *data2 __UNUSED__);
|
|
|
|
static void _cb_del(void *data, void *data2 __UNUSED__);
|
|
|
|
static void _cb_up(void *data, void *data2 __UNUSED__);
|
|
|
|
static void _cb_down(void *data, void *data2 __UNUSED__);
|
|
|
|
static void _cb_order_del(void *data, void *data2 __UNUSED__);
|
|
|
|
static Eina_Bool _cb_fill_delay(void *data);
|
2010-04-03 08:37:24 -07:00
|
|
|
|
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_int_config_apps_add(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
2010-04-03 08:37:24 -07:00
|
|
|
{
|
|
|
|
E_Desktop_Edit *ed;
|
|
|
|
|
2015-03-18 08:33:01 -07:00
|
|
|
if (!(ed = e_desktop_edit(NULL))) return NULL;
|
2010-04-03 08:37:24 -07:00
|
|
|
return ed->cfd;
|
|
|
|
}
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2010-01-22 12:28:39 -08:00
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_int_config_apps_favs(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2007-12-04 08:34:11 -08:00
|
|
|
E_Config_Data *data;
|
2010-04-03 08:37:24 -07:00
|
|
|
char buff[PATH_MAX];
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2010-04-03 08:37:24 -07:00
|
|
|
e_user_dir_concat_static(buff, "applications/menu/favorite.menu");
|
2007-12-04 08:34:11 -08:00
|
|
|
data = E_NEW(E_Config_Data, 1);
|
2010-04-03 08:37:24 -07:00
|
|
|
data->title = eina_stringshare_add(_("Favorite Applications"));
|
2009-09-21 13:36:35 -07:00
|
|
|
data->dialog = eina_stringshare_add("menus/favorites_menu");
|
2009-03-06 14:18:15 -08:00
|
|
|
data->icon = eina_stringshare_add("user-bookmarks");
|
2010-04-03 08:37:24 -07:00
|
|
|
data->filename = eina_stringshare_add(buff);
|
2014-11-02 18:35:13 -08:00
|
|
|
return _create_dialog(NULL, data);
|
2007-12-04 08:34:11 -08:00
|
|
|
}
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2010-01-22 12:28:39 -08:00
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_int_config_apps_ibar(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2007-12-04 08:34:11 -08:00
|
|
|
E_Config_Data *data;
|
2010-04-03 08:37:24 -07:00
|
|
|
char buff[PATH_MAX];
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2010-04-03 08:37:24 -07:00
|
|
|
e_user_dir_concat_static(buff, "applications/bar/default/.order");
|
2007-12-04 08:34:11 -08:00
|
|
|
data = E_NEW(E_Config_Data, 1);
|
2008-10-15 08:12:56 -07:00
|
|
|
data->title = eina_stringshare_add(_("IBar Applications"));
|
2009-09-21 13:36:35 -07:00
|
|
|
data->dialog = eina_stringshare_add("applications/ibar_applications");
|
2009-03-15 10:41:46 -07:00
|
|
|
data->icon = eina_stringshare_add("preferences-applications-ibar");
|
2010-04-03 08:37:24 -07:00
|
|
|
data->filename = eina_stringshare_add(buff);
|
2014-11-02 18:35:13 -08:00
|
|
|
return _create_dialog(NULL, data);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2010-01-22 12:28:39 -08:00
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_int_config_apps_ibar_other(Evas_Object *parent EINA_UNUSED, const char *path)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2007-12-04 08:34:11 -08:00
|
|
|
E_Config_Data *data;
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2007-07-04 04:11:03 -07:00
|
|
|
if (!path) return NULL;
|
2007-12-04 08:34:11 -08:00
|
|
|
data = E_NEW(E_Config_Data, 1);
|
2008-10-15 08:12:56 -07:00
|
|
|
data->title = eina_stringshare_add(_("IBar Applications"));
|
2009-09-21 13:36:35 -07:00
|
|
|
data->dialog = eina_stringshare_add("internal/ibar_other");
|
2009-03-15 10:41:46 -07:00
|
|
|
data->icon = eina_stringshare_add("preferences-applications-ibar");
|
2008-10-15 08:12:56 -07:00
|
|
|
data->filename = eina_stringshare_add(path);
|
2014-11-02 18:35:13 -08:00
|
|
|
return _create_dialog(NULL, data);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2010-01-22 12:28:39 -08:00
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_int_config_apps_startup(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2007-12-04 08:34:11 -08:00
|
|
|
E_Config_Data *data;
|
2010-04-03 08:37:24 -07:00
|
|
|
char buff[PATH_MAX];
|
2007-12-04 08:34:11 -08:00
|
|
|
|
2010-04-03 08:37:24 -07:00
|
|
|
e_user_dir_concat_static(buff, "applications/startup/.order");
|
2007-12-04 08:34:11 -08:00
|
|
|
data = E_NEW(E_Config_Data, 1);
|
2008-10-15 08:12:56 -07:00
|
|
|
data->title = eina_stringshare_add(_("Startup Applications"));
|
2009-09-21 13:36:35 -07:00
|
|
|
data->dialog = eina_stringshare_add("applications/startup_applications");
|
2009-03-15 10:41:46 -07:00
|
|
|
data->icon = eina_stringshare_add("preferences-applications-startup");
|
2010-04-03 08:37:24 -07:00
|
|
|
data->filename = eina_stringshare_add(buff);
|
2011-02-27 03:30:20 -08:00
|
|
|
data->show_autostart = EINA_TRUE;
|
2014-11-02 18:35:13 -08:00
|
|
|
return _create_dialog(NULL, data);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2010-01-22 12:28:39 -08:00
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_int_config_apps_restart(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2007-12-04 08:34:11 -08:00
|
|
|
E_Config_Data *data;
|
2010-04-03 08:37:24 -07:00
|
|
|
char buff[PATH_MAX];
|
2007-12-04 08:34:11 -08:00
|
|
|
|
2010-04-03 08:37:24 -07:00
|
|
|
e_user_dir_concat_static(buff, "applications/restart/.order");
|
2007-12-04 08:34:11 -08:00
|
|
|
data = E_NEW(E_Config_Data, 1);
|
2008-10-15 08:12:56 -07:00
|
|
|
data->title = eina_stringshare_add(_("Restart Applications"));
|
2009-09-21 13:36:35 -07:00
|
|
|
data->dialog = eina_stringshare_add("applications/restart_applications");
|
2009-03-15 10:41:46 -07:00
|
|
|
data->icon = eina_stringshare_add("preferences-applications-restart");
|
2010-04-03 08:37:24 -07:00
|
|
|
data->filename = eina_stringshare_add(buff);
|
2014-11-02 18:35:13 -08:00
|
|
|
return _create_dialog(NULL, data);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2012-07-17 19:26:41 -07:00
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_int_config_apps_desk_lock(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
2012-07-17 19:26:41 -07:00
|
|
|
{
|
|
|
|
E_Config_Data *data;
|
|
|
|
char buff[PATH_MAX];
|
|
|
|
|
2012-07-25 06:54:49 -07:00
|
|
|
e_user_dir_concat_static(buff, "applications/screen-lock/.order");
|
2012-07-17 19:26:41 -07:00
|
|
|
data = E_NEW(E_Config_Data, 1);
|
2012-07-25 06:54:49 -07:00
|
|
|
data->title = eina_stringshare_add(_("Screen Lock Applications"));
|
|
|
|
data->dialog = eina_stringshare_add("applications/screen_lock_applications");
|
|
|
|
data->icon = eina_stringshare_add("preferences-applications-screen-lock");
|
2012-07-17 19:26:41 -07:00
|
|
|
data->filename = eina_stringshare_add(buff);
|
2014-11-02 18:35:13 -08:00
|
|
|
return _create_dialog(NULL, data);
|
2012-07-17 19:26:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
e_int_config_apps_desk_unlock(Evas_Object *parent EINA_UNUSED, const char *params __UNUSED__)
|
2012-07-17 19:26:41 -07:00
|
|
|
{
|
|
|
|
E_Config_Data *data;
|
|
|
|
char buff[PATH_MAX];
|
|
|
|
|
2012-07-25 06:54:49 -07:00
|
|
|
e_user_dir_concat_static(buff, "applications/screen-unlock/.order");
|
2012-07-17 19:26:41 -07:00
|
|
|
data = E_NEW(E_Config_Data, 1);
|
2012-07-25 06:54:49 -07:00
|
|
|
data->title = eina_stringshare_add(_("Screen Unlock Applications"));
|
|
|
|
data->dialog = eina_stringshare_add("applications/screen_unlock_applications");
|
|
|
|
data->icon = eina_stringshare_add("preferences-applications-screen-unlock");
|
2012-07-17 19:26:41 -07:00
|
|
|
data->filename = eina_stringshare_add(buff);
|
2014-11-02 18:35:13 -08:00
|
|
|
return _create_dialog(NULL, data);
|
2012-07-17 19:26:41 -07:00
|
|
|
}
|
|
|
|
|
2010-04-03 08:37:24 -07:00
|
|
|
/* local function prototypes */
|
2007-06-06 18:14:38 -07:00
|
|
|
static E_Config_Dialog *
|
2014-11-02 18:35:13 -08:00
|
|
|
_create_dialog(E_Comp *comp EINA_UNUSED, E_Config_Data *data)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2010-04-04 16:34:36 -07:00
|
|
|
E_Config_Dialog *cfd;
|
2007-06-06 18:14:38 -07:00
|
|
|
E_Config_Dialog_View *v;
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
if (e_config_dialog_find("E", data->dialog))
|
2007-12-04 08:34:11 -08:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
if (data->title) eina_stringshare_del(data->title);
|
|
|
|
if (data->dialog) eina_stringshare_del(data->dialog);
|
|
|
|
if (data->icon) eina_stringshare_del(data->icon);
|
|
|
|
if (data->filename) eina_stringshare_del(data->filename);
|
|
|
|
E_FREE(data);
|
|
|
|
return NULL;
|
2007-12-04 08:34:11 -08:00
|
|
|
}
|
2007-06-06 18:14:38 -07:00
|
|
|
|
|
|
|
v = E_NEW(E_Config_Dialog_View, 1);
|
|
|
|
v->create_cfdata = _create_data;
|
|
|
|
v->free_cfdata = _free_data;
|
|
|
|
v->basic.create_widgets = _basic_create;
|
|
|
|
v->basic.apply_cfdata = _basic_apply;
|
2010-04-03 08:37:24 -07:00
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
cfd = e_config_dialog_new(NULL, data->title, "E", data->dialog,
|
2012-06-22 00:30:50 -07:00
|
|
|
data->icon, 0, v, data);
|
2010-04-04 16:34:36 -07:00
|
|
|
return cfd;
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void *
|
2011-02-27 03:30:20 -08:00
|
|
|
_create_data(E_Config_Dialog *cfd)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2007-06-09 15:08:56 -07:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
2007-12-04 08:34:11 -08:00
|
|
|
E_Config_Data *data;
|
2007-06-09 15:08:56 -07:00
|
|
|
const char *ext;
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2007-12-04 08:34:11 -08:00
|
|
|
if (!(data = cfd->data)) return NULL;
|
|
|
|
if (!data->filename) return NULL;
|
2010-04-03 08:37:24 -07:00
|
|
|
if (!(ext = strrchr(data->filename, '.'))) return NULL;
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2007-12-04 08:34:11 -08:00
|
|
|
cfdata = E_NEW(E_Config_Dialog_Data, 1);
|
|
|
|
cfdata->data = data;
|
2011-02-27 03:30:20 -08:00
|
|
|
cfdata->apps_xdg.cfdata = cfdata;
|
|
|
|
cfdata->apps_user.cfdata = cfdata;
|
2007-12-04 08:34:11 -08:00
|
|
|
if (!strcmp(ext, ".menu"))
|
|
|
|
cfdata->apps = _load_menu(data->filename);
|
2007-06-09 15:08:56 -07:00
|
|
|
else if (!strcmp(ext, ".order"))
|
2007-12-04 08:34:11 -08:00
|
|
|
cfdata->apps = _load_order(data->filename);
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2007-12-04 08:34:11 -08:00
|
|
|
return cfdata;
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
2013-02-04 23:51:50 -08:00
|
|
|
_free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2007-12-04 08:34:11 -08:00
|
|
|
E_Config_Data *data;
|
|
|
|
|
2010-04-08 19:25:21 -07:00
|
|
|
if (cfdata->fill_delay) ecore_timer_del(cfdata->fill_delay);
|
|
|
|
|
2010-04-26 11:26:49 -07:00
|
|
|
if ((data = cfdata->data))
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
if (data->title) eina_stringshare_del(data->title);
|
|
|
|
if (data->dialog) eina_stringshare_del(data->dialog);
|
|
|
|
if (data->icon) eina_stringshare_del(data->icon);
|
|
|
|
if (data->filename) eina_stringshare_del(data->filename);
|
|
|
|
E_FREE(data);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
2013-02-04 23:51:50 -08:00
|
|
|
|
|
|
|
E_FREE_LIST(cfdata->apps, efreet_desktop_free);
|
|
|
|
eina_list_free(cfdata->apps_user.icons);
|
|
|
|
eina_list_free(cfdata->apps_xdg.icons);
|
2013-02-19 04:58:25 -08:00
|
|
|
E_FREE_FUNC(cfdata->apps_user.idler, ecore_idler_del);
|
|
|
|
E_FREE_FUNC(cfdata->apps_xdg.idler, ecore_idler_del);
|
2013-02-04 23:51:50 -08:00
|
|
|
e_widget_ilist_clear(cfdata->apps_xdg.o_list);
|
|
|
|
/* FIXME: this is suuuuper slow and blocking :/ */
|
|
|
|
e_widget_ilist_clear(cfdata->apps_user.o_list);
|
|
|
|
E_FREE_LIST(cfdata->apps_user.desks, efreet_desktop_free);
|
|
|
|
E_FREE_LIST(cfdata->apps_xdg.desks, efreet_desktop_free);
|
|
|
|
free(cfdata);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static Evas_Object *
|
2012-12-06 00:25:47 -08:00
|
|
|
_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
Evas_Object *otb, *ot;
|
2010-04-04 17:40:30 -07:00
|
|
|
int mw;
|
2010-04-03 08:37:24 -07:00
|
|
|
|
2014-12-22 06:02:05 -08:00
|
|
|
e_dialog_resizable_set(cfd->dia, 1);
|
2010-04-03 08:37:24 -07:00
|
|
|
otb = e_widget_toolbook_add(evas, 24, 24);
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
if (cfdata->data->show_autostart)
|
|
|
|
{
|
2012-06-22 00:30:50 -07:00
|
|
|
/* XDG autostart page */
|
2015-01-15 00:04:42 -08:00
|
|
|
ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
|
2012-06-22 00:30:50 -07:00
|
|
|
cfdata->apps_xdg.o_list = e_widget_ilist_add(evas, 24, 24, NULL);
|
|
|
|
e_widget_ilist_multi_select_set(cfdata->apps_xdg.o_list, EINA_TRUE);
|
|
|
|
e_widget_size_min_get(cfdata->apps_xdg.o_list, &mw, NULL);
|
|
|
|
if (mw < (200 * e_scale)) mw = (200 * e_scale);
|
|
|
|
e_widget_size_min_set(cfdata->apps_xdg.o_list, mw, (75 * e_scale));
|
|
|
|
e_widget_table_object_append(ot, cfdata->apps_xdg.o_list, 0, 0, 2, 1, 1, 1, 1, 1);
|
|
|
|
|
|
|
|
cfdata->apps_xdg.o_desc = e_widget_textblock_add(evas);
|
|
|
|
e_widget_size_min_set(cfdata->apps_xdg.o_desc, 100, (45 * e_scale));
|
|
|
|
e_widget_table_object_append(ot, cfdata->apps_xdg.o_desc, 0, 1, 2, 1, 1, 1, 0, 0);
|
|
|
|
|
|
|
|
cfdata->apps_xdg.o_add = e_widget_button_add(evas, _("Add"), "list-add",
|
|
|
|
_cb_add, &cfdata->apps_xdg, NULL);
|
|
|
|
e_widget_disabled_set(cfdata->apps_xdg.o_add, EINA_TRUE);
|
|
|
|
e_widget_table_object_append(ot, cfdata->apps_xdg.o_add, 0, 2, 1, 1, 1, 1, 1, 0);
|
|
|
|
cfdata->apps_xdg.o_del = e_widget_button_add(evas, _("Remove"), "list-remove",
|
|
|
|
_cb_del, &cfdata->apps_xdg, NULL);
|
|
|
|
e_widget_disabled_set(cfdata->apps_xdg.o_del, EINA_TRUE);
|
|
|
|
e_widget_table_object_append(ot, cfdata->apps_xdg.o_del, 1, 2, 1, 1, 1, 1, 1, 0);
|
|
|
|
|
|
|
|
e_widget_toolbook_page_append(otb, NULL, _("System"), ot,
|
|
|
|
1, 1, 1, 1, 0.5, 0.0);
|
2011-02-27 03:30:20 -08:00
|
|
|
}
|
|
|
|
|
2010-04-03 08:37:24 -07:00
|
|
|
/* Selection page */
|
2015-01-15 00:04:42 -08:00
|
|
|
ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
|
2011-02-27 03:30:20 -08:00
|
|
|
cfdata->apps_user.o_list = e_widget_ilist_add(evas, 24, 24, NULL);
|
|
|
|
e_widget_ilist_multi_select_set(cfdata->apps_user.o_list, EINA_TRUE);
|
|
|
|
e_widget_size_min_get(cfdata->apps_user.o_list, &mw, NULL);
|
2010-04-04 17:40:30 -07:00
|
|
|
if (mw < (200 * e_scale)) mw = (200 * e_scale);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_size_min_set(cfdata->apps_user.o_list, mw, (75 * e_scale));
|
|
|
|
e_widget_table_object_append(ot, cfdata->apps_user.o_list, 0, 0, 2, 1, 1, 1, 1, 1);
|
|
|
|
cfdata->apps_user.o_add = e_widget_button_add(evas, _("Add"), "list-add",
|
2012-06-22 00:30:50 -07:00
|
|
|
_cb_add, &cfdata->apps_user, NULL);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_disabled_set(cfdata->apps_user.o_add, EINA_TRUE);
|
|
|
|
e_widget_table_object_append(ot, cfdata->apps_user.o_add, 0, 1, 1, 1, 1, 1, 1, 0);
|
|
|
|
cfdata->apps_user.o_del = e_widget_button_add(evas, _("Remove"), "list-remove",
|
2012-06-22 00:30:50 -07:00
|
|
|
_cb_del, &cfdata->apps_user, NULL);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_disabled_set(cfdata->apps_user.o_del, EINA_TRUE);
|
|
|
|
e_widget_table_object_append(ot, cfdata->apps_user.o_del, 1, 1, 1, 1, 1, 1, 1, 0);
|
|
|
|
e_widget_toolbook_page_append(otb, NULL, _("Applications"), ot,
|
2010-04-03 08:37:24 -07:00
|
|
|
1, 1, 1, 1, 0.5, 0.0);
|
|
|
|
|
|
|
|
/* Order page */
|
2015-01-15 00:04:42 -08:00
|
|
|
ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
|
2011-02-27 03:30:20 -08:00
|
|
|
cfdata->o_list = e_widget_ilist_add(evas, 24, 24, NULL);
|
2010-04-03 08:37:24 -07:00
|
|
|
_fill_order_list(cfdata);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_table_object_append(ot, cfdata->o_list, 0, 0, 3, 1, 1, 1, 1, 1);
|
|
|
|
cfdata->o_up = e_widget_button_add(evas, _("Up"), "go-up",
|
2010-04-03 08:37:24 -07:00
|
|
|
_cb_up, cfdata, NULL);
|
|
|
|
e_widget_disabled_set(cfdata->o_up, EINA_TRUE);
|
|
|
|
e_widget_table_object_append(ot, cfdata->o_up, 0, 1, 1, 1, 1, 1, 1, 0);
|
2011-02-27 03:30:20 -08:00
|
|
|
cfdata->o_down = e_widget_button_add(evas, _("Down"), "go-down",
|
2010-04-03 08:37:24 -07:00
|
|
|
_cb_down, cfdata, NULL);
|
|
|
|
e_widget_disabled_set(cfdata->o_down, EINA_TRUE);
|
|
|
|
e_widget_table_object_append(ot, cfdata->o_down, 1, 1, 1, 1, 1, 1, 1, 0);
|
2011-02-27 03:30:20 -08:00
|
|
|
cfdata->o_del = e_widget_button_add(evas, _("Remove"), "list-remove",
|
2012-06-22 00:30:50 -07:00
|
|
|
_cb_order_del, cfdata, NULL);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_disabled_set(cfdata->o_del, EINA_TRUE);
|
|
|
|
e_widget_table_object_append(ot, cfdata->o_del, 2, 1, 1, 1, 1, 1, 1, 0);
|
|
|
|
e_widget_toolbook_page_append(otb, NULL, _("Order"), ot,
|
2010-04-03 08:37:24 -07:00
|
|
|
1, 1, 1, 1, 0.5, 0.0);
|
|
|
|
|
|
|
|
e_widget_toolbook_page_show(otb, 0);
|
2010-04-04 17:43:12 -07:00
|
|
|
|
2010-04-08 19:25:21 -07:00
|
|
|
if (cfdata->fill_delay) ecore_timer_del(cfdata->fill_delay);
|
|
|
|
cfdata->fill_delay = ecore_timer_add(0.2, _cb_fill_delay, cfdata);
|
|
|
|
|
2014-11-02 18:35:13 -08:00
|
|
|
elm_win_center(cfd->dia->win, 1, 1);
|
2010-04-03 08:37:24 -07:00
|
|
|
return otb;
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static int
|
|
|
|
_basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
const char *ext;
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2007-12-04 08:34:11 -08:00
|
|
|
if ((!cfdata->data) || (!cfdata->data->filename)) return 0;
|
2010-04-03 08:37:24 -07:00
|
|
|
if (!(ext = strrchr(cfdata->data->filename, '.'))) return 0;
|
2007-06-06 18:14:38 -07:00
|
|
|
if (!strcmp(ext, ".menu"))
|
2010-04-03 08:37:24 -07:00
|
|
|
return _save_menu(cfdata);
|
2007-06-06 18:14:38 -07:00
|
|
|
else if (!strcmp(ext, ".order"))
|
2010-04-03 08:37:24 -07:00
|
|
|
return _save_order(cfdata);
|
|
|
|
return 1;
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
static Eina_List *
|
2011-02-27 03:30:20 -08:00
|
|
|
_load_menu(const char *path)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2007-12-04 08:34:11 -08:00
|
|
|
Efreet_Menu *menu, *entry;
|
2010-04-03 08:37:24 -07:00
|
|
|
Eina_List *apps = NULL, *l;
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2007-12-04 08:34:11 -08:00
|
|
|
menu = efreet_menu_parse(path);
|
2012-12-13 05:23:38 -08:00
|
|
|
if ((!menu) || (!menu->entries)) goto end;
|
2011-02-27 03:30:20 -08:00
|
|
|
EINA_LIST_FOREACH(menu->entries, l, entry)
|
2007-12-04 08:34:11 -08:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
if (entry->type != EFREET_MENU_ENTRY_DESKTOP) continue;
|
|
|
|
efreet_desktop_ref(entry->desktop);
|
|
|
|
apps = eina_list_append(apps, entry->desktop);
|
2007-12-04 08:34:11 -08:00
|
|
|
}
|
2012-12-13 05:23:38 -08:00
|
|
|
end:
|
|
|
|
if (menu) efreet_menu_free(menu);
|
2007-12-04 08:34:11 -08:00
|
|
|
return apps;
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
static Eina_List *
|
2011-02-27 03:30:20 -08:00
|
|
|
_load_order(const char *path)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2007-12-04 08:34:11 -08:00
|
|
|
E_Order *order = NULL;
|
2010-04-03 08:37:24 -07:00
|
|
|
Eina_List *apps = NULL, *l;
|
|
|
|
Efreet_Desktop *desk;
|
|
|
|
|
|
|
|
if (!path) return NULL;
|
|
|
|
if (!(order = e_order_new(path))) return NULL;
|
2011-02-27 03:30:20 -08:00
|
|
|
EINA_LIST_FOREACH(order->desktops, l, desk)
|
2007-12-04 08:34:11 -08:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
efreet_desktop_ref(desk);
|
|
|
|
apps = eina_list_append(apps, desk);
|
2007-12-04 08:34:11 -08:00
|
|
|
}
|
2007-07-26 04:27:02 -07:00
|
|
|
e_object_del(E_OBJECT(order));
|
2007-12-04 08:34:11 -08:00
|
|
|
return apps;
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static int
|
|
|
|
_save_menu(E_Config_Dialog_Data *cfdata)
|
2010-04-03 08:37:24 -07:00
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
Efreet_Menu *menu = NULL;
|
2010-11-06 09:48:07 -07:00
|
|
|
Efreet_Desktop *desk;
|
2010-04-03 08:37:24 -07:00
|
|
|
int ret;
|
|
|
|
|
|
|
|
menu = efreet_menu_new("Favorites");
|
2010-11-06 09:48:07 -07:00
|
|
|
EINA_LIST_FOREACH(cfdata->apps, l, desk)
|
2010-04-03 08:37:24 -07:00
|
|
|
{
|
2010-11-06 09:48:07 -07:00
|
|
|
if (!desk) continue;
|
2010-04-03 08:37:24 -07:00
|
|
|
efreet_menu_desktop_insert(menu, desk, -1);
|
|
|
|
}
|
|
|
|
ret = efreet_menu_save(menu, cfdata->data->filename);
|
|
|
|
efreet_menu_free(menu);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static int
|
|
|
|
_save_order(E_Config_Dialog_Data *cfdata)
|
2010-04-03 08:37:24 -07:00
|
|
|
{
|
|
|
|
Eina_List *l;
|
|
|
|
E_Order *order = NULL;
|
2010-11-06 09:48:07 -07:00
|
|
|
Efreet_Desktop *desk;
|
2010-04-03 08:37:24 -07:00
|
|
|
|
|
|
|
if (!(order = e_order_new(cfdata->data->filename))) return 0;
|
|
|
|
e_order_clear(order);
|
2010-11-06 09:48:07 -07:00
|
|
|
EINA_LIST_FOREACH(cfdata->apps, l, desk)
|
2010-04-03 08:37:24 -07:00
|
|
|
{
|
2010-11-06 09:48:07 -07:00
|
|
|
if (!desk) continue;
|
2010-04-03 08:37:24 -07:00
|
|
|
e_order_append(order, desk);
|
|
|
|
}
|
|
|
|
e_object_del(E_OBJECT(order));
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2013-02-04 23:51:50 -08:00
|
|
|
static void
|
|
|
|
_list_item_icon_set(Evas_Object *o, const char *icon)
|
|
|
|
{
|
|
|
|
const char *ext, *path;
|
|
|
|
|
|
|
|
if (!icon) return;
|
|
|
|
|
|
|
|
path = efreet_icon_path_find(e_config->icon_theme, icon, 24);
|
|
|
|
if (!path) return;
|
|
|
|
ext = strrchr(path, '.');
|
|
|
|
if (ext)
|
|
|
|
{
|
|
|
|
if (!strcmp(ext, ".edj"))
|
|
|
|
e_icon_file_edje_set(o, path, "icon");
|
|
|
|
else
|
|
|
|
e_icon_file_set(o, path);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
e_icon_file_set(o, path);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_list_items_icon_set_cb(E_Config_App_List *apps)
|
|
|
|
{
|
|
|
|
unsigned int count = 0;
|
|
|
|
Evas_Object *o;
|
|
|
|
|
|
|
|
EINA_LIST_FREE(apps->icons, o)
|
|
|
|
{
|
|
|
|
if (count++ == 5) break;
|
|
|
|
|
|
|
|
_list_item_icon_set(o, evas_object_data_get(o, "deskicon"));
|
|
|
|
}
|
|
|
|
if (!apps->icons) apps->idler = NULL;
|
|
|
|
return !!apps->icons;
|
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_list_items_state_set(E_Config_App_List *apps)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
|
|
|
Evas *evas;
|
2011-02-27 03:30:20 -08:00
|
|
|
Efreet_Desktop *desk;
|
2013-02-04 23:51:50 -08:00
|
|
|
Eina_List *l;
|
|
|
|
unsigned int count = 0;
|
2011-02-27 03:30:20 -08:00
|
|
|
|
2013-02-04 23:51:50 -08:00
|
|
|
if (!apps->o_list) return;
|
2011-02-27 03:30:20 -08:00
|
|
|
|
|
|
|
evas = evas_object_evas_get(apps->o_list);
|
|
|
|
evas_event_freeze(evas);
|
|
|
|
e_widget_ilist_freeze(apps->o_list);
|
|
|
|
EINA_LIST_FOREACH(apps->desks, l, desk)
|
|
|
|
{
|
2013-02-04 23:51:50 -08:00
|
|
|
Evas_Object *icon = NULL, *end;
|
2011-02-27 03:30:20 -08:00
|
|
|
|
|
|
|
end = edje_object_add(evas);
|
2013-02-04 23:51:50 -08:00
|
|
|
e_theme_edje_object_set(end, "base/theme/widgets", "e/widgets/ilist/toggle_end");
|
2011-02-27 03:30:20 -08:00
|
|
|
|
|
|
|
if (eina_list_search_unsorted(apps->cfdata->apps, _cb_desks_sort, desk))
|
|
|
|
{
|
|
|
|
edje_object_signal_emit(end, "e,state,checked", "e");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-06-22 00:30:50 -07:00
|
|
|
edje_object_signal_emit(end, "e,state,unchecked", "e");
|
2011-02-27 03:30:20 -08:00
|
|
|
}
|
|
|
|
|
2013-02-04 23:51:50 -08:00
|
|
|
if (desk->icon)
|
|
|
|
{
|
|
|
|
icon = e_icon_add(evas);
|
|
|
|
e_icon_scale_size_set(icon, 24);
|
|
|
|
e_icon_preload_set(icon, 1);
|
|
|
|
e_icon_fill_inside_set(icon, 1);
|
|
|
|
if (count++ > 10)
|
|
|
|
{
|
|
|
|
evas_object_data_set(icon, "deskicon", desk->icon);
|
|
|
|
apps->icons = eina_list_append(apps->icons, icon);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
_list_item_icon_set(icon, desk->icon);
|
|
|
|
}
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_append_full(apps->o_list, icon, end, desk->name,
|
|
|
|
_cb_apps_list_selected, apps, NULL);
|
|
|
|
}
|
2013-02-04 23:51:50 -08:00
|
|
|
if (apps->icons) apps->idler = ecore_idler_add((Ecore_Task_Cb)_list_items_icon_set_cb, apps);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_thaw(apps->o_list);
|
|
|
|
evas_event_thaw(evas);
|
|
|
|
}
|
|
|
|
|
2013-02-04 23:51:50 -08:00
|
|
|
static void
|
|
|
|
_list_items_state_idler_start(E_Config_App_List *apps)
|
|
|
|
{
|
|
|
|
if (apps->idler) return;
|
|
|
|
e_widget_ilist_clear(apps->o_list);
|
|
|
|
_list_items_state_set(apps);
|
|
|
|
e_widget_ilist_go(apps->o_list);
|
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_fill_apps_list(E_Config_App_List *apps)
|
|
|
|
{
|
|
|
|
Eina_List *desks = NULL;
|
|
|
|
Efreet_Desktop *desk = NULL;
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2007-12-04 08:34:11 -08:00
|
|
|
desks = efreet_util_desktop_name_glob_list("*");
|
2011-02-27 03:30:20 -08:00
|
|
|
EINA_LIST_FREE(desks, desk)
|
2010-03-01 08:59:01 -08:00
|
|
|
{
|
2010-11-06 09:48:07 -07:00
|
|
|
Eina_List *ll;
|
|
|
|
|
2010-11-06 09:54:51 -07:00
|
|
|
if (desk->no_display)
|
|
|
|
{
|
|
|
|
efreet_desktop_free(desk);
|
|
|
|
continue;
|
|
|
|
}
|
2011-02-27 03:30:20 -08:00
|
|
|
ll = eina_list_search_unsorted_list(apps->desks, _cb_desks_sort, desk);
|
2010-11-06 09:48:07 -07:00
|
|
|
if (ll)
|
|
|
|
{
|
|
|
|
Efreet_Desktop *old;
|
|
|
|
|
|
|
|
old = eina_list_data_get(ll);
|
|
|
|
/*
|
|
|
|
* This fixes when we have several .desktop with the same name,
|
|
|
|
* and the only difference is that some of them are for specific
|
|
|
|
* desktops.
|
|
|
|
*/
|
2011-02-27 03:30:20 -08:00
|
|
|
if ((old->only_show_in) && (!desk->only_show_in))
|
2010-11-06 09:48:07 -07:00
|
|
|
{
|
|
|
|
efreet_desktop_free(old);
|
|
|
|
eina_list_data_set(ll, desk);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
efreet_desktop_free(desk);
|
|
|
|
}
|
2010-04-03 08:37:24 -07:00
|
|
|
else
|
2011-02-27 03:30:20 -08:00
|
|
|
apps->desks = eina_list_append(apps->desks, desk);
|
2007-12-04 08:34:11 -08:00
|
|
|
}
|
2011-02-27 03:30:20 -08:00
|
|
|
apps->desks = eina_list_sort(apps->desks, -1, _cb_desks_sort);
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
|
2013-02-04 23:51:50 -08:00
|
|
|
_list_items_state_idler_start(apps);
|
2011-02-27 03:30:20 -08:00
|
|
|
}
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_fill_xdg_list(E_Config_App_List *apps)
|
|
|
|
{
|
|
|
|
Eina_List *files;
|
|
|
|
Efreet_Desktop *desk = NULL;
|
|
|
|
const char *path = "/etc/xdg/autostart";
|
|
|
|
char *file, *ext;
|
|
|
|
char buf[4096];
|
|
|
|
|
|
|
|
files = ecore_file_ls(path);
|
|
|
|
EINA_LIST_FREE(files, file)
|
2010-03-01 08:59:01 -08:00
|
|
|
{
|
2012-06-22 00:30:50 -07:00
|
|
|
Eina_List *ll;
|
2010-04-03 08:37:24 -07:00
|
|
|
|
2012-06-22 00:30:50 -07:00
|
|
|
if ((file[0] == '.') || !(ext = strrchr(file, '.')) || (strcmp(ext, ".desktop")))
|
|
|
|
{
|
|
|
|
free(file);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
snprintf(buf, sizeof(buf), "%s/%s", path, file);
|
|
|
|
free(file);
|
2010-04-03 08:37:24 -07:00
|
|
|
|
2012-06-22 00:30:50 -07:00
|
|
|
desk = efreet_desktop_new(buf);
|
|
|
|
if (!desk)
|
|
|
|
continue;
|
2011-02-27 03:30:20 -08:00
|
|
|
|
|
|
|
ll = eina_list_search_unsorted_list(apps->desks, _cb_desks_sort, desk);
|
|
|
|
if (ll)
|
2010-04-03 08:37:24 -07:00
|
|
|
{
|
2011-02-27 03:30:20 -08:00
|
|
|
Efreet_Desktop *old;
|
2007-12-04 08:34:11 -08:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
old = eina_list_data_get(ll);
|
|
|
|
/*
|
|
|
|
* This fixes when we have several .desktop with the same name,
|
|
|
|
* and the only difference is that some of them are for specific
|
|
|
|
* desktops.
|
|
|
|
*/
|
|
|
|
if ((old->only_show_in) && (!desk->only_show_in))
|
|
|
|
{
|
|
|
|
efreet_desktop_free(old);
|
|
|
|
eina_list_data_set(ll, desk);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
efreet_desktop_free(desk);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
apps->desks = eina_list_append(apps->desks, desk);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
apps->desks = eina_list_sort(apps->desks, -1, _cb_desks_sort);
|
|
|
|
|
2013-02-04 23:51:50 -08:00
|
|
|
_list_items_state_idler_start(apps);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_fill_order_list(E_Config_Dialog_Data *cfdata)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2010-04-26 11:26:49 -07:00
|
|
|
Eina_List *l = NULL;
|
2007-12-04 08:34:11 -08:00
|
|
|
Efreet_Desktop *desk = NULL;
|
2007-06-06 18:14:38 -07:00
|
|
|
Evas *evas;
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
evas = evas_object_evas_get(cfdata->o_list);
|
2007-06-06 18:14:38 -07:00
|
|
|
evas_event_freeze(evas);
|
|
|
|
edje_freeze();
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_freeze(cfdata->o_list);
|
|
|
|
e_widget_ilist_clear(cfdata->o_list);
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
EINA_LIST_FOREACH(cfdata->apps, l, desk)
|
2010-03-01 08:59:01 -08:00
|
|
|
{
|
|
|
|
Evas_Object *icon = NULL;
|
|
|
|
|
|
|
|
icon = e_util_desktop_icon_add(desk, 24, evas);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_append(cfdata->o_list, icon, desk->name,
|
2010-04-03 08:37:24 -07:00
|
|
|
_cb_order_list_selected, cfdata, NULL);
|
2010-03-01 08:59:01 -08:00
|
|
|
}
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_go(cfdata->o_list);
|
|
|
|
e_widget_ilist_thaw(cfdata->o_list);
|
2007-06-06 18:14:38 -07:00
|
|
|
edje_thaw();
|
|
|
|
evas_event_thaw(evas);
|
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_cb_apps_list_selected(void *data)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2011-02-27 03:30:20 -08:00
|
|
|
E_Config_App_List *apps;
|
2010-04-03 08:37:24 -07:00
|
|
|
const E_Ilist_Item *it;
|
2012-09-12 06:03:04 -07:00
|
|
|
const Eina_List *l;
|
2010-04-03 08:37:24 -07:00
|
|
|
unsigned int enabled = 0, disabled = 0;
|
2007-12-04 08:34:11 -08:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
if (!(apps = data)) return;
|
|
|
|
EINA_LIST_FOREACH(e_widget_ilist_items_get(apps->o_list), l, it)
|
2010-04-03 08:37:24 -07:00
|
|
|
{
|
|
|
|
if ((!it->selected) || (it->header)) continue;
|
2011-02-27 03:30:20 -08:00
|
|
|
if (eina_list_search_unsorted(apps->cfdata->apps, _cb_desks_name, it->label))
|
2010-04-03 08:37:24 -07:00
|
|
|
enabled++;
|
|
|
|
else
|
|
|
|
disabled++;
|
|
|
|
}
|
2011-02-27 04:06:27 -08:00
|
|
|
|
|
|
|
if (apps->o_desc)
|
|
|
|
{
|
2012-06-22 00:30:50 -07:00
|
|
|
Efreet_Desktop *desk;
|
|
|
|
int sel;
|
2011-02-27 04:06:27 -08:00
|
|
|
|
2012-06-22 00:30:50 -07:00
|
|
|
sel = e_widget_ilist_selected_get(apps->o_list);
|
|
|
|
desk = eina_list_nth(apps->desks, sel);
|
|
|
|
if (desk)
|
|
|
|
e_widget_textblock_markup_set(apps->o_desc, desk->comment);
|
2011-02-27 04:06:27 -08:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_disabled_set(apps->o_add, !disabled);
|
|
|
|
e_widget_disabled_set(apps->o_del, !enabled);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_cb_order_list_selected(void *data)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
|
|
|
int sel, count;
|
2007-12-04 08:34:11 -08:00
|
|
|
|
|
|
|
if (!(cfdata = data)) return;
|
2011-02-27 03:30:20 -08:00
|
|
|
sel = e_widget_ilist_selected_get(cfdata->o_list);
|
2010-12-20 05:37:57 -08:00
|
|
|
count = eina_list_count(cfdata->apps);
|
2010-04-03 08:37:24 -07:00
|
|
|
e_widget_disabled_set(cfdata->o_up, (sel == 0));
|
|
|
|
e_widget_disabled_set(cfdata->o_down, !(sel < (count - 1)));
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_disabled_set(cfdata->o_del, EINA_FALSE);
|
2007-12-04 08:34:11 -08:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static int
|
|
|
|
_cb_desks_name(const void *data1, const void *data2)
|
2010-11-06 09:48:07 -07:00
|
|
|
{
|
|
|
|
const Efreet_Desktop *d1;
|
|
|
|
const char *d2;
|
|
|
|
|
|
|
|
if (!(d1 = data1)) return 1;
|
|
|
|
if (!d1->name) return 1;
|
|
|
|
if (!(d2 = data2)) return -1;
|
|
|
|
return strcmp(d1->name, d2);
|
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static int
|
|
|
|
_cb_desks_sort(const void *data1, const void *data2)
|
2007-12-04 08:34:11 -08:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
const Efreet_Desktop *d1, *d2;
|
2007-07-10 04:15:34 -07:00
|
|
|
|
2010-04-03 08:37:24 -07:00
|
|
|
if (!(d1 = data1)) return 1;
|
|
|
|
if (!d1->name) return 1;
|
|
|
|
if (!(d2 = data2)) return -1;
|
|
|
|
if (!d2->name) return -1;
|
|
|
|
return strcmp(d1->name, d2->name);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_cb_add(void *data, void *data2 __UNUSED__)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2011-02-27 03:30:20 -08:00
|
|
|
E_Config_App_List *apps;
|
2010-04-03 08:37:24 -07:00
|
|
|
const E_Ilist_Item *it;
|
2012-09-12 06:03:04 -07:00
|
|
|
const Eina_List *l;
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
if (!(apps = data)) return;
|
|
|
|
EINA_LIST_FOREACH(e_widget_ilist_items_get(apps->o_list), l, it)
|
2007-12-04 08:34:11 -08:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
Efreet_Desktop *desk;
|
|
|
|
|
|
|
|
if ((!it->selected) || (it->header)) continue;
|
2011-02-27 03:30:20 -08:00
|
|
|
if (!(desk = eina_list_search_unsorted(apps->desks, _cb_desks_name, it->label))) continue;
|
|
|
|
if (!eina_list_search_unsorted(apps->cfdata->apps, _cb_desks_sort, desk))
|
2010-04-03 08:37:24 -07:00
|
|
|
{
|
|
|
|
Evas_Object *end;
|
|
|
|
|
|
|
|
end = e_widget_ilist_item_end_get(it);
|
|
|
|
if (end) edje_object_signal_emit(end, "e,state,checked", "e");
|
|
|
|
efreet_desktop_ref(desk);
|
2011-02-27 03:30:20 -08:00
|
|
|
apps->cfdata->apps = eina_list_append(apps->cfdata->apps, desk);
|
2010-04-03 08:37:24 -07:00
|
|
|
}
|
2007-12-04 08:34:11 -08:00
|
|
|
}
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_unselect(apps->o_list);
|
|
|
|
e_widget_disabled_set(apps->o_add, EINA_TRUE);
|
|
|
|
e_widget_disabled_set(apps->o_del, EINA_TRUE);
|
|
|
|
_fill_order_list(apps->cfdata);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_cb_del(void *data, void *data2 __UNUSED__)
|
2007-06-06 18:14:38 -07:00
|
|
|
{
|
2011-02-27 03:30:20 -08:00
|
|
|
E_Config_App_List *apps;
|
2010-04-03 08:37:24 -07:00
|
|
|
const E_Ilist_Item *it;
|
2012-09-12 06:03:04 -07:00
|
|
|
const Eina_List *l;
|
2007-06-06 18:14:38 -07:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
if (!(apps = data)) return;
|
|
|
|
EINA_LIST_FOREACH(e_widget_ilist_items_get(apps->o_list), l, it)
|
2007-07-26 04:27:02 -07:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
Efreet_Desktop *desk;
|
|
|
|
|
|
|
|
if ((!it->selected) || (it->header)) continue;
|
2011-02-27 03:30:20 -08:00
|
|
|
if ((desk = eina_list_search_unsorted(apps->cfdata->apps, _cb_desks_name, it->label)))
|
2010-04-03 08:37:24 -07:00
|
|
|
{
|
|
|
|
Evas_Object *end;
|
|
|
|
|
|
|
|
end = e_widget_ilist_item_end_get(it);
|
|
|
|
if (end) edje_object_signal_emit(end, "e,state,unchecked", "e");
|
2011-02-27 03:30:20 -08:00
|
|
|
apps->cfdata->apps = eina_list_remove(apps->cfdata->apps, desk);
|
2010-12-20 04:49:01 -08:00
|
|
|
efreet_desktop_unref(desk);
|
2010-04-03 08:37:24 -07:00
|
|
|
}
|
2007-07-26 04:27:02 -07:00
|
|
|
}
|
2011-02-27 03:30:20 -08:00
|
|
|
|
|
|
|
e_widget_ilist_unselect(apps->o_list);
|
|
|
|
e_widget_disabled_set(apps->o_add, EINA_TRUE);
|
|
|
|
e_widget_disabled_set(apps->o_del, EINA_TRUE);
|
|
|
|
_fill_order_list(apps->cfdata);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_cb_order_del(void *data, void *data2 __UNUSED__)
|
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
|
|
|
const E_Ilist_Item *it;
|
2012-09-12 06:03:04 -07:00
|
|
|
const Eina_List *l;
|
2011-02-27 03:30:20 -08:00
|
|
|
|
|
|
|
if (!(cfdata = data)) return;
|
|
|
|
EINA_LIST_FOREACH(e_widget_ilist_items_get(cfdata->o_list), l, it)
|
|
|
|
{
|
2012-06-22 00:30:50 -07:00
|
|
|
Efreet_Desktop *desk;
|
2011-02-27 03:30:20 -08:00
|
|
|
|
|
|
|
if ((!it->selected) || (it->header)) continue;
|
|
|
|
|
2012-06-22 00:30:50 -07:00
|
|
|
if ((desk = eina_list_search_unsorted(cfdata->apps, _cb_desks_name, it->label)))
|
|
|
|
{
|
|
|
|
cfdata->apps = eina_list_remove(cfdata->apps, desk);
|
|
|
|
efreet_desktop_unref(desk);
|
|
|
|
}
|
2011-02-27 03:30:20 -08:00
|
|
|
}
|
|
|
|
|
2013-02-04 23:51:50 -08:00
|
|
|
_list_items_state_idler_start(&(cfdata->apps_xdg));
|
|
|
|
_list_items_state_idler_start(&(cfdata->apps_user));
|
2011-02-27 03:30:20 -08:00
|
|
|
|
2010-04-03 08:37:24 -07:00
|
|
|
e_widget_ilist_unselect(cfdata->o_list);
|
|
|
|
e_widget_disabled_set(cfdata->o_del, EINA_TRUE);
|
|
|
|
_fill_order_list(cfdata);
|
2007-06-06 18:14:38 -07:00
|
|
|
}
|
2007-07-10 04:15:34 -07:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_cb_up(void *data, void *data2 __UNUSED__)
|
2007-07-10 04:15:34 -07:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
2010-12-20 04:49:14 -08:00
|
|
|
Eina_List *l;
|
2007-07-10 04:15:34 -07:00
|
|
|
Evas *evas;
|
2007-12-04 08:34:11 -08:00
|
|
|
const char *lbl;
|
2010-04-03 08:37:24 -07:00
|
|
|
int sel;
|
2007-07-10 04:15:34 -07:00
|
|
|
|
2007-12-04 08:34:11 -08:00
|
|
|
if (!(cfdata = data)) return;
|
2011-02-27 03:30:20 -08:00
|
|
|
evas = evas_object_evas_get(cfdata->o_list);
|
2007-07-10 04:15:34 -07:00
|
|
|
evas_event_freeze(evas);
|
|
|
|
edje_freeze();
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_freeze(cfdata->o_list);
|
2010-04-03 08:37:24 -07:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
sel = e_widget_ilist_selected_get(cfdata->o_list);
|
|
|
|
lbl = e_widget_ilist_selected_label_get(cfdata->o_list);
|
2010-12-20 04:49:14 -08:00
|
|
|
if ((l = eina_list_search_unsorted_list(cfdata->apps, _cb_desks_name, lbl)))
|
2007-07-10 04:15:34 -07:00
|
|
|
{
|
2010-12-20 04:49:14 -08:00
|
|
|
Efreet_Desktop *desk;
|
2010-04-03 08:37:24 -07:00
|
|
|
Evas_Object *icon = NULL;
|
|
|
|
|
2010-12-20 04:49:14 -08:00
|
|
|
desk = eina_list_data_get(l);
|
|
|
|
if (l->prev)
|
|
|
|
{
|
|
|
|
Eina_List *ll;
|
|
|
|
|
|
|
|
ll = l->prev;
|
|
|
|
cfdata->apps = eina_list_remove_list(cfdata->apps, l);
|
2010-12-20 06:05:07 -08:00
|
|
|
cfdata->apps = eina_list_prepend_relative_list(cfdata->apps, desk, ll);
|
2010-12-20 05:37:40 -08:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_remove_num(cfdata->o_list, sel);
|
|
|
|
e_widget_ilist_go(cfdata->o_list);
|
2010-12-20 06:04:56 -08:00
|
|
|
icon = e_util_desktop_icon_add(desk, 24, evas);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_prepend_relative(cfdata->o_list, icon, desk->name,
|
|
|
|
_cb_order_list_selected, cfdata,
|
2010-12-20 06:04:56 -08:00
|
|
|
NULL, (sel - 1));
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_selected_set(cfdata->o_list, (sel - 1));
|
2010-12-20 06:04:56 -08:00
|
|
|
}
|
2007-07-10 04:15:34 -07:00
|
|
|
}
|
2010-04-03 08:37:24 -07:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_go(cfdata->o_list);
|
|
|
|
e_widget_ilist_thaw(cfdata->o_list);
|
2007-12-04 08:34:11 -08:00
|
|
|
edje_thaw();
|
|
|
|
evas_event_thaw(evas);
|
2007-07-10 04:15:34 -07:00
|
|
|
}
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
static void
|
|
|
|
_cb_down(void *data, void *data2 __UNUSED__)
|
2007-07-10 04:15:34 -07:00
|
|
|
{
|
2010-04-03 08:37:24 -07:00
|
|
|
E_Config_Dialog_Data *cfdata;
|
2010-12-20 04:49:14 -08:00
|
|
|
Eina_List *l;
|
2007-07-10 04:15:34 -07:00
|
|
|
Evas *evas;
|
2007-12-04 08:34:11 -08:00
|
|
|
const char *lbl;
|
2010-04-03 08:37:24 -07:00
|
|
|
int sel;
|
2007-07-10 04:15:34 -07:00
|
|
|
|
2007-12-04 08:34:11 -08:00
|
|
|
if (!(cfdata = data)) return;
|
2011-02-27 03:30:20 -08:00
|
|
|
evas = evas_object_evas_get(cfdata->o_list);
|
2007-07-10 04:15:34 -07:00
|
|
|
evas_event_freeze(evas);
|
|
|
|
edje_freeze();
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_freeze(cfdata->o_list);
|
2007-12-04 08:34:11 -08:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
sel = e_widget_ilist_selected_get(cfdata->o_list);
|
|
|
|
lbl = e_widget_ilist_selected_label_get(cfdata->o_list);
|
2010-12-20 04:49:14 -08:00
|
|
|
if ((l = eina_list_search_unsorted_list(cfdata->apps, _cb_desks_name, lbl)))
|
2007-07-10 04:15:34 -07:00
|
|
|
{
|
2010-12-20 04:49:14 -08:00
|
|
|
Efreet_Desktop *desk;
|
2010-04-03 08:37:24 -07:00
|
|
|
Evas_Object *icon = NULL;
|
2007-07-26 04:27:02 -07:00
|
|
|
|
2010-12-20 04:49:14 -08:00
|
|
|
desk = eina_list_data_get(l);
|
|
|
|
if (l->next)
|
|
|
|
{
|
|
|
|
Eina_List *ll;
|
|
|
|
|
|
|
|
ll = l->next;
|
|
|
|
cfdata->apps = eina_list_remove_list(cfdata->apps, l);
|
2010-12-20 06:05:07 -08:00
|
|
|
cfdata->apps = eina_list_append_relative_list(cfdata->apps, desk, ll);
|
2010-12-20 05:37:40 -08:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_remove_num(cfdata->o_list, sel);
|
|
|
|
e_widget_ilist_go(cfdata->o_list);
|
2010-12-20 06:04:56 -08:00
|
|
|
icon = e_util_desktop_icon_add(desk, 24, evas);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_append_relative(cfdata->o_list, icon, desk->name,
|
|
|
|
_cb_order_list_selected, cfdata,
|
2010-12-20 06:04:56 -08:00
|
|
|
NULL, sel);
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_selected_set(cfdata->o_list, (sel + 1));
|
2010-12-20 06:04:56 -08:00
|
|
|
}
|
2007-07-10 04:15:34 -07:00
|
|
|
}
|
2010-04-03 08:37:24 -07:00
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
e_widget_ilist_go(cfdata->o_list);
|
|
|
|
e_widget_ilist_thaw(cfdata->o_list);
|
2010-04-03 08:37:24 -07:00
|
|
|
edje_thaw();
|
|
|
|
evas_event_thaw(evas);
|
2007-07-10 04:15:34 -07:00
|
|
|
}
|
2010-04-08 19:25:21 -07:00
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_cb_fill_delay(void *data)
|
2010-04-08 19:25:21 -07:00
|
|
|
{
|
|
|
|
E_Config_Dialog_Data *cfdata;
|
|
|
|
int mw;
|
|
|
|
|
2011-02-27 03:30:20 -08:00
|
|
|
if (!(cfdata = data)) return ECORE_CALLBACK_CANCEL;
|
|
|
|
_fill_apps_list(&cfdata->apps_user);
|
|
|
|
e_widget_size_min_get(cfdata->apps_user.o_list, &mw, NULL);
|
2010-04-08 19:25:21 -07:00
|
|
|
if (mw < (200 * e_scale)) mw = (200 * e_scale);
|
2011-02-27 04:06:27 -08:00
|
|
|
e_widget_size_min_set(cfdata->apps_user.o_list, mw, (175 * e_scale));
|
2011-02-27 03:30:20 -08:00
|
|
|
|
|
|
|
if (cfdata->data->show_autostart)
|
|
|
|
{
|
2012-06-22 00:30:50 -07:00
|
|
|
_fill_xdg_list(&cfdata->apps_xdg);
|
|
|
|
e_widget_size_min_get(cfdata->apps_xdg.o_list, &mw, NULL);
|
|
|
|
if (mw < (200 * e_scale)) mw = (200 * e_scale);
|
|
|
|
e_widget_size_min_set(cfdata->apps_xdg.o_list, mw, (175 * e_scale));
|
2011-02-27 03:30:20 -08:00
|
|
|
}
|
|
|
|
|
2010-04-08 19:25:21 -07:00
|
|
|
cfdata->fill_delay = NULL;
|
2010-06-24 09:19:12 -07:00
|
|
|
return ECORE_CALLBACK_CANCEL;
|
2010-04-08 19:25:21 -07:00
|
|
|
}
|
2012-06-22 00:30:50 -07:00
|
|
|
|