annotate src/echo_plugin/gui.c @ 139:b0c135dc8fbd trunk

[svn] - make sure libxmmsmplayer is built with PICFLAGS
author nenolod
date Sun, 29 Oct 2006 01:20:45 -0700
parents 46730e83b1e2
children d124034ebea3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
127
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
1 #include <gtk/gtk.h>
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
2 #include <glib/gi18n.h>
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
3 #include "audacious/util.h"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
4 #include "audacious/configdb.h"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
5 #include "echo.h"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
6
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
7 static const char *echo_about_text =
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
8 N_("Echo Plugin\n"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
9 "By Johan Levin 1999.\n\n"
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
10 "Surround echo by Carl van Schaik 1999");
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
11
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
12 static GtkWidget *conf_dialog = NULL, *surround_btn;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
13 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
14
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
15 void echo_about(void)
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 static GtkWidget *echo_about_dialog = NULL;
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 if (echo_about_dialog != NULL)
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
20 return;
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 echo_about_dialog = xmms_show_message(_("About Echo Plugin"),
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
23 _(echo_about_text), _("Ok"),
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
24 FALSE, NULL, NULL);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
25 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
26 GTK_SIGNAL_FUNC(gtk_widget_destroyed),
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
27 &echo_about_dialog);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
28 }
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 static void apply_changes(void)
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 ConfigDb *cfg;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
33 echo_delay = GTK_ADJUSTMENT(echo_delay_adj)->value;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
34 echo_feedback = GTK_ADJUSTMENT(echo_feedback_adj)->value;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
35 echo_volume = GTK_ADJUSTMENT(echo_volume_adj)->value;
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
36 echo_surround_enable =
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
37 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
38
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
39 cfg = bmp_cfg_db_open();
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
40 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
41 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
42 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
43 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
44 bmp_cfg_db_close(cfg);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
45 }
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 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
48 {
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
49 apply_changes();
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
50 gtk_widget_destroy(GTK_WIDGET(conf_dialog));
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
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
53 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
54 {
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
55 gtk_widget_destroy(GTK_WIDGET(conf_dialog));
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
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
58 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
59 {
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
60 apply_changes();
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
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
63 void echo_configure(void)
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 GtkWidget *button, *table, *label, *hscale, *bbox;
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 if (conf_dialog != NULL)
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
68 return;
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 conf_dialog = gtk_dialog_new();
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
71 gtk_signal_connect(GTK_OBJECT(conf_dialog), "destroy",
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
72 GTK_SIGNAL_FUNC(gtk_widget_destroyed), &conf_dialog);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
73 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
74
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
75 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
76 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
77 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
78
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
79 table = gtk_table_new(2, 3, FALSE);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
80 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
81 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
82 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
83 TRUE, TRUE, 5);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
84 gtk_widget_show(table);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
85
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
86 label = gtk_label_new(_("Delay: (ms)"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
87 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
88 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
89 gtk_widget_show(label);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
90
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
91 label = gtk_label_new(_("Feedback: (%)"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
92 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
93 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
94 gtk_widget_show(label);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
95
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
96 label = gtk_label_new(_("Volume: (%)"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
97 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
98 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
99 gtk_widget_show(label);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
100
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
101 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
102 gtk_widget_set_usize(hscale, 400, 35);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
103 gtk_scale_set_digits(GTK_SCALE(hscale), 0);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
104 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
105 gtk_widget_show(hscale);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
106
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
107 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
108 gtk_widget_set_usize(hscale, 400, 35);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
109 gtk_scale_set_digits(GTK_SCALE(hscale), 0);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
110 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
111 gtk_widget_show(hscale);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
112
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
113 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
114 gtk_widget_set_usize(hscale, 400, 35);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
115 gtk_scale_set_digits(GTK_SCALE(hscale), 0);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
116 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
117 gtk_widget_show(hscale);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
118
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
119 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
120 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
121 echo_surround_enable);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
122 gtk_widget_show(surround_btn);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
123
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
124 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
125 TRUE, TRUE, 5);
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 bbox = gtk_hbutton_box_new();
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
128 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
129 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
130 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
131 bbox, TRUE, TRUE, 0);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
132
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 button = gtk_button_new_with_label(_("Ok"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
135 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
136 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
137 gtk_signal_connect(GTK_OBJECT(button), "clicked",
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
138 GTK_SIGNAL_FUNC(conf_ok_cb), NULL);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
139 gtk_widget_grab_default(button);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
140 gtk_widget_show(button);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
141
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
142 button = gtk_button_new_with_label(_("Cancel"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
143 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
144 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
145 gtk_signal_connect(GTK_OBJECT(button), "clicked",
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
146 GTK_SIGNAL_FUNC(conf_cancel_cb), NULL);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
147 gtk_widget_show(button);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
148
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
149 button = gtk_button_new_with_label(_("Apply"));
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
150 GTK_WIDGET_SET_FLAGS(button, GTK_CAN_DEFAULT);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
151 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
152 gtk_signal_connect(GTK_OBJECT(button), "clicked",
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
153 GTK_SIGNAL_FUNC(conf_apply_cb), NULL);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
154 gtk_widget_show(button);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
155 gtk_widget_show(bbox);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
156
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
157 gtk_widget_show(conf_dialog);
46730e83b1e2 [svn] - echo plugin support by Christian Birchinger <joker -at- gentoo.org>
nenolod
parents:
diff changeset
158 }