libgnomevfs gnome_url_show api does'nt work on ubuntu



Hi
We are observing this problem while using gnome. This problem is observed in Ubuntu 8.04 (Hardy Heron) as well as in sles11 RC1 x86_64.

Description:
gnome_url_show api is supposed to open a file with an associated application. When we change the associated application , this doesn't open with the new application associated for the file , instead always uses gedit.

How to reproduce:
In the GUI set preference for file testcase.txt to some thing other than gedit and run this program
--------------------------------------------------------
#include <stdio.h>
#include <dlfcn.h>

typedef int gboolean;


gboolean (*gnome_url_show) (const char *url, void **error);

int main()
{

 void *gnome_handle;
 void *vfs_handle;
 gboolean (*gnome_vfs_init) (void);
 vfs_handle = dlopen("libgnomevfs-2.so.0", RTLD_LAZY);
 if(vfs_handle == NULL)
  {
     printf("\n cannot load libgnomevfs");
     return 0;
  }

 gnome_vfs_init = dlsym(vfs_handle, "gnome_vfs_init");

 if(gnome_vfs_init == NULL)
  {
    printf("\n gnome_vfs_init is NULL ");
    return 0;
  }
 (*gnome_vfs_init)();
 gnome_handle = dlopen("libgnome-2.so.0", RTLD_LAZY);
 if(gnome_handle == NULL)
  {
     printf("\n cannot load libgnome-2.so.0 ");
     return 0;
  }

 gnome_url_show = dlsym(gnome_handle, "gnome_url_show");
 if(gnome_url_show == NULL)
  {
    printf("\n gnome_url_show is null ");
    return 0;
  }

 gnome_url_show("file:/root/Desktop/testcase.txt",NULL);
 printf("\n AFter showing console");
 dlclose(gnome_handle);
 dlclose(vfs_handle);
 return 0 ;

}
--------------------------------------------------------
It still opens in gedit.

Can you please let us know your observation on how to get this addressed. Or help us to direct the mail to the correct mailing list

Thanks
Sharyathi N






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]