[xiph-commits] r18278 - trunk/spectrum
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Tue May 15 01:35:56 PDT 2012
Author: xiphmont
Date: 2012-05-15 01:35:56 -0700 (Tue, 15 May 2012)
New Revision: 18278
Modified:
trunk/spectrum/spec_panel.c
trunk/spectrum/spec_plot.c
trunk/spectrum/spectrum-gtkrc
trunk/spectrum/version.h
Log:
More space saving tweaks
Modified: trunk/spectrum/spec_panel.c
===================================================================
--- trunk/spectrum/spec_panel.c 2012-05-15 08:08:37 UTC (rev 18277)
+++ trunk/spectrum/spec_panel.c 2012-05-15 08:35:56 UTC (rev 18278)
@@ -438,13 +438,17 @@
static void bwchange(GtkWidget *widget,struct panel *p){
plot_bw=gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
if(plot_bw==0){
- gtk_widget_hide(p->bwmodebutton);
- gtk_container_remove(GTK_CONTAINER(p->bwtable),p->bwbutton);
- gtk_table_attach_defaults(GTK_TABLE(p->bwtable),p->bwbutton,0,2,0,1);
+
+ gtk_widget_set_sensitive(GTK_WIDGET(p->bwmodebutton),0);
+ //gtk_widget_hide(p->bwmodebutton);
+ //gtk_container_remove(GTK_CONTAINER(p->bwtable),p->bwbutton);
+ //gtk_table_attach_defaults(GTK_TABLE(p->bwtable),p->bwbutton,0,2,0,1);
}else{
- gtk_container_remove(GTK_CONTAINER(p->bwtable),p->bwbutton);
- gtk_table_attach_defaults(GTK_TABLE(p->bwtable),p->bwbutton,0,1,0,1);
- gtk_widget_show(p->bwmodebutton);
+
+ gtk_widget_set_sensitive(GTK_WIDGET(p->bwmodebutton),1);
+ //gtk_container_remove(GTK_CONTAINER(p->bwtable),p->bwbutton);
+ //gtk_table_attach_defaults(GTK_TABLE(p->bwtable),p->bwbutton,0,1,0,1);
+ //gtk_widget_show(p->bwmodebutton);
}
}
@@ -491,6 +495,8 @@
gtk_window_add_accel_group (GTK_WINDOW(panel->toplevel), panel->group);
gtk_window_set_title(GTK_WINDOW(panel->toplevel),(const gchar *)"Spectrum Analyzer");
+ gtk_window_set_default_size(GTK_WINDOW(panel->toplevel),1024,400);
+ //gtk_widget_set_size_request(GTK_WIDGET(panel->toplevel),1024,400);
/* the Fucking Fish */
for(i=0;i<19;i++){
@@ -587,7 +593,6 @@
gtk_alignment_set_padding(GTK_ALIGNMENT(al),0,10,0,0);
gtk_box_pack_start(GTK_BOX(rightbox),al,0,0,0);
-
ch+=channels[fi];
}
@@ -629,7 +634,7 @@
/* depth */
GtkWidget *menu3=gtk_combo_box_new_text();
- char *entries3[]={"log freq","ISO freq","linear freq"};
+ char *entries3[]={"log","ISO","linear"};
for(i=0;i<3;i++)
gtk_combo_box_append_text (GTK_COMBO_BOX (menu3), entries3[i]);
gtk_combo_box_set_active(GTK_COMBO_BOX(menu3),plot_scale);
Modified: trunk/spectrum/spec_plot.c
===================================================================
--- trunk/spectrum/spec_plot.c 2012-05-15 08:08:37 UTC (rev 18277)
+++ trunk/spectrum/spec_plot.c 2012-05-15 08:35:56 UTC (rev 18278)
@@ -754,7 +754,7 @@
if(py>maxy)maxy=py;
}
max+=maxy*1.5;
- max*=(i+1)*4;
+ max*=(i+1)*3;
if(axisx<max)axisx=max;
}
/* find max iso layout */
@@ -953,10 +953,10 @@
}
/* log X scale */
{
- char *labels[15]={"10Hz","20Hz","30Hz","50Hz","100Hz",
- "200Hz","300Hz","500Hz","1kHz",
- "2kHz","3kHz","5kHz","10kHz",
- "20kHz","30kHz"};
+ char *labels[15]={"10Hz","20","30","50","100Hz",
+ "200","300","500","1kHz",
+ "2k","3k","5k","10kHz",
+ "20k","30k"};
p->log_layout=calloc(16,sizeof(*p->log_layout));
for(i=0;i<15;i++)
p->log_layout[i]=gtk_widget_create_pango_layout(ret,labels[i]);
Modified: trunk/spectrum/spectrum-gtkrc
===================================================================
--- trunk/spectrum/spectrum-gtkrc 2012-05-15 08:08:37 UTC (rev 18277)
+++ trunk/spectrum/spectrum-gtkrc 2012-05-15 08:35:56 UTC (rev 18278)
@@ -10,15 +10,19 @@
bg[NORMAL]="#c0d0e0"
bg[ACTIVE]="#e0f0ff"
bg[PRELIGHT]="#e0f0ff"
+ bg[INSENSITIVE]="#c0d0e0"
fg[NORMAL]="#000000"
fg[ACTIVE]="#000000"
fg[PRELIGHT]="#000000"
fg[SELECTED]="#000000"
+ fg[INSENSITIVE]="#000000"
+
text[NORMAL]="#000000"
text[ACTIVE]="#000000"
text[PRELIGHT]="#000000"
text[SELECTED]="#000000"
+ text[INSENSITIVE]="#8ea0be"
}
style "panel" {
Modified: trunk/spectrum/version.h
===================================================================
--- trunk/spectrum/version.h 2012-05-15 08:08:37 UTC (rev 18277)
+++ trunk/spectrum/version.h 2012-05-15 08:35:56 UTC (rev 18278)
@@ -1,2 +1,2 @@
#define VERSION "$Id$ "
-/* DO NOT EDIT: Automated versioning hack [Tue May 15 04:06:30 EDT 2012] */
+/* DO NOT EDIT: Automated versioning hack [Tue May 15 04:30:47 EDT 2012] */
More information about the commits
mailing list