Re: Print Dialog / Improving Print to file option

2012-09-25 Thread Dale Amon
On Wed, Aug 15, 2012 at 10:38:15PM +0200, Lanoxx wrote:
 On 15/08/12 20:27, Javier Jardón wrote:
 On 15 August 2012 23:08, Lanoxx lan...@gmx.net wrote:
 Hi,
 Hello,
 
 Then the filename says output.pdf which any sane person will probably want
 to change. So I have to type the file name and then also add .pdf again and
 finally I can click Print.
 FYI, There is a GnomeGoal proposed related to this [1]
 
 [1] https://live.gnome.org/GnomeGoals/PrintToFile
 Thats a great goal, and should definitely be implemented. But still
 it does not solve the actual problem which I described. I also
 looked here:
 http://git.gnome.org/browse/gtk+/tree/modules/printbackends/file/gtkprintbackendfile.c
 but I can't find any GtkWidget being created, so I guess thats not it.

I agree with the idea of standardizing on a file browser window
for selecting the file and adding in the defaults in an editable way.
I very often save things to file with names like

file1.pdf
file2.pdf
file2a.pdf
file3.pdf

and so forth, so memory is useful. It would also be nice if I there
was some memory such that if you printed to file the last time, it
pops up the next time just as you left it. I do not know about
others but 'least surprise' for me is that things are always left
as I last used them.

It would also be useful to have a 'recently used' capability that
just puts you to the file name and printer of one of the last N 
files you have printed. Useful if you forgot where you put something;
or in a large facility, which of multiple printers in several
buildings did you send that thing you printed before going out to
lunch; also useful if you want to go back and do a print to file
of the something under a similar name. Hell, you might even try
remembering the source URL as well as the destination printer or
file name.

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Print Dialog / Improving Print to file option [DONE]

2012-08-17 Thread Lanoxx

  
  
Just for the record, i was looking for:
GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(widget)))

Anyway, I managed to build a patch. I have created a bug report for
it, see here:

https://bugzilla.gnome.org/show_bug.cgi?id=682129

The patch could still be improved by placing the options box below
the radio buttons for the file type.

Regards
Lanoxx

P.S: If this could land in 3.6 that would be absolutely awesome

On 17/08/12 22:59, Lanoxx wrote:


  
  In file gtkprinteroptionwidget.c:710
  static void
construct_widgets (GtkPrinterOptionWidget *widget)

  is there some way to get a pointer to the parent widget, that is
  to the whole print dialog? As I understand it,
  GtkPrinterOptionWidget is only the pointer to the option section,
  right?
  
  On 16/08/12 00:11, Andreas Nilsson
wrote:
  
  On
08/15/2012 04:08 PM, Lanoxx wrote: 
 
  
  Then the filename says output.pdf which any sane person will
  probably want to change. So I have to type the file name and
  then also add .pdf again and finally I can click "Print". 
  So my question is, if this comes from Gnome or from Ubuntu so
  I can create a bug in the right bug tracker for this, and
  maybe someone could also point me to the code for the "Print
  to File" Options. Maybe I could even fix this myself. 

It's in GTK+ and should be filed in the printing component. 
https://bugzilla.gnome.org/browse.cgi?product=gtk%2B


Just file a bug about the issue, attach a screenshot and provide
a patch. 

There is already a bug open about the default name and location
here: https://bugzilla.gnome.org/show_bug.cgi?id=668529

- Andreas 
___ 
desktop-devel-list mailing list 
desktop-devel-list@gnome.org

https://mail.gnome.org/mailman/listinfo/desktop-devel-list

  
  
  
  
  
  ___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list


  

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list

Print Dialog / Improving Print to file option

2012-08-15 Thread Lanoxx

Hi,

I would like to know if the Print dialog that is used in Ubuntu, is 
provided by a Gnome package or whether it is added by Ubuntu. In 
particular, there is a default printer option named Print to File in 
Ubuntu, and when it is chosen, then one can print to PDF, Postscript or 
SVG (at least in Inkscape). The problem with this dialog makes saving 
the file unnecessary complicated, because on has to first select the 
folder which normally requires at least 4 clicks:


1. click on the dropdown
2. click other...
3. Choose the folder (might require more clicks)
4. click open

Then the filename says output.pdf which any sane person will probably 
want to change. So I have to type the file name and then also add .pdf 
again and finally I can click Print.


