forked from enlightenment/enlightenment
Fix up formatting and remove whitespace. Still trying to figure out why this
shows a blank dialog tho :( SVN revision: 37803
This commit is contained in:
parent
ca31354113
commit
302bd8a48a
|
@ -4,10 +4,7 @@
|
|||
#include "e.h"
|
||||
#include "e_mod_main.h"
|
||||
|
||||
/***************************************************************************/
|
||||
/**/
|
||||
/* actual module specifics */
|
||||
|
||||
static void _e_mod_action_syscon_cb(E_Object *obj, const char *params);
|
||||
static int _e_mod_syscon_defer_cb(void *data);
|
||||
static void _e_mod_syscon_cb(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
|
@ -17,17 +14,6 @@ static E_Module *conf_module = NULL;
|
|||
static E_Action *act = NULL;
|
||||
static E_Int_Menu_Augmentation *maug = NULL;
|
||||
|
||||
/**/
|
||||
/***************************************************************************/
|
||||
|
||||
/***************************************************************************/
|
||||
/**/
|
||||
|
||||
/**/
|
||||
/***************************************************************************/
|
||||
|
||||
/***************************************************************************/
|
||||
/**/
|
||||
/* module setup */
|
||||
EAPI E_Module_Api e_modapi =
|
||||
{
|
||||
|
@ -48,7 +34,8 @@ e_modapi_init(E_Module *m)
|
|||
e_action_predef_name_set(_("System"), _("System Control"), "syscon",
|
||||
NULL, NULL, 0);
|
||||
}
|
||||
maug = e_int_menus_menu_augmentation_add("main/10", _e_mod_menu_add, NULL, NULL, NULL);
|
||||
maug = e_int_menus_menu_augmentation_add("main/10", _e_mod_menu_add,
|
||||
NULL, NULL, NULL);
|
||||
e_module_delayed_set(m, 1);
|
||||
return m;
|
||||
}
|
||||
|
|
|
@ -94,8 +94,10 @@ e_syscon_show(E_Zone *zone, const char *defact)
|
|||
e_theme_edje_object_set(o, "base/theme/syscon",
|
||||
"e/widgets/syscon/main");
|
||||
edje_object_part_text_set(o, "e.text.label", _("Cancel"));
|
||||
edje_object_signal_callback_add(o, "e,action,close", "", _cb_signal_close, NULL);
|
||||
edje_object_signal_callback_add(o, "e,action,syscon", "*", _cb_signal_syscon, NULL);
|
||||
edje_object_signal_callback_add(o, "e,action,close", "",
|
||||
_cb_signal_close, NULL);
|
||||
edje_object_signal_callback_add(o, "e,action,syscon", "*",
|
||||
_cb_signal_syscon, NULL);
|
||||
|
||||
// main (default):
|
||||
// halt | suspend | desk_lock
|
||||
|
@ -150,7 +152,8 @@ e_syscon_show(E_Zone *zone, const char *defact)
|
|||
else if ((!strcmp(sca->action, "hibernate")) &&
|
||||
(!e_sys_action_possible_get(E_SYS_HIBERNATE))) disabled = 1;
|
||||
o = edje_object_add(popup->evas);
|
||||
edje_object_signal_callback_add(o, "e,action,click", "", _cb_signal_action, sca);
|
||||
edje_object_signal_callback_add(o, "e,action,click", "",
|
||||
_cb_signal_action, sca);
|
||||
if (sca->button)
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "e/widgets/syscon/item/%s",
|
||||
|
@ -224,7 +227,8 @@ e_syscon_show(E_Zone *zone, const char *defact)
|
|||
|
||||
if (e_config->syscon.do_input)
|
||||
{
|
||||
deftimer = ecore_timer_add(e_config->syscon.timeout, _cb_timeout_defaction, NULL);
|
||||
deftimer = ecore_timer_add(e_config->syscon.timeout,
|
||||
_cb_timeout_defaction, NULL);
|
||||
if (defact) do_defact = eina_stringshare_add(defact);
|
||||
}
|
||||
|
||||
|
@ -268,9 +272,7 @@ _cb_key_down(void *data, int type, void *event)
|
|||
ev = event;
|
||||
if (ev->event_win != input_window) return 1;
|
||||
if (!strcmp(ev->keysymbol, "Escape"))
|
||||
{
|
||||
e_syscon_hide();
|
||||
}
|
||||
else if (!strcmp(ev->keysymbol, "Up"))
|
||||
{
|
||||
// FIXME: implement focus and key control... eventually
|
||||
|
@ -295,9 +297,7 @@ _cb_mouse_down(void *data, int type, void *event)
|
|||
e_syscon_hide();
|
||||
return 1;
|
||||
}
|
||||
evas_event_feed_mouse_down(popup->evas,
|
||||
ev->button, flags,
|
||||
ev->time, NULL);
|
||||
evas_event_feed_mouse_down(popup->evas, ev->button, flags, ev->time, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -308,8 +308,7 @@ _cb_mouse_up(void *data, int type, void *event)
|
|||
|
||||
ev = event;
|
||||
if (ev->event_win != input_window) return 1;
|
||||
evas_event_feed_mouse_up(popup->evas,
|
||||
ev->button, EVAS_BUTTON_NONE,
|
||||
evas_event_feed_mouse_up(popup->evas, ev->button, EVAS_BUTTON_NONE,
|
||||
ev->time, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
@ -326,9 +325,7 @@ _cb_mouse_move(void *data, int type, void *event)
|
|||
evas_event_feed_mouse_in(popup->evas, ev->time, NULL);
|
||||
inevas = 1;
|
||||
}
|
||||
evas_event_feed_mouse_move(popup->evas,
|
||||
ev->x - popup->x,
|
||||
ev->y - popup->y,
|
||||
evas_event_feed_mouse_move(popup->evas, ev->x - popup->x, ev->y - popup->y,
|
||||
ev->time, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
@ -340,8 +337,7 @@ _cb_mouse_wheel(void *data, int type, void *event)
|
|||
|
||||
ev = event;
|
||||
if (ev->event_win != input_window) return 1;
|
||||
evas_event_feed_mouse_wheel(popup->evas,
|
||||
ev->direction, ev->z,
|
||||
evas_event_feed_mouse_wheel(popup->evas, ev->direction, ev->z,
|
||||
ev->time, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue