ok - some changes to default settings.. alt_right mouse on windows pops up


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 21 years ago
parent 5bc865839e
commit 7df33c208a
  1. BIN
      data/config/behavior/default/actions.db
  2. BIN
      data/config/behavior/default/grabs.db
  3. BIN
      data/config/behavior/default/settings.db
  4. 42
      data/scripts/build_db.sh
  5. 339
      src/bordermenu.c
  6. 56
      src/match.c
  7. 26
      src/menu.c
  8. 6
      src/menu.h

@ -105,6 +105,14 @@ edb_ed $DB add "/actions/"$NUM"/button" int 2
edb_ed $DB add "/actions/"$NUM"/key" str ""
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Window_Grab"
edb_ed $DB add "/actions/"$NUM"/action" str "Menu"
edb_ed $DB add "/actions/"$NUM"/params" str ""
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_MOUSE_CLICK
edb_ed $DB add "/actions/"$NUM"/button" int 3
edb_ed $DB add "/actions/"$NUM"/key" str ""
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Resize"
edb_ed $DB add "/actions/"$NUM"/action" str "Window_Move"
edb_ed $DB add "/actions/"$NUM"/params" str ""
@ -305,21 +313,29 @@ edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "F8"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str Key_Binding
edb_ed $DB add "/actions/"$NUM"/action" str Desktop_Relative
edb_ed $DB add "/actions/"$NUM"/params" str 1
edb_ed $DB add "/actions/"$NUM"/event" int 8
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop_Relative"
edb_ed $DB add "/actions/"$NUM"/params" str "1"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str "Right"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_CTRL_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Desktop_Relative"
edb_ed $DB add "/actions/"$NUM"/params" str "-1"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str Right
edb_ed $DB add "/actions/"$NUM"/modifiers" int 6
edb_ed $DB add "/actions/"$NUM"/key" str "Left"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_CTRL_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/"$NUM"/name" str Key_Binding
edb_ed $DB add "/actions/"$NUM"/action" str Desktop_Relative
edb_ed $DB add "/actions/"$NUM"/params" str -1
edb_ed $DB add "/actions/"$NUM"/event" int 8
edb_ed $DB add "/actions/"$NUM"/name" str "Key_Binding"
edb_ed $DB add "/actions/"$NUM"/action" str "Execute"
edb_ed $DB add "/actions/"$NUM"/params" str "Eterm"
edb_ed $DB add "/actions/"$NUM"/event" int $ACT_KEY_DOWN
edb_ed $DB add "/actions/"$NUM"/button" int 0
edb_ed $DB add "/actions/"$NUM"/key" str Left
edb_ed $DB add "/actions/"$NUM"/modifiers" int 6
edb_ed $DB add "/actions/"$NUM"/key" str "Insert"
edb_ed $DB add "/actions/"$NUM"/modifiers" int $MOD_CTRL_ALT
NUM=$[ $NUM + 1 ];
edb_ed $DB add "/actions/count" int $NUM
@ -333,7 +349,7 @@ edb_ed $DB add "/menu/scroll/resist" int 5
edb_ed $DB add "/menu/scroll/speed" int 12
edb_ed $DB add "/window/raise/auto" int 0
edb_ed $DB add "/window/raise/delay" float 0.5
edb_ed $DB add "/window/move/mode" int $WINDOW_MODE_BOX
edb_ed $DB add "/window/move/mode" int $WINDOW_MODE_OPAQUE
edb_ed $DB add "/window/resize/mode" int $WINDOW_MODE_BOX
edb_ed $DB add "/guides/display/x" float 0.5
edb_ed $DB add "/guides/display/y" float 0.5