There are another two caveats here, first if I forget to add .pdf to 
the filename, then the file will be saved without the .pdf extension. 
There is no logic to add it automatically. And second if I had printed 
the document to a file before and now I want to save it again, then I 
have to remember the file name and type it in again (also having to 
select the folder again). If I make a typo, then I end up with two files 
instead of overwriting the first one.


IMHO, it would me much easier, if there was only one long input field 
and a button Browse next to it, which when clicked just opens a file 
selection dialog, where one can enter the file name AND folder name 
together, additionally this dialog should remember the last name that 
was used to print, and also automatically supply the extension (e.g 
.pdf, or .ps) based on the type that was selected.


So my question is, if this comes from Gnome or from Ubuntu so I can 
create a bug in the right bug tracker for this, and maybe someone could 
also point me to the code for the Print to File Options. Maybe I could 
even fix this myself.


Kind Regards
Lanoxx


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Print Dialog / Improving Print to file option

2012-08-15 Thread Tomasz Torcz
On Wed, Aug 15, 2012 at 04:58:06PM +0200, Olav Vitters wrote:
 On Wed, Aug 15, 2012 at 04:08:51PM +0200, Lanoxx wrote:
  I would like to know if the Print dialog that is used in Ubuntu, is
  provided by a Gnome package or whether it is added by Ubuntu. In
 
 Please make a screenshot and place it somewhere. Then share the link to
 the screenshot.

  The description fits GTK print dialog, I see the same behaviour on Fedora.

-- 
Tomasz Torcz   Never underestimate the bandwidth of a station
xmpp: zdzich...@chrome.plwagon filled with backup tapes. -- Jim Gray

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Print Dialog / Improving Print to file option

2012-08-15 Thread Lanoxx

http://imageshack.us/photo/my-images/94/printtofile.png/

On 15/08/12 16:58, Olav Vitters wrote:

On Wed, Aug 15, 2012 at 04:08:51PM +0200, Lanoxx wrote:

I would like to know if the Print dialog that is used in Ubuntu, is
provided by a Gnome package or whether it is added by Ubuntu. In

Please make a screenshot and place it somewhere. Then share the link to
the screenshot.



___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Print Dialog / Improving Print to file option

2012-08-15 Thread Jasper St. Pierre
It's a GTK+ thing.

http://git.gnome.org/browse/gtk+/tree/modules/printbackends/file/gtkprintbackendfile.c

On Wed, Aug 15, 2012 at 1:28 PM, Lanoxx lan...@gmx.net wrote:
 http://imageshack.us/photo/my-images/94/printtofile.png/


 On 15/08/12 16:58, Olav Vitters wrote:

 On Wed, Aug 15, 2012 at 04:08:51PM +0200, Lanoxx wrote:

 I would like to know if the Print dialog that is used in Ubuntu, is
 provided by a Gnome package or whether it is added by Ubuntu. In

 Please make a screenshot and place it somewhere. Then share the link to
 the screenshot.


 ___
 desktop-devel-list mailing list
 desktop-devel-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/desktop-devel-list



-- 
  Jasper
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Print Dialog / Improving Print to file option

2012-08-15 Thread Javier Jardón
On 15 August 2012 23:08, Lanoxx lan...@gmx.net wrote:
 Hi,

Hello,

 Then the filename says output.pdf which any sane person will probably want
 to change. So I have to type the file name and then also add .pdf again and
 finally I can click Print.

FYI, There is a GnomeGoal proposed related to this [1]

[1] https://live.gnome.org/GnomeGoals/PrintToFile

-- 
Javier Jardón Cabezas
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Print Dialog / Improving Print to file option

2012-08-15 Thread Lanoxx


On 15/08/12 20:27, Javier Jardón wrote:

On 15 August 2012 23:08, Lanoxx lan...@gmx.net wrote:

Hi,

Hello,


Then the filename says output.pdf which any sane person will probably want
to change. So I have to type the file name and then also add .pdf again and
finally I can click Print.

FYI, There is a GnomeGoal proposed related to this [1]

[1] https://live.gnome.org/GnomeGoals/PrintToFile
Thats a great goal, and should definitely be implemented. But still it 
does not solve the actual problem which I described. I also looked here:

http://git.gnome.org/browse/gtk+/tree/modules/printbackends/file/gtkprintbackendfile.c
but I can't find any GtkWidget being created, so I guess thats not it.




