Example #1
0
static void
trash_applet_do_empty (GSimpleAction *action,
                       GVariant      *parameter,
                       gpointer       user_data)
{
  TrashApplet *applet = (TrashApplet *) user_data;
  trash_empty (GTK_WIDGET (applet));
}
Example #2
0
/* Menu-specific shortcut handler.  Returns code that specifies both taken
 * actions and what should be done next. */
static KHandlerResponse
trashes_khandler(view_t *view, menu_data_t *m, const wchar_t keys[])
{
	if(wcscmp(keys, L"dd") == 0)
	{
		const char *const item = m->items[m->pos];
		const char *trash_dir = m->extra_data ? strchr(item, ']') + 2 : item;
		trash_empty(trash_dir);
		menus_remove_current(m->state);
		return KHR_REFRESH_WINDOW;
	}
	return KHR_UNHANDLED;
}
Example #3
0
static void
trash_applet_do_empty (GtkAction   *action,
                       TrashApplet *applet)
{
  trash_empty (GTK_WIDGET (applet));
}