Hi,
there is a feature request for this:
https://gitlab.gnome.org/GNOME/shotwell/-/issues/130
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:
https://gitlab.gnome.org/GNOME/shotwell/commit/c298a04e78968cdf3b82b4a728bf58f205915641
 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 <[email protected]> wrote:
> > > 
> > >           
> > >           
> > > >              Hello:
> > > > 
> > > >               
> > > > 
> > > >               Is possible resize an image with shotwell?
> > > > 
> > > >               
> > > > 
> > > >               Very thanks.
> > > > 
> > > >               
> > > > 
> > > >               
> > > > 
> > > >                 
> > > > 
> > > >               
> > > >               -- Dani
> > > >             
> > > >             _______________________________________________
> > > > 
> > > >             shotwell-list mailing list
> > > > 
> > > >             [email protected]
> > > > 
> > > >             
> > > > https://mail.gnome.org/mailman/listinfo/shotwell-list
> > > > 
> > > >           
> > > 
> > >         
> > >       
> > 
> >       
> > 
> >     
> 
>     
> 
>   
> 
> 
> _______________________________________________shotwell-list mailing 
> [email protected]
> https://mail.gnome.org/mailman/listinfo/shotwell-list
_______________________________________________
shotwell-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/shotwell-list

Reply via email to