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/21 00:08] 217.229.125.71dev:xfdesktop:port-to-gio-progress [2010/10/22 13:39] 217.229.126.137
Line 23: Line 23:
  
 ==== xfdesktop-file-icon-manager.{c,h} ==== ==== xfdesktop-file-icon-manager.{c,h} ====
- 
-=== xfdesktop_file_icon_menu_mime_app_executed() === 
- 
-Use ''GAppInfo'' instead of ''ThunarVfsMimeApplication'' and call ''g_app_info_launch()'' 
-instead of ''thunar_vfs_mime_handler_exec()''. Make sure to change the working directory 
-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 ''GAppInfo'' instead of 
-''ThunarVfsMimeApplication'' 
- 
-=== xfdesktop_file_icon_menu_other_app() === 
- 
-Again, we only need the ''GFile'', not the file info, in order to obtain the file URI. 
-Replace ''xfdesktop_file_icon_peek_info()'' with ''xfdesktop_file_icon_get_file()'' 
-and ''ThunarVfsInfo''/''ThunarVfsPath'' with ''GFile''. 
- 
-=== xfdesktop_file_icon_menu_create_launcher() === 
- 
-Use a ''GFile'' instead of the ''ThunarVfsInfo'' and ''ThunarVfsPath'' to obtain 
-the file URI. Feed exo-desktop-item-edit with the URI instead of a local path. 
-The function ''launcher_dialog_item_button_clicked()'' in  
-xfce4-panel/plugins/launcher/launcher-dialog.c has an example of how we can do  
-this. 
  
 === xfdesktop_file_icon_create_file_error() === === xfdesktop_file_icon_create_file_error() ===
Line 79: Line 54:
  
 Use ''GFileInfo'' instead of ''ThunarVfsInfo'' and ''GFile'' instead of ''ThunarVfsPath''. Use ''GFileInfo'' instead of ''ThunarVfsInfo'' and ''GFile'' instead of ''ThunarVfsPath''.
-Use ''GAppInfo'' instead of ''ThunarVfsMimeDatabase'' and  
-''ThunarVfsMimeHandler''/''ThunarVfsMimeApplication''. 
  
 === xfdesktop_file_icon_manager_add_icon() === === xfdesktop_file_icon_manager_add_icon() ===
Line 132: Line 105:
 === xfdesktop_file_icon_manager_real_init() === === xfdesktop_file_icon_manager_real_init() ===
  
-Get rid of the ''ThunarVfsMimeDatabase'' and the global ''ThunarVfsVolumeManager''+Get rid of the global ''ThunarVfsVolumeManager''.
-The hash table needs to use either URIs or ''GFile'' as well as the right hash +
-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 ''ThunarVfsInfo'' parameter of ''xfdesktop_regular_file_icon_new()'' We'll have to change the ''ThunarVfsInfo'' parameter of ''xfdesktop_regular_file_icon_new()''
Line 167: Line 137:
 Replace the ''ThunarVfsMonitor'' with a ''GVolumeMonitor'' and remove  Replace the ''ThunarVfsMonitor'' with a ''GVolumeMonitor'' and remove 
 the ''ThunarVfsMonitorHandle''. the ''ThunarVfsMonitorHandle''.
- 
-Remove the ''ThunarVfsJob *list_job'' member. 
  
 ==== xfdesktop-file-properties-dialog.{c,h} ==== ==== xfdesktop-file-properties-dialog.{c,h} ====
Line 220: Line 188:
 TODO: Replace the ''ThunarVfsInfo'' parameter with ''GFileInfo''. Maybe we also need TODO: Replace the ''ThunarVfsInfo'' parameter with ''GFileInfo''. Maybe we also need
 to add a ''GFile'' parameter because ''GFileInfo'' contains no path information. to add a ''GFile'' parameter because ''GFileInfo'' contains no path information.
- 
-=== xfdesktop_delete_regular_file_finished() === 
- 
-Remove. 
  
 === xfdesktop_regular_file_icon_finalize() === === xfdesktop_regular_file_icon_finalize() ===
Line 282: Line 246:
  
 Here we can simply rewrite the code to use ''GFile'' and ''GFileInfo''. Here we can simply rewrite the code to use ''GFile'' and ''GFileInfo''.
- 
-=== xfdesktop_delete_file_error() === 
- 
-Remove. 
- 
-=== xfdesktop_delete_file_finished() === 
- 
-Remove. 
- 
-=== xfdesktop_regular_file_icon_delete_file() === 
- 
-Instead of ''thunar_vfs_unlink_file()'', use the Thunar D-Bus API here. Fire 
-and forget. 
- 
-=== xfdesktop_regular_file_icon_rename_file() === 
- 
-See previous function. 
  
 === xfdesktop_regular_file_icon_peek_info() === === xfdesktop_regular_file_icon_peek_info() ===