GNOME Bugzilla – Bug 591551
Embed page setup dialog in the print dialog
Last modified: 2009-12-30 19:47:30 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
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
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).
(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.
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
Review of attachment 140746 [details] [review]: Committed a slightly modified version of the patch. Thank you very much.
*** Bug 424971 has been marked as a duplicate of this bug. ***
*** Bug 601100 has been marked as a duplicate of this bug. ***
*** Bug 605755 has been marked as a duplicate of this bug. ***