Re: [Shotwell] DirectPhotoPage. Add delete option



Hello:

Very Thanks!!

My intention was once I manage to delete, do just what you comment, a fork and then a pull request.
I didn't want to make a feature request so you could see that I was willing to try it myself first.
There is another feature request I wanted to do for the directphotopage part.
This is about being able to resize a photo (original from direcphotopage).
I will ask for it from where to indicate me.

Thank you very much!!

Dani
O 19/04/20 ás 09:07, Jens Georg escribiu:
Hi,

there is a feature request for this:


It is much easier to discuss about code on gitlab, so you can probably fork shotwell there and create a merge request :)

There is also already some minimal code for this in git:

Looking at the library code, you should probably follow remove_photos_from_library

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



_______________________________________________
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]