ChangeLog-20000414 89.4 KB
Newer Older
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
2000-01-19  Darin Adler  <darin@eazel.com>

	Icon positions are now written out when you drag an icon,
	and read in when you visit a directory. But the code then
	immediately re-lays out the icons, so the position is lost!

	* src/file-manager/fm-directory-view-icons.c:
	(fm_directory_view_icons_icon_moved_cb):
	(fm_directory_view_icons_initialize): (add_container_icon): Save
	icon position when an icon is moved. Get icon position when an
	icon is first created.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_get_metadata_from_node):
	(nautilus_directory_get_metadata):
	(nautilus_directory_create_metafile_tree_root):
	(nautilus_directory_get_metadata):
	(nautilus_directory_set_metadata):
	(nautilus_directory_get_file_metadata):
	(nautilus_directory_set_file_metadata): Added the routines to get
	and set metadata for individual files.

	* libnautilus/nautilus-string.h: libnautilus/nautilus-string.c:
	(nautilus_eat_strcmp): (nautilus_string_to_int):
	(nautilus_eat_string_to_int): Made new string functions that free
	the existing strings, and a function to convert an int to a
	string.

	* libnautilus/gnome-icon-container.h:
	libnautilus/gnome-icon-container.c: (move_icon): (class_init):
	(handle_icon_button_press): Added context_click_background and
	icon_moved signals, and renamed context_click to
	context_click_icon.

	* configure.in: Turned -Wunused back on. I had to turn -W off,
	but I think it's worth it.

38
39
40
41
42
43
44
45
46
47
48
2000-01-19  John Sullivan  <sullivan@eazel.com>

	* src/file-manager/fm-directory-view.c:
	Added #include <libgnomevfs/gnome-vfs-file-info.h>
	(fm_directory_view_populate), (display_pending_entries):
	Bump refcount on file info before adding it to directory.
	(fm_directory_view_load_uri): Destroy directory list
	before setting it to NULL. With previous change, this
	should prevent leaking GnomeVFSFileInfos and their
	lists.

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
2000-01-19  Darin Adler  <darin@eazel.com>

	* libnautilus/nautilus-directory.c: (nautilus_directory_finalize):
	(nautilus_directory_try_to_read_metafile):
	(nautilus_directory_read_metafile):
	(nautilus_directory_try_to_write_metafile):
	(nautilus_directory_write_metafile):
	(nautilus_directory_construct_alternate_metafile_uri):
	(nautilus_directory_new): After Andy explained his change to me, I
	realized that it would always write the metafile in the alternate
	place if there was no pre-existing metafile. So I changed the
	logic. The new rule is: read the metafile from the alternate
	location first. If we find it there, write it back
	there. Otherwise, try to write in the directory itself. If that
	fails, write it in the alternate location instead.

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_get_metadata): Allow get_metadata on a NULL
	NautilusDirectory and return NULL for data.

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
2000-01-19  Darin Adler  <darin@eazel.com>

	Allow changing the background of the icon view by dropping colors
	on the icon view.

	* libnautilus/gnome-icon-container-dnd.h:
	libnautilus/gnome-icon-container-dnd.c:
	(gnome_icon_container_position_shadow): (drag_data_received_cb):
	(gnome_icon_container_ensure_drag_data): (drag_motion_cb):
	(drag_drop_cb): (gnome_icon_container_receive_dropped_icons):
	(gnome_icon_container_free_drag_data): (drag_leave_cb): Added
	support for receiving dropped colors to change the background of a
	GnomeIconContainer.

	* src/file-manager/fm-directory-view-icons.c:
	(fm_directory_view_icons_initialize_class):
	(fm_directory_view_icons_clear):
	(fm_directory_view_icons_background_changed_cb): Added code to
	load and save the background color from metadata.

	* libnautilus/gdk-extensions.c: (nautilus_gradient_new): Changed
	nautilus_gradient_new to handle NULLs in the same way that the
	rest of the gradient functions do instead of NULL being an illegal
	input value.

	* src/file-manager/fm-directory-view.h:
	src/file-manager/fm-directory-view.c:
	(fm_directory_view_initialize): (fm_directory_view_destroy):
	(fm_directory_view_get_model): (fm_directory_view_load_uri): Added
	a NautilusDirectory object to each directory view, accessed by
	subclasses with a call to fm_directory_view_get_model.

	* libnautilus/nautilus-gtk-extensions.h:
	libnautilus/nautilus-gtk-extensions.c:
	(gnome_icon_container_dropped_icon_feedback):
	(nautilus_gdk_selection_data_copy_deep): Added deep versions of
	these GtkSelectionData functions.

	* libnautilus/nautilus-gtk-macros.h:
	(NAUTILUS_DEFINE_GET_TYPE_FUNCTION):
	(NAUTILUS_DEFINE_CLASS_BOILERPLATE): Added definition and
	initialization of the parent_class global to
	NAUTILUS_DEFINE_GET_TYPE_FUNCTION and renamed it to
	NAUTILUS_DEFINE_CLASS_BOILERPLATE.

	* libnautilus/nautilus-background-canvas-group:
	(nautilus_background_canvas_group_initialize_class):
	libnautilus/nautilus-background.c:
	(nautilus_background_initialize_class):
	libnautilus/nautilus-directory.c:
	(nautilus_directory_initialize_class): src/ntl-index-panel.c:
	(nautilus_index_panel_initialize_class):
	src/file-manager/fm-directory-view-icons.c:
	(fm_directory_view_icons_initialize_class):
	src/file-manager/fm-directory-view-list.c:
	(fm_directory_view_list_initialize_class):
	src/file-manager/fm-directory-view.c:
	(fm_directory_view_initialize_class): Take advantage of the new
	NAUTILUS_DEFINE_CLASS_BOILERPLATE and get rid of existing code to
	set up parent_class.

	* libnautilus/gnome-icon-container-dnd.h:
	libnautilus/gnome-icon-container-dnd.c:
	libnautilus/gnome-icon-container-layout.h:
	libnautilus/gnome-icon-container-layout.c:
	libnautilus/gnome-icon-container.c: Minimized includes.

