After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 591551 - Embed page setup dialog in the print dialog
Embed page setup dialog in the print dialog
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: printing
git master
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 424971 601100 605755 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-08-12 11:38 UTC by Marek Kašík
Modified: 2009-12-30 19:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
a patch embedding page setup combos in the print dialog (7.67 KB, patch)
2009-08-12 11:41 UTC, Marek Kašík
reviewed Details | Review
modified patch embedding page setup combos in the print dialog (7.50 KB, patch)
2009-08-14 08:28 UTC, Marek Kašík
committed Details | Review

Description Marek Kašík 2009-08-12 11:38:19 UTC
There is a possibility of embedding paper size combo and orientation
combo in the print dialog since Gtk+ 2.17.4. It is activated by calling of
gtk_print_operation_set_embed_page_setup() function.
It would be nice to have this feature in evince.

Regards

Marek
Comment 1 Marek Kašík 2009-08-12 11:41:11 UTC
Created attachment 140543 [details] [review]
a patch embedding page setup combos in the print dialog

This patch activates paper size combo and orientation combo in the Page Setup
tab in the print dialog. It removes "Page Setup..." from the file menu.
Selected page setup is stored to key file after each print.

Marek
Comment 2 Christian Persch 2009-08-12 21:43:20 UTC
 AC_CHECK_FUNCS(gtk_print_operation_get_n_pages_to_print)
+AC_CHECK_FUNCS(gtk_print_operation_set_embed_page_setup)

Why these configure checks, instead of just using #if GTK_CHECK_VERSION (...) in the code ?

       <separator/>
-      <menuitem name="FilePageSetupMenu" action="FilePageSetup"/>
+      <placeholder name="FilePlaceholder_1"/>

I don't think you need a placeholder; just using the /MainMenu/FileMenu/FilePrintMenu path with TRUE as last param to gtk_ui_manager_add_ui should work.

+		guint merge_id;
+
+		merge_id = gtk_ui_manager_new_merge_id (ev_window->priv->ui_manager);

No need to create a new merge ID; instead we should use the one that's returned from gtk_ui_manager_add_ui_from_file (priv->ui_manager, ui_path, &error) in init (let's store it in Priv).
Comment 3 Carlos Garcia Campos 2009-08-13 07:29:55 UTC
(In reply to comment #2)
>  AC_CHECK_FUNCS(gtk_print_operation_get_n_pages_to_print)
> +AC_CHECK_FUNCS(gtk_print_operation_set_embed_page_setup)
> 
> Why these configure checks, instead of just using #if GTK_CHECK_VERSION (...)
> in the code ?

For the first case (pages_to_print) there's not yet a release including such a method.

wrt this bug, I guess this is a UI change so we'll have to wait until the next cycle, or ask the release team. FWIW I'm thinking of branching early. 
Comment 4 Marek Kašík 2009-08-14 08:28:37 UTC
Created attachment 140746 [details] [review]
modified patch embedding page setup combos in the print dialog

Hi,

I modified the previous patch according to the comment #2.

> No need to create a new merge ID; instead we should use the one that's 
> returned from gtk_ui_manager_add_ui_from_file (priv->ui_manager, ui_path, 
> &error) in init (let's store it in Priv).

I didn't place the merge_id to the Priv, it is not necessary now. Those two functions are called in the init function.

Thank you for your comments

Marek
Comment 5 Carlos Garcia Campos 2009-10-26 12:32:44 UTC
Review of attachment 140746 [details] [review]:

Committed a slightly modified version of the patch. Thank you very much.
Comment 6 Carlos Garcia Campos 2009-11-25 12:10:38 UTC
*** Bug 424971 has been marked as a duplicate of this bug. ***
Comment 7 Pacho Ramos 2009-11-30 17:56:27 UTC
*** Bug 601100 has been marked as a duplicate of this bug. ***
Comment 8 Carlos Garcia Campos 2009-12-30 19:47:30 UTC
*** Bug 605755 has been marked as a duplicate of this bug. ***