1999-09-28 Federico Mena Quintero <federico@redhat.com>
* ui-image.c (canvas_realized): Set the cursor to a hand.
(UIImagePrivate): Added fields for the anchor point for dragging.
(drag_to): New function to allow dragging of the canvas. It will
perform badly for diagonal movement; see the comment in this
source file to see why.
* cursors.c (cursor_get): New file and new function to create
mouse cursors.
* Makefile.am: Added the cursors directory. Added cursors.[ch] to
the list of sources.
* cursors/Makefile.am: Added the cursor data files.
1999-09-24 Federico Mena Quintero <federico@redhat.com>
This is the start of the new icon list / column list / tree
widgets.
* gnome-list-model.[ch]: New files that define an abstract list
model.
* gnome-list-model.c (gnome_list_model_class_init): Made
get_length a signal.
Implemented the signal marshallers.
1999-09-23 Federico Mena Quintero <federico@redhat.com>
* window.c (set_menu_tb_sensitivity): Renamed from
set_menu_sensitivity. Also sensitize the toolbar widgets.
(WindowPrivate): Added a field to keep the zoom toolbar items.
(window_destroy): Free said array.
* tb-image.c (tb_image_new): Also return an array with the widgets
for the zoom buttons.
* stock.c (stock_init): New function to initialize the stock
pixmaps.
* tb-image.c (toolbar): Use the stock pixmaps.
* main.c (main): Initialize the stock pixmaps.
* Makefile.am (SUBDIRS): Process the stock directory.
1999-09-22 Federico Mena Quintero <federico@redhat.com>
* main.c (main): Use gtk_widget_show_now(). This will be better
when we have progressive image loading in place.
1999-09-22 Federico Mena Quintero <federico@redhat.com>
These changes are based on a patch by Michael Meeks (mmeeks@gnu.org).
* Makefile.am (eog_SOURCES): Added util.[ch] to the list of sources.
* util.c (open_failure_dialog): New function to run a failure
message box.
* window.c (window_open_image): Return a status value.
(open_ok_clicked): Use open_failure_dialog() if the image could
not be loaded. Also, hide the file selector before we attempt to
load the image.
* main.c (main): Use open_failure_dialog() if the image could not
be loaded. Exit with an error value if no image could be opened.
* image-item.c (recompute_bounding_box): Fetch the image
dimensions only if the pixbuf exists.
(image_item_draw): Likewise.
1999-09-22 Federico Mena Quintero <federico@redhat.com>
* ui-image.c (ui_image_set_image): Set the width/height of the
image item.
* image-item.c (ImageItemPrivate): Added user width and height
values. Removed the single zoom value.
(image_item_class_init): Register the width/ height arguments.
(image_item_init): Initialize the width/height values.
(image_item_set_arg): Handle the width/height arguments.
(image_item_get_arg): Likewise.
(recompute_bounding_box): Use width/height instead of zoom.
(image_item_update): Likewise.
(image_item_draw): Likewise.
(image_item_point): Likewise.
(image_item_bounds): Likewise.
* render.c (render_image): Changed so that it takes in a GdkPixbuf
instead of an Image. Added support for anamorphic scaling.
1999-09-18 Federico Mena Quintero <federico@redhat.com>
* window.c (zoom_menu): Added a zoom factor menu.
* ui-image.c (ui_image_construct): Set the step_increment for the
scrolling adjustments.
1999-09-18 Federico Mena Quintero <federico@redhat.com>
* ui-image.c (ui_image_get_zoom): New function to get the current
zoom factor.
(ui_image_zoom_fit): New function to zoom to fit the size of the
image view.
* window.c (window_construct): Create the toolbar.
(view_menu): Added the View menu.
(window_zoom_in): Zoom in by 5%.
(window_zoom_out): Zoom out by 5%.
(window_zoom_1): Zoom to 1:1 scale.
(window_zoom_fit): Zoom to fit the window.
(window_construct): Keep a pointer to the view menu and call
set_mode().
(set_menu_sensitivity): New function to set the sensitivity of
menu items according to the window mode.
(set_mode): Call set_menu_sensitivity().
* tb-image.[ch]: New files with the definition of a toolbar for
image windows.
* commands.[ch]: New files with command callbacks for menus and
toolbars.
1999-09-18 Federico Mena Quintero <federico@redhat.com>
* main.c (main): Open the images specified in the command line.
* window.c (window_open_image): Renamed from open_image() and made
public.
* ui-image.c (ui_image_set_zoom): New function to set the zoom
factor of an image view.
1999-09-17 Federico Mena Quintero <federico@redhat.com>
* window.c (new_window_cmd): Implemented File/New Window.
(open_cmd): Oops. Patch from Tom Gilbert to fix the cancel
button.
1999-09-17 Federico Mena Quintero <federico@redhat.com>
* window.c (window_construct): Set the default size of windows to
something resonable.
(open_cmd): Keep the file selection dialog around so that it
preserves its cwd. Added a field to WindowPrivate to hold it.
(open_ok_clicked): Just hide, don't destroy the dialog.
(open_cancel_clicked): Likewise.
(open_delete_event): Likewise.
(window_destroy): Destroy the file selection dialog.
* ui-image.c (ui_image_set_image): Set the canvas scroll region
based on the image size.
1999-09-17 Federico Mena Quintero <federico@redhat.com>
* ui-image.c (ui_image_set_image): Set the canvas scroll region
based on the image size.
* zoom.[ch]: New files with utilitiy functions for computing zoom
factors.
* Makefile.am (eog_SOURCES): Added zoom.[ch] to the sources.
* window.c (WindowPrivate): Added a bin field. Now we put the
contents in a simple bin because GnomeApp does not like its
contents to be removed and added again.
(window_construct): Create the bin.
(set_mode): Put the real contents in the bin.
1999-09-17 Federico Mena Quintero <federico@redhat.com>
* main.c: Removed old test cruft.
* window.c (confirm_save): Renamed from confirm_close().
(open_image): Implemented File/Open.
* ui-image.c: For now the image view is simply derived from
GtkScrollFrame. Implemented basic image setting functionality.
* image-item.c (image_item_set_arg): Refcount the image.
(image_item_destroy): Unref the image.
* image.c (image_new): New function.
(image_load): New function. Do simplistic loading of images.
(image_ref image_unref): Implemented refcounting of images.
1999-09-16 Federico Mena Quintero <federico@redhat.com>
* window.c (exit_cmd): Change of plans. Do not confirm for
unsaved files using the Emacs way of doing it, but rather present
a save/don't save/don't exit dialog.
(confirm_close): Present a confirmation dialog.