Colors customizable - 'w' + 'f' "fix" - Alex
authorterminatorX <>
Sat, 2 Aug 2003 11:25:31 +0000 (11:25 +0000)
committerterminatorX <>
Sat, 2 Aug 2003 11:25:31 +0000 (11:25 +0000)
16 files changed:
src/tX_dialog.cc
src/tX_flash.c
src/tX_flash.h
src/tX_glade_callbacks.cc
src/tX_glade_callbacks.h
src/tX_glade_interface.cc
src/tX_glade_interface.h
src/tX_global.c
src/tX_global.h
src/tX_mastergui.h
src/tX_midiin.cc
src/tX_mouse.cc
src/tX_mouse.h
src/tX_widget.c
src/tX_widget.h
terminatorX.glade

index b3f891fe362b594eb785574da2608bcb13cb7786..15f54436f0e0f0955f6178fbbaf5ebc8fb007299 100644 (file)
@@ -38,6 +38,9 @@
 #include "tX_glade_interface.h"
 #include "tX_glade_support.h"
 
+#include "tX_widget.h"
+#include "tX_flash.h"
+
 #ifndef WIN32
 #include <X11/extensions/XInput.h>
 #include <X11/X.h>
@@ -46,6 +49,7 @@
 #include "license.c"
 #include "tX_mastergui.h"
 #include "version.h"
+#include "tX_vtt.h"
 #include <dirent.h>
 
 extern char *logo_xpm[];
@@ -109,12 +113,43 @@ void apply_options(GtkWidget *dialog) {
        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")));
        
+       /* Audio Colors */
+       
+       strcpy(globals.wav_display_bg_focus, (char *) g_object_get_data(G_OBJECT(lookup_widget(dialog, "wav_display_bg_focus")), "Color"));
+       strcpy(globals.wav_display_bg_no_focus, (char *) g_object_get_data(G_OBJECT(lookup_widget(dialog, "wav_display_bg_no_focus")), "Color"));
+       strcpy(globals.wav_display_fg_focus, (char *) g_object_get_data(G_OBJECT(lookup_widget(dialog, "wav_display_fg_focus")), "Color"));
+       strcpy(globals.wav_display_fg_no_focus, (char *) g_object_get_data(G_OBJECT(lookup_widget(dialog, "wav_display_fg_no_focus")), "Color"));
+       strcpy(globals.wav_display_cursor, (char *) g_object_get_data(G_OBJECT(lookup_widget(dialog, "wav_display_cursor")), "Color"));
+       strcpy(globals.wav_display_cursor_mute, (char *) g_object_get_data(G_OBJECT(lookup_widget(dialog, "wav_display_cursor_mute")), "Color"));
+
+       /* VU Colors */ 
+       strcpy(globals.vu_meter_bg, (char *) g_object_get_data(G_OBJECT(lookup_widget(dialog, "vu_meter_bg")), "Color"));
+       strcpy(globals.vu_meter_loud, (char *) g_object_get_data(G_OBJECT(lookup_widget(dialog, "vu_meter_loud")), "Color"));
+       strcpy(globals.vu_meter_normal, (char *) g_object_get_data(G_OBJECT(lookup_widget(dialog, "vu_meter_normal")), "Color"));
+
+       globals.vu_meter_border_intensity=gtk_range_get_value(GTK_RANGE(lookup_widget(dialog, "vu_meter_border_intensity")));
+       
        /* Misc */
        strcpy(globals.file_editor, gtk_entry_get_text(GTK_ENTRY(lookup_widget(dialog, "soundfile_editor"))));
        strcpy(globals.lrdf_path, gtk_entry_get_text(GTK_ENTRY(lookup_widget(dialog, "ladspa_rdf_path"))));
        globals.compress_set_files=(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "compress_set_files")))==TRUE);        
        globals.prelis=(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "prelisten_enabled")))==TRUE);
        globals.restore_midi_connections=(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "reconnect_enabled")))==TRUE);
+       
+       /* update colors */
+       std::list<vtt_class *>::iterator vtt;
+       
+       for (vtt=vtt_class::main_list.begin(); vtt!=vtt_class::main_list.end(); vtt++) {
+               gtk_tx_update_colors(GTK_TX((*vtt)->gui.display));
+               gtk_widget_queue_draw((*vtt)->gui.display);
+               gtk_tx_flash_update_colors(GTK_TX_FLASH((*vtt)->gui.flash));
+               gtk_widget_queue_draw((*vtt)->gui.flash);
+       }
+       
+       gtk_tx_flash_update_colors(GTK_TX_FLASH(main_flash_l));
+       gtk_widget_queue_draw(main_flash_l);
+       gtk_tx_flash_update_colors(GTK_TX_FLASH(main_flash_r));
+       gtk_widget_queue_draw(main_flash_r);
 }
 
 
@@ -265,9 +300,27 @@ GList *get_xinput_devices_list() {
        return xinput_devices;
 }
 
+#define MAX_COLORS 10
+char *colors[MAX_COLORS]={ NULL };
+
+#define set_color_button(s,g); \
+       sprintf(tmp, "<span foreground=\"%s\"><b>%s</b></span>", s, s);\
+       gtk_label_set_markup(GTK_LABEL(gtk_container_get_children(GTK_CONTAINER(lookup_widget(dialog, g)))->data), tmp);\
+       strcpy(colors[ctr], s);\
+       g_object_set_data(G_OBJECT(lookup_widget(dialog, g)), "Color", colors[ctr]);\
+       ctr++;
+
+
 void init_tx_options(GtkWidget *dialog) {
        GtkTooltips *tooltips=GTK_TOOLTIPS(lookup_widget(dialog, "tooltips"));
        
+       if (colors[0]==NULL) {
+               for (int i=0; i<MAX_COLORS; i++) {
+                       colors[i]=new char[8];
+                       colors[i][0]=0;
+               }
+       }
+       
        /* Audio */
        switch (globals.audiodevice_type) {             
                case ALSA: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "alsa_driver")), 1);
@@ -309,7 +362,7 @@ void init_tx_options(GtkWidget *dialog) {
        gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "oss_buffersize")), globals.oss_buff_size);
        gtk_tooltips_set_tip(tooltips, lookup_widget(dialog, "oss_buffersize"), "Set the size of the kernel level audio buffers. On slower systems you might have to increase this value (if you hear \"clicks\" or drop-outs). Lower values mean lower latency though.", NULL);        
        gtk_combo_set_popdown_strings(GTK_COMBO(lookup_widget(dialog, "oss_samplerate")), get_sampling_rates_list());
-       char tmp[32];
+       char tmp[64];
        sprintf(tmp, "%i", globals.oss_samplerate);
        gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(lookup_widget(dialog, "oss_samplerate"))->entry), tmp);
        
@@ -336,11 +389,6 @@ void init_tx_options(GtkWidget *dialog) {
        
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "alsa_free_hwstats")), globals.alsa_free_hwstats);
        
