示例#1
0
		public static DesktopAppInfo NewFromFilename(string filename)
		{
			IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
			DesktopAppInfo result = new DesktopAppInfo (g_desktop_app_info_new_from_filename(native_filename));
			GLib.Marshaller.Free (native_filename);
			return result;
		}
示例#2
0
        public static DesktopAppInfo NewFromFilename(string filename)
        {
            IntPtr         native_filename = GLib.Marshaller.StringToPtrGStrdup(filename);
            DesktopAppInfo result          = new DesktopAppInfo(g_desktop_app_info_new_from_filename(native_filename));

            GLib.Marshaller.Free(native_filename);
            return(result);
        }
示例#3
0
        /// <summary>
        /// Create an application item from a desktop file.
        /// </summary>
        /// <param name="desktopFile">
        /// A <see cref="System.String"/> containing the absolute path of
        /// a desktop (.desktop) file.
        /// </param>
        protected ApplicationItem(GLib.DesktopAppInfo item)
        {
            this.item = item;

            name        = item.Name;
            description = item.Description;
            icon        = item.Icon.ToString() ?? DefaultApplicationIcon;

            // TODO: Populate categories once GIO# exposes them
            categories = Enumerable.Empty <string> ();
        }