Skip to contentSkip to conversation

Envy24control -changes on screen

DISCUSSION Applied Alan Horstmann 3 participants 13 messages Dec 16, 2005 – Jan 9, 2006

lore
Share & tools
lore
#0 lore raw
Quoted 10 lines · On Friday 16 December 2005 19:24, I wrote:

The attached patch file provides a 'makeover' for envy24control, motivated by a desire to reduce the minimum on-screen size and improve usability. A few users have been trying this arrangement from an original posting in July and have encouraged me to offer it to alsa mainstream.

The patch is large, but is mainly moving sections of code arround, adding scroll windows, and re-arranging the controls on screen, plus options -w to set initial window size, and -t to increase mixer height (tall). If the file is too large it may be possible to split it up.

Quoted 6 lines

The levelmeters part is to prevent a problem with redraw of un-configured pixmaps at start-up.

It is possible that this patch will clash with Dirk Jagdmann's recent midi option posting as the same lines are changed, but I have posted now so evaluation can start.

In my haste to post my finished patch by today I have missed deleting lines that mark the program as modified and date it. Amended patch is attached.

Quoted 8 lines

Summary: Change on-screen appearance of envy24control

Re-arrange envy24control on-screen; put digital mixer meter in outer frame; split input and pcm mixer meters; add scroll windows on all notebook pages; re-layout button boxes; add options -w and -t; add rt-click menu; add pixmap test to levelmeters.c

envy24control.c +331 -135
diff -ru Denvy24control/envy24control.c Aenvy24control/envy24control.c
@@ -5,6 +5,13 @@
    (2003/03/22) Changed to hbox/vbox layout.
    Copyright (C) 2003 by S??ren Wedel Nielsen
    
+   (16.12.2005)  Re-worked user interface -digital mixer display permanently
+   visible; pcms split to another page; controls re-arranged and all pages
+   scrollable for min window size and greater flexibility; pop-up menu enabled.
+   Changes to levelmeters.c to prevent invalid redraws.
+   New options added: 'w' to set initial window pixel width and 't' for tall equal mixer height style.
+   Copyright (C) 2005 by Alan Horstmann
+
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
@@ -27,7 +34,7 @@
 #include <getopt.h>
 
 int input_channels, output_channels, pcm_output_channels, spdif_channels, view_spdif_playback, card_number;
-int card_is_dmx6fire = FALSE;
+int card_is_dmx6fire = FALSE, tall_equal_mixer_ht = 0;
 char *profiles_file_name, *default_profile;
 
 ice1712_eeprom_t card_eeprom;
@@ -147,7 +154,7 @@
 	if (stream <= MAX_PCM_OUTPUT_CHANNELS) {
 		sprintf(str, "PCM Out %i", stream);
 	} else if (stream <= (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS)) {
-		sprintf(str, "S/PDIF Out %s", stream & 1 ? "L": "R");
+		sprintf(str, "SPDIF Out %s", stream & 1 ? "L": "R");
 	} else if (card_is_dmx6fire) {
 		switch (stream) {
 		case 11: sprintf(str, "CD In L");break;
@@ -163,7 +170,7 @@
 	} else if (stream <= (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS)) {
 		sprintf(str, "H/W In %i", stream - (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS));
 	} else if (stream <= (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS + MAX_SPDIF_CHANNELS)) {
-		sprintf(str, "S/PDIF In %s", stream & 1 ? "L": "R");
+		sprintf(str, "SPDIF In %s", stream & 1 ? "L": "R");
 	} else {
 		strcpy(str, "???");
 	}
@@ -171,12 +178,12 @@
 	frame = gtk_frame_new(str);
 	gtk_widget_show(frame);
 	gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
+	gtk_container_set_border_width(GTK_CONTAINER(frame), 2);
 
 	vbox = gtk_vbox_new(FALSE, 6);
 	gtk_widget_show(vbox);
 	gtk_container_add(GTK_CONTAINER(frame), vbox);
-	gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
+	gtk_container_set_border_width(GTK_CONTAINER(vbox), 2);
 
 	hbox = gtk_hbox_new(FALSE, 2);
 	gtk_widget_show(hbox);
@@ -208,7 +215,7 @@
 	gtk_signal_connect(GTK_OBJECT(drawing), "configure_event",
 			   GTK_SIGNAL_FUNC(level_meters_configure_event), NULL);
 	gtk_widget_set_events(drawing, GDK_EXPOSURE_MASK);
-	gtk_widget_set_usize(drawing, 45, 202);
+	gtk_widget_set_usize(drawing, 36, (60 * tall_equal_mixer_ht + 204));
 	gtk_box_pack_start(GTK_BOX(vbox1), drawing, FALSE, FALSE, 1);
 
 	label = gtk_label_new("");
@@ -272,10 +279,10 @@
 			   (gpointer)(long)((stream << 16) + 1));
 }
 
-static void create_mixer(GtkWidget *main, GtkWidget *notebook, int page)
+
+static void create_inputs_mixer(GtkWidget *main, GtkWidget *notebook, int page)
 {
         GtkWidget *hbox;
-        GtkWidget *hbox1;
         GtkWidget *vbox;
 
 	GtkWidget *label;
@@ -290,67 +297,64 @@
 	gtk_widget_show(hbox);
 	gtk_container_add(GTK_CONTAINER(notebook), hbox);
 
-        label = gtk_label_new("Monitor Mixer");
+        label = gtk_label_new("Monitor Inputs");
         gtk_widget_show(label);
 	gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), 
 				   gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),page), 
 				   label);
 
-	/* create digital mixer frame */
-	vbox = gtk_vbox_new(FALSE, 1);
-	gtk_widget_show(vbox);
-	gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
-
-	frame = gtk_frame_new("Digital Mixer");
-	gtk_widget_show(frame);
-	gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, TRUE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
-
+	/* build scrolling area */
+	scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow);
+	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
+					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
 
-	/* create controls in the digital mixer frame */
+	viewport = gtk_viewport_new(NULL, NULL);
+	gtk_widget_show(viewport);
+	gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport);
 
 	vbox = gtk_vbox_new(FALSE, 0);
 	gtk_widget_show(vbox);
