~ubuntu-branches/ubuntu/trusty/sound-juicer/trusty

« back to all changes in this revision

Viewing changes to src/sj-main.c

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-12-15 13:16:02 UTC
  • mfrom: (1.1.35 upstream) (2.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20081215131602-0bezbep7s4w4zy0s
Tags: 2.25.1-0ubuntu1
* Sync on Debian
* debian/control.in:
  - Build-depends on libcdio-dev and liblaunchpad-integration-dev
* debian/patches/01_lpi.patch,
  debian/patches/02_autoconf.patch:
  - lpi changes and configure update
* New upstream version (LP: #308165)
  - Chain the metadata lookups (Bastien Nocera)
  - Finish the libmusicbrainz3 metadata fetcher (BN)
  - Add a GVFS metadata fetcher as fallback (BN)
  - Make libcdio option, as it breaks the GPL+Exception license (BN)
  - Export ASIN, Discogs, Wikipedia in the internal metadata (BN)
  - Lots of other cleanups to the metadata code (BN)
  - Remove copy of the id3mux plugin, assume it exists now (BN)
  - Remove Encoding field from desktop file (Pacho Ramos)
  - Add Audio to desktop categories (Patryk Zawadzki)
  - Correctly parse CDDA URLs (Matthew Martin)
  - Don't free the option context
* debian/control.in:
  - Change build-dep on libmusicbrainz3-dev
  - Also build-dep on libneon26-gnutls-dev and libdiscid0-dev for lmb3
* debian/watch:
  - Update for 2.25.x releases

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#include "bacon-message-connection.h"
44
44
#include "gconf-bridge.h"
45
45
#include "sj-about.h"
46
 
#include "sj-metadata.h"
47
 
#include "sj-metadata-musicbrainz.h"
 
46
#include "sj-metadata-getter.h"
48
47
#include "sj-extractor.h"
49
48
#include "sj-structures.h"
50
49
#include "sj-error.h"
69
68
 
70
69
GladeXML *glade;
71
70
 
72
 
SjMetadata *metadata;
 
71
SjMetadataGetter *metadata;
73
72
SjExtractor *extractor;
74
73
 
75
74
GConfClient *gconf_client;
797
796
}
798
797
 
799
798
static void
800
 
metadata_cb (SjMetadata *m, GList *albums, GError *error)
 
799
metadata_cb (SjMetadataGetter *m, GList *albums, GError *error)
801
800
{
802
801
  gboolean realized = GTK_WIDGET_REALIZED (main_window);
803
802
 
825
824
    return;
826
825
  }
827
826
 
 
827
  current_submit_url = sj_metadata_getter_get_submit_url (metadata);
 
828
  if (current_submit_url) {
 
829
    gtk_widget_set_sensitive (submit_menuitem, TRUE);
 
830
  }
 
831
 
828
832
  /* Free old album details */
829
833
  if (current_album != NULL) {
830
834
    album_details_free (current_album);
914
918
    return;
915
919
  }
916
920
 
917
 
  current_submit_url = sj_metadata_get_submit_url (metadata);
918
 
  if (current_submit_url) {
919
 
    gtk_widget_set_sensitive (submit_menuitem, TRUE);
920
 
  }
921
 
 
922
 
  sj_metadata_list_albums (metadata, &error);
 
921
  sj_metadata_getter_list_albums (metadata, &error);
923
922
 
924
923
  if (error && !(error->code == SJ_ERROR_CD_NO_MEDIA && ignore_no_media)) {
925
924
    GtkWidget *dialog;
1046
1045
    set_drive_from_device (device);
1047
1046
  }
1048
1047
 
1049
 
  sj_metadata_set_cdrom (metadata, device);
 
1048
  sj_metadata_getter_set_cdrom (metadata, device);
1050
1049
  sj_extractor_set_device (extractor, device);
1051
1050
  
1052
1051
  if (drive != NULL) {
1174
1173
http_proxy_setup (GConfClient *client)
1175
1174
{
1176
1175
  if (!gconf_client_get_bool (client, GCONF_HTTP_PROXY_ENABLE, NULL)) {
1177
 
    sj_metadata_set_proxy (metadata, NULL);
 
1176
    sj_metadata_getter_set_proxy (metadata, NULL);
1178
1177
  } else {
1179
1178
    char *host;
1180
1179
    int port;
1181
1180
 
1182
1181
    host = gconf_client_get_string (client, GCONF_HTTP_PROXY, NULL);
1183
 
    sj_metadata_set_proxy (metadata, host);
 
1182
    sj_metadata_getter_set_proxy (metadata, host);
1184
1183
    g_free (host);
1185
1184
    port = gconf_client_get_int (client, GCONF_HTTP_PROXY_PORT, NULL);
1186
 
    sj_metadata_set_proxy_port (metadata, port);
 
1185
    sj_metadata_getter_set_proxy_port (metadata, port);
1187
1186
  }
1188
1187
}
1189
1188
 
1632
1631
    bacon_message_connection_set_callback (connection, on_message_received, NULL);
1633
1632
  }
1634
1633
 
1635
 
  metadata = SJ_METADATA (sj_metadata_musicbrainz_new ());
 
1634
  metadata = sj_metadata_getter_new ();
1636
1635
  g_signal_connect (metadata, "metadata", G_CALLBACK (metadata_cb), NULL);
1637
1636
 
1638
1637
  gconf_client = gconf_client_get_default ();
1791
1790
 
1792
1791
  sj_play_init ();
1793
1792
 
1794
 
#if HAVE_TAGLIB
1795
 
  /* See if the system supports id3mux, and if not register our own */
1796
 
  if (!gst_default_registry_check_feature_version ("id3mux", 0, 10, 0))
1797
 
    id3mux_register ();
1798
 
#endif
1799
 
 
1800
1793
  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (track_listview));
1801
1794
  gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
1802
1795