Re: What's the future of EOG? Has EOG a roadmap?




El 24 de agosto de 2012 a las 21:21 Felix Riemann <friemann gnome org> escribió:

> Am Donnerstag, den 23.08.2012, 20:20 +0200 schrieb Deskblue Software -
> Javier Sánchez:
> > Hi guys,
>
> Hi!
>
> > After some bugs fixed and some time working on a patch to fix the bug
> > #321603 preload files, I have some questions:
> >
> > 1) I think that it's necessary to refactor some components. For example:
> > Make a change into EogWindow is a knightmare because it has a lot of
> > older and tangled code.
>
> Another prime example of stuff you don't want to touch in its current
> state would be the image loading code.
>
> > 2) Other components, like EogScrollView, contain some deprecated code. I
> > think that it's necessary to update this components as is proposed by
> > the bug #546504 - clutter backend.
>
> Hmm,
>
> > 3) Fix bugs like #321603 - preload files is very difficult if we don't
> > change the current architecture. For example: We can replace
> > EogListStore, EogThumbNav and EogThumbView with the new components
> > EogNavigator and EogNavigatorView which have an API for image
> > management, image collection management and image navigation.
>
> The job running system is also in the way of quite some feature
> requests/bugfixes as it is very limited (only one job at a time, pretty
> much uninterruptible). It is also very decoupled from the objects it
> works on. For example there exists no direct connection from an image to
> the job that does the loading/saving/transforming/etc.
>
> I wanted to refactor it for quite some time (I think it's years
> already), but never really found the necessary time for it. :(
>
> The *Navigator* classes are something you wrote for the preloading
> feature?

 

Yes, it's my solution for preloading. I'm writing two classes EogNavigator and EogNavigatorView which act as model and view of a component based on a MVC pattern. You could say that EogNavigator is an EogListStore with more responsabilities because it contains data access and business logic (preloading feature is included here). In the other hand EogNavigatorView is the component responsible for displaying the thumbnails and interact with the user. Basically I'm replacing EogListStore, EogThumbNav and EogThumbView with EogNavigator and EogNavigatorView. What's my problem? EogWindow acts as controller in my MVC pattern and replace components it's a hard work.

 

Furthermore, we will define a correct API for this components. Maybe, we will include methods which fix bugs like Bug 567581 - Navigate between images by specifying image number (image x -> image y).

 

Anyway, I include as attachment of this mail EogNavigator.h and EogNavigatorView.h, review it and tell me what do you think about it.

 

> > 4) Eog hasn't had major changes since 2.20, when was include support for
> > plugins, editable toolbar or printing for multiple images.
>
> Well, I'd say this depends on how you define major. For example the move
> from 2.x to 3.x also brought an improved drawing system with it. The
> change wasn't very huge codewise but was still quite intrusive as it
> touched some of our "inner-core" functions.
>
> Also eog-2.20 was a really huge refactoring and was actually in
> development for roughly 1.5 years before the first stable release came
> out. Not sure if it's a good comparision point.
>
> > For this reasons, I think that it would be a good idea to define our
> > roadmap and update the eog wiki. Maybe, we have to discuss what's the
> > future of EOG and what we can to do to have a modern image viewer.
> >
> > What do you think?
>
> Very good idea.
> I'm absolutely open for this. Might actually help getting ideas a bit
> more lined out and maybe even attract other/new contributors.

 

Well, I have some ideas:

 

- EOG would have a new image view components based on clutter. This way we could apply not intrusive cool effects to the displayed image like do cheese.

- EOG would have a unique component for image management and navigation (EogNavigator)

- We would refactor some components to make code more readable for new contributors.

- We would add new basic image transformation operations like resize, crop, ...

- We would add new hooks for plugins. This way, the new plugins would be more powerful.

 

Anyway, I think that we could express our ideas in EOG wiki or discuss it on eog chat room.

 

> Regards,
>
> Felix
>
>
/* Eye of Gnome -- Eog Image Navigator
 *
 * Copyright (C) 2012 The Free Software Foundation
 *
 * Author: Javier Sánchez <jsanchez deskblue com>
 *
 * 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.
 */

#ifndef __EOG_NAVIGATOR_H__
#define __EOG_NAVIGATOR_H__

#include "eog-image.h"

#include <glib-object.h>
#include <gtk/gtk.h>

G_BEGIN_DECLS

#define EOG_TYPE_NAVIGATOR            (eog_navigator_get_type ())
#define EOG_NAVIGATOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), EOG_TYPE_NAVIGATOR, EogNavigator))
#define EOG_NAVIGATOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EOG_TYPE_NAVIGATOR, EogNavigatorClass))
#define EOG_IS_NAVIGATOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EOG_TYPE_NAVIGATOR))
#define EOG_IS_NAVIGATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EOG_TYPE_NAVIGATOR))
#define EOG_NAVIGATOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), EOG_TYPE_NAVIGATOR, EogNavigatorClass))

#define EOG_NAVIGATOR_THUMB_SIZE 90

typedef enum {
	EOG_NAVIGATOR_THUMBNAIL = 0,
	EOG_NAVIGATOR_THUMB_SET,
	EOG_NAVIGATOR_IMAGE,
	EOG_NAVIGATOR_JOB,
	EOG_NAVIGATOR_NUM_COLUMNS
} EogNavigatorColumn;