-	gtk_container_add(GTK_CONTAINER(frame), vbox);	
-
-	hbox1 = gtk_hbox_new(FALSE, 0);
-	gtk_widget_show(hbox1);
-	gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 6);
+	gtk_container_add(GTK_CONTAINER(viewport), vbox);
 
-	drawing = gtk_drawing_area_new();
-	mixer_mix_drawing = drawing;
-	gtk_widget_set_name(drawing, "DigitalMixer");
-	gtk_box_pack_start(GTK_BOX(hbox1), drawing, TRUE, FALSE, 6);
-	gtk_widget_set_usize(drawing, 98, 276);
-	gtk_signal_connect(GTK_OBJECT(drawing), "expose_event",
-			   (GtkSignalFunc)level_meters_expose_event, NULL);
-	gtk_signal_connect(GTK_OBJECT(drawing), "configure_event",
-			   (GtkSignalFunc)level_meters_configure_event, NULL);
-	gtk_widget_set_events(drawing, GDK_EXPOSURE_MASK);
-	gtk_widget_show(drawing);
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox);
+	gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0);
 
-	hbox1 = gtk_hbox_new(TRUE, 0);
-	gtk_widget_show(hbox1);
-	gtk_box_pack_start(GTK_BOX(vbox), hbox1, TRUE, FALSE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(hbox1), 6);
+	for(stream = (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + 1); \
+		stream <= input_channels + (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS); stream ++) {
+		if (mixer_stream_is_active(stream))
+			create_mixer_frame(hbox, stream);
+	}
+	for(stream = (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS + 1); \
+		stream <= spdif_channels + (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS); stream ++) {
+		if (mixer_stream_is_active(stream))
+			create_mixer_frame(hbox, stream);
+	}
+}
 
-	label = gtk_label_new("Left");
-	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
-	gtk_widget_show(label);
-	gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, TRUE, 0);
+static void create_pcms_mixer(GtkWidget *main, GtkWidget *notebook, int page)
+{
+        GtkWidget *hbox;
+        GtkWidget *vbox;
 
-	label = gtk_label_new("Right");
-	gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
-	gtk_widget_show(label);
-	gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, TRUE, 0);
+	GtkWidget *label;
+	GtkWidget *frame;
+	GtkWidget *drawing;
+	GtkWidget *scrolledwindow;
+	GtkWidget *viewport;
+	int stream;
 
+	hbox = gtk_hbox_new(FALSE, 3);
+	gtk_widget_show(hbox);
+	gtk_container_add(GTK_CONTAINER(notebook), hbox);
 
-	mixer_clear_peaks_button = gtk_button_new_with_label("Reset Peaks");
-	gtk_widget_show(mixer_clear_peaks_button);
-	gtk_box_pack_start(GTK_BOX(vbox), mixer_clear_peaks_button, TRUE, FALSE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(mixer_clear_peaks_button), 6);
-	gtk_signal_connect(GTK_OBJECT(mixer_clear_peaks_button), "clicked",
-			   GTK_SIGNAL_FUNC(level_meters_reset_peaks), NULL);
+        label = gtk_label_new("Monitor PCMs");
+        gtk_widget_show(label);
+	gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook),
+				   gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),page),
+				   label);
 
 	/* build scrolling area */
 	scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
@@ -380,16 +384,7 @@
 		if (mixer_stream_is_active(stream) && view_spdif_playback)
 			create_mixer_frame(hbox, stream);
 	}
-	for(stream = (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + 1); \
-		stream <= input_channels + (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS); stream ++) {
-		if (mixer_stream_is_active(stream))
-			create_mixer_frame(hbox, stream);
-	}
-	for(stream = (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS + 1); \
-		stream <= spdif_channels + (MAX_PCM_OUTPUT_CHANNELS + MAX_SPDIF_CHANNELS + MAX_INPUT_CHANNELS); stream ++) {
-		if (mixer_stream_is_active(stream))
-			create_mixer_frame(hbox, stream);
-	}
+
 }
 
 static void create_router_frame(GtkWidget *box, int stream, int pos)
@@ -452,7 +447,7 @@
 
 	frame = gtk_frame_new(str);
 	gtk_widget_show(frame);
-	gtk_box_pack_start (GTK_BOX(box), frame, FALSE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX(box), frame, FALSE, FALSE, 0);
 	gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
 
 
@@ -566,7 +561,7 @@
 
 	frame = gtk_frame_new("Master Clock");
 	gtk_widget_show(frame);
-	gtk_box_pack_start(GTK_BOX(box), frame, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(box), frame, FALSE, FALSE, 4);
 
 
 	vbox = gtk_vbox_new(FALSE, 0);
@@ -1232,7 +1227,7 @@
 
         frame = gtk_frame_new("Phono Input Switch");
         gtk_widget_show(frame);
-        gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0);
+        gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 7);
         gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
 
         vbox = gtk_vbox_new(FALSE, 0);
@@ -1275,8 +1270,8 @@
 
         frame = gtk_frame_new("Line In Selector");
         gtk_widget_show(frame);
-        gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 0);
-        gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
+        gtk_box_pack_start(GTK_BOX(box), frame, FALSE, TRUE, 4);
+        //gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
 
         vbox = gtk_vbox_new(FALSE, 0);
         gtk_widget_show(vbox);
@@ -1327,50 +1322,84 @@
 {
 	GtkWidget *label;
 	GtkWidget *hbox;
+	GtkWidget *hbox1;
+	GtkWidget *hbox2;
 	GtkWidget *vbox;
+	GtkWidget *vbox1;
 	GtkWidget *vbox2;
+	GtkWidget *scrolledwindow;
+	GtkWidget *viewport;
+	GtkWidget *hseparator;
 
 	hbox = gtk_hbox_new(FALSE, 0);
 	gtk_widget_show(hbox);
 	gtk_container_add(GTK_CONTAINER(notebook), hbox);
+
 	label = gtk_label_new("Hardware Settings");
 	gtk_widget_show(label);
 	gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook), 
 				   gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), 
 				   label);
 
