1. 06 Oct, 2015 1 commit
    • Carlos Soriano Sánchez's avatar
      dnd: use GtkPlacesSidebar drop targets hints · 749a8644
      Carlos Soriano Sánchez authored
      Currently the dnd on the sidebar is only triggered when hovering
      above the sidebar itself. However we would like to give some
      feedback all along on the dnd operation.
      For that GtkPlacesSidebar has set_drop_targets_visible public API,
      which was implemented a few months ago and the GtkFileChooser is
      already using.
      
      I just forgot to implement the support for it on Nautilus... even if
      the original work was done for Nautilus, since users will probably
      use dnd more on nautilus than on the file chooser.
      
      I'm not entirely happy with the implementation, since it uses custom
      functions to access the drag data, given that we need them at drag-begin
      time and in random places on the code, since nautilus is doing all the dnd
      work manually and on different places.
      The final result is that drag and drop is still managed mostly on its own
      widgets, in this case list-view and canvas-view, and nautilus-dnd manages
      a central accessor for dnd in nautilus, in this case requesting depending
      on the widget that is the owner of the data, its data through the custom
      functions of that particula widget. All other ways I tried to do it entirely
      with only gtk_drag_* or gdk_drag_* functions were in vanish if no a complete
      refactoring is done, and probably it doesn't worth the effort. Also I
      actually separated the list view dnd code as well, so now at least the
      pattern to handling dnd on nautilus is more or less consistent.
      749a8644
  2. 23 May, 2015 1 commit
  3. 17 Feb, 2014 1 commit
  4. 31 Jan, 2014 1 commit
  5. 10 Apr, 2013 1 commit
  6. 22 Jan, 2013 2 commits
  7. 31 May, 2012 1 commit
  8. 09 May, 2012 1 commit
  9. 11 Apr, 2012 2 commits
  10. 18 Oct, 2011 1 commit
  11. 04 Apr, 2011 1 commit
    • Cosimo Cecchi's avatar
      dnd: rework handling of _NETSCAPE_URL dnd links · edd3c43b
      Cosimo Cecchi authored
      Previously we used to to the following:
      * default to always "ask", unless the copy was explicit
      * when dropped, we did not actually ask anything but we would trigger an
        async mimetype query_info and:
        - trigger a file asking whether to download or to link for text files
        - silently link for HTML files
        - silently download for every other mimetype
      * if the query_info was not completed within one second, we would
        download by default
      
      This is somewhat broken, as the DnD icon is not what you would expect;
      also downloading is not usually done with DnD from the browser, and it's
      also expensive, so it should never be the default, but an explicit
      choice. It also makes it impossible to create links for anything else
      than text or HTML.
      
      Change the policy to always link by default, unless the user explicitly
      requests the copy.
      edd3c43b
  12. 11 Jan, 2011 3 commits
    • Cosimo Cecchi's avatar
      Rework architecture of NautilusView/FMDirectoryView · dedd9e11
      Cosimo Cecchi authored
      As a second step after ff5c759b3784db2d0cd71e1cde613dda007c3985, this
      removes the NautilusView/FMDirectoryView interface split, changing
      FMDirectoryView to be NautilusView directly.
      
      Left to do: complete renaming the public fm_directory_view methods to
      nautilus_view, and get rid of src/file-manager entirely.
      dedd9e11
    • Cosimo Cecchi's avatar
      Rework architecture of NautilusWindow/NautilusWindowSlotInfo · ad0d377a
      Cosimo Cecchi authored
      In the past, nautilus was designed keeping in mind the concept that it
      might not just be a file browser, but a sort of platform to embed
      various kind of views in it.
        - libnautilus-private: general lowlevel items, such as the icon
          container, NautilusFile, I/O and so on
        - src: general widgets and UI items
        - src/file-manager: file manager views, agnostic of what's in src/,
          for the sake of being pluggable enough
      
      This is really not applicable anymore, as nautilus won't go in any
      direction other than being a file manager; at the same time, this
      complicates code and architecture quite a lot.
      
      In this commit, as a first step towards a more clean codebase, we remove
      the NautilusWindowInfo and NautilusWindowSlotInfo interfaces, using
      NautilusWindow and NautilusWindowSlot directly.
      
      Note that there should be no actual code changes, only moving of pieces
      around.
      ad0d377a
    • Cosimo Cecchi's avatar
      dnd: move DnD slot proxying code to src/ · 97e67f49
      Cosimo Cecchi authored
      97e67f49
  13. 16 Nov, 2010 1 commit
  14. 31 Oct, 2010 1 commit
  15. 29 Sep, 2010 1 commit
  16. 11 Jun, 2010 1 commit
  17. 10 Oct, 2009 1 commit
  18. 07 Sep, 2009 1 commit
  19. 21 Apr, 2009 1 commit
    • Cosimo Cecchi's avatar
      Remove deprecated GDK/GTK+ symbols · b695c970
      Cosimo Cecchi authored
      Remove all uses of deprecated GDK and GTK+ symbols, replacing them
      with the currently supported equivalents.
      Based on a patch from Tal Benavidor (#565038).
      b695c970
  20. 06 Apr, 2009 1 commit
  21. 12 Oct, 2008 1 commit
  22. 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
      c9aff00e
  23. 13 Aug, 2008 1 commit
  24. 20 Jul, 2008 1 commit
    • Christian Neumair's avatar
      Query filesystem ID, as referenced string. Use it to determine whether two · ab67b661
      Christian Neumair authored
      2008-07-20  Christian Neumair  <cneumair@gnome.org>
      
      	* libnautilus-private/nautilus-dnd.c (check_same_fs),
      	(nautilus_drag_default_drop_action_for_icons):
      	* libnautilus-private/nautilus-file-private.h:
      	* libnautilus-private/nautilus-file.c (nautilus_file_clear_info),
      	(finalize), (update_info_internal),
      	(nautilus_file_get_filesystem_id):
      	* libnautilus-private/nautilus-file.h:
      	Query filesystem ID, as referenced string. Use it to determine whether
      	two files are on the same FS during DND. Gets rid of synchronous I/O.
      
      svn path=/trunk/; revision=14376
      ab67b661
  25. 14 Jul, 2008 1 commit
    • Christian Neumair's avatar
      Also support a mode where the target URI is NULL, and the target slot is · 82d2b78b
      Christian Neumair authored
      2008-07-15  Christian Neumair  <cneumair@gnome.org>
      
      	* libnautilus-private/nautilus-dnd.c (slot_proxy_drag_motion),
      	(nautilus_drag_slot_proxy_init):
      	Also support a mode where the target URI is NULL, and the target slot is
      	set.
      
      	* src/nautilus-notebook.c (build_tab_label):
      	Set up notebook labels as slot drag proxy, replace old DND code.
      
      svn path=/trunk/; revision=14360
      82d2b78b
  26. 13 Jul, 2008 1 commit
    • Christian Neumair's avatar
      Add simple slot drop proxy API to libnautilus-private, centered around · d4f08bc0
      Christian Neumair authored
      2008-07-13  Christian Neumair  <cneumair@gnome.org>
      
      	* libnautilus-private/nautilus-dnd.c
      	(nautilus_drag_uri_array_from_selection_list),
      	(nautilus_drag_uri_list_from_selection_list),
      	(nautilus_drag_uri_array_from_list),
      	(nautilus_drag_uri_list_from_array), (slot_proxy_drag_motion),
      	(drag_info_clear), (slot_proxy_drag_leave), (slot_proxy_drag_drop),
      	(slot_proxy_handle_drop), (slot_proxy_drag_data_received),
      	(nautilus_drag_slot_proxy_init):
      	* libnautilus-private/nautilus-dnd.h:
      	Add simple slot drop proxy API to libnautilus-private, centered
      	around nautilus_drag_slot_proxy_init().
      	The notebook tab label drop targets will later be ported to this API.
      
      	Add API for converting URI lists to URI arrays, and for constructing
      	URI lists and arrays from selection lists.
      
      	* src/nautilus-notebook.c (notebook_tab_drag_data_received):
      	Use nautilus_drag_uri_array_from_selection_list().
      
      	* src/nautilus-pathbar.c (slider_timeout),
      	(nautilus_path_bar_slider_drag_motion),
      	(nautilus_path_bar_slider_drag_leave), (nautilus_path_bar_init),
      	(nautilus_path_bar_finalize), (button_data_free),
      	(button_drag_data_get_cb), (setup_button_drag_source),
      	(make_directory_button):
      	* src/nautilus-pathbar.h:
      	Add path bar drop targets, use nautilus_drag_slot_proxy_init() for
      	setup.
      	Also offer GNOME icon lists as drag target.
      	Reveal hidden paths when hovering over the up/down sliders for some
      	time. Fixes #309842.
      
      svn path=/trunk/; revision=14356
      d4f08bc0
  27. 12 Jun, 2008 1 commit
    • Cosimo Cecchi's avatar
      Don't use g_free () on a GFile. (#537995). · 268be6eb
      Cosimo Cecchi authored
      2008-06-12  Cosimo Cecchi  <cosimoc@gnome.org>
      
      	* libnautilus-private/nautilus-dnd.c:
      	(nautilus_drag_default_drop_action_for_icons):
      	Don't use g_free () on a GFile. (#537995).
      
      svn path=/trunk/; revision=14261
      268be6eb
  28. 29 May, 2008 1 commit
    • Christian Neumair's avatar
      Support adding files to archives via file-roller. Thanks to Nelson · aea86247
      Christian Neumair authored
      2008-05-29  Christian Neumair  <cneumair@gnome.org>
      
      	* libnautilus-private/nautilus-dnd.c
      	(nautilus_drag_default_drop_action_for_icons):
      	* libnautilus-private/nautilus-file-dnd.c
      	(nautilus_drag_can_accept_files):
      	* libnautilus-private/nautilus-file-utilities.c
      	(nautilus_is_file_roller_installed):
      	* libnautilus-private/nautilus-file-utilities.h:
      	* libnautilus-private/nautilus-file.c (nautilus_file_is_archive):
      	* libnautilus-private/nautilus-file.h:
      	* src/file-manager/fm-directory-view.c
      	(fm_directory_view_move_copy_items):
      	Support adding files to archives via file-roller.
      	Thanks to Nelson Benítez. Fixes #377157.
      
      svn path=/trunk/; revision=14208
      aea86247
  29. 26 May, 2008 1 commit
    • Cosimo Cecchi's avatar
      Select GDK_ACTION_MOVE as default action when DnD-ing a uri list into the · 542f240b
      Cosimo Cecchi authored
      2008-05-27  Cosimo Cecchi  <cosimoc@gnome.org>
      
      	* libnautilus-private/nautilus-dnd.c:
      	(nautilus_drag_default_drop_action_for_uri_list):
      	* libnautilus-private/nautilus-dnd.h:
      	* libnautilus-private/nautilus-icon-dnd.c:
      	(nautilus_icon_container_get_drop_action):
      	Select GDK_ACTION_MOVE as default action when DnD-ing a uri list
      	into the trash. (#534769).
      
      svn path=/trunk/; revision=14200
      542f240b
  30. 21 May, 2008 1 commit
  31. 08 May, 2008 1 commit
    • Cosimo Cecchi's avatar
      Plugged some leaks around. Cleaned up this bit of code. · 0b7f4638
      Cosimo Cecchi authored
      2008-05-09  Cosimo Cecchi  <cosimoc@gnome.org>
      
      	* libnautilus-private/nautilus-dnd.c:
      	(nautilus_drag_file_local_internal), (nautilus_drag_drag_data_get):
      	* libnautilus-private/nautilus-open-with-dialog.c:
      	(add_or_find_application):
      	* libnautilus-private/nautilus-program-choosing.c:
      	(nautilus_launch_application):
      	* src/nautilus-sidebar-title.c: (update_icon):
      	* src/nautilus-spatial-window.c:
      	(got_file_info_for_location_menu_callback):
      	* libnautilus-private/nautilus-file.c: (get_custom_icon):
      	Plugged some leaks around.
      	* libnautilus-private/nautilus-file.c: (is_uri_relative):
      	Cleaned up this bit of code.
      
      	Bug #532126.
      
      svn path=/trunk/; revision=14149
      0b7f4638
  32. 21 Feb, 2008 1 commit
    • David Zeuthen's avatar
      Use g_volume_should_automount() to determine if we should autorun programs · 00e59a6b
      David Zeuthen authored
      2008-02-21  David Zeuthen  <davidz@redhat.com>
      
      	* libnautilus-private/nautilus-autorun.c: (should_autorun_mount):
      	Use g_volume_should_automount() to determine if we should autorun
      	programs on a mount.
      
      	* libnautilus-private/nautilus-directory-async.c:
      	(nautilus_directory_set_up_request),
      	(nautilus_async_destroying_file), (lacks_filesystem_info),
      	(wants_filesystem_info), (request_is_satisfied),
      	(directory_count_start), (mime_list_start),
      	(filesystem_info_cancel), (filesystem_info_stop),
      	(filesystem_info_state_free), (got_filesystem_info),
      	(query_filesystem_info_callback), (filesystem_info_start),
      	(start_or_stop_io), (nautilus_directory_cancel),
      	(cancel_filesystem_info_for_file), (cancel_loading_attributes),
      	(nautilus_directory_cancel_loading_file_attributes):
      	* libnautilus-private/nautilus-directory-private.h:
      	* libnautilus-private/nautilus-file-attributes.h: Add new
      	filesystem info attribute; right now two bits in NautilusFile's
      	private structure are set; the filesystem::use-preview and
      	filesystem:readonly.
      
      	* libnautilus-private/nautilus-file-operations.c:
      	(nautilus_file_operations_mount_volume):
      	* src/nautilus-places-sidebar.c: (open_selected_bookmark),
      	(mount_shortcut_cb): Don't inhibit automount from
      	nautilus_file_operations_mount_volume() because then everything
      	will be inhibited as the mount_added callback use it as
      	well. Rather, move the call to inhibit out to the proper call
      	sites.
      
      	* libnautilus-private/nautilus-file-private.h:
      	* libnautilus-private/nautilus-file.c:
      	(nautilus_file_get_filesystem_use_preview),
      	(nautilus_file_should_show_thumbnail),
      	(get_speed_tradeoff_preference_for_file),
      	(nautilus_file_get_mount):
      	* libnautilus-private/nautilus-file.h:
      	* src/file-manager/fm-directory-view.c: (load_directory):
      	* src/file-manager/fm-icon-view.c: (should_preview_sound):
      	* src/nautilus-window-manage-views.c: (update_for_new_location):
      	Use the new filesystem::use-preview hint to determine if we should
      	preview non-native files (such as gphoto2:// and cdda://
      	mounts). 
      
      
      svn path=/trunk/; revision=13795
      00e59a6b
  33. 15 Feb, 2008 1 commit
  34. 13 Feb, 2008 1 commit
    • Alexander Larsson's avatar
      Add nautilus_file_is_launcher() · 454b224e
      Alexander Larsson authored
      2008-02-13  Alexander Larsson  <alexl@redhat.com>
      
              * libnautilus-private/nautilus-file.[ch]:
              * libnautilus-private/nautilus-file-private.h:
      	Add nautilus_file_is_launcher()
      	
              * libnautilus-private/nautilus-directory-async.c:
              * libnautilus-private/nautilus-dnd.c:
              * libnautilus-private/nautilus-link.[ch]
              * libnautilus-private/nautilus-mime-actions.c:
              * libnautilus-private/nautilus-program-choosing.[ch]:
              * src/file-manager/fm-directory-view.c:
              * src/file-manager/fm-tree-view.c:
      	Remove weird desktop-file: and command: hacks, and
      	replace with usage and implementation of
      	nautilus_file_is_launcher().
      	This fixes some problems where the old desktop-file uri
      	was interpreted as an actual file.
      
      
      svn path=/trunk/; revision=13734
      454b224e
  35. 04 Feb, 2008 1 commit
    • Alexander Larsson's avatar
      Default to move when dragging from trash. · 6a589b29
      Alexander Larsson authored
      2008-02-04  Alexander Larsson  <alexl@redhat.com>
      
      	* libnautilus-private/nautilus-dnd.c ()
      	(nautilus_drag_default_drop_action_for_icons):
      	Default to move when dragging from trash.
      
      
      svn path=/trunk/; revision=13692
      6a589b29
  36. 15 Jan, 2008 1 commit
    • Alexander Larsson's avatar
      Add nautilus_drag_uris_local · e2b876ac
      Alexander Larsson authored
      2008-01-15  Alexander Larsson  <alexl@redhat.com>
      
              * libnautilus-private/nautilus-dnd.[ch]:
      	Add nautilus_drag_uris_local
      	
              * libnautilus-private/nautilus-tree-view-drag-dest.c:
      	Don't copy/move files if you dnd within the same
      	location (#508216)
      
      
      
      svn path=/trunk/; revision=13610
      e2b876ac