typedef struct _EogNavigator        EogNavigator;
typedef struct _EogNavigatorClass   EogNavigatorClass;
typedef struct _EogNavigatorPrivate EogNavigatorPrivate;

struct _EogNavigator {
        GtkListStore         parent_instance;
	EogNavigatorPrivate *priv;
};

struct _EogNavigatorClass {
	GtkListStoreClass parent_class;

	/* navigation signals */
	void (* active_image_changed) (EogNavigator *navigator,
		                       GtkTreePath  *path);
};

GType            eog_navigator_get_type               (void) G_GNUC_CONST;

EogNavigator    *eog_navigator_new 	              (void);
EogNavigator    *eog_navigator_new_from_glist         (GList *list);

/* active image */
EogImage        *eog_navigator_get_active_image       (EogNavigator     *navigator);
void             eog_navigator_set_active_image       (EogNavigator     *navigator,
						       EogImage         *image);
void             eog_navigator_set_active_image_path  (EogNavigator     *navigator,
						       GtkTreePath      *path);
gint             eog_navigator_get_active_image_index (EogNavigator     *navigator);

/* image management */
void             eog_navigator_copy_image             (EogNavigator     *navigator);
void             eog_navigator_save_image             (EogNavigator     *navigator);
void             eog_navigator_save_image_as          (EogNavigator     *navigator);
void             eog_navigator_delete_image           (EogNavigator     *navigator);

/* image collection management */
void             eog_navigator_set_image_list         (EogNavigator     *navigator,
						       GList            *list);
gint             eog_navigator_get_images_count       (EogNavigator     *navigator);

void             eog_navigator_append_image           (EogNavigator     *navigator,
						       EogImage         *image);
void             eog_navigator_insert_image           (EogNavigator     *navigator,
						       EogImage         *image,
						       guint             position);
void             eog_navigator_remove_image           (EogNavigator     *navigator,
						       EogImage         *image);
gboolean         eog_navigator_is_empty               (EogNavigator     *navigator);

/* navigation */
void             eog_navigator_go_first               (EogNavigator     *navigator);
void             eog_navigator_go_previous            (EogNavigator     *navigator);
void             eog_navigator_go_next                (EogNavigator     *navigator);
void             eog_navigator_go_last                (EogNavigator     *navigator);

G_END_DECLS

#endif /* __EOG_NAVIGATOR_H__ */
/* Eye of Gnome -- Eog Image Navigator View
 *
 * Copyright (C) 2012 The Free Software Foundation
 *
 * Author: Javier Sánchez <jsanchez deskblue com>
 *
 * 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.
 */

#ifndef __EOG_NAVIGATOR_VIEW_H__
#define __EOG_NAVIGATOR_VIEW_H__

#include "eog-navigator.h"

#include <gtk/gtk.h>

G_BEGIN_DECLS

#define EOG_TYPE_NAVIGATOR_VIEW            (eog_navigator_view_get_type ())
#define EOG_NAVIGATOR_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), EOG_TYPE_NAVIGATOR_VIEW, EogNavigatorView))
#define EOG_NAVIGATOR_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), EOG_TYPE_NAVIGATOR_VIEW, EogNavigatorViewClass))
#define EOG_IS_NAVIGATOR_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EOG_TYPE_NAVIGATOR_VIEW))
#define EOG_IS_NAVIGATOR_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EOG_TYPE_NAVIGATOR_VIEW))
#define EOG_NAVIGATOR_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), EOG_TYPE_NAVIGATOR_VIEW, EogNavigatorViewClass))

typedef enum {
	EOG_NAVIGATOR_VIEW_MODE_ONE_ROW,
	EOG_NAVIGATOR_VIEW_MODE_ONE_COLUMN,
	EOG_NAVIGATOR_VIEW_MODE_MULTIPLE_ROWS,
	EOG_NAVIGATOR_VIEW_MODE_MULTIPLE_COLUMNS
} EogNavigatorViewMode;

typedef struct _EogNavigatorView        EogNavigatorView;
typedef struct _EogNavigatorViewClass   EogNavigatorViewClass;
typedef struct _EogNavigatorViewPrivate EogNavigatorViewPrivate;

struct _EogNavigatorView {
        GtkBin parent_instance;
	EogNavigatorViewPrivate *priv;
};

struct _EogNavigatorViewClass {
	GtkBinClass parent_class;
};

GType                 eog_navigator_view_get_type            (void) G_GNUC_CONST;

GtkWidget            *eog_navigator_view_new                 (EogNavigatorViewMode  mode,
							      gboolean              show_buttons);

void	              eog_navigator_view_set_model           (EogNavigatorView     *view,
							      EogNavigator         *model);
EogNavigatorViewMode  eog_navigator_view_get_mode            (EogNavigatorView     *view);
void                  eog_navigator_view_set_mode            (EogNavigatorView     *view,
							      EogNavigatorViewMode  mode);

gboolean              eog_navigator_view_get_show_buttons    (EogNavigatorView     *view);
void                  eog_navigator_view_set_show_buttons    (EogNavigatorView     *view,
							      gboolean              show_buttons);

guint	              eog_navigator_view_get_n_selected      (EogNavigatorView     *view);
GList                *eog_navigator_view_get_selected_images (EogNavigatorView     *view);

G_END_DECLS

#endif /* __EOG_NAVIGATOR_VIEW_H__ */


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