Added action wrapper for "Cleanup Windows"

SVN revision: 26544
This commit is contained in:
Christopher Michael 2006-10-11 23:53:39 +00:00
parent fc8e60ea62
commit 9200c892c3
2 changed files with 18 additions and 5 deletions

View File

@ -1354,7 +1354,6 @@ ACT_FN_GO_KEY(winlist)
}
}
/***************************************************************************/
ACT_FN_GO(desk_deskshow_toggle)
{
E_Zone *zone;
@ -1367,6 +1366,16 @@ ACT_FN_GO(desk_deskshow_toggle)
}
}
ACT_FN_GO(cleanup_windows)
{
E_Zone *zone;
zone = _e_actions_zone_get(obj);
if (!zone) zone = e_util_zone_current_get(e_manager_current_get());
if (zone)
e_place_zone_region_smart_cleanup(zone);
}
/***************************************************************************/
static E_Dialog *exit_dialog = NULL;
@ -2006,6 +2015,10 @@ e_actions_init(void)
/* desk_lock */
ACT_GO(desk_lock);
e_action_predef_name_set(_("Desktop"), _("Desktop Lock"), "desk_lock", NULL, NULL, 0);
/* cleanup_windows */
ACT_GO(cleanup_windows);
e_action_predef_name_set(_("Desktop"), _("Cleanup Windows"), "cleanup_windows", NULL, NULL, 0);
return 1;
}

View File

@ -988,10 +988,10 @@ _e_int_menus_clients_icon_cb(void *data, E_Menu *m, E_Menu_Item *mi)
static void
_e_int_menus_clients_cleanup_cb(void *data, E_Menu *m, E_Menu_Item *mi)
{
E_Zone *zone;
zone = data;
e_place_zone_region_smart_cleanup(zone);
E_Action *act;
act = e_action_find("cleanup_windows");
if (act) act->func.go(E_OBJECT(m->zone), NULL);
}
static void