Mercurial > audlegacy
annotate Plugins/Output/jack/configure.c @ 972:7897fba5a46e trunk
[svn] - don't use dct9 in integer mode
author | nenolod |
---|---|
date | Wed, 26 Apr 2006 11:38:41 -0700 |
parents | ea321d1dae48 |
children | 57b57595b404 |
rev | line source |
---|---|
325
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
1 /* xmms - jack output plugin |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
2 * Copyright (C) 2004 Chris Morgan |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
3 * |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
4 * |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
5 * audacious port (2005) by Giacomo Lozito from develia.org |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
6 * |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
10 * (at your option) any later version. |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
11 * |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
15 * GNU General Public License for more details. |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
16 * |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
18 * along with this program; if not, write to the Free Software |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
20 * |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
21 * Contains code Copyright (C) 1998-2000 Mikael Alm, Olle Hallnas, |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
22 * Thomas Nillson, 4Front Technologies and Galex Yen |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
23 */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
24 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
25 #include "jack.h" |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
26 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
27 #include "libaudacious/configfile.h" |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
28 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
29 #include <gtk/gtk.h> |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
30 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
31 extern jackconfig jack_cfg; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
32 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
33 static GtkWidget *configure_win = NULL, *vbox; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
34 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
35 static GtkWidget *GTK_isTraceEnabled; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
36 static GtkWidget *bbox, *ok, *cancel; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
37 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
38 static GtkWidget *option_frame; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
39 static GtkWidget *port_connection_mode_box; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
40 static GtkWidget *port_connection_mode_combo; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
41 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
42 #define GET_CHARS(edit) gtk_editable_get_chars(GTK_EDITABLE(edit), 0, -1) |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
43 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
44 static void configure_win_ok_cb(GtkWidget * w, gpointer data) |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
45 { |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
46 ConfigFile *cfgfile; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
47 gchar *filename; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
48 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
49 jack_cfg.isTraceEnabled = (gint) GTK_CHECK_BUTTON(GTK_isTraceEnabled)->toggle_button.active; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
50 jack_cfg.port_connection_mode = GET_CHARS(GTK_COMBO(port_connection_mode_combo)->entry); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
51 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
52 jack_set_port_connection_mode(); /* update the connection mode */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
53 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
54 filename = g_strconcat(g_get_home_dir(), "/.audacious/config", NULL); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
55 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
56 cfgfile = xmms_cfg_open_file(filename); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
57 if (!cfgfile) |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
58 cfgfile = xmms_cfg_new(); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
59 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
60 xmms_cfg_write_boolean(cfgfile, "jack", "isTraceEnabled", jack_cfg.isTraceEnabled); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
61 xmms_cfg_write_string(cfgfile, "jack", "port_connection_mode", jack_cfg.port_connection_mode); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
62 xmms_cfg_write_file(cfgfile, filename); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
63 xmms_cfg_free(cfgfile); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
64 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
65 g_free(filename); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
66 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
67 gtk_widget_destroy(configure_win); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
68 } |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
69 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
70 static void get_port_connection_modes(GtkCombo *combo) |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
71 { |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
72 GtkWidget *item; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
73 char *descr; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
74 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
75 descr = g_strdup("Connect to all available jack ports"); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
76 item = gtk_list_item_new_with_label(descr); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
77 gtk_widget_show(item); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
78 g_free(descr); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
79 gtk_combo_set_item_string(combo, GTK_ITEM(item), "CONNECT_ALL"); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
80 gtk_container_add(GTK_CONTAINER(combo->list), item); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
81 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
82 descr = g_strdup("Connect only the output ports"); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
83 item = gtk_list_item_new_with_label(descr); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
84 gtk_widget_show(item); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
85 g_free(descr); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
86 gtk_combo_set_item_string(combo, GTK_ITEM(item), "CONNECT_OUTPUT"); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
87 gtk_container_add(GTK_CONTAINER(combo->list), item); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
88 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
89 descr = g_strdup("Connect to no ports"); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
90 item = gtk_list_item_new_with_label(descr); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
91 gtk_widget_show(item); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
92 g_free(descr); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
93 gtk_combo_set_item_string(combo, GTK_ITEM(item), "CONNECT_NONE"); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
94 gtk_container_add(GTK_CONTAINER(combo->list), item); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
95 } |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
96 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
97 void jack_configure(void) |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
98 { |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
99 if (!configure_win) |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
100 { |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
101 configure_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
102 gtk_window_set_type_hint ( GTK_WINDOW(configure_win), GDK_WINDOW_TYPE_HINT_DIALOG); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
103 gtk_signal_connect(GTK_OBJECT(configure_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &configure_win); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
104 gtk_window_set_title(GTK_WINDOW(configure_win), ("jack Plugin configuration")); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
105 gtk_window_set_policy(GTK_WINDOW(configure_win), FALSE, FALSE, FALSE); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
106 gtk_window_set_position(GTK_WINDOW(configure_win), GTK_WIN_POS_MOUSE); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
107 gtk_container_border_width(GTK_CONTAINER(configure_win), 10); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
108 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
109 vbox = gtk_vbox_new(FALSE, 10); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
110 gtk_container_add(GTK_CONTAINER(configure_win), vbox); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
111 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
112 /* add a frame for other xmms-jack options */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
113 option_frame = gtk_frame_new("Options:"); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
114 gtk_box_pack_start(GTK_BOX(vbox), option_frame, FALSE, FALSE, 0); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
115 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
116 /* add a hbox that will contain a label for a dropdown and the dropdown itself */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
117 port_connection_mode_box = gtk_hbox_new(FALSE, 5); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
118 gtk_container_set_border_width(GTK_CONTAINER(port_connection_mode_box), 5); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
119 gtk_container_add(GTK_CONTAINER(option_frame), port_connection_mode_box); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
120 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
121 /* add the label */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
122 gtk_box_pack_start(GTK_BOX(port_connection_mode_box), gtk_label_new("Connection mode:"), |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
123 FALSE, FALSE, 0); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
124 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
125 /* add the dropdown */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
126 port_connection_mode_combo = gtk_combo_new(); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
127 get_port_connection_modes(GTK_COMBO(port_connection_mode_combo)); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
128 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(port_connection_mode_combo)->entry), |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
129 jack_cfg.port_connection_mode); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
130 gtk_box_pack_start(GTK_BOX(port_connection_mode_box), port_connection_mode_combo, |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
131 TRUE, TRUE, 0); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
132 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
133 /* create a check_button for debug output */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
134 GTK_isTraceEnabled = gtk_check_button_new_with_label("Enable debug printing"); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
135 gtk_box_pack_start(GTK_BOX(vbox), GTK_isTraceEnabled, FALSE, FALSE, 0); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
136 gtk_widget_show(GTK_isTraceEnabled); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
137 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
138 /* set the state of the check_button based upon the value of */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
139 /* isTracingEnabled */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
140 GTK_CHECK_BUTTON(GTK_isTraceEnabled)->toggle_button.active = jack_cfg.isTraceEnabled; |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
141 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
142 /* add the box for the ok/canceled buttons at the bottom */ |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
143 bbox = gtk_hbox_new(FALSE, 10); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
144 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
145 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
146 ok = gtk_button_new_with_label(("Ok")); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
147 gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(configure_win_ok_cb), NULL); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
148 GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
149 gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
150 gtk_widget_show(ok); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
151 gtk_widget_grab_default(ok); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
152 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
153 cancel = gtk_button_new_with_label(("Cancel")); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
154 gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(configure_win)); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
155 GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
156 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
157 gtk_widget_show(cancel); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
158 |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
159 gtk_widget_show_all(configure_win); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
160 } |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
161 else |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
162 gdk_window_raise(configure_win->window); |
ea321d1dae48
[svn] JACKd output plugin via external contractor james@develia.org.
nenolod
parents:
diff
changeset
|
163 } |