else if ((strncmp(argv[i], "--device",8) == 0))
{
if (strlen(argv[i]+9)<=PATH_MAX)
- strcpy(globals.audio_device,argv[i]+9);
+ strcpy(globals.oss_device,argv[i]+9);
else
{
show_help();
void tX_audiodevice :: init()
{
samples_per_buffer=0;
- set_buffersize_near(globals.audiodevice_buffersize);
+ //set_buffersize_near(globals.audiodevice_buffersize);
}
int buff_cfg;
if (fd) return (1);
- fd=::open(globals.audio_device, O_WRONLY, 0);
+ fd=::open(globals.oss_device, O_WRONLY, 0);
/* setting buffer size */
- buff_cfg=(globals.buff_no<<16) | globals.buff_size;
+ buff_cfg=(globals.oss_buff_no<<16) | globals.oss_buff_size;
p=buff_cfg;
tX_debug("tX_adudiodevice_oss::open() - buff_no: %i, buff_size: %i, buff_cfg: %08x", globals.buff_no, globals.buff_size, buff_cfg);
/* 44.1 khz */
- p = 44100;
+ p = globals.oss_samplerate;
i += ioctl(fd, SOUND_PCM_WRITE_RATE, &p);
/* Figure actual blocksize.. */
{
snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK;
snd_pcm_hw_params_t *hw_params;
- char *pcm_name;
+ char pcm_name[64];
+ char foo[PATH_MAX];
- pcm_name=strdup(globals.audio_device);
- snd_pcm_hw_params_alloca(&hw_params);
+ snd_pcm_hw_params_alloca(&hw_params);
+
+ int card;
+ int device;
+
+ sscanf(globals.alsa_device, "%i-%i: %s", &card, &device, foo);
+ sprintf(pcm_name, "plughw:%i,%i", card, device);
if (snd_pcm_open(&pcm_handle, pcm_name, stream, 0) < 0) {
tX_error("ALSA: Failed to access PCM device \"%s\"", pcm_name);
}
/* Setting sampling rate */
- int rate=44100;
int hw_rate;
int dir;
- hw_rate = snd_pcm_hw_params_set_rate_near(pcm_handle, hw_params, rate, &dir);
+ hw_rate = snd_pcm_hw_params_set_rate_near(pcm_handle, hw_params, globals.alsa_samplerate, &dir);
if (dir != 0) {
- tX_warning("ALSA: The PCM device \"%s\" doesnt support 44100 kHz playback - using %i instead", pcm_name, hw_rate);
+ tX_warning("ALSA: The PCM device \"%s\" doesnt support 44100 Hz playback - using %i instead", pcm_name, hw_rate);
}
/* Using stereo output */
}
/* Setting the number of buffers... */
- if (snd_pcm_hw_params_set_periods(pcm_handle, hw_params, globals.buff_no, 0) < 0) {
- tX_error("ALSA: Failed to set %i periods for PCM device \"%s\"", globals.buff_no, pcm_name);
+ if (snd_pcm_hw_params_set_periods(pcm_handle, hw_params, globals.alsa_buff_no, 0) < 0) {
+ tX_error("ALSA: Failed to set %i periods for PCM device \"%s\"", globals.alsa_buff_no, pcm_name);
snd_pcm_hw_params_free (hw_params);
return -1;
}
- int samples=1<<globals.buff_size;
-
// snd_pcm_sw_params_set_avail_min(pcm_handle, hw_params, samples);
- samples=snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hw_params, samples);
+ int samples=snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hw_params, globals.alsa_buff_size );
- samples_per_buffer= samples;//hw_buffsize/sizeof(int16_t);
- globals.true_block_size=samples_per_buffer/2;
+ samples_per_buffer=samples;//hw_buffsize/sizeof(int16_t);
+ globals.true_block_size=samples*4;
- tX_error("sa: %i", samples);
-
/* Apply all that setup work.. */
if (snd_pcm_hw_params(pcm_handle, hw_params) < 0) {
tX_error("ALSA: Failed to apply settings to PCM device \"%s\"", pcm_name);
}
snd_pcm_hw_params_free (hw_params);
- tX_warning("ALSA OK!");
return 0;
}
swapbuffer (buffer, samples_per_buffer);
#endif
- while ((pcmreturn = snd_pcm_writei(pcm_handle, buffer, samples_per_buffer /* *2 ?*/)) == EPIPE) {
+ pcmreturn = snd_pcm_writei(pcm_handle, buffer, samples_per_buffer/2);
+
+ while (pcmreturn==-EPIPE) {
snd_pcm_prepare(pcm_handle);
+ pcmreturn=snd_pcm_writei(pcm_handle, buffer, samples_per_buffer/2);
tX_warning("ALSA: ** buffer underrun **");
- }
+ }
+
+ if (pcmreturn<0) {
+ printf("snd_pcm_writei says: %s.\n", strerror(-1*pcmreturn));
+ }
}
#endif //USE_ALSA
#include <string.h>
#include <gdk/gdk.h>
#include "tX_icon.h"
+#include "tX_glade_interface.h"
+#include "tX_glade_support.h"
#ifndef WIN32
#include <X11/extensions/XInput.h>
#include "license.c"
#include "tX_mastergui.h"
#include "version.h"
+#include <dirent.h>
extern char *logo_xpm[];
-
-GdkWindow *opt_window=NULL;
GtkWidget *opt_dialog;
-GtkWidget *menu=NULL;
-
-GtkWidget *audio_device;
-GtkWidget *use_stdout;
-GtkWidget *prelis;
-
-GtkAdjustment *buff_no=NULL;
-GtkWidget *buff_no_slider;
-GtkAdjustment *buff_size=NULL;
-GtkWidget *buff_size_slider;
-
-GtkAdjustment *sense_cycles=NULL;
-GtkWidget *sense_cycles_slider;
-
-GtkWidget *xinput_enable;
-GtkWidget *xinput_device;
-GtkAdjustment *mouse_speed=NULL;
-GtkWidget *mouse_speed_slider;
-
-GtkWidget *tooltips;
-GtkWidget *show_nag;
-GtkAdjustment *update_idle=NULL;
-GtkAdjustment *update_delay_adj=NULL;
-GtkAdjustment *flash_response;
-GtkWidget *update_idle_slider;
-GtkWidget *update_delay_slider;
-
-GtkWidget *opt_ok;
-GtkWidget *opt_apply;
-GtkWidget *opt_cancel;
-
-GtkWidget *but_text;
-GtkWidget *but_icon;
-GtkWidget *but_both;
-
-GtkWidget *sound_editor;
-
-GtkTooltips *opt_tips;
-
int opt_hidden=0;
-void apply_options() {
- char *text;
+void apply_options(GtkWidget *dialog) {
+ /* Audio */
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "alsa_driver")))) {
+ globals.audiodevice_type=ALSA;
+ } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "oss_driver")))) {
+ globals.audiodevice_type=OSS;
+ } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "jack_driver")))) {
+ globals.audiodevice_type=JACK;
+ }
- strcpy(globals.audio_device, gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(audio_device)->entry)));
- globals.buff_no=(int)buff_no->value;
- globals.buff_size=(int)buff_size->value;
+ /* Audio: OSS */
+ strcpy(globals.oss_device, gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "oss_audio_device"))->entry)));
+ globals.oss_buff_no=(int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(lookup_widget(dialog, "oss_buffers")));
+ globals.oss_buff_size=(int) gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "oss_buffersize")));
+ globals.oss_samplerate=atoi(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "oss_samplerate"))->entry)));
- globals.prelis=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(prelis));
-
- globals.sense_cycles=(int) sense_cycles->value;
- globals.xinput_enable=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(xinput_enable));
- text=(char *) gtk_button_get_label(GTK_BUTTON(xinput_device));
- strcpy(globals.xinput_device, text);
+ /* Audio: ALSA */
+ strcpy(globals.alsa_device, gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "alsa_audio_device"))->entry)));
+ globals.alsa_buff_no=(int) gtk_spin_button_get_value(GTK_SPIN_BUTTON(lookup_widget(dialog, "alsa_buffers")));
+ globals.alsa_buff_size=(int) gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "alsa_buffersize")));
+ globals.alsa_samplerate=atoi(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "alsa_samplerate"))->entry)));
- globals.mouse_speed=mouse_speed->value;
- globals.tooltips=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(tooltips));
+ /* TODO: JACK
+ */
+
+ /* Input */
+ globals.xinput_enable=(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "xinput_enable")))==TRUE);
+ strcpy(globals.xinput_device, gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "xinput_device"))->entry)));
+ globals.mouse_speed=gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "mouse_speed")));
+ globals.sense_cycles=(int) gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "stop_sense_cycles")));
+
+ /* User Interface */
+ globals.show_nag=(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "startup_nagbox")))==TRUE);
+ globals.tooltips=(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "mainwin_tooltips")))==TRUE);
if (globals.tooltips) gtk_tooltips_enable(gui_tooltips);
else gtk_tooltips_disable(gui_tooltips);
+
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "buttons_text_only")))) {
+ globals.button_type=BUTTON_TYPE_TEXT;
+ } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "buttons_icon_only")))) {
+ globals.button_type=BUTTON_TYPE_ICON;
+ } else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "buttons_text_and_icon")))) {
+ globals.button_type=BUTTON_TYPE_BOTH;
+ }
- globals.show_nag=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(show_nag));
- globals.update_idle=(int) update_idle->value;
- globals.update_delay=(int) update_delay_adj->value;
- globals.flash_response=flash_response->value;
-
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(but_text))) globals.button_type=BUTTON_TYPE_TEXT;
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(but_icon))) globals.button_type=BUTTON_TYPE_ICON;
- if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(but_both))) globals.button_type=BUTTON_TYPE_BOTH;
- strcpy(globals.file_editor, gtk_entry_get_text(GTK_ENTRY(sound_editor)));
+ globals.update_delay=(int) gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "update_delay")));
+ globals.update_idle=(int) gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "update_idle")));
+ globals.flash_response=gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "vumeter_decay")));
+
+ /* Misc */
+ strcpy(globals.file_editor, gtk_entry_get_text(GTK_ENTRY(lookup_widget(dialog, "soundfile_editor"))));
+ globals.prelis=(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "prelisten_enabled")))==TRUE);
}
+
#define WID_DYN TRUE, TRUE, 0
#define WID_FIX FALSE, FALSE, 0
#define add_expl_dyn(s); label=gtk_label_new(s); \
gtk_misc_set_alignment(GTK_MISC(label), 0.5, 0.5);\
add_widget_dyn(label);
-
-static gint showdevmenu(GtkWidget *widget, GdkEvent *event)
-{
- if (event->type == GDK_BUTTON_PRESS) {
- GdkEventButton *bevent = (GdkEventButton *) event;
- gtk_menu_popup (GTK_MENU (widget), NULL, NULL, NULL, NULL,
- bevent->button, bevent->time);
- return TRUE;
- }
-
- return FALSE;
-}
-
-#ifndef WIN32
-XDeviceInfo *xdev=NULL;
-#endif
-
-void options_destroy(GtkWidget *widget)
-{
- /* Destroying everything that is NOT a direct part of
- the dialog: adjustments, menu and XDeviceList.
- */
-
- gdk_window_hide(opt_window);
- opt_hidden=1;
-
- gtk_object_destroy(GTK_OBJECT(opt_dialog));
-
-#ifndef WIN32
- XFreeDeviceList(xdev);
-#endif
- opt_window=NULL;
-}
-
-void ok_options(GtkWidget *widget)
-{
- apply_options();
- options_destroy(widget);
-}
-
-void use_stdout_changed(GtkWidget *widget)
-{
- globals.use_stdout=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
- globals.use_stdout_cmdline = 0;
-}
-void select_input(GtkWidget *w, char *dev)
-{
- gtk_button_set_label(GTK_BUTTON(xinput_device), dev);
-}
#ifdef USE_ALSA
+static GList *alsa_devices;
+
GList *get_alsa_device_list() {
+ if (alsa_devices) {
+ return alsa_devices;
+ }
+
FILE *file;
- GList *devices=NULL;
- char buffer[256];
+ char buffer[PATH_MAX+1];
if ((file = fopen("/proc/asound/pcm", "r"))) {
- while(fgets(buffer, 255, file)) {
- buffer[255]=0;
+ while(fgets(buffer, PATH_MAX, file)) {
+ buffer[PATH_MAX]=0;
+ if (strlen(buffer)) buffer[strlen(buffer)-1]=0;
if(strstr(buffer, "playback")) {
- devices=g_list_append (devices, strdup(buffer));
+ alsa_devices=g_list_append (alsa_devices, strdup(buffer));
}
}
fclose(file);
}
- return devices;
+ return alsa_devices;
}
#else
-#include <dirent.h>
+GList *get_alsa_device_list() {
+ return NULL;
+}
+#endif
+
+
+#ifdef USE_OSS
+static GList *oss_devices=NULL;
+
int oss_select_dsp_only(const struct dirent *entry){
return (strstr(entry->d_name, "dsp")!=0);
}
GList *get_oss_device_list() {
- GList *devices=NULL;
+ if (oss_devices) {
+ return oss_devices;
+ }
+
+
struct dirent **namelist;
int n,i;
n = scandir("/dev", &namelist, oss_select_dsp_only, alphasort);
if (n>0) {
for (i=0; i<n; i++) {
char buffer[256];
- sprintf(buffer, "/dev/%s\n", namelist[i]->d_name);
+ sprintf(buffer, "/dev/%s", namelist[i]->d_name);
free(namelist[i]);
- devices=g_list_append (devices, strdup(buffer));
+ oss_devices=g_list_append (oss_devices, strdup(buffer));
}
}
- return devices;
+ return oss_devices;
}
#endif
-void create_options()
-{
- GtkWidget *box;
- GtkWidget *vbox;
- GtkWidget *aa;
- GtkWidget *label;
- GtkWidget *separator;
- GtkWindow *w;
- GtkWidget *item;
- GSList *button_type_group;
-
- Display *dpy;
-
- int i, devmax;
-
- opt_dialog=gtk_dialog_new();
- w=&(GTK_DIALOG(opt_dialog)->window);
- gtk_window_set_wmclass(GTK_WINDOW(w), "terminatorX", "tX_options");
- gtk_window_set_title(w, "terminatorX - Options");
-
- opt_tips=gtk_tooltips_new();
-
- vbox=GTK_WIDGET(GTK_DIALOG(opt_dialog)->vbox);
- gtk_box_set_spacing(GTK_BOX(vbox), 5);
- gtk_container_set_border_width(GTK_CONTAINER(w), 5);
-// gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE);
- aa=GTK_WIDGET(GTK_DIALOG(opt_dialog)->action_area);
- gtk_box_set_spacing(GTK_BOX(aa), 5);
-// gtk_box_set_homogeneous(GTK_BOX(aa), FALSE);
-
- label=gtk_label_new("Options:");
- gtk_misc_set_alignment (GTK_MISC(label), 0.5 ,0.5);
- gtk_box_pack_start(GTK_BOX(vbox), label, WID_DYN);
- gtk_widget_show(label);
-
- my_new_subsec("[ Audio: ]");
-
- begin_box();
-
- add_expl("Device:");
-
- //audio_device=gtk_entry_new_with_max_length(PATH_MAX);
- //gtk_entry_set_text(GTK_ENTRY(audio_device), globals.audio_device);
- audio_device=gtk_combo_new();
- GList *strings;
-#ifdef USE_ALSA
- strings=get_alsa_device_list();
-#else
- strings=get_oss_device_list();
-#endif
- gtk_combo_set_popdown_strings (GTK_COMBO(audio_device), strings);
- gtk_combo_set_value_in_list(GTK_COMBO(audio_device), FALSE, FALSE);
- gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(audio_device)->entry), globals.audio_device);
-
- gtk_tooltips_set_tip(opt_tips, audio_device, "Select the audiodevice you want terminatorX to send its output to.", NULL);
- add_widget_dyn(audio_device);
-
- end_box();
+static GList *sampling_rates=NULL;
- begin_box();
- use_stdout=gtk_check_button_new_with_label("Use standard output instead of the above device");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(use_stdout), globals.use_stdout);
- gtk_signal_connect(GTK_OBJECT(use_stdout), "clicked", (GtkSignalFunc) use_stdout_changed, NULL);
- add_widget_fix(use_stdout);
- end_box();
-
- begin_box();
+GList *get_sampling_rates_list() {
+ if (sampling_rates) {
+ return sampling_rates;
+ }
- add_expl("No. of Buffers:");
+ char buffer[256];
- buff_no=(GtkAdjustment*) gtk_adjustment_new(globals.buff_no, 1, 16, 1, 1, 1);
- buff_no_slider=gtk_hscale_new(buff_no);
- gtk_scale_set_digits(GTK_SCALE(buff_no_slider), 0);
- gtk_scale_set_value_pos(GTK_SCALE(buff_no_slider), GTK_POS_LEFT);
- gtk_tooltips_set_tip(opt_tips, buff_no_slider, "Sets the number of kernel level audio buffers. Actually most systems should run just fine with two.", NULL);
- add_widget_dyn(buff_no_slider);
+ sampling_rates=g_list_append(sampling_rates, (void *) "22000");
+ sampling_rates=g_list_append(sampling_rates, (void *) "32000");
+ sampling_rates=g_list_append(sampling_rates, (void *) "44100");
+ sampling_rates=g_list_append(sampling_rates, (void *) "48000");
- end_box();
+ return sampling_rates;
+}
- begin_box();
+static GList *xinput_devices=NULL;
- add_expl("Size of Buffers:");
+GList *get_xinput_devices_list() {
+ if (xinput_devices) {
+ return xinput_devices;
+ }
- buff_size=(GtkAdjustment*) gtk_adjustment_new(globals.buff_size, 1, 16, 1, 1, 1);
- buff_size_slider=gtk_hscale_new(buff_size);
- gtk_scale_set_digits(GTK_SCALE(buff_size_slider), 0);
- gtk_scale_set_value_pos(GTK_SCALE(buff_size_slider), GTK_POS_LEFT);
- gtk_tooltips_set_tip(opt_tips, buff_size_slider, "Sets the size of the kernel level audio buffers. On slower systems you might have to increase this value (if you hear \"clicks\"). Lower values mean lower latency though.", NULL);
- add_widget_dyn(buff_size_slider);
-
- end_box();
-
- begin_box();
-
- begin_box();
+ int devmax;
+ Display *dpy=XOpenDisplay(NULL);
+ XDeviceInfo *xdev=XListInputDevices(dpy, &devmax);
+ XCloseDisplay(dpy);
- prelis=gtk_check_button_new_with_label("Pre-Listen to audio files");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(prelis), globals.prelis);
- add_widget_fix(prelis);
+ for (int i=0; i<devmax; i++) {
+ xinput_devices=g_list_append(xinput_devices, strdup(xdev[i].name));
+ }
- end_box();
+ XFreeDeviceList(xdev);
- my_new_subsec("[ Mouse / Input: ]");
-
-#ifndef WIN32
- dpy=XOpenDisplay(NULL);
- xdev=XListInputDevices(dpy, &devmax);
- XCloseDisplay(dpy);
+ return xinput_devices;
+}
- if (menu) gtk_object_destroy(GTK_OBJECT(menu));
+void init_tx_options(GtkWidget *dialog) {
+ /* Audio */
+ switch (globals.audiodevice_type) {
+ case ALSA: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "alsa_driver")), 1);
+ break;
- menu = gtk_menu_new();
-
- for (i=0; i<devmax; i++)
- {
- item = gtk_menu_item_new_with_label(xdev[i].name);
- gtk_menu_append(GTK_MENU(menu), item);
- gtk_signal_connect(GTK_OBJECT(item), "activate", GTK_SIGNAL_FUNC(select_input), xdev[i].name);
- gtk_widget_show(item);
- }
-
- begin_box();
+ case JACK: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "jack_driver")), 1);
+ break;
- xinput_enable=gtk_check_button_new_with_label("XInput Device:");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(xinput_enable), globals.xinput_enable);
- gtk_tooltips_set_tip(opt_tips, xinput_enable, "CAREFUL! Enable this *only* if you want to use an input device than your default X-Pointer (yes, your mouse ;). You have to select your desired device as well. Selecting the default mouse pointer will crash terminatorX so if you want to use that keep this option disabled.", NULL);
- add_widget_fix(xinput_enable);
-
- if (strlen(globals.xinput_device)>0)
- {
- xinput_device=gtk_button_new_with_label(globals.xinput_device);
+ case OSS:
+ default:
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "oss_driver")), 1);
+ break;
}
- else
- {
- xinput_device=gtk_button_new_with_label("");
- }
-
- gtk_signal_connect_object (GTK_OBJECT (xinput_device), "event", GTK_SIGNAL_FUNC (showdevmenu), GTK_OBJECT (menu));
- add_widget_dyn(xinput_device);
-
- end_box();
-
-#endif
-
- begin_box();
-
- add_expl("Mouse Speed:");
-
- mouse_speed=(GtkAdjustment*) gtk_adjustment_new(globals.mouse_speed, -10, 10, 0.5, 0.1, 0.1);
- mouse_speed_slider=gtk_hscale_new(mouse_speed);
- gtk_scale_set_digits(GTK_SCALE(mouse_speed_slider), 1);
- gtk_scale_set_value_pos(GTK_SCALE(mouse_speed_slider), GTK_POS_LEFT);
- gtk_tooltips_set_tip(opt_tips, mouse_speed_slider, "The speed of your mouse in scratch mode. Use negative values to invert motion.", NULL);
- add_widget_dyn(mouse_speed_slider);
-
- end_box();
-
- begin_box();
-
- add_expl("Stop Sense Cycles:");
-
- sense_cycles=(GtkAdjustment*) gtk_adjustment_new(globals.sense_cycles, 1, 150, 5, 1, 1);
- sense_cycles_slider=gtk_hscale_new(sense_cycles);
- gtk_scale_set_digits(GTK_SCALE(sense_cycles_slider), 0);
- gtk_scale_set_value_pos(GTK_SCALE(sense_cycles_slider), GTK_POS_LEFT);
- gtk_tooltips_set_tip(opt_tips, sense_cycles_slider, "If there is no \"motion-event\" for x cycles, where x is the number of cycles you select here, terminatorX assumes mouse motion has stopped. For smaller buffer sizes (=> shorter cycle times) you might have to increase this value", NULL);
- add_widget_dyn(sense_cycles_slider);
- end_box();
-
- my_new_subsec("[ Graphics / GUI: ]");
+#ifndef USE_OSS
+ gtk_widget_set_sensitive(lookup_widget(dialog, "oss_driver"), 0);
+ gtk_widget_set_sensitive(lookup_widget(dialog, "oss_audio_device"), 0);
+ gtk_widget_set_sensitive(lookup_widget(dialog, "oss_buffers"), 0);
+ gtk_widget_set_sensitive(lookup_widget(dialog, "oss_buffersize"), 0);
+#endif
- begin_box();
+#ifndef USE_ALSA
+ gtk_widget_set_sensitive(lookup_widget(dialog, "alsa_driver"), 0);
+ // TODO: Rest!
+#endif
- tooltips=gtk_check_button_new_with_label("Main Window Tooltips");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tooltips), globals.tooltips);
- add_widget_dyn(tooltips);
+#ifndef USE_JACK
+ gtk_widget_set_sensitive(lookup_widget(dialog, "jack_driver"), 0);
+#endif
- end_box();
+ /* Audio: OSS */
+ gtk_combo_set_popdown_strings(GTK_COMBO(lookup_widget(dialog, "oss_audio_device")), get_oss_device_list());
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "oss_audio_device"))->entry), globals.oss_device);
+
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(lookup_widget(dialog, "oss_buffers")), globals.oss_buff_no);
+ gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "oss_buffersize")), globals.oss_buff_size);
+
+ gtk_combo_set_popdown_strings(GTK_COMBO(lookup_widget(dialog, "oss_samplerate")), get_sampling_rates_list());
+ char tmp[32];
+ sprintf(tmp, "%i", globals.oss_samplerate);
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "oss_samplerate"))->entry), tmp);
- begin_box();
- add_expl("Update Idle:");
-
- update_idle=(GtkAdjustment*) gtk_adjustment_new(globals.update_idle, 1, 100, 1, 10, 10);
- update_idle_slider=gtk_hscale_new(update_idle);
- gtk_scale_set_digits(GTK_SCALE(update_idle_slider), 0);
- gtk_scale_set_value_pos(GTK_SCALE(update_idle_slider), GTK_POS_LEFT);
- gtk_tooltips_set_tip(opt_tips, update_idle_slider, "The update thread will idle for the selcted amount of milliseconds. If you want to have a more responsive display update increase this value - if you have performance problems reduce this value.", NULL);
- add_widget_dyn(update_idle_slider);
-
- end_box();
+ /* Audio: ALSA */
+ gtk_combo_set_popdown_strings(GTK_COMBO(lookup_widget(dialog, "alsa_audio_device")), get_alsa_device_list());
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "alsa_audio_device"))->entry), globals.alsa_device);
- begin_box();
-
- add_expl("Update Delay:");
-
- update_delay_adj=(GtkAdjustment*) gtk_adjustment_new(globals.update_delay, 0, 15, 1, 10, 10);
- update_delay_slider=gtk_hscale_new(update_delay_adj);
- gtk_scale_set_digits(GTK_SCALE(update_delay_slider), 0);
- gtk_scale_set_value_pos(GTK_SCALE(update_delay_slider), GTK_POS_LEFT);
- gtk_tooltips_set_tip(opt_tips, update_delay_slider, "How often to update the slow widgets.", NULL);
- add_widget_dyn(update_delay_slider);
-
- end_box();
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(lookup_widget(dialog, "alsa_buffers")), globals.alsa_buff_no);
+ gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "alsa_buffersize")), globals.alsa_buff_size);
- begin_box();
+ gtk_combo_set_popdown_strings(GTK_COMBO(lookup_widget(dialog, "alsa_samplerate")), get_sampling_rates_list());
+ sprintf(tmp, "%i", globals.alsa_samplerate);
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "alsa_samplerate"))->entry), tmp);
- add_expl("Flash Decay: ");
- flash_response=GTK_ADJUSTMENT(gtk_adjustment_new(globals.flash_response, 0.8, 0.99, 0.01, 0.01, 0.001));
- item=gtk_hscale_new(flash_response);
- gtk_scale_set_digits(GTK_SCALE(item), 2);
- gtk_scale_set_value_pos(GTK_SCALE(item), GTK_POS_LEFT);
-// gtk_tooltips_set_tip(opt_tips, update_idle_slider, "The update thread will idle for the selcted amount of milliseconds. If you want to have a more responsive display update increase this value - if you have performance problems reduce this value.", NULL);
- add_widget_dyn(item);
+ /* TODO: Samplerate!
+ ALSA
+ JACK
+ */
+
+ /* Input */
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "xinput_enable")), globals.xinput_enable);
- end_box();
+ gtk_combo_set_popdown_strings(GTK_COMBO(lookup_widget(dialog, "xinput_device")), get_xinput_devices_list());
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "xinput_device"))->entry), globals.xinput_device);
- begin_box();
+ gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "mouse_speed")), globals.mouse_speed);
+ gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "stop_sense_cycles")), globals.sense_cycles);
- add_expl("Buttons as ");
- but_both=item=gtk_radio_button_new_with_label(NULL, "Text+Icon");
- add_widget_fix(item);
- button_type_group=gtk_radio_button_group(GTK_RADIO_BUTTON(item));
- but_text=item=gtk_radio_button_new_with_label(button_type_group, "Text");
- button_type_group=gtk_radio_button_group(GTK_RADIO_BUTTON(item));
- add_widget_fix(item);
- but_icon=item=gtk_radio_button_new_with_label(button_type_group, "Icon");
- add_widget_fix(item);
+ /* User Interface */
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "startup_nagbox")), globals.show_nag);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "mainwin_tooltips")), globals.tooltips);
- switch (globals.button_type)
- {
+ switch (globals.button_type) {
case BUTTON_TYPE_TEXT:
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(but_text), 1);
- break;
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "buttons_text_only")), 1);
+ break;
+
case BUTTON_TYPE_ICON:
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(but_icon), 1);
- break;
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "buttons_icon_only")), 1);
+ break;
+
case BUTTON_TYPE_BOTH:
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(but_both), 1);
- break;
- default: fprintf (stderr, "oops: Unknown button type.\n");
+ default:
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "buttons_text_and_icon")), 1);
}
- end_box();
+ gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "update_delay")), globals.update_delay);
+ gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "update_idle")), globals.update_idle);
+ gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "vumeter_decay")), globals.flash_response);
- begin_box();
-
- show_nag=gtk_check_button_new_with_label("Display nagbox on startup while loading data");
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(show_nag), globals.show_nag);
- add_widget_dyn(show_nag);
-
- end_box();
-
- begin_box();
-
- add_expl("Soundfile editor:");
-
- sound_editor=gtk_entry_new_with_max_length(PATH_MAX);
- gtk_entry_set_text(GTK_ENTRY(sound_editor), globals.file_editor);
- gtk_tooltips_set_tip(opt_tips, sound_editor, "Enter your favourite soundfile editor.", NULL);
- add_widget_dyn(sound_editor);
-
- end_box();
- my_new_button(opt_ok, "Ok");
- gtk_signal_connect(GTK_OBJECT(opt_ok), "clicked", (GtkSignalFunc) ok_options, NULL);
- my_new_button(opt_apply, "Apply");
- gtk_signal_connect(GTK_OBJECT(opt_apply), "clicked", (GtkSignalFunc) apply_options, NULL);
- my_new_button(opt_cancel, "Cancel");
- gtk_signal_connect(GTK_OBJECT(opt_cancel), "clicked", (GtkSignalFunc) options_destroy, NULL);
+ /* Misc */
+ gtk_entry_set_text(GTK_ENTRY(lookup_widget(dialog, "soundfile_editor")), globals.file_editor);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "prelisten_enabled")), globals.prelis);
+}
-
+void create_options()
+{
+ opt_dialog=create_tx_options();
+ init_tx_options(opt_dialog);
gtk_widget_show(opt_dialog);
- opt_window=opt_dialog->window;
- tX_set_icon(opt_dialog, "tX Options");
- gtk_signal_connect(GTK_OBJECT(opt_dialog), "delete-event", (GtkSignalFunc) options_destroy, NULL);
-
}
+/* void create_options()
+{
+ // gtk_tooltips_set_tip(opt_tips, buff_size_slider, "Sets the size of the kernel level audio buffers. On slower systems you might have to increase this value (if you hear \"clicks\"). Lower values mean lower latency though.", NULL);
+ // gtk_tooltips_set_tip(opt_tips, mouse_speed_slider, "The speed of your mouse in scratch mode. Use negative values to invert motion.", NULL);
+ // gtk_tooltips_set_tip(opt_tips, sense_cycles_slider, "If there is no \"motion-event\" for x cycles, where x is the number of cycles you select here, terminatorX assumes mouse motion has stopped. For smaller buffer sizes (=> shorter cycle times) you might have to increase this value", NULL);
+ // gtk_tooltips_set_tip(opt_tips, update_idle_slider, "The update thread will idle for the selcted amount of milliseconds. If you want to have a more responsive display update increase this value - if you have performance problems reduce this value.", NULL);
+ // gtk_tooltips_set_tip(opt_tips, update_delay_slider, "How often to update the slow widgets.", NULL);
+} */
+
void display_options()
{
- if (opt_window)
- {
- gdk_window_raise(opt_window);
- }
- else
- {
+ if (opt_dialog) {
+ gdk_window_raise(opt_dialog->window);
+ } else {
create_options();
}
}
#define _H_TX_DIALOG_
//#include <gdk/gdk.h>
#include <gtk/gtk.h>
+extern GtkWidget *opt_dialog;
+
extern void display_options();
extern void show_about(int nag);
extern void destroy_about();
extern void tX_set_icon(GtkWidget *widget, char *);
+extern void apply_options(GtkWidget *);
#endif
switch (globals.audiodevice_type) {
#ifdef USE_OSS
case OSS:
+ puts("Using OSS output...");
device=new tX_audiodevice_oss();
break;
#endif
#ifdef USE_ALSA
case ALSA:
+ puts("Using ALSA output...");
device=new tX_audiodevice_alsa();
break;
#endif
#include "tX_glade_callbacks.h"
#include "tX_glade_interface.h"
#include "tX_glade_support.h"
+#include "tX_dialog.h"
+
+void
+on_pref_cancel_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ gtk_widget_destroy(opt_dialog);
+}
+
+
+void
+on_pref_apply_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ apply_options(opt_dialog);
+}
+
+
+void
+on_pref_ok_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ apply_options(opt_dialog);
+ gtk_widget_destroy(opt_dialog);
+}
+
+
+void
+on_tx_options_destroy (GtkObject *object,
+ gpointer user_data)
+{
+ opt_dialog=NULL;
+}
#include <gtk/gtk.h>
+
+void
+on_pref_cancel_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_pref_apply_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_pref_ok_clicked (GtkButton *button,
+ gpointer user_data);
+
+void
+on_tx_options_destroy (GtkObject *object,
+ gpointer user_data);
GtkWidget *oss_samplerate;
GtkWidget *combo_entry3;
GtkWidget *label15;
- GtkWidget *empty_notebook_page;
+ GtkWidget *table6;
+ GtkWidget *label27;
+ GtkWidget *label28;
+ GtkWidget *label29;
+ GtkWidget *label30;
+ GtkWidget *alsa_audio_device;
+ GtkWidget *combo_entry4;
+ GtkObject *alsa_buffers_adj;
+ GtkWidget *alsa_buffers;
+ GtkWidget *alsa_samplerate;
+ GtkWidget *combo_entry5;
+ GtkWidget *alsa_buffersize;
GtkWidget *label16;
+ GtkWidget *empty_notebook_page;
GtkWidget *label17;
GtkWidget *table1;
GtkWidget *label5;
GtkWidget *combo_entry1;
GtkWidget *mouse_speed;
GtkWidget *stop_sense_cycles;
+ GtkWidget *label25;
+ GtkWidget *xinput_enable;
GtkWidget *label4;
GtkWidget *table2;
GtkWidget *label8;
GtkWidget *table3;
GtkWidget *label13;
GtkWidget *soundfile_editor;
+ GtkWidget *label26;
+ GtkWidget *prelisten_enabled;
GtkWidget *label3;
GtkWidget *dialog_action_area1;
- GtkWidget *cancel;
- GtkWidget *apply;
- GtkWidget *okbutton1;
+ GtkWidget *pref_cancel;
+ GtkWidget *pref_apply;
+ GtkWidget *pref_ok;
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new ();
oss_driver = gtk_radio_button_new_with_mnemonic (NULL, "OSS");
gtk_widget_show (oss_driver);
gtk_box_pack_start (GTK_BOX (hbox2), oss_driver, FALSE, FALSE, 0);
+ gtk_tooltips_set_tip (tooltips, oss_driver, "Use the OSS (Open Sound System) driver for audio output.", NULL);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (oss_driver), oss_driver_group);
oss_driver_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (oss_driver));
alsa_driver = gtk_radio_button_new_with_mnemonic (NULL, "ALSA");
gtk_widget_show (alsa_driver);
gtk_box_pack_start (GTK_BOX (hbox2), alsa_driver, FALSE, FALSE, 0);
+ gtk_tooltips_set_tip (tooltips, alsa_driver, "Use the ALSA (Advanced Linux Sound System) driver for audio output.", NULL);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (alsa_driver), oss_driver_group);
oss_driver_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (alsa_driver));
jack_driver = gtk_radio_button_new_with_mnemonic (NULL, "JACK");
gtk_widget_show (jack_driver);
gtk_box_pack_start (GTK_BOX (hbox2), jack_driver, FALSE, FALSE, 0);
+ gtk_tooltips_set_tip (tooltips, jack_driver, "Use the JACK (JACK Audio Connection Kit) driver for audio output.", NULL);
gtk_radio_button_set_group (GTK_RADIO_BUTTON (jack_driver), oss_driver_group);
oss_driver_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (jack_driver));
combo_entry2 = GTK_COMBO (oss_audio_device)->entry;
gtk_widget_show (combo_entry2);
+ gtk_tooltips_set_tip (tooltips, combo_entry2, "Select the audiodevice you want terminatorX to send its output to.", NULL);
oss_buffers_adj = gtk_adjustment_new (2, 2, 5, 1, 10, 10);
oss_buffers = gtk_spin_button_new (GTK_ADJUSTMENT (oss_buffers_adj), 1, 0);
gtk_table_attach (GTK_TABLE (table5), oss_buffers, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
+ gtk_tooltips_set_tip (tooltips, oss_buffers, "Sets the number of kernel level audio buffers. Actually most systems should run just fine with two.", NULL);
oss_buffersize = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (5, 1, 16, 1, 1, 1)));
gtk_widget_show (oss_buffersize);
combo_entry3 = GTK_COMBO (oss_samplerate)->entry;
gtk_widget_show (combo_entry3);
+ gtk_tooltips_set_tip (tooltips, combo_entry3, "Select the sampling to use for this audio device - the higher the better quality. Note that not all sampling rates are supported by all audio devices.", NULL);
label15 = gtk_label_new ("Audio: OSS");
gtk_widget_show (label15);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label15);
gtk_label_set_justify (GTK_LABEL (label15), GTK_JUSTIFY_LEFT);
- empty_notebook_page = gtk_vbox_new (FALSE, 0);
- gtk_widget_show (empty_notebook_page);
- gtk_container_add (GTK_CONTAINER (notebook1), empty_notebook_page);
+ table6 = gtk_table_new (4, 2, FALSE);
+ gtk_widget_show (table6);
+ gtk_container_add (GTK_CONTAINER (notebook1), table6);
+ gtk_container_set_border_width (GTK_CONTAINER (table6), 4);
+ gtk_table_set_row_spacings (GTK_TABLE (table6), 2);
+ gtk_table_set_col_spacings (GTK_TABLE (table6), 2);
+
+ label27 = gtk_label_new ("Audio Device:");
+ gtk_widget_show (label27);
+ gtk_table_attach (GTK_TABLE (table6), label27, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_label_set_justify (GTK_LABEL (label27), GTK_JUSTIFY_LEFT);
+ gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5);
+
+ label28 = gtk_label_new ("No. of buffers:");
+ gtk_widget_show (label28);
+ gtk_table_attach (GTK_TABLE (table6), label28, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_label_set_justify (GTK_LABEL (label28), GTK_JUSTIFY_LEFT);
+ gtk_misc_set_alignment (GTK_MISC (label28), 0, 0.5);
+
+ label29 = gtk_label_new ("Buffersize (samples):");
+ gtk_widget_show (label29);
+ gtk_table_attach (GTK_TABLE (table6), label29, 0, 1, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_label_set_justify (GTK_LABEL (label29), GTK_JUSTIFY_LEFT);
+ gtk_misc_set_alignment (GTK_MISC (label29), 0, 0.5);
+
+ label30 = gtk_label_new ("Samplerate (Hz):");
+ gtk_widget_show (label30);
+ gtk_table_attach (GTK_TABLE (table6), label30, 0, 1, 3, 4,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_label_set_justify (GTK_LABEL (label30), GTK_JUSTIFY_LEFT);
+ gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5);
+
+ alsa_audio_device = gtk_combo_new ();
+ g_object_set_data (G_OBJECT (GTK_COMBO (alsa_audio_device)->popwin),
+ "GladeParentKey", alsa_audio_device);
+ gtk_widget_show (alsa_audio_device);
+ gtk_table_attach (GTK_TABLE (table6), alsa_audio_device, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ combo_entry4 = GTK_COMBO (alsa_audio_device)->entry;
+ gtk_widget_show (combo_entry4);
+
+ alsa_buffers_adj = gtk_adjustment_new (2, 2, 5, 1, 2, 2);
+ alsa_buffers = gtk_spin_button_new (GTK_ADJUSTMENT (alsa_buffers_adj), 1, 0);
+ gtk_widget_show (alsa_buffers);
+ gtk_table_attach (GTK_TABLE (table6), alsa_buffers, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ alsa_samplerate = gtk_combo_new ();
+ g_object_set_data (G_OBJECT (GTK_COMBO (alsa_samplerate)->popwin),
+ "GladeParentKey", alsa_samplerate);
+ gtk_widget_show (alsa_samplerate);
+ gtk_table_attach (GTK_TABLE (table6), alsa_samplerate, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ combo_entry5 = GTK_COMBO (alsa_samplerate)->entry;
+ gtk_widget_show (combo_entry5);
+
+ alsa_buffersize = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (1024, 512, 32000, 512, 1024, 2048)));
+ gtk_widget_show (alsa_buffersize);
+ gtk_table_attach (GTK_TABLE (table6), alsa_buffersize, 1, 2, 2, 3,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+ gtk_scale_set_digits (GTK_SCALE (alsa_buffersize), 0);
label16 = gtk_label_new ("Audio: ALSA");
gtk_widget_show (label16);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), label17);
gtk_label_set_justify (GTK_LABEL (label17), GTK_JUSTIFY_LEFT);
- table1 = gtk_table_new (3, 2, FALSE);
+ table1 = gtk_table_new (4, 2, FALSE);
gtk_widget_show (table1);
gtk_container_add (GTK_CONTAINER (notebook1), table1);
gtk_container_set_border_width (GTK_CONTAINER (table1), 4);
label5 = gtk_label_new ("XInput Device:");
gtk_widget_show (label5);
- gtk_table_attach (GTK_TABLE (table1), label5, 0, 1, 0, 1,
+ gtk_table_attach (GTK_TABLE (table1), label5, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_LEFT);
label6 = gtk_label_new ("Mouse Speed:");
gtk_widget_show (label6);
- gtk_table_attach (GTK_TABLE (table1), label6, 0, 1, 1, 2,
+ gtk_table_attach (GTK_TABLE (table1), label6, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (label6), GTK_JUSTIFY_LEFT);
label7 = gtk_label_new ("Stop-Sense-Cycles:");
gtk_widget_show (label7);
- gtk_table_attach (GTK_TABLE (table1), label7, 0, 1, 2, 3,
+ gtk_table_attach (GTK_TABLE (table1), label7, 0, 1, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_LEFT);
g_object_set_data (G_OBJECT (GTK_COMBO (xinput_device)->popwin),
"GladeParentKey", xinput_device);
gtk_widget_show (xinput_device);
- gtk_table_attach (GTK_TABLE (table1), xinput_device, 1, 2, 0, 1,
+ gtk_table_attach (GTK_TABLE (table1), xinput_device, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
combo_entry1 = GTK_COMBO (xinput_device)->entry;
gtk_widget_show (combo_entry1);
- gtk_tooltips_set_tip (tooltips, combo_entry1, "CAREFUL! Enable this *only* if you want to use an input device than your default X-Pointer (yes, your mouse ;). You have to select your desired device as well. Selecting the default mouse pointer will crash terminatorX so if you want to use that keep this option disabled.", NULL);
+ gtk_tooltips_set_tip (tooltips, combo_entry1, "Select the input device to use when XInput is enabled. Note: do not use this option if you plan on using your default device (standard mouse).", NULL);
mouse_speed = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, -10, 10, 0.5, 0.1, 0.1)));
gtk_widget_show (mouse_speed);
- gtk_table_attach (GTK_TABLE (table1), mouse_speed, 1, 2, 1, 2,
+ gtk_table_attach (GTK_TABLE (table1), mouse_speed, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
stop_sense_cycles = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (10, 1, 150, 5, 1, 1)));
gtk_widget_show (stop_sense_cycles);
- gtk_table_attach (GTK_TABLE (table1), stop_sense_cycles, 1, 2, 2, 3,
+ gtk_table_attach (GTK_TABLE (table1), stop_sense_cycles, 1, 2, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_scale_set_digits (GTK_SCALE (stop_sense_cycles), 0);
+ label25 = gtk_label_new ("XInput:");
+ gtk_widget_show (label25);
+ gtk_table_attach (GTK_TABLE (table1), label25, 0, 1, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_label_set_justify (GTK_LABEL (label25), GTK_JUSTIFY_LEFT);
+ gtk_misc_set_alignment (GTK_MISC (label25), 0, 0.5);
+
+ xinput_enable = gtk_check_button_new_with_mnemonic ("Enabled");
+ gtk_widget_show (xinput_enable);
+ gtk_table_attach (GTK_TABLE (table1), xinput_enable, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_tooltips_set_tip (tooltips, xinput_enable, "CAREFUL! Enable this *only* if you want to use an input device than your default X-Pointer (yes, your mouse ;). You have to select your desired device as well. Selecting the default mouse pointer will crash terminatorX so if you want to use that keep this option disabled.", NULL);
+
label4 = gtk_label_new ("Input");
gtk_widget_show (label4);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 4), label4);
gtk_table_attach (GTK_TABLE (table2), mainwin_tooltips, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
+ gtk_tooltips_set_tip (tooltips, mainwin_tooltips, "Enable tooltips for the terminatorX main window.", NULL);
update_idle = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (11, 1, 100, 1, 10, 10)));
gtk_widget_show (update_idle);
gtk_table_attach (GTK_TABLE (table2), startup_nagbox, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
+ gtk_tooltips_set_tip (tooltips, startup_nagbox, "Display nagbox on startup while loading data.", NULL);
label12 = gtk_label_new ("Buttons:");
gtk_widget_show (label12);
gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 5), label2);
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
- table3 = gtk_table_new (1, 2, FALSE);
+ table3 = gtk_table_new (2, 2, FALSE);
gtk_widget_show (table3);
gtk_container_add (GTK_CONTAINER (notebook1), table3);
gtk_container_set_border_width (GTK_CONTAINER (table3), 4);
gtk_table_attach (GTK_TABLE (table3), soundfile_editor, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
+ gtk_tooltips_set_tip (tooltips, soundfile_editor, "Enter the command to run your favourite soundfile editor. It will be started when you choose \"Edit File\" from the turntable's file menu.", NULL);
+
+ label26 = gtk_label_new ("\"Pre-Listen\" to soundfiles:");
+ gtk_widget_show (label26);
+ gtk_table_attach (GTK_TABLE (table3), label26, 0, 1, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_label_set_justify (GTK_LABEL (label26), GTK_JUSTIFY_LEFT);
+ gtk_misc_set_alignment (GTK_MISC (label26), 0, 0.5);
+
+ prelisten_enabled = gtk_check_button_new_with_mnemonic ("Enabled");
+ gtk_widget_show (prelisten_enabled);
+ gtk_table_attach (GTK_TABLE (table3), prelisten_enabled, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_tooltips_set_tip (tooltips, prelisten_enabled, "When enabled soundfiles will be playedback when selected in a file dialog (before loading them).", NULL);
label3 = gtk_label_new ("Misc");
gtk_widget_show (label3);
gtk_widget_show (dialog_action_area1);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
- cancel = gtk_button_new_from_stock ("gtk-cancel");
- gtk_widget_show (cancel);
- gtk_dialog_add_action_widget (GTK_DIALOG (tx_options), cancel, GTK_RESPONSE_CANCEL);
- GTK_WIDGET_SET_FLAGS (cancel, GTK_CAN_DEFAULT);
-
- apply = gtk_button_new_from_stock ("gtk-apply");
- gtk_widget_show (apply);
- gtk_dialog_add_action_widget (GTK_DIALOG (tx_options), apply, GTK_RESPONSE_APPLY);
- GTK_WIDGET_SET_FLAGS (apply, GTK_CAN_DEFAULT);
-
- okbutton1 = gtk_button_new_from_stock ("gtk-ok");
- gtk_widget_show (okbutton1);
- gtk_dialog_add_action_widget (GTK_DIALOG (tx_options), okbutton1, GTK_RESPONSE_OK);
- GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT);
+ pref_cancel = gtk_button_new_from_stock ("gtk-cancel");
+ gtk_widget_show (pref_cancel);
+ gtk_dialog_add_action_widget (GTK_DIALOG (tx_options), pref_cancel, GTK_RESPONSE_CANCEL);
+ GTK_WIDGET_SET_FLAGS (pref_cancel, GTK_CAN_DEFAULT);
+
+ pref_apply = gtk_button_new_from_stock ("gtk-apply");
+ gtk_widget_show (pref_apply);
+ gtk_dialog_add_action_widget (GTK_DIALOG (tx_options), pref_apply, GTK_RESPONSE_APPLY);
+ GTK_WIDGET_SET_FLAGS (pref_apply, GTK_CAN_DEFAULT);
+
+ pref_ok = gtk_button_new_from_stock ("gtk-ok");
+ gtk_widget_show (pref_ok);
+ gtk_dialog_add_action_widget (GTK_DIALOG (tx_options), pref_ok, GTK_RESPONSE_OK);
+ GTK_WIDGET_SET_FLAGS (pref_ok, GTK_CAN_DEFAULT);
+
+ g_signal_connect ((gpointer) tx_options, "destroy",
+ G_CALLBACK (on_tx_options_destroy),
+ NULL);
+ g_signal_connect ((gpointer) pref_cancel, "clicked",
+ G_CALLBACK (on_pref_cancel_clicked),
+ NULL);
+ g_signal_connect ((gpointer) pref_apply, "clicked",
+ G_CALLBACK (on_pref_apply_clicked),
+ NULL);
+ g_signal_connect ((gpointer) pref_ok, "clicked",
+ G_CALLBACK (on_pref_ok_clicked),
+ NULL);
/* Store pointers to all widgets, for use by lookup_widget(). */
GLADE_HOOKUP_OBJECT_NO_REF (tx_options, tx_options, "tx_options");
GLADE_HOOKUP_OBJECT (tx_options, oss_samplerate, "oss_samplerate");
GLADE_HOOKUP_OBJECT (tx_options, combo_entry3, "combo_entry3");
GLADE_HOOKUP_OBJECT (tx_options, label15, "label15");
+ GLADE_HOOKUP_OBJECT (tx_options, table6, "table6");
+ GLADE_HOOKUP_OBJECT (tx_options, label27, "label27");
+ GLADE_HOOKUP_OBJECT (tx_options, label28, "label28");
+ GLADE_HOOKUP_OBJECT (tx_options, label29, "label29");
+ GLADE_HOOKUP_OBJECT (tx_options, label30, "label30");
+ GLADE_HOOKUP_OBJECT (tx_options, alsa_audio_device, "alsa_audio_device");
+ GLADE_HOOKUP_OBJECT (tx_options, combo_entry4, "combo_entry4");
+ GLADE_HOOKUP_OBJECT (tx_options, alsa_buffers, "alsa_buffers");
+ GLADE_HOOKUP_OBJECT (tx_options, alsa_samplerate, "alsa_samplerate");
+ GLADE_HOOKUP_OBJECT (tx_options, combo_entry5, "combo_entry5");
+ GLADE_HOOKUP_OBJECT (tx_options, alsa_buffersize, "alsa_buffersize");
GLADE_HOOKUP_OBJECT (tx_options, label16, "label16");
GLADE_HOOKUP_OBJECT (tx_options, label17, "label17");
GLADE_HOOKUP_OBJECT (tx_options, table1, "table1");
GLADE_HOOKUP_OBJECT (tx_options, combo_entry1, "combo_entry1");
GLADE_HOOKUP_OBJECT (tx_options, mouse_speed, "mouse_speed");
GLADE_HOOKUP_OBJECT (tx_options, stop_sense_cycles, "stop_sense_cycles");
+ GLADE_HOOKUP_OBJECT (tx_options, label25, "label25");
+ GLADE_HOOKUP_OBJECT (tx_options, xinput_enable, "xinput_enable");
GLADE_HOOKUP_OBJECT (tx_options, label4, "label4");
GLADE_HOOKUP_OBJECT (tx_options, table2, "table2");
GLADE_HOOKUP_OBJECT (tx_options, label8, "label8");
GLADE_HOOKUP_OBJECT (tx_options, table3, "table3");
GLADE_HOOKUP_OBJECT (tx_options, label13, "label13");
GLADE_HOOKUP_OBJECT (tx_options, soundfile_editor, "soundfile_editor");
+ GLADE_HOOKUP_OBJECT (tx_options, label26, "label26");
+ GLADE_HOOKUP_OBJECT (tx_options, prelisten_enabled, "prelisten_enabled");
GLADE_HOOKUP_OBJECT (tx_options, label3, "label3");
GLADE_HOOKUP_OBJECT_NO_REF (tx_options, dialog_action_area1, "dialog_action_area1");
- GLADE_HOOKUP_OBJECT (tx_options, cancel, "cancel");
- GLADE_HOOKUP_OBJECT (tx_options, apply, "apply");
- GLADE_HOOKUP_OBJECT (tx_options, okbutton1, "okbutton1");
+ GLADE_HOOKUP_OBJECT (tx_options, pref_cancel, "pref_cancel");
+ GLADE_HOOKUP_OBJECT (tx_options, pref_apply, "pref_apply");
+ GLADE_HOOKUP_OBJECT (tx_options, pref_ok, "pref_ok");
GLADE_HOOKUP_OBJECT_NO_REF (tx_options, tooltips, "tooltips");
return tx_options;
globals.no_gui = 0;
globals.alternate_rc = 0;
-#ifdef USE_ALSA
- strcpy(globals.audio_device, "plughw:0,0");
-#else
- strcpy(globals.audio_device, "/dev/dsp");
-#endif
strcpy(globals.xinput_device, "");
globals.xinput_enable=0;
globals.update_idle=18;
globals.update_delay=1;
- globals.buff_no=2;
- globals.buff_size=9;
+ strcpy(globals.oss_device, "/dev/dsp");
+ globals.oss_buff_no=2;
+ globals.oss_buff_size=9;
+ globals.oss_samplerate=44100;
+
+ strcpy(globals.alsa_device, "plughw:0,0");
+ globals.alsa_buff_no=2;
+ globals.alsa_buff_size=1024;
+ globals.alsa_samplerate=44100;
globals.sense_cycles=12;
globals.audiodevice_type=ALSA;
#endif
#endif
- globals.audiodevice_buffersize=4096;
- strcpy(globals.audiodevice_oss_devicename, "/dev/dsp");
- globals.audiodevice_alsa_card=0;
- globals.audiodevice_alsa_pcm=0;
-
globals.use_stdout_cmdline=0;
globals.current_path = NULL;
globals.pitch=1.0;
globals.volume=1.0;
globals.fullscreen_enabled=1;
- if (!globals.true_block_size) globals.true_block_size=1<globals.buff_size;
-
+
+ if (!globals.true_block_size) globals.true_block_size=1<globals.oss_buff_size;
}
int load_globals_xml() {
char rc_name[PATH_MAX]="";
+ char device_type[16]="oss";
xmlDocPtr doc;
xmlNodePtr cur;
int elementFound;
xmlFreeDoc(doc);
return 3;
}
-
+
for (cur=cur->xmlChildrenNode; cur != NULL; cur = cur->next) {
if (cur->type == XML_ELEMENT_NODE) {
elementFound=0;
restore_int("store_globals", globals.store_globals);
- restore_string("audio_device", globals.audio_device);
+
+ restore_string("audio_driver", device_type);
+
+ restore_string("oss_device", globals.oss_device);
+ restore_int("oss_buff_no", globals.oss_buff_no);
+ restore_int("oss_buff_size", globals.oss_buff_size);
+ restore_int("oss_samplerate", globals.oss_samplerate);
+
+ restore_string("alsa_device", globals.alsa_device);
+ restore_int("alsa_buff_no", globals.alsa_buff_no);
+ restore_int("alsa_buff_size", globals.alsa_buff_size);
+ restore_int("alsa_samplerate", globals.alsa_samplerate);
+
restore_string("xinput_device", globals.xinput_device);
restore_int("xinput_enable", globals.xinput_enable);
restore_int("update_idle", globals.update_idle);
restore_int("update_delay", globals.update_delay);
- restore_int("buff_no", globals.buff_no);
- restore_int("buff_size", globals.buff_size);
restore_int("sense_cycles", globals.sense_cycles);
restore_float("mouse_speed", globals.mouse_speed);
restore_int("width", globals.width);
xmlFreeDoc(doc);
+ if (strcmp(device_type, "alsa")==0) globals.audiodevice_type=ALSA;
+ else if (strcmp(device_type, "jack")==0) globals.audiodevice_type=JACK;
+ else globals.audiodevice_type=OSS;
+
return 0;
}
void store_globals() {
char rc_name[PATH_MAX]="";
+ char device_type[16];
char indent[]="\t";
FILE *rc;
char tmp_xml_buffer[4096];
rc=fopen(rc_name, "w");
+ switch (globals.audiodevice_type) {
+ case JACK:
+ strcpy(device_type, "jack");
+ break;
+ case ALSA:
+ strcpy(device_type, "alsa");
+ break;
+ case OSS:
+ default:
+ strcpy(device_type, "oss");
+
+ }
+
if (rc) {
fprintf(rc, "<?xml version=\"1.0\" encoding=\"US-ASCII\"?>\n\n");
fprintf(rc, "<!-- Warning: this file will be rewritten by terminatorX on exit!\n Don\'t waste your time adding comments - they will be erased -->\n\n" );
fprintf(rc, "<terminatorXrc version=\"%s\">\n", TX_XML_RC_VERSION);
store_int("store_globals", globals.store_globals);
- store_string("audio_device", globals.audio_device);
+
+ store_string("audio_driver", device_type);
+
+ store_string("oss_device", globals.oss_device);
+ store_int("oss_buff_no", globals.oss_buff_no);
+ store_int("oss_buff_size", globals.oss_buff_size);
+ store_int("oss_samplerate", globals.oss_samplerate);
+
+ store_string("alsa_device", globals.alsa_device);
+ store_int("alsa_buff_no", globals.alsa_buff_no);
+ store_int("alsa_buff_size", globals.alsa_buff_size);
+ store_int("alsa_samplerate", globals.alsa_samplerate);
+
store_string("xinput_device", globals.xinput_device);
store_int("xinput_enable", globals.xinput_enable);
store_int("update_idle", globals.update_idle);
store_int("update_delay", globals.update_delay);
- store_int("buff_no", globals.buff_no);
- store_int("buff_size", globals.buff_size);
store_int("sense_cycles", globals.sense_cycles);
store_float("mouse_speed", globals.mouse_speed);
store_int("width", globals.width);
typedef enum {
OSS =0,
- ALSA = 1
+ ALSA = 1,
+ JACK = 2
} tX_audiodevice_type;
typedef struct {
- char audio_device[PATH_MAX];
+ int xinput_enable;
+ char xinput_device[256];
- int xinput_enable;
- char xinput_device[256]; // If your device's name is longer than that
- // you are insane and you simply don't deserve
- // running terminatorX ;) (said the guy who invented 8+3)
int store_globals; // if it should store the globals vals on exit
- char *startup_set;
- char *alternate_rc; // a diferent set of stored globals to load
+ char *startup_set;
+ char *alternate_rc; // a diferent set of stored globals to load
int no_gui; // run without any gui
- int update_idle;
-
- int buff_no;
- int buff_size;
-
+ int update_idle;
int sense_cycles;
- int width;
- int height;
+ int width;
+ int height;
int tooltips;
*/
tX_audiodevice_type audiodevice_type; // TX_AUDIODEVICE_TYPE_OSS etc.
- int audiodevice_buffersize; // buffer in samples
- /* OSS specific options */
- char audiodevice_oss_devicename[PATH_MAX];
+ /* OSS specific options */
+ char oss_device[PATH_MAX];
+ int oss_buff_no;
+ int oss_buff_size; // 2^X Bytes
+ int oss_samplerate;
/* ALSA specific options */
- int audiodevice_alsa_card;
- int audiodevice_alsa_pcm;
+ char alsa_device[PATH_MAX];
+ int alsa_buff_no;
+ int alsa_buff_size; // In Samples
+ int alsa_samplerate;
int fullscreen_enabled;
} tx_global;
globals.current_path = NULL;
globals.pitch=1.0;
globals.volume=1.0;
- if (!globals.true_block_size) globals.true_block_size=1<globals.buff_size;
+ if (!globals.true_block_size) globals.true_block_size=1<globals.oss_buff_size;
}
#endif
}
else if (temp==0) /* CHILD */
{
- strcpy(dev, globals.audio_device);
+ strcpy(dev, globals.oss_device);
strcat(ogg123_dev, dev);
strcpy(nm, name);
#ifdef USE_OGG123_INPUT
void vg_adjust_zoom(GtkWidget *wid, vtt_class *vtt) {
GtkAdjustment *adj=gtk_range_get_adjustment(GTK_RANGE(vtt->gui.zoom));
- printf("setting zoom %lf.\n", adj->value);
gtk_tx_set_zoom(GTK_TX(vtt->gui.display), adj->value/100.0);
}
-static gchar* vg_format_zoom(GtkScale *scale, gdouble value) {
- return g_strdup_printf ("%g", (gdouble) (99-value));
-}
-
static vtt_class * fx_vtt;
void new_effect(GtkWidget *wid, LADSPA_Plugin *plugin)
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="has_separator">True</property>
+ <signal name="destroy" handler="on_tx_options_destroy" last_modification_time="Thu, 20 Mar 2003 20:37:26 GMT"/>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
- <widget class="GtkButton" id="cancel">
+ <widget class="GtkButton" id="pref_cancel">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-6</property>
+ <signal name="clicked" handler="on_pref_cancel_clicked" last_modification_time="Thu, 20 Mar 2003 20:35:33 GMT"/>
</widget>
</child>
<child>
- <widget class="GtkButton" id="apply">
+ <widget class="GtkButton" id="pref_apply">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-10</property>
+ <signal name="clicked" handler="on_pref_apply_clicked" last_modification_time="Thu, 20 Mar 2003 20:35:38 GMT"/>
</widget>
</child>
<child>
- <widget class="GtkButton" id="okbutton1">
+ <widget class="GtkButton" id="pref_ok">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-5</property>
+ <signal name="clicked" handler="on_pref_ok_clicked" last_modification_time="Thu, 20 Mar 2003 20:35:43 GMT"/>
</widget>
</child>
</widget>
<child>
<widget class="GtkRadioButton" id="oss_driver">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Use the OSS (Open Sound System) driver for audio output.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">OSS</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkRadioButton" id="alsa_driver">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Use the ALSA (Advanced Linux Sound System) driver for audio output.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">ALSA</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkRadioButton" id="jack_driver">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Use the JACK (JACK Audio Connection Kit) driver for audio output.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">JACK</property>
<property name="use_underline">True</property>
<child internal-child="entry">
<widget class="GtkEntry" id="combo-entry2">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Select the audiodevice you want terminatorX to send its output to.</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<child>
<widget class="GtkSpinButton" id="oss_buffers">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Sets the number of kernel level audio buffers. Actually most systems should run just fine with two.</property>
<property name="can_focus">True</property>
<property name="climb_rate">1</property>
<property name="digits">0</property>
<child internal-child="entry">
<widget class="GtkEntry" id="combo-entry3">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Select the sampling to use for this audio device - the higher the better quality. Note that not all sampling rates are supported by all audio devices.</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
</child>
<child>
- <placeholder/>
+ <widget class="GtkTable" id="table6">
+ <property name="border_width">4</property>
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="homogeneous">False</property>
+ <property name="row_spacing">2</property>
+ <property name="column_spacing">2</property>
+
+ <child>
+ <widget class="GtkLabel" id="label27">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Audio Device:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">No. of buffers:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label29">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Buffersize (samples):</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label30">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Samplerate (Hz):</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCombo" id="alsa_audio_device">
+ <property name="visible">True</property>
+ <property name="value_in_list">False</property>
+ <property name="allow_empty">True</property>
+ <property name="case_sensitive">False</property>
+ <property name="enable_arrow_keys">True</property>
+ <property name="enable_arrows_always">False</property>
+
+ <child internal-child="entry">
+ <widget class="GtkEntry" id="combo-entry4">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ </child>
+
+ <child internal-child="list">
+ <widget class="GtkList" id="combo-list4">
+ <property name="visible">True</property>
+ <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="alsa_buffers">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">2 2 5 1 2 2</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCombo" id="alsa_samplerate">
+ <property name="visible">True</property>
+ <property name="value_in_list">False</property>
+ <property name="allow_empty">True</property>
+ <property name="case_sensitive">False</property>
+ <property name="enable_arrow_keys">True</property>
+ <property name="enable_arrows_always">False</property>
+
+ <child internal-child="entry">
+ <widget class="GtkEntry" id="combo-entry5">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="editable">True</property>
+ <property name="visibility">True</property>
+ <property name="max_length">0</property>
+ <property name="text" translatable="yes"></property>
+ <property name="has_frame">True</property>
+ <property name="invisible_char" translatable="yes">*</property>
+ <property name="activates_default">False</property>
+ </widget>
+ </child>
+
+ <child internal-child="list">
+ <widget class="GtkList" id="combo-list5">
+ <property name="visible">True</property>
+ <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHScale" id="alsa_buffersize">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="draw_value">True</property>
+ <property name="value_pos">GTK_POS_TOP</property>
+ <property name="digits">0</property>
+ <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+ <property name="inverted">False</property>
+ <property name="adjustment">1024 512 32000 512 1024 2048</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">fill</property>
+ <property name="y_options">fill</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
</child>
<child>
<widget class="GtkTable" id="table1">
<property name="border_width">4</property>
<property name="visible">True</property>
- <property name="n_rows">3</property>
+ <property name="n_rows">4</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">2</property>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
<child internal-child="entry">
<widget class="GtkEntry" id="combo-entry1">
<property name="visible">True</property>
- <property name="tooltip" translatable="yes">CAREFUL! Enable this *only* if you want to use an input device than your default X-Pointer (yes, your mouse ;). You have to select your desired device as well. Selecting the default mouse pointer will crash terminatorX so if you want to use that keep this option disabled.</property>
+ <property name="tooltip" translatable="yes">Select the input device to use when XInput is enabled. Note: do not use this option if you plan on using your default device (standard mouse).</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options">fill</property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">XInput:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="xinput_enable">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">CAREFUL! Enable this *only* if you want to use an input device than your default X-Pointer (yes, your mouse ;). You have to select your desired device as well. Selecting the default mouse pointer will crash terminatorX so if you want to use that keep this option disabled.</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Enabled</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="tab_expand">False</property>
<child>
<widget class="GtkCheckButton" id="mainwin_tooltips">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Enable tooltips for the terminatorX main window.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Enabled</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkCheckButton" id="startup_nagbox">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Display nagbox on startup while loading data.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Enabled</property>
<property name="use_underline">True</property>
<widget class="GtkTable" id="table3">
<property name="border_width">4</property>
<property name="visible">True</property>
- <property name="n_rows">1</property>
+ <property name="n_rows">2</property>
<property name="n_columns">2</property>
<property name="homogeneous">False</property>
<property name="row_spacing">2</property>
<child>
<widget class="GtkEntry" id="soundfile_editor">
<property name="visible">True</property>
+ <property name="tooltip" translatable="yes">Enter the command to run your favourite soundfile editor. It will be started when you choose "Edit File" from the turntable's file menu.</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="y_options"></property>
</packing>
</child>
+
+ <child>
+ <widget class="GtkLabel" id="label26">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">"Pre-Listen" to soundfiles:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="prelisten_enabled">
+ <property name="visible">True</property>
+ <property name="tooltip" translatable="yes">When enabled soundfiles will be playedback when selected in a file dialog (before loading them).</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Enabled</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">fill</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="tab_expand">False</property>