+	/* Build scrolling area */
+	scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow);
+	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
+					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+
+	viewport = gtk_viewport_new(NULL, NULL);
+	gtk_widget_show(viewport);
+	gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport);
+
+	/* Outer box */
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox);
+	gtk_container_add(GTK_CONTAINER(viewport), hbox);
 
+	/* Create boxes for controls */
 	vbox = gtk_vbox_new(FALSE, 0);
 	gtk_widget_show(vbox);
-	gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, TRUE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
+	gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 6);
 
-	vbox2 = gtk_vbox_new(FALSE, 0);
-	gtk_widget_show(vbox2);
-	gtk_box_pack_end(GTK_BOX(hbox),vbox2, FALSE, FALSE, 0);
-	gtk_container_set_border_width(GTK_CONTAINER(vbox2), 6);
+	hbox1 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox1);
+	gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 0);
+
+	hseparator = gtk_hseparator_new();
+	gtk_widget_show(hseparator);
+	gtk_box_pack_start(GTK_BOX(vbox), hseparator, FALSE, FALSE, 2);
+
+	hbox2 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox2);
+	gtk_box_pack_start(GTK_BOX(vbox), hbox2, FALSE, FALSE, 0);
+
+	create_master_clock(hbox1);
 
-	create_master_clock(vbox);
-	create_rate_state(vbox);
-	create_actual_rate(vbox);
-	create_volume_change(vbox);
-
- 	create_spdif_output_settings(hbox); 
-
- 	create_spdif_input_select(vbox2);
-	create_input_interface(vbox2);
-	create_phono_input(vbox2);
+	vbox1 = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox1);
+	gtk_box_pack_start(GTK_BOX(hbox1), vbox1, FALSE, FALSE, 20);
+
+	create_rate_state(vbox1);
+	create_actual_rate(vbox1);
+	create_volume_change(vbox1);
+	create_input_interface(hbox2);
+	create_phono_input(hbox2);
+	create_spdif_input_select(hbox2);
+	create_spdif_output_settings(hbox);
 }
 
 static void create_about(GtkWidget *main, GtkWidget *notebook, int page)
 {
 	GtkWidget *label;
 	GtkWidget *vbox;
+	GtkWidget *hbox;
+	GtkWidget *scrolledwindow;
+	GtkWidget *viewport;
 
-	vbox = gtk_vbox_new(FALSE, 0);
-	gtk_widget_show(vbox);
-	gtk_container_add(GTK_CONTAINER(notebook), vbox);
-	gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox);
+	gtk_container_add(GTK_CONTAINER(notebook), hbox);
 
         label = gtk_label_new("About");
         gtk_widget_show(label);
@@ -1378,6 +1407,25 @@
 				   gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), 
 				   label);
 
+	/* build scrolling area */
+	scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow);
+	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
+					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+
+	viewport = gtk_viewport_new(NULL, NULL);
+	gtk_widget_show(viewport);
+	gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport);
+
+
+	vbox = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox);
+	gtk_container_add(GTK_CONTAINER(viewport), vbox);
+	gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
+
+
+	/* Create text as labels */
 	label = gtk_label_new("");
         gtk_widget_show(label);
 	gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 6);
@@ -1762,24 +1810,26 @@
 {
 	GtkWidget *label;
 	GtkWidget *label_card_nr;
-	GtkWidget *vbox;
 	GtkWidget *vbox1;
+	GtkWidget *vbox2;
+	GtkWidget *hbox;
 	GtkWidget *hbox1;
-	GtkWidget *hbox2;
 	GtkWidget *save_button;
 	GtkWidget *delete_button;
 	GtkObject *card_button_adj;
 	GtkWidget *card_button;
+	GtkWidget *scrolledwindow;
+	GtkWidget *viewport;
 	gint index;
 	gint profile_number;
 	gchar *profile_name;
 	gint max_profiles;
 	gint max_digits;
 
-	vbox = gtk_vbox_new(FALSE, 0);
-	gtk_widget_show(vbox);
-	gtk_container_add(GTK_CONTAINER(notebook), vbox);
-	gtk_container_set_border_width(GTK_CONTAINER(vbox), 6);
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox);
+	gtk_container_add(GTK_CONTAINER(notebook), hbox);
+
 
         label = gtk_label_new("Profiles");
         gtk_widget_show(label);
@@ -1787,56 +1837,73 @@
 				   gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page), 
 				   label);
 
+	/* build scrolling area */
+	scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow);
+	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
+					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+
+	viewport = gtk_viewport_new(NULL, NULL);
+	gtk_widget_show(viewport);
+	gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport);
+
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox);
+	gtk_container_add(GTK_CONTAINER(viewport), hbox);
+	gtk_container_set_border_width(GTK_CONTAINER(hbox), 0);
+
+
+	/* Create button boxes */
 	vbox1 = gtk_vbutton_box_new();
 
-	for (index = 0; index < MAX_PROFILES; index++)
-	{
+	gtk_vbutton_box_set_spacing_default(0);
+	for (index = 0; index < MAX_PROFILES; index++)	{
 		profile_name = get_profile_name(index + 1, card_number, profiles_file_name);
 		profiles_toggle_buttons[index].toggle_button = toggle_button_entry(window, profile_name, index);
-		gtk_box_pack_start(GTK_BOX (vbox1), profiles_toggle_buttons[index].toggle_button, FALSE, FALSE, 20);
+		gtk_box_pack_start(GTK_BOX (vbox1), profiles_toggle_buttons[index].toggle_button, FALSE, FALSE, 0);
 	}
-
 	gtk_widget_show(vbox1);
-	gtk_container_border_width(GTK_CONTAINER(vbox1), 20);
+	gtk_container_border_width(GTK_CONTAINER(vbox1), 6);
 
-	hbox1 = gtk_hbutton_box_new();
-	gtk_widget_show(hbox1);
-	gtk_container_border_width(GTK_CONTAINER(hbox1), 20);
+	vbox2 = gtk_vbutton_box_new();
+	gtk_widget_show(vbox2);
+	gtk_container_border_width(GTK_CONTAINER(vbox2), 50);
 
-	hbox2 = gtk_hbox_new(FALSE, 0);
-	gtk_widget_show(hbox2);
-	gtk_box_pack_start(GTK_BOX (hbox1), hbox2, FALSE, FALSE, 20);
+	hbox1 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox1);
+	gtk_box_pack_start(GTK_BOX(vbox2), hbox1, FALSE, FALSE, 20);
 
         label_card_nr = gtk_label_new("Card Number:");
         gtk_widget_show(label_card_nr);