-       /* TODO: Samplerate!
-               ALSA
-               JACK
-       */
-       
        /* Input */
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(dialog, "xinput_enable")), globals.xinput_enable);
        
@@ -357,6 +405,7 @@ void init_tx_options(GtkWidget *dialog) {
        gtk_tooltips_set_tip(tooltips, lookup_widget(dialog, "vtt_inertia"),"This value defines how fast the turntables will adapt to the speed input - the higher this value, the longer it will take the turntable to actually reach the target speed.", NULL);       
 
        gtk_spin_button_set_value(GTK_SPIN_BUTTON(lookup_widget(dialog, "filename_length")), globals.filename_length);
+
        /* 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);
@@ -382,6 +431,23 @@ void init_tx_options(GtkWidget *dialog) {
        gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "vumeter_decay")), globals.flash_response);
        gtk_tooltips_set_tip(tooltips, lookup_widget(dialog, "vumeter_decay"), "Defines how fast the maximum values of the VU meters should be decayed.", NULL);        
 
+       /* Audio Colors */
+       int ctr=0;
+       
+       set_color_button(globals.wav_display_bg_focus, "wav_display_bg_focus");
+       set_color_button(globals.wav_display_bg_no_focus, "wav_display_bg_no_focus");
+       set_color_button(globals.wav_display_fg_focus, "wav_display_fg_focus");
+       set_color_button(globals.wav_display_fg_no_focus, "wav_display_fg_no_focus");
+       set_color_button(globals.wav_display_cursor, "wav_display_cursor");
+       set_color_button(globals.wav_display_cursor_mute, "wav_display_cursor_mute");
+       
+       /* VU Colors */
+       set_color_button(globals.vu_meter_bg, "vu_meter_bg");
+       set_color_button(globals.vu_meter_loud, "vu_meter_loud");
+       set_color_button(globals.vu_meter_normal, "vu_meter_normal");
+       
+       gtk_range_set_value(GTK_RANGE(lookup_widget(dialog, "vu_meter_border_intensity")), globals.vu_meter_border_intensity);
+       
        /* Misc */
        gtk_entry_set_text(GTK_ENTRY(lookup_widget(dialog, "soundfile_editor")), globals.file_editor);
        gtk_entry_set_text(GTK_ENTRY(lookup_widget(dialog, "ladspa_rdf_path")), globals.lrdf_path);
index 0bb9ffa6da84c640a73a3ef959ce727532ff6ba0..c7a552444bdeeceb1099ca41062ecdd38e447728 100644 (file)
@@ -113,30 +113,55 @@ gtk_tx_flash_class_init (GtkTxFlashClass *gclass)
 //  widget_class->motion_notify_event = gtk_tx_flash_motion_notify;
 }
 
-void gtk_tx_flash_mk_col(GtkTxFlash *tx_flash, GdkColor *col, float r, float g, float b)
+enum {
+       COL_BG,
+       COL_NORM,
+       COL_NORM_HALF,
+       COL_LOUD,
+       COL_LOUD_HALF,
+       NO_COLS
+};
+
+/* c=a+(a-b)*x; */
+
+inline void mk_half(double s, GdkColor *a, GdkColor *b, GdkColor *c)
 {
-       float max=65535.0;
+       c->red=a->red-(a->red-b->red)*s;
+       c->green=a->green-(a->green-b->green)*s;
+       c->blue=a->blue-(a->blue-b->blue)*s;
+}
+
+void gtk_tx_flash_update_colors(GtkTxFlash *tx)
+{
+       int i;
+       
+       if (tx->colors_allocated) {
+               gdk_colormap_free_colors(gtk_widget_get_colormap(GTK_WIDGET(tx)), tx->colors, NO_COLS);
+       }
        
-       col->red=(gint) (r*max);
-       col->green=(gint) (g*max);
-       col->blue=(gint) (b*max);
-       gdk_colormap_alloc_color (gtk_widget_get_colormap (GTK_WIDGET(tx_flash)), col, 1, 1);           
+       gdk_color_parse(globals.vu_meter_bg, &tx->colors[COL_BG]);
+       gdk_color_parse(globals.vu_meter_loud, &tx->colors[COL_LOUD]);
+       gdk_color_parse(globals.vu_meter_normal, &tx->colors[COL_NORM]);        
+       mk_half(globals.vu_meter_border_intensity, &tx->colors[COL_BG], &tx->colors[COL_LOUD], &tx->colors[COL_LOUD_HALF]);
+       mk_half(globals.vu_meter_border_intensity, &tx->colors[COL_BG], &tx->colors[COL_NORM], &tx->colors[COL_NORM_HALF]);
+
+       for (i=0; i<NO_COLS; i++) {
+               gdk_colormap_alloc_color(gtk_widget_get_colormap(GTK_WIDGET(tx)), &tx->colors[i], 0, 1);
+       }
+
+       tx->colors_allocated=1;
 }
 
 static void
 gtk_tx_flash_init (GtkTxFlash *tx_flash)
 {
        GdkColormap *priv;
-                       
+       
+       tx_flash->colors_allocated=0;
        priv=gdk_colormap_new(gtk_widget_get_visual(GTK_WIDGET(tx_flash)), 6);
 
        gtk_widget_set_colormap(GTK_WIDGET(tx_flash), priv);
-
-       gtk_tx_flash_mk_col(tx_flash, &tx_flash->black, 0, 0, 0);
-       gtk_tx_flash_mk_col(tx_flash, &tx_flash->red, 1, 0.5, 0.5);
-       gtk_tx_flash_mk_col(tx_flash, &tx_flash->green, 0.5, 1, 0.5);   
-       gtk_tx_flash_mk_col(tx_flash, &tx_flash->lightgreen, 0, 0.7, 0);
-       gtk_tx_flash_mk_col(tx_flash, &tx_flash->redgreen, 0.7, 0, 0);
+       gtk_tx_flash_update_colors(tx_flash);
 }
 
 GtkWidget*
@@ -253,11 +278,11 @@ static void gtk_tx_flash_paint_yourself(GtkWidget *widget)
 
   tx_flash = GTK_TX_FLASH (widget);
 
-  gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->black);
+  gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->colors[COL_BG]);
   
   gdk_draw_rectangle(widget->window, widget->style->fg_gc[widget->state], 1, 0, 0, widget->allocation.width,widget->allocation.height); 
 
-  gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->lightgreen);
+  gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->colors[COL_NORM_HALF]);
 
   x12=DMINIX+S_MINIX;
   x21=widget->allocation.width-1-x12;
@@ -275,7 +300,7 @@ static void gtk_tx_flash_paint_yourself(GtkWidget *widget)
        else if (i==tx_flash->red_level)
        {
                long_level=1;
-               gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->redgreen);
+               gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->colors[COL_LOUD_HALF]);
        }
        else if (i==tx_flash->levels)
        {
@@ -348,7 +373,7 @@ gtk_tx_flash_set_level(GtkWidget *widget, f_prec new_value)
   if (tx_flash->max_cycles <= 0)
   {    
        y=widget->allocation.height-(DY+(tx_flash->max)*DLEVEL);
-       gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->black);
+       gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->colors[COL_BG]);
        gdk_draw_line(widget->window, widget->style->fg_gc[widget->state], tx_flash->x1, y, tx_flash->x2, y);
 
        if (tx_flash->max>0)
