Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:xfdesktop:port-to-gio [2010/09/12 16:00] – jannis | dev:xfdesktop:port-to-gio [2010/10/17 13:10] (current) – 217.229.117.83 | ||
---|---|---|---|
Line 40: | Line 40: | ||
Make the interface method '' | Make the interface method '' | ||
+ | ==== xfdesktop-file-icon-manager.{c, | ||
+ | === xfdesktop_file_icon_menu_rename() === | ||
+ | Use Thunar' | ||
+ | need the '' | ||
+ | instead of '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_trash_files() === | ||
+ | |||
+ | Again, use '' | ||
+ | to obtain the URIs of the files supposed to be trashed. | ||
+ | |||
+ | === xfdesktop_file_icon_menu_mime_app_executed() === | ||
+ | |||
+ | Use '' | ||
+ | instead of '' | ||
+ | before and after this call (similar to how Thunar does it). | ||
+ | |||
+ | === xfdesktop_menu_item_from_mime_handler() === | ||
+ | |||
+ | Replace this method with a similar one based on '' | ||
+ | '' | ||
+ | |||
+ | === xfdesktop_file_icon_menu_open_folder() === | ||
+ | |||
+ | We don't need the '' | ||
+ | instead of '' | ||
+ | take a '' | ||
+ | |||
+ | === xfdesktop_file_icon_menu_open_desktop() === | ||
+ | |||
+ | See the previous function. | ||
+ | |||
+ | === xfdesktop_file_icon_menu_other_app() === | ||
+ | |||
+ | Again, we only need the '' | ||
+ | Replace '' | ||
+ | and '' | ||
+ | |||
+ | === xfdesktop_file_icon_menu_properties() === | ||
+ | |||
+ | Again, we only need the '' | ||
+ | properties dialog (what' | ||
+ | parts of xfdesktop to be working anyway). | ||
+ | |||
+ | === xfdesktop_file_icon_create_directory_error() === | ||
+ | |||
+ | Remove this function. We'll create directories through the Thunar D-Bus API. We'll | ||
+ | probably have to add another D-Bus method for creating directories. | ||
+ | |||
+ | === xfdesktop_file_icon_menu_create_launcher() === | ||
+ | |||
+ | Use a '' | ||
+ | the file URI. Feed exo-desktop-item-edit with the URI instead of a local path. | ||
+ | The function '' | ||
+ | xfce4-panel/ | ||
+ | this. | ||
+ | |||
+ | === xfdesktop_file_icon_menu_create_folder() === | ||
+ | |||
+ | Create the directory using a new Thunar D-Bus method instead of implementing | ||
+ | this feature in xfdesktop internally. We'll have to create the D-Bus method | ||
+ | first. It should be called '' | ||
+ | type parameter). Need to think about this a bit more. | ||
+ | |||
+ | === xfdesktop_file_icon_create_file_error() === | ||
+ | |||
+ | Remove this function. | ||
+ | |||
+ | === xfdesktop_file_icon_interactive_job_ask() === | ||
+ | |||
+ | Remove this function. | ||
+ | |||
+ | === xfdesktop_file_icon_template_item_activated() === | ||
+ | |||
+ | TODO: This needs more thought. Thunar implements the same functionality, | ||
+ | maybe we can reuse its implementation through D-Bus. If not, then at least | ||
+ | the ThunarVFS stuff should be replaced with '' | ||
+ | calls to '' | ||
+ | be replaced with Thunar D-Bus method calls. | ||
+ | |||
+ | === info_compare() === | ||
+ | |||
+ | If this is still needed after the other refactorings, | ||
+ | '' | ||
+ | |||
+ | === xfdesktop_file_icon_menu_fill_template_menu() === | ||
+ | |||
+ | Use '' | ||
+ | ThunarVFS structures. Maybe we can reuse some code from Thunar implementing | ||
+ | the same thing. | ||
+ | |||
+ | === xfdesktop_file_icon_manager_populate_context_menu() === | ||
+ | |||
+ | Use '' | ||
+ | Use '' | ||
+ | '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_add_icon() === | ||
+ | |||
+ | Use '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_add_regular_icon() === | ||
+ | |||
+ | Use '' | ||
+ | '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_add_volume_icon() === | ||
+ | |||
+ | Use '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_vfs_monitor_cb() === | ||
+ | |||
+ | Replace this with a monitor callback for '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_listdir_infos_ready_cb() === | ||
+ | |||
+ | This function will have to be replaced with something similar because we | ||
+ | cannot use the list dir job from ThunarVfsJob anymore. | ||
+ | |||
+ | === xfdesktop_file_icon_manager_listdir_finished_cb() === | ||
+ | |||
+ | This function will have to be replaced with something similar because we | ||
+ | cannot use the list dir job from ThunarVfsJob anymore. | ||
+ | |||
+ | === xfdesktop_file_icon_manager_listdir_error_cb() === | ||
+ | |||
+ | This function will have to be replaced with something similar because we | ||
+ | cannot use the list dir job from ThunarVfsJob anymore. | ||
+ | |||
+ | === xfdesktop_file_icon_manager_load_desktop_folder() === | ||
+ | |||
+ | Asynchronously load the folder using '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_volume_changed() === | ||
+ | |||
+ | Replace this function with a similar one based on '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_add_removable_volume() === | ||
+ | |||
+ | The calls to '' | ||
+ | need to be replaced with something similar based on '' | ||
+ | same problem solved with this code: | ||
+ | |||
+ | * http:// | ||
+ | * http:// | ||
+ | |||
+ | === xfdesktop_file_icon_manager_volumes_added() === | ||
+ | |||
+ | This will be replaced with a handler for the '' | ||
+ | '' | ||
+ | '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_volumes_removed() === | ||
+ | |||
+ | Similar to the previous function, this one should be replaced with one | ||
+ | that handles a single '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_load_removable_media() === | ||
+ | |||
+ | Use the '' | ||
+ | We'll need new callbacks for some of them. | ||
+ | |||
+ | === xfdesktop_file_icon_manager_remove_removable_media() === | ||
+ | |||
+ | Needs to iterate over the volumes hash table, disconnect from all | ||
+ | returned volumes, destroy all volume icons and disconnect from the | ||
+ | '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_real_init() === | ||
+ | |||
+ | Get rid of the '' | ||
+ | The hash table needs to use either URIs or '' | ||
+ | and equal functions for them. URIs are easier due to the availability of string | ||
+ | hash and equal functions, I guess. | ||
+ | |||
+ | We'll have to change the '' | ||
+ | to a '' | ||
+ | '' | ||
+ | if the '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_fini() === | ||
+ | |||
+ | The counterpart to the previous function. Same deal. | ||
+ | |||
+ | === xfdesktop_file_icon_manager_drag_drop() === | ||
+ | |||
+ | Use ''' | ||
+ | can then be determined with '' | ||
+ | |||
+ | Use '' | ||
+ | instead of '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_drag_data_received() === | ||
+ | |||
+ | Use '' | ||
+ | '' | ||
+ | of '' | ||
+ | |||
+ | * http:// | ||
+ | |||
+ | We'll need a bit of custom code to execute the executable target file with the dropped | ||
+ | files as parameters. There are two possibilities: | ||
+ | then we can parse it into a '' | ||
+ | then we can simply spawn it (make sure to pass the file parameters and implement startup | ||
+ | notification). | ||
+ | |||
+ | The code block dealing with jobs needs to be reworked around '' | ||
+ | and the Thunar D-Bus API completely. Maybe danielm' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_drag_data_get() === | ||
+ | |||
+ | We need to replace '' | ||
+ | like '' | ||
+ | '' | ||
+ | Thunar can serve as an inspiration here: | ||
+ | |||
+ | * http:// | ||
+ | |||
+ | === xfdesktop_file_icon_manager_new() === | ||
+ | |||
+ | Change the '' | ||
+ | |||
+ | === _XfdesktopFileIconManagerPrivate === | ||
+ | |||
+ | Change the '' | ||
+ | |||
+ | Replace the '' | ||
+ | the '' | ||
+ | |||
+ | Remove the '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_class_init() === | ||
+ | |||
+ | Alter the " | ||
+ | using the '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_set_property() === | ||
+ | |||
+ | Change the " | ||
+ | type made in the class_init function. | ||
+ | |||
+ | === xfdesktop_file_icon_manager_get_property() === | ||
+ | |||
+ | Same here, see above. | ||
+ | |||
+ | === xfdesktop_file_icon_manager_finalize() === | ||
+ | |||
+ | Use '' | ||
+ | |||
+ | === xfdesktop_file_icon_manager_check_create_desktop_folder() === | ||
+ | |||
+ | Replace the code with something similar based on '' | ||
+ | '' | ||
+ | |||
+ | ==== xfdesktop-file-properties-dialog.{c, | ||
+ | |||
+ | Remove entirely. We'll re-use Thunar' | ||
+ | ==== xfdesktop-file-utils.{c, | ||
+ | |||
+ | === xfdesktop_file_utils_interactive_job_ask() === | ||
+ | |||
+ | Remove. We'll no longer implement anything job-related in xfdesktop itself. | ||
+ | |||
+ | === xfdesktop_file_utils_handle_fileop_error() === | ||
+ | |||
+ | Remove as well. | ||
+ | |||
+ | === xfdesktop_file_utils_get_file_kind() === | ||
+ | |||
+ | If this is still needed after refactoring, | ||
+ | and rewrite the checks based on '' | ||
+ | |||
+ | === xfdesktop_file_utils_file_icon_list_to_path_list() === | ||
+ | |||
+ | Replace with a function called '' | ||
+ | that creates a list of '' | ||
+ | |||
+ | === xfdesktop_file_utils_get_fallback_icon() === | ||
+ | |||
+ | No longer needed, remove. '' | ||
+ | |||
+ | === xfdesktop_file_utils_get_file_icon() === | ||
+ | |||
+ | We have two options here: either remove and use '' | ||
+ | load and return a '' | ||
+ | |||
+ | TODO We'll have to investigate where '' | ||
+ | being used and how. | ||
+ | |||
+ | === xfdesktop_file_utils_launch_fallback() === | ||
+ | |||
+ | Remove. We don't use a D-Bus fallback here as we rely on the D-Bus API of Thunar so | ||
+ | hard that we can't provide any real functionality without it anyway. | ||
+ | |||
+ | === xfdesktop_file_utils_display_folder_cb() === | ||
+ | |||
+ | Remove fallback code. | ||
+ | ==== xfdesktop-regular-file-icon.{c, | ||
+ | |||
+ | === _XfdesktopRegularFileIconPrivate === | ||
+ | |||
+ | Replace the '' | ||
+ | |||
+ | === xfdesktop_regular_file_icon_peek_info() === | ||
+ | |||
+ | Return a '' | ||
+ | |||
+ | === xfdesktop_regular_file_icon_update_info() === | ||
+ | |||
+ | TODO: Replace the '' | ||
+ | to add a '' | ||
+ | |||
+ | === xfdesktop_delete_regular_file_finished() === | ||
+ | |||
+ | Remove. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_finalize() === | ||
+ | |||
+ | Call '' | ||
+ | new '' | ||
+ | |||
+ | === xfdesktop_regular_file_icon_tfi_init() === | ||
+ | |||
+ | Update this to Thunarx 2. Need to set '' | ||
+ | and '' | ||
+ | |||
+ | === xfdesktop_regular_file_icon_peek_pixbuf() === | ||
+ | |||
+ | Need to rewrite this to make use of '' | ||
+ | or icon factory class like in thunar could be introduced. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_get_allowed_drag_actions() === | ||
+ | |||
+ | Use '' | ||
+ | to query '' | ||
+ | |||
+ | === xfdesktop_regular_file_icon_get_allowed_drop_actions() === | ||
+ | |||
+ | See the previous function. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_drag_job_error() === | ||
+ | |||
+ | I don't think we need this any longer. Thunar will display errors for us. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_interactive_job_ask() === | ||
+ | |||
+ | Remove. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_drag_job_finished() === | ||
+ | |||
+ | Remove. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_do_drop_dest() === | ||
+ | |||
+ | Rewrite the code based on '' | ||
+ | to launch executable files. Use a NULL check with '' | ||
+ | replace the call to '' | ||
+ | '' | ||
+ | |||
+ | Instead of implement the Thunar D-Bus client manually we could rely on code | ||
+ | generation. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_peek_tooltip() === | ||
+ | |||
+ | What we need is to read the last modification time, the file type and a human readable | ||
+ | version of the size of the file. There are attributes for the modification time, the | ||
+ | file type and the file size in '' | ||
+ | something similar to [[http:// | ||
+ | for the file size we can use '' | ||
+ | |||
+ | === xfdesktop_regular_file_can_write_parent() === | ||
+ | |||
+ | Here we can simply rewrite the code to use '' | ||
+ | |||
+ | === xfdesktop_delete_file_error() === | ||
+ | |||
+ | Remove. | ||
+ | |||
+ | === xfdesktop_delete_file_finished() === | ||
+ | |||
+ | Remove. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_delete_file() === | ||
+ | |||
+ | Instead of '' | ||
+ | and forget. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_rename_file() === | ||
+ | |||
+ | See previous function. | ||
+ | |||
+ | === xfdesktop_regular_file_icon_peek_info() === | ||
+ | |||
+ | Change the return type to '' | ||
+ | |||
+ | === xfdesktop_regular_file_icon_update_info() === | ||
+ | |||
+ | TODO: Check how and where this function is being used and what we can do in order | ||
+ | to replace the '' | ||
+ | |||
+ | === xfdesktop_regular_file_icon_new() === | ||
+ | |||
+ | Add a '' | ||
+ | '' | ||
+ | |||
+ | ==== xfdesktop_special_file_icon.{c, | ||
+ | |||
+ | === _XfdesktopSpecialFileIconPrivate === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_finalize() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_tfi_init() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_get_allowed_drag_actions() === | ||
+ | |||
+ | TODO: we no longer need the thunar-vfs workaround I think. | ||
+ | |||
+ | === xfdesktop_special_file_icon_get_allowed_drop_actions() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_drag_job_error() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_interactive_job_ask() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_drag_job_finished() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_do_drop_dest() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_peek_tooltip() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_peek_info() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_special_file_icon_new() === | ||
+ | |||
+ | TODO | ||
+ | ==== xfdesktop-volume-icon.{c, | ||
+ | |||
+ | === _XfdesktopVolumeIconPrivate === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_finalize() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_tfi_init() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_volume_changed_cb() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_peek_pixbuf() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_peek_label() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_get_allowed_drag_actions() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_get_allowed_drop_actions() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_drag_job_error() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_interactive_job_ask() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_drag_job_finished() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_do_drop_dest() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_peek_tooltip() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_menu_toggle_mount() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_menu_eject() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_populate_context_menu() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_peek_info() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_update_info() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_activated() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_new() === | ||
+ | |||
+ | TODO | ||
+ | |||
+ | === xfdesktop_volume_icon_peek_volume() === | ||
+ | |||
+ | TODO |