Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-21 Thread Martin Nordholts
On 07/19/2009 11:06 AM, Martin Nordholts wrote: > On 07/18/2009 09:10 PM, Sven Neumann wrote: >> If you really need the semantics of >> gimp_export_image() as an interim solution, that's fine. But then we >> don't need to add an extra API for this. If you pass NULL as >> 'format_name' to gimp_expor

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-19 Thread Martin Nordholts
On 07/18/2009 09:10 PM, Sven Neumann wrote: > Hi, > > The semantics of gimp_export_image() are complete crap (I wrote this > code in the first place, so I have the right to say that). So let's not > make this error worse by introducing a new function that has the same > broken semantics. If you rea

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-18 Thread Sven Neumann
Hi, On Sat, 2009-07-18 at 19:10 +0200, Martin Nordholts wrote: > > I wonder how much sense it makes to actually create a duplicate image. > > Most export plug-ins will want to save what's visible. So it would be > > better if we would use this chance to get away from the > > copy-image-on-export

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-18 Thread Martin Nordholts
On 07/18/2009 06:53 PM, Sven Neumann wrote: > Hi, > > On Sat, 2009-07-18 at 15:02 +0200, Martin Nordholts wrote: > >> This is what we ended up in the last discussion. Anyone have some final >> comments or objections before I push this to master and port plug-ins to >> use this? > > I wonder how muc

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-18 Thread Sven Neumann
Hi, On Sat, 2009-07-18 at 15:02 +0200, Martin Nordholts wrote: > This is what we ended up in the last discussion. Anyone have some final > comments or objections before I push this to master and port plug-ins to > use this? I wonder how much sense it makes to actually create a duplicate image.

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-18 Thread Martin Nordholts
Hi again, This is what we ended up in the last discussion. Anyone have some final comments or objections before I push this to master and port plug-ins to use this? / Martin /** * gimp_export_prepare_image: * @image_ID: Pointer to the image_ID. * @drawable_ID: Pointer to the draw

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-15 Thread Martin Nordholts
On 07/15/2009 09:06 PM, Martin Nordholts wrote: > On 07/15/2009 03:24 PM, Michael Natterer wrote: >> On Tue, 2009-07-14 at 22:50 +0200, Martin Nordholts wrote: >> >> gimp_export_dialog_get_container() was not such a bad idea imho, >> but I would call it gimp_export_dialog_get_content_area(), becaus

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-15 Thread Sven Neumann
Hi, On Wed, 2009-07-15 at 15:24 +0200, Michael Natterer wrote: > I don't think it's such a good idea. What about the difference > between gtk_container_add() and gtk_box_pack_start()/end() with > all their options. We should not restrict the ways plugins are > able to construct their GUI, at leas

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-15 Thread Martin Nordholts
On 07/15/2009 03:24 PM, Michael Natterer wrote: > On Tue, 2009-07-14 at 22:50 +0200, Martin Nordholts wrote: > > gimp_export_dialog_get_container() was not such a bad idea imho, > but I would call it gimp_export_dialog_get_content_area(), because > we have precedence of this API in GtkDialog. Cons

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-15 Thread Michael Natterer
On Tue, 2009-07-14 at 22:50 +0200, Martin Nordholts wrote: > On 07/14/2009 10:44 PM, Sven Neumann wrote: > > > >> This function creates a new dialog, and plug-ins then use > >> > >> GtkWidget * gimp_export_dialog_get_container (GtkWidget *dialog); > >> > >> to get a vbox that the file-format sp

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-15 Thread Martin Nordholts
On 07/15/2009 12:20 AM, Sven Neumann wrote: > Hi, > > On Tue, 2009-07-14 at 22:59 +0200, Martin Nordholts wrote: > >> Exactly how will it break existing plug-ins? It will just be changed to >> act as if the user clicked the Export button. Take a look at the code on >> the branch and you'll see what

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-14 Thread Sven Neumann
Hi, On Tue, 2009-07-14 at 22:59 +0200, Martin Nordholts wrote: > Exactly how will it break existing plug-ins? It will just be changed to > act as if the user clicked the Export button. Take a look at the code on > the branch and you'll see what I mean There are questions to ask the user and we

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-14 Thread Martin Nordholts
On 07/14/2009 10:55 PM, Sven Neumann wrote: > Hi, > > On Tue, 2009-07-14 at 22:54 +0200, Martin Nordholts wrote: > >> The plan is to let plug-ins still use gimp_export_image() for creating >> an image suitable for exporting, it's just that we will remove that >> function's bad habit of asking a

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-14 Thread Sven Neumann
Hi, On Tue, 2009-07-14 at 22:54 +0200, Martin Nordholts wrote: > > That's fine, but it doesn't deal with the problem of how the file > > plug-in deals with the actual export. So far the gimp_export_image() > > functions does take care of all the nasty details. We definitely don't > > want to dupl

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-14 Thread Martin Nordholts
On 07/14/2009 10:47 PM, Sven Neumann wrote: > Hi, > > On Tue, 2009-07-14 at 12:44 +0200, Martin Nordholts wrote: > > >> Continuing the work on >> http://gui.gimp.org/index.php/Save_%2B_export_specification , here is my >> API proposal for common export dialog logic to be shared by file format >

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-14 Thread Martin Nordholts
On 07/14/2009 10:44 PM, Sven Neumann wrote: > >> This function creates a new dialog, and plug-ins then use >> >> GtkWidget * gimp_export_dialog_get_container (GtkWidget *dialog); >> >> to get a vbox that the file-format specific widgets with export options >> are put it. >> > > I'd sugges

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-14 Thread Sven Neumann
Hi, On Tue, 2009-07-14 at 12:44 +0200, Martin Nordholts wrote: > Continuing the work on > http://gui.gimp.org/index.php/Save_%2B_export_specification , here is my > API proposal for common export dialog logic to be shared by file format > plug-ins: > >GtkWidget * gimp_export_dialog_new (c

Re: [Gimp-developer] API proposal for libgimp export dialog

2009-07-14 Thread Sven Neumann
Hi, On Tue, 2009-07-14 at 12:44 +0200, Martin Nordholts wrote: > Continuing the work on > http://gui.gimp.org/index.php/Save_%2B_export_specification , here is my > API proposal for common export dialog logic to be shared by file format > plug-ins: > >GtkWidget * gimp_export_dialog_new (c