@@ -357,11 +382,11 @@ gtk_tx_flash_set_level(GtkWidget *widget, f_prec new_value)
                y+=DLEVEL;
                if (tx_flash->max>tx_flash->red_level)
                {
-                       gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->red);             
+                       gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->colors[COL_LOUD]);
                }
                else
                {
-                       gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->green);           
+                       gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->colors[COL_NORM]);
                }
                gdk_draw_line(widget->window, widget->style->fg_gc[widget->state], tx_flash->x1, y, tx_flash->x2, y);   
        }
@@ -376,7 +401,7 @@ gtk_tx_flash_set_level(GtkWidget *widget, f_prec new_value)
   
   if (new_level>tx_flash->last_level)
   {
-         gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->green);
+         gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->colors[COL_NORM]);
   
          for (i=tx_flash->last_level, y=widget->allocation.height-(DY+tx_flash->last_level*DLEVEL); i<=new_level; y-=DLEVEL, i++)
          {
@@ -384,7 +409,7 @@ gtk_tx_flash_set_level(GtkWidget *widget, f_prec new_value)
                {
                        if (i>=tx_flash->red_level)
                        {
-                               gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->red);
+                               gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->colors[COL_LOUD]);
                                red=1;
                        }
                }
@@ -393,7 +418,7 @@ gtk_tx_flash_set_level(GtkWidget *widget, f_prec new_value)
   }
   else
   {
-         gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->black);
+         gdk_gc_set_foreground(widget->style->fg_gc[widget->state], &tx_flash->colors[COL_BG]);
 
          if (tx_flash->last_level==tx_flash->max)
          {
index dc0aacfc27db9808c77ca6eca5fa38f390408239..d893750575ec0836ef91f0e5f045583902d9835e 100644 (file)
@@ -43,14 +43,11 @@ typedef struct _GtkTxFlashClass   GtkTxFlashClass;
 
 struct _GtkTxFlash
 {
-        GtkWidget widget;
-       
-       GdkColor black;
-       GdkColor red;
-       GdkColor green;
-       GdkColor lightgreen;
-       GdkColor redgreen;
+       GtkWidget widget;
+
+       GdkColor colors[5];     
        
+       int colors_allocated;
        int levels;
        int last_level;
        int red_level;
@@ -70,6 +67,7 @@ GtkWidget*     gtk_tx_flash_new       ();
 guint         gtk_tx_flash_get_type (void);
 void           gtk_tx_flash_set_level (GtkWidget *widget, f_prec new_value);
 void           gtk_tx_flash_clear (GtkWidget *widget);
+void              gtk_tx_flash_update_colors(GtkTxFlash *tx);
 
 #ifdef __cplusplus
 }
index dadc7a55d438f392a64e7ce4ba7fb1f36973014a..68f9dbcfc931ba747119d922200221d15878d233 100644 (file)
@@ -118,3 +118,54 @@ on_del_mode_ok_clicked                 (GtkButton       *button,
        gtk_widget_destroy(del_dialog);
        del_dialog=NULL;
 }
+
+void
+color_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+       GdkColor p;
+       GtkWidget *dialog=create_tX_color_selection();
+       GtkWidget *sel=lookup_widget(dialog, "color_selection");
+       g_object_set_data(G_OBJECT(dialog), "Button", button);
+       
+       gdk_color_parse((const char *) g_object_get_data(G_OBJECT(button), "Color"), &p);
+       gtk_color_selection_set_current_color(GTK_COLOR_SELECTION(sel), &p);
+       gtk_widget_show(dialog);
+}
+
+
+void
+on_color_selection_ok_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+       char tmp[56];
+       char *col;
+       GdkColor p;
+       
+       GtkWidget *dialog=gtk_widget_get_parent(gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(button))));
+       GtkWidget *c_but=(GtkWidget *) g_object_get_data(G_OBJECT(dialog), "Button");
+       
+       GtkWidget *sel=lookup_widget(dialog, "color_selection");
+       gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(sel), &p);
+
+       col=(char *) g_object_get_data(G_OBJECT(c_but), "Color");
+       sprintf(col, "#%02X%02X%02X", p.red >> 8, p.green >> 8, p.blue >> 8);   
+       sprintf(tmp, "<span foreground=\"%s\"><b>%s</b></span>", col, col);
+       gtk_label_set_markup(GTK_LABEL(gtk_container_get_children(GTK_CONTAINER(c_but))->data), tmp);
+       
+       gtk_widget_destroy(dialog);
+}
+
+
+void
+on_color_selection_cancel_clicked      (GtkButton       *button,
+                                        gpointer         user_data)
+{
+       gtk_widget_destroy(
+               gtk_widget_get_parent(
+                       gtk_widget_get_parent(
+                               gtk_widget_get_parent(GTK_WIDGET(button))
+                       )
+               )
+       );
+}
index ced10308dec2a7ad31c8192a450d51ce6935c70e..b3a5be9f84d7fd6145a1f3bfaa00c62bbc998a81 100644 (file)
@@ -31,3 +31,15 @@ on_del_mode_cancel_clicked             (GtkButton       *button,
 void
 on_del_mode_ok_clicked                 (GtkButton       *button,
                                         gpointer         user_data);
+
+void
+color_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_color_selection_ok_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_color_selection_cancel_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
index 9e232f2c0f837b1f37be62c226e0e081f1d1e3e4..1282e00d687abd193a84be529ddccd670fea93ec 100644 (file)
@@ -213,6 +213,30 @@ create_tx_options (void)
   GtkObject *filename_length_adj;
   GtkWidget *filename_length;
   GtkWidget *label2;
+  GtkWidget *table8;
+  GtkWidget *label42;
+  GtkWidget *label43;
+  GtkWidget *label44;
+  GtkWidget *label45;
+  GtkWidget *label46;
+  GtkWidget *label47;
+  GtkWidget *wav_display_bg_focus;
+  GtkWidget *wav_display_bg_no_focus;
+  GtkWidget *wav_display_fg_focus;
+  GtkWidget *wav_display_fg_no_focus;
+  GtkWidget *wav_display_cursor;
+  GtkWidget *wav_display_cursor_mute;
+  GtkWidget *label41;
+  GtkWidget *table9;
+  GtkWidget *label53;
+  GtkWidget *label54;
+  GtkWidget *label55;
+  GtkWidget *label56;
+  GtkWidget *vu_meter_border_intensity;
+  GtkWidget *vu_meter_bg;
+  GtkWidget *vu_meter_loud;
+  GtkWidget *vu_meter_normal;
+  GtkWidget *label52;
   GtkWidget *table3;
   GtkWidget *label13;
   GtkWidget *soundfile_editor;
@@ -692,6 +716,171 @@ create_tx_options (void)
   gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 4), label2);
   gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
 
