~ubuntu-branches/ubuntu/utopic/ubuntu-app-launch/utopic

« back to all changes in this revision

Viewing changes to desktop-hook.c

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Ted Gould
  • Date: 2014-06-05 03:40:55 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140605034055-z2re0i1tfue8xtei
Tags: 0.4+14.10.20140605.3-0ubuntu1
[ Ted Gould ]
Fixing click hook for name change

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
Probably the biggest thing to understand for how this code works is that you need to
30
30
understand that this hook is run after one, or many packages are installed.  A set of
31
31
symbolic links are made to the desktop files per-application (not per-package) in the
32
 
directory specified in upstart-app-launcher-desktop.click-hook.in.  Those desktop files
 
32
directory specified in ubuntu-app-launcher-desktop.click-hook.in.  Those desktop files
33
33
give us the App ID of the packages that are installed and have applications needing
34
34
desktop files in them.  We then operate on each of them ensuring that they are synchronized
35
35
with the desktop files in ~/.local/share/applications/.
36
36
 
37
37
The desktop files that we're creating there ARE NOT used for execution by the
38
 
upstart-app-launch Upstart jobs.  They are there so that Unity can know which applications
 
38
ubuntu-app-launch Upstart jobs.  They are there so that Unity can know which applications
39
39
are installed for this user and they provide an Exec line to allow compatibility with
40
 
desktop environments that are not using upstart-app-launch for launching applications.
 
40
desktop environments that are not using ubuntu-app-launch for launching applications.
41
41
You should not modify them and expect any executing under Unity to change.
42
42
 
43
43
*/
477
477
        GArray * apparray = g_array_new(FALSE, FALSE, sizeof(app_state_t));
478
478
 
479
479
        /* Find all the symlinks of desktop files */
480
 
        gchar * symlinkdir = g_build_filename(g_get_user_cache_dir(), "upstart-app-launch", "desktop", NULL);
 
480
        gchar * symlinkdir = g_build_filename(g_get_user_cache_dir(), "ubuntu-app-launch", "desktop", NULL);
481
481
        if (!g_file_test(symlinkdir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
482
482
                g_debug("No installed click packages");
483
483
        } else {