-	gtk_box_pack_start(GTK_BOX (hbox2), label_card_nr, FALSE, FALSE, 20);
-	gtk_label_set_justify(GTK_LABEL (label_card_nr), GTK_JUSTIFY_LEFT);
+	gtk_box_pack_start(GTK_BOX(hbox1), label_card_nr, FALSE, FALSE, 20);
+	gtk_label_set_justify(GTK_LABEL(label_card_nr), GTK_JUSTIFY_LEFT);
 
 	card_button_adj = gtk_adjustment_new(16, 0, MAX_CARD_NUMBERS - 1, 1, 10, 10);
 	card_number_adj = card_button_adj;
 	card_button = gtk_spin_button_new(GTK_ADJUSTMENT (card_button_adj), 1, 0);
 	gtk_widget_show(card_button);
-	gtk_box_pack_start(GTK_BOX (hbox2), card_button, TRUE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX (hbox1), card_button, TRUE, FALSE, 0);
 	gtk_spin_button_set_numeric(GTK_SPIN_BUTTON (card_button), TRUE);
 	gtk_adjustment_set_value(GTK_ADJUSTMENT (card_button_adj), card_number);
 
 	delete_button = gtk_toggle_button_new_with_label("Delete card from profiles");
 	gtk_widget_show(delete_button);
-	gtk_box_pack_start(GTK_BOX (hbox1), delete_button, FALSE, FALSE, 20);
+	gtk_box_pack_start(GTK_BOX (vbox2), delete_button, FALSE, FALSE, 20);
 	gtk_signal_connect(GTK_OBJECT (delete_button), "toggled",
 			 GTK_SIGNAL_FUNC (delete_card_number),
 			 NULL);
 
 	save_button = gtk_toggle_button_new_with_label("Save active profile");
 	gtk_widget_show(save_button);
-	gtk_box_pack_end(GTK_BOX (hbox1), save_button, FALSE, FALSE, 20);
+	gtk_box_pack_end(GTK_BOX (vbox2), save_button, FALSE, FALSE, 20);
 	gtk_signal_connect(GTK_OBJECT (save_button), "toggled",
 			 GTK_SIGNAL_FUNC (save_active_profile),
 			 NULL);
 
