From 665c42a1675dc450b56052ee664b01ee650f8658 Mon Sep 17 00:00:00 2001 From: waker Date: Thu, 14 Apr 2011 21:24:23 +0200 Subject: more unification work on event system --- plugins/alsa/alsa.c | 4 ++-- plugins/artwork/artwork.c | 2 +- plugins/gtkui/callbacks.c | 28 +++++++++++++-------------- plugins/gtkui/fileman.c | 2 +- plugins/gtkui/gtkui.c | 8 ++++---- plugins/gtkui/mainplaylist.c | 2 +- plugins/gtkui/pluginconf.c | 4 ++-- plugins/gtkui/prefwin.c | 46 ++++++++++++++++++++++---------------------- plugins/gtkui/search.c | 4 ++-- plugins/hotkeys/hotkeys.c | 20 +++++++++---------- plugins/oss/oss.c | 2 +- 11 files changed, 61 insertions(+), 61 deletions(-) (limited to 'plugins') diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c index 04a14bdd..7c39cb2c 100644 --- a/plugins/alsa/alsa.c +++ b/plugins/alsa/alsa.c @@ -662,7 +662,7 @@ palsa_thread (void *context) { exit (-1); } } - // deadbeef->sendmessage (M_REINIT_SOUND, 0, 0, 0); + // deadbeef->sendmessage (DB_EV_REINIT_SOUND, 0, 0, 0); // break; } else { @@ -697,7 +697,7 @@ alsa_configchanged (void) { || buffer != req_buffer_size || period != req_period_size)) { trace ("alsa: config option changed, restarting\n"); - deadbeef->sendmessage (M_REINIT_SOUND, 0, 0, 0); + deadbeef->sendmessage (DB_EV_REINIT_SOUND, 0, 0, 0); } deadbeef->conf_unlock (); return 0; diff --git a/plugins/artwork/artwork.c b/plugins/artwork/artwork.c index a86b83a7..82b677dd 100644 --- a/plugins/artwork/artwork.c +++ b/plugins/artwork/artwork.c @@ -745,7 +745,7 @@ artwork_configchanged (void) { strcpy (artwork_filemask, new_artwork_filemask); deadbeef->conf_set_int64 ("artwork.cache_reset_time", artwork_reset_time); artwork_reset (0); - deadbeef->sendmessage (M_PLAYLIST_REFRESH, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PLAYLIST_REFRESH, 0, 0, 0); } return 0; diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index 3c775f16..1cbbe523 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -272,7 +272,7 @@ on_quit_activate (GtkMenuItem *menuitem, gpointer user_data) { progress_abort (); - deadbeef->sendmessage (M_TERMINATE, 0, 0, 0); + deadbeef->sendmessage (DB_EV_TERMINATE, 0, 0, 0); } @@ -298,7 +298,7 @@ void on_stopbtn_clicked (GtkButton *button, gpointer user_data) { - deadbeef->sendmessage (M_STOP, 0, 0, 0); + deadbeef->sendmessage (DB_EV_STOP, 0, 0, 0); } @@ -306,7 +306,7 @@ void on_playbtn_clicked (GtkButton *button, gpointer user_data) { - deadbeef->sendmessage (M_PLAY_CURRENT, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PLAY_CURRENT, 0, 0, 0); } @@ -314,7 +314,7 @@ void on_pausebtn_clicked (GtkButton *button, gpointer user_data) { - deadbeef->sendmessage (M_TOGGLE_PAUSE, 0, 0, 0); + deadbeef->sendmessage (DB_EV_TOGGLE_PAUSE, 0, 0, 0); } @@ -322,7 +322,7 @@ void on_prevbtn_clicked (GtkButton *button, gpointer user_data) { - deadbeef->sendmessage (M_PREV, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PREV, 0, 0, 0); } @@ -330,7 +330,7 @@ void on_nextbtn_clicked (GtkButton *button, gpointer user_data) { - deadbeef->sendmessage (M_NEXT, 0, 0, 0); + deadbeef->sendmessage (DB_EV_NEXT, 0, 0, 0); } @@ -338,7 +338,7 @@ void on_playrand_clicked (GtkButton *button, gpointer user_data) { - deadbeef->sendmessage (M_PLAY_RANDOM, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PLAY_RANDOM, 0, 0, 0); } gboolean @@ -349,7 +349,7 @@ on_mainwin_key_press_event (GtkWidget *widget, uint32_t maskedstate = (event->state &~ (GDK_LOCK_MASK | GDK_MOD2_MASK | GDK_MOD3_MASK | GDK_MOD5_MASK)) & 0xfff; if ((maskedstate == GDK_MOD1_MASK || maskedstate == 0) && event->keyval == GDK_n) { // button for that one is not in toolbar anymore, so handle it manually - deadbeef->sendmessage (M_PLAY_RANDOM, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PLAY_RANDOM, 0, 0, 0); } else if ((maskedstate == GDK_MOD1_MASK || maskedstate == 0) && event->keyval >= GDK_1 && event->keyval <= GDK_9) { int pl = event->keyval - GDK_1; @@ -370,7 +370,7 @@ on_order_linear_activate (GtkMenuItem *menuitem, gpointer user_data) { deadbeef->conf_set_int ("playback.order", PLAYBACK_ORDER_LINEAR); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } @@ -379,7 +379,7 @@ on_order_shuffle_activate (GtkMenuItem *menuitem, gpointer user_data) { deadbeef->conf_set_int ("playback.order", PLAYBACK_ORDER_SHUFFLE_TRACKS); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } void @@ -387,7 +387,7 @@ on_order_shuffle_albums_activate (GtkMenuItem *menuitem, gpointer user_data) { deadbeef->conf_set_int ("playback.order", PLAYBACK_ORDER_SHUFFLE_ALBUMS); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } void @@ -395,7 +395,7 @@ on_order_random_activate (GtkMenuItem *menuitem, gpointer user_data) { deadbeef->conf_set_int ("playback.order", PLAYBACK_ORDER_RANDOM); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } @@ -611,7 +611,7 @@ on_seekbar_button_release_event (GtkWidget *widget, if (time < 0) { time = 0; } - deadbeef->streamer_seek (time); + deadbeef->sendmessage (DB_EV_SEEK, 0, time * 1000, 0); deadbeef->pl_item_unref (trk); } gtk_widget_queue_draw (widget); @@ -636,7 +636,7 @@ on_mainwin_delete_event (GtkWidget *widget, gtk_widget_hide (widget); } else { - deadbeef->sendmessage (M_TERMINATE, 0, 0, 0); + deadbeef->sendmessage (DB_EV_TERMINATE, 0, 0, 0); } return TRUE; } diff --git a/plugins/gtkui/fileman.c b/plugins/gtkui/fileman.c index 3b5db560..6ff981b4 100644 --- a/plugins/gtkui/fileman.c +++ b/plugins/gtkui/fileman.c @@ -95,7 +95,7 @@ open_files_worker (void *data) { extern GtkWidget *mainwin; DdbListview *pl = DDB_LISTVIEW (lookup_widget (mainwin, "playlist")); ddb_listview_set_cursor (pl, 0); - deadbeef->sendmessage (M_PLAY_CURRENT, 0, 1, 0); + deadbeef->sendmessage (DB_EV_PLAY_CURRENT, 0, 1, 0); } void diff --git a/plugins/gtkui/gtkui.c b/plugins/gtkui/gtkui.c index 22570b87..66658c95 100644 --- a/plugins/gtkui/gtkui.c +++ b/plugins/gtkui/gtkui.c @@ -314,7 +314,7 @@ on_trayicon_button_press_event (GtkWidget *widget, mainwin_toggle_visible (); } else if (event->button == 2) { - deadbeef->sendmessage (M_TOGGLE_PAUSE, 0, 0, 0); + deadbeef->sendmessage (DB_EV_TOGGLE_PAUSE, 0, 0, 0); } return FALSE; } @@ -942,7 +942,7 @@ gtkui_setup_gui_refresh (void) { int gtkui_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { switch (id) { - case DB_EV_ACTIVATE: + case DB_EV_ACTIVATED: g_idle_add (activate_cb, NULL); break; case DB_EV_SONGCHANGED: @@ -975,7 +975,7 @@ gtkui_message (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2) { case DB_EV_OUTPUTCHANGED: g_idle_add (outputchanged_cb, NULL); break; - case DB_EV_PLAYLISTSWITCH: + case DB_EV_PLAYLISTSWITCHED: g_idle_add (playlistswitch_cb, NULL); break; } @@ -1100,7 +1100,7 @@ gtkui_set_progress_text_idle (gpointer data) { gboolean gtkui_progress_hide_idle (gpointer data) { progress_hide (); - //deadbeef->sendmessage (M_PLAYLIST_REFRESH, 0, 0, 0); + //deadbeef->sendmessage (DB_EV_PLAYLIST_REFRESH, 0, 0, 0); return FALSE; } diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c index 0c736150..9c4c5877 100644 --- a/plugins/gtkui/mainplaylist.c +++ b/plugins/gtkui/mainplaylist.c @@ -143,7 +143,7 @@ main_col_sort (int col, int sort_order, void *user_data) { deadbeef->pl_sort (PL_MAIN, c->id, c->format, sort_order-1); } void main_handle_doubleclick (DdbListview *listview, DdbListviewIter iter, int idx) { - deadbeef->sendmessage (M_PLAY_NUM, 0, idx, 0); + deadbeef->sendmessage (DB_EV_PLAY_NUM, 0, idx, 0); } void main_selection_changed (DdbListviewIter it, int idx) { diff --git a/plugins/gtkui/pluginconf.c b/plugins/gtkui/pluginconf.c index c7c73ae8..04f73084 100644 --- a/plugins/gtkui/pluginconf.c +++ b/plugins/gtkui/pluginconf.c @@ -52,7 +52,7 @@ on_prop_browse_file (GtkButton *button, gpointer user_data) { if (folder) { deadbeef->conf_set_str ("filechooser.lastdir", folder); g_free (folder); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } if (response == GTK_RESPONSE_OK) { gchar *file = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dlg)); @@ -183,7 +183,7 @@ static void apply_conf (GtkWidget *w, ddb_dialog_t *conf) { break; } } - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } static void diff --git a/plugins/gtkui/prefwin.c b/plugins/gtkui/prefwin.c index 9883fc96..c697307f 100644 --- a/plugins/gtkui/prefwin.c +++ b/plugins/gtkui/prefwin.c @@ -656,7 +656,7 @@ on_pref_soundcard_changed (GtkComboBox *combobox, const char *soundcard = deadbeef->conf_get_str_fast ("alsa_soundcard", "default"); if (strcmp (soundcard, alsa_device_names[active])) { deadbeef->conf_set_str ("alsa_soundcard", alsa_device_names[active]); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } deadbeef->conf_unlock (); } @@ -690,7 +690,7 @@ on_pref_output_plugin_changed (GtkComboBox *combobox, else { if (prev != new) { deadbeef->conf_set_str ("output_plugin", new->plugin.name); - deadbeef->sendmessage (M_REINIT_SOUND, 0, 0, 0); + deadbeef->sendmessage (DB_EV_REINIT_SOUND, 0, 0, 0); } } } @@ -701,7 +701,7 @@ on_pref_replaygain_mode_changed (GtkComboBox *combobox, { int active = gtk_combo_box_get_active (combobox); deadbeef->conf_set_int ("replaygain_mode", active == -1 ? 0 : active); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } void @@ -710,7 +710,7 @@ on_pref_replaygain_scale_clicked (GtkButton *button, { int active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); deadbeef->conf_set_int ("replaygain_scale", active); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } void @@ -719,7 +719,7 @@ on_replaygain_preamp_value_changed (GtkRange *range, { float val = gtk_range_get_value (range); deadbeef->conf_set_float ("replaygain_preamp", val); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } @@ -729,7 +729,7 @@ on_pref_close_send_to_tray_clicked (GtkButton *button, { int active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)); deadbeef->conf_set_int ("close_send_to_tray", active); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } void @@ -738,7 +738,7 @@ on_hide_tray_icon_toggled (GtkToggleButton *togglebutton, { int active = gtk_toggle_button_get_active (togglebutton); deadbeef->conf_set_int ("gtkui.hide_tray_icon", active); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } void @@ -850,7 +850,7 @@ on_tabstrip_light_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.tabstrip_light", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); redraw_headers (); tabstrip_redraw (); @@ -866,7 +866,7 @@ on_tabstrip_mid_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.tabstrip_mid", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); redraw_headers (); tabstrip_redraw (); @@ -882,7 +882,7 @@ on_tabstrip_dark_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.tabstrip_dark", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); redraw_headers (); tabstrip_redraw (); @@ -897,7 +897,7 @@ on_tabstrip_base_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.tabstrip_base", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); redraw_headers (); tabstrip_redraw (); @@ -912,7 +912,7 @@ on_tabstrip_text_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.tabstrip_text", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); redraw_headers (); tabstrip_redraw (); @@ -927,7 +927,7 @@ on_bar_foreground_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.bar_foreground", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); seekbar_redraw (); volumebar_redraw (); @@ -944,7 +944,7 @@ on_bar_background_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.bar_background", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); seekbar_redraw (); volumebar_redraw (); @@ -958,7 +958,7 @@ on_override_listview_colors_toggled (GtkToggleButton *togglebutton, int active = gtk_toggle_button_get_active (togglebutton); deadbeef->conf_set_int ("gtkui.override_listview_colors", active); gtk_widget_set_sensitive (lookup_widget (prefwin, "listview_colors_group"), active); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); prefwin_init_theme_colors (); playlist_refresh (); @@ -974,7 +974,7 @@ on_listview_even_row_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.listview_even_row", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); playlist_refresh (); } @@ -988,7 +988,7 @@ on_listview_odd_row_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.listview_odd_row", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); playlist_refresh (); } @@ -1002,7 +1002,7 @@ on_listview_selected_row_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.listview_selection", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); playlist_refresh (); } @@ -1016,7 +1016,7 @@ on_listview_text_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.listview_text", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); playlist_refresh (); } @@ -1031,7 +1031,7 @@ on_listview_selected_text_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.listview_selected_text", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); playlist_refresh (); } @@ -1045,7 +1045,7 @@ on_listview_cursor_color_set (GtkColorButton *colorbutton, char str[100]; snprintf (str, sizeof (str), "%d %d %d", clr.red, clr.green, clr.blue); deadbeef->conf_set_str ("gtkui.color.listview_cursor", str); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); playlist_refresh (); } @@ -1058,7 +1058,7 @@ on_override_bar_colors_toggled (GtkToggleButton *togglebutton, int active = gtk_toggle_button_get_active (togglebutton); deadbeef->conf_set_int ("gtkui.override_bar_colors", active); gtk_widget_set_sensitive (lookup_widget (prefwin, "bar_colors_group"), active); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); prefwin_init_theme_colors (); seekbar_redraw (); @@ -1073,7 +1073,7 @@ on_override_tabstrip_colors_toggled (GtkToggleButton *togglebutton, int active = gtk_toggle_button_get_active (togglebutton); deadbeef->conf_set_int ("gtkui.override_tabstrip_colors", active); gtk_widget_set_sensitive (lookup_widget (prefwin, "tabstrip_colors_group"), active); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); gtkui_init_theme_colors (); prefwin_init_theme_colors (); redraw_headers (); diff --git a/plugins/gtkui/search.c b/plugins/gtkui/search.c index 9baf18f3..6f5bf544 100644 --- a/plugins/gtkui/search.c +++ b/plugins/gtkui/search.c @@ -159,7 +159,7 @@ on_searchwin_key_press_event (GtkWidget *widget, int row = deadbeef->pl_get_cursor (PL_SEARCH); DB_playItem_t *it = deadbeef->pl_get_for_idx_and_iter (max (row, 0), PL_SEARCH); if (it) { - deadbeef->sendmessage (M_PLAY_NUM, 0, deadbeef->pl_get_idx_of (it), 0); + deadbeef->sendmessage (DB_EV_PLAY_NUM, 0, deadbeef->pl_get_idx_of (it), 0); deadbeef->pl_item_unref (it); } } @@ -310,7 +310,7 @@ void search_col_free_user_data (void *data) { } void search_handle_doubleclick (DdbListview *listview, DdbListviewIter iter, int idx) { - deadbeef->sendmessage (M_PLAY_NUM, 0, deadbeef->pl_get_idx_of ((DB_playItem_t *)iter), 0); + deadbeef->sendmessage (DB_EV_PLAY_NUM, 0, deadbeef->pl_get_idx_of ((DB_playItem_t *)iter), 0); } void search_selection_changed (DdbListviewIter it, int idx) { diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c index ec8f2e96..5b9c96ee 100644 --- a/plugins/hotkeys/hotkeys.c +++ b/plugins/hotkeys/hotkeys.c @@ -111,7 +111,7 @@ cmd_stop_after_current (void *unused) { int var = deadbeef->conf_get_int ("playlist.stop_after_current", 0); var = 1 - var; deadbeef->conf_set_int ("playlist.stop_after_current", var); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); } /* @@ -507,31 +507,31 @@ hotkeys_reset (void) { int action_play_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) { - deadbeef->sendmessage (M_PLAY_CURRENT, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PLAY_CURRENT, 0, 0, 0); return 0; } int action_prev_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) { - deadbeef->sendmessage (M_PREV, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PREV, 0, 0, 0); return 0; } int action_next_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) { - deadbeef->sendmessage (M_NEXT, 0, 0, 0); + deadbeef->sendmessage (DB_EV_NEXT, 0, 0, 0); return 0; } int action_stop_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) { - deadbeef->sendmessage (M_STOP, 0, 0, 0); + deadbeef->sendmessage (DB_EV_STOP, 0, 0, 0); return 0; } int action_toggle_pause_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) { - deadbeef->sendmessage (M_TOGGLE_PAUSE, 0, 0, 0); + deadbeef->sendmessage (DB_EV_TOGGLE_PAUSE, 0, 0, 0); return 0; } @@ -539,17 +539,17 @@ int action_play_pause_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) { int state = deadbeef->get_output ()->state (); if (state == OUTPUT_STATE_PLAYING) { - deadbeef->sendmessage (M_PAUSE, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PAUSE, 0, 0, 0); } else { - deadbeef->sendmessage (M_PLAY_CURRENT, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PLAY_CURRENT, 0, 0, 0); } return 0; } int action_play_random_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) { - deadbeef->sendmessage (M_PLAY_RANDOM, 0, 0, 0); + deadbeef->sendmessage (DB_EV_PLAY_RANDOM, 0, 0, 0); return 0; } @@ -582,7 +582,7 @@ action_toggle_stop_after_current_cb (struct DB_plugin_action_s *action, DB_playI int var = deadbeef->conf_get_int ("playlist.stop_after_current", 0); var = 1 - var; deadbeef->conf_set_int ("playlist.stop_after_current", var); - deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0); + deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0); return 0; } diff --git a/plugins/oss/oss.c b/plugins/oss/oss.c index e64e1fc0..f1b3e7c9 100644 --- a/plugins/oss/oss.c +++ b/plugins/oss/oss.c @@ -321,7 +321,7 @@ oss_configchanged (void) { if (strcmp (dev, oss_device)) { strncpy (oss_device, dev, sizeof (oss_device)-1); trace ("oss: config option changed, restarting\n"); - deadbeef->sendmessage (M_REINIT_SOUND, 0, 0, 0); + deadbeef->sendmessage (DB_EV_REINIT_SOUND, 0, 0, 0); } deadbeef->conf_unlock (); return 0; -- cgit v1.2.3