annotate src/echo_plugin/gui.c @ 1859:3279ac89d0dc

CoreAudio: MK2
author William Pitcock <nenolod@atheme.org>
date Mon, 24 Sep 2007 14:33:45 -0500
parents cec2ff45e255
children 2ebeb7816c5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1825
cec2ff45e255 echo_plugin: mk2
William Pitcock <nenolod@atheme.org>
parents: 1677
diff changeset
1 #include "config.h"
528
4d8b92b55acf [svn] - add config.h includes where needed
nenolod
parents: 527
diff changeset
2
127
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
3 #include <gtk/gtk.h>
527
d124034ebea3 [svn] - glib/gi18n.h -> audacious/i18n.h for automatic dgettext support
nenolod
parents: 127
diff changeset
4 #include <audacious/i18n.h>
127
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
5 #include "audacious/util.h"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
6 #include "audacious/configdb.h"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
7 #include "echo.h"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
8
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
9 static const char *echo_about_text =
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
10 N_("Echo Plugin\n"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
11 "By Johan Levin 1999.\n\n"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
12 "Surround echo by Carl van Schaik 1999");
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
13
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
14 static GtkWidget *conf_dialog = NULL, *surround_btn;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
15 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
16
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
17 void echo_about(void)
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
18 {
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
19 static GtkWidget *echo_about_dialog = NULL;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
20
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
21 if (echo_about_dialog != NULL)
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
22 return;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
23
1677
f6f5603a0954 xmms_show_message() changed to audacious_info_dialog()
Matti Hamalainen <ccr@tnsp.org>
parents: 528
diff changeset
24 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
25 _(echo_about_text), _("Ok"),
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
26 FALSE, NULL, NULL);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
27 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
28 GTK_SIGNAL_FUNC(gtk_widget_destroyed),
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
29 &echo_about_dialog);
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
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
32 static void apply_changes(void)
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
33 {
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
34 ConfigDb *cfg;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
35 echo_delay = GTK_ADJUSTMENT(echo_delay_adj)->value;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
36 echo_feedback = GTK_ADJUSTMENT(echo_feedback_adj)->value;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
37 echo_volume = GTK_ADJUSTMENT(echo_volume_adj)->value;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
38 echo_surround_enable =
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
39 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
40
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
41 cfg = bmp_cfg_db_open();
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
42 bmp_cfg_db_set_int(cfg, "echo_plugin", "delay", echo_delay);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
43 bmp_cfg_db_set_int(cfg, "echo_plugin", "feedback", echo_feedback);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
44 bmp_cfg_db_set_int(cfg, "echo_plugin", "volume", echo_volume);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
45 bmp_cfg_db_set_bool(cfg, "echo_plugin", "enable_surround", echo_surround_enable);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
46 bmp_cfg_db_close(cfg);
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
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
49 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
50 {
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
51 apply_changes();
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
52 gtk_widget_destroy(GTK_WIDGET(conf_dialog));
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
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
55 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
56 {
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
57 gtk_widget_destroy(GTK_WIDGET(conf_dialog));
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
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
60 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
61 {
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
62 apply_changes();
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
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
65 void echo_configure(void)
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
66 {
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
67 GtkWidget *button, *table, *label, *hscale, *bbox;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
68
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
69 if (conf_dialog != NULL)
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
70 return;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
71
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
72 conf_dialog = gtk_dialog_new();
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
73 gtk_signal_connect(GTK_OBJECT(conf_dialog), "destroy",
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
74 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &conf_dialog);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
75 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
76
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
77 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
78 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
79 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
80
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
81 table = gtk_table_new(2, 3, FALSE);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
82 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
83 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
84 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
85 TRUE, TRUE, 5);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
86 gtk_widget_show(table);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
87
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
88 label = gtk_label_new(_("Delay: (ms)"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
89 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
90 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
91 gtk_widget_show(label);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
92
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
93 label = gtk_label_new(_("Feedback: (%)"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
94 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
95 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
96 gtk_widget_show(label);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
97
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
98 label = gtk_label_new(_("Volume: (%)"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
99 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
100 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
101 gtk_widget_show(label);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
102
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
103 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
104 gtk_widget_set_usize(hscale, 400, 35);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
105 gtk_scale_set_digits(GTK_SCALE(hscale), 0);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
106 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
107 gtk_widget_show(hscale);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
108
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
109 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
110 gtk_widget_set_usize(hscale, 400, 35);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
111 gtk_scale_set_digits(GTK_SCALE(hscale), 0);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
112 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
113 gtk_widget_show(hscale);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
114
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
115 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
116 gtk_widget_set_usize(hscale, 400, 35);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
117 gtk_scale_set_digits(GTK_SCALE(hscale), 0);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
118 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
119 gtk_widget_show(hscale);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
120
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
121 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
122 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
123 echo_surround_enable);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
124 gtk_widget_show(surround_btn);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
125
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
126 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
127 TRUE, TRUE, 5);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
128
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
129 bbox = gtk_hbutton_box_new();
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
130 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
131 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
132 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
133 bbox, TRUE, TRUE, 0);
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
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
136 button = gtk_button_new_with_label(_("Ok"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
137 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
138 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
139 gtk_signal_connect(GTK_OBJECT(button), "clicked",
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
140 GTK_SIGNAL_FUNC(conf_ok_cb), NULL);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
141 gtk_widget_grab_default(button);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
142 gtk_widget_show(button);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
143
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
144 button = gtk_button_new_with_label(_("Cancel"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
145 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
146 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
147 gtk_signal_connect(GTK_OBJECT(button), "clicked",
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
148 GTK_SIGNAL_FUNC(conf_cancel_cb), NULL);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
149 gtk_widget_show(button);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
150
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
151 button = gtk_button_new_with_label(_("Apply"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
152 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
153 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
154 gtk_signal_connect(GTK_OBJECT(button), "clicked",
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
155 GTK_SIGNAL_FUNC(conf_apply_cb), NULL);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
156 gtk_widget_show(button);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
157 gtk_widget_show(bbox);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
158
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
159 gtk_widget_show(conf_dialog);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
160 }