Back to index

bamf  0.2.120
desktop-file-launcher.c
Go to the documentation of this file.
00001 /*
00002  *
00003  * Copyright (C) 2009 - Canonical Ltd.
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 3 of the License.
00008  *
00009  * Bamf is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor,
00017  * Boston, MA  02110-1301  USA
00018  */
00019 
00020 #include <stdio.h>
00021 #include <gtk/gtk.h>
00022 #include <glib.h>
00023 #include <gio/gdesktopappinfo.h>
00024 
00025 int main (int argc, char **argv)
00026 {
00027        gtk_init (&argc, &argv);
00028 
00029        GAppInfo *appInfo = G_APP_INFO (g_desktop_app_info_new_from_filename (argv [1]));
00030 
00031        GError *error;
00032        g_app_info_launch (appInfo, NULL, NULL, &error);
00033 
00034        g_print ("End");
00035 
00036        return 0;
00037 }
00038 
00039 
00040 
00041 
00042 
00043 
00044