~snaggen/rhythmbox/bpm

« back to all changes in this revision

Viewing changes to widgets/rb-song-info.c

  • Committer: Mattias Eriksson
  • Date: 2010-06-04 13:49:01 UTC
  • Revision ID: mattias.eriksson@vizrt.com-20100604134901-4ifybjnvy6qz0b13
ENABLE_BPM is not needed any more since gstreamer support for bpm can be expected in all modern environments

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
        rb_builder_boldify_label (builder, "play_count_label");
395
395
        rb_builder_boldify_label (builder, "duration_label");
396
396
        rb_builder_boldify_label (builder, "bitrate_label");
397
 
 
398
 
#ifdef ENABLE_BPM
399
397
        rb_builder_boldify_label (builder, "bpm_label");
400
 
#else 
401
 
        gtk_widget_destroy(song_info->priv->bpm);
402
 
        gtk_widget_destroy(GTK_WIDGET (gtk_builder_get_object (builder, "bpm_label")));
403
 
        song_info->priv->bpm = NULL;
404
 
#endif
405
398
 
406
399
        /* whenever you press a mnemonic, the associated GtkEntry's text gets highlighted */
407
400
        g_signal_connect_object (G_OBJECT (song_info->priv->title),
911
904
 
912
905
/* Just to get rid of compile warning */
913
906
/* rb_song_info_populate_dnum_field' defined but not used */
914
 
#ifdef ENABLE_BPM
915
907
static void
916
908
rb_song_info_populate_dnum_field (GtkEntry *field, gdouble num)
917
909
{
923
915
        gtk_entry_set_text (field, tmp);
924
916
        g_free (tmp);
925
917
}
926
 
#endif
927
918
 
928
919
static void
929
920
rb_song_info_populate_dialog_multiple (RBSongInfo *song_info)
1036
1027
        const char *text;
1037
1028
        char *tmp;
1038
1029
        gulong num;
 
1030
        gdouble dnum;
1039
1031
 
1040
1032
        g_assert (song_info->priv->current_entry);
1041
1033
 
1060
1052
        rb_song_info_populate_num_field (GTK_ENTRY (song_info->priv->track_cur), num);
1061
1053
        num = rhythmdb_entry_get_ulong (song_info->priv->current_entry, RHYTHMDB_PROP_DISC_NUMBER);
1062
1054
        rb_song_info_populate_num_field (GTK_ENTRY (song_info->priv->disc_cur), num);
1063
 
#ifdef ENABLE_BPM
1064
 
        gdouble dnum;
1065
1055
        dnum = rhythmdb_entry_get_double (song_info->priv->current_entry, RHYTHMDB_PROP_BPM);
1066
1056
        rb_song_info_populate_dnum_field (GTK_ENTRY (song_info->priv->bpm), dnum);
1067
 
#endif
1068
1057
        rb_song_info_update_duration (song_info);
1069
1058
        rb_song_info_update_location (song_info);
1070
1059
        rb_song_info_update_filesize (song_info);
1722
1711
                if (date)
1723
1712
                        g_date_free (date);
1724
1713
        }
1725
 
#ifdef ENABLE_BPM       
1726
1714
        gdouble bpm;
1727
1715
        const char *bpm_str;
1728
1716
        gdouble dentry_val;
1738
1726
                g_value_unset (&val);
1739
1727
                changed = TRUE;
1740
1728
        }
1741
 
#endif
1742
1729
        entry_string = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_TITLE);
1743
1730
        if (g_strcmp0 (title, entry_string)) {
1744
1731
                type = rhythmdb_get_property_type (dialog->priv->db,