gcmd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gcmd-dev] Internal Viewer Features


From: A. Gordon
Subject: [gcmd-dev] Internal Viewer Features
Date: Thu, 18 May 2006 00:12:29 +0300
User-agent: Thunderbird 1.5 (X11/20051201)

Hello Guys!

sorry for being away for so long...
Just wanted to say you did a great job on 1.2.0 !

I've added a "find" feature to the internal viewer, but first, a small compiling/building issue:

One of my systems is using Debian Stable.
"Stable" is very restricted in what it provides, in terms of cutting-edge development libraries (which is a GoodThing(tm), because if gcmd can be built on Debian Stable, it can be built almost everywhere).

When I try to compile the newest versions (either 1.2.0, 1.2.1 or 1.3), the automake fails with the following error:
----
$ ./autogen.sh
....
....
Running gnome-doc-common...
Running aclocal-1.9...
Running autoconf...
Running autoheader...
Running automake-1.9...
gnome-doc-utils.make:506: ENABLE_SK does not appear in AM_CONDITIONAL
doc/Makefile.am:13:   `gnome-doc-utils.make' included from here
$
--------

The problem:
If I grok it correctly, the problem is that gcmd provides it's own "gnome-doc-utils.make" file, which too new (or at least incompatible) with the Debian Stable branch (apparently, "ENABLE_SK" has something to do with the "ScrollKeeper" package).

The solution:
I deleted gcmd's "gnome-doc-utils.make", and soft-linked the system's "gnome-doc-utils.make" from "/usr/share/gnome-doc-utils". This is not my own idea, but actually suggested by Danilo Šegan, in an article about using the gnome-doc-utils system (see http://kvota.net/hacks/shaunize/guide.html, at the bottom of the page, the "Caveats" section).

With this small change, gcmd builds without errors on a Debian Stable system (and without any manual modifications).

My suggestion:
Remove "gnome-doc-utils.make" from gcmd's distribution, and add the code suggested by Danilo Šegan to the beginning of our "autogen.sh". This way, we always use the system's default "gnome-doc-utils.make", (and if it doesn't exists, we can inform the user he/she needs to install the "gnome-doc-utils" package).

A side note (mainly to future package maintainers):
Because of the documentation building process, gcmd now requires the following extra Debian packages (which exists even on "Stable"): "xsltproc", "libxml2-utils <http://packages.debian.org/stable/text/libxml2-utils>", "gnome-common".

-----------------------------------------------------------

And now for something completely different:
My small contribution to the development branch: "Find" feature in the internal viewer. With this patch (against either 1.2.1 or 1.3), you can search for text and hex, both forward and backward.
The text search uses UTF-8, so you can search in any language.

Press "CTRL+F" to show the search dialog, F3 to "find next", SHIFT+F3 to "find previous".

The following files are added:
src/libgviewer/bm_byte.{c.h} - boyer-moore functions for byte (=hex) searching. src/libgviewer/bm_chartype.{c,h} - boyer-moore functions for UTF-8 searching. src/libgviewer/search-dlg.{c,h} - GtkDialog with the search string and other options src/libgviewer/search-progress-dlg.{c,h} - GtkDialog which shows the search progress, also allows canceling the search. src/libgviewer/searcher.{c,h} - The actual search code, in a background thread. src/libgviewer/viewer-utils.{c,h} - grouping of several general functions into one module. tests/gviewer/bm_byte_test.c - small tester for the byte search functions tests/gviewer/bm_chartype_test.c - small tester for the utf8 search functions tests/gviewer/utils_test.c - test some of the functions in "viewer-utils".

The following files are modified:
src/libgviewer/cp437.{c,h} - moved a functions into the "util" module.
src/libgviewer/text-render.{c,h}         - added some data access functions
src/libgviewer/viewer-widget.{c,h}   - added some data access functions
src/libgbiewer/viewer-window.c - added the user interface parts (CTRL+F, F3, SHIFT+F3)
src/libgviewer/input_mode.c            - fixed a small bug
src/libgviewer/libgviewer.h              - added the new header files
src/libgviewer/Makefile.am - added the new source and header files test/gviewer/Makefile.am - added the new unit tests source files.

This patch is in very alpha stage... the are some things to fix and improve, but the basic functionality is there.


Regarding the latest "Internal Viewer Features" thread (about moving to next/previous image) - I'll try to add something like that once I get the "Find" patch completed..



Gordon.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]