136
137
138
139
140
141
142
143
2000-01-18  Andy Hertzfeld <andy@eazel.com>

	* libnautilus/gnome-icon-container.c
	made icon centered in cell by setting "x_set" pixbuf property so it listens to our offset
	also, adjusted x_offset constant
	* libnautilus/gnome-icon-container-dnd.c
	made shadow be centered properly by taking difference between cellwidth and iconwidth into account
	
144
145
146
147
148
149
150
151
152
2000-01-18  Ettore Perazzoli  <ettore@helixcode.com>

	* src/file-manager/dfos-xfer.c (xfer_info_destroy): Removed `#if
	0'ed out function.

	* src/ntl-uri-map.c (nautilus_navinfo_new): Use
	`gnome_vfs_file_info_unref()' instead of
	`gnome_vfs_file_info_destroy()'.

153
154
155
156
157
158
159
160
2000-01-18  Andy Hertzfeld <andy@eazel.com>

        * libnautilus/gnome-icon-container-private.h:
        added "button_down_time" field to private data structure
        * libnautilus/gnome-icon-container.c
        made it not activate objects if the button was held down too long
        by remember the mouse down time and comparing it with the up time

161
162
163
164
165
166
167
2000-01-18  John Sullivan <sullivan@eazel.com>

	* src/file-manager/fm-directory-view.c:
	(fm_directory_view_load_uri): Set directory list to NULL
	but don't destroy it; this fixes crash entering a directory
	and then going up. Will ask Ettore about real fix.

168
169
170
171
172
173
174
175
2000-01-18  John Sullivan <sullivan@eazel.com>

	* src/ntl-window-msgs.c:
	(nautilus_window_refresh_title): Sets the window title to
	Nautilus: x, where x is short name of current location.
	(nautilus_window_change_location_internal): Call
	nautilus_window_refresh_title.

176
177
178
179
180
181
2000-01-18  John Sullivan <sullivan@eazel.com>

	* src/file-manager/fm-directory-view.c:
	(display_selection_info): Call selection "items" rather than
	"files" because users distinguish directories from files.

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
2000-01-18  John Sullivan <sullivan@eazel.com>

	* src/file-manager/fm-directory-view.h:
	(enum _FMDirectoryViewSortType): added FM_DIRECTORY_VIEW_SORT_NONE
	and FM_DIRECTORY_VIEW_SORT_BYMTIME
	(fm_directory_view_sort): added reverse_sort parameter.
	(nautilus_file_date_as_string):
	(nautilus_file_size_as_string): Changed parameter for these two
	functions to be GnomeVFSFileInfo so they can handle special cases better.
	(nautilus_file_type_as_string): New function
	
	* src/file-manager/fm-directory-view.c
	(stop_load): Removed code resetting directory_list and current_position.
	This was the wrong place for it, and resetting directory_list was leaking.
	(directory_load_cb): Changed commented assignment to assert.
	(fm_directory_view_load_uri): Reset directory_list (without leaking old
	value) and current_position here.
	(fm_directory_view_sort): Pass through new reverse_sort parameter to
	gnome_vfs_directory_view_sort; add new case for 
	FM_DIRECTORY_VIEW_SORT_BYMTIME; don't put directories first when sorting
	by name.
	(nautilus_file_date_as_string): Now takes a GnomeVFSFileInfo pointer
	instead of a time_t (assumes mtime, with comment explaining why).
	(nautilus_file_size_as_string): Now takes a GnomeVFSFileInfo pointer
	instead of a size; uses this to special-case "--" for directory size.
	(nautilus_file_type_as_string): New function, special-cases directories
	to return "directory", otherwise returns mime_type.
	
	* src/file-manager/fm-directory-view-list.h
	Added private details structure to FMDirectoryViewList.

	* src/file-manager/fm-directory-view-list.c
	Added _FMDirectoryViewListDetails struct, containing sort_type and
	sort_reversed.
	(fm_directory_view_initialize): initialize details struct.
	(column_clicked_cb): New function, sorts list by clicked column.
	If list already sorted by that column, reverses sort. Still need
	visual indicator of sort direction.
	(create_flist): Added Type column, tweaked column widths, added
	signal connection for "click_column"
	(add_to_flist): now passes GnomeVFSFileInfo to 
	nautilus_file_size_as_string and nautilus_file_date_as_string;
	uses new nautilus_file_type_as_string for type column.

Andy Hertzfeld's avatar
Andy Hertzfeld committed
226
227
2000-01-18  Andy Hertzfeld <andy@eazel.com>

228
229
230
231
        * libnautilus/nautilus-directory:
        * made reading metafile from directory where we don't have write
        permissions work by changing error-check to look in common place on
        any error instead of just access_denied.
Andy Hertzfeld's avatar
Andy Hertzfeld committed
232
        
233
234
235
2000-01-18  Andy Hertzfeld <andy@eazel.com>

        * libnautilus/nautilus-directory.c:
Andy Hertzfeld's avatar
Andy Hertzfeld committed
236
237
        fixed bug caused by Elliot where he used alloca but forgot to remove g_free
        
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
2000-01-18  Elliot Lee  <sopwith@redhat.com>

	* libnautilus/nautilus-gtk-macros.h: Since the prototypes for
	GtkObjectInitFunc and GtkClassInitFunc just have a 'gpointer' for the args,
	cast the given values to these function types, so that people can use the actual
	pointer types as arguments without receiving a warning.

	* src/ntl-index-panel.c: Change to match. Also set
	object_klass->destroy & object_klass->finalize to point to our
	implementation. Also remove unused variables
	(nautilus_index_panel_initialize,
	nautilus_index_panel_set_up_label).

	* libnautilus/nautilus-background.c, src/ntl-window-msgs.c,
	src/ntl-window.c, src/file-manager/fm-directory-icons.c: Remove
	unused variables.

	* src/ntl-window.h: Add a variable (unused) for future handling of content view loading.

	* libnautilus/libnautilus.h: Add an interim g_alloca.

	* libnautilus/nautilus-directory.c: Clean up a bit further, by
	removing the need for another if(), and using g_alloca instead of
	g_malloc.

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
2000-01-18  Darin Adler  <darin@eazel.com>

	* libnautilus/nautilus-directory.c:
	(nautilus_directory_read_metafile):
	(nautilus_directory_try_to_read_metafile):
	(nautilus_directory_write_metafile):
	(nautilus_directory_try_to_write_metafile):
	(nautilus_directory_switch_to_alternate_metafile_uri):
	(nautilus_directory_escape_slashes):
	(nautilus_make_directory_and_parents): Added first cut at code to
	put metafiles in the user's home directory if the directory is not
	accessible and you can't read and write a metafile in the
	directory itself. We'll have to refine this later to handle cases
	where you end up with two metafiles.

	* libnautilus/Makefile.am: libnautilus/nautilus-debug.h:
	libnautilus/nautilus-debug.c: Took trick for getting into the
	debugger and put it into a public header file so it can be used
	outside of the nautilus executable.

	* src/ntl-main.c: (stop_in_debugger):
	(nautilus_stop_after_default_log_handler): (main): Use the new
	calls from libnautilus to set up the drop into debugger for
	criticals and warnings.

	* src/file-manager/fm-main.c: (main): Minimized includes and used
	the new calls from libnautilus to set up the drop into debugger
	for criticals and warnings.

	* src/ntl-uri-map.c: (nautilus_navinfo_add_mapping):
	src/ntl-window.c: (nautilus_window_constructed):
	src/file-manager/fm-directory-view.c:
	(fm_directory_view_initialize): (fm_directory_view_destroy):
	(notify_location_change_cb): (stop_location_change_cb):
	(fm_directory_view_sort): Removed some messages that aren't so
	useful.

	* libnautilus/ntl-view-frame.h: Minimized includes.
	* libnautilus/ntl-view-frame.c: Include "ntl-view-frame.h" first
	so it tests to see that it has sufficient includes in it.

	* src/ntl-view.c: (nautilus_view_load_client): Changed function so
	that NULL for an iid is allowed and simply results in a failed
	load instead of being illegal.

	* src/ntl-window-msgs.c:
	(nautilus_window_change_location_internal): src/ntl-window.c:
	(nautilus_window_up): Got rid of calls to gnome_vfs_uri_destroy;
	use gnome_vfs_uri_unref instead since it's safer and Federico is
	getting rid of gnome_vfs_uri_destroy.

	* src/file-manager/fm-directory-view-icons.h:
	src/file-manager/fm-directory-view-icons.c:
	(fm_directory_view_icons_new):
	src/file-manager/fm-directory-view-list.h:
	src/file-manager/fm-directory-view-list.c:
	(fm_directory_view_list_new):
	src/file-manager/fm-directory-view.h:
	src/file-manager/fm-directory-view.c: (fm_directory_view_new):
	Minimized includes and got rid of the unused _new functions.

	* libnautilus/nautilus-directory.h: Added a missing 2000 copyright
	date.

327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
2000-01-17  John Sullivan  <sullivan@eazel.com>
	First steps towards making the list view non-degenerate.

	* src/file-manager/fm-directory-view.h:
	* src/file-manager/fm-directory-view.c:
	(nautilus_file_date_as_string): New function, returns string suitable
	for displaying in a list view column.
	(nautilus_file_size_as_string): New function, calls newly-publicized
	gnome_vfs_file_size_to_string.
	(display_selection_info): Now calls gnome_vfs_file_size_to_string
	instead of redoing the string-creation code here.

	* src/file-manager/fm-directory-view-list.c
	(create_flist): Creates new columns for icon, size, and mod date.
	(add_to_flist): Fills columns for size & mod date. Icon column
	is empty for the moment. Columns do not yet sort.

344
345
346
347
348
349
350
351
352
353
2000-01-17      Andy Hertzfeld <andy@eazel.com>

        *libnautilus/gnome-icon-container-dnd.c:
        made dragging work right by using gdk_pixbuf_render_pixmap_and_mask
        to make a pixmap and mask to pass to the gtk dragging machinery
        *libnautilus/gnome-icon-container.c:
        changed xoffset constant for the icon mode positioning to make the
        feedback box line up with the icon.
                     
2000-01-16	Andy Hertzfeld <andy@eazel.com>
354
355

	*libnautilus/gnome-icon-container-dnd.c:
356
357
        made dragging use an image of the canvas item dragged
        still disabled, though, because it's not handling the mask yet
358
    
359
360
361
362
363
364
365
366
367
368
369
370
371
2000-01-16	Andy Hertzfeld <andy@eazel.com>

	*libnautilus/gnome-icon-container-private.h:
	added "single_click_mode" boolean
	
	*libnautilus/gnome-icon-container.h
	made single-click open optionally work by adding code in button_release_event to activate the icon if appropriate
	enabled single-click mode by default
	
	*libnautilus/gnome-icon-container-dnd.c
	made dragging to desktop and else work by cleaning up code in set_uri_list_selection
	did work toward better dragging feedback using an image but didn't finish that yet
	
372
373
374
375
376
377
378
379
380
381
2000-01-15	Andy Hertzfeld <andy@eazel.com>

	*libnautilus/gnome-icon-container-dnd.c:
	made dragging files within a window actually work graphically, and set the stage for dragging between windows
	made drag_leave_cb no longer delete the selection_list
	made drag_data_received_cb delete selection if present instead of asserting it's gone
	made drag_drop_cb use the selection_list to determine the directory we're dragging from,
	if it's the same, move within the window, otherwise copy between (coming soon)
	didn't update positions in the metafile yet
	
382
383
384
385
386
387
2000-01-14  John Sullivan  <sullivan@eazel.com>

	* src/file-manager/fm-directory-view.c:
	(display_selection_info):
	Fixed a killer typo that caused selection to crash.

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
2000-01-14  John Sullivan  <sullivan@eazel.com>

	Finished refactoring FMDirectoryView and subclasses. I
	don't plan any more major reworking on these files, so
	feel free to change things without fear of stomping on
	me.

	* src/file-manager/fm-directory-view.c:
	* src/file-manager/fm-directory-view.h:
	* src/file-manager/fm-directory-view-icons.c:
	* src/file-manager/fm-directory-view-icons.h:
	* src/file-manager/fm-directory-view-list.c:
	* src/file-manager/fm-directory-view-list.h:
 	Moved icon_layout and icons_not_in_layout fields from
 	FMDirectoryView to FMDirectoryViewIcons (where they hide
 	inside a details structure in fm-directory-view-icons.c)
 	Commented .h files and all public functions in .c files.
 	Removed unnecessary #includes.
 	Changed signatures on many static functions in subclasses
 	to take subclass type instead of superclass type.
 	(display_selection_info_idle_cb):
 	(fm_directory_view_get_selection): 
 	(fm_directory_view_icons_get_selection):
 	(fm_directory_view_list_get_selection):
 	(fm_directory_view_notify_selection_changed):
 	New functions used to handle subclasses telling
 	superclass about the selection, so superclass can
 	display info about it.
 	(display_icon_container_selection_info_idle_cb):
 	(display_flist_selection_info_idle_cb): Removed these
 	old functions in favor of new cleaner mechanism.
 	(flist_activate_cb), (icon_container_activate_cb): Moved
 	common code into new superclass function...
 	(fm_directory_view_activate_entry): New home of that common
 	code.

	* src/file-manager/fm-directory-view.c:
	* src/file-manager/fm-directory-view.h:
 	Moved remaining fields of FMDirectoryView inside a private 
 	details structure so they can change without affecting clients.
 	(fm_directory_view_get_uri): (fm_directory_view_get_view_frame): 
 	New functions to use instead of peeking at structure directly.
 	(init): (class_init): (fm_directory_view_get_type): Renamed
 	the former two functions and removed the latter while
 	deploying NAUTILUS_DEFINE_GET_TYPE_FUNCTION macro.
		
	* src/file-manager/fm-main.c:
	(make_obj): Use fm_directory_view_get_view_frame() where it
	had been peeking at structure directly.

438
439
440
441
442
443
444
445
446
447
2000-01-14  Darin Adler  <darin@eazel.com>

	Fixed our handling of warnings and criticals.

	* src/ntl-main.c: Added new functions that stop in the debugger
	when you hit a g_warning or a critical error, only if the
	environment variable NAUTILUS_DEBUG is set. This is better than
	the way the old code made everything fatal, since it doesn't do
	anything if the debugger isn't running.

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
2000-01-14  Darin Adler  <darin@eazel.com>

	Turned on gradients for backgrounds.
	
	* src/ntl-index-panel.c:
	(nautilus_index_panel_drag_data_received): Use the new
	accept_dropped_color function in NautilusBackground instead of
	code in here. (nautilus_index_panel_background_changed):
	(nautilus_index_panel_set_up_info): Save background to metadata
	when the NautilusBackground object emits the changed signal.

	* libnautilus/nautilus-background.h:
	libnautilus/nautilus-background.c:
	(nautilus_background_accept_dropped_color): Moved logic about
	dropping a color coupon to change the background into the
	NautilusBackground class. This includes a first cut at the rules
	about gradients.

	* libnautilus/nautilus-background.c:
	(nautilus_background_get_color): Implemented this missing
	function. It's used by the code in index panel now to save the
	current background.

	* libnautilus/nautilus-background.c:
	(nautilus_background_draw_flat_box): Implemented gradient fills
	through the GtkStyle subclass.

	* src/ntl-main.c: (main): Made criticals and warnings be always
	fatal. Next step is to make them drop into the debugger, but not
	result in a core dump if the debugger is not running.
	
479
480
481
482
483
484
2000-01-14  Darin Adler  <darin@eazel.com>

	* src/ntl-index-panel.c: (nautilus_index_panel_set_up_label):
	Changed code to use the new gnome_vfs_uri_extract_short_name
	instead of its own private function.

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
2000-01-14  Darin Adler  <darin@eazel.com>

	First cut at some actual saving of metadata.
	Neither the interface nor the implementation is great yet.
	But it's a start.

	* libnautilus/Makefile.am:
	libnautilus/nautilus-directory.h:
	libnautilus/nautilus-directory.c:
	libnautilus/nautilus-lib-self-check-functions.h:
	libnautilus/nautilus-lib-self-check-functions.c:
	src/file-manager/Makefile.am:
	src/file-manager/fm-directory-protected.h:
	src/file-manager/fm-directory.h:
	src/file-manager/fm-directory.c:
	src/file-manager/fm-vfs-directory.h:
	src/file-manager/fm-vfs-directory.c:
	Moved the old FMDirectory class into the library and named it
	NautilusDirectory. Added functions for reading and writing
	metadata.

	* src/ntl-index-panel.c: Added the code to save the index panel's
	background color in metadata.
	
	* libnautilus/Makefile.am: Added gnome-vfs and gnome-xml,
	since the new code uses them.

	* libnautilus/nautilus-self-checks.h:
	libnautilus/nautilus-lib-self-check-functions.h:
	libnautilus/nautilus-lib-self-check-functions.c:
	src/nautilus-self-check-functions.h:
	src/nautilus-self-check-functions.c:
	Added macros to the self-check framework so the list of self check
	functions appears in exactly one place for each directory/module.

	* src/ntl-index-panel.h: src/ntl-index-panel.c: Moved the fields
	of the index panel inside a private details structure so they can
	change without affecting clients.

	* libnautilus/nautilus-background.c: Just some reformatting.

526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
2000-01-13  John Sullivan  <sullivan@eazel.com>

	More work pushing code from FMDirectoryView into subclasses.
	Almost done now.

	* src/file-manager/fm-directory-view.h:
	Removed enum _FMDirectoryViewMode and its typedef.
	Removed field entries_to_display.
	Removed transition section holding function prototypes that
	were on their way into subclasses.
	(fm_directory_view_is_valid_mode): Removed.
	(fm_directory_view_get_mode): Removed.
	(fm_directory_view_set_mode): Removed.

	(fm_directory_view_begin_adding_entries):  New function & signal.
	(fm_directory_view_add_entry):  New function & signal.
	(fm_directory_view_done_adding_entries):  New function & signal.
	(fm_directory_view_done_sorting_entries):  New function & signal.
	(fm_directory_view_begin_loading): New function & signal.

	(fm_directory_view_display_selection_info): Newly exposed function.

548
	* src/file-manager/fm-directory-view.c:
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
	Removed some now-unnecessary #includes.
	Added constants for new signals to enum.
	Removed global variable for icon cache in favor of already-extant
	fm_get_current_icon_cache().
	Removed all references to entries_to_display.
	(display_selection_info): Renamed to 
	fm_directory_view_display_selection_info now that it's public.
	(view_has_icon_container): Removed.
	(get_icon_container): Moved into subclass FMDirectoryViewIcons.
	(add_to_icon_container): Moved into subclass FMDirectoryViewIcons.
	(load_icon_container): Moved into subclass FMDirectoryViewIcons.
	(display_icons_not_in_layout): Moved into subclass FMDirectoryViewIcons.
	(setup_base_uri): Moved into subclass FMDirectoryViewIcons (and renamed
	to set_up_base_uri).
	(view_has_flist): Removed.
	(get_flist): Moved into subclass FMDirectoryViewList.
	(add_to_flist): Moved into subclass FMDirectoryViewList.
	(class_init): Signal initialization code for begin_adding_entries,
	add_entry, done_adding_entries, done_sorting_entries, and begin_loading.
	(init): Removed mode-setting line.
	(display_pending_entries): Replaced the bulk of this function with three
	new signals: begin_adding_entries, add_entry, done_adding_entries. The
	loop structure and GnomeVFSFileInfo retrieving part remains.
	(directory_load_cb): Deployed new signal begin_loading where setup_base_uri
	used to be.
	(fm_directory_view_is_valid_mode): Removed.
	(fm_directory_view_get_mode): Removed.
	(fm_directory_view_set_mode): Removed.
	(fm_directory_view_begin_adding_entries): New function, emits signal.
	(fm_directory_view_add_entry): New function, emits signal.
	(fm_directory_view_done_adding_entries): New function, emits signal.
	(fm_directory_view_done_sorting_entries): New function, emits signal.
	(fm_directory_view_begin_loading): New function, emits signal.
	(fm_directory_view_sort): Replaced some icon-container-specific
	code with fm_directory_view_done_sorting_entries().

585
	* src/file-manager/fm-directory-view-icons.c:
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
	(fm_directory_view_icons_initialize_class): Wired up signal handlers
	for add_entry, done_adding_entries, done_sorting_entries, and begin_loading.
	(fm_directory_view_icons_initialize): Removed set_mode call.
	(display_icons_not_in_layout): Moved here from superclass FMDirectoryView.
	(get_icon_container): Moved here from superclass FMDirectoryView.
	(add_to_icon_container): Moved here from superclass FMDirectoryView.
	(load_icon_container): Moved here from superclass FMDirectoryView.
	(set_up_base_uri): Moved here from superclass FMDirectoryView.
	(fm_directory_view_icons_add_entry): New signal handler function, code 
	taken and simplified from superclass FMDirectoryView.
	(fm_directory_view_icons_done_adding_entries): New signal handler 
	function, code taken and simplified from superclass FMDirectoryView.
	(fm_directory_view_icons_done_sorting_entries): New signal handler 
	function, code taken and simplified from superclass FMDirectoryView.
	(fm_directory_view_icons_begin_loading): New signal handler function, 
	code taken and simplified from superclass FMDirectoryView.
	
603
	* src/file-manager/fm-directory-view-list.c:
604
605
606
607
608
609
610
611
612
613
614
615
	(fm_directory_view_list_initialize_class): Wired up signal handlers
	for begin_adding_entries, add_entry, and done_adding_entries
	(fm_directory_view_list_initialize): Removed set_mode call.
	(get_flist): Moved here from superclass FMDirectoryView.
	(add_to_flist): Moved here from superclass FMDirectoryView.
	(fm_directory_view_list_begin_adding_entries): New signal handler 
	function, code taken and simplified from superclass FMDirectoryView.
	(fm_directory_view_list_add_entry): New signal handler function, code 
	taken and simplified from superclass FMDirectoryView.
	(fm_directory_view_list_done_adding_entries): New signal handler 
	function, code taken and simplified from superclass FMDirectoryView.	

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
2000-01-13  John Sullivan  <sullivan@eazel.com>

	* libnautilus/nautilus-gtk-macros.h: Defined macros
	for use when a signal must be overridden by subclasses.
	* src/file-manager/fm-directory-view.c: Deployed these
	new macros for the "clear" signal. 
	NAUTILUS_IMPLEMENT_MUST_OVERRIDE_SIGNAL is outside any 
	function, and
	(class_init): NAUTILUS_MUST_OVERRIDE_SIGNAL is in here.
	(fm_directory_view_real_clear): Eliminated this in favor
	of the above macros.
	* src/file-manager/fm-directory-view-icons.c:   
	(fm_directory_view_icons_get_type): Replaced function with
	NAUTILUS_DEFINE_GET_TYPE_FUNCTION macro.
	(fm_directory_view_icons_init): Renamed to 
	fm_directory_view_icons_initialize and standardized parameters 
	to work with NAUTILUS_DEFINE_GET_TYPE_FUNCTION macro.
	(fm_directory_view_icons_class_init): Renamed to 
	fm_directory_view_icons_initialize_class and standardized 
	parameters to work with NAUTILUS_DEFINE_GET_TYPE_FUNCTION macro.
	(fm_directory_view_icons_destroy): Deployed
	NAUTILUS_CALL_PARENT_CLASS macro.
	* src/file-manager/fm-directory-view-list.c:   
	(fm_directory_view_list_get_type): Replaced function with
	NAUTILUS_DEFINE_GET_TYPE_FUNCTION macro.
	(fm_directory_view_list_init): Renamed to 
	fm_directory_view_list_initialize and standardized parameters 
	to work with NAUTILUS_DEFINE_GET_TYPE_FUNCTION macro.
	(fm_directory_view_list_class_init): Renamed to 
	fm_directory_view_list_initialize_class and standardized 
	parameters to work with NAUTILUS_DEFINE_GET_TYPE_FUNCTION macro.
	(fm_directory_view_list_destroy): Deployed
	NAUTILUS_CALL_PARENT_CLASS macro.
	
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
2000-01-12  John Sullivan  <sullivan@eazel.com>

	More work at pushing appropriate fm_directory_view code
	into subclasses.

	* src/file-manager/fm-directory-view.c:
	(class_init): Register "clear" signal, make 
	fm_directory_view_real_clear be default handler.
	(fm_directory_view_real_clear): New function, does
	nothing but complain when it's called. (I'm going to
	replace this with a debug-only mechanism soon.)
	(fm_directory_view_clear): New function, emits "clear" signal.
	(fm_directory_view_load_uri): Replaced "if icons clear this way,
	if list clear that way" code with call to fm_directory_view_clear.
	(mode_uses_flist): Eliminated, wrapped into only remaining caller
	view_has_flist (which will itself go away soon).
	(mode_uses_icon_container): Eliminated, wrapped into only remaining caller
	view_has_icon_container (which will itself go away soon).

	* src/file-manager/fm-directory-view-icons.c:
	(fm_directory_view_icons_clear): New function, erases icon container.
	(fm_directory_view_icons_init): Replace fm_directory_view's
	"clear" signal handler with fm_directory_view_icons_clear
	(fm_directory_view_icons_get_icon_layout): Moved to here.
	(fm_directory_view_icons_set_icon_layout): Moved to here.
	(fm_directory_view_icons_line_up_icons): Moved to here.
	
	* src/file-manager/fm-directory-view-list.c:
	(fm_directory_view_list_clear): New function, erases list contents.
	(fm_directory_view_list_init): Replace fm_directory_view's
	"clear" signal handler with fm_directory_view_list_clear
	
	* src/file-manager/fm-directory-view.h:
	(fm_directory_view_clear): Added "clear" signal, and
	fm_directory_view_clear prototype.
	(fm_directory_view_icons_get_icon_layout): Moved out of here.
	(fm_directory_view_icons_set_icon_layout): Moved out of here.
	(fm_directory_view_icons_line_up_icons): Moved out of here.
	
	* src/file-manager/fm-directory-view-icons.h:
	(fm_directory_view_icons_get_icon_layout): Moved to here.
	(fm_directory_view_icons_set_icon_layout): Moved to here.
	(fm_directory_view_icons_line_up_icons): Moved to here.

694
695
696
697
698
2000-01-12  John Sullivan  <sullivan@eazel.com>

	* src/ntl-window-msgs.c (nautilus_window_load_content_view_menu):
	Made option menu say "View as Icons" (e.g.) instead of just "Icons"

699
700
701
702
703
2000-01-11  Andy Hertzfeld <andy@eazel.com>

	* src/ntl-window:
    added a debug menu, and it's first item to show a color picker to test dropping colors
    
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
2000-01-11  John Sullivan  <sullivan@eazel.com>

	Started moving icon-specific and list-specific code
	into the subclasses. As a transition step, added some
	private prototypes to the .h file (clearly marked).	
	
	* src/file-manager/fm-directory-view.c:
	(setup_flist), (setup_icon_container): eliminated completely.
	(display_icon_container_selection_info_idle_cb), 
	(icon_container_selection_changed_cb), (icon_container_activate_cb),
	(create_icon_container), (display_flist_selection_info_idle_cb),
	(flist_activate_cb), (flist_selection_changed_cb), 
	(create_flist): moved out.
	(fm_directory_view_set_mode): removed the guts, which are now
	in the init functions for the subclasses; now just sets the
	field (which will go away eventually).
	* src/file-manager/fm-directory-view.h:
	(add_to_flist), (display_selection_info), (get_flist),
	(get_icon_container), (load_icon_container): temporarily
	added to .h file.
	* src/file-manager/fm-directory-view-icons.c:
	(display_icon_container_selection_info_idle_cb), 
	(icon_container_selection_changed_cb), (icon_container_activate_cb),
	(create_icon_container): moved in.
	(fm_directory_view_icons_init): Now creates icon_container here instead of
	in fm_directory_view_set_mode (which will eventually go away).
	* src/file-manager/fm-directory-view-list.c:
	(display_flist_selection_info_idle_cb),	(flist_activate_cb), 
	(flist_selection_changed_cb), (create_flist): moved in.
	(fm_directory_view_list_init): Now creates flist here instead of
	in fm_directory_view_set_mode (which will eventually go away).

	* src/ntl-window.c:
	(real_nautilus_window_set_content_view): Renamed to
	nautilus_window_real_set_content_view. Also added
	self as an author.

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
2000-01-11  Darin Adler  <darin@eazel.com>

	NautilusBackground is now used for the index panel background.

	* libnautilus/nautilus-background.c:
	(nautilus_background_attach_to_canvas):
	(nautilus_get_widget_background):
	(nautilus_gtk_style_get_default_class):
	(nautilus_gdk_window_update_sizes):
	(nautilus_background_draw_flat_box):
	(nautilus_background_get_gtk_style_class):
	(nautilus_background_set_widget_style):
	(nautilus_background_set_up_canvas):
	(nautilus_widget_background_changed):
	(nautilus_get_widget_background):
	Added new code that changes the background of a widget by
	modifying the GtkStyle. For solid colors and tiled images we
	can just modify the GtkStyle. For gradients we need to make
	a GtkStyle subclass.
	
	* libnautilus/nautilus-background.h:
	(nautilus_background_attach_to_canvas):
	(nautilus_get_widget_background):
	Changed the old interface that was canvas-specific, to a new one
	that allows attacking a background to any widget.

	* src/ntl-index-panel.h:
	Now that the background is attached to the widget, we don't need
	a background field in NautilusIndexPanel.

	* src/ntl-index-panel.c:
	(nautilus_index_panel_set_up_background)
	(nautilus_index_panel_finalize):
	(nautilus_index_panel_drag_data_received):
	(nautilus_index_panel_set_up_info):
	Changed the index panel to use NautilusBackground.

	* libnautilus/nautilus-background-canvas-group.h:
	libnautilus/nautilus-background-canvas-group.c:
	(nautilus_background_canvas_group_get_background):
	(nautilus_background_canvas_group_set_background):
	Moved the code that manages the background object out of the
	canvas group code, since we can now attach a background to
	any widget.

	* libnautilus/gdk-extensions.c:
	(nautilus_gdk_color_parse_with_white_default): Changed this helper
	to accept NULLs and return the default instead of prohibiting
	NULL. This is consistent with the gradient's use of NULL to
	represent the default color.

792
793
794
795
796
797
798
799
800
801
802
803
2000-01-11  John Sullivan  <sullivan@eazel.com>

	* libnautilus/nautilus-gtk-extensions.h:
	* libnautilus/nautilus-gtk-extensions.c:
	(nautilus_gtk_signal_connect_free_data): New function,
	convenience wrapper for gtk_signal_connect_full where
	the destroy-function is g_free() and the other extra
	values are the defaults.
	* src/ntl-window-msgs.c: (nautilus_window_load_content_view_menu):
	Use nautilus_gtk_signal_connect_free_data to avoid leaking the menu item's
	signal's copy of the iid string. 

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
2000-01-11  John Sullivan  <sullivan@eazel.com>

	Content view menu now works (can switch between List and Icon views).

	* src/ntl-window-msgs.c:
	(nautilus_window_load_content_view): Made it return the new
	content view, so callers don't need a load_info structure to
	determine the new view. Also made it accept NULL for
	requesting_view.
	(view_menu_switch_views_cb): New function, callback for when
	a view is chosen from the list of available content views.
	Elliot told me that this requires further work, so I checked
	it in with comments for later fixing by Elliot or someone
	else who understands the loading process better.
	(nautilus_view_load_content_view_menu): Added explicit
	parameter for NautilusNavigationInfo for clarity (had been
	getting this from deep in window temporary state guts).
	Connected view_menu_switch_views_cb to menu items.
	* src/ntl-window.c: 
	(nautilus_window_set_arg): Fixed bug in ARG_CONTENT_VIEW case where
	new view was sometimes being added to view hierarchy twice. Then
	moved this code into...
	(real_nautilus_window_set_content_view): New function, implements
	guts of content-view changing so set_arg doesn't have a big block
	of code in a switch statement.
	(nautilus_window_set_content_view): Moved the gtk_widget_show call
	from here to real_nautilus_window_set_content_view so it happens
	even if set_arg is called from elsewhere.
	(gtk_option_menu_do_resize): Removed this
	obsolete function (I removed the callers yesterday but forgot this).

835
836
837
838
839
2000-01-11  Darin Adler  <darin@eazel.com>

	* libnautilus/ntl-view-frame.c:	Fixed typos and oversights in
	Maciej's check-in. He didn't compile his changes :-(

840
841
2000-01-11  Maciej Stachowiak  <mjs@eazel.com>

842
843
844
	* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.h: Redo
	signals the conventional way, to avoid array size mismatches in
	the future.
845

846
847
2000-01-10  Maciej Stachowiak  <mjs@eazel.com>

848
849
850
851
852
	* docs/architecture.txt: Some documentation on the nautilus
	architecture including a block diagram and some conrol flow
	explanations. Needs editing for both style and technical
	completeness/accuracy, but it's a start.

853
854
855
856
	* libnautilus/gnome-icon-container.c (handle_icon_button_press):
	Reorder code so "context_click" is actually emitted on a button 3
	press.

857
858
859
860
861
	* src/file-manager/fm-main.c,
	src/file-manager/fm-directory-view.c,
	src/file-manager/fm-directory-view.h: Changed FMDirectoryView to
	use a NautilusViewFrame rather than inheriting from one.

862
863
864
865
	* libnautilus/ntl-view-frame.c (nautilus_view_frame_class_init):
	Fixed marshall type for "stop_location_change" signal. How could
	this ever have worked?

866
867
868
	* src/ntl-view.c (nautilus_view_load_client): Once an appropriate
	component type is found, do not keep looping.

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
2000-01-10  John Sullivan  <sullivan@eazel.com>

	First step at splitting the directory view into separate
	icon and list views. List view compiles and runs now,
	but is still inaccessible from the UI.

	* src/file-manager/fm-directory-view-icons.h:
	* src/file-manager/fm-directory-view-icons.c:
	* src/file-manager/fm-directory-view-list.h:
	* src/file-manager/fm-directory-view-list.c:
	New files. These implement two subclasses of FMDirectoryView.
	Currently the subclasses are trivial; the only code in the 
	subclasses other than boilerplate is the one line that sets 
	the view mode. Later I'll push the rest of the relevant code
	down into the subclasses.
	* src/file-manager/Makefile.am
	Added the four new files to the build.
	* src/file-manager/fm-directory-view.c: (init): Removed the
	call to fm_directory_view_set_mode since the subclasses are
	responsible for this now.
	(setup_base_uri): Don't call get_icon_container for non-icon
	views, as it asserts if you do; this was broken but since
	you couldn't switch to a non-icon view we didn't realize it.
	* src/file-manager/fm-main.c: (make_obj): Now calls either
	fm_directory_view_icons_get_type() or fm_directory_view_list_get_type()
	depending on the goad_id.
	* src/file-manager/ntl-file-manager.goad: Replaced entry for
	ntl_file_manager with two, one for ntl_file_manager_icon_view
	and one for ntl_file_manager_list_view
	* src/ntl-uri-map.c: (nautilus_navinfo_new): Now it sets up
	the two content views for directories with their new goad ids.

901
902
2000-01-10  Maciej Stachowiak  <mjs@eazel.com>

903
904
905
906
907
	* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.c:
	Fixed mismatch between declared signal array size and actual
	number of signals (this should still be rewritten to follow proper
	style).

908
909
910
911
912
913
914
915
916
917
918
919
920
921
	* libnautilus/ntl-content-view-frame.c,
	libnautilus/ntl-content-view-frame.h,
	libnautilus/ntl-meta-view-frame.c,
	libnautilus/ntl-meta-view-frame.h, libnautilus/ntl-view-frame.c,
	libnautilus/ntl-view-frame.h, src/ntl-app.c,
	src/ntl-view-bonobo-control.c, src/ntl-view-bonobo-subdoc.c,
	src/ntl-view-frame-svr.c, src/ntl-view-nautilus.c,
	src/ntl-view-private.h, src/ntl-view.c, src/ntl-view.h,
	src/ntl-window-msgs.c, src/ntl-window-msgs.h,
	src/ntl-window-state.c, src/ntl-window.c, src/ntl-window.h,
	src/file-manager/fm-directory-view.c,
	src/file-manager/fm-directory-view.h, src/file-manager/fm-main.c:
	Added Eazel copyright to files I've changed non-trivially.

922
923
924
925
926
2000-01-10  Darin Adler  <darin@eazel.com>

	* src/ntl-index-panel.c: (nautilus_index_panel_set_up_label):
	Added workaround to problem with basename and gnome-vfs.

927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
2000-01-10  Maciej Stachowiak  <mjs@eazel.com>

	* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.h,
	libnautilus/ntl-content-view-frame.c,
	libnautilus/ntl-content-view-frame.h,
	libnautilus/ntl-meta-view-frame.c,
	libnautilus/ntl-meta-view-frame.h: Renamed from
	libnautilus/ntl-view-client.c, libnautilus/ntl-view-client.h,
	libnautilus/ntl-content-view-client.c,
	libnautilus/ntl-content-view-client.h,
	libnautilus/ntl-meta-view-client.c,
	libnautilus/ntl-meta-view-client.h.
	* libnautilus/Makefile.am, libnautilus/libnautilus.h: reflect this
	renaming.
	
942
943
944
945
946
947
948
949
950
951
952
953
954
955
2000-01-10  Darin Adler  <darin@eazel.com>

	* ntl-window-msgs.c: (nautilus_window_request_progress_change):
	(nautilus_window_advance_state):
	(nautilus_window_switch_to_new_views):
	(nautilus_window_revert_to_old_views):
	(nautilus_window_free_load_info):
	(nautilus_window_end_location_change):
	(nautilus_window_change_location_2):
	(nautilus_window_change_location): Got rid of the race condition
	in the existing code and cleaned up the state machine a bit. The
	new code separates the state of the nautilus window from the state
	of the content view, which makes things a bit simpler.

956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
2000-01-10  John Sullivan  <sullivan@eazel.com>

	Added some of the framework for supporting multiple
	content views for the same uri. More to come later.

	* src/ntl-types.h: added NautilusViewIdentifier struct
	to keep track of iid and human-readable name. Renamed
	NautilusNavigationInfo.content_iid to default_content_iid,
	and added content_identifiers GSList.
	* src/ntl-uri-map.c: 
	(nautilus_view_identifier_new): New function.
	(nautilus_view_identifier_free): New function.
	(nautilus_navinfo_new): Create a human-readable-name
	for each content iid, and store them together in
	content_identifiers list. I included a currently
	unworking "List" choice for the directory case, to
	test the framework.
	(nautilus_navinfo_free): Free the content_identifiers list.
	* src/ntl-window-msgs.c:
	(nautilus_window_load_content_view_menu): New function,
	iterates through the content_identifiers list to fill in
	the menu of content view choices. The menu items don't do
	anything yet.
	(nautilus_window_change_location_internal): Added call to
	nautilus_window_load_content_view_menu.
	(nautilus_window_change_location_2): Fixed spelling and
	grammar in a couple of error messages.
	* src/ntl-window.c: (nautilus_window_constructed): Removed
	"View as (placeholder)" text in menu; now it has no text
	until the actual choices appear. Removed some option-menu-sizing
	trickery that didn't work correctly when items were added later.
	Now the entire menu is replaced when its contents change.
	* src/ntl-window.h: Removed menu_cvtype field; code all uses
	just option_cvtype now.

991
992
993
994
995
996
997
998
999
1000
2000-01-10  Darin Adler  <darin@eazel.com>

	* libnautilus/Makefile.am, libnautilus/nautilus-background.h,
	libnautilus/nautilus-background.c,
	libnautilus/nautilus-background-canvas-group.h,
	libnautilus/nautilus-background-canvas-group.c,
	libnautilus/nautilus-lib-self-check-functions.h,
	libnautilus/nautilus-lib-self-check-functions.c: Added first cut
	at a new class to manage backgrounds that can be colors, color
	gradients, or tiled images.