summaryrefslogtreecommitdiff
path: root/plugins/gtkui/prefwin.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-10-23 11:50:41 +0200
committerGravatar waker <wakeroid@gmail.com>2011-10-23 11:50:41 +0200
commita9c813ddbda28a2d0beff104fe8cf80299292533 (patch)
tree5630dfd20c5e4484148dc4fde06fdb2a0e9aeefa /plugins/gtkui/prefwin.c
parent2f2937a5554d4cdca177eb546a0e0c449b16c700 (diff)
parent50208fdf54d7afaf8b42abc511ddc675b9475184 (diff)
Merge branch 'master' into devel
Conflicts: deadbeef.h metacache.c playlist.c plugins.c plugins/gtkui/Makefile.am plugins/gtkui/ddbcellrenderertextmultiline.c plugins/gtkui/ddbcellrenderertextmultiline.h plugins/gtkui/ddbequalizer.c plugins/gtkui/ddbequalizer.h plugins/gtkui/ddbseekbar.c plugins/gtkui/ddbseekbar.h plugins/gtkui/ddbtabstrip.c plugins/gtkui/fileman.c plugins/gtkui/gtkui.c plugins/gtkui/interface.c plugins/gtkui/plcommon.c plugins/gtkui/trkproperties.c
Diffstat (limited to 'plugins/gtkui/prefwin.c')
-rw-r--r--plugins/gtkui/prefwin.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/plugins/gtkui/prefwin.c b/plugins/gtkui/prefwin.c
index d2d09300..bfcc80c9 100644
--- a/plugins/gtkui/prefwin.c
+++ b/plugins/gtkui/prefwin.c
@@ -57,7 +57,7 @@ gtk_enum_sound_callback (const char *name, const char *desc, void *userdata) {
return;
}
GtkComboBox *combobox = GTK_COMBO_BOX (userdata);
- gtk_combo_box_append_text (combobox, desc);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), desc);
deadbeef->conf_lock ();
if (!strcmp (deadbeef->conf_get_str_fast ("alsa_soundcard", "default"), name)) {
@@ -79,7 +79,7 @@ preferences_fill_soundcards (void) {
GtkTreeModel *mdl = gtk_combo_box_get_model (combobox);
gtk_list_store_clear (GTK_LIST_STORE (mdl));
- gtk_combo_box_append_text (combobox, _("Default Audio Device"));
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), _("Default Audio Device"));
deadbeef->conf_lock ();
const char *s = deadbeef->conf_get_str_fast ("alsa_soundcard", "default");
@@ -318,12 +318,12 @@ prefwin_add_hotkeys_tab (GtkWidget *prefwin) {
addhotkey = gtk_button_new_with_mnemonic (_("Add"));
gtk_widget_show (addhotkey);
gtk_container_add (GTK_CONTAINER (hbuttonbox3), addhotkey);
- GTK_WIDGET_SET_FLAGS (addhotkey, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (addhotkey, TRUE);
removehotkey = gtk_button_new_with_mnemonic (_("Remove"));
gtk_widget_show (removehotkey);
gtk_container_add (GTK_CONTAINER (hbuttonbox3), removehotkey);
- GTK_WIDGET_SET_FLAGS (removehotkey, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (removehotkey, TRUE);
label66 = gtk_label_new (_("Global Hotkeys"));
gtk_widget_show (label66);
@@ -473,7 +473,7 @@ on_preferences_activate (GtkMenuItem *menuitem,
const char *outplugname = deadbeef->conf_get_str_fast ("output_plugin", "ALSA output plugin");
DB_output_t **out_plugs = deadbeef->plug_get_output_list ();
for (int i = 0; out_plugs[i]; i++) {
- gtk_combo_box_append_text (combobox, out_plugs[i]->plugin.name);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), out_plugs[i]->plugin.name);
if (!strcmp (outplugname, out_plugs[i]->plugin.name)) {
gtk_combo_box_set_active (combobox, i);
}
@@ -500,6 +500,9 @@ on_preferences_activate (GtkMenuItem *menuitem,
// replaygain_preamp
gtk_range_set_value (GTK_RANGE (lookup_widget (w, "replaygain_preamp")), deadbeef->conf_get_int ("replaygain_preamp", 0));
+ // global_preamp
+ gtk_range_set_value (GTK_RANGE (lookup_widget (w, "global_preamp")), deadbeef->conf_get_int ("global_preamp", 0));
+
// 8_to_16
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (w, "convert8to16")), deadbeef->conf_get_int ("streamer.8_to_16", 1));
@@ -547,7 +550,7 @@ on_preferences_activate (GtkMenuItem *menuitem,
combobox = GTK_COMBO_BOX (lookup_widget (w, "gui_plugin"));
const char **names = deadbeef->plug_get_gui_names ();
for (int i = 0; names[i]; i++) {
- gtk_combo_box_append_text (combobox, names[i]);
+ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), names[i]);
if (!strcmp (names[i], deadbeef->conf_get_str_fast ("gui_plugin", "GTK2"))) {
gtk_combo_box_set_active (combobox, i);
}
@@ -725,6 +728,14 @@ on_replaygain_preamp_value_changed (GtkRange *range,
deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0);
}
+void
+on_global_preamp_value_changed (GtkRange *range,
+ gpointer user_data)
+{
+ float val = gtk_range_get_value (range);
+ deadbeef->conf_set_float ("global_preamp", val);
+ deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0);
+}
void
on_pref_close_send_to_tray_clicked (GtkButton *button,
@@ -1326,7 +1337,7 @@ void
on_gui_plugin_changed (GtkComboBox *combobox,
gpointer user_data)
{
- gchar *txt = gtk_combo_box_get_active_text (combobox);
+ gchar *txt = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combobox));
if (txt) {
deadbeef->conf_set_str ("gui_plugin", txt);
g_free (txt);