lock flags can be modified - they DO nothing yet... but they can be modified.

added an enlightenment.desktop file so e appears in other dm's


SVN revision: 15629
This commit is contained in:
Carsten Haitzler 2005-07-03 07:23:03 +00:00
parent bb7a113e2a
commit 52c5728635
6 changed files with 134 additions and 2 deletions

View File

@ -259,6 +259,8 @@ data/themes/images/Makefile
data/icons/Makefile data/icons/Makefile
data/icons/images/Makefile data/icons/images/Makefile
data/other/Makefile data/other/Makefile
data/xsession/Makefile
data/xsession/enlightenment.desktop
doc/Makefile doc/Makefile
po/Makefile po/Makefile
intl/Makefile intl/Makefile

View File

@ -1,3 +1,3 @@
MAINTAINERCLEANFILES = Makefile.in MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = fonts images init themes icons other SUBDIRS = fonts images init themes icons other xsession

View File

@ -0,0 +1,4 @@
MAINTAINERCLEANFILES = Makefile.in
filesdir = $(datadir)/xsessions
files_DATA = enlightenment.desktop
EXTRA_DIST = enlightenment.desktop.in

View File

@ -0,0 +1,7 @@
[Desktop Entry]
Encoding=UTF-8
Name=Enlightenment
Comment=Log in using Enlightenment (Version @VERSION@)
Type=XSession
Exec=@bindir@/enlightenment
TryExec=@bindir@/enlightenment

View File

@ -1922,6 +1922,11 @@ _e_border_free(E_Border *bd)
e_object_del(E_OBJECT(bd->border_menu)); e_object_del(E_OBJECT(bd->border_menu));
bd->border_menu = NULL; bd->border_menu = NULL;
} }
if (bd->border_locks_menu)
{
e_object_del(E_OBJECT(bd->border_locks_menu));
bd->border_locks_menu = NULL;
}
if (focused == bd) if (focused == bd)
{ {
ecore_x_window_focus(bd->zone->container->manager->root); ecore_x_window_focus(bd->zone->container->manager->root);
@ -4817,10 +4822,51 @@ _e_border_cb_border_menu_end(void *data, E_Menu *m)
E_Border *bd; E_Border *bd;
bd = e_object_data_get(E_OBJECT(m)); bd = e_object_data_get(E_OBJECT(m));
if (bd) bd->border_menu = NULL; if (bd)
{
if (bd->border_locks_menu)
{
e_object_del(E_OBJECT(bd->border_locks_menu));
bd->border_locks_menu = NULL;
}
bd->border_menu = NULL;
}
e_object_del(E_OBJECT(m)); e_object_del(E_OBJECT(m));
} }
#define NEW_LOCK_FN(var) \
static void \
_e_border_menu_cb_##var(void *data, E_Menu *m, E_Menu_Item *mi) \
{ \
E_Border *bd; \
bd = data; \
bd->var = e_menu_item_toggle_get(mi); \
}
NEW_LOCK_FN(lock_user_location)
NEW_LOCK_FN(lock_client_location)
NEW_LOCK_FN(lock_user_size)
NEW_LOCK_FN(lock_client_size)
NEW_LOCK_FN(lock_user_stacking)
NEW_LOCK_FN(lock_client_stacking)
NEW_LOCK_FN(lock_user_iconify)
NEW_LOCK_FN(lock_client_iconify)
NEW_LOCK_FN(lock_user_desk)
NEW_LOCK_FN(lock_client_desk)
NEW_LOCK_FN(lock_user_sticky)
NEW_LOCK_FN(lock_client_sticky)
NEW_LOCK_FN(lock_user_shade)
NEW_LOCK_FN(lock_client_shade)
NEW_LOCK_FN(lock_user_maximize)
NEW_LOCK_FN(lock_client_mazimize)
NEW_LOCK_FN(lock_user_fullscreen)
NEW_LOCK_FN(lock_client_fullscreen)
NEW_LOCK_FN(lock_border)
NEW_LOCK_FN(lock_close)
NEW_LOCK_FN(lock_focus_in)
NEW_LOCK_FN(lock_focus_out)
NEW_LOCK_FN(lock_life)
static void static void
_e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key) _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key)
{ {
@ -4830,6 +4876,44 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key)
if (bd->border_menu) return; if (bd->border_menu) return;
m = e_menu_new();
bd->border_locks_menu = m;
#define NEW_LOCK_MI(txt, var) \
mi = e_menu_item_new(m); \
e_menu_item_label_set(mi, _(txt)); \
e_menu_item_check_set(mi, 1); \
e_menu_item_toggle_set(mi, bd->var); \
e_menu_item_callback_set(mi, _e_border_menu_cb_##var, bd);
NEW_LOCK_MI("Position (User)", lock_user_location);
NEW_LOCK_MI("Size (User)", lock_user_size);
NEW_LOCK_MI("Stacking (User)", lock_user_stacking);
NEW_LOCK_MI("Iconify (User)", lock_user_iconify);
NEW_LOCK_MI("Virtual Desktop (User)", lock_user_desk);
NEW_LOCK_MI("Sticky (User)", lock_user_sticky);
NEW_LOCK_MI("Shade (User)", lock_user_shade);
NEW_LOCK_MI("Maximize (User)", lock_user_maximize);
NEW_LOCK_MI("Fullscreen (User)", lock_user_fullscreen);
mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1);
NEW_LOCK_MI("Position (Application)", lock_client_location);
NEW_LOCK_MI("Size (Application)", lock_client_size);
NEW_LOCK_MI("Stacking (Application)", lock_client_stacking);
NEW_LOCK_MI("Iconify (Application)", lock_client_iconify);
NEW_LOCK_MI("Virtual Desktop (Application)", lock_client_desk);
NEW_LOCK_MI("Sticky (Application)", lock_client_sticky);
NEW_LOCK_MI("Shade (Application)", lock_client_shade);
NEW_LOCK_MI("Maximize (Application)", lock_client_mazimize);
NEW_LOCK_MI("Fullscreen (Application)", lock_client_fullscreen);
mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1);
NEW_LOCK_MI("Border", lock_border);
NEW_LOCK_MI("Close", lock_close);
NEW_LOCK_MI("Focus In", lock_focus_in);
NEW_LOCK_MI("Focus Out", lock_focus_out);
NEW_LOCK_MI("Lifespan", lock_life);
m = e_menu_new(); m = e_menu_new();
e_object_data_set(E_OBJECT(m), bd); e_object_data_set(E_OBJECT(m), bd);
bd->border_menu = m; bd->border_menu = m;
@ -4927,6 +5011,16 @@ _e_border_menu_show(E_Border *bd, Evas_Coord x, Evas_Coord y, int key)
mi = e_menu_item_new(m); mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1); e_menu_item_separator_set(mi, 1);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Locks"));
e_menu_item_submenu_set(mi, bd->border_locks_menu);
e_menu_item_icon_edje_set(mi,
(char *)e_theme_edje_file_get("base/theme/borders",
"widgets/border/default/locks"),
"widgets/border/default/locks");
mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1);
mi = e_menu_item_new(m); mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Send To")); e_menu_item_label_set(mi, _("Send To"));
e_menu_item_submenu_pre_callback_set(mi, _e_border_menu_cb_sendto_pre, bd); e_menu_item_submenu_pre_callback_set(mi, _e_border_menu_cb_sendto_pre, bd);

