~helene-verhaeghe27/cairo-dock-core/bugfix

« back to all changes in this revision

Viewing changes to src/implementations/cairo-dock-X-utilities.c

  • Committer: Matthieu Baerts
  • Date: 2014-09-09 09:39:59 UTC
  • Revision ID: matttbe@gmail.com-20140909093959-6c63itku877br45s
Class: Special case for Chromium: added Google-chrome-beta and unstable

+ avoid multiple comparaisons

Show diffs side-by-side

added added

removed removed

Lines of Context:
1121
1121
                        cClass = g_ascii_strdown (pClassHint->res_name, -1);
1122
1122
                }
1123
1123
                // chromium web apps (not the browser): same remark as for wine apps
1124
 
                else if ((strcmp (pClassHint->res_class, "Chromium-browser") == 0  // on Debian, etc.
1125
 
                          || strcmp (pClassHint->res_class, "Chromium") == 0       // on Arch, etc.
1126
 
                          || strcmp (pClassHint->res_class, "Google-chrome") == 0) // from Google
1127
 
                         && pClassHint->res_name
1128
 
                         && strcmp (pClassHint->res_name, "chromium-browser") != 0
1129
 
                         && strcmp (pClassHint->res_name, "chromium") != 0
1130
 
                         && strcmp (pClassHint->res_name, "google-chrome") != 0)
 
1124
                else if (pClassHint->res_name && pClassHint->res_name[0] != '\0' && pClassHint->res_class[0] != '\0'
 
1125
                         && (strcmp (pClassHint->res_class, "Chromium-browser") == 0 // on Debian, etc.
 
1126
                          || strcmp (pClassHint->res_class, "Chromium") == 0         // on Arch, etc.
 
1127
                          || strcmp (pClassHint->res_class, "Google-chrome") == 0    // from Google
 
1128
                          || strcmp (pClassHint->res_class, "Google-chrome-beta") == 0
 
1129
                          || strcmp (pClassHint->res_class, "Google-chrome-unstable") == 0)
 
1130
                         && strcmp (pClassHint->res_class+1, pClassHint->res_name+1) != 0) // skip first letter (upper/lowercase)
1131
1131
                {
1132
1132
                        cd_debug ("  chromium application detected, changing the class '%s' to '%s'", pClassHint->res_class, pClassHint->res_name);
1133
1133
                        cClass = g_ascii_strdown (pClassHint->res_name, -1);