+  table8 = gtk_table_new (6, 2, FALSE);
+  gtk_widget_show (table8);
+  gtk_container_add (GTK_CONTAINER (notebook1), table8);
+  gtk_table_set_row_spacings (GTK_TABLE (table8), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table8), 2);
+
+  label42 = gtk_label_new ("Background (focus):");
+  gtk_widget_show (label42);
+  gtk_table_attach (GTK_TABLE (table8), label42, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label42), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label42), 0, 0.5);
+
+  label43 = gtk_label_new ("Background (no focus):");
+  gtk_widget_show (label43);
+  gtk_table_attach (GTK_TABLE (table8), label43, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label43), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label43), 0, 0.5);
+
+  label44 = gtk_label_new ("Signal (focus):");
+  gtk_widget_show (label44);
+  gtk_table_attach (GTK_TABLE (table8), label44, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label44), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label44), 0, 0.5);
+
+  label45 = gtk_label_new ("Signal (no focus):");
+  gtk_widget_show (label45);
+  gtk_table_attach (GTK_TABLE (table8), label45, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label45), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label45), 0, 0.5);
+
+  label46 = gtk_label_new ("Cursor:");
+  gtk_widget_show (label46);
+  gtk_table_attach (GTK_TABLE (table8), label46, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label46), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label46), 0, 0.5);
+
+  label47 = gtk_label_new ("Cursor (mute):");
+  gtk_widget_show (label47);
+  gtk_table_attach (GTK_TABLE (table8), label47, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label47), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label47), 0, 0.5);
+
+  wav_display_bg_focus = gtk_button_new_with_mnemonic ("button1");
+  gtk_widget_show (wav_display_bg_focus);
+  gtk_table_attach (GTK_TABLE (table8), wav_display_bg_focus, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  wav_display_bg_no_focus = gtk_button_new_with_mnemonic ("button2");
+  gtk_widget_show (wav_display_bg_no_focus);
+  gtk_table_attach (GTK_TABLE (table8), wav_display_bg_no_focus, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  wav_display_fg_focus = gtk_button_new_with_mnemonic ("button3");
+  gtk_widget_show (wav_display_fg_focus);
+  gtk_table_attach (GTK_TABLE (table8), wav_display_fg_focus, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  wav_display_fg_no_focus = gtk_button_new_with_mnemonic ("button4");
+  gtk_widget_show (wav_display_fg_no_focus);
+  gtk_table_attach (GTK_TABLE (table8), wav_display_fg_no_focus, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  wav_display_cursor = gtk_button_new_with_mnemonic ("button5");
+  gtk_widget_show (wav_display_cursor);
+  gtk_table_attach (GTK_TABLE (table8), wav_display_cursor, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  wav_display_cursor_mute = gtk_button_new_with_mnemonic ("button6");
+  gtk_widget_show (wav_display_cursor_mute);
+  gtk_table_attach (GTK_TABLE (table8), wav_display_cursor_mute, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label41 = gtk_label_new ("Audio Colors");
+  gtk_widget_show (label41);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 5), label41);
+  gtk_label_set_justify (GTK_LABEL (label41), GTK_JUSTIFY_LEFT);
+
+  table9 = gtk_table_new (4, 2, FALSE);
+  gtk_widget_show (table9);
+  gtk_container_add (GTK_CONTAINER (notebook1), table9);
+  gtk_container_set_border_width (GTK_CONTAINER (table9), 4);
+  gtk_table_set_row_spacings (GTK_TABLE (table9), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table9), 2);
+
+  label53 = gtk_label_new ("Background:");
+  gtk_widget_show (label53);
+  gtk_table_attach (GTK_TABLE (table9), label53, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label53), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label53), 0, 0.5);
+
+  label54 = gtk_label_new ("Regular Signal:");
+  gtk_widget_show (label54);
+  gtk_table_attach (GTK_TABLE (table9), label54, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label54), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label54), 0, 0.5);
+
+  label55 = gtk_label_new ("Loud Signal:");
+  gtk_widget_show (label55);
+  gtk_table_attach (GTK_TABLE (table9), label55, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label55), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label55), 0, 0.5);
+
+  label56 = gtk_label_new ("Scale Opacity:");
+  gtk_widget_show (label56);
+  gtk_table_attach (GTK_TABLE (table9), label56, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label56), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label56), 0, 0.5);
+
+  vu_meter_border_intensity = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0.07, 0, 1, 0.01, 0, 0)));
+  gtk_widget_show (vu_meter_border_intensity);
+  gtk_table_attach (GTK_TABLE (table9), vu_meter_border_intensity, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (GTK_FILL), 0, 0);
+  gtk_scale_set_value_pos (GTK_SCALE (vu_meter_border_intensity), GTK_POS_LEFT);
+  gtk_scale_set_digits (GTK_SCALE (vu_meter_border_intensity), 2);
+
+  vu_meter_bg = gtk_button_new_with_mnemonic ("button7");
+  gtk_widget_show (vu_meter_bg);
+  gtk_table_attach (GTK_TABLE (table9), vu_meter_bg, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  vu_meter_loud = gtk_button_new_with_mnemonic ("button8");
+  gtk_widget_show (vu_meter_loud);
+  gtk_table_attach (GTK_TABLE (table9), vu_meter_loud, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  vu_meter_normal = gtk_button_new_with_mnemonic ("button9");
+  gtk_widget_show (vu_meter_normal);
+  gtk_table_attach (GTK_TABLE (table9), vu_meter_normal, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label52 = gtk_label_new ("VU Colors");
+  gtk_widget_show (label52);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 6), label52);
+  gtk_label_set_justify (GTK_LABEL (label52), GTK_JUSTIFY_LEFT);
+
   table3 = gtk_table_new (5, 2, FALSE);
   gtk_widget_show (table3);
   gtk_container_add (GTK_CONTAINER (notebook1), table3);
@@ -774,7 +963,7 @@ create_tx_options (void)
 
   label3 = gtk_label_new ("Misc");
   gtk_widget_show (label3);
-  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 5), label3);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 7), label3);
   gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_LEFT);
 
   dialog_action_area3 = GTK_DIALOG (tx_options)->action_area;
@@ -807,6 +996,33 @@ create_tx_options (void)
   g_signal_connect_swapped ((gpointer) alsa_buffer_time, "value_changed",
                             G_CALLBACK (on_alsa_buffer_time_value_changed),
                             GTK_OBJECT (alsa_period_time));
