~ubuntu-branches/ubuntu/vivid/migration-assistant/vivid

« back to all changes in this revision

Viewing changes to search-items.c

  • Committer: Bazaar Package Importer
  • Author(s): Evan Dandrea
  • Date: 2008-04-07 11:16:20 UTC
  • Revision ID: james.westby@ubuntu.com-20080407111620-z0okm5426xzxr5jj
Tags: 0.6.1
* Use + instead of : for a replacement character as it is explicitly
  allowed by debconf policy.
* Look in .purple for Pidgin settings as well.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
    return ret;
20
20
}
21
21
 
22
 
char* gaim_get_accounts_file_windows(void) {
23
 
    char* accounts_file;
24
 
    char* appdata = NULL;
25
 
    char* path = NULL;
26
 
    appdata = findkey(user_key_file, "\\Software\\Microsoft\\Windows\\"
27
 
        "CurrentVersion\\Explorer\\Shell Folders\\Local AppData");
28
 
    if(!appdata) {
29
 
        return NULL;
30
 
    }
31
 
    path = reformat_path(appdata);
32
 
    if(!path) return NULL;
33
 
    free(appdata);
34
 
    asprintf(&accounts_file, "%s/%s/%s", from_location, path,
35
 
        "/.gaim/accounts.xml");
36
 
    free(path);
37
 
 
38
 
    return accounts_file;
39
 
}
40
 
 
41
 
char* gaim_get_accounts_file_linux(void) {
42
 
    char* ret;
43
 
    asprintf(&ret, "%s/%s/%s/%s", from_location,
44
 
            "home", from_user,
45
 
            ".gaim/accounts.xml");
46
 
 
47
 
    return ret;
48
 
}
49
 
 
50
22
/*              Windows Applications                    */
51
23
 
52
24
/*              Instant Messaging                       */
74
46
}
75
47
 
76
48
const char* windowsxp_gaim (void) {
 
49
    FILE* fp;
77
50
    char* accounts_file;
78
 
    FILE* fp;
79
 
    accounts_file = gaim_get_accounts_file_windows();
80
 
    if((fp = fopen(accounts_file, "r")) != NULL) {
81
 
        fclose(fp);
82
 
        return "Gaim";
83
 
    } else {
84
 
        return NULL;
85
 
    }
 
51
    char* accounts_file_new;
 
52
    char* appdata = NULL;
 
53
    char* path = NULL;
 
54
    appdata = findkey(user_key_file, "\\Software\\Microsoft\\Windows\\"
 
55
        "CurrentVersion\\Explorer\\Shell Folders\\Local AppData");
 
56
    if(!appdata) {
 
57
        return NULL;
 
58
    }
 
59
    path = reformat_path(appdata);
 
60
    if(!path) return NULL;
 
61
    free(appdata);
 
62
    asprintf(&accounts_file, "%s/%s/%s", from_location, path,
 
63
        "/.gaim/accounts.xml");
 
64
    asprintf(&accounts_file_new, "%s/%s/%s", from_location, path,
 
65
        "/.purple/accounts.xml");
 
66
    free(path);
 
67
    fp = fopen(accounts_file, "r");
 
68
    free(accounts_file);
 
69
    if(fp != NULL) {
 
70
        fclose(fp);
 
71
        return "Gaim";
 
72
    }
 
73
    fp = fopen(accounts_file_new, "r");
 
74
    free(accounts_file_new);
 
75
    if(fp != NULL) {
 
76
        fclose(fp);
 
77
        return "Gaim";
 
78
    }
 
79
    return NULL;
86
80
}
87
81
 
88
82
const char* windowsxp_msn (void) {
308
302
 
309
303
const char* linux_gaim (void) {
310
304
    char* accounts_file;
 
305
    char* accounts_file_new;
311
306
    FILE* fp;
312
 
    accounts_file = gaim_get_accounts_file_linux();
313
 
    if((fp = fopen(accounts_file, "r")) != NULL) {
314
 
        fclose(fp);
315
 
        return "Gaim";
316
 
    } else {
317
 
        return NULL;
318
 
    }
 
307
    asprintf(&accounts_file, "%s/%s/%s/%s", from_location,
 
308
            "home", from_user,
 
309
            ".gaim/accounts.xml");
 
310
    asprintf(&accounts_file_new, "%s/%s/%s/%s", from_location,
 
311
            "home", from_user,
 
312
            ".purple/accounts.xml");
 
313
    fp = fopen(accounts_file, "r");
 
314
    if(fp != NULL) {
 
315
        fclose(fp);
 
316
        return "Gaim";
 
317
    }
 
318
    fp = fopen(accounts_file_new, "r");
 
319
    if(fp != NULL) {
 
320
        fclose(fp);
 
321
        return "Gaim";
 
322
    }
 
323
    return NULL;
319
324
}
320
325
 
321
326
const char* linux_firefox (void) {