tree-wide: get rid of trailing whitespace

Remove trailing whitespaces

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11826
enlightenment-0.24
Elyes HAOUAS 3 years ago committed by Stefan Schmidt
parent 28080ccc04
commit 9f3fcf2225
  1. 16
      src/modules/conf_display/e_int_config_desks.c
  2. 26
      src/modules/conf_display/e_int_config_screensaver.c
  3. 36
      src/modules/conf_display/e_mod_main.c
  4. 38
      src/modules/conf_interaction/e_int_config_interaction.c
  5. 4
      src/modules/conf_interaction/e_int_config_mouse.c
  6. 16
      src/modules/conf_interaction/e_mod_main.c
  7. 70
      src/modules/conf_menus/e_int_config_menus.c
  8. 54
      src/modules/conf_paths/e_int_config_paths.c

@ -31,10 +31,10 @@ e_int_config_desks(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUS
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "screen/virtual_desktops")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
/* methods */
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
@ -126,7 +126,7 @@ _basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata
if (cfdata->flip_mode)
e_config->desk_flip_animate_type = eina_stringshare_ref(eina_list_nth(cfdata->comp_effects, cfdata->flip_mode));
e_config->desk_flip_animate_interpolation = cfdata->flip_interp;
e_config->edge_flip_dragging = cfdata->edge_flip_dragging;
e_config->desk_flip_wrap = cfdata->flip_wrap;
@ -167,7 +167,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
int mode = 0;
otb = e_widget_toolbook_add(evas, (48 * e_scale), (48 * e_scale));
of = e_widget_frametable_add(evas, _("Number of Desktops"), 0);
e_widget_frametable_content_align_set(of, 0.5, 0.0);
@ -178,12 +178,12 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
e_widget_frametable_object_append(of, ob, 0, 1, 1, 1, 1, 1, 1, 1);
cfdata->preview = ob;
ob = e_widget_slider_add(evas, 0, 0, _("%1.0f"), 1.0, 12.0, 1.0, 0, NULL,
ob = e_widget_slider_add(evas, 0, 0, _("%1.0f"), 1.0, 12.0, 1.0, 0, NULL,
&(cfdata->y), 150);
e_widget_on_change_hook_set(ob, _cb_slider_change, cfdata);
e_widget_frametable_object_append(of, ob, 1, 1, 1, 1, 1, 1, 0, 1);
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f"), 1.0, 12.0, 1.0, 0, NULL,
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f"), 1.0, 12.0, 1.0, 0, NULL,
&(cfdata->x), 200);
e_widget_on_change_hook_set(ob, _cb_slider_change, cfdata);
e_widget_frametable_object_append(of, ob, 0, 2, 1, 1, 1, 1, 1, 0);
@ -193,11 +193,11 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
o = e_widget_list_add(evas, 0, 0);
ob = e_widget_check_add(evas, _("Flip when dragging objects to the screen edge"),
ob = e_widget_check_add(evas, _("Flip when dragging objects to the screen edge"),
&(cfdata->edge_flip_dragging));
e_widget_list_object_append(o, ob, 1, 1, 0.);
ob = e_widget_check_add(evas, _("Wrap desktops around when flipping"),
ob = e_widget_check_add(evas, _("Wrap desktops around when flipping"),
&(cfdata->flip_wrap));
e_widget_list_object_append(o, ob, 1, 0, 0.5);

@ -24,7 +24,7 @@ struct _E_Config_Dialog_Data
double desklock_timeout;
int ask_presentation;
double ask_presentation_timeout;
int screensaver_suspend;
int screensaver_hibernate;
int screensaver_suspend_on_ac;
@ -37,7 +37,7 @@ struct _E_Config_Dialog_Data
int no_dpms_on_fullscreen;
int use_dpms;
struct
struct
{
Evas_Object *ask_presentation_slider;
Evas_Object *slider_suspend_seconds;
@ -144,14 +144,14 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
e_config->dpms_suspend_timeout = e_config->screensaver_timeout;
e_config->dpms_off_timeout = e_config->screensaver_timeout;
}
e_config->no_dpms_on_fullscreen = cfdata->no_dpms_on_fullscreen;
e_config->screensaver_dpms_off = !cfdata->use_dpms;
/* Apply settings */
e_screensaver_update();
e_dpms_update();
e_config_save_queue();
return 1;
}
@ -201,7 +201,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
oc2 = e_widget_check_add(evas, _("Use Power Saving (DPMS)"),
&(cfdata->use_dpms));
e_widget_list_object_append(ol, oc2, 1, 1, 0.5);
ow = e_widget_label_add(evas, _("Timeout"));
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
@ -209,7 +209,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
0.1, 60.0, 0.1, 0, &(cfdata->timeout), NULL, 100);
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
ow = e_widget_label_add(evas, _("Special timeout when locked (0 is off)"));
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
@ -217,8 +217,8 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
0.0, 60.0, 1.0, 0, &(cfdata->desklock_timeout), NULL, 100);
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
ow = e_widget_check_add(evas, _("Suspend on blank"),
ow = e_widget_check_add(evas, _("Suspend on blank"),
&(cfdata->screensaver_suspend));
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
@ -232,7 +232,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
ow = e_widget_label_add(evas, _("Suspend delay"));
e_widget_check_widget_disable_on_unchecked_add(oc, ow);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
@ -254,7 +254,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
&(cfdata->no_dpms_on_fullscreen));
e_widget_list_object_append(ol, oc, 1, 1, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Blanking"), ol,
e_widget_toolbook_page_append(otb, NULL, _("Blanking"), ol,
1, 1, 1, 0, 0.0, 0.0);
/* Wakeups */
@ -269,7 +269,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
1, 1, 1, 0, 0.0, 0.0);
/* Presentation */
ol = e_widget_list_add(evas, 0, 0);
oc2 = e_widget_check_add(evas, _("Suggest if deactivated before"),
oc2 = e_widget_check_add(evas, _("Suggest if deactivated before"),
&(cfdata->ask_presentation));
e_widget_check_widget_disable_on_unchecked_add(oc, oc2);
e_widget_list_object_append(ol, oc2, 1, 1, 0.5);
@ -283,7 +283,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Presentation"), ol,
1, 1, 1, 0, 0.0, 0.0);
e_widget_toolbook_page_show(otb, 0);
return otb;

