1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
|
2000-08-18 arik devens <arik@helixcode.com>
* full-screen.c (full_screen_finalize): see below.
* image-view.c (image_view_destroy): see below.
* window.c (window_destroy): ok so i am officially a moron. ;-)
gconf_client_notify_remove_dir _does_ take an error
handler... goddamn havoc stupid gconf naming scheme.
2000-08-18 arik devens <arik@helixcode.com>
* full-screen.c (full_screen_finalize):
gconf_client_notify_remove_dir doesn't take an error handler
argument.
* image-view.c (image_view_destroy): ditto.
* window.c (window_destroy): ditto.
2000-08-16 Federico Mena Quintero <federico@helixcode.com>
* gtkscrollframe.c (gtk_scroll_frame_size_request): Using the
child's requisition as our own requisition when the scrollbar
policy is NEVER is *highly* broken. The scrolling interface needs
to be rethought. In the meantime, disable that code so that we
always follow the code path for the other policies.
* image-view.c: Restore the gconf_client_add_dir() stuff.
* full-screen.c: Likewise.
* window.c: Likewise.
* *.[ch]: Date/email updates.
2000-07-28 Federico Mena Quintero <federico@helixcode.com>
* window.c (open_new_window): Moved the opening in a new window
functionality to here. If the original window does not have an
image loaded, load it in that window instead of creating a new
one.
2000-07-28 Arik Devens <arik@helixcode.com>
* window.c (open_ok_clicked): Added gconf checking for the new
window pref and if true the opening of images in a new window.
2000-07-27 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (compute_center_zoom_offsets): When you do
wheel-zooming, the zoom center is now anchored to the mouse
position.
(image_view_size_allocate): Reset the zoom anchor point.
(image_view_button_press): Set the zoom anchor point.
(image_view_key_press): Likewise.
2000-07-27 Federico Mena Quintero <federico@helixcode.com>
* zoom.c (zoom_fit_size): Use rounding to get better results.
* ui-image.c (ui_image_zoom_fit): Do not subtract the frame
thickness if the shadow type is GTK_SHADOW_NONE.
* gtkscrollframe.c (gtk_scroll_frame_get_policy): New function.
(gtk_scroll_frame_get_shadow_type): New function.
* image-view.c (image_view_set_zoom): Do not change the zoom
factor if it is the same as the current one.
2000-07-24 Federico Mena Quintero <federico@helixcode.com>
* zoom.c (zoom_image_has_standard_size): New function to see
whether an image has a well-known screen size. Sizes stolen from
the standard resolutions listed in XF86Config.
* commands.c (cmd_cb_full_screen): Set the image on the image view
directly. Also, if the image has a standard size and the
corresponding option is set, fit the image to the screen.
* full-screen.c (sb_policy_changed_cb): Set the policy directly.
(bevel_changed_cb): Set the bevel directly.
(full_screen_set_full_screen_sb_policy): Removed.
(full_screen_get_full_screen_sb_policy): Removed.
(full_screen_set_bevel): Removed.
(full_screen_get_bevel): Removed.
(full_screen_set_image): Removed.
* window.c (sb_policy_changed_cb): Set the policy directly here.
(window_set_window_sb_policy): Removed; this is a property of the
UIImage (which is a GtkScrollFrame), not of the Window.
(window_get_window_sb_policy): Removed.
(window_set_auto_size): Removed.
(window_get_auto_size): Removed.
(window_open_image): Get the auto_size preference directly here.
2000-07-24 Arik Devens <arik@helixcode.com>
* full-screen.c: Added bevel prefs to the full screen structure.
(full_screen_init): Added gconf stuff for bevel as well as setting
of the bevel type.
(full_screen_finalize): Added removal of gconf notification and
setting of the structures to 0.
(full_screen_set_bevel): New function to set the policy type of
the bevel.
(full_screen_get_bevel): New function to get the policy type of
the bevel.
2000-07-23 Arik Devens <arik@helixcode.com>
* full-screen.c: Added scrollbar prefs to the full screen
structure.
(full_screen_init): Added actual setting of the scrollbar prefs
instead of just hoping the universe will be nice to me. ;-) Added
gconf code for scrollbar prefs.
(full_screen_sb_policy_changed_cb): New function to monitor the
gconf db for changes to the scrollbar prefs.
2000-07-16 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (PAINT_UTA2_RECT_WIDTH): Have separate sets of
constants for the sizes of the glommed rectangles. For now we set
both the size for uta1 and uta2 to be 128x128. This "looks"
better when repainting than 256x64, I think. Is there a special
reason to use 256x64, as the canvas does? (Photoshop seems to use
128x128 most of the time).
2000-07-14 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (image_view_button_press): Make the scroll wheel
control zooming by itself, i.e. without having to press shift.
This makes more sense than scrolling, since the scroll wheel is
for 1D data and images are 2D. It also "feels" better.
2000-07-14 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (image_view_button_press): If you hold down shift,
you can zoom with the scroll wheel.
2000-07-13 Federico Mena Quintero <federico@helixcode.com>
* preferences.h: Removed all the global variables for preferences,
since now we just use GConf.
* preferences.c (set_prefs_widgets): Formatting fixes.
(prefs_dialog): Actually destroy the dialog once we are done.
* image-view.c (image_view_init): Set the initial zoom factor to
1.0. This had been accidentally removed.
(ImageViewPrivate): Removed the full_screen_zoom thing, since it
does not belong here.
(image_view_destroy): Reset notification IDs to zero.
(image_view_set_full_screen_zoom): Removed function.
(image_view_get_full_screen_zoom): Ditto.
* window.c (window_open_image): Actually call window_get_auto_size().
(window_set_auto_size): Do not queue a draw, since it is not needed.
(window_destroy): Eeeek! Free the private structure *after* we
are done using it!
(window_destroy): Also remove the auto_size_notify_id.
* commands.c (cmd_cb_full_screen): Get the preferences from the
GConf client.
2000-07-13 Pavel Cisler <pavel@eazel.com>
* image-view.c: (image_view_init):
Fixed build breakage.
auto_size_notify_id is gone.
2000-07-13 Arik Devens <arik@helixcode.com>
* window.c: Added comments.
2000-07-13 Arik Devens <arik@helixcode.com>
* window.c: Added window_sb_policy to WindowPrivate structure.
(window_sb_policy_changed_cb): New function to poll gconf database
for window_sb_policy changes.
(window_init): Added gconf support and window_sb_policy
monitoring.
(window_destroy): Added gconf_client_remove handler for
window_sb_policy.
(window_construct): Added initial setting of scrollbar policy.
(window_set_window_sb_policy): New function to set
window_sb_policy value and update window.
(window_get_window_sb_policy): New function to get
window_sb_policy.
* window.h: Added window_set_window_sb_policy and
window_get_window_sb_policy.
* image-view.c: Removed window_sb_policy from ImageViewPrivate
structure.
(image_view_init): Removed window_sb_policy polling.
(image_view_destroy): Removed window_sb_policy.
* image-view.h: Removed image_view_get_window_sb_policy and
image_view_set_window_sb_policy.
2000-07-13 Havoc Pennington <hp@pobox.com>
* Makefile.am (INCLUDES): GCONF_CFLAGS
2000-07-12 Ramiro Estrugo <ramiro@eazel.com>
* commands.c: (cmd_cb_full_screen):
* image-view.c: (image_view_init):
* preferences.c: (apply_cb), (set_prefs_widgets):
Update for gconf client api changes.
2000-07-10 Arik Devens <arik@helixcode.com>
* image-view.c: Removed zoom_changed_cb.
(interp_type_changed_cb): Renamed function and updated.
(check_type_changed_cb): Renamed function and updated.
(check_size_changed_cb): Renamed function and updated.
(dither_changed_cb): Renamed function and updated.
(scroll_changed_cb): Renamed function and updated.
(image_view_init): Updated for new functions and fixed a few
things.
2000-07-10 Arik Devens <arik@helixcode.com>
* window.c (window_construct): Do not use image_view_set_preferences().
* commands.c (cmd_cb_full_screen): Removed global prefs variable.
(cmd_cb_full_screen): Do not use image_view_set_preferences().
* preferences.c: Removed prefs_init and the global prefs
variables.
(apply_cb): New function to save preferences on an apply signal
from our property box.
(load_prefs_dialog): Connect to our apply signal and run apply_cb.
(set_prefs_widgets): Replaced our own functions with ones from
e-dialog-widgets.
(hook_prefs_widgets): Replaced our own functions with ones from
e-dialog-widgets.
* main.c: Removed prefs_init.
* Makefile.am (eog_SOURCES): Added e-dialog-widgets.[c,h].
* e-dialog-widgets.h: Add public function for
e-dialog-widget-hook_property.
* image-view.h: Add public function decs for the change prefs
functions.
* image-view.c: Removed global prefs variables.
(image_view_init): Create our GConfClient, register our notify
events, and get the current values.
(image_view_finalize): Destroy the client.
(change_zoom): New function to set prefs on gconf change.
(change_scroll): Same as above.
(change_dither): Same as above.
(change_check_size): Same as above.
(change_check_type): Same as above.
(change_interp_type): Same as above.
(image_view_set_preferences): Removed function.
2000-07-10 Federico Mena Quintero <federico@helixcode.com>
* preferences.c (prefs_init): Removed hardcoded values that were
used for testing.
2000-07-10 Arik Devens <arik@helixcode.com>
* e-dialog-widgets.c: Moved all the property box hooking code into
new functions.
(e_dialog_widget_hook_value): Added property box hook functions.
(e_dialog_widget_hook_property): New function to hook widgets to
property box.
(hook_radio): Removed property box hooks.
(hook_radio_property): New function to hook radio widgets to a
property box.
(hook_option_menu): Removed property box hooks.
(hook_option_menu_property): New function to hook option menus to
a property box.
(hook_toggle): Removed property box hooks.
(hook_toggle_property): New function to hook toggle buttons to a
property box.
(hook_spin_button): Removed property box hooks.
(hook_spin_button_property): New function to hook spin buttons to
a property box.
(hook_editable): Removed Property box hooks.
(hook_editable_property): New function to hook editable widgets to
a property box.
2000-07-07 Federico Mena Quintero <federico@helixcode.com>
* window.c (WindowPrivate): Removed all the window mode crap.
Windows are now always in image-viewing mode. When we
componentify EOG the window code will go away, anyways, but this
makes life simpler for now.
(auto_size): New function to automatically pick the window size
and zoom factor based on the image size.
(window_open_image): Use auto_size().
* full-screen.c (full_screen_get_ui_image): New function.
* commands.c (cmd_cb_full_screen): Set the proper zoom factor on
the full screen view.
2000-07-01 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (paint_rectangle): Check if we actually were able
to create the temporary pixbuf.
2000-06-30 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (request_paint_area): New argument to support
explicit synch behavior for the first pass.
(scroll_to): Draw the first pass synchronously. This eliminates
trailing.
(image_view_expose): Draw this asynchronously.
(image_view_draw): Ditto.
2000-06-20 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (paint_rectangle): Special-case zoom == 1.0 to
unconditionally use GDK_INTERP_NEAREST. Pixops should optimize
this itself, but things seem to be slower if you use other
interpolation types even when the zoom is 1.0. Also,
short-circuit the fastest case to not create a temporary pixbuf
and thus avoid a memcpy().
(request_paint_area): Short-circuit NEAREST interpolation and zoom
== 1.0 to paint synchronously.
(scroll_to): Use request_paint_area() instead of calling
uta_add_rect() directly. This lets us do the short-circuiting
there.
(ImageViewPrivate): Added a second microtile array for
interpolated drawing.
(remove_dirty_region): Free both utas.
(paint_iteration_idle): Handle both utas. This is the core of
two-pass scrolling: when a rectangle is pulled from the first
uta, add it to the second uta.
(scroll_to): Handle both utas.
2000-06-13 Anders Carlsson <andersca@gnu.org>
* gtkscrollframe.c (gtk_scroll_frame_button_press): Added mouse wheel
scrolling support.
2000-05-18 Federico Mena Quintero <federico@helixcode.com>
* preferences-dialog.glade: Use saner widget names; StudlyCaps are
evil!
* Makefile.am: Added the glade stuff.
* main.c (main): Initialize glade.
* window.c (settings_menu): New settings menu.
(preferences_cmd): Call preferences_dialog().
2000-05-08 Federico Mena Quintero <federico@helixcode.com>
* preferences.[ch]: New files with the preferences code.
* main.c (main): Call prefs_init().
* image-view.c (ImageViewPrivate): Added the per-view
configuration options for interpolation and checks.
(image_view_init): Initialize the configuration options.
(paint_iteration_idle): Use priv->interp_type.
(paint_rectangle): Compute the check color and size. Use the
user-specified dither mode.
(image_view_set_interp_type): New function.
(image_view_get_interp_type): New function.
(image_view_set_check_type): New function.
(image_view_get_check_type): New function.
(image_view_set_check_size): New function.
(image_view_get_check_size): New function.
(image_view_set_dither): New function.
(image_view_get_dither): New function.
(image_view_set_preferences): New function.
(image_view_set_scroll): New function.
(image_view_get_scroll): New function.
* window.c (set_mode): Set the image view parameters from the
preferences.
* commands.c (cmd_cb_full_screen): Likewise.
* window.c (window_key_press): Accept q for exiting the program.
* full-screen.c (full_screen_key_press): Also accept C-w and q for
exiting full-screen mode.
* Makefile.am (eog_SOURCES): Added preferences.[ch].
2000-05-05 Federico Mena Quintero <federico@helixcode.com>
* image-view.c: New "zoom_fit" class to ask the parent to zoom to
fit.
* ui-image.c (zoom_fit_cb): New handler for the "zoom_fit" signal
of the image view.
* window.c (set_mode): Give the focus to the image view widget.
* full-screen.c (full_screen_key_press): Doh, call the parent
class handler.
(full_screen_show): Give the focus to the image view widget.
* image-view.c (image_view_key_press): New handler for key
presses.
* commands.c (set_window_zoom): New function. Now we use this in
all other command callbacks.
(cmd_cb_zoom_fit): Use ui_image_zoom_fit().
(cmd_cb_full_screen): Use the FullScreen widget directly.
* full-screen.c (full_screen_set_image): Get the image view and
operate on it.
* window.c (window_open_image): Likewise.
Removed zooming functions.
* ui-image.c (ui_image_get_image_view): New function.
Removed image and zooming functions.
(ui_image_zoom_fit): Set the zoom directly on the image view.
2000-04-27 Darin Adler <darin@eazel.com>
* window.c (window_full_screen):
* Makefile.am:
Temporarily turned off the Full Screen item until
Federico gets a chance to check in full-screen.[ch].
2000-04-26 Federico Mena Quintero <federico@helixcode.com>
* full-screen.[ch]: New files for the full screen view mode.
* window.c (view_menu): Added a Full Screen item.
* commands.c (cmd_cb_full_screen): New command callback.
* window.c (window_full_screen): New function to launch a full
screen view.
* ui-image.c (ui_image_get_image): New function to query the image
that an image view scroller is displaying.
* image-view.c (paint_rectangle): Take in the interpolation type.
(pack_pixbuf): New function to pack an RGBA pixbuf into RGB
scanlines, while preserving the rowstride. This is to compensate
for the lack of gdk_draw_rgb_image_32_dithalign().
(paint_rectangle): Generate a 32-bit pixbuf to use the fast
scaling code and then use pack_pixbuf() before rendering use
GdkRGB. Sigh. For now this functionality is #ifdefed out so that
I can do proper benchmarks.
* Makefile.am (eog_SOURCES): Added full-screen.[ch] to the list of
sources.
2000-04-23 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (compute_scaled_size): Pass in a zoom value instead
of using the view's.
(compute_center_zoom_offsets): New function to compute the offsets
for the new zoom value so that they keep the image centered on the
view.
(scroll_to): Only update the offsets and do not paint if the
widget is not drawable.
(image_view_size_allocate): Re-center the offsets if the zoom
changed.
2000-04-21 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (scroll_to): New function to do proper scrolling of
the image view.
(drag_to): Use scroll_to().
(adjustment_changed_cb): Use scroll_to().
* uta.c (uta_copy_area): New function to do the equivalent of a
BitBlt on a microtile array. It is not perfect; see the FIXME for
details.
(copy_tile): Helper function for uta_copy_area().
(uta_ensure_size): Create a new uta with the proper size if the
specified uta is NULL.
(uta_add_rect): Special-case source tiles that are empty so as not
to add a bigger region than needed.
2000-04-20 Federico Mena Quintero <federico@helixcode.com>
* window.c (window_open_image): Add the image size to the window
title.
* image-view.c (drag_to): New function to drag the image to a
specified mouse position.
(image_view_button_press): Handle button presses by initiating the
drag.
(image_view_button_release): Handler button releases by
terminating the drag.
(image_view_motion): Handle motion events by dragging the image.
2000-04-14 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (image_view_unrealize): Doh, call the parent class
unrealize handler, not the unmap handler! Another cut&paste bug.
2000-04-13 Federico Mena Quintero <federico@helixcode.com>
* image-view.c (image_view_size_allocate): Set the correct size
for the window and recompute the adjustments.
(paint_rectangle): The offset of the image with respect to the
window is the negative of the adjustment offset.
(image_view_destroy): Disconnect from the adjustments.
(image_view_finalize): Unref the adjustments. Free the private
part of the ImageView structure here.
(image_view_set_image): Queue a resize. We still need to adjust
or reset the scroll offsets.
(image_view_set_zoom): Queue a resize. We still need to re-center
the zoom offsets.
(adjustment_changed_cb): As a temporary solution, repaint the
whole thing. I need to finish uta_copy_area() for uta.c to be
able to use gdk_window_copy_area() on the image window.
* uta.c (uta_add_rect): Fixed computation of microtile
coordinates. Fixed a bunch of stupid off-by-one errors.
(uta_remove_rect): Fixed computation of microtile coordinates and
clipping coordinates.
(uta_find_first_glom_rect): As a quick hack, use a bastardized
version of art_rect_list_from_uta() to find the first glommed
rectangle. This will be replaced with a more efficient function
in the future.
2000-04-03 Federico Mena Quintero <federico@helixcode.com>
* uta.c (uta_remove_rect): Finished implementing.
2000-04-03 Darin Adler <darin@eazel.com>
* uta.c (uta_remove_rect): Fixed typos that prevent it from
compiling. I guess this was a little unintentional April Fool's
joke from Federico :-)
2000-04-01 Federico Mena Quintero <federico@helixcode.com>
* uta.[ch]: New files with utilities for manipulating microtile
arrays.
* image-view.[ch]: New files with the new image view widget. We
don't use the canvas anymore due to GtkLayout's lack of diagonal
scrolling. This widget uses a fancy method to pull out dirty
rectangles from a microtile array, one by one, in the idle loop.
This lets the user preempt the drawing process, say, when
scrolling or zooming quickly.
* ui-image.c (UIImagePrivate): Removed the canvas-related fields.
Now we use an ImageView widget instead. Modified all the
functions to use this, and removed some old canvas-specific
functions.
* Makefile.am (eog_SOURCES): Added image-view.[ch] to the list of
sources. Removed image-item.[ch] and render.[ch]; we now use the
GdkPixbuf scaling functions instead of our own.
* Makefile.am (eog_SOURCES): Added uta.[ch] to the list of
sources.
* gnome-icon-item-factory.c (ii_factory_configure_item): Removed
obsolete x_set and y_set arguments from the pixbuf canvas item.
* *.[ch]: Use the gdk_pixbuf_get_*() accessor functions instead of
accessing the GdkPixbuf's fields directly.
1999-12-10 Federico Mena Quintero <federico@redhat.com>
* gnome-wrap-list.c (bm_compute_item_size): New helper function to
compute item and space sizes.
(bm_compute_layout): Use the above function; it will also be used
by other functions.
(adjustment_value_changed): Queue a scroll update when an
adjustment changes.
(bm_update): Renamed from bm_update_data(); now this handles both
scrolling and data updates for block mode.
1999-12-09 Federico Mena Quintero <federico@redhat.com>
* gnome-wrap-list.c (gnome_wrap_list_class_init): Register the
set_scroll_adjustments magic signal.
(set_scroll_adjustments): Handle adjustment changes.
* gnome-wrap-list.h (GnomeWrapListClass): Added the
set_scroll_adjustments signal.
* ui-image.c (ui_image_set_image): Fix off-by-one error when
setting the scroll region of the canvas.
* gnome-wrap-list.c (bm_update_data): Clear the items that are
past the end of the data.
1999-12-04 Federico Mena Quintero <federico@redhat.com>
* gnome-icon-caption.c (gnome_icon_caption_class_init): Register
the "request_text" signal.
1999-12-03 Federico Mena Quintero <federico@redhat.com>
* gnome-icon-caption.[ch]: Start of the new caption canvas item.
This is basically the old stinky GnomeIconTextItem with a saner API.
1999-12-01 Federico Mena Quintero <federico@redhat.com>
* gnome-wrap-list.c (bm_ensure_array_size): New function to ensure
that the item array has the correct size and layout information.
(bm_update_range): New function to update a range of displayed
items.
(bm_update_data): Moved a lot of functionality to the above
functions to make it clearer.
1999-11-30 Federico Mena Quintero <federico@redhat.com>
* gnome-wrap-list.c (bm_compute_layout): Take the border width and
style border thickness into account. Also, fix the computation
for the number of items that fit across the minor dimension.
Also, adjust the scroll region.
(bm_adjust_scroll_region): New function to set the scroll region
in block mode.
(WrapListPrivate): Added fields for the signal IDs of the
connections to the models.
(model_set): Disconnect from the old model's signals and connect
to the new model's ones.
(selection_model_set): Likewise.
(gnome_wrap_list_set_position_model): Likewise.
(model_interval_changed): Implemented handler.
(model_interval_added): Implemented handler.
(model_interval_removed): Implemented handler.
* gnome-list-view.c (gnome_list_view_class_init): The model_set,
selection_model_set, and list_item_factory_set signals now pass in
the old model as well so that derived classes can disconnect from
them properly.
(gnome_list_view_set_model): Pass in the old model to the signal
and unref it afterwards.
(gnome_list_view_set_selection_model): Likewise.
(gnome_list_view_set_list_item_factory): Likewise.
* gnome-list-model.c (gnome_list_model_interval_changed): New
function to emit the signal.
(gnome_list_model_interval_added): Likewise.
(gnome_list_model_interval_changed): Likewise.
1999-11-29 Federico Mena Quintero <federico@redhat.com>
* window.c (window_open_image): Do not prepend "Eye of Gnome" to
the title of the window if we have a filename, to be friendlier to
small taskbars.
1999-11-21 Federico Mena Quintero <federico@redhat.com>
* ui-image.c (ui_image_set_image): Do not set the window title
here, especially not with a gtk_widget_get_toplevel() hack. An
UIImage object may not only be the content area of a toplevel
window; it may appear as a little preview pane in the future as
well.
* window.c (window_open_image): Set the window title to the image
filename here. Revert to the default title if the image could not
be loaded.
* image.c (image_load): Free the previous filename if it exists.
Also, NULLify the filename field if the file could not be loaded.
1999-11-19 Miguel de Icaza <miguel@gnu.org>
* ui-image.c (ui_image_set_image): set the title here.
* image.c (image_load): Record file name here.
1999-11-18 Federico Mena Quintero <federico@redhat.com>
* testicon.c: New test program for the icon view widget.
* gnome-wrap-list.c (bm_update_data): Set the translation affine
of the items.
* gnome-icon-item-factory.c (ii_factory_configure_item): Added a
missing NULL terminator.
(ii_factory_create_item): Do not hide the image and the caption.
* gnome-icon-view.[ch]: New files with the icon view widget.
* gnome-list-view.c (gnome_list_view_class_init): Per Owen's
suggestion, changed the signals that were used to set the
different models to just signals that notify when the models have
been set. Derived classes can use these to queue updates or
whatever.
(gnome_list_view_set_model): New function, for derived classes
only, to set a list view's model.
(gnome_list_view_set_selection_model): Changed to the above
architecture.
(gnome_list_view_set_list_item_factory): New function, likewise.
* gnome-wrap-list.c (model_set): Implemented.
(selection_model_set): Implemented.
(list_item_factory_set): Implemented.
(gnome_wrap_list_set_item_size): Implemented.
(gnome_wrap_list_set_row_spacing): Implemented.
(gnome_wrap_list_set_col_spacing): Implemented.
(bm_update_data): Implemented delayed updates for when the data
models change.
(WrapListPrivate): Added a shadow_type parameter.
(gnome_wrap_list_size_request): Implemented.
(gnome_wrap_list_size_allocate): Implemented.
(gnome_wrap_list_set_shadow_type): New function to set the shadow type.
(gnome_wrap_list_destroy): Unparent/destroy the canvas. Unref the
position list model.
(gnome_wrap_list_map): Implemented.
(gnome_wrap_list_unmap): Implemented.
(gnome_wrap_list_draw): Implemented.
(gnome_wrap_list_expose): Implemented.
1999-11-16 Federico Mena Quintero <federico@redhat.com>
* gnome-wrap-list.c (bm_compute_layout): New function to compute
layout information for block mode.
(gnome_wrap_list_init): Provide semi-sane defaults for the item size.
1999-11-12 Federico Mena Quintero <federico@redhat.com>
* gnome-wrap-list.c (gnome_wrap_list_forall): Implemented.
(gnome_wrap_list_set_use_unit_scrolling): New function to set
whether to use block scrolling or abritrary offsets.
(gnome_wrap_list_get_use_unit_scrolling): Getter for the above
property.
(BlockModeInfo): New structure to describe automatic layout mode.
* gnome-position-list-model.c
(gnome_position_list_model_get_position): Modified so that it
returns a boolean value to say whether an item has a set position
or not.
(gnome_position_list_model_set_position): New function to set the
position of an item. Added a "set_position" signal to the class.
1999-11-09 Federico Mena Quintero <federico@redhat.com>
* gnome-icon-item-factory.c (ii_factory_configure_item):
Implemented the ::configure_item() method, now that we have
GnomeCanvasPixbuf.
(gnome_icon_item_factory_new): New function to create an icon item
factory.
(gnome_icon_item_factory_init): Create a stipple pattern for the
selection and focus rectangles.
The ChangeLog for the rest of the icon list framework starts here.
1999-10-20 Federico Mena Quintero <federico@redhat.com>
Upgrade to gdk-pixbuf 0.3:
* *.[ch]: Changed GdkPixBuf to GdkPixbuf everywhere.
* image.c (image_load): Use gdk_pixbuf_new_from_file().
1999-09-28 Federico Mena Quintero <federico@redhat.com>
* stock/stock-zoom-1.xpm: Improve the appearance of the icon's
numbers.
* 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.
* 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.
* main.c (main): Open the images specified in the command line.
* window.c (window_open_image): Renamed from open_image() and made
public.
(window_open_image_dialog): Renamed from open_cmd() and made
public.
(window_close): Renamed from close_window() and made public.
(file_menu): Use the callbacks in commands.h.
* 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.
* ui-image.c (ui_image_set_image): Doh. Unref the correct image
(typo fix).
* 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.
* 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.
* Makefile.am (eog_SOURCES): Added image.c, ui-image.[ch] to the
list of sources.
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.
1999-09-15 Federico Mena Quintero <federico@redhat.com>
* window.c (window_init): Add the window to the window list.
(window_destroy): Remove the window from the window list.
* window.c (window_delete): Confirm before closing.
(close_cmd): Confirm before closing.
(exit_cmd): Perform confirmation before exiting.
1999-09-15 Federico Mena Quintero <federico@redhat.com>
* window.c (about_cmd): Finished the about box.
(window_construct): Added a constructor. Create the menus.
(window_new): New function.
* Started the ChangeLog.
|