~ubuntu-branches/debian/sid/gmtp/sid

« back to all changes in this revision

Viewing changes to src/prefs.c

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2011-08-04 09:57:56 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110804095756-6dlvgrw3azr7x61t
Tags: 1.2.0-1
* New upstream release:
  - New features:
    + Import/export *.m3u playlist files from within the playlist editor.
    + Download entire folders from the MTP device to your local PC.
  - Other changes:
    + Disable upload of .PLA or .ALB files as these map directly to
      Playlists and Album metadata pointers on the device. (Allowing this
      may result in corrupt metadata on the device).
* debian/{control,copyright,watch):
  - Upstream moved to SourceForge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
        Preferences.fileSystemDownloadPath = g_string_new(gconf_client_get_string(gconfconnect, "/apps/gMTP/DownloadPath", NULL));
99
99
        Preferences.fileSystemUploadPath = g_string_new(gconf_client_get_string(gconfconnect, "/apps/gMTP/UploadPath", NULL));
100
100
        Preferences.auto_add_track_to_playlist = gconf_client_get_bool(gconfconnect, "/apps/gMTP/autoAddTrackPlaylist", NULL);
 
101
        Preferences.ignore_path_in_playlist_import = gconf_client_get_bool(gconfconnect, "/apps/gMTP/ignorepathinplaylist", NULL);
101
102
        Preferences.view_size = gconf_client_get_bool(gconfconnect, "/apps/gMTP/viewFileSize", NULL);
102
103
        Preferences.view_type = gconf_client_get_bool(gconfconnect, "/apps/gMTP/viewFileType", NULL);
103
104
        Preferences.view_track_number = gconf_client_get_bool(gconfconnect, "/apps/gMTP/viewTrackNumber", NULL);
120
121
        Preferences.fileSystemDownloadPath = g_string_new(g_settings_get_string(gsettings_connect, "downloadpath"));
121
122
        Preferences.fileSystemUploadPath = g_string_new(g_settings_get_string(gsettings_connect, "uploadpath"));
122
123
        Preferences.auto_add_track_to_playlist = g_settings_get_boolean(gsettings_connect, "autoaddtrackplaylist");
 
124
        Preferences.ignore_path_in_playlist_import = g_settings_get_boolean(gsettings_connect, "ignorepathinplaylist");
123
125
        Preferences.view_size = g_settings_get_boolean(gsettings_connect, "viewfilesize");
124
126
        Preferences.view_type = g_settings_get_boolean(gsettings_connect, "viewfiletype");
125
127
        Preferences.view_track_number = g_settings_get_boolean(gsettings_connect, "viewtracknumber");
172
174
        gconf_client_set_string(gconfconnect, "/apps/gMTP/DownloadPath", Preferences.fileSystemDownloadPath->str, NULL);
173
175
        gconf_client_set_string(gconfconnect, "/apps/gMTP/UploadPath", Preferences.fileSystemUploadPath->str, NULL);
174
176
        gconf_client_set_bool(gconfconnect, "/apps/gMTP/autoAddTrackPlaylist", Preferences.auto_add_track_to_playlist, NULL);
 
177
        gconf_client_set_bool(gconfconnect, "/apps/gMTP/ignorepathinplaylist", Preferences.ignore_path_in_playlist_import, NULL);
175
178
        gconf_client_set_bool(gconfconnect, "/apps/gMTP/viewFileSize", Preferences.view_size, NULL);
176
179
        gconf_client_set_bool(gconfconnect, "/apps/gMTP/viewFileType", Preferences.view_type, NULL);
177
180
        gconf_client_set_bool(gconfconnect, "/apps/gMTP/viewTrackNumber", Preferences.view_track_number, NULL);
195
198
        g_settings_set_string(gsettings_connect, "downloadpath", Preferences.fileSystemDownloadPath->str);
196
199
        g_settings_set_string(gsettings_connect, "uploadpath", Preferences.fileSystemUploadPath->str);
197
200
        g_settings_set_boolean(gsettings_connect, "autoaddtrackplaylist", Preferences.auto_add_track_to_playlist);
 
201
        g_settings_set_boolean(gsettings_connect, "ignorepathinplaylist", Preferences.ignore_path_in_playlist_import);
198
202
        g_settings_set_boolean(gsettings_connect, "viewfilesize", Preferences.view_size);
199
203
        g_settings_set_boolean(gsettings_connect, "viewfiletype", Preferences.view_type);
200
204
        g_settings_set_boolean(gsettings_connect, "viewtracknumber", Preferences.view_track_number);
335
339
        if (windowPrefsDialog != NULL) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbuttonAutoAddTrackPlaylist), Preferences.auto_add_track_to_playlist);
336
340
        return;
337
341
    }
 
342
    if (g_ascii_strcasecmp(entry->key, "/apps/gMTP/ignorepathinplaylist") == 0) {
 
343
        //set our promptDownloadPath in Preferences
 
344
        Preferences.ignore_path_in_playlist_import = (gboolean) gconf_value_get_bool((const GConfValue*) gconf_entry_get_value((const GConfEntry*) entry));
 
345
        if (windowPrefsDialog != NULL) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbuttonIgnorePathInPlaylist), Preferences.ignore_path_in_playlist_import);
 
346
        return;
 
347
    }
338
348
    g_fprintf(stderr, _("WARNING: gconf_callback_func() failed - we got a callback for a key thats not ours?\n"));
339
349
}
340
350
#else
457
467
        if (windowPrefsDialog != NULL) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbuttonAutoAddTrackPlaylist), Preferences.auto_add_track_to_playlist);
458
468
        return;
459
469
    }
 
470
    if (g_ascii_strcasecmp(key, "ignorepathinplaylist") == 0) {
 
471
        //set our promptDownloadPath in Preferences
 
472
        Preferences.ignore_path_in_playlist_import = (gboolean) g_settings_get_boolean(settings, key);
 
473
        if (windowPrefsDialog != NULL) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbuttonIgnorePathInPlaylist), Preferences.ignore_path_in_playlist_import);
 
474
        return;
 
475
    }
460
476
    g_fprintf(stderr, _("WARNING: gsettings_callback_func() failed - we got a callback for a key thats not ours?\n"));
461
477
 
462
478
}