View File

@ -286,6 +286,30 @@ struct _E_Border
unsigned int take_focus : 1; unsigned int take_focus : 1;
E_Maximize maximized; E_Maximize maximized;
unsigned int lock_user_location : 1;
unsigned int lock_client_location : 1;
unsigned int lock_user_size : 1;
unsigned int lock_client_size : 1;
unsigned int lock_user_stacking : 1;
unsigned int lock_client_stacking : 1;
unsigned int lock_user_iconify : 1;
unsigned int lock_client_iconify : 1;
unsigned int lock_user_desk : 1;
unsigned int lock_client_desk : 1;
unsigned int lock_user_sticky : 1;
unsigned int lock_client_sticky : 1;
unsigned int lock_user_shade : 1;
unsigned int lock_client_shade : 1;
unsigned int lock_user_maximize : 1;
unsigned int lock_client_mazimize : 1;
unsigned int lock_user_fullscreen : 1;
unsigned int lock_client_fullscreen : 1;
unsigned int lock_border : 1;
unsigned int lock_close : 1;
unsigned int lock_focus_in : 1;
unsigned int lock_focus_out : 1;
unsigned int lock_life : 1;
double ping; double ping;
unsigned char changed : 1; unsigned char changed : 1;
@ -307,6 +331,7 @@ struct _E_Border
Evas_List *stick_desks; Evas_List *stick_desks;
E_Menu *border_menu; E_Menu *border_menu;
E_Menu *border_locks_menu;
Evas_List *pending_move_resize; Evas_List *pending_move_resize;
struct { struct {