-	gtk_container_add(GTK_CONTAINER (vbox), vbox1);
-	gtk_container_add(GTK_CONTAINER (vbox), hbox1);
-	gtk_widget_show(vbox);
+	gtk_container_add(GTK_CONTAINER(hbox), vbox1);
+	gtk_container_add(GTK_CONTAINER(hbox), vbox2);
+
 	if (default_profile != NULL)
 	{
 		/*
@@ -1865,9 +1932,102 @@
 	}
 }
 
+static void create_outer(GtkWidget *main)
+{
+        GtkWidget *hbox;
+        GtkWidget *hbox1;
+        GtkWidget *vbox;
+
+	GtkWidget *label;
+	GtkWidget *frame;
+	GtkWidget *drawing;
+
+	/* Create digital mixer frame */
+	vbox = gtk_vbox_new(FALSE, 1);
+	gtk_widget_show(vbox);
+	gtk_box_pack_start(GTK_BOX(main), vbox, FALSE, FALSE, 0);
+
+	label = gtk_label_new(" Rt-clk Menu >>");
+	//gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 3);
+	frame = gtk_frame_new("Digital Mixer");
+	gtk_widget_show(frame);
+	gtk_box_pack_start(GTK_BOX(vbox), frame, FALSE, TRUE, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(frame), 6);
+
+	/* Create controls in the digital mixer frame */
+
+	vbox = gtk_vbox_new(FALSE, 0);
+	gtk_widget_show(vbox);
+	gtk_container_add(GTK_CONTAINER(frame), vbox);	
+
+	hbox1 = gtk_hbox_new(FALSE, 0);
+	gtk_widget_show(hbox1);
+	gtk_box_pack_start(GTK_BOX(vbox), hbox1, FALSE, FALSE, 6);
+
+	drawing = gtk_drawing_area_new();
+	mixer_mix_drawing = drawing;
+	gtk_widget_set_name(drawing, "DigitalMixer");
+	gtk_box_pack_start(GTK_BOX(hbox1), drawing, TRUE, FALSE, 6);
+	if (tall_equal_mixer_ht > 1 ) {
+		gtk_widget_set_usize(drawing, 60, 264 + 60 * (tall_equal_mixer_ht - 1));
+	} else {
+		gtk_widget_set_usize(drawing, 60, 264);
+	}
+	gtk_signal_connect(GTK_OBJECT(drawing), "expose_event",
+			   (GtkSignalFunc)level_meters_expose_event, NULL);
+	gtk_signal_connect(GTK_OBJECT(drawing), "configure_event",
+			   (GtkSignalFunc)level_meters_configure_event, NULL);
+	gtk_widget_set_events(drawing, GDK_EXPOSURE_MASK);
+	gtk_widget_show(drawing);
+
+	hbox1 = gtk_hbox_new(TRUE, 0);
+	gtk_widget_show(hbox1);
+	gtk_box_pack_start(GTK_BOX(vbox), hbox1, TRUE, FALSE, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(hbox1), 6);
+
+	label = gtk_label_new("Left");
+	gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, TRUE, 0);
+
+	label = gtk_label_new("Right");
+	gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, TRUE, 0);
+
+
+	mixer_clear_peaks_button = gtk_button_new_with_label("Reset Peaks");
+	gtk_widget_show(mixer_clear_peaks_button);
+	gtk_box_pack_start(GTK_BOX(vbox), mixer_clear_peaks_button, TRUE, FALSE, 0);
+	gtk_container_set_border_width(GTK_CONTAINER(mixer_clear_peaks_button), 4);
+	gtk_signal_connect(GTK_OBJECT(mixer_clear_peaks_button), "clicked",
+			   GTK_SIGNAL_FUNC(level_meters_reset_peaks), NULL);
+}/* End create_outer  */
+
+static void create_blank(GtkWidget *main, GtkWidget *notebook, int page)
+{
+/*	This is a little workaround for a problem with the pop-up menu.
+	For some reason the label of the last page is not accessed by the menu
+	so all it shows is 'page 7'.  Here a blank extra page is created, unseen,
+	which seems to satisfy gtk, and we see the menu last page label correct. AH 12.7.2005 */
+
+	GtkWidget *label;
+	GtkWidget *hbox;
+
+	hbox = gtk_hbox_new(FALSE, 0);
+	gtk_container_add(GTK_CONTAINER(notebook), hbox);
+
+        label = gtk_label_new("Blank");
+	gtk_notebook_set_tab_label(GTK_NOTEBOOK(notebook),
+				   gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook), page),
+				   label);
+}
+
 static void usage(void)
 {
-	fprintf(stderr, "usage: envy24control [-c card#] [-D control-name] [-o num-outputs] [-i num-inputs] [-p num-pcm-outputs] [-s num-spdif-in/outs] [-v] [-f profiles-file] [profile name|profile id] [-m channel-num]\n");
+	fprintf(stderr, "usage: envy24control [-c card#] [-D control-name] [-o num-outputs] [-i num-inputs] [-p num-pcm-outputs] [-s num-spdif-in/outs] [-v] [-f profiles-file] [profile name|profile id] [-m channel-num] [-w initial-window-width] [-t height-num]\n");
 	fprintf(stderr, "\t-c, --card\tAlsa card number to control\n");
 	fprintf(stderr, "\t-D, --device\tcontrol-name\n");
 	fprintf(stderr, "\t-o, --outputs\tLimit number of analog line outputs to display\n");
@@ -1877,11 +2037,14 @@
 	fprintf(stderr, "\t-v, --view_spdif_playback\tshows the spdif playback channels in the mixer\n");
 	fprintf(stderr, "\t-f, --profiles_file\tuse file as profiles file\n");
 	fprintf(stderr, "\t-m, --midichannel\tmidi channel number for controller control\n");
+	fprintf(stderr, "\t-w, --window_width\tSet initial window width (try 2,6 or 8; 280,626, or 968)\n");
+	fprintf(stderr, "\t-t, --tall_eq_mixer_heights\tSet taller height mixer displays (1-9)\n");
 }
 
 int main(int argc, char **argv)
 {
         GtkWidget *notebook;
+	GtkWidget *outerbox;
         char *name, tmpname[8], title[128];
 	int i, c, err;
 	snd_ctl_card_info_t *hw_info;
@@ -1893,6 +2056,12 @@
 	int input_channels_set = 0;
 	int output_channels_set = 0;
 	int pcm_output_channels_set = 0;
+	int width_val;
+	int wwidth_set =FALSE;
+	int wwidth = 796;
+	const chanwidth = 86;
+	const fixwidth = 108;
+
 	static struct option long_options[] = {
 		{"device", 1, 0, 'D'},
 		{"card", 1, 0, 'c'},
@@ -1903,7 +2072,9 @@
 		{"outputs", 1, 0, 'o'},
 		{"pcm_outputs", 1, 0, 'p'},
 		{"spdif", 1, 0, 's'},
+		{"window_width", 1, 0, 'w'},
 		{"view_spdif_playback", 0, 0, 'v'},
+		{"tall_eq_mixer_heights", 1, 0, 't'},
 		{ NULL }
 	};
 
@@ -1923,7 +2094,7 @@
 	view_spdif_playback = 0;
 	profiles_file_name = DEFAULT_PROFILERC;
 	default_profile = NULL;
-	while ((c = getopt_long(argc, argv, "D:c:f:i:m:Mo:p:s:v", long_options, NULL)) != -1) {
+	while ((c = getopt_long(argc, argv, "D:c:f:i:m:Mo:p:s:w:vt:", long_options, NULL)) != -1) {
 		switch (c) {
 		case 'D':
 			name = optarg;
@@ -1986,9 +2157,23 @@
 				exit(1);
 			}
 			break;
+		case 'w':
+			width_val = atoi(optarg);
+			if ((width_val >= 1) && (width_val <= 20)) {
+				wwidth = (width_val * chanwidth + fixwidth);
+			} else {
+				wwidth = width_val;
+			}
+			wwidth_set = TRUE;
+			break;
 		case 'v':
 			view_spdif_playback = 1;
 			break;
+		case 't':
+			tall_equal_mixer_ht = atoi(optarg);
+			if ((tall_equal_mixer_ht < 0) || (tall_equal_mixer_ht >= 10))
+				tall_equal_mixer_ht = 0;
+			break;
 		default:
 			usage();
 			exit(1);
@@ -2047,23 +2232,22 @@
 		card_is_dmx6fire = TRUE;
 
 	/* Set a better default for input_channels and output_channels */
-	if(!input_channels_set) {
-		if(card_is_dmx6fire) {
+	if(!input_channels_set)
+		if(card_is_dmx6fire)
 			input_channels = 6;
-		}
-	}
 
-	if(!output_channels_set) {
-		if(card_is_dmx6fire) {
+	if(!output_channels_set)
+		if(card_is_dmx6fire)
 			output_channels = 6;
-		}
-	}
 
-	if(!pcm_output_channels_set) {
-		if(card_is_dmx6fire) {
+	if(!pcm_output_channels_set)
+		if(card_is_dmx6fire)
 			pcm_output_channels = 6; /* PCMs 7&8 can be used -set using option -p8 */
-		}
-	}
+
+	if (!wwidth_set)
+		if (card_is_dmx6fire)
+			wwidth = 626;
+
 
 	/* Initialize code */
 	config_open();
@@ -2088,20 +2272,32 @@
                            (GtkSignalFunc) gtk_main_quit, NULL);
         signal(SIGINT, (void *)gtk_main_quit);
 
+	gtk_window_set_default_size(GTK_WINDOW(window), wwidth, 300);
+
+	outerbox = gtk_hbox_new(FALSE, 3);
+	gtk_widget_show(outerbox);
+	gtk_container_add(GTK_CONTAINER(window), outerbox);
+
+	create_outer(outerbox);
+
         /* Create the notebook */
         notebook = gtk_notebook_new();
+	gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook), TRUE);
+	gtk_notebook_popup_enable(GTK_NOTEBOOK(notebook));
         gtk_widget_show(notebook);