@ -3,10 +3,23 @@
#include "desktops.h"
#include "debug.h"
#include "util.h"
#include "icccm.h"
#include "bordermenu.h"
static void e_bordermenu_cb_close(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_kill(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_raise(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_lower(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_sticky(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_iconify(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_max(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_zoom(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_remember_location(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_remember_size(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_remember_desktop(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_remember_sticky(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_remember_prog_location_ignore(E_Menu *m, E_Menu_Item *mi, void *data);
static void e_bordermenu_cb_menu_hide(E_Menu *m, void *data);
static void
e_bordermenu_cb_close(E_Menu *m, E_Menu_Item *mi, void *data)
@ -24,6 +37,160 @@ e_bordermenu_cb_close(E_Menu *m, E_Menu_Item *mi, void *data)
UN(mi);
}
static void
e_bordermenu_cb_kill(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
if (b->win.client) ecore_window_kill_client(b->win.client);
D_RETURN;
UN(m);
UN(mi);
}
static void
e_bordermenu_cb_raise(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
e_border_raise(b);
D_RETURN;
UN(m);
UN(mi);
}
static void
e_bordermenu_cb_lower(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
e_border_lower(b);
D_RETURN;
UN(m);
UN(mi);
}
static void
e_bordermenu_cb_sticky(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
if (mi->on) e_menu_item_set_state(mi, 0);
else e_menu_item_set_state(mi, 1);
e_menu_set_state(m, mi);
b->client.sticky = mi->on;
b->changed = 1;
D_RETURN;
UN(m);
UN(mi);
}
static void
e_bordermenu_cb_iconify(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
D_RETURN;
UN(m);
UN(mi);
}
static void
e_bordermenu_cb_max(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
if (b->client.is_desktop) D_RETURN;
if (b->current.shaded > 0) D_RETURN;
if ((b->mode.move) || (b->mode.resize)) D_RETURN;
b->mode.move = 0;
b->mode.resize = 0;
if (mi->on) e_menu_item_set_state(mi, 0);
else e_menu_item_set_state(mi, 1);
e_menu_set_state(m, mi);
if (mi->on)
{
b->max.x = b->current.x;
b->max.y = b->current.y;
b->max.w = b->current.w;
b->max.h = b->current.h;
b->current.requested.x = 0;
b->current.requested.y = 0;
b->current.requested.w = b->desk->real.w;
b->current.requested.h = b->desk->real.h;
b->changed = 1;
b->max.is = mi->on;
e_border_adjust_limits(b);
b->current.requested.x = b->current.x;
b->current.requested.y = b->current.y;
b->current.requested.w = b->current.w;
b->current.requested.h = b->current.h;
}
else
{
b->current.requested.x = b->max.x;
b->current.requested.y = b->max.y;
b->current.requested.w = b->max.w;
b->current.requested.h = b->max.h;
b->changed = 1;
b->max.is = mi->on;
e_border_adjust_limits(b);
b->current.requested.x = b->current.x;
b->current.requested.y = b->current.y;
b->current.requested.w = b->current.w;
b->current.requested.h = b->current.h;
}
D_RETURN;
UN(m);
UN(mi);
}
static void
e_bordermenu_cb_zoom(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
D_RETURN;
UN(m);
UN(mi);
}
static void
e_bordermenu_cb_remember_location(E_Menu *m, E_Menu_Item *mi, void *data)
{
@ -44,6 +211,107 @@ e_bordermenu_cb_remember_location(E_Menu *m, E_Menu_Item *mi, void *data)
UN(m);
}
static void
e_bordermenu_cb_remember_size(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
if (mi->on) e_menu_item_set_state(mi, 0);
else e_menu_item_set_state(mi, 1);
e_menu_set_state(m, mi);
b->client.matched.matched = 1;
b->client.matched.size.matched = mi->on;
D_RETURN;
UN(m);
}
static void
e_bordermenu_cb_remember_desktop(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
if (mi->on) e_menu_item_set_state(mi, 0);
else e_menu_item_set_state(mi, 1);
e_menu_set_state(m, mi);
b->client.matched.matched = 1;
b->client.matched.desktop.matched = mi->on;
D_RETURN;
UN(m);
}
static void
e_bordermenu_cb_remember_sticky(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
if (mi->on) e_menu_item_set_state(mi, 0);
else e_menu_item_set_state(mi, 1);
e_menu_set_state(m, mi);
b->client.matched.matched = 1;
b->client.matched.sticky.matched = mi->on;
D_RETURN;
UN(m);
}
static void
e_bordermenu_cb_remember_prog_location_ignore(E_Menu *m, E_Menu_Item *mi, void *data)
{
E_Border *b;
D_ENTER;
b = data;
if (mi->on) e_menu_item_set_state(mi, 0);
else e_menu_item_set_state(mi, 1);
e_menu_set_state(m, mi);
b->client.matched.matched = 1;
b->client.matched.prog_location.matched = mi->on;
b->client.matched.prog_location.ignore = 1;
D_RETURN;
UN(m);
}
static void
e_bordermenu_cb_menu_hide(E_Menu *m, void *data)
{
E_Border *b;
D_ENTER;
b = data;
while (b->menus)
{
m = b->menus->data;
m->delete_me = 1;
b->menus = evas_list_remove(b->menus, m);
}
D_RETURN;
UN(m);
}
void
e_bordermenu_do(E_Border *b)
{
@ -51,12 +319,14 @@ e_bordermenu_do(E_Border *b)
E_Menu_Item *menuitem;
D_ENTER;
if (!b->menus)
{
menu = e_menu_new();
b->menus = evas_list_append(b->menus, menu);
e_menu_set_padding_icon(menu, 2);
e_menu_set_padding_state(menu, 2);
e_menu_hide_callback(menu, e_bordermenu_cb_menu_hide, b);
menuitem = e_menu_item_new("Close");
/* e_menu_item_set_icon(menuitem, icon); */
@ -64,20 +334,81 @@ e_bordermenu_do(E_Border *b)
/* e_menu_item_set_separator(menuitem, 1);*/
e_menu_item_set_callback(menuitem, e_bordermenu_cb_close, b);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("Raise");
e_menu_item_set_callback(menuitem, e_bordermenu_cb_raise, b);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("Lower");
e_menu_item_set_callback(menuitem, e_bordermenu_cb_lower, b);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("Iconify");
e_menu_item_set_callback(menuitem, e_bordermenu_cb_iconify, b);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("Zoom");
e_menu_item_set_callback(menuitem, e_bordermenu_cb_zoom, b);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("Maximise");
e_menu_item_set_check(menuitem, 1);
e_menu_item_set_state(menuitem, b->max.is);
e_menu_item_set_callback(menuitem, e_bordermenu_cb_max, b);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("Sticky");
e_menu_item_set_check(menuitem, 1);
e_menu_item_set_state(menuitem, b->client.sticky);
e_menu_item_set_callback(menuitem, e_bordermenu_cb_sticky, b);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("");
e_menu_item_set_separator(menuitem, 1);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("Kill");
e_menu_item_set_callback(menuitem, e_bordermenu_cb_kill, b);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("");
e_menu_item_set_separator(menuitem, 1);
e_menu_item_set_check(menuitem, 1);
e_menu_item_set_state(menuitem, b->client.matched.location.matched);
e_menu_item_set_callback(menuitem, e_bordermenu_cb_remember_location, b);
e_menu_add_item(menu, menuitem);
menuitem = e_menu_item_new("Remember Location");
e_menu_item_set_check(menuitem, 1);
e_menu_item_set_state(menuitem, b->client.matched.location.matched);
e_menu_item_set_state(menuitem, b->client.matched.location.matched);
e_menu_item_set_callback(menuitem, e_bordermenu_cb_remember_location, b);
e_menu_add_item(menu, menuitem);
e_menu_set_state(menu, menuitem);
menuitem = e_menu_item_new("Remember Size");
e_menu_item_set_check(menuitem, 1);
e_menu_item_set_state(menuitem, b->client.matched.size.matched);
e_menu_item_set_callback(menuitem, e_bordermenu_cb_remember_size, b);
e_menu_add_item(menu, menuitem);
e_menu_set_state(menu, menuitem);
menuitem = e_menu_item_new("Remember Desktop");
e_menu_item_set_check(menuitem, 1);
e_menu_item_set_state(menuitem, b->client.matched.desktop.matched);
e_menu_item_set_callback(menuitem, e_bordermenu_cb_remember_desktop, b);
e_menu_add_item(menu, menuitem);
e_menu_set_state(menu, menuitem);
menuitem = e_menu_item_new("Remember Stickiness");
e_menu_item_set_check(menuitem, 1);
e_menu_item_set_state(menuitem, b->client.matched.sticky.matched);
e_menu_item_set_callback(menuitem, e_bordermenu_cb_remember_sticky, b);
e_menu_add_item(menu, menuitem);
e_menu_set_state(menu, menuitem);
menuitem = e_menu_item_new("Ignore Program Specified Position");
e_menu_item_set_check(menuitem, 1);
e_menu_item_set_state(menuitem, b->client.matched.prog_location.matched);
e_menu_item_set_callback(menuitem, e_bordermenu_cb_remember_prog_location_ignore, b);
e_menu_add_item(menu, menuitem);
e_menu_set_state(menu, menuitem);
}
{

@ -103,6 +103,8 @@ e_match_save_props(E_Border *b)
D_ENTER;
if ((!b->client.name) || (!b->client.class)) D_RETURN;
db = e_db_open(e_config_get("match"));
if (!db) D_RETURN;
@ -111,7 +113,6 @@ e_match_save_props(E_Border *b)
if (b->client.matched.location.matched)
{
printf("write location %i %i\n", b->current.x, b->current.y);
b->client.matched.location.x = b->current.x;
b->client.matched.location.y = b->current.y;
sprintf(buf, "match/%s/%s/location/x", b->client.name, b->client.class);
@ -126,6 +127,59 @@ e_match_save_props(E_Border *b)
sprintf(buf, "match/%s/%s/location/y", b->client.name, b->client.class);
e_db_data_del(db, buf);
}
if (b->client.matched.size.matched)
{
b->client.matched.size.w = b->client.w;
b->client.matched.size.h = b->client.h;
sprintf(buf, "match/%s/%s/size/w", b->client.name, b->client.class);
e_db_int_set(db, buf, b->client.matched.size.w);
sprintf(buf, "match/%s/%s/size/h", b->client.name, b->client.class);
e_db_int_set(db, buf, b->client.matched.size.h);
}
else
{
sprintf(buf, "match/%s/%s/size/w", b->client.name, b->client.class);
e_db_data_del(db, buf);
sprintf(buf, "match/%s/%s/size/h", b->client.name, b->client.class);
e_db_data_del(db, buf);
}
if (b->client.matched.desktop.matched)
{
b->client.matched.desktop.desk = b->client.desk;
sprintf(buf, "match/%s/%s/desktop/desk", b->client.name, b->client.class);
e_db_int_set(db, buf, b->client.matched.desktop.desk);
}
else
{
sprintf(buf, "match/%s/%s/desktop/desk", b->client.name, b->client.class);
e_db_data_del(db, buf);
}
if (b->client.matched.sticky.matched)
{
b->client.matched.sticky.sticky = b->client.sticky;
sprintf(buf, "match/%s/%s/sticky/sticky", b->client.name, b->client.class);
e_db_int_set(db, buf, b->client.matched.sticky.sticky);
}
else
{
sprintf(buf, "match/%s/%s/sticky/sticky", b->client.name, b->client.class);
e_db_data_del(db, buf);
}
if (b->client.matched.prog_location.matched)
{
sprintf(buf, "match/%s/%s/prog_location/ignore", b->client.name, b->client.class);
e_db_int_set(db, buf, b->client.matched.prog_location.ignore);
}
else
{
sprintf(buf, "match/%s/%s/prog_location/ignore", b->client.name, b->client.class);
e_db_data_del(db, buf);
}
e_db_close(db);
e_db_flush();
D_RETURN;

@ -176,6 +176,19 @@ e_idle(void *data)
if (m->first_expose)
evas_render(m->evas);
}
again:
for (l = menus; l; l = l->next)
{
E_Menu *m;
m = l->data;
if (m->delete_me)
{
e_object_unref(E_OBJECT(m));
goto again;
}
}
e_db_flush();
D_RETURN;
@ -664,6 +677,13 @@ e_menu_callback_item(E_Menu *m, E_Menu_Item *mi)
D_RETURN;
}
void
e_menu_hide_callback(E_Menu *m, void (*func) (E_Menu *m, void *data), void *data)
{
m->func_hide = func;
m->func_hide_data = data;
}
void
e_menu_item_set_callback(E_Menu_Item *mi, void (*func) (E_Menu *m, E_Menu_Item *mi, void *data), void *data)
{
@ -1703,11 +1723,11 @@ void
e_menu_update_finish(E_Menu *m)
{
D_ENTER;
if (!m->changed) D_RETURN;
m->previous = m->current;
m->changed = 0;
D_RETURN;
}
@ -1767,6 +1787,8 @@ e_menu_update_hides(E_Menu *m)
open_menus = evas_list_remove(open_menus, m);
ecore_window_hide(m->win.main);
if (!open_menus) e_menu_event_win_hide();
if (m->func_hide)
m->func_hide(m, m->func_hide_data);
}
}

@ -32,6 +32,8 @@ struct _E_Menu
int redo_sel;
int changed;
int delete_me;
struct {
int state, icon, text;
} size;
@ -42,6 +44,9 @@ struct _E_Menu
E_Menu_Item *selected;
Time time;
void (*func_hide) (E_Menu *m, void *data);
void *func_hide_data;
};
struct _E_Menu_Item
@ -97,6 +102,7 @@ void e_menu_init(void );
void e_menu_callback_item(E_Menu *m, E_Menu_Item *mi);
void e_menu_item_set_callback(E_Menu_Item *mi, void (*func) (E_Menu *m, E_Menu_Item *mi, void *data), void *data);
void e_menu_hide_callback(E_Menu *m, void (*func) (E_Menu *m, void *data), void *data);
void e_menu_hide_submenus(E_Menu *menus_after);
void e_menu_select(int dx, int dy);
void e_menu_event_win_show(void );

Loading…
Cancel
Save