/* Copyright (C) 2002-2004  The Coaster Development Team
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 */

#ifndef __PREFERENCES_H__
#define __PREFERENCES_H__

#define OPTICAL_READER_KEY "/desktop/gnome/burn_prefs/optical_reader_dev"
#define OPTICAL_WRITER_KEY "/desktop/gnome/burn_prefs/optical_writer_dev"
#define WRITE_SPEED_KEY "/desktop/gnome/burn_prefs/write_speed"
#define EJECT_KEY "/desktop/gnome/burn_prefs/eject"

/* Static items */
static GtkWidget *readers;
static GtkWidget *writers;
static GtkWidget *w_speed;
static GtkWidget *eject;

/* Prototypes */
GtkWidget* coaster_preferences_window (gpointer drives_pointer, int n_drives_passed, GCallback *on_close_function);

GtkWidget* draw_window (GCallback *on_close_function);
GtkWidget* create_preferences_window (GCallback *on_close_function);
GtkWidget* populate_readers ();
GtkWidget* populate_writers ();
void populate_write_speed ();

struct burn_drive_info* get_active_reader ();
struct burn_drive_info* get_active_writer ();
int get_write_speed ();
gboolean get_eject_disc ();

void set_active_reader (char *location);
void set_active_writer (char *location);
void set_write_speed (int speed);
void set_eject_disc (gboolean state);

void on_gconf_ord_change (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data);
void on_gconf_owd_change (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data);
void on_gconf_write_speed_change (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data);
void on_gconf_eject_change (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data);

void on_orp_option_changed (GtkWidget *widget, gpointer data);
void on_owp_option_changed (GtkWidget *widget, gpointer data);
void on_ows_option_changed (GtkWidget *widget, gpointer data);
void on_eject_disc_toggled (GtkWidget *widget, gpointer data);

#endif
