Re: Finding installed applications
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Finding installed applications
- Date: Thu, 04 Aug 2005 18:19:35 +0200
On Thu, 2005-08-04 at 00:06 -0400, muppet wrote:
It appears that gnome_vfs_mime_get_default_application() is not bound
in Gnome2::VFS.
It is, and you use it below. :-)
I expect this to work, but it doesn't:
use strict;
use Gnome2::VFS -init;
my $uri = "file://$ENV{HOME}/foo.txt";
my $mime_type_str = Gnome2::VFS->get_mime_type ($uri);
my $mime_type = Gnome2::VFS::Mime::Type->new ($mime_type_str);
my $application = $mime_type->get_default_application;
print "application => $application\n";
Everything works up until get_default_application, which returns
undef. :-/
Well, works for me (after changing foo.txt to something that exists):
application => Gnome2::VFS::Mime::Application=HASH(0x8144d88)
$application->launch(@uris) would launch the app.
--
Bye,
-Torsten
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]