X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgwin32appinfo.c;h=7762a2b26ea5f61dec5d4a08a74d2ae3a0ac7d33;hb=25990eb2b6da94e1d03631eab8a952ef84cb9986;hp=3e669c673c442ef93dfa1ad663a75004910ed185;hpb=73007021796f33d7ccec4e5f2bb2b2f8660347f2;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gwin32appinfo.c b/gio/gwin32appinfo.c index 3e669c6..7762a2b 100644 --- a/gio/gwin32appinfo.c +++ b/gio/gwin32appinfo.c @@ -13,9 +13,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General - * Public License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place, Suite 330, - * Boston, MA 02111-1307, USA. + * Public License along with this library; if not, see . * * Author: Alexander Larsson */ @@ -24,7 +22,7 @@ #include -#include "gcontenttypeprivate.h" +#include "gcontenttype.h" #include "gwin32appinfo.h" #include "gappinfo.h" #include "gioerror.h" @@ -35,7 +33,6 @@ #include #include -#include "gioalias.h" #ifndef ASSOCF_INIT_BYEXENAME #define ASSOCF_INIT_BYEXENAME 0x00000002 @@ -279,6 +276,15 @@ g_win32_app_info_launch (GAppInfo *appinfo, } #endif + /* FIXME: Need to do something with + * g_app_launch_context_get_environment()... ShellExecuteExW() + * doesn't have any way to pass an environment though. We need to + * either (a) update environment, ShellExecuteExW(), revert + * environment; or (b) find an API to figure out what app + * ShellExecuteExW() would launch, and then use g_spawn_async() + * instead. + */ + for (l = files; l != NULL; l = l->next) { char *path = g_file_get_path (l->data); @@ -588,6 +594,28 @@ g_app_info_get_all_for_type (const char *content_type) return g_list_reverse (infos); } +GList * +g_app_info_get_recommended_for_type (const char *content_type) +{ + /* FIXME: this should generate a list of applications that are registered + * as direct handlers for the given content type, without using MIME subclassing. + * See g_app_info_get_recommended_for_type() in gdesktopappinfo.c for a reference + * UNIX implementation. + */ + return g_app_info_get_all_for_type (content_type); +} + +GList * +g_app_info_get_fallback_for_type (const char *content_type) +{ + /* FIXME: this should generate a list of applications that are registered + * as handlers for a superclass of the given content type, but are not + * direct handlers for the content type itself. See g_app_info_get_fallback_for_type() + * in gdesktopappinfo.c for a reference UNIX implementation. + */ + return g_app_info_get_all_for_type (content_type); +} + GAppInfo * g_app_info_get_default_for_type (const char *content_type, gboolean must_support_uris)