# HG changeset patch # User Paula Stanciu # Date 1217621901 -10800 # Node ID 59727b85a091e9f295bece0bcf2824156397170f # Parent 59ff744e1e2395b7cc350d6d97feb72b566732a1 Restart dialog diff -r 59ff744e1e23 -r 59727b85a091 src/bluetooth/bluetooth.c --- a/src/bluetooth/bluetooth.c Fri Aug 01 22:55:49 2008 +0300 +++ b/src/bluetooth/bluetooth.c Fri Aug 01 23:18:21 2008 +0300 @@ -43,7 +43,7 @@ static void discovery_completed(DBusGProxy *object, gpointer user_data); void discover_devices(void); void disconnect_dbus_signals(void); - +static void show_restart_dialog(void); GeneralPlugin bluetooth_gp = { @@ -212,10 +212,23 @@ aud_cfg_db_close(cfgfile); printf("play callback\n"); + close_window(); + show_restart_dialog(); } - +static void show_restart_dialog() +{ +static GtkWidget *window = NULL; + GtkWidget *dialog; + dialog = gtk_message_dialog_new (GTK_WINDOW (window), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + "Please restart the player to apply the bluetooth audio settings!"); + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); +} static void remote_device_found(DBusGProxy *object, char *address, const unsigned int class, const int rssi, gpointer user_data) {