+  g_signal_connect_swapped ((gpointer) wav_display_bg_focus, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (wav_display_bg_focus));
+  g_signal_connect_swapped ((gpointer) wav_display_bg_no_focus, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (wav_display_bg_no_focus));
+  g_signal_connect_swapped ((gpointer) wav_display_fg_focus, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (wav_display_fg_focus));
+  g_signal_connect_swapped ((gpointer) wav_display_fg_no_focus, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (wav_display_fg_no_focus));
+  g_signal_connect_swapped ((gpointer) wav_display_cursor, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (wav_display_cursor));
+  g_signal_connect_swapped ((gpointer) wav_display_cursor_mute, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (wav_display_cursor_mute));
+  g_signal_connect_swapped ((gpointer) vu_meter_bg, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (vu_meter_bg));
+  g_signal_connect_swapped ((gpointer) vu_meter_loud, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (vu_meter_loud));
+  g_signal_connect_swapped ((gpointer) vu_meter_normal, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (vu_meter_normal));
   g_signal_connect ((gpointer) pref_reset, "clicked",
                     G_CALLBACK (on_pref_reset_clicked),
                     NULL);
@@ -889,6 +1105,30 @@ create_tx_options (void)
   GLADE_HOOKUP_OBJECT (tx_options, label38, "label38");
   GLADE_HOOKUP_OBJECT (tx_options, filename_length, "filename_length");
   GLADE_HOOKUP_OBJECT (tx_options, label2, "label2");
+  GLADE_HOOKUP_OBJECT (tx_options, table8, "table8");
+  GLADE_HOOKUP_OBJECT (tx_options, label42, "label42");
+  GLADE_HOOKUP_OBJECT (tx_options, label43, "label43");
+  GLADE_HOOKUP_OBJECT (tx_options, label44, "label44");
+  GLADE_HOOKUP_OBJECT (tx_options, label45, "label45");
+  GLADE_HOOKUP_OBJECT (tx_options, label46, "label46");
+  GLADE_HOOKUP_OBJECT (tx_options, label47, "label47");
+  GLADE_HOOKUP_OBJECT (tx_options, wav_display_bg_focus, "wav_display_bg_focus");
+  GLADE_HOOKUP_OBJECT (tx_options, wav_display_bg_no_focus, "wav_display_bg_no_focus");
+  GLADE_HOOKUP_OBJECT (tx_options, wav_display_fg_focus, "wav_display_fg_focus");
+  GLADE_HOOKUP_OBJECT (tx_options, wav_display_fg_no_focus, "wav_display_fg_no_focus");
+  GLADE_HOOKUP_OBJECT (tx_options, wav_display_cursor, "wav_display_cursor");
+  GLADE_HOOKUP_OBJECT (tx_options, wav_display_cursor_mute, "wav_display_cursor_mute");
+  GLADE_HOOKUP_OBJECT (tx_options, label41, "label41");
+  GLADE_HOOKUP_OBJECT (tx_options, table9, "table9");
+  GLADE_HOOKUP_OBJECT (tx_options, label53, "label53");
+  GLADE_HOOKUP_OBJECT (tx_options, label54, "label54");
+  GLADE_HOOKUP_OBJECT (tx_options, label55, "label55");
+  GLADE_HOOKUP_OBJECT (tx_options, label56, "label56");
+  GLADE_HOOKUP_OBJECT (tx_options, vu_meter_border_intensity, "vu_meter_border_intensity");
+  GLADE_HOOKUP_OBJECT (tx_options, vu_meter_bg, "vu_meter_bg");
+  GLADE_HOOKUP_OBJECT (tx_options, vu_meter_loud, "vu_meter_loud");
+  GLADE_HOOKUP_OBJECT (tx_options, vu_meter_normal, "vu_meter_normal");
+  GLADE_HOOKUP_OBJECT (tx_options, label52, "label52");
   GLADE_HOOKUP_OBJECT (tx_options, table3, "table3");
   GLADE_HOOKUP_OBJECT (tx_options, label13, "label13");
   GLADE_HOOKUP_OBJECT (tx_options, soundfile_editor, "soundfile_editor");
@@ -1054,3 +1294,48 @@ create_tX_midilearn (void)
   return tX_midilearn;
 }
 