-	gtk_container_add(GTK_CONTAINER(window), notebook);
+	gtk_container_add(GTK_CONTAINER(outerbox), notebook);
 
 	page = 0;
-	create_mixer(window, notebook, page++);
 
-	create_router(window, notebook, page++);
-	create_hardware(window, notebook, page++);
+	create_inputs_mixer(outerbox, notebook, page++);
+	create_pcms_mixer(outerbox, notebook, page++);
+	create_router(outerbox, notebook, page++);
+	create_hardware(outerbox, notebook, page++);
 	if (envy_analog_volume_available())
-		create_analog_volume(window, notebook, page++);
-	create_profiles(window, notebook, page++);
-	create_about(window, notebook, page++);
+		create_analog_volume(outerbox, notebook, page++);
+	create_profiles(outerbox, notebook, page++);
+	create_about(outerbox, notebook, page++);
+	create_blank(outerbox, notebook, page++);
 
 	npfds = snd_ctl_poll_descriptors_count(ctl);
 	if (npfds > 0) {
levelmeters.c +34 -34

91 lines not on this page · raw message

#1 lore raw

Hi,

thanks for the patch. Just a few nitpicks...

At Fri, 16 Dec 2005 23:15:43 +0000,

envy24control.c line 157

Quoted 3 lines · Alan Horstmann
envy24control.c +1 -1
-		sprintf(str, "S/PDIF Out %s", stream & 1 ? "L": "R");
+		sprintf(str, "SPDIF Out %s", stream & 1 ? "L": "R");

I thought "S/PDIF" is the correct word...

envy24control.c line 311

Quoted 6 lines
envy24control.c +6 -0
+	/* build scrolling area */
+	scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow);
+	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
+					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);

Wouldn't GTK_POLICY_AUTOMATIC be better?
Some boards have only 2 or 4 channels.

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#2 lore raw

At Thu, 22 Dec 2005 17:03:55 +0100,

Quoted 26 lines · I wrote:

Hi,

thanks for the patch. Just a few nitpicks...

At Fri, 16 Dec 2005 23:15:43 +0000,

envy24control.c line 157

Quoted 3 lines · Alan Horstmann
envy24control.c +1 -1
-		sprintf(str, "S/PDIF Out %s", stream & 1 ? "L": "R");
+		sprintf(str, "SPDIF Out %s", stream & 1 ? "L": "R");

I thought "S/PDIF" is the correct word...

envy24control.c line 311

Quoted 6 lines
envy24control.c +6 -0
+	/* build scrolling area */
+	scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow);
+	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
+					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);

Wouldn't GTK_POLICY_AUTOMATIC be better?
Some boards have only 2 or 4 channels.

Quoted 1 line

Takashi

Also, I got many compile warnings after your patch. Could you fix them, too?

I cannot judge the new appearance since currently I have no envy24 board here. Hence I'd like to hear from someone else whether it's OK before committing to CVS.

Can anyone test this patch please?

thanks,

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#3 lore raw
Quoted 1 line

Can anyone test this patch please?

I tried it and can confirm that it works. I also like the improved GUI layout which saved screenspace and has a cleaner arrangement of some widgets.

Signature · 10 lines
---> Dirk Jagdmann ^ doj / cubic
----> http://cubic.org/~doj
-----> http://llg.cubic.org


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
#4 lore raw
Quoted 5 lines · you
Quoted 1 line

Can anyone test this patch please?

I tried it and can confirm that it works. I also like the improved GUI layout which saved screenspace and has a cleaner arrangement of some widgets.

Do you get any compiler warnings like Takashi?

Alan

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#5 lore raw
In reply to Takashi Iwai
Quoted 15 lines · you

At Thu, 22 Dec 2005 17:03:55 +0100,

Quoted 12 lines · I wrote:

Hi,

thanks for the patch. Just a few nitpicks...

At Fri, 16 Dec 2005 23:15:43 +0000,

envy24control.c line 157

Quoted 2 lines · Alan Horstmann
envy24control.c +1 -1
-		sprintf(str, "S/PDIF Out %s", stream & 1 ? "L": "R");
+		sprintf(str, "SPDIF Out %s", stream & 1 ? "L": "R");

I thought "S/PDIF" is the correct word...

The change here is to shorten the label by one character, just enough to prevent those 2 meters being wider than the others, which is noticable when using eg a 2-channel wide window and scrolling along the meters. (I have narrowed the meters.) I think the meaning is unambiguous without the '/', although I accept it is a compromise.

Quoted 9 lines
Quoted 9 lines

envy24control.c line 311

Quoted 6 lines
envy24control.c +6 -0
+	/* build scrolling area */
+	scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow);
+	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
+					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);

Wouldn't GTK_POLICY_AUTOMATIC be better?
Some boards have only 2 or 4 channels.

That section is simply a copy of what exists at present in envy24control.c in 3 places. I notice from the bug-track that 0001664 'GTK2-patch for envy24control' includes just this change to the existing scroll-windows; will this be applied? I think it might be preferable to fix all the occurances as appropriate with a separate patch afterwards?

Quoted 2 lines

Also, I got many compile warnings after your patch. Could you fix them, too?

I have no warnings at all (otherwise the patch would not have been submitted). Can you list them and I will have a go.

Alan

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#6 lore raw

At Fri, 23 Dec 2005 17:50:22 +0000,

Quoted 18 lines · Alan Horstmann
Quoted 15 lines · you

At Thu, 22 Dec 2005 17:03:55 +0100,

Quoted 12 lines · I wrote:

Hi,

thanks for the patch. Just a few nitpicks...

At Fri, 16 Dec 2005 23:15:43 +0000,

envy24control.c line 157

Quoted 2 lines · Alan Horstmann
envy24control.c +1 -1
-		sprintf(str, "S/PDIF Out %s", stream & 1 ? "L": "R");
+		sprintf(str, "SPDIF Out %s", stream & 1 ? "L": "R");

