Fixing the 'w' and 'f' key fixes and the VU Meter Config tab - Alex
authorterminatorX <>
Sun, 3 Aug 2003 16:36:08 +0000 (16:36 +0000)
committerterminatorX <>
Sun, 3 Aug 2003 16:36:08 +0000 (16:36 +0000)
src/tX_glade_interface.cc
src/tX_global.c
src/tX_mouse.cc
terminatorX.glade

index 1282e00d687abd193a84be529ddccd670fea93ec..c6533253e486302f1f0726f2352bffc965dfe01e 100644 (file)
@@ -234,8 +234,8 @@ create_tx_options (void)
   GtkWidget *label56;
   GtkWidget *vu_meter_border_intensity;
   GtkWidget *vu_meter_bg;
-  GtkWidget *vu_meter_loud;
   GtkWidget *vu_meter_normal;
+  GtkWidget *vu_meter_loud;
   GtkWidget *label52;
   GtkWidget *table3;
   GtkWidget *label13;
@@ -864,15 +864,15 @@ create_tx_options (void)
                     (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,
+  vu_meter_normal = gtk_button_new_with_mnemonic ("button8");
+  gtk_widget_show (vu_meter_normal);
+  gtk_table_attach (GTK_TABLE (table9), vu_meter_normal, 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,
+  vu_meter_loud = gtk_button_new_with_mnemonic ("button9");
+  gtk_widget_show (vu_meter_loud);
+  gtk_table_attach (GTK_TABLE (table9), vu_meter_loud, 1, 2, 2, 3,
                     (GtkAttachOptions) (GTK_FILL),
                     (GtkAttachOptions) (0), 0, 0);
 
@@ -1017,12 +1017,12 @@ create_tx_options (void)
   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_swapped ((gpointer) vu_meter_loud, "clicked",
+                            G_CALLBACK (color_clicked),
+                            GTK_OBJECT (vu_meter_loud));
   g_signal_connect ((gpointer) pref_reset, "clicked",
                     G_CALLBACK (on_pref_reset_clicked),
                     NULL);
@@ -1126,8 +1126,8 @@ create_tx_options (void)
   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, vu_meter_loud, "vu_meter_loud");
   GLADE_HOOKUP_OBJECT (tx_options, label52, "label52");
   GLADE_HOOKUP_OBJECT (tx_options, table3, "table3");
   GLADE_HOOKUP_OBJECT (tx_options, label13, "label13");
index 9f47d7b43d2b0571a4bb9bbd0f5beb1850b92d34..79a1417f09cb3ad262d9f97889bda3fdffe9f828 100644 (file)
@@ -157,7 +157,7 @@ void set_global_defaults() {
        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;
+       globals.vu_meter_border_intensity=0.7;
 }
 
 int load_globals_xml() {
index 196d48d190fd919e2cc523ebc09cb0c358799e1d..7f980d028116415a0510559cf8d3d0fce03fd573 100644 (file)
@@ -31,6 +31,7 @@
 #include "tX_global.h"
 #include "tX_engine.h"
 #include "tX_vtt.h"
+#include <stdlib.h>
 
 #define TX_MOUSE_SPEED_NORMAL 0.05
 #define TX_MOUSE_SPEED_WARP 250000
@@ -303,9 +304,10 @@ int tx_mouse :: check_event()
                        case MotionNotify:
                                
                                if (warp_override) {
-                                       vtt->sp_speed.handle_mouse_input(((f_prec) xmot->x_root)*globals.mouse_speed*warp);
+                                       f_prec value=(abs(xmot->x_root)>abs(xmot->y_root)) ? xmot->x_root : xmot->y_root;
+                                       vtt->sp_speed.handle_mouse_input(value*globals.mouse_speed*warp);
                                } else {
-                                       vtt->xy_input((f_prec) xmot->x_root, (f_prec) xmot->y_root);
+                                       vtt->xy_input((f_prec) xmot->x_root*warp, (f_prec) xmot->y_root*warp);
                                }
                                break;
                        
index 5a0c6bbf58d0218ddaaaa08de40b15831cdadbf6..3162c2d9df7d4088974507de6b0d74de0fa6024c 100644 (file)
              </child>
 
              <child>
-               <widget class="GtkButton" id="vu_meter_loud">
+               <widget class="GtkButton" id="vu_meter_normal">
                  <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"/>
+                 <signal name="clicked" handler="color_clicked" object="vu_meter_normal" last_modification_time="Fri, 01 Aug 2003 14:32:39 GMT"/>
                </widget>
                <packing>
                  <property name="left_attach">1</property>
              </child>
 
              <child>
-               <widget class="GtkButton" id="vu_meter_normal">
+               <widget class="GtkButton" id="vu_meter_loud">
                  <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"/>
+                 <signal name="clicked" handler="color_clicked" object="vu_meter_loud" last_modification_time="Fri, 01 Aug 2003 14:32:54 GMT"/>
                </widget>
                <packing>
                  <property name="left_attach">1</property>