forked from enlightenment/enlightenment
make symbol hiding actually work - fix some bugs, fixme's adjust bugs and
TODO, add exe history and actually use it etc. SVN revision: 19313
This commit is contained in:
parent
4785fb1d20
commit
78d729a57b
18
BUGS
18
BUGS
|
@ -178,21 +178,3 @@ dj2 yea screen #0 and screen #1
|
|||
|
||||
NB: in multihead if the mouse exits a screen during move or resize - either
|
||||
disallow it (warp back to previous position ) or limit resize/move
|
||||
|
||||
|
||||
|
||||
From: adi <adiroiban@gmail.com>
|
||||
To: enlightenment-devel@lists.sourceforge.net
|
||||
Subject: [E-devel] Segfault if window resize and move geometry settings are
|
||||
changed
|
||||
Date: Sun, 18 Dec 2005 17:38:33 +0200
|
||||
Sender: enlightenment-devel-admin@lists.sourceforge.net
|
||||
|
||||
I discovered that if i try to change the default settings for window
|
||||
resize and move geometry from the configuration panel and then resize
|
||||
a window e17 crash.
|
||||
|
||||
i build e17 from cvs 2 hours ago.
|
||||
|
||||
bye
|
||||
adi
|
||||
|
|
46
TODO
46
TODO
|
@ -8,19 +8,18 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
BUGS / FIXES
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
* BUG: mouse pointer changes are buggy - white box for x curosrs the first
|
||||
time that cursor is used. also sometimes forgets what cursor to use and
|
||||
was being used etc.
|
||||
* BUG: advanced modules settings dialog has broken load, module click in
|
||||
unloaded list etc. etc.
|
||||
* BUG: if you iconify a window and while iconified the window unmaps
|
||||
(rhythmbox does this a lot apparently) e doesnt realise and still thinks
|
||||
its iconified.
|
||||
* BUG: if app changes map state hint with XSetWMHints instead of callling
|
||||
XMapWindow e wont de-iconify the window
|
||||
* BUG: dnd to ibar is broken if u did an icon that isn't IN the ibar yet
|
||||
(from a window border) to either the very start or end of the ibar.
|
||||
* BUG: race condition on winlist activate via keypress and the key grab thus
|
||||
missing the alt key raise sometimes.
|
||||
* BUG: dnd from konqueror on zone 0 to another konq on zone 1 with xinerama (2
|
||||
zones) causes segv
|
||||
* BUG: e often forgets what window is focused so ctrl+alt+x for example doesnt
|
||||
close the current focused window... hmmmm
|
||||
* BUG: in general fullscreen needs work, cleaning and testing. dont allow
|
||||
desktop switches for the desk a fullscreened window is on, nor allow windows
|
||||
to be raised above the fs win etc. ie the app must seem to be entirely fs for
|
||||
|
@ -28,8 +27,6 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
* BUG: if you have 2 zones and you fill up zone 2 (right) mostly and then run
|
||||
a big xev (xev -g 1280x1024) that wont fit it gets placed offscreen to the
|
||||
right of zone 2
|
||||
* BUG: if you alt-click on a module to move it, and the mouse happens to be right where a resize handle for a neighboring module is, it will resize that instead. We should probably just go to edit mode for the single module instead of _all_ modules.
|
||||
* BUG: the last desktop module enabled can not be moved with alt-drag. Disable and reenable a desktop module to test.
|
||||
]]]
|
||||
|
||||
[[[
|
||||
|
@ -37,7 +34,7 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
ESSENTIAL FEATURES
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
* add fullscreen support (e16 xvidmode or xrandr style)
|
||||
* add fullscreen (zoom) support (e16 xvidmode or xrandr style)
|
||||
* implement thees maximise/fullscreen modes:
|
||||
Which of these should be different modes, and which should be options for
|
||||
a mode? i think they all should be distinct actions of their own bound
|
||||
|
@ -76,11 +73,9 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
means .mo compiled files from a .po, an optional font and a config file that
|
||||
specifies the locale and font) and then install the font(s) either as a user
|
||||
or superuser, and the .mo in the system or a user locales dir.
|
||||
* all menus need icons if they dont have them yet:)
|
||||
* gadget containers (shelves?) using popups as well as in-line in a canvas
|
||||
* finish off icccm support
|
||||
* finish complete netwm support
|
||||
* different cursors for different parts of the screen
|
||||
* add a "taskbar" module
|
||||
* add cpu load module
|
||||
* add a way to access "all" apps app dir
|
||||
|
@ -89,20 +84,13 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
new bars to be created or bars to be deleted
|
||||
* ibar need to support label pop-ups
|
||||
* ibar should support subdirs with pop-up icons...
|
||||
* borders need to be able to change border theme on the fly by menu or app
|
||||
properties
|
||||
* add setup/install wizard to seed eap files etc. etc.
|
||||
* support text and color classes
|
||||
* add clientinfo pane/popdown for borders
|
||||
* make xrandr support get rotation and store it
|
||||
* gui config dialogs for all config
|
||||
* "control panel" dialog need to be better to allow config dialogs to launch
|
||||
from it
|
||||
* make it possible to disable border buttons/actions (tell theme what is
|
||||
disabled)
|
||||
* modules need config dialogs instead of long winded menus
|
||||
* remove module config menus (make them part of the module control panel etc.)
|
||||
* alt-middle should go into resize mode on modules. (right now you have to guess where the resize handle will appear and alt-click there, or go into full edit mode.
|
||||
]]]
|
||||
|
||||
[[[
|
||||
|
@ -110,25 +98,17 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
CLEANUPS
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
* return from ipc if the command failed or not
|
||||
* ipc should give more feedback wheter the options are accepted or not.
|
||||
* find all other instances of using e_error dialogs and use them only with low
|
||||
level errors than need attention no matter what.
|
||||
* EAP cache files can be hit and miss and have problems. move things to be
|
||||
explicit reloads.
|
||||
* need to match EAPI on all fn's as well as thier prototypes
|
||||
* winlist should support place for window "screenshot" in list as well as
|
||||
app icon
|
||||
* winlist should in theory allow horizontal list layout not just vertical (set
|
||||
by the theme)
|
||||
* winlist could divide windows up into blocks - sub-lists within a container
|
||||
per desktop (with stick windows considered to live on the "current" desk
|
||||
when winlist starts)
|
||||
* make it easy for modules to hook into ipc and extend it for themselves
|
||||
* gadman needs some changes to virtualise the canvas/container the gadget
|
||||
ends up in (eg in popups or border)
|
||||
* perhaps we should split focus and "selected" windows. selected window is
|
||||
what ocused is now and focus is something only affectinbg keyboard input. if
|
||||
the focus window becoems another managed window it becoems the selected
|
||||
window - otherwise click to focus or pointer focus will chose the selected
|
||||
window that may get the focus if it allows it...
|
||||
* module api needs to move label and icon to data file (.eap file?), not api
|
||||
* ibar lamp needs short timer on mouse out for hide before hiding (and del
|
||||
the time on mouse in)
|
||||
|
@ -141,9 +121,6 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
-------------------------------------------------------------------------------
|
||||
|
||||
* add key input focus control for desktop modules
|
||||
* break out desks x/y size config so you can have a different desktop size
|
||||
per zone - right now there is a signle global (use this later as the default
|
||||
for new/unconfigured zones)
|
||||
* emit signal to submenu entries if they have a submenu shown for them or not
|
||||
* screensaver/lock module
|
||||
* tip/hint/suggestion dialog
|
||||
|
@ -151,16 +128,13 @@ Some of the things (in very short form) that need to be done to E17...
|
|||
* add locale and encoding fields to eapp files (to launch eapp in that
|
||||
locale+encoding)
|
||||
* add input method selector stuff to eapp - same as locale
|
||||
* "run command" typebuffer thing
|
||||
* setup configs for gnome and kde (as options) if they are installed (eg
|
||||
run gnome-settings-daemon).
|
||||
* check evas has eet support early on.
|
||||
* check engine can work on a given screen before using it
|
||||
* pagers should be able to be configured to control more than the current zone
|
||||
(select which zone they control)
|
||||
* non opaque move/resize
|
||||
* add window tabs (multiple clients in 1 border)
|
||||
* add a button area expansion for borders ???
|
||||
* add template button for expanded buttons ???
|
||||
* maybe add systray module/support?
|
||||
* add "osd" subsystem for things like volume controls on keybboards, etc.
|
||||
that overlay the screen
|
||||
|
|
|
@ -125,7 +125,8 @@ e_int_config_theme.h \
|
|||
e_int_config_menus.h \
|
||||
e_deskpreview.h \
|
||||
e_exebuf.h \
|
||||
e_int_config_modules.h
|
||||
e_int_config_modules.h \
|
||||
e_exehist.h
|
||||
|
||||
enlightenment_src = \
|
||||
e_user.c \
|
||||
|
@ -232,6 +233,7 @@ e_int_config_menus.c \
|
|||
e_deskpreview.c \
|
||||
e_exebuf.c \
|
||||
e_int_config_modules.c \
|
||||
e_exehist.c \
|
||||
$(ENLIGHTENMENTHEADERS)
|
||||
|
||||
enlightenment_SOURCES = \
|
||||
|
|
|
@ -59,8 +59,13 @@
|
|||
# define EAPI __declspec(dllimport)
|
||||
# endif
|
||||
#else
|
||||
# ifdef GCC_HASCLASSVISIBILITY
|
||||
# define EAPI __attribute__ ((visibility("default")))
|
||||
# ifdef __GNUC__
|
||||
# if __GNUC__ >= 4
|
||||
# pragma GCC visibility push(hidden)
|
||||
# define EAPI __attribute__ ((visibility("default")))
|
||||
# else
|
||||
# define EAPI
|
||||
# endif
|
||||
# else
|
||||
# define EAPI
|
||||
# endif
|
||||
|
|
|
@ -1068,6 +1068,7 @@ ACT_FN_GO(exec)
|
|||
Ecore_Exe *exe;
|
||||
|
||||
exe = ecore_exe_run(params, NULL);
|
||||
e_exehist_add("action/exec", params);
|
||||
if (exe) ecore_exe_free(exe);
|
||||
}
|
||||
}
|
||||
|
@ -1100,7 +1101,10 @@ ACT_FN_GO(app)
|
|||
else if (!strcmp(p2, "exe:"))
|
||||
a = e_app_exe_find(p + 1);
|
||||
if (a)
|
||||
e_zone_app_exec(zone, a);
|
||||
{
|
||||
e_zone_app_exec(zone, a);
|
||||
e_exehist_add("action/app", a->exe);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3682,6 +3682,7 @@ _e_border_cb_window_focus_out(void *data, int ev_type, void *ev)
|
|||
{
|
||||
if (e->detail == ECORE_X_EVENT_DETAIL_INFERIOR) return 1;
|
||||
else if (e->detail == ECORE_X_EVENT_DETAIL_NON_LINEAR) return 1;
|
||||
else if (e->detail == ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL) return 1;
|
||||
}
|
||||
else if (e->mode == ECORE_X_EVENT_MODE_GRAB)
|
||||
{
|
||||
|
@ -3689,12 +3690,14 @@ _e_border_cb_window_focus_out(void *data, int ev_type, void *ev)
|
|||
else if (e->detail == ECORE_X_EVENT_DETAIL_INFERIOR) return 1;
|
||||
else if (e->detail == ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL) return 1;
|
||||
else if (e->detail == ECORE_X_EVENT_DETAIL_ANCESTOR) return 1;
|
||||
else if (e->detail == ECORE_X_EVENT_DETAIL_VIRTUAL) return 1;
|
||||
}
|
||||
else if (e->mode == ECORE_X_EVENT_MODE_UNGRAB)
|
||||
{
|
||||
/* for firefox/thunderbird (xul) menu walking */
|
||||
/* NB: why did i disable this before? */
|
||||
if (e->detail == ECORE_X_EVENT_DETAIL_INFERIOR) return 1;
|
||||
else if (e->detail == ECORE_X_EVENT_DETAIL_POINTER) return 1;
|
||||
}
|
||||
else if (e->mode == ECORE_X_EVENT_MODE_WHILE_GRABBED)
|
||||
{
|
||||
|
|
|
@ -366,18 +366,18 @@ e_config_init(void)
|
|||
E_CONFIG_VAL(D, T, input_method, STR); /**/
|
||||
E_CONFIG_LIST(D, T, path_append_input_methods, _e_config_path_append_edd); /**/
|
||||
E_CONFIG_LIST(D, T, path_append_messages, _e_config_path_append_edd); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_max_exe_list, INT); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_max_eap_list, INT); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_scroll_animate, INT); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_scroll_speed, DOUBLE); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_align_x, DOUBLE); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_align_y, DOUBLE); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_size_w, DOUBLE); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_size_h, DOUBLE); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_min_w, INT); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_min_h, INT); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_max_w, INT); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_max_h, INT); /**/
|
||||
E_CONFIG_VAL(D, T, exebuf_max_exe_list, INT);
|
||||
E_CONFIG_VAL(D, T, exebuf_max_eap_list, INT);
|
||||
E_CONFIG_VAL(D, T, exebuf_scroll_animate, INT);
|
||||
E_CONFIG_VAL(D, T, exebuf_scroll_speed, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_align_x, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_align_y, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_size_w, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_size_h, DOUBLE);
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_min_w, INT);
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_min_h, INT);
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_max_w, INT);
|
||||
E_CONFIG_VAL(D, T, exebuf_pos_max_h, INT);
|
||||
e_config = e_config_domain_load("e", _e_config_edd);
|
||||
if (e_config)
|
||||
{
|
||||
|
@ -666,7 +666,7 @@ e_config_init(void)
|
|||
eb->action = evas_stringshare_add("menu_show");
|
||||
eb->params = evas_stringshare_add("favorites");
|
||||
e_config->mouse_bindings = evas_list_append(e_config->mouse_bindings, eb);
|
||||
|
||||
/*
|
||||
eb = E_NEW(E_Config_Binding_Mouse, 1);
|
||||
eb->context = E_BINDING_CONTEXT_CONTAINER;
|
||||
eb->button = 1;
|
||||
|
@ -675,6 +675,7 @@ e_config_init(void)
|
|||
eb->action = evas_stringshare_add("edit_mode");
|
||||
eb->params = NULL;
|
||||
e_config->mouse_bindings = evas_list_append(e_config->mouse_bindings, eb);
|
||||
*/
|
||||
}
|
||||
{
|
||||
E_Config_Binding_Key *eb;
|
||||
|
@ -1766,7 +1767,7 @@ e_config_domain_save(char *domain, E_Config_DD *edd, void *data)
|
|||
ef = eet_open(buf, EET_FILE_MODE_WRITE);
|
||||
if (ef)
|
||||
{
|
||||
ok = eet_data_write(ef, edd, "config", data, 0);
|
||||
ok = eet_data_write(ef, edd, "config", data, 1);
|
||||
eet_close(ef);
|
||||
}
|
||||
return ok;
|
||||
|
|
|
@ -120,9 +120,29 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
|
|||
e_dialog_button_disable_num_set(cfd->dia, 1, 1);
|
||||
}
|
||||
e_dialog_button_add(cfd->dia, _("Close"), NULL, NULL, NULL);
|
||||
e_win_centered_set(cfd->dia->win, 1);
|
||||
e_dialog_show(cfd->dia);
|
||||
if (!pdia)
|
||||
{
|
||||
e_win_centered_set(cfd->dia->win, 1);
|
||||
e_dialog_show(cfd->dia);
|
||||
}
|
||||
else
|
||||
{
|
||||
int x, y;
|
||||
|
||||
e_dialog_show(cfd->dia);
|
||||
x = pdia->win->border->x + ((pdia->win->w - cfd->dia->win->w) / 2);
|
||||
y = pdia->win->border->y + ((pdia->win->h - cfd->dia->win->h) / 2);
|
||||
if (x < 0) x = 0;
|
||||
if (y < 0) y = 0;
|
||||
if ((x + cfd->dia->win->w) > (pdia->win->container->w))
|
||||
x = pdia->win->container->w - cfd->dia->win->w;
|
||||
if ((y + cfd->dia->win->h) > (pdia->win->container->h))
|
||||
x = pdia->win->container->h - cfd->dia->win->h;
|
||||
e_win_move(cfd->dia->win, x, y);
|
||||
e_win_placed_set(cfd->dia->win, 1);
|
||||
}
|
||||
cfd->view_type = type;
|
||||
|
||||
if (pdia)
|
||||
{
|
||||
e_object_del_attach_func_set(E_OBJECT(pdia), NULL);
|
||||
|
@ -169,11 +189,11 @@ _e_config_dialog_cb_apply(void *data, E_Dialog *dia)
|
|||
ok = cfd->view.advanced.apply_cfdata(cfd, cfd->cfdata);
|
||||
if (ok)
|
||||
{
|
||||
_e_config_dialog_go(cfd, cfd->view_type);
|
||||
/*
|
||||
// FIXME: this is a nasty hack - from modules conf dialog patch i think.
|
||||
// bad bad. make the modules dialog work WITHOUT this
|
||||
// _e_config_dialog_go(cfd, cfd->view_type);
|
||||
e_dialog_button_disable_num_set(cfd->dia, 0, 1);
|
||||
e_dialog_button_disable_num_set(cfd->dia, 1, 1);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -202,13 +222,15 @@ _e_config_dialog_cb_changed(void *data, Evas_Object *obj)
|
|||
|
||||
cfd = data;
|
||||
|
||||
if(cfd->view_dirty)
|
||||
// FIXME: this is a nasty hack - from modules conf dialog patch i think.
|
||||
// bad bad. make the modules dialog work WITHOUT this
|
||||
// if (cfd->view_dirty)
|
||||
// {
|
||||
// _e_config_dialog_go(cfd, cfd->view_type);
|
||||
// }
|
||||
// else if (!cfd->hide_buttons)
|
||||
{
|
||||
_e_config_dialog_go(cfd, cfd->view_type);
|
||||
}
|
||||
else if(!cfd->hide_buttons)
|
||||
{
|
||||
e_dialog_button_disable_num_set(cfd->dia, 0, 0);
|
||||
e_dialog_button_disable_num_set(cfd->dia, 1, 0);
|
||||
e_dialog_button_disable_num_set(cfd->dia, 0, 0);
|
||||
e_dialog_button_disable_num_set(cfd->dia, 1, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ e_configure_show(E_Container *con)
|
|||
{
|
||||
E_Configure *eco;
|
||||
E_Manager *man;
|
||||
Evas_Coord w, h, ew, eh;
|
||||
Evas_Coord w, h, ew, eh, mw, mh;
|
||||
|
||||
if (!con)
|
||||
{
|
||||
|
@ -55,6 +55,8 @@ e_configure_show(E_Container *con)
|
|||
|
||||
eco->ilist = e_widget_ilist_add(eco->evas, 48, 48, NULL);
|
||||
e_widget_ilist_selector_set(eco->ilist, 1);
|
||||
e_widget_min_size_get(eco->ilist, &mw, &mh);
|
||||
edje_extern_object_min_size_set(eco->ilist, mw, mh);
|
||||
edje_object_part_swallow(eco->edje, "item", eco->ilist);
|
||||
edje_object_part_text_set(eco->edje, "title", _("Configuration Panel"));
|
||||
|
||||
|
@ -71,7 +73,10 @@ e_configure_show(E_Container *con)
|
|||
/* FIXME: we should have a way for modules to hook in here and add their
|
||||
* own entries
|
||||
*/
|
||||
|
||||
eco->close = e_widget_button_add(eco->evas, _("Close"), NULL, _e_configure_cb_close, eco, NULL);
|
||||
e_widget_min_size_get(eco->close, &mw, &mh);
|
||||
edje_extern_object_min_size_set(eco->close, mw, mh);
|
||||
edje_object_part_swallow(eco->edje, "button", eco->close);
|
||||
|
||||
edje_object_size_min_calc(eco->edje, &ew, &eh);
|
||||
|
|
|
@ -7,10 +7,10 @@ typedef struct _E_Dialog E_Dialog;
|
|||
typedef struct _E_Dialog_Button E_Dialog_Button;
|
||||
|
||||
#else
|
||||
# ifndef E_DIALOG_H
|
||||
# define E_DIALOG_H
|
||||
#ifndef E_DIALOG_H
|
||||
#define E_DIALOG_H
|
||||
|
||||
# define E_DIALOG_TYPE 0xE0b01012
|
||||
#define E_DIALOG_TYPE 0xE0b01012
|
||||
|
||||
struct _E_Dialog
|
||||
{
|
||||
|
@ -41,5 +41,5 @@ EAPI void e_dialog_content_set (E_Dialog *dia, Evas_Object *obj,
|
|||
EAPI void e_dialog_resizable_set (E_Dialog *dia, int resizable);
|
||||
EAPI void e_dialog_show (E_Dialog *dia);
|
||||
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -18,6 +18,8 @@ struct _E_Exebuf_Exe
|
|||
|
||||
static void _e_exebuf_exe_free(E_Exebuf_Exe *exe);
|
||||
static void _e_exebuf_matches_clear(void);
|
||||
static int _e_exebuf_cb_sort_eap(void *data1, void *data2);
|
||||
static int _e_exebuf_cb_sort_exe(void *data1, void *data2);
|
||||
static void _e_exebuf_update(void);
|
||||
static void _e_exebuf_exec(void);
|
||||
static void _e_exebuf_exe_sel(E_Exebuf_Exe *exe);
|
||||
|
@ -306,12 +308,21 @@ _e_exebuf_exec(void)
|
|||
if (exe_sel)
|
||||
{
|
||||
if (exe_sel->app)
|
||||
e_zone_app_exec(exebuf->zone, exe_sel->app);
|
||||
{
|
||||
e_zone_app_exec(exebuf->zone, exe_sel->app);
|
||||
e_exehist_add("exebuf", exe_sel->app->exe);
|
||||
}
|
||||
else
|
||||
e_zone_exec(exebuf->zone, exe_sel->file);
|
||||
{
|
||||
e_zone_exec(exebuf->zone, exe_sel->file);
|
||||
e_exehist_add("exebuf", exe_sel->file);
|
||||
}
|
||||
}
|
||||
else
|
||||
e_zone_exec(exebuf->zone, cmd_buf);
|
||||
{
|
||||
e_zone_exec(exebuf->zone, cmd_buf);
|
||||
e_exehist_add("exebuf", cmd_buf);
|
||||
}
|
||||
|
||||
e_exebuf_hide();
|
||||
}
|
||||
|
@ -608,6 +619,32 @@ _e_exebuf_backspace(void)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
_e_exebuf_cb_sort_eap(void *data1, void *data2)
|
||||
{
|
||||
E_App *a1, *a2;
|
||||
double t1, t2;
|
||||
|
||||
a1 = data1;
|
||||
a2 = data2;
|
||||
t1 = e_exehist_newest_run_get(a1->exe);
|
||||
t2 = e_exehist_newest_run_get(a2->exe);
|
||||
return (int)(t2 - t1);
|
||||
}
|
||||
|
||||
static int
|
||||
_e_exebuf_cb_sort_exe(void *data1, void *data2)
|
||||
{
|
||||
char *e1, *e2;
|
||||
double t1, t2;
|
||||
|
||||
e1 = data1;
|
||||
e2 = data2;
|
||||
t1 = e_exehist_newest_run_get(e1);
|
||||
t2 = e_exehist_newest_run_get(e2);
|
||||
return (int)(t2 - t1);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_exebuf_matches_update(void)
|
||||
{
|
||||
|
@ -723,6 +760,8 @@ _e_exebuf_matches_update(void)
|
|||
/* FIXME: sort eap matches with most recently selected matches at the
|
||||
* start and then from shortest to longest string
|
||||
*/
|
||||
eap_matches = evas_list_sort(eap_matches, evas_list_count(eap_matches), _e_exebuf_cb_sort_eap);
|
||||
|
||||
max = e_config->exebuf_max_eap_list;
|
||||
e_box_freeze(eap_list_object);
|
||||
for (i = 0, l = eap_matches; l && (i < max); l = l->next, i++)
|
||||
|
@ -760,9 +799,11 @@ _e_exebuf_matches_update(void)
|
|||
}
|
||||
e_box_thaw(eap_list_object);
|
||||
|
||||
/* FIXME: sort eap matches with most recently selected matches at the
|
||||
/* FIXME: sort exe matches with most recently selected matches at the
|
||||
* start and then from shortest to longest string
|
||||
*/
|
||||
exe_matches = evas_list_sort(exe_matches, evas_list_count(exe_matches), _e_exebuf_cb_sort_exe);
|
||||
|
||||
max = e_config->exebuf_max_exe_list;
|
||||
e_box_freeze(exe_list_object);
|
||||
for (i = 0, l = exe_matches; l && (i < max); l = l->next, i++)
|
||||
|
|
|
@ -0,0 +1,187 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
#include "e.h"
|
||||
|
||||
/* currently default bind is alt+` buf alt+space has been suggested */
|
||||
|
||||
/* local subsystem functions */
|
||||
typedef struct _E_Exehist E_Exehist;
|
||||
typedef struct _E_Exehist_Item E_Exehist_Item;
|
||||
|
||||
struct _E_Exehist
|
||||
{
|
||||
Evas_List *history;
|
||||
};
|
||||
|
||||
struct _E_Exehist_Item
|
||||
{
|
||||
char *exe;
|
||||
char *launch_method;
|
||||
double exetime;
|
||||
};
|
||||
|
||||
static void _e_exehist_unload_queue(void);
|
||||
static void _e_exehist_load(void);
|
||||
static void _e_exehist_clear(void);
|
||||
static void _e_exehist_unload(void);
|
||||
static void _e_exehist_limit(void);
|
||||
static int _e_exehist_cb_unload(void *data);
|
||||
|
||||
/* local subsystem globals */
|
||||
static E_Config_DD *_e_exehist_config_edd = NULL;
|
||||
static E_Config_DD *_e_exehist_config_item_edd = NULL;
|
||||
static E_Exehist *_e_exehist = NULL;
|
||||
static Ecore_Timer *_e_exehist_unload_timer = NULL;
|
||||
|
||||
/* externally accessible functions */
|
||||
int
|
||||
e_exehist_init(void)
|
||||
{
|
||||
_e_exehist_config_item_edd = E_CONFIG_DD_NEW("E_Exehist_Item", E_Exehist_Item);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T E_Exehist_Item
|
||||
#define D _e_exehist_config_item_edd
|
||||
E_CONFIG_VAL(D, T, exe, STR);
|
||||
E_CONFIG_VAL(D, T, launch_method, STR);
|
||||
E_CONFIG_VAL(D, T, exetime, DOUBLE);
|
||||
|
||||
_e_exehist_config_edd = E_CONFIG_DD_NEW("E_Exehist", E_Exehist);
|
||||
#undef T
|
||||
#undef D
|
||||
#define T E_Exehist
|
||||
#define D _e_exehist_config_edd
|
||||
E_CONFIG_LIST(D, T, history, _e_exehist_config_item_edd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
e_exehist_shutdown(void)
|
||||
{
|
||||
_e_exehist_unload();
|
||||
E_CONFIG_DD_FREE(_e_exehist_config_item_edd);
|
||||
E_CONFIG_DD_FREE(_e_exehist_config_edd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
e_exehist_add(const char *launch_method, const char *exe)
|
||||
{
|
||||
E_Exehist_Item *ei;
|
||||
|
||||
_e_exehist_load();
|
||||
if (!_e_exehist) return;
|
||||
ei = E_NEW(E_Exehist_Item, 1);
|
||||
if (!ei) return;
|
||||
ei->launch_method = evas_stringshare_add(launch_method);
|
||||
ei->exe = evas_stringshare_add(exe);
|
||||
ei->exetime = ecore_time_get();
|
||||
_e_exehist->history = evas_list_append(_e_exehist->history, ei);
|
||||
_e_exehist_limit();
|
||||
e_config_domain_save("exehist", _e_exehist_config_edd, _e_exehist);
|
||||
_e_exehist_unload_queue();
|
||||
}
|
||||
|
||||
void
|
||||
e_exehist_clear(void)
|
||||
{
|
||||
_e_exehist_load();
|
||||
if (!_e_exehist) return;
|
||||
_e_exehist_clear();
|
||||
e_config_domain_save("exehist", _e_exehist_config_edd, _e_exehist);
|
||||
_e_exehist_unload_queue();
|
||||
}
|
||||
|
||||
int
|
||||
e_exehist_popularity_get(const char *exe)
|
||||
{
|
||||
Evas_List *l;
|
||||
int count = 0;
|
||||
|
||||
_e_exehist_load();
|
||||
if (!_e_exehist) return;
|
||||
for (l = _e_exehist->history; l; l = l->next)
|
||||
{
|
||||
E_Exehist_Item *ei;
|
||||
|
||||
ei = l->data;
|
||||
if ((ei->exe) && (!strcmp(exe, ei->exe))) count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
double
|
||||
e_exehist_newest_run_get(const char *exe)
|
||||
{
|
||||
Evas_List *l;
|
||||
|
||||
_e_exehist_load();
|
||||
if (!_e_exehist) return;
|
||||
for (l = evas_list_last(_e_exehist->history); l; l = l->prev)
|
||||
{
|
||||
E_Exehist_Item *ei;
|
||||
|
||||
ei = l->data;
|
||||
if ((ei->exe) && (!strcmp(exe, ei->exe))) return ei->exetime;
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
static void
|
||||
_e_exehist_unload_queue(void)
|
||||
{
|
||||
if (_e_exehist_unload_timer) ecore_timer_del(_e_exehist_unload_timer);
|
||||
_e_exehist_unload_timer = ecore_timer_add(2.0, _e_exehist_cb_unload, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_exehist_load(void)
|
||||
{
|
||||
if (!_e_exehist)
|
||||
_e_exehist = e_config_domain_load("exehist", _e_exehist_config_edd);
|
||||
if (!_e_exehist)
|
||||
_e_exehist = E_NEW(E_Exehist, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_exehist_clear(void)
|
||||
{
|
||||
if (_e_exehist)
|
||||
{
|
||||
while (_e_exehist->history)
|
||||
{
|
||||
E_Exehist_Item *ei;
|
||||
|
||||
ei = _e_exehist->history->data;
|
||||
if (ei->exe) evas_stringshare_del(ei->exe);
|
||||
if (ei->launch_method) evas_stringshare_del(ei->launch_method);
|
||||
free(ei);
|
||||
_e_exehist->history = evas_list_remove_list(_e_exehist->history, _e_exehist->history);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_e_exehist_unload(void)
|
||||
{
|
||||
_e_exehist_clear();
|
||||
E_FREE(_e_exehist);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_exehist_limit(void)
|
||||
{
|
||||
/* go from first item in hist on and either delete all items before a
|
||||
* specific timestamp, or if the list count > limit then delete items
|
||||
*/
|
||||
}
|
||||
|
||||
static int
|
||||
_e_exehist_cb_unload(void *data)
|
||||
{
|
||||
_e_exehist_unload();
|
||||
_e_exehist_unload_timer = NULL;
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||
*/
|
||||
#ifdef E_TYPEDEFS
|
||||
|
||||
#else
|
||||
#ifndef E_EXEHIST_H
|
||||
#define E_EXEHIST_H
|
||||
|
||||
EAPI int e_exehist_init(void);
|
||||
EAPI int e_exehist_shutdown(void);
|
||||
|
||||
EAPI void e_exehist_add(const char *launch_method, const char *exe);
|
||||
EAPI void e_exehist_clear(void);
|
||||
EAPI int e_exehist_popularity_get(const char *exe);
|
||||
EAPI double e_exehist_newest_run_get(const char *exe);
|
||||
/*
|
||||
EAPI double e_exehist_last_run_get(const char *exe);
|
||||
*/
|
||||
|
||||
#endif
|
||||
#endif
|
|
@ -106,3 +106,4 @@
|
|||
#include "e_deskpreview.h"
|
||||
#include "e_exebuf.h"
|
||||
#include "e_int_config_modules.h"
|
||||
#include "e_exehist.h"
|
||||
|
|
|
@ -63,7 +63,7 @@ _fill_data(CFData *cfdata)
|
|||
cfdata->border_shade_transition = e_config->border_shade_transition;
|
||||
cfdata->border_shade_speed = e_config->border_shade_speed;
|
||||
if (cfdata->move_info_visible ||
|
||||
cfdata->resize_info_follows) cfdata->move_resize_info = 1;
|
||||
cfdata->resize_info_visible) cfdata->move_resize_info = 1;
|
||||
if (cfdata->border_shade_animate) cfdata->animate_shading = 1;
|
||||
cfdata->placement = cfdata->window_placement_policy;
|
||||
}
|
||||
|
@ -99,6 +99,11 @@ _basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
|
|||
e_config->move_info_visible = 1;
|
||||
e_config->resize_info_visible = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
e_config->move_info_visible = 0;
|
||||
e_config->resize_info_visible = 0;
|
||||
}
|
||||
e_config->window_placement_policy = cfdata->placement;
|
||||
e_config->border_shade_animate = cfdata->animate_shading;
|
||||
e_config_save_queue();
|
||||
|
|
|
@ -12,7 +12,7 @@ struct _Main_Data
|
|||
E_Menu *apps;
|
||||
E_Menu *desktops;
|
||||
E_Menu *clients;
|
||||
//E_Menu *modules;
|
||||
E_Menu *modules;
|
||||
E_Menu *gadgets;
|
||||
E_Menu *themes;
|
||||
E_Menu *config;
|
||||
|
@ -85,14 +85,13 @@ e_int_menus_main_new(void)
|
|||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_separator_set(mi, 1);
|
||||
/*
|
||||
|
||||
subm = e_module_menu_new();
|
||||
dat->modules = subm;
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Modules"));
|
||||
e_util_menu_item_edje_icon_set(mi, "enlightenment/modules");
|
||||
e_menu_item_submenu_set(mi, subm);
|
||||
*/
|
||||
|
||||
subm = e_int_menus_desktops_new();
|
||||
dat->desktops = subm;
|
||||
|
@ -346,7 +345,7 @@ _e_int_menus_main_del_hook(void *obj)
|
|||
if (dat)
|
||||
{
|
||||
e_object_del(E_OBJECT(dat->apps));
|
||||
/* e_object_del(E_OBJECT(dat->modules));*/
|
||||
e_object_del(E_OBJECT(dat->modules));
|
||||
e_object_del(E_OBJECT(dat->desktops));
|
||||
e_object_del(E_OBJECT(dat->clients));
|
||||
e_object_del(E_OBJECT(dat->gadgets));
|
||||
|
@ -513,6 +512,7 @@ _e_int_menus_apps_run(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
|
||||
a = data;
|
||||
e_zone_app_exec(m->zone, a);
|
||||
e_exehist_add("menu/apps", a->exe);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -29,7 +29,7 @@ if (e->data) { \
|
|||
char *__str = NULL; \
|
||||
if (e_ipc_codec_str_dec(e->data, e->size, &__str)) {
|
||||
# define END_STRING(__str) \
|
||||
free(__str); \
|
||||
if (__str) free(__str); \
|
||||
} \
|
||||
} \
|
||||
break;
|
||||
|
@ -4426,7 +4426,12 @@ break;
|
|||
REQ_STRING(params[0], HDL);
|
||||
#elif (TYPE == E_WM_IN)
|
||||
STRING(s, HDL);
|
||||
if (e_theme_transition_find(s))
|
||||
if (!s)
|
||||
{
|
||||
if (e_config->transition_start) evas_stringshare_del(e_config->transition_start);
|
||||
e_config->transition_start = NULL;
|
||||
}
|
||||
if ((s) && (e_theme_transition_find(s)))
|
||||
{
|
||||
if (e_config->transition_start) evas_stringshare_del(e_config->transition_start);
|
||||
e_config->transition_start = NULL;
|
||||
|
@ -4471,13 +4476,18 @@ break;
|
|||
REQ_STRING(params[0], HDL);
|
||||
#elif (TYPE == E_WM_IN)
|
||||
STRING(s, HDL);
|
||||
if (e_theme_transition_find(s))
|
||||
if (!s)
|
||||
{
|
||||
if (e_config->transition_desk) evas_stringshare_del(e_config->transition_desk);
|
||||
e_config->transition_desk = NULL;
|
||||
}
|
||||
if ((s) && (e_theme_transition_find(s)))
|
||||
{
|
||||
if (e_config->transition_desk) evas_stringshare_del(e_config->transition_desk);
|
||||
e_config->transition_desk = NULL;
|
||||
if (s) e_config->transition_desk = evas_stringshare_add(s);
|
||||
SAVE;
|
||||
}
|
||||
SAVE;
|
||||
END_STRING(s);
|
||||
#elif (TYPE == E_REMOTE_IN)
|
||||
#endif
|
||||
|
@ -4516,7 +4526,12 @@ break;
|
|||
REQ_STRING(params[0], HDL);
|
||||
#elif (TYPE == E_WM_IN)
|
||||
STRING(s, HDL);
|
||||
if (e_theme_transition_find(s))
|
||||
if (!s)
|
||||
{
|
||||
if (e_config->transition_change) evas_stringshare_del(e_config->transition_change);
|
||||
e_config->transition_change = NULL;
|
||||
}
|
||||
if ((s) && (e_theme_transition_find(s)))
|
||||
{
|
||||
if (e_config->transition_change) evas_stringshare_del(e_config->transition_change);
|
||||
e_config->transition_change = NULL;
|
||||
|
|
|
@ -767,6 +767,7 @@ _e_main_screens_init(void)
|
|||
if (!e_desk_init()) return 0;
|
||||
if (!e_gadman_init()) return 0;
|
||||
if (!e_menu_init()) return 0;
|
||||
if (!e_exehist_init()) return 0;
|
||||
|
||||
num = 0;
|
||||
roots = ecore_x_window_root_list(&num);
|
||||
|
@ -824,6 +825,7 @@ _e_main_screens_shutdown(void)
|
|||
e_win_shutdown();
|
||||
e_border_shutdown();
|
||||
e_focus_shutdown();
|
||||
e_exehist_shutdown();
|
||||
e_menu_shutdown();
|
||||
e_gadman_shutdown();
|
||||
e_desk_shutdown();
|
||||
|
|
|
@ -1428,6 +1428,7 @@ _e_menu_items_layout_update(E_Menu *m)
|
|||
static void
|
||||
_e_menu_item_unrealize(E_Menu_Item *mi)
|
||||
{
|
||||
e_box_freeze(mi->container_object);
|
||||
if (mi->separator_object) evas_object_del(mi->separator_object);
|
||||
mi->separator_object = NULL;
|
||||
if (mi->bg_object) evas_object_del(mi->bg_object);
|
||||
|
@ -1454,9 +1455,11 @@ _e_menu_unrealize(E_Menu *m)
|
|||
Evas_List *l;
|
||||
|
||||
if (!m->realized) return;
|
||||
evas_event_freeze(m->evas);
|
||||
e_container_shape_hide(m->shape);
|
||||
e_object_del(E_OBJECT(m->shape));
|
||||
m->shape = NULL;
|
||||
e_box_freeze(m->container_object);
|
||||
for (l = m->items; l; l = l->next)
|
||||
{
|
||||
E_Menu_Item *mi;
|
||||
|
@ -2057,6 +2060,8 @@ _e_menu_item_ensure_onscreen(E_Menu_Item *mi)
|
|||
int x, y, w, h;
|
||||
int dx, dy;
|
||||
|
||||
if (!mi->menu) return;
|
||||
if (!mi->menu->zone) return;
|
||||
x = mi->x + mi->menu->cur.x;
|
||||
y = mi->y + mi->menu->cur.y;
|
||||
w = mi->w;
|
||||
|
@ -2065,10 +2070,12 @@ _e_menu_item_ensure_onscreen(E_Menu_Item *mi)
|
|||
dy = 0;
|
||||
if ((x + w) > (mi->menu->zone->x + mi->menu->zone->w))
|
||||
dx = (mi->menu->zone->x + mi->menu->zone->w) - (x + w);
|
||||
else if (x < mi->menu->zone->x)
|
||||
dx = mi->menu->zone->x - x;
|
||||
if ((y + h) > (mi->menu->zone->y + mi->menu->zone->h))
|
||||
dy = (mi->menu->zone->y + mi->menu->zone->h) - (y + h);
|
||||
if (x < 0) dx = x;
|
||||
if (y < 0) dy = y;
|
||||
else if (y < mi->menu->zone->y)
|
||||
dy = mi->menu->zone->y - y;
|
||||
if ((dx != 0) || (dy != 0))
|
||||
_e_menu_scroll_by(dx, dy);
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ static void _e_module_free(E_Module *m);
|
|||
static E_Menu *_e_module_control_menu_new(E_Module *mod);
|
||||
static void _e_module_menu_free(void *obj);
|
||||
static void _e_module_control_menu_about(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_module_control_menu_configuration(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_module_control_menu_enabled(void *data, E_Menu *m, E_Menu_Item *mi);
|
||||
static void _e_module_dialog_disable_show(char *title, char *body, E_Module *m);
|
||||
static void _e_module_cb_dialog_disable(void *data, E_Dialog *dia);
|
||||
|
@ -378,7 +379,8 @@ e_module_menu_new(void)
|
|||
|
||||
mod = l->data;
|
||||
mi = e_menu_item_new(m);
|
||||
if ((mod->api) && (mod->api->name)) e_menu_item_label_set(mi, mod->api->name);
|
||||
if ((mod->api) && (mod->api->name))
|
||||
e_menu_item_label_set(mi, mod->api->name);
|
||||
else e_menu_item_label_set(mi, mod->name);
|
||||
if (mod->edje_icon_file)
|
||||
{
|
||||
|
@ -483,14 +485,14 @@ _e_module_control_menu_new(E_Module *mod)
|
|||
if (mod->enabled) e_menu_item_toggle_set(mi, 1);
|
||||
e_menu_item_callback_set(mi, _e_module_control_menu_enabled, mod);
|
||||
|
||||
if (mod->config_menu)
|
||||
if (mod->func.config)
|
||||
{
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_separator_set(mi, 1);
|
||||
|
||||
mi = e_menu_item_new(m);
|
||||
e_menu_item_label_set(mi, _("Configuration"));
|
||||
e_menu_item_submenu_set(mi, mod->config_menu);
|
||||
e_menu_item_callback_set(mi, _e_module_control_menu_configuration, mod);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
@ -521,6 +523,15 @@ _e_module_control_menu_about(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
mod->func.about(mod);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_module_control_menu_configuration(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||
{
|
||||
E_Module *mod;
|
||||
|
||||
mod = data;
|
||||
mod->func.config(mod);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_module_control_menu_enabled(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ struct _E_Module
|
|||
int (*save) (E_Module *m);
|
||||
int (*info) (E_Module *m);
|
||||
int (*about) (E_Module *m);
|
||||
int (*config) (E_Module *m);
|
||||
int (*config) (E_Module *m);
|
||||
} func;
|
||||
|
||||
unsigned char enabled : 1;
|
||||
|
|
|
@ -30,18 +30,18 @@
|
|||
#define E_OBJECT_DEL_SET(x, del_func) e_object_del_func_set(E_OBJECT(x), E_OBJECT_CLEANUP_FUNC(del_func))
|
||||
|
||||
#ifdef OBJECT_PARANOIA_CHECK
|
||||
# define E_OBJECT_CHECK(x) do {if (e_object_error(E_OBJECT(x))) return;} while (0)
|
||||
# define E_OBJECT_CHECK_RETURN(x, ret) do {if (e_object_error(E_OBJECT(x))) return ret;} while (0)
|
||||
# define E_OBJECT_TYPE_CHECK(x, tp) do {if ((E_OBJECT(x)->type) != (tp)) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return;} } while (0)
|
||||
# define E_OBJECT_TYPE_CHECK_RETURN(x, tp, ret) do {if ((E_OBJECT(x)->type) != tp) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return ret;} } while (0)
|
||||
# define E_OBJECT_IF_NOT_TYPE(x, tp) if (E_OBJECT(x)->type != (tp))
|
||||
# define E_OBJECT_CHECK(x) do {if (e_object_error(E_OBJECT(x))) return;} while (0)
|
||||
# define E_OBJECT_CHECK_RETURN(x, ret) do {if (e_object_error(E_OBJECT(x))) return ret;} while (0)
|
||||
# define E_OBJECT_TYPE_CHECK(x, tp) do {if ((E_OBJECT(x)->type) != (tp)) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return;} } while (0)
|
||||
# define E_OBJECT_TYPE_CHECK_RETURN(x, tp, ret) do {if ((E_OBJECT(x)->type) != tp) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return ret;} } while (0)
|
||||
# define E_OBJECT_IF_NOT_TYPE(x, tp) if (E_OBJECT(x)->type != (tp))
|
||||
#else
|
||||
# ifdef OBJECT_CHECK
|
||||
# define E_OBJECT_CHECK(x) do {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != E_OBJECT_MAGIC)) return;} while (0)
|
||||
# define E_OBJECT_CHECK_RETURN(x, ret) do {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != E_OBJECT_MAGIC)) return ret;} while (0)
|
||||
# define E_OBJECT_TYPE_CHECK(x, tp) do {if ((E_OBJECT(x)->type) != (tp)) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return;} } while (0)
|
||||
# define E_OBJECT_CHECK(x) do {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != E_OBJECT_MAGIC)) return;} while (0)
|
||||
# define E_OBJECT_CHECK_RETURN(x, ret) do {if ((!E_OBJECT(x)) || (E_OBJECT(x)->magic != E_OBJECT_MAGIC)) return ret;} while (0)
|
||||
# define E_OBJECT_TYPE_CHECK(x, tp) do {if ((E_OBJECT(x)->type) != (tp)) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return;} } while (0)
|
||||
# define E_OBJECT_TYPE_CHECK_RETURN(x, tp, ret) do {if ((E_OBJECT(x)->type) != (tp)) { fprintf(stderr, "Object type check failed in %s\n", __FUNCTION__); return ret;} } while (0)
|
||||
# define E_OBJECT_IF_NOT_TYPE(x, type) if (E_OBJECT(x)->type != (type))
|
||||
# define E_OBJECT_IF_NOT_TYPE(x, type) if (E_OBJECT(x)->type != (type))
|
||||
# else
|
||||
# define E_OBJECT_CHECK(x)
|
||||
# define E_OBJECT_CHECK_RETURN(x, ret)
|
||||
|
|
|
@ -719,7 +719,8 @@ _e_winlist_cb_key_up(void *data, int type, void *event)
|
|||
Ecore_X_Event_Key_Up *ev;
|
||||
|
||||
ev = event;
|
||||
if (ev->win != input_window) return 1;
|
||||
if (!winlist) return 1;
|
||||
// if (ev->win != input_window) return 1;
|
||||
if (hold_mod)
|
||||
{
|
||||
if ((hold_mod & ECORE_X_MODIFIER_SHIFT) && (!strcmp(ev->keysymbol, "Shift_L"))) hold_count--;
|
||||
|
|
|
@ -925,26 +925,60 @@ _battery_linux_apm_check(Battery *ef)
|
|||
return stat;
|
||||
}
|
||||
|
||||
|
||||
/* hack for pmu */
|
||||
|
||||
/* This function converts a string to an integer. Additionally to
|
||||
* atoi() it converts also hexadecimal values
|
||||
*/
|
||||
static int
|
||||
axtoi(char *arg)
|
||||
{
|
||||
int n, val, pwr=1, m, rc = 0;
|
||||
char hex[9], c;
|
||||
|
||||
for (n = 0, m = 0; n < strlen(arg); n++)
|
||||
{
|
||||
if (arg[n] != ' ')
|
||||
{
|
||||
hex[m++] = c = toupper(arg[n]);
|
||||
if ((m == sizeof(hex)) || (c < '0') || (c > 'F'))
|
||||
return 0; /* overflow or invalid */
|
||||
}
|
||||
}
|
||||
hex[m] = '\0'; /* terminate string */
|
||||
|
||||
for (n = 0; n < m; n++)
|
||||
{
|
||||
c = hex[m-n-1];
|
||||
if ((c >= 'A') && (c <= 'F'))
|
||||
val = c -'A' + 10;
|
||||
else
|
||||
val = c - '0';
|
||||
rc = rc + val * pwr;
|
||||
pwr *= 16;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static Status *
|
||||
_battery_linux_powerbook_check(Battery *ef)
|
||||
{
|
||||
Ecore_List *bats;
|
||||
char buf[4096], buf2[4096];
|
||||
char *name;
|
||||
|
||||
char *token;
|
||||
FILE *f;
|
||||
|
||||
int discharging = 0;
|
||||
int charging = 0;
|
||||
|
||||
int battery = 0;
|
||||
int ac = 0;
|
||||
int seconds = 0;
|
||||
int hours, minutes;
|
||||
|
||||
int flags;
|
||||
int voltage;
|
||||
int charge;
|
||||
int max_charge;
|
||||
|
||||
Status *stat;
|
||||
|
||||
stat = E_NEW(Status, 1);
|
||||
|
@ -980,24 +1014,44 @@ _battery_linux_powerbook_check(Battery *ef)
|
|||
int time = 0;
|
||||
int current = 0;
|
||||
|
||||
while (fgets (buf,sizeof (buf), f))
|
||||
{
|
||||
if ((token = strtok (buf, ":\n")))
|
||||
{
|
||||
if (!strncmp ("flags", token, 5))
|
||||
flags = axtoi (strtok (0, ":\n"));
|
||||
else if (!strncmp ("charge", token, 6))
|
||||
charge = atoi(strtok(0, ":\n"));
|
||||
else if (!strncmp ("max_charge", token, 9))
|
||||
max_charge += atoi (strtok(0,":\n"));
|
||||
else if (!strncmp ("current", token, 7))
|
||||
current = atoi (strtok(0, ":\n"));
|
||||
else if (!strncmp ("voltage", token, 7))
|
||||
voltage = atoi (strtok(0,":\n"));
|
||||
else if (!strncmp ("time rem.", token, 8))
|
||||
time = atoi (strtok(0, ":\n"));
|
||||
else
|
||||
strtok (0,":\n");
|
||||
}
|
||||
}
|
||||
/* Skip flag; */
|
||||
fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
// fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
/* Read charge */
|
||||
fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
tmp = _battery_int_get(buf2);
|
||||
charge += tmp;
|
||||
// fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
// tmp = _battery_int_get(buf2);
|
||||
// charge += tmp;
|
||||
/* Read max charge */
|
||||
fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
tmp = _battery_int_get(buf2);
|
||||
max_charge += tmp;
|
||||
// fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
// tmp = _battery_int_get(buf2);
|
||||
// max_charge += tmp;
|
||||
/* Read current */
|
||||
fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
current = _battery_int_get(buf2);
|
||||
// fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
// current = _battery_int_get(buf2);
|
||||
/* Skip voltage */
|
||||
fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
// fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
/* Get time remaining */
|
||||
fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
time = _battery_int_get(buf2);
|
||||
// fgets(buf2, sizeof(buf2), f); buf2[sizeof(buf2) - 1] = 0;
|
||||
// time = _battery_int_get(buf2);
|
||||
fclose(f);
|
||||
|
||||
battery++;
|
||||
|
@ -1057,6 +1111,7 @@ _battery_linux_powerbook_check(Battery *ef)
|
|||
}
|
||||
}
|
||||
stat->level = (double)charge / (double)max_charge;
|
||||
if (stat->level > 1.0) stat->level = 1.0;
|
||||
snprintf(buf, sizeof(buf), "%.0f%%", stat->level * 100.0);
|
||||
stat->reading = strdup(buf);
|
||||
snprintf(buf, sizeof(buf), "%i:%02i", hours, minutes);
|
||||
|
|
|
@ -85,14 +85,15 @@ struct _Status
|
|||
char *time;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI int e_modapi_about (E_Module *m);
|
||||
EAPI int e_modapi_config (E_Module *m);
|
||||
|
||||
EAPI void _battery_face_cb_config_updated(Battery *bat);
|
||||
void _battery_face_cb_config_updated(Battery *bat);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -44,14 +44,15 @@ struct _Clock_Face
|
|||
E_Gadman_Client *gmc;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *module);
|
||||
EAPI int e_modapi_shutdown (E_Module *module);
|
||||
EAPI int e_modapi_save (E_Module *module);
|
||||
EAPI int e_modapi_info (E_Module *module);
|
||||
EAPI int e_modapi_about (E_Module *module);
|
||||
EAPI int e_modapi_config (E_Module *module);
|
||||
|
||||
EAPI void _clock_face_cb_config_updated(void *data);
|
||||
void _clock_face_cb_config_updated(void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -64,12 +64,13 @@ struct _Cpufreq_Face
|
|||
E_Gadman_Client *gmc;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *module);
|
||||
EAPI int e_modapi_shutdown (E_Module *module);
|
||||
EAPI int e_modapi_save (E_Module *module);
|
||||
EAPI int e_modapi_info (E_Module *module);
|
||||
EAPI int e_modapi_about (E_Module *module);
|
||||
EAPI int e_modapi_config (E_Module *module);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -97,14 +97,15 @@ struct _Tilebuf_Tile
|
|||
int redraw : 1;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI int e_modapi_about (E_Module *m);
|
||||
EAPI int e_modapi_config (E_Module *m);
|
||||
|
||||
EAPI void _dropshadow_cb_config_updated(void *data);
|
||||
void _dropshadow_cb_config_updated(void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,12 +6,14 @@ struct _Test
|
|||
{
|
||||
int val;
|
||||
};
|
||||
extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI int e_modapi_about (E_Module *m);
|
||||
/*EAPI int e_modapi_config (E_Module *module);*/
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1222,7 +1222,11 @@ _ibar_icon_cb_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
ic = data;
|
||||
if (ev->button == 1)
|
||||
{
|
||||
if (!drag) e_zone_app_exec(ic->ibb->gmc->zone, ic->app);
|
||||
if (!drag)
|
||||
{
|
||||
e_zone_app_exec(ic->ibb->gmc->zone, ic->app);
|
||||
e_exehist_add("ibar", ic->app->exe);
|
||||
}
|
||||
drag = 0;
|
||||
drag_start = 0;
|
||||
}
|
||||
|
|
|
@ -87,14 +87,15 @@ struct _IBar_Icon
|
|||
unsigned char raise_on_hilight : 1;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI int e_modapi_about (E_Module *m);
|
||||
/* EAPI int e_modapi_config (E_Module *m); */
|
||||
|
||||
EAPI void _ibar_bar_cb_config_updated(void *data);
|
||||
void _ibar_bar_cb_config_updated(void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -84,14 +84,15 @@ struct _IBox_Icon
|
|||
unsigned char raise_on_hilight : 1;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI int e_modapi_about (E_Module *m);
|
||||
EAPI int e_modapi_config (E_Module *m);
|
||||
|
||||
EAPI void _ibox_box_cb_config_updated(void *data);
|
||||
void _ibox_box_cb_config_updated(void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -139,14 +139,15 @@ struct _Pager_Popup
|
|||
Ecore_Timer *timer;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *module);
|
||||
EAPI int e_modapi_shutdown (E_Module *module);
|
||||
EAPI int e_modapi_save (E_Module *module);
|
||||
EAPI int e_modapi_info (E_Module *module);
|
||||
EAPI int e_modapi_about (E_Module *module);
|
||||
EAPI int e_modapi_config (E_Module *module);
|
||||
|
||||
EAPI void _pager_cb_config_updated(void *data);
|
||||
void _pager_cb_config_updated(void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -43,12 +43,13 @@ struct _Randr_Resolution
|
|||
Ecore_X_Screen_Size prev, next;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI int e_modapi_about (E_Module *m);
|
||||
/* EAPI int e_modapi_config (E_Module *module); */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -38,12 +38,13 @@ struct _Start_Face
|
|||
E_Gadman_Client *gmc;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI int e_modapi_about (E_Module *m);
|
||||
/* EAPI int e_modapi_config (E_Module *module); */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -58,13 +58,15 @@ struct _Temperature_Face
|
|||
E_Gadman_Client *gmc;
|
||||
};
|
||||
|
||||
extern E_Module_Api e_modapi;
|
||||
EAPI extern E_Module_Api e_modapi;
|
||||
|
||||
EAPI void *e_modapi_init (E_Module *m);
|
||||
EAPI int e_modapi_shutdown (E_Module *m);
|
||||
EAPI int e_modapi_save (E_Module *m);
|
||||
EAPI int e_modapi_info (E_Module *m);
|
||||
EAPI int e_modapi_about (E_Module *m);
|
||||
EAPI int e_modapi_config (E_Module *m);
|
||||
|
||||
void _temperature_face_cb_config_updated(Temperature *temp);
|
||||
|
||||
EAPI void _temperature_face_cb_config_updated(Temperature *temp);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue