1. 19 Mar, 2018 1 commit
    • Alexandru Fazakas's avatar
      general: Remove include guards in favor of pragma once · 95ecfc8e
      Alexandru Fazakas authored
      The traditional include guards are not as easy to handle
      and require extra thought into the names.
      Pragma once is an easier, more contributor friendly approach.
      Closes #294
      general: Remove include guards in favor of pragma once
      The traditional include guards are not as easy to handle
      and require extra thought into the names.
      Pragma once is an easier, more contributor friendly approach.
      Closes #294
  2. 27 Feb, 2018 1 commit
    • Ernestas Kulik's avatar
      general: truncate messages used in dialogs · fe6a5681
      Ernestas Kulik authored
      This is most notably a problem with paths that are approaching PATH_MAX
      in length. Cairo surface creation fails due to its internal size limit
      being reached and GTK+ promptly crashes after trying to dereference a
      null pointer. Besides, the window can get ridiculously long even if
      Nautilus doesn’t crash.
  3. 25 Apr, 2016 1 commit
    • Carlos Soriano Sánchez's avatar
      general: merge libnautilus-private to src · 7e24f1b2
      Carlos Soriano Sánchez authored
      And fix make distcheck.
      Although libnautilus-private seem self contained, it was actually
      depending on the files on src/ for dnd.
      Not only that, but files in libnautilus-private also were depending on
      dnd files, which you can guess it's wrong.
      Before the desktop split, this was working because the files were
      distributed, but now was a problem since we reestructured the code, and
      now nautilus being a library make distcheck stop working.
      First solution was try to fix this inter dependency of files, but at
      some point I realized that there was no real point on splitting some of
      those files, because for example, is perfectly fine for dnd to need to
      access the window functions, and it's perfectly fine for the widgets
      in the private library to need to access to all dnd functions.
      So seems to me the private library of nautilus is somehow an artificial
      split, which provides more problems than solutions.
      We needed libnautilus-private to have a private library that we could
      isolate from extensions, but I don't think it worth given the problems
      it provides, and also, this not so good logical split.
      Right now, since with the desktop split we created a libnautilus to be
      used by the desktop part of nautilus, extensions have access to all
      the API of nautilus. We will think in future how this can be handled if
      we want.
      So for now, merge the libnautilus-private into src, and let's rethink
      a better logic to split the code and the private parts of nautilus than
      what we had.
      Thanks a lot to Rafael Fonseca for helping in get this done.
  4. 04 Apr, 2016 1 commit
    • Carlos Soriano Sánchez's avatar
      general: remove vim modelines · 1ffb8ca5
      Carlos Soriano Sánchez authored
      Vim and emacs modelines are used to specify some of the code style in the code.
      However, this is misleading and poorly supported since nautilus had a mix of
      code style for some time.
      Also, the mode lines doesn't specify the whole code style, so we will need to
      use a different tool as well to specify the whole code style.
      For that, we can just use a different tool for everything.
      So remove the mode lines, and in a short future we will reestyle the nautilus
      code to have a single code style, and use a tool like editorconfig to specify
      the whole code style.
  5. 31 Jan, 2014 1 commit
  6. 11 Jan, 2011 2 commits
  7. 06 Oct, 2008 1 commit
    • Cosimo Cecchi's avatar
      Remove unnecessary includes of libgnome · c9aff00e
      Cosimo Cecchi authored
      2008-10-06  Cosimo Cecchi  <cosimoc@gnome.org>
              * libnautilus-private/nautilus-customization-data.c:
              * libnautilus-private/nautilus-dnd.c:
              * libnautilus-private/nautilus-file-utilities.c:
              * libnautilus-private/nautilus-file.c:
              * libnautilus-private/nautilus-global-preferences.c:
              * libnautilus-private/nautilus-icon-dnd.c:
              * libnautilus-private/nautilus-icon-private.h:
              * libnautilus-private/nautilus-monitor.c:
              * src/file-manager/fm-desktop-icon-view.c:
              * src/file-manager/fm-ditem-page.c:
              * src/file-manager/fm-error-reporting.h:
              * src/file-manager/fm-list-view.c:
              * src/file-manager/fm-properties-window.c:
              * src/nautilus-history-sidebar.c:
              * src/nautilus-image-properties-page.c:
              * src/nautilus-information-panel.c:
              * src/nautilus-location-bar.c:
              * src/nautilus-location-entry.c:
              * src/nautilus-main.c:
              * src/nautilus-navigation-window-menus.c:
              * src/nautilus-navigation-window.c:
              * src/nautilus-places-sidebar.c:
              * src/nautilus-window-manage-views.c:
              * src/nautilus-window-toolbars.c:
      	Remove unnecessary includes of libgnome
      svn path=/trunk/; revision=14689
  8. 21 May, 2008 1 commit
  9. 30 Nov, 2007 1 commit
  10. 21 Feb, 2006 1 commit
    • Alexander Larsson's avatar
      Add callback to fm_rename_file. · 1dff2b51
      Alexander Larsson authored
      2006-02-21  Alexander Larsson  <alexl@redhat.com>
      	* src/file-manager/fm-error-reporting.[ch]:
      	Add callback to fm_rename_file.
      	* src/file-manager/fm-icon-view.c:
      	Pass NULL as above callback
      	* src/file-manager/fm-list-view.c:
      	Don't activate file when renaming, delay until rename done.
      	After rename, scroll to renamed file if not visibile, because it
      	may have moved.
      	Above based on initial patch by Nelson Benítez <gnel@cenobioracing.com>
      	* src/file-manager/fm-list-model.c:
      	On file change, if file was re-sorted emit rows_reordered.
      	This fixes bug #326581
  11. 12 Dec, 2005 1 commit
  12. 21 Feb, 2002 1 commit
    • Darin Adler's avatar
      Remove nautilus-desktop-file-loader.[ch]. Remove. Remove. · e4615d84
      Darin Adler authored
      	* libnautilus-private/Makefile.am: Remove nautilus-desktop-file-loader.[ch].
      	* libnautilus-private/nautilus-desktop-file-loader.c: Remove.
      	* libnautilus-private/nautilus-desktop-file-loader.h: Remove.
      	* libnautilus-private/nautilus-directory-async.c:
      	(link_info_nautilus_link_read_callback): Pass in NULL for the new
      	optional URI parameter for parsing existing link files.
      	* libnautilus-private/nautilus-link-desktop-file.h:
      	* libnautilus-private/nautilus-link-desktop-file.c:
      	Change to use GnomeDesktopItem instead of NautilusDesktopFile.
      	* libnautilus-private/nautilus-link.h:
      	* libnautilus-private/nautilus-link.c:
      	Add optional URI parameter for parsing existing link files. This
      	is passed down to the GnomeDesktopItem level, which can sometimes
      	do a better job if it knows the URI.
      	* src/file-manager/fm-directory-view.c: (activate_callback):
      	Change to use GnomeDesktopItem instead of NautilusDesktopFile. Also,
      	simplify error handling.
      	* Many files:
      	Fix includes to use <> style in headers more consistently, and remove
      	unnecessarily includes.
  13. 15 Sep, 2001 1 commit
  14. 04 May, 2001 1 commit
  15. 06 Feb, 2001 1 commit
    • John Sullivan's avatar
      reviewed by: Pavel Cisler <pavel@eazel.com> · b450cc9e
      John Sullivan authored
      	Fixed bug 5157 (Nautilus won't display directories for
      	which it thinks it doesn't have permissions)
      	I removed the code that prevented Nautilus from even
      	trying to load a location for which the perceived
      	permissions didn't allow reading (because the perceived
      	permissions can be wrong with some file systems). Now
      	it always tries, and puts up an error dialog only if
      	it gets an error while actually loading the directory.
      	* src/file-manager/fm-error-reporting.h:
      	* src/file-manager/fm-error-reporting.c:
      	(fm_report_error_loading_directory): New function, currently
      	only handles GNOME_VFS_ERROR_ACCESS_DENIED and a fallback
      	default case.
      	(fm_report_error_renaming_file), (fm_report_error_setting_group),
      	(fm_report_error_setting_permissions), (rename_callback):
      	All the report_error functions now take a parent-window
      	parameter (which is often NULL). Also, they now all use
      	gnome_vfs_error_result_to_string when whining about
      	unhandled cases.
      	* src/file-manager/fm-directory-view.h: Changed comments
      	and copyright notice only.
      	* src/file-manager/fm-directory-view.c:
      	(real_load_error): New function, calls
      	fm_report_error_loading_directory unless an error has already
      	been reported for the current directory load operation.
      	(fm_directory_view_initialize_class): Wire up real_load_error
      	as default handler for LOAD_ERROR signal.
      	(activate_callback): Pass parent window to error-reporting call.
      	(load_directory): Reset the reported_load_error boolean since
      	we're about to load anew.
      	* src/file-manager/fm-properties-window.c: (rename_callback),
      	(group_change_callback), (owner_change_callback),
      	Pass parent window to error-reporting-calls. I just passed NULL
      	if it was not trivial to pass a good window.
      	* src/nautilus-window-manage-views.c:
      	(handle_unreadable_location), (open_location): Remove code that
      	was preventing "unreadable" locations from being loaded.
  16. 28 Aug, 2000 1 commit
    • John Sullivan's avatar
      Some FIXME work. Removed some obsolete FIXMEs, and added · 7d5c496d
      John Sullivan authored
      	bug numbers to others (some existing bug reports, some new
      	bug reports). 236 FIXMES without bug numbers remain.
      	* src/file-manager/fm-directory-view.c:
      	(fm_directory_view_trash_or_delete_selection), (activate_callback),
      	* src/file-manager/fm-directory-view.h:
      	* src/file-manager/fm-error-reporting.c: (fm_rename_file):
      	* src/file-manager/fm-error-reporting.h:
      	* src/file-manager/fm-properties-window.c:
      	(activate_group_callback), (attach_group_menu),
      	(activate_owner_callback), (attach_owner_menu),
      	(create_basic_page), (create_permissions_page):
      	* src/file-manager/fm-search-list-view.c: (real_merge_menus):
      	* src/nautilus-sidebar.c: (receive_dropped_uri_list):
  17. 11 Jul, 2000 1 commit
    • Darin Adler's avatar
      Changed history list to include a separate position field instead of · 88838071
      Darin Adler authored
      	* components/history/nautilus-history-view.c:
      	(history_view_update_icons), (get_history_list),
      	* libnautilus/nautilus-view-component.idl:
      	* src/nautilus-history-frame.c:
      	* src/nautilus-view-frame.h:
      	* src/nautilus-view-frame.c:
      	* src/nautilus-window.c:
      	Changed history list to include a separate position field
      	instead of having a position in each entry.
      	* components/notes/nautilus-notes.c: (done_with_file):
      	Name changed from nautilus_file_cancel_callback to
      	nautilus_file_cancel_call_when_ready to reduce confusion with
      	* libnautilus-extensions/nautilus-directory.c:
      	(nautilus_directory_get): Made NULL for URI be legal (and result
      	in NULL for the directory object).
      	* libnautilus-extensions/nautilus-mime-actions.c:
      	(get_mime_type_from_uri): Made NULL for URI be legal (and result
      	in NULL for MIME type).
      	* libnautilus-extensions/nautilus-entry.c:
      	(nautilus_entry_set_text): Minor tweak.
      	* libnautilus-extensions/nautilus-file.h:
      	* libnautilus-extensions/nautilus-file-private.h:
      	* libnautilus-extensions/nautilus-file.c: (operation_new),
      	(operation_free), (operation_complete), (operation_cancel),
      	(rename_update_info_and_metafile), (rename_callback),
      	(nautilus_file_rename), (nautilus_file_cancel),
      	(nautilus_file_set_owner), (nautilus_file_cancel_call_when_ready):
      	Added cancelling to rename as a prelude to doing the same for
      	set_file_info-based calls.
      	* libnautilus-extensions/nautilus-graphic.c:
      	Fixed a formatting mistake and a typo.
      	* libnautilus-extensions/nautilus-stock-dialogs.h:
      	* libnautilus-extensions/nautilus-stock-dialogs.c:
      	(timed_wait_hash), (timed_wait_hash_equal),
      	(nautilus_timed_wait_start), (nautilus_timed_wait_free),
      	(nautilus_timed_wait_stop): Re-did timed wait API now that
      	we are really using it. Still unimplemented.
      	* src/Makefile.am:
      	Since IDL dependencies are not understood by automake, added
      	an explicit one so we pick up the change to the libnautilus
      	view component IDL.
      	* src/file-manager/fm-error-reporting.h:
      	* src/file-manager/fm-error-reporting.c: (rename_callback),
      	(cancel_rename_callback), (fm_rename_file): Moved code for
      	renaming into here so it can be shared between the icon view
      	and the properties dialog. Perhaps it needs to be renamed.
      	* src/file-manager/fm-icon-view.c:
      	(fm_icon_view_icon_text_changed_callback): Use the shared
      	code instead of having the rename code here.
      	* src/nautilus-application.c: (create_object): Make a new
      	shell object each time instead of trying to share one.
      	(nautilus_application_startup): Activate the shell object
      	using OAF. This makes it work across processes and adds
      	the feature.
      	* src/nautilus-main.c: (main): Call bonobo_activate explicitly so
      	CORBA calls work before the main loop.
      	* src/nautilus-shell.c: (display_caveat_first_time),
      	(corba_manage_desktop): Got rid of all state in NautilusShell
      	so we can use multiple shell objects if we want.
      	* src/nautilus-sidebar.c: (nautilus_sidebar_update_info):
      	Got rid of code that checks for NULL.
  18. 27 Jun, 2000 1 commit
    • John Sullivan's avatar
      Finished task 876 (owner and group should be changeable · a77ea1f8
      John Sullivan authored
      	in Properties window). The only part I didn't get done was
      	using asynch gnome-vfs calls. I made that part of bug 845.
      	* libnautilus-extensions/nautilus-string.h,
      	* libnautilus-extensions/nautilus-string.c:
      	(nautilus_strcasecmp): New NULL-handling form of
      	* libnautilus-extensions/nautilus-glib-extensions.h,
      	* libnautilus-extensions/nautilus-glib-extensions.c:
      	(nautilus_g_str_list_sort_case_insensitive): New functions
      	to sort a list of strings.
      	(compare_strings), (compare_strings_case_insensitive):
      	New helper routines used by the new _sort calls.
      	* src/nautilus-window-manage-views.c:
      	(nautilus_window_report_selection_change): Use
      	* libnautilus-extensions/nautilus-file.h,
      	* libnautilus-extensions/nautilus-file.c:
      	(user_has_real_name): New helper function, returns TRUE
      	if a password-file-entry user has a real name distinguishable
      	from the username.
      	(get_user_name_from_id), (get_user_and_real_name_from_id),
      	(get_group_id_from_group_name), (get_ids_from_user_name),
      	(get_user_id_from_user_name), (get_group_id_from_user_name):
      	New helper functions for converting between user & group
      	names & ids.
      	(get_id_from_digit_string): New helper function for converting
      	between	an integer as text and an integer.
      	(nautilus_get_user_names): New public function for getting the
      	list of all user names, with the real name (if distinguishable)
      	thrown in for good measure.
      	(nautilus_get_group_names): New public function for getting the
      	list of all group names.
      	(nautilus_file_can_get_owner), (nautilus_file_get_owner_name),
      	(nautilus_file_can_set_owner), (nautilus_file_set_owner),
      	(nautilus_file_can_get_group), (nautilus_file_get_group_name),
      	(nautilus_file_can_set_group), (nautilus_file_set_group):
      	New public functions for reading and setting the group and owner.
      	The setters define an asynch API though currently they're
      	using non-asynch calls internally.
      	(nautilus_file_get_settable_group_names): New public function
      	returning a list of all group names that the current user can
      	set this file's group to.
      	(group_includes_user), (nautilus_get_group_names_including):
      	New helper functions used by _get_settable_group_names.
      	(nautilus_file_get_owner_as_string): Now optionally includes
      	real name in result.
      	(nautilus_file_get_string_attribute): Changed to call
      	_get_owner_as_string with the real name included.
      	* src/file-manager/fm-error-reporting.h:
      	* src/file-manager/fm-error-reporting.c:
      	(fm_report_error_setting_group), (fm_report_error_setting_owner):
      	Error messages for when our predictions fail for whether a
      	group or owner-setting operation will succeed.
      	* src/file-manager/fm-properties-window.c:
      	(file_name_pair_new), (file_name_pair_free): New helper functions
      	for passing around a file and string together (used in callbacks).
      	(group_change_callback), (activate_group_callback),
      	(create_group_menu_item), (synch_groups_menu),
      	(attach_group_menu), (owner_change_callback),
      	(activate_owner_callback), (create_owner_menu_item),
      	(synch_user_menu), (attach_owner_menu): New functions for setting
      	up widgets for display and control of owner and group.
      	(add_special_execution_flags): Use attach_title_field instead of
      	(permissions_label_update), (add_permissions_row_label): Removed
      	these no-longer-needed functions.
      	(add_permissions_column_label): Change row number constants to
      	match new layout.
      	(create_permissions_page): Use static text for owner & group if
      	non-editable, option menu if editable.
      	(get_property_names): Now calls nautilus_g_str_list_sort.
  19. 11 May, 2000 1 commit
    • Darin Adler's avatar
      Changed to do both rename and set permissions with an interface that will · 2840365b
      Darin Adler authored
      	* libnautilus-extensions/nautilus-file.h:
      	* libnautilus-extensions/nautilus-file.c: (nautilus_file_rename):
      	(nautilus_file_set_permissions): Changed to do both rename and set
      	permissions with an interface that will work for async. Also
      	improved the handling of deleted files, empty-string names, and
      	files you can't change permissions on: they are considering
      	runtime errors instead of coding mistakes now. Also send out
      	file_changed even if the call fails.
      	* src/file-manager/fm-error-reporting.h:
      	* src/file-manager/fm-error-reporting.c: (show_error_message_box),
      	(fm_report_error_setting_permissions): Simplified interface to
      	these calls. Now we don't require the caller to pass anything we
      	can compute ourselves and you can call these with GNOME_VFS_OK
      	and they will do nothing. Also merged common code to put up the
      	error message box into a helper function.
      	* src/file-manager/fm-icon-view.c: (rename_callback),
      	* src/file-manager/fm-properties-window.c: (rename_callback),
      	(name_field_done_editing), (permission_change_callback),
      	Updated callers to use the new calls.
  20. 09 May, 2000 1 commit
    • John Sullivan's avatar
      Finished task 547 (show and set permissions in · 0eed6a7d
      John Sullivan authored
      	Properties window). It's kinda geeky as unix
      	permissions like to be. As always, I welcome feedback
      	about this UI.
      	* libnautilus-extensions/nautilus-file.h,
      	* libnautilus-extensions/nautilus-file.c:
      	(nautilus_file_can_get_permissions): New function, checks
      	whether the permissions of a file can be determined.
      	(nautilus_file_can_set_permissions): New function, checks
      	whether the current user is capable of changing the
      	permissions of a file.
      	(nautilus_file_is_executable): Deploy _can_get_permissions.
      	(nautilus_file_get_permissions): New function, returns
      	permissions for file.
      	(nautilus_file_set_permissions): New function, changes
      	permissions for file. Returns GnomeVFSResult that reports
      	whether change succeeded.
      	* src/file-manager/fm-properties-window.c: (add_prompt),
      	(get_pixmap_and_mask_for_properties_window), (install_value_field),
      	(install_title_value_pair), (create_page_with_vbox),
      	(apply_standard_table_padding), (create_attribute_value_table),
      	(create_page_with_table_in_vbox), (create_emblems_page),
      	(permissions_label_update), (add_permissions_row_label),
      	(permissions_check_button_toggled), (add_permissions_checkbox),
      	(create_permissions_page), (create_more_page): Lots of new code
      	and refactoring to display the permissions UI.
      	* src/file-manager/fm-error-reporting.h,
      	* src/file-manager/fm-error-reporting.c:
      	(fm_report_error_setting_permissions): New function to
      	complain to user if attempt to set permissions fails.
      	The UI won't let the user try to set the permissions if
      	nautilus_file_can_set_permissions returns FALSE, but there
      	can always be oddball failures for other reasons.
  21. 05 Apr, 2000 1 commit
    • John Sullivan's avatar
      Renaming a file from its Set Properties dialog now works, though · dc703c8b
      John Sullivan authored
      	there are various odds and ends I still need to clean up.
      	It turned out (surprise!) that there was a lot of
      	underpinnings work involved in implementing this feature.
      	Fortunately most of it will be shared by rename-in-place.
      	* libnautilus/nautilus-directory-private.h:
      	add #define for METADATA_NODE_NAME_FOR_FILE_NAME
      	* libnautilus/nautilus-directory.c:
      	(nautilus_directory_get_file_metadata_node): Use
      	(nautilus_directory_set_file_metadata): Use g_return_val_if_fail
      	to prevent callers from changing the file name this way, since
      	that wouldn't work right.
      	* libnautilus/nautilus-file.h:
      	* libnautilus/nautilus-file.c:
      	(nautilus_file_can_rename): New function, returns TRUE if the
      	user has write permission for this file.
      	(nautilus_file_rename): New function, uses gnome_vfs_move to
      	try to rename the file, updating metadata as appropriate.
      	Returns the GnomeVFSResult from gnome_vfs_move.
      	* libnautilus/nautilus-list.c
      	(row_selected): Renamed this formerly private function to
      	nautilus_list_is_row_selected and made it check its parameters
      	more carefully.
      	* libnautilus/nautilus-list.h:
      	(nautilus_list_is_row_selected): Made this public.
      	* src/file-manager/fm-error-reporting.c,
      	* src/file-manager/fm-error-reporting.h: New files, home for
      	UI code to display user error messages and such. It's initial
      	occupant is:
      	(fm_report_error_renaming_file): New function, puts up a non-modal
      	alert reporting the renaming failure.
      	* src/file-manager/Makefile.am: Add these two new files to the build.
      	* src/file-manager/fm-directory-view.c:
      	(bonobo_menu_open_properties_window_cb): New function, opens a
      	Properties window for each selected item using the Bonobo callback API.
      	(fm_directory_view_real_merge_menus): Include Set Properties item in
      	File menu, and rearrange other items a little.
      	(fm_directory_view_real_update_menus): Update sensitivity of Set
      	Properties menu item.
      	* src/file-manager/fm-list-view.c:
      	(add_to_list): Return the new row index.
      	(fm_list_view_file_changed): Remove and reinsert the changed file; this
      	not only does less sorting but also recomputes all the text so name
      	changes will be displayed.
      	* src/file-manager/fm-properties-window.c:
      	New functions used to wire up the new editable name field
      	and new icon pixmap widget in the properties window.
      	(create_properties_window): Added notebook tabs, first
      	one is Basic and currently contains icon & name; second
      	is Emblems and has all those checkboxes. Use all the
      	new functions to create and wire up things so that name
      	changes & icon changes are propagated and reflected correctly.
      	* src/nautilus-bookmarks-window.c:
      	(create_bookmarks_window): Removed a bunch of unnecessary
      	and leak-causing gtk_widget_refs that I happened to notice
      	in here. I left these behind when modifying code originally
      	created by glade, where the refs are necessary.
  22. 08 Mar, 2000 1 commit
    • Darin Adler's avatar
      Broke the file part of nautilus-directory.[ch] into nautilus-file.[ch]. · 6ba4e1e5
      Darin Adler authored
      	* components/music/nautilus-music-view.c,
      	components/notes/ntl-notes.c, libnautilus/Makefile.am,
      	libnautilus/nautilus-file-private.h, libnautilus/nautilus-file.h,
      	libnautilus/nautilus-file.c, libnautilus/nautilus-icon-factory.h,
      	src/ntl-index-panel.c, src/file-manager/fm-directory-view.h:
      	Broke the file part of nautilus-directory.[ch] into
      	* libnautilus/nautilus-string.c (nautilus_strstrip): Added more
      	tests. Changed algorithm on strstrip so it's linear instead of
      	* libnautilus/gnome-icon-container.c
      	(gnome_icon_container_initialize): Fixed font for "larger" zoom
      	level. Also made it assert if the font can't be loaded.
      	* components/help/hyperbola-nav-index.c (despace):
      	Fixed warning.
      	* libnautilus/gnome-icon-container-dnd.c,
      	libnautilus/nautilus-string.h: Whitespace.
      	* src/file-manager/Makefile.am,
      	src/file-manager/fm-properties-window.c: Added properties window
      	hook, but no window yet. The menu item still needs to be added to
      	the main menus as well as the context menus.
      	* src/file-manager/fm-directory-view.c,
      	src/file-manager/fm-icon-text-window.c: A little cleanup. Shorter
  23. 10 Feb, 2000 1 commit
  24. 08 Feb, 2000 1 commit
  25. 03 Jan, 2000 2 commits
  26. 30 Dec, 1999 1 commit