I thought "S/PDIF" is the correct word...

Quoted 5 lines

The change here is to shorten the label by one character, just enough to prevent those 2 meters being wider than the others, which is noticable when using eg a 2-channel wide window and scrolling along the meters. (I have narrowed the meters.) I think the meaning is unambiguous without the '/', although I accept it is a compromise.

OK, then it's fine.

Quoted 10 lines
Quoted 9 lines
Quoted 9 lines

envy24control.c line 311

Quoted 6 lines
envy24control.c +6 -0
+	/* build scrolling area */
+	scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
+	gtk_widget_show(scrolledwindow);
+	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
+	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
+					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);

Wouldn't GTK_POLICY_AUTOMATIC be better?
Some boards have only 2 or 4 channels.

Quoted 5 lines

That section is simply a copy of what exists at present in envy24control.c in 3 places. I notice from the bug-track that 0001664 'GTK2-patch for envy24control' includes just this change to the existing scroll-windows; will this be applied? I think it might be preferable to fix all the occurances as appropriate with a separate patch afterwards?

I see. Let's fix all togher.

Quoted 5 lines
Quoted 2 lines

Also, I got many compile warnings after your patch. Could you fix them, too?

I have no warnings at all (otherwise the patch would not have been submitted). Can you list them and I will have a go.

I got the following from gcc-4.0.2 (prerelease).

envy24control.c: In function 'create_inputs_mixer':
envy24control.c:290: warning: unused variable 'drawing' envy24control.c:289: warning: unused variable 'frame' envy24control.c: In function 'create_pcms_mixer':
envy24control.c:344: warning: unused variable 'drawing' envy24control.c:343: warning: unused variable 'frame' envy24control.c: In function 'create_hardware':
envy24control.c:1329: warning: unused variable 'vbox2' envy24control.c: In function 'create_outer':
envy24control.c:1937: warning: unused variable 'hbox' envy24control.c: In function 'main':
envy24control.c:2063: warning: type defaults to 'int' in declaration of 'chanwidth'
envy24control.c:2064: warning: type defaults to 'int' in declaration of 'fixwidth'

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#7 lore raw

At Mon, 02 Jan 2006 13:17:53 +0100,

Quoted 9 lines · I wrote:
Quoted 6 lines
Quoted 3 lines

Also, I got many compile warnings after your patch. Could you fix them, too?

I have no warnings at all (otherwise the patch would not have been submitted). Can you list them and I will have a go.

I got the following from gcc-4.0.2 (prerelease).

Quoted 15 lines

envy24control.c: In function 'create_inputs_mixer':
envy24control.c:290: warning: unused variable 'drawing' envy24control.c:289: warning: unused variable 'frame' envy24control.c: In function 'create_pcms_mixer':
envy24control.c:344: warning: unused variable 'drawing' envy24control.c:343: warning: unused variable 'frame' envy24control.c: In function 'create_hardware':
envy24control.c:1329: warning: unused variable 'vbox2' envy24control.c: In function 'create_outer':
envy24control.c:1937: warning: unused variable 'hbox' envy24control.c: In function 'main':
envy24control.c:2063: warning: type defaults to 'int' in declaration of 'chanwidth'
envy24control.c:2064: warning: type defaults to 'int' in declaration of 'fixwidth'

OK, I fixed them by myself. Now your patch is on CVS. Thanks.

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#8 lore raw
Quoted 21 lines · you

At Mon, 02 Jan 2006 13:17:53 +0100,

Quoted 18 lines · I wrote:
Quoted 5 lines
Quoted 2 lines

Also, I got many compile warnings after your patch. Could you fix them, too?

I have no warnings at all (otherwise the patch would not have been submitted). Can you list them and I will have a go.

I got the following from gcc-4.0.2 (prerelease).

envy24control.c: In function 'create_inputs_mixer':
envy24control.c:290: warning: unused variable 'drawing' envy24control.c:289: warning: unused variable 'frame' envy24control.c: In function 'create_pcms_mixer':
envy24control.c:344: warning: unused variable 'drawing' envy24control.c:343: warning: unused variable 'frame' envy24control.c: In function 'create_hardware':
envy24control.c:1329: warning: unused variable 'vbox2' envy24control.c: In function 'create_outer':
envy24control.c:1937: warning: unused variable 'hbox'

ConfirmI have checked -all are unneccessary definitions left as a result of moving sections of code. Presumably these have been deleted.

Quoted 5 lines
Quoted 5 lines

envy24control.c: In function 'main':
envy24control.c:2063: warning: type defaults to 'int' in declaration of 'chanwidth'
envy24control.c:2064: warning: type defaults to 'int' in declaration of 'fixwidth'

Is 'const' not accepted? The intention is to ensure the value cannot be changed during program execution.

Quoted 5 lines

OK, I fixed them by myself. Now your patch is on CVS. Thanks.

Takashi

Thanks to you also.
Will this result in envy24control version number being raised? It has been at 0.5.0 since at least alsa1.0.8?

Alan

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#9 lore raw

At Tue, 3 Jan 2006 22:06:40 +0000,

Quoted 4 lines · Alan Horstmann
Quoted 2 lines · you

At Mon, 02 Jan 2006 13:17:53 +0100,

Quoted 8 lines
Quoted 5 lines
Quoted 5 lines

envy24control.c: In function 'main':
envy24control.c:2063: warning: type defaults to 'int' in declaration of 'chanwidth'
envy24control.c:2064: warning: type defaults to 'int' in declaration of 'fixwidth'

Is 'const' not accepted? The intention is to ensure the value cannot be changed during program execution.

It's simply a missing "int" word.

Quoted 9 lines
Quoted 5 lines

OK, I fixed them by myself. Now your patch is on CVS. Thanks.

Takashi

Thanks to you also.
Will this result in envy24control version number being raised? It has been at 0.5.0 since at least alsa1.0.8?

That makes sense.

Could you create a patch together with replacements of GTK_POLICY_AUTOMATIC?

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#10 lore raw
Quoted 11 lines · you
Quoted 3 lines

