From 69d92c409d333e5dd9cc82537c0834b201487c60 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 21 Dec 2004 17:41:03 +0000 Subject: [PATCH] Initial revision --- AUTHORS | 0 COPYING | 340 + ChangeLog | 9077 +++++++++++++++++ INSTALL | 229 + Makefile.am | 5 + NEWS | 0 README | 0 autogen.sh | 20 + configure.ac | 121 + cut-n-paste/Makefile.am | 1 + cut-n-paste/recent-files/Makefile.am | 32 + cut-n-paste/recent-files/egg-recent-item.c | 440 + cut-n-paste/recent-files/egg-recent-item.h | 78 + cut-n-paste/recent-files/egg-recent-model.c | 1775 ++++ cut-n-paste/recent-files/egg-recent-model.h | 80 + cut-n-paste/recent-files/egg-recent-util.c | 158 + cut-n-paste/recent-files/egg-recent-util.h | 23 + .../recent-files/egg-recent-view-bonobo.c | 714 ++ .../recent-files/egg-recent-view-bonobo.h | 58 + .../recent-files/egg-recent-view-gtk.c | 817 ++ .../recent-files/egg-recent-view-gtk.h | 64 + cut-n-paste/recent-files/egg-recent-view.c | 68 + cut-n-paste/recent-files/egg-recent-view.h | 43 + cut-n-paste/recent-files/update-from-egg.sh | 25 + data/Makefile.am | 10 + data/evince-ui.xml | 22 + po/ChangeLog | 1 + po/POTFILES.in | 8 + po/de.po | 596 ++ po/evince.pot | 593 ++ shell/Makefile.am | 24 + shell/ev-application.c | 196 + shell/ev-application.h | 63 + shell/ev-window.c | 509 + shell/ev-window.h | 62 + shell/global-params.cc | 36 + shell/global-params.h | 36 + shell/main.c | 66 + viewer/Makefile.am | 15 + viewer/ev-viewer.c | 58 + viewer/ev-viewer.h | 55 + 41 files changed, 16518 insertions(+) create mode 100644 AUTHORS create mode 100644 COPYING create mode 100644 ChangeLog create mode 100644 INSTALL create mode 100644 Makefile.am create mode 100644 NEWS create mode 100644 README create mode 100755 autogen.sh create mode 100644 configure.ac create mode 100644 cut-n-paste/Makefile.am create mode 100644 cut-n-paste/recent-files/Makefile.am create mode 100644 cut-n-paste/recent-files/egg-recent-item.c create mode 100644 cut-n-paste/recent-files/egg-recent-item.h create mode 100644 cut-n-paste/recent-files/egg-recent-model.c create mode 100644 cut-n-paste/recent-files/egg-recent-model.h create mode 100644 cut-n-paste/recent-files/egg-recent-util.c create mode 100644 cut-n-paste/recent-files/egg-recent-util.h create mode 100644 cut-n-paste/recent-files/egg-recent-view-bonobo.c create mode 100644 cut-n-paste/recent-files/egg-recent-view-bonobo.h create mode 100644 cut-n-paste/recent-files/egg-recent-view-gtk.c create mode 100644 cut-n-paste/recent-files/egg-recent-view-gtk.h create mode 100644 cut-n-paste/recent-files/egg-recent-view.c create mode 100644 cut-n-paste/recent-files/egg-recent-view.h create mode 100755 cut-n-paste/recent-files/update-from-egg.sh create mode 100644 data/Makefile.am create mode 100644 data/evince-ui.xml create mode 100644 po/ChangeLog create mode 100644 po/POTFILES.in create mode 100644 po/de.po create mode 100644 po/evince.pot create mode 100644 shell/Makefile.am create mode 100644 shell/ev-application.c create mode 100644 shell/ev-application.h create mode 100644 shell/ev-window.c create mode 100644 shell/ev-window.h create mode 100644 shell/global-params.cc create mode 100644 shell/global-params.h create mode 100644 shell/main.c create mode 100644 viewer/Makefile.am create mode 100644 viewer/ev-viewer.c create mode 100644 viewer/ev-viewer.h diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..e69de29b diff --git a/COPYING b/COPYING new file mode 100644 index 00000000..d60c31a9 --- /dev/null +++ b/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..eefc2192 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,9077 @@ +2004-10-23 Martin Kretzschmar + + * ChangeLog, ggv/ChangeLog, gpdf/ChangeLog: merge the separate + ChangeLogs into one toplevel file. Keep only that. + +2004-09-28 Pawan Chitrakar + + * ggv/configure.in: Added ne "Nepali" in ALL_LINGUAS + +2004-09-20 Mark McLoughlin + + * gpdf/xpdf/GnomeVFSStream.cc (reset, fillBuf): check gnome_vfs_foo + return values. Fixes crashes with gnome-vfs' http method. Bug + #153159, #151364, Red Hat Bug #132469, half of Debian Bug #268873. + +2004-09-13 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 2.8.0. + + * gpdf/README.GPdf: the font situation is a bit better now. + +2004-09-12 Jaka Mocnik + + * ggv/configure.in: version 2.8.0; tag GGV_2_8_0; tarball for the upcoming 2.8.0 release. + +2004-09-07 Gora Mohanty + + * gpdf/configure.in: Added 'or' to ALL_LINGUAS. + +2004-09-06 Jaka Mocnik + + * ggv/configure.in: version 2.7.99; tag GGV_2_7_99; released a tarball. + * ggv/ggv.desktop.in (MimeType): removed application/pdf as the pdf + viewing functionality of ggv is, although still available, not + actively supported - use gpdf for PDF previewing. + +2004-09-04 Kjartan Maraas + + * gpdf/configure.in: Add «nb» to ALL_LINGUAS. + +2004-08-30 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 2.7.91. Disable "development + release" warning. + +2004-08-28 Martin Kretzschmar + + * gpdf/xpdf/gpdf-bookmarks-view.cc (gpdf_bookmarks_view_update_bkvisual): + nodes without link actions have NULL outline items. Don't + dereference them. Fixes bug #150269. + +2004-08-28 Akagic Amila + + * configure.in: Added 'bs' to ALL_LINGUAS. + +2004-08-27 Akagic Amila + + * ggv/configure.in: Added 'bs' to ALL_LINGUAS. + +2004-08-24 Dan Williams + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_link_action_uri): don't dereference + app if it's NULL (i.e. no app available for that uri). + Fixes Bug #150476 (Red Hat Bug #127803). + +2004-08-17 Mark McLoughlin + + * gpdf/lib/recent-files/egg-recent-item.[ch], + lib/recent-files/egg-recent-model.c, + lib/recent-files/egg-recent-view-gtk.c: sync with + latest libegg. + +2004-08-17 Mark McLoughlin + + * ggv/src/recent-files/egg-recent-item.[ch], + src/recent-files/egg-recent-model.c, + src/recent-files/egg-recent-util.[ch], + src/recent-files/egg-recent-view-bonobo.c, + src/recent-files/egg-recent-view-gtk.c, + src/recent-files/egg-recent-view.[ch]: sync with + latest libegg. + + * ggv/src/recent-files/update-from-egg.sh: add + + * ggv/src/recent-files/Makefile.am: add update-from-egg.sh to + EXTRA_DIST. + +2004-08-16 Kjartan Maraas + + * ggv/configure.in: Added nb to ALL_LINGUAS. + +2004-08-15 Martin Kretzschmar + + Fix for #149954. Based on patch by Vijaykumar Patwari + + + * gpdf/xpdf/gpdf-view.c, xpdf/gpdf-view.h (gpdf_view_save_as): Changed + to return the result of PDFDoc::saveAs. + + * gpdf/xpdf/gpdf-contol.cc (overwrite_existing_file): New function, ask + user before overwriting existing file. + (save_error_dialog): New function, Throws error dialog. + (gpdf_control_get_filename): Morph it into + gpdf_control_save_file(), Check if the file already exists. + (verb_SaveAs_cb): Call new function to save a file. + +2004-08-12 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (getFontFace): prefer embedded fonts over + base 14 fonts. Fixes/works around Bug #149952. + +2004-08-11 Martin Kretzschmar + + * gpdf/configure.in, README.GPdf: actually, we require libgnomeprint + 2.5.1 (for GNOME_PRINT_KEY_DUPLEX). + Thanks {agriffis,foser}@gentoo.org. See also + http://bugs.gentoo.org/show_bug.cgi?id=46913 + +2004-08-05 Remi Cohen-Scali + + Fixes #126719 by Jeff Muizelaar : + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_handle_drag_motion): + calculate (x,y) properly for the case where we get unhinted + motion events that are relative to the actual canvas window, + instead of the widget window. + +2004-08-02 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 2.7.90. + +2004-08-02 Martin Kretzschmar + + * gpdf/shell/gpdf.c (verb_FileExit_cb, gw_close_all): remove. + + * gpdf/shell/gpdf-window-ui.xml: remove FileExit references. + Fixes Bug 148681. + +2004-08-02 Martin Kretzschmar + + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_set_pdf_doc), + * gpdf/xpdf/gpdf-bookmarks-view.cc (gpdf_bookmarks_view_set_pdf_doc): + Make the guint to pointer cast explicit. + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_print): keep the print dialog + in a private member variable, don't destroy it unconditionally on + when the BonoboControl is disconnected. + (gpdf_control_get_filename): ditto for the file chooser. + (properties_response_handler, properties_delete_handler) + (verb_FileProperties_cb): and for the properties window. + (gpdf_control_disconnected): destroy any left over dialogs. + Fixes Bug #149062 (and lots of crash-on-exit bugs, I hope). + +2004-07-24 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (getFontFaceEmbedded): rewrite, this time + respect encoding information/CID-to-GID stuff etc. Fixes Bug #148362. + (lookupGlyph): update for changes in getFontFaceEmbedded + (drawString): ditto. + +2004-07-21 Ray Strode + * ggv/ggv/ggv.desktop.in: Add MimeType line to desktop file + new mime sytem. + +2004-07-20 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_zoom): add the hack Federico did + for page changes for zooming as well. Still flashes when zooming, + but only in the background color, better than flashing with the + old content IMHO. + +2004-07-19 Martin Kretzschmar + + * gpdf/gpdf.desktop.in: added X-GNOME-Bugzilla-foo entries. I hope that + fixes Bug #147870. + (MimeType): add, we understand application/pdf. + + * gpdf/xpdf/gpdf-control.cc (gnome_vfs_uri_new): use just + gnome_vfs_uri_extract_short_name (which returns the unescaped + basename of a vfs_uri) as title. Fixes Bug #130611. + +2004-07-19 Federico Mena Quintero + + Fixes #126720: + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_goto_page_no_history): Don't render + the page in an idle handler. + (gpdf_view_render_page): Return void. + (gpdf_view_scroll_to_top): As a hack to keep the canvas from + scrolling-then-updating, set the background pixmap of the + container window to null, then hide the bin_window, the scroll, + then show the bin_window, and reset the background. + (gpdf_view_scroll_to_bottom): Likewise. + +2004-07-18 Jaka Mocnik + + * ggv/configure.in: version 2.7.0; released a tarball. + * ggv/src/ggv-prefs.c (ggv_prefs_load): test for "/usr/usb/lpr" on Solaris. + * ggv/src/ggv-ui.xml: changed "Fullscreen mode" to "Full Screen"; fixes #144876. + * ggv/src/gtkgs.c (gtk_gs_goto_page): do a gtk_gs_set_page_size() in order to properly + display documents with pages of multiple sizes. now how could this one have crept in + and how come no one noticed it until now? fixes #147591. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_print): do not attempt to execute + a print command from an argv array whose first element is NULL; fixes #147705. + +2004-07-16 Muktha + + * ggv/bonobo/main.c (main): disable session manager connection for + ggv-postscript-viewer. Fixes bug #147710. + +Fri Jun 18 08:33:07 2004 Jonathan Blandford + + * ggv/AUTHORS: Changed the authors file to make it more obvious who's + really in charge. + +2004-06-25 Martin Kretzschmar + + * gpdf/shell/gpdf.c (verb_HelpAbout_cb): Update copyright period to + 1996-2004. + +2004-06-16 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_load): applied patch from Subrahmanyam + Madduri: added code for getting the filename which is to be opened, + from the path of the file. Also changed the order of display in title + to " - GGV". Fixes bug #60092 + * ggv/bonobo/ggv-postscript-view-ui.xml: applied a patch from Udayan Kumar, + that adds a print icon to the toolbar, fixing #140907. + +2004-06-13 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_reset_link_status_cb): + Fixed indentation. + Also added c-indent-level in emacs local vars. + + * gpdf/xpdf/tests/test-gpdf-view.cc (TEST_NEW): Forgot to commit the + test. Added the pdf doc as a param for constructor. + + * gpdf/xpdf/gpdf-bookmarks-view.cc (gpdf_bookmarks_view_populate_idle): + Changed the way to get the gdk window on which the cursor + is set. Now use the treeview widget window instead of getting + its parent. + + * gpdf/xpdf/gpdf-thumbnails-view.cc (GPDF_DEFAULT_THUMB_WIDTH): + Removed unused define for empty page thumbnail image. + (gpdf_thumbnails_view_canvas_outline_event_cb) + (gpdf_thumbnails_view_populate_idle): + Changed the way to get the gdk window on which the cursor + is set. Now use the canvas widget window instead of getting + its parent. + +2004-06-07 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 2.7.2. + +2004-06-07 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_setup_view_widgets): set a + step_increment for the gtk_scrolled_window's [hv]adjustments. + Workaround for bug #132489 (see also bug #96546). (Makes the + scrollbar buttons work.) + +2004-06-06 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_setup_view_widgets): + Use new way to allocate a gpdf-view. + + * gpdf/xpdf/gpdf-view.h: Removed gpdf_view_new proto. + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_set_pdf_doc) + (gpdf_view_get_property, gpdf_view_set_property) + (gpdf_view_constructor, gpdf_view_class_init): + Change the way view is allocated to use the g_object_new + way. Added props for pdf doc and for parent control. + (gpdf_view_link_entered_cb): Init some var to NULL. + (gpdf_view_bookmark_selected): Added case for actionURI + to handle bookmarks that are URIs. + + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_class_init): + Removed params spec desc strings as a some translated ones. + + * gpdf/xpdf/gpdf-bookmarks-view.cc (gpdf_bookmarks_view_class_init): + Removed params spec desc strings as a some translated ones. + (gpdf_bookmarks_view_construct): Loaded a new (network) stock + icon for bookmarks wearing an actionURI link. + (gpdf_bookmarks_view_update_bkvisual): Got item object from + tree model to be able to discriminate icons to update. actionURI + associated icons and actionNamed associated icons need no update. + (gpdf_bookmarks_view_flat_recurse_outlines): Added new LinkURI + local instances. Init others to NULL to avoid warnings. + Changed strings when action is unknown to make it more + interpretable. + Add code to handle LinkURI actions instances. + + * gpdf/xpdf/gpdf-annots-view.cc (gpdf_annots_view_class_init): + Removed params spec desc strings as a some translated ones. + +2004-06-06 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc: include gpdf-control-private.h for + prototypes. + (gpdf_control_private_error_dialog): add ref_parent parameter: + whether to _ref the parent control. + (destroy_widget_unref_control): signal handler for the alert's + "response" signal: destroy the dialog, unref the parent control. + (gpdf_control_private_display_help) + (gpdf_control_no_postscript_printer_alert): update error_dialog + calls. + (persist_file_loading_failed_cb): ditto, with ref_parent = TRUE, + thus the control never auto-exits before the user can ack the + "Loading failed" message. Fixes bug #137262. + + * gpdf/xpdf/gpdf-control-private.h: update prototype. + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_link_action_uri): update + error_dialog argument list. + + * gpdf/shell/gpdf.c (gw_control_load_pdf): + s/error_stream:/error_persist_file:/ + + * gpdf/xpdf/tests/test-gpdf-view.cc (view_implements_ggv_document): fix + build. + +2004-06-05 Martin Kretzschmar + + * gpdf/xpdf/Makefile.am: drop support for building xpdf, pdfto*. + + * gpdf/configure.in: simplify more. Drop --enable-no-text-select + and --enable-multithreaded options. Bug #111404. + +2004-06-03 Martin Kretzschmar + + * gpdf/configure.in: post release version bump. Reorder a bit, add + some section header comments. Remove OS/2 check. Remove checks + that were only necessary for the Xpdf build system. + + * gpdf/fofi/Makefile.dep, splash/Makefile.dep: cvs remove. Remainings + of the Xpdf non-automake build system. + + * gpdf/shell/gpdf.c (verb_HelpAbout_cb): + s/translator_credits.../translator-credits/ as requested some + months ago. + +2004-06-01 Martin Kretzschmar + + * gpdf/NEWS, configure.in: Version 2.7.1. + +2004-05-31 Martin Kretzschmar + + * gpdf/configure.in: print Message Of Doom. + +2004-05-23 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (drawImageMask): undo 2004-02-28 change and + obey invert parameter instead (D'oh). Bug #142964. + (drawImageMask): do mask color computations and some variable + definitions outside of the loop. Swap if/else branches. + (drawImage): move variable defns outside loop. + +2004-05-21 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-thumbnails-view.cc: Changed current_gen_thumb + type from gint to guint to avoid warnings. + (gpdf_thumbnails_view_populate_idle): Init Thumb ptr + to NULL to avoid warning. + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_link_entered_cb): + Add braces around each case to avoid warning about + inits and/or cross case inits. + (gpdf_view_render_page): Update displayPage call for + annots view to new xpdf3 API. + +2004-05-17 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_render_page): add missing crop + argument. + + * gpdf/fofi/Makefile.am, splash/Makefile.am: added. + + * gpdf/Makefile.am: add fofi and splash subdirs. + + * gpdf/ANNOUNCE: + * gpdf/CHANGES: + * gpdf/Makefile.am: + * gpdf/README: + * gpdf/aconf-win32.h: + * gpdf/configure.in: + * gpdf/dj_make.bat: + * gpdf/doc/pdffonts.1: + * gpdf/doc/pdffonts.cat: + * gpdf/doc/pdffonts.hlp: + * gpdf/doc/pdfimages.1: + * gpdf/doc/pdfimages.cat: + * gpdf/doc/pdfimages.hlp: + * gpdf/doc/pdfinfo.1: + * gpdf/doc/pdfinfo.cat: + * gpdf/doc/pdfinfo.hlp: + * gpdf/doc/pdftopbm.1: + * gpdf/doc/pdftopbm.cat: + * gpdf/doc/pdftopbm.hlp: + * gpdf/doc/pdftops.1: + * gpdf/doc/pdftops.cat: + * gpdf/doc/pdftops.hlp: + * gpdf/doc/pdftotext.1: + * gpdf/doc/pdftotext.cat: + * gpdf/doc/pdftotext.hlp: + * gpdf/doc/xpdf.1: + * gpdf/doc/xpdf.cat: + * gpdf/doc/xpdf.hlp: + * gpdf/doc/xpdfrc.5: + * gpdf/doc/xpdfrc.cat: + * gpdf/doc/xpdfrc.hlp: + * gpdf/fofi/Makefile.in: + * gpdf/goo/GHash.cc: + * gpdf/goo/GHash.h: + * gpdf/ms_make.bat: + * gpdf/splash/Makefile.in: + * gpdf/xpdf/DisplayFontTable.h: + * gpdf/xpdf/ErrorCodes.h: + * gpdf/xpdf/FTFont.cc: + * gpdf/xpdf/FTFont.h: + * gpdf/xpdf/FontFile.cc: + * gpdf/xpdf/FontFile.h: + * gpdf/xpdf/Function.h: + * gpdf/xpdf/GPOutputDev.cc: + * gpdf/xpdf/Gfx.cc: + * gpdf/xpdf/Gfx.h: + * gpdf/xpdf/GfxFont.cc: + * gpdf/xpdf/GfxFont.h: + * gpdf/xpdf/GfxState.cc: + * gpdf/xpdf/GfxState.h: + * gpdf/xpdf/GlobalParams.cc: + * gpdf/xpdf/GlobalParams.h: + * gpdf/xpdf/Makefile.am: + * gpdf/xpdf/Object.cc: + * gpdf/xpdf/Object.h: + * gpdf/xpdf/Outline.cc: + * gpdf/xpdf/OutputDev.cc: + * gpdf/xpdf/OutputDev.h: + * gpdf/xpdf/PBMOutputDev.cc: + * gpdf/xpdf/PBMOutputDev.h: + * gpdf/xpdf/PDFDoc.cc: + * gpdf/xpdf/PDFDoc.h: + * gpdf/xpdf/PSOutputDev.cc: + * gpdf/xpdf/PSOutputDev.h: + * gpdf/xpdf/Page.cc: + * gpdf/xpdf/Page.h: + * gpdf/xpdf/Parser.cc: + * gpdf/xpdf/SFont.cc: + * gpdf/xpdf/SFont.h: + * gpdf/xpdf/Stream.cc: + * gpdf/xpdf/Stream.h: + * gpdf/xpdf/T1Font.cc: + * gpdf/xpdf/T1Font.h: + * gpdf/xpdf/TTFont.cc: + * gpdf/xpdf/TTFont.h: + * gpdf/xpdf/TextOutputDev.cc: + * gpdf/xpdf/TextOutputDev.h: + * gpdf/xpdf/XOutputDev.cc: + * gpdf/xpdf/XOutputDev.h: + * gpdf/xpdf/XPixmapOutputDev.cc: + * gpdf/xpdf/XPixmapOutputDev.h: + * gpdf/xpdf/XRef.cc: + * gpdf/xpdf/XRef.h: + * gpdf/xpdf/config.h: + * gpdf/xpdf/gpdf-control.cc: + * gpdf/xpdf/pdffonts.cc: + * gpdf/xpdf/pdfimages.cc: + * gpdf/xpdf/pdfinfo.cc: + * gpdf/xpdf/pdftopbm.cc: + * gpdf/xpdf/pdftops.cc: + * gpdf/xpdf/pdftotext.cc: + * gpdf/xpdf/tests/Makefile.am: + * gpdf/xpdf/vms_make.com: + * gpdf/xpdf/xpdf.cc: Imported Xpdf 3.00 and fixed build. + +2004-05-17 Martin Kretzschmar + + * gpdf/ANNOUNCE: + * gpdf/CHANGES: + * gpdf/README: + * gpdf/aconf2.h: + * gpdf/configure.in: + * gpdf/dj_make.bat: + * gpdf/doc/pdffonts.1: + * gpdf/doc/pdffonts.cat: + * gpdf/doc/pdffonts.hlp: + * gpdf/doc/pdfimages.1: + * gpdf/doc/pdfimages.cat: + * gpdf/doc/pdfimages.hlp: + * gpdf/doc/pdfinfo.1: + * gpdf/doc/pdfinfo.cat: + * gpdf/doc/pdfinfo.hlp: + * gpdf/doc/pdftopbm.1: + * gpdf/doc/pdftopbm.cat: + * gpdf/doc/pdftopbm.hlp: + * gpdf/doc/pdftops.1: + * gpdf/doc/pdftops.cat: + * gpdf/doc/pdftops.hlp: + * gpdf/doc/pdftotext.1: + * gpdf/doc/pdftotext.cat: + * gpdf/doc/pdftotext.hlp: + * gpdf/doc/xpdf.1: + * gpdf/doc/xpdf.cat: + * gpdf/doc/xpdf.hlp: + * gpdf/doc/xpdfrc.5: + * gpdf/doc/xpdfrc.cat: + * gpdf/doc/xpdfrc.hlp: + * gpdf/goo/gfile.cc: + * gpdf/ms_make.bat: + * gpdf/vms_make.com: + * gpdf/xpdf/Annot.cc: + * gpdf/xpdf/Array.cc: + * gpdf/xpdf/BuiltinFontTables.cc: + * gpdf/xpdf/CMap.cc: + * gpdf/xpdf/CMap.h: + * gpdf/xpdf/Catalog.cc: + * gpdf/xpdf/CharCodeToUnicode.cc: + * gpdf/xpdf/CharCodeToUnicode.h: + * gpdf/xpdf/Decrypt.cc: + * gpdf/xpdf/Dict.cc: + * gpdf/xpdf/ErrorCodes.h: + * gpdf/xpdf/FTFont.cc: + * gpdf/xpdf/FTFont.h: + * gpdf/xpdf/FontFile.cc: + * gpdf/xpdf/FontFile.h: + * gpdf/xpdf/Function.cc: + * gpdf/xpdf/Gfx.cc: + * gpdf/xpdf/Gfx.h: + * gpdf/xpdf/GfxFont.cc: + * gpdf/xpdf/GfxFont.h: + * gpdf/xpdf/GfxState.cc: + * gpdf/xpdf/GfxState.h: + * gpdf/xpdf/GlobalParams.cc: + * gpdf/xpdf/GlobalParams.h: + * gpdf/xpdf/JBIG2Stream.cc: + * gpdf/xpdf/Link.cc: + * gpdf/xpdf/Link.h: + * gpdf/xpdf/Makefile.am: + * gpdf/xpdf/OutputDev.h: + * gpdf/xpdf/PDFDoc.cc: + * gpdf/xpdf/PDFDoc.h: + * gpdf/xpdf/PSOutputDev.cc: + * gpdf/xpdf/PSOutputDev.h: + * gpdf/xpdf/Page.cc: + * gpdf/xpdf/Page.h: + * gpdf/xpdf/Parser.cc: + * gpdf/xpdf/Stream.cc: + * gpdf/xpdf/Stream.h: + * gpdf/xpdf/TTFont.cc: + * gpdf/xpdf/TTFont.h: + * gpdf/xpdf/TextOutputDev.cc: + * gpdf/xpdf/TextOutputDev.h: + * gpdf/xpdf/UnicodeMap.cc: + * gpdf/xpdf/UnicodeMap.h: + * gpdf/xpdf/UnicodeTypeTable.cc: + * gpdf/xpdf/UnicodeTypeTable.h: + * gpdf/xpdf/XOutputDev.cc: + * gpdf/xpdf/XOutputDev.h: + * gpdf/xpdf/XPDFApp.cc: + * gpdf/xpdf/XPDFCore.cc: + * gpdf/xpdf/XPDFCore.h: + * gpdf/xpdf/XPDFViewer.cc: + * gpdf/xpdf/XPDFViewer.h: + * gpdf/xpdf/XRef.cc: + * gpdf/xpdf/about-text.h: + * gpdf/xpdf/config.h: + * gpdf/xpdf/gpdf-control.cc: + * gpdf/xpdf/gpdf-link-canvas-item.cc: + * gpdf/xpdf/gpdf-links-canvas-layer.cc: + * gpdf/xpdf/pdffonts.cc: + * gpdf/xpdf/pdfimages.cc: + * gpdf/xpdf/pdfinfo.cc: + * gpdf/xpdf/pdftopbm.cc: + * gpdf/xpdf/pdftops.cc: + * gpdf/xpdf/pdftotext.cc: + * gpdf/xpdf/tests/test-links.cc: + * gpdf/xpdf/vms_make.com: + * gpdf/xpdf/xpdf.cc: Imported Xpdf 2.03 and fixed build. + +2004-05-13 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-thumbnails-view.cc: + Reverted some of the last commits. + + * gpdf/xpdf/gpdf-annots-view.cc (gpdf_annots_view_class_init) + (gpdf_annots_view_set_property, gpdf_annots_view_new): + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_class_init) + (gpdf_thumbnails_view_set_property, gpdf_thumbnails_view_new) + (gpdf_thumbnails_view_dispose): + * gpdf/xpdf/gpdf-bookmarks-view.cc (gpdf_bookmarks_view_class_init): + (gpdf_bookmarks_view_set_property): + (gpdf_bookmarks_view_new): + Added set_property method. Changed param_spec_pointer in object. + Changed get_pointer in get_object. + Casted gpdf_view in GPdfView. + + * gpdf/xpdf/gpdf-view.cc: Added timeout handler for status reset + to view private struct. + (gpdf_view_reset_link_status_cb): New callback for status + reset after timeout. + (gpdf_view_link_entered_cb, gpdf_view_link_leaved_cb): + Added handler for displaying link action in app status + bar when link enter/leave signal are received. + (gpdf_view_render_page): Connect enter/leave handlers + on links layer signals. + + * gpdf/xpdf/gpdf-links-canvas-layer.h: Added LINK_ENTERED & + LINK_LEAVED signals for displaying links in app bar status + when mouse goes over them. + + * gpdf/xpdf/gpdf-links-canvas-layer.cc: Added LINK_ENTERED & + LINK_LEAVED signals for displaying links in app bar status + when mouse goes over them. + (link_entered_cb, link_leaved_cb): Added handler for link + enter/leave signals to emit link_entered/link_leaved signals. + (gpdf_links_canvas_layer_add_link): Connected enter/leave + link signal handlers. + (gpdf_links_canvas_layer_class_init): Declared new signals. + + * gpdf/xpdf/gpdf-bookmarks-view.cc: + (gpdf_bookmarks_view_set_property) + (gpdf_bookmarks_view_class_init, gpdf_bookmarks_view_new): + (gpdf_thumbnails_view_dispose): + Cleaned up constructor and add control ref; + Added constructor args as obj properties, added a ref on parent + control and unref in dispose. + (gpdf_bookmarks_view_update_popup_actions): + Check is bookmarks exists before changing tools menu (expand/ + collapse/expand all/collapse all) sensitivity. + (gpdf_bookmarks_view_populate_idle): Remove control disconnect + handler IF had been registered. + (gpdf_bookmarks_view_get_tools_menu): Changed order of tools popup + menu items (to match real order). + + * gpdf/xpdf/gpdf-annots-view.cc: + (gpdf_annots_view_set_property): + (gpdf_annots_view_class_init, gpdf_annots_view_new) + (gpdf_annots_view_dispose): + Cleaned up constructor; + Added constructor args as obj properties, added a ref on parent + control and unref in dispose. + +2004-05-12 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-bookmarks-view.cc (gpdf_bookmarks_view_flat_recurse_outlines): + Fixed missing affectation when handling link_named bookmarks. + The dynamic cast was just compared to NULLbut not stored in + link_named. + +2004-05-10 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-thumbnails-view.cc: Add gpdf-control-private header + for using status & ratio. + (gpdf_thumbnails_view_populate_idle): Set ratio & status to give + feedback on the thumb generation. + Clear ration & status, reset cursor when finished. + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_get_bookmarks_view): + Give control as first arg of gpdf_bookmarks_view_new. + + * gpdf/xpdf/gpdf-bookmarks-view.h: Add parent control as new arg. + + * gpdf/xpdf/gpdf-bookmarks-view.cc: Add gpdf-control-private header + for using status & ratio. + Adding parent control in private struct. + (gpdf_bookmarks_view_new): Added control as first param to keep + it in private struct. + (gpdf_bookmarks_view_flat_recurse_outlines): Set status & advance + bar to give feedback about bookmarks generation. + (gpdf_bookmarks_view_populate_idle): Fix a problem when no bookmarks + are available. The idle func were always called as + generation_terminated was never true. + Set watch when generation goes on. + Clear status, ration & cursor when generation terminated. + (gpdf_bookmarks_view_set_pdf_doc): Connected remove idle + on control disconnect signal instead of view destroy signal. + +2004-05-13 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_link_action_uri): Fixed bug when + launching uri. The Link string storing URI was freed with list. + Now the string is duped before appending it to the list. + Changed uri from GString * to gchar *. + +2004-05-09 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_set_pdf_doc): + Changed priority for thumbs idle in order to do queue them at end + and create bookmarks before. + + * gpdf/xpdf/gpdf-bookmarks-view.cc + (gpdf_bookmarks_view_update_bookmarks_tree): + Changed init of idle to let user see bookmarks creation at idle. + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_bookmark_selected): + Handle case when title is selected and action is null. + + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_set_pdf_doc): + Remove idle on parent control disconnect if killed while generating + bookmarks to avoid crash. + Set watch pointer. + + * gpdf/xpdf/gpdf-bookmarks-view.cc: Added struct GPdfBookmarksGenState + for implementing flat recursion when creating bookmarks. This + struct is used to store recursive generation state across idle func + boundary. + Also added necessary field in bookmarks view private struct to + keep this state. + (gpdf_bookmarks_view_row_expanded_cb) + (gpdf_bookmarks_view_row_collapsed_cb) + (gpdf_bookmarks_view_page_changed_cb): + (gpdf_bookmarks_view_selection_changed_cb): + Return if generation not yet finished. + (gpdf_bookmarks_view_bookmark_select_func): + Fixed a bug when a title Outline item exists. Such an item have no + action associated. We handle this case here and in gpdf-view.cc. + (gpdf_bookmarks_view_flat_recurse_outlines): + (gpdf_bookmarks_view_update_bookmarks_tree): + (gpdf_bookmarks_view_populate_idle): + Changed recursive bookmarks generation in a flat call to be able to + have it called several time as idle handler. + (gpdf_bookmarks_view_set_pdf_doc): + Remove idle on view destroy if killed while generating bookmarks + to avoid crash. + Set watch pointer. + + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_page_box_coord): + Removed assert and add update of thumb size guess if it was wrong. + + First step for fixing Bug #137439 + + * gpdf/xpdf/gpdf-thumbnails-view.cc: + Add a counter for keeping track of current thumb generated. + (gpdf_thumbnails_view_set_scroll_region): + While setting scroll region, the loop is now between page 1 + and last generated one (current_gen_thumb) to be able to relayout + while generating thumbs. + (gpdf_thumbnails_view_create_thumbnail): + Added thumb coords. Computation while creating is based on a guess. + The layout may be not perfect but it will be correctly relayout + as soon as finished. + (gpdf_thumbnails_view_populate_idle): + Changed idle logic in order to only generate one thumb for each + call. This way we never freeze display. + (gpdf_thumbnails_view_set_pdf_doc): + Moved thumb generation inits from idle. Set guess for page + width/height to have a semi correct layout. + +2004-05-09 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_populate_idle): + Use Thumb method 'ok' to ensure Thumb data availability. It should + avoid further crash if embed Thumb data not correctly + parsed. + + * gpdf/xpdf/Thumb.h: + * gpdf/xpdf/Thumb.cc (Thumb::Thumb): Added a flag for keeping + Thumb data validity and the method to access it. + +2004-05-08 Martin Kretzschmar + + * gpdf/lib/recent-files: updated from egg: + + 2004-04-15 Bastien Nocera + + * gpdf/libegg/recent-files/egg-recent-util.c: another unused function + to comment when not using libgnomeui + + 2004-04-10 Bastien Nocera + + * gpdf/libegg/recent-files/egg-recent-util.c: remove unused function + when not using libgnomeui + + 2004-04-05 Murray Cumming + + * gpdf/libegg/recent-files/egg-recent-item.c: Use private_data instead + of private, so it can compile with a C++ compiler. + * gpdf/libegg/recent-files/egg-recent-view.h: Add G_BEGIN_DECLS and + G_END_DECLS so we can use it with C++. + + 2004-03-09 Bastien Nocera + + * gpdf/libegg/recent-files/egg-recent-util.c: + (egg_recent_util_get_icon): avoid warnings when the icon file + isn't found + + 2004-01-31 James Willcox + + * gpdf/libegg/recent-files/egg-recent-model.c: + (egg_recent_model_lock_file): + + Fix a locking bug, patch from + Gustavo Giráldez + + 2004-01-22 James Willcox + + * gpdf/libegg/recent-files/egg-recent-model.c: + (egg_recent_model_lock_file): + + Make the file locking suck a little less for nfs home directories. + Patch from Dan Williams . + + * gpdf/libegg/recent-files/egg-recent-model.c: the 2004-01-31 change + fixes bug #138817 + + * gpdf/shell/gpdf.c (gpdf_window_new): de-brand window title -> PDF + Viewer. Bug #137167. + + * gpdf/help/C/figures/gpdf_window.png, help/de/figures/gpdf_window.png: + update for new window title. + + * gpdf/configure.in: bump version number for GNOME 2.7. + + * gpdf/xpdf/gpdf-thumbnails-view.cc + (gpdf_thumbnails_view_render_thumbnail_image): gdk-pixbuf requires + always 8 bits per component. And Thumb::getPixbufData always + provides 8 bits per component. Fixes bug #141226. + + * gpdf/xpdf/Thumb.cc (ThumbColorMap::ThumbColorMap): unused now, remove. + + * gpdf/xpdf/Thumb.h: ditto. + + * gpdf/xpdf/Thumb.cc (Thumb::Thumb): use a normal GfxImageColorMap. + Use it not only for Indexed color spaces but always. Fixes crasher + bugs #139211, #139477, #141725. + + * gpdf/xpdf/Thumb.h: update for ColorMap changes. + + * gpdf/xpdf/Thumb.cc (lookup): log to stderr because that's not + buffered etc. + +2004-05-03 Remi Cohen-Scali + Fix for Bug #137952: + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_get_filename): + * gpdf/shell/gpdf.c (gw_ask_for_uri): + Added file filters 'application/pdf' and '*' to + file choosers. + +2004-04-18 Jaka Mocnik + + * ggv/ggv-prefs-ui.c: (ggv_prefs_dialog_new): Changed accelarators + for Document tab - Default Zoom and Coordination Units to resolve + conflicts in accelarators. patch by Archana Shah. Fixes bug# + 134976. + * ggv/src/ggv-window.c (ggv_add_open_button): added tooltip for recent + files button. patch by chenthill. + * ggv/backport of bugfixes from gnome-2-6 branch. + * ggv/src/ggv-window.c (verb_FileOpen): don't set the file chooser size. + fixes #139518. patch by Darren Adams. + * ggv/src/gsdefaults.c (gtk_gs_defaults_set_*): only set the new value + if it differs from the old: should fix #139362. + * ggv/src/ggv-window.c (open_button_pressed_cb): applied a patch by + Kouichirou Hiratsuka, fixing a crash when event parameter is NULL. + fixes #139408. + +2004-04-09 Guntupalli Karunakar + + * configure.in: Added "gu" (Gujarati) to ALL_LINGUAS. + +2004-04-09 Guntupalli Karunakar + + * configure.in: Added "gu" (Gujarati) to ALL_LINGUAS. + +2004-04-07 Remi Cohen-Scali + + Fix for bug #139363 + + * ggv/bonobo/ggv-postscript-view.c (verb_FileSaveMarked): Added + chooser filter for PS docs and all files. + + * ggv/src/ggv-window.c (verb_FileOpen): Added chooser filters for + PS docs and all files. + +2004-04-07 Jaka Mocnik + + * ggv/src/recent-files/egg-recent-model.c (egg_recent_model_filter): do not + test for existence of files since this is done before setting the mime + filter, so we can (and usually will) end up with testing a bunch of URIs, + many of which can be remote, which causes unacceptable delays when + starting GGV! + * ggv/configure.in: bump version to 2.7.0. + +2004-03-31 Christian Rose + + * gpdf/configure.in: Added "af" to ALL_LINGUAS. + +2004-03-31 Christian Rose + + * ggv/configure.in: Added "af" to ALL_LINGUAS. + +2004-03-30 Adam Weinberger + + * ggv/configure.in: Added en_CA (Canadian English) to ALL_LINGUAS. + +2004-03-29 Samúel Jón Gunnarsson + + * ggv/is.po: Added "is" to ALL_LINGUAS. + +2004-03-29 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 0.131. + +2004-03-24 Guntupalli Karunakar + + * configure.in: Added "pa" (Punjabi) to ALL_LINGUAS. + +2004-03-22 Guntupalli Karunakar + + * configure.in: Added "pa" (Punjabi) to ALL_LINGUAS. + +2004-03-21 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 0.130. + + * gpdf/help/c/gpdf.xml, help/de/gpdf.xml: updated for 0.130 (no + changes). + +2004-03-21 Jaka Mocnik + + * ggv/configure.in: version 2.6.0; tagged as GGV_2_6_0. + +2004-03-21 Gareth Owen + + * gpdf/configure.in: Added en_GB to ALL_LINGUAS + +2004-03-20 Gareth Owen + + * ggv/configure.in: Added en_GB to ALL_LINGUAS + +2004-03-18 Martin Kretzschmar + + * gpdf/help/Makefile.am (SUBDIRS), configure.in: add help/de directory. + + * gpdf/help/de: added German help. + +2004-03-15 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 0.125. + + * gpdf/configure.in, README.GPdf: remove message of doom. + +2004-03-15 Alexander Winston + + * gpdf/configure.in: Added en_CA to ALL_LINGUAS. + +2004-03-14 Jaka Mocnik + + * ggv/configure.in: version 2.5.99.1; tagged as GGV_2_5_99_1. + * ggv/src/gtkgs.c (gtk_gs_load): only hide window if it is visible. + * ggv/src/main.c (create_window): don't close window if the document is + not loaded: this is not very nice, but doing otherwise causes + mayhem in both control and shell processes, the cause of which I + am currently unable to track down. + * ggv/src/ggv-window.c: applied a patch from chenthill that makes the + ESC key turn off fullscreen mode. + +2004-03-09 Remi Cohen-Scali + + * gpdf/shell/gpdf.c (gpdf_window_close): Added deactivation of control + frame to avoid warning when setting frame ui container to null + at bonobo-control-frame-dispose. + +2004-03-09 Martin Kretzschmar + + * gpdf/xpdf/bonobo-application-x-pdf.cc (gpdf_factory): use + bonobo_control_life_instrument on controls to make the factory + exit when the last control is destroyed. (For Bug #132703). + +2004-03-09 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 0.124. + + * gpdf/README.GPdf: Update. + + * gpdf/xpdf/gpdf-persist-file.cc (gpdf_persist_file_on_dialog_response_cb): + * gpdf/xpdf/gpdf-persist-stream.cc: update for changed help id of password section. + + * gpdf/help/C/gpdf.xml: added comment that gpdf-password id cannot be changed freely. + +2004-03-09 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gc_set_page_cb): focus the pdf view after + setting the page. (Bug #136360) + + * gpdf/shell/gpdf.c (gw_ask_for_uri): use gtk_dialog_run instead of a + nested main loop plus connection to ::response. + (file_dialog_response, file_dialog_delete_event): obsolete, no + need to check if a folder was selected. (Bug #136233). + +2004-03-08 Breda McColgan + + * ggv/help/C/ggv.xml: Updated based on technical review comments + * ggv/help/C/ggv-C.omf: Updated date and version number + +2004-03-05 Jaka Mocnik + + * ggv/applied patch by chenthill that improves keyboard accelerators for + zooming in the control. + +2004-03-05 Jaka Mocnik + + * ggv/src/recent-files/egg-recent-model.c (egg_recent_model_filter): test + for the existence of URI _after_ the URIs are filtered, reducing + overhead! fixes #136238. + * ggv/applied a patch from The Written Word that fixes AIX 5.1 build. + * ggv/bonobo/ggv-postscript-view-ui.xml, src/ggv-ui.xml: removed delimit + attribute from Viewer Items placeholder. + * ggv/src/Makefile.am (libgtkgs_la_SOURCES): removed ggv-recent.[ch]. + * ggv/bonobo/main.c (main): Initialized the gnome libraries to provide + support for Edit->Preferences Help to work. Fixes bug#135273. Patch + by Shakti Sen. + * ggv/configure.in: version 2.5.99; tagged as GGV_2_5_99. + +2004-03-04 Breda McColgan + + * gpdf/help/C/gpdf.xml: Implemented editorial review comments + * gpdf/help/C/gpdf-C.omf: Updated date and manual version number + * gpdf/help/C/l10n.txt: Updated date and manual version info + +2004-03-02 Breda McColgan + + * ggv/help/C/ggv.xml: Updated for GNOME 2.6, technical review draft + * ggv/help/C/ggv-C.omf: Updated for GNOME 2.6 + * ggv/help/C/l10n.txt: Updated for GNOME 2.6 + * ggv/help/C/figures/ggv_window.png: Updated for GNOME 2.6 + +2004-02-28 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (drawString): handle horizontal scaling + correctly (multiply with the x components of the text + transformation matrix). Fixes Bug #134803. + (drawImageMask): this function has always painted the mask in + reverse video! Fixed it now. Part of Bug #122021. + +2004-02-28 Julio M. Merino Vidal + + * gpdf/Makefile.am: don't hardcode schema installation directory. Add + dummy install-data-local target when GCONF_SCHEMAS_INSTALL is + not set, fixes build for some make variants. (Bug #135524) + +2004-02-26 Martin Kretzschmar + + * gpdf/xpdf/gpdf-util.h (E_MAKE_TYPE): kill this ancient macro. + + * gpdf/xpdf/gpdf-persist-file.cc (gpdf_persist_file_destroy): unload + the file, plugs file handle, PDFDoc, whatnot leak (Bug #135525, + spotted by Ali Akcaagac). + +2004-02-19 Remi Cohen-Scali + + Fix for bug #134807 + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_print): + Add handler for disconnected control to close print + dialog when gpdf exists. + (gpdf_control_get_filename): Add handler for disconnected + control to close SaveAs file chooser when gpdf exists. + (verb_FileProperties_cb): Add handler for disconnected + control to close Properties dialog when gpdf exists. + +2004-02-18 Remi Cohen-Scali + + Bugzilla #134609 + + * gpdf/xpdf/gpdf-persist-stream.cc + (gpdf_persist_stream_on_dialog_response_cb): + Replaced old gpdf_persist_stream_on_cancelbutton_clicked, + gpdf_persist_stream_on_okbutton_clicked and + gpdf_persist_stream_on_helpbutton_clicked with + gpdf_persist_stream_on_dialog_response_cb. + (gpdf_persist_stream_create_password_dialog): + Changed handlers connected on dialog buttons with one + handler connected on dialog's response. + + * gpdf/xpdf/gpdf-persist-file.cc (gpdf_persist_file_on_dialog_response_cb): + Replaced old gpdf_persist_file_on_cancelbutton_clicked, + gpdf_persist_file_on_okbutton_clicked and + gpdf_persist_file_on_helpbutton_clicked with + gpdf_persist_file_on_dialog_response_cb. + (gpdf_persist_file_create_password_dialog): + Changed handlers connected on dialog buttons with one + handler connected on dialog's response. + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_private_destroy_dialog): + Removed. + (gpdf_control_private_error_dialog) + (gpdf_control_private_warn_dialog) + (gpdf_control_private_info_dialog): + Changed clicked handler set on button with response handler + set on dialog itself. Original handler + gpdf_control_private_destroy_dialog have been replaced with + gtk_widget_dialog. + (gpdf_control_no_postscript_printer_alert): Use the + gpdf_control_private_error_dialog instead of managing its + own dialog. + (gpdf_control_properties_dialog_response_cb): Removed old + dialog resp cb used for props dialog. + (verb_FileProperties_cb): Changed dialog handler for resp + with gtk_widget_destroy. + (persist_file_loading_failed_cb): Replaced dialog managed + with gpdf_control_private_error_dialog. + +2004-02-16 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 0.123. + +2004-02-16 Martin Kretzschmar + + * gpdf/autogen.sh: require automake 1.7 because of the way we use + automake conditionals. Fixes distcheck. + +2004-02-13 Jaka Mocnik + + * ggv/configure.in: version 2.5.4; tagged as GGV_2_5_4. + +2004-02-12 Jaka Mocnik + + * ggv/src/recent-files/egg-recent-model.c (end_element_handler): only add + an uri to the list if it exists! + +2004-02-10 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_reload): show a dialog if the file + can't be reloaded. + * ggv/src/ggv-prefs-ui.c: remember strings when focus leaves the + entry. + * ggv/src/ggv-window.c (verb_FileOpen): allow opening multiple files + at once! + * ggv/bonobo/GNOME_GGV.server.in.in: Postscript -> PostScript! + +2004-02-10 Jaka Mocnik + + * ggv/src/recent-files/egg-recent-view-bonobo.c + (egg_recent_view_bonobo_clear): added sanity checks for UI container. + * ggv/src/ps.c (psscan): pass the filename as a parameter and use it to + invoke the test command on strange files that might be PS but do not + seem to be. + * ggv/bonobo/ggv-sidebar.c (page_list_selection_changed): sanity check if + (checklist != NULL). + * ggv/bonobo/ggv-postscript-view.c (load_ps): return a boolean indicating + success. + (load_ps_from_stream): set exception when loading fails. + (load_ps_from_file): set exception when loading fails. + fix for #133601. + * ggv/src/ggv-window.c (verb_FileOpen): keep the dialog open until user + either enter a non-empty filename and opens it or cancel the + operation. fixes #130603 + (verb_FileOpen): load PS file before showing a new window. destroy + new window if the file is not valid PS. show dialog in that case. + fixes #133601. + * ggv/bonobo/ggv-postscript-view.c (add_dialog_to_view): add a dialog to + the list of dialogs maintained by this PS view component. + (ggv_postscript_view_destroy_dialogs): destroy all our dialogs. + (ggv_postscript_view_destroy): destroy all dialogs via above func. + * ggv/src/recent-files/*: synced with latest libegg, since James reverted + the changes he made in November. here's what I get for tracking + changes once... + * ggv/src/ggv-window.c (verb_FileOpen): + * ggv/src/ggv-recent.c (ggv_recent_init): use new recent-files API. + +2004-02-09 Breda McColgan + + * gpdf/help/C/gpdf.xml: Implemented technical review comments + * gpdf/help/C/gpdf-C.omf: Updated date + +2004-02-09 Martin Kretzschmar + + * gpdf/xpdf/gpdf-thumbnails-view.cc + (gpdf_thumbnails_view_populate_idle): #if'ed out one code path + that I missed on 2004-01-13 when commenting out thumbnail + generation menus. Fixes a crasher. + +2004-02-08 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-persist-file.cc (impl_bonobo_persist_file_load): + Raise Bonobo exception when file opening fails in order + to enable shell to catch it and discard window opening. + Fix for Bug #133503 + +2004-02-08 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_setup_view_widgets): + "Thumbnails"->"Pages" because many PDFs don't have thumbnails. + + * gpdf/shell/gpdf.c (gpdf_window_init_fullscreen_popup): explicitly add + F11 keybinding. + + * gpdf/shell/gpdf-window-ui.xml (keybindings): ViewFullScreen is not a + verb, so F11 doesn't work when in fullscreen mode. Remove it. + + * gpdf/xpdf/gpdf-control.cc (gpdf_print_job_prepare): use duplex + setting supplied by gnome-print. Part of Bug #131979. + +2004-02-07 Breda McColgan + + * gpdf/help/C/gpdf.xml: Updated for GNOME 2.6, technical review draft + * gpdf/help/C/gpdf-C.omf: Updated for GNOME 2.6 + * gpdf/help/C/l10n.txt: Added for GNOME 2.6 + * gpdf/help/C/figures/gpdf_window.png: Added for GNOME 2.6 + +2004-02-07 Martin Kretzschmar + + * gpdf/shell/gpdf.c (set_window_icon_default): simplify, based on patch + by Frederic Crozat and inline into main. + +2004-02-06 Remi Cohen-Scali + + * gpdf/shell/gpdf.c (gpdf_window_init_fullscreen_popup): + Added accel group for exit full screen view and + ESC accel key. + Fix for Bug #133595. + +2004-02-05 Tomasz Kłoczko + + * ggv/acinclude.m4: removed + This file contain private copy of few aclocal macros provided by + gettext. It breaks regenerata aclocal.m4 under automake diffrent + version than used by mantainer. All neccessary macros are copied + to aclocal.m4 during run autogen.sh. + * ggv/configure.in: Trivial cleanup: remove AC_SUBST(CFLAGS), + AC_SUBST(CPPFLAGS) and AC_SUBST(LDFLAGS). This variables are substed + by default. + +2004-02-05 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_print): no more need to + process GNOME_PRINT_DIALOG_RESPONSE_PREVIEW. + (gpdf_control_no_preview_alert): no longer necessary. + +2004-02-05 Andreas J. Guelzow + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_print_dialog_new): disable + print preview the right way, instead of showing some alert dialog. + (Bug #133326) + +2004-02-05 Alexander Winston + + * gpdf/acinclude.m4: correctly quote macro definitions to silence + aclocal-1.8 warnings and prevent future automake problems. (Bug + #133226). + +2004-02-04 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (verb_FileSaveMarked): if Save is + clicked in the file chooser and the url is empty, rerun the dialog. + fixes #131656. + * ggv/bonobo/ggv-control.c, bonobo/ggv-postscript-view.c: added + sanity check (uicontainer != CORBA_OBJECT_NIL) before set prop + calls that were not guarded yet. + * ggv/src/ggv-ui.xml: removed ellipsis from "About" menu item label. + * ggv/acinclude.m4: applied a patch from Alexander Winston that fixes + the underquoted m4 definitions. fixes #133179. + * ggv/configure.in: require intltool >= 0.30; version 2.5.3; + tagged as GGV_2_5_3. + +2004-01-29 Remi Cohen-Scali + + * gpdf/configure.in: Fixed missing coma in AC_HELP_STRING. + +2004-01-27 Martin Kretzschmar + + * gpdf/xpdf/gpdf-font-face.c: adapt to changes in libgnomeprint CVS. + +2004-01-26 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-thumbnails-view.cc: Include GOutputDev.h. + Added an embed boolean flag for thumbnails struct. + Added a all_generated boolean flag. + Removed CAN_GENERATE_THUMBNAILS define. + (gpdf_thumbnails_view_set_selected_page): Check if is not + current page before darkening thumbnail. + Added tools menu item update. + (gpdf_thumbnails_view_canvas_outline_event_cb): + Changed cursor when dragging in thumb. + (gpdf_thumbnails_view_get_page_pixbuf): New func to gen + pixbuf from a page with GOutputDev. + (gpdf_thumbnails_view_create_thumbnail_pixbuf): Renamed + gpdf_thumbnails_view_create_thumbnail_image that create + white filled thumbs in ..._create_thumbnail_pixbuf. + (gpdf_thumbnails_view_create_thumbnail_image): New func + that get page pixbuf and scale it to make thumb. + (gpdf_thumbnails_view_render_thumbnail_image): Added + embed boolean flag and update all_generated flag. + (gpdf_thumbnails_view_populate_idle): Moved PDF doc related + local vars from func context to loop context. + Changed gpdf_thumbnails_view_create_thumbnail_image in + gpdf_thumbnails_view_create_thumbnail_pixbuf. + Removed tools menu item update if no thumbs availables. + Scroll to 0,0 to show first page thumb. + (gpdf_thumbnails_view_popup_menu_item_generate_cb): + Added implem for current page thumb generation. + (gpdf_thumbnails_view_popup_menu_item_generate_all_cb): + Added implem for all pages thumbs generation. + (gpdf_thumbnails_view_get_tools_menu): If all thumb are + generated the menu is removed. + Now set menu items sensitivity to TRUE. + + * gpdf/xpdf/gpdf-bookmarks-view.cc + (gpdf_bookmarks_view_update_popup_actions): Now only updates + menu items sensitivity when some bookmarks are availables. + (gpdf_bookmarks_view_bookmark_select_func): Test item to be + sure not to select NULL bookmark (can occurs if some problem + occurs while parsing PDF: should be fixed). + (gpdf_bookmarks_view_get_tools_menu): Changed menu items init + stmts layout to group the expand_all/collapse_all. + + * gpdf/xpdf/Makefile.am (libgpdf_a_SOURCES): Added again + GOutputDev.cc/h and TextOutputDev.cc/h. + + * gpdf/xpdf/GOutputDev.h: Added needFontUpdate boolean flag. + + * gpdf/xpdf/GOutputDev.cc (GOutputDev::GOutputDev): Added + needFontUpdate init. + (GOutputDev::startDoc): + Removed TextPage::clear call. + (GOutputDev::endPage): + Added boolean flag as param for coalesce. + (GOutputDev::restoreState): + Added needFontUpdate flag set to true. + (GOutputDev::updateAll): + Set flag needFontUpdate instead of calling updateFont(). + (GOutputDev::updateFont): + reset needFontUpdate flag and call TextPage::fontUpdate(). + (GOutputDev::beginString): + (GOutputDev::endString): + Changed calls to begin/end string in begin/end word. + (GOutputDev::drawChar): + Added updateFont() call if needed. Added code param to + TextPage::addChar. + (GOutputDev::beginType3Char): + Added updateFont() call if needed. + + * gpdf/xpdf/gpdf-thumbnails-view.cc + (gpdf_thumbnails_view_canvas_outline_event_cb): + Fixed a bug in thumb drag. A zoom mult coef wrongly added. + It has been removed, as some useless commented out traces. + +2004-01-26 Andraz Tori + + * gpdf/configure.in: Added "sl" (Slovenian) to ALL_LINGUAS. + +2004-01-25 Martin Kretzschmar + + * gpdf/Makefile.am: update for intltool 0.29, disable-schemas-install + when distchecking. + +2004-01-23 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control-ui.xml, shell/gpdf-window-ui.xml: add some + explicit keybindings, menu keybindings are disabled when the + menubar is hidden. + +2004-01-22 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-sidebar.c (set_tools_button_sensitivity): + New func to set tools menu button sensitivity. + (gpdf_sidebar_set_page_tools_menu): + (select_page): Now call set_tools_button_sensitivity. + + * gpdf/xpdf/gpdf-thumbnails-view.cc + (gpdf_thumbnails_view_populate_idle): Added + missing item var. + + * gpdf/xpdf/gpdf-control.cc: Removed ifdef USE_ANNOTS + around annots-view.h file. Ifdefs are now in the + header that also defines sidebar page id. + Removed Pages Ids from here to move them in + their respective view header. + (gpdf_control_private_reset_cursor): + (gpdf_control_private_set_wait_cursor): + (gpdf_control_private_set_cursor): Ensure window + is a gdk_window. + (gpdf_control_update_bookmarks_view_tools_menu) + (gpdf_control_bookmarks_view_ready) + (gpdf_control_update_thumbnails_view_tools_menu) + (gpdf_control_thumbnails_view_ready) + (gpdf_control_update_annots_view_tools_menu) + (gpdf_control_annots_view_ready): + Added funcs to deal with tools menu updates and + Ready signals for views. They should be grouped + in two funcs? To be fixed?... + (gpdf_control_enable_ui): Added tools menu update + in control enable UI func. + (gpdf_control_get_bookmarks_view): Added connection + to Ready signal instead of settings tools menu. + This is to wait asynchronous bookmarks loads to be + sure we have a tools menu to activate. + (gpdf_control_get_thumbnails_view): Same for thumbnails + view. + (gpdf_control_get_annots_view): and for annots view. + (gpdf_control_pdf_doc_changed): Moved control_enable_ui + out of the if statement. + + * gpdf/xpdf/gpdf-annots-view.h + (GPDF_ANNOTS_VIEW_PAGE_ID): + Sidebar Page id now defined in here. + Added class func for Ready signal. + + * gpdf/xpdf/gpdf-annots-view.cc: Removed unused private + field annots. Replaced with the total number of annotations + available inthe document. + (gpdf_annots_view_class_init): + Added Ready signal telling control that annotations + asynchronous load finished. + (gpdf_annots_view_emit_ready): Ready signal emission func + (gpdf_annots_view_have_annotations): Added a func using + the total num of annots to tell if some are available. + (gpdf_annots_view_update_annots_list): Here I count + total number of annotations. + (gpdf_annots_view_populate_idle): Moved some local + vars from func context to the loop context where they + are used. + (gpdf_annots_view_populate_idle): Removed a leak, annots + list was not deleted. + (gpdf_annots_view_get_tools_menu): Use new have_annotations + func to disable tools menu when no annotations are + availables. + + * gpdf/xpdf/gpdf-thumbnails-view.h + (GPDF_THUMBNAILS_VIEW_PAGE_ID): + Sidebar Page id now defined in here. + Added class func for Ready signal. + + * gpdf/xpdf/gpdf-thumbnails-view.cc: + (gpdf_thumbnails_view_class_init): + Added Ready signal to tell control that thumbnails + asynchronous load finished. + (gpdf_thumbnails_view_emit_ready): Ready signal + emission func. + (gpdf_thumbnails_view_populate_idle): Only + change tools menu item widget sensitivity if + tools menu was created (widget actually exist). + Changed brace position. + (gpdf_thumbnails_view_populate_idle): Added + ready signal emission. + + * gpdf/xpdf/gpdf-bookmarks-view.h (GPDF_BOOKMARKS_VIEW_PAGE_ID): + Sidebar Page id now defined in here. + Added class func for Ready signal. + + * gpdf/xpdf/gpdf-bookmarks-view.cc: + (gpdf_bookmarks_view_class_init): + Added the READY signal that tell control that + asynchronous bookmarks load finished. + (gpdf_bookmarks_view_emit_ready): Ready signal + emission func. + (gpdf_bookmarks_view_have_outline_items): + Added a func telling if some bookmarks are availables. + (gpdf_bookmarks_view_update_popup_actions): + If no bookmarks availables, no need to browse the + tree. + Set menu item widget sensitivity only if menu was + created. + (gpdf_bookmarks_view_populate_idle): + (gpdf_bookmarks_view_set_pdf_doc): + Now populate bookmarks tree in idle func. + (gpdf_bookmarks_view_get_tools_menu): Used + gpdf_bookmarks_view_have_outline_items to + disable tools menu creation when no bookmarks + availables. + +2004-01-20 Remi Cohen-Scali + + * gpdf/xpdf/tests/test-pdf-loading.cc (TEST_NEW): + Removed unused pdf_doc var. + + * gpdf/shell/tests/test-uri-input.c: Added decl for + setup and reat_down to avoid gcc warnings. + + * gpdf/xpdf/gpdf-stock-icons.c (GPDF_ADD_STOCK_ICON): + Add init value for icon_set vars to avoid warning. + + * gpdf/xpdf/gpdf-persist-stream.cc + (gpdf_persist_stream_create_password_dialog): Added + g_signal_connect for help button. + + * gpdf/xpdf/gpdf-control.cc: Removed unused + gpdf_control_get_title method. Also removed some + unused vars. + + * gpdf/xpdf/gpdf-thumbnails-view.cc: + * gpdf/xpdf/gpdf-bookmarks-view.cc: + * gpdf/xpdf/gpdf-annots-view.cc: Removed undefined + class_finalize method decl, view_init unused method, + and some unused vars. + + * gpdf/xpdf/Thumb.cc (ThumbColorMap::ThumbColorMap): Changed + field init order to match decl and to avoid warning. + Removed several unused vars. + (Thumb::Thumb): Removed unused vars. + (Thumb::getPixbufData): Removed unused vars. + + * gpdf/xpdf/TextOutputDev.cc (TextPage::coalesce): Init a var + to avoid warning. + + * gpdf/xpdf/GPOutputDev.cc (GPOFontMap::~GPOFontMap): Changed + param named to avoid shadowing of the xref class field and + the associated warning. + + * gpdf/xpdf/Makefile.am (INCLUDES): + * gpdf/shell/Makefile.am (INCLUDES): + * gpdf/lib/ggv-sidebar/Makefile.am (INCLUDES): + * gpdf/configure.in: Changed the way WARN_CFLAFS & WARN_CXXFLAGS + were passed to compiler. Now use CFLAGS/CXXFLAGS in configure + instead of INCLUDES in some Makefiles. + +2004-01-19 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (MENU_FIT_WIDTH_PATH): one more "Zoom Items + Placeholder" occurence. (see 2004-01-13) + + * gpdf/gpdf.desktop.in (_Name, _Comment): short and sweet, + by Ross Burton and Alexander Winston (Bug #131906). + +2004-01-18 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-bookmarks-view.cc (gpdf_bookmarks_view_construct): + Complement for Bug #131798: Removed shadow from scrolled + window to get the same look as nautilus. + + * gpdf/xpdf/gpdf-annots-view.cc (gpdf_annots_view_construct): + Complement for Bug #131798: Removed shadow from scrolled + window to get the same look as nautilus. + + * gpdf/xpdf/gpdf-sidebar.c (gpdf_sidebar_instance_init): + Changed sidebar title frame shadow type. It was ETCHED_IN + and it make it look slightly different than the Nautilus + sidebar one. With GTK_SHADOW_NONE both looks the same. + This fix bug #131798 + (gpdf_sidebar_instance_init): Also changed arrow box shadows + as the ones in nautilus. + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_save_sidebar_state): + Changed the source for the CONF_WINDOWS_SHOW_SIDEBAR + value. It was GTK_WIDGET_MAPPED, but it do not run anymore. + Now use GTK_WIDGET_VISIBLE. + Fix for Bug #131776. + +2004-01-17 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-control-ui.xml: Changed 'Side Pane' in + 'Sidebar' to be consistent with other designation for + this widget. + This fix Bug #131733. + +2004-01-17 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_private_error_dialog) + (gpdf_control_private_warn_dialog) + (gpdf_control_private_info_dialog): Ok -> GTK_STOCK_OK, suggested + by Christian Neumair. + (gpdf_control_private_question_dialog): unused and might encourage + use of Yes/No dialogs: remove + (gpdf_control_private_display_help): use "%s", not <%s>. + + * gpdf/xpdf/gpdf-control-private.h (gpdf_control_private_question_dialog): + remove prototype. + + * gpdf/gpdf.schemas.in: removed the not really long "long" descriptions + to reduce string count. Suggested by Christian Neumair. + +2004-01-16 Remi Cohen-Scali + + * gpdf/configure.in: Add test to check enable_deprecation_errors + value in [action-if-found] arg of AC_ARG_ENBALE in order + to correctly handle --disable-deprecation-errors. + Same changes for annotations_view AC_ARG_ENABLE. + + * gpdf/xpdf/Makefile.am (EXTRA_DIST): Changed value according + to USE_ANNOTS_VIEW cond in order to include annotations view + icons in dist tarball (when annots-view disabled). + +2004-01-15 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_link_action_uri) + (gpdf_view_link_action_uri): + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_popup_menu_item_generate_cb) + (gpdf_thumbnails_view_popup_menu_item_generate_all_cb): + * gpdf/xpdf/gpdf-annots-view.cc (gpdf_annots_view_popup_menu_item_filter_cb) + (gpdf_annots_view_popup_menu_item_plugins_cb): + Fix for Bug #131501. + Some messages punctuations were misplaced. + A syntax error was also corrected in the word "notification". + +2004-01-14 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_scroll_region_coord): + Changed abs with labs to remove ambiguity on Solaris + Bug #131449 + +2004-01-13 Remi Cohen-Scali + + * gpdf/xpdf/Makefile.am (STOCK_ANNOTS_ICONS, ANNOTS_VIEW_SRCS): + Changed variables assignement to avoid undefined + message from automake-1.4. + + * gpdf/gpdf.spec.in: + Removed junk help files in %files list. + Added gnome--pdf.png icon. + + * gpdf/xpdf/Page.cc (Page::displaySlice): + Changed the size of the statements + enclosed in ifdef USE_ANNOTS_VIEW in order + to disable annotations display when annots + view is unused. + + * gpdf/xpdf/gpdf-bookmarks-view.cc: + * gpdf/xpdf/gpdf-thumbnails-view.cc: + * gpdf/xpdf/gpdf-annots-view.cc: + Changed the way to retrieve menu item widgets + for popup menus. gnome_app_find_menu_pos always + return the same widget ??? now use index in + GnomeUIInfo struct. + + * gpdf/xpdf/gpdf-stock-icons.h: Added aconf.h + to get USE_ANNOTS_VIEW def. + + * gpdf/xpdf/tests/test-gpdf-view.cc (TEST_NEW): + Added new param to gpdf-view constructor. + NULL instead of control for the test. + + * gpdf/xpdf/tests/.cvsignore: Add .libs & .deps + + * gpdf/xpdf/Thumb.cc: + * gpdf/xpdf/Thumb.h: Add implem for Thumb object + parsing. + + * gpdf/xpdf/prefs-strings.h: Defines for gconf keys + + * gpdf/xpdf/PDFDoc.h: + * gpdf/xpdf/PDFDoc.cc: Added annots display CB. + + * gpdf/xpdf/Page.h: Added getThumb method. Added annots + display CB decl. Added Thumb object field for + thumbnails management. + + * gpdf/xpdf/Page.cc (Page::Page): Added thumb object + parsing. + (Page::display) (Page::displaySlice): Add CB for + annotations in Page display. + (displaySlice): + Added conditional display of annotation in order to + avoid them when USE_ANNOTS_VIEW is not defined. + + * gpdf/xpdf/Outline.cc: Fixed Outline object parsing. + + * gpdf/xpdf/Link.cc: Changed some error handling + to make a difference between two parse actions + and have a better report (needed for debug). + + * gpdf/xpdf/Makefile.am: + Add conditional ANNOTS_VIEW_SRCS. + Change eog-hig-dialog in gpdf-hig-dialog. + Added new files (srcs & icons) for sidebar and views. + + * gpdf/xpdf/gpdf-view.h: + * gpdf/xpdf/gpdf-view.cc: + Add sidebar views interface. + + * gpdf/xpdf/gpdf-thumbnails-view.h: + * gpdf/xpdf/gpdf-thumbnails-view.cc: + Implementation of thumbnails view. + + * gpdf/xpdf/gpdf-stock-icons.h: + * gpdf/xpdf/gpdf-stock-icons.c: Add icons for + sidebar views (bookmarks, thumbnails and + annotations). + + * gpdf/xpdf/gpdf-sidebar.h: + * gpdf/xpdf/gpdf-sidebar.c: + Sidebar implem inspired from Galeon's one. + Could remove soon the delete page button. + + * gpdf/xpdf/gpdf-persist-stream.cc + (gpdf_persist_stream_on_helpbutton_clicked): + Added help button and its callback + for password dialog. + (gpdf_persist_stream_create_password_dialog): + Merged from HEAD (one dialog for both password). + + * gpdf/xpdf/gpdf-persist-file.cc + (gpdf_persist_file_on_helpbutton_clicked): + Added help button and its callback + for password dialog. + (gpdf_persist_file_create_password_dialog): + Merged from HEAD (one dialog for both password). + + * gpdf/xpdf/gpdf-marshal.list: Added marshalers + VOID:POINTER,INT VOID:POINTER,INT,BOOLEAN and + VOID:INT,INT,INT,INT,INT. + + * gpdf/xpdf/gpdf-hig-dialog.c: + * gpdf/xpdf/gpdf-hig-dialog.h: Reused eog HIG dialog + in GPdf. + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_private_set_status) + (gpdf_control_private_status_timeout, gpdf_control_private_push) + (gpdf_control_private_pop, gpdf_control_private_clear_stack) + (gpdf_control_private_set_fraction) + (gpdf_control_private_set_pulse_step, gpdf_control_private_pulse) + (gpdf_control_private_refresh, gpdf_control_private_set_cursor) + (gpdf_control_private_set_wait_cursor) + (gpdf_control_private_reset_cursor) + (gpdf_control_private_get_bookmarks_view) + (gpdf_control_private_get_thumbnails_view) + (gpdf_control_private_get_annots_view) + (gpdf_control_private_destroy_dialog) + (gpdf_control_private_error_dialog) + (gpdf_control_private_warn_dialog) + (gpdf_control_private_info_dialog) + (gpdf_control_private_question_dialog) + (gpdf_control_private_display_help): + control-private funcs that temporary stay + in gpdf-control but will move to avoid + dependency on gpdf-control. + (gpdf_control_no_postscript_printer_alert): + Changed eog_hig_dialog to gpdf_hig_dialog. + (gpdf_control_read_sidebar_state) + (gpdf_control_save_sidebar_state, gpdf_control_activate_sidebar): + Support for activating sidebar and saving + restoring its state. + (gpdf_control_get_title, gpdf_control_get_bookmarks_view) + (gpdf_control_get_thumbnails_view, gpdf_control_get_annots_view) : + Sidebar internal accessors. + (gpdf_control_update_toggles) + (gpdf_control_view_sidebar_changed_cb) + (gpdf_control_sidebar_close_requested_cb) + (gpdf_control_bookmark_selected_cb) + (gpdf_control_thumbnail_selected_cb) + (gpdf_control_annotation_selected_cb) + (gpdf_control_annotation_toggled_cb) + (gpdf_control_sidebar_page_changed_cb): + Sidebar events management. + (gpdf_control_setup_view_widgets): + Setup sidebar and its pages. Add gnome app bar and + necessary layout. + (gpdf_control_disconnected): + Save sidebar state when component disconnect. + (gpdf_control_dispose): + Dispose memory when component released. + (gpdf_control_class_init): + Connect compnent methods. Added global params + instanciation and stock icons init. + +2004-01-13 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 0.122. + +2004-01-13 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control-ui.xml: rename "View Items Placeholder" back + to "Zoom Items Placeholder", put ViewSidebar outside the + placeholder. + + * gpdf/xpdf/GPOutputDev.cc (getFontFaceEmbedded): port Xpdf's support + for embedded TrueType fonts. + + * gpdf/xpdf/gpdf-thumbnails-view.cc + (gpdf_thumbnails_view_get_tools_menu): we can't generate + thumbnails yet, therefore disable the (empty) tools menu. + + * gpdf/xpdf/gpdf-sidebar.c: disable remove button, because we don't + have remove sidebar panes yet. + + * gpdf/configure.in: --disable-annotations-view -> + --enable-annotations-view for ui-freeze. + + * gpdf/xpdf/gpdf-thumbnails-view.cc (gpdf_thumbnails_view_canvas_outline_event_cb): + comment out debug spew. + + * gpdf/xpdf/Makefile.am: fixes for USE_ANNOTS_VIEW conditional. + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_setup_page_transform) + (gpdf_view_link_action_goto, gpdf_view_link_action_named) + (gpdf_view_link_clicked_cb, gpdf_view_scroll_adjustments_changed_cb) + (gpdf_view_set_pdf_doc): + * gpdf/xpdf/gpdf-control.cc (gpdf_control_class_init): + * gpdf/xpdf/gpdf-control-ui.xml: + * gpdf/xpdf/bonobo-application-x-pdf.cc: + * gpdf/gpdf.spec.in (Requires): + * gpdf/configure.in: Revert disapproved changes. + +2004-01-12 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-control.cc: Added support for sidebar. + Replaced misc string literal with defines. Added + AppBar for status and advancement control. + The Annots view is conditionned by configure var + and define USE_ANNOTS_VIEW. + + * gpdf/xpdf/gpdf-control-ui.xml: Add accelerator for + Print (Ctrl-P). Changed 'Zoom Items Placeholder' + in 'View Items Placeholder'. + Added ViewSidebar menuitem (F9). This accel is + a potential conflict with the nautilus one (when + using gpdf nautilus view). + Changed label of Print toolitem to "Print Document". + + * gpdf/xpdf/gpdf-control-private.h: The funcs grouped + in this header are for now in gpdf-control but + will move soon. They are utility funcs as + status control, error/warning dialog control, etc. + + * gpdf/xpdf/gpdf-bookmarks-view.h: + * gpdf/xpdf/gpdf-bookmarks-view.cc: Implem for + the bookmarks view embed in the sidebar. + + * gpdf/xpdf/gpdf-annots-view.h: + * gpdf/xpdf/gpdf-annots-view.cc: Implem for the + annotations view embed in the sidebar. This view + is experimental and may be disabled through + the configure arg --disable-annotations-view. + + * gpdf/xpdf/eel-gconf-extensions.h: + * gpdf/xpdf/eel-gconf-extensions.c: Convinient + funcs for gconf usage. These files will move to + the lib directory in order for them to be used + by gnome-pdf-viewer and gpdf. + + * gpdf/xpdf/bonobo-application-x-pdf.cc: Moved + global params instanciation and stock icons + init from bonobo-application-x-pdf.cc to + gpdf-control class init. + + * gpdf/xpdf/Annot.h: Added getSubtype, getDict and + getRefNum/Gen methods for easier annots + identification. + Added dict & subtype fields. + + * gpdf/xpdf/Annot.cc (Annot::Annot): Extended Annot + object to read several kind of annotations. + Some more work (in coord with xpdf) is needed... + (Annots::Annots): Same extensions on annotations + collection object. + + * gpdf/po/.cvsignore: Added .intltool* + + * gpdf/shell/tests/.cvsignore: + * gpdf/lib/recent-files/.cvsignore: + * gpdf/lib/ggv-sidebar/.cvsignore: Added .deps & .libs. + + * gpdf/help/C/gpdf.xml: Added a placeholder for password + dialog documentation (also usefull for testing help + button in password dialog). + + * gpdf/Makefile.am (EXTRA_DIST): Added schemas + and spec files. + (schemadir): Definition + (schema_DATA): Definition + Added schemas rules and local target if schemas + have to be installed. + (ACLOCAL_AMFLAGS): Added gnome2-macros to avoid + failure when triggered from makefile (maintainers + rules). + (CLEANFILES): Added schemas file + + * gpdf/.cvsignore: Added schemas & spec files. + + * gpdf/configure.in: Updated required specs. + Removed useless AC_CANONICAL_HOST. + Made --enable-deprecation-errors arg the default + for this dev version. + Add statements for checking gconf commands availability. + Updated PKG_CHECK_MODULES with new requirements. + Added --disable-annotations-view arg for cond annots view + in sidebar. + Added gpdf.schemas & gpdf.spec in AC_OUPUT macros. + + * gpdf/gpdf.spec.in: Creation of spec file. + + * gpdf/gpdf.schemas.in: Creation of schemas file for GPdf. + +2004-01-12 Jaka Mocnik + + * ggv/src/recent-files/*: merge with current libegg HEAD. + * ggv/src/ggv-recent.c: fix in order to work with new recent-files code. + * ggv/src/cursors.c, bonobo/ggv-postscript-view.c: cache cursors per + ps_view instead of per process. + * ggv/src/ggv-window.c (ggv_window_new): set command sensitivity. + added page_count member to keep track of the document's properites. + * ggv/bonobo/ggv-postscript-view.c (view_realized_cb): removed one + unref too many. did this behaviour change with GTK 2.5? hth did + anything work at all in GGV 2.4.x otherwise? + * ggv/src/ggv-window.c (ggv_window_close): deactivate the control frame + before destroying the window contents. + * ggv/src/ggv-ui.xml: moved visibility settings in top level popup menu + to a submenu. + * ggv/Makefile.am (EXTRA_DIST): Removed OrigTree.pm from EXTRA_DIST. + * ggv/src/ggv-window.c (timer_callback): reload always when the window + has a specified file name, regardless of the previous state of the + document. use ggv_window_load(). fixes #127214. + * ggv/src/ggv-window.c (verb_FileClose): close window unconditionally. if + it was the last window, quit app. inspired by patch from Mikael + Brockman. + * ggv/src/ggv-ui.xml: removed Exit and New commands. patch from Mikael + Brockman. with the entry above, this fixes #130310. + * ggv/src/gtkgs.c (gtk_gs_munge_adjustments): step_increment now equals + the arrow keys' increment. fixes #126639. + * ggv/bonobo/ggv_postscript-view.c: call + bonobo_control_set_transient_for() and + gtk_window_set_destroy_with_parent() on all dialog windows. I suppose + this should help with #103729, but - wtf! - it doesn't... + +2004-01-11 Martin Kretzschmar + + * gpdf/xpdf/gpdf-persist-file.cc (gpdf_persist_file_get_password): + (gpdf_persist_file_get_owner_password) + (gpdf_persist_file_get_user_password): merge, use only one passwd + dialog. + (impl_bonobo_persist_file_load): use it, ask for the passwd once. + + * gpdf/xpdf/gpdf-persist-stream.cc (gpdf_persist_stream_get_password): + (gpdf_persist_file_get_owner_password) + (gpdf_persist_file_get_user_password) + (impl_bonobo_persist_stream_load): ditto. + + * gpdf/xpdf/gpdf-stock-icons.c (gpdf_stock_icons_init): if fit-width + icon is not installed, use stock fit icon. + +2004-01-10 Martin Kretzschmar + + * gpdf/shell/gpdf-window-ui.xml: + * gpdf/shell/gpdf.c (gpdf_window_open): desensitize full screen command + until we have a pdf. + + * gpdf/shell/gpdf.c (exit_fullscreen_button_clicked_cb) + (update_exit_fullscreen_popup_position, screen_size_changed_cb) + (gpdf_window_init_fullscreen_popup): exit full screen button, + stolen from epipahny. + (gpdf_window_window_state_changed): use it. + + * gpdf/shell/gpdf-window-ui.xml: + * gpdf/shell/gpdf.c: + (gpdf_window_set_fullscreen, gpdf_window_window_state_changed) + (listener_ViewFullScreen, gw_setup_toplevel_ui) + (gpdf_window_construct): implement simple full screen mode. + + * gpdf/gpdf.applications: add startup_notify=true. + +2004-01-10 Jaka Mocnik + + * ggv/src/ggv-ui.xml: add a mnemonic for fullscreen mode. fixes #119848. + * ggv/ggv.desktop.in: added X-GNOME-DocPath entry - I suppose it can't + hurt. + * ggv/ggv.spec.in: fixed (hopefully) the RPM spec file. fixes #122003. + +2004-01-04 Martin Kretzschmar + + * gpdf/xpdf/GNOME_PDF.server.in.in: more strings for more fine-grained + translations. (cf. Bug #45462) + +2004-01-03 Robert Sedak + + * configure.in: Added "hr" in ALL_LINGUAS. + +2004-01-02 Taneem Ahmed + + * ggv/configure.in: Added "bn" to ALL_LINGUAS. + +2003-12-30 Martin Kretzschmar + + * gpdf/shell/gpdf.c (main, gw_control_load_pdf): replace deprecated + calls. + + * gpdf/shell/gpdf-recent-view-toolitem.c + (gpdf_recent_view_toolitem_popup): replace deprecated + gnome_popup_menu_do_popup_modal with gtk_menu_popup, adjust + parameter list. Suggested by Ali Akcaagac. + (gpdf_recent_view_toolitem_button_press_event) + (gpdf_recent_view_toolitem_key_press_event): adjust param. list. + + * gpdf/xpdf/gtkgesture.c (gesture_data_append_point) + (gtk_gesture_handler_attach): don't use deprecated gdk_gc_unref or + gtk_signal_connect. + + * gpdf/configure.in: add --enable-deprecation-errors option, inspired + by ggv's configure. + + * gpdf/xpdf/Makefile.am, shell/Makefile.am, + lib/recent-files/Makefile.am, lib/ggv-sidebar/Makefile.am + (INCLUDES): use GPDF_DEPRECATED_CFLAGS. + +2003-12-30 Jaka Mocnik + + * ggv/Makefile.am: include intltool-modules dir in distribution tarball. + +2003-12-29 Martin Kretzschmar + + * gpdf/.cvsignore: ignore depcomp, stamp-h1. + + * gpdf/configure.in: post-release version bump. + + * gpdf/xpdf/pdf-properties-display.c, xpdf/pdf-info-dict-util.cc, + xpdf/page-control.c, xpdf/gpdf-view.cc, + xpdf/gpdf-links-canvas-layer.cc, xpdf/gpdf-link-canvas-item.cc, + shell/gpdf-recent-view-toolitem.c, shell/eel-vfs-extensions.c: + Use glib/gi18n.h instead of libgnome/gnome-i18n.h + +2003-12-29 Martin Kretzschmar + + * gpdf/configure.in: Version 0.121. + + * gpdf/NEWS: upd. + +2003-12-29 Jaka Mocnik + + * ggv/src/gtkgs.c (check_filecompressed): added sanity check + (NULL != file). + * ggv/src/recent-files/*: replace GnomeIconTheme with GtkIconTheme, since + the former is deprecated in upcoming GTK+. + * ggv/src/gtkchecklist.c: replace deprecated gtk_tree_model_get_iter_root() + with gtk_tree_model_get_iter_first(). + * ggv/configure.in: added an --enable-deprecations flag in order to allow + configurable use of *_DISABLE_DEPRECATED flags. + bumped version to 2.5.1; tagged as GGV_2_5_1; release a tarball. + * ggv/*/Makefile.am: respect the above. + +2003-12-28 Martin Kretzschmar + + * gpdf/configure.in: emit a warning if font embedding is disabled. + + * gpdf/xpdf/GPOutputDev.cc (lookupGlyph): new, a little bit better than + nothing. + (drawString): use lookupGlyph. Fixes a part of bug #116772. + +2003-12-23 Martin Kretzschmar + + * gpdf/lib/recent-files/Makefile.am (INCLUDES): eek, some + _DISABLE_DEPRECATED defines were still here. Remove them. + + * gpdf/shell/gpdf-recent-view-toolitem.c + (gpdf_recent_view_toolitem_instance_init): unset CAN_FOCUS flag, + for consistency with other toolbar button items. In response to + bug #126191. + + * gpdf/Makefile.am, help/C/Makefile.am, help/es/Makefile.am: fix + distcheck for scrollkeeper stuff. + + * gpdf/Makefile.am: delete intltool-* on distclean, not clean, fixes + make clean; make. + +2003-12-21 Martin Kretzschmar + + gcc 3.3.3 has better diagnostics :-) + + * gpdf/xpdf/gpdf-persist-file.cc (gpdf_persist_file_unload): + add a missing ``= NULL'' + (gpdf_persist_file_on_cancelbutton_clicked) + (gpdf_persist_file_create_password_dialog) + (gpdf_persist_file_destroy): kill dead code. + + * gpdf/xpdf/gpdf-persist-stream.cc + (gpdf_persist_file_on_cancelbutton_clicked) + (gpdf_persist_file_create_password_dialog): ditto. + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_get_filenam) + (gc_ui_set_pixbufs, gpdf_control_constructor): kill unused + variables. + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_save_as): ditto. + + * gpdf/xpdf/bonobo-application-x-pdf.cc: kill unused factory global. + +2003-12-20 Arafat Medini + + * configure.in: Added Arabic Locale "ar" to ALL_LINGUAS + +2003-12-20 Arafat Medini + + * configure.in: Added Arabic locale "ar" to ALL_LINGUAS + +2003-12-14 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_set_fullscreen): applied a patch + from janecek at ucw.cz that uses gtk_window_fullscreen() instead + of my home-brewn stuff used in 2.4. + removed functions and includes made redundant by the above patch. + * ggv/src/Makefile.am: there was no need to link libgtkgs with librecent.a, + so we do not do that anymore. + +2003-12-13 Martin Kretzschmar + + * gpdf/configure.in: drop libgnomeui-2.0 >= 2.4.0 requirement. + + * gpdf/xpdf/gpdf-persist-file.cc (gpdf_persist_file_create_password_dialog), + * gpdf/xpdf/gpdf-persist-stream.cc (gpdf_persist_file_create_password_dialog): + use GTK_STOCK_DIALOG_AUTHENTICATION, not GNOME_STOCK_AUTHENTICATION. + + * gpdf/help/es/.cvsignore: add. + + * gpdf/.cvsignore, Makefile.am (inltool_extra): update for + intltool 0.28. + + * gpdf/shell/gpdf.c (set_window_icon_default, main): set the default + window icon. + + * gpdf/shell/Makefile.am (INCLUDES): define GNOMEICONDIR + + * gpdf/shell/gpdf.c, xpdf/gpdf-control.cc: don't + gtk_window_set_default_size (cf. #128636) + + * gpdf/configure.in: GtkFileChooser requires gtk+ 2.3 + +2003-12-11 Francisco Javier F. Serrador + + * gpdf/help/es, configure.in, help/Makefile.am: Added Spanish help + +2003-12-09 Martin Kretzschmar + + * gpdf/xpdf/page-control.c (gpdf_page_control_expose) + (gpdf_page_control_class_init): try to look better with some theme + engines (bug and patch for similar problem pointed out by + hk (Evandro)). + + * gpdf/test-files/encrypted.pdf: an encrypted pdf, passwords are Foo + and Bar. + + * gpdf/test-files/Makefile.am (EXTRA_DIST): dist encrypted.pdf. + + * gpdf/xpdf/gpdf-links-canvas-layer.cc: can't make canvas-item + properties construct time-only. Fixes links with glib 2.3. + + * gpdf/configure.in: post-release version bump. + +2003-12-08 Martin Kretzschmar + + * gpdf/configure.in: Version 0.120, add warning that this is not + stable. + + * gpdf/NEWS: merge news from stable, update. + + * gpdf/README.GPdf: update. + + * gpdf/xpdf/gpdf-properties-dialog.glade: declare some atk relations. + + * gpdf/xpdf/page-control.c (gpdf_page_control_instance_init) + (gpdf_page_control_setup_at): set some atk names. + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_setup_at): set atk role and name + for the GPdfView, fixes #127897. + + * gpdf/configure.in: require libgnomeui-2.0 >= 2.4.0 for authentication + stock icon. + + * gpdf/xpdf/gpdf-persist-file.cc, xpdf/gpdf-persist-stream.cc + (gpdf_persist_file_create_password_dialog) + (gpdf_persist_file_get_password) + (gpdf_persist_file_get_owner_password) + (gpdf_persist_file_get_user_password): HIGgify a bit: remove + window title, remove unused help button, rename OK button, add + authentication stock icon, frob widget spacing. + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_enable_ui): enable print verb + only if the document allows printing. + +2003-12-08 Jan Arne Petersen + + * gpdf/shell/gpdf.c: (file_dialog_response), (gw_ask_for_uri): + * gpdf/xpdf/gpdf-control.cc: Replace GtkFileSelection with + GtkFileChooser. + +2003-12-13 Martin Kretzschmar + + * gpdf/help/es/gpdf.xml, help/es/gpdf-es.omf: made them xmllint clean. + +2003-12-07 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_enable_ui): handle FileSaveAs + as well. + +2003-12-06 Martin Kretzschmar + + * gpdf/xpdf/gpdf-persist-file.cc (impl_bonobo_persist_file_load): if + the uri looks like a local path (no uri scheme), transform to a + uri, escaping special chars like '%'. Fixes #128171. + + * gpdf/shell/gpdf-recent-view-toolitem.c + (gpdf_recent_view_toolitem_instance_init): set atk name for the + drop down arrow. Fixes #126190. + Patch by Padraig O'Briain + Fix copyright lines to include James Willcox (for the gedit code). + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_save_as): Comment that it expects + the filename in on-disk encoding. + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_get_filename): comment why it + doesn't return utf-8, remove FIXME; s/const gchar*/gchar*/ because + we return g_strdupped memory. Fix fileselection title. + (verb_SaveAs_cb): plug leak (s/const gchar*/gchar*/) + + * gpdf/xpdf/gpdf-control-ui.xml: renamed "Save document as" to "Save a + Copy" because we continue displaying the original file. + +2003-12-05 Jan Arne Petersen + + * ggv/bonobo/ggv-postscript-view.c: (verb_FileSaveMarked): + * ggv/src/ggv-window.c: (verb_FileOpen): Replace GgvFileSel + (GtkFileSelection) with GtkFileChooser. + * ggv/src/Makefile.am: + * ggv/src/ggv-file-sel.[ch]: removed unused files. + +2003-12-01 Mohammad DAMT + + * gpdf/configure.in: Added "id" to ALL_LINGUAS + * gpdf/po/id.po: Added Indonesian Translation by Ahmad Riza H Nst + +2003-11-18 Remi Cohen-Scali + + * gpdf/shell/gpdf.c (gpdf_window_open): + Changed bonobo_object_unref with gtk_widget_destroy (more + appropriate :-). + + * gpdf/xpdf/gpdf-persist-stream.cc (impl_bonobo_persist_stream_load): + * gpdf/xpdf/gpdf-persist-file.cc (impl_bonobo_persist_file_load): + Fixed for BUG# 116663. + Raise exception for password failure to be able to cancel + window opening when catched in gpdf window code. + + * gpdf/shell/gpdf.c: + Fixed for BUG# 116663. + (open_request_handler): + Changed window creation flow to be able to correctly + handle exceptions. + Moved title update (removed here after) at this point + just before window is mapped. + (gw_add_control_to_ui): Removed activation of control + widget (to do it later in creation flow). + (gw_control_load_pdf): Removed update of title to do + it later also. + (gpdf_window_open): Changed window open flow to take + into account exceptions. Added activation of control + if no exception raised. + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_setup_persist): + Merged from gpdf-outlines branch. + Give bonobo control to bonobo persistant + objects for them to handle password dialogs as + transients. + + * gpdf/xpdf/gpdf-persist-stream.h: + * gpdf/xpdf/gpdf-persist-stream.cc: + (gpdf_persist_file_on_entry_activate) + (gpdf_persist_file_on_cancelbutton_clicked) + (gpdf_persist_file_on_okbutton_clicked) + (gpdf_persist_file_create_password_dialog) + (gpdf_persist_file_get_password) + (gpdf_persist_file_get_owner_password) + (impl_bonobo_persist_stream_load) + (gpdf_persist_stream_set_control): + Merged from gpdf-outlines branch. + Add password protected documents support. + Fix BUG# 116663 + + * gpdf/xpdf/gpdf-persist-file.h: + * gpdf/xpdf/gpdf-persist-file.cc: + (gpdf_persist_file_on_entry_activate) + (gpdf_persist_file_on_cancelbutton_clicked) + (gpdf_persist_file_on_okbutton_clicked) + (gpdf_persist_file_create_password_dialog) + (gpdf_persist_file_get_password) + (gpdf_persist_file_get_owner_password) + (gpdf_persist_file_get_user_password) + (impl_bonobo_persist_file_load, gpdf_persist_file_set_control): + Merged from gpdf-outlines branch. + Add password protected documents support. + Fix BUG# 116663 + +2003-11-17 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-control-ui.xml: + * gpdf/xpdf/gpdf-view.cc (gpdf_view_save_as): + * gpdf/xpdf/gpdf-control.cc (gpdf_control_get_filename) + (verb_SaveAs_cb): + Merge SaveAs feature from gpdf-outlines branch. + Fix for BUG# 117596 + + * gpdf/shell/gpdf.c (gw_ask_for_uri, gw_open_dialog): + Merged "Open multiple files" feature from + gpdf-outlines branch. + Fix for BUG# 118942. + +2003-11-11 Padraig O'Briain + + * gpdf/xpdf/bonobo-application-x-pdf.cc (main): call gnome_program_init + ( fixes #126516, ignored gconf a11y setting). + +2003-11-06 Breda McColgan + + * help/C/ggv.xml: Updated for GNOME 2.4.2 + * help/C/ggv-C.omf : Updated to reflect new manual version number and + date + * help/C/l10n.txt: Updated Summary of Changes section + +2003-11-03 Shakti + + * gpdf/gpdf.desktop.in: + Added "%U" as a Exec parameter variable to handle dnd PDF files on launcher. + Fixes the bug#126160 + +2003-11-02 Jaka Mocnik + + * ggv/src/ggv-ui.xml: removed redundant separator above prefs item. + * ggv/src/ggv-window.c (verb_HelpContents): if in fullscreen mode, + switch to normal in order to show the help window. + * ggv/src/gtkchecklist.c: implemented range selection (first selected -> + cursor) when clicking with shift pressed. fixes #125760. + +2003-10-27 Sanlig Badral + + * gpdf/configure.in: Added "mn" to ALL_LINGUAS. + +2003-10-25 Jaka Mocnik + + * ggv/src/ggv-prefs-ui.[ch]: migrated to GtkComboBox. + removed toolbar style settings. + * ggv/src/ggv-prefs.[ch]: removed toolbar style settings. + * ggv/configure.in: version 2.5.0; tag GGV_2_5_0. + +2003-10-14 Chee Bin HOH + + * gpdf/help/C/gpdf.xml: upd. + + * gpdf/shell/gpdf.c (verb_HelpAbout_cb): documentation + credits. + (verb_HelpContents_cb): new. + +2003-10-13 Martin Kretzschmar + + from stable branch: + + * gpdf/xpdf/gpdf-control.cc (idle_print_handler): fix off-by-one bug + (gpdf_control_print, print_to_file_workaround): make print-to-file + work, needs investigation in gnome-print. + +2003-10-10 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_zoom_to_fit): fixed a copy'n'paste error! + * ggv/bonobo/ggv-control.c (sw_size_allocate): better calculation of + available size for GtkGS widget. + +2003-10-03 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-control.cc (persist_file_loading_finished_cb): + Fix for BUG #123638. + Add call to gnome_vfs_unescape_string_for_display to remove + escaped chars in title. + + * gpdf/help/C/figures/gpdf_start_window.png: + * gpdf/help/C/legal.xml: + * gpdf/help/C/gpdf.xml: + * gpdf/help/C/Makefile.am: + * gpdf/help/C/gpdf-C.omf: + * gpdf/help/C/.cvsignore: + * gpdf/help/Makefile.am: + * gpdf/help/xmldocs.make: + * gpdf/help/.cvsignore: + * gpdf/help/omf.make: Added help written by Chee Bin HOH. + + * gpdf/Makefile.am (SUBDIRS): Add help as a SUBDIR. + + * gpdf/configure.in: Add help/Makefile and help/C/Makefile in + AC_OUTPUT directive. + + === this is HEAD === stable branch is gnome-2-4 === + +2003-09-30 Christian Rose + + * gpdf/configure.in: Added "eu" to ALL_LINGUAS. + +2003-09-27 Martin Kretzschmar + + * gpdf/configure.in: on HP-UX with gcc 3.3, define __STDC_EXT__ (#121730). + +2003-09-26 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (idle_print_handler): forgot to mark one + message for translation. Sorry. + +2003-09-26 Christian Neumair + + * gpdf/xpdf/gpdf-control.cc (verb_FileProperties_cb): + * gpdf/xpdf/gpdf-properties-dialog.glade: HIGify document property dialog. + + * gpdf/xpdf/gpdf-print-progress-dialog.glade: HIGify print progress dialog. + +2003-09-24 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gpdf_print_job_prepare, idle_print_handler: + (gpdf_control_print_job_print, using_postscript_printer) + (gpdf_control_no_preview_alert, gpdf_control_no_postscript_printer_alert) + (gpdf_control_get_range_page, gpdf_control_print_dialog_new) + (gpdf_control_print, verb_FilePrint_cb): implement printing. + (gpdf_control_set_property): disable PersistStream implementation. + + * gpdf/xpdf/gpdf-print-progress-dialog.glade: add. + + * gpdf/xpdf/gpdf-control-ui.xml: add Print verb, menu item, tool item. + + * gpdf/xpdf/Makefile.am (libgpdf_a_SOURCES): include PSOutputDev + (glade_DATA): add gpdf-print-progress-dialog.glade. + + * gpdf/xpdf/GNOME_PDF.server.in.in: don't advertise PersistStream + + * gpdf/configure.in: bump version to 0.110.99; require libgnomeprint >= + 2.3.0. + +2003-09-22 Taneem Ahmed + + * gpdf/configure.in: Added "bn" to ALL_LINGUAS. + +2003-09-08 Mugurel Tudor + + * gpdf/configure.in : Added "ro" to ALL_LINGUAS. + +2003-09-08 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version 0.110. + + * gpdf/README.GPdf: add note about HP-UX + gcc 3.3 build (#121730). + +2003-09-04 Joël Brich + + * gpdf/configure.in : Added "eo" to ALL_LINGUAS. + +2003-09-02 Gediminas Paulauskas + + * gpdf/configure.in: Added lt to ALL_LINGUAS. + +2003-08-29 Irene Ryan + + * ggv/help/C/ggv.sgml: removed this obsolete SGML file + * ggv/help/C/ggv.xml: minor updates to Help for GNOME 2.4 release + * ggv/help/C/ggv-C.omf: updated manual release info + * ggv/help/C/l10n.txt: updated instructions for L10N teams about + changes made in latest Help + +2003-08-25 Martin Kretzschmar + + * gpdf/configure.in: Version 0.106. + + * gpdf/NEWS: updated. + + * gpdf/README: point to README.GPdf. + + * gpdf/README.GPdf: new file. + + * gpdf/gnome-pdf.png: icon from gnome-icon-theme by Jimmac (Jakub + Steiner). + + * gpdf/Makefile.am: dist the icon. + +2003-08-25 Mark Finlay + + * gpdf/gpdf.desktop.in: use gnome-pdf (gnome-icon-theme) icon. + +2003-08-19 Yanko Kaneti + + * gpdf/configure.in: (ALL_LINGUAS) Added Bulgarian (bg). + +2003-08-18 Guntupalli Karunakar + + * gpdf/configure.in: Added "hi" to ALL_LINGUAS. + +2003-08-13 Jaka Mocnik + + * ggv/added ggv-recent.*! + +2003-08-12 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (ui_component_set_sensitive): move up. + (gpdf_control_enable_ui): new. + (gc_enable_go_back_verbs, gc_enable_go_forward_verbs) + (gc_enable_history_back_verbs, gc_enable_history_forward_verbs): + replaced by gpdf_control_enable_ui. + (gc_page_changed_enable_page_buttons, gpdf_control_activate) + (gpdf_control_pdf_doc_changed): use gpdf_control_enable_ui, + disable ui if pdf_doc == NULL. + +2003-08-12 Jaka Mocnik + + * ggv/applied patch by Glynn Foster of Sun that adds support for + recent files menu. Thanks! + +2003-08-11 Dafydd Harries + + * ggv/configure.in: Added "cy" (Welsh) to ALL_LINGUAS. + +2003-08-09 Sajith V.K + + * gpdf/configure.in: Added "ml" (Malayalam) to ALL_LINGUAS. + +2003-08-06 Thomas Vander Stichele + + * ggv/configure.in: make maintainer builds work + +2003-08-06 Martin Kretzschmar + + * gpdf/xpdf/eog-hig-dialog.c (eog_hig_dialog_new): add terminating + NULL in g_object_set. + +2003-07-29 Martin Kretzschmar + + * gpdf/NEWS, configure.in: Version 0.105 + + * gpdf/shell/gpdf.c (verb_HelpAbout_cb): add Remi. + +2003-07-24 Martin Kretzschmar + + * gpdf/test-files/Makefile.am (%.pdf): run pdftex in nonstopmode, let + make ignore pdftex errors (we are only creating test files). Makes + bug #114701 less severe. + +2003-07-24 Dafydd Harries + + * gpdf/configure.in: Added "cy" (Welsh) to ALL_LINGUAS. + +2003-07-24 Martin Kretzschmar + + * gpdf/xpdf/gpdf-properties-dialog.glade: declared unused dialog title + as not translatable. (Bug #118218). + +2003-07-24 Martin Kretzschmar + + * gpdf/xpdf/pdf-info-dict-util.cc (pdf_doc_process_properties): added a + comment for translators in front of Yes/No (Bug #118214). + +2003-07-20 Jaka Mocnik + + * ggv/src/Makefile.am: remove built sources from distribution tarball. + +2003-07-18 Martin Kretzschmar + + * gpdf/xpdf/gpdf-persist-file.cc (impl_bonobo_persist_file_load): use + more informative error messages when emitting loading-failed. Kill + gotos :-). + Whitespace cleanups. + + * gpdf/xpdf/gpdf-control.cc (persist_file_loading_failed_cb): kill + redundancy in error message; unset PDF document. + + * gpdf/xpdf/eog-hig-dialog.c (eog_hig_dialog_new): remove a newline + +2003-07-17 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-marshal.list (VOID:POINTER,INT) + (VOID:INT,INT,INT,INT,INT): removed wrongly + commited new marshalers. Should have gone to + gpdf-outlines. + +2003-07-17 Martin Kretzschmar + + * gpdf/xpdf/gpdf-persist-file.cc (gpdf_persist_file_class_init) + (impl_bonobo_persist_file_load): emit (new) loading-failed signal + if something goes wrong during load. + + * gpdf/xpdf/gpdf-persist-file.h: add slot for loading-failed. + + * gpdf/xpdf/gpdf-marshal.list: add VOID:STRING. + + * gpdf/xpdf/gpdf-links-canvas-layer.cc: fix include (thanks Remi). + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_setup_persist) + (gpdf_control_destroy): on loading-failed signal, display error + alert. + + * gpdf/xpdf/eog-hig-dialog.h, xpdf/eog-hig-dialog.c: copied from eog; + HIG conforming alert dialog. + + * gpdf/xpdf/Makefile.am (libgpdf_a_SOURCES): build eog-hig-dialog + + * gpdf/NEWS: updated. + +2003-07-14 Jaka Mocnik + + * ggv/bonobo/ggv-control.c (ggv_control_key_press_event): reverted the + page up/down keys behaviour. + * ggv/bonobo/GNOME_GGV.server.in.in: don't register ourselves as being + able to read PDF files. + * ggv/bonobo/bonobo-postscript-view-ui.xml: add label to File submenu. + fixes #115724. + * ggv/configure.in: bumoed version to 2.3.2; tag GGV_2_3_2: released a + tarball. + +2003-07-06 Martin Kretzschmar + + * gpdf/xpdf/gpdf-persist-file.cc (gpdf_persist_file_class_init): + rename set_pdf signal to loading_finished. + + * gpdf/xpdf/gpdf-control.cc (persist_file_loading_finished_cb) + (gpdf_control_setup_persist): ditto. + + * gpdf/xpdf/tests/test-pdf-loading.cc: ditto. + + * gpdf/xpdf/gpdf-persist-file.h: ditto. + +2003-07-05 Martin Kretzschmar + + * gpdf/shell/gpdf.c (file_dialog_ok): if selected filename does not + exist, try to do completion, never try to open. + +2003-07-05 Martin Kretzschmar + + * gpdf/shell/gpdf.c (file_dialog_ok): don't try to open a + directory. Code stolen from Gnumeric (gui-util.c). + (file_dialog_cancel, file_dialog_delete_event, gw_ask_for_uri): + hide the file selector before destroying it. + +2003-07-05 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_clear_history): implement. + (gpdf_view_set_pdf_doc): clear history on set_pdf_doc (for + nautilus). + +2003-07-04 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.h: add scroll_to prototypes + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_key_press_event): use + gpdf_view_scroll_to_top and _bottom, kill superfluous/wrong + do_scroll = TRUE statement (twice). + (gpdf_view_scroll_to_top, gpdf_view_scroll_to_bottom): move above + gpdf_view_page_prev. + (gpdf_view_link_action_goto, gpdf_view_page_prev) + (gpdf_view_page_next, gpdf_view_page_first, gpdf_view_page_last) + (gpdf_view_back_history, gpdf_view_forward_history) + (gpdf_view_key_press_event, gpdf_view_key_press_event): when + jumping to another page, scroll to top of the page, except when + browsing backwards with Backspace. Fixes #115173. + + * gpdf/xpdf/gpdf-control.cc (gc_set_page_cb): #115173 fix. + +2003-07-04 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_scroll_to_top) + (gpdf_view_scroll_to_bottom): implement. + + * gpdf/configure.in: bump version to 0.104.99. + +2003-07-02 Laurent Dhima + + * ggv/configure.in: Added "sq" to ALL_LINGUAS. + +2003-07-02 Jordi Mallach + + * ggv/ggv.desktop.in: Add X-Bugzilla entries. + +2003-07-01 Martin Kretzschmar + + * gpdf/configure.in, NEWS: Version: 0.104. + +2003-07-01 Martin Kretzschmar + + * gpdf/xpdf/tests/test-gpdf-control.cc (control_property_title): make + it pass again. + + * gpdf/xpdf/GPOutputDev.cc: fix name of Dingbats font. + +2003-07-01 Laurent Dhima + + * gpdf/configure.in: Added "sq" to ALL_LINGUAS. + +2003-06-30 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (persist_stream_set_pdf_cb) + (persist_file_set_pdf_cb, persist_file_set_pdf_cb) + (gpdf_control_get_title, gpdf_control_constructor) + (property_bag_get_prop): Plug leak. Don't recompute the title + everytime it is needed. Silly Martin told Remi the wrong place + for his change. + +2003-06-30 Alessio Frusciante + + * gpdf/configure.in (ALL_LINGUAS): added "it" (Italian). + +2003-06-28 Martin Kretzschmar + + * gpdf/xpdf/gpdf-font-face.h: change license from GPL v2 to GPL v2 or + later. (with Filip's permission) + + * gpdf/xpdf/gpdf-font-face.c: ditto. + + * gpdf/configure.in (ALL_LINGUAS): Added "mk" and "he". + (EXTRA_GNOME_CFLAGS) Do not check for freetype explicitly. Build + fix suggested by Ali Akcaagac. + + * gpdf/NEWS: updated. + +2003-06-26 Stanislav Brabec + + * ggv/configure.in: Fixed discontinued "head -1" syntax to "head -n 1". + +2003-06-25 Martin Kretzschmar + + * gpdf/xpdf/gpdf-font-face.c: GnomeFontFace wrapper class for embedded + fonts. Originally by me, this class is from Filip Van Raemdonck. + + * gpdf/xpdf/gpdf-font-face.h: header for GPdfFontFace. + + * gpdf/xpdf/Makefile.am (libgpdf_a_SOURCES): build gpdf-font-face.[hc]. + (INCLUDES): propagate cflags for private gnome-print headers. + + * gpdf/xpdf/GPOutputDev.cc (getFontFaceEmbedded): + s/gnome_font_face_download/gpdf_font_face_download/. + + * gpdf/configure.in (HAVE_FONT_EMBEDDING): compile with font-embedding + if complete private gnome-print headers are installed. + + * gpdf/NEWS: updated. + +2003-06-21 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_get_title): Added + URI manipulation stuff for removing file:// for title + property. + + * gpdf/shell/gpdf.c (gpdf_window_update_window_title): + Add handling for exception if PB cannot be retrieved. + Also fix a typo about last bonobo_pbclient_get_string_with_default + arg. + +2003-06-17 Martin Kretzschmar + + * gpdf/xpdf/tests/test-gpdf-control.cc (control_property_title): + * gpdf/xpdf/gpdf-control.cc (gpdf_control_setup_property_bag): + * gpdf/shell/gpdf.c (gpdf_window_update_window_title): plug property + bag leak. + + * gpdf/configure.in: fix typo. + +2003-06-15 Remi Cohen-Scali + + * gpdf/xpdf/gpdf-view.h: + * gpdf/xpdf/gpdf-view.cc: Add support for history navigation. + (gpdf_free_history_node, gpdf_view_history_stack_page) + (gpdf_view_back_history, gpdf_view_forward_history) + (gpdf_view_is_first_history, gpdf_view_is_last_history): impl. + (gpdf_view_goto_page_no_history): renamed from + gpdf_view_goto_page, made static + (gpdf_view_goto_page): new, history-aware. + + * gpdf/xpdf/gpdf-control-ui.xml: Add UI controls for history + navigation. + + * gpdf/xpdf/gpdf-control.cc (gc_page_changed_enable_page_buttons) + (gc_enable_history_forward_verbs, gc_enable_history_back_verbs): + Add update for history controls. + (verb_GoHistoryPrev_cb, verb_GoHistoryNext_cb): Add callbacks and + bonobo verbs for history controls. + (gpdf_control_activate): pretend page change to update commands + sensitivity. + (gc_page_changed_enable_page_buttons): handle history buttons. + +2003-06-15 Jaka Mocnik + + * ggv/configure.in: bumped version to 2.3.1; tag GGV_2_3_1; released a + tarball. + * ggv/src/ggv-window.c: found and released all remaining lost references. + +2003-06-14 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_new): unref the UI container. + +2003-06-13 Rajkumar Sivasamy + + * ggv/bonobo/ggv-control-ui.xml: + * ggv/bonobo/ggv-control.c: + * ggv/bonobo/ggv-sidebar.c: + * ggv/bonobo/main.c: + * ggv/src/ggvutils.c: + * ggv/src/ggvutils.h: + * ggv/src/main.c: Register the ggv icons as stock icons, so that the + themes can override them. + Fixes bug: 109158 + +2003-06-11 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (drawString): don't draw glyphs for + non-printing characters. Fixes #114939. + +2003-06-09 Martin Kretzschmar + + * gpdf/shell/gpdf.c (gpdf_window_update_window_title) + (gw_control_load_pdf): set window title according to control's + title property. + + * gpdf/xpdf/tests/test-pdf-loading.cc: add test for getCurrentFile. + + * gpdf/xpdf/tests/test-gpdf-control.cc: add test for title property. + + * gpdf/xpdf/gpdf-persist-file.cc + (impl_bonobo_persist_file_getCurrentFile): implement. + (gpdf_persist_file_get_current_uri): implement. + + * gpdf/xpdf/gpdf-persist-file.h: declare + gpdf_persist_file_get_current_uri + + * gpdf/xpdf/gpdf-control.cc (gc_page_changed_enable_page_buttons): do + nothing unless activated. + (gpdf_control_constructor, gpdf_control_setup_property_bag) + (property_bag_get_prop): add a property bag to the control. + (gpdf_control_get_title, persist_file_set_pdf_cb) + (gpdf_control_destroy, persist_stream_set_pdf_cb): impl. title + property (only an URI ATM). + + * gpdf/NEWS: update + + * gpdf/configure.in: bump version to 0.103.99. + +2003-06-06 Martin Kretzschmar + + * gpdf/configure.in: Version 0.103. + + * gpdf/NEWS: update. + + * gpdf/lib/ggv-sidebar/Makefile.am (libggv_sidebar_a_SOURCES): include + only files that are already needed. + +2003-06-03 Martin Kretzschmar + + * gpdf/configure.in: generate lib/ggv-sidebar/Makefile. + + * gpdf/lib/Makefile.am (SUBDIRS): add ggv-sidebar. + + * gpdf/lib/ggv-sidebar/ggvutils.h, lib/ggv-sidebar/ggv-prefs.h: + everything we need from the ggv files of the same name. + + * gpdf/lib/ggv-sidebar/ggvutils.c: plus their implementation. + + * gpdf/lib/ggv-sidebar/Makefile.am: add ggvutils.[hc], ggv-prefs.h. + + * gpdf/xpdf/Makefile.am: link with ggv-sidebar. + + * gpdf/xpdf/gpdf-view.cc: implement GgvDocument interface. + (gpdf_view_get_type): cannot use CLASS_BOILERPLATE with interfaces. + (gpdf_view_get_page_count, gpdf_view_get_page_names) + (gpdf_view_instance_init): for the interface. + + * gpdf/xpdf/tests/test-gpdf-view.cc: add tests for GPdfView. + + * gpdf/xpdf/tests/.cvsignore: ignore test-gpdf-view. + + * gpdf/xpdf/tests/Makefile.am: add new test, link with ggv-sidebar. + +2003-06-03 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_start_scroll, gtk_gs_end_scroll): optimized: + invalidate 4 tiny rectangles instead of the whole window. + * ggv/src/cursors.c (cursor_get): optimized: create cursor only the first + time. + +2003-06-02 Jaka Mocnik + + * ggv/src/ggv-window.c (set_file_cmds_sensitivity): properly enable + or disable reload and close buttons! + +2003-05-30 Jaka Mocnik + + * ggv/bonobo/ggv-control.c (set_zoom_items_sensitivity): disable zoom spin + also! + +2003-05-29 Martin Kretzschmar + + * gpdf/configure.in: define HAVE_FONT_EMBEDDING if gnome-print has the + gnome_font_face_download function + + * gpdf/xpdf/GPOutputDev.cc: use HAVE_FONT_EMBEDDING from aconf.h + +2003-05-29 Martin Kretzschmar + + * gpdf/xpdf/tests/test-gpdf-control.cc: add tests for GPdfControl + + * gpdf/xpdf/tests/Makefile.am, xpdf/tests/.cvsignore: add + test-gpdf-control + + * gpdf/xpdf/gpdf-control.cc: use BONOBO_CLASS_BOILERPLATE. + (gpdf_control_new, gpdf_control_construct): kill, use construct + time properties. + (gpdf_control_class_init): install constructor, properties + persist-stream and persist-file. + (gpdf_control_constructor): constructor impl. + (gpdf_control_setup_page_control, gpdf_control_setup_zoomable) + (gpdf_control_setup_view_widgets): renamed from gc_setup_foo. + (gpdf_control_setup_persist): ditto, connect to PersistFile, too. + (gpdf_control_set_property): impl. + (persist_file_set_pdf_cb): signal callback. + (persist_stream_set_pdf_cb): renamed from gc_set_pdf_cb. + (gpdf_control_pdf_doc_changed): factored out from gc_set_pdf_cb. + (verb_FileProperties_cb): get PDFDoc from priv. + + * gpdf/xpdf/gpdf-control.h: kill gpdf_control_new and _construct, + + * gpdf/xpdf/bonobo-application-x-pdf.cc (gpdf_factory): also give the + control a PersistFile implementation + + * gpdf/xpdf/Makefile.am: moved more code into libgpdf.a. + + * gpdf/xpdf/GNOME_PDF.server.in.in: state that we implement + Bonobo/PersistFile. + + * gpdf/shell/gpdf.c (bonobo_stream_for_uri): kill. + (gw_control_load_pdf): changed to load through PersistFile. + +2003-05-27 Martin Kretzschmar + + * gpdf/xpdf/tests/test-pdf-loading.cc: add tests for GPdfPersistFile. + + * gpdf/xpdf/gpdf-persist-stream.h: no need to include BonoboStream.h. + + * gpdf/xpdf/gpdf-persist-file.h, xpdf/gpdf-persist-file.cc: new class, + implements the PersistFile interface. + + * gpdf/xpdf/Makefile.am (libgpdf_a_SOURCES): add gpdf-persist-file.cc, + gpdf-persist-file.h. + + * gpdf/xpdf/gpdf-control.cc: reorder includes. + +2003-05-26 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_remove_control): remove timer callback + and free filename. + (ggv_window_close): call ggv_window_remove_control. + +2003-05-25 Martin Kretzschmar + + * gpdf/xpdf/gpdf-links-canvas-layer.cc (gnome_canvas_item_new): + + * gpdf/xpdf/gpdf-link-canvas-item.cc (gpdf_link_canvas_item_set_link): + + * gpdf/xpdf/tests/test-links.cc: refactoring: the LinkItem gets its + directly coordinates from the Link + +2003-05-25 Martin Kretzschmar + + * gpdf/xpdf/gpdf-persist-stream.cc: + (impl_bonobo_persist_stream_load) + (impl_bonobo_persist_stream_save, impl_get_content_types) + (gpdf_persist_stream_class_init, gpdf_persist_stream_construct): + implement the PersistStream interface on top of BonoboPersist + instead of the deprecated BonoboPersistStream GObject class. + (gpdf_persist_stream_class_init, gpdf_persist_stream_construct): + changes for BONOBO_CLASS_BOILERPLATE_FULL. + + * gpdf/xpdf/gpdf-persist-stream.h: derive directly from BonoboPersist. + + * gpdf/xpdf/tests/test-pdf-loading.cc (persist_stream_content_types) + (persist_stream_no_load): test ::getContentTypes and ::save + implementation in GPdfPersistStream. + +2003-05-25 Martin Kretzschmar + + * gpdf/xpdf/tests/test-pdf-loading.cc: new test. + + * gpdf/xpdf/tests/Makefile.am (TESTS_NEEDING_PDFTEX): add + test-pdf-loading. + + * gpdf/xpdf/Makefile.am (libgpdf_a_SOURCES): move more files to the lib. + + * gpdf/xpdf/gpdf-persist-stream.cc (gpdf_persist_stream_get_length): + kill. + (gpdf_persist_stream_delete_doc_and_stream): rename from + delete_pdf_doc_full, simplify. + (load_pdf_from_stream): make priv->pdf_stream local to this method, + kill redundant test for catalog. + + * gpdf/xpdf/gpdf-persist-stream.h (gpdf_persist_stream_get_length): + kill. + + * gpdf/xpdf/gpdf-control.cc (verb_FileProperties_cb): remove file size + argument. + + * gpdf/xpdf/nautilus-pdf-property-page.cc + (gpdf_nautilus_property_page_set_uri): ditto. + + * gpdf/xpdf/pdf-info-dict-util.cc (pdf_doc_process_properties): kill + file size parameter. + + * gpdf/xpdf/pdf-info-dict-util.h: ditto. + + * gpdf/xpdf/pdf-properties-display.c: kill traces of the file size + label. + +2003-05-25 Jaka Mocnik + + * ggv/README: added some content ;) + * ggv/bonobo/ggv-control.c (ggv_control_key_press_event): explicitly queue + the scrollbar for redraw when doing page wrap. + * ggv/bonobo/ggv-control.c: popup menu on Shift+F10. patch by Padraig + O'Briain. + * ggv/src/gtkgs.c: Execute the wait() system call in a loop + so that it doesn't fail with an interrupted signal which + will result in defunct process. fixes #113058. patch by + Rajkumar Sivasamy. + * ggv/ggv.schemas: improved descriptions. Thanx to menthos for discovering these. + +2003-05-24 Jaka Mocnik + + * ggv/src/gtkgs.[ch] (gtk_gs_set_available_size): new function to set + the visible size that is available to the widget. used to calculate + zoom-to-fit factor in a better manner. + * ggv/bonobo/ggv-control.c: use the above func whenever widget size + changes. + +2003-05-23 Christian Neumair + + * gpdf/shell/gpdf.c: (verb_HelpAbout_cb): Splitted copyright string. + +2003-05-20 Martin Kretzschmar + + * gpdf/xpdf/tests/test-links.cc (link_item_click) + (link_item_enter_leave): more tests + + * gpdf/xpdf/gpdf-link-canvas-item.cc (gpdf_link_canvas_item_click) + (gpdf_link_canvas_item_enter, gpdf_link_canvas_item_leave) + (gpdf_link_canvas_item_clicked, gpdf_link_canvas_item_event) + (gpdf_link_canvas_item_set_property) + (gpdf_link_canvas_item_class_init): refactor to make it more + better testable + + * gpdf/xpdf/gpdf-link-canvas-item.h: ditto + +2003-05-20 Martin Kretzschmar + + * gpdf/xpdf/gpdf-link-canvas-item.cc + (gpdf_link_canvas_item_mouse_enter) + (gpdf_link_canvas_item_mouse_leave) + (gpdf_link_canvas_item_class_init): add (mouse) enter and leave + signals + + * gpdf/xpdf/gpdf-link-canvas-item.h: add signal slots for enter and + leave + + * gpdf/xpdf/tests/test-links.cc (link_item_enter_leave): test for the + signals + + * gpdf/xpdf/Makefile.am: now the marshallers sources are not shipped + with the dist and correctly build when needed, finally + + * gpdf/configure.in: version 0.102.99 + +2003-05-19 Martin Kretzschmar + + * gpdf/configure.in: Version 0.102 + + * gpdf/xpdf/Makefile.am: don't do the DONT_DIST_SOURCE thing, breaks + the distcheck + +2003-05-19 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_render_page): properly destroy the + links layer when switching pages + +2003-05-19 Martin Kretzschmar + + * gpdf/xpdf/Makefile.am: don't distribute generated marshallers + +2003-05-19 Martin Kretzschmar + + * gpdf/xpdf/gpdf-links-canvas-layer.cc + (gpdf_links_canvas_layer_dispose): plug leak + + * gpdf/xpdf/tests/.cvsignore, test-files/.cvsignore: update + + * gpdf/NEWS: update + +2003-05-18 Martin Kretzschmar + + * gpdf/xpdf/tests/test-page-setup.cc, xpdf/tests/test-links.cc: + tests/experiments + + * gpdf/xpdf/tests/Makefile.am, xpdf/tests/.cvsignore: infrastructure + + * gpdf/xpdf/gpdf-view.h: signal slots for close and quit requests + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_link_action_named, link_clicked_cb) + (gpdf_view_class_init): implement some named action links: + NextPage, PrevPage, FirstPage, LastPage, signals for Close and Quit + + * gpdf/xpdf/Makefile.am (SUBDIRS): add tests + + * gpdf/test-files/simple-links.tex: test file, simple pdf links + + * gpdf/test-files/.cvsignore, test-files/Makefile.am: infrastructure + + * gpdf/configure.in: check for pdftex (not a hard requirement) + add test-files/Makefile and xpdf/tests/Makefile + + * gpdf/NEWS: update + + * gpdf/Makefile.am (SUBDIRS): add test-files + +2003-05-18 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_motion_notify_event) + (gpdf_view_handle_drag_motion): chain up to parent implementation + of motion-notify, factor out dragging + (gpdf_view_button_press_event): chain up to parent + (gpdf_view_render_page): use GPdfLinksCanvasLayer to draw links + (link_clicked_cb, gpdf_view_link_action_goto): implement simple + GoTo links + (gpdf_view_dispose): unref the links_layer + + * gpdf/xpdf/gpdf-persist-stream.cc: store bonoboStream as BaseStream + + * gpdf/xpdf/gpdf-marshal.list: add VOID:POINTER + + * gpdf/xpdf/gpdf-links-canvas-layer.cc, xpdf/gpdf-links-canvas-layer.h: + new class, links are grouped in such layers + + * gpdf/xpdf/gpdf-link-canvas-item.cc, xpdf/gpdf-link-canvas-item.h: new + class, representing links in the GPdfView + + * gpdf/xpdf/Makefile.am: move away from $common_sources to convenience + libraries, add gpdf-link-canvas-item.{cc,h}, + gpdf-links-canvas-layer.{cc,h} + + * gpdf/xpdf/BonoboStream.cc (bfread, bfseek): fix debug messages + +2003-05-18 Danilo Å egan + + * ggv/configure.in: Added "sr" and "sr@Latn" to ALL_LINGUAS. + +2003-05-17 Martin Kretzschmar + + * gpdf/lib/recent-files/egg-recent-model.c: update from egg + + * gpdf/lib/recent-files/Makefile.am: fix update target + + * gpdf/lib/ggv-sidebar/update-from-ggv.sh: fix + + * gpdf/lib/ggv-sidebar/ggv-document.c, lib/ggv-sidebar/ggv-document.h: + new interfaces from GGV + + * gpdf/lib/ggv-sidebar: update from ggv + + * gpdf/lib/ggv-sidebar/Makefile.am: add ggv-document.[ch], fix update + target, define GNOMEICONDIR + +2003-05-15 Jaka Mocnik + + * ggv/applied a patch from Martin Kretzschmar that decouples GgvSidebar + from GgvPostScriptView via a GgvDocument interface implemented by + GgvPostScriptView. + * ggv/bonobo/ggv-document.[ch]: new - a GgvDocument interface definition. + * ggv/bonobo/ggv-sidebar.[ch], bonobo/ggv-postscript-view.[ch]: use the + new interface instead of directly using GgvPostScriptView in the + sidebar. + +2003-05-13 Martin Kretzschmar + + * gpdf/configure.in: bump version to 0.101.99 + + * gpdf/xpdf/gpdf-view.cc (setup_page_transform, gpdf_view_render_page): + respect offsets from a page's CropBox/MediaBox (fixes second part + of Bug #112884). + +2003-05-10 Martin Kretzschmar + + I'll elaborate a bit on the last change + + * ggv/bonobo/ggv-document.h, bonobo/ggv-document.c: new interface with + methods ggv_document_get_page_count and + ggv_document_get_page_names + + * ggv/bonobo/ggv-sidebar.c (ggv_sidebar_class_init) + (page_list_selection_changed, ggv_sidebar_create_page_list) + (ggv_sidebar_construct, ggv_sidebar_new): don't depend on + GgvPostScriptView but on the GgvDocument interface; emit a + set_page signal instead of calling ggv_postscript_view_goto_page + + * ggv/bonobo/ggv-sidebar.h: ditto + + * ggv/bonobo/ggv-postscript-view.h: + (ggv_postscript_view_get_page_count) + (ggv_postscript_view_get_page_names): no longer public + + * ggv/bonobo/ggv-postscript-view.c (notify_page_count_change) + (load_ps, ggv_postscript_view_create_ui): + s/ggv_postscript_view_get_page_count/ggv_document_get_page_count/ + (ggv_postscript_view_get_type): expand BONOBO_TYPE_FUNC_FULL, add + interface implementation stuff + (ggv_document_interface_init): new, interface foo + (ggv_postscript_view_get_page_count) + (ggv_postscript_view_get_page_names): make static, now they serve + only as implementation of the respective ggv_document:: methods + (ggv_postscript_view_construct, sidebar_set_page): goto_page on + set_page signal from sidebar + + * ggv/bonobo/ggv-control.c (ggv_control_create_ui): + s/ggv_postscript_view_get_page_count/ggv_document_get_page_count/ + + * ggv/bonobo/Makefile.am (ggv_postscript_viewer_SOURCES): add + ggv-document.[ch] to the build + +2003-05-09 Martin Kretzschmar + + * gpdf/lib/ggv-sidebar/update-from-ggv.sh, + lib/ggv-sidebar/gtkchecklist.h, lib/ggv-sidebar/gtkchecklist.c, + lib/ggv-sidebar/ggv-sidebar.h, lib/ggv-sidebar/ggv-sidebar.c, + lib/ggv-sidebar/config.h, lib/ggv-sidebar/Makefile.am, + lib/ggv-sidebar/.cvsignore, lib/ggv-sidebar: sidebar code from + ggv, no changes allowed here, is not in the build yet, only + checked in for convenient diffing. + +2003-05-09 Christian Neumair + + * ggv/ggv.schemas.in: s/postscript/PostScript/. + +2003-05-08 Christian Neumair + + * ggv/ggv.schemas.in: Fixed two tiny typos. + +2003-05-06 Danilo Å egan + + * gpdf/configure.in: Added "sr" and "sr@Latn" to ALL_LINGUAS. + +2003-05-04 Martin Kretzschmar + + * gpdf/NEWS, configure.in: Version 0.101 + +2003-05-03 Martin Kretzschmar + + * gpdf/xpdf/gpdf-g-switch.h: add GMutex, + + * gpdf/shell/gpdf.c (gpdf_window_new): s/gtk_type_new/g_object_new/, + use construction time properties + (gw_setup_window): kill (replaced by constr. time props) + (gpdf_window_construct): don't call gw_setup_window + (gw_add_control_to_ui, gpdf_window_open): more simplifications due + to BonoboWidget + (gw_activate_control): ditto -> kill + (gw_control_load_pdf, bonobo_stream_for_uri): extract the latter + from the former + (gw_setup_local_contents, gw_setup_toplevel_ui) + (gw_setup_recent_menu, gw_setup_recent_toolitem): slot and + ui_component moved to priv + + * gpdf/shell/gpdf-window.h (struct _GPdfWindow): move away remaining + public fields + +2003-05-03 Martin Kretzschmar + + * gpdf/xpdf/pdf-info-dict-util.cc (pdf_info_dict_get_date): don't hand + out invalid times; work around Distiller 3.0 y2k bug. + +2003-05-03 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_key_press_event): really set + do_scroll when we want to scroll; on PageUp/Down move by whole + pages instead of screenfuls, leave Backspace/Space for that (fixes + Bug #112140) + +2003-05-02 Martin Kretzschmar + + * gpdf/shell/gpdf.c: + (gpdf_window_has_contents, gw_add_control_to_ui) + (gw_control_load_pdf, gw_control_load_pdf, gw_destroy) + (gpdf_window_construct): refactor towards using BonoboWidget + (gw_setup_control_frame): kill + +2003-05-02 Martin Kretzschmar + + * gpdf/shell/gpdf.c (gw_control_load_pdf): use a vfs: moniker; check + for exceptions + +2003-05-01 Martin Kretzschmar + + * gpdf/shell/gpdf.c (gw_control_load_pdf): don't free uri + +2003-05-01 Martin Kretzschmar + + * gpdf/shell/tests/test-uri-input.c (setup, tear_down): extract uri + request logging foo from tests + (open_shell_arg, open_shell_arg_relative): new tests + + * gpdf/shell/gpdf.c (create_window): use ::open_shell_arg + (gw_control_load_pdf): only accept uris + (gw_ask_for_uri, gw_ask_for_uri, gw_open_dialog): + variable/function renamings + + * gpdf/shell/gpdf-uri-input.h (gpdf_uri_input_open_shell_arg): add + prototype + + * gpdf/shell/gpdf-uri-input.c (gpdf_uri_input_open_shell_arg): new + function + + * gpdf/shell/eel-string.c, shell/eel-string.h, + shell/eel-vfs-extensions.c, shell/eel-vfs-extensions.h: frome eel + + * gpdf/shell/Makefile.am (libgpdfshell_a_SOURCES): add eel-string and + eel-vfs-extensions + +2003-05-01 Martin Kretzschmar + + * gpdf/xpdf/pdf-info-dict-util.cc (pdf_info_dict_get_string): kill + unused variable + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_construct): kill unused variables + + * gpdf/xpdf/gpdf-control.cc (gc_zoom_to_fit_width_cb): kill (unused) + (gc_ui_set_pixbufs): kill unused variables + + * gpdf/shell/tests/test-uri-input.c: include headers for exit, strcmp + + * gpdf/lib/recent-files/Makefile.am (INCLUDES): fix distcheck + + * gpdf/gpdf.desktop.in (Icon): use the icon for pdf documents until we + have a nice gpdf icon + + * gpdf/NEWS: more antinews + + * gpdf/Makefile.am (CLEANFILES): more cleaning + +2003-04-30 Martin Kretzschmar + + * gpdf/shell/gpdf-recent-view-toolitem.c: add tooltip to recent files + drop down + +2003-04-30 Jaka Mocnik + + * ggv/src/ggv-prefs-ui.[ch] (struct _GgvPrefsDialog): removed ok, cancel + and apply members and all code related to them! + +2003-04-27 Martin Kretzschmar + + * gpdf/shell/gpdf.c (menu_position_under_widget) + (open_button_pressed_cb, open_button_key_pressed_cb) + (gw_setup_recent_tool_item, gw_setup_recent_toolitem): factored + out the toolitem with the recent files list + + * gpdf/shell/gpdf-recent-view-toolitem.c, + shell/gpdf-recent-view-toolitem.h: new class: button with dropdown + menu of recent files + + * gpdf/shell/Makefile.am (libgpdfshell_a_SOURCES): compile + gpdf-recent-view-toolitem.c + +2003-04-27 Martin Kretzschmar + + Gotta love compiler warnings. + + * gpdf/xpdf/pdf-properties-display.c (gpdf_gtk_label_make_bold): make static + (gpdf_properties_display_class_init): install dispose implementation + + * gpdf/xpdf/pdf-info-dict-util.cc (pdf_doc_process_properties): format + file size with %ld, not %d + + * gpdf/xpdf/page-control.c: #include stdlib.h for strtol + + * gpdf/xpdf/gpdf-view.cc (canonical_multiple_of_90): return statement + was missing, I wonder why it worked + (gpdf_view_key_press_event): silence warning + (gpdf_view_key_press_event): ditto + + * gpdf/xpdf/GPOutputDev.cc (initBase14Fonts): use guint as array index + + * gpdf/xpdf/BonoboStream.cc (bfseek): silence warning + + * gpdf/shell/gpdf.c (open_request_logger): don't define if not debugging + + * gpdf/shell/gpdf-uri-input.h: add missing prototypes + + * gpdf/shell/gpdf-uri-input.c (gpdf_uri_input_open_uri_list): add + missing return type + + * gpdf/xpdf/Makefile.am, shell/Makefile.am, configure.in: use maximum + compiler warnings + +2003-04-27 Martin Kretzschmar + + * gpdf/NEWS: updated. + + * gpdf/shell/gpdf.c (gpdf_window_construct, gw_setup_recent_tool_item) + (open_button_key_pressed_cb, open_button_pressed_cb) + (menu_position_under_widget): implement recent files drop-down + tool item (taken from gedit) + (verb_HelpAbout_cb): updated (c) + (gw_setup_recent_menu): renamed from gw_setup_recent_files_ui + + * gpdf/shell/gpdf-window-ui.xml: added recent files drop-down control + + * gpdf/shell/gpdf-recent-facade.c (gpdf_recent_facade_get_model): added + missing return. + +2003-04-27 Martin Kretzschmar + + * gpdf/NEWS: added news and anti-news. + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_render_page): honor Rotate info + of the page object. Don't set page layout in print config object, + we handle the page format with calls to the canvas. + (setup_page_transform): renamed from setup_upside_down_transform, + take rotation angle argument. + (canonical_multiple_of_90): new function. + +2003-04-24 Abel Cheung + + * ggv/src/ggv-window.c(verb_HelpAbout): Add documenter credits, and + mark more translatable strings. + * ggv/Makefile.am, configure.in, ggv.schemas.in: Make schemas + translatable. Don't shutdown gconfd when installing schemas. + +2003-04-23 Martin Kretzschmar + + * gpdf/xpdf/Makefile.am (CLEANFILES): rm GNOME_PDF.server.in on clean, + not on distclean (fixes Bug #111404) + +2003-04-23 Jaka Mocnik + + * ggv/src/ggv-prefs-ui.c: added a prefs entry for PDF->DSC command. + * ggv/src/gtkgs.c (gtk_gs_get_postscript): convert PDF to PS before + printing! + * ggv/src/gsdefaults.[ch], ggv.schemas: added property pdf2dsc that + stores PDF->DSC conversion command. + * ggv/src/gtkgs.c (check_pdf): reverted to the old way of handling PDFs: + create a DSC file and use the original PDF to show it. + +2003-04-19 Hasbullah Bin Pit + + * gpdf/configure.in (ALL_LINGUAS): Added "ms". + +2003-04-15 Mike Lei + + * ggv/configure.in: Added Makefile support for l10n help files + * ggv/Add online help files for de es fr it sv ja ko zh_CN zh_TW + +2003-04-14 Martin Kretzschmar + + * gpdf/shell/gpdf.c (main, gw_open_recent_file, gw_destroy) + (gw_setup_recent_files_ui, gpdf_window_construct): implement + recent files menu items + + * gpdf/shell/gpdf-window-ui.xml: add placeholder for recent files menu + items + + * gpdf/shell/gpdf-recent-facade.h (gpdf_recent_facade_get_model): add + prototype, slot for virtual + + * gpdf/shell/gpdf-recent-facade.c (gpdf_recent_facade_get_model): new + (gpdf_recent_facade_instance_init): set limit to list of recent + files + +2003-04-13 Martin Kretzschmar + + * gpdf/shell/gpdf.c (no_contents, find_empty_or_create_new_window) + (open_request_handler, open_request_logger): new functions + (create_window, main, gw_control_load_pdf, gw_drag_data_received) + (gw_open_dialog): use GPdfUriInput + (gpdf_window_has_contents): rename from gw_has_contents, no longer + static + (gpdf_window_open): s/gw_has_contents/gpdf_window_has_contents/ + + * gpdf/shell/gpdf-window.h: add prototype for gpdf_window_has_contents + + * gpdf/shell/gpdf-recent-facade.h, shell/gpdf-recent-facade.c, + shell/mock-recent-facade.c: new class, plus a mock of it + + * gpdf/shell/gpdf-uri-input.h, shell/gpdf-uri-input.c: new class + + * gpdf/shell/tests/test-uri-input.c, shell/tests/Makefile.am: unit + tests for gpdf-uri-input + + * gpdf/shell/Makefile.am: add new files, compile them into a + convenience library for testing, link gpdf with that lib and with + recent files stuff + + * gpdf/lib/recent-files: copy of egg recent files stuff + + * gpdf/lib, lib/unit-test.h, lib/Makefile.am, lib/.cvsignore: new + + * gpdf/xpdf/GPOutputDev.cc (getFontFaceEmbedded): fix bad C++, detected + by Sun compilers. Thanks to Rich Burridge / Sun (Bug: #110402) + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_button_press_event): ditto + + * gpdf/xpdf/gpdf-util.h (GPDF_BOILERPLATE): kill, identical with + BONOBO_BOILERPLATE since libbonobo 2.2.1 + + * gpdf/xpdf/nautilus-pdf-property-page.cc (BONOBO_ARG_GET_STRING): + ditto + + * gpdf/configure.in: bumped version to 0.100.99, require libbonobo 2.2.1 + generate Makefiles in lib, lib/recent-files, shell/tests + + * gpdf/Makefile.am (SUBDIRS): add lib dir + + * gpdf/.cvsignore: ignore release tarballs + +2003-04-08 Michael Meeks + + * gpdf/Version 0.100.0 + +2003-04-07 Jaka Mocnik + + * ggv/bonobo/ggv-control.c (ggv_control_key_press_event): don't wrap on + arrow keys - only on space and backspace! + * ggv/src/main.c (create_windows_from_cmdline): fix differentiation + of URIs and local file paths. + * ggv/src/gtkgs.c (gtk_gs_size_allocate): always update adjustments. + (gtk_gs_munge_adjustments): if we zoom mode is fit (width|page) + set corresponding adjustments properly. + +2003-04-06 Jaka Mocnik + + * ggv/merged from gnome-2-2 branch - the instant-apply patch. + * src/main.c (main): save geometry upon exit. + * src/ggv-prefs-ui.c: made prefs dialog instant apply. + * src/ggv-prefs.[ch] (ggv_prefs_save): removed. + * src/gsdefaults.[ch] (gtk_gs_defaults_save): removed. moved gconf + operation to gtk_gs_defaults_set_*() functions. + * bonobo/ggv-postscript-view.c (verb_FileSaveMarked): warn even when + overwriting an empty file. + +2003-04-05 Samúel Jón Gunnarsson + + * gpdf/configure.in: Added "is" in ALL_LINGUAS + +2003-04-03 Martin Kretzschmar + + * gpdf/xpdf/Makefile.am (ui_DATA): no need for + bonobo-application-x-pdf-ui.xml. + +2003-04-03 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (getFontFaceEmbedded): use + getFontFaceFallback + + * gpdf/xpdf/page-control.c (gpdf_page_control_setup_tooltips): fix + tooltip string. + (gpdf_page_control_setup_tooltips): ref the tooltips object + + * gpdf/xpdf/gpdf-properties-dialog.glade, xpdf/pdf-properties-display.c + (gpdf_properties_display_set_property): disable file size label. + +2003-04-03 Martin Kretzschmar + + * gpdf/xpdf/page-control.c (gpdf_page_control_instance_init) + (gpdf_page_control_setup_tooltips, gpdf_page_control_class_init) + (gpdf_page_control_destroy): add tooltips to the widget + + * gpdf/xpdf/pdf-info-dict-util.cc: there are PDFs without + info-dictionary (e.g. OpenOffice.org's), don't crash on them + + * gpdf/Makefile.am (EXTRA_DIST): distribute gpdf.applications + +2003-04-02 Martin Kretzschmar + + * gpdf/gpdf.applications: add + + * gpdf/Makefile.am install gpdf.applications + + * gpdf/gpdf.keys.in: update. + + * gpdf/goo/Makefile.am, shell/Makefile.am, xpdf/Makefile.am: add + top_srcdir to include path for aconf2.h. + + * gpdf/goo/Makefile.am, xpdf/Makefile.am: rename libgoo.a to libGoo.a + for consistency with Xpdf, don't install this library; + makefile.w32 is no more. + + * gpdf/README: added note that this does not describe the GNOME version. + + * gpdf/Makefile.am: don't distribute README.CVS, ANNOUNCE, + makefile.w32, distribute aconf2.h. + + * gpdf/CHANGES: added reference to ChangeLog and NEWS. + + * gpdf/AUTHORS, NEWS: updated. + + * gpdf/configure.in: add bugzilla url to AC_INIT. + + * gpdf/xpdf/gpdf-view.cc, xpdf/gpdf-persist-stream.cc, + xpdf/gpdf-control.cc, xpdf/GPOutputDev.cc: consistently wrap debug + messages. + +2003-04-02 Martin Kretzschmar + + * gpdf/configure.in: added tests from Xpdf's configure.in + + * gpdf/CHANGES: added note that this describes only Xpdf upstream + changes + +2003-04-01 Martin Kretzschmar + + Merge with Xpdf 2.01 and make it build + + * gpdf/ANNOUNCE, CHANGES, README, aconf-win32.h: update + + * gpdf/xpdf/CharCodeToUnicode.cc, xpdf/Decrypt.cc, xpdf/FTFont.cc, + xpdf/FTFont.h, xpdf/FontEncodingTables.cc, xpdf/Gfx.cc, + xpdf/GfxFont.cc, xpdf/GfxState.cc, xpdf/GfxState.h, + xpdf/GlobalParams.cc, xpdf/GlobalParams.h, xpdf/Link.cc, + xpdf/NameToUnicodeTable.h, xpdf/Stream.cc, xpdf/TextOutputDev.cc, + xpdf/TextOutputDev.h, xpdf/XOutputDev.cc, xpdf/config.h, + xpdf/pdftotext.cc, xpdf/xpdf.cc, xpdf/Outline.cc, xpdf/XPDFApp.cc, + xpdf/XPDFApp.h, xpdf/XPDFCore.cc, xpdf/XPDFCore.h, + xpdf/XPDFViewer.cc, xpdf/XPDFViewer.h: update. + + * gpdf/goo/GMutex.h: new file + + * gpdf/goo/gfile.cc: update. + + * gpdf/goo/Makefile.am: use GMutex.h + + * gpdf/doc/pdffonts.1, doc/pdffonts.cat, doc/pdfimages.1, + doc/pdfimages.cat, doc/pdfinfo.1, doc/pdfinfo.cat, doc/pdftopbm.1, + doc/pdftopbm.cat, doc/pdftops.1, doc/pdftops.cat, doc/pdftotext.1, + doc/pdftotext.cat, doc/pdftotext.hlp, doc/xpdf.1, doc/xpdf.cat, + doc/xpdf.hlp, doc/xpdfrc.5, doc/xpdfrc.cat, doc/xpdfrc.hlp: update + +2003-04-01 Martin Kretzschmar + + Merge with Xpdf 2.02 and make it build + + * gpdf/aconf2.h, aconf-dj.h, aconf-win32.h, ANNOUNCE, CHANGES, README, + vms_make.com: update. + + * gpdf/xpdf/about-text.h, xpdf/Annot.cc, xpdf/Annot.h, xpdf/Array.cc, + xpdf/Array.h, xpdf/BuiltinFont.cc, xpdf/BuiltinFont.h, + xpdf/BuiltinFontTables.cc, xpdf/BuiltinFontTables.h, + xpdf/Catalog.cc, xpdf/Catalog.h, xpdf/CharCodeToUnicode.cc, + xpdf/CharCodeToUnicode.h, xpdf/CharTypes.h, xpdf/CMap.cc, + xpdf/CMap.h, xpdf/CompactFontTables.h, xpdf/config.h, + xpdf/Decrypt.cc, xpdf/Decrypt.h, xpdf/Dict.cc, xpdf/Dict.h, + xpdf/DisplayFontTable.h, xpdf/Error.cc, xpdf/ErrorCodes.h, + xpdf/Error.h, xpdf/FontEncodingTables.cc, + xpdf/FontEncodingTables.h, xpdf/FontFile.cc, xpdf/FontFile.h, + xpdf/FTFont.cc, xpdf/FTFont.h, xpdf/Function.cc, xpdf/Function.h, + xpdf/Gfx.cc, xpdf/GfxFont.cc, xpdf/GfxFont.h, xpdf/Gfx.h, + xpdf/GfxState.cc, xpdf/GfxState.h, xpdf/GlobalParams.cc, + xpdf/GlobalParams.h, xpdf/ImageOutputDev.cc, + xpdf/ImageOutputDev.h, xpdf/JBIG2Stream.cc, xpdf/JBIG2Stream.h, + xpdf/Lexer.cc, xpdf/Lexer.h, xpdf/Link.cc, xpdf/Link.h, + xpdf/NameToCharCode.cc, xpdf/NameToCharCode.h, + xpdf/NameToUnicodeTable.h, xpdf/Object.cc, xpdf/Object.h, + xpdf/Outline.cc, xpdf/Outline.h, xpdf/OutputDev.cc, + xpdf/OutputDev.h, xpdf/Page.cc, xpdf/Page.h, xpdf/Parser.cc, + xpdf/Parser.h, xpdf/PBMOutputDev.cc, xpdf/PBMOutputDev.h, + xpdf/PDFDoc.cc, xpdf/PDFDocEncoding.cc, xpdf/PDFDocEncoding.h, + xpdf/PDFDoc.h, xpdf/pdffonts.cc, xpdf/pdfimages.cc, + xpdf/pdfinfo.cc, xpdf/pdftopbm.cc, xpdf/pdftops.cc, + xpdf/pdftotext.cc, xpdf/PSOutputDev.cc, xpdf/PSOutputDev.h, + xpdf/PSTokenizer.cc, xpdf/PSTokenizer.h, xpdf/SFont.cc, + xpdf/SFont.h, xpdf/Stream.cc, xpdf/Stream-CCITT.h, xpdf/Stream.h, + xpdf/T1Font.cc, xpdf/T1Font.h, xpdf/TextOutputDev.cc, + xpdf/TextOutputDev.h, xpdf/TTFont.cc, xpdf/TTFont.h, + xpdf/UnicodeMap.cc, xpdf/UnicodeMap.h, xpdf/UnicodeMapTables.h, + xpdf/UTF8.h, xpdf/vms_make.com, xpdf/XOutputDev.cc, + xpdf/XOutputDev.h, xpdf/XPDFApp.cc, xpdf/XPDFApp.h, xpdf/xpdf.cc, + xpdf/XPDFCore.cc, xpdf/XPDFCore.h, xpdf/XPDFTree.cc, + xpdf/XPDFTree.h, xpdf/XPDFTreeP.h, xpdf/XPDFViewer.cc, + xpdf/XPDFViewer.h, xpdf/XPixmapOutputDev.cc, + xpdf/XPixmapOutputDev.h, xpdf/XRef.cc, xpdf/XRef.h: update + + * gpdf/goo/gfile.cc, goo/gfile.h, goo/GHash.cc, goo/GHash.h, + goo/GList.cc, goo/GList.h, goo/gmem.c, goo/gmem.h, goo/gmempp.cc, + goo/GMutex.h, goo/GString.cc, goo/GString.h, goo/gtypes.h, + goo/parseargs.c, goo/parseargs.h, goo/vms_make.com: update. + + * gpdf/doc/pdffonts.1, doc/pdffonts.cat, doc/pdffonts.hlp, + doc/pdfimages.1, doc/pdfimages.cat, doc/pdfimages.hlp, + doc/pdfinfo.1, doc/pdfinfo.cat, doc/pdfinfo.hlp, doc/pdftopbm.1, + doc/pdftopbm.cat, doc/pdftopbm.hlp, doc/pdftops.1, + doc/pdftops.cat, doc/pdftops.hlp, doc/pdftotext.1, + doc/pdftotext.cat, doc/pdftotext.hlp, doc/xpdf.1, doc/xpdf.cat, + doc/xpdf.hlp, doc/xpdfrc.5, doc/xpdfrc.cat, doc/xpdfrc.hlp: + update. + +2003-03-31 Martin Kretzschmar + + Merge with Xpdf 2.00 and make it build + + * gpdf/xpdf/Makefile.am: kill traces of ltk, incorporate new sources + + * gpdf/Makefile.am, configure.in: don't build the ltk subdir + + * gpdf/ANNOUNCE, CHANGES, ChangeLog, README, aconf-dj.h, aconf-win32.h, + dj_make.bat, ms_make.bat, vms_make.com: update + + * gpdf/xpdf/LTKOutputDev.cc, xpdf/LTKOutputDev.h, xpdf/postscript.xbm, + xpdf/xpdf-flip.ltk, xpdf/xpdf-ltk.h, xpdf/xpdf-top.ltk, + xpdf/xpdf.ltk: remove. + + * gpdf/xpdf/Annot.cc, xpdf/Annot.h, xpdf/Array.cc, xpdf/Array.h, + xpdf/BuiltinFont.cc, xpdf/BuiltinFont.h, + xpdf/BuiltinFontTables.cc, xpdf/CMap.cc, xpdf/CMap.h, + xpdf/Catalog.cc, xpdf/Catalog.h, xpdf/CharCodeToUnicode.cc, + xpdf/CharCodeToUnicode.h, xpdf/Decrypt.cc, xpdf/Decrypt.h, + xpdf/Dict.cc, xpdf/Dict.h, xpdf/Error.cc, xpdf/Error.h, + xpdf/FTFont.cc, xpdf/FTFont.h, xpdf/FontFile.cc, xpdf/FontFile.h, + xpdf/Function.cc, xpdf/Function.h, xpdf/Gfx.cc, xpdf/Gfx.h, + xpdf/GfxFont.cc, xpdf/GfxFont.h, xpdf/GfxState.cc, + xpdf/GfxState.h, xpdf/GlobalParams.cc, xpdf/GlobalParams.h, + xpdf/ImageOutputDev.cc, xpdf/ImageOutputDev.h, xpdf/Lexer.cc, + xpdf/Lexer.h, xpdf/Link.cc, xpdf/Link.h, xpdf/NameToCharCode.cc, + xpdf/NameToCharCode.h, xpdf/NameToUnicodeTable.h, xpdf/Object.cc, + xpdf/Object.h, xpdf/OutputDev.cc, xpdf/OutputDev.h, + xpdf/PBMOutputDev.cc, xpdf/PBMOutputDev.h, xpdf/PDFDoc.cc, + xpdf/PDFDoc.h, xpdf/PSOutputDev.cc, xpdf/PSOutputDev.h, + xpdf/PSTokenizer.cc, xpdf/PSTokenizer.h, xpdf/Page.cc, + xpdf/Page.h, xpdf/Parser.cc, xpdf/Parser.h, xpdf/SFont.cc, + xpdf/SFont.h, xpdf/Stream.cc, xpdf/Stream.h, xpdf/T1Font.cc, + xpdf/T1Font.h, xpdf/TTFont.cc, xpdf/TTFont.h, + xpdf/TextOutputDev.cc, xpdf/TextOutputDev.h, xpdf/UnicodeMap.cc, + xpdf/UnicodeMap.h, xpdf/XOutputDev.cc, xpdf/XOutputDev.h, + xpdf/XRef.cc, xpdf/XRef.h, xpdf/config.h, xpdf/pdffonts.cc, + xpdf/pdfimages.cc, xpdf/pdfinfo.cc, xpdf/pdftopbm.cc, + xpdf/pdftops.cc, xpdf/pdftotext.cc, xpdf/vms_make.com, + xpdf/xpdf.cc: update. + + * gpdf/goo/GHash.cc, goo/GHash.h, goo/GList.cc, goo/GList.h, + goo/GString.cc, goo/GString.h: mostly Mac OS X gcc fixage. + + * gpdf/doc/pdffonts.1, doc/pdffonts.cat, doc/pdffonts.hlp, + doc/pdfimages.1, doc/pdfimages.cat, doc/pdfimages.hlp, + doc/pdfinfo.1, doc/pdfinfo.cat, doc/pdfinfo.hlp, doc/pdftopbm.1, + doc/pdftopbm.cat, doc/pdftopbm.hlp, doc/pdftops.1, + doc/pdftops.cat, doc/pdftops.hlp, doc/pdftotext.1, + doc/pdftotext.cat, doc/pdftotext.hlp, doc/xpdf.1, doc/xpdf.cat, + doc/xpdf.hlp, doc/xpdfrc.5, doc/xpdfrc.cat, doc/xpdfrc.hlp: + update docs. + + * gpdf/ltk: remove this directory, Xpdf has switched to Lesstif. + + * gpdf/aconf2.h, xpdf/JBIG2Stream.cc, xpdf/JBIG2Stream.h, + xpdf/Outline.cc, xpdf/Outline.h, xpdf/PDFDocEncoding.cc, + xpdf/PDFDocEncoding.h, xpdf/XPDFApp.cc, xpdf/XPDFApp.h, + xpdf/XPDFCore.cc, xpdf/XPDFCore.h, xpdf/XPDFTree.cc, + xpdf/XPDFTree.h, xpdf/XPDFTreeP.h, xpdf/XPDFViewer.cc, + xpdf/XPDFViewer.h, xpdf/XPixmapOutputDev.cc, + xpdf/XPixmapOutputDev.h, xpdf/about-text.h, xpdf/backArrowDis.xbm, + xpdf/dblLeftArrowDis.xbm, xpdf/dblRightArrowDis.xbm, + xpdf/findDis.xbm, xpdf/forwardArrowDis.xbm, xpdf/leftArrowDis.xbm, + xpdf/print.xbm, xpdf/printDis.xbm, xpdf/rightArrowDis.xbm: new + files. + +2003-03-31 Martin Kretzschmar + + * gpdf/xpdf/zoomOut.xbm, xpdf/zoomIn.xbm, xpdf/makefile.w32, + xpdf/Makefile.in, goo/makefile.w32, makefile.w32: remove, they are + neither in Xpdf 1.01 nor necessary for GPdf + +2003-03-13 Christian Rose + + * ggv/configure.in: Added "ml" to ALL_LINGUAS. + +2003-03-11 Paul Duffy + + * gpdf/configure.in: Added Irish (ga) to ALL_LINGUAS + +2003-03-07 Irene Ryan + + * ggv/help/C/ggv.xml, ggv-C.omf: updated the help to reflect changes in + V1.99.98 of the application + * ggv/help/C/l10n.txt: added to the instructions for L10N teams translating + the help + * ggv/help/C/figures/ggv_window.png: updated screenshot of the application + for the help + +2003-03-04 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc: undo accidental commit (thanks for telling + me, Ross) + +2003-03-04 Jaka Mocnik + + * ggv/src/gsdefaults.c (gtk_gs_defaults_changed): fixed a typo: + int->float. + * ggv/src/gtkgs.c (set_up_page): use HAVE_LOCALE_H instead of + HAVE_SETLOCALE. + +2003-03-03 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc, xpdf/nautilus-pdf-property-page.cc: + extract common pdf properties code: + + * gpdf/xpdf/pdf-info-dict-util.cc, xpdf/pdf-info-dict-util.h: the + common code. + + * gpdf/xpdf/Makefile.am: compile pdf-info-dict-util.{cc,h}. + + * gpdf/xpdf/gpdf-control.cc (verb_FileProperties_cb): make the dialog + transient for the control's parent. + +2003-03-03 Martin Kretzschmar + + * gpdf/xpdf/nautilus-pdf-property-page.cc + (gpdf_nautilus_property_page_set_uri): plug leaks + +2003-03-02 Martin Kretzschmar + + * gpdf/xpdf/nautilus-pdf-property-page.cc, + xpdf/nautilus-pdf-property-page.h: new class, just what the name + says, uses GnomeVFSStream for loading PDFDocs. + + * gpdf/xpdf/GnomeVFSStream.cc, xpdf/GnomeVFSStream.h: BaseStream + implementation based on (synchronous) gnome-vfs calls. + + * gpdf/xpdf/BonoboStream.cc, xpdf/BonoboStream.h: coding style fixage, + include only what's needed. + + * gpdf/xpdf/Makefile.am (gnome_pdf_viewer_SOURCES): also compile + GnomeVFSStream.{cc,h}, nautilus-pdf-property-page.{cc,h} + + * gpdf/xpdf/GNOME_PDF.server.in.in: add stanza for the Property Page. + + * gpdf/xpdf/bonobo-application-x-pdf.cc: clean up a bit + (gpdf_factory): now we produce the Property Page, too. + + * gpdf/xpdf/gpdf-control.cc: include time.h for strftime, mktime. + +2003-03-01 Martin Kretzschmar + + I've run intltool-prepare to make the desktop file translatable + + * gpdf/gpdf.desktop.in: added + + * gpdf/gpdf.desktop: removed + + * gpdf/Makefile.am: make gpdf.desktop from gpdf.desktop.in + + * gpdf/.cvsignore: ignore gpdf.desktop + +2003-02-28 Kaushal Kumar + + * ggv/src/ggv-file-sel.c (ggv_file_sel_ok_clicked): Click on 'OK' should + not close File Open dialog if selection field is blank/null. + Fixes bug #107241. + +2003-02-27 Jaka Mocnik + + * ggv/bonobo/ggv-control.c: disable zoom items when auto fit mode is + selected. + +2003-02-26 Ross Burton + + * gpdf/gpdf.desktop: Fix so that it validates. + + * gpdf/Makefile.am: Install the .desktop file into the correct + folder. Also remove intltool-*, which are generated. + +2003-02-26 Martin Kretzschmar + + * gpdf/xpdf/pdf-properties-display.c + (gpdf_properties_display_setup_glade): get glade file from its + installed location. Martin, repeat after me: I Will Test The + Installed Program. + + * gpdf/xpdf/Makefile.am: Added the Glade file to the dist. (Originally + by Ross, thanks) + +2003-02-23 Martin Kretzschmar + + * gpdf/xpdf/pdf-properties-display.c, xpdf/pdf-properties-display.h, + xpdf/gpdf-properties-dialog.glade: + new widget: table with labels displaying properties of PDFs + + * gpdf/xpdf/gpdf-control.cc (has_unicode_marker) + (utf16_big_endian_to_utf8, info_dict_get_string) + (info_dict_get_date, gpdf_control_process_string_property) + (gpdf_control_process_date_property) + (gpdf_control_process_properties) + (gpdf_control_properties_dialog_response_cb) + (verb_FileProperties_cb): new: a PDF properties command + + * gpdf/xpdf/Makefile.am: build pdf-properties-display.[ch], install + glade file + + * gpdf/xpdf/.cvsignore: ignore gpdf-properties-dialog.gladep + + * gpdf/xpdf/gpdf-persist-stream.h, xpdf/gpdf-persist-stream.cc + (gpdf_persist_stream_get_length): new function + + * gpdf/xpdf/gpdf-control-ui.xml: add FileProperties command and menu + item inside a "File Items Placeholder" + + * gpdf/shell/gpdf-window-ui.xml: add "File Items Placeholder" + + * gpdf/configure.in: check for libglade-2.0 + + * gpdf/Makefile.am (EXTRA_DIST): don't dist gpdf.mime + + * gpdf/xpdf/PDFDoc.cc, xpdf/Function.cc, xpdf/FontFile.cc, + goo/parseargs.c: call atof only in the "C" locale + +2003-02-21 Roozbeh Pournader + + * ggv/configure.in: Added "fa" to ALL_LINGUAS. + +2003-02-21 Paisa Seeluangsawat + + * ggv/configure.in (ALL_LINGUAS): Added "th". + +2003-02-21 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_remove_control): remove control + from the control frame. + (ggv_window_load): resolve the loaded uri to a desired bonobo + object. this allows for easy integration of gpdf viewer in the + ggv shell. + (ggv_window_new): don't create control here. just reserve a place + for it. + +2003-02-20 Naba Kumar + + * ggv/configure.in, po/hi.po: Added new Hindi translation from + Gnome Hindi Team + and added hi to ALL_LINGUAS. + +2003-02-20 Martin Kretzschmar + + * gpdf/xpdf/GfxState.cc: Applied a patch to fix buffer overflow (CVE: + CAN-2002-1384, Redhat: RHSA-2003:037-09, Debian: DSA-222) + Reminder by Michael + +2003-02-20 Dmitry G. Mastrukov + + * gpdf/configure.in: Added Belarusian to ALL_LINGUAS. + +2003-02-18 Martin Kretzschmar + + * gpdf/configure.in: remove GNOME2_X_CHECKS check (currently unused, + will be removed from gnome-common) + +2003-02-16 Mohammad DAMT + + * ggv/po/id.po: Added Indonesian translation + * ggv/configure.in: Added "id" to ALL_LINGUAS + +2003-02-16 Martin Kretzschmar + + * gpdf/xpdf/page-control.c, xpdf/page-control.h: show label " of n + pages" next to the text entry + (gpdf_page_control_set_total_pages): new + + * gpdf/xpdf/gpdf-control.cc (gc_set_pdf_cb): notify page toolitem + about page-count + +2003-02-15 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.h, xpdf/gpdf-view.cc (gpdf_view_first_page) + (gpdf_view_last_page): new + (gpdf_view_goto_page): kill #if'ed out debug message + + * gpdf/xpdf/gpdf-control.cc (gc_setup_page_control, gc_setup_zoomable) + (gc_setup_view_widgets): move signal connect calls to places where + they belong + (gc_zoom_changed_report_to_zoomable) + (gc_page_changed_update_page_control): renamed from + gc_zoom_changed_cb resp. gc_page_changed_cb + (ui_component_set_sensitive, gc_enable_go_back_verbs) + (gc_enable_go_forward_verbs, gc_page_changed_enable_page_buttons) + (gc_set_ui_container): new, disable some page navigation commands + on first/last page + (gc_set_zoom_items_visibility): do nothing if we can't find a + ui-component (don't g_assert that it's !=NULL) + +2003-02-15 Martin Kretzschmar + + * gpdf/xpdf/gpdf-stock-icons.h, xpdf/gpdf-stock-icons.c: new. register + gpdf-zoom-fit-width stock icon with a GtkIconFactory + + * gpdf/xpdf/fitwidth.png: redone in 24x24pix instead of 26x26, based on + gtk's zoom-out stock icon and the original fitwidth.png + + * gpdf/xpdf/gpdf-control.cc (gc_set_ui_container): s/gc_set_ui_pixbufs/ + gc_ui_set_pixbufs/ + (gc_ui_set_pixbufs): rewrite to use stock icon machinery, let it + do the correct scaling + + * gpdf/xpdf/bonobo-application-x-pdf.cc (main): init our stock icons + + * gpdf/xpdf/Makefile.am (gnome_pdf_viewer_SOURCES): add + gpdf-stock-icons.[ch] + +2003-02-15 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (getFontFaceEmbedded): change (disabled) + font embedding code + + * gpdf/shell/gpdf.c (gw_setup_window): set window title + + * gpdf/xpdf/GNOME_PDF.server.in.in, shell/gpdf.c: s/Gnome/GNOME/ in + strings + + * gpdf/xpdf/page-control.c, xpdf/gpdf-view.cc, + xpdf/gpdf-persist-stream.cc: use our own marshallers + + * gpdf/configure.in, xpdf/Makefile.am, xpdf/gpdf-marshal.list: check + for and use glib-genmarshal + + * gpdf/xpdf/.cvsignore: ignore generated marshallers + + * gpdf/xpdf/Makefile.am: clean up server.in, server files + + * gpdf/Makefile.am, gpdf.mime: remove gpdf.mime, application/pdf is + provided by gnome-vfs.mime + +2003-02-15 Jaka Mocnik + + * ggv/configure.in, Makefile.am: applied a patch from Julio Merino + that uses gconf2 AM macros instead of home-brewed code. + +2003-02-11 Martin Kretzschmar + + * gpdf/xpdf/page-control.c (gpdf_page_control_realize): make page + number entry 5 chars wide + + * gpdf/xpdf/gpdf-control.cc (gc_setup_page_control): don't set width of + page-control here + + * gpdf/xpdf/gpdf-control-ui.xml, xpdf/gpdf-control.cc + (gc_set_ui_pixbufs): scale down Fit Width icon for the View menu + +2003-02-11 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (getFontFaceFallback): use the system + aliases for fallback + +2003-02-11 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gc_setup_page_control) + (gc_page_changed_cb): handle set_page of the page-control + + * gpdf/xpdf/gpdf-view.h: make gpdf_view_goto_page public + + * gpdf/xpdf/page-control.c (gpdf_page_control_return_pressed) + (gpdf_page_control_key_press_event, gpdf_page_control_class_init): + add a set_page signal, emit when is pressed. + + * gpdf/xpdf/page-control.h: fix indentation, add set_page signal. + +2003-02-10 Martin Kretzschmar + + * gpdf/xpdf/page-control.c, xpdf/page-control.h: page number entry + widget (for the toolbar) + + * gpdf/xpdf/gpdf-control.cc (gc_page_changed_cb) + (gc_ui_add_page_control, gc_setup_page_control): add a + page-control to the toolbar (currently displays page number only) + (gc_set_ui_pixbufs): extracted from gc_set_ui_container + (gc_setup_view_widgets): renamed from gc_setup_widgets + + * gpdf/xpdf/gpdf-view.cc, xpdf/gpdf-view.h: add a page_changed signal, + wrap g_signal_emit calls for improved readability + + * gpdf/xpdf/Makefile.am (gnome_pdf_viewer_SOURCES): add page-control.c, + page-control.h + + * gpdf/xpdf/gpdf-control-ui.xml: add placeholder for page-control + +2003-02-09 Christian Rose + + * gpdf/configure.in: Added "kn" to ALL_LINGUAS. + +2003-02-09 Christian Rose + + * ggv/configure.in: Added "kn" to ALL_LINGUAS. + +2003-02-04 Martin Kretzschmar + + * gpdf/xpdf/Makefile.am: fix a comment that prevented definition of + gnome_pdf_viewer_LDADD + Patch by Benjamin Dauvergne + +2003-02-04 Jaka Mocnik + + * ggv/configure.in: 1.99.98. tagged as GGV_1_99_98. + * ggv/bonobo/ggv-postscript-view.c, bonobo/ggv-control.c: flip + pages when using cursor keys to scroll. + +2003-01-29 Jaka Mocnik + + * ggv/src/ggv-file-sel.c: applied a patch from Satyajit Kanungo to make + the file selector modal. + +2003-01-24 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc, xpdf/Makefile.am: disable font embedding + hack introduced on 2002-12-09 to fix build with current, + extra-clean gnome-print + +2003-01-21 Christian Rose + + * ggv/configure.in: Added "mn" to ALL_LINGUAS. + +2003-01-20 Pablo Saratxaga + + * ggv/configure.in: Added Macedonian (mk) to ALL_LINGUAS + +2003-01-19 Jaka Mocnik + + * ggv/bonobo/ggv-control.c (ggv_control_construct): don't unref the + widget. ps_view needs to hold the reference! + * ggv/src/ps.c (pages_new): fixed a possible buffer overflow. + * ggv/src/gtkgs.c: applied a patch from Satyajit Kanungo that allows + viewing of non-conformant PDFs. + +Wed Jan 15 17:51:50 2003 Jonathan Blandford + + * ggv/bonobo/ggv-postscript-view.c (ps_view_get_tmp_file): return NULL + in error state instead of just returning. Fixes a warning. It + occurs to me that there is no code to handle this being NULL. + mkstemp almost never fails, so this is low priority. + +2003-01-07 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc: change list of fonts even more to work with + URW fonts on my system FIXME + (~GPOFontMap, startDoc, getFontFaceEmbedded): cache the fonts + extracted from the PDF and downloaded to the print context. + (~GPOutputDev): plug a leak + + * gpdf/xpdf/GPOutputDev.h: update class declarations + +2003-01-06 Pablo Gonzalo del Campo + + * gpdf/configure.in: Added Spanish (es) to ALL_LINGUAS. + +2003-01-05 Artis Trops + + * gpdf/configure.in: Added Latvian (lv) to ALL_LINGUAS. + +2003-01-03 Roozbeh Pournader + + * gpdf/configure.in: Added "fa" (Persian) to ALL_LINGUAS. + +2002-12-23 Jaka Mocnik + + * ggv/configure.in: bumped version to 1.99.97; tagged as GGV_1_99_97. + * ggv/bonobo/ggv-sidebar.c: fixed a typo causing a mis-cast. + * ggv/src/ggv-window.c: applied a patch from chris at gnome-de dot org + that fixes the copyright string. + +2002-12-20 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (GPOFontMap, ~GPOFontMap): add c'tor, d'tor + (initBase14Fonts, getFontFaceBase14, getFontFaceFallback) + (getFontFace): refactor getFontFace, default to URW fonts for Base + 14 fonts, keep these font faces in a hash + +2002-12-17 Rajkumar Sivasamy + + * ggv/ggv-prefs-ui.c: Set mnemonics to controls in preferences dialog. + Fixes bug #101434 + +2002-12-17 Miloslav Trmac + + * gpdf/configure.in (ALL_LINGUAS): Add Czech (cs) + +2002-12-13 Jaka Mocnik + + * ggv/applied patches that add startup notification and priority text + to icons. + +2002-12-09 Martin Kretzschmar + + * gpdf/fitwidth.png: copy from ggv. + + * gpdf/xpdf/Makefile.am, xpdf/gpdf-control-ui.xml, xpdf/gpdf-control.cc + (gc_set_ui_container): use it. + + * gpdf/stock-zoom-fit-tall.xpm, stock-zoom-fit-wide.xpm, + stock-zoom-fit.xpm, stock-zoom-in.xpm, stock-zoom-out.xpm: kill + Gnome 1 style pixmaps. + +2002-12-09 Martin Kretzschmar + + Using the ``nobody is using this code, just break it'' joker: This + adds some kind of support for embedded Type1 fonts. Doesn't + respect gnome-print's privacy. No caching of extracted fonts. + + * gpdf/xpdf/GPOutputDev.cc (GPOutputDev::startDoc, setPrintContext): + hand through to the font map + (getStreamContents): adapted from glib + (getFontFaceEmbedded): new, uses experimental + gpdf_gnome_print_add_font + (getFontFace): use getFontFaceEmbedded for fonts with embedded + font files + + * gpdf/xpdf/GPOutputDev.h: update declarations, + (GPOFontMap::startDoc, setPrintContext): implemented inline + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_set_pdf_doc): call startDoc + + * gpdf/xpdf/gpdf-gnome-font.h, xpdf/gpdf-gnome-font.c: new files; + hackish implementation of gnome_print_add_font + + * gpdf/xpdf/Makefile.am (gnome_pdf_viewer_SOURCES): add + gpdf-gnome-font.[hc] + +2002-11-29 Yanko Kaneti + + * ggv/src/ggv-window.c (ggv_window_load): add a missing prameter to the + g_locale_to_utf8 call from the previous patch. Fixes tinderbox. + +2002-11-28 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_load): applied a patch from Hidetoshi + Tajima to convert title to utf-8 before setting it. + +2002-11-27 Michael Meeks + + * gpdf/xpdf/gpdf-control.cc, + * gpdf/xpdf/gpdf-view.cc: add math.h includes. + +2002-11-27 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_set_page_size): respect bounding box if + requested. + * ggv/bonobo/ggv-control.c (ggv_control_create_ui): set fit width pixbuf + to popup ui component. use smaller pixbufs for menu and popup menu + than for toolbar. + * ggv/bonobo/ggv-postscript-view-ui.xml: removed pixtype="none". + +2002-11-24 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc: remove unused includes + (drawImageMask): implement + + * gpdf/xpdf/GPOutputDev.h (drawImageMask): uncomment declaration + + * gpdf/xpdf/gpdf-persist-stream.cc (load_pdf_from_stream): allow reuse + of a GPdfPersistStream: delete its old contents, go on as usual + +2002-11-22 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_goto_page): a fix for bug #85004. + * ggv/src/ggv-prefs-ui.c (ggv_prefs_dialog_new): renamed right-hans side + panel option. + * ggv/src/ggvutils.c: removed zoom factors larger than 6.0 and smaller + than 1.0/6.0. + +2002-11-21 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_render_page): kill page parameter, + get it from priv->requested_page, change return type from void to + gboolean for use as idle handler, always return FALSE + (priv): new field requested_page, rename page => current_page + (gpdf_view_goto_page): don't call ::render_page directly, + g_idle_add it instead + (gpdf_view_page_prev, gpdf_view_page_next): interprete prev and + next relative to requested_page + (gpdf_view_key_press_event): s/page/current_page/ + (gpdf_view_set_pdf_doc): don't ::render_page, ::goto_page instead + +2002-11-19 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view-ui-xml: removed "Override*" commands + and menu items. added "OrientationDocument" and "PaperSizeDoc" + commands and menu items. this allows for single-click setting of + orientation and size. + * ggv/bonobo/ggv-postscript-view.c: support the above changes. + optimized menu syncing. + * ggv/src/gtkgs.[ch]: constification of parameters. + * ggv/src/gtkgs.c, src/ps.c: better handling of page and document + orientations. + +2002-11-17 Martin Kretzschmar + + * gpdf/shell/gpdf.c: include aconf.h before gpdf-window.h to + enable translation of the shell + +2002-11-15 Martin Kretzschmar + + * gpdf/configure.in: require libgnomeprint(ui)-2.2 + +2002-11-15 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_create_ui): freeze + UI component _before_ merging UI. this enables us to put sidebar + on the right when opening a window. + * ggv/src/ggv-prefs-ui.c (ggv_prefs_dialog_new): fixed placement of + orientation choice menu. + +2002-11-13 Dmitry G. Mastrukov + + * ggv/configure.in: Added Belarusian to ALL_LINGUAS. + +2002-11-10 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gc_set_zoom_items_visibility) + (ui_component_set_hidden): hide zoom commands if we have a + zoomable frame + +2002-11-10 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gc_zoom_changed_cb): report gpdf_view's + changed zoom level to bonobo zoomable + (gc_setup_widgets): install zoom_changed handler + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_class_init): install zoom_changed + signal + (gpdf_view_zoom): emit zoom_changed signal + + * gpdf/xpdf/gpdf-view.h (GPdfViewClass): add zoom_changed signal slot + + * gpdf/configure.in: yacob Added am to ALL_LINGUAS without change log + entry + +2002-11-10 Jaka Mocnik + + * configure.in: moved version to 1.99.96. tagged as GGV_1_99_96. + +2002-11-09 Martin Kretzschmar + + * gpdf/xpdf/Makefile.am: don't build pdf_view.o, GOutputDev.o + +2002-11-09 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc: remove all references to old PdfView class + (preferred_zoom_levels, preferred_zoom_level_names): add more zoom + levels + (gc_zoom_level_from_index): kill + (gpdf_control_zoom_in, gpdf_control_zoom_out) + (gpdf_control_zoom_fit_width, gpdf_control_zoom_fit) + (gpdf_control_zoom_default, gc_zoomable_set_zoom_level_cb): + rewrite using GPdfView methods + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_zoom_in, gpdf_view_zoom_fit) + (gpdf_view_zoom_fit_width): implement + + * gpdf/xpdf/gpdf-view.h: add zoom function prototypes + + * gpdf/xpdf/bonobo-application-x-pdf.cc (main): + * gpdf/shell/gpdf.c (main): s/PACKAGE/GETTEXT_PACKAGE/ in *textdomain + functions + + * gpdf/xpdf/Makefile.am, goo/Makefile.am: fix distcheck + +2002-11-09 Martin Kretzschmar + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_key_press_event): xpdf page + numbering is not zero-based! + + * gpdf/xpdf/GfxState.cc (GfxDeviceCMYKColorSpace::getRGB): special case + cmyk k-only colors + + * gpdf/xpdf/GPOutputDev.h: declare drawImage + + * gpdf/xpdf/GPOutputDev.cc (getFontFace): forgot to rename one + font_name to gfont_name; cleanup whitespace in the source + (drawImage): implement. (Does not render output on + GnomePrintPreview older than 2002-06-14) + + * gpdf/shell/gpdf.c (gw_control_load_pdf): s|file://|file:| + +2002-11-09 Jaka Mocnik + + * ggv/src/ggv-ui.xml: moved Layout submenu from Edit to View menu. + fixes #97843. + * ggv/bonobo/ggv-postscript-view-ui.xml: fixed accelerators for + navigation. fixes #97842. + * ggv/src/gtkgs.c (gtk_gs_goto_page): applied patch from satyajit that + fixes occasional erroneous refreshes of non-structured docs. fixes + #97828. + * ggv/bonobo/ggv-sidebar.c (ggv_sidebar_construct): change coordinate + widget to GtkEntry instead of GtkLabel in order to prevent resizing + when text grows. make it horizontally as small as possible! fixes + #97711. + +2002-11-06 Jaka Mocnik + + * ggv/acconfig.h: remove. changes from 2002-11-04 have rendered it + unnecessary. + +2002-11-05 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (updateFont): extract GfxFont->GnomeFont + mapping into its own class: GPOFontMap + (getFontFace): I'm cheating. This first implementation makes only + some Basic-14-PostScript fonts look nice + + * gpdf/xpdf/GPOutputDev.h: add GPOFontMap class + (GPOutputDev): add GPOFontMap member + +2002-11-05 Jaka Mocnik + + * ggv/src/gtkgs.[ch], src/gsdefaults.[ch], src/ggv-prefs-ui.c, + bonobo/ggv-postscript-view.c, ggv.schemas: from now on, we no + longer make a DSC file from PDF and use it to navigate through PDF, + but instead we convert every PDF to PS and show it. benefits? + enables printing and saving of PDF files and solves some issues + with deducing orientation and page size from PDFs. cost? a bit + slower, especially for large PDFs. + +2002-11-04 Jaka Mocnik + + * ggv/acconfig.h: removed, so that newer autoconfs don't spit warnings + about deprecation at us. + * ggv/configure.in: added 3rd arg to AC_DEFINE*() in order to get nice + comments in config.h. + * ggv/bonobo/main.c (ggv_postscript_viewer_factory): removed signal + handlers as they caused ggv to hang when rapidly starting/stopping + interpreter. + * ggv/bonobo/ggv-control.c: sync auto-fit items with defaults on startup + and set their sensitivity according to the status of the loaded + document. + +2002-11-03 Martin Kretzschmar + + * gpdf/xpdf/GPOutputDev.cc (GPOutputDev): kill one-arg constructor, + more initializations in zero-arg constructor + (startPage, restoreState, updateFillColor) + (updateFillColorIfNecessary, updateStrokeColor) + (updateStrokeColorIfNecessary, stroke, fill, eoFill): remember if + the last color set was for stroking or for non-stroking + operations, set the color again IfNecessary + (updateLineDash, updateFillColor, updateStrokeColor, updateFont) + (doPath): this is C++, so move declarations of variables to their + first use and initialize them there + (updateFillColor, updateStrokeColor, updateFillOpacity) + (updateStrokeOpacity): hande opacity, always set color and opacity + together + (updateFont): store the GnomeFont we want to use later; font + handling still non-existant + (updateTextPos): store the text position + (updateTextShift): new, updates text position + (getFillColorRGBA): new, creates a RRGGBBAA gint from a GfxState + (drawString): rewritten to use Glyphlist machinery, quite okay + ( for western locales) now + + * gpdf/xpdf/GPOutputDev.h: update prototypes, new private members + + * gpdf/xpdf/gpdf-control.cc (gc_key_press_event_cb): kill, GPdfView + handles all its key events + (gc_setup_widgets): don't connect killed handler; gpdf_view, grab + focus! + + * gpdf/xpdf/gpdf-view.cc (gpdf_view_construct): factor out: + (gpdf_view_setup_page_background): and add: + (gpdf_view_setup_gesture_handler): guess what it does + (gesture_page_next_event_cb, gesture_page_prev_event_cb) + (gesture_page_first_event_cb, gesture_page_last_event_cb) + (gesture_zoom_in_event_cb, gesture_zoom_out_event_cb): add gesture + handling + (gpdf_view_dispose): destroy gesture handler + (gpdf_view_render_page): improve readability, split out: + (setup_upside_down_transform): + (gpdf_view_zoom, gpdf_view_zoom_in, gpdf_view_zoom_out): new + (gpdf_view_key_press_event): new + (gpdf_view_button_press_event, gpdf_view_button_release_event) + (gpdf_view_motion_notify_event): for dragging the page + (gpdf_view_class_init): install signal handlers + +2002-11-03 Jaka Mocnik + + * ggv/bonobo/ggv-control.c: handle selection of auto-fit mode. + (ggv_control_construct): unref the GtkGS we get from GgvPostScriptView. + * ggv/bonobo/ggv-control-ui.xml: added a menu for selection of auto-fit + mode. + * ggv/src/ggv-prefs-ui.[ch]: implemented a choice menu for setting the + default zoom mode for GtkGS widgets! + * ggv/src/ggvutils.[ch]: removed some obsolete func prototypes. + added ggv_auto_fit_modes. + * ggv/src/gsdefaults.[ch]: handle default zoom mode. + * ggv/src/gtkgs.[ch]: added GtkGSZoomMode enum and zoom_mode member to + GtkGS. implemented auto-fit functionality. + +2002-10-31 Martin Kretzschmar + + The work on a Gnome Print Output Device starts here. The last + version of the old pixmap based rendering code is tagged + BEFORE_GNOME_PRINT. + + * gpdf/xpdf/gpdf-control.cc (_GpdfControlPrivate): add field for + GPdfView + (gc_setup_widgets, gc_set_pdf_cb, verb_GoPageLast_cb) + (verb_GoPageFirst_cb, verb_GoPageNext_cb, verb_GoPagePrev_cb): use + GPdfView instead of PdfView + + * gpdf/xpdf/gpdf-view.cc, xpdf/gpdf-view.h: widget for for GPOutputDev + to draw on. Using GnomePrintPreview. + + * gpdf/xpdf/GPOutputDev.cc, xpdf/GPOutputDev.h: new Gnome Print Output + Device class, strokes and fills look (surprisingly) quite okay, + font and text handling is throw-away code + + * gpdf/xpdf/gpdf-util.h (BEGIN_C_DECLS, END_C_DECLS): remove macros, + use those from glib + (GPDF_BOILERPLATE, GPDF_CLASS_BOILERPLATE, GPDF_REGISTER_TYPE): + macros from bonobo-macros.h and gnome-macros.h compatible with + c++ type system rules + + * gpdf/xpdf/OutputDev.h: declare class Object + + * gpdf/xpdf/Gfx.h: include Object.h + + * gpdf/configure.in: check for libgnomeprint(ui)-2.0 + +2002-10-30 Jaka Mocnik + + * ggv/configure.in: added G*_DISABLE_DEPRECATED to GGV_CFLAGS. + * ggv/*/*.[ch]: elimination of deprecated code. + * ggv/ggv.schemas: added pageflip and scrollstep keys. + * ggv/src/gsdefaults.c: added scroll_step setting: tells what percentage + of viewable area size will be used for scrolling. + * ggv/src/ggv-prefs.[ch], src/ggv-prefs-ui.[ch]: implemented configuration + for scroll step. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_construct): + read gconf setting for "pageflip": if true, pages will be flipped + automatically when scrolled to the edge of document. + * ggv/bonobo/ggv-control.c (zoomable_set_zoom_level_cb): only modify the + adjustment value if it is different from the zoom level being set. + * ggv/src/gtkgs.c (gtk_gs_get_postscript): copy whole non-structured doc. + * ggv/bonobo/ggv-control-ui.xml: added missing tooltips. + +2002-10-29 Christian Neumair + + * ggv/src/ggv-prefs-ui.c: Make button sequence HIG compliant. + +2002-10-26 Jaka Mocnik + + * ggv/src/ggv-window.c (verb_FileClose): if the document being closed is + the last one, just tell the PostScriptView component to unload the + document and leave the window open. fixes #96792. + (control_property_changed_handler): only display status message if + status is non-empty. + * ggv/idl/Ggv.idl: added close() method. + * ggv/bonobo/ggv-postscript-view.c (impl_GNOME_GGV_PostScriptView_close): + implemented the close() method. + +2002-10-23 Martin Kretzschmar + + * gpdf/xpdf/gpdf-persist-stream.cc (PARENT_TYPE): that last s/// was + obviously scrambling too many words, make that + BONOBO_TYPE_PERSIST_STREAM + +2002-10-23 Jaka Mocnik + + * ggv/configure.in: unreverted. et.po is now really added. + +2002-10-22 jacob berkman + + * ggv/configure.in (ALL_LINGUAS): revert until et.po gets added + +2002-10-22 Jaka Mocnik + + * ggv/configure.in (ALL_LINGUAS): added "et". + * ggv/po/et.po: added Estonian translation. contributed by Ilmar Kerm. + +2002-10-21 Jaka Mocnik + + * ggv/bonobo/ggv-sidebar.c: fixed some typos. + +2002-10-20 Fatih Demir + + * ggv/configure.in: Added "ta" to the languages' list. + +2002-10-19 Jaka Mocnik + + * ggv/configure.in: "head -c 1" -> "head -1" for portability reasons. + * ggv/src/ggv-file-sel.c: #include . + * ggv/applied a patch by people at bugzilla-gnome at thewrittenword.com + to enable GGV to find the UI XML files when installed in a different + prefix than bonobo. + +2002-10-17 Jaka Mocnik + + * ggv/src/ggv-window.c (verb_FileOpen): remember path of file selector. + * ggv/bonobo/ggv-postscript-view.c (verb_FileSaveMarked): remember path + of file selector. + * ggv/src/ggv-file-sel.c (ggv_file_sel_set_uri): properly unescape uri. + +2002-10-16 Martin Kretzschmar + + * gpdf/xpdf/gpdf-persist-stream.cc: use gpdf-g-switch.h, + s/BONOBO_PERSIST_STREAM_TYPE/BONOBO_TYPE_STREAM_PERSIST/ + + * gpdf/xpdf/gpdf-control.cc (gpdf_control_zoom_fit_width) + (gpdf_control_zoom_fit): s/gtk_idle_add/g_idle_add/ + (gpdf_control_activate): use BONOBO_CALL_PARENT macro + (gc_setup_widgets): use g_signal_connect, not gtk_signal_connect + + * gpdf/xpdf/gpdf-control.h, gpdf-persist-stream.h: replace GTK_CHECK + macros with G_TYPE_CHECK, GtkType with GType + +2002-10-16 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_set_layer): set window layer. + (ggv_window_set_fullscreen): toggle between normal and fullscreen + mode. + * ggv/src/ggv-ui.xml: added full screen command and menu items. + * ggv/bonobo/ggv-control.c (_set_zoom_items_sensitivity): simplified code. + * ggv/src/ggvutils.c: added 3/4 and 3/2 zoom levels. + * ggv/bonobo/ggv-control.c (listener_ZoomLevel_cb): simplified code. + * ggv/bonobo/ggv-control-ui.xml: added 3/4 and 3/2 zoom levels. + +2002-10-15 Martin Kretzschmar + + * gpdf/shell/gpdf.c (gw_open, gw_close): rename to gpdf_window_open, + gpdf_window_close and make them public + (handle_cmdline_args): s/gtk_idle_add/g_idle_add/ + (gw_control_load_pdf): fix leaks for error cases + (gpdf_window_open): simplify + (gw_ask_for_filename): use g_signal_connect, not gtk_signal_connect + + * gpdf/shell/gpdf-window.h: replace GTK_CHECK macros with G_TYPE_CHECK, + s/bonobo.h/libbonoboui.h/, declare gpdf_window_open, gpdf_window_close + +2002-10-13 Martin Kretzschmar + + * gpdf/shell/Makefile.am (-DGNOMELOCALEDIR): define as everybody does + + * gpdf/shell/gpdf-window.h: godf_window_get_type returns GType + + * gpdf/shell/gpdf.c: use GNOME_CLASS_BOILERPLATE, no need for + gpdf-util.h, GPDF_EMBEDDABLE_IID + (gpdf_window_class_init, gpdf_window_instance_init): rename from + class_init, init + (verb_HelpAbout_cb): gnome_about_new doesn't return a GnomeDialog, + modify to allow only one about dialog + (raise_and_focus): for verb_HelpAbout_cb, from EogWindow + (gw_close): bonobo_main_quit is correct here + (gw_open): release and unref control after adding it to the + control frame. Refcounting seems to work! The server autoexits :-) + + * gpdf/xpdf/gpdf-control-ui.xml: add accelerator to View menu + +2002-10-12 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control-ui.xml: hide ZoomFitWidth toolbar button + + * gpdf/xpdf/gpdf-control.cc (struct _GPdfControlPrivate): don't store a + GPdfPersistStream + (gc_setup_persist): ditto + (gpdf_control_destroy): don't unref GPdfPersistStream, we + add_interface'd it + (gc_setup_zoomable): setup a BonoboZoomable, add_interface + (gc_zoomable_set_zoom_level_cb, gc_zoomable_set_frame_cb): + Callbacks for the zoomable + (gpdf_control_construct): use gc_setup_zoomable + + * gpdf/xpdf/GNOME_PDF.server.in.in: add Zoomable repo id + + * gpdf/configure.in: don't create intl/Makefile + +2002-10-12 Martin Kretzschmar + + * gpdf/xpdf/.cvsignore: add GNOME_PDF.server, GNOME_PDF.server.in + + * gpdf/xpdf/pdf-view.cc: don't #include bonobo_application_x_pdf.h, + update for new GObject, GSignal, Bonobo signatures + (setup_pixmap): don't use double buffering + + * gpdf/xpdf/gtkgesture.h: s/BEGIN_GNOME_DECLS/G_BEGIN_DECLS/ + + * gpdf/xpdf/gpdf-persist-stream.h, xpdf/gpdf-control.h, pdf-view.h + (#includes): update, use gpdf-g-switch.h, + s/BEGIN_GNOME_DECLS/G_BEGIN_DECLS/ + + * gpdf/xpdf/gpdf-persist-stream.cc (#includes): update + (load_pdf_from_stream): Bonobo_Unknown_ref our stream + (delete_pdf_doc_full): unref our stream + (all around) update for new GObject, GSignal, Bonobo signatures + (gpdf_persist_stream_new, gpdf_persist_stream_construct): take iid + parameter to be passed on to bonobo_persist_stream_construct + + * gpdf/xpdf/gpdf-embeddable-view.cc: don't include + bonobo-application-x-pdf.h + + * gpdf/xpdf/gpdf-control.cc: PARENT_TYPE is BONOBO_TYPE_CONTROL; + update for new GObject, GtkWidget, Bonobo signatures + + * gpdf/xpdf/gpdf-control-ui.xml: use gtk-stock-pixmaps + + * gpdf/xpdf/bonobo-application-x-pdf.cc (#includes): use + gpdf-g-switch.h, update + (gpdf_factory): don't create embeddable, gpdf_persist_stream_new + takes iid parameter + (init_gpdf_factory, init_corba, init_bonobo): kill + (main): no need to init gdk_rgb; use BONOBO_FACTORY_INIT, + bonobo_generic_factory_main + + * gpdf/xpdf/Makefile.am (INCLUDES, LDADD): update + (bin_PROGRAMS): move gnome-pdf-viewer to libexec_PROGRAMS + (gnome_pdf_viewer_SOURCES): nobody needs + bonobo-application-x-pdf.h, don't build embeddable stuff + (oafdir, oaf_DATA): kill + (server_in_files, serverdir): add, do libexec sed job on + .server.in.in file, add @INTLTOOL_SERVER_RULE@ + (uidir): s/gnome/gnome-2.0/ + + * gpdf/xpdf/GOutputDev.cc (#includes): use gpdf-g-switch.h + (GOutputDev::GOutputDev): get size and depth of pixmap with + gdk_drawable_get_foo background color to white + (all around): gdk_region_foo now destructively update their first + argument, use gdk_rgb to find colors + (drawImageMask): don't gdk_image_new_bitmap + + * gpdf/xpdf/gpdf-g-switch.h: new file, include it when switching + between goo and glib headers + + * gpdf/xpdf/GNOME_PDF.server.in.in: factory is in @LIBEXECDIR@ + s|GNOME/GenericFactory|Bonobo/GenericFactory|, make it + translatable, kill embeddable stanza + + * gpdf/xpdf/GNOME_PDF.oafinfo: remove + + * gpdf/xpdf/BonoboStream.cc: + s/Bonobo_Stream_SEEK_SET/Bonobo_Stream_SeekSet/ et al. (see + libbonobo/ChangeLog#2002-03-31) + + * gpdf/shell/gpdf.c (#includes): use G2 headers + (main): copy from eog + (struct _Component): kill (was embeddable code) + (USE_CONTROL): kill #define, kill all code surrounded by #if + !USE_CONTROL (i.e. embeddable code) + (all around): add Corba_Environment argument where it's needed now + (gw_control_load_pdf): s/BonoboStream \*stream/Bonobo_Stream + stream/. get the stream using monikers, unref it later + (gw_drag_data_received): use uri handling code from gnome-vfs + (verb_HelpAbout_cb): update for new gnome_about_new + (verb_DebugDumpXml_cb): kill + (gw_destroy): may be called more than once, so update assertions + (gw_finalize): is a GObject method now, chain up to parent + (class_init): update for GObject methods + (gw_setup_window): blend of bonobo_window_construct and old + gw_setup_geometry + (gw_setup_geometry): kill + (gw_setup_toplevel_ui): use BonoboUIContainer from BonoboWindow + (gpdf_window_construct): use gw_setup_window, not + bonobo_window_construct, not gw_setup_geometry + + * gpdf/shell/gpdf-window.h: s/BEGIN_GNOME_DECLS/G_BEGIN_DECLS/, kill + struct _Component decl (was used for embeddable) + + * gpdf/shell/gpdf-window-ui.xml: kill DebugDumpXml verb + + * gpdf/shell/Makefile.am: update INCLUDES, LD_ADD; + (gpdf_SOURCES): add missing gpdf-window.h + (uidir): s/gnome/gnome-2.0/ + + * gpdf/configure.in: clean it a bit; set version to 0.100 (version was + at 0.90.1 for ever and I don't want to call it 1.01.1, this is not + 1.something quality code); use GNOME2 macros; + (i18n): update according to G2 porting guide + (gnome-lib-checks): use PKG_CHECK + + * gpdf/autogen.sh: PKG_NAME="gpdf:", USE_GNOME2_MACROS + + * gpdf/.cvsignore: add intltool-... files + + Initial port to GNOME 2 + +2002-10-08 Peteris Krisjanis + + * ggv/configure.in: added Latvian (lv) to ALL_LINGUAS. + +2002-10-08 Martin Kretzschmar + + * gpdf/xpdf/pdf-view.cc: access private fields through priv field, + don't use view_data_t + (pv_realize): calls render_page if we already have a pdf_doc; + install as realize default handler + (redraw_on_realize_cb): kill + (pdf_view_set_pdf_doc): if we're not realized yet, just don't + render page + + * gpdf/xpdf/pdf-view.h: kill view_data_t typedef, move PdfView's fields + to PdfViewPrivate + + * gpdf/configure.in: check for gdk-pixbuf + + * gpdf/xpdf/GOutputDev.cc (drawImage): replace bogus GdkImage code with + GdkPixbuf code. I don't have any PDFs here which use + drawImageMask, so drawImageMask I haven't rewritten drawImageMask. + +2002-10-07 Martin Kretzschmar + + * gpdf/xpdf/pdf-view.cc (first_page, last_page, next_page, prev_page): + inline into pdf_view_page_first and friends + (render_page): static again + +2002-10-07 Martin Kretzschmar + + * gpdf/xpdf/xpdfsrc.txt, xpdf/xpdfobj.txt: kill + + * gpdf/xpdf/gpdf-embeddable-view.cc (gev_set_pdf_cb) + (gpdf_embeddable_view_construct): see gc_set_pdf_cb entry below + + * gpdf/xpdf/gpdf-control.cc (GPdfControlPrivate: store persist_stream + (gpdf_control_destroy): write, install + (gc_setup_persist, gc_set_pdf_cb): pdf_view_set_pdf_doc on set_pdf + signal from persist_stream (used to be done in PdfView) + (gc_setup_widgets): pdf_view_new takes no parameter + + * gpdf/xpdf/pdf-view.h: s/extern "C" {// around headers + update declarations + + * gpdf/xpdf/pdf-view.cc (PdfViewPrivate): store only a PDFDoc, not a + GPdfPersistStream + (view_is_good): replace with IS_PDF_VIEW_WITH_DOC macro, use that + (last_page, next_page): get pdf_doc from priv + (setup_size): ditto, add parameter assertion + (render_page, pdf_view_get_page_width): get pdf_doc from priv + (pdf_view_set_zoom): only render_page if pdf_poc != NULL + (set_pdf_cb): inline into: + (pdf_view_set_pdf_doc): new method, eventually we can switch the + pdf to be displayed + (pv_destroy, pdf_view_construct, pdf_view_new): don't store a + GPdfPersistStream + + * gpdf/xpdf/gtkgesture.h: include gtk.h, protect with BEGIN_GNOME_DECLS + + * gpdf/xpdf/gpdf-persist-stream.h: move GPdfPersistStreamPrivate to + gpdf-persist-stream.cc + (gpdf_persist_stream_get_pdf_doc): declare + + * gpdf/xpdf/gpdf-persist-stream.cc (gpdf_persist_stream_get_pdf_doc): + new accessor method + + * gpdf/MAINTAINERS: mail your questions to me + +2002-10-05 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control.cc (gc_key_press_event_cb): add _cb suffix + (gc_zoom_level_from_index, gc_set_policy_idle_cb): add gc_ prefix + (gpdf_control_zoom_in, gpdf_control_zoom_out) + (gpdf_control_zoom_fit_width, gpdf_control_zoom_fit): extract from + verb implementations + (gc_zoom_in_cb, gc_zoom_out_cb, gc_zoom_to_fit_cb) + (gc_zoom_to_fit_width_cb, gc_zoom_to_default_cb): callbacks for + PdfView zoom signals + + * gpdf/xpdf/pdf-view.h (PdfViewClass): add signal slots + (PdfView): kill unused mainbox field + + * gpdf/xpdf/pdf-view.cc: kill old zooming code, when we want to zoom, + we just emit signals. Our container can connect to these and make + the right calls (i.e. pdf_view_set_zoom). + (pv_key_press_event): emit zoom signals instead of setting our + zoom level directly + (class_init): install signals + (zoom_to_fit): kill + (pdf_view_construct): connect each gesture to its own callback + (gesture_page_event_cb, gesture_zoom_event_cb, view_zoom_verb) + (view_switch_page): kill old gesture callbacks and helpers + (gesture_page_next_event_cb, gesture_page_prev_event_cb) + (gesture_page_first_event_cb, gesture_page_last_event_cb) + (gesture_zoom_in_event_cb, gesture_zoom_out_event_cb): new gesture + callbacks + + * gpdf/xpdf/bonobo-application-x-pdf-ui.xml: kill zooming verbs from + embeddable view ui + + * xpdf/gpdf-embeddable-view.cc (view_zoom_verb) + (page_zoom_fit_width_cb, page_zoom_fit_height_cb) + (page_enlarge_cb, page_shrink_cb, view_zoom_query): kill zooming + machinery in embeddable view + + * gpdf/xpdf/pdf-view.cc (view_zoom_query): kill unused method + +2002-10-05 Martin Kretzschmar + + * gpdf/xpdf/gpdf-control-ui.xml: rename ZoomFitHeight back (2001-08-12) + to ZoomFit, label it Best Fit as seen in HIG; it was never really + ZoomFitHeight + + * gpdf/xpdf/gpdf-control.cc (zoom_level_from_index, verb_ZoomIn_cb) + (verb_ZoomOut_cb, set_policy_idle_cb, verb_ZoomFitWidth_cb) + (verb_ZoomFit_cb): reimplement zooming (no BonoboZoomable yet; + zoom-on-key-press still uses old code), rename ZoomFitHeight back + to ZoomFit + (gpdf_control_class_init): kill local variables + + * gpdf/xpdf/pdf-view.h: add prototypes + + * gpdf/xpdf/pdf-view.cc (configure_size): kill this empty function + (setup_pixmap): don't call configure_size + (pdf_view_get_zoom, pdf_view_set_zoom, MIN_ZOOM_FACTOR) + (MAX_ZOOM_FACTOR): add nice, short zooming methods + (pdf_view_get_page_width, pdf_view_get_page_height): add + + * gpdf/shell/gpdf.c (gw_control_load_pdf, gw_open, verb_HelpAbout_cb) + (gpdf_window_construct): make it compile again. The wonders of + emacs dabbrev-expand and me only recompiling half of the + directories. + + * gpdf/AUTHORS: update Xpdf copyright notice + + * gpdf/.cvsignore: ignore more automake generated files + +2002-10-04 Martin Kretzschmar + + * gpdf/xpdf/pdf-view.cc (setup_pixmap): get our GdkWindow directly from + our parent window, not from the win field + (mainbox_realize): kill, (it only assigns to the win field) + (pdf_view_construct): don't connect to "realize" to killed + mainbox_realize + (real_redraw_view): don't call realize_mainbox (which would assign + to win, render_page, configure_size which is empty), + redraw_view_all does already render page + (realize_mainbox): kill, its only caller doesn't use it anymore + (real_redraw_view): rename to redraw_on_realize_cb to reflect its + only use + (redraw_view): rename to set_pdf_cb for same reason, clean if + else, call redraw_view_all instead of real_redraw_view + (key_press_event_cb): rename to pv_key_press_event, make it the + default handler for our key_press_event, use pdf_view_page bla, + not view_switch_page + (button_press_event_cb): rename to pv_button_press_event, make it + the default handler, check if we already have focus + (class_init): install pv_key_press_event, pv_button_press_event + (pdf_view_construct): don't connect key_press_event_cb, + button_press_event_cb + (redraw_view_all): fuse with render_page, use that in all places + + * gpdf/xpdf/pdf-view.h: kill win field + + * gpdf/xpdf/gpdf-embeddable-view.cc: s/redraw_view_all/render_page/g + + I don't know how to write a GtkWidget, but the code for the + PdfView widget had a lot of artificial complexity, in my eyes. + Is this from the time before it used GtkPixmap (1999-09-01)? + +2002-10-04 Martin Kretzschmar + + * gpdf/shell/Makefile.am (EXTRA_DIST): distribute gpdf-window-ui.xml + + * gpdf/shell/gpdf-window-ui.xml: new file, based on xpdf/gpdf-ui.xml + + * gpdf/shell/gpdf.c (GPDF_IS_NON_NULL_WINDOW): add macro + (GW_RETURN_UNLESS_GW, GW_RETURN_VAL_UNLESS_GW): kill macros, use + GPDF_IS_NON_NULL_WINDOW with g_return_bla instead, this looks + more G'ish to me + + * gpdf/xpdf/.cvsignore: ignore gnome-pdf-viewer binary + + * gpdf/xpdf/Makefile.am (XML_FILES): don't distribute gpdf-ui.xml + (EXTRA_DIST): no ChangeLog here + + * gpdf/xpdf/gpdf-ui.xml: remove + + * gpdf/xpdf/gpdf-control-ui.xml: new file, based on + bonobo-application-x-pdf-ui.xml, half-hearted attempts to be + HIG-compliant + + * gpdf/xpdf/gpdf-control.cc (GPDF_IS_NON_NULL_CONTROL): add, use it + (gc_key_press_event): keyhandling mostly copied from embeddable + (verb_GoPagePrev_cb, verb_GoPageNext_cb, verb_GoPageFirst_cb) + (verb_GoPageLast_cb, gc_verbs []): add page verbs + (gc_set_ui_container, gc_unset_ui_container) + (gpdf_control_activate): install UI merging + (gc_set_zoom_items_visibility): only a dummy + (gpdf_control_construct): decompose into: + (gc_setup_persist, gc_setup_widgets): construct helpers + + * gpdf/xpdf/gpdf-embeddable-view.cc: use pdf_view_page_bla + + * gpdf/xpdf/gpdf-embeddable.h (bed_t): kill already unused typedef + + * gpdf/xpdf/pdf-view.h (pdf_view_page_prev, pdf_view_page_next) + (pdf_view_page_first, pdf_view_page_last): export + + * gpdf/xpdf/pdf-view.cc (first_page, last_page, next_page, prev_page): + static again + (pdf_view_page_prev, pdf_view_page_next, pdf_view_page_first) + (pdf_view_page_last): methods to be called by the control (and the + embeddable view) to do what their names say + (IS_NON_NULL_PDF_VIEW): like IS_PDF_VIEW with obvious extra check + +2002-10-04 Jaka Mocnik + + * ggv/configure.in: removed duplicate AC_OUTPUT entries. + * ggv/src/ggvutils.c (ggv_quote_filename): use g_shell_quote(). + +2002-10-02 Martin Kretzschmar + + * gpdf/xpdf/Makefile.am: factory file name is gnome-pdf-viewer, + s/GNOME_XPDF.oafinfo/GNOME_PDF.oafinfo/ + + * gpdf/xpdf/GNOME_PDF.oafinfo: s/XPDF/PDF/g, the factory file name + is now gnome-pdf-viewer, add oaf_server entry for the control + + * gpdf/xpdf/bonobo-application-x-pdf.cc (gpdf_factory): multi factory + function, replaces embeddable_factory, creates controls, too + + * gpdf/xpdf/gpdf-control.cc, xpdf/gpdf-control.h: new files, first code + for PDF viewer bonobo control. + + * gpdf/shell/gpdf.c: handle priv field in GPdfWindow, add code for using + a control instead of an embeddable (use it when USE_CONTROL != 0) + + * gpdf/shell/gpdf-window.h (GPdfWindow): add priv field, kill app field + (struct _Component) is private, moved back to gpdf.c + + * gpdf/configure.in: PACKAGE and VERSION are set by AM_INIT_AUTOMAKE, + kill explicit assignments + + * gpdf/xpdf/GNOME_XPDF.oafinfo: remove + +2002-10-01 Martin Kretzschmar + + * gpdf/xpdf/gpdf-embeddable-view.cc (gpdf_embeddable_view_construct): + pdf_view_new takes persist_stream, not embeddable + + * gpdf/xpdf/pdf-view.cc: add priv struct, use it to get persist_stream, + not bed field + (pdf_view_new): take persist_stream, not embeddable + (pdf_view_construct): ditto, store it in priv + (init): g_new0 priv + (class_init): we need finalize: + (pv_finalize): for priv + (pv_destroy): unref priv->persist_stream + + * gpdf/xpdf/pdf-view.h: use BEGIN_GNOME_DECLS, we have a priv field now, + kill bed field, new and construct take a GPdfPersistStream now, not + GPdfEmbeddable (of course, this is still ugly) + + Various source files: remove \n from g_message calls, + update Michael's email address, s/Helix Code/Ximian/ + +2002-10-01 Jaka Mocnik + + * ggv/src/main.c (save_session): fixed possible buffer overflow. + +2002-09-30 Martin Kretzschmar + + * gpdf/xpdf/gpdf-embeddable.h (GPdfEmbeddable): kill already commented + out fields + (GPdfEmbeddableClass): kill pdf_changed signal slot + +2002-09-30 Martin Kretzschmar + + * gpdf/xpdf/pdf-view.cc: get PDFDoc from GPdfPersistStream, not + directly from our embeddable (various places). + + * gpdf/xpdf/Makefile.am: fix gui variable, add gpdf-persist-stream + files + + * gpdf/xpdf/bonobo-application-x-pdf.cc: include GlobalParams.h, + (embeddable_factory): create a GPdfPersistStream first, then + create an embeddable. + + * gpdf/xpdf/gpdf-embeddable.cc (bed_free_data): move to + gpdf-persist-stream.cc as delete_pdf_doc_full + (load_pdf_from_stream): move to gpdf-persist-stream.cc + (finalize): free priv field + (class_init): kill pdf_changed signal, GPdfPersistStream has + set_pdf signal, use finalize + (gpdf_embeddable_add_interfaces): kill + (gpdf_embeddable_construct): take GPdfPersistStream param, + use bonobo_object_add_interface not gpdf_embeddable_add_intf + (gpdf_embeddable_new): take GPdfPersistStream param + + * gpdf/xpdf/gpdf-embeddable.h: remove extern "C" around bonobo + includes, they protect themselves. Introduce private struct, + still public. Use GPdfPersistStream + + * gpdf/xpdf/gpdf-persist-stream.cc, xpdf/gpdf-persist-stream.h: + files for new GPdfPersistStream class. Contains PDF loading code + + * gpdf/xpdf/BonoboStream.h: hide GList before including gnome headers + +2002-09-29 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (load_ps_from_file): properly unescape + local uri. + * ggv/src/ggvutils.c (ggv_filename_to_uri): use + gnome_vfs_get_uri_from_local_path(). + +2002-09-26 Jaka Mocnik + + * ggv/src/ps.c: fixed unsafe sscanf usage. reported in iDEFENSE Security + Advisory 09.26.2002: Exploitable Buffer Overflow in gv + +2002-09-25 Martin Kretzschmar + + * gpdf/configure.in: don't use macro dir, don't call AC_ARG_PROGRAM + ( AM_INIT_AUTOMAKE does this), inline autoheader templates from + acconfig.h, use AC_HELP_STRING where appropriate. + + * gpdf/acconfig.h: Remove. + + * gpdf/autogen.sh: switch from macro dir to gnome-common. + +2002-09-24 Martin Kretzschmar + + * gpdf/shell/gpdf-window.h: kill the Container typedef, everybody uses + GPdfWindow now. + (Component): rename container field to gpdf_window + + * gpdf/shell/gpdf.c (gw_has_contents): ``readability function'', use it + instead of testing gpdf_window->view_widget + (gw_drag_data_received): inline code from container_new, clean it + (gw_open_dialog): ditto + (main): moe gpdf_popt_options, poptContext globals here, make + command line handling an idle handler -- again, shamelessly stolen + from eog: + (handle_cmdline_args, create_window): command line handlers + (container_new): not needed anymore, kill + +2002-09-24 Martin Kretzschmar + + * gpdf/shell/gpdf.c: s/containers/window_list/g and move definition + down to GPdfWindowClass + (GW_RETURN_NULL_UNLESS_GW): kill this macro, use + GW_RETURN_VAL_UNLESS_GW + (gw_close_all): write while loop with less ink + +2002-09-23 Martin Kretzschmar + + * gpdf/xpdf/bonobo-application-x-pdf-ui.xml: kill HelpAbout verb, + only the shell implements it. + +2002-09-23 Martin Kretzschmar + + * gpdf/shell/gpdf.c (gw_setup_dnd): use TARGET_URI_LIST enum constant + in GtkTargetEntry drag_types[] + (component_destroy): rename to gw_component_destroy, move down to + its only caller gw_destroy, add != NULL assertion + (gw_destroy): call it with new name + (container_set_view): rename to gw_add_component_view_to_ui, add + parameter asserts, use bonobo_client_site_new_view_full, don't + call bonobo_wrapper_set_visibility, bonobo_view_frame_set_covered + (container_launch_component): s/container/gw/, add gpdf_window + parameter, get BonoboItemContainer from it, kill goad_id + parameter, always use GPDF_EMBEDDABLE_IID (new #define) + (container_activate_component): s/container/gw/, kill goad_id + param, check gpdf_window param, use gw_launch_component + (open_pdf): rename to gw_open, factor out PersistStream loading + into gw_component_load_pdf + (container_destroy): kill, + (container_new): use gw_close instead + + Kill some prototype declarations. + +2002-09-19 Jaka Mocnik + + * ggv/src/ggv-prefs-ui.c (ggv_prefs_dialog_new): set spacing between + buttons. + +2002-09-18 Martin Kretzschmar + + * gpdf/ChangeLog: merge in xpdf/ChangeLog and shell/ChangeLog using + the excellent MergeLog.awk and Emacs ediff tools. + + * gpdf/shell/ChangeLog: remove + + * gpdf/xpdf/ChangeLog: remove + +2002-09-17 Martin Kretzschmar + + * gpdf/xpdf/gpdf-embeddable.cc (load_pdf_from_stream): don't try to + check for catalog after having discovered that !pdf->isOk and + having already deleted it. I introduced my first goto to this + code. Edsger Dijkstra in memoriam + +2002-09-17 Martin Kretzschmar + + * gpdf/shell/gpdf.c (container_exit_cmd): => (verb_FileExit_cb) + (gw_close_all): close all windows, causing the program to exit + (verb_FileExit_cb): use gw_close_all + (container_open_cmd): => (verb_FileOpen_cb) which calls the new + (gw_open_dialog): extract file selection code into + (gw_ask_for_filename): + (file_dialog_delete_event): move down to gw_ask_for_filename + (set_ok): ditto, rename to file_dialog_ok + +2002-09-17 Martin Kretzschmar + + * gpdf/shell/gpdf.c (container_close_cmd): turn into + (verb_FileCloseWindow_cb) with BonoboUIVerbFn prototype + (container_dump_cmd): ditto (verb_DebugDumpXml_cb) + (container_about_cmd): ditto (verb_HelpAbout_cv), Michael says I + maintain gpdf now, added Ravi Pratap, Xpdf copyright holder is + Glyph & Cog, LLC, Derek B. Noonburg's pdf consulting business + (verbs []) rename: gw_verbs, make static, move to where it is + needed: right before gw_setup_toplevel_ui, use new verb callback + names + +2002-09-17 Martin Kretzschmar + + * gpdf/shell/gpdf.c (filenames_dropped): turn into + (gw_drag_data_received) use for for (ed.'s note: not a typo) + iterating the list, not while, free list after use + (class_init): install gw_drag_data_received as default handler for + drag_data_received + (gw_setup_dnd): don't connect filenames_dropped to + drag_data_received + (gw_delete_event): renamed from (gw_delete) for consistency with + signal name + +2002-09-15 Martin Kretzschmar + + * gpdf/xpdf/Makefile.am: don't build gpdf here + + * gpdf/xpdf/gpdf.cc: move to shell/gpdf.c + +2002-09-15 Martin Kretzschmar + + * gpdf/shell/gpdf.c (gw_destroy): destructor (code from container_destroy) + (gw_delete): delete_event default handler + (gw_close): other half of container_destroy + (gpdf_window_construct): no need to gtk_object_set_data + "container_data", don't connect to delete_event + (class_init): init parent_class, install destroy and delete_event + default handler + (container_close): kill, just use gw_close + (container_close_cmd): call gw_close + +2002-09-15 Martin Kretzschmar + + * gpdf/shell/gpdf.c: include gpdf-window.h, pull out struct defns, + implement GPdfWindow class here for now (let's see if it's more + convenient) + (gpdf_window_new, gpdf_window_construct): new (with helper + functions) + (container_new): mostly moved to gpdf_window_construct, use that + (container_destroy): don't explicitly destroy and free the + toplevel widget + + * gpdf/shell/gpdf-window.h: new file, new class GPdfWindow (was + Container struct) + + * gpdf/shell/gpdf.c: M-x mark-whole-buffer, M-x indent-region + +2002-09-15 Martin Kretzschmar + + * gpdf/shell/Makefile.am: create, bin_PROGRAMS = gpdf and friends + + * gpdf/shell/gpdf.c: cvs copy of xpdf/gpdf.cc, Code was plain C except + some extern "C" declarations :-), removed them and it compiled, + don't include xpdf/config.h, bonobo-application-x-pdf.h + (container_about_cmd): s/xpdfVersion/VERSION/ so we really don't + need xpdf/config.h (FIXME: unify aconf.h and config.h?) + + New directory. Start ChangeLog + +2002-09-15 Martin Kretzschmar + + * gpdf/configure.in, Makefile.am: add subdirectory + + * gpdf/shell: new directory + +2002-09-14 Martin Kretzschmar + + * gpdf/xpdf/gpdf-embeddable-view.cc (destroy_view): kill already commented + out, previously unused destructor + (gev_destroy): set mainbox member = NULL + + * gpdf/xpdf/pdf-view.cc (pv_destroy): new destructor + (class_init): use it, init parent_class + (pdf_view_construct): reindent + +2002-09-14 Martin Kretzschmar + + * gpdf/xpdf/gpdf-embeddable-view.h (GPdfEmbeddableView): kill bed member + + * gpdf/xpdf/gpdf-embeddable-view.cc: removed newlines from g_message calls + (class_init): use checked casts, we now have destroy, no need to + keep a ref to our embeddable here + (gev_destroy): new destructor + +2002-09-14 Martin Kretzschmar + + * gpdf/xpdf/gpdf-embeddable-view.cc (gpdf_embeddable_view_new): + s/printf/g_message/ + (view_create_menus, view_remove_menus): rename to + (gev_set_ui_container, gev_unset_ui_container): and rewrite in EOG + style + +2002-09-13 Martin Kretzschmar + + * gpdf/xpdf/gpdf-embeddable-view.cc (gev_activate): chain up to parent's + activate handler, not to grand parent's + +2002-09-13 Martin Kretzschmar + + * gpdf/xpdf/bonobo-application-x-pdf.cc (embeddable_factory): don't + initialize embeddable (where did that come from?) + + * gpdf/xpdf/gpdf-embeddable-view.cc (gpdf_embeddable_view_construct): don't + handle "activate" by connecting... + (class_init): ...install a default signal handler... + (gev_activate): cleaned up "activate" handler, renamed from + (view_activate) + +2002-09-13 Martin Kretzschmar + + * gpdf/xpdf/Makefile.am: add pdf-view.cc, pdf-view.h + + * gpdf/xpdf/gpdf-embeddable-view.cc (view_is_good, first_page, last_page) + (next_page, prev_page, configure_size, setup_size, setup_pixmap) + (render_page, realize_mainbox, redraw_view_all, real_redraw_view) + (redraw_view): kill + (first_page, last_page, next_page, prev_page, redraw_view_all): + only declare here, use definitions from pdf-view.cc + (page_first_cb, page_next_cb, page_prev_cb, page_last_cb): + s/view_data_t/PdfView/ etc. + (view_switch_page): kill + (zoom_to_fit): leave only declaration + (view_zoom_verb, page_zoom_fit_width_cb, page_zoom_fit_height_cb) + (page_enlarge_cb, page_shrink_cb, view_zoom_query): s/// + (verbs[]): make static + (view_create_menus, view_remove_menus, view_activate): s/// + (button_press_event_cb, gesture_page_event_cb) + (gesture_zoom_event_cb): kill + (key_press_event_cb): s///, only handle scrolling here + (mainbox_realize): kill + (destroy_view): comment out for now + (init): empty + (gpdf_embeddable_view_construct): mainbox = pdf_view_new, + remove mainbox construction code + + * gpdf/xpdf/pdf-view.cc (view_is_good): s/view_data_t/PdfView/ + (first_page, last_page, next_page, prev_page): non-static + (setup_pixmap): view_data is our mainbox now + (render_page): s/view_data_t/PdfView/ s/view_data/view/ + (redraw_view_all): ditto + (realize_mainbox): /GPdfEmbeddableView/PdfView/ etc. + (real_redraw_view): ditto + (redraw_view): ditto, view is our mainbox now + (page_first_cb, page_next_cb, page_prev_cb, page_last_cb): kill + here (verb implementations) + (view_switch_page): s/// as above + (zoom_to_fit): non-static, commented out for now + (view_zoom_verb, view_zoom_query): s/// as above + (page_zoom_fit_width_cb, page_zoom_fit_height_cb) + (page_enlarge_cb, page_shrink_cb): kill here (verb impl) + (verbs[], view_create_menus, view_remove_menus, view_activate): + kill here (bonobo stuff) + (gesture_page_event_cb, gesture_zoom_event_cb): s/// + (key_press_event_cb): don't handle scrolling here, s/// + (destroy_view): kill here + (pdf_view_construct): kill everything except mainbox construction + + * gpdf/xpdf/gpdf-embeddable-view.h: view_data_t is no longer a typedef'd + GPdfEmbeddableView. Remove PdfView related members from + GPdfEmbeddableView + + * gpdf/xpdf/pdf-view.h: s/GPdfEmbeddableView/PdfView/ with some AI ;) + GPdfEmbeddableView still typedef'd view_data_t. Super class + is GtkEventBox + + Split bonobo / non-bonobo parts of GPdfEmbeddableView: + + * gpdf/xpdf/pdf-view.h: new file (cvs copy of gpdf-embeddable.h) + + * gpdf/xpdf/pdf-view.c: ditto. These will contain non-bonobo parts + +2002-09-13 Jaka Mocnik + + * ggv/bonobo/main.c: per-display registration of factory. + * ggv/src/main.c (create_window): graciously handle cases when no + windows could be opened because of errors. + * ggv/src/ggv-prefs-ui.c (ggv_prefs_dialog_new): added colons as + suggested by Muktha. + added ESC as an accelerator for the Cancel button. + * ggv/bonobo/ggv-sidebar.c (ggv_sidebar_construct): add tool tips to + "toggle marked" and "clear all" buttons. + * ggv/ggv.desktop.in (Exec): added %U so that URIs are passed to + launcher (patch by Arvind Samptur). + +2002-09-08 Martin Kretzschmar + + * gpdf/xpdf/GOutputDev.h: add missing gdk include + + * gpdf/xpdf/GOutputDev.cc (GOutputDev::drawLink): don't #if 0, just don't + use it + (GOutputDev::drawImage, GOutputDev::drawImageMask): use Michael's + broken image handling code from gpdf 0.90.1 instead of my even + more broken code + + * gpdf/xpdf/gpdf-embeddable-view.cc (render_page): disable links here. + (realize_mainbox): view == view_data now. Don't have to + gtk_object_get_data anymore + (real_redraw_view): ditto + (redraw_view): ditto, make it static again + (gpdf_embeddable_view_construct): connect redraw_view to + pdf_changed signal, don't gtk_object_set_data "view_data" + (view_switch_page, view_zoom_verb, view_activate) + (button_press_event_cb, gesture_page_event_cb) + (gesture_zoom_event_cb, key_press_event_cb, mainbox_realize): make + them static again + + * gpdf/xpdf/gpdf-embeddable.cc (class_init): add "pdf_changed" signal + (load_pdf_from_stream): emit it, don't redraw_view explicitly + + * gpdf/xpdf/gpdf-embeddable.h: add signal to class struct + +2002-09-01 Martin Kretzschmar + + * gpdf/xpdf/gpdf-embeddable.cc (gpdf_embeddable_view_factory): move here + from bonobo-application-x-pdf.cc + + * gpdf/xpdf/GOutputDev.cc (GOutputDev::drawLink): comment out for + now. Segfaults. I don't understand this. + + * gpdf/xpdf/bonobo-application-x-pdf.cc: move view_data_t related code + ( except view_factory) to gpdf-embeddable-view.cc, remove lots of + includes + + * gpdf/xpdf/gpdf-embeddable-view.h: new files with new GPdfEmbeddableView + class + + * gpdf/xpdf/gpdf-embeddable-view.cc: + + * gpdf/xpdf/gtkgesture.h: double include protection + + * gpdf/xpdf/XOutputDev.h: add missing include "Object.h" + + * gpdf/xpdf/GOutputDev.h: add missing include "Object.h" + +2002-08-31 Martin Kretzschmar + + * gpdf/xpdf/gpdf-embeddable.cc: + + * gpdf/xpdf/gpdf-embeddable.h: bed_t: Replace Data Value with Object + [Fowler] i.e. turn it into the GPdf::Embeddable class. + + * gpdf/xpdf/bonobo-application-x-pdf.cc: temporarily make some functions + non-static + (view_is_good): move up in file, use it in more places. + (setup_pixmap): remove window parameter, get it from view_data + (destroy_embed): move to GPdfEmbeddable::destroy + (embeddable_factory): drastically simplify, work is done in + GPdfEmbeddable::new and friends + remove count of running_objects. + + * gpdf/xpdf/gpdf-util.h: new file + (E_MAKE_TYPE): copied from gal + +2002-08-29 Martin Kretzschmar + + * gpdf/xpdf/bonobo-application-x-pdf.cc: move struct bed_t to + gpdf-embeddable.{cc,h} + (setup_pixmap) remove doc parameter. (Get it from view_data param) + + * gpdf/xpdf/gpdf-embeddable.cc: New files to contain the embeddable class + + * gpdf/xpdf/gpdf-embeddable.h: + + * gpdf/xpdf/gpdf.cc (main): remove call to setlocale (done in + gnome_init...), ignore return value of oaf_init, let bonobo_init + figure out which orb to use. + + * gpdf/xpdf/Link.h: declare some methods as const. + * gpdf/xpdf/Link.cc: + +2002-08-22 Jaka Mocnik + + * ggv/src/ggv-prefs-ui.c (ggv_prefs_dialog_new): string change - + "Jump to beginning of page etc." -> "Jump to beginning of page". + * ggv/bonobo/ggv-control.c (ggv_control_new): removed auto-jump as it + was moved to ggv-postscript-view.c. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_goto_page): + respect auto-jump setting everytime we switch pages. + +2002-08-21 Jaka Mocnik + + * ggv/src/gtkgs.c: set step_increment to make stepper buttons work. + * ggv/bonobo/ggv-postscript-view.c (sidebar_key_press_event): handle + presses of Left/Right/Up/Down to pan. + * ggv/src/gtkchecklist.c (key_press_event): handle key presses in our + own fashion - PgUp/Dn do the same as in ps view - move one page + at a time. + +2002-08-20 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (load_ps_from_file): don't make a + temporary copy if it is a local file. + * ggv/src/gtkgs.c (gtk_gs_size_allocate): removed gdk_window_move() calls + before changing adjustments as this will do the move anyway. also + removed explicit event processing, as this caused trouble with + zoom spin button and the infamous "erratic scrolling" bug. + * ggv/bonobo/ggv-postscript-view.c (set_file_items_sensitivity): make + Save & Print items insensitive when viewing a pdf file. + * ggv/src/ggv-window.c (ggv_window_load): unescape URI for display. + +2002-08-12 Martin Kretzschmar + + * gpdf/xpdf/GOutputDev.cc: make it compile (without Type 3 support for now) + + * gpdf/xpdf/bonobo-application-x-pdf.cc: Derek has removed the global xref + variable. Remove the ``Ugly global xref fix'' + +2002-08-11 Ross Burton + + * ggv/ggv.desktop.in: Add encoding keyword, and fix up Terminal and + Categories keywords. + +2002-08-09 Martin Kretzschmar + + * gpdf/xpdf/BonoboStream.h: ditto. + + * gpdf/xpdf/BonoboStream.cc: sync with FileStream. + + Merge in Xpdf 1.01 files + + * gpdf/xpdf/GOutputDev.cc (drawImage), (drawImageMask): use gdk_image_get + as XGetSubImage + +2002-08-09 Martin Kretzschmar + + * gpdf/goo/Makefile.am: ditto. + + * gpdf/configure.in: merged in Xpdf 1.01 changes. + +2002-08-05 Martin Kretzschmar + + * gpdf/xpdf/GOutputDev.h: ditto. + + * gpdf/xpdf/GOutputDev.cc: sync with XOutputDev.cc. + + * gpdf/xpdf/bonobo-application-x-pdf.cc (printCommands): is in Gfx.cc now + +2002-08-04 Satyajit Kanungo + + * ggv/src/gtkgs.c : Added gdk_pointer_ungrab while showing the error + message. Fixes #90639 . + +2002-08-04 Martin Kretzschmar + + * gpdf/xpdf/BonoboStream.cc: merge in decryption code from FileStream 0.92 + (close): new method, from FileStream, + (~bonoboStream): use close + + * gpdf/xpdf/BonoboStream.h: #define bonoboStreamBufSize as in FileStream + 0.92, + (bonoboStream): use it. + +2002-08-04 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view-ui.xml: "Move to" -> "Go to". + +2002-08-01 Jaka Mocnik + + * ggv/src/ggv-file-sel.[ch]: a file selection dialog for GGV. nothing + special for now except that it returns URIs and has a convenience + function to run a selector in modal mode and return the selected file. + * ggv/bonobo/ggv-postscript-view.c (verb_FileSaveMarked): use our file + selector instead of deprecated bonobo one. + * ggv/src/ggv-window.c (verb_FileOpen): likewise. + +2002-07-29 Jaka Mocnik + + * ggv/configure.in: the last of the single-digit micro version releases: + 1.99.9. tagged as GGV_1_99_9. released a tarball. + * ggv/bonobo/ggv-postscript-view.c (verb_FileSaveMarked): use VFS enabled + file selector. + * ggv/src/ggv-window.c (sync_toolbar_style): respect both_horiz toolbar + style when using GNOME defaults for toolbar style. + (verb_FileOpen): use VFS enabled file selector. + * ggv/src/main.c (create_windows_from_cmdline): escape file names to be + URI-like. + * ggv/src/ggvutils.c (ggv_filename_to_uri): new function. escape file name + to conform to URI specification. + +2002-07-28 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (impl_GNOME_GGV_PostScriptView_reload): + update page list & status. + * ggv/bonobo/ggv-postscript-view.c (verb_FileSaveMarked): uses bonobo + file_selector. + (ps_view_save_doc): save doc to URI using gnome vfs. + removed all file selection related stuff. + * ggv/ggv.schemas: fixed some typos. + removed file selection size keys. + * ggv/src/ggv-prefs.[ch]: removed file selector width/height. + * ggv/bonobo/ggv-postscript-view.c (load_ps_from_file): uses gnome VFS + for accessing the files. + * ggv/src/ggv-window.c (verb_FileOpen): uses bonobo file selector. + removed all file selection related stuff. + +2002-07-27 Jaka Mocnik + + * ggv/bonobo/ggv-control.c (ggv_control_create_ui): set pixbuf to fit + width command. + * ggv/configure.in: commented out check for Xinerama. + * ggv/bonobo/Makefile.am: commented out use of Xinerama libs. + * ggv/src/gtkgs.c (compute_?dpi): reverted the broken Xinerama patch. + * ggv/bonobo/ggv-control-ui.xml: added pixmap for fit width command. + added a fit width button to toolbar. + * ggv/src/stock/fitwidth.png: image for the fit width button, which was + kindly provided by johannes at sipsolutions dot de. + +2002-07-23 Jaka Mocnik + + * ggv/src/main.c (main): handle stdin if '-' is passed as the cmdline + argument. + +2002-07-22 Jaka Mocnik + + * ggv/src/main.c (create_window): parse geometry if given. + (main): added geometry option. + +2002-07-20 Jaka Mocnik + + * ggv/src/ggv-ui.xml: added Edit/Layout menu instead of the + toplevel Settings menu. + * ggv/bonobo/ggv-control-ui.xml: added accelerators for zoom items. + * ggv/bonobo/ggv-control.c (ggv_control_key_press_event): move to top + of page _after_ switching page. + * ggv/src/gtkgs.c (gtk_gs_scroll_to_edge): fixed a nasty typo. + +2002-07-17 Michael Meeks + + * ggv/bonobo/GNOME_GGV.server.in.in: rename to this, + point at libexecdir. + + * ggv/bonobo/Makefile.am: install component in $(libexecdir) + +2002-07-07 Jaka Mocnik + + * ggv/src/ggv-ui.xml: changed order of help menus. + * ggv/bonobo/ggv-sidebar.c (page_list_selection_changed): scroll to cell + selected. + +2002-07-07 Jaka Mocnik + + * ggv/configure.in: include Xlib.h when checking for Xinerama header. + +2002-07-04 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view-ui.xml: changed navigation accelerators + to use Control instead of Alt. + * ggv/released 1.99.8 tarball, tagged as GGV_1_99_8. + +2002-07-02 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (notify_page_count_change): recreate + page list. + * ggv/src/gtkgs.c: fixed a number of segfaults when a non-realized widget + is loaded. + +2002-07-02 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_create_ui): moved + object_set() out of freeze/thaw pair. it seems to fix the vicious bug + #86235. thank to satyajit for this one... + +2002-06-30 Jaka Mocnik + + * ggv/src/ggv-window.c (sync_settings_popup_items): fix a bug that caused + GGV not to freeze ui component twice instead of freeze/thaw. popup + menu crashes the control due to accel group trouble, though... + +2002-06-27 Jaka Mocnik + + * ggv/bonobo/ggv-control.c (ggv_control_destroy): fixed zoom_control + ref counting. + +2002-06-20 jacob berkman + + * ggv/src/ggv-window.c (verb_HelpAbout): fix tyop + +2002-06-20 Abel Cheung + + * ggv/src/ggv-window.c (verb_HelpAbout): Added translator credits and + documentor placeholders. + +2002-06-19 Jaka Mocnik + + * ggv/wrap sequences of bonobo_ui_component_set_prop() in a freeze/thaw + pair. + * ggv/src/ps.c (readline): skip blanks & 0x0c chars in front of DSC + comments - chema came accross a PS file created from dvi that + contains 0x0c char in front of a DSC comment. it seems appropriate + that we handle such cases. + +2002-06-16 Jaka Mocnik + + * ggv/src/main.c: fixed some typos. + +2002-06-14 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (load_ps): notify of a possible status + change. + * ggv/src/ggv-window.c (control_property_changed_handler): get error + message from the "status" property of the control. + * ggv/bonobo/ggv-postscript-view.c + (ggv_postscript_view_get_default_orientation): fixed a memory leak. + * ggv/src/gtkgs.[ch]: add a status field and update it. + improved scroll region outlining. + +2002-06-12 Jaka Mocnik + + * ggv/tagged as GGV_1_99_7. released a tarball. + * ggv/bonobo/ggv-sidebar.c (ggv_sidebar_page_changed): fixed a bug that + caused not to select the first page. + * ggv/removed a few warnings. + * ggv/src/gtkgs.c (gtk_gs_munge_adjustments): set adjustments' page + increment. + +2002-06-12 Jaka Mocnik + + * ggv/src/ggv-window.c (prefs_changed): apply visibility setting + changes immediately. + * ggv/src/ggv-prefs-ui.c (ggv_prefs_dialog_new): removed "by default" + from strings. This behaviour is now less confusing. + * ggv/*/*.c: dewarningization. it should now compile cleanly with -Wall. + +2002-06-11 Jaka Mocnik + + * ggv/src/ps.c: use the same orientation enums as GtkGS. + * ggv/src/gtkgs.c: take care of per-page orientations. + * ggv/src/main.c: handle the SIGINT and SIGTERM. + +2002-06-08 Jaka Mocnik + + * ggv/src/ggv-ui.xml: fixed a typo. + * ggv/idl/Ggv.idl: added reload() method to GgvPostScriptView interface. + * ggv/gtkgs.[ch] (gtk_gs_reload): a new function. + * ggv/bonobo/ggv-postscript-view.c (document_changed-cb): use above. + (impl_GNOME_GGV_PostScriptView_reload): implement the above method. + * ggv/src/ggv-window.c (verb_FileReload): invoke reload() method of + GgvPostScriptView interface. + * ggv/src/ggv-window.c (gnome_toolbar_prefs_changed): respect GNOME + toolbar style. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_prefs_changed): + handle setting changes here and not in gtkgs.c. + (ggv_postscript_view_construct): set above to be called when + GtkGS related settings change. + (ggv_postscript_view_destroy): remove the above notification. + * ggv/ggv-prefs-ui.c (ggv_prefs_dialog_apply): don't set OK button + to insensitive. + * ggv/src/ggv-prefs.c (ggv_prefs_changed): fixed a typo. + * ggv/src/Makefile.am, bonobo/Makefile.am: fix the locale dir. + +2002-06-08 Hasbullah Bin Pit + + * ggv/configure.in: Added Malay (ms)to ALL_LINGUAS. + * ggv/po/ms.po: Added Malay Translation. + +2002-06-05 Yanko Kaneti + + * ggv/configure.in: (ALL_LINGUAS) Added Bulgarian (bg). + +2002-06-05 Federico Mena Quintero + + GGV still compiles with a lot of warnings if you do -Wall, but + these seem to fix the most egregious control bugs. + + * ggv/src/gtkgs.c (gtk_gs_set_page_size): Do not index on pageid if + pageid is less than zero. + + * ggv/bonobo/ggv-postscript-view.c (set_file_items_sensitivity): See + if the UI component is bound to a container before trying to set + properties on it. + (_set_page_items_sensitivity): Likewise. + + * ggv/bonobo/ggv-control.c (sync_zoom_level_items): Likewise. + (_set_zoom_items_sensitivity): Likewise. + (ggv_control_construct): Save the GConfClient notify ID. + (ggv_control_destroy): Remove the GConfClient notification so the + control doesn't get notified after it is destroyed. + +2002-06-01 Jaka Mocnik + + * ggv/src/gtkgs.c: added proper scrolling interface. + * ggv/bonobo/*: fixed ref counting issues. + * ggv/the above should fix most crashes, warnings, assertions, etc. + +2002-05-31 Pablo Saratxaga + + * gpdf/configure.in: Added Vietnamese (vi) and Walloon (wa) to All_LINGUAS. + +2002-05-30 Jaka Mocnik + + * ggv/bonobo/ggv-sidebar.[ch]: fixed a stupid typo. this fixes the lost + reference bug! + +2002-05-29 Federico Mena Quintero + + * ggv/bonobo/ggv-postscript-view.c + (ggv_postscript_view_add_interfaces): Pass the OAFIID to + bonobo_persist_stream_new() as well. + +2002-05-27 Kjartan Maraas + + * ggv/src/ggv-pref-ui.c: Mark some strings for translation. + +2002-05-26 Jaka Mocnik + + * ggv/src/ggv-prefs.[ch], src/ggv-prefs-ui.[ch]: enable use of GNOME-wise + defaults or custom settings for toolbar style. + * ggv/src/ggv-window.c (sync_toolbar_style): comply to the above. + * ggv/bonobo/ggv-postscript-view.c (save_file_sel_ok_clicked): always hide + the file selection. + * ggv/src/gtkgs.c (gtk_gs_get_postscript): fixed a crash when an EPS file + was printed/saved. + +2002-05-22 Jaka Mocnik + + * ggv/src/main.c: applied a patch from jacob berkman that fixes session + management bugs. + +2002-05-18 Jaka Mocnik + + * ggv/src/main.c (main): perform bonobo_debug_shutdown() before + exiting. + + * ggv/bonobo/main.c (ggv_postscript_viewer_factory): add a handler for + TERM signal that performs a bonobo_debug_shutdown() in order to + track reference count. + +2002-05-14 Pablo Saratxaga + + * ggv/configure.in: Added Vietnamese (vi) to ALL_LINGUAS + +2002-05-13 Kjartan Maraas + + * ggv/src/ggv-ui.xml: Add mnemonics and correct Help menu. + +2002-05-13 Jaka Mocnik + + * ggv/ggv.desktop.in: changed name to GGV PostScript Viewer. fixes #81366. + * ggv/bonobo/ggv-postscript-view-ui.xml: + * ggv/bonobo/ggv-control-ui.xml: + * ggv/src/ggv-ui.xml: + some changes to be more HIG compliant (although not fully, as + I personally don't like some suggestions). fixes #81230. + * ggv/src/main.c (main): added --windows parameter specifying how many + empty windows should be created (needed to restore the number of + windows from old session in order not to confuse the window + manager). + (main): connect "save_yourself" and "die" signals to SM client. + (save_session): save session state (documents & empty windows). + command line is used for this - no persistent data is stored. + (client_die): nicely kill all windows. + * ggv/src/ggv-window.c (verb_FileOpen): connect delete event of file + selection to appropriate callback. fixes #81540. + * ggv/fixed a few bugs with setting of sensitivity of menu items. + +2002-05-12 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_construct): + fixed a stupid bug that caused us not to unref properly. + (ggv_postscript_view_destroy): fixed a reference counting bug. + +2002-05-11 Jaka Mocnik + + * ggv/applied a patch from Satyajit Kanungo + fixing bug #81215 - now it compiles with latest GDK libs + * ggv/src/gtkgs.c gdk_send_xevent changed to it's new signature. + * ggv/configure.in: version 1.99.5. tag GGV_1_99_5. + * ggv/release a new tarball. + +2002-05-11 Jacob Berkman + + * ggv/src/gtkgs.c (gtk_gs_next_page): fix previous commit to not break + with gtk 2.0. work also with gtk 2.1 by not using *private* gdk + calls; just use XSendEvent + * ggv/configure.in: include X libs in our link line + +2002-05-07 Jaka Mocnik + + * ggv/src/ggv-window.c (verb_FileReload): switch back to previously + displayed page after reloading. + * ggv/bonobo/ggv-postscript-view.c (document_changed_cb): redisplay + the page that was displayed before reloading. + +2002-05-06 Murray Cumming + + * ggv/src/ggv-window.c: Replaced use of bonobo_window_construct() with + construct-time properties and bonobo_window_get_ui_container(), + now that BonoboWindow has been corrected. + +2002-05-06 Jaka Mocnik + + * ggv/src/configure.in: version 1.99.4. tag GGV_1_99_4. + +2002-05-05 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (verb_FileSaveMarked): set the current + path in the file selection. + * ggv/src/ggv-window.c (verb_FileReload): a handler for FileReload verb. + (verb_FileOpen): set the current path in the file selection. + * ggv/src/ggv-ui.xml: add a verb for reloading files. + * ggv/src/gtkgs.c (gtk_gs_class_init): add a document_changed signal. + how did this get removed? + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_construct): add + handler for document_changed signal to reload file. + +2002-05-05 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (notify_page_change): notify sidebar + of page change. + +2002-05-04 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_get_ps): fixed + a segfault because PrintAll verb passes NULL to indicate that all + pages should be returned. + +2002-04-25 Jaka Mocnik + + * ggv/bonobo/ggv-control.c (ggv_control_create_ui): added a zoom control + showing current zoom factor. + * ggv/*.xml: added placeholders and a zoom control to sidebar. + * ggv/src/main.c (main): applied patch from Satyajit Kanungo to add help + items. + * ggv/implemented a setting for left/right placement of the side panel. + currently only works in Nautilus. + +2002-04-23 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_set_page_size): properly handle boundingbox + size. fixes bug #79097. + +2002-04-19 jaka mocnik + + * ggv/applied a build fixage patch from kind people at mandrakesoft. + +2002-04-18 jacob berkman + + * ggv/acconfig.h: fix tyop busting build + +2002-04-17 Satyajit Kanungo + + * ggv/configure.in added AM_GCONF_SOURCE_2 to put the schemas file + gconf.xml.defaults. + Check for 'gs' package and get the path for 'gs' on a system where + gs is not in the path. + +2002-04-16 Abel Cheung + + * ggv/TRANSLATABLE_FILES: moved to po/ directory. + * ggv/ABOUT-NLS, INSTALL, TRANSLATABLE_FILES, install-sh, + missing, mkinstalldirs, stamp-h.in, po/Makefile.in.in: + Remove autogen'ed file. + * ggv/acconfig.h: Added GETTEXT_PACKAGE + * ggv/configure.in: GETTEXT_PACKAGE related cleanup, and removed + AC_ARG_PROGRAM (does automake 1.5/1.6 require it?) + * ggv/src/main.c: Use GETTEXT_PACKAGE for *textdomain*(). + +2002-04-11 jacob berkman + + * ggv/configure.in (AC_OUTPUT): add src/cursors/Makefile + +2002-04-11 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (save_file_sel_ok_clicked): ask before + overwriting file. + (view_button_press_cb): use hand cursor when moving page. + (ggv_postscript_view_get_ps): really retrieve all pages if none + are marked. + (set_file_items_sensitivity): moved here from ggv-window.c. + * ggv/bonobo/ggv-sidebar.c (ggv_sidebar_construct): set AUTOMATIC policy + for page list scrollbars. + * ggv/bonobo/ggv-control.c (ggv_control_construct): set AUTOMATIC policy + for scrolled window scrollbars. + * ggv/src/cursors.[ch]: copied hand cursors from eog. + * ggv/src/cursors/*: hand cursors + +2002-04-05 Jaka Mocnik + + * ggv/major revamp of sidebar, which is now a control, created by + GgvPostScriptView andmerged in the container's UI. this enables us + to view it in nautilus as well as in the GGV shell! according to + this the save/print items have been moved to GgvPostScripView as well. + * ggv/configure.in: barf in GS isn't installed. version 1.99.3. tarball + release. tagged as GGV_1_99_3. + +2002-03-30 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c: take care of popup items sensitivity. + * ggv/bonobo/ggv-control-ui.xml: add zoom to fit width menu items. + * ggv/configure.in: bumped version to 1.99.2. + * ggv/message-of-doom: made it less threatening ;) + * ggv/tagged as GGV_1_99_2. released a new tarball. + +2002-03-29 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_init): initialize scroll_start_? to -1. + * ggv/src/ggv-ui.xml: add show/hide items to button 3 popup menu. + * ggv/src/ggv-control-ui.xml: add navigation & zoom items to button 3 + popup menu. + * ggv/src/ggv-window.c: get the popup UI component and merge our popup + menu items into it. + * ggv/bonobo/ggv-control.c: create popup menu. show it on button 3 press. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_verbs): made global as control + needs them as well to set to popup UI component. + +2002-03-28 jacob berkman + + * ggv/bonobo/ggv-control.c: add a dummy field to this empty struct + + * ggv/bonobo/ggv-postscript-view.c: add a dummy field to this empty + struct + +2002-03-26 Jaka Mocnik + + * ggv/src/ggv-prefs.c (ggv_prefs_dialog_class_init): fix a delete_event + handler being set to a wrong class. + * ggv/src/ggv-window.c (sync_toolbar_style): sync toolbar style with + ggv_toolbar_labels setting. + (ggv_window_drag_data_received): a handler for received dnd data. + (ggv_window_new): set window as a drag destination. + (verb_DnD*): verbs for DnD popup menu. + +2002-03-24 Jaka Mocnik + + * ggv/src/ggv-msg-window.[ch]: a window for display of ghostscript + output, based on the obsolete gsmessage.[ch]. + * ggv/src/gsmessage.[ch]: removed. + * ggv/bonobo/ggv-postscript-view.c (interpreter_message_cb): display + output using ggv-msg-window API. + +2002-03-23 Jaka Mocnik + + * ggv/configure.in: always use x11alpha as the antialiased device. + * ggv/released 1.99.1 tarball, tagged as GGV_1_99_1. + +2002-03-23 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view-ui.xml: added static paper size menu + items. + * ggv/bonobo/ggv-control-ui.xml: added static zoom level menu items. + * ggv/bonobo/ggv-postscript-view.c (sync_size_items): made it work with + static paper menu items. + * ggv/bonobo/ggv-control.c (listener_ZoomLevel_cb): listener for zoom + level menu items. + (sync_zoom_level_items): sync zoom level items state with current + zoom setting. + +2002-03-18 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_load): qualify the file to load with + its full path as the control does not run with the same working dir. + * ggv/configure.in: explicitly check for popt library. + * ggv/[src|bonobo]/Makefile.am: link with popt. + +2002-03-18 Jaka Mocnik + + * ggv/src/gtkgs.c (check_pdf): use mkstemp to avoid potential security + risks. + (check_filecompressed): use mkstemp to avoid potential security + risks. + * ggv/bonobo/ggv-postscript-view.c (load_ps_from_stream): use mkstemp to + avoid potential security risks. + +2002-03-16 Jaka Mocnik + + * ggv/src/ggv-window.c: fixed error dialogs when saving/printing with + no pages are marked. + * ggv/Makefile.am: install desktop files in $(prefix)/share/applications. + +2002-03-15 Jaka Mocnik + + * ggv/src/ggv-window.c: make save and print items sensitive only when a + valid document is loaded. + * ggv/bonobo/ggv-control.c: make zoom items sensitive only when a valid + document is loaded. + * ggv/src/gtkgs.c: less erratic current_page when a bad file is loaded. + * ggv/bonobo/ggv-postscript-view.[ch] + (ggv_postscript_view_get_current_page): new function. + +2002-03-15 Jaka Mocnik + + * ggv/src/ggv-window.c (control_property_changed_handler): handle change + of page number to -1 as error. + * ggv/src/gtkgs.[ch]: added interpreter_error signal. + (gtk_gs_interpreter_message): handle output containing string "Error:" + as an error and emit interpreter_error signal. + (stop_interpreter): handle gs exiting with status 1 as error and + emit interpreter_error signal. + +2002-03-14 Jaka Mocnik + + * ggv/configure.in: added --enable-bonobo-debug that logs bonobo component + output to a file. + * ggv/bonobo/main.c: implemented logging to a file to help debugging. + +2002-03-14 Jaka Mocnik + + * ggv/configure.in: check for Xinerama. + * ggv/gtkgs.c (compute_?dpi): take possible multihead displays into + accont. patch by Mike Hicks . + * ggv/[src|bonobo]/Makefile.am: link with Xinerama if found. + +2002-03-13 Jaka Mocnik + + * ggv/src/gsdefaults.c (gtk_gs_defaults_changed): fixed a bug that wrote + alpha params to interpreter command. + * ggv/bonobo/ggv-postscript-view.c (view_button_press_cb): grab keyboard + focus of gtkgs widget. + +2002-03-12 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_get_ps_from_control): get the whole + document or only a set of marked pages from the control via CORBA. + (ggv_window_print_postscript): asynchronously spawn the printing + command and feed the postscript to its stdin. + (verb_FilePrint*): implemented. + added message and question dialogs where appropriate. + * ggv/bonobo/ggv-postscript-view.c: emit changes to page_count, page + and orienation properties when appropriate. + +2002-03-11 Jaka Mocnik + + * ggv/idl/Ggv.idl: added getDocument and getPages methods. + * ggv/bonobo/ggv-postscript-view.c: added implementation of the above. + * ggv/src/gsio.[ch]: a wrapper for output destination for pscopy*() + routines, as we dont want them to always write to a file anymore. + * ggv/src/ggv-ui.xml: added FileSaveMarked, FilePrintMarked and + FilePrintAll menu items. + * ggv/src/ggv-window.c: implement verb FileSaveMarked. get postscript + via CORBA from the PostScriptView. + +2002-03-08 Pablo Saratxaga + + * ggv/configure.in (ALL_LINGUAS): added Basque + +2002-03-07 Jaka Mocnik + + * ggv/configure.in: remove AC_PACKAGE_NAME and _VERSION. they prevented + proper make distcheck. + * ggv/Makefile.am: include xmldocs.make and message-of-doom in distribution + tarball. + * ggv/src/ggvutils.c: don't include the zoom icons as we don't need them + anymore. + * ggv/po/POTFILES.in: fixed. + * ggv/tagged as GGV_1_99_0 and released a 1.99.0 tarball. + +2002-03-06 Jaka Mocnik + + * ggv/src/ggv-window.c: added page marking buttons. + (ggv_window_new): sync menu items with default values. + +2002-03-05 Jaka Mocnik + + * ggv/src/ggv-prefs.[ch]: derive prefs dialog from GtkWindow instead of + GtkDialog. + fixed major bugs. prefs now seem to work! + (ggv_prefs_dialog_apply): apply prefs from dialog. + +2002-03-04 Jaka Mocnik + + * ggv/src/ggv-prefs.c: create prefs dialog. use the old layout from ggv + 1.0, just use a GtkDialog with a notebook instead of GnomePropertyBox. + * ggv/src/gtkgs.c (start_interpreter): use configurable alpha parameters. + * ggv/src/gsdefaults.[ch]: merged configurable alpha parameters code from + ggv-gnome-1 branch. + * ggv/configure.in: added check for GS version and appropriate setting + of default alpha parameters. + * ggv/ggv.schemas: add alpha parameters key. + +2002-03-03 Jaka Mocnik + + * ggv/src/ggv-prefs.[ch]: a new source for GGV shell prefs and prefs + editing dialog. The former is there, the latter is coming... + * ggv/src/Makefile.am: add the above to build. + * ggv/src/ggv-window.c (ggv_window_destroy): save default window size. + (file_sel_unmap): save default file selection size. + * ggv/src/main.c (main): load and save GGV prefs. + * ggv/src/ggv-ui.xml: Settings menu. + * ggv/src/ggvutils.[ch]: moved zoom level stuff here from + bonobo/ggv-control.c as it will also be needed by the shell itself. + * ggv/bonobo/ggv-control.c (ggv_control_class_init): create a template + for zoom level menus. + (ggv_control_create_ui): merge the zoom level menus. it currently does + not work well. + +2002-03-03 Jaka Mocnik + + * ggv/bonobo/ggv-control-ui.xml: added. + * ggv/po/POTFILES.in: updated to reflect the real situation. + +2002-03-03 Carlos Perelló Marín + + * ggv/src/callbacks.c: Fixed the translator option at about dialog. + * ggv/configure.in: Added AC_PREREQ(2.52), this way, if you have also + autoconf 2.13 it works. + +2002-03-02 John Fleck + + add + * ggv/xmldocs.make + * ggv/help/C/ggv.xml, help/C/legal.xml, + help/C/figures/example_screenshot.eps & example_screenshot.png + changed + * ggv/help/Makefile.am + * ggv/help/C/Makefile.am + * ggv/help/C/ggv-C.omf + adding Sun docs + +2002-03-02 Jaka Mocnik + + * ggv/bonobo/ggv-control-ui.xml: moved ui from source to file. extend it + with toolbar buttons for zooming. + * ggv/bonobo/ggv-postscript-view-ui.xml: added first and last page items. + added navigation buttons. + * ggv/bonobo/ggv-postscript-view.c: added verbs for first and last page. + * ggv/bonobo/ggv-control.c: fixed zooming. zoomable is not derived from + GTK_OBJECT! + * ggv/src/stock/Makefile.am: only install the toggle pixmaps as we + won't need the others. + * ggv/src/ggv-window.c: added about dialog. + * ggv/src/ggvutils.[ch] (ggv_raise_and_focus_widget): new utility function. + +2002-02-28 Jaka Mocnik + + * ggv/src/main.c: removed old ggv code. it remains in ggv-gnome-1 + branch in order to reuse pieces of it in the new ggv. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_construct): + add key press event mask to gs widget. + * ggv/ggv.schemas: key "/apps/ggv/layout/autojump" changed to + "/apps/ggv/control/autojump" as it became a control-specific + setting. + * ggv/src/gtkgs.c (gtk_gs_scroll_step): new function that performs + scroll stepping. + (gtk_gs_scroll_to_edge): scrolls to desired edges. + fix scrolling rect drawing. it required processing the events + caused by gdk_window_move() before drawing rectangle. + * ggv/bonobo/ggv-control.c (ggv_control_construct): added key press + handler. + added gconf notify for key "/apps/ggv/control/autojump". + show scrolling rectangle when using scrollbars to scroll. + +2002-02-26 Jaka Mocnik + + * ggv/src/gtkgs.c: fixed scrolling policy to comply with scrolled + window's requirements. + * ggv/bonobo/ggv-postscript-view.c: add panning. + * ggv/src/ggv-window.[ch]: get rid of the scrollpane as the control + now provides scrollbars. + +2002-02-25 Jaka Mocnik + + * ggv/src/gg-prefs-ui.c: applied a patch from Hidetoshi Tajima to make + page sizes in prefs dialog translatable. + * ggv/src/ggv-window.c (ggv_window_remove_control): only deactivate + control if there actually is one ;) + +2002-02-23 Jaka Mocnik + + * ggv/src/ggv-window.c (page_list_selection_changed): change pages + when a new cell in the check list changes. + (control_property_changed_handler): handle changes of page + property. + +2002-02-22 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_create_page_list): new function that + fetches page names from the control and puts them in the check list. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_get_prop): + implement page, page_count and page_names properties. + +2002-02-20 Jaka Mocnik + + * ggv/src/gtkchecklist.c: migrated to Gtk+2 tree MVC framework. + * ggv/src/ggv.window.c: add a checklist to sidebar. we don't populate + it yet as we first need a CORBA interface to our PostscriptView + to allow for fetching page names. + * ggv/idl/Ggv.idl: added typedefs for PageName and PageNameList. + +2002-02-19 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_create_ui): + fixed a buggy path that prevented merging of size menus. They + still don't show quite right though. + +2002-02-17 Jaka Mocnik + + * ggv/src/ggv-window.c (ggv_window_new): add event source listener to + property bag. + (control_property_changed_handler): handler for events from property + bag. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_construct): add + status & title properties. + (ggv_postscript_view_get_prop): return title & status properties. + (load_ps): loads ps from file & emits all the necessary notifications. + used in both load_ps_from_stream & load_ps_from_file. + * ggv/bonobo/ggv-postscript-view-ui.xml: cmd/menuitem separation. + +2002-02-17 Duarte Loreto + + * gpdf/configure.in: Added pt to All_LINGUAS. + +2002-02-16 Jaka Mocnik + + * ggv/src/gtkscrollpane.c: changed in order to behave in a gtkscrollbar + manner which is compatible with gtkviewport. + * ggv/src/gtkscrollpane.[ch]: removed all traces of unsued member + aspect_ratio. + * ggv/src/ggv-window.c (ggv_window_new): add scrollpane to scrollbar. + window-sizing fix. + (ggv_app_verbs): added New & Close. + * ggv/src/Makefile.am: readded gtkscrollpane.[ch] to sources. + * ggv/src/ggv-ui.xml: fixed verb names. + * ggv/idl/Ggv.idl: UPSIDE_DOWN -> UPSIDEDOWN to match GtkGS names. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_construct): + add width, height and orientation properties. + +2002-02-14 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_next_page): fixed broken XEvent abusing code. + (gtk_gs_load): call gtk_gs_set_page_size(). + * ggv/src/ggv-window.[ch]: main window for GGV, derived from BonoboWindow. + * ggv/src/main.c: all-new-startup code. + * ggv/src/ggv-ui.xml: bonobo UI for GGV. + * ggv/bonobo/*: some bugfixes. + * ggv/removed most of the old stuff from build. + * ggv/GGV now barely shows the PS in a control and allows to move fwd/bwd. + +2002-02-08 Jaka Mocnik + + * ggv/imported Gnome2 port from Satyajit Kanungo. + * ggv/fixed build system. + * ggv/bonobo/*: port to Gnome2. it currently compiles. + * ggv/updated AUTHORS, MAINTAINERS and, most important, TODO + +2002-01-20 Stanislav Brabec + + * ggv/gtkgs.c: Be able to scroll exactly to margin (especially + with mouse wheel). This makes visible another bug - scroll + pane is able to scroll only few pixels apart from margin. + * ggv/callbacks.c: Cosmetical (spaces). + +2001-11-19 Jaka Mocnik + + * ggv/src/gtkgs.c (start_interpreter): chdir() to the current dir of + ps file in the child process to prevent screwing up the ggv's cwd. + * ggv/ggv/ggv.schemas: fix a typo. + * ggv/released 1.1.93 tarball. + +2001-11-18 Jaka Mocnik + + * ggv/src/*.[ch]: applied a patch from Laurent Mazet that adds a + --nostatusbar option to ggv. + added (popup)menu items for statusbar visibility. + handle showstatusbar preferences option properly. + added show statusbar option to preferences menu. + * ggv/ggv.schemas: add nostatusbar boolean key. + * ggv/help/C/ggv.sgml: described --nostatusbar option. + +2001-11-15 Jaka Mocnik + + * ggv/src/gtkgs.[ch]: added document_changed signal that is emitted + when the loaded file changes. + * ggv/src/gtkgs.c (timer_callback): emit document_changed signal. + * ggv/src/callbacks.c (document_changed_callback): a handler for the + document_changed signal that reloads the file. + * ggv/help/C/ggv.sgml: removed last traces of "media". + +2001-11-13 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c: fix setting UI from xml. + * ggv/src/stock: added missing pixmaps. + * ggv/src/main.c: removed last traces of 'media'. + * ggv/configure.in: add --disable-install-schemas switch. + * ggv/Makefile.am: install schemas conditionally if INSTALL_SCHEMAS + is true. Install schemas file to $(sysconfdir)/gconf/schemas. + * ggv/ggv.spec.in: install schemas stuff in %post phase. + * ggv/released 1.1.92 tarball. + +2001-11-12 Stanislav Brabec + + * ggv/idl/Ggv.idl, src/ps.h, src/main.c, src/ps.c, src/callbacks.c, + src/ggvwindow.h, src/gtkgs.c, src/gtkgs.h, src/gsdefaults.c, + src/gsdefaults.h, bonobo/ggv-postscript-view.h, + bonobo/ggv-postscript-view-ui.xml, bonobo/ggv-postscript-view.c, + ggv.schemas, help/C/ggv.sgml: Terminology change - change "media" + to "page size" or "media size" everywhere to prevent ambiguities + of PostScript parameters. Page Media is a set of PostScript + parameters, containing page size, media color, media type etc. + +2001-11-09 Wang Jian + + * ggv/configure.in(ALL_LINGUAS): Renamed zh_CN.GB2312 to zh_CN. + +2001-11-06 Jaka Mocnik + + * ggv/src/main.c (ggv_toolbar_set_labels): new function. + * ggv/src/main.c: add a checkbox for toolbarlabels setting in prefs + dialog. + * ggv/src/prefs.c (ggv_prefs_load): added handling of toolbarlabels + setting. + * ggv/ggv.schemas: added toolbarlabels key. + * ggv/released 1.1.91 tarball. + +2001-11-04 Jaka Mocnik + + * ggv/configure.in: use AM_GCONF_SOURCE. + * ggv/Makefile.am: use GCONF_SCHEMA_CONFIG_SOURCE provided by above. + * ggv/help/C/ggv.sgml: use "-//GNOME//DTD DocBook PNG Variant V1.1//EN". + +2001-11-02 John Fleck + + * gpdf/configure.in: Added nn to All_LINGUAS. + +2001-10-23 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_load): "absolutize" relative filename paths. + +2001-10-18 Jaka Mocnik + + * ggv/bonobo/GNOME_GGV.oaf.in: removed embeddable server. + * ggv/bonobo/ggv-postscript-view.c: removed conf_client + initialization. + +2001-10-09 Jaka Mocnik + + * ggv/src/gtkgs.c (start_interpreter): properly handle multiple + arguments in interpreter command. + +2001-09-26 Abel Cheung + + * gpdf/configure.in: Added zh_TW to ALL_LINGUAS. + +2001-09-25 Fatih Demir + + * ggv/\*/.cvsignore: Added some small cvsignore files. + +2001-09-19 Jaka Mocnik + + * ggv/bonobo/ggv-control.c (zoomable_zoom_to_fit_cb): properly compute + new zoom level. + * ggv/bonobo/ggv-postscript-view.c (view_button_[press|release]_cb): call + gtk_gs_[start|end]_scroll(), respectively. + (ggv_postscript_view_zoom_to_fit): make it return zoom level that + will make the document fit. + +2001-09-17 Jaka Mocnik + + * ggv/added gconf initialization to bonobo component. + * ggv/applied some patches for compilation with gcc 3.0. + +2001-09-09 Wang Jian + + * gpdf/configure.in(ALL_LINGUAS): Renamed zh_CN.GB2312 to zh_CN. + +2001-08-31 Abel Cheung + + * ggv/configure.in (ALL_LINGUAS): zh_TW.Big5 -> zh_TW + +2001-08-30 Jaka Mocnik + + * ggv/applied a patch by Werner Koerner + . see below. + * ggv/main.c: Added new function zoom_to_fit. It sets the new zoom factor + and updates the status line and the zoom submenu accordingly. + Added possibility to zoom to page width. + Added menu 'fit to width' to zoom submenu. + * ggv/gtkgs.c (gtk_gs_zoom_to_fit): this function now only calculates the + zoom factors, changing them is done in main.c/zoom_to_fit + * ggv/callbacks.c: added zoom_to_fit_width_callback + * ggv/main.c (refresh_coordinates): Refresh coordinates only if sidebar is + visible. Remove call to ggv_menus_set_visible which overrides + hiding/showing the menubar. + * ggv/main.c (ggv_panel_set_visible): Add call to refresh_coordinates to + initialize coordinate display when panel is shown. + * ggv/gtkchecklist.c (gtk_check_list_clear): fixed memory leak + * ggv/gtkgs.c (gtk_gs_destroy): fixed memory leak + (gtk_gs_unrealize): new unrealize handler. fixes a mem-leak. + * ggv/gtkgs.c (start_interpreter): It makes no sense to quote the filename + in the argv-array - removed. Now most files containing special + characters should work except uncompressed pdf-files. + * ggv/gsdefaults.c (gtk_gs_defaults_get_scan_pdf_cmd): Remove quotes from + default command line as filenames are either already quoted or + temporary files which dont contain any special characters. + * ggv/ggvutils.c (ggv_quote_filename): Quote '%'-character. + * ggv/gtkgs.c (start_interpreter): Change to the directory of the input + file, then start gs. This helps with some postscript files which + include other files using relative paths (i.e. ghostscript's example + chess.ps). + +2001-08-20 Ravi Pratap + + * gpdf/MAINTAINERS : Create and add Michael and myself to it. + +2001-08-20 Jaka Mocnik + + * ggv/help/C/ggv.sgml: described dash filename. + * ggv/src/main.c (main): don't open stdin if no filenames have been + specified and the stdin isn't a tty. implement reading stdin if a + dash was specified among filenames. + +2001-08-19 Zbigniew Chyla + + * gpdf/Makefile.am (SUBDIRS): Added po. + + * gpdf/configure.in (AC_OUTPUT): Added intl/Makefile po/Makefile.in. + + * gpdf/xpdf/Makefile.am (INCLUDES): Added -DGNOMELOCALEDIR. + + * gpdf/xpdf/bonobo-application-x-pdf.cc (main): Set textdomain and locale. + + * gpdf/xpdf/gpdf.cc (main): ditto. + Marked a few strings for translation. + +2001-08-13 Jaka Mocnik + + * ggv/src/main.c (open_prefs_dialog): add a check button for outlining + last visible part of page when scrolling. + * ggv/configure.in: bumped version to 1.1.1 and released a new tarball. + +2001-08-12 Ravi Pratap + + * gpdf/xpdf/bonobo-application-x-pdf-ui.xml : Add ZoomFitHeight verb and toolbar + item. + + * gpdf/xpdf/bonobo-application-x-pdf.h (VERB_Z_FIT): Rename to VERB_Z_FIT_WIDTH + (VERB_Z_FIT_HEIGHT): Add + + * gpdf/xpdf/bonobo-application-x-pdf.cc (verbs): Update to use the new + verbs and names. + (view_zoom_verb): update accordingly + (zoom_to_fit): Modify to take an extra argument determining type of fit. Use + the scrolled_window to determine allocation height and width. + + * gpdf/xpdf/Makefile.am : Comment out unnecessary targets + +2001-08-11 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_*_scroll): functions to mark beginning and + end of a scrolling session. + (*) wrapped all gdk_window_move(gs->pstarget ...) in drawing + rectangles if we are scrolling. + (gtk_gs_defaults_changed): get new values directly from gconf as we + can't be sure that the other callback (the one from gsdefaults.c) + was called before us. + * ggv/src/gsdefaults.c (gtk_gs_defaults_changed): act properly on + configuration changes. + * ggv/ggv.schemas: add show_scroll_rect. + +2001-08-10 Ravi Pratap + + * gpdf/xpdf/stock-zoom-in.xpm : Add + + * gpdf/xpdf/stock-zoom-out.xpm : Add + + * gpdf/xpdf/stock-zoom-fit.xpm : Add + + * gpdf/xpdf/stock-zoom-fit-wide.xpm : Add + + * gpdf/xpdf/stock-zoom-fit-tall.xpm : Add + + * gpdf/xpdf/Makefile.am : Update, add targets etc. + + * gpdf/xpdf/bonobo-application-x-pdf.cc (view_zoom_verb): Change zoom + factor to 1.2 which is more correct + (zoom_to_fit): Small tweak to enable better approximation + + * gpdf/xpdf/bonobo-application-x-pdf-ui.xml : Change ZoomFit to ZoomFitWidth. + + * gpdf/xpdf/bonobo-application-x-pdf.cc : Update to use the new name. + +2001-08-10 Jaka Mocnik + + * ggv/src/main.c, src/callbacks.c: fixed increasing/decreasing + magnification. removed magstep member from ggv_window. + +2001-08-09 Ravi Pratap + + * gpdf/xpdf/bonobo-application-pdf-ui.xml: Add Zoom items to the + toolbar + +2001-08-01 Jaka Mocnik + + * ggv/src/main.c (ggv_*_set_visible): functions for setting visibility + of panel/menus/toolbar. + * ggv/src/prefs.c: finished migration to gconf. new prefs behaviour + is to sync all open ggvs with prefs changes of both UI shell and + the GtkGS widget. + +2001-07-22 Jaka Mocnik + + * ggv/src/main.c (synchronize_*_wd): new functions that sync UI with + default values. these are needed as we can't rely on the order + that the gconf notify functions will be called in. + +2001-07-22 Jaka Mocnik + + * ggv/src/gtkgs.c (start_interpreter): enclose filename in quotes when + creating GS command line in order to properly handle filenames with + spaces. + +2001-07-18 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_defaults_changed): redisplay when zoom + changes. + * ggv/src/main.c: improve logic for determining magstep from zoom factor. + +2001-07-14 Kjartan Maraas + + * ggv/configure.in: Added "nn" to ALL_LINGUAS. + +2001-07-13 Jaka Mocnik + + * ggv/moved the rest of config code in ggv to gconf. + * ggv/ggvutils.[ch] (ggv_compute_zoom): moved here from main.c. + (ggv_compute_spec): new function. inverse of ggv_compute_zoom(). + * ggv/gsdefaults.c: moved gconf client initialization from GtkGS class + code to here. + +2001-07-10 Ravi Pratap + + * gpdf/xpdf/gpdf.cc (main): Make indentation consistent with the + rest of the source + +2001-07-08 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_init): add notification callbacks to gtkgs + gconf client. + (gtk_gs_class_init): get default gconf client. assert if gconf + is not initialized! + (gtk_gs_get_gconf_client): access to the gtkgs gconf client. + * ggv/src/prefs.c: removed gtkgs prefs as these are now handled by + gconf. + * ggv/src/main.c (main): initialize gconf. + (set_gs_prefs): removed setting of GtkGS prefs as this is now + handled by GtkGS gconf notification callbacks. + * ggv/src/callbacks.c (prefs_apply_callback): save GtkGS prefs separately. + * ggv/src/gtkscrollpane.c: removed some warnings. make use of default + unrealize signal handler. + +2001-07-03 Jaka Mocnik + + * ggv/src/gsdefaults.[ch]: home for all the gtk_gs_defaults_* stuff that + was once in gtkgs.[ch]. + (gtk_gs_defaults_load, gtk_gs_defaults_save): restore/save config + using GConf. + ggvutils.[ch]: moved unit and orientation labels, paper sizes and + unit factors here from various places. + (ggv_split_string, ggv_get_index_of_string): utility functions + that were once static to their sources. + +2001-07-02 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.c (sync_*_items): removed debugging + output. + (ggv_postscript_view_construct): fixed media property of PropertyBag. + (listener_Media_cb): don't free media: arg_release() will take care of + it. + prefs.[ch]: removed gs*_cmd global variables as they are now stored + in GtkGSDefaults. fixed prefs io functions to respect this. + * ggv/main.c (synchronize_*_items): new function to enable/disable + paper/orientation items according to respective override setting. + +2001-07-01 Ravi Pratap + + * gpdf/xpdf/gpdf-ui.xml: Make the print menu item visible. + +2001-06-30 Jaka Mocnik + + * ggv/src/prefs.c (set_prefs): apply settings for auto jump to + beginning of the page. + +2001-06-22 Ravi Pratap + + * gpdf/configure.in: Fix a daft error of mine; ask for cflags + and libs of bonobox instead + +2001-06-20 Karl Eichwalder + + * ggv/configure.in: Remove AM_PROG_XML_I18N_TOOLS (duplicate). + +2001-06-16 Ravi Pratap + + * gpdf/configure.in: Fix logic for bonobo checking to stop if + bonobo is not found. + +2001-05-31 Karl Eichwalder + + * ggv/bonobo/GNOME_GGV.oaf.in: s/Postscript/PostScript/ for _value + strings. + + * ggv/Merge in xml-i18n-tools-0-8-4-branch. + + * ggv/configure.in (ALL_LINGUAS): Add 'hr'. + + * ggv/Start to apply xml-i18n-toolization running xml-i18n-prepare + (0.8.4): + * ggv/Makefile.am (EXTRA_DIST): Add xml-i18n-extract.in + xml-i18n-merge.in xml-i18n-update.in. + * ggv/xml-i18n-extract.in: Add from xml-i18n-tools 0.8.4. + * ggv/xml-i18n-update.in: Ditto. + * ggv/xml-i18n-merge.in: Ditto. + + * ggv/configure.in: Add AM_PROG_XML_I18N_TOOLS. + + * ggv/Makefile.am (Graphics_DATA): Fix ggv.desktop entry. + * ggv/.cvsignore: Add ggv.desktop. + * ggv/ggv.desktop: Remove file. + * ggv/ggv.desktop.in: New file. + +2001-05-30 Jaka Mocnik + + * ggv/src/ggvwindow.h (struct _ggv_window): added more members for + some menu & popup-menu items. + * ggv/src/main.c: added First/Last Page menu and popup menu-items. + patch submitted by Dan E. Kelley . + Implemented setting of sensitivity of new menu & popup-menu items. + +2001-05-25 Jaka Mocnik + + * ggv/src/prefs.c (load_prefs): really set default zoom factor. fixes + bug #55182. + +2001-05-17 Jaka Mocnik + + * ggv/src/callbacks.c: apply/save file selection dialog dimensions. + * ggv/src/prefs.[ch]: save/load file selection dialog dimensions to/from + config file. fixes bug #54652. + +2001-05-17 Jaka Mocnik + + * ggv/src/main.c (create_popup_menus): added more keyboard accelerators. + (create_menus): fixed keyboard accelerators clashes. fixes bug #54654. + * ggv/src/callbacks.c (toggle_*_pages_callback): really _toggle_, + don't just _set_ them. fixes bug #54653. + +2001-05-11 Gediminas Paulauskas + + * ggv/src/callbacks.c: add missing } + +2001-05-10 Jaka Mocnik + + * ggv/src/callbacks.c (button_press_callback): added zoom-in function to + middle-button. + * ggv/src/gtkgs.[ch] (gtk_gs_set_center): new function. + * ggv/bonobo/ggv-postscript-view.c (sync_radio_items): fix syncing for + orientation items. + * ggv/bonobo/ggv-postscript-view-ui.xml: added needed verbs with their + states. + +2001-05-03 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view.[ch]: move media menu template to + class structure. + (ggv_postscript_view_class_init): build media menus. properly + encode translated strings. + +2001-04-28 Jaka Mocnik + + * ggv/src/main.c (create_toolbar): respect toolbar labels preferences. + +2001-04-23 Jaka Mocnik + + * ggv/bonobo/ggv-postscript-view-ui.xml: added a placeholder for media + menus. + * ggv/bonobo/ggv-postscript-view.c (build_media_menu): build a + BonoboUINode tree for a menu of media types. + (ggv_postscript_view_construct): build a template for media menus. + (ggv_postscript_view_create_ui): copy media menu template and create + set the copied tree. + +2001-04-22 Jaka Mocnik + + * ggv/src/gtkgs.[ch] (gtk_gs_get_current_page, gtk_gs_get_page_count): new + functions. + * ggv/bonobo/ggv-postscript-view-ui.xml: added NextPage and PrevPage verbs + and menuitems. + * ggv/bonobo/ggv-postscript-view.c (verb_NextPage_cb, verb_PrevPage_cb): + verb callbacks. + (ggv_postscript_view_create_ui): add verbs. + (set_page_item_sensitivity): set PrevPage and NextPage sensitivity. + +2001-04-20 Jaka Mocnik + + * ggv/merged in changes from ggv-1.0 where appropriate, + * ggv/gtkgs.[ch]: implemented missing accessors in GtkGS API. + * ggv/bonobo/ggv-postscript-view.c: worked on UI stuff. + * ggv/finally commited changes to CVS. + +2001-04-20 Jaka Mocnik + + * ggv/src/callbacks.[ch] (zoom_to_fit_callback): new function. + * ggv/src/gtkgs.[ch] (gtk_gs_zoom_to_fit): new function. + * ggv/src/main.c (create_menus): added "Zoom to fit" item. + * ggv/bonobo/ggv-postscript-view.c (ggv_postscript_view_zoom_to_fit): + implemented. + +2001-04-13 Jaka Mocnik + + * ggv/bonobo/*: new directory with bonobo stuff. + * ggv/removed old bonobo embeddable. + * ggv/compile GtkGS in a library that links with both GGv and + bonobo component. + * ggv/fixed lots of compile warnings. + * ggv/added prototypes for functions that didn't have them yet. + +2001-03-29 Jaka Mocnik + + * ggv/ps.h (struct documentmedia): Moved to gtkgs.h and renamed to + GtkGSPaperSize. + * ggv/ps.c: comply to above. + * ggv/src/gtkgs.h (struct _GtkGS): changed default_page_media to + default_media. + (gtk_gs_*_default_media): add prototypes. + (gtk_gs_defaults_get_paper_sizes, gtk_gs_defaults_get_paper_count): + new functions. + * ggv/src/gtkgs.c: comply with above changes. + (gtk_gs_defaults_get_paper_sizes, gtk_gs_defaults_get_paper_count): + new functions. return array of GtkGSPaperSizes and length of that + array. this will allow us to add paper types in the future. + * ggv/ggvwindow.h (struct _ggv_window): make menudata and paper_menu + members pointers instead of fixed-size arrays. + (struct _ggv_prefs): do the same with media_choice member. + * ggv/main.c: dynamically allocate/free above members. + +2001-03-28 Jaka Mocnik + + * ggv/src/gtkgs.[ch]: major beautification of GtkGS APIs. + (gtk_gs_set_pagemedia): becomes gtk_gs_set_page_media(). + (gtk_gs_set_orientation): becomes gtk_gs_set_default_orientation(). + (gtk_gs_get_default_orientation): new accessor. + (gtk_gs_document*): become gtk_gs_get_document*(). + (gtk_gs_set_override_orientation, gtk_gs_get_override_orientation, + gtk_gs_set_override_media, gtk_gs_get_override_media): new accessors. + Changed name of all gtkgs_defaults functions. + * ggv/src/prefs.c (save_prefs): save respect EOF settiing. + * ggv/*.[ch]: changed all to comply with above API changes. + +2001-03-24 Jaka Mocnik + + * ggv/src/main.c (refresh_coordinates): refresh coordinates label. + (apply_gs_prefs): call refresh_coordinates(). + (open_prefs_dialog): add another choice menu for units for coordinate + display. + * ggv/src/callbacks.c (motion_callback): only set new coordinate members + of ggv_window to cursor position in inches. + * ggv/src/prefs.[ch]: renaming. + load & save preferred coordinate display units. + +2001-03-23 Jaka Mocnik + + * ggv/src/callbacks.c (motion_callback): report coordinates. currently in + points. TODO: implement conversion to metric and anglo-saxon units. + * ggv/src/main.c (load_gs): clear coordinates label. + (create_toolbar): added navigation and zoom buttons. + (create_sidebar): removed navigation and zoom buttons, moved + coordinates label below scrollpane. + +2001-03-17 Ravi Pratap + + * gpdf/configure.in : Fixed logic to determine bonobo + version. + + * gpdf/gpdf.desktop : Exec=gpdf and not xpdf. + +2001-03-08 Jaka Mocnik + + * ggv/removed german help translation from ditribution. + * ggv/bumped version to 1.0 and released a new tarball for GNOME 1.4. + +2001-03-05 Jaka Mocnik + + * ggv/src/main.c (open_prefs_dialog): left-align labels. + * ggv/po/sl.po: defuzzy strings. + +2001-03-03 John Fleck + + * ggv/added: + app-docs.make, omf-install/Makefile.am, help/C/ggv-C.omf, + help/de/ggv-de.omf, help/it/ggv-it.omf, help/ja/ggv-ja.omf + changed: + help/C/Makefile.am, help/de/Makefile.am, help/it/Makefile.am, + help/ja/Makefile.am, configure.in, Makefile.am + Adding support for ScrollKeeper + +2001-03-03 - John Fleck + + * ggv/adding COPYING-DOCS + +2001-02-25 Fatih Demir + + * ggv/help/C/.cvsignore: Be quiet about ggv.info. + +2001-02-20 Jaka Mocnik + + * ggv/src/gtkscrollpane.c (gtk_scrollpane_motion_notify): fixed a bug + that caused the scroll pane not to properly set value when the slider + was dragged to top and/or left edge. + +2001-02-19 Jaka Mocnik + + * ggv/src/main.c: "Attend" should read "At end"; + * ggv/src/*.po: updated because of the above string change. + +2001-02-15 Gediminas Paulauskas + + * ggv/src/main.c: made ~15 strings translatable. + +2001-02-14 Jaka Mocnik + + * ggv/src/bonobo-application-ps.c (set_page_item_sensitivity): check + if gs->doc is NULL in order to prevent segfaults. + +2001-02-03 Simos Xenitellis + + * gpdf/gpdf.desktop: Added Greek messages. + + * gpdf/configure.in: Added el to ALL_LINGUAS. + +2001-02-01 Fatih Demir + + * ggv/help/de/.cvsignore, help/ja/.cvsignore: Added these ignore + files. + +2001-01-31 Karl Eichwalder + + * ggv/configure.in (ALL_LINGUAS): Remove 1 uk entry (we've had 2). + +2001-01-24 Stanislav Visnovsky + + * gpdf/configure.in: Added sk to ALL_LINGUAS. + * gpdf/gpdf.desktop: Added Slovak messages + +2001-01-23 Daniel M German + + * ggv/src/callbacks.c (about_callback): Added Tim Theisen and Johannes + Plass as authors. There is a lot of code based on gv + (including the parser) so IMHO it is fair to acknowledge them. I + updated Jaka as the current maintainer. + +2001-01-22 Jaka Mocnik + + * ggv/src/gtkgs.c (gtk_gs_set_pagemedia): fixed a bug that prevented proper + paper size overriding. + * ggv/src/ps.c (psscan), gtkgs.c: made respect_eof configurable. + * ggv/src/main.c, src/callbacks.c: added respect eof option to prefs dialog. + * ggv/configure.in: now we're at 1.0-test7. boy, does this testing wear me + out... + +2001-01-22 Daniel M German + + * ggv/src/gtkgs.c (set_up_page): Remove a g_print message + +2001-01-21 Jaka Mocnik + + * ggv/gtkgs.c (gtk_gs_set_pagemedia): added a check for + gs->doc->pages != NULL before dereferencing them. stupid me... + +2001-01-21 Fatih Demir + + * gpdf/configure.in: Added tr to ALL_LINGUAS. + +2001-01-21 Daniel M German + + * ggv/src/ps.c (psscan): Implemented ignoring EOF in structured + documents. Unfortunately some Structured Documents do not properly + protect EOF of embedded documents. + +2001-01-17 Jaka Mocnik + + * ggv/gtkgs.[ch]: added member loaded. set to TRUE when a document is + loaded. + * ggv/(struct _ggv_window): removed member loaded. + * ggv/fixed paper menu and choice menu syncing. + * ggv/gtkgs.c (gtk_gs_realize, compute_size, set_up_page): show white + background of fallback media type when no document is loaded. + (gtk_gs_set_pagemedia): hopefully this is now finally fixed. it + gets media type in this order: page media, doc media, page bbox, + doc bbox. + fixed orientation menu syncing and handling. + +2001-01-14 Stanislav Brabec + + * src/main.c: Swapped odd/even in menus to finish odd/even + cosmetics. + +2001-01-14 Jonathan Blandford + + * ggv/src/main.c (create_menus): oops. Forgot to change this. + +2001-01-14 Jonathan Blandford + + * ggv/src/callbacks.c (*_toggled_*): Changed to use the new checklist. + * ggv/src/main.c (toggle_pages): removed + * ggv/src/gtkchecklist.[ch]: new widget. + * ggv/src/stock/.cvsignore: added + * ggv/src/main.c: Removed %800 as a zoom option. It uses a _lot_ of + memory needlessly. + +2001-01-14 Jaka Mocnik + + * ggv/src/gtkgs.c: renamed gtkgs_errmsg to gtk_gs_emit_error_msg, to be + consistent with the overall naming style. + (gtk_gs_set_pagemedia): attempt to use page bounding box if no + page media or document media are set. fixes problems with some PDF + dsc files. + +2001-01-13 Stanislav Brabec + + * ggv/src/main.c: Changed bad term "Paper Type" to "Page Size" to + prevent ambiguity between PageSize and MediaType Postscript + resources. + + * ggv/src/callbacks.c: Synchronize wheel mouse events with long time + established GIMP behavior (i.e. Control=HScroll, Shift=Zoom). + Increased whellmouse step. Still different from GIMP where wheel + step is window size relative (1/4). + + * ggv/src/main.c, src/stock/toggleodd.xpm, src/stock/toggleeven.xpm: + Prevent odd/even ambiguities: Use natural order (odd, even), + swap images to be more intuitive. + + * ggv/ggv.desktop: Updated cs. + +2001-01-11 John Fleck + * ggv/help/C/ggv.sgml, help/de/ggv.sgml, help/it/ggv.sgml, help/ja/ggv.sgml: + fixing bug in the docs that prevented them from rendering in + Nautilus: "DOCTYPE" in the dtd must be capitalized. Also changed + "%" to "%" so as not to choke the poor Nautilus browser + +2001-01-11 John Fleck + * ggv/added help/de/Makefile.am + * ggv/help/C/Makefile.am, help/it/Makefile.am, help/ja/Makefile.am, + help/Makefile.am, configure.in: + update help doc makefiles to build html at package build time, so + the packager rather than the end user needs DocBook tools to build + the static html from the DocBook sgml. Also, install .sgml files + in help directories for future Nautilus compatibility + +2001-01-11 Michael Meeks + + * gpdf/xpdf/gpdf.cc (container_launch_component): don't add the client + site to the item container. + +2001-01-11 Jaka Mocnik + + * ggv/src/main.c: include stock/*.xpm, not *.xpm. + * ggv/src/foot*.xpm: removed. + * ggv/src/gtkgs.c (check_filecompressed): free filename after possible + error messages; also uncompress files by passing the uncompressing + command the compressed filename in commandline and not via redirection + of stdin, as some bzip2 version seem to have problems with the latter. + +2001-01-09 Jaka Mocnik + + * ggv/ggv.spec.in: removed the line for sysconfdir/CORBA/servers as + .gnorba files no longer exist. + +2001-01-08 Jaka Mocnik + + * ggv/src/gtkscrollpane.c (gtk_scrollpane_class_init): add handler for + draw signal to fix some redrawing issues. + * ggv/src/main.c (restore_session, save_session): save & restore document + page, zoom and scrolled position. + (synchronize_user_interface): set zoom menu option to the current + window magnification and NOT to the default magnification. + +2000-12-24 Jaka Mocnik + + * ggv/application-ps.oafinfo: becomes Bonobo_GGV.oafinfo. also changed + OAFIIDs. + * ggv/application-ps.gnorba: removed. + * ggv/Makefile.am: removed application-ps.gnorba. + * ggv/configure.in: bumped version to 1.0-test1. released the first + test before 1.0. + * ggv/MAINTAINERS: changed to jaka@gnu.org. + +2000-12-22 Zbigniew Chyla + + * ggv/ggv.desktop: Updated Polish translation. + +2000-12-21 Michael Meeks + + * gpdf/xpdf/bonobo-application-x-pdf.cc: Kill mutex / thread init code, + it screws gtk. + + * gpdf/xpdf/gpdf.cc: update the IID naming scheme. + + * gpdf/xpdf/bonobo-application-x-pdf.cc (init_bonobo_application_x_pdf_factory): ditto. (init_server_factory): setup ORB properly. + + * gpdf/xpdf/Makefile.am: De-goadize; update oafinfo fnames. + +2000-12-21 Michael Meeks + + * gpdf/configure.in (xpdf_cv_func_select_arg): remove oaf + checking cruft. + +2000-12-18 Dan Damian + + * ggv/configure.in: Added "ro" to ALL_LINGUAS. + +2000-12-16 Jaka Mocnik + + src/bonobo-application-ps.c: updated to work with latest bonobo: + changed references to EmbeddableFactory to GenericFactory. + +2000-12-08 Fatih Demir + + * gpdf/configure.in: Added "ko" to ALL_LINGUAS. + +2000-12-04 Jaka Mocnik + + * ggv/src/main.c (open_window): return the new ggv_window and take + parameters for x, y, width and height of the window. + (restore_session, save_session, client_die): new functions to + support session management. + (main): implement session management. + +2000-12-04 Darin Adler + + * gpdf/xpdf/bonobo-application-x-pdf.cc: + s/bonobo_embeddable_factory_new/bonobo_generic_factory_new/. + +2000-11-23 Jaka Mocnik + + * ggv/src/bonobo-application-ps.c (reload_all_views): set menu item + sensitivity for each view. + +2000-11-21 Yukihiro Nakai + + * ggv/configure.in (ALL_LINGUAS): add zh_CN.GB2312 + +2000-11-16 Stanislav Visnovsky + + * ggv/configure.in (ALL_LINGUAS): added Slovak [sk] + +2000-11-16 Ramiro Estrugo + + * gpdf/xpdf/bonobo-application-x-pdf.cc: + Make the signatures of callbacks match the declaraed types to + avoid compiler warnings. + +2000-11-16 Darin Adler + + * gpdf/xpdf/.cvsignore: + * gpdf/xpdf/Makefile.am: + Remove remnants of old ui translation scheme + now that we have Kenneth's new one (see po). + +2000-11-15 Zbigniew Chyla + + * gpdf/configure.in: Added pl to ALL_LINGUAS. + +2000-11-15 Maciej Stachowiak + + * ggv/configure.in: Make OAF support unconditional (Bonobo always uses + OAF now). + * ggv/Makefile.am: Likewise. + * ggv/acconfig.h: Likewise. + * ggv/src/bonobo-application-ps.c: Likewise. + +2000-11-10 Robert Brady + + * gpdf/configure.in: Added Tamil translation. + +2000-11-07 Fatih Demir + + * gpdf/xpdf/.cvsignore: Added bonobo-application-x-pdf-ui.h and + gpdf-ui.h to the ignores. + +2000-11-06 Jason Leach + + * ggv/src/bonobo-application-ps.c (stream_read): s/copy_to/copyTo/ to + compile with the latest studlyCaps bonobo. + +2000-11-05 Pablo Saratxaga + + * gpdf/po/da.po,configure.in: Added Danish translation. + +2000-11-02 Michael Meeks + + * gpdf/configure.in: check for Bonobo >= 0.27 + +2000-10-27 Szabolcs Ban + + * gpdf/configure.in: Added Hungarian (hu) entry (ALL_LINGUAS) + * gpdf/gpdf.desktop: Added Hungarian entries. + +2000-10-20 Darin Adler + + * gpdf/.cvsignore: Add aclocal.m4. + * gpdf/xpdf/bonobo-application-x-pdf.cc: + Change BonoboUIHandler to BonoboUIComponent. + +2000-10-19 Michael Meeks + + * gpdf/xpdf/gpdf.cc: update for Dietmer internal changes. + +2000-10-19 Jarkko Ranta + + * gpdf/configure.in: Added Finnish (fi) entry (ALL_LINGUAS). + * gpdf/gpdf.desktop: Added Finnish entries. + +2000-10-18 Christophe Merlet + + * gpdf/configure.in: Added French (fr) to ALL_LINGUAS. + * gpdf/gpdf.desktop: Added French strings. + +2000-10-17 Michael Meeks + + * gpdf/xpdf/gpdf.xml: add. + + * gpdf/xpdf/Makefile.am: sort out xml files. + + * gpdf/xpdf/gpdf.cc: Re-engineer to the new UI handler. + + * gpdf/xpdf/bonobo-application-x-pdf.cc: update to new UI handler + + * gpdf/xpdf/bonobo-appliation-x-pdf-ui.xml: create. + + * gpdf/xpdf/gpdf-ui.xml: create. + +2000-10-17 Michael Meeks + + * gpdf/Makefile.am (WIN32_EXTRA): remove cruft so we distcheck. + +2000-10-17 Almer S. Tigelaar + + * gpdf/configure.in: Added Dutch (nl) to ALL_LINGUAS. + +2000-10-15 Jaka Mocnik + + * ggv/src/bonobo-application-ps.c: converted to new bonobo UI code. + +2000-10-09 Darin Adler + + * gpdf/aclocal.m4: Removed this file which is generated + * gpdf/xpdf/bonobo-application-x-pdf.cc: Ifdef'd out code that doesn't + compile with the latest verb changes. + +2000-10-08 Jaka Mocnik + + * ggv/src/*.c: unified capitalization: Gnome Ghostview and GGv. + no more GNOME and ggv. + +2000-10-07 Michael Meeks + + * gpdf/xpdf/gpdf.cc (main): cut out stale gnorba fat. + + * gpdf/xpdf/bonobo-application-x-pdf.cc (init_server_factory), + (init_bonobo_application_x_pdf_factory): ditto. + + * gpdf/xpdf/bonobo-application-x-pdf.cc (embeddable_factory): remove the + sizeable interface. + +2000-10-07 Michael Meeks + + * gpdf/configure.in: check for Bonobo >= 0.20 + +2000-10-07 Jesus Bravo Alvarez + + * gpdf/configure.in: Added Galician (gl) to ALL_LINGUAS + +2000-10-06 Daniel M German + + * ggv/src/callbacks.c + * ggv/src/callbacks.h + * ggv/src/ggvutils.c + * ggv/src/ggvutils.h + * ggv/src/ggvwindow.h + * ggv/src/main.c + * ggv/src/prefs.c + * ggv/src/prefs.h: Added a toolbar and icons for the sidebar. + Coded by Paolo Maggi + +2000-10-05 Daniel M German + + * ggv/src/callbacks.c (button_press_callback): Support for + wheel mice. Coded by Tomas Kindahl + * ggv/src/prefs.c: Aligned some labels in prefs window. + +2000-10-04 Yukihiro Nakai + + * gpdf/configure.in: Add Japanese to ALL_LINGUAS + +2000-10-04 Yukihiro Nakai + + * gpdf/gpdf.desktop: Add Japanese translation. + +2000-10-04 Michael Meeks + + * gpdf/xpdf/bonobo-application-x-pdf.cc (view_create_menus): upd. + + * gpdf/xpdf/gpdf.cc (container_launch_component): update for ItemContainer + rename. (container_new): update to bonobo-win stuff. + (container_set_view): use compat_get_container. + +2000-10-04 Michael Meeks + + * gpdf/configure.in (xpdf_cv_func_select_arg): check for bonobo 0.19 + +2000-10-04 Kjartan Maraas + + * gpdf/configure.in: Added ALL_LINGUAS and all current languages. + +2000-10-04 Jaka Mocnik + + * ggv/src/bonobo-application-ps.c (view_merge_menus): use + Bonobo_UIContainer instead of Bonobo_UIHandler. + +2000-09-25 Jaka Mocnik + + * ggv/help/C/ggv.texi: texinfo version of the sgml docs. automatic + conversion does not work well and it had to be tweaked manually. + therefore I have commited it to CVS. + * ggv/help/C/Makefile.am: generate and install the info file. + +2000-09-18 Yukihiro Nakai + + * Update help/ja/ggv.sgml + * Add ja entry to help/Makefile.am + +2000-09-15 Mathieu Lacage + + * gpdf/gpdf.keys.in: fix evil evil buggy: mime types DO NOT HAVE + a ":" after them + * gpdf/gpdf.mime: idem + +2000-08-24 Daniel M German + + * src/callbacks.c + * src/callbacks.h + * src/ggvwindow.h + * src/gtkgs.c + * src/main.c + - Added support for orientation on on a per window basis. + - To be consistent, I added the option to override orientation + instead of the automatic option + * src/prefs.c + * src/prefs.h: + - Added orientation parameters in the setup window. + + - There are still some bugs to fix, among them: + *set new paper media after the document is loaded + *there are still some bugs to fix for orientation + *try to test documents with multiple media + *try to see if there are documents with different orientation + +2000-08-22 Daniel M German + + * src/callbacks.c + * src/callbacks.h + * src/ggvwindow.h + * src/gtkgs.c + * src/main.c + * src/prefs.c + * src/prefs.h: + - Added zoom magnification to the list of persistent parameters. + - Synchronized correctly all parameters between the document + and the user interface (zoom, override media, default media, + etc). + +2000-08-15 Daniel M German + + * ggv/src/gtkgs.c: + * ggv/src/callbacks.c: Added the ability to set up the orientation + _before_ the document is loaded, and to set up the orientation + on a window basis, instead of globally. Both zoom and orientation + require options in the preferences dialog window. + + * ggv/src/callbacks.c + * src/main.c + * src/ggvwindow.h: + Added support for individual window zooming in the menu. I also + synchronized the zoom button actions with the currently selected + value in the zoom radio buttons in the main menu. + +2000-08-13 Daniel M German + + * ggv/src/gtkgs.c: added bounding box options for media type + + * ggv/src/prefs.c + * ggv/src/main.c + * ggv/src/callbacks.c: Added the ability to set watchfile and + antialiasing on a document level (previously it was a global + setting). + +2000-08-13 Arik Devens + + * gpdf/xpdf/bonobo-application-x-pdf.cc (view_create_menus): Switched + page_enlarge_cb and page_shrink_cb to get zooming in and out + workin correctly in the menu. + +2000-08-10 Jaka Mocnik + + * ggv/src/bonobo-application-ps.c: call bonobo_object_unref() instead + of bonobo_object_destroy(). also fixed the factory code and some + unref()ing issues. + * ggv/src/gtkgs.[ch]: renamed gtkgs_defaults_struct to GtkGSDefaults + for consistency and made it private to gtkgs.c. + * ggv/some renaming and code reformating was done for consistency. + * ggv/configure.in: fixed the bonobo check, as we need to link with both + libbonobox and libbonobo. + +2000-08-08 Daniel M German + + * ggv/src/prefs.c + * ggv/src/main.c + * ggv/src/gtkgs.c + * ggv/src/gtkgs.h + * ggv/src/prefs.h + * ggv/src/bonobo-application-ps.c + * ggv/src/callbacks.c + - Revamped the way the defaults for the gtkgs widget are + stored. Instead of global variables I created a structure + gtkgs_defaults and a bunch of functions to set and read its + values. This will be more maintable and modular. + - I removed the old variables gs_antialiasing, + gs_default_page_media. etc, ... and replace them with calls to + their corresponding functions. + - Fixed bug in which landscape documents were not recognized as + such when opened. I also changed the default of Landscape (as + 270 degrees instead of 90) so landscape documents are shown + properly) + - Currently working on the automatic discovery of paper type, + orientation and the ability to set defaults on a per window basis. + * ggv/src/main.c the default message in the status bar shows more info + about the current document, including magnification, + filename, and type of PostScript document. + +2000-08-07 Daniel M German + + * ggv/TODO: Updated it. It still needs work. + +2000-08-06 Daniel M German + + * ggv/help/Makefile.am (SUBDIRS): there was a japanese translation + entry but no subdirectory for its translation. Maybe somebody + forgot to upload it? I removed it. + +2000-08-02 Michael Meeks + + * gpdf/xpdf/Makefile.am (gpdf_LDADD): kill ghastly hack adding -lbonobo. + (bonobo_application_x_pdf_LDADD): add EXTRA_GNOME_LIBS + +2000-08-02 Michael Meeks + + * gpdf/configure.in: set '$bonobo' for EXTRA_GNOME_LIBS, use bonobox + + * gpdf/po/POTFILES.in: add. + +2000-07-25 Michael Meeks + + * gpdf/xpdf/bonobo-application-x-pdf.cc (embeddable_factory): s/gtk/bonobo/ + on unref. Junk 2 stop tabs throught, Derek can have my kittens. + (view_create_menus): create the pdf toolbar before using it. + (button_press_event_cb): return a value. + +2000-07-16 Karl Eichwalder + + * ggv/help/C/ggv.sgml: "page" vs. "pane". + + * ggv/help/de/topic.dat: New file. + * ggv/help/de/ggv.sgml: Start translation. + + * ggv/help/C/ggv.sgml: Normalize the word "PostScript". + +2000-07-04 Michael Meeks + + * gpdf/xpdf/GOutputDev.cc (drawImage): kill double free. + + * gpdf/xpdf/BonoboStream.cc (bfread): update for new API. + +2000-06-22 JP Rosevear + + * ggv/src/bonobo-application-ps.c (view_next_page_cb): Constify param + (view_prev_page_cb): ditto + (view_recenter_page_cb): ditto + (load_ps_from_stream): No return type any more (void). + + * ggv/configure.in: Improve bonobo/oaf check + +2000-06-21 Daniel M German + + * ggv/src/Makefile.am (COMPONENT_LDADD): fixed a minor error in order + to compile without bonobo support. + +2000-06-11 Fatih Demir + + * gpdf/gpdf.desktop: Corrected a stupid [tr]-entry. + +2000-06-07 Pavel Cisler + + * gpdf/xpdf/bonobo-application-x-pdf.cc: + Renamed BonoboUIHandlerCallbackFunc to BonoboUIHandlerCallback + to match new naming. + +2000-06-02 Jaka Mocnik + + * ggv/application-ps.oafinfo: added the OAF info file that I forgot + during last commit. + +2000-06-01 Darin Adler + + * gpdf/xpdf/application-x-pdf.oafinfo: + * gpdf/xpdf/gpdf.cc: + Fixed spelling of component in IID. + +2000-05-28 Jaka Mocnik + + * ggv/configure.in, Makefile.am, src/Makefile.am: added optional + use of OAF for the bonobo component. thank god we're past GNORBA. + * ggv/src/bonobo-application-ps.c (init_server_factory, + init_embeddable_application_ps_factory): added OAF support. + * ggv/application-ps.oafinfo: relevant OAF information for our + bonobo component. + * ggv/src/main.c (recent_add): yes, Postscript is application/postscript + and not text/plain. + * ggv/acconfig.h: add USING_OAF. + +2000-05-27 Pauli Virtanen + + * ggv/ggv.desktop: added finnish + +2000-05-26 Darin Adler + + * gpdf/xpdf/bonobo-application-x-pdf.cc (load_pdf_from_stream), + (embeddable_factory): + * gpdf/xpdf/gpdf.cc: (open_pdf): + Updated for new PersistStream interface. I mostly just passed + NULLs. Not 100% sure that's correct. + +2000-05-26 Dan Winship + + * gpdf/xpdf/gpdf.cc (open_pdf): Note that the data passed to the + PersistStream is "application/pdf". + +2000-05-24 Darin Adler + + * gpdf/.cvsignore: + * gpdf/goo/.cvsignore: + * gpdf/ltk/.cvsignore: + * gpdf/xpdf/.cvsignore: + Added a bunch of generated files. + + * gpdf/xpdf/GOutputDev.cc: (GOutputDev::updateLineAttrs): + Fixed a type to avoid a warning. + +2000-05-15 Kjartan Maraas + + * ggv/TRANSLATABLE_FILES: Added list of files containing + translatable strings / text. + +2000-05-14 Andreas Hyden + + * ggv/ggv.desktop: Added Swedish translation. + +2000-05-11 Daniel M German + + * ggv/ggv.desktop (Comment): Changed + + to:Gnome Ghostscript frontend + Comment=A Ghostscript frontend to visualize PostScript files. + (submitted by Karl Eichwalder ) + + * ggv/Added the option to save the current geometry. Its only current + defect is that it saves the geometry of the last window open + (remember, we can open more than one window at a time). + +2000-05-10 Karl Eichwalder + + * ggv/src/main.c (create_menus): Add missing shortcut. + +2000-05-10 Karl Eichwalder + + * ggv/ggv.desktop: Improve de. + +2000-05-10 Jaka Mocnik + + * ggv/configure.in: bumped version to 0.95 and released a new tarball. + * ggv/pixmaps/foot*.xpm: moved back to src as these are actually + source files and libtool doesn't like sources in another subdir. + * ggv/pixmaps/Makefile.am: removed feet from SOURCES ;) + * ggv/src/Makefile.am: added foot*.xpm to GTK_GS_SOURCES. + +2000-05-07 Maciej Stachowiak + + Work with OAF and fix various bugs: + + * gpdf/configure.in, aclocal.m4: Detect when Bonobo is built with OAF + support, and if so use OAF. + * gpdf/xpdf/Makefile.am: When using OAF, link against OAF and install + oafinfo file. + * gpdf/xpdf/gpdf.cc: Include oaf headers when using OAF. + (openpdf): Use OAFIID to activate the component when using OAF. + (container_set_view), (container_launch_component), + (container_new): Put the view in an EventBox, not a + ScrolledWindow; the component now handles scrolling itself. + (key_press_event_cb): Removed; key press handling moved to + component. + (main): Initialize OAF instead of GOAD when using OAF. + * gpdf/xpdf/bonobo-application-x-pdf.cc: Include OAF headers when using + OAF. + (redraw_view): Handle the case where we are loading before the + view is realized by connecting to the "realize" signal handler + and deferring redrawing until then in that case. + (real_redraw_view): Function to do the real redrawing. + (load_pdf_from_stream): Don't call `realize_mainbox' directly, let + `real_redraw_view' do it. + (key_press_event_cb): In response to various key bindings, scroll + the view, navigate pages, or zoom in/out. + (button_press_event_cb): Grab the keyboard focus on a press of + button 1. + (view_create_menus): Rename menus to be more standard, and provide + accelerators for menus and items. + (realize_mainbox): Get window ourselves if we have to. + (view_factory): Put the view in a scrolled window so scrolling can + be handled by the component itself. Connect to "key_press" and + "button_press" for keyboard and focus handling. Set the + GTK_CAN_FOCUS flag for the main view widget. + (init_bonobo_application_x_pdf_factory, init_server_factory): Use + OAF when appropriate. + + * gpdf/xpdf/application-x-pdf.oafinfo: New file, OAF activation record. + +2000-04-18 Pablo Saratxaga + + * ggv/configure.in (ALL_LINGUAS): added Catalan + +2000-04-13 Fatih Demir + + * ggv/ggv.desktop : Added [tr] .. + +2000-04-11 Pablo Saratxaga + + * ggv/configure.in (ALL_LINGUAS): added Lithuanian and Ukrainian + +2000-04-10 Fatih Demir + + * gpdf/gpdf.desktop : Added [tr] .. + +2000-04-10 Dima Sivachenko + + * ggv/Update Russian translation. + +2000-04-03 Karl EICHWALDER + + * ggv/ggv.desktop: New entries for "de". + +2000-04-01 Jason Leach + + * ggv/main.c (recent_update): more optimization/cleaning, lets not + do g_list_length where we can just use an integer counter + (recent_add): a postscript isn't mime-type "text/plain" is it? + shouldn't it be "application/postscript"? + +2000-03-30 Jason Leach + + * ggv/main.c (parse_an_arg): fix indentation to 8-space; + (free_wwd): removed a duplicated if() + (recent_update_menus): here too. + + * ggv/prefs.c (load_prefs): you don't need to do an if() check before + a g_free(), the if() check is actually already done at the top of + g_free() + +2000-03-30 Christopher R. Gabriel + + * ggv/configure.in: added help/it/Makefile for italian user documentation + +2000-03-29 Jason Leach + + * ggv/main.c (open_prefs_dialog): set the title of the Preferences + window to "GGV Preferences" rather than have it inherit "ggv" from + the parent + +2000-03-27 Christopher R. Gabriel + + * ggv/configure.in (ALL_LINGUAS): added italian (it) translation. + +2000-03-24 Jaka Mocnik + + * ggv/configure.in (ALL_LINGUAS): Added Slovene (sl) translation. + * ggv/callbacks.c (about_callback): made the authors list shorter. + as I've left no one out I hope no one gets mad ;) and prevented + the about box from being shown multiple times. + +2000-03-10 Michael Meeks + + * gpdf/xpdf/gpdf.cc: s/GNOME/Bonobo/ + + * gpdf/xpdf/application-x-pdf.gnorba: s/GNOME/Bonobo/ + +2000-03-10 Alastair McKinstry + + * ggv/configure.in (ALL_LINGUAS): Added Irish (ga) translation. + +2000-03-04 bertrand + + * ggv/application-ps.gnorba: take into account the + latest Bonobo name changes. + + * ggv/bonobo-application-ps.c (view_factory): + no need to create the ui handler for the view, + it's been already done when the view is + constructed. + +2000-02-28 Michael Meeks + + * gpdf/xpdf/bonobo-application-x-pdf.cc (view_factory): kill spurious + UI handler creation. + + * gpdf/xpdf/gpdf.cc (container_set_view): update to new bonobo api. + +2000-02-25 NotZed + + * gpdf/xpdf/Makefile.am: Fixed up lists of sources so that distcheck + works. Also, only build gpdf if with gnome (otherwise distcheck + fails). + + * gpdf/xpdf/gpdf.cc (container_about_cmd): Define it if we are going to + be using it. + +2000-02-25 NotZed + + * gpdf/configure.in: Do AM_GNOME_GETTEXT for INTLLIBS def. + + * gpdf/Makefile.am: Dont include gjgppcf by default, can this + be done in an automatic way? + + * gpdf/ltk/Makefile.am (libltk_a_SOURCES): Add missing sources. + +2000-02-09 Michael Meeks + + gpdf/xpdf/ Clean unused & lack of casting all round the place. + +2000-02-08 Michael Meeks + + * gpdf/configure.in: update bonobo check for latest ver. + +2000-02-08 Jaka Mocnik + + * gtkgs.h: Added macros to access components of structure GtkGS: + the filename of the uncompressed file and flags that show if the + file is compressed or a pdf file. + * ggv/callbacks.c (print_callback), gtkgs.c (start_interpreter), + main.c (save_marked_pages): use this macros. + * ggv/Makefile.am: new files ggvutils.[ch] + * ggv/ps.c (psscan), gtkgs.c (gtk_gs_load): + Moved uncompress functionality from ps.c (psscan) to gtkgs.c + (gtk_gs_load new function check_filecompressed). + Possible error messages from the uncompress command are displayed + in the same way as ghostscript warnings (normally in the message + window). + Added support for bzip2-compressed files. + Moved pdf-scan functionality from ps.c (psscan) to gtkgs.c + (gtk_gs_load, new function check_pdf). + Both functions quote the filenames for the system() calls to allow + filenames containing special characters. + BUG: The list of recent files don't show filenames containing spaces + (and possibly other 'special' characters). + * ggv/main.c (load_gs): Don't show error dialog if gtk_gs_load fails + because an error message is already shown in the message window. + * ggv/main.c (open_window): Don't delete ggv window if loading of a + file given in the command line fails because the user should have + a chance to read the error messages. + * ggv/gtkgs.h (GtkGS), gtkgs.c (gtk_gs_init, start_interpreter), + bonobo-application-ps.c (view-factory): Removed local copies of the + commandlines for gzip and gs; use global variables instead. + * ggv/callbacks.c (prefs_apply_callback), ggv_window.h (ggv_prefs), + main.c (open_prefs_dialog), prefs.c, prefs.h: + Support for bzip2-compressed files. + * ggv/callbacks.c (print_callback): quote filename for + gnome_execute_shell so that printing of files containing spaces + works. + * ps.c: The error checking of malloced memory is useless as + g_malloc, g_new etc abort the application if out of memory; + removed. + * ggv/prefs.c (load_prefs, save_prefs, set_prefs), prefs.h: + New option gs_watch_doc. + * main.c (open_prefs_dialog), callbacks.c (prefs_apply_callback): + New option "watch file" in configuration dialog. + * main.c (load_gs): Start gtk_timeout function to check for changes + of the loaded file. + * gtkgs.c (gtk_gs_cleanup): stop timeout function. + * callbacks.[ch] (timer_callback): new function; reload file if + changed. + * gtkgs.h: #defines for the timing behaviour: The check for file + changes is performed every second, a reload is started 2 seconds + after the file was changed. + * ggv/main.c (open_prefs_dialog): Connect "help" callback. + * ggv/callbacks.c: New function prefs_help_callback. + * ggv/gtkgs.c (gtk_gs_cleanup): Close gs_psfile and set to NULL. + (gtk_gs_load, gtk_gs_goto_page): Dont change gs_psfile here. + (gtk_gs_set_pagemedia): set gs->changed when pagemedia was changed. + * ggv/main.c (close_window): Delete status window before deleting main window. + (set_gs_prefs): Reload file if page medium is changed. + (load_gs): Disable menu item "save marked pages" if a pdf file is + loaded. Some additional cosmetic changes... + (save_marked_pages): If a pdf file is loaded, use the name of the + dsc file as input to pscopydoc. The resulting ps file can be used + to print the marked pages. + * ggv/ps.c (pscopydoc): Removed status messages to stdout. + * ggv/help/C/ggv.sgml: Added short description of the new option + "watch file" and the changed/added command lines for gzip and + bzip2 in options/ghostscript. + * ggv/po/POTFILES.in: Added all source files which contain strings that + should be translated. + * ggv/configure.in: bumped the version to 0.90. + * ggv/bonobo-applicaton-ps.c (set_page_item_sensitivity): new function + that sets sensitivity of Next/Previous Page menu items when the + menus are merged. + (view_[prev|next]_page_cb, view_merge_menus): use the above. + * ggv/most of the above work is by Werner Koerner + + +2000-02-07 Michael Meeks + + * gpdf/xpdf/bonobo-application-x-pdf.cc: fix typo. + +2000-02-07 Michael Meeks + + * gpdf/configure.in (VERSION): bump. + +2000-02-06 Daniel German + + * ggv/ps.c (gettextline): gettextline was returning the EOL at the end + of the string. This resulted in a window title bar with an EOL at + the end. the panel was showing it. + +2000-02-02 Jaka Mocnik + + * ggv/bonobo-application-ps.c: comply to changes in Bonobo API + namespace. + * ggv/configure.in: require bonobo >= 0.6. + +2000-01-28 Daniel German + + * ggv/Added Greek (el.po) to ALL_LINGUAS (Submitted by + Spyridon Papadimitriou + +1999-12-21 Jaka Mocnik + + * gtk_gs.c (input): removed call to gtk_main_iteration in the + callback function input - this sometimes caused a endless + recursion. + * gtkgs.c (start_interpreter): + The pipe to ghostscript was not set to non-blocking IO (the code + was there, but not used). + Some cleanup and small changes to enable reading from stdin. + * main.c (main): + Reading files from comandline: try adding '.pdf.gz' to filename, + allow "-" as filename, if no filename is given and input is no tty + then use stdin as input. + * ps.c (psscan): Added code to scan ps files with a pjl header + (many printer drivers for laser printers send a pjl command to + switch the printer to postscript mode). + psscan now ignores a leading ^D in the postscript-file. + cleaned up uncompress and pdf-scan code (no recursion or goto's) + replaced some more malloc, realloc, etc calls by their glib + counterparts. + * commented out some messages printed to stdout. + Some of these messages were printed while ggv has both mouse + and keyboard focus. When these call blocks (e.g. when ggv was + started in a xterm in the background) the whole X server was + blocked. + * patches by Werner Koerner . + +1999-12-17 Michael Meeks + + * gpdf/xpdf/gpdf.cc (container_set_view): make wrapper invisible. + + * gpdf/xpdf/bonobo-application-x-pdf.cc (embeddable_factory): kill + diff id string. + constify lots of paths. + (view_factory): kill size query. (view_size_query): kill. + +1999-12-16 Jaka Mocnik + + * ggv/bonobo-application-ps.c (embeddable_factory): don't pass goad id + as a parameter to gnome_persist_stream_new(). + (#define GGV_GOAD_ID): removed as it was not referenced anymore. + +1999-12-14 Jaka Mocnik + + * ggv/callbacks.c (open-callback, save_callback): g_free() dirname. + * ggv/gsmessage.[ch]: new files, implement a dialog for showing + GS error messages in a single dialog instead of a bunch of + error dialogs. this was sorely needed: thanks, Werner. + * ggv/main.c (load_gs): create/clear the message dialog. + if no document is available, show filename as title of the main + window. + * ggv/callbacks.c (interpreter_message_callback): add text to message + dialog and show it. + * ggv/gtkgs.[ch] (struct _GtkGS): removed filename_raw member. + removed all references to the above member. + * ggv/file.[ch]: removed. + * ggv/callbacks.c (about_callback): added Werner to the about dialog. + it's the least I can do to show my appreciation of his patches ;) + * ggv/configure.in: increased version once again. we're at 0.83 now. + +1999-12-11 Jaka Mocnik + + * ggv/gtkgs.c (input): replace call to g_main_iteration() with + gtk_main_iteration(). + (set_up_page): clear newly allocated pixmap before it is used. + (float compute_xdpi, float compute_ydpi): changed prototypes. + * ggv/gtkgs.c, main.c: add checks when using document structure + information (gs->doc, gs->doc->media, gs->doc->pages, + gs->pages_marked). + * ggv/callbacks.c (select_page_button_press_callback): fixed typo. + * ggv/ps.c (psscan): ambiguous if-else constuction; added braces. + add prototypes for static functions. + * ggv/callbacks.h (zoom_to, recent_update): add prototypes + * ggv/main.c (get_number, ggv_parse_geometry, escape_underlines, + create_pixmap, parse_an_arg, ggv_file_readable): made static + * ggv/gtkscrollpane.c, main.c, prefs.c: fix compiler warnings + * ggv/main.c (recent_update): when duplicate filenames occur then + free memory of one of them. + (load_gs): gtk_clist_append makes its own copies of the used strings, + so an additional strdup is not necessary. + (create_ggv_window): removed widget vbox which was created, but never + used or freed. + * ggv/all of the above is courtesy of bug-spotting and coding skills of + Werner Koerner . + * ggv/main.c (recent_update_menus): only allocate menu once, as only one + instance is required. free it upon completing menu updating. free the + label. + * ggv/configure.in: bumped version to 0.82. + +1999-12-11 Daniel M German + + * ggv/Updated help/C/Makefile.am to make sure that help html files are + included in the distribution file. + * ggv/Released version 0.82 + +1999-12-07 Daniel M German + + * ggv/TODO: Added request to use gdk_pixbuf (might improve performance + in slow machines). + +1999-12-05 + + * ggv/configure.in: bumped version to 0.81. + + * ggv/Added command line options to the help file. Make sure the help + files are part of the distribution. + + * ggv/main.c: commented code for save_as option. If somebody really + wants to save "as" then she can mark all the pages and then save + marked pages. Otherwise, it is just needed to implement a "copy" + from the source file to the destination file. + + * ggv/ps.c (pscopyuntil): make sure we don't read beyond the end of + file. + + * ggv/main.c (open_prefs_dialog): make sure the source file is the + uncompressed one (if the source file is compressed). Fixes bug in + which a "save pages" from a compressed file did not workx + +1999-12-03 Nat Friedman + + * ggv/bonobo-application-ps.c (view_size_query_cb): Removed. + (view_realize_cb): Removed call to deleted function + gnome_view_size_request. + (reload_all_views): Likewise. + (view_factory): Removed signal connect to "size_query" on the + View. + +1999-12-02 Daniel M German + + * ggv/configure.in: created version 0.80 + + * ggv/prefs.c (load_prefs): ggv uses the shell to execute two + commands: one to convert from pdf to ps and another to + decompress. I protected the file names with " " so the file name + does not get interpreted by the shell. This has a disadvantage: if + the file name contains " then this will not work. Thanks to + Christian Hammers for the bug report. + +1999-11-30 Jaka Mocnik + + * ggv/ggvwindow.h (struct _ggv_window): added GtkWidget * members for + menu and popupmenu items for clearing and toggling pages. + * ggv/main.c: included in order to get prototype for isdigit(). + (load_gs, create_popup_menu, create_menus): set sensitivities for the + page marking items. + * ggv/ps.c: removed file_getTmpFileName() and replaced it with use of + tempnam() and g_get_tmp_dir(). + * ggv/gtkgs.c (gtk_gs_cleanup): free all filenames and set them to NULL. + once again, thanx for discovering these bug and providing the fixes go + to Werner Koerner . + +1999-11-28 Jaka Mocnik + + * ggv/gtkgs.c (start_intrepreter): pass filename of the uncompressed + file to gs if the original file was compressed. + (gtk_gs_load): return FALSE if the document could not be loaded - + this prevents segfaults when an empty document is loaded. + (set_up_page): set LC_NUMERIC locale to C before printing floats for + ghostscript and reset it back afterwards as ghostscript expects a + '.' decimal point while some european locales use ','. + * ggv/main.c (recent_update_menus): fixed occasional segfaults when + updating menus. also fixed a memory leak by freeing window_with_data + structures associated with menu items. don't translate the menu paths + as libgnomeui does that on the fly. + (recent_update): store files in a global list. + (recent_update_menus): don't free the list passed in as the parameter. + * ggv/ggvwindow.h (struct _ggv_window): changed recent_instantiated to + num_recent (if >0 then recent file menus have been instantiated). + * ggv/prefs.[ch]: removed gs_num_recent. + * ggv/thanx for reporting recent files list, compressed files and locale + problems and even sending patches for them go to Werner Koerner + + +1999-11-21 Jaka Mocnik + + * ggv/main.c (load_gs): call recent_add(). + (open_window): call recent_update() after successfully loading a + document. + * ggv/callbacks.c (file_open_ok_callback): remove call to recent_add(), as + we now call it from load_gs(). + +1999-11-20 Jaka Mocnik + + * ggv/gtkgs.c (gtk_gs_load): call gtk_gs_clean() even if the + fname is NULL. + * ggv/callbacks.c (print_callback): if the loaded document was compressed + use the uncompressed temp file as the argument for the print command. + * ggv/main.c: fix setting the sensitivity of 'File' menu items. + (open_prefs_dialog): handle "changed" signal of all GtkEntries with + prefs_changed_callback(). this fixes a bug that caused new values to + be applied only if the user "activated" the entry by pressing Enter. + * ggv/ggvwindow.h: add printmarked member to struct _ggvwindow. + +1999-11-15 Yuri Syrota + + * ggv/configure.in (ALL_LINGUAS): Added Ukrainian (uk). + +1999-11-06 Michael Meeks + + * gpdf/xpdf/gtkgesture.c (gesture_data_append_point): fix leak. + + * gpdf/xpdf/bonobo-application-x-pdf.c (setup_pixmap): Fix leak + + flicker. + + * gpdf/xpdf/GOutputDev.cc (~GOutputDev): Add clear of state stack + + clear text page + delete font. (startPage): fic gdkGC leaks. + (findColor): clean. + +1999-11-02 Daniel M German + + * ggv/main.c, callbacks.c: Moved error message "not marked pages" in + saved_as before the file dialog + * ggv/ps.c: Added code to fix a "feature" of NT in which + code is added after the %%EndSetup and before + the first %%Page: x y. This code belongs to + the Setup. + +1999-10-26 Jaka Mocnik + + * ggv/main.c (create_popup_menus): add all the "Toggle *" items to the + popup menu. + (toggle_pages): return immediately if no document is loaded. + * ggv/foot.xpm, foot_white.xpm: change background to None. + +1999-10-26 Daniel M German + + * ggv/Released version 0.70 + +1999-10-24 Jaka Mocnik + + * ggv/bonobo-application-ps.c (verb_*_page): check if a document + is loaded before turning the page. + * ggv/foot.xpm, foot_white.xpm: make the background transparent + instead of white. + * ggv/main.c, callbacks.c: removed some redundant marking code and + unneeded printouts. + +1999-10-24 Jaka Mocnik + + * ggv/main.c (set_page_sensitivities): enable the next button when + a non-structured document is loaded. + (load_gs): clear page list if a non-structured doc is loaded. + +1999-10-23 Jaka Mocnik + + * ggv/gtkgs.c (gtk_gs_load): set send_filename_to_gs to FALSE in case + of a structured doc. this fixes a nasty bug that caused ggv to + hang if a structured doc was loaded after a non-structured one. + +1999-10-21 Jaka Mocnik + + * ggv/main.c (create_menus): add a 'Print marked pages' item. + (save_marked_pages): a utility function that saves marked pages to + a file. copied code from file_save_ok_callback(). + * ggv/callbacks.[ch] (file_save_ok_callback): call save_marked_pages(). + (print_marked_pages_callback): save marked pages to a tmp file and + print them. does not unlink the tmp file. + * ggv/ggvwindow.h: renamed bRecentHasBeenInstantiated to + recent_instantiated. + * ggv/gtkgs.c (gtk_gs_marshall_signal_0): removed. + some formatting and var naming changes to make the code look nicer. + +1999-10-20 Jaka Mocnik + + * ggv/bonobo-application-ps.c (view_factory): set a UIHandler to our + view. + (view_activate_cb): merge/remove view menus on (de)activation. + (view_next_page_cb, view_prev_page_cb, view_recenter_page_cb): + callbacks for view menus. + +1999-10-11 Michael Meeks + + * gpdf/xpdf/GOutputDev.cc: Re-enable stroke color setting. + +1999-10-08 Michael Meeks + + * gpdf/xpdf/gpdf.cc (container_new): add to list before possibly removing. + + * gpdf/xpdf/bonobo-application-x-pdf.cc (destroy_embed): Quit on last + component close. + (load_pdf_from_stream): inline redraw-all with new API. + (redraw_view): implement (redraw_all): remove. (realize_mainbox): + remould. + (destroy_view): Fix serious memory corruption freeing pixmap + twice. + (view_activate): kill debug. + +1999-10-06 Peter Teichman + + * gpdf/xpdf/GOutputDev.cc: add return type for GOutputServerFont::isOk() + + * gpdf/xpdf/bonobo-application-x-pdf.cc: casting fixes, for compiling + with recent gcc + + * gpdf/xpdf/PSOutputDev.cc: same, more casting fixes + +1999-10-06 Michael Meeks + + * gpdf/xpdf/BonoboStream.cc (bfseek): Add debug case. + (bfread): nail immense leak. + + * gpdf/xpdf/gpdf.cc (container_set_view): Activate the component to + allow gestures to work. + +1999-10-05 Michael Meeks + + * gpdf/xpdf/bonobo-application-x-pdf.cc (setup_pixmap): Connect + gestures + add event mask. + + * gpdf/xpdf/gpdf.cc (container_close): Created. (container_close_cmd): + Use it. Huge header clean. + + * gpdf/xpdf/gtkgesture.[ch]: Create. + +1999-10-05 Jesus Bravo Alvarez + + * ggv/configure.in (ALL_LINGUAS): Added Galician (gl). + +1999-09-20 Jaka Mocnik + + * ggv/gtkgs.[ch]: removed all traces of non-existant foo() signal ;). + add an "interpreter_message" signal that gets called with lines of + interpreter output as a parameter. the default handler simply frees + the space allocated for message. seems like a nice way to pass + interpreter errors to the widget user. + * ggv/callbacks.[ch]: new files. moved all callbacks here from main.c + since it was growing too large. + (interpreter_message_callback): popup an error message with + interpreter output. line by line unfortunately :( + changed all instances of _cb to _callback - for consistency ;) + * ggv/main.c: make some variables non-static in order to be accessed + from callbacks.c. make all functions non-static. + * ggv/ggvwindow.h: add enums and declarations of variables and functions + shared by main.c and callbacks.c. + * ggv/Makefile.am: add callbacks.c to build process. + +1999-09-19 Jaka Mocnik + + * ggv/gtkgs.c: added some checks if the widget is realized before calling + set_up_page(). removed some commented-out messages and improved the + looks of some parts of the code. + (gtk_gs_goto_page): pass a duplicated gs_filename gtk_gs_load() as + gs_filename is freed in gtk_gs_load() before parameter is used. + * ggv/bonobo-application-ps.c (verb_next_page, verb_prev_page): make them + proper GnomeViewVerbFuncs. + (view_factory): register verbs. connect realize signal handler to + GtkGS in order to load and display document at realization time if it + has been loaded before the view was created. connect size_query signal + handler to the view. + (view_realize_cb): render & display the document. + (view_button_press_cb): popup verbs on button 3 click. + (view_size_query_cb): ask for as much space as GtkGS needs... + (stream_read): removed old code as I've implemented _Stream_copy_to() + ages ago. + (load_ps_from_stream): move view updating here from stream_read(). + (update_all_views): renamed to reload_all_views(), as this is really + what it does. + +1999-09-13 Karl Eichwalder + + * ggv/main.c (create_menus): Add accel key for "Save As..." + (cf. gnumeric). + + * ggv/main.c (about_callback): Fix typo. + * ggv/main.c (about_callback): Fix another one: It's PostScript, but + Ghostscript (note the case of "...script") ;) + * ggv/main.c (open_prefs_dialog): Ditto. + +1999-09-11 Michael Meeks + + * gpdf/xpdf/bonobo-application-x-pdf.cc (destroy_view): destroy don't + unref, make more paranoid add debug. (destroy_embed): Clean. + + * gpdf/xpdf/gpdf.cc (key_press_event_cb): Added all manner of + shortcuts. + (container_new): Add key stuff (container_destroy_cb): Implement. + (container_destroy): Add paranoid check. + +1999-09-08 Jaka Mocnik + + * ggv/ggvwindow.h: it is plain ugly to define and not only declare a + GdkCursor in a header file, so I removed the definition. + * main.c (pan_cursor): define static GdkCursor *pan_cursor; + (create_popup_menus): make #defines for indexes of relevant items + in the popupMenu[] array in order to avoid sensitivity setting + mayhem that followed when someone inserted new items in the menu. + * ggv/bonobo-application-ps.c (pan_cursor): same as above. + (verbs, embeddable_factory): sync with bonobo verb changes. + (view_factory): remove call to set_prefs() and instead duplicate + most of its code, as it was changed to take ggvwindow* as parameter + instead of GtkGS*. next time I'd appreciate if people checked how + bonobo parts compiled before comitting their changes. + * ggv/application-ps.gnorba: brought up-to-date. + +1999-09-07 Tomas Ogren + + * ggv/main.c: Fixed a typo + +1999-09-07 Michael Meeks + + * gpdf/xpdf/gpdf.cc (container_new): Fiddled with scrollpane + +1999-09-07 + + * ggv/main.c: updated authors + +1999-09-06 Daniel M. German + + * ggv/main.c, added ggvwindow.h, prefs.h, prefs.c + Modified prefs so they apply to the ggv_window + instead of gs, since some options apply to the former. + +1999-09-06 Andreas Persenius + + * ggv/main.c, prefs.h, prefs.c: + Added the option to jump at the beginning of a page when + scrolling with pageup, page down. + +1999-09-03 Miguel de Icaza + + * ggv/main.c (about_callback): Use the imlib visual for displaying the + image loaded with imlib. Fixes crashes on multi-depth visuals. + +1999-09-03 Andreas Persenius + + * ggv/main.c: + Adds ... to File/Open + Removes ... from File/Print... since no dialog comes up. + Sets the cursor position to 0 in the text entrys in the preferences + dialog. + +1999-09-03 Daniel M. German + + * ggv/prepared version 0.61 + * ggv/main.c, gtkgs.c, ps.c + Finished support to save marked pages. + +1999-09-02 Matthias Warkus + + * ggv/ggv-splash.png: Added beautiful image for about widget. + +1999-09-01 Michael Meeks + + * gpdf/xpdf/bonobo-application-x-pdf.cc: Fix a massive leak :-). + Considerably simplified with GtkPixmap. Fixed location problems. + +1999-08-29 Miguel de Icaza + + * ggv/main.c (escape_underlines): Include escape_underlines (copies + from mc/gnome/gpopup2.c). + (recent_update_menus): Escape file names from underlines. + +1999-08-27 Michael Meeks + + * gpdf/xpdf/bonobo-application-x-pdf.cc: Remove count of embeddable + servers: seems to be handled inside Bonobo now. + +1999-08-27 Karl Eichwalder + + * ggv/ggv.spec.in: Minor fixes. + +1999-08-27 Karl Eichwalder + + * ggv/ggv.desktop (Comment): PostScript vs. Ghostscript. Typo. + +1999-08-27 + + * ggv/gtkgs.c,main.c: Finished support for selecting pages + * ggv/ps.c: Started implementation of saving selected pages + * ggv/foot.xpm, foot_white.xpm: Added the pixmaps for the marks + +1999-08-26 Michael Meeks + + * gpdf/xpdf/gpdf.cc (component_destroy): Improved clean up. + + * gpdf/xpdf/bonobo-application-x-pdf.cc (bed_free_data): Expand, and + clean; remove redundant pdf_stream delete. + +1999-08-25 + + * ggv/main.c: Starting adding support to select individual pages + * ggv/main.c: Added fullscreen command line option + +1999-08-24 Michael Meeks + + * gpdf/xpdf/application-x-pdf.gnorba: Update to new mime type. + + * gpdf/xpdf/Makefile.am (gnorba_DATA): Rename mime type. + Remove glade. + + * gpdf/xpdf/gpdf.cc (main): File up a container if we fail to load any + of the command line files. + +1999-08-24 Michael Meeks + + * gpdf/xpdf/Makefile.am: Cleaned + added thread bits. + + * gpdf/xpdf/bonobo-image-x-pdf.cc: Add locking round 'xref' global. + Remove CORBA_Environment global. + +1999-08-24 Michael Meeks + + * gpdf/xpdf/bonobo-image-x-pdf.cc (bed_free_data): Rationalised Stream + duplicate / release, and scoped BonoboFile correctly. + + * gpdf/xpdf/BonoboStream.cc (bfseek): Add init / free to all corba + exceptions, ( stupidly lost this code somehow ). + + * gpdf/xpdf/bonobo-image-x-pdf.cc (render_page): Add startDoc. + (main): Add freeParams. + +1999-08-24 Michael Meeks + + * gpdf/configure.in: Removed check for Glade. + + * gpdf/Makefile.am (gpdf.*): Renamed from xpdf.* + +1999-08-24 Michael Meeks + + * gpdf/configure.in: Add EXTRA_GLIB_LIBS/CFLAGS to include thread + support. + +1999-08-24 + + * ggv/prepared version 0.51 + * ggv/Added MAINTAINERS file + * ggv/gtkgs.c: Now it _deletes_ temporal files :) + * ggv/main.c: Added geometry, spartan and nomenubar command line options + and support for them + * ggv/main.c: Add .ps or .pdf extension if not specified in the command line + * ggv/ps.c: changed all free and mallocs to their gnome counterparts + +1999-08-23 Miguel de Icaza + + * gpdf/xpdf/bonobo-image-x-pdf.cc: Replace exit() with gtk_main_quit() + +1999-08-23 Miguel de Icaza + + * ggv/bonobo-application-ps.c (embeddable_factory): Adapt to current Bonobo. + +1999-08-23 Michael Meeks + + * gpdf/xpdf/gpdf.cc (container_launch_component): Fix flags. + (container_create_toolbar): Fix for new Bonobo. + +1999-08-23 Michael Meeks + + * gpdf/xpdf/Makefile.am: Added helper programs back in. + + * gpdf/xpdf/bonobo-image-x-pdf.cc (view_create_menus): Toolbars. + +1999-08-23 + + * ggv/Started support for command line options + * ggv/Close window is now active + +1999-08-22 Nat Friedman + + * ggv/bonobo-application-ps.c (main): Use bonobo_main. + +1999-08-22 Miguel de Icaza + + * gpdf/xpdf/bonobo-image-x-pdf.cc (main): Add error checking for + factory registration. + +1999-08-22 Michael Meeks + + * gpdf/xpdf/bonobo-image-x-pdf.cc: Add zoom. + +1999-08-22 Herbert Valerio Riedel + + * ggv/main.c: changed type of data in struct _window_with_data to + pointer (caused problems when sizeof(gpointer) > sizeof(gint) - + eg. on alphas...) + +1999-08-21 Herbert Valerio Riedel + + * ggv/Makefile.am: integrated spec file + * ggv/ggv.spec.in: reworked spec file, based on old ggv.spec + * ggv/configure.in: added ggv.spec.in to AC_OUTPUT + * ggv/ggv.spec: removed, as it is autogenerated now + +1999-08-20 Daniel M. German + + * ggv/prepared version 0.50 + * ggv/removed debug messages + * ggv/added support for most recently used documents + * ggv/it deletes temporal files now + +1999-08-19 Michael Meeks + + * gpdf/xpdf/PDFDoc.cc: Altered to read / write lines. + + * gpdf/xpdf/PDFDoc.cc: Move FileStream::checkHeader so its called in + FileStream constructor. + +1999-08-18 Michael Meeks + + * gpdf/xpdf/gpdf.cc: cloned from test-container. + (launch_server): use GOAD_ACTIVATE_SHLIB not '0' + +1999-08-16 Michael Meeks + + * gpdf/xpdf/Makefile.am (bin_PROGRAMS): Hack to only make bonobo + component. + + * gpdf/xpdf/bonobo-image-x-pdf.cc (view_factory): Init all members. + +1999-08-15 Michael Meeks + + * gpdf/xpdf/Now bonobo-image-x-pdf works, but everything else is + broken: use + + make bonobo-image-xpdf to compile... + +1999-08-11 Michael Meeks + + * gpdf/xpdf/bonobo-image-x-pdf.cc: Fixed innumerable bugs, some in + bonobo :-) + (load_image_from_stream): Try closing the file to let its contents + hit disk before reading from it :-) + (configure_size): Don't get scared by configure_size. + (redraw_view): Get the parameters in some sort of order. + +1999-08-11 Michael Meeks + + * gpdf/xpdf/bonobo-image-x-pdf.cc: Added. + + * gpdf/xpdf/Makefile.am: added bonobo-image-x-pdf.c + +1999-08-03 Michael Meeks + + * gpdf/xpdf/gpdf.cc: Lots of updates, gives up on logging changes + ( for a bit. ) + +1999-08-02 Michael Meeks + + * gpdf/xpdf/GOutputDev.cc: Fix more silly region merging bugs. + +1999-08-01 Michael Meeks + + * gpdf/xpdf/Makefile.in: Added -lglade, -lglade-gnome & Added -Wall + + * gpdf/xpdf/gpdf.glade: Added. + + * gpdf/xpdf/gpdf.cc (loadFile): Add typecast. + Remove all DOC_ROOT's magic numbers. + Add glade GUI, + Lots of other bits ... + +1999-07-29 Michael Meeks + + * gpdf/xpdf/GOutputDev.cc: Hahaaa... the bug ! :-) A difference in how + GDK / X deal with merging rectangles and regions. Good. + + * gpdf/xpdf/gpdf.cc (doc_redraw_event): Messing around. + + * gpdf/xpdf/GOutputDev.cc (drawChar): Fix char printed as string. + +1999-07-13 Jaka Mocnik + + * ggv/application-ps.gnorba: use GNOME/Embeddable*. + * ggv/main.c (load_gs): if the loaded document is the same as the one + viewed, don't reset the page to 0. + (set_gs_prefs): really reload the document. + (print_callback): use gnome_execute_shell() + * ggv/prefs.c (load_prefs): add %s to the default printing command. + +1999-07-11 Tomas Ogren + + * ggv/gtkgs.c: Process events to keep the UI somewhat alive.. + +1999-07-09 Tuomas J. Lukka + + * ggv/Fix some cvsignores + +1999-07-08 Daniel M. German + + * ggv/ps.c, gtkgs.c There seem to exist some PostScript documents that + do not have !PS at the beginning. Heck, they have nothing. For example, + I was trying to read a file that started with: + + %! coverpage + + /beginword % Usage: str x y beginword + { + ... + + Even if a remove the line with %! it is still a valid PostScript + file. + + Sooo, I decided (temporarily at least) to do what gv does: pass + the file to GhostScript in the hope that it will be able to deal + with it. The current error messages are sent to stderr. We should + handle them in a nicer way. + +1999-07-08 Tuomas J. Lukka + + * ggv/From: Alexander Savelyev + patch to fix small buglet + +1999-07-08 Tuomas J. Lukka + + * ggv/Add keystrokes to menu entries. + +1999-07-08 Tuomas J. Lukka + + * ggv/Fixed my own caused bug - accelerators should + work again. + +1999-07-03 Daniel M. German + * ggv/gtkgs.c fixed a bug that froze the + interface whenever a encapsulated postscript + file was displayed. + * ggv/main.c added functionality to the file_open_window + it now uses the directory where the current + document is as the default directory. + +1999-07-02 Tuomas J. Lukka + + * ggv/Add '+' and '-' keys for zoom in & out + * ggv/clean up key_pressed_event_callback by moving out the + stop_emit + +1999-07-02 Tuomas J. Lukka + + * ggv/Allow the prefix to be just %!PS, not just %!PS-Adobe. + Many files have just that. + +1999-06-25 Jaka Mocnik + + * ggv/test-container.c: removed. it was just another nuisance + that had to be updated all the time. test-container-autoload + from bonobo package will do for testing the component. + * ggv/Makefile.am: updated to reflect the above. + +1999-06-22 Daniel M. German + * ggv/main.c Improved the file open window. It does not close + if the selected file is a directory or if the + file does not exist. It now handles wildcards in the + file name. + +1999-06-22 Nat Friedman + + * ggv/test-container.c: Use gnome_bonobo_object_client_free_verbs + instead of gnome_bonobo_object_free_verbs. Ditto with + gnome_bonobo_object_client_get_verbs and + gnome_bonobo_object_client_do_verb. + + * ggv/bonobo-application-ps.c (view_factory): Accept the ViewFrame as + a parameter. + +1999-06-22 Matt Loper + + * ggv/bonobo-application-ps.c (bonobo_object_factory): Changed to + eliminate need for path, and to reflect GnomeBonoboObjectFactory + -> GnomeComponentFactory change. Return GnomeObject instead of + GnomeBonoboObject. + +1999-06-21 + * ggv/Contributed to the help + +1999-06-20 + + * ggv/Released version 0.40 + * ggv/Fixed pt_BR.po + +1999-06-18 Jaka Mocnik + + * ggv/main.c (create_ggv_window): fix toplevel sizing. + +1999-06-16 Jaka Mocnik + + * ggv/main.c (hide_menubar_callback): becomes show_menubar_callback. + (hide_toolbar_callback): becomes show_panel_callback. + (show_menubar_callback): small fix to properly enable the togglebuttons + when the menus are not created upon startup. + * ggv/main.c, prefs.[ch]: changed gs_toolbar to gs_panel. + +1999-06-15 Jaka Mocnik + + * ggv/main.c: take care of the reload item sensitivity. turn hide/show items + into toggleitems. some general work on code aesthethics. + +1999-06-14 Jaka Mocnik + + * ggv/test-container.c: use new convenience functions for handling + the verbs instead of using CORBA functions. + * ggv/bonobo-application-ps.c: use the GNOME_Stream_copy_to() function, + as I've just implemented it for GnomeStreamFS in bonobo. + +1999-06-12 Daniel M. German + + * ggv/Added pt_BR.po, contributed by Lalo Martins + +1999-06-09 Tuomas J. Lukka + + * ggv/Help file small edit + +1999-06-09 Michael Meeks + + * gpdf/xpdf/gpdf.cc (main): Add error init. + +1999-06-06 Jaka Mocnik + + * ggv/gtkgs.c (gtk_gs_load): set document size parameters to 0. + * ggv/main.c (create_menus): added tooltip strings to UI items. install + menu hints. + (load_gs): report some status via appbar flashes. + (create_ggv_window): add a statusbar. + +1999-06-05 Tomas Ogren + + * ggv/configure.in: Add sv to ALL_LINGUAS + +1999-06-05 Jaka Mocnik + + * ggv/gtkgs.c (gtk_gs_load): don't try to print out page order + unless we've successfully loaded the document. + +1999-06-04 Sergey Panov + + * configure.in: Add ru to ALL_LINGUAS + +1999-06-03 Michael Meeks + + * gpdf/xpdf/GOutputDev.cc (GOutputDev): Actually set up pixmapW & H + (GOutputDev): Setup 'depth' correctly. + + * gpdf/xpdf/gpdf.cc (main): Moved freeParams() to after the main loop ! + + * gpdf/xpdf/Params.cc (initParams): Added assert on fontPathLen. + (freeParams): Clean global pointers on free. + + * gpdf/xpdf/Makefile.in (CXXFLAGS): Added LTKSRCDIR and Xpm_CFLAGS to + CXXFLAGS. + +1999-06-02 Jaka Mocnik + + * ggv/main.c (create_menus): moved show/hide menubar/side panel to + settings menu. disable the menu items that do nothing yet. + (print_callback): print by system()ing a command on the ps file. + usually, this would be lpr. + (open_prefs_dialog): add a Printing page, letting the user specify + the command used to print files. + * ggv/prefs.[ch]: added preferences for printing command. + * ggv/help/C/ggv.sgml: describe the menus and the new printing feature. + * ggv/configure.in: check if we have lpr's path for default print + command. + +1999-06-01 Jaka Mocnik + + * ggv/bonobo-application-ps.c, test-container.c: respect recent + changes to the Verbs interface (no more verb codes). + +1999-05-31 Matt Loper + + * ggv/application-ps.gnorba: Changed two goad_id's and one repo id to + reflect the Component -> BonoboObject namechange. + + * ggv/test-container.c: Changed minor things to reflect Component -> + BonoboObject renaming. + + * ggv/bonobo-application-ps.c: Changed comment to reflect + renaming. Changed component_data_t typedef to + bonobo_object_data_t. + (bonobo_object_destroy_cb): Renamed component_destroy_cb function + to bonobo_object_destroy_cb. + (bonobo_object_factory): Renamed component_factory function to + bonobo_object_factory. + +1999-05-31 Jaka Mocnik + + * ggv/main.c (struct _ggv_window): add prev[item|pu] and next[item|pu] + members that point to Next/Prev page [popup]menu items. use these + for setting their sensitivity. + (set_page_sensitivities): new function to set sensitivity of all + next/prev widgets (buttons, menuitems) properly. + (select_page_callback, goto_page): use the above. + (create_popup_menu): add zoom in/out items. + * ggv/help/C/ggv.sgml: some changes to make english look more english ;) + added another chapter on the preferences. + +1999-05-30 Jaka Mocnik + + * ggv/main.c (goto_page): set prev/next button sensitivity properly. + (about_callback): added myself to the authors ;) + * ggv/bonobo-application-ps.c (component_factory): add some verbs + to our component and connect a handler for do_verb signal. + gtk_object_set_data() our component_data to the actual + GnomeComponent as we'll need this in do_verb_cb(). + (do_verb_cb): handler for do_verb signal. + * ggv/test-container.c (add_verb): add an item with the verb + name to Verbs menu. connect "activate" signal handler and + gtk_object_set_data() the GnomeComponent that the verb was + acquired from to the item. + (add_cmd): get component's verb list and create menu items + with their names in Verbs menu. + (verb_cb): get the GnomeComponent that the verb was acquired from + using a gtk_object_get_data() and do a GNOME_Component_do_verb() + on it with verb_name set to NULL as we don't pass it to the + callback. + +1999-05-29 Michael Meeks + + * gpdf/xpdf/Makefile.in (GPDF_OBJS): Remove XOutputDev + (all): Remove all but gpdf. + + * gpdf/xpdf/gpdf.cc: Add define GString / undef. + (main): Argc not Argv :) + + * gpdf/xpdf/GOutputDev.cc (findColor): Made pigs ear of colour + mappings. + +1999-05-28 Michael Meeks + + * gpdf/xpdf/GOutputDev.cc (drawChar16): XChar2b -> GdkWChar + +1999-05-28 Daniel M. German + * gtkgs.c + * ggv/gtkgs.h + * ggv/main.c + Added support for non structured documents. It still + requires testing. + * ggv/main.c + Disable buttons when document has not been opened + Enable buttons once it has been open + Disable prev page in structured documents + +1999-05-27 Michael Meeks + + * gpdf/xpdf/GOutputDev.cc (GOutputFont): Hacks. + (GOutputFont): Renamed. + (getFont): killed redundant 'display' + getGdkFont not getXFont. + (GOutputDev): NB. colormap -> gtk_widget_get_default_colormap () + which returns GdkColormap *, killed colormap & depth1 in prototype. + Removed redundant assigns. + NB. Miguel says 'miguel> michael: a GdkPixmap is a GdkWindow' + Many misc. fixes upto convertSubPath. + + * gpdf/xpdf/GOutputDev.h: Comments 'G'd and GOutputDev updated. + XPoint -> GdkPoint + + * gpdf/xpdf/Makefile.in (CXXFLAGS): Add GOOSRCDIR. + +1999-05-27 Michael Meeks + + * gpdf/README.CVS: Elucidated the GPL nature of xpdf. + +1999-05-27 Jaka Mocnik + + * ggv/bonobo-application-ps.c (main): remove hardcoded GtkGS + instead load GS configuration from /bonobo-application-ps/... + * ggv/prefs.[ch] (load_prefs, save_prefs): pass prefix as a parameter + to enable loading prefs for both ggv and bonobo component. + (set_prefs): apply prefs to a GtkGS widget. + * ggv/ps.h: enclosed in #ifndef __GGV_PS_H__/#endif. + * ggv/main.c: respect changes to prefs.[ch]. + * ggv/test-container.c: activate component after creating the view so + that it can receive mouse events. + * ggv/Makefile.am: share prefs sources between ggv and bonobo component. + +1999-05-27 Jaka Mocnik + + * ggv/bonobo-application-ps.c: new file. a bonobo component that + displays postscript via gtkgs widget. + * ggv/test-container.c: a test container app for bonobo component. + stolen from bonobo source tree. + * ggv/configure.in: check for bonobo. + * ggv/Makefile.am: if bonobo is present, build ps component and + test-container. + * ggv/application-ps.gnorba: gnorba file for the component. note that + none of the bonobo stuff is installed yet. to use the component, + you have to copy bonobo-application-ps somewhere in your PATH and + the .gnorba file to $prefix/etc/CORBA/servers and run test-container. + +1999-05-26 Tuomas J. Lukka + + * ggv/Start a help file + +1999-05-24 Jaka Mocnik + + * ggv/gtkscrollpane.c (gtk_scrollpane_update_slider_size): fixed + the size calculation code. gdk_window_move_resize() works as it + should now. + (gtk_scrollpane_motion_notify): fixed this also. + +1999-05-23 Tuomas J. Lukka + + * ggv/Implement the zoomin/zoomout buttons and change to using + magsteps. + * ggv/Prevent the scrollpane from growing indefinitely (odd bug, + now commented out as FIXME in gtkscrollpane.c) + +1999-05-23 Tuomas J. Lukka + + * ggv/main.c : add zoomin, zoomout buttons. We need gnome stock + buttons for these! + The buttons don't do anything yet, though: we need to + make the variable have a reasonable meaning (I'd prefer magstep, + opinions?) + +1999-05-23 Jaka Mocnik + + * ggv/main.c (main): load preferences BEFORE opening files from + command line arguments. + +1999-05-20 Jaka Mocnik + + * ggv/prefs.[ch]: added preferences for toolbar and menubar + visibility. + * ggv/main.c (open_prefs_dialog): new Layout properties page for + the above settings. + (button_press_callback, button_release_callback): + moved commented out cropping code to middle-button click and + assigned left-button to start panning. + (motion_callback): pan if left mouse button is pressed. + * ggv/gtkgs.[ch] (gtk_gs_scroll): new public function to scroll the + visible parts. + * ggv/gtkscrollpane.h: added in_slider member. set to true when + pointer is in the slider window. + * ggv/gtkscrollpane.c: respect themes. fixed size requisition signal + handler. + +1999-05-20 Jaka Mocnik + + * ggv/main.c: some sanitizing of cases when a document can't be loaded. + * ggv/gtkgs.c: hide gs target window when a document can't be loaded and + show it when a document is successfully loaded. + * ggv/gtkscrollpane.c: fixed a bug in expose signal handler that caused + the shadow around the trough not to be redrawn. + +1999-05-19 Jaka Mocnik + + * ggv/main.c (create_ggv_window): cosmetics. removed the frame + around "sidebar" and added one around GtkGS widget. + (hide_menubar_callback): fixed. + (reload_callback): fixed. + (set_gs_prefs, apply_gs_prefs): new functions for setting + preferences for a single and all open GtkGS widget. + (open_prefs_dialog): a dialog for setting preferences. + * ggv/gtkscrollpane.c (gtk_scrollpane_update_slider_size): + fixed a bug that caused the scrollpane to require more space + with each size_request signal. + * ggv/prefs.[ch]: new files; loading and saving of preferences. + * ggv/gtkgs.[ch]: changed members gs_gs_cmd_scan_pdf to gs_scan_pdf_cmd + and gs_uncompress_command to gs_uncompress_cmd. + (gtk_gs_set_pagemedia): changed the interface a bit. + * ggv/ps.[ch]: add a #define PAPER_SIZE_COUNT in order to use papersizes[] + in prefs dialog. + * ggv/Makefile.am: added prefs.[ch] to ggv sources. + +1999-05-18 Jaka Mocnik + + * ggv/main.c (create_menus): use gnome-app-helper stuff where + appropriate. restructured the menus a bit. + (create_popup_menus): use gnome-popup-menu for this. + (about_callback): cosmetics. + (file_open_destroy_callback): in order to reflect its use, + changed to file_open_cancel_callback. + (file_open_delete_callback): new handler for file selection's + delete event. + (struct _ggv_window, open_callback, file_open_ok_callback, + file_open_cancel_callback): use ggv->file_sel instead of a + global file_sel. + * ggv/gtkscrollpane.c (gtk_scrollpane_size_request): make it work + as it should. + +1999-05-17 Tuomas J. Lukka + * ggv/main.c: factor out goto_page and make it jump in the list if + the entry is not visible. + * ggv/Update fi.po + +1999-05-06 Jaka Mocnik + + * ggv/main.c (struct _ggv_window): put _window_with_data arrays + for menus here instead of dynamically allocating it. + (open_window, close_window): new helper functions to open and close + ggv windows. + (create_menus, new_callback): add a "New Window" item to "File" + menu to open a new window. + (delete_callback): new function, called instead of exit_callback() + on window delete_events. + (close_cmd): becomes close_callback(). + (create_ggv_window): make windows accept dropped files. + (drop_callback): new function: load files dropped on a window. + also g_free() what needs to be freed all over the code. + +1999-05-05 Jaka Mocnik + + * ggv/gtkgs.c: add checks if the GtkGS widget is realized before + calling gtk_gs_munge_adjustments() preventing segfaulting due + to moving and resizing a non-existant window. + +1999-04-23 Daniel M. German + * ggv/gtkscrollpane.h, gtkscrollpane.c + I modified the API for scrollpane in order to + replace scroll up, scroll down, scroll left + and scroll right with one function: + gtk_scrollpane_step. + Added scroll_page_goto_edge + Added wrapping option to scrolling, this + allows the user to move from one page to another + when pressing space or backspace + * ggv/main.c + Replace calls to scrolling functions for new functions + When scrollign through document (space), it moves + the pane to the top corner in a new page. Backspace + should be modified accordingly. New functions allows + to write less code when handling different orientations. + The idea is to have less repetion of code. The API for scrolling + might change again in order to accomodate this. + +1999-04-22 Daniel M. German + * ggv/main.c + * Changed 'q' accelerator to Ctrl-Q, which is the + GNOME standard. I also changed the location of the + quit accelerator to the menu definition, so it + uses the proper callback. + * ggv/Added other accelerators to the menu + +1999-04-22 Tuomas J. Lukka + * ggv/Add the 'q' accelerator for getting out a la ghostview. + * ggv/Add size requests to try to behave well + * ggv/Add a scrollbar (scrolled_window) around the page list + +1999-04-15 Daniel M. German + * ggv/main.c + It now kills all windows before exiting (exit_callback), ergo + no gs process are left running. + o + +1999-04-14 Daniel M. German + * Released version 0.30 + * ggv/gtkgs.c, gtkgs.h + Fixed the bad bug in which GS stopped processing input. + The "truly bad hack" is history (I hope :) + +1999-04-09 Shooby Ban + * ggv/Added hungarian translation + +1999-03-28 Tuomas J. Lukka + * ggv/Add fi to all_linguas + * ggv/set usize of scrollpane in main.c + * ggv/Fix gtk_gs bug: the adjustments were not set properly + since size_allocate was called when gs->width was + not yet set. My fix needs to be looked at. + The scrollpane now works. + * ggv/Does not allocate full document size any more - this + is bad because it goes over screen size easily. + +1999-03-28 Tuomas J. Lukka + * ggv/Fix desktop fi entry + +1999-03-13 Daniel M. German + + * ggv/ggv.desktop (Comment): added German translation by Matthias + Warkus. + +1998-11-28 Raja R Harinath + + * ggv/main.c (create_ggv_window): + Remove call to deleted function `gtk_clist_set_policy' which + was non-functional anyway. (xref gtk+/ChangeLog: + Wed Nov 19 01:22:42 1998 Tim Janik ). + + * ggv/gtkgs.c (gtk_gs_init): + Removed setting of the GTK_BASIC flag (xref gtk+/ChangeLog: + Wed Nov 18 22:54:36 1998 Tim Janik ). + +1998-11-10 Raja R Harinath + + * ggv/configure.in (paths.h): New check. + (GS_PROG): Check for the full path of `gs'. + (GS_PATH): New #define, defined to GS_PROG. + * ggv/acconfig.h (GS_PATH): New define. + * ggv/file.c: Protect inclusion of `paths.h' with HAVE_PATHS_H. + * ggv/gtkgs.c (gtk_gs_init): Don't hardcode "/usr/bin/gs", use the + discovered GS_PATH. + From "Brandon S. Allbery" . + +1998-08-12 Nuno Ferreira + + * ggv/configure.in (ALL_LINGUAS): Added Portuguese translation after + the split of gnome-graphics. + +Fri Aug 7 11:54:03 1998 Jonathan Blandford + * ggv/main.c: commented out crop code temporarily. + * ggv/when it works correctly, i'll uncomment it... (: + +1998-08-07 Nuno Ferreira + + * ggv/ggv.desktop: Added Portuguese translation. + +Wed Jul 29 18:19:12 1998 Jonathan Blandford + many changes. A bit more stable now. + * ggv/main.c: Added support for key presses and some mouse click support. + * ggv/gtkscrollpane.c (gtk_scrollpane_update_slider_size): fixed a big bug. + * ggv/gtkgs.c: fixed many bugs. + +Mon Jul 27 14:50:28 1998 Tom Tromey + + Some `-ansi -Wall -Wmissing-declarations' fixes: + * ggv/gtkgs.c (catchPipe): Now static. + (start_interpreter): Removed unused variables. + Include , , and . + (gtk_gs_goto_page): Removed unused variable. + (is_interpreter_ready): Now static. + (is_interpreter_running): Likewise. + * ggv/file.c: Turned C++ comments into C comments. + * ggv/file.h (file_getTmpFilename): Fixed declaration to match + definition. + * ggv/ps.c: Include "file.h", . + (file_getTmpFilename): Argument now const. + (get_next_text): Renamed from `gettext' to avoid clash with GNU + gettext. + + Added gettext and argument parsing: + * ggv/main.c (startup_files): New global. + Include first. + (parse_an_arg): New function. + (parser): New structure. + (main): Pass parser to gnome_init. + (orientationMenu2): Wrapped strings with N_. + (fileMenu): Likewise. + (documentMenu): Likewise. + (helpMenu): Likewise. + (mainMenu): Likewise. + (about_callback): Use _() around user-visible strings. + (open_callback): Likewise. + +Fri Jul 10 20:10:37 Jonathan Blandford + + * ggv/rewrite of ggv. many files removed. some added. + following files have been added: TODO, main.c, gtkgs.c, gtkgs.h + gtkscrollpane.h gtkscrollpane.c + ggv is no longer nearly as dependent on the old ghostview code + any more. + +1998-08-07 Federico Mena Quintero + + Split of gnome-graphics into ee and ggv modules: + + * ggv/autogen.sh: + * ggv/configure.in: + * ggv/Makefile.am: Adjusted for new ggv module. diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..54caf7c1 --- /dev/null +++ b/INSTALL @@ -0,0 +1,229 @@ +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +Foundation, Inc. + + This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. Run `./configure --help' +for details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' cannot figure out +automatically, but needs to determine by the type of machine the package +will run on. Usually, assuming the package is built to be run on the +_same_ architectures, `configure' can figure that out, but if it prints +a message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + + Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +will cause the specified gcc to be used as the C compiler (unless it is +overridden in the site shell script). + +`configure' Invocation +====================== + + `configure' recognizes the following options to control how it +operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..afb1c968 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,5 @@ +SUBDIRS = cut-n-paste data lib shell viewer po + +intltool_extra = intltool-extract.in intltool-merge.in intltool-update.in + +EXTRA_DIST = $(intltool_extra) diff --git a/NEWS b/NEWS new file mode 100644 index 00000000..e69de29b diff --git a/README b/README new file mode 100644 index 00000000..e69de29b diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 00000000..7eaf1f1e --- /dev/null +++ b/autogen.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +PKG_NAME="evince" + +(test -f $srcdir/configure.ac) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level $PKG_NAME directory" + exit 1 +} + +which gnome-autogen.sh || { + echo "You need to install gnome-common from the GNOME CVS" + exit 1 +} + +USE_COMMON_DOC_BUILD=yes REQUIRED_AUTOMAKE_VERSION=1.8 USE_GNOME2_MACROS=1 . gnome-autogen.sh diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000..6a45bb0d --- /dev/null +++ b/configure.ac @@ -0,0 +1,121 @@ +dnl Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) +AC_INIT(evince, 0.1.0) +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) + +dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work +AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS") + +AM_CONFIG_HEADER(config.h) + +AM_MAINTAINER_MODE + +AM_PROG_LIBTOOL + +AC_ISC_POSIX +AC_PROG_CC +AM_PROG_CC_STDC +AC_PROG_CXX +AC_STDC_HEADERS +AC_PROG_RANLIB +AC_PROG_INTLTOOL + +ALL_LINGUAS="de" + +AM_GLIB_GNU_GETTEXT + +GETTEXT_PACKAGE=AC_PACKAGE_NAME +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.]) + +PKG_CHECK_MODULES(LIBEVPRIVATE, gtk+-2.0 >= 2.4.0) +PKG_CHECK_MODULES(RECENT_FILES, gtk+-2.0 >= 2.4.0 libgnomeui-2.0 >= 2.4.0 libbonobo-2.0) +PKG_CHECK_MODULES(SHELL, gtk+-2.0 >= 2.5.0 libgnomeui-2.0 gnome-vfs-2.0 libbonoboui-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libglade-2.0) + +dnl Compile with disable-deprecated switches + +AC_ARG_ENABLE(deprecated, +AC_HELP_STRING([--disable-deprecated], + [Don't allow any deprecated GTK+/etc. features.]), +set_enable_deprecated="$enableval",[ +if test -f $srcdir/autogen.sh; then + is_cvs_version=true + set_enable_deprecated=no +else + set_enable_deprecated=yes +fi +]) +AC_MSG_CHECKING([whether to disable deprecated glib/gtk+/etc. features]) +if test "$set_enable_deprecated" != "yes"; then + AC_MSG_RESULT(yes) + EVINCE_DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED" +else + AC_MSG_RESULT(no) + EVINCE_DISABLE_DEPRECATED="" +fi +AC_SUBST(EVINCE_DISABLE_DEPRECATED) + +dnl Turn on the additional warnings last, so -Werror doesn't affect other tests. +dnl stolen from nautilus and gnome-common + +AC_ARG_ENABLE(more-warnings, +[ --enable-more-warnings Maximum compiler warnings], +set_more_warnings="$enableval",[ +if test -f $srcdir/autogen.sh; then + is_cvs_version=true + set_more_warnings=yes +else + set_more_warnings=no +fi +]) +AC_MSG_CHECKING(for more warnings, including -Werror) +if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then + AC_MSG_RESULT([yes, using gcc]) + CFLAGS="\ + -Wall \ + -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \ + -Wnested-externs -Wpointer-arith \ + -Wcast-align -Wsign-compare \ + -Werror \ + $CFLAGS" + +dnl case " $CFLAGS " in +dnl *[\ \ ]-ansi[\ \ ]*) ;; +dnl *) CFLAGS="$CFLAGS -ansi" ;; +dnl esac +dnl case " $CFLAGS " in +dnl *[\ \ ]-pedantic[\ \ ]*) ;; +dnl *) CFLAGS="$CFLAGS -pedantic" ;; +dnl esac + + for option in -Wno-strict-aliasing -Wno-sign-compare; do + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $option" + AC_MSG_CHECKING([whether gcc understands $option]) + AC_TRY_COMPILE([], [], + has_option=yes, + has_option=no,) + if test $has_option = no; then + CFLAGS="$SAVE_CFLAGS" + fi + AC_MSG_RESULT($has_option) + unset has_option + unset SAVE_CFLAGS + done + unset option +else + AC_MSG_RESULT(no) +fi + +dnl ========================================================================== + +AC_OUTPUT([ +Makefile +cut-n-paste/Makefile +cut-n-paste/recent-files/Makefile +data/Makefile +po/Makefile.in +shell/Makefile +viewer/Makefile +]) diff --git a/cut-n-paste/Makefile.am b/cut-n-paste/Makefile.am new file mode 100644 index 00000000..bd1def47 --- /dev/null +++ b/cut-n-paste/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = recent-files diff --git a/cut-n-paste/recent-files/Makefile.am b/cut-n-paste/recent-files/Makefile.am new file mode 100644 index 00000000..c3b3dbda --- /dev/null +++ b/cut-n-paste/recent-files/Makefile.am @@ -0,0 +1,32 @@ +NULL = + +INCLUDES = \ + $(RECENT_FILES_CFLAGS) \ + $(NULL) + +# Uses the deprecated GnomeIconTheme +# $(EVINCE_DISABLE_DEPRECATED) + +EGG_FILES = \ + egg-recent-model.c \ + egg-recent-model.h \ + egg-recent-item.c \ + egg-recent-item.h \ + egg-recent-view.c \ + egg-recent-view.h \ + egg-recent-view-bonobo.c \ + egg-recent-view-bonobo.h \ + egg-recent-view-gtk.c \ + egg-recent-view-gtk.h \ + egg-recent-util.c \ + egg-recent-util.h + +noinst_LIBRARIES = librecent.a + +librecent_a_SOURCES = $(EGG_FILES) + +EXTRA_DIST = update-from-egg.sh + +EGGDIR=$(srcdir)/../../../libegg/libegg/recent-files +regenerate-built-sources: + EGGFILES="$(EGG_FILES)" EGGDIR="$(EGGDIR)" $(srcdir)/update-from-egg.sh diff --git a/cut-n-paste/recent-files/egg-recent-item.c b/cut-n-paste/recent-files/egg-recent-item.c new file mode 100644 index 00000000..9be7970e --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-item.c @@ -0,0 +1,440 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/** + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * + * Authors: + * James Willcox + */ + + +#include +#include +#include +#include +#include +#include "egg-recent-item.h" + + + +EggRecentItem * +egg_recent_item_new (void) +{ + EggRecentItem *item; + + item = g_new (EggRecentItem, 1); + + item->groups = NULL; + item->private_data = FALSE; + item->uri = NULL; + item->mime_type = NULL; + + item->refcount = 1; + + return item; +} + +static void +egg_recent_item_free (EggRecentItem *item) +{ + if (item->uri) + g_free (item->uri); + + if (item->mime_type) + g_free (item->mime_type); + + if (item->groups) { + g_list_foreach (item->groups, (GFunc)g_free, NULL); + g_list_free (item->groups); + item->groups = NULL; + } + + g_free (item); +} + +EggRecentItem * +egg_recent_item_ref (EggRecentItem *item) +{ + item->refcount++; + return item; +} + +EggRecentItem * +egg_recent_item_unref (EggRecentItem *item) +{ + item->refcount--; + + if (item->refcount == 0) { + egg_recent_item_free (item); + } + + return item; +} + + +EggRecentItem * +egg_recent_item_new_from_uri (const gchar *uri) +{ + EggRecentItem *item; + + g_return_val_if_fail (uri != NULL, NULL); + + item = egg_recent_item_new (); + + if (!egg_recent_item_set_uri (item ,uri)) { + egg_recent_item_free (item); + return NULL; + } + + item->mime_type = gnome_vfs_get_mime_type (item->uri); + + if (!item->mime_type) + item->mime_type = g_strdup (GNOME_VFS_MIME_TYPE_UNKNOWN); + + return item; +} + +/* +static GList * +egg_recent_item_copy_groups (const GList *list) +{ + GList *newlist = NULL; + + while (list) { + gchar *group = (gchar *)list->data; + + newlist = g_list_prepend (newlist, g_strdup (group)); + + list = list->next; + } + + return newlist; +} + + +EggRecentItem * +egg_recent_item_copy (const EggRecentItem *item) +{ + EggRecentItem *newitem; + + newitem = egg_recent_item_new (); + newitem->uri = g_strdup (item->uri); + if (item->mime_type) + newitem->mime_type = g_strdup (item->mime_type); + newitem->timestamp = item->timestamp; + newitem->private_data = item->private_data; + newitem->groups = egg_recent_item_copy_groups (item->groups); + + return newitem; +} +*/ + +/* +EggRecentItem * +egg_recent_item_new_valist (const gchar *uri, va_list args) +{ + EggRecentItem *item; + EggRecentArg arg; + gchar *str1; + gchar *str2; + gboolean priv; + + item = egg_recent_item_new (); + + arg = va_arg (args, EggRecentArg); + + while (arg != EGG_RECENT_ARG_NONE) { + switch (arg) { + case EGG_RECENT_ARG_MIME_TYPE: + str1 = va_arg (args, gchar*); + + egg_recent_item_set_mime_type (item, str1); + break; + case EGG_RECENT_ARG_GROUP: + str1 = va_arg (args, gchar*); + + egg_recent_item_add_group (item, str1); + break; + case EGG_RECENT_ARG_PRIVATE: + priv = va_arg (args, gboolean); + + egg_recent_item_set_private (item, priv); + break; + default: + break; + } + + arg = va_arg (args, EggRecentArg); + } + + return item; +} +*/ + +gboolean +egg_recent_item_set_uri (EggRecentItem *item, const gchar *uri) +{ + gchar *utf8_uri; + + /* if G_BROKEN_FILENAMES is not set, this should succede */ + if (g_utf8_validate (uri, -1, NULL)) { + item->uri = gnome_vfs_make_uri_from_input (uri); + } else { + utf8_uri = g_filename_to_utf8 (uri, -1, NULL, NULL, NULL); + + if (utf8_uri == NULL) { + g_warning ("Couldn't convert URI to UTF-8"); + return FALSE; + } + + if (g_utf8_validate (utf8_uri, -1, NULL)) { + item->uri = gnome_vfs_make_uri_from_input (utf8_uri); + } else { + g_free (utf8_uri); + return FALSE; + } + + g_free (utf8_uri); + } + + return TRUE; +} + +gchar * +egg_recent_item_get_uri (const EggRecentItem *item) +{ + return g_strdup (item->uri); +} + +G_CONST_RETURN gchar * +egg_recent_item_peek_uri (const EggRecentItem *item) +{ + return item->uri; +} + +gchar * +egg_recent_item_get_uri_utf8 (const EggRecentItem *item) +{ + /* this could fail, but it's not likely, since we've already done it + * once in set_uri() + */ + return g_filename_to_utf8 (item->uri, -1, NULL, NULL, NULL); +} + +gchar * +egg_recent_item_get_uri_for_display (const EggRecentItem *item) +{ + return gnome_vfs_format_uri_for_display (item->uri); +} + +/* Stolen from gnome_vfs_make_valid_utf8() */ +static char * +make_valid_utf8 (const char *name) +{ + GString *string; + const char *remainder, *invalid; + int remaining_bytes, valid_bytes; + + string = NULL; + remainder = name; + remaining_bytes = strlen (name); + + while (remaining_bytes != 0) { + if (g_utf8_validate (remainder, remaining_bytes, &invalid)) + break; + + valid_bytes = invalid - remainder; + + if (string == NULL) + string = g_string_sized_new (remaining_bytes); + + g_string_append_len (string, remainder, valid_bytes); + g_string_append_c (string, '?'); + + remaining_bytes -= valid_bytes + 1; + remainder = invalid + 1; + } + + if (string == NULL) + return g_strdup (name); + + g_string_append (string, remainder); +/* g_string_append (string, _(" (invalid file name)")); */ + g_assert (g_utf8_validate (string->str, -1, NULL)); + + return g_string_free (string, FALSE); +} + +/** + * egg_recent_item_get_short_name: + * @item: an #EggRecentItem + * + * Computes a valid UTF-8 string that can be used as the name of the item in a + * menu or list. For example, calling this function on an item that refers to + * "file:///foo/bar.txt" will yield "bar.txt". + * + * Return value: A newly-allocated string in UTF-8 encoding; free it with + * g_free(). + **/ +gchar * +egg_recent_item_get_short_name (const EggRecentItem *item) +{ + GnomeVFSURI *uri; + char *short_name; + gboolean valid; + + g_return_val_if_fail (item != NULL, NULL); + + if (item->uri == NULL) + return NULL; + + uri = gnome_vfs_uri_new (item->uri); + if (uri == NULL) + return NULL; + + short_name = gnome_vfs_uri_extract_short_name (uri); + valid = FALSE; + + if (strcmp (gnome_vfs_uri_get_scheme (uri), "file") == 0) { + char *tmp; + + tmp = g_filename_to_utf8 (short_name, -1, NULL, NULL, NULL); + if (tmp) { + g_free (short_name); + short_name = tmp; + valid = TRUE; + } + } + + if (!valid) { + char *tmp; + + tmp = make_valid_utf8 (short_name); + g_assert (tmp != NULL); + g_free (short_name); + short_name = tmp; + } + + gnome_vfs_uri_unref (uri); + + return short_name; +} + +void +egg_recent_item_set_mime_type (EggRecentItem *item, const gchar *mime) +{ + item->mime_type = g_strdup (mime); +} + +gchar * +egg_recent_item_get_mime_type (const EggRecentItem *item) +{ + return g_strdup (item->mime_type); +} + +void +egg_recent_item_set_timestamp (EggRecentItem *item, time_t timestamp) +{ + if (timestamp == (time_t) -1) + time (×tamp); + + item->timestamp = timestamp; +} + +time_t +egg_recent_item_get_timestamp (const EggRecentItem *item) +{ + return item->timestamp; +} + +G_CONST_RETURN GList * +egg_recent_item_get_groups (const EggRecentItem *item) +{ + return item->groups; +} + +gboolean +egg_recent_item_in_group (const EggRecentItem *item, const gchar *group_name) +{ + GList *tmp; + + tmp = item->groups; + while (tmp != NULL) { + gchar *val = (gchar *)tmp->data; + + if (strcmp (group_name, val) == 0) + return TRUE; + + tmp = tmp->next; + } + + return FALSE; +} + +void +egg_recent_item_add_group (EggRecentItem *item, const gchar *group_name) +{ + g_return_if_fail (group_name != NULL); + + if (!egg_recent_item_in_group (item, group_name)) + item->groups = g_list_append (item->groups, g_strdup (group_name)); +} + +void +egg_recent_item_remove_group (EggRecentItem *item, const gchar *group_name) +{ + GList *tmp; + + g_return_if_fail (group_name != NULL); + + tmp = item->groups; + while (tmp != NULL) { + gchar *val = (gchar *)tmp->data; + + if (strcmp (group_name, val) == 0) { + item->groups = g_list_remove (item->groups, + val); + g_free (val); + break; + } + + tmp = tmp->next; + } +} + +void +egg_recent_item_set_private (EggRecentItem *item, gboolean priv) +{ + item->private_data = priv; +} + +gboolean +egg_recent_item_get_private (const EggRecentItem *item) +{ + return item->private_data; +} + +GType +egg_recent_item_get_type (void) +{ + static GType boxed_type = 0; + + if (!boxed_type) { + boxed_type = g_boxed_type_register_static ("EggRecentItem", + (GBoxedCopyFunc)egg_recent_item_ref, + (GBoxedFreeFunc)egg_recent_item_unref); + } + + return boxed_type; +} diff --git a/cut-n-paste/recent-files/egg-recent-item.h b/cut-n-paste/recent-files/egg-recent-item.h new file mode 100644 index 00000000..5b3b405c --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-item.h @@ -0,0 +1,78 @@ + +#ifndef __EGG_RECENT_ITEM_H__ +#define __EGG_RECENT_ITEM_H__ + +#include +#include +#include + +G_BEGIN_DECLS + +#define EGG_TYPE_RECENT_ITEM (egg_recent_item_get_type ()) + +#define EGG_RECENT_ITEM_LIST_UNREF(list) \ + g_list_foreach (list, (GFunc)egg_recent_item_unref, NULL); \ + g_list_free (list); + +typedef struct _EggRecentItem EggRecentItem; + +struct _EggRecentItem { + /* do not access any of these directly */ + gchar *uri; + gchar *mime_type; + time_t timestamp; + + gboolean private_data; + + GList *groups; + + int refcount; +}; + +GType egg_recent_item_get_type (void) G_GNUC_CONST; + +/* constructors */ +EggRecentItem * egg_recent_item_new (void); + +EggRecentItem * egg_recent_item_ref (EggRecentItem *item); +EggRecentItem * egg_recent_item_unref (EggRecentItem *item); + +/* automatically fetches the mime type, etc */ +EggRecentItem * egg_recent_item_new_from_uri (const gchar *uri); + +gboolean egg_recent_item_set_uri (EggRecentItem *item, const gchar *uri); +gchar * egg_recent_item_get_uri (const EggRecentItem *item); +gchar * egg_recent_item_get_uri_utf8 (const EggRecentItem *item); +gchar * egg_recent_item_get_uri_for_display (const EggRecentItem *item); +gchar * egg_recent_item_get_short_name (const EggRecentItem *item); + +void egg_recent_item_set_mime_type (EggRecentItem *item, const gchar *mime); +gchar * egg_recent_item_get_mime_type (const EggRecentItem *item); + +void egg_recent_item_set_timestamp (EggRecentItem *item, time_t timestamp); +time_t egg_recent_item_get_timestamp (const EggRecentItem *item); + +G_CONST_RETURN gchar *egg_recent_item_peek_uri (const EggRecentItem *item); + + +/* groups */ +G_CONST_RETURN GList * egg_recent_item_get_groups (const EggRecentItem *item); + +gboolean egg_recent_item_in_group (const EggRecentItem *item, + const gchar *group_name); + +void egg_recent_item_add_group (EggRecentItem *item, + const gchar *group_name); + +void egg_recent_item_remove_group (EggRecentItem *item, + const gchar *group_name); + +void egg_recent_item_set_private (EggRecentItem *item, + gboolean priv); + +gboolean egg_recent_item_get_private (const EggRecentItem *item); + + +G_END_DECLS + +#endif /* __EGG_RECENT_ITEM_H__ */ diff --git a/cut-n-paste/recent-files/egg-recent-model.c b/cut-n-paste/recent-files/egg-recent-model.c new file mode 100644 index 00000000..f36053bc --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-model.c @@ -0,0 +1,1775 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/** + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * + * Authors: + * James Willcox + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "egg-recent-model.h" +#include "egg-recent-item.h" + +#define EGG_RECENT_MODEL_FILE_PATH "/.recently-used" +#define EGG_RECENT_MODEL_BUFFER_SIZE 8192 + +#define EGG_RECENT_MODEL_MAX_ITEMS 500 +#define EGG_RECENT_MODEL_DEFAULT_LIMIT 10 +#define EGG_RECENT_MODEL_TIMEOUT_LENGTH 200 + +#define EGG_RECENT_MODEL_KEY_DIR "/desktop/gnome/recent_files" +#define EGG_RECENT_MODEL_DEFAULT_LIMIT_KEY EGG_RECENT_MODEL_KEY_DIR "/default_limit" +#define EGG_RECENT_MODEL_EXPIRE_KEY EGG_RECENT_MODEL_KEY_DIR "/expire" + +struct _EggRecentModelPrivate { + GSList *mime_filter_values; /* list of mime types we allow */ + GSList *group_filter_values; /* list of groups we allow */ + GSList *scheme_filter_values; /* list of URI schemes we allow */ + + EggRecentModelSort sort_type; /* type of sorting to be done */ + + int limit; /* soft limit for length of the list */ + int expire_days; /* number of days to hold an item */ + + char *path; /* path to the file we store stuff in */ + + GHashTable *monitors; + + GnomeVFSMonitorHandle *monitor; + + GConfClient *client; + gboolean use_default_limit; + + guint limit_change_notify_id; + guint expiration_change_notify_id; + + guint changed_timeout; +}; + +/* signals */ +enum { + CHANGED, + LAST_SIGNAL +}; + +static GType model_signals[LAST_SIGNAL] = { 0 }; + +/* properties */ +enum { + PROP_BOGUS, + PROP_MIME_FILTERS, + PROP_GROUP_FILTERS, + PROP_SCHEME_FILTERS, + PROP_SORT_TYPE, + PROP_LIMIT +}; + +typedef struct { + GSList *states; + GList *items; + EggRecentItem *current_item; +}ParseInfo; + +typedef enum { + STATE_START, + STATE_RECENT_FILES, + STATE_RECENT_ITEM, + STATE_URI, + STATE_MIME_TYPE, + STATE_TIMESTAMP, + STATE_PRIVATE, + STATE_GROUPS, + STATE_GROUP +} ParseState; + +typedef struct _ChangedData { + EggRecentModel *model; + GList *list; +}ChangedData; + +#define TAG_RECENT_FILES "RecentFiles" +#define TAG_RECENT_ITEM "RecentItem" +#define TAG_URI "URI" +#define TAG_MIME_TYPE "Mime-Type" +#define TAG_TIMESTAMP "Timestamp" +#define TAG_PRIVATE "Private" +#define TAG_GROUPS "Groups" +#define TAG_GROUP "Group" + +static void start_element_handler (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error); + +static void end_element_handler (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error); + +static void text_handler (GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error); + +static void error_handler (GMarkupParseContext *context, + GError *error, + gpointer user_data); + +static GMarkupParser parser = {start_element_handler, end_element_handler, + text_handler, + NULL, + error_handler}; + +static gboolean +egg_recent_model_string_match (const GSList *list, const gchar *str) +{ + const GSList *tmp; + + if (list == NULL || str == NULL) + return TRUE; + + tmp = list; + + while (tmp) { + if (g_pattern_match_string (tmp->data, str)) + return TRUE; + + tmp = tmp->next; + } + + return FALSE; +} + +static gboolean +egg_recent_model_write_raw (EggRecentModel *model, FILE *file, + const gchar *content) +{ + int len; + int fd; + struct stat sbuf; + + rewind (file); + + len = strlen (content); + fd = fileno (file); + + if (fstat (fd, &sbuf) < 0) + g_warning ("Couldn't stat XML document."); + + if ((off_t)len < sbuf.st_size) { + ftruncate (fd, len); + } + + if (fputs (content, file) == EOF) + return FALSE; + + fsync (fd); + rewind (file); + + return TRUE; +} + +static GList * +egg_recent_model_delete_from_list (GList *list, + const gchar *uri) +{ + GList *tmp; + + if (!uri) + return list; + + tmp = list; + + while (tmp) { + EggRecentItem *item = tmp->data; + GList *next; + + next = tmp->next; + + if (!strcmp (egg_recent_item_peek_uri (item), uri)) { + egg_recent_item_unref (item); + + list = g_list_remove_link (list, tmp); + g_list_free_1 (tmp); + } + + tmp = next; + } + + return list; +} + +static void +egg_recent_model_add_new_groups (EggRecentItem *item, + EggRecentItem *upd_item) +{ + const GList *tmp; + + tmp = egg_recent_item_get_groups (upd_item); + + while (tmp) { + char *group = tmp->data; + + if (!egg_recent_item_in_group (item, group)) + egg_recent_item_add_group (item, group); + + tmp = tmp->next; + } +} + +static gboolean +egg_recent_model_update_item (GList *items, EggRecentItem *upd_item) +{ + GList *tmp; + const char *uri; + + uri = egg_recent_item_peek_uri (upd_item); + + tmp = items; + + while (tmp) { + EggRecentItem *item = tmp->data; + + if (gnome_vfs_uris_match (egg_recent_item_peek_uri (item), uri)) { + egg_recent_item_set_timestamp (item, (time_t) -1); + + egg_recent_model_add_new_groups (item, upd_item); + + return TRUE; + } + + tmp = tmp->next; + } + + return FALSE; +} + +static gchar * +egg_recent_model_read_raw (EggRecentModel *model, FILE *file) +{ + GString *string; + char buf[EGG_RECENT_MODEL_BUFFER_SIZE]; + + rewind (file); + + string = g_string_new (NULL); + while (fgets (buf, EGG_RECENT_MODEL_BUFFER_SIZE, file)) { + string = g_string_append (string, buf); + } + + rewind (file); + + return g_string_free (string, FALSE); +} + + + +static void +parse_info_init (ParseInfo *info) +{ + info->states = g_slist_prepend (NULL, STATE_START); + info->items = NULL; +} + +static void +parse_info_free (ParseInfo *info) +{ + g_slist_free (info->states); +} + +static void +push_state (ParseInfo *info, + ParseState state) +{ + info->states = g_slist_prepend (info->states, GINT_TO_POINTER (state)); +} + +static void +pop_state (ParseInfo *info) +{ + g_return_if_fail (info->states != NULL); + + info->states = g_slist_remove (info->states, info->states->data); +} + +static ParseState +peek_state (ParseInfo *info) +{ + g_return_val_if_fail (info->states != NULL, STATE_START); + + return GPOINTER_TO_INT (info->states->data); +} + +#define ELEMENT_IS(name) (strcmp (element_name, (name)) == 0) + +static void +start_element_handler (GMarkupParseContext *context, + const gchar *element_name, + const gchar **attribute_names, + const gchar **attribute_values, + gpointer user_data, + GError **error) +{ + ParseInfo *info = (ParseInfo *)user_data; + + if (ELEMENT_IS (TAG_RECENT_FILES)) + push_state (info, STATE_RECENT_FILES); + else if (ELEMENT_IS (TAG_RECENT_ITEM)) { + info->current_item = egg_recent_item_new (); + push_state (info, STATE_RECENT_ITEM); + } else if (ELEMENT_IS (TAG_URI)) + push_state (info, STATE_URI); + else if (ELEMENT_IS (TAG_MIME_TYPE)) + push_state (info, STATE_MIME_TYPE); + else if (ELEMENT_IS (TAG_TIMESTAMP)) + push_state (info, STATE_TIMESTAMP); + else if (ELEMENT_IS (TAG_PRIVATE)) { + push_state (info, STATE_PRIVATE); + egg_recent_item_set_private (info->current_item, TRUE); + } else if (ELEMENT_IS (TAG_GROUPS)) + push_state (info, STATE_GROUPS); + else if (ELEMENT_IS (TAG_GROUP)) + push_state (info, STATE_GROUP); +} + +static gint +list_compare_func_mru (gpointer a, gpointer b) +{ + EggRecentItem *item_a = (EggRecentItem *)a; + EggRecentItem *item_b = (EggRecentItem *)b; + + return item_a->timestamp < item_b->timestamp; +} + +static gint +list_compare_func_lru (gpointer a, gpointer b) +{ + EggRecentItem *item_a = (EggRecentItem *)a; + EggRecentItem *item_b = (EggRecentItem *)b; + + return item_a->timestamp > item_b->timestamp; +} + + + +static void +end_element_handler (GMarkupParseContext *context, + const gchar *element_name, + gpointer user_data, + GError **error) +{ + ParseInfo *info = (ParseInfo *)user_data; + + switch (peek_state (info)) { + case STATE_RECENT_ITEM: + info->items = g_list_append (info->items, + info->current_item); + if (info->current_item->uri == NULL || + strlen (info->current_item->uri) == 0) + g_warning ("URI NOT LOADED"); + break; + default: + break; + } + + pop_state (info); +} + +static void +text_handler (GMarkupParseContext *context, + const gchar *text, + gsize text_len, + gpointer user_data, + GError **error) +{ + ParseInfo *info = (ParseInfo *)user_data; + + switch (peek_state (info)) { + case STATE_START: + case STATE_RECENT_FILES: + case STATE_RECENT_ITEM: + case STATE_PRIVATE: + case STATE_GROUPS: + break; + case STATE_URI: + egg_recent_item_set_uri (info->current_item, text); + break; + case STATE_MIME_TYPE: + egg_recent_item_set_mime_type (info->current_item, + text); + break; + case STATE_TIMESTAMP: + egg_recent_item_set_timestamp (info->current_item, + (time_t)atoi (text)); + break; + case STATE_GROUP: + egg_recent_item_add_group (info->current_item, + text); + break; + } + +} + +static void +error_handler (GMarkupParseContext *context, + GError *error, + gpointer user_data) +{ + g_warning ("Error in parse: %s", error->message); +} + +static void +egg_recent_model_enforce_limit (GList *list, int limit) +{ + int len; + GList *end; + + /* limit < 0 means unlimited */ + if (limit <= 0) + return; + + len = g_list_length (list); + + if (len > limit) { + GList *next; + + end = g_list_nth (list, limit-1); + next = end->next; + + end->next = NULL; + + EGG_RECENT_ITEM_LIST_UNREF (next); + } +} + +static GList * +egg_recent_model_sort (EggRecentModel *model, GList *list) +{ + switch (model->priv->sort_type) { + case EGG_RECENT_MODEL_SORT_MRU: + list = g_list_sort (list, + (GCompareFunc)list_compare_func_mru); + break; + case EGG_RECENT_MODEL_SORT_LRU: + list = g_list_sort (list, + (GCompareFunc)list_compare_func_lru); + break; + case EGG_RECENT_MODEL_SORT_NONE: + break; + } + + return list; +} + +static gboolean +egg_recent_model_group_match (EggRecentItem *item, GSList *groups) +{ + GSList *tmp; + + tmp = groups; + + while (tmp != NULL) { + const gchar * group = (const gchar *)tmp->data; + + if (egg_recent_item_in_group (item, group)) + return TRUE; + + tmp = tmp->next; + } + + return FALSE; +} + +static GList * +egg_recent_model_filter (EggRecentModel *model, + GList *list) +{ + EggRecentItem *item; + GList *newlist = NULL; + gchar *mime_type; + gchar *uri; + + g_return_val_if_fail (list != NULL, NULL); + + while (list) { + gboolean pass_mime_test = FALSE; + gboolean pass_group_test = FALSE; + gboolean pass_scheme_test = FALSE; + item = (EggRecentItem *)list->data; + list = list->next; + + uri = egg_recent_item_get_uri (item); + + /* filter by mime type */ + if (model->priv->mime_filter_values != NULL) { + mime_type = egg_recent_item_get_mime_type (item); + + if (egg_recent_model_string_match + (model->priv->mime_filter_values, + mime_type)) + pass_mime_test = TRUE; + + g_free (mime_type); + } else + pass_mime_test = TRUE; + + /* filter by group */ + if (pass_mime_test && model->priv->group_filter_values != NULL) { + if (egg_recent_model_group_match + (item, model->priv->group_filter_values)) + pass_group_test = TRUE; + } else if (egg_recent_item_get_private (item)) { + pass_group_test = FALSE; + } else + pass_group_test = TRUE; + + /* filter by URI scheme */ + if (pass_mime_test && pass_group_test && + model->priv->scheme_filter_values != NULL) { + gchar *scheme; + + scheme = gnome_vfs_get_uri_scheme (uri); + + if (egg_recent_model_string_match + (model->priv->scheme_filter_values, scheme)) + pass_scheme_test = TRUE; + + g_free (scheme); + } else + pass_scheme_test = TRUE; + + if (pass_mime_test && pass_group_test && pass_scheme_test) + newlist = g_list_prepend (newlist, item); + + g_free (uri); + } + + if (newlist) { + newlist = g_list_reverse (newlist); + g_list_free (list); + } + + + return newlist; +} + + + +#if 0 +static void +egg_recent_model_monitor_list_cb (GnomeVFSMonitorHandle *handle, + const gchar *monitor_uri, + const gchar *info_uri, + GnomeVFSMonitorEventType event_type, + gpointer user_data) +{ + EggRecentModel *model; + + model = EGG_RECENT_MODEL (user_data); + + if (event_type == GNOME_VFS_MONITOR_EVENT_DELETED) { + egg_recent_model_delete (model, monitor_uri); + g_hash_table_remove (model->priv->monitors, monitor_uri); + } +} + + + +static void +egg_recent_model_monitor_list (EggRecentModel *model, GList *list) +{ + GList *tmp; + + tmp = list; + while (tmp) { + EggRecentItem *item = (EggRecentItem *)tmp->data; + GnomeVFSMonitorHandle *handle; + GnomeVFSResult res; + gchar *uri; + + tmp = tmp->next; + + uri = egg_recent_item_get_uri (item); + if (g_hash_table_lookup (model->priv->monitors, uri)) { + /* already monitoring this one */ + g_free (uri); + continue; + } + + res = gnome_vfs_monitor_add (&handle, uri, + GNOME_VFS_MONITOR_FILE, + egg_recent_model_monitor_list_cb, + model); + + if (res == GNOME_VFS_OK) + g_hash_table_insert (model->priv->monitors, uri, handle); + else + g_free (uri); + } +} +#endif + + +static gboolean +egg_recent_model_changed_timeout (EggRecentModel *model) +{ + egg_recent_model_changed (model); + + return FALSE; +} + +static void +egg_recent_model_monitor_cb (GnomeVFSMonitorHandle *handle, + const gchar *monitor_uri, + const gchar *info_uri, + GnomeVFSMonitorEventType event_type, + gpointer user_data) +{ + EggRecentModel *model; + + g_return_if_fail (user_data != NULL); + g_return_if_fail (EGG_IS_RECENT_MODEL (user_data)); + model = EGG_RECENT_MODEL (user_data); + + if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED) { + if (model->priv->changed_timeout > 0) { + g_source_remove (model->priv->changed_timeout); + } + + model->priv->changed_timeout = g_timeout_add ( + EGG_RECENT_MODEL_TIMEOUT_LENGTH, + (GSourceFunc)egg_recent_model_changed_timeout, + model); + } +} + +static void +egg_recent_model_monitor (EggRecentModel *model, gboolean should_monitor) +{ + if (should_monitor && model->priv->monitor == NULL) { + + gnome_vfs_monitor_add (&model->priv->monitor, + model->priv->path, + GNOME_VFS_MONITOR_FILE, + egg_recent_model_monitor_cb, + model); + + /* if the above fails, don't worry about it. + * local notifications will still happen + */ + + } else if (!should_monitor && model->priv->monitor != NULL) { + gnome_vfs_monitor_cancel (model->priv->monitor); + model->priv->monitor = NULL; + } +} + +static void +egg_recent_model_set_limit_internal (EggRecentModel *model, int limit) +{ + model->priv->limit = limit; + + if (limit <= 0) + egg_recent_model_monitor (model, FALSE); + else { + egg_recent_model_monitor (model, TRUE); + egg_recent_model_changed (model); + } +} + +static GList * +egg_recent_model_read (EggRecentModel *model, FILE *file) +{ + GList *list=NULL; + gchar *content; + GMarkupParseContext *ctx; + ParseInfo info; + GError *error; + + content = egg_recent_model_read_raw (model, file); + + if (strlen (content) <= 0) { + g_free (content); + return NULL; + } + + parse_info_init (&info); + + ctx = g_markup_parse_context_new (&parser, 0, &info, NULL); + + error = NULL; + if (!g_markup_parse_context_parse (ctx, content, strlen (content), + &error)) { + g_warning (error->message); + g_error_free (error); + error = NULL; + goto out; + } + + error = NULL; + if (!g_markup_parse_context_end_parse (ctx, &error)) + goto out; + + g_markup_parse_context_free (ctx); +out: + list = info.items; + + parse_info_free (&info); + + g_free (content); + + /* + g_print ("Total items: %d\n", g_list_length (list)); + */ + + return list; +} + + +static gboolean +egg_recent_model_write (EggRecentModel *model, FILE *file, GList *list) +{ + GString *string; + gchar *data; + EggRecentItem *item; + const GList *groups; + int i; + int ret; + + string = g_string_new ("\n"); + string = g_string_append (string, "<" TAG_RECENT_FILES ">\n"); + + i=0; + while (list) { + gchar *uri; + gchar *mime_type; + gchar *escaped_uri; + time_t timestamp; + item = (EggRecentItem *)list->data; + + + uri = egg_recent_item_get_uri_utf8 (item); + escaped_uri = g_markup_escape_text (uri, + strlen (uri)); + g_free (uri); + + mime_type = egg_recent_item_get_mime_type (item); + timestamp = egg_recent_item_get_timestamp (item); + + string = g_string_append (string, " <" TAG_RECENT_ITEM ">\n"); + + g_string_append_printf (string, + " <" TAG_URI ">%s\n", escaped_uri); + + if (mime_type) + g_string_append_printf (string, + " <" TAG_MIME_TYPE ">%s\n", mime_type); + else + g_string_append_printf (string, + " <" TAG_MIME_TYPE ">\n"); + + + g_string_append_printf (string, + " <" TAG_TIMESTAMP ">%d\n", (int)timestamp); + + if (egg_recent_item_get_private (item)) + string = g_string_append (string, + " <" TAG_PRIVATE "/>\n"); + + /* write the groups */ + string = g_string_append (string, + " <" TAG_GROUPS ">\n"); + groups = egg_recent_item_get_groups (item); + + if (groups == NULL && egg_recent_item_get_private (item)) + g_warning ("Item with URI \"%s\" marked as private, but" + " does not belong to any groups.\n", uri); + + while (groups) { + const gchar *group = (const gchar *)groups->data; + gchar *escaped_group; + + escaped_group = g_markup_escape_text (group, strlen(group)); + + g_string_append_printf (string, + " <" TAG_GROUP ">%s\n", + escaped_group); + + g_free (escaped_group); + + groups = groups->next; + } + + string = g_string_append (string, " \n"); + + string = g_string_append (string, + " \n"); + + g_free (mime_type); + g_free (escaped_uri); + + list = list->next; + i++; + } + + string = g_string_append (string, ""); + + data = g_string_free (string, FALSE); + + ret = egg_recent_model_write_raw (model, file, data); + + g_free (data); + + return ret; +} + +static FILE * +egg_recent_model_open_file (EggRecentModel *model) +{ + FILE *file; + mode_t prev_umask; + + file = fopen (model->priv->path, "r+"); + if (file == NULL) { + /* be paranoid */ + prev_umask = umask (077); + + file = fopen (model->priv->path, "w+"); + + umask (prev_umask); + + g_return_val_if_fail (file != NULL, NULL); + } + + return file; +} + +static gboolean +egg_recent_model_lock_file (FILE *file) +{ + int fd; + gint try = 5; + + rewind (file); + fd = fileno (file); + + /* Attempt to lock the file 5 times, + * waiting a random interval (< 1 second) + * in between attempts. + * We should really be doing asynchronous + * locking, but requires substantially larger + * changes. + */ + + while (try > 0) + { + int rand_interval; + + if (lockf (fd, F_TLOCK, 0) == 0) + return TRUE; + + rand_interval = 1 + (int) (10.0 * rand()/(RAND_MAX + 1.0)); + + g_usleep (100000 * rand_interval); + + --try; + } + + return FALSE; +} + +static gboolean +egg_recent_model_unlock_file (FILE *file) +{ + int fd; + + rewind (file); + fd = fileno (file); + + return (lockf (fd, F_ULOCK, 0) == 0) ? TRUE : FALSE; +} + +static void +egg_recent_model_finalize (GObject *object) +{ + EggRecentModel *model = EGG_RECENT_MODEL (object); + + egg_recent_model_monitor (model, FALSE); + + + g_slist_foreach (model->priv->mime_filter_values, + (GFunc) g_pattern_spec_free, NULL); + g_slist_free (model->priv->mime_filter_values); + model->priv->mime_filter_values = NULL; + + g_slist_foreach (model->priv->scheme_filter_values, + (GFunc) g_pattern_spec_free, NULL); + g_slist_free (model->priv->scheme_filter_values); + model->priv->scheme_filter_values = NULL; + + g_slist_foreach (model->priv->group_filter_values, + (GFunc) g_free, NULL); + g_slist_free (model->priv->group_filter_values); + model->priv->group_filter_values = NULL; + + + if (model->priv->limit_change_notify_id) + gconf_client_notify_remove (model->priv->client, + model->priv->limit_change_notify_id); + model->priv->expiration_change_notify_id = 0; + + if (model->priv->expiration_change_notify_id) + gconf_client_notify_remove (model->priv->client, + model->priv->expiration_change_notify_id); + model->priv->expiration_change_notify_id = 0; + + g_object_unref (model->priv->client); + model->priv->client = NULL; + + + g_free (model->priv->path); + model->priv->path = NULL; + + g_hash_table_destroy (model->priv->monitors); + model->priv->monitors = NULL; + + + g_free (model->priv); +} + +static void +egg_recent_model_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + EggRecentModel *model = EGG_RECENT_MODEL (object); + + switch (prop_id) + { + case PROP_MIME_FILTERS: + model->priv->mime_filter_values = + (GSList *)g_value_get_pointer (value); + break; + + case PROP_GROUP_FILTERS: + model->priv->group_filter_values = + (GSList *)g_value_get_pointer (value); + break; + + case PROP_SCHEME_FILTERS: + model->priv->scheme_filter_values = + (GSList *)g_value_get_pointer (value); + break; + + case PROP_SORT_TYPE: + model->priv->sort_type = g_value_get_int (value); + break; + + case PROP_LIMIT: + egg_recent_model_set_limit (model, + g_value_get_int (value)); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +egg_recent_model_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + EggRecentModel *model = EGG_RECENT_MODEL (object); + + switch (prop_id) + { + case PROP_MIME_FILTERS: + g_value_set_pointer (value, model->priv->mime_filter_values); + break; + + case PROP_GROUP_FILTERS: + g_value_set_pointer (value, model->priv->group_filter_values); + break; + + case PROP_SCHEME_FILTERS: + g_value_set_pointer (value, model->priv->scheme_filter_values); + break; + + case PROP_SORT_TYPE: + g_value_set_int (value, model->priv->sort_type); + break; + + case PROP_LIMIT: + g_value_set_int (value, model->priv->limit); + break; + + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +egg_recent_model_class_init (EggRecentModelClass * klass) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (klass); + object_class->set_property = egg_recent_model_set_property; + object_class->get_property = egg_recent_model_get_property; + object_class->finalize = egg_recent_model_finalize; + + model_signals[CHANGED] = g_signal_new ("changed", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EggRecentModelClass, changed), + NULL, NULL, + g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, + G_TYPE_POINTER); + + + g_object_class_install_property (object_class, + PROP_MIME_FILTERS, + g_param_spec_pointer ("mime-filters", + "Mime Filters", + "List of mime types to be allowed.", + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_GROUP_FILTERS, + g_param_spec_pointer ("group-filters", + "Group Filters", + "List of groups to be allowed.", + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_SCHEME_FILTERS, + g_param_spec_pointer ("scheme-filters", + "Scheme Filters", + "List of URI schemes to be allowed.", + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_SORT_TYPE, + g_param_spec_int ("sort-type", + "Sort Type", + "Type of sorting to be done.", + 0, EGG_RECENT_MODEL_SORT_NONE, + EGG_RECENT_MODEL_SORT_MRU, + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_LIMIT, + g_param_spec_int ("limit", + "Limit", + "Max number of items allowed.", + -1, EGG_RECENT_MODEL_MAX_ITEMS, + EGG_RECENT_MODEL_DEFAULT_LIMIT, + G_PARAM_READWRITE)); + + klass->changed = NULL; +} + + + +static void +egg_recent_model_limit_changed (GConfClient *client, guint cnxn_id, + GConfEntry *entry, gpointer user_data) +{ + EggRecentModel *model; + GConfValue *value; + + model = EGG_RECENT_MODEL (user_data); + + g_return_if_fail (model != NULL); + + if (model->priv->use_default_limit == FALSE) + return; /* ignore this key */ + + /* the key was unset, and the schema has apparently failed */ + if (entry == NULL) + return; + + value = gconf_entry_get_value (entry); + + if (value->type != GCONF_VALUE_INT) { + g_warning ("Expected GConfValue of type integer, " + "got something else"); + } + + + egg_recent_model_set_limit_internal (model, gconf_value_get_int (value)); +} + +static void +egg_recent_model_expiration_changed (GConfClient *client, guint cnxn_id, + GConfEntry *entry, gpointer user_data) +{ + +} + +static void +egg_recent_model_init (EggRecentModel * model) +{ + if (!gnome_vfs_init ()) { + g_warning ("gnome-vfs initialization failed."); + return; + } + + + model->priv = g_new0 (EggRecentModelPrivate, 1); + + model->priv->path = g_strdup_printf ("%s" EGG_RECENT_MODEL_FILE_PATH, + g_get_home_dir ()); + + model->priv->mime_filter_values = NULL; + model->priv->group_filter_values = NULL; + model->priv->scheme_filter_values = NULL; + + model->priv->client = gconf_client_get_default (); + gconf_client_add_dir (model->priv->client, EGG_RECENT_MODEL_KEY_DIR, + GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); + + model->priv->limit_change_notify_id = + gconf_client_notify_add (model->priv->client, + EGG_RECENT_MODEL_DEFAULT_LIMIT_KEY, + egg_recent_model_limit_changed, + model, NULL, NULL); + + model->priv->expiration_change_notify_id = + gconf_client_notify_add (model->priv->client, + EGG_RECENT_MODEL_EXPIRE_KEY, + egg_recent_model_expiration_changed, + model, NULL, NULL); + + model->priv->expire_days = gconf_client_get_int ( + model->priv->client, + EGG_RECENT_MODEL_EXPIRE_KEY, + NULL); + +#if 0 + /* keep this out, for now */ + model->priv->limit = gconf_client_get_int ( + model->priv->client, + EGG_RECENT_MODEL_DEFAULT_LIMIT_KEY, NULL); + model->priv->use_default_limit = TRUE; +#endif + model->priv->limit = EGG_RECENT_MODEL_DEFAULT_LIMIT; + model->priv->use_default_limit = FALSE; + + model->priv->monitors = g_hash_table_new_full ( + g_str_hash, g_str_equal, + (GDestroyNotify) g_free, + (GDestroyNotify) gnome_vfs_monitor_cancel); + + model->priv->monitor = NULL; + egg_recent_model_monitor (model, TRUE); +} + + +/** + * egg_recent_model_new: + * @sort: the type of sorting to use + * @limit: maximum number of items in the list + * + * This creates a new EggRecentModel object. + * + * Returns: a EggRecentModel object + */ +EggRecentModel * +egg_recent_model_new (EggRecentModelSort sort) +{ + EggRecentModel *model; + + model = EGG_RECENT_MODEL (g_object_new (egg_recent_model_get_type (), + "sort-type", sort, NULL)); + + g_return_val_if_fail (model, NULL); + + return model; +} + +/** + * egg_recent_model_add_full: + * @model: A EggRecentModel object. + * @item: A EggRecentItem + * + * This function adds an item to the list of recently used URIs. + * + * Returns: gboolean + */ +gboolean +egg_recent_model_add_full (EggRecentModel * model, EggRecentItem *item) +{ + FILE *file; + GList *list = NULL; + gboolean ret = FALSE; + gboolean updated = FALSE; + char *uri; + time_t t; + + g_return_val_if_fail (model != NULL, FALSE); + g_return_val_if_fail (EGG_IS_RECENT_MODEL (model), FALSE); + + uri = egg_recent_item_get_uri (item); + if (strncmp (uri, "recent-files://", strlen ("recent-files://")) == 0) { + g_free (uri); + return FALSE; + } else { + g_free (uri); + } + + file = egg_recent_model_open_file (model); + g_return_val_if_fail (file != NULL, FALSE); + + time (&t); + egg_recent_item_set_timestamp (item, t); + + if (egg_recent_model_lock_file (file)) { + + /* read existing stuff */ + list = egg_recent_model_read (model, file); + + /* if it's already there, we just update it */ + updated = egg_recent_model_update_item (list, item); + + if (!updated) { + list = g_list_prepend (list, item); + + egg_recent_model_enforce_limit (list, + EGG_RECENT_MODEL_MAX_ITEMS); + } + + /* write new stuff */ + if (!egg_recent_model_write (model, file, list)) + g_warning ("Write failed: %s", strerror (errno)); + + if (!updated) + list = g_list_remove (list, item); + + EGG_RECENT_ITEM_LIST_UNREF (list); + ret = TRUE; + } else { + g_warning ("Failed to lock: %s", strerror (errno)); + return FALSE; + } + + if (!egg_recent_model_unlock_file (file)) + g_warning ("Failed to unlock: %s", strerror (errno)); + + fclose (file); + + if (model->priv->monitor == NULL) { + /* since monitoring isn't working, at least give a + * local notification + */ + egg_recent_model_changed (model); + } + + return ret; +} + +/** + * egg_recent_model_add: + * @model: A EggRecentModel object. + * @uri: A string URI + * + * This function adds an item to the list of recently used URIs. + * + * Returns: gboolean + */ +gboolean +egg_recent_model_add (EggRecentModel *model, const gchar *uri) +{ + EggRecentItem *item; + gboolean ret = FALSE; + + g_return_val_if_fail (model != NULL, FALSE); + g_return_val_if_fail (uri != NULL, FALSE); + + item = egg_recent_item_new_from_uri (uri); + + g_return_val_if_fail (item != NULL, FALSE); + + ret = egg_recent_model_add_full (model, item); + + egg_recent_item_unref (item); + + return ret; +} + + + +/** + * egg_recent_model_delete: + * @model: A EggRecentModel object. + * @uri: The URI you want to delete. + * + * This function deletes a URI from the file of recently used URIs. + * + * Returns: gboolean + */ +gboolean +egg_recent_model_delete (EggRecentModel * model, const gchar * uri) +{ + FILE *file; + GList *list; + unsigned int length; + gboolean ret = FALSE; + + g_return_val_if_fail (model != NULL, FALSE); + g_return_val_if_fail (EGG_IS_RECENT_MODEL (model), FALSE); + g_return_val_if_fail (uri != NULL, FALSE); + + file = egg_recent_model_open_file (model); + g_return_val_if_fail (file != NULL, FALSE); + + if (egg_recent_model_lock_file (file)) { + list = egg_recent_model_read (model, file); + + if (list == NULL) + goto out; + + length = g_list_length (list); + + list = egg_recent_model_delete_from_list (list, uri); + + if (length == g_list_length (list)) { + /* nothing was deleted */ + EGG_RECENT_ITEM_LIST_UNREF (list); + } else { + egg_recent_model_write (model, file, list); + EGG_RECENT_ITEM_LIST_UNREF (list); + ret = TRUE; + + } + } else { + g_warning ("Failed to lock: %s", strerror (errno)); + return FALSE; + } + +out: + + if (!egg_recent_model_unlock_file (file)) + g_warning ("Failed to unlock: %s", strerror (errno)); + + fclose (file); + + g_hash_table_remove (model->priv->monitors, uri); + + if (model->priv->monitor == NULL && ret) { + /* since monitoring isn't working, at least give a + * local notification + */ + egg_recent_model_changed (model); + } + + return ret; +} + + +/** + * egg_recent_model_get_list: + * @model: A EggRecentModel object. + * + * This function gets the current contents of the file + * + * Returns: a GList + */ +GList * +egg_recent_model_get_list (EggRecentModel *model) +{ + FILE *file; + GList *list=NULL; + + file = egg_recent_model_open_file (model); + g_return_val_if_fail (file != NULL, NULL); + + if (egg_recent_model_lock_file (file)) { + list = egg_recent_model_read (model, file); + + } else { + g_warning ("Failed to lock: %s", strerror (errno)); + fclose (file); + return NULL; + } + + if (!egg_recent_model_unlock_file (file)) + g_warning ("Failed to unlock: %s", strerror (errno)); + + if (list != NULL) { + list = egg_recent_model_filter (model, list); + list = egg_recent_model_sort (model, list); + + egg_recent_model_enforce_limit (list, model->priv->limit); + } + + fclose (file); + + return list; +} + + + +/** + * egg_recent_model_set_limit: + * @model: A EggRecentModel object. + * @limit: The maximum length of the list + * + * This function sets the maximum length of the list. Note: This only affects + * the length of the list emitted in the "changed" signal, not the list stored + * on disk. + * + * Returns: void + */ +void +egg_recent_model_set_limit (EggRecentModel *model, int limit) +{ + model->priv->use_default_limit = FALSE; + + egg_recent_model_set_limit_internal (model, limit); +} + +/** + * egg_recent_model_get_limit: + * @model: A EggRecentModel object. + * + * This function gets the maximum length of the list. + * + * Returns: int + */ +int +egg_recent_model_get_limit (EggRecentModel *model) +{ + return model->priv->limit; +} + + +/** + * egg_recent_model_clear: + * @model: A EggRecentModel object. + * + * This function clears the contents of the file + * + * Returns: void + */ +void +egg_recent_model_clear (EggRecentModel *model) +{ + FILE *file; + int fd; + + file = egg_recent_model_open_file (model); + g_return_if_fail (file != NULL); + + fd = fileno (file); + + if (egg_recent_model_lock_file (file)) { + ftruncate (fd, 0); + } else { + g_warning ("Failed to lock: %s", strerror (errno)); + return; + } + + if (!egg_recent_model_unlock_file (file)) + g_warning ("Failed to unlock: %s", strerror (errno)); + + fclose (file); +} + + +/** + * egg_recent_model_set_filter_mime_types: + * @model: A EggRecentModel object. + * + * Sets which mime types are allowed in the list. + * + * Returns: void + */ +void +egg_recent_model_set_filter_mime_types (EggRecentModel *model, + ...) +{ + va_list valist; + GSList *list = NULL; + gchar *str; + + g_return_if_fail (model != NULL); + + if (model->priv->mime_filter_values != NULL) { + g_slist_foreach (model->priv->mime_filter_values, + (GFunc) g_pattern_spec_free, NULL); + g_slist_free (model->priv->mime_filter_values); + model->priv->mime_filter_values = NULL; + } + + va_start (valist, model); + + str = va_arg (valist, gchar*); + + while (str != NULL) { + list = g_slist_prepend (list, g_pattern_spec_new (str)); + + str = va_arg (valist, gchar*); + } + + va_end (valist); + + model->priv->mime_filter_values = list; +} + +/** + * egg_recent_model_set_filter_groups: + * @model: A EggRecentModel object. + * + * Sets which groups are allowed in the list. + * + * Returns: void + */ +void +egg_recent_model_set_filter_groups (EggRecentModel *model, + ...) +{ + va_list valist; + GSList *list = NULL; + gchar *str; + + g_return_if_fail (model != NULL); + + if (model->priv->group_filter_values != NULL) { + g_slist_foreach (model->priv->group_filter_values, (GFunc)g_free, NULL); + g_slist_free (model->priv->group_filter_values); + model->priv->group_filter_values = NULL; + } + + va_start (valist, model); + + str = va_arg (valist, gchar*); + + while (str != NULL) { + list = g_slist_prepend (list, g_strdup (str)); + + str = va_arg (valist, gchar*); + } + + va_end (valist); + + model->priv->group_filter_values = list; +} + +/** + * egg_recent_model_set_filter_uri_schemes: + * @model: A EggRecentModel object. + * + * Sets which URI schemes (file, http, ftp, etc) are allowed in the list. + * + * Returns: void + */ +void +egg_recent_model_set_filter_uri_schemes (EggRecentModel *model, ...) +{ + va_list valist; + GSList *list = NULL; + gchar *str; + + g_return_if_fail (model != NULL); + + if (model->priv->scheme_filter_values != NULL) { + g_slist_foreach (model->priv->scheme_filter_values, + (GFunc) g_pattern_spec_free, NULL); + g_slist_free (model->priv->scheme_filter_values); + model->priv->scheme_filter_values = NULL; + } + + va_start (valist, model); + + str = va_arg (valist, gchar*); + + while (str != NULL) { + list = g_slist_prepend (list, g_pattern_spec_new (str)); + + str = va_arg (valist, gchar*); + } + + va_end (valist); + + model->priv->scheme_filter_values = list; +} + +/** + * egg_recent_model_set_sort: + * @model: A EggRecentModel object. + * @sort: A EggRecentModelSort type + * + * Sets the type of sorting to be used. + * + * Returns: void + */ +void +egg_recent_model_set_sort (EggRecentModel *model, + EggRecentModelSort sort) +{ + g_return_if_fail (model != NULL); + + model->priv->sort_type = sort; +} + +/** + * egg_recent_model_changed: + * @model: A EggRecentModel object. + * + * This function causes a "changed" signal to be emitted. + * + * Returns: void + */ +void +egg_recent_model_changed (EggRecentModel *model) +{ + GList *list = NULL; + + if (model->priv->limit > 0) { + list = egg_recent_model_get_list (model); + /* egg_recent_model_monitor_list (model, list); */ + + g_signal_emit (G_OBJECT (model), model_signals[CHANGED], 0, + list); + } + + if (list) + EGG_RECENT_ITEM_LIST_UNREF (list); +} + +static void +egg_recent_model_remove_expired_list (EggRecentModel *model, GList *list) +{ + time_t current_time; + time_t day_seconds; + + time (¤t_time); + day_seconds = model->priv->expire_days*24*60*60; + + while (list != NULL) { + EggRecentItem *item = list->data; + time_t timestamp; + + timestamp = egg_recent_item_get_timestamp (item); + + if ((timestamp+day_seconds) < current_time) { + gchar *uri = egg_recent_item_get_uri (item); + egg_recent_model_delete (model, uri); + + g_strdup (uri); + } + + list = list->next; + } +} + + +/** + * egg_recent_model_remove_expired: + * @model: A EggRecentModel object. + * + * Goes through the entire list, and removes any items that are older than + * the user-specified expiration period. + * + * Returns: void + */ +void +egg_recent_model_remove_expired (EggRecentModel *model) +{ + FILE *file; + GList *list=NULL; + + g_return_if_fail (model != NULL); + + file = egg_recent_model_open_file (model); + g_return_if_fail (file != NULL); + + if (egg_recent_model_lock_file (file)) { + list = egg_recent_model_read (model, file); + + } else { + g_warning ("Failed to lock: %s", strerror (errno)); + return; + } + + if (!egg_recent_model_unlock_file (file)) + g_warning ("Failed to unlock: %s", strerror (errno)); + + if (list != NULL) { + egg_recent_model_remove_expired_list (model, list); + EGG_RECENT_ITEM_LIST_UNREF (list); + } + + fclose (file); +} + +/** + * egg_recent_model_get_type: + * + * This returns a GType representing a EggRecentModel object. + * + * Returns: a GType + */ +GType +egg_recent_model_get_type (void) +{ + static GType egg_recent_model_type = 0; + + if(!egg_recent_model_type) { + static const GTypeInfo egg_recent_model_info = { + sizeof (EggRecentModelClass), + NULL, /* base init */ + NULL, /* base finalize */ + (GClassInitFunc)egg_recent_model_class_init, /* class init */ + NULL, /* class finalize */ + NULL, /* class data */ + sizeof (EggRecentModel), + 0, + (GInstanceInitFunc) egg_recent_model_init + }; + + egg_recent_model_type = g_type_register_static (G_TYPE_OBJECT, + "EggRecentModel", + &egg_recent_model_info, 0); + } + + return egg_recent_model_type; +} + diff --git a/cut-n-paste/recent-files/egg-recent-model.h b/cut-n-paste/recent-files/egg-recent-model.h new file mode 100644 index 00000000..8c2eb8da --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-model.h @@ -0,0 +1,80 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +#ifndef __EGG_RECENT_MODEL_H__ +#define __EGG_RECENT_MODEL_H__ + +#include "egg-recent-item.h" + +G_BEGIN_DECLS + +#define EGG_TYPE_RECENT_MODEL (egg_recent_model_get_type ()) +#define EGG_RECENT_MODEL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, EGG_TYPE_RECENT_MODEL, EggRecentModel) +#define EGG_RECENT_MODEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, EGG_TYPE_RECENT_MODEL, EggRecentModelClass) +#define EGG_IS_RECENT_MODEL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, egg_recent_model_get_type ()) + +typedef struct _EggRecentModel EggRecentModel; +typedef struct _EggRecentModelPrivate EggRecentModelPrivate; +typedef struct _EggRecentModelClass EggRecentModelClass; + +struct _EggRecentModel { + GObject parent_instance; + + EggRecentModelPrivate *priv; +}; + +struct _EggRecentModelClass { + GObjectClass parent_class; + + void (*changed) (EggRecentModel *model, GList *list); +}; + +typedef enum { + EGG_RECENT_MODEL_SORT_MRU, + EGG_RECENT_MODEL_SORT_LRU, + EGG_RECENT_MODEL_SORT_NONE +} EggRecentModelSort; + + +/* Standard group names */ +#define EGG_RECENT_GROUP_LAUNCHERS "Launchers" + + +GType egg_recent_model_get_type (void); + +/* constructors */ +EggRecentModel * egg_recent_model_new (EggRecentModelSort sort); + +/* public methods */ +void egg_recent_model_set_filter_mime_types (EggRecentModel *model, + ...); + +void egg_recent_model_set_filter_groups (EggRecentModel *model, ...); + +void egg_recent_model_set_filter_uri_schemes (EggRecentModel *model, + ...); + +void egg_recent_model_set_sort (EggRecentModel *model, + EggRecentModelSort sort); + +gboolean egg_recent_model_add_full (EggRecentModel *model, + EggRecentItem *item); + +gboolean egg_recent_model_add (EggRecentModel *model, + const gchar *uri); + +gboolean egg_recent_model_delete (EggRecentModel *model, + const gchar *uri); + +void egg_recent_model_clear (EggRecentModel *model); + +GList * egg_recent_model_get_list (EggRecentModel *model); + +void egg_recent_model_changed (EggRecentModel *model); + +void egg_recent_model_set_limit (EggRecentModel *model, int limit); +int egg_recent_model_get_limit (EggRecentModel *model); + +void egg_recent_model_remove_expired (EggRecentModel *model); + +G_END_DECLS + +#endif /* __EGG_RECENT_MODEL_H__ */ diff --git a/cut-n-paste/recent-files/egg-recent-util.c b/cut-n-paste/recent-files/egg-recent-util.c new file mode 100644 index 00000000..cb30e053 --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-util.c @@ -0,0 +1,158 @@ +#include +#include +#include +#include +#include +#include +#include +#ifndef USE_STABLE_LIBGNOMEUI +#include +#include +#endif +#include +#include "egg-recent-util.h" + +#define EGG_RECENT_UTIL_HOSTNAME_SIZE 512 + +/* ripped out of gedit2 */ +gchar* +egg_recent_util_escape_underlines (const gchar* text) +{ + GString *str; + gint length; + const gchar *p; + const gchar *end; + + g_return_val_if_fail (text != NULL, NULL); + + length = strlen (text); + + str = g_string_new (""); + + p = text; + end = text + length; + + while (p != end) + { + const gchar *next; + next = g_utf8_next_char (p); + + switch (*p) + { + case '_': + g_string_append (str, "__"); + break; + default: + g_string_append_len (str, p, next - p); + break; + } + + p = next; + } + + return g_string_free (str, FALSE); +} + +#ifndef USE_STABLE_LIBGNOMEUI +static GdkPixbuf * +scale_icon (GdkPixbuf *pixbuf, + double *scale) +{ + guint width, height; + + width = gdk_pixbuf_get_width (pixbuf); + height = gdk_pixbuf_get_height (pixbuf); + + width = floor (width * *scale + 0.5); + height = floor (height * *scale + 0.5); + + return gdk_pixbuf_scale_simple (pixbuf, width, height, GDK_INTERP_BILINEAR); +} + +static GdkPixbuf * +load_icon_file (char *filename, + guint base_size, + guint nominal_size) +{ + GdkPixbuf *pixbuf, *scaled_pixbuf; + guint width, height, size; + double scale; + + pixbuf = gdk_pixbuf_new_from_file (filename, NULL); + + if (pixbuf == NULL) { + return NULL; + } + + if (base_size == 0) { + width = gdk_pixbuf_get_width (pixbuf); + height = gdk_pixbuf_get_height (pixbuf); + size = MAX (width, height); + if (size > nominal_size) { + base_size = size; + } else { + /* Don't scale up small icons */ + base_size = nominal_size; + } + } + + if (base_size != nominal_size) { + scale = (double)nominal_size/base_size; + scaled_pixbuf = scale_icon (pixbuf, &scale); + g_object_unref (pixbuf); + pixbuf = scaled_pixbuf; + } + + return pixbuf; +} + +GdkPixbuf * +egg_recent_util_get_icon (GnomeIconTheme *theme, const gchar *uri, + const gchar *mime_type, int size) +{ + gchar *icon; + gchar *filename; + const GnomeIconData *icon_data; + int base_size; + GdkPixbuf *pixbuf; + + icon = gnome_icon_lookup (theme, NULL, uri, NULL, NULL, + mime_type, 0, NULL); + + + g_return_val_if_fail (icon != NULL, NULL); + + filename = gnome_icon_theme_lookup_icon (theme, icon, + size, + &icon_data, + &base_size); + g_free (icon); + + if (filename == NULL) { + return NULL; + } + + pixbuf = load_icon_file (filename, base_size, size); + g_free (filename); + + + return pixbuf; +} +#endif /* !USE_STABLE_LIBGNOMEUI */ + +gchar * +egg_recent_util_get_unique_id (void) +{ + char hostname[EGG_RECENT_UTIL_HOSTNAME_SIZE]; + time_t the_time; + guint32 rand; + int pid; + + gethostname (hostname, EGG_RECENT_UTIL_HOSTNAME_SIZE); + + time (&the_time); + rand = g_random_int (); + pid = getpid (); + + return g_strdup_printf ("%s-%d-%d-%d", hostname, (int)time, (int)rand, (int)pid); +} diff --git a/cut-n-paste/recent-files/egg-recent-util.h b/cut-n-paste/recent-files/egg-recent-util.h new file mode 100644 index 00000000..ae8a6411 --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-util.h @@ -0,0 +1,23 @@ + +#ifndef __EGG_RECENT_UTIL__ +#define __EGG_RECENT_UTIL__ + +#include +#ifndef USE_STABLE_LIBGNOMEUI +#include +#endif + +G_BEGIN_DECLS + +gchar * egg_recent_util_escape_underlines (const gchar *uri); +gchar * egg_recent_util_get_unique_id (void); +#ifndef USE_STABLE_LIBGNOMEUI +GdkPixbuf * egg_recent_util_get_icon (GnomeIconTheme *theme, + const gchar *uri, + const gchar *mime_type, + int size); +#endif + +G_END_DECLS + +#endif /* __EGG_RECENT_UTIL__ */ diff --git a/cut-n-paste/recent-files/egg-recent-view-bonobo.c b/cut-n-paste/recent-files/egg-recent-view-bonobo.c new file mode 100644 index 00000000..e728e702 --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-view-bonobo.c @@ -0,0 +1,714 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/** + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * + * Authors: + * James Willcox + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#ifndef USE_STABLE_LIBGNOMEUI +#include +#endif +#include +#include "egg-recent-model.h" +#include "egg-recent-view.h" +#include "egg-recent-view-bonobo.h" +#include "egg-recent-util.h" +#include "egg-recent-item.h" + +struct _EggRecentViewBonobo { + GObject parent_instance; /* We emit signals */ + + BonoboUIComponent *uic; + gchar *path; /* The menu path where our stuff + * will go + */ + + gulong changed_cb_id; + + gchar *uid; /* unique id used for the verb name */ + + gboolean show_icons; + gboolean show_numbers; +#ifndef USE_STABLE_LIBGNOMEUI + GnomeIconTheme *theme; +#endif + EggRecentViewBonoboTooltipFunc tooltip_func; + gpointer tooltip_func_data; + + EggRecentModel *model; + GConfClient *client; + GtkIconSize icon_size; +}; + + +struct _EggRecentViewBonoboMenuData { + EggRecentViewBonobo *view; + EggRecentItem *item; +}; + +typedef struct _EggRecentViewBonoboMenuData EggRecentViewBonoboMenuData; + +enum { + ACTIVATE, + LAST_SIGNAL +}; + +/* GObject properties */ +enum { + PROP_BOGUS, + PROP_UI_COMPONENT, + PROP_MENU_PATH, + PROP_SHOW_ICONS, + PROP_SHOW_NUMBERS +}; + +static guint egg_recent_view_bonobo_signals[LAST_SIGNAL] = { 0 }; + +static void +egg_recent_view_bonobo_clear (EggRecentViewBonobo *view) +{ + gint i=1; + gboolean done=FALSE; + EggRecentModel *model; + + g_return_if_fail (view->uic); + + model = egg_recent_view_get_model (EGG_RECENT_VIEW (view)); + + while (!done) + { + gchar *verb_name = g_strdup_printf ("%s-%d", view->uid, i); + gchar *item_path = g_strconcat (view->path, "/", verb_name, NULL); + if (bonobo_ui_component_path_exists (view->uic, item_path, NULL)) + bonobo_ui_component_rm (view->uic, item_path, NULL); + else + done=TRUE; + + g_free (item_path); + g_free (verb_name); + + i++; + } +} + +static void +egg_recent_view_bonobo_menu_cb (BonoboUIComponent *uic, gpointer data, const char *cname) +{ + EggRecentViewBonoboMenuData *md = (EggRecentViewBonoboMenuData *) data; + EggRecentItem *item; + + g_return_if_fail (md); + g_return_if_fail (md->item); + g_return_if_fail (md->view); + g_return_if_fail (EGG_IS_RECENT_VIEW_BONOBO (md->view)); + + item = md->item; + egg_recent_item_ref (item); + + g_signal_emit (G_OBJECT(md->view), + egg_recent_view_bonobo_signals[ACTIVATE], 0, + item); + + egg_recent_item_unref (item); +} + +static void +egg_recent_view_bonobo_menu_data_destroy_cb (gpointer data, GClosure *closure) +{ + EggRecentViewBonoboMenuData *md = data; + + egg_recent_item_unref (md->item); + g_free (md); +} + + +static void +egg_recent_view_bonobo_set_list (EggRecentViewBonobo *view, GList *list) +{ + BonoboUIComponent* ui_component; + unsigned int i; + gchar *label = NULL; + gchar *verb_name = NULL; + gchar *tip = NULL; + gchar *escaped_name = NULL; + gchar *item_path = NULL; + gchar *base_uri; + gchar *utf8_uri; + gchar *cmd; + gchar *xml_escaped_name; + EggRecentViewBonoboMenuData *md; + EggRecentModel *model; + GClosure *closure; + + g_return_if_fail (view); + + ui_component = view->uic; + g_return_if_fail (BONOBO_IS_UI_COMPONENT (ui_component)); + + + model = egg_recent_view_get_model (EGG_RECENT_VIEW (view)); + + egg_recent_view_bonobo_clear (view); + + + bonobo_ui_component_freeze (ui_component, NULL); + + for (i = 1; i <= g_list_length (list); ++i) + { + EggRecentItem *item = (EggRecentItem *)g_list_nth_data (list, i-1); + + utf8_uri = egg_recent_item_get_uri_for_display (item); + if (utf8_uri == NULL) + continue; + + /* this is what gets passed to our private "activate" callback */ + md = (EggRecentViewBonoboMenuData *)g_malloc (sizeof (EggRecentViewBonoboMenuData)); + md->view = view; + md->item = item; + + egg_recent_item_ref (md->item); + + base_uri = g_path_get_basename (utf8_uri); + xml_escaped_name = g_markup_escape_text (base_uri, + strlen (base_uri)); + + escaped_name = egg_recent_util_escape_underlines (xml_escaped_name); + g_free (xml_escaped_name); + + tip = NULL; + if (view->tooltip_func != NULL) { + gchar *tmp_tip; + tip = view->tooltip_func (item, + view->tooltip_func_data); + tmp_tip = g_markup_escape_text (tip, strlen (tip)); + g_free (tip); + tip = tmp_tip; + } + + if (tip == NULL) + tip = g_strdup (""); + + verb_name = g_strdup_printf ("%s-%d", view->uid, i); + + if (view->show_icons) { + GdkPixbuf *pixbuf; + gchar *mime_type; + gchar *uri; + + mime_type = egg_recent_item_get_mime_type (item); + uri = egg_recent_item_get_uri (item); +#ifndef USE_STABLE_LIBGNOMEUI + { + int width, height; + + gtk_icon_size_lookup_for_settings + (gtk_settings_get_default (), + view->icon_size, + &width, &height); + pixbuf = egg_recent_util_get_icon + (view->theme, + uri, mime_type, + height); + } +#else + pixbuf = NULL; +#endif + + + if (pixbuf != NULL) { + gchar *pixbuf_xml; + + /* Riiiiight.... */ + pixbuf_xml = bonobo_ui_util_pixbuf_to_xml (pixbuf); + + cmd = g_strdup_printf ("", verb_name, pixbuf_xml); + + g_free (pixbuf_xml); + g_object_unref (pixbuf); + } else { + cmd = g_strdup_printf (" ", + verb_name); + } + + g_free (mime_type); + g_free (uri); + } else + cmd = g_strdup_printf (" ", + verb_name); + bonobo_ui_component_set_translate (ui_component, "/commands/", cmd, NULL); + + closure = g_cclosure_new (G_CALLBACK (egg_recent_view_bonobo_menu_cb), + md, egg_recent_view_bonobo_menu_data_destroy_cb); + + bonobo_ui_component_add_verb_full (ui_component, verb_name, + closure); + + if (view->show_numbers) { + if (i < 10) + label = g_strdup_printf ("_%d. %s", i, + escaped_name); + else + label = g_strdup_printf ("%d. %s", i, escaped_name); + } else { + label = g_strdup (escaped_name); + } + + + + item_path = g_strconcat (view->path, "/", verb_name, NULL); + + if (bonobo_ui_component_path_exists (ui_component, item_path, NULL)) + { + bonobo_ui_component_set_prop (ui_component, item_path, + "label", label, NULL); + + bonobo_ui_component_set_prop (ui_component, item_path, + "tip", tip, NULL); + } + else + { + gchar *xml; + + xml = g_strdup_printf ("", + verb_name, verb_name, label, + tip); + + bonobo_ui_component_set_translate (ui_component, view->path, xml, NULL); + + g_free (xml); + } + + g_free (label); + g_free (verb_name); + g_free (tip); + g_free (escaped_name); + g_free (item_path); + g_free (utf8_uri); + g_free (base_uri); + g_free (cmd); + + } + + + bonobo_ui_component_thaw (ui_component, NULL); +} + +static void +model_changed_cb (EggRecentModel *model, GList *list, EggRecentViewBonobo *view) +{ + if (list != NULL) + egg_recent_view_bonobo_set_list (view, list); + else + egg_recent_view_bonobo_clear (view); +} + + +static EggRecentModel * +egg_recent_view_bonobo_get_model (EggRecentView *view_parent) +{ + EggRecentViewBonobo *view; + + g_return_val_if_fail (view_parent, NULL); + view = EGG_RECENT_VIEW_BONOBO (view_parent); + + return view->model; +} + +static void +egg_recent_view_bonobo_set_model (EggRecentView *view_parent, EggRecentModel *model) +{ + EggRecentViewBonobo *view; + + g_return_if_fail (view_parent); + view = EGG_RECENT_VIEW_BONOBO (view_parent); + + if (view->model) + g_signal_handler_disconnect (G_OBJECT (view->model), + view->changed_cb_id); + + view->model = model; + g_object_ref (view->model); + view->changed_cb_id = g_signal_connect_object (G_OBJECT (model), + "changed", + G_CALLBACK (model_changed_cb), + view, 0); + + egg_recent_model_changed (view->model); +} + +static void +egg_recent_view_bonobo_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + EggRecentViewBonobo *view = EGG_RECENT_VIEW_BONOBO (object); + + switch (prop_id) + { + case PROP_UI_COMPONENT: + egg_recent_view_bonobo_set_ui_component (EGG_RECENT_VIEW_BONOBO (view), + BONOBO_UI_COMPONENT (g_value_get_object (value))); + break; + case PROP_MENU_PATH: + view->path = g_strdup (g_value_get_string (value)); + break; + case PROP_SHOW_ICONS: + egg_recent_view_bonobo_show_icons (view, + g_value_get_boolean (value)); + default: + case PROP_SHOW_NUMBERS: + egg_recent_view_bonobo_show_numbers (view, + g_value_get_boolean (value)); + break; + break; + } +} + +static void +egg_recent_view_bonobo_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + EggRecentViewBonobo *view = EGG_RECENT_VIEW_BONOBO (object); + + switch (prop_id) + { + case PROP_UI_COMPONENT: + g_value_set_pointer (value, view->uic); + break; + case PROP_MENU_PATH: + g_value_set_string (value, g_strdup (view->path)); + break; + case PROP_SHOW_ICONS: + g_value_set_boolean (value, view->show_icons); + break; + case PROP_SHOW_NUMBERS: + g_value_set_boolean (value, view->show_numbers); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +egg_recent_view_bonobo_finalize (GObject *object) +{ + EggRecentViewBonobo *view = EGG_RECENT_VIEW_BONOBO (object); + + g_free (view->path); + g_free (view->uid); + + g_object_unref (view->model); + g_object_unref (view->uic); +#ifndef USE_STABLE_LIBGNOMEUI + g_object_unref (view->theme); +#endif + g_object_unref (view->client); +} + +static void +egg_recent_view_bonobo_class_init (EggRecentViewBonoboClass * klass) +{ + GObjectClass *object_class; + + + object_class = G_OBJECT_CLASS (klass); + + object_class->set_property = egg_recent_view_bonobo_set_property; + object_class->get_property = egg_recent_view_bonobo_get_property; + object_class->finalize = egg_recent_view_bonobo_finalize; + + egg_recent_view_bonobo_signals[ACTIVATE] = g_signal_new ("activate", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EggRecentViewBonoboClass, activate), + NULL, NULL, + g_cclosure_marshal_VOID__BOXED, + G_TYPE_NONE, 1, + EGG_TYPE_RECENT_ITEM); + + g_object_class_install_property (object_class, + PROP_UI_COMPONENT, + g_param_spec_object ("ui-component", + "UI Component", + "BonoboUIComponent for menus.", + bonobo_ui_component_get_type(), + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_MENU_PATH, + g_param_spec_string ("ui-path", + "Path", + "The path to put the menu items.", + "/menus/File/EggRecentDocuments", + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_SHOW_ICONS, + g_param_spec_boolean ("show-icons", + "Show Icons", + "Whether or not to show icons", + FALSE, + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_SHOW_NUMBERS, + g_param_spec_boolean ("show-numbers", + "Show Numbers", + "Whether or not to show numbers", + TRUE, + G_PARAM_READWRITE)); + + + + klass->activate = NULL; +} + +static void +egg_recent_view_init (EggRecentViewClass *iface) +{ + iface->do_get_model = egg_recent_view_bonobo_get_model; + iface->do_set_model = egg_recent_view_bonobo_set_model; +} + +static void +show_menus_changed_cb (GConfClient *client, + guint cnxn_id, + GConfEntry *entry, + EggRecentViewBonobo *view) +{ + GConfValue *value; + + value = gconf_entry_get_value (entry); + + g_return_if_fail (value->type == GCONF_VALUE_BOOL); + + egg_recent_view_bonobo_show_icons (view, + gconf_value_get_bool (value)); + +} + +#ifndef USE_STABLE_LIBGNOMEUI +static void +theme_changed_cb (GnomeIconTheme *theme, EggRecentViewBonobo *view) +{ + if (view->model != NULL) + egg_recent_model_changed (view->model); +} +#endif + +static void +egg_recent_view_bonobo_init (EggRecentViewBonobo *view) +{ + view->uid = egg_recent_util_get_unique_id (); +#ifndef USE_STABLE_LIBGNOMEUI + view->theme = gnome_icon_theme_new (); + gnome_icon_theme_set_allow_svg (view->theme, TRUE); + g_signal_connect_object (view->theme, "changed", + G_CALLBACK (theme_changed_cb), view, 0); +#endif + + view->client = gconf_client_get_default (); + view->show_icons = + gconf_client_get_bool (view->client, + "/desktop/gnome/interface/menus_have_icons", + NULL); + + gconf_client_add_dir (view->client, "/desktop/gnome/interface", + GCONF_CLIENT_PRELOAD_NONE, + NULL); + gconf_client_notify_add (view->client, + "/desktop/gnome/interface/menus_have_icons", + (GConfClientNotifyFunc)show_menus_changed_cb, + view, NULL, NULL); + + view->tooltip_func = NULL; + view->tooltip_func_data = NULL; + + view->icon_size = GTK_ICON_SIZE_MENU; +} + +void +egg_recent_view_bonobo_set_icon_size (EggRecentViewBonobo *view, + GtkIconSize icon_size) +{ + if (view->icon_size != icon_size) { + view->icon_size = icon_size; + egg_recent_model_changed (view->model); + } else { + view->icon_size = icon_size; + } +} + +GtkIconSize +egg_recent_view_bonobo_get_icon_size (EggRecentViewBonobo *view) +{ + return view->icon_size; +} + +void +egg_recent_view_bonobo_show_icons (EggRecentViewBonobo *view, gboolean show) +{ + view->show_icons = show; + + if (view->model) + egg_recent_model_changed (view->model); +} + +void +egg_recent_view_bonobo_show_numbers (EggRecentViewBonobo *view, gboolean show) +{ + view->show_numbers = show; + + if (view->model) + egg_recent_model_changed (view->model); +} + +void +egg_recent_view_bonobo_set_ui_component (EggRecentViewBonobo *view, BonoboUIComponent *uic) +{ + g_return_if_fail (view); + g_return_if_fail (uic); + + view->uic = uic; + + g_object_ref (view->uic); +} + +void +egg_recent_view_bonobo_set_ui_path (EggRecentViewBonobo *view, const gchar *path) +{ + g_return_if_fail (view); + g_return_if_fail (path); + + view->path = g_strdup (path); +} + +const BonoboUIComponent * +egg_recent_view_bonobo_get_ui_component (EggRecentViewBonobo *view) +{ + g_return_val_if_fail (view, NULL); + + return view->uic; +} + +gchar * +egg_recent_view_bonobo_get_ui_path (EggRecentViewBonobo *view) +{ + g_return_val_if_fail (view, NULL); + + return g_strdup (view->path); +} + +void +egg_recent_view_bonobo_set_tooltip_func (EggRecentViewBonobo *view, + EggRecentViewBonoboTooltipFunc func, + gpointer user_data) +{ + view->tooltip_func = func; + view->tooltip_func_data = user_data; + + if (view->model) + egg_recent_model_changed (view->model); +} + +/** + * egg_recent_view_bonobo_new: + * @appname: The name of your application. + * @limit: The maximum number of items allowed. + * + * This creates a new EggRecentViewBonobo object. + * + * Returns: a EggRecentViewBonobo object + */ +EggRecentViewBonobo * +egg_recent_view_bonobo_new (BonoboUIComponent *uic, const gchar *path) +{ + EggRecentViewBonobo *view; + + g_return_val_if_fail (uic, NULL); + g_return_val_if_fail (path, NULL); + + view = EGG_RECENT_VIEW_BONOBO (g_object_new (egg_recent_view_bonobo_get_type (), + "ui-path", path, + "ui-component", uic, + "show-icons", FALSE, + "show-numbers", TRUE, NULL)); + + g_return_val_if_fail (view, NULL); + + return view; +} + +/** + * egg_recent_view_bonobo_get_type: + * @: + * + * This returns a GType representing a EggRecentViewBonobo object. + * + * Returns: a GType + */ +GType +egg_recent_view_bonobo_get_type (void) +{ + static GType egg_recent_view_bonobo_type = 0; + + if(!egg_recent_view_bonobo_type) { + static const GTypeInfo egg_recent_view_bonobo_info = { + sizeof (EggRecentViewBonoboClass), + NULL, /* base init */ + NULL, /* base finalize */ + (GClassInitFunc)egg_recent_view_bonobo_class_init, /* class init */ + NULL, /* class finalize */ + NULL, /* class data */ + sizeof (EggRecentViewBonobo), + 0, + (GInstanceInitFunc) egg_recent_view_bonobo_init + }; + + static const GInterfaceInfo view_info = + { + (GInterfaceInitFunc) egg_recent_view_init, + NULL, + NULL + }; + + egg_recent_view_bonobo_type = g_type_register_static (G_TYPE_OBJECT, + "EggRecentViewBonobo", + &egg_recent_view_bonobo_info, 0); + g_type_add_interface_static (egg_recent_view_bonobo_type, + EGG_TYPE_RECENT_VIEW, + &view_info); + } + + return egg_recent_view_bonobo_type; +} + diff --git a/cut-n-paste/recent-files/egg-recent-view-bonobo.h b/cut-n-paste/recent-files/egg-recent-view-bonobo.h new file mode 100644 index 00000000..0b283ef7 --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-view-bonobo.h @@ -0,0 +1,58 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +#ifndef __EGG_RECENT_VIEW_BONOBO_H__ +#define __EGG_RECENT_VIEW_BONOBO_H__ + +#include + +G_BEGIN_DECLS + +#define EGG_RECENT_VIEW_BONOBO(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, egg_recent_view_bonobo_get_type (), EggRecentViewBonobo) +#define EGG_RECENT_VIEW_BONOBO_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, egg_recent_view_bonobo_get_type (), EggRecentViewBonoboClass) +#define EGG_IS_RECENT_VIEW_BONOBO(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, egg_recent_view_bonobo_get_type ()) + +typedef char *(*EggRecentViewBonoboTooltipFunc) (EggRecentItem *item, + gpointer user_data); + +typedef struct _EggRecentViewBonobo EggRecentViewBonobo; + +typedef struct _EggRecentViewBonoboClass EggRecentViewBonoboClass; + +struct _EggRecentViewBonoboClass { + GObjectClass parent_class; + + void (*activate) (EggRecentViewBonobo *view, EggRecentItem *item); +}; + +GType egg_recent_view_bonobo_get_type (void); + +EggRecentViewBonobo * egg_recent_view_bonobo_new (BonoboUIComponent *uic, + const gchar *path); + + +void egg_recent_view_bonobo_set_ui_component (EggRecentViewBonobo *view, + BonoboUIComponent *uic); + +void egg_recent_view_bonobo_set_ui_path (EggRecentViewBonobo *view, + const gchar *path); + +gchar * egg_recent_view_bonobo_get_ui_path (EggRecentViewBonobo *view); +const BonoboUIComponent *egg_recent_view_bonobo_get_ui_component (EggRecentViewBonobo *view); + +void egg_recent_view_bonobo_show_icons (EggRecentViewBonobo *view, + gboolean show); + +void egg_recent_view_bonobo_show_numbers (EggRecentViewBonobo *view, + gboolean show); + +void egg_recent_view_bonobo_set_tooltip_func (EggRecentViewBonobo *view, + EggRecentViewBonoboTooltipFunc func, + gpointer user_data); + +void egg_recent_view_bonobo_set_icon_size (EggRecentViewBonobo *view, + GtkIconSize icon_size); + +GtkIconSize egg_recent_view_bonobo_get_icon_size (EggRecentViewBonobo *view); + +G_END_DECLS + +#endif /* __EGG_RECENT_VIEW_BONOBO_H__ */ diff --git a/cut-n-paste/recent-files/egg-recent-view-gtk.c b/cut-n-paste/recent-files/egg-recent-view-gtk.c new file mode 100644 index 00000000..34805b29 --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-view-gtk.c @@ -0,0 +1,817 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/** + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * + * Authors: + * James Willcox + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#ifndef USE_STABLE_LIBGNOMEUI +#include +#endif +#include +#include "egg-recent-model.h" +#include "egg-recent-view.h" +#include "egg-recent-view-gtk.h" +#include "egg-recent-util.h" +#include "egg-recent-item.h" + +struct _EggRecentViewGtk { + GObject parent_instance; /* We emit signals */ + + GtkWidget *menu; + GtkWidget *start_menu_item; + + gboolean leading_sep; + gboolean trailing_sep; + + gulong changed_cb_id; + + gchar *uid; + + gboolean show_icons; + gboolean show_numbers; +#ifndef USE_STABLE_LIBGNOMEUI + GnomeIconTheme *theme; +#endif + + GtkTooltips *tooltips; + EggRecentViewGtkTooltipFunc tooltip_func; + gpointer tooltip_func_data; + + EggRecentModel *model; + GConfClient *client; + GtkIconSize icon_size; +}; + + + +struct _EggRecentViewGtkMenuData { + EggRecentViewGtk *view; + EggRecentItem *item; +}; + +typedef struct _EggRecentViewGtkMenuData EggRecentViewGtkMenuData; + +enum { + ACTIVATE, + LAST_SIGNAL +}; + +/* GObject properties */ +enum { + PROP_BOGUS, + PROP_MENU, + PROP_START_MENU_ITEM, + PROP_SHOW_ICONS, + PROP_SHOW_NUMBERS +}; + +static guint view_signals[LAST_SIGNAL] = { 0 }; + + +static void +egg_recent_view_gtk_clear (EggRecentViewGtk *view) +{ + GList *menu_children; + GList *p; + GObject *menu_item; + gint *menu_data=NULL; + + g_return_if_fail (view->menu != NULL); + + menu_children = gtk_container_get_children (GTK_CONTAINER (view->menu)); + + p = menu_children; + while (p != NULL) { + menu_item = (GObject *)p->data; + + menu_data = (gint *)g_object_get_data (menu_item, + view->uid); + + if (menu_data) { + gtk_container_remove (GTK_CONTAINER (view->menu), + GTK_WIDGET (menu_item)); + + } + + p = p->next; + } +} + + +static gint +egg_recent_view_gtk_find_menu_offset (EggRecentViewGtk *view) +{ + gint i; + GList *menu_children; + GList *p; + GtkWidget *menu_item; + gint menu_loc=-1; + + g_return_val_if_fail (view, 0); + + menu_children = GTK_MENU_SHELL (view->menu)->children; + + i = 0; + p = menu_children; + while (p != NULL) { + menu_item = (GtkWidget *)p->data; + + if (menu_item == view->start_menu_item) { + menu_loc = i; + break; + } + + p = p->next; + i++; + } + + return menu_loc; +} + +static void +egg_recent_view_gtk_menu_cb (GtkWidget *menu, gpointer data) +{ + EggRecentViewGtkMenuData *md = (EggRecentViewGtkMenuData *) data; + EggRecentItem *item; + + g_return_if_fail (md); + g_return_if_fail (md->item); + g_return_if_fail (md->view); + g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (md->view)); + + item = md->item; + + egg_recent_item_ref (item); + + g_signal_emit (G_OBJECT(md->view), view_signals[ACTIVATE], 0, + item); + + egg_recent_item_unref (item); +} + +static void +egg_recent_view_gtk_destroy_cb (gpointer data, GClosure *closure) +{ + EggRecentViewGtkMenuData *md = data; + + egg_recent_item_unref (md->item); + g_free (md); +} + +static GtkWidget * +egg_recent_view_gtk_new_separator (EggRecentViewGtk *view) +{ + GtkWidget *retval; + + g_return_val_if_fail (view, NULL); + + retval = gtk_separator_menu_item_new (); + + /** + * this is a tag so we can distinguish our menu items + * from others that may be in the menu. + */ + g_object_set_data (G_OBJECT (retval), + view->uid, + GINT_TO_POINTER (1)); + + + gtk_widget_show (retval); + + return retval; +} + +static GtkWidget * +egg_recent_view_gtk_new_menu_item (EggRecentViewGtk *view, + EggRecentItem *item, + gint index) +{ + GtkWidget *menu_item; + EggRecentViewGtkMenuData *md; + gchar *mime_type; + GtkWidget *image; + GdkPixbuf *pixbuf; + gchar *text; + gchar *short_name; + gchar *escaped; + + g_return_val_if_fail (view, NULL); + g_return_val_if_fail (item, NULL); + + short_name = egg_recent_item_get_short_name (item); + if (!short_name) + return NULL; + + escaped = egg_recent_util_escape_underlines (short_name); + g_free (short_name); + + if (view->show_numbers) { + /* avoid having conflicting mnemonics */ + if (index >= 10) + text = g_strdup_printf ("%d. %s", index, + escaped); + else + text = g_strdup_printf ("_%d. %s", index, + escaped); + g_free (escaped); + } else { + text = escaped; + } + + mime_type = egg_recent_item_get_mime_type (item); +#ifndef USE_STABLE_LIBGNOMEUI + { + int width, height; + gchar *uri; + + gtk_icon_size_lookup_for_settings + (gtk_widget_get_settings (view->menu), + view->icon_size, + &width, &height); + + uri = egg_recent_item_get_uri (item); + pixbuf = egg_recent_util_get_icon (view->theme, uri, + mime_type, + height); + g_free (uri); + } +#else + pixbuf = NULL; +#endif + image = gtk_image_new_from_pixbuf (pixbuf); + if (pixbuf) + g_object_unref (pixbuf); + + if (view->show_icons) + gtk_widget_show (image); + + menu_item = gtk_image_menu_item_new_with_mnemonic (text); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), + image); + + md = g_new0 (EggRecentViewGtkMenuData, 1); + md->view = view; + md->item = egg_recent_item_ref (item); + + g_signal_connect_data (G_OBJECT (menu_item), "activate", + G_CALLBACK (egg_recent_view_gtk_menu_cb), + md, + (GClosureNotify)egg_recent_view_gtk_destroy_cb, + 0); + + g_free (mime_type); + g_free (text); + + /** + * this is a tag so we can distinguish our menu items + * from others that may be in the menu. + */ + g_object_set_data (G_OBJECT (menu_item), + view->uid, + GINT_TO_POINTER (1)); + + + gtk_widget_show (menu_item); + + return menu_item; +} + +static void +egg_recent_view_gtk_add_to_menu (EggRecentViewGtk *view, + EggRecentItem *item, + gint display, + gint index) +{ + GtkWidget *menu_item; + gint menu_offset; + + g_return_if_fail (view); + g_return_if_fail (view->menu); + + menu_offset = egg_recent_view_gtk_find_menu_offset (view); + + if (item != NULL) + menu_item = egg_recent_view_gtk_new_menu_item (view, item, display); + else + menu_item = egg_recent_view_gtk_new_separator (view); + + if (view->tooltip_func != NULL && menu_item != NULL) { + view->tooltip_func (view->tooltips, menu_item, + item, view->tooltip_func_data); + } + + if (menu_item) + gtk_menu_shell_insert (GTK_MENU_SHELL (view->menu), menu_item, + menu_offset+index); +} + +static void +egg_recent_view_gtk_set_list (EggRecentViewGtk *view, GList *list) +{ + EggRecentItem *item; + GList *p; + gint display=1; + gint index=1; + + g_return_if_fail (view); + + egg_recent_view_gtk_clear (view); + + if (view->leading_sep) { + egg_recent_view_gtk_add_to_menu (view, NULL, display, index); + index++; + } + + p = list; + while (p != NULL) { + item = (EggRecentItem *)p->data; + + egg_recent_view_gtk_add_to_menu (view, item, display, index); + + p = p->next; + display++; + index++; + } + + if (view->trailing_sep) + egg_recent_view_gtk_add_to_menu (view, NULL, display, index); +} + +static void +model_changed_cb (EggRecentModel *model, GList *list, EggRecentViewGtk *view) +{ + if (list != NULL) + egg_recent_view_gtk_set_list (view, list); + else + egg_recent_view_gtk_clear (view); +} + +static EggRecentModel * +egg_recent_view_gtk_get_model (EggRecentView *view_parent) +{ + EggRecentViewGtk *view; + + g_return_val_if_fail (view_parent != NULL, NULL); + view = EGG_RECENT_VIEW_GTK (view_parent); + return view->model; +} + +static void +egg_recent_view_gtk_set_model (EggRecentView *view_parent, + EggRecentModel *model) +{ + EggRecentViewGtk *view; + + g_return_if_fail (view_parent != NULL); + view = EGG_RECENT_VIEW_GTK (view_parent); + + if (view->model != NULL) { + g_object_unref (view->model); + g_signal_handler_disconnect (G_OBJECT (model), + view->changed_cb_id); + } + + view->model = model; + g_object_ref (view->model); + + view->changed_cb_id = g_signal_connect_object (G_OBJECT (model), + "changed", + G_CALLBACK (model_changed_cb), + view, 0); + + egg_recent_model_changed (view->model); +} + +void +egg_recent_view_gtk_set_leading_sep (EggRecentViewGtk *view, gboolean val) +{ + view->leading_sep = val; + + egg_recent_view_gtk_clear (view); + + if (view->model) + egg_recent_model_changed (view->model); +} + +void +egg_recent_view_gtk_set_trailing_sep (EggRecentViewGtk *view, gboolean val) +{ + view->trailing_sep = val; + + egg_recent_view_gtk_clear (view); + + if (view->model) + egg_recent_model_changed (view->model); +} + +static void +egg_recent_view_gtk_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + EggRecentViewGtk *view = EGG_RECENT_VIEW_GTK (object); + + switch (prop_id) + { + case PROP_MENU: + egg_recent_view_gtk_set_menu (view, + GTK_WIDGET (g_value_get_object (value))); + break; + case PROP_START_MENU_ITEM: + egg_recent_view_gtk_set_start_menu_item (view, + g_value_get_object (value)); + break; + case PROP_SHOW_ICONS: + egg_recent_view_gtk_show_icons (view, + g_value_get_boolean (value)); + break; + case PROP_SHOW_NUMBERS: + egg_recent_view_gtk_show_numbers (view, + g_value_get_boolean (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +egg_recent_view_gtk_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + EggRecentViewGtk *view = EGG_RECENT_VIEW_GTK (object); + + switch (prop_id) + { + case PROP_MENU: + g_value_set_object (value, view->menu); + break; + case PROP_START_MENU_ITEM: + g_value_set_object (value, view->start_menu_item); + break; + case PROP_SHOW_ICONS: + g_value_set_boolean (value, view->show_icons); + break; + case PROP_SHOW_NUMBERS: + g_value_set_boolean (value, view->show_numbers); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +egg_recent_view_gtk_finalize (GObject *object) +{ + EggRecentViewGtk *view = EGG_RECENT_VIEW_GTK (object); + + g_signal_handler_disconnect (G_OBJECT (view->model), + view->changed_cb_id); + + g_free (view->uid); + + g_object_unref (view->menu); + g_object_unref (view->model); +#ifndef USE_STABLE_LIBGNOMEUI + g_object_unref (view->theme); +#endif + g_object_unref (view->client); + + g_object_unref (view->tooltips); +} + +static void +egg_recent_view_gtk_class_init (EggRecentViewGtkClass * klass) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (klass); + + object_class->set_property = egg_recent_view_gtk_set_property; + object_class->get_property = egg_recent_view_gtk_get_property; + object_class->finalize = egg_recent_view_gtk_finalize; + + view_signals[ACTIVATE] = g_signal_new ("activate", + G_OBJECT_CLASS_TYPE (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EggRecentViewGtkClass, activate), + NULL, NULL, + g_cclosure_marshal_VOID__BOXED, + G_TYPE_NONE, 1, + EGG_TYPE_RECENT_ITEM); + + g_object_class_install_property (object_class, + PROP_MENU, + g_param_spec_object ("menu", + "Menu", + "The GtkMenuShell this object will update.", + gtk_menu_get_type(), + G_PARAM_READWRITE)); + g_object_class_install_property (object_class, + PROP_START_MENU_ITEM, + g_param_spec_object ("start-menu-item", + "Start Menu Item", + "The menu item that precedes where are menu items will go", + gtk_menu_item_get_type (), + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_SHOW_ICONS, + g_param_spec_boolean ("show-icons", + "Show Icons", + "Whether or not to show icons", + FALSE, + G_PARAM_READWRITE)); + + g_object_class_install_property (object_class, + PROP_SHOW_NUMBERS, + g_param_spec_boolean ("show-numbers", + "Show Numbers", + "Whether or not to show numbers", + TRUE, + G_PARAM_READWRITE)); + + klass->activate = NULL; +} + +static void +egg_recent_view_init (EggRecentViewClass *iface) +{ + iface->do_get_model = egg_recent_view_gtk_get_model; + iface->do_set_model = egg_recent_view_gtk_set_model; +} + +static void +show_menus_changed_cb (GConfClient *client, + guint cnxn_id, + GConfEntry *entry, + EggRecentViewGtk *view) +{ + GConfValue *value; + + value = gconf_entry_get_value (entry); + + g_return_if_fail (value->type == GCONF_VALUE_BOOL); + + egg_recent_view_gtk_show_icons (view, + gconf_value_get_bool (value)); + +} + +#ifndef USE_STABLE_LIBGNOMEUI +static void +theme_changed_cb (GnomeIconTheme *theme, EggRecentViewGtk *view) +{ + if (view->model != NULL) + egg_recent_model_changed (view->model); +} +#endif + +static void +egg_recent_view_gtk_init (EggRecentViewGtk * view) +{ + view->client = gconf_client_get_default (); + + view->show_icons = + gconf_client_get_bool (view->client, + "/desktop/gnome/interface/menus_have_icons", + NULL); + + gconf_client_add_dir (view->client, "/desktop/gnome/interface", + GCONF_CLIENT_PRELOAD_NONE, + NULL); + gconf_client_notify_add (view->client, + "/desktop/gnome/interface/menus_have_icons", + (GConfClientNotifyFunc)show_menus_changed_cb, + view, NULL, NULL); + + + view->leading_sep = FALSE; + view->trailing_sep = FALSE; + + view->uid = egg_recent_util_get_unique_id (); +#ifndef USE_STABLE_LIBGNOMEUI + view->theme = gnome_icon_theme_new (); + gnome_icon_theme_set_allow_svg (view->theme, TRUE); + g_signal_connect_object (view->theme, "changed", + G_CALLBACK (theme_changed_cb), view, 0); +#endif + view->tooltips = gtk_tooltips_new (); + g_object_ref (view->tooltips); + gtk_object_sink (GTK_OBJECT (view->tooltips)); + view->tooltip_func = NULL; + view->tooltip_func_data = NULL; + + view->icon_size = GTK_ICON_SIZE_MENU; +} + +void +egg_recent_view_gtk_set_icon_size (EggRecentViewGtk *view, + GtkIconSize icon_size) +{ + if (view->icon_size != icon_size) { + view->icon_size = icon_size; + egg_recent_model_changed (view->model); + } else { + view->icon_size = icon_size; + } +} + +GtkIconSize +egg_recent_view_gtk_get_icon_size (EggRecentViewGtk *view) +{ + return view->icon_size; +} + +void +egg_recent_view_gtk_show_icons (EggRecentViewGtk *view, gboolean show) +{ + view->show_icons = show; + + if (view->model) + egg_recent_model_changed (view->model); +} + +void +egg_recent_view_gtk_show_numbers (EggRecentViewGtk *view, gboolean show) +{ + view->show_numbers = show; + + if (view->model) + egg_recent_model_changed (view->model); +} + +void +egg_recent_view_gtk_set_tooltip_func (EggRecentViewGtk *view, + EggRecentViewGtkTooltipFunc func, + gpointer user_data) +{ + view->tooltip_func = func; + view->tooltip_func_data = user_data; + + if (view->model) + egg_recent_model_changed (view->model); +} + +/** + * egg_recent_view_gtk_set_menu: + * @view: A EggRecentViewGtk object. + * @menu: The GtkMenuShell to put the menu items in. + * + * Use this function to change the GtkMenuShell that the recent + * documents appear in. + * + */ +void +egg_recent_view_gtk_set_menu (EggRecentViewGtk *view, + GtkWidget *menu) +{ + g_return_if_fail (view); + g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (view)); + g_return_if_fail (menu); + + if (view->menu != NULL) + g_object_unref (view->menu); + + view->menu = menu; + g_object_ref (view->menu); +} + +/** + * egg_recent_view_gtk_set_start_menu_item: + * @view: A EggRecentViewGtk object. + * @start_menu_item: The menu item that appears just before where our menu + * items should appear + * + */ +void +egg_recent_view_gtk_set_start_menu_item (EggRecentViewGtk *view, + GtkWidget *menu_item) +{ + g_return_if_fail (view); + g_return_if_fail (EGG_IS_RECENT_VIEW_GTK (view)); + + view->start_menu_item = menu_item; +} + +/** + * egg_recent_view_gtk_get_menu: + * @view: A EggRecentViewGtk object. + * + */ +GtkWidget * +egg_recent_view_gtk_get_menu (EggRecentViewGtk *view) +{ + return view->menu; +} + +/** + * egg_recent_view_gtk_get_start_menu_item + * @view: A EggRecentViewGtk object. + * + */ +GtkWidget * +egg_recent_view_gtk_get_start_menu_item (EggRecentViewGtk *view) +{ + return view->start_menu_item; +} + + +/** + * egg_recent_view_gtk_new: + * @appname: The name of your application. + * @limit: The maximum number of items allowed. + * + * This creates a new EggRecentViewGtk object. + * + * Returns: a EggRecentViewGtk object + */ +EggRecentViewGtk * +egg_recent_view_gtk_new (GtkWidget *menu, GtkWidget *start_menu_item) +{ + EggRecentViewGtk *view; + + g_return_val_if_fail (menu, NULL); + + view = EGG_RECENT_VIEW_GTK (g_object_new (egg_recent_view_gtk_get_type (), + "start-menu-item", + start_menu_item, + "menu", menu, + "show-numbers", TRUE, NULL)); + + g_return_val_if_fail (view, NULL); + + return view; +} + +/** + * egg_recent_view_gtk_get_type: + * @: + * + * This returns a GType representing a EggRecentViewGtk object. + * + * Returns: a GType + */ +GType +egg_recent_view_gtk_get_type (void) +{ + static GType egg_recent_view_gtk_type = 0; + + if(!egg_recent_view_gtk_type) { + static const GTypeInfo egg_recent_view_gtk_info = { + sizeof (EggRecentViewGtkClass), + NULL, /* base init */ + NULL, /* base finalize */ + (GClassInitFunc)egg_recent_view_gtk_class_init, /* class init */ + NULL, /* class finalize */ + NULL, /* class data */ + sizeof (EggRecentViewGtk), + 0, + (GInstanceInitFunc) egg_recent_view_gtk_init + }; + + static const GInterfaceInfo view_info = + { + (GInterfaceInitFunc) egg_recent_view_init, + NULL, + NULL + }; + + egg_recent_view_gtk_type = g_type_register_static (G_TYPE_OBJECT, + "EggRecentViewGtk", + &egg_recent_view_gtk_info, 0); + g_type_add_interface_static (egg_recent_view_gtk_type, + EGG_TYPE_RECENT_VIEW, + &view_info); + } + + return egg_recent_view_gtk_type; +} + diff --git a/cut-n-paste/recent-files/egg-recent-view-gtk.h b/cut-n-paste/recent-files/egg-recent-view-gtk.h new file mode 100644 index 00000000..7e56bafe --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-view-gtk.h @@ -0,0 +1,64 @@ +/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +#ifndef __EGG_RECENT_VIEW_GTK_H__ +#define __EGG_RECENT_VIEW_GTK_H__ + +G_BEGIN_DECLS + +#include +#include "egg-recent-item.h" + +#define EGG_RECENT_VIEW_GTK(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, egg_recent_view_gtk_get_type (), EggRecentViewGtk) +#define EGG_RECENT_VIEW_GTK_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, egg_recent_view_gtk_get_type (), EggRecentViewGtkClass) +#define EGG_IS_RECENT_VIEW_GTK(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, egg_recent_view_gtk_get_type ()) + +typedef void (*EggRecentViewGtkTooltipFunc) (GtkTooltips *tooltips, + GtkWidget *menu, + EggRecentItem *item, + gpointer user_data); + +typedef struct _EggRecentViewGtk EggRecentViewGtk; + +typedef struct _EggRecentViewGtkClass EggRecentViewGtkClass; + +struct _EggRecentViewGtkClass { + GObjectClass parent_class; + + void (*activate) (EggRecentViewGtk *view, EggRecentItem *item); +}; + +GType egg_recent_view_gtk_get_type (void); + +EggRecentViewGtk * egg_recent_view_gtk_new (GtkWidget *menu, + GtkWidget *start_menu_item); + +void egg_recent_view_gtk_set_menu (EggRecentViewGtk *view, + GtkWidget *menu); +GtkWidget * egg_recent_view_gtk_get_menu (EggRecentViewGtk *view); + + +void egg_recent_view_gtk_set_start_menu_item (EggRecentViewGtk *view, + GtkWidget *menu_item); +GtkWidget *egg_recent_view_gtk_get_start_menu_item (EggRecentViewGtk *view); + +void egg_recent_view_gtk_set_leading_sep (EggRecentViewGtk *view, + gboolean val); + +void egg_recent_view_gtk_set_trailing_sep (EggRecentViewGtk *view, + gboolean val); + +void egg_recent_view_gtk_show_icons (EggRecentViewGtk *view, + gboolean show); +void egg_recent_view_gtk_show_numbers (EggRecentViewGtk *view, + gboolean show); + +void egg_recent_view_gtk_set_tooltip_func (EggRecentViewGtk *view, + EggRecentViewGtkTooltipFunc func, + gpointer user_data); + +void egg_recent_view_gtk_set_icon_size (EggRecentViewGtk *view, + GtkIconSize icon_size); +GtkIconSize egg_recent_view_gtk_get_icon_size (EggRecentViewGtk *view); + +G_END_DECLS + +#endif /* __EGG_RECENT_VIEW_GTK_H__ */ diff --git a/cut-n-paste/recent-files/egg-recent-view.c b/cut-n-paste/recent-files/egg-recent-view.c new file mode 100644 index 00000000..0aa38b93 --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-view.c @@ -0,0 +1,68 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/** + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + * + * Authors: + * James Willcox + */ + + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include "egg-recent-view.h" + + +GtkType +egg_recent_view_get_type (void) +{ + static GtkType view_type = 0; + + if (!view_type) + { + static const GTypeInfo view_info = + { + sizeof (EggRecentViewClass), /* class_size */ + NULL, /* base_init */ + NULL, /* base_finalize */ + }; + + view_type = g_type_register_static (G_TYPE_INTERFACE, + "EggRecentView", + &view_info, 0); + } + + return view_type; +} + +EggRecentModel * +egg_recent_view_get_model (EggRecentView *view) +{ + g_return_val_if_fail (view, NULL); + + return EGG_RECENT_VIEW_GET_CLASS (view)->do_get_model (view); +} + +void +egg_recent_view_set_model (EggRecentView *view, EggRecentModel *model) +{ + g_return_if_fail (view); + g_return_if_fail (model); + + EGG_RECENT_VIEW_GET_CLASS (view)->do_set_model (view, model); +} diff --git a/cut-n-paste/recent-files/egg-recent-view.h b/cut-n-paste/recent-files/egg-recent-view.h new file mode 100644 index 00000000..79f03469 --- /dev/null +++ b/cut-n-paste/recent-files/egg-recent-view.h @@ -0,0 +1,43 @@ +#ifndef __EGG_RECENT_VIEW_H__ +#define __EGG_RECENT_VIEW_H__ + + +#include +#include +#include "egg-recent-model.h" +#include "egg-recent-item.h" + +G_BEGIN_DECLS + +#define EGG_TYPE_RECENT_VIEW (egg_recent_view_get_type ()) +#define EGG_RECENT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_RECENT_VIEW, EggRecentView)) +#define EGG_RECENT_VIEW_CLASS(vtable) (G_TYPE_CHECK_CLASS_CAST ((vtable), EGG_TYPE_RECENT_VIEW, EggRecentViewClass)) +#define EGG_IS_RECENT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_RECENT_VIEW)) +#define EGG_IS_RECENT_VIEW_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), EGG_TYPE_RECENT_VIEW)) +#define EGG_RECENT_VIEW_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EGG_TYPE_RECENT_VIEW, EggRecentViewClass)) + + +typedef struct _EggRecentView EggRecentView; +typedef struct _EggRecentViewClass EggRecentViewClass; + +struct _EggRecentViewClass +{ + GTypeInterface base_iface; + + /* vtable, not signals */ + void (* do_set_model) (EggRecentView *view, + EggRecentModel *model); + EggRecentModel * (* do_get_model) (EggRecentView *view); +}; + +GtkType egg_recent_view_get_type (void) G_GNUC_CONST; +void egg_recent_view_set_list (EggRecentView *view, + GSList *list); +void egg_recent_view_clear (EggRecentView *view); +EggRecentModel *egg_recent_view_get_model (EggRecentView *view); +void egg_recent_view_set_model (EggRecentView *view, + EggRecentModel *model); + +G_END_DECLS + +#endif /* __EGG_RECENT_VIEW_H__ */ diff --git a/cut-n-paste/recent-files/update-from-egg.sh b/cut-n-paste/recent-files/update-from-egg.sh new file mode 100755 index 00000000..9be68a9b --- /dev/null +++ b/cut-n-paste/recent-files/update-from-egg.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +function die() { + echo $* + exit 1 +} + +if test -z "$EGGDIR"; then + echo "Must set EGGDIR" + exit 1 +fi + +if test -z "$EGGFILES"; then + echo "Must set EGGFILES" + exit 1 +fi + +for FILE in $EGGFILES; do + if cmp -s $EGGDIR/$FILE $FILE; then + echo "File $FILE is unchanged" + else + cp $EGGDIR/$FILE $FILE || die "Could not move $EGGDIR/$FILE to $FILE" + echo "Updated $FILE" + fi +done diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 00000000..7d6cac63 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,10 @@ +NULL = + +uidir = $(pkgdatadir) +ui_DATA = \ + evince-ui.xml \ + $(NULL) + +EXTRA_DIST = \ + $(ui_DATA) \ + $(NULL) diff --git a/data/evince-ui.xml b/data/evince-ui.xml new file mode 100644 index 00000000..ac8b48d6 --- /dev/null +++ b/data/evince-ui.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/po/ChangeLog b/po/ChangeLog new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/po/ChangeLog @@ -0,0 +1 @@ + diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 00000000..e99dff1c --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,8 @@ +[encoding: UTF-8] +gs-renderer/GNOME_GGV.server.in.in +gs-renderer/ggv-control-ui.xml +gs-renderer/ggv-postscript-view-ui.xml +gs-renderer/ggv-postscript-view.c +gs-renderer/ggv-sidebar.c +shell/ev-application.c +shell/ev-window.c diff --git a/po/de.po b/po/de.po new file mode 100644 index 00000000..6a7dd4ec --- /dev/null +++ b/po/de.po @@ -0,0 +1,596 @@ +# Copyright (C) Martin Kretzschmar +# This file is distributed under the same license as the Evince package. +# Martin Kretzschmar , 2004. +# +msgid "" +msgstr "" +"Project-Id-Version: Evince 0.1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-11-09 22:24+0100\n" +"PO-Revision-Date: 2004-10-24\n" +"Last-Translator: Martin Kretzschmar \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gs-renderer/GNOME_GGV.server.in.in.h:1 +#, fuzzy +msgid "GGV PostScript Document Control" +msgstr "PostScript-Dokumente" + +#: gs-renderer/GNOME_GGV.server.in.in.h:2 +#, fuzzy +msgid "GGV PostScript View" +msgstr "PostScript-Dokumente" + +#: gs-renderer/GNOME_GGV.server.in.in.h:3 +msgid "GGV PostScript viewer factory" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:2 +#, no-c-format +msgid "15_0%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:3 +msgid "1:1" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:5 +#, no-c-format +msgid "25%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:6 +msgid "Change zoom factor to default" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:7 +msgid "Decrease zoom factor" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:8 +msgid "Fit" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:9 +msgid "Fit Width" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:10 +msgid "Fit _Width" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:11 +msgid "Fit to Page _Size" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:12 +msgid "Fit to Page _Width" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:13 +msgid "In" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:14 +msgid "Increase zoom factor" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:15 +msgid "Other" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:16 +msgid "Out" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:17 +msgid "Zoom _In" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:18 +msgid "Zoom _Out" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:19 +msgid "Zoom the page to be as wide as the window" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:20 +msgid "Zoom the page to fit in the window" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:22 +#, no-c-format +msgid "_100%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:24 +#, no-c-format +msgid "_200%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:26 +#, no-c-format +msgid "_400%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:28 +#, no-c-format +msgid "_50%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:30 +#, no-c-format +msgid "_75%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:31 +msgid "_Auto-fit" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:32 +msgid "_Default Zoom" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:33 +msgid "_Fit Window" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:34 +msgid "_No Auto-fit" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:35 +msgid "_Zoom" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:1 +msgid "10x14" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:2 +msgid "A0" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:3 +msgid "A1" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:4 +msgid "A2" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:5 +msgid "A3" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:6 +msgid "A4" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:7 +msgid "A5" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:8 +msgid "B4" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:9 +msgid "B5" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:10 +msgid "BBox" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:11 +msgid "Executive" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:12 +msgid "First" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:13 +msgid "Folio" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:14 +msgid "Go to first page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:15 +msgid "Go to last page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:16 +msgid "Go to next page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:17 +msgid "Go to previous page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:18 +msgid "Last" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:19 +msgid "Ledger" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:20 +msgid "Legal" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:21 +msgid "Letter" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:22 +msgid "Next" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:23 +msgid "Open the preferences dialog" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:24 +msgid "Post_Script Viewer Preferences" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:25 +msgid "Prev" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:26 +msgid "Print" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:27 +msgid "Print marked pages" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:28 +msgid "Print the whole document" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:29 +msgid "Quarto" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:30 +msgid "Save marked pages to a file" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:31 +msgid "Statement" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:32 +msgid "Tabloid" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:33 +msgid "_Document Orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:34 +msgid "_Document Size" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:35 +msgid "_Edit" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:36 shell/ev-window.c:458 +msgid "_File" +msgstr "_Datei" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:37 +msgid "_First page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:38 +msgid "_Go" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:39 +msgid "_Landscape" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:40 +msgid "_Last page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:41 +msgid "_Next page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:42 +msgid "_Orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:43 +msgid "_Portrait" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:44 +msgid "_Previous page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:45 +#, fuzzy +msgid "_Print document" +msgstr "Dokument öffnen" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:46 +msgid "_Print marked pages" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:47 +msgid "_Save marked pages" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:48 +msgid "_Seascape" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:49 +#, fuzzy +msgid "_Size" +msgstr "_Ansicht" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:50 +msgid "_Upside down" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:51 shell/ev-window.c:459 +msgid "_View" +msgstr "_Ansicht" + +#: gs-renderer/ggv-postscript-view.c:815 +#, c-format +msgid "" +"Unable to execute print command:\n" +"%s" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:876 +msgid "" +"No pages have been marked.\n" +"Do you want to save the whole document?" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:905 +msgid "Select a file to save pages as" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:913 shell/ev-application.c:140 +msgid "PostScript Documents" +msgstr "PostScript-Dokumente" + +#: gs-renderer/ggv-postscript-view.c:919 shell/ev-application.c:150 +msgid "All Files" +msgstr "Alle Dateien" + +#: gs-renderer/ggv-postscript-view.c:958 +msgid "" +"A file with this name already exists.\n" +"Do you want to overwrite it?" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:1003 +msgid "" +"No pages have been marked.\n" +"Do you want to print the whole document?" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2021 +#, fuzzy +msgid "GhostScript output" +msgstr "PostScript-Dokumente" + +#: gs-renderer/ggv-postscript-view.c:2053 +msgid "Document title" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2057 +msgid "GGV control status" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2061 +msgid "Number of pages" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2065 +msgid "Page names" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2069 +msgid "Current page number" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2073 +msgid "Document width" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2077 +msgid "Document height" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2081 +msgid "Document orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2085 +msgid "Default orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2089 +msgid "Default size" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2093 +msgid "Override document orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2097 +#, fuzzy +msgid "Override document size" +msgstr "Dokument öffnen" + +#: gs-renderer/ggv-postscript-view.c:2101 +msgid "Respect EOF comment" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2105 +msgid "Antialiasing" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:331 +msgid "Toggle marked state of all pages" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:332 +msgid "" +"Toggle marked state of all pages: previously marked pages will be unmarked " +"and unmarked ones will become marked." +msgstr "" + +#: gs-renderer/ggv-sidebar.c:344 +msgid "Toggle marked state of odd pages" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:345 +msgid "" +"Toggle marked state of odd pages: previously marked odd pages will be " +"unmarked and unmarked ones will become marked." +msgstr "" + +#: gs-renderer/ggv-sidebar.c:358 +msgid "Toggle marked state of even pages" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:359 +msgid "" +"Toggle marked state of even pages: previously marked even pages will be " +"unmarked and unmarked ones will become marked." +msgstr "" + +#: gs-renderer/ggv-sidebar.c:372 +msgid "Clear marked state of all pages" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:373 +msgid "Clear marked state of all pages: all pages will be unmarked." +msgstr "" + +#: shell/ev-application.c:124 +msgid "Open document" +msgstr "Dokument öffnen" + +#: shell/ev-application.c:134 +msgid "PostScript and PDF Documents" +msgstr "PostScript- und PDF-Dokumente" + +#: shell/ev-application.c:145 +msgid "PDF Documents" +msgstr "PDF-Dokumente" + +#: shell/ev-window.c:260 +msgid "Many..." +msgstr "Viele..." + +#: shell/ev-window.c:265 +msgid "Not so many..." +msgstr "Nicht so viele..." + +#: shell/ev-window.c:270 +msgid "" +"Evince is free software; you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +msgstr "" + +#: shell/ev-window.c:274 +msgid "" +"Evince is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +msgstr "" + +#: shell/ev-window.c:278 +msgid "" +"You should have received a copy of the GNU General Public License\n" +"along with Evince; if not, write to the Free Software Foundation, Inc.,\n" +"59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" +msgstr "" + +#: shell/ev-window.c:300 shell/ev-window.c:498 +msgid "Evince" +msgstr "Evince" + +#: shell/ev-window.c:303 +msgid "© 1996-2004 The Evince authors" +msgstr "© 1996-2004 Die Evince-Autoren" + +#: shell/ev-window.c:306 +msgid "PostScript and PDF File Viewer." +msgstr "PostScript- und PDF-Betrachter" + +#: shell/ev-window.c:309 +msgid "translator-credits" +msgstr "Martin Kretzschmar " + +#: shell/ev-window.c:460 +msgid "_Help" +msgstr "_Hilfe" + +#. File menu +#: shell/ev-window.c:463 +msgid "_Open" +msgstr "Ö_ffnen" + +#: shell/ev-window.c:464 +msgid "Open a file" +msgstr "Eine Datei öffnen" + +#: shell/ev-window.c:466 +msgid "_Close" +msgstr "S_chließen" + +#: shell/ev-window.c:467 +msgid "Close this window" +msgstr "Dieses Fenster schließen" + +#. Help menu +#: shell/ev-window.c:471 +msgid "_About" +msgstr "_Info" + +#: shell/ev-window.c:472 +msgid "Display credits for the document viewer creators" +msgstr "Die am Programm Mitwirkenden anzeigen" + +#. View Menu +#: shell/ev-window.c:479 +msgid "_Toolbar" +msgstr "_Werkzeugleiste" + +#: shell/ev-window.c:480 +msgid "Show or hide toolbar" +msgstr "Werkzeugleiste anzeigen/verbergen" + +#: shell/ev-window.c:482 +msgid "_Statusbar" +msgstr "_Statusleiste" + +#: shell/ev-window.c:483 +msgid "Show or hide statusbar" +msgstr "Statusleiste anzeigen/verbergen" diff --git a/po/evince.pot b/po/evince.pot new file mode 100644 index 00000000..94dab415 --- /dev/null +++ b/po/evince.pot @@ -0,0 +1,593 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-11-09 22:24+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: gs-renderer/GNOME_GGV.server.in.in.h:1 +msgid "GGV PostScript Document Control" +msgstr "" + +#: gs-renderer/GNOME_GGV.server.in.in.h:2 +msgid "GGV PostScript View" +msgstr "" + +#: gs-renderer/GNOME_GGV.server.in.in.h:3 +msgid "GGV PostScript viewer factory" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:2 +#, no-c-format +msgid "15_0%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:3 +msgid "1:1" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:5 +#, no-c-format +msgid "25%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:6 +msgid "Change zoom factor to default" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:7 +msgid "Decrease zoom factor" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:8 +msgid "Fit" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:9 +msgid "Fit Width" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:10 +msgid "Fit _Width" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:11 +msgid "Fit to Page _Size" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:12 +msgid "Fit to Page _Width" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:13 +msgid "In" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:14 +msgid "Increase zoom factor" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:15 +msgid "Other" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:16 +msgid "Out" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:17 +msgid "Zoom _In" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:18 +msgid "Zoom _Out" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:19 +msgid "Zoom the page to be as wide as the window" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:20 +msgid "Zoom the page to fit in the window" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:22 +#, no-c-format +msgid "_100%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:24 +#, no-c-format +msgid "_200%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:26 +#, no-c-format +msgid "_400%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:28 +#, no-c-format +msgid "_50%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:30 +#, no-c-format +msgid "_75%" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:31 +msgid "_Auto-fit" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:32 +msgid "_Default Zoom" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:33 +msgid "_Fit Window" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:34 +msgid "_No Auto-fit" +msgstr "" + +#: gs-renderer/ggv-control-ui.xml.h:35 +msgid "_Zoom" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:1 +msgid "10x14" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:2 +msgid "A0" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:3 +msgid "A1" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:4 +msgid "A2" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:5 +msgid "A3" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:6 +msgid "A4" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:7 +msgid "A5" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:8 +msgid "B4" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:9 +msgid "B5" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:10 +msgid "BBox" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:11 +msgid "Executive" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:12 +msgid "First" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:13 +msgid "Folio" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:14 +msgid "Go to first page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:15 +msgid "Go to last page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:16 +msgid "Go to next page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:17 +msgid "Go to previous page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:18 +msgid "Last" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:19 +msgid "Ledger" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:20 +msgid "Legal" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:21 +msgid "Letter" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:22 +msgid "Next" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:23 +msgid "Open the preferences dialog" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:24 +msgid "Post_Script Viewer Preferences" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:25 +msgid "Prev" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:26 +msgid "Print" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:27 +msgid "Print marked pages" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:28 +msgid "Print the whole document" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:29 +msgid "Quarto" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:30 +msgid "Save marked pages to a file" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:31 +msgid "Statement" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:32 +msgid "Tabloid" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:33 +msgid "_Document Orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:34 +msgid "_Document Size" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:35 +msgid "_Edit" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:36 shell/ev-window.c:458 +msgid "_File" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:37 +msgid "_First page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:38 +msgid "_Go" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:39 +msgid "_Landscape" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:40 +msgid "_Last page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:41 +msgid "_Next page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:42 +msgid "_Orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:43 +msgid "_Portrait" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:44 +msgid "_Previous page" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:45 +msgid "_Print document" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:46 +msgid "_Print marked pages" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:47 +msgid "_Save marked pages" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:48 +msgid "_Seascape" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:49 +msgid "_Size" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:50 +msgid "_Upside down" +msgstr "" + +#: gs-renderer/ggv-postscript-view-ui.xml.h:51 shell/ev-window.c:459 +msgid "_View" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:815 +#, c-format +msgid "" +"Unable to execute print command:\n" +"%s" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:876 +msgid "" +"No pages have been marked.\n" +"Do you want to save the whole document?" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:905 +msgid "Select a file to save pages as" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:913 shell/ev-application.c:140 +msgid "PostScript Documents" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:919 shell/ev-application.c:150 +msgid "All Files" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:958 +msgid "" +"A file with this name already exists.\n" +"Do you want to overwrite it?" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:1003 +msgid "" +"No pages have been marked.\n" +"Do you want to print the whole document?" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2021 +msgid "GhostScript output" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2053 +msgid "Document title" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2057 +msgid "GGV control status" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2061 +msgid "Number of pages" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2065 +msgid "Page names" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2069 +msgid "Current page number" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2073 +msgid "Document width" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2077 +msgid "Document height" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2081 +msgid "Document orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2085 +msgid "Default orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2089 +msgid "Default size" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2093 +msgid "Override document orientation" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2097 +msgid "Override document size" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2101 +msgid "Respect EOF comment" +msgstr "" + +#: gs-renderer/ggv-postscript-view.c:2105 +msgid "Antialiasing" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:331 +msgid "Toggle marked state of all pages" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:332 +msgid "" +"Toggle marked state of all pages: previously marked pages will be unmarked " +"and unmarked ones will become marked." +msgstr "" + +#: gs-renderer/ggv-sidebar.c:344 +msgid "Toggle marked state of odd pages" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:345 +msgid "" +"Toggle marked state of odd pages: previously marked odd pages will be " +"unmarked and unmarked ones will become marked." +msgstr "" + +#: gs-renderer/ggv-sidebar.c:358 +msgid "Toggle marked state of even pages" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:359 +msgid "" +"Toggle marked state of even pages: previously marked even pages will be " +"unmarked and unmarked ones will become marked." +msgstr "" + +#: gs-renderer/ggv-sidebar.c:372 +msgid "Clear marked state of all pages" +msgstr "" + +#: gs-renderer/ggv-sidebar.c:373 +msgid "Clear marked state of all pages: all pages will be unmarked." +msgstr "" + +#: shell/ev-application.c:124 +msgid "Open document" +msgstr "" + +#: shell/ev-application.c:134 +msgid "PostScript and PDF Documents" +msgstr "" + +#: shell/ev-application.c:145 +msgid "PDF Documents" +msgstr "" + +#: shell/ev-window.c:260 +msgid "Many..." +msgstr "" + +#: shell/ev-window.c:265 +msgid "Not so many..." +msgstr "" + +#: shell/ev-window.c:270 +msgid "" +"Evince is free software; you can redistribute it and/or modify\n" +"it under the terms of the GNU General Public License as published by\n" +"the Free Software Foundation; either version 2 of the License, or\n" +"(at your option) any later version.\n" +msgstr "" + +#: shell/ev-window.c:274 +msgid "" +"Evince is distributed in the hope that it will be useful,\n" +"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +"GNU General Public License for more details.\n" +msgstr "" + +#: shell/ev-window.c:278 +msgid "" +"You should have received a copy of the GNU General Public License\n" +"along with Evince; if not, write to the Free Software Foundation, Inc.,\n" +"59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" +msgstr "" + +#: shell/ev-window.c:300 shell/ev-window.c:498 +msgid "Evince" +msgstr "" + +#: shell/ev-window.c:303 +msgid "© 1996-2004 The Evince authors" +msgstr "" + +#: shell/ev-window.c:306 +msgid "PostScript and PDF File Viewer." +msgstr "" + +#: shell/ev-window.c:309 +msgid "translator-credits" +msgstr "" + +#: shell/ev-window.c:460 +msgid "_Help" +msgstr "" + +#. File menu +#: shell/ev-window.c:463 +msgid "_Open" +msgstr "" + +#: shell/ev-window.c:464 +msgid "Open a file" +msgstr "" + +#: shell/ev-window.c:466 +msgid "_Close" +msgstr "" + +#: shell/ev-window.c:467 +msgid "Close this window" +msgstr "" + +#. Help menu +#: shell/ev-window.c:471 +msgid "_About" +msgstr "" + +#: shell/ev-window.c:472 +msgid "Display credits for the document viewer creators" +msgstr "" + +#. View Menu +#: shell/ev-window.c:479 +msgid "_Toolbar" +msgstr "" + +#: shell/ev-window.c:480 +msgid "Show or hide toolbar" +msgstr "" + +#: shell/ev-window.c:482 +msgid "_Statusbar" +msgstr "" + +#: shell/ev-window.c:483 +msgid "Show or hide statusbar" +msgstr "" diff --git a/shell/Makefile.am b/shell/Makefile.am new file mode 100644 index 00000000..571792c6 --- /dev/null +++ b/shell/Makefile.am @@ -0,0 +1,24 @@ +NULL= + +INCLUDES= \ + -DDATADIR=\"$(pkgdatadir)\" \ + -I$(top_srcdir)/lib \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + $(SHELL_CFLAGS) \ + $(EVINCE_DISABLE_DEPRECATED) \ + $(NULL) + +bin_PROGRAMS=evince + +evince_SOURCES= \ + ev-application.c \ + ev-application.h \ + ev-window.c \ + ev-window.h \ + main.c \ + $(NULL) + +evince_LDADD= \ + $(SHELL_LIBS) \ + $(top_builddir)/lib/libevprivate.a \ + $(NULL) diff --git a/shell/ev-application.c b/shell/ev-application.c new file mode 100644 index 00000000..2a89eaa1 --- /dev/null +++ b/shell/ev-application.c @@ -0,0 +1,196 @@ +/* this file is part of evince, a gnome document viewer + * + * Copyright (C) 2004 Martin Kretzschmar + * + * Author: + * Martin Kretzschmar + * + * Evince is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Evince is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "ev-application.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +struct _EvApplicationPrivate { + GList *windows; +}; + +G_DEFINE_TYPE (EvApplication, ev_application, G_TYPE_OBJECT); + +#define EV_APPLICATION_GET_PRIVATE(object) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_APPLICATION, EvApplicationPrivate)) + +EvApplication * +ev_application_get_instance (void) +{ + static EvApplication *instance; + + if (!instance) + instance = EV_APPLICATION ( + g_object_new (EV_TYPE_APPLICATION, NULL)); + + return instance; +} + +static void +window_destroy_cb (GtkObject *object, gpointer user_data) +{ + EvApplication *application; + + g_return_if_fail (EV_IS_WINDOW (object)); + g_return_if_fail (EV_IS_APPLICATION (user_data)); + + application = EV_APPLICATION (user_data); + application->priv->windows = + g_list_remove (application->priv->windows, object); + + if (application->priv->windows == NULL) + bonobo_main_quit (); +} + +EvWindow * +ev_application_new_window (EvApplication *application) +{ + EvWindow *ev_window; + + ev_window = EV_WINDOW (g_object_new (EV_TYPE_WINDOW, + "type", GTK_WINDOW_TOPLEVEL, + "default-height", 600, + "default-width", 600, + NULL)); + application->priv->windows = + g_list_prepend (application->priv->windows, ev_window); + g_signal_connect (G_OBJECT (ev_window), "destroy", + G_CALLBACK (window_destroy_cb), application); + + return ev_window; +} + +static int +is_window_empty (const EvWindow *ev_window, gconstpointer dummy) +{ + g_return_val_if_fail (EV_IS_WINDOW (ev_window), 0); + + return ev_window_is_empty (ev_window) + ? 0 + : -1; +} + +static EvWindow * +ev_application_get_empty_window (EvApplication *application) +{ + GList *node; + + node = g_list_find_custom (application->priv->windows, NULL, + (GCompareFunc)is_window_empty); + + return node && node->data + ? EV_WINDOW (node->data) + : ev_application_new_window (application); +} + +void +ev_application_open (EvApplication *application, GError *err) +{ + EvWindow *ev_window; + GtkWidget *chooser; + GtkFileFilter *both_filter, *pdf_filter, *ps_filter, *all_filter; + + + ev_window = ev_application_get_empty_window (application); + + chooser = gtk_file_chooser_dialog_new (_("Open document"), + GTK_WINDOW (ev_window), + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_OK, + NULL); + + both_filter = gtk_file_filter_new (); + gtk_file_filter_set_name (both_filter, + _("PostScript and PDF Documents")); + gtk_file_filter_add_mime_type (both_filter, "application/postscript"); + gtk_file_filter_add_mime_type (both_filter, "application/pdf"); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), both_filter); + + ps_filter = gtk_file_filter_new (); + gtk_file_filter_set_name (ps_filter, _("PostScript Documents")); + gtk_file_filter_add_mime_type (ps_filter, "application/postscript"); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), ps_filter); + + pdf_filter = gtk_file_filter_new (); + gtk_file_filter_set_name (pdf_filter, _("PDF Documents")); + gtk_file_filter_add_mime_type (pdf_filter, "application/pdf"); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), pdf_filter); + + all_filter = gtk_file_filter_new (); + gtk_file_filter_set_name (all_filter, _("All Files")); + gtk_file_filter_add_pattern (all_filter, "*"); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (chooser), all_filter); + + gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), both_filter); + + if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_OK) { + char *uri; + + uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (chooser)); + ev_window_open (ev_window, uri); + gtk_widget_show (GTK_WIDGET (ev_window)); + g_free (uri); + } + + gtk_widget_destroy (GTK_WIDGET (chooser)); +} + +static void +ev_application_finalize (GObject *object) +{ + g_return_if_fail (object != NULL && EV_IS_APPLICATION (object)); + + EV_APPLICATION (object)->priv = NULL; + + EV_CALL_VIRTUAL ( + G_OBJECT_CLASS (ev_application_parent_class), finalize, (object)); +} + +static void +ev_application_class_init (EvApplicationClass *ev_application_class) +{ + GObjectClass *g_object_class; + + g_object_class = G_OBJECT_CLASS (ev_application_class); + g_object_class->finalize = ev_application_finalize; + + g_type_class_add_private (g_object_class, + sizeof (EvApplicationPrivate)); +} + +static void +ev_application_init (EvApplication *ev_application) +{ + ev_application->priv = EV_APPLICATION_GET_PRIVATE (ev_application); +} + diff --git a/shell/ev-application.h b/shell/ev-application.h new file mode 100644 index 00000000..b9f64c16 --- /dev/null +++ b/shell/ev-application.h @@ -0,0 +1,63 @@ +/* this file is part of evince, a gnome document viewer + * + * Copyright (C) 2004 Martin Kretzschmar + * + * Author: + * Martin Kretzschmar + * + * Evince is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Evince is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef EV_APPLICATION_H +#define EV_APPLICATION_H + +#include +#include + +#include "ev-window.h" + +G_BEGIN_DECLS + +typedef struct _EvApplication EvApplication; +typedef struct _EvApplicationClass EvApplicationClass; +typedef struct _EvApplicationPrivate EvApplicationPrivate; + +#define EV_TYPE_APPLICATION (ev_application_get_type ()) +#define EV_APPLICATION(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_APPLICATION, EvApplication)) +#define EV_APPLICATION_CLASS(klass) (G_TYPE_CHACK_CLASS_CAST((klass), EV_TYPE_APPLICATION, EvApplicationClass)) +#define EV_IS_APPLICATION(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_APPLICATION)) +#define EV_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_APPLICATION)) +#define EV_APPLICATION_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_APPLICATION, EvApplicationClass)) + +#define EV_APP (ev_application_get_instance ()) + +struct _EvApplication { + GObject base_instance; + EvApplicationPrivate *priv; +}; + +struct _EvApplicationClass { + GObjectClass base_class; +}; + +GType ev_application_get_type (void); +EvApplication *ev_application_get_instance (void); +void ev_application_open (EvApplication *application, GError *err); +EvWindow *ev_application_new_window (EvApplication *application); + +G_END_DECLS + +#endif /* !EV_APPLICATION_H */ + diff --git a/shell/ev-window.c b/shell/ev-window.c new file mode 100644 index 00000000..cde05186 --- /dev/null +++ b/shell/ev-window.c @@ -0,0 +1,509 @@ +/* this file is part of evince, a gnome document viewer + * + * Copyright (C) 2004 Martin Kretzschmar + * + * Author: + * Martin Kretzschmar + * + * Evince is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Evince is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "ev-window.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "ev-application.h" + +enum { + PROP_0, + PROP_ATTRIBUTE +}; + +enum { + SIGNAL, + N_SIGNALS +}; + +struct _EvWindowPrivate { + GtkWidget *main_box; + GtkWidget *bonobo_widget; + GtkUIManager *ui_manager; + GtkWidget *statusbar; + guint help_message_cid; +}; + +#if 0 +/* enable these to add support for signals */ +static guint ev_window_signals [N_SIGNALS] = { 0 }; +#endif + +G_DEFINE_TYPE (EvWindow, ev_window, GTK_TYPE_WINDOW) + +#define EV_WINDOW_GET_PRIVATE(object) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((object), EV_TYPE_WINDOW, EvWindowPrivate)) + +#if 0 +const char * +ev_window_get_attribute (EvWindow *self) +{ + g_return_val_if_fail (self != NULL && EV_IS_WINDOW (self), NULL); + + return self->priv->attribute; +} + +void +ev_window_set_attribute (EvWindow* self, const char *attribute) +{ + g_assert (self != NULL && EV_IS_WINDOW (self)); + g_assert (attribute != NULL); + + if (self->priv->attribute != NULL) { + g_free (self->priv->attribute); + } + + self->priv->attribute = g_strdup (attribute); + + g_object_notify (G_OBJECT (self), "attribute"); +} + +static void +ev_window_get_property (GObject *object, guint prop_id, GValue *value, + GParamSpec *param_spec) +{ + EvWindow *self; + + self = EV_WINDOW (object); + + switch (prop_id) { + case PROP_ATTRIBUTE: + g_value_set_string (value, self->priv->attribute); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, + prop_id, + param_spec); + break; + } +} + +static void +ev_window_set_property (GObject *object, guint prop_id, const GValue *value, + GParamSpec *param_spec) +{ + EvWindow *self; + + self = EV_WINDOW (object); + + switch (prop_id) { + case PROP_ATTRIBUTE: + ev_window_set_attribute (self, g_value_get_string (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, + prop_id, + param_spec); + break; + } +} +#endif + +gboolean +ev_window_is_empty (const EvWindow *ev_window) +{ + g_return_val_if_fail (EV_IS_WINDOW (ev_window), FALSE); + + return ev_window->priv->bonobo_widget == NULL; +} + +void +ev_window_open (EvWindow *ev_window, const char *uri) +{ +#if 0 + char *mime_type; + BonoboObject *bonobo_control; + CORBA_Environment ev; + Bonobo_PersistFile pf; + + mime_type = gnome_vfs_get_mime_type (uri); + + g_return_if_fail (mime_type != NULL); /* FIXME set error */ + + if (!strcmp (mime_type, "application/pdf")) { + bonobo_control = create_gpdf_control (); + } else if (!strcmp (mime_type, "application/postscript")) { + bonobo_control = create_ggv_control (); + } else if (!strcmp (mime_type, "application/x-gzip")) { + g_message ("Cannot open gzip-compressed file %s.", uri); + goto finally; + } else if (!strcmp (mime_type, "application/x-bzip")) { + g_message ("Cannot open bzip2-compressed file %s.", uri); + goto finally; + } else { + g_warning ("Don't know how to open %s file %s.", + mime_type, uri); /* FIXME set error */ + goto finally; + } + + ev_window->priv->bonobo_widget = bonobo_widget_new_control_from_objref ( + bonobo_object_corba_objref (bonobo_control), CORBA_OBJECT_NIL); + gtk_box_pack_start (GTK_BOX (ev_window->priv->main_box), + ev_window->priv->bonobo_widget, + TRUE, TRUE, 0); + CORBA_exception_init (&ev); + pf = bonobo_object_query_interface ( + bonobo_control, "IDL:Bonobo/PersistFile:1.0", &ev); + Bonobo_PersistFile_load (pf, uri, &ev); + gtk_widget_show (ev_window->priv->bonobo_widget); + bonobo_object_release_unref (pf, &ev); + bonobo_object_unref (bonobo_control); + CORBA_exception_free (&ev); + +finally: + g_free (mime_type); +#endif +} + +static void +ev_window_cmd_file_open (GtkAction *action, EvWindow *ev_window) +{ + ev_application_open (EV_APP, NULL); +} + +static void +ev_window_cmd_file_close_window (GtkAction *action, EvWindow *ev_window) +{ + g_return_if_fail (EV_IS_WINDOW (ev_window)); + + gtk_widget_destroy (GTK_WIDGET (ev_window)); +} + +static void +ev_window_cmd_help_about (GtkAction *action, EvWindow *ev_window) +{ + const char *authors[] = { + N_("Many..."), + NULL + }; + + const char *documenters[] = { + N_("Not so many..."), + NULL + }; + + const char *license[] = { + N_("Evince is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + "the Free Software Foundation; either version 2 of the License, or\n" + "(at your option) any later version.\n"), + N_("Evince is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n"), + N_("You should have received a copy of the GNU General Public License\n" + "along with Evince; if not, write to the Free Software Foundation, Inc.,\n" + "59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n") + }; + + char *license_trans; + +#ifdef ENABLE_NLS + const char **p; + + for (p = authors; *p; ++p) + *p = _(*p); + + for (p = documenters; *p; ++p) + *p = _(*p); +#endif + + license_trans = g_strconcat (_(license[0]), "\n", _(license[1]), "\n", + _(license[2]), "\n", NULL); + + gtk_show_about_dialog ( + GTK_WINDOW (ev_window), + "name", _("Evince"), + "version", VERSION, + "copyright", + _("\xc2\xa9 1996-2004 The Evince authors"), + "license", license_trans, + "website", "http://www.gnome.org/projects/evince", + "comments", _("PostScript and PDF File Viewer."), + "authors", authors, + "documenters", documenters, + "translator-credits", _("translator-credits"), + NULL); + + g_free (license_trans); +} + +static void +ev_window_view_toolbar_cb (GtkAction *action, EvWindow *ev_window) +{ + g_object_set ( + G_OBJECT (gtk_ui_manager_get_widget ( + ev_window->priv->ui_manager, + "/ToolBar")), + "visible", + gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)), + NULL); +} + +static void +ev_window_view_statusbar_cb (GtkAction *action, EvWindow *ev_window) +{ + g_object_set ( + ev_window->priv->statusbar, + "visible", + gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)), + NULL); +} + +static void +menu_item_select_cb (GtkMenuItem *proxy, EvWindow *ev_window) +{ + GtkAction *action; + char *message; + + action = g_object_get_data (G_OBJECT (proxy), "gtk-action"); + g_return_if_fail (action != NULL); + + g_object_get (G_OBJECT (action), "tooltip", &message, NULL); + if (message) { + gtk_statusbar_push (GTK_STATUSBAR (ev_window->priv->statusbar), + ev_window->priv->help_message_cid, message); + g_free (message); + } +} + +static void +menu_item_deselect_cb (GtkMenuItem *proxy, EvWindow *ev_window) +{ + gtk_statusbar_pop (GTK_STATUSBAR (ev_window->priv->statusbar), + ev_window->priv->help_message_cid); +} + +static void +connect_proxy_cb (GtkUIManager *ui_manager, GtkAction *action, + GtkWidget *proxy, EvWindow *ev_window) +{ + if (GTK_IS_MENU_ITEM (proxy)) { + g_signal_connect (proxy, "select", + G_CALLBACK (menu_item_select_cb), ev_window); + g_signal_connect (proxy, "deselect", + G_CALLBACK (menu_item_deselect_cb), + ev_window); + } +} + +static void +disconnect_proxy_cb (GtkUIManager *ui_manager, GtkAction *action, + GtkWidget *proxy, EvWindow *ev_window) +{ + if (GTK_IS_MENU_ITEM (proxy)) { + g_signal_handlers_disconnect_by_func + (proxy, G_CALLBACK (menu_item_select_cb), ev_window); + g_signal_handlers_disconnect_by_func + (proxy, G_CALLBACK (menu_item_deselect_cb), ev_window); + } +} + +static void +ev_window_dispose (GObject *object) +{ + EvWindowPrivate *priv; + + g_return_if_fail (object != NULL && EV_IS_WINDOW (object)); + + priv = EV_WINDOW (object)->priv; + + EV_UNREF (priv->ui_manager); + + EV_CALL_VIRTUAL ( + G_OBJECT_CLASS (ev_window_parent_class), dispose, (object)); +} + +static void +ev_window_finalize (GObject *object) +{ + g_return_if_fail (object != NULL && EV_IS_WINDOW (object)); + + EV_WINDOW (object)->priv = NULL; + + EV_CALL_VIRTUAL ( + G_OBJECT_CLASS (ev_window_parent_class), finalize, (object)); +} + +static void +ev_window_class_init (EvWindowClass *ev_window_class) +{ + GObjectClass *g_object_class; + + g_object_class = G_OBJECT_CLASS (ev_window_class); + g_object_class->dispose = ev_window_dispose; + g_object_class->finalize = ev_window_finalize; + + g_type_class_add_private (g_object_class, sizeof (EvWindowPrivate)); + +#if 0 + /* setting up signal system */ + ev_window_class->signal = ev_window_signal; + + ev_window_signals [SIGNAL] = g_signal_new ( + "signal", + EV_TYPE_WINDOW, + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (EvWindowClass, + signal), + NULL, + NULL, + g_cclosure_marshal_VOID__STRING, + G_TYPE_NONE, + 0); + /* setting up property system */ + g_object_class->set_property = ev_window_set_property; + g_object_class->get_property = ev_window_get_property; + + g_object_class_install_property ( + g_object_class, + PROP_ATTRIBUTE, + g_param_spec_string ("attribute", + "Attribute", + "A simple unneccessary attribute that " + "does nothing special except being a " + "demonstration for the correct implem" + "entation of a GObject property", + "default_value", + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); +#endif +} + +/* Normal items */ +static GtkActionEntry entries[] = { + { "File", NULL, N_("_File") }, + { "View", NULL, N_("_View") }, + { "Help", NULL, N_("_Help") }, + + /* File menu */ + { "FileOpen", GTK_STOCK_OPEN, N_("_Open"), "O", + N_("Open a file"), + G_CALLBACK (ev_window_cmd_file_open) }, + { "FileCloseWindow", GTK_STOCK_CLOSE, N_("_Close"), "W", + N_("Close this window"), + G_CALLBACK (ev_window_cmd_file_close_window) }, + + /* Help menu */ + { "HelpAbout", STOCK_ABOUT, N_("_About"), NULL, + N_("Display credits for the document viewer creators"), + G_CALLBACK (ev_window_cmd_help_about) }, +}; + +/* Toggle items */ +static GtkToggleActionEntry toggle_entries[] = { + /* View Menu */ + { "ViewToolbar", NULL, N_("_Toolbar"), "T", + N_("Show or hide toolbar"), + G_CALLBACK (ev_window_view_toolbar_cb), TRUE }, + { "ViewStatusbar", NULL, N_("_Statusbar"), NULL, + N_("Show or hide statusbar"), + G_CALLBACK (ev_window_view_statusbar_cb), TRUE }, +}; + +static void +ev_window_init (EvWindow *ev_window) +{ + GtkActionGroup *action_group; + GtkAccelGroup *accel_group; + GError *error = NULL; + GtkWidget *menubar; + GtkWidget *toolbar; + + ev_window->priv = EV_WINDOW_GET_PRIVATE (ev_window); + + gtk_window_set_title (GTK_WINDOW (ev_window), _("Evince")); + + ev_window->priv->main_box = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (ev_window), ev_window->priv->main_box); + gtk_widget_show (ev_window->priv->main_box); + + action_group = gtk_action_group_new ("MenuActions"); + gtk_action_group_set_translation_domain (action_group, NULL); + gtk_action_group_add_actions (action_group, entries, + G_N_ELEMENTS (entries), ev_window); + gtk_action_group_add_toggle_actions (action_group, toggle_entries, + G_N_ELEMENTS (toggle_entries), + ev_window); + + ev_window->priv->ui_manager = gtk_ui_manager_new (); + gtk_ui_manager_insert_action_group (ev_window->priv->ui_manager, + action_group, 0); + + accel_group = + gtk_ui_manager_get_accel_group (ev_window->priv->ui_manager); + gtk_window_add_accel_group (GTK_WINDOW (ev_window), accel_group); + + g_signal_connect (ev_window->priv->ui_manager, "connect_proxy", + G_CALLBACK (connect_proxy_cb), ev_window); + g_signal_connect (ev_window->priv->ui_manager, "disconnect_proxy", + G_CALLBACK (disconnect_proxy_cb), ev_window); + + if (!gtk_ui_manager_add_ui_from_file (ev_window->priv->ui_manager, + DATADIR"/evince-ui.xml", + &error)) { + g_message ("building menus failed: %s", error->message); + g_error_free (error); + } + + menubar = gtk_ui_manager_get_widget (ev_window->priv->ui_manager, + "/MainMenu"); + gtk_box_pack_start (GTK_BOX (ev_window->priv->main_box), menubar, + FALSE, FALSE, 0); + + toolbar = gtk_ui_manager_get_widget (ev_window->priv->ui_manager, + "/ToolBar"); + gtk_box_pack_start (GTK_BOX (ev_window->priv->main_box), toolbar, + FALSE, FALSE, 0); + + ev_window->priv->statusbar = gtk_statusbar_new (); + gtk_widget_show (ev_window->priv->statusbar); + gtk_box_pack_end (GTK_BOX (ev_window->priv->main_box), + ev_window->priv->statusbar, + FALSE, TRUE, 0); + ev_window->priv->help_message_cid = gtk_statusbar_get_context_id + (GTK_STATUSBAR (ev_window->priv->statusbar), "help_message"); + +} diff --git a/shell/ev-window.h b/shell/ev-window.h new file mode 100644 index 00000000..0d2e242a --- /dev/null +++ b/shell/ev-window.h @@ -0,0 +1,62 @@ +/* this file is part of evince, a gnome document viewer + * + * Copyright (C) 2004 Martin Kretzschmar + * + * Author: + * Martin Kretzschmar + * + * Evince is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Evince is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef EV_WINDOW_H +#define EV_WINDOW_H + +#include +#include + +G_BEGIN_DECLS + +typedef struct _EvWindow EvWindow; +typedef struct _EvWindowClass EvWindowClass; +typedef struct _EvWindowPrivate EvWindowPrivate; + +#define EV_TYPE_WINDOW (ev_window_get_type()) +#define EV_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_WINDOW, EvWindow)) +#define EV_WINDOW_CLASS(klass) (G_TYPE_CHACK_CLASS_CAST((klass), EV_TYPE_WINDOW, EvWindowClass)) +#define EV_IS_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), EV_TYPE_WINDOW)) +#define EV_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EV_TYPE_WINDOW)) +#define EV_WINDOW_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), EV_TYPE_WINDOW, EvWindowClass)) + +struct _EvWindow { + GtkWindow base_instance; + EvWindowPrivate *priv; +}; + +struct _EvWindowClass { + GtkWindowClass base_class; + + /* signals */ + void (*signal) (EvWindow *self, + const char *string); +}; + +GType ev_window_get_type (void); +void ev_window_open (EvWindow *ev_window, const char *uri); +gboolean ev_window_is_empty (const EvWindow *ev_window); + +G_END_DECLS + +#endif /* !EV_WINDOW_H */ + diff --git a/shell/global-params.cc b/shell/global-params.cc new file mode 100644 index 00000000..a8ab1778 --- /dev/null +++ b/shell/global-params.cc @@ -0,0 +1,36 @@ +/* this file is part of evince, a gnome document viewer + * + * Copyright (C) 2004 Martin Kretzschmar + * + * Author: + * Martin Kretzschmar + * + * Evince is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Evince is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#include "global-params.h" +#include + +void +global_params_init (const char *cfg_filename) +{ + globalParams = new GlobalParams (const_cast (cfg_filename)); +} + +void +global_params_destroy (void) +{ + delete globalParams; +} diff --git a/shell/global-params.h b/shell/global-params.h new file mode 100644 index 00000000..0b243de4 --- /dev/null +++ b/shell/global-params.h @@ -0,0 +1,36 @@ +/* this file is part of evince, a gnome document viewer + * + * Copyright (C) 2004 Martin Kretzschmar + * + * Author: + * Martin Kretzschmar + * + * Evince is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Evince is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef GLOBAL_PARAMS_H +#define GLOBAL_PARAMS_H + +#include + +G_BEGIN_DECLS + +void global_params_init (const char *cfg_filename); +void global_params_destroy (void); + +G_END_DECLS + + +#endif /* GLOBAL_PARAMS_H */ diff --git a/shell/main.c b/shell/main.c new file mode 100644 index 00000000..8ad8f284 --- /dev/null +++ b/shell/main.c @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2004 Marco Pesenti Gritti + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + */ + +#include "config.h" + +#include +#include +#include +#include + +static struct poptOption popt_options[] = +{ + { NULL, 0, 0, NULL, 0, NULL, NULL } +}; + +int +main (int argc, char *argv[]) +{ + poptContext context; + GValue context_as_value = { 0 }; + GnomeProgram *program; + +#ifdef ENABLE_NLS + /* Initialize the i18n stuff */ + bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + textdomain(GETTEXT_PACKAGE); +#endif + + program = gnome_program_init (PACKAGE, VERSION, + LIBGNOMEUI_MODULE, argc, argv, + GNOME_PARAM_POPT_TABLE, popt_options, + GNOME_PARAM_HUMAN_READABLE_NAME, _("Evince"), + GNOME_PARAM_APP_DATADIR, DATADIR, + NULL); + + g_set_application_name (_("Epiphany Web Browser")); + + g_object_get_property (G_OBJECT (program), + GNOME_PARAM_POPT_CONTEXT, + g_value_init (&context_as_value, G_TYPE_POINTER)); + context = g_value_get_pointer (&context_as_value); + + gtk_main (); + + poptFreeContext (context); + + return 0; +} diff --git a/viewer/Makefile.am b/viewer/Makefile.am new file mode 100644 index 00000000..0416b8bf --- /dev/null +++ b/viewer/Makefile.am @@ -0,0 +1,15 @@ +NULL= + +INCLUDES= \ + -DEVINCE_UIDIR=\"$(pkgdatadir)\" \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ + $(SHELL_CFLAGS) \ + $(EVINCE_DISABLE_DEPRECATED) \ + $(NULL) + +noinst_LTLIBRARIES = libevviewer.la + +libevviewer_la_SOURCES= \ + ev-viewer.c \ + ev-viewer.h \ + $(NULL) diff --git a/viewer/ev-viewer.c b/viewer/ev-viewer.c new file mode 100644 index 00000000..3a91183d --- /dev/null +++ b/viewer/ev-viewer.c @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2004 Marco Pesenti Gritti + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#include "config.h" + +#include "ev-viewer.h" + +static void ev_viewer_base_init (gpointer g_class); + +GType +ev_viewer_get_type (void) +{ + static GType type = 0; + + if (G_UNLIKELY (type == 0)) + { + static const GTypeInfo our_info = + { + sizeof (EvViewerIface), + ev_viewer_base_init, + NULL, + }; + + type = g_type_register_static (G_TYPE_INTERFACE, + "EvViewer", + &our_info, (GTypeFlags)0); + } + + return type; +} + +static void +ev_viewer_base_init (gpointer g_class) +{ +} + +void +ev_viewer_load (EvViewer *embed, const char *uri) +{ + EvViewerIface *iface = EV_VIEWER_GET_IFACE (embed); + iface->load (embed, uri); +} diff --git a/viewer/ev-viewer.h b/viewer/ev-viewer.h new file mode 100644 index 00000000..1b52c638 --- /dev/null +++ b/viewer/ev-viewer.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2000-2003 Marco Pesenti Gritti + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + */ + +#ifndef EV_VIEWER_H +#define EV_VIEWER_H + +#include +#include + +G_BEGIN_DECLS + +#define EV_TYPE_VIEWER (ev_viewer_get_type ()) +#define EV_VIEWER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EV_TYPE_VIEWER, EvViewer)) +#define EV_VIEWER_IFACE(k) (G_TYPE_CHECK_CLASS_CAST((k), EV_TYPE_VIEWER, EvViewerIface)) +#define EV_IS_VIEWER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EV_TYPE_VIEWER)) +#define EV_IS_VIEWER_IFACE(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EV_TYPE_VIEWER)) +#define EV_VIEWER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EV_TYPE_VIEWER, EvViewerIface)) + +typedef struct _EvViewer EvViewer; +typedef struct _EvViewerIface EvViewerIface; + +struct _EvViewerIface +{ + GTypeInterface base_iface; + + /* Methods */ + void (* load) (EvViewer *embed, + const char *uri); +}; + +GType ev_viewer_get_type (void); + +void ev_viewer_load (EvViewer *embed, + const char *uri); + +G_END_DECLS + +#endif -- 2.43.0