+GtkWidget*
+create_tX_color_selection (void)
+{
+  GtkWidget *tX_color_selection;
+  GtkWidget *ok_button1;
+  GtkWidget *cancel_button1;
+  GtkWidget *help_button1;
+  GtkWidget *color_selection;
+
+  tX_color_selection = gtk_color_selection_dialog_new ("Select Color");
+  gtk_window_set_resizable (GTK_WINDOW (tX_color_selection), FALSE);
+
+  ok_button1 = GTK_COLOR_SELECTION_DIALOG (tX_color_selection)->ok_button;
+  gtk_widget_show (ok_button1);
+  GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT);
+
+  cancel_button1 = GTK_COLOR_SELECTION_DIALOG (tX_color_selection)->cancel_button;
+  gtk_widget_show (cancel_button1);
+  GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT);
+
+  help_button1 = GTK_COLOR_SELECTION_DIALOG (tX_color_selection)->help_button;
+  gtk_widget_show (help_button1);
+  GTK_WIDGET_SET_FLAGS (help_button1, GTK_CAN_DEFAULT);
+
+  color_selection = GTK_COLOR_SELECTION_DIALOG (tX_color_selection)->colorsel;
+  gtk_widget_show (color_selection);
+  gtk_color_selection_set_has_opacity_control (GTK_COLOR_SELECTION (color_selection), FALSE);
+
+  g_signal_connect ((gpointer) ok_button1, "clicked",
+                    G_CALLBACK (on_color_selection_ok_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) cancel_button1, "clicked",
+                    G_CALLBACK (on_color_selection_cancel_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (tX_color_selection, tX_color_selection, "tX_color_selection");
+  GLADE_HOOKUP_OBJECT_NO_REF (tX_color_selection, ok_button1, "ok_button1");
+  GLADE_HOOKUP_OBJECT_NO_REF (tX_color_selection, cancel_button1, "cancel_button1");
+  GLADE_HOOKUP_OBJECT_NO_REF (tX_color_selection, help_button1, "help_button1");
+  GLADE_HOOKUP_OBJECT_NO_REF (tX_color_selection, color_selection, "color_selection");
+
+  return tX_color_selection;
+}
+
index b835b1097358ade65fd0a34d6752bb0fe8c9fc11..09f2cf94616f640179b1bfbc6a230be1fe5d9da7 100644 (file)
@@ -6,3 +6,4 @@ GtkWidget* create_tx_adjust (void);
 GtkWidget* create_tx_options (void);
 GtkWidget* create_tx_del_mode (void);
 GtkWidget* create_tX_midilearn (void);
+GtkWidget* create_tX_color_selection (void);
index 8890b4ef9230b8c9f78fc9395f1105edfcde0ea8..9f47d7b43d2b0571a4bb9bbd0f5beb1850b92d34 100644 (file)
@@ -144,6 +144,20 @@ void set_global_defaults() {
        globals.alsa_free_hwstats=1;
        globals.filename_length=20;
        globals.restore_midi_connections=1;
+       
+       strcpy(globals.wav_display_bg_focus, "#00004C");
+       strcpy(globals.wav_display_bg_no_focus, "#000000");
+
+       strcpy(globals.wav_display_fg_focus, "#FFFF00");
+       strcpy(globals.wav_display_fg_no_focus, "#00FF00");
+
+       strcpy(globals.wav_display_cursor, "#FF6666");
+       strcpy(globals.wav_display_cursor_mute, "#FFFFFF");     
+       
+       strcpy(globals.vu_meter_bg, "#000000");
+       strcpy(globals.vu_meter_loud, "#FF0000");
+       strcpy(globals.vu_meter_normal, "#00FF00");     
+       globals.vu_meter_border_intensity=0.5;
 }
 
 int load_globals_xml() {
@@ -226,6 +240,19 @@ int load_globals_xml() {
                        restore_int("confirm_events", globals.confirm_events);
                        restore_float("vtt_inertia", globals.vtt_inertia);
                        restore_int("restore_midi_connections", globals.restore_midi_connections);
+                       
+                       restore_string("wav_display_bg_focus", globals.wav_display_bg_focus);
+                       restore_string("wav_display_bg_no_focus", globals.wav_display_bg_no_focus);
+                       restore_string("wav_display_fg_focus", globals.wav_display_fg_focus);
+                       restore_string("wav_display_fg_no_focus", globals.wav_display_fg_no_focus);
+                       restore_string("wav_display_cursor", globals.wav_display_cursor);
+                       restore_string("wav_display_cursor_mute", globals.wav_display_cursor_mute);
+                       
+                       restore_string("vu_meter_bg", globals.vu_meter_bg);
+                       restore_string("vu_meter_normal", globals.vu_meter_normal);
+                       restore_string("vu_meter_loud", globals.vu_meter_loud);
+                       
+                       restore_float("vu_meter_border_intensity", globals.vu_meter_border_intensity);
 
 #ifdef USE_ALSA_MIDI_IN
                        if (!elementFound && (xmlStrcmp(cur->name, (xmlChar *) "midi_connections")==0)) {
@@ -328,6 +355,20 @@ void store_globals() {
                store_string("last_path", globals.current_path);
                store_int("restore_midi_connections", globals.restore_midi_connections);
 
+
+               store_string("wav_display_bg_focus", globals.wav_display_bg_focus);
+               store_string("wav_display_bg_no_focus", globals.wav_display_bg_no_focus);
+               store_string("wav_display_fg_focus", globals.wav_display_fg_focus);
+               store_string("wav_display_fg_no_focus", globals.wav_display_fg_no_focus);
+               store_string("wav_display_cursor", globals.wav_display_cursor);
+               store_string("wav_display_cursor_mute", globals.wav_display_cursor_mute);
+
+               store_string("vu_meter_bg", globals.vu_meter_bg);
+               store_string("vu_meter_normal", globals.vu_meter_normal);
+               store_string("vu_meter_loud", globals.vu_meter_loud);
+                       
+               store_float("vu_meter_border_intensity", globals.vu_meter_border_intensity);
+
 #ifdef USE_ALSA_MIDI_IN
                tX_midiin_store_connections(rc, indent);
 #endif         
index a0b90f75fe229b8a43a9f0ea18fd7313f11d4379..4d51db43c1c176b189c318ccfd1bab9c64cf9f96 100644 (file)
@@ -146,6 +146,21 @@ typedef struct {
        int filename_length;
        
        int restore_midi_connections;
+       
+       char wav_display_bg_focus[8];
+       char wav_display_bg_no_focus[8];
+       
+       char wav_display_fg_focus[8];
+       char wav_display_fg_no_focus[8];        
+       
+       char wav_display_cursor[8];     
+       char wav_display_cursor_mute[8];
+       
+       char vu_meter_bg[8];
+       char vu_meter_loud[8];
+       char vu_meter_normal[8];
+       double vu_meter_border_intensity;
+       
 } tx_global;
 
 extern tx_global globals;
index 03f9b8b27c6b139b1f51c1f603f045cd9445fd5d..d4bfe9fd3a10c220c6bed5d3efa4ab4fb4906469 100644 (file)
@@ -36,6 +36,10 @@ extern GtkWidget *main_window;
 extern GtkAdjustment *volume_adj;
 extern GtkAdjustment *pitch_adj;
 
+
+extern GtkWidget *main_flash_l;
+extern GtkWidget *main_flash_r;
+
 extern tX_seqpar_master_volume sp_master_volume;
 extern tX_seqpar_master_pitch sp_master_pitch;
 
index 3cd565dd11c5ffcacf34468b31d23f44d6c25bb5..cc95ee4325b46486148efd709c5eb2a7d404be06 100644 (file)
@@ -109,10 +109,9 @@ int tX_midiin::check_event()
                tX_midievent event;
                event.is_noteon = false;
                bool event_usable = true;
-               printf("type: %i\n", ev->type);
+
                switch (ev->type) {
                        case SND_SEQ_EVENT_CONTROLLER: 
-                               printf("ctrl: p: %i, v: %i, c: %i\n", ev->data.control.param, ev->data.control.value, ev->data.control.channel);
                                event.type = tX_midievent::CC;
                                event.number = ev->data.control.param;
                                event.value = ev->data.control.value / 127.0;
@@ -131,14 +130,12 @@ int tX_midiin::check_event()
                                event.channel = ev->data.control.channel;
                                break;
                        case SND_SEQ_EVENT_REGPARAM:
-                               printf("rpn: p: %i, v: %i, c: %i\n", ev->data.control.param, ev->data.control.value, ev->data.control.channel);
                                event.type = tX_midievent::RPN;
                                event.number = ev->data.control.param;
                                event.value = ev->data.control.value / 16383.0;
                                event.channel = ev->data.control.channel;
                                break;
                        case SND_SEQ_EVENT_NONREGPARAM:
-                               printf("nrpn: p: %i, v: %i, c: %i\n", ev->data.control.param, ev->data.control.value, ev->data.control.channel);
                                event.type = tX_midievent::NRPN;
                                event.number = ev->data.control.param;
                                event.value = ev->data.control.value / 16383.0;
index e187bfb5a83adbf54c0524d1da860133fa01788e..196d48d190fd919e2cc523ebc09cb0c358799e1d 100644 (file)
@@ -59,6 +59,8 @@ int tx_mouse :: grab() {
 
        if (grabbed) return(0);
 
+       warp_override=false;
+       
        dpy=XOpenDisplay(NULL);
        if (!dpy)
        {
@@ -299,7 +301,12 @@ int tx_mouse :: check_event()
                switch(xev.type)
                {
                        case MotionNotify:
-                               vtt->xy_input(((f_prec) xmot->x_root)*warp,((f_prec) xmot->y_root)*warp);
+                               
+                               if (warp_override) {
+                                       vtt->sp_speed.handle_mouse_input(((f_prec) xmot->x_root)*globals.mouse_speed*warp);
+                               } else {
+                                       vtt->xy_input((f_prec) xmot->x_root, (f_prec) xmot->y_root);
+                               }
                                break;
                        
                        case ButtonPress:
@@ -357,6 +364,7 @@ int tx_mouse :: check_event()
                                        case XK_w:
                                        vtt->sp_mute.receive_input_value(1);
                                        case XK_f: 
+                                       warp_override=true;
                                        warp=((float) vtt->samples_in_buffer)/TX_MOUSE_SPEED_WARP;      
                                        vtt->set_scratch(1);
                                        break;
@@ -398,6 +406,7 @@ int tx_mouse :: check_event()
                                        case XK_w:
                                        vtt->sp_mute.receive_input_value(0);
                                        case XK_f: warp=TX_MOUSE_SPEED_NORMAL;
+                                       warp_override=false;
                                        vtt->set_scratch(0);
                                        break;                                  
                                }
index e6415e3f166d82ea0d54c0dde8c0c5f69f06dfc7..67718e68f716290c902bc297e9e0a363a91fbf44 100644 (file)
@@ -46,6 +46,7 @@ class tx_mouse
        XMotionEvent *xmot;
        XKeyEvent *xkey;
        XButtonEvent *xbut;
+       bool warp_override;
 
 #ifdef USE_DGA2        
        XEvent xev_copy;
index cfbe3e3736ea5b4e4beaed17e2c33e699fe22e10..61e3821f8bda0acf9756ea9562d72c95360a43bf 100644 (file)
@@ -98,21 +98,44 @@ static void gtk_tx_class_init(GtkTxClass * gclass) {
 //     widget_class->motion_notify_event = gtk_tx_motion_notify;
 }
 
-void gtk_tx_mk_col(GtkTx * tx, GdkColor * col, float r, float g, float b) {
-       float max = 65535.0;
+#define COL_BG_FOCUS     0
+#define COL_BG_NO_FOCUS  1
+#define COL_FG_FOCUS     2
+#define COL_FG_NO_FOCUS  3
+#define COL_CURSOR       4
+#define COL_CURSOR_MUTE  5
+
+void gtk_tx_update_colors(GtkTx *tx)
+{
+       int i;
+       
+       if (tx->colors_allocated) {
+               gdk_colormap_free_colors(gtk_widget_get_colormap(GTK_WIDGET(tx)), tx->colors, 6);
+       }
        
-       col->red = (gint) (r * max);
-       col->green = (gint) (g * max);
-       col->blue = (gint) (b * max);
-               
-       gdk_colormap_alloc_color(gtk_widget_get_colormap(GTK_WIDGET(tx)), col, 0, 1);
+       gdk_color_parse(globals.wav_display_bg_focus, &tx->colors[COL_BG_FOCUS]);
+       gdk_color_parse(globals.wav_display_bg_no_focus, &tx->colors[COL_BG_NO_FOCUS]);
+       
+       gdk_color_parse(globals.wav_display_fg_focus, &tx->colors[COL_FG_FOCUS]);
+       gdk_color_parse(globals.wav_display_fg_no_focus, &tx->colors[COL_FG_NO_FOCUS]);
+       
+       gdk_color_parse(globals.wav_display_cursor, &tx->colors[COL_CURSOR]);
+       gdk_color_parse(globals.wav_display_cursor_mute, &tx->colors[COL_CURSOR_MUTE]);
+       
+       for (i=0; i<6; i++) {
+               gdk_colormap_alloc_color(gtk_widget_get_colormap(GTK_WIDGET(tx)), &tx->colors[i], 0, 1);
+       }
+
+       tx->colors_allocated=1;
 }
 
+
 static void gtk_tx_init(GtkTx * tx) {
        GdkColormap *priv;
 
        tx->disp_data = NULL;
        tx->data = NULL;
+       tx->colors_allocated=0;
        tx->samples = 0;
        tx->do_showframe = 0;
 #ifdef USE_DISPLAY_NORMALIZE
@@ -121,17 +144,13 @@ static void gtk_tx_init(GtkTx * tx) {
        
        priv = gdk_colormap_new(gtk_widget_get_visual(GTK_WIDGET(tx)), 6);
        gtk_widget_set_colormap(GTK_WIDGET(tx), priv);
+
+       memset(tx->colors, 0, sizeof(tx->colors));
        
-       gtk_tx_mk_col(tx, &tx->bg, 0, 0, 0);
-       gtk_tx_mk_col(tx, &tx->fg, 0, 1, 0);
-       gtk_tx_mk_col(tx, &tx->focus_fg, 1, 1, 0);
-       gtk_tx_mk_col(tx, &tx->focus_bg, 0, 0, 0.3);    
-       
-       gtk_tx_mk_col(tx, &tx->busy, 1, 0.4, 0.4);
-       gtk_tx_mk_col(tx, &tx->mute, 1, 1, 1);
+       gtk_tx_update_colors(tx);
        
-       tx->current_fg=&tx->fg;
-       tx->current_bg=&tx->bg;
+       tx->current_fg=&tx->colors[COL_FG_NO_FOCUS];
+       tx->current_bg=&tx->colors[COL_BG_NO_FOCUS];
        
        tx->spp=1;
        tx->lastmute=-1;
@@ -465,8 +484,8 @@ void gtk_tx_update_pos_display(GtkTx * tx, int sample, int mute) {
 
        x = current_pos_x;
 
-       if (mute) gdk_gc_set_foreground(gc, &tx->mute);
-       else gdk_gc_set_foreground(gc, &tx->busy);
+       if (mute) gdk_gc_set_foreground(gc, &tx->colors[COL_CURSOR_MUTE]);
+       else gdk_gc_set_foreground(gc, &tx->colors[COL_CURSOR]);
 
        gdk_draw_line(window, gc, x, 0, x, ymax);
        
@@ -498,11 +517,11 @@ void gtk_tx_cleanup_pos_display(GtkTx * tx) {
 
 void gtk_tx_show_frame(GtkTx *tx, int show) {
        if (show) {
-               tx->current_fg=&tx->focus_fg;
-               tx->current_bg=&tx->focus_bg;
+               tx->current_fg=&tx->colors[COL_FG_FOCUS];
+               tx->current_bg=&tx->colors[COL_BG_FOCUS];
        } else {
-               tx->current_fg=&tx->fg;
-               tx->current_bg=&tx->bg;
+               tx->current_fg=&tx->colors[COL_FG_NO_FOCUS];
+               tx->current_bg=&tx->colors[COL_BG_NO_FOCUS];
        }
        
        gtk_widget_queue_draw(GTK_WIDGET(tx));  
index 250049eafcb8b36a2ab238c45b9db6ace6860fcc..94b59ed544236ac0392273117ef734f5e2e07de4 100644 (file)
@@ -54,14 +54,8 @@ struct _GtkTx {
        int16_t *data;
        int samples;
        
-       GdkColor fg;
-       GdkColor bg;
-       GdkColor focus_bg;
-       GdkColor focus_fg;
-
-       GdkColor busy;
-       GdkColor mute;
-
+       GdkColor colors[6];
+       
        GdkColor *current_fg;
        GdkColor *current_bg;
        
@@ -80,6 +74,8 @@ struct _GtkTx {
 
        int display_width;
        int display_x_offset;
+       
+       int colors_allocated;
 
 #ifdef USE_DISPLAY_NORMALIZE
        f_prec max_value;
@@ -97,6 +93,7 @@ void gtk_tx_cleanup_pos_display (GtkTx *tx);
 void   gtk_tx_update_pos_display  (GtkTx *tx, int sample, int mute);
 void gtk_tx_show_frame(GtkTx *tx, int show);
 void gtk_tx_set_zoom(GtkTx *tx, f_prec zoom);
+void gtk_tx_update_colors(GtkTx *tx);
 f_prec gtk_tx_get_zoom(GtkTx *tx);
 
 #ifdef __cplusplus
index b5412e9f54aa588648ed497a7f14b236f9a444b1..5a0c6bbf58d0218ddaaaa08de40b15831cdadbf6 100644 (file)
            </packing>
          </child>
 
+         <child>
+           <widget class="GtkTable" id="table8">
+             <property name="visible">True</property>
+             <property name="n_rows">6</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="label42">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Background (focus):</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="label43">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Background (no focus):</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="label44">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Signal (focus):</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="label45">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Signal (no focus):</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="GtkLabel" id="label46">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Cursor:</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">4</property>
+                 <property name="bottom_attach">5</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkLabel" id="label47">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Cursor (mute):</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">5</property>
+                 <property name="bottom_attach">6</property>
+                 <property name="x_options">fill</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkButton" id="wav_display_bg_focus">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">button1</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <signal name="clicked" handler="color_clicked" object="wav_display_bg_focus" last_modification_time="Fri, 01 Aug 2003 14:30:29 GMT"/>
+               </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="GtkButton" id="wav_display_bg_no_focus">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">button2</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <signal name="clicked" handler="color_clicked" object="wav_display_bg_no_focus" last_modification_time="Fri, 01 Aug 2003 14:30:58 GMT"/>
+               </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="GtkButton" id="wav_display_fg_focus">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">button3</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <signal name="clicked" handler="color_clicked" object="wav_display_fg_focus" last_modification_time="Fri, 01 Aug 2003 14:31:26 GMT"/>
+               </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="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkButton" id="wav_display_fg_no_focus">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">button4</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <signal name="clicked" handler="color_clicked" object="wav_display_fg_no_focus" last_modification_time="Fri, 01 Aug 2003 14:31:38 GMT"/>
+               </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="GtkButton" id="wav_display_cursor">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">button5</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <signal name="clicked" handler="color_clicked" object="wav_display_cursor" last_modification_time="Fri, 01 Aug 2003 14:31:52 GMT"/>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">4</property>
+                 <property name="bottom_attach">5</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkButton" id="wav_display_cursor_mute">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">button6</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <signal name="clicked" handler="color_clicked" object="wav_display_cursor_mute" last_modification_time="Fri, 01 Aug 2003 14:32:05 GMT"/>
+               </widget>
+               <packing>
+                 <property name="left_attach">1</property>
+                 <property name="right_attach">2</property>
+                 <property name="top_attach">5</property>
+                 <property name="bottom_attach">6</property>
+                 <property name="y_options"></property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label41">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">Audio Colors</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.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+           </widget>
+           <packing>
+             <property name="type">tab</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkTable" id="table9">
+             <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="label53">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Background:</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="label54">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Regular Signal:</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="label55">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Loud Signal:</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="label56">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Scale Opacity:</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="GtkHScale" id="vu_meter_border_intensity">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="draw_value">True</property>
+                 <property name="value_pos">GTK_POS_LEFT</property>
+                 <property name="digits">2</property>
+                 <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
+                 <property name="inverted">False</property>
+                 <property name="adjustment">0.07 0 1 0.01 0 0</property>
+               </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">fill</property>
+               </packing>
+             </child>
+
+             <child>
+               <widget class="GtkButton" id="vu_meter_bg">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">button7</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <signal name="clicked" handler="color_clicked" object="vu_meter_bg" last_modification_time="Fri, 01 Aug 2003 14:32:23 GMT"/>
+               </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>
+
+             <child>
+               <widget class="GtkButton" id="vu_meter_loud">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">button8</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <signal name="clicked" handler="color_clicked" object="vu_meter_loud" last_modification_time="Fri, 01 Aug 2003 14:32:39 GMT"/>
+               </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>
+
+             <child>
+               <widget class="GtkButton" id="vu_meter_normal">
+                 <property name="visible">True</property>
+                 <property name="can_focus">True</property>
+                 <property name="label" translatable="yes">button9</property>
+                 <property name="use_underline">True</property>
+                 <property name="relief">GTK_RELIEF_NORMAL</property>
+                 <signal name="clicked" handler="color_clicked" object="vu_meter_normal" last_modification_time="Fri, 01 Aug 2003 14:32:54 GMT"/>
+               </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"></property>
+               </packing>
+             </child>
+           </widget>
+           <packing>
+             <property name="tab_expand">False</property>
+             <property name="tab_fill">True</property>
+           </packing>
+         </child>
+
+         <child>
+           <widget class="GtkLabel" id="label52">
+             <property name="visible">True</property>
+             <property name="label" translatable="yes">VU Colors</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.5</property>
+             <property name="yalign">0.5</property>
+             <property name="xpad">0</property>
+             <property name="ypad">0</property>
+           </widget>
+           <packing>
+             <property name="type">tab</property>
+           </packing>
+         </child>
+
          <child>
            <widget class="GtkTable" id="table3">
              <property name="border_width">4</property>
   </child>
 </widget>
 
+<widget class="GtkColorSelectionDialog" id="tX_color_selection">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Select Color</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+
+  <child internal-child="cancel_button">
+    <widget class="GtkButton" id="cancel_button1">
+      <property name="visible">True</property>
+      <property name="can_default">True</property>
+      <property name="can_focus">True</property>
+      <property name="relief">GTK_RELIEF_NORMAL</property>
+      <signal name="clicked" handler="on_color_selection_cancel_clicked" last_modification_time="Fri, 01 Aug 2003 14:29:40 GMT"/>
+    </widget>
+  </child>
+
+  <child internal-child="ok_button">
+    <widget class="GtkButton" id="ok_button1">
+      <property name="visible">True</property>
+      <property name="can_default">True</property>
+      <property name="can_focus">True</property>
+      <property name="relief">GTK_RELIEF_NORMAL</property>
+      <signal name="clicked" handler="on_color_selection_ok_clicked" last_modification_time="Fri, 01 Aug 2003 14:29:09 GMT"/>
+    </widget>
+  </child>
+
+  <child internal-child="help_button">
+    <widget class="GtkButton" id="help_button1">
+      <property name="visible">True</property>
+      <property name="can_default">True</property>
+      <property name="can_focus">True</property>
+      <property name="relief">GTK_RELIEF_NORMAL</property>
+    </widget>
+  </child>
+
+  <child internal-child="color_selection">
+    <widget class="GtkColorSelection" id="color_selection">
+      <property name="visible">True</property>
+      <property name="has_opacity_control">False</property>
+      <property name="has_palette">False</property>
+    </widget>
+  </child>
+</widget>
+
 </glade-interface>