@ -14,37 +14,37 @@ E_API E_Module_Api e_modapi =
E_API void *
e_modapi_init(E_Module *m)
{
e_configure_registry_category_add("screen", 30, _("Screen"), NULL,
e_configure_registry_category_add("screen", 30, _("Screen"), NULL,
"preferences-desktop-display");
e_configure_registry_item_add("screen/virtual_desktops", 10,
_("Virtual Desktops"), NULL,
"preferences-desktop", e_int_config_desks);
// e_configure_registry_item_add("screen/screen_resolution", 20,
// _("Screen Resolution"), NULL,
// "preferences-system-screen-resolution",
// e_configure_registry_item_add("screen/screen_resolution", 20,
// _("Screen Resolution"), NULL,
// "preferences-system-screen-resolution",
// e_int_config_display);
e_configure_registry_item_add("screen/screen_lock", 30,
_("Screen Lock"), NULL,
"preferences-system-lock-screen",
e_int_config_desklock);
e_configure_registry_item_add("screen/screen_saver", 40,
_("Blanking"), NULL,
"preferences-desktop-screensaver",
e_configure_registry_item_add("screen/screen_saver", 40,
_("Blanking"), NULL,
"preferences-desktop-screensaver",
e_int_config_screensaver);
e_configure_registry_item_add("screen/power_management", 50,
_("Backlight"), NULL,
e_configure_registry_item_add("screen/power_management", 50,
_("Backlight"), NULL,
"preferences-system-power-management",
e_int_config_dpms);
e_configure_registry_category_add("internal", -1, _("Internal"), NULL,
"enlightenment/internal");
e_configure_registry_item_add("internal/desk", -1,
_("Desk"), NULL,
"preferences-system-windows",
e_int_config_desk);
conf_module = m;
return m;
}
@ -56,18 +56,18 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED)
while ((cfd = e_config_dialog_get("E", "internal/desk")))
e_object_del(E_OBJECT(cfd));
e_configure_registry_item_del("internal/desk");
e_configure_registry_category_del("internal");
while ((cfd = e_config_dialog_get("E", "screen/power_management")))
e_object_del(E_OBJECT(cfd));
while ((cfd = e_config_dialog_get("E", "screen/screen_saver")))
e_object_del(E_OBJECT(cfd));
while ((cfd = e_config_dialog_get("E", "screen/screen_lock")))
e_object_del(E_OBJECT(cfd));
// while ((cfd = e_config_dialog_get("E", "screen/screen_resolution")))
// while ((cfd = e_config_dialog_get("E", "screen/screen_resolution")))
// e_object_del(E_OBJECT(cfd));
while ((cfd = e_config_dialog_get("E", "screen/virtual_desktops")))
e_object_del(E_OBJECT(cfd));
@ -77,7 +77,7 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED)
e_configure_registry_item_del("screen/screen_lock");
// e_configure_registry_item_del("screen/screen_resolution");
e_configure_registry_item_del("screen/virtual_desktops");
e_configure_registry_category_del("screen");
conf_module = NULL;
return 1;

@ -7,7 +7,7 @@ static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static void _enabled_cb(void *data, Evas_Object *obj, void *event_info);
struct _E_Config_Dialog_Data
struct _E_Config_Dialog_Data
{
Evas_Object *l1, *l2, *l3, *sl1, *sl2, *sl3;
int thumbscroll_enable;
@ -17,15 +17,15 @@ struct _E_Config_Dialog_Data
};
E_Config_Dialog *
e_int_config_interaction(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUSED)
e_int_config_interaction(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUSED)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
if (e_config_dialog_find("E", "keyboard_and_mouse/interaction"))
if (e_config_dialog_find("E", "keyboard_and_mouse/interaction"))
return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply;
@ -40,33 +40,33 @@ e_int_config_interaction(Evas_Object *parent EINA_UNUSED, const char *params EIN
}
static void
_fill_data(E_Config_Dialog_Data *cfdata)
_fill_data(E_Config_Dialog_Data *cfdata)
{
cfdata->thumbscroll_enable = e_config->thumbscroll_enable;
cfdata->thumbscroll_threshhold = e_config->thumbscroll_threshhold;
cfdata->thumbscroll_momentum_threshhold =
cfdata->thumbscroll_momentum_threshhold =
e_config->thumbscroll_momentum_threshhold;
cfdata->thumbscroll_friction = e_config->thumbscroll_friction;
}
static void *
_create_data(E_Config_Dialog *cfd EINA_UNUSED)
_create_data(E_Config_Dialog *cfd EINA_UNUSED)
{
E_Config_Dialog_Data *cfdata;
cfdata = E_NEW(E_Config_Dialog_Data, 1);
_fill_data(cfdata);
return cfdata;
}
static void
_free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
_free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
E_FREE(cfdata);
}
static int
_basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
_basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
return ((cfdata->thumbscroll_enable != e_config->thumbscroll_enable) ||
(cfdata->thumbscroll_threshhold != e_config->thumbscroll_threshhold) ||
@ -75,11 +75,11 @@ _basic_check_changed(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfd
}
static int
_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
e_config->thumbscroll_enable = cfdata->thumbscroll_enable;
e_config->thumbscroll_threshhold = cfdata->thumbscroll_threshhold;
e_config->thumbscroll_momentum_threshhold =
e_config->thumbscroll_momentum_threshhold =
cfdata->thumbscroll_momentum_threshhold;
e_config->thumbscroll_friction = cfdata->thumbscroll_friction;
e_config_save_queue();
@ -87,14 +87,14 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
}
static Evas_Object *
_basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata)
_basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *of, *ob;
o = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Thumbscroll"), 0);
ob = e_widget_check_add(evas, _("Enable Thumbscroll"),
ob = e_widget_check_add(evas, _("Enable Thumbscroll"),
&(cfdata->thumbscroll_enable));
e_widget_framelist_object_append(of, ob);
evas_object_smart_callback_add(ob, "changed", _enabled_cb, cfdata);
@ -102,7 +102,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
ob = e_widget_label_add(evas, _("Threshold for a thumb drag"));
e_widget_framelist_object_append(of, ob);
cfdata->l1 = ob;
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f pixels"), 0, 64, 4, 0, NULL,
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f pixels"), 0, 64, 4, 0, NULL,
&(cfdata->thumbscroll_threshhold), 100);
e_widget_framelist_object_append(of, ob);
cfdata->sl1 = ob;
@ -110,8 +110,8 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
ob = e_widget_label_add(evas, _("Threshold for applying drag momentum"));
e_widget_framelist_object_append(of, ob);
cfdata->l2 = ob;
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f pixels/s"), 0, 2000, 20, 0,
&(cfdata->thumbscroll_momentum_threshhold),
ob = e_widget_slider_add(evas, 1, 0, _("%1.0f pixels/s"), 0, 2000, 20, 0,
&(cfdata->thumbscroll_momentum_threshhold),
NULL, 100);
e_widget_framelist_object_append(of, ob);
cfdata->sl2 = ob;
@ -119,7 +119,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
ob = e_widget_label_add(evas, _("Friction slowdown"));
e_widget_framelist_object_append(of, ob);
cfdata->l3 = ob;
ob = e_widget_slider_add(evas, 1, 0, _("%1.2f s"), 0.00, 5.0, 0.1, 0,
ob = e_widget_slider_add(evas, 1, 0, _("%1.2f s"), 0.00, 5.0, 0.1, 0,
&(cfdata->thumbscroll_friction), NULL, 100);
e_widget_framelist_object_append(of, ob);
cfdata->sl3 = ob;

@ -192,7 +192,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
cfdata->gui.idle_cursor = ob;
e_widget_list_object_append(ol, of, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Cursor"), ol,
e_widget_toolbook_page_append(otb, NULL, _("Cursor"), ol,
1, 0, 1, 0, 0.5, 0.0);
/* Mouse */
@ -243,7 +243,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
#endif
e_widget_list_object_append(ol, of, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Mouse"), ol,
e_widget_toolbook_page_append(otb, NULL, _("Mouse"), ol,
1, 0, 1, 0, 0.5, 0.0);
e_widget_toolbook_page_show(otb, 0);

@ -14,11 +14,11 @@ E_API E_Module_Api e_modapi =
E_API void *
e_modapi_init(E_Module *m)
{
e_configure_registry_category_add("keyboard_and_mouse", 80, _("Input"),
e_configure_registry_category_add("keyboard_and_mouse", 80, _("Input"),
NULL, "preferences-behavior");
e_configure_registry_item_add("keyboard_and_mouse/interaction", 40,
_("Touch"), NULL,
"preferences-interaction",
e_configure_registry_item_add("keyboard_and_mouse/interaction", 40,
_("Touch"), NULL,
"preferences-interaction",
e_int_config_interaction);
e_configure_registry_item_add("keyboard_and_mouse/mouse_settings", 50,
_("Mouse"), NULL,
@ -35,14 +35,14 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED)
while ((cfd = e_config_dialog_get("E", "keyboard_and_mouse/mouse_settings")))
e_object_del(E_OBJECT(cfd));
while ((cfd = e_config_dialog_get("E", "keyboard_and_mouse/interaction")))
while ((cfd = e_config_dialog_get("E", "keyboard_and_mouse/interaction")))
e_object_del(E_OBJECT(cfd));
e_configure_registry_item_del("keyboard_and_mouse/mouse_settings");
e_configure_registry_item_del("keyboard_and_mouse/interaction");
e_configure_registry_category_del("keyboard_and_mouse");
conf_module = NULL;
return 1;
}

@ -1,7 +1,7 @@
#include "e.h"
/* local structures */
struct _E_Config_Dialog_Data
struct _E_Config_Dialog_Data
{
int show_favs, show_apps, hide_icons;
int show_name, show_generic, show_comment;
@ -21,7 +21,7 @@ static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
E_Config_Dialog *
e_int_config_menus(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUSED)
e_int_config_menus(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUSED)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View *v;
@ -35,7 +35,7 @@ e_int_config_menus(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUS
v->basic.apply_cfdata = _basic_apply;
v->basic.check_changed = _basic_check_changed;
cfd = e_config_dialog_new(NULL, _("Menu Settings"), "E", "menus/menu_settings",
cfd = e_config_dialog_new(NULL, _("Menu Settings"), "E", "menus/menu_settings",
"preferences-menus", 0, v, NULL);
return cfd;
}
@ -55,7 +55,7 @@ static void
_fill_data(E_Config_Dialog_Data *cfdata EINA_UNUSED)
{
if (e_config->default_system_menu)
cfdata->default_system_menu =
cfdata->default_system_menu =
eina_stringshare_add(e_config->default_system_menu);
else
cfdata->default_system_menu = NULL;
@ -67,7 +67,7 @@ _fill_data(E_Config_Dialog_Data *cfdata EINA_UNUSED)
cfdata->show_comment = e_config->menu_eap_comment_show;
cfdata->menu_gadcon_client_toplevel = e_config->menu_gadcon_client_toplevel;
cfdata->scroll_speed = e_config->menus_scroll_speed;
cfdata->fast_mouse_move_threshhold =
cfdata->fast_mouse_move_threshhold =
e_config->menus_fast_mouse_move_threshhold;
cfdata->click_drag_timeout = e_config->menus_click_drag_timeout;
cfdata->autoscroll_margin = e_config->menu_autoscroll_margin;
@ -77,7 +77,7 @@ _fill_data(E_Config_Dialog_Data *cfdata EINA_UNUSED)
static void
_free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
if (cfdata->default_system_menu)
if (cfdata->default_system_menu)
eina_stringshare_del(cfdata->default_system_menu);
E_FREE(cfdata);
}
@ -87,7 +87,7 @@ check_menu_dir(const char *dir, Eina_List **menus)
{
char buf[PATH_MAX], *file;
Eina_List *files;
snprintf(buf, sizeof(buf), "%s/menus", dir);
files = ecore_file_ls(buf);
EINA_LIST_FREE(files, file)
@ -100,7 +100,7 @@ check_menu_dir(const char *dir, Eina_List **menus)
free(file);
}
}
void
get_menus(Eina_List **menus)
{
@ -120,12 +120,12 @@ get_menus(Eina_List **menus)
NULL
};
int i, newdir;
e_user_homedir_concat(buf, sizeof(buf), ".config");
check_menu_dir(buf, menus);
for (i = 0; dirs[i]; i++) check_menu_dir(dirs[i], menus);
newdir = 1;
snprintf(buf, sizeof(buf), "%s/etc/xdg", e_prefix_get());
for (i = 0; dirs[i]; i++)
@ -146,24 +146,24 @@ _create_menus_list(Evas *evas, E_Config_Dialog_Data *cfdata)
Evas_Object *ob;
char *file;
int sel = -1, i = 0;
get_menus(&menus);
ob = e_widget_ilist_add(evas, (32 * e_scale), (32 * e_scale),
ob = e_widget_ilist_add(evas, (32 * e_scale), (32 * e_scale),
&(cfdata->default_system_menu));
e_widget_size_min_set(ob, (100 * e_scale), (140 * e_scale));
e_widget_ilist_freeze(ob);
EINA_LIST_FREE(menus, file)
{
char buf[PATH_MAX], buf2[PATH_MAX], *p, *p2, *tlabel, *tdesc;
const char *label;
label = file;
tlabel = NULL;
tdesc = NULL;
e_user_homedir_concat(buf, sizeof(buf),
e_user_homedir_concat(buf, sizeof(buf),
".config/menus/applications.menu");
snprintf(buf2, sizeof(buf2), "%s/etc/xdg/menus/e-applications.menu",
snprintf(buf2, sizeof(buf2), "%s/etc/xdg/menus/e-applications.menu",
e_prefix_get());
if (!strcmp("/etc/xdg/menus/applications.menu", file))
{
@ -241,9 +241,9 @@ _create_menus_list(Evas *evas, E_Config_Dialog_Data *cfdata)
}
e_widget_ilist_go(ob);
e_widget_ilist_thaw(ob);
if (sel >= 0) e_widget_ilist_selected_set(ob, sel);
return ob;
}
@ -256,23 +256,23 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
otb = e_widget_toolbook_add(evas, (24 * e_scale), (24 * e_scale));
ol = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Main Menu"), 0);
of = e_widget_framelist_add(evas, _("Main Menu"), 0);
ow = e_widget_check_add(evas, _("Favorites"), &(cfdata->show_favs));
e_widget_framelist_object_append(of, ow);
e_widget_framelist_object_append(of, ow);
ow = e_widget_check_add(evas, _("Applications"), &(cfdata->show_apps));
e_widget_framelist_object_append(of, ow);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
of = e_widget_framelist_add(evas, _("Applications Display"), 0);
of = e_widget_framelist_add(evas, _("Applications Display"), 0);
ow = e_widget_check_add(evas, _("Name"), &(cfdata->show_name));
e_widget_framelist_object_append(of, ow);
e_widget_framelist_object_append(of, ow);
ow = e_widget_check_add(evas, _("Generic"), &(cfdata->show_generic));
e_widget_framelist_object_append(of, ow);
e_widget_framelist_object_append(of, ow);
ow = e_widget_check_add(evas, _("Comments"), &(cfdata->show_comment));
e_widget_framelist_object_append(of, ow);
e_widget_framelist_object_append(of, ow);
e_widget_list_object_append(ol, of, 1, 0, 0.5);
of = e_widget_framelist_add(evas, _("Gadgets"), 0);
of = e_widget_framelist_add(evas, _("Gadgets"), 0);
ow = e_widget_check_add(evas, _("Show gadget settings in top-level"), &(cfdata->menu_gadcon_client_toplevel));
e_widget_framelist_object_append(of, ow);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
@ -280,18 +280,18 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
ol = e_widget_list_add(evas, 0, 0);
ow = _create_menus_list(evas, cfdata);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
e_widget_list_object_append(ol, ow, 1, 1, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Applications"), ol, 1, 1, 1, 1, 0.0, 0.0);
ol = e_widget_list_add(evas, 0, 0);
ow = e_widget_label_add(evas, _("Margin"));
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_slider_add(evas, 1, 0, _("%2.0f pixels"), 0, 50, 1, 0, NULL,
ow = e_widget_slider_add(evas, 1, 0, _("%2.0f pixels"), 0, 50, 1, 0, NULL,
&(cfdata->autoscroll_margin), 100);
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_label_add(evas, _("Cursor Margin"));
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_slider_add(evas, 1, 0, _("%2.0f pixels"), 0, 50, 1, 0, NULL,
ow = e_widget_slider_add(evas, 1, 0, _("%2.0f pixels"), 0, 50, 1, 0, NULL,
&(cfdata->autoscroll_cursor_margin), 100);
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Autoscroll"), ol, 1, 1, 1, 0, 0.0, 0.0);
@ -301,17 +301,17 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_label_add(evas, _("Menu Scroll Speed"));
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_slider_add(evas, 1, 0, _("%5.0f pixels/s"), 0, 20000, 100,
ow = e_widget_slider_add(evas, 1, 0, _("%5.0f pixels/s"), 0, 20000, 100,
0, &(cfdata->scroll_speed), NULL, 100);
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_label_add(evas, _("Fast Mouse Move Threshold"));
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_slider_add(evas, 1, 0, _("%4.0f pixels/s"), 0, 2000, 10,
ow = e_widget_slider_add(evas, 1, 0, _("%4.0f pixels/s"), 0, 2000, 10,
0, &(cfdata->fast_mouse_move_threshhold), NULL, 100);
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_label_add(evas, _("Click Drag Timeout"));
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
ow = e_widget_slider_add(evas, 1, 0, _("%2.2f s"), 0, 10, 0.25,
ow = e_widget_slider_add(evas, 1, 0, _("%2.2f s"), 0, 10, 0.25,
0, &(cfdata->click_drag_timeout), NULL, 100);
e_widget_list_object_append(ol, ow, 1, 0, 0.5);
e_widget_toolbook_page_append(otb, NULL, _("Miscellaneous"), ol, 1, 1, 1, 0, 0.0, 0.0);
@ -336,9 +336,9 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
if (EINA_DBL_EQ(cfdata->fast_mouse_move_threshhold, 0.0))
e_config->menus_fast_mouse_move_threshhold = 1.0;
else
else
{
e_config->menus_fast_mouse_move_threshhold =
e_config->menus_fast_mouse_move_threshhold =
cfdata->fast_mouse_move_threshhold;
}
e_config->menus_click_drag_timeout = cfdata->click_drag_timeout;
@ -348,7 +348,7 @@ _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
if (e_config->default_system_menu)
eina_stringshare_del(e_config->default_system_menu);
e_config->default_system_menu =
e_config->default_system_menu =
eina_stringshare_add(cfdata->default_system_menu);
}
else

@ -24,7 +24,7 @@ struct _CFPath_Change_Data
int dirty;
E_Config_Dialog_Data *cfdata;
};
struct _E_Config_Dialog_Data
{
E_Config_Dialog *cfd;
@ -50,12 +50,12 @@ e_int_config_paths(Evas_Object *parent EINA_UNUSED, const char *params EINA_UNUS
if (e_config_dialog_find("E", "advanced/search_directories")) return NULL;
v = E_NEW(E_Config_Dialog_View, 1);
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.create_widgets = _basic_create_widgets;
v->basic.apply_cfdata = _basic_apply_data;
cfd = e_config_dialog_new(NULL, _("Search Path Settings"),
"E", "advanced/search_directories",
"preferences-directories", 0, v, NULL);
@ -107,14 +107,14 @@ _free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
while (pcd->new_user_path)
{
const char *dir;
dir = pcd->new_user_path->data;
eina_stringshare_del(dir);
pcd->new_user_path =
pcd->new_user_path =
eina_list_remove_list(pcd->new_user_path, pcd->new_user_path);
}
free(pcd);
cfdata->pcd_list =
cfdata->pcd_list =
eina_list_remove_list(cfdata->pcd_list, cfdata->pcd_list);
}
free(cfdata->paths_available);
@ -123,10 +123,10 @@ _free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
static int
_basic_apply_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
{
Eina_List *l;
Eina_List *ll;
_ilist_update(cfdata->gui.user_list, cfdata->cur_pcd, NULL);
for (l = cfdata->pcd_list; l; l = l->next)
@ -169,7 +169,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
evas_event_freeze(evas_object_evas_get(cfdata->gui.path_list));
edje_freeze();
e_widget_ilist_freeze(cfdata->gui.path_list);
/* Fill In Ilist */
for (i = 0; cfdata->paths_available[i].path; i++)
{
@ -179,8 +179,8 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
pcd->path = cfdata->paths_available[i].path;
pcd->cfdata = cfdata;
cfdata->pcd_list = eina_list_append(cfdata->pcd_list, pcd);
e_widget_ilist_append(ob, NULL,
cfdata->paths_available[i].path_description,
e_widget_ilist_append(ob, NULL,
cfdata->paths_available[i].path_description,
_ilist_path_cb_change, pcd, NULL);
}
@ -200,13 +200,13 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
e_widget_table_object_append(o, of, 0, 1, 1, 1, 0, 1, 0, 1);
of = e_widget_framelist_add(evas, _("User Defined Directories"), 0);
ob = e_widget_config_list_add(evas, e_widget_entry_add,
ob = e_widget_config_list_add(evas, e_widget_entry_add,
_("New Directory"), 2);
e_widget_disabled_set(ob, 1);
cfdata->gui.user_list = ob;
e_widget_framelist_object_append(of, ob);
e_widget_table_object_append(o, of, 1, 0, 1, 2, 1, 1, 1, 1);
return o;
}
@ -216,7 +216,7 @@ _ilist_path_cb_change(void *data)
CFPath_Change_Data *pcd;
Eina_List *default_list;
Eina_List *l;
pcd = data;
default_list = pcd->path->default_dir_list;
@ -224,14 +224,14 @@ _ilist_path_cb_change(void *data)
evas_event_freeze(evas_object_evas_get(pcd->cfdata->gui.default_list));
edje_freeze();
e_widget_ilist_freeze(pcd->cfdata->gui.default_list);
e_widget_ilist_clear(pcd->cfdata->gui.default_list);
for (l = default_list; l; l = l->next)
{
const char *dir;
dir = ((E_Path_Dir *)l->data)->dir;
e_widget_ilist_append(pcd->cfdata->gui.default_list,
e_widget_ilist_append(pcd->cfdata->gui.default_list,
NULL, dir, NULL, NULL, NULL);
}
e_widget_ilist_go(pcd->cfdata->gui.default_list);
@ -239,15 +239,15 @@ _ilist_path_cb_change(void *data)
e_widget_ilist_thaw(pcd->cfdata->gui.default_list);
edje_thaw();
evas_event_thaw(evas_object_evas_get(pcd->cfdata->gui.default_list));
_ilist_update(pcd->cfdata->gui.user_list,
pcd->cfdata->cur_pcd, /* Path data to save */
pcd); /* New Path to show */
pcd->cfdata->cur_pcd = pcd;
}
static void
static void
_ilist_update(Evas_Object *obj, CFPath_Change_Data *old, CFPath_Change_Data *new)
{
/* Save current data to old path */
@ -259,10 +259,10 @@ _ilist_update(Evas_Object *obj, CFPath_Change_Data *old, CFPath_Change_Data *new
while (old->new_user_path)
{
const char *dir;
dir = old->new_user_path->data;
eina_stringshare_del(dir);
old->new_user_path =
old->new_user_path =
eina_list_remove_list(old->new_user_path, old->new_user_path);
}
@ -271,17 +271,17 @@ _ilist_update(Evas_Object *obj, CFPath_Change_Data *old, CFPath_Change_Data *new
const char *dir;
dir = e_widget_config_list_nth_get(obj, i);
old->new_user_path =
old->new_user_path =
eina_list_append(old->new_user_path, eina_stringshare_add(dir));
}
}
if (!new) return;
/* Fill list with selected data */
e_widget_disabled_set(obj, 0);
e_widget_config_list_clear(obj);
if (new->new_user_path)
{
Eina_List *l;
@ -292,7 +292,7 @@ _ilist_update(Evas_Object *obj, CFPath_Change_Data *old, CFPath_Change_Data *new
for (l = user_path; l; l = l->next)
{
const char *dir;
dir = l->data;
e_widget_config_list_append(obj, dir);
}
@ -307,9 +307,9 @@ _ilist_update(Evas_Object *obj, CFPath_Change_Data *old, CFPath_Change_Data *new
for (l = user_path; l; l = l->next)
{
E_Path_Dir *epd;
epd = l->data;
e_widget_config_list_append(obj, epd->dir);
}
}
}
}

Loading…
Cancel
Save