Thanks to you also.
Will this result in envy24control version number being raised? It has been at 0.5.0 since at least alsa1.0.8?

That makes sense.

Could you create a patch together with replacements of GTK_POLICY_AUTOMATIC?

Takashi

What should new envy24control version be - '0.5.2' or '0.6.0', or something else?
GTK_POLICY_AUTOMATIC part is ready to post.

Alan

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

#11 lore raw
Quoted 11 lines · On Friday 06 January 2006 10:01, I wrote:
Quoted 10 lines · you
Quoted 3 lines

Thanks to you also.
Will this result in envy24control version number being raised? It has been at 0.5.0 since at least alsa1.0.8?

That makes sense.

Could you create a patch together with replacements of GTK_POLICY_AUTOMATIC?

Quoted 5 lines
Quoted 1 line

Takashi

What should new envy24control version be - '0.5.2' or '0.6.0', or something else?
GTK_POLICY_AUTOMATIC part is ready to post.

Later I thought I may as well send this patch, as you can change it to whatever version number is prefered -I've done 0.6.0. The part in configure is presumably not essential since it is re-generated from configure.in?

Really wouldn't it be better to have the version just set in one place? Ideally, I would have thought, at every stable alsa release the minor version number would increase if there have been changes to that program, so a user can tell if he is compiling a different binary?

Alan

Summary: Change scroll policy in envy24control

Change gtk scroll policy for the main notebook pages in envy24control from ALWAYS to AUTOMATIC; also raise envy24control version.

configure +1 -1
diff -ru Denvy24control/configure Aenvy24control/configure
@@ -1509,7 +1509,7 @@
 
 # Define the identity of the package.
  PACKAGE=envy24control
- VERSION=0.5.0
+ VERSION=0.6.0
 
 
 cat >>confdefs.h <<_ACEOF
configure.in +1 -1
diff -ru Denvy24control/configure.in Aenvy24control/configure.in
@@ -1,5 +1,5 @@
 AC_INIT(envy24control.c)
-AM_INIT_AUTOMAKE(envy24control, 0.5.0)
+AM_INIT_AUTOMAKE(envy24control, 0.6.0)
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_HEADER_STDC
configure.in-gtk2 +1 -1
diff -ru Denvy24control/configure.in-gtk2 Aenvy24control/configure.in-gtk2
@@ -1,5 +1,5 @@
 AC_INIT(envy24control.c)
-AM_INIT_AUTOMAKE(envy24control, 0.5.0)
+AM_INIT_AUTOMAKE(envy24control, 0.6.0)
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_HEADER_STDC
envy24control.c +7 -7
diff -ru Denvy24control/envy24control.c Aenvy24control/envy24control.c
@@ -308,7 +303,7 @@
 	gtk_widget_show(scrolledwindow);
 	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
-					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+					GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
 
 	viewport = gtk_viewport_new(NULL, NULL);
 	gtk_widget_show(viewport);
@@ -361,7 +356,7 @@
 	gtk_widget_show(scrolledwindow);
 	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), 
-					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+					GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
 
 	viewport = gtk_viewport_new(NULL, NULL);
 	gtk_widget_show(viewport);
@@ -524,7 +519,7 @@
 	gtk_widget_show(scrolledwindow);
 	gtk_container_add(GTK_CONTAINER(notebook), scrolledwindow);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), 
-				       GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+				       GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
 
         label = gtk_label_new("Patchbay / Router");
         gtk_widget_show(label);
@@ -1346,7 +1341,7 @@
 	gtk_widget_show(scrolledwindow);
 	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
-					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+					GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
 
 	viewport = gtk_viewport_new(NULL, NULL);
 	gtk_widget_show(viewport);
@@ -1412,7 +1407,7 @@
 	gtk_widget_show(scrolledwindow);
 	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
-					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+					GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
 
 	viewport = gtk_viewport_new(NULL, NULL);
 	gtk_widget_show(viewport);
@@ -1493,7 +1488,7 @@
 				   label);
 
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow), 
-				       GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+				       GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
 	viewport = gtk_viewport_new(NULL, NULL);
 	gtk_widget_show(viewport);
 	gtk_container_add(GTK_CONTAINER(scrolledwindow), viewport);
@@ -1842,7 +1837,7 @@
 	gtk_widget_show(scrolledwindow);
 	gtk_box_pack_start(GTK_BOX(hbox), scrolledwindow, TRUE, TRUE, 0);
 	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
-					GTK_POLICY_ALWAYS, GTK_POLICY_NEVER);
+					GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
 
 	viewport = gtk_viewport_new(NULL, NULL);
 	gtk_widget_show(viewport);
Applied
#12 lore raw

At Sat, 7 Jan 2006 00:51:58 +0000,

Quoted 16 lines · Alan Horstmann

[1 <text/plain; iso-8859-1 (7bit)>]

Quoted 13 lines · On Friday 06 January 2006 10:01, I wrote:
Quoted 11 lines · you
Quoted 3 lines

Thanks to you also.
Will this result in envy24control version number being raised? It has been at 0.5.0 since at least alsa1.0.8?

That makes sense.

Could you create a patch together with replacements of GTK_POLICY_AUTOMATIC?

Takashi

Quoted 7 lines
Quoted 3 lines

What should new envy24control version be - '0.5.2' or '0.6.0', or something else?
GTK_POLICY_AUTOMATIC part is ready to post.

Later I thought I may as well send this patch, as you can change it to whatever version number is prefered -I've done 0.6.0. The part in configure is presumably not essential since it is re-generated from configure.in?

Right. Only configure*.in are needed. (configure will be ignored anyway if you use "cvs diff".)

Quoted 4 lines

Really wouldn't it be better to have the version just set in one place? Ideally, I would have thought, at every stable alsa release the minor version number would increase if there have been changes to that program, so a user can tell if he is compiling a different binary?

Well, currently alsa-tools tree has individual configure in each subdirectory, and I think it's easier to keep it so.

Quoted 8 lines

Alan

Summary: Change scroll policy in envy24control

Change gtk scroll policy for the main notebook pages in envy24control from ALWAYS to AUTOMATIC; also raise envy24control version.

Applied. Thanks!

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click