Commit graph

32 commits

Author SHA1 Message Date
Lucas Rocha dda6d90827 fix memory leak on image transformation (Fixes bug #349434). Patch from
2006-08-01  Lucas Rocha  <lucasr@gnome.org>

	* libeog/eog-scroll-view.c (image_changed_cb): fix memory leak on
	image transformation (Fixes bug #349434). Patch from Felix
	Riemann <felix@hsgheli.de>.
2006-08-02 02:35:08 +00:00
Lucas Rocha f56a52f6cd use middle mouse drag to scroll image (Fixes bug #335689). Patch from
2006-07-13  Lucas Rocha  <lucasr@gnome.org>

	* libeog/eog-scroll-view.c (eog_scroll_view_button_press_event,
	eog_scroll_view_button_release_event): use middle mouse drag
	to scroll image (Fixes bug #335689). Patch from Wouter
	Bolsterlee <uws+gnome@xs4all.nl>.
2006-07-13 17:03:00 +00:00
Lucas Rocha a46d2abf63 Keyboard shortcuts revamp (Fixes bug #310455 partly). Patch from Jaap
2006-03-26  Lucas Rocha  <lucasr@gnome.org>

 	Keyboard shortcuts revamp (Fixes bug #310455 partly). Patch from
	Jaap Haitsma <jaap@haitsma.org>.

 	* shell/eog-gtk-ui.xml: Add Home and End as shortcut keys for the first
 	and last images respectively

 	* shell/eog-window.c:
 	(action_entries_image) Add Home and End as keyboard shortcuts for the
 	first and last images respectively.

 	(action_entries_collection) Change the keyboard shortcuts of first,
 	last, next and previous image so they conform to the HIG
 	First was Ctrl+Home now Alt+Home
 	Last was Ctrl+End now Alt+End
 	Next was Ctrl+Right now Alt+Right
 	Previous was Ctrl+Left now Alt+Left

 	(eog_window_key_press) If no scrollbars visible PageDown, Right and Down
 	show the next image and PageUp, Left and Up show the previous image

 	* libeog/eog-scroll-view.{c|h}:
 	Add eog_scroll_view_scrollbars_visible function

 	(display_key_press_event) Page up/down now scroll 3/4 of the image
 	(page) height (Fixes bug #324871). Ctrl PageUp/PageDown scroll
	left/right
2006-03-26 23:58:18 +00:00
Lucas Rocha 87293c7cd7 correct handling of zoom double precision with mouse wheel (Fixes bug
2006-02-27  Lucas Rocha  <lucasr@gnome.org>

	* eog-scroll-view.c (eog_scroll_view_zoom_in,
	eog_scroll_view_zoom_out): correct handling of zoom
        double precision with mouse wheel (Fixes bug #310833).
	Patch from Felix Riemann <felix@hsgheli.de>.
2006-02-27 17:12:19 +00:00
Lucas Rocha 0699109ca9 refresh image section for very small images (Fixes bug #317641). Also, the
2006-01-10  Lucas Rocha  <lucasr@gnome.org>

        * libeog/eog-scroll-view.c (paint_rectangle,
        set_minimum_zoom_factor, set_zoom, set_zoom_fit,
        eog_scroll_view_get_zoom_is_min, eog_scroll_view_instance_init):
        refresh image section for very small images (Fixes bug #317641).
        Also, the zoom out is locked when the image gets 1px wide. Patch
        from Felix Riemann <felix@hsgheli.de> with contribution from
        Claudio Saavedra <csaavedra@alumnos.utalca.cl>.
2006-01-10 04:28:52 +00:00
Lucas Rocha bbef6be219 replace GNOME_CLASS_BOILERPLATE macros in libeog with the G_DEFINE_TYPE
2005-01-07  Lucas Rocha  <lucasr@gnome.org>

        * libeog/eog-canvas-pixbuf.c, libeog/eog-collection-item.c,
        libeog/eog-full-screen.c, libeog/eog-image-cache.c,
        libeog/eog-image-list.c, libeog/eog-image-save-info.c,
        libeog/eog-image.c, libeog/eog-info-view-detail.c,
        libeog/eog-info-view-exif.c, libeog/eog-info-view-file.c,
        libeog/eog-info-view.c, libeog/eog-job.c,
        libeog/eog-metadata-reader.c, libeog/eog-scroll-view.c,
        libeog/eog-transform.c, libeog/eog-uri-converter.c,
        libeog/eog-wrap-list.c, shell/eog-file-chooser.c,
        shell/eog-window.c: replace GNOME_CLASS_BOILERPLATE macros in
        libeog with the G_DEFINE_TYPE macros. Patch by Felix Riemann
        <felix@hsgheli.de>.
2006-01-07 04:54:57 +00:00
Lucas Rocha 1857131f4e several code cleanups. Patch from Kjartan Maraas <kmaraas@gnome.org>.
2005-11-18  Lucas Rocha  <lucasr@cvs.gnome.org>

        * libeog/eog-canvas-pixbuf.c, libeog/eog-collection-item.c,
        libeog/eog-full-screen.c, libeog/eog-image-cache.c,
        libeog/eog-image-list.c, libeog/eog-image-private.h,
        libeog/eog-image-save-info.c, libeog/eog-image.c,
        libeog/eog-image.h, libeog/eog-info-view-detail.c,
        libeog/eog-info-view-exif.c, libeog/eog-info-view-file.c,
        libeog/eog-info-view.c, libeog/eog-job-manager.c,
        libeog/eog-job.c, libeog/eog-metadata-reader.c,
        libeog/eog-pixbuf-util.c, libeog/eog-scroll-view.c,
        libeog/eog-transform.c, libeog/eog-uri-converter.c,
        libeog/eog-uri-converter.h, libeog/eog-wrap-list.c,
        libeog/uta.c, shell/eog-save-as-dialog-helper.c,
        shell/eog-window.c, libeog/Makefile.am: several code
        cleanups. Patch from Kjartan Maraas <kmaraas@gnome.org>.
        * libeog/eog-vertical-splitter.c, libeog/eog-vertical-splitter.h,
        libeog/eog-horizontal-splitter.c, libeog/eog-horizontal-splitter.h:
        removed.
2005-11-18 05:00:24 +00:00
Lucas Rocha bdaa85e603 Page Up and Page Down keys scroll images up and down (Fixes bug #152364).
2005-11-05  Lucas Rocha  <lucasr@cvs.gnome.org>

        * libeog/eog-scroll-view.c (display_key_press_event):
        Page Up and Page Down keys scroll images up and
        down (Fixes bug #152364).
2005-11-05 04:37:12 +00:00
Lucas Rocha 7a0112df56 several build warning fixes (Fixes bug #318020).
2005-11-03  Lucas Rocha  <lucasr@cvs.gnome.org>

        * libeog/eog-image.c, libeog/eog-scroll-view.c,
        libeog/eog-thumbnail.c, shell/eog-preferences.c,
        shell/eog-window.c, shell/main.c: several build warning
        fixes (Fixes bug #318020).
2005-11-03 03:53:20 +00:00
Lucas Rocha c6917306d4 on single image view, default focus on scroll-view. On collection view,
2005-11-01  Lucas Rocha  <lucasr@cvs.gnome.org>

        * libeog/eog-scroll-view.c, shell/eog-window.c: on single
        image view, default focus on scroll-view. On collection view,
        default focus on wrap-list (Fixes bug #169836).
2005-11-01 15:44:12 +00:00
Lucas Rocha 7b8d715845 make it possible to use '=' or '+' for zooming in (Fixes bug #320367).
2005-11-01  Lucas Rocha  <lucasr@cvs.gnome.org>

        * libeog/eog-scroll-view.c: make it possible to use '='
        or '+' for zooming in (Fixes bug #320367).
2005-11-01 05:41:18 +00:00
Tim P. Gerla 108e01fecd More patches from Ross Burton improving the ICC profile support and make linking against -llcms optional. 2005-07-14 00:35:37 +00:00
Tim P. Gerla d66242aa15 Apply patches from Ross Burton <ross@burtonini.com> to add ICC color profile support. 2005-07-12 01:23:22 +00:00
Tim P. Gerla 3184edc73d Apply patch from Paolo Borelli <pborelli@katamail.com> to make preferences
* eog.glade, shell/eog-preferences.c, shell/eog-preferences.h:
        Apply patch from Paolo Borelli <pborelli@katamail.com> to
        make preferences and help dialog launch in the center of the
        parent window. Closes bug #144631.
        * shell/eog-window.c: Patch from Paolo Borelli to fix miscalculated
        zoom amount. Closes bug #308910.
        * libeog/eog-scroll-view.c, libeog/eog-scroll-view.h,
        shell/eog-window.c: Another patch from Paolo Borelli to
        desensitize zoom in/out buttons at max/min zoom levels.
2005-06-25 02:12:03 +00:00
Tim Gerla 268d4afc02 Apply patch from Kjartan Maraas <kmaraas@gnome.org>: config.h has to be
2005-06-23  Tim Gerla  <tim@gerla.net>

        * libeog/*.c, shell/*.c:
        Apply patch from Kjartan Maraas <kmaraas@gnome.org>:
        config.h has to be the first file included in a .c file and
        it must not be included more than once else you get undefined
        behaviour and broken translations etc. This patch fixes this up,
        along with a couple of other minor memory-management bugs.

CVl: ----------------------------------------------------------------------
2005-06-23 23:15:17 +00:00
Jens Finke bdaa44a847 Merged the experimental-job-mgr branch back to head.
2005-03-14  Jens Finke  <jens@triq.net>

	* Merged the experimental-job-mgr branch back to head.
2005-03-14 20:35:13 +00:00
Jens Finke cd764bc9f3 Respect allowed min/max zoom factors.
2004-11-29  Jens Finke  <jens@triq.net>

	* libeog/eog-scroll-view.c (set_zoom_fit): Respect allowed
	min/max zoom factors.

	* shell/eog-window.c (eog_window_construct_ui): Set min widget size
	for scroll_view.
2004-11-29 20:53:13 +00:00
Jens Finke 9bac45cd77 Fix AIX compilation problems - #134866.
2004-02-19  Jens Finke  <jens@triq.net>

	Fix AIX compilation problems - #134866.

	* libeog/eog-image.h
	* shell/eog-window.h: No trailing comma after last enum constant.

	* libeog/eog-scroll-view.c: No C++ comments in C source files.
2004-02-19 20:53:28 +00:00
Jens Finke 18f0ed7001 Create horizontal splitter to hold info view only if libexif is available.
2003-09-21  Jens Finke  <jens@triq.net>

	* collection/eog-collection-view.c (create_user_interface): Create
	horizontal splitter to hold info view only if libexif is
	available. Otherwise put the image view directly into the vertical
	pane.

	* libeog/eog-scroll-view.c (paint_rectangle): Check if widget is
	drawable (fixes crash on shutdown). Check if scaled image width
	and height is > 1.
2003-09-21 11:42:47 +00:00
Jens Finke b72609f27c Kicked out/ #ifdef'd debug output.
2003-07-21  Jens Finke  <jens@triq.net>

	* collection/eog-collection-view.c (load_uri_cb):
	* collection/main.c (eog_collection_factory):
	* libeog/eog-image.c (update_exif_data):
	* libeog/eog-scroll-view.c (display_map_event):
	* viewer/eog-image-view.c (finalize),
	(load_uri_cb):
	* viewer/main.c (eog_image_viewer_factory): Kicked out/ #ifdef'd
	debug output.
2003-07-21 20:17:27 +00:00
Jens Finke e250bd1011 Queue the images to load and load one by one. Simplified the code.
2003-04-27  Jens Finke  <jens@triq.net>

	* libeog/eog-full-screen.c: Queue the images to load and load one
	by one. Simplified the code.

	* libeog/eog-image.[ch] (eog_image_new_uri),
	(eog_image_new): Removed load mode parameter.
	(eog_image_load): Removed return parameter. Instead, emit load
	finished signal if the image is already loaded.
	(eog_image_free_mem): Set load status to none.

	* libeog/eog-info-view.c (eog_info_view_set_image):
	* viewer/eog-image-view.c (load_uri_cb):
	* collection/eog-collection-model.c (directory_visit_cb):
	(real_file_loading): Removed load mode paramter for eog_image_new.

	* libeog/eog-scroll-view.c (eog_scroll_view_set_image): Removed
	the special case when an image is already loaded. Submit
	LOAD_DEFAULT to eog_image_load.
2003-04-27 10:43:01 +00:00
Jens Finke a2083a183d Added invisible cursor data. (cursor_get): Made it a non public function.
2003-04-06  Jens Finke  <jens@triq.net>

	* libeog/cursors.c: Added invisible cursor data.
	(cursor_get): Made it a non public function.
	(cursor_set): New function, which directly set the desired cursor
	for the widget.

	* libeog/cursors.h: New cursor types: CURSOR_INVISBLE and
	CURSOR_DEFAULT.

	* libeog/eog-full-screen.c: Implemented automatic cursor
	hiding. Fixes #92184.
	(check_cursor_hide),
	(eog_full_screen_motion): New functions.
	(eog_full_screen_show): Init cursor hiding stuff.
	(eog_full_screen_class_init): Register mouse motion event
	callback.

	* libeog/eog-scroll-view.c (check_scrollbar_visibility): Set
	cursor type according to the state of the scrollbars.
	(is_image_movable): New function.
	(eog_scroll_view_button_press_event): Use cursor_set, set it only
	if the image is movable.
	(eog_scroll_view_button_release_event): Use cursor_set.
2003-04-06 09:51:46 +00:00
Federico Mena Quintero b19c48ae36 "*width = *height = 0", not "width = height = 0". (NUM_IMAGE_CALLBACKS):
2003-04-02  Federico Mena Quintero  <federico@ximian.com>

	* libeog/eog-scroll-view.c (eog_scroll_view_get_image_size):
	"*width = *height = 0", not "width = height = 0".
	(NUM_IMAGE_CALLBACKS): Use a macro rather than a hardcoded value
	for the number of signals we connect to.
	(ZoomMode): Use an enum rather than ints.
	(ProgressiveState): Likewise.
	(update_scrollbar_values): Use gtk_adjustment_changed() rather
	than emitting signals for the adjustments directly.
	(set_zoom): Use NULL, not 0, when calling
	check_scrollbar_visibility().
	(display_key_press_event): Likewise.
	(display_map_event): Likewise.
	(image_loading_update_cb): Likewise.
	(image_loading_finished_cb): Likewise.
	(image_changed_cb): Likewise.
	(eog_scroll_view_zoom_fit): Likewise.
	(eog_scroll_view_set_image): Likewise.
	(check_scrollbar_visibility): We don't use the return value
	anywhere, so make it return void.
	(is_unity_zoom): Take in an EogScrollView, not a private
	structure.
	(pack_pixbuf): Removed.
	(paint_rectangle): Compute the background color correctly for the
	TRASNP_BACKGROUND case.
	(scroll_to): Use gtk_adjustment_value_changed() rather than
	emitting signals for the adjustments directly.
	(compute_center_zoom_offsets): Do not allow negative offsets so
	the image doesn't creep to the right when we zoom down at the
	upper left corner.
	(set_zoom_fit): Set the new offsets before emitting the signal.
	(display_map_cb): Removed.
	(eog_scroll_view_new): Do not make the whole table non-double-buffered.

	* libeog/eog-scroll-view.h (TransparencyStyle): Rename
	TRANSP_CHECKEDPATTERN to TRANSP_CHECKED.
2003-04-03 03:01:19 +00:00
Jens Finke f3084fd13c Enable 'As background' radio button.
2003-03-30  Jens Finke  <jens@triq.net>

	* eog.glade: Enable 'As background' radio button.

	* eog.schemas.in: Updated transparency indicator description.

	* libeog/eog-full-screen.c (eog_full_screen_new): Set black
	background style for scroll view widget.

	* libeog/eog-image.c (real_image_load): Use GError with
	GdkPixbufLoader.

	* libeog/eog-scroll-view.c (paint_background): Use
	gdk_window_clear_area.
	(paint_rectangle): Calculate background color correctly for
	transparent parts.
	(eog_scroll_view_style_set): New function.
	(style_set_event): Removed.

	* shell/eog-preferences.c (eog_preferences_show): Connect
	background_radio button.
2003-03-30 16:09:08 +00:00
Jens Finke 7e21ea9c5e Switched to a thread based loading mechanism. (eog_image_dispose): Free
2003-03-11  Jens Finke  <jens@triq.net>

	* libeog/eog-image.[ch]: Switched to a thread based loading
	mechanism.
	(eog_image_dispose): Free mutex.
	(check_load_status): New function.
	(load_area_updated),
	(load_size_prepared),
	(real_image_load),
	(eog_image_load): Reworked, so that they use the thread based
	approach.
	(eog_image_get_pixbuf): Add mutex around pixbuf accessing.
	(eog_image_cancel_load): New function.

	* libeog/eog-scroll-view.c (free_image_resources): Cancel loading
	of the previous shown image.

	* shell/eog-window.c (property_changed_cb): Be quite.
2003-03-11 16:15:36 +00:00
Jens Finke 8480d3121a Improved the in advance loading of images. Also frees image data, which is
2003-03-07  Jens Finke  <jens@triq.net>

	* libeog/eog-full-screen.[ch]: Improved the in advance loading of
	images. Also frees image data, which is probably not shown
	next.

	* libeog/eog-scroll-view.c (eog_scroll_view_dispose): Free uta and
	remove possibly active idle handler.

	* collection/eog-wrap-list.c (eog_wrap_list_get_selected_images):
	Just return pointer to internal list.

	* collection/eog-collection-view.c (verb_SlideShow_cb): Consider
	selections when assembling the list of images for the slide show.

	* viewer/eog-image-view.c (verb_FullScreen_cb): Free list.
2003-03-07 12:45:56 +00:00
Jens Finke 86f502e41d New function which cleans up all resources related to the viewed image.
2003-03-03  Jens Finke  <jens@triq.net>

	* libeog/eog-scroll-view.c (free_image_resources): New function
	which cleans up all resources related to the viewed image.
	(eog_scroll_view_set_image): Call free_image_resources if there
	has been an image loaded already.
	(eog_scroll_view_dispose): Call free_image_resources.
2003-03-03 09:59:45 +00:00
Jens Finke 32e38ebff1 Unref image. (add_image_to_queue): Ref image before putting it into the
2003-03-03  Jens Finke  <jens@triq.net>

	* libeog/eog-image.c (dispatch_image_finished): Unref image.
	(add_image_to_queue): Ref image before putting it into the queue.
	(eog_image_new_uri),
	(eog_image_finalize): Added ref counting for all produced image
	objects.
	(real_image_load): Unref the processed image object.
	(eog_image_load): Ref the image object before submitting it to the
	real_image_load idle callback.

	* libeog/eog-scroll-view.c (eog_scroll_view_dispose): Oops,
	implemented this function. We finally free something.

	* shell/eog-window.c (open_uri_list_cleanup): New function.
	(eog_window_class_init): Register open_uri_list_cleanup as cleanup
	handler for the open-uri-list signal.

	* shell/main.c (open_uri_list_cb): Don't free the uri_list. Will
	be done by the cleanup handler in eog-window.c.

	* viewer/eog-image-view.c (load_uri_cb): Don't ref new created
	image object.
2003-03-03 09:37:27 +00:00
Jens Finke 39643ff270 Re-enabled image saving.
2003-03-02  Jens Finke  <jens@triq.net>

	Re-enabled image saving.

	* libeog/eog-file-selection.c (get_save_formats): Moved to
	eog-pixbuf-util.
	(eog_append_menu_entry),
	(check_extension),
	(is_filename_valid),
	(changed_cb): Free values from gdk_pixbuf_format calls.

	* libeog/eog-image.c: Changed "changed" signal name to
	"image_changed".
	(eog_image_save): Rely completely on GdkPixbuf for image saving
	and use GdkPixbufFormat information to determine the filetype.
	This removes xpm saving support from eog, but the right way should
	be to put this into gdk-pixbuf anyway.

	* libeog/eog-pixbuf-util.c (eog_pixbuf_get_savable_formats): New
	function, previously in eog-file-selection.c.

	* libeog/eog-scroll-view.c (eog_scroll_view_set_image):
	s/changed/image_changed.

	* viewer/eog-iamge-view.c (verb_SaveAs_cb): Reenabled.
	(item_factory_translate_cb): Use gettext again.
	(save_uri_cb): Use HIG dialogs.
2003-03-02 13:22:15 +00:00
Jens Finke fc32029fb8 Fixed compiler warnings in libeog.
2003-03-01  Jens Finke  <jens@triq.net>

	Fixed compiler warnings in libeog.

	* libeog/accessible-image-view-factory.h: Declare get type
	function for accessible image view _factory_.

	* libeog/accessible-image-view.c
	(accessible_image_view_get_image_size):
	s/scroll_view/eog_scroll_view.

	* libeog/eog-full-screen.c (eog_full_screen_show),
	(eog_full_screen_new): Removed unused variables.

	* libeog/eog-image.c (eog_image_save): Use g_return_val_if_fail.
	(eog_image_get_caption): Return NULL if uri is NULL.

	* libeog/eog-image.h: Declare eog_image_error_quark function.

	* libeog/eog-pixbuf-util.c (eog_pixbuf_flip_horizontal),
	(eog_pixbuf_flip_vertical): Removed unused variables.
	(eog_pixbuf_rotate_90_cw),
	(eog_pixbuf_rotate_90_ccw): Return NULL if pixbuf is NULL.

	* libeog/eog-scroll-view.c (update_scrollbar_values): Removed
	unused variables.
	(paint_rectangle): Added default case on bgr style to initialize
	check_1 and check_2 variables.
	(set_zoom): Made static, removed unused variable.
	(set_zoom_fit), (eog_scroll_view_set_transparency),
	(eog_scroll_view_new): Removed unused variables.
2003-03-01 13:45:25 +00:00
Jens Finke 7ae42475ef Added thumbnail generation stuff. (eog_image_load_thumbnail),
2003-02-21  Jens Finke <jens@triq.net>

	* libeog/eog-image.[ch]: Added thumbnail generation stuff.
	(eog_image_load_thumbnail),
	(eog_image_get_pixbuf_thumbnail),
	(eog_image_free_mem),
	(eog_image_get_caption): New functions.

	* libeog/scroll-view.c (eog_scroll_view_set_image): Reduced
	flicker on image switching.

	* libeog/.cvsignore: Added libeog-marshal.[ch].
2003-02-21 11:48:36 +00:00
Jens Finke 905a8b5d28 2003-02-14 Jens Finke
New eog architecture. Moved more stuff into libeog and basically merged
	image-view.[ch] and ui-image.[ch]. The result is eog-scroll-view.[ch].

	* libeog/ui-image.[ch],
	* libeog/image-view.[ch]: Removed.

	* libeog/eog-scroll-view.[ch]: New, basic widget for displaying an
	EogImage.

	* libeog/eog-image-helper.[ch],
	* libeog/eog-image.[ch]: Image model, provides all operations on
	an image.

	* libeog/eog-full-screen.[ch]: Moved from viewer. Uses a
	EogScrollView widget for displaying the image.

	* libeog/libeog-marshal.list: New, list of callback marshallers.

	* libeog/Makefile.am: SOURES file list updated, added
	libeog-marshal.[ch] generation.

	* libeog/accessible-image-view.[ch]: Use EogScrollView instead of
	ImageView. Fixed indention.

	* libeog/eog-pixbuf-util.c (eog_pixbuf_flip_vertical): Free
	pixbuf.

	* libeog/eog-pixbuf-util.h: Added include guards.

	* libeog/zoom.[ch] (zoom_image_has_standard_size): Removed.

	* viewer/Makefile.am (SOURCES): Removed everything except main.c
	and eog-image-view.[ch]

	* viewer/eog-image-view.[ch]: Rewritten. This bonobo object serves
	as a simple wrapper for an EogScrollView and EogImage and provides
	onyl gui and glue code. It implements the PersistFile, Control and
	Zoomable interfaces.

	* viewer/main.c (eog_image_viewer_factory): Removed EogImage
	bonobo stuff.

	* shell/eog-window.c (sb_policy_changed): Removed.
	(eog_window_init): Don't register for policy changes.
	(adapt_window_size): New function.
	(property_changed_cb): New window/width, window/height properties.
	(adapt_window_size_to_control): Simplified, call
	adapt_window_size.

	* configure.in: Bumped version to 2.3.0.
2003-02-14 15:41:42 +00:00