Mercurial > audlegacy-plugins
comparison src/bluetooth/bluetooth.c @ 2857:59727b85a091
Restart dialog
author | Paula Stanciu <paula.stanciu@gmail.com> |
---|---|
date | Fri, 01 Aug 2008 23:18:21 +0300 |
parents | 162766a69f12 |
children | 528d19a2ea3d |
comparison
equal
deleted
inserted
replaced
2856:59ff744e1e23 | 2857:59727b85a091 |
---|---|
41 static void remote_name_updated(DBusGProxy *object, const char *address, char *name, gpointer user_data); | 41 static void remote_name_updated(DBusGProxy *object, const char *address, char *name, gpointer user_data); |
42 static void print_results(void); | 42 static void print_results(void); |
43 static void discovery_completed(DBusGProxy *object, gpointer user_data); | 43 static void discovery_completed(DBusGProxy *object, gpointer user_data); |
44 void discover_devices(void); | 44 void discover_devices(void); |
45 void disconnect_dbus_signals(void); | 45 void disconnect_dbus_signals(void); |
46 | 46 static void show_restart_dialog(void); |
47 | 47 |
48 GeneralPlugin bluetooth_gp = | 48 GeneralPlugin bluetooth_gp = |
49 { | 49 { |
50 .description = "Bluetooth audio support", | 50 .description = "Bluetooth audio support", |
51 .init = bluetooth_init, | 51 .init = bluetooth_init, |
210 mcs_handle_t *cfgfile = aud_cfg_db_open(); | 210 mcs_handle_t *cfgfile = aud_cfg_db_open(); |
211 aud_cfg_db_set_string(cfgfile,"ALSA","pcm_device", "audacious_bt"); | 211 aud_cfg_db_set_string(cfgfile,"ALSA","pcm_device", "audacious_bt"); |
212 aud_cfg_db_close(cfgfile); | 212 aud_cfg_db_close(cfgfile); |
213 | 213 |
214 printf("play callback\n"); | 214 printf("play callback\n"); |
215 | 215 close_window(); |
216 | 216 show_restart_dialog(); |
217 } | 217 |
218 | 218 |
219 } | |
220 static void show_restart_dialog() | |
221 { | |
222 static GtkWidget *window = NULL; | |
223 GtkWidget *dialog; | |
224 dialog = gtk_message_dialog_new (GTK_WINDOW (window), | |
225 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, | |
226 GTK_MESSAGE_INFO, | |
227 GTK_BUTTONS_OK, | |
228 "Please restart the player to apply the bluetooth audio settings!"); | |
229 gtk_dialog_run (GTK_DIALOG (dialog)); | |
230 gtk_widget_destroy (dialog); | |
231 } | |
219 | 232 |
220 static void remote_device_found(DBusGProxy *object, char *address, const unsigned int class, const int rssi, gpointer user_data) | 233 static void remote_device_found(DBusGProxy *object, char *address, const unsigned int class, const int rssi, gpointer user_data) |
221 { | 234 { |
222 int found_in_list=FALSE; | 235 int found_in_list=FALSE; |
223 g_static_mutex_lock(&mutex); | 236 g_static_mutex_lock(&mutex); |