Changeset 114
- Timestamp:
- 09/07/06 16:00:09 (5 years ago)
- Location:
- fm_gui/trunk/src
- Files:
-
- 4 modified
-
fm_cdj.c (modified) (3 diffs)
-
fm_cdj.h (modified) (1 diff)
-
fm_cdj_gui.c (modified) (2 diffs)
-
fm_cdj_gui.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fm_gui/trunk/src/fm_cdj.c
r103 r114 13 13 static void fm_cdj_state_changed_cb (RgcRemoteObject *obj, 14 14 gint new_state, 15 gpointer user_data); 16 static void 17 fm_cdj_found_tag_cb (RgcRemoteObject *obj, 18 gchar *tag_name, 19 gchar *tag_value, 15 20 gpointer user_data); 16 21 … … 44 49 rgc_remote_signal_connect (obj, "ready", rgc_marshal_cb_VOID__STRING, 45 50 G_CALLBACK(fm_cdj_gui_ready_cb), cdata); 51 rgc_remote_signal_connect (obj, "found_tag", rgc_marshal_cb_VOID__STRING_STRING, 52 G_CALLBACK(fm_cdj_found_tag_cb), cdata); 46 53 47 54 // FIXME: check if we've already activated … … 69 76 fm_cdj_gui_state_changed_cb (obj, new_state, gui); 70 77 } 78 79 80 static void 81 fm_cdj_found_tag_cb (RgcRemoteObject *obj, 82 gchar *tag_name, 83 gchar *tag_value, 84 gpointer user_data) 85 { 86 FmCDJData *cdata = (FmCDJData *) user_data; 87 FmCDJGui *gui = cdata->gui; 88 89 g_print("Tag \"%s\" = \"%s\"\n", tag_name, tag_value); 90 91 if (strcmp (tag_name, "artist") == 0) { 92 g_free (cdata->artist); 93 cdata->artist = g_strdup (tag_value); 94 } else if (strcmp (tag_name, "title") == 0) { 95 g_free (cdata->title); 96 cdata->title = g_strdup (tag_value); 97 } else 98 g_print ("Ignoring unknown tag \"%s\"\n", tag_name); 99 100 fm_cdj_gui_display_tag (cdata->gui, cdata->artist, cdata->title); 101 } -
fm_gui/trunk/src/fm_cdj.h
r44 r114 7 7 8 8 FmCDJGui *gui; 9 10 gchar *artist; 11 gchar *title; 9 12 }; 10 13 -
fm_gui/trunk/src/fm_cdj_gui.c
r110 r114 235 235 gchar *basename = g_path_get_basename (selected_filename); 236 236 gchar *message = g_strdup_printf ("LOADING %s", basename); 237 238 g_free (cdata->artist); 239 cdata->artist = NULL; 240 g_free (cdata->title); 241 cdata->title = NULL; 242 237 243 write_message(cdata->gui, message); 238 244 g_free(message); … … 326 332 327 333 g_print ("Ready for %s\n", filename); 328 gchar *basename = g_path_get_basename (filename);334 /*gchar *basename = g_path_get_basename (filename); 329 335 gchar *message = g_strdup_printf ("LOADED %s", basename); 330 336 write_message(cdata->gui, message); 331 337 g_free (message); 332 g_free (basename); 338 g_free (basename);*/ 339 } 340 341 342 void 343 fm_cdj_gui_display_tag (FmCDJGui *gui, 344 gchar *artist, 345 gchar *title) 346 { 347 gchar *message = g_strdup_printf ("%s - %s", artist, title); 348 write_message(gui, message); 349 g_free (message); 333 350 } 334 351 -
fm_gui/trunk/src/fm_cdj_gui.h
r110 r114 65 65 gint new_state, 66 66 FmCDJGui *gui); 67 68 void 69 fm_cdj_gui_display_tag (FmCDJGui *gui, 70 gchar *artist, 71 gchar *title);
