Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dev:xfdesktop:port-to-gio-progress [2010/10/18 14:51] 217.229.80.161dev:xfdesktop:port-to-gio-progress [2010/10/19 13:22] 217.229.78.181
Line 6: Line 6:
  
 Calls ''thunar_vfs_init()'' and ''thunar_vfs_shutdown()''. Those calls can be removed. Calls ''thunar_vfs_init()'' and ''thunar_vfs_shutdown()''. Those calls can be removed.
- 
-==== xfce-desktop.c ==== 
- 
-=== xfce_desktop_setup_icon_view() === 
- 
-Use a ''GFile'' instead of a ''ThunarVfsPath'' when creating the file icon manager.  
-Pass the ''GFile'' to the manager object instead of the ''ThunarVfsPath'' 
  
 ==== xfdesktop-file-icon.{c,h} ==== ==== xfdesktop-file-icon.{c,h} ====
Line 47: Line 40:
 Replace ''xfdesktop_file_icon_peek_info()'' with ''xfdesktop_file_icon_get_file()'' Replace ''xfdesktop_file_icon_peek_info()'' with ''xfdesktop_file_icon_get_file()''
 and ''ThunarVfsInfo''/''ThunarVfsPath'' with ''GFile''. and ''ThunarVfsInfo''/''ThunarVfsPath'' with ''GFile''.
- 
-=== 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() === === xfdesktop_file_icon_menu_create_launcher() ===
Line 60: Line 48:
 xfce4-panel/plugins/launcher/launcher-dialog.c has an example of how we can do  xfce4-panel/plugins/launcher/launcher-dialog.c has an example of how we can do 
 this. 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 ''CreateFolder()'' or ''CreateFile()'' (with a 
-type parameter). Need to think about this a bit more. 
  
 === xfdesktop_file_icon_create_file_error() === === xfdesktop_file_icon_create_file_error() ===
Line 187: Line 168:
  
 The counterpart to the previous function. Same deal. The counterpart to the previous function. Same deal.
- 
-=== xfdesktop_file_icon_manager_drag_drop() === 
- 
-Use '''xfdesktop_file_icon_peek_file()'' instead of ''..._peek_info()''. The file type 
-can then be determined with ''g_file_query_file_type()'' 
- 
-Use ''g_file_get_child()'' instead of ''thunar_vfs_path_relative()'' and ''g_file_get_uri()'' 
-instead of ''thunar_vfs_path_dup_uri()''. 
  
 === xfdesktop_file_icon_manager_drag_data_received() === === xfdesktop_file_icon_manager_drag_data_received() ===
Line 212: Line 185:
 The code block dealing with jobs needs to be reworked around ''GFile'', ''GFileInfo'' The code block dealing with jobs needs to be reworked around ''GFile'', ''GFileInfo''
 and the Thunar D-Bus API completely. Maybe danielm's branch implements this already? and the Thunar D-Bus API completely. Maybe danielm's branch implements this already?
- 
-=== xfdesktop_file_icon_manager_new() === 
- 
-Change the ''ThunarVfsPath'' parameter to a ''GFile''. That's all. 
  
 === _XfdesktopFileIconManagerPrivate === === _XfdesktopFileIconManagerPrivate ===
- 
-Change the ''ThunarVfsPath'' folder member to a ''GFile'' 
  
 Replace the ''ThunarVfsMonitor'' with a ''GVolumeMonitor'' and remove  Replace the ''ThunarVfsMonitor'' with a ''GVolumeMonitor'' and remove 
Line 225: Line 192:
  
 Remove the ''ThunarVfsJob *list_job'' member. Remove the ''ThunarVfsJob *list_job'' member.
- 
-=== xfdesktop_file_icon_manager_class_init() === 
- 
-Alter the "folder" property so that it becomes an object property  
-using the ''G_TYPE_FILE'' object type. 
- 
-=== xfdesktop_file_icon_manager_set_property() === 
- 
-Change the "folder" property code to reflect the changes to the property 
-type made in the class_init function. 
- 
-=== xfdesktop_file_icon_manager_get_property() === 
- 
-Same here, see above. 
- 
-=== xfdesktop_file_icon_manager_finalize() === 
- 
-Use ''g_object_unref()'' instead of ''thunar_vfs_path_unref()''. 
- 
-=== xfdesktop_file_icon_manager_check_create_desktop_folder() === 
- 
-Replace the code with something similar based on ''GFile'', ''g_file_query_exists()'', 
-''g_file_query_file_type()'' and ''g_file_make_directory()''. 
  
 ==== xfdesktop-file-properties-dialog.{c,h} ==== ==== xfdesktop-file-properties-dialog.{c,h} ====
  
 Remove entirely. We'll re-use Thunar's properties dialog via its D-Bus API. Remove entirely. We'll re-use Thunar's properties dialog via its D-Bus API.
 +
 ==== xfdesktop-file-utils.{c,h} ==== ==== xfdesktop-file-utils.{c,h} ====
  
Line 266: Line 211:
 If this is still needed after refactoring, then make it take a ''GFileInfo'' If this is still needed after refactoring, then make it take a ''GFileInfo''
 and rewrite the checks based on ''GFileInfo'' attributes. and rewrite the checks based on ''GFileInfo'' attributes.
- 
-=== xfdesktop_file_utils_file_icon_list_to_path_list() === 
- 
-Replace with a function called ''xfdesktop_file_utils_file_icon_list_to_g_file_list()'' 
-that creates a list of ''GFile'' objects. 
  
 === xfdesktop_file_utils_get_fallback_icon() === === xfdesktop_file_utils_get_fallback_icon() ===
Line 289: Line 229:
 hard that we can't provide any real functionality without it anyway. 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,h} ==== ==== xfdesktop-regular-file-icon.{c,h} ====