ajacoutot 65333f1ad9 - Change bitrate divisor from 1024 to 1000
Fix cache display problem when used as browser plugin

- Fix problem with default auto_hide value

adapted from upstream svn by David Coppa (maintainer)
2009-04-14 09:38:39 +00:00

80 lines
4.6 KiB
Plaintext

$OpenBSD: patch-src_gui_c,v 1.3 2009/04/14 09:38:39 ajacoutot Exp $
--- src/gui.c.orig Sun Mar 8 01:29:15 2009
+++ src/gui.c Mon Apr 13 17:41:59 2009
@@ -3550,7 +3550,7 @@ void menuitem_details_callback(GtkMenuItem * menuitem,
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
gtk_misc_set_padding(GTK_MISC(label), 12, 0);
gtk_table_attach_defaults(GTK_TABLE(details_table), label, 0, 1, i, i + 1);
- buf = g_strdup_printf("%i Kb/s", (gint) (g_strtod(idle->video_bitrate, NULL) / 1024));
+ buf = g_strdup_printf("%i Kb/s", (gint) (g_strtod(idle->video_bitrate, NULL) / 1000));
label = gtk_label_new(buf);
g_free(buf);
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
@@ -3621,7 +3621,7 @@ void menuitem_details_callback(GtkMenuItem * menuitem,
gtk_table_attach_defaults(GTK_TABLE(details_table), label, 0, 1, i, i + 1);
if (idle != NULL) {
buf =
- g_strdup_printf("%i Kb/s", (gint) (g_strtod(idle->audio_bitrate, NULL) / 1024));
+ g_strdup_printf("%i Kb/s", (gint) (g_strtod(idle->audio_bitrate, NULL) / 1000));
label = gtk_label_new(buf);
g_free(buf);
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
@@ -3636,7 +3636,7 @@ void menuitem_details_callback(GtkMenuItem * menuitem,
if (idle != NULL) {
buf =
g_strdup_printf("%i Kb/s",
- (gint) (g_strtod(idle->audio_samplerate, NULL) / 1024));
+ (gint) (g_strtod(idle->audio_samplerate, NULL) / 1000));
label = gtk_label_new(buf);
g_free(buf);
gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.0);
@@ -4104,32 +4104,41 @@ void menuitem_config_callback(GtkMenuItem * menuitem,
tooltip = gtk_tooltips_new();
gtk_tooltips_set_tip(tooltip, config_ao,
_
- ("mplayer audio output device\nalsa or oss should always work, try esd in gnome, arts in kde, or pulse on newer distributions"),
+ ("mplayer audio output device\nOn Linux, alsa or oss should always work\nTry esd in gnome, arts in kde, or pulse on newer Linux distributions\nOn OpenBSD, use sndio"),
NULL);
if (config_ao != NULL) {
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "alsa");
+ gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "sndio");
+ gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "sun");
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "arts");
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "esd");
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "jack");
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "oss");
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "pulse");
+ gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), "rtunes");
if (ao != NULL) {
if (strcmp(ao, "alsa") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 0);
- if (strcmp(ao, "arts") == 0)
+ if (strcmp(ao, "sndio") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 1);
- if (strcmp(ao, "esd") == 0)
+ if (strcmp(ao, "sun") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 2);
- if (strcmp(ao, "jack") == 0)
+ if (strcmp(ao, "arts") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 3);
- if (strcmp(ao, "oss") == 0)
+ if (strcmp(ao, "esd") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 4);
- if (strcmp(ao, "pulse") == 0)
+ if (strcmp(ao, "jack") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 5);
+ if (strcmp(ao, "oss") == 0)
+ gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 6);
+ if (strcmp(ao, "pulse") == 0)
+ gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 7);
+ if (strcmp(ao, "rtunes") == 0)
+ gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 8);
if (gtk_combo_box_get_active(GTK_COMBO_BOX(config_ao))
== -1) {
gtk_combo_box_append_text(GTK_COMBO_BOX(config_ao), ao);
- gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 6);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(config_ao), 9);
}
}
}