Re: Preferences in Yelp?!

On Tue, 2004-12-07 at 09:58, Christian Persch wrote:
> Hi,
> > Luca Ferretti wrote:
> >>Il giorno ven, 03-12-2004 alle 17:31 -0600, Shaun McCance ha scritto:
> >> BTW 'cause we are now using Mozilla/Gecko as demi-default HTML
> >> rendering engine in GNOME Desktop[1], could we provide an unified
> >> gnome-mozilla wrapper module? 
> > I think the Galeon/Epiphany developers has discussed this in the past.
> > I for one would love such an addition to the platform. Basically a
> > wrapped that makes it easier to use the GtkMozEmbedd API, both from
> > setting up the auto* (which is currently _REALLY_ messy) and to
> > provide more functionality which you currently have to hack C++ to get
> > in, setting font sizes, native scrollbars (should just happen, doesn't
> > have to be in the API), find functionality...
> > Ephy/Galeon developers, did I dream about you guys having plan to
> > extract this API from your modules?
> I'd like to have one gecko embedding widget for gnome with added
> capabilities over GtkMozEmbed, too. However, I don't like adding another
> layer, GtkMozEmbed -> GnomeGeckoEmbed -> EphyEmbed, in Epiphany. IMHO it
> makes more sense to either
> - add to GtkMozEmbed, or
> - just take GtkMozEmbed to gnome cvs, and morph it into what we expect
> from a gecko embedding widget.
> Doing the work upstream in mozilla has drawbacks, IMHO:
> - mozilla review/superreview/checkin process is time-consuming and slow,
> - mozilla and gnome release cycles aren't synchronised
> - mozilla still supports gtk 1, while I couldn't care less about that...
> so we'd still have to make sure all patches work on gtk 1, or add many
> #define'd code
> - do we have the same goals as mozilla wrt. GtkMozEmbed?
> Moving this work to gnome cvs would effectively mean forking
> GtkMozEmbed, a move which probably might be seen by mozilla as hostile,
> and impede our progress in other areas, since we're going to depend on
> mozilla core changes (for example, to support gnome-keyring).
> How do you propose to resolve those problems?
> FWIW, I do have a modified gtkmozembed in my cvs, autotooled, ported to
> glib2/gtk2-only API and ported to embed strings (however, I seem to have
> introduced one crash-on-exit bug in the process...).

Epiphany and Galeon developers are obviously going to need more out of a
Gecko embedding API than Yelp.  But for what it's worth, here's what's
declared in yelp-gecko-utils.h:

void            yelp_gecko_set_caret   (gboolean       value);
void            yelp_gecko_set_color   (YelpColorType  type,
                                        const gchar   *color);
void            yelp_gecko_set_font    (YelpFontType   font_type,
                                        const gchar   *fontname);
gboolean        yelp_gecko_find        (GtkMozEmbed   *html,
                                        const gchar   *str,
                                        gboolean       match_case,
                                        gboolean       wrap,
                                        gboolean       forward);

gboolean        yelp_gecko_copy_selection (GtkMozEmbed  *html);

gboolean        yelp_gecko_select_all     (GtkMozEmbed  *html);

gchar *         yelp_gecko_mouse_event    (GtkMozEmbed  *html,
                                           gpointer      dom_event);

The first three are just convenience wrappers over nsIPrefService. 
Obiously, I don't need GtkMozEmbed to provide specialized setters like
these.  But those functions all use three static functions defined in
yelp-gecko-utils.cpp: gecko_prefs_set_int, gecko_prefs_set_bool, and
gecko_prefs_set_string.  Those would be nice to have in GtkMozEmbed.

Doing a 'Find in Page' is pretty basic functionality.  I'd definitely
want the widget to provide that.  (A bit OT: I'd certainly like to see
GTK+ have an interface like GtkSearchable, which could be implemented by
GtkTextView, GtkMozEmbed, etc.)

The Copy and Select All are pretty basic things too.  More flexible APIs
than those above would probably be better.  And yelp_gecko_mouse_event
is used to do right-click menus on links, which I think is also pretty
core functionality.

Again, I can't speak for Epiphany or Galeon.  But I really don't think
we need anything special for Gnome.  Everything I'd like GtkMozEmbed to
do are things that anybody would want GtkMozEmbed to do.  Let's just get
this stuff upstream, and then everybody wins.


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