~ubuntu-branches/ubuntu/intrepid/gnomad2/intrepid

« back to all changes in this revision

Viewing changes to src/metadata.c

  • Committer: Bazaar Package Importer
  • Author(s): Andrea Veri
  • Date: 2007-06-20 23:39:14 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070620233914-iwc10qsm2yr0vrqn
Tags: 2.8.12-2ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - Lessen the build-depends on libmtp-dev to >= 0.1.3.
  - Modify Maintainer value to match Debian-Maintainer-Field Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
  meta->filename = NULL;
39
39
  meta->path = NULL;
40
40
  meta->folder = NULL;
 
41
  return meta;
41
42
}
42
43
 
43
44
void destroy_metadata_t(metadata_t *meta)
105
106
  g_print("Artist:    %s\n", metadata_string_escape(meta->artist));
106
107
  g_print("Title:     %s\n", metadata_string_escape(meta->title));
107
108
  g_print("Album:     %s\n", metadata_string_escape(meta->album));
108
 
  g_print("Year:      %lu\n", meta->year);
 
109
  g_print("Year:      %" PRIguint32 "\n", meta->year);
109
110
  g_print("Genre:     %s\n", metadata_string_escape(meta->genre));
110
111
  g_print("Length:    %s\n", metadata_string_escape(meta->length));
111
112
  g_print("Size:      %lu bytes\n", meta->size);
112
113
  g_print("Codec:     %s\n", metadata_string_escape(meta->codec));
113
 
  g_print("Track#:    %lu\n", meta->trackno);
 
114
  g_print("Track#:    %" PRIguint32 "\n", meta->trackno);
114
115
  g_print("Protected: %s\n", meta->protect ? "YES" : "NO");
115
116
  g_print("Filename:  %s\n", metadata_string_escape(meta->filename));
116
117
  g_print("Path:      %s\n", metadata_string_escape(meta->path));
193
194
    returnname = replacestring(returnname, "%g", "<Unknown>");
194
195
  }
195
196
  // The following does not contain filesystem-illegal characters
196
 
  tmptrackno = g_strdup_printf("%02lu", meta->trackno);
 
197
  tmptrackno = g_strdup_printf("%02u", meta->trackno);
197
198
  if (tmptrackno) {
198
199
    returnname = replacestring(returnname, "%n", tmptrackno);
199
200
  } else {
200
201
    returnname = replacestring(returnname, "%n", "00");
201
202
  }
202
203
  g_free(tmptrackno);
203
 
  tmpyear = g_strdup_printf("%lu", meta->year);
 
204
  tmpyear = g_strdup_printf("%" PRIguint32, meta->year);
204
205
  if (tmpyear)
205
206
    returnname = replacestring(returnname, "%y", tmpyear);
206
207
  else
254
255
void add_metadata_to_model(metadata_t const * const meta, 
255
256
                           listtype_t const listtype)
256
257
{
257
 
  GtkListStore *liststore;
 
258
  GtkListStore *liststore = NULL;  /* initialize to shut up GCC */
258
259
  GtkTreeIter listiter;
259
260
 
260
261
  if (listtype == HD_LIST || listtype == JB_LIST) {
914
915
void create_list_stores()
915
916
{
916
917
  /* The list stores */
917
 
  GtkListStore *hdliststore;
918
 
  GtkListStore *hddataliststore;
919
918
  GtkTreeStore *pltreestore;
920
919
 
921
920
  pltreestore = gtk_tree_store_new(PLIST_N_COLUMNS,