Ejemplo n.º 1
0
static CmdExecuteValue_t
clear_command_execute(Command_t *parent)
{
   ClearCommand_t *command = (ClearCommand_t*) parent;
   gpointer id;

   id = object_list_add_remove_cb(command->list, remove_one_object, command);
   object_list_delete_selected(command->list);
   object_list_remove_remove_cb(command->list, id);

   return CMD_APPEND;
}
Ejemplo n.º 2
0
static CmdExecuteValue_t
cut_command_execute(Command_t *parent)
{
   CutCommand_t *command = (CutCommand_t*) parent;
   gpointer id;

   command->paste_buffer = object_list_copy(command->paste_buffer,
                                            get_paste_buffer());
   id = object_list_add_remove_cb(command->list, remove_one_object, command);
   object_list_cut(command->list);
   object_list_remove_remove_cb(command->list, id);

   return CMD_APPEND;
}