Re: BonoboZoomable - BonoboZoomLevel



Maciej Stachowiak <mjs eazel com> writes:

> Well, it could lead to mistakes if the user specifies is_continuous ==
> FALSE, but does not provide a set of preferred zoom levels.

Hmm, in my latest draft this is even more broken - it simply assumes that
the component supports continuous zooming if you use the simple
bonobo_zoomable_set_parameters() function:

====
void
bonobo_zoomable_set_parameters (BonoboZoomable  *zoomable,
                                float            zoom_level,
                                float            min_zoom_level,
                                float            max_zoom_level,
                                gboolean         has_min_zoom_level,
                                gboolean         has_max_zoom_level);

void
bonobo_zoomable_set_parameters_full (BonoboZoomable *zoomable,
                                     float           zoom_level,
                                     float           min_zoom_level,
                                     float           max_zoom_level,
                                     gboolean        has_min_zoom_level,
                                     gboolean        has_max_zoom_level,
                                     gboolean        is_continuous,
                                     float          *preferred_zoom_levels,
                                     const gchar   **preferred_zoom_level_names,
                                     gint            num_preferred_zoom_levels);
====

IMO it'd be better not to split it up; it's really not so complex to do a

====
        bonobo_zoomable_set_parameters (zoomable, 1.0, 0.0, 0.0, FALSE, FALSE,
                                        TRUE, NULL, NULL, 0);
====

if the component supports continuous zooming, but it won't break in the
other case.

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)




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