___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Print Dialog / Improving Print to file option

2012-08-15 Thread Lanoxx

  
  
Ok I found it, the code which I am talking about is in [1]:

In line 818 (see grep [3]):
case GTK_PRINTER_OPTION_TYPE_FILESAVE:

and in line 828:
priv-combo = gtk_file_chooser_button_new (_("Select a folder"),
   GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);

and in line 835 following:
label = gtk_label_new_with_mnemonic (_("_Name:"));
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), priv-entry);

gtk_grid_attach (GTK_GRID (priv-filechooser), label, 0, 0, 1, 1);
gtk_grid_attach (GTK_GRID (priv-filechooser), priv-entry, 1, 0, 1, 1);

label = gtk_label_new_with_mnemonic (_("_Save in folder:"));
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_widget_set_valign (label, GTK_ALIGN_CENTER);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), priv-combo);
The config option seems to be activated in [2]:
  option = gtk_printer_option_new ("gtk-main-page-custom-input", _("File"),
   GTK_PRINTER_OPTION_TYPE_FILESAVE);
So I believe it would be enough to change the
gtkprinteroptionwidget.c at line 828 following to
GTK_FILE_CHOOSER_ACTION_OPEN, and instead of creating the two
widgets (entry and filechooser), we could just use the file choose.
Of course the callback 
filesave_changed_cb
would need to be modified too.

Does anyone like my proposal?

Regards
Lanoxx

[1] http://git.gnome.org/browse/gtk+/tree/gtk/gtkprinteroptionwidget.c
[2]
http://git.gnome.org/browse/gtk+/tree/modules/printbackends/file/gtkprintbackendfile.c
[3] grep -rn GTK_PRINTER_OPTION_TYPE_FILESAVE *
  gtk/gtkprinteroption.h:54:  GTK_PRINTER_OPTION_TYPE_FILESAVE,
  gtk/gtkprinteroptionwidget.c:818:    case
GTK_PRINTER_OPTION_TYPE_FILESAVE:
  gtk/gtkprinteroptionwidget.c:928:    case
GTK_PRINTER_OPTION_TYPE_FILESAVE:
  gtk/gtkprintunixdialog.c:531:  option-type
== GTK_PRINTER_OPTION_TYPE_FILESAVE)
  modules/printbackends/file/gtkprintbackendfile.c:720:       
           GTK_PRINTER_OPTION_TYPE_FILESAVE);

On 15/08/12 22:38, Lanoxx wrote:


  
  On 15/08/12 20:27, Javier Jardón wrote:
  
  On 15 August 2012 23:08, Lanoxx
lan...@gmx.net wrote:

Hi,
  

Hello,


Then the filename says output.pdf which
  any sane person will probably want
  
  to change. So I have to type the file name and then also add
  .pdf again and
  
  finally I can click "Print".
  

FYI, There is a GnomeGoal proposed related to this [1]


[1] https://live.gnome.org/GnomeGoals/PrintToFile

  
  Thats a great goal, and should definitely be implemented. But
  still it does not solve the actual problem which I described. I
  also looked here:
  
http://git.gnome.org/browse/gtk+/tree/modules/printbackends/file/gtkprintbackendfile.c
  
  but I can't find any GtkWidget being created, so I guess thats not
  it.
  
  

  
  
  ___
  
  desktop-devel-list mailing list
  
  desktop-devel-list@gnome.org
  
  https://mail.gnome.org/mailman/listinfo/desktop-devel-list


  

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Print Dialog / Improving Print to file option

2012-08-15 Thread Andreas Nilsson

On 08/15/2012 04:08 PM, Lanoxx wrote:



Then the filename says output.pdf which any sane person will probably 
want to change. So I have to type the file name and then also add .pdf 
again and finally I can click Print.
So my question is, if this comes from Gnome or from Ubuntu so I can 
create a bug in the right bug tracker for this, and maybe someone 
could also point me to the code for the Print to File Options. Maybe 
I could even fix this myself.

It's in GTK+ and should be filed in the printing component.
https://bugzilla.gnome.org/browse.cgi?product=gtk%2B

Just file a bug about the issue, attach a screenshot and provide a patch.

There is already a bug open about the default name and location here: 
https://bugzilla.gnome.org/show_bug.cgi?id=668529

- Andreas
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list