[Shotwell] DirectPhotoPage. Add delete option



Hello:

I'm trying to add the option to delete photo from the DirectPhotoPage window.

I added the option in the menu:
https://imgur.com/M6FNxxl.png

I created the feature ...

Once the file was deleted
photo.get_file().delete();
(this work fine)

I wanted to delete it from the list as well.
https://imgur.com/YVav37x.png

Once deleted de file I tried with
PhotoTable.remove (photo_id);
But the compiler says that's forbidden to use it.
Can anyone give me any clue how to do it?
Thank you.


    private void on_delete_original() {
        Photo photo = get_photo();
        PhotoID photo_id = photo.get_photo_id();
        //File file = photo.get_file();

        Gtk.ResponseType response = AppWindow.affirm_cancel_question(
            _("Delete file %s?").printf(photo.get_basename()),
            _("_Delete"));

        if (response == Gtk.ResponseType.YES) {
            photo.remove_all_transformations(true);

            try {
                photo.remove_all_transformations(true);
                photo.get_file().delete();
                photo.remove_all_transformations(true);
                on_next_photo();
                PhotoTable.remove(photo_id);

                //photo.destroy();
            } catch (Error err) {
                string filename = photo.get_file().get_path();
                warning("Unable to delete for %s: %s", filename, err.message);
            }

        }

        return;

       
    }



Dani
O 15/04/20 ás 16:45, Dani escribiu:
Hello:

I don't understand, that opens up a picture.

What I would like to know is if shotwell has a function to resize the open image?

Very thanks.

Dani
O 10/04/20 ás 21:29, Rob Latham escribiu:
if you run shotwell with the name of an image as the argument, it will drop you into the editor. for example:

shotwell /tmp/my_screenshot.png

==rob

On Tue, Mar 31, 2020 at 4:37 PM Dani <dani damufo com> wrote:
Hello:

Is possible resize an image with shotwell?

Very thanks.



-- 
Dani
_______________________________________________
shotwell-list mailing list
shotwell-list gnome org
https://mail.gnome.org/mailman/listinfo/shotwell-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]