1. 29 Oct, 2001 1 commit
    • Darin Adler's avatar
      Locate glib-genmarshal. · 93359a3e
      Darin Adler authored
      	* configure.in: Locate glib-genmarshal.
      	* libnautilus-private/.cvsignore:
      	* libnautilus-private/Makefile.am:
      	* libnautilus-private/nautilus-marshal.list:
      	* src/nautilus-view-frame.c: (nautilus_view_frame_class_init):
      	* src/nautilus-zoom-control.c: (nautilus_zoom_control_class_init):
      	Add marshalers used inside Nautilus only.
      	* components/adapter/nautilus-adapter-load-strategy.c:
      	* libnautilus-private/nautilus-horizontal-splitter.c:
      	* libnautilus-private/nautilus-icon-canvas-item.c:
      	* libnautilus-private/nautilus-icon-text-item.h:
      	Put code in #if GNOME2_CONVERSION_COMPLETE.
      	* libnautilus-private/nautilus-icon-container.c:
      	(set_pending_icon_to_reveal), (nautilus_icon_container_class_init),
      	(nautilus_icon_container_init), (set_pending_icon_to_rename):
      	Convert signal-handling code.
      	* libnautilus-private/nautilus-icon-dnd.c:
      	(get_data_on_first_target_we_support): Update for GdkAtom changes.
      	(confirm_switch_to_manual_layout): Switch to GtkDialog.
  2. 28 Oct, 2001 1 commit
  3. 06 Jan, 2001 1 commit
    • Mike Engber's avatar
      Added nautilus_g_round. · 34b865db
      Mike Engber authored
      	* libnautilus-extensions/nautilus-glib-extensions.c:
      	(nautilus_shell_quote), (nautilus_g_round):
      	* libnautilus-extensions/nautilus-glib-extensions.h:
      	Added nautilus_g_round.
      	* libnautilus-extensions/nautilus-icon-container.c:
      	* libnautilus-extensions/nautilus-icon-text-item.c:
      	(iti_stop_editing), (layout_text), (iti_edition_accept),
      	(iti_entry_text_changed_by_clipboard), (iti_start_editing),
      	(iti_destroy), (recompute_bounding_box), (iti_update), (iti_draw),
      	(iti_render), (iti_point), (iti_start_selecting),
      	(iti_stop_selecting), (iti_selection_motion), (iti_ensure_focus),
      	(iti_event), (iti_bounds), (nautilus_icon_text_item_configure),
      	(nautilus_icon_text_item_setxy), (nautilus_icon_text_item_select),
      	* libnautilus-extensions/nautilus-icon-text-item.h:
      	Overhauled nautilus-icon-text-item to be a more proper canvas
      	item - mainly fixing it's use of coordinates.  Also simplified
      	its configure api a bit. This fixed bug 4166. Also put in a
      	workaround to fix bug 3973.
  4. 08 Dec, 2000 1 commit
    • Darin Adler's avatar
      reviewed by: John Sullivan <sullivan@eazel.com> · 16de871f
      Darin Adler authored
      	* libnautilus-extensions/nautilus-icon-container.c:
      	(nautilus_icon_container_initialize): Added FIXME about hard-coded
      	font and size.
      	(nautilus_icon_container_start_renaming_selected_item): Fix bug
      	5078 by removing useless empty signal handlers.
      	(end_renaming_mode): Fix bug 5079 by merging the remaining code
      	from the old hide_rename_widget in after deleting some of it.
      	This is more parallel with the start renaming function.
      	* libnautilus-extensions/nautilus-icon-private.h: Removed the
      	unused rename_editable field.
      	* libnautilus-extensions/nautilus-icon-text-item.c:
      	(iti_stop_editing): Now that the strange "persistent" editable is
      	no longer used, restore the code used to destroy the editable when
      	not editing. This also fixes a storage leak.
      	(nautilus_icon_text_item_get_text): Change return type to const
      	char * to make it clear it's not free-able.
      	(nautilus_icon_text_item_get_renaming_editable): Change the
      	return type to GtkEditable *.
      	* libnautilus-extensions/nautilus-icon-text-item.h: Change
      	return types of get_text and get_renaming_editable.
      	* src/file-manager/fm-directory-view.c: (queue_pending_files),
      	(filtering_changed_callback): Added FIXMEs about special cases
      	for the desktop.
      	* src/file-manager/fm-icon-view.c: (fm_icon_view_begin_loading):
      	Improved wording of a comment.
  5. 22 Nov, 2000 1 commit
    • Rebecca Schulman's avatar
      reviewed by: Pavel Cisler <pavel@eazel.com> · e31b0b92
      Rebecca Schulman authored
      2000-11-21  Rebecca Schulman  <rebecka@eazel.com>
      	reviewed by: Pavel Cisler <pavel@eazel.com>
      	Fixes for bugs 690 and 733, to make the clipboard
      	work for file editing in place, and make sensitivity
      	work. Paste doesn't work correctly still, and a bug
      	is filed for this issue.
      	* libnautilus-extensions/nautilus-entry.h:
      	* libnautilus-extensions/nautilus-entry.c:
      	(nautilus_entry_initialize_class), (nautilus_entry_key_press),
      	(nautilus_entry_motion_notify), (nautilus_entry_set_text),
      	(nautilus_entry_set_selection), (nautilus_entry_insert_text),
      	Added a new signal to nautilus entry, called "selection_changed"
      	that is fired whenever the region selected in an editiable widget
      	is changed.  This is used to determine how to set clipboard sensitivity
      	* libnautilus-extensions/nautilus-icon-container.h:
      	* libnautilus-extensions/nautilus-icon-container.c:
      	Add a new signal "renaming_icon", which tells the icon view
      	to set up clipboard capabilities for the new editable widget
      	* libnautilus-extensions/nautilus-icon-private.h:
      	* libnautilus-extensions/nautilus-icon-text-item.h:
      	* libnautilus-extensions/nautilus-icon-text-item.c:
      	(iti_stop_editing), (iti_entry_text_changed_by_clipboard),
      	(iti_start_editing), (iti_destroy), (iti_start_selecting),
      	(iti_stop_selecting), (iti_event),
      	Sad hacks that I had to add on top of this already scary file so
      	that the editable, which is in its own offscreen window somewhere,
      	communicates to the clipboard what is actually going on when text
      	is entered and selections are changed.  This includes adding a
      	new signal when text is changed, to make sure the entry knows about
      	it, firing an initial grab focus for the widget so that the widget
      	turns on, passing on more of the events of the canvas
      	widget, including motion notifies and focus events, and
      	keeping a persistent copy of the last renaming entry in the icon
      	container so that pastes for that widget will still work.
      	* libnautilus/nautilus-clipboard.h:
      	* libnautilus/nautilus-clipboard.c: (set_menu_item_sensitive),
      	(merge_in_clipboard_menu_items), (merge_out_clipboard_menu_items),
      	(focus_changed_callback), (grab_focus_callback),
      	Reorganized some of the code, and also added new callbacks
      	to deal with sensitivity changes.
      	* src/file-manager/fm-directory-view.h:
      	* src/file-manager/fm-directory-view.c:
      	Add a new function that the icon view uses to
      	pass the bonobo control for clipboard set up
      	* src/file-manager/fm-icon-view.c: (renaming_icon_callback),
      	Set up clipboard capabilities when the renaming widget is
      	* src/nautilus-location-bar.c: (nautilus_location_bar_new):
      	* components/notes/nautilus-notes.c: (make_notes_view):
      	* src/nautilus-simple-search-bar.c:
      	Changed calls to clipboard set up routines to include
      	the new shares_selection_changes parameter. Widgets that
      	use the "selection_changed" signal (NautilusEntries)
      	say "TRUE" here, otherwise selection doesn't work quite
      	right, and FALSE is used instead.
      	* src/nautilus-search-bar-criterion.c: (get_size_location_for):
      	Deal with the case when a user has entered a non-numeric size
      	in a smart way, by using nautilus_str_to_int.  This is related
      	to bug 2438, but is not a complete fix.
  6. 29 Apr, 2000 1 commit
    • Gene Z. Ragan's avatar
      libnautilus-extensions/nautilus-icon-text-item.c · e33d60fa
      Gene Z. Ragan authored
      2000-04-28  Gene Z. Ragan  <gzr@eazel.com>
      	* libnautilus-extensions/nautilus-icon-text-item.c
      	* libnautilus-extensions/nautilus-icon-text-item.h
      	* libnautilus-extensions/nautilus-undo-manager-private.h
      	Fixed the following FIXME bugs: 684 686 687
      	Hooked up the undo mechanism to work properly with
      	the renaming widget.
      	* libnautilus-extensions/nautilus-undo-manager.c
      	* libnautilus-extensions/nautilus-undo-manager.h
      	Add configuration defaults to sets the UndoManager to
      	not use the redo functionality and sets the depth of
      	the undo list to one transaction.
      	Function to toggle on or off the ability to redo undone transactions.
      	Function to set the max depth of the undo/redo queues
      	New utility function to clean up data in undo/redo list
      	New utility function that prunes a set number of items from
      	either the undo or redo list.
      	Manually insert an externally created undo transaction into
      	the undo queue.
      	Manually insert an externally created undo transaction into
      	the redo queue.
      	* libnautilus-extensions/nautilus-undo-transaction.c
      	* libnautilus-extensions/nautilus-undo-transaction.h
      	Added destructor function for a NautilusUndoTransaction object
      	* src/nautilus-window-menus.c
      	Fixed bug 755.  Connected to signal sent by undo manager that informs
      	Undo menu item sensitivity to be set.
  7. 28 Apr, 2000 1 commit
    • Gene Z. Ragan's avatar
      libnautilus-extensions/nautilus-undoable.c · 3ada85db
      Gene Z. Ragan authored
      2000-04-27  Gene Z. Ragan  <gzr@eazel.com>
      	* libnautilus-extensions/nautilus-undoable.c
      	* libnautilus-extensions/nautilus-undoable.h
      	* libnautilus-extensions/nautilus-undo-manager.c
      	* libnautilus-extensions/nautilus-undo-manager.h
      	* libnautilus-extensions/nautilus-undo-transaction.c
      	* libnautilus-extensions/nautilus-undo-transaction.h
      	* libnautilus-extensions/nautilus-undo-manager-private.h
      	Added architecture for undo mechanism.
      	NautilusUndoManager maintains undo and redo queues of NautilusUndoTransactions
      	as well as maintaining various state information pertinant to the user interface.
      	NautilusUndoTransaction contains a transaction name and a list of NautilusUndoables.
      	NautilusUndoable is a object that contains a pointer to an object and a GData object.
      	The GData object contains named data that can be added and retrieved during an undo/
      	redo operation.  The NautilusUndoable also emits signals to the object that enables it
      	to perform the undo and redo operations.  I will write up more complete documents when the
      	code has matured.
      	* libnautilus-extensions/nautilus-icon-container.c
      	* libnautilus-extensions/nautilus-icon-container.h
      	* src/file-manager/fm-icon-view.c
      	Removed obsolete undo functions and callbacks.  These were invalidated
      	by the new undo mechanism.
      	* src/ntl-main.c
      	Added call to nautilus_undo_manager_initialize_global_manager() in main.
      	This call initializes a Nautilus global undo manager.
      	Also fixed some minor coding style issues.
      	* nautilus-window-menus.c
      	Added callback to handle selection of Undo item form edit menu.  Callback
      	checks with Undo Manager for a current undo transaction and asks manager to
      	perform an undo if there is one.
  8. 22 Apr, 2000 1 commit
    • Gene Z. Ragan's avatar
      libnautilus-extensions/nautilus-icon-canvas-item.c Return value of · aa0ef3fd
      Gene Z. Ragan authored
      2000-04-21  Gene Z. Ragan  <gzr@eazel.com>
      	* libnautilus-extensions/nautilus-icon-canvas-item.c
      	* libnautilus-extensions/nautilus-icon-canvas-item.h
      	Return value of MAX_TEXT_WIDTH constant.  Used is positoning the rename
      	text widget.
      	* libnautilus-extensions/nautilus-icon-container.c
      	Added signal "icon_text_edit_occurred" called when the text rename widget
      	recieves some sort of edit, such as a keyboard entry.
      	(rename_text_dirty):  Returns boolean indicating edit state of
      	text in rename widget.  Used in undo operation.
      	(text_edited_callback):  Signal callback called when NautilusIconTextItem
      	text is edited.
      	(nautilus_icon_container_start_renaming_selected_item):  Fixed positioning
      	code to address bug #543
      	(nautilus_icon_container_undo_renaming_selected_item):  Added simple undo
      	code.  This needs to be replaced with a global undo system.
      	* libnautilus-extensions/nautilus-icon-text-item.c
      	(iti_paint_text):  Fixed drawing of i-beam to address bug #506
      	(iti_event): Added keyboard handling for simple undo
      	(nautilus_icon_text_item_get_margins):  Returns values of MARGIN_X and
      	MARGIN_X constants.  Used when positioning text item in canvas.
      	* src/file-manager/fm-directory-view.c
      	Moved menu item title constants to header file.  This is needed so
      	FMIconView can get menu position paths when placing items in the
      	bonobo and contect menus.  Renamed the constants to be specific to
      	(fm_directory_view_get_context_menu_index):  Added function to return
      	index of requested menu item.
      	* src/file-manager/fm-icon-view.c
      	(fm_icon_view_icon_text_edit_callback):  Callback that connect to
      	NautilusIconContainer signal.
      	(undo_rename_icon_callback): Added simple undo functionality.
      	(insert_one_context_menu_item): Added function to insert context menu
      	add a specific index.
      	Fixed bug #499, Rename menu in bad place in context menu.
  9. 18 Apr, 2000 1 commit
    • Darin Adler's avatar
      Added commands for Auto vs. Manual layout, but the guts behind · 6a3930e9
      Darin Adler authored
      	them is not yet implemented.
      	Did some cleanup on the new renaming code.
      	* nautilus-glib-extensions.c:
      	* nautilus-glib-extensions.h:
      	Added nautilus_g_list_exactly_one_item and
      	nautilus_g_list_more_than_one_item. These are more-efficient
      	versions of g_list_length (x) == 1 and g_list_length (x) > 1.
      	* nautilus-icon-canvas-item.c:
      	(draw_or_measure_label_text): Add a line break between the
      	editable text and the additional text.
      	Replaced g_assert with g_return_if_fail calls, and added the
      	complete set of g_return_if_fail.
      	(nautilus_icon_canvas_set_renaming): Don't update the item
      	unless the renaming state has actually changed.
      	* nautilus-icon-canvas-item.h: Fixed formatting.
      	* nautilus-icon-container.c:
      	* nautilus-icon-container.h:
      	Added nautilus_icon_container_set_auto_layout and
      	nautilus_icon_container_is_auto_layout. For now they are
      	placeholders that just modify a boolean.
      	* nautilus-icon-private.h:
      	Added the auto_layout boolean.
      	* nautilus-icon-text-item.c:
      	* nautilus-icon-text-item.h:
      	Just some formatting and other minor cleanup.
      	* nautilus-metadata.h:
      	* nautilus-location-bar.c (drag_data_received_cb): Use the new
      	nautilus_g_list_more_than_one_item function.
      	* fm-directory-view.c (bonobo_menu_open_cb), (open_cb): Use the
      	new nautilus_g_list_exactly_one_item.
      	* fm-icon-text-window.c (attribute_names_string_is_good),
      	(set_preference_string), (synch_menus_with_preference),
      	(changed_attributes_option_menu_cb): Got rid of the hard-coded
      	first item "name" which is no longer needed.  Also changed to
      	handle bad data in the preferences.
      	* fm-icon-view.c (fm_icon_view_initialize_class): Updated since
      	there's no "name" item needed any more.
      	(fm_icon_view_compute_menu_item_info): Merged MENU_PATH_RENAME
      	with MENU_RENAME_TEXT and simplified the logic.
      	(fm_icon_view_append_selection_context_menu_items): Merged
      	(update_layout_menus), (auto_layout_callback),
      	(manual_layout_callback), (fm_icon_view_merge_menus): Added menu
      	items for auto layout and for manual layout.
      	(fm_icon_view_begin_loading): Load setting for auto layout from
      	(fm_icon_view_get_icon_text_attribute_names): Changed to get rid
      	of the "name" first item from the list of text attributes.
      	(get_icon_editable_text_callback): Simplified since the editable text
      	is always the icon name. Also got rid of copied and pasted code that's
      	no longer needed for this case.
      	(get_icon_additional_text_callback): Got rid of special case for name,
      	since the name is no longer treated as an attribute.
  10. 17 Apr, 2000 1 commit
    • Gene Z. Ragan's avatar
      Added functionality to allow files to be renamed in icov view. This · e1827af4
      Gene Z. Ragan authored
      2000-04-18  Gene Z. Ragan <gzr@eazel.com>
      	Added functionality to allow files to be renamed in icov view.  This feature is
      	available by either context click on the icon or selecting a single file and 			choosing "Rename" form the File menu.
      	* libnautilus-extensions/nautilus-icon-text-item.c
      	* libnautilus-extensions/nautilus-icon-text-item.h: New files.
      	This is an editable icon text item used in the renaming feature.
      	It is based on GnomeIconTextItem but modified to fix bugs in the
      	original code and add extended functionality need by nautilus.  If
      	thse changes were rolled into the current GnomeIconTextItem, it would
      	break gmc.
      	* libnautilus-extensions/Makefile.am
      	Modified file so that the two new files listed above would properly
      	be included in generated makefiles.
      	* libnautilus-extensions/nautilus-icon-canvas-item.c
      	Split text class variable into two variables, editable_text and
      	additonal_text.  editable_text refers to attributes that the user can change
      	via rename in place.  additional_text is any other text that the user cannot
      	edit via the rename in place feature.  Added a boolean flag, is_renaming, to
      	check against during various operations that effect the renaming feature.
      	Removed ARG_TEXT argument ID and replaced with ARG_EDITABLE_TEXT and
      	(nautilus_icon_canvas_item_initialize_class):  Function now check for both
      	(nautilus_icon_canvas_item_destroy):  Both editable_text and
      	additonal_text are freed.
      	(nautilus_icon_canvas_item_set_arg):  Removed ARG_TEXT and added
      	(nautilus_icon_canvas_item_get_arg): Removed ARG_TEXT and added
      	(draw_or_measure_label_text):  Modified function to not draw the label
      	icon text if we are renaming in place.
      	(draw_or_measure_label_text):  Function now combines editable and additional
      	text when performing the measuring operation.
      	(compute_editable_text_rectangle):  Added function to compute bounds of
      	editable text.  This is used to determine size and placement of editable
      	text item when in renaming mode.
      	(nautilus_icon_canvas_get_text_bounds):  Public API to get bounds of
      	icon label text.
      	(nautilus_icon_canvas_get_editable_text_bounds): Public API to get bounds of
      	editable icon label text.
      	(hit_test_pixbuf): Added check against is_renaming flag.
      	(nautilus_icon_canvas_get_editable_text):  Public API to get editable text string.
      	(nautilus_icon_canvas_item_set_renaming):  Public API to toggle is_renaming flag.
      	* libnautilus-extensions/nautilus-icon-canvas-item.h
      	Added public API prototypes to functions described above.
      	* libnautilus-extensions/nautilus-icon-container.c
      	Removed GET_ICON_TEXT signal.  Added ICON_TEXT_CHANGED signal.
      	(icon_toggle_selected):  Renaming mode is now exited when a selection/deselection occurs.
      	(key_press_event):  GDK_Return ends rename mode and attempts to accept modification.  GDK_Escpae
      	ends rename mode and reverts modification to original.
      	(nautilus_icon_container_initialize_class):  icon_text_changed, get_icon_editable_text and
      	get_icon_additional_text signals are registered.
      	(editing_started): New function.  Called when an edit begins.  Inits class member variables
      	for edit mode.
      	(editing_stopped): New function.  Called when edit ends.  Cleans up edit mode.
      	(nautilus_icon_container_initialize): rename_widget and original_text private variables
      	are set to NULL.
      	(icon_toggle_selected):  Added call to end_renaming_mode.
      	(nautilus_icon_container_update_icon):  Added emitting of GET_ICON_EDITABLE_TEXT and
      	GET_ICON_ADDITIONAL_TEXT signals.  Updated gnome_canvas_item_set to use new arguments defined
      	in nautilus-icon-text-item.
      	(nautilus_icon_container_show_rename_widget):  New function.  Creates and displays renaming_widget.
      	Creates cached copy of original editable text for later compare, connects signals and enters
      	renaming mode.
      	(end_renaming_mode): New function.  Cleans up and end renaiming mode.
      	(hide_rename_widget):  Called by end_renaming_mode to hide and free renaming_widget.
      	* libnautilus-extensions/nautilus-icon-container.h
      	Added prototypes for public functions described above.
      	* libnautilus-extensions/nautilus-icon-private.h
      	Added boolean for renaming.  Added a NautilusIconTextItem variable for the renaiming widget.
      	* src/file-manager/fm-icon-view.c
      	Added defines MENU_PATH_RENAME. Added a char * to hold original editable text for a later compare.
      	Removed get_icon_text_callback and added get_icon_editable_text_callback and
      	get_icon_additonal_text_callback.  These return the editable and additonal text of the icon view.
      	(rename_icon_callback):  Added callback that attempts to rename the NautilusFile the icon view
      	represents.  Action in not taken if there has been no change to the editable text.  If the operation
      	fails, the user is notified.
      	(fm_icon_view_append_selection_context_menu_items):  Added Rename menu item.
      	(append_bonobo_menu_item):  Added Rename menu item and callback.
      	(update_bonobo_menu_item):  Added senesitivity check for the Rename item.  It is
      	enabled only if a single item is selected.
      	(fm_icon_view_icon_text_changed_callback):  Added function to attempt to change the filename
      	to the new text.  Notify user if operation fails.
      	(get_icon_editable_text_callback): This callback returns the text items that areeditable by
      	the user using the "Rename" command.  In the case of FMIconView, this
      	would be the attribute with the name "name".
      	(get_icon_additional_text_callback): This callback returns the text items that are not
      	editable by the user using the "Rename" command.