Patch from saturn_vk for adding an action and key-binding (set

through config dialog) which allows to "Show Desktop" by
iconifying/uniconifying all active borders.

(Tested heavily, no problems.)


SVN revision: 23118
This commit is contained in:
Christopher Michael 2006-06-03 10:19:11 +00:00
parent f276c3d704
commit 8ca105b52f
4 changed files with 45 additions and 1 deletions

View File

@ -1315,7 +1315,43 @@ ACT_FN_GO(edit_mode_toggle)
else
e_gadman_mode_set(((E_Container *)obj)->gadman, E_GADMAN_MODE_NORMAL);
}
/***************************************************************************/
/***************************************************************************/
ACT_FN_GO(zone_deskshow_toggle)
{
E_Border *bd;
E_Border_List *bl;
E_Zone *zone;
zone = _e_actions_zone_get(obj);
if (!zone) zone = e_util_zone_current_get(e_manager_current_get());
if (zone)
{
bl = e_container_border_list_first(zone->container);
while ((bd = e_container_border_list_next(bl)))
{
if (bd->desk == e_desk_current_get(bd->zone))
{
if (zone->deskshow_toggle)
{
if (bd->deskshow) e_border_uniconify(bd);
bd->deskshow = 0;
}
else
{
if (bd->iconic) continue;
if (bd->client.netwm.state.skip_taskbar) continue;
if (bd->user_skip_winlist) continue;
e_border_iconify(bd);
bd->deskshow = 1;
}
}
}
zone->deskshow_toggle = zone->deskshow_toggle ? 0 : 1;
e_container_border_list_free(bl);
}
}
/***************************************************************************/
static void
@ -1554,6 +1590,12 @@ e_actions_init(void)
e_register_action_predef_name(_("Desktop"), _("Flip Desktop By..."),
"desk_flip_by", NULL, EDIT_RESTRICT_ACTION, 0);
/* zone_deskshow_toggle */
ACT_GO(zone_deskshow_toggle);
e_register_action_predef_name(_("Desktop"), _("Show the desktop"),
"zone_deskshow_toggle", NULL,
EDIT_RESTRICT_ACTION | EDIT_RESTRICT_PARAMS, 0);
/* desk_linear_flip_to */
ACT_GO(desk_flip_to);
e_register_action_predef_name(_("Desktop"), _("Flip Desktop To..."),

View File

@ -294,6 +294,7 @@ struct _E_Border
unsigned int shading : 1;
unsigned int shaded : 1;
unsigned int iconic : 1;
unsigned int deskshow : 1;
unsigned int sticky : 1;
unsigned int shaped : 1;
unsigned int need_shape_merge : 1;

View File

@ -1076,7 +1076,7 @@ _e_keybinding_keybind_cb_del_keybinding(void *data, void *data2)
if (!cfdata) return;
snprintf(buf, sizeof(buf), _("You requested to delte \"%s\" keybinding.<br>"
snprintf(buf, sizeof(buf), _("You requested to delete \"%s\" keybinding.<br>"
"<br>"
"Are you sure you want to delete it?"),
e_widget_ilist_selected_label_get(cfdata->gui.binding_ilist));

View File

@ -26,6 +26,7 @@ struct _E_Zone
unsigned int num;
E_Container *container;
int fullscreen;
unsigned int deskshow_toggle : 1;
Evas_Object *bg_object;
Evas_Object *bg_event_object;