Mercurial > audlegacy-plugins
annotate src/jack/configure.c @ 2498:194c2f8c2a92
Include cleanups, part #3.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 31 Mar 2008 15:11:29 +0300 |
parents | e5401b6c4665 |
children | 41c619e96a17 |
rev | line source |
---|---|
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
1 /* xmms - jack output plugin |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
2 * Copyright (C) 2004 Chris Morgan |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
3 * |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
4 * |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
5 * audacious port (2005) by Giacomo Lozito from develia.org |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
6 * |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
10 * (at your option) any later version. |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
11 * |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
15 * GNU General Public License for more details. |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
16 * |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
18 * along with this program; if not, write to the Free Software |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
20 * |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
21 * Contains code Copyright (C) 1998-2000 Mikael Alm, Olle Hallnas, |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
22 * Thomas Nillson, 4Front Technologies and Galex Yen |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
23 */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
24 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
25 #include "jack.h" |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
26 |
1975
00394f91e3c6
Updated plugins depending on old configdb to #include <audacious/plugin.h> so that bmp_cfg_db_* functions are still defined.
Ben Tucker <ben.tucker@gmail.com>
parents:
1950
diff
changeset
|
27 #include <audacious/plugin.h> |
1950
2ebeb7816c5e
Change from "" to <>-style includes. With thanks to ccr for the correct sed voodoo.
chainsaw@localhost
parents:
1369
diff
changeset
|
28 #include <audacious/configdb.h> |
1369
6d87598ff8a9
Internationalization... (The first step of the "i18n" project could be ready for Audacious 1.4 release)
Stany HENRY <StrassBoy@gmail.com>
parents:
12
diff
changeset
|
29 #include <audacious/i18n.h> |
6d87598ff8a9
Internationalization... (The first step of the "i18n" project could be ready for Audacious 1.4 release)
Stany HENRY <StrassBoy@gmail.com>
parents:
12
diff
changeset
|
30 # include "config.h" |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
31 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
32 #include <gtk/gtk.h> |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
33 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
34 extern jackconfig jack_cfg; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
35 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
36 static GtkWidget *configure_win = NULL, *vbox; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
37 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
38 static GtkWidget *GTK_isTraceEnabled; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
39 static GtkWidget *bbox, *ok, *cancel; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
40 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
41 static GtkWidget *option_frame; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
42 static GtkWidget *port_connection_mode_box; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
43 static GtkWidget *port_connection_mode_combo; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
44 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
45 #define GET_CHARS(edit) gtk_editable_get_chars(GTK_EDITABLE(edit), 0, -1) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
46 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
47 static void configure_win_ok_cb(GtkWidget * w, gpointer data) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
48 { |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
49 ConfigDb *cfgfile; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
50 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
51 jack_cfg.isTraceEnabled = (gint) GTK_CHECK_BUTTON(GTK_isTraceEnabled)->toggle_button.active; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
52 jack_cfg.port_connection_mode = GET_CHARS(GTK_COMBO(port_connection_mode_combo)->entry); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
53 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
54 jack_set_port_connection_mode(); /* update the connection mode */ |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
55 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
56 cfgfile = aud_cfg_db_open(); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
57 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
58 aud_cfg_db_set_bool(cfgfile, "jack", "isTraceEnabled", jack_cfg.isTraceEnabled); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
59 aud_cfg_db_set_string(cfgfile, "jack", "port_connection_mode", jack_cfg.port_connection_mode); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
60 aud_cfg_db_close(cfgfile); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
61 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
62 gtk_widget_destroy(configure_win); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
63 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
64 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
65 static void get_port_connection_modes(GtkCombo *combo) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
66 { |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
67 GtkWidget *item; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
68 char *descr; |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
69 |
1369
6d87598ff8a9
Internationalization... (The first step of the "i18n" project could be ready for Audacious 1.4 release)
Stany HENRY <StrassBoy@gmail.com>
parents:
12
diff
changeset
|
70 descr = g_strdup(_("Connect to all available jack ports")); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
71 item = gtk_list_item_new_with_label(descr); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
72 gtk_widget_show(item); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
73 g_free(descr); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
74 gtk_combo_set_item_string(combo, GTK_ITEM(item), "CONNECT_ALL"); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
75 gtk_container_add(GTK_CONTAINER(combo->list), item); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
76 |
1369
6d87598ff8a9
Internationalization... (The first step of the "i18n" project could be ready for Audacious 1.4 release)
Stany HENRY <StrassBoy@gmail.com>
parents:
12
diff
changeset
|
77 descr = g_strdup(_("Connect only the output ports")); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
78 item = gtk_list_item_new_with_label(descr); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
79 gtk_widget_show(item); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
80 g_free(descr); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
81 gtk_combo_set_item_string(combo, GTK_ITEM(item), "CONNECT_OUTPUT"); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
82 gtk_container_add(GTK_CONTAINER(combo->list), item); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
83 |
1369
6d87598ff8a9
Internationalization... (The first step of the "i18n" project could be ready for Audacious 1.4 release)
Stany HENRY <StrassBoy@gmail.com>
parents:
12
diff
changeset
|
84 descr = g_strdup(_("Connect to no ports")); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
85 item = gtk_list_item_new_with_label(descr); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
86 gtk_widget_show(item); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
87 g_free(descr); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
88 gtk_combo_set_item_string(combo, GTK_ITEM(item), "CONNECT_NONE"); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
89 gtk_container_add(GTK_CONTAINER(combo->list), item); |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
90 } |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
91 |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
92 void jack_configure(void) |
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
93 { |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
94 if (!configure_win) |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
95 { |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
96 configure_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
97 gtk_window_set_type_hint ( GTK_WINDOW(configure_win), GDK_WINDOW_TYPE_HINT_DIALOG); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
98 gtk_signal_connect(GTK_OBJECT(configure_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &configure_win); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
99 gtk_window_set_title(GTK_WINDOW(configure_win), _("jack Plugin configuration")); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
100 gtk_window_set_policy(GTK_WINDOW(configure_win), FALSE, FALSE, FALSE); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
101 gtk_window_set_position(GTK_WINDOW(configure_win), GTK_WIN_POS_MOUSE); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
102 gtk_container_border_width(GTK_CONTAINER(configure_win), 10); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
103 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
104 vbox = gtk_vbox_new(FALSE, 10); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
105 gtk_container_add(GTK_CONTAINER(configure_win), vbox); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
106 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
107 /* add a frame for other xmms-jack options */ |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
108 option_frame = gtk_frame_new(_("Options:")); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
109 gtk_box_pack_start(GTK_BOX(vbox), option_frame, FALSE, FALSE, 0); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
110 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
111 /* add a hbox that will contain a label for a dropdown and the dropdown itself */ |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
112 port_connection_mode_box = gtk_hbox_new(FALSE, 5); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
113 gtk_container_set_border_width(GTK_CONTAINER(port_connection_mode_box), 5); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
114 gtk_container_add(GTK_CONTAINER(option_frame), port_connection_mode_box); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
115 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
116 /* add the label */ |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
117 gtk_box_pack_start(GTK_BOX(port_connection_mode_box), gtk_label_new(_("Connection mode:")), |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
118 FALSE, FALSE, 0); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
119 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
120 /* add the dropdown */ |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
121 port_connection_mode_combo = gtk_combo_new(); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
122 get_port_connection_modes(GTK_COMBO(port_connection_mode_combo)); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
123 gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(port_connection_mode_combo)->entry), |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
124 jack_cfg.port_connection_mode); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
125 gtk_box_pack_start(GTK_BOX(port_connection_mode_box), port_connection_mode_combo, |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
126 TRUE, TRUE, 0); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
127 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
128 /* create a check_button for debug output */ |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
129 GTK_isTraceEnabled = gtk_check_button_new_with_label(_("Enable debug printing")); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
130 gtk_box_pack_start(GTK_BOX(vbox), GTK_isTraceEnabled, FALSE, FALSE, 0); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
131 gtk_widget_show(GTK_isTraceEnabled); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
132 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
133 /* set the state of the check_button based upon the value of */ |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
134 /* isTracingEnabled */ |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
135 GTK_CHECK_BUTTON(GTK_isTraceEnabled)->toggle_button.active = jack_cfg.isTraceEnabled; |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
136 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
137 /* add the box for the ok/canceled buttons at the bottom */ |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
138 bbox = gtk_hbox_new(FALSE, 10); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
139 gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
140 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
141 ok = gtk_button_new_with_label(_("Ok")); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
142 gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(configure_win_ok_cb), NULL); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
143 GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
144 gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
145 gtk_widget_show(ok); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
146 gtk_widget_grab_default(ok); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
147 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
148 cancel = gtk_button_new_with_label(_("Cancel")); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
149 gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(configure_win)); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
150 GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
151 gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
152 gtk_widget_show(cancel); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
153 |
2192
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
154 gtk_widget_show_all(configure_win); |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
155 } |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
156 else |
e5401b6c4665
the same thing in many plugins
Eugene Zagidullin <e.asphyx@gmail.com>
parents:
2124
diff
changeset
|
157 gtk_window_present(GTK_WINDOW(configure_win)); |
0
13389e613d67
[svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff
changeset
|
158 } |