~unity-team/bamf/trunk

« back to all changes in this revision

Viewing changes to src/bamf-application.c

  • Committer: Bileto Bot
  • Author(s): Iain Lane
  • Date: 2016-09-29 16:12:07 UTC
  • mfrom: (648.1.2 bamf)
  • Revision ID: ci-train-bot@canonical.com-20160929161207-a4h55fohc8csaq4m
Adjust for XDG_CURRENT_DESKTOP containing multiple colon-separated values

Approved by: Marco Trevisan (Treviño)

Show diffs side-by-side

added added

removed removed

Lines of Context:
673
673
 
674
674
  if (curdesktop)
675
675
    {
676
 
      const gchar* show_in_list[] = { curdesktop, NULL };
 
676
      gchar** show_in_list = g_strsplit (curdesktop, ":", 0);
677
677
      g_key_file_set_string_list (key_file, G_KEY_FILE_DESKTOP_GROUP,
678
678
                                  G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN,
679
 
                                  show_in_list, 1);
 
679
                                  (const gchar * const *) show_in_list, 1);
 
680
      g_strfreev (show_in_list);
680
681
    }
681
682
 
682
 
  gchar *generator = g_strdup_printf ("X-%sGenerated", curdesktop ? curdesktop : "BAMF");
 
683
  gchar *generator = g_strdup_printf ("X-%sGenerated", curdesktop && !g_strstr_len(curdesktop, -1, ":") ?
 
684
                                                                      curdesktop : "BAMF");
683
685
  g_key_file_set_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, generator, TRUE);
684
686
  g_free (generator);
685
687