This essentially adds an accessor for the MimeType field in desktop files,
to retrieve the list of all mime types supported by an application.
The interface though is part of GAppInfo, so it could be implemented
in the future by other backends.
https://bugzilla.gnome.org/show_bug.cgi?id=674111
If the launch context is a GAppLaunchContext, and not a
GdkAppLaunchContext, then g_app_launch_context_get_display will return
NULL because the get_display virtual method is undefined. The DISPLAY
might still be inherited from the parent process, in which case
overwriting it with NULL breaks the launch.
This is a regression introduced in:
de834bed30
Fixes: https://bugzilla.gnome.org/672786
Add new macros to disable -Wdeprecated-declarations around a piece of
code, using the C99 (and GNU89) _Pragma() operator. Replace the
existing use of #pragma for this in gio, and suppress the warnings in
gvaluearray.c as well.
https://bugzilla.gnome.org/show_bug.cgi?id=669671
Add functions for manipulating the environment under which a
GAppLaunchContext will launch its children, to avoid thread-related
bugs with using setenv() directly.
FIXME: win32 side isn't implemented yet
https://bugzilla.gnome.org/show_bug.cgi?id=659326
With search gaining traction as being the preferred way to locate
applications, the existing .desktop file fields meant for browsing
often produce insufficient results.
gnome-control-center introduced a custom X-GNOME-Keywords field for
that purpose, which we plan to support in gnome-shell as well.
https://bugzilla.gnome.org/show_bug.cgi?id=661763
Previously, we took the default application for a particular mimetype
from the system and copied it into the user's configuration as the
default there.
Instead of doing that we leave the user's default unset, and at time of
use, if the user has no explicitly-set default value, we use the system
default.
This avoids complicated situations where inappropriate applications were
being set as the default in the user's configuration.
https://bugzilla.gnome.org/show_bug.cgi?id=658188
* Do not ignore the system default
* Do not exclude the last used being set from the default list
This fixes the default applications dialog in control-center.
https://bugzilla.gnome.org/show_bug.cgi?id=658188
g_desktop_app_info_set_as_default_for_type() and
g_desktop_app_info_set_as_last_used_for_type () require the
application's ID, but depending on how the GAppInfo was created,
we might not be have one, and would thus silently fail to set
the default application, or last used application.
https://bugzilla.gnome.org/show_bug.cgi?id=657445
GDesktopAppInfo violates the GObject rule that your C constructors
should just be thin wrappers around g_object_new(). While GKeyFile
isn't introspctable, this patch allows from JavaScript:
var app = new Gio.DesktopAppInfo({ filename: '/path/to/foo.desktop' });
https://bugzilla.gnome.org/show_bug.cgi?id=648425
We were considering explicitly configured defaults for parent types
after we already got results for the specific type we're interested in.
This resulted in the explicit default for text/plain to override all
system defaults for subtypes of text/plain, for example. The explicit
default should not apply to subtypes that have a system default.
https://bugzilla.gnome.org/show_bug.cgi?id=642797
This will help applications such as zeitgeist's datahub to collect
more complete information about application launches, as the "actor"
of a launch is important for zeitgeist's magic to work properly.
If we were the initial connection owner, unref will destroy the
connection immediately, and we may lose messages. Asynchronously
flush to avoid that.
https://bugzilla.gnome.org/show_bug.cgi?id=641411
If code creates a GDesktopAppInfo via g_desktop_app_info_new_from_keyfile(),
we'd try to send a NULL pointer down into GVariant.
Since in this case we don't have a filename, just send the empty
string. In the future we should either:
1) Change panel to use g_desktop_app_info_new_from_filename(), and
take the hit of parsing the file twice.
2) Add a g_key_file_get_origin_filename()
3) Add g_desktop_app_info_new_from_keyfile_and_name()
https://bugzilla.gnome.org/show_bug.cgi?id=638838
A new GDesktopAppInfo specific function which provides more control
over launched processes. Intended basically only for use in GNOME
Shell, where we want:
*) To directly know the GPid for each launched program, without
having to listen to a DBus signal emitted in our own process
*) Possibly control over the process environment; for example,
we may want to call setsid() or redirect file descriptors.
And in the future:
*) To avoid recursively calling ourself via DBus, when a later
patch causes g_app_info_launch() to indirect via the shell.
https://bugzilla.gnome.org/show_bug.cgi?id=606960
This signal contains the full path of the .desktop file, along with
the process id, which allows multiple interested components (like
GNOME Shell) to better know the state of the system (which processes
correspond to which .desktop files).
https://bugzilla.gnome.org/show_bug.cgi?id=606960
We want to be compatible with the following situation:
- there's no explicit default set in mimeapps.list
- we add support for a content type to a specific application, and that
list is empty
- the default should be picked from the system list, not overridden by
the user-added application.
So we make the default explicit in this case, by adding it to the
relevant section in mimeapps.list.
https://bugzilla.gnome.org/show_bug.cgi?id=637675
This commit also changes (maintaining compatibility) the way
user-specified default applications are stored (as in, those for which
g_app_info_set_as_default_for_type() has been called.
We now store the default application for a content type in a new group
in the mimeapps.list keyfile, and "Added Associations" tracks only the
applications that have been added by the user, following a
most-recently-used first order.
This is useful in GtkAppChooser-like widgets to pre-select the last used
application when constructing a widget.
https://bugzilla.gnome.org/show_bug.cgi?id=636311
Otherwise you break the fallback + recommended distinction for a content
type, as you end up adding support for a given content type to *all* of
the applications claiming to support the supertype.
This ways UIs can differentiate between them, and show them in different
section.
- a recommended app is an application that claims to support a content
type directly, not by a supertype derivation.
- a fallback app is an application that claims to support a supertype of
a given content type.
Removing an extension point is an API and ABI break. In particular, it
causes (older) gvfs versions to fail loading with a linkage error from
ld which in turn makes the desktop unusable.
So this reinstate the extension point and API provided by it, but
deprecates and does not use it. So no functionality is changed.
This reverts parts of commit 9b262f1c5f.
Complaints-Also-To: Ryan Lortie <desrt@desrt.ca>
Move all the annotations over from gobject-introspection.
They will not be used directly by the introspection scanner for now,
instead they will be extracted by a script and updated manually
until introspection is properly integrated into the glib build
This adds a GApplication object to GIO, which is the core of
an application support class, supporting
- uniqueness
- exporting actions (simple scripting)
- standard actions (quit, activate)
The implementation for Linux uses D-Bus, takes a name on the
session bus, and exports a org.gtk.Application interface.
Implementations for Win32 and OS X are still missing.
Note: Since we export types with Iface in the name rather than
Interface we have to use some typedefs to make this work. New
interfaces should probably use Interface as the public name.
2009-03-03 Alexander Larsson <alexl@redhat.com>
Bug 561172 – gnome-open fails on local URIs with anchors
* gdesktopappinfo.c:
Don't force uris to filenames if the uri has an anchor, because
that would strip the anchor.
* glocalvfs.c:
Strip anchor from file:// uris when creating GFile, since
g_filename_from_uri doesn't handle them.
svn path=/trunk/; revision=7953
2009-02-26 Alexander Larsson <alexl@redhat.com>
* gdesktopappinfo.c:
Support desktop file key X-GIO-NoFuse which disables
use of fuse pathnames for %u and %U arguments.
svn path=/trunk/; revision=7914
* gio.symbols:
* gappinfo.[hc]: Add g_app_info_get_commandline. Requested
by Hans Petter Jansson.
* gdesktopappinfo.c: And implement it here.
svn path=/trunk/; revision=7706
2008-11-28 Matthias Clasen <mclasen@redhat.com>
Bug 559633 – gtk_image_new_from_gicon does not always work for
.desktop files
* gdesktopappinfo.c (g_desktop_app_info_new_from_keyfile): Ignore
extensions on icon names. Proposed by Axel von Bertoldi.
svn path=/trunk/; revision=7698
* gdesktopappinfo.c (g_app_info_can_delete): Only allow deleting
files that have been created by g_app_info_create_from_commandline.
svn path=/trunk/; revision=7693
2008-10-13 Alexander Larsson <alexl@redhat.com>
* gdesktopappinfo.c:
When adding an application as handling a mime type (but
not as the default), copy the full list of desktop ids handling
that type in before adding the new one on the end of the list.
This means we're not accidentally changing the default by overriding
the info from the later directories in the search path.
Also, fixes small leak of removed_entries.
svn path=/trunk/; revision=7595
2008-10-05 Pascal Terjan <pterjan@linuxfr.org>
Bug 554970 â segfault when update-desktop-database is not available
on the system
* gdesktopappinfo.c (run_update_command): Have the error set before
using it.
svn path=/trunk/; revision=7570
2008-10-01 David Zeuthen <davidz@redhat.com>
* gdesktopappinfo.c (expand_macro): If possible, always pass FUSE
file:// URIs (such as '/home/davidz/.gvfs/sftp on foo/file.avi')
instead of the gio URI (such as sftp://foo/file.avi) when using
g_app_info_launch() and friends. With a sufficiently recent gvfs,
apps using gio+gvfs will map the FUSE file:// URI back to the gio
URI (and thus bypass the fuse daemon) thanks the patch from bug
#530654. Since Nautilus is an user of g_app_info_launch() it
means that non-gio POSIX apps, such as mplayer, will Just Work(tm)
when launced via the file manager. Win. Fixes bug #528670.
* gappinfo.c: Add some notes about the FUSE POSIX URI <-> GIO URI
mapping to the description of GAppInfo.
2008-10-01 David Zeuthen <davidz@redhat.com>
* README.in: Add "Notes about glib 2.20" section detailing the
ramifications of the patch from bug #528670.
svn path=/trunk/; revision=7566
* gdesktopappinfo.c (get_all_desktop_entries_for_mime_type): add a
cast to stop a gcc warning
* gfile.c (g_file_copy_attributes): add parens to stop a gcc
warning
svn path=/trunk/; revision=7550
2008-09-16 Wouter Bolsterlee <wbolster@svn.gnome.org>
* gdesktopappinfo.c (g_desktop_app_info_new_from_keyfile):
Fix trivial typo to unbreak the build (there was a colon
instead of a semicolon at the end of a statement).
svn path=/trunk/; revision=7500
2008-09-14 Cosimo Cecchi <cosimoc@gnome.org>
Bug 551887 – Docs for g_desktop_app_info_new_from_filename ()
aren't clear.
* gdesktopappinfo.c: add a note in the docs clarifying what the
"filename" parameter really is.
svn path=/trunk/; revision=7481
2008-07-28 Matthias Clasen <mclasen@redhat.com>
Bug 545157 – wrong/no list of "open with" applications for .cc and
.cpp files
* gdesktopappinfo.c (get_all_desktop_entries_for_mime_type):
Collect all ancestors, not just direct parents. Pointed
out by Bastien Nocera
svn path=/trunk/; revision=7268