Mercurial > audlegacy-plugins
annotate src/echo_plugin/gui.c @ 2189:549009824758
demac: added MIME type (audio/x-ape) to provided tuple
author | Eugene Zagidullin <e.asphyx@gmail.com> |
---|---|
date | Sun, 25 Nov 2007 23:45:10 +0300 |
parents | b8da6a0b0da2 |
children | 4d6045c20cc5 |
rev | line source |
---|---|
1825 | 1 #include "config.h" |
528 | 2 |
127
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
3 #include <gtk/gtk.h> |
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
|
4 #include <audacious/plugin.h> |
527
d124034ebea3
[svn] - glib/gi18n.h -> audacious/i18n.h for automatic dgettext support
nenolod
parents:
127
diff
changeset
|
5 #include <audacious/i18n.h> |
1950
2ebeb7816c5e
Change from "" to <>-style includes. With thanks to ccr for the correct sed voodoo.
chainsaw@localhost
parents:
1825
diff
changeset
|
6 #include <audacious/util.h> |
2ebeb7816c5e
Change from "" to <>-style includes. With thanks to ccr for the correct sed voodoo.
chainsaw@localhost
parents:
1825
diff
changeset
|
7 #include <audacious/configdb.h> |
127
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
8 #include "echo.h" |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
9 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
10 static const char *echo_about_text = |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
11 N_("Echo Plugin\n" |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
12 "By Johan Levin 1999.\n\n" |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
13 "Surround echo by Carl van Schaik 1999"); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
14 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
15 static GtkWidget *conf_dialog = NULL, *surround_btn; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
16 static GtkObject *echo_delay_adj, *echo_feedback_adj, *echo_volume_adj; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
17 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
18 void echo_about(void) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
19 { |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
20 static GtkWidget *echo_about_dialog = NULL; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
21 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
22 if (echo_about_dialog != NULL) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
23 return; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
24 |
1677
f6f5603a0954
xmms_show_message() changed to audacious_info_dialog()
Matti Hamalainen <ccr@tnsp.org>
parents:
528
diff
changeset
|
25 echo_about_dialog = audacious_info_dialog(_("About Echo Plugin"), |
127
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
26 _(echo_about_text), _("Ok"), |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
27 FALSE, NULL, NULL); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
28 gtk_signal_connect(GTK_OBJECT(echo_about_dialog), "destroy", |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
29 GTK_SIGNAL_FUNC(gtk_widget_destroyed), |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
30 &echo_about_dialog); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
31 } |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
32 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
33 static void apply_changes(void) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
34 { |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
35 ConfigDb *cfg; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
36 echo_delay = GTK_ADJUSTMENT(echo_delay_adj)->value; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
37 echo_feedback = GTK_ADJUSTMENT(echo_feedback_adj)->value; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
38 echo_volume = GTK_ADJUSTMENT(echo_volume_adj)->value; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
39 echo_surround_enable = |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
40 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(surround_btn)); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
41 |
2124 | 42 cfg = aud_cfg_db_open(); |
43 aud_cfg_db_set_int(cfg, "echo_plugin", "delay", echo_delay); | |
44 aud_cfg_db_set_int(cfg, "echo_plugin", "feedback", echo_feedback); | |
45 aud_cfg_db_set_int(cfg, "echo_plugin", "volume", echo_volume); | |
46 aud_cfg_db_set_bool(cfg, "echo_plugin", "enable_surround", echo_surround_enable); | |
47 aud_cfg_db_close(cfg); | |
127
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
48 } |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
49 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
50 static void conf_ok_cb(GtkButton * button, gpointer data) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
51 { |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
52 apply_changes(); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
53 gtk_widget_destroy(GTK_WIDGET(conf_dialog)); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
54 } |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
55 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
56 static void conf_cancel_cb(GtkButton * button, gpointer data) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
57 { |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
58 gtk_widget_destroy(GTK_WIDGET(conf_dialog)); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
59 } |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
60 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
61 static void conf_apply_cb(GtkButton * button, gpointer data) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
62 { |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
63 apply_changes(); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
64 } |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
65 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
66 void echo_configure(void) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
67 { |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
68 GtkWidget *button, *table, *label, *hscale, *bbox; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
69 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
70 if (conf_dialog != NULL) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
71 return; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
72 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
73 conf_dialog = gtk_dialog_new(); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
74 gtk_signal_connect(GTK_OBJECT(conf_dialog), "destroy", |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
75 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &conf_dialog); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
76 gtk_window_set_title(GTK_WINDOW(conf_dialog), _("Configure Echo")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
77 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
78 echo_delay_adj = gtk_adjustment_new(echo_delay, 0, MAX_DELAY + 100, 10, 100, 100); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
79 echo_feedback_adj = gtk_adjustment_new(echo_feedback, 0, 100 + 10, 2, 10, 10); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
80 echo_volume_adj = gtk_adjustment_new(echo_volume, 0, 100 + 10, 2, 10, 10); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
81 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
82 table = gtk_table_new(2, 3, FALSE); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
83 gtk_table_set_col_spacings(GTK_TABLE(table), 5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
84 gtk_container_set_border_width(GTK_CONTAINER(table), 5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
85 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(conf_dialog)->vbox), table, |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
86 TRUE, TRUE, 5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
87 gtk_widget_show(table); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
88 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
89 label = gtk_label_new(_("Delay: (ms)")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
90 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
91 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
92 gtk_widget_show(label); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
93 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
94 label = gtk_label_new(_("Feedback: (%)")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
95 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
96 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
97 gtk_widget_show(label); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
98 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
99 label = gtk_label_new(_("Volume: (%)")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
100 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
101 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
102 gtk_widget_show(label); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
103 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
104 hscale = gtk_hscale_new(GTK_ADJUSTMENT(echo_delay_adj)); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
105 gtk_widget_set_usize(hscale, 400, 35); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
106 gtk_scale_set_digits(GTK_SCALE(hscale), 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
107 gtk_table_attach_defaults(GTK_TABLE(table), hscale, 1, 2, 0, 1); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
108 gtk_widget_show(hscale); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
109 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
110 hscale = gtk_hscale_new(GTK_ADJUSTMENT(echo_feedback_adj)); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
111 gtk_widget_set_usize(hscale, 400, 35); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
112 gtk_scale_set_digits(GTK_SCALE(hscale), 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
113 gtk_table_attach_defaults(GTK_TABLE(table), hscale, 1, 2, 1, 2); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
114 gtk_widget_show(hscale); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
115 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
116 hscale = gtk_hscale_new(GTK_ADJUSTMENT(echo_volume_adj)); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
117 gtk_widget_set_usize(hscale, 400, 35); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
118 gtk_scale_set_digits(GTK_SCALE(hscale), 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
119 gtk_table_attach_defaults(GTK_TABLE(table), hscale, 1, 2, 2, 3); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
120 gtk_widget_show(hscale); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
121 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
122 surround_btn = gtk_check_button_new_with_label(_("Surround echo")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
123 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(surround_btn), |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
124 echo_surround_enable); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
125 gtk_widget_show(surround_btn); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
126 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
127 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(conf_dialog)->vbox), surround_btn, |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
128 TRUE, TRUE, 5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
129 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
130 bbox = gtk_hbutton_box_new(); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
131 gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
132 gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
133 gtk_box_pack_start(GTK_BOX((GTK_DIALOG(conf_dialog)->action_area)), |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
134 bbox, TRUE, TRUE, 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
135 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
136 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
137 button = gtk_button_new_with_label(_("Ok")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
138 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
139 gtk_box_pack_start(GTK_BOX(bbox), button, TRUE, TRUE, 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
140 gtk_signal_connect(GTK_OBJECT(button), "clicked", |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
141 GTK_SIGNAL_FUNC(conf_ok_cb), NULL); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
142 gtk_widget_grab_default(button); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
143 gtk_widget_show(button); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
144 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
145 button = gtk_button_new_with_label(_("Cancel")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
146 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
147 gtk_box_pack_start(GTK_BOX(bbox), button, TRUE, TRUE, 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
148 gtk_signal_connect(GTK_OBJECT(button), "clicked", |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
149 GTK_SIGNAL_FUNC(conf_cancel_cb), NULL); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
150 gtk_widget_show(button); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
151 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
152 button = gtk_button_new_with_label(_("Apply")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
153 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
154 gtk_box_pack_start(GTK_BOX(bbox), button, TRUE, TRUE, 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
155 gtk_signal_connect(GTK_OBJECT(button), "clicked", |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
156 GTK_SIGNAL_FUNC(conf_apply_cb), NULL); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
157 gtk_widget_show(button); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
158 gtk_widget_show(bbox); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
159 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
160 gtk_widget_show(conf_dialog); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
161 } |