Mercurial > audlegacy-plugins
annotate src/echo_plugin/gui.c @ 3074:177688d045db
Update playlist manager on when playlists changed.
author | John Lindgren <john.lindgren@tds.net> |
---|---|
date | Sun, 26 Apr 2009 04:26:40 -0400 |
parents | 3134a0987162 |
children |
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> |
2971
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2576
diff
changeset
|
4 #include <audlegacy/plugin.h> |
3134a0987162
- changed include path from audacious to audlegacy.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
2576
diff
changeset
|
5 #include <audlegacy/i18n.h> |
127
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
6 #include "echo.h" |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
7 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
8 static const char *echo_about_text = |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
9 N_("Echo Plugin\n" |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
10 "By Johan Levin 1999.\n\n" |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
11 "Surround echo by Carl van Schaik 1999"); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
12 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
13 static GtkWidget *conf_dialog = NULL, *surround_btn; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
14 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
|
15 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
16 void echo_about(void) |
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 static GtkWidget *echo_about_dialog = NULL; |
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 if (echo_about_dialog != NULL) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
21 return; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
22 |
1677
f6f5603a0954
xmms_show_message() changed to audacious_info_dialog()
Matti Hamalainen <ccr@tnsp.org>
parents:
528
diff
changeset
|
23 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
|
24 _(echo_about_text), _("Ok"), |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
25 FALSE, NULL, NULL); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
26 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
|
27 GTK_SIGNAL_FUNC(gtk_widget_destroyed), |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
28 &echo_about_dialog); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
29 } |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
30 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
31 static void apply_changes(void) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
32 { |
2523
769e17da93dd
Replaced s/ConfigDb/mcs_handle_t/g, as per changes in the core.
Matti Hamalainen <ccr@tnsp.org>
parents:
2499
diff
changeset
|
33 mcs_handle_t *cfg; |
127
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
34 echo_delay = GTK_ADJUSTMENT(echo_delay_adj)->value; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
35 echo_feedback = GTK_ADJUSTMENT(echo_feedback_adj)->value; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
36 echo_volume = GTK_ADJUSTMENT(echo_volume_adj)->value; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
37 echo_surround_enable = |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
38 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
|
39 |
2124 | 40 cfg = aud_cfg_db_open(); |
41 aud_cfg_db_set_int(cfg, "echo_plugin", "delay", echo_delay); | |
42 aud_cfg_db_set_int(cfg, "echo_plugin", "feedback", echo_feedback); | |
43 aud_cfg_db_set_int(cfg, "echo_plugin", "volume", echo_volume); | |
44 aud_cfg_db_set_bool(cfg, "echo_plugin", "enable_surround", echo_surround_enable); | |
45 aud_cfg_db_close(cfg); | |
127
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
46 } |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
47 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
48 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
|
49 { |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
50 apply_changes(); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
51 gtk_widget_destroy(GTK_WIDGET(conf_dialog)); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
52 } |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
53 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
54 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
|
55 { |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
56 gtk_widget_destroy(GTK_WIDGET(conf_dialog)); |
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 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
59 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
|
60 { |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
61 apply_changes(); |
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 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
64 void echo_configure(void) |
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 GtkWidget *button, *table, *label, *hscale, *bbox; |
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 if (conf_dialog != NULL) |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
69 return; |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
70 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
71 conf_dialog = gtk_dialog_new(); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
72 gtk_signal_connect(GTK_OBJECT(conf_dialog), "destroy", |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
73 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &conf_dialog); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
74 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
|
75 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
76 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
|
77 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
|
78 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
|
79 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
80 table = gtk_table_new(2, 3, FALSE); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
81 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
|
82 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
|
83 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
|
84 TRUE, TRUE, 5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
85 gtk_widget_show(table); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
86 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
87 label = gtk_label_new(_("Delay: (ms)")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
88 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
|
89 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
|
90 gtk_widget_show(label); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
91 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
92 label = gtk_label_new(_("Feedback: (%)")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
93 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
|
94 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
|
95 gtk_widget_show(label); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
96 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
97 label = gtk_label_new(_("Volume: (%)")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
98 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
|
99 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
|
100 gtk_widget_show(label); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
101 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
102 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
|
103 gtk_widget_set_usize(hscale, 400, 35); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
104 gtk_scale_set_digits(GTK_SCALE(hscale), 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
105 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
|
106 gtk_widget_show(hscale); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
107 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
108 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
|
109 gtk_widget_set_usize(hscale, 400, 35); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
110 gtk_scale_set_digits(GTK_SCALE(hscale), 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
111 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
|
112 gtk_widget_show(hscale); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
113 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
114 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
|
115 gtk_widget_set_usize(hscale, 400, 35); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
116 gtk_scale_set_digits(GTK_SCALE(hscale), 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
117 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
|
118 gtk_widget_show(hscale); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
119 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
120 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
|
121 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
|
122 echo_surround_enable); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
123 gtk_widget_show(surround_btn); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
124 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
125 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
|
126 TRUE, TRUE, 5); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
127 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
128 bbox = gtk_hbutton_box_new(); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
129 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
|
130 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
|
131 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
|
132 bbox, TRUE, TRUE, 0); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
133 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
134 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
135 button = gtk_button_new_with_label(_("Ok")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
136 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
137 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
|
138 gtk_signal_connect(GTK_OBJECT(button), "clicked", |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
139 GTK_SIGNAL_FUNC(conf_ok_cb), NULL); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
140 gtk_widget_grab_default(button); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
141 gtk_widget_show(button); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
142 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
143 button = gtk_button_new_with_label(_("Cancel")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
144 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
145 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
|
146 gtk_signal_connect(GTK_OBJECT(button), "clicked", |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
147 GTK_SIGNAL_FUNC(conf_cancel_cb), NULL); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
148 gtk_widget_show(button); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
149 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
150 button = gtk_button_new_with_label(_("Apply")); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
151 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
152 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
|
153 gtk_signal_connect(GTK_OBJECT(button), "clicked", |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
154 GTK_SIGNAL_FUNC(conf_apply_cb), NULL); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
155 gtk_widget_show(button); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
156 gtk_widget_show(bbox); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
157 |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
158 gtk_widget_show(conf_dialog); |
46730e83b1e2
[svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff
changeset
|
159 } |