annotate Visualization/libvisual-proxy/config_gui.c @ 55:c0a32c66e928 trunk

[svn] This commit builds on the second one, improving the accuracy of the dynamic limiter.
author nenolod
date Thu, 27 Oct 2005 16:58:54 -0700
parents 639f07a07590
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
1 #include <sys/types.h>
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
2 #include <sys/stat.h>
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
3 #include <unistd.h>
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
4 #include <string.h>
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
5
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
6 #include <gdk/gdkkeysyms.h>
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
7 #include <gtk/gtk.h>
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
8
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
9 #include "config.h"
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
10
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
11 #include "config_gui.h"
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
12
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
13 #if 0
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
14 static gchar *check_file_exists (const gchar *directory, const gchar *filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
15 static GtkWidget *create_pixmap (GtkWidget *widget, const gchar *filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
16 static GtkWidget *create_dummy_pixmap (GtkWidget *widget);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
17 /*static GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name);*/
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
18 static void add_pixmap_directory (const gchar *directory);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
19
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
20 ConfigWin *lv_xmms_config_gui_new (void)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
21 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
22 ConfigWin *config_gui;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
23
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
24 GtkWidget *window_main;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
25 GtkWidget *vbox_main;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
26 GtkWidget *frame_vis_plugin;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
27 GtkWidget *vbox3;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
28 GtkWidget *scrolledwindow_vis_plugins;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
29 GtkWidget *viewport1;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
30 GtkWidget *list_vis_plugins;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
31 GtkWidget *hbox_vis_plugin_controls;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
32 GtkWidget *hbox_vis_plugin_buttons;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
33 GtkWidget *button_vis_plugin_conf;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
34 GtkWidget *button_vis_plugin_about;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
35 GtkWidget *checkbutton_vis_plugin;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
36 GtkWidget *checkbutton_fullscreen;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
37 GSList *buttongroup_plugins_group = NULL;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
38 GtkWidget *radiobutton_all_plugins;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
39 GtkWidget *radiobutton_onlynongl;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
40 GtkWidget *radiobutton_onlygl;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
41 GtkWidget *hbox_fps;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
42 GtkWidget *label_fps;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
43 GtkObject *spinbutton_fps_adj;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
44 GtkWidget *spinbutton_fps;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
45 GtkWidget *frame_morph_plugin;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
46 GtkWidget *vbox_morph_plugin;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
47 GtkWidget *optionmenu_morph_plugin;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
48 GtkWidget *optionmenu_morph_plugin_menu;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
49 GtkWidget *hbox_morph_plugin_controls;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
50 GtkWidget *hbox_morph_plugin_buttons;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
51 GtkWidget *button_morph_plugin_conf;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
52 GtkWidget *button_morph_plugin_about;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
53 GtkWidget *checkbutton_morph_random;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
54 GtkWidget *hbox_main_buttons;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
55 GtkWidget *button_ok;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
56 GtkWidget *button_apply;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
57 GtkWidget *button_cancel;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
58 GtkTooltips *tooltips;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
59
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
60 tooltips = gtk_tooltips_new ();
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
61
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
62 add_pixmap_directory (PACKAGE_DATADIR);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
63
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
64 window_main = gtk_window_new (GTK_WINDOW_DIALOG);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
65 gtk_object_set_data (GTK_OBJECT (window_main), "window_main", window_main);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
66 gtk_window_set_title (GTK_WINDOW (window_main), _("LibVisual XMMS Plugin"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
67 gtk_window_set_position (GTK_WINDOW (window_main), GTK_WIN_POS_CENTER);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
68 gtk_window_set_default_size (GTK_WINDOW (window_main), -1, 450);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
69
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
70 vbox_main = gtk_vbox_new (FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
71 gtk_widget_ref (vbox_main);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
72 gtk_object_set_data_full (GTK_OBJECT (window_main), "vbox_main", vbox_main,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
73 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
74 gtk_widget_show (vbox_main);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
75 gtk_container_add (GTK_CONTAINER (window_main), vbox_main);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
76 gtk_container_set_border_width (GTK_CONTAINER (vbox_main), 6);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
77
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
78 frame_vis_plugin = gtk_frame_new (_("Visualization Plugins"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
79 gtk_widget_ref (frame_vis_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
80 gtk_object_set_data_full (GTK_OBJECT (window_main), "frame_vis_plugin", frame_vis_plugin,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
81 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
82 gtk_widget_show (frame_vis_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
83 gtk_box_pack_start (GTK_BOX (vbox_main), frame_vis_plugin, TRUE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
84 gtk_container_set_border_width (GTK_CONTAINER (frame_vis_plugin), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
85
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
86 vbox3 = gtk_vbox_new (FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
87 gtk_widget_ref (vbox3);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
88 gtk_object_set_data_full (GTK_OBJECT (window_main), "vbox3", vbox3,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
89 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
90 gtk_widget_show (vbox3);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
91 gtk_container_add (GTK_CONTAINER (frame_vis_plugin), vbox3);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
92
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
93 scrolledwindow_vis_plugins = gtk_scrolled_window_new (NULL, NULL);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
94 gtk_widget_ref (scrolledwindow_vis_plugins);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
95 gtk_object_set_data_full (GTK_OBJECT (window_main), "scrolledwindow_vis_plugins", scrolledwindow_vis_plugins,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
96 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
97 gtk_widget_show (scrolledwindow_vis_plugins);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
98 gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow_vis_plugins, TRUE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
99 gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow_vis_plugins), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
100 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_vis_plugins), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
101
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
102 viewport1 = gtk_viewport_new (NULL, NULL);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
103 gtk_widget_ref (viewport1);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
104 gtk_object_set_data_full (GTK_OBJECT (window_main), "viewport1", viewport1,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
105 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
106 gtk_widget_show (viewport1);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
107 gtk_container_add (GTK_CONTAINER (scrolledwindow_vis_plugins), viewport1);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
108
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
109 list_vis_plugins = gtk_list_new ();
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
110 gtk_widget_ref (list_vis_plugins);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
111 gtk_object_set_data_full (GTK_OBJECT (window_main), "list_vis_plugins", list_vis_plugins,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
112 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
113 gtk_widget_show (list_vis_plugins);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
114 gtk_container_add (GTK_CONTAINER (viewport1), list_vis_plugins);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
115 gtk_list_set_selection_mode (GTK_LIST (list_vis_plugins), GTK_SELECTION_SINGLE);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
116
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
117 hbox_vis_plugin_controls = gtk_hbox_new (FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
118 gtk_widget_ref (hbox_vis_plugin_controls);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
119 gtk_object_set_data_full (GTK_OBJECT (window_main), "hbox_vis_plugin_controls", hbox_vis_plugin_controls,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
120 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
121 gtk_widget_show (hbox_vis_plugin_controls);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
122 gtk_box_pack_start (GTK_BOX (vbox3), hbox_vis_plugin_controls, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
123 gtk_container_set_border_width (GTK_CONTAINER (hbox_vis_plugin_controls), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
124
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
125 hbox_vis_plugin_buttons = gtk_hbox_new (TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
126 gtk_widget_ref (hbox_vis_plugin_buttons);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
127 gtk_object_set_data_full (GTK_OBJECT (window_main), "hbox_vis_plugin_buttons", hbox_vis_plugin_buttons,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
128 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
129 gtk_widget_show (hbox_vis_plugin_buttons);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
130 gtk_box_pack_start (GTK_BOX (hbox_vis_plugin_controls), hbox_vis_plugin_buttons, FALSE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
131
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
132 button_vis_plugin_conf = gtk_button_new_with_label (_("Configure"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
133 gtk_widget_ref (button_vis_plugin_conf);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
134 gtk_object_set_data_full (GTK_OBJECT (window_main), "button_vis_plugin_conf", button_vis_plugin_conf,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
135 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
136 gtk_widget_show (button_vis_plugin_conf);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
137 gtk_box_pack_start (GTK_BOX (hbox_vis_plugin_buttons), button_vis_plugin_conf, FALSE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
138 gtk_container_set_border_width (GTK_CONTAINER (button_vis_plugin_conf), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
139
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
140 button_vis_plugin_about = gtk_button_new_with_label (_("About"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
141 gtk_widget_ref (button_vis_plugin_about);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
142 gtk_object_set_data_full (GTK_OBJECT (window_main), "button_vis_plugin_about", button_vis_plugin_about,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
143 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
144 gtk_widget_show (button_vis_plugin_about);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
145 gtk_box_pack_start (GTK_BOX (hbox_vis_plugin_buttons), button_vis_plugin_about, FALSE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
146 gtk_container_set_border_width (GTK_CONTAINER (button_vis_plugin_about), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
147
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
148 checkbutton_vis_plugin = gtk_check_button_new_with_label (_("Enable/Disable"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
149 gtk_widget_ref (checkbutton_vis_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
150 gtk_object_set_data_full (GTK_OBJECT (window_main), "checkbutton_vis_plugin", checkbutton_vis_plugin,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
151 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
152 gtk_widget_show (checkbutton_vis_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
153 gtk_box_pack_end (GTK_BOX (hbox_vis_plugin_controls), checkbutton_vis_plugin, FALSE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
154 gtk_container_set_border_width (GTK_CONTAINER (checkbutton_vis_plugin), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
155
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
156 checkbutton_fullscreen = gtk_check_button_new_with_label (_("Fullscreen"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
157 gtk_widget_ref (checkbutton_fullscreen);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
158 gtk_object_set_data_full (GTK_OBJECT (window_main), "checkbutton_fullscreen", checkbutton_fullscreen,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
159 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
160 gtk_widget_show (checkbutton_fullscreen);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
161 gtk_box_pack_start (GTK_BOX (vbox3), checkbutton_fullscreen, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
162 gtk_tooltips_set_tip (tooltips, checkbutton_fullscreen, _("You can toggle between normal and fullscreen mode pressing key TAB or F11"), NULL);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
163
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
164 radiobutton_all_plugins = gtk_radio_button_new_with_label (buttongroup_plugins_group, _("All plugins"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
165 buttongroup_plugins_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton_all_plugins));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
166 gtk_widget_ref (radiobutton_all_plugins);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
167 gtk_object_set_data_full (GTK_OBJECT (window_main), "radiobutton_all_plugins", radiobutton_all_plugins,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
168 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
169 gtk_widget_show (radiobutton_all_plugins);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
170 gtk_box_pack_start (GTK_BOX (vbox3), radiobutton_all_plugins, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
171
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
172 radiobutton_onlynongl = gtk_radio_button_new_with_label (buttongroup_plugins_group, _("Only non GL plugins"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
173 buttongroup_plugins_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton_onlynongl));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
174 gtk_widget_ref (radiobutton_onlynongl);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
175 gtk_object_set_data_full (GTK_OBJECT (window_main), "radiobutton_onlynongl", radiobutton_onlynongl,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
176 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
177 gtk_widget_show (radiobutton_onlynongl);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
178 gtk_box_pack_start (GTK_BOX (vbox3), radiobutton_onlynongl, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
179
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
180 radiobutton_onlygl = gtk_radio_button_new_with_label (buttongroup_plugins_group, _("Only GL plugins"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
181 buttongroup_plugins_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton_onlygl));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
182 gtk_widget_ref (radiobutton_onlygl);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
183 gtk_object_set_data_full (GTK_OBJECT (window_main), "radiobutton_onlygl", radiobutton_onlygl,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
184 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
185 gtk_widget_show (radiobutton_onlygl);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
186 gtk_box_pack_start (GTK_BOX (vbox3), radiobutton_onlygl, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
187
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
188 hbox_fps = gtk_hbox_new (FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
189 gtk_widget_ref (hbox_fps);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
190 gtk_object_set_data_full (GTK_OBJECT (window_main), "hbox_fps", hbox_fps,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
191 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
192 gtk_widget_show (hbox_fps);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
193 gtk_box_pack_start (GTK_BOX (vbox3), hbox_fps, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
194 gtk_container_set_border_width (GTK_CONTAINER (hbox_fps), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
195
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
196 label_fps = gtk_label_new (_("Maximum Frames Per Second:"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
197 gtk_widget_ref (label_fps);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
198 gtk_object_set_data_full (GTK_OBJECT (window_main), "label_fps", label_fps,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
199 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
200 gtk_widget_show (label_fps);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
201 gtk_box_pack_start (GTK_BOX (hbox_fps), label_fps, FALSE, FALSE, 6);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
202 gtk_label_set_justify (GTK_LABEL (label_fps), GTK_JUSTIFY_LEFT);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
203
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
204 spinbutton_fps_adj = gtk_adjustment_new (30, 10, 100, 1, 10, 10);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
205 spinbutton_fps = gtk_spin_button_new (GTK_ADJUSTMENT (spinbutton_fps_adj), 1, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
206 gtk_widget_ref (spinbutton_fps);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
207 gtk_object_set_data_full (GTK_OBJECT (window_main), "spinbutton_fps", spinbutton_fps,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
208 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
209 gtk_widget_show (spinbutton_fps);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
210 gtk_box_pack_start (GTK_BOX (hbox_fps), spinbutton_fps, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
211
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
212 frame_morph_plugin = gtk_frame_new (_("Morph Plugin"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
213 gtk_widget_ref (frame_morph_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
214 gtk_object_set_data_full (GTK_OBJECT (window_main), "frame_morph_plugin", frame_morph_plugin,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
215 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
216 gtk_widget_show (frame_morph_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
217 gtk_box_pack_start (GTK_BOX (vbox_main), frame_morph_plugin, FALSE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
218 gtk_container_set_border_width (GTK_CONTAINER (frame_morph_plugin), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
219
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
220 vbox_morph_plugin = gtk_vbox_new (FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
221 gtk_widget_ref (vbox_morph_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
222 gtk_object_set_data_full (GTK_OBJECT (window_main), "vbox_morph_plugin", vbox_morph_plugin,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
223 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
224 gtk_widget_show (vbox_morph_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
225 gtk_container_add (GTK_CONTAINER (frame_morph_plugin), vbox_morph_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
226
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
227 optionmenu_morph_plugin = gtk_option_menu_new ();
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
228 gtk_widget_ref (optionmenu_morph_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
229 gtk_object_set_data_full (GTK_OBJECT (window_main), "optionmenu_morph_plugin", optionmenu_morph_plugin,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
230 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
231 gtk_widget_show (optionmenu_morph_plugin);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
232 gtk_box_pack_start (GTK_BOX (vbox_morph_plugin), optionmenu_morph_plugin, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
233 gtk_tooltips_set_tip (tooltips, optionmenu_morph_plugin, _("Select the kind of morph that will be applied when switching from one visualization plugin to another "), NULL);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
234 optionmenu_morph_plugin_menu = gtk_menu_new ();
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
235 gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu_morph_plugin), optionmenu_morph_plugin_menu);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
236
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
237 hbox_morph_plugin_controls = gtk_hbox_new (FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
238 gtk_widget_ref (hbox_morph_plugin_controls);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
239 gtk_object_set_data_full (GTK_OBJECT (window_main), "hbox_morph_plugin_controls", hbox_morph_plugin_controls,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
240 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
241 gtk_widget_show (hbox_morph_plugin_controls);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
242 gtk_box_pack_start (GTK_BOX (vbox_morph_plugin), hbox_morph_plugin_controls, TRUE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
243 gtk_container_set_border_width (GTK_CONTAINER (hbox_morph_plugin_controls), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
244
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
245 hbox_morph_plugin_buttons = gtk_hbox_new (TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
246 gtk_widget_ref (hbox_morph_plugin_buttons);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
247 gtk_object_set_data_full (GTK_OBJECT (window_main), "hbox_morph_plugin_buttons", hbox_morph_plugin_buttons,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
248 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
249 gtk_widget_show (hbox_morph_plugin_buttons);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
250 gtk_box_pack_start (GTK_BOX (hbox_morph_plugin_controls), hbox_morph_plugin_buttons, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
251
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
252 button_morph_plugin_conf = gtk_button_new_with_label (_("Configure"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
253 gtk_widget_ref (button_morph_plugin_conf);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
254 gtk_object_set_data_full (GTK_OBJECT (window_main), "button_morph_plugin_conf", button_morph_plugin_conf,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
255 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
256 gtk_widget_show (button_morph_plugin_conf);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
257 gtk_box_pack_start (GTK_BOX (hbox_morph_plugin_buttons), button_morph_plugin_conf, FALSE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
258 gtk_container_set_border_width (GTK_CONTAINER (button_morph_plugin_conf), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
259
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
260 button_morph_plugin_about = gtk_button_new_with_label (_("About"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
261 gtk_widget_ref (button_morph_plugin_about);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
262 gtk_object_set_data_full (GTK_OBJECT (window_main), "button_morph_plugin_about", button_morph_plugin_about,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
263 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
264 gtk_widget_show (button_morph_plugin_about);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
265 gtk_box_pack_start (GTK_BOX (hbox_morph_plugin_buttons), button_morph_plugin_about, FALSE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
266 gtk_container_set_border_width (GTK_CONTAINER (button_morph_plugin_about), 2);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
267
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
268 checkbutton_morph_random = gtk_check_button_new_with_label (_("Select one morph plugin randomly"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
269 gtk_widget_ref (checkbutton_morph_random);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
270 gtk_object_set_data_full (GTK_OBJECT (window_main), "checkbutton_morph_random", checkbutton_morph_random,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
271 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
272 gtk_widget_show (checkbutton_morph_random);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
273 gtk_box_pack_start (GTK_BOX (vbox_morph_plugin), checkbutton_morph_random, FALSE, FALSE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
274
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
275 hbox_main_buttons = gtk_hbox_new (TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
276 gtk_widget_ref (hbox_main_buttons);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
277 gtk_object_set_data_full (GTK_OBJECT (window_main), "hbox_main_buttons", hbox_main_buttons,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
278 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
279 gtk_widget_show (hbox_main_buttons);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
280 gtk_box_pack_start (GTK_BOX (vbox_main), hbox_main_buttons, FALSE, FALSE, 6);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
281
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
282 button_ok = gtk_button_new_with_label (_("Accept"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
283 gtk_widget_ref (button_ok);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
284 gtk_object_set_data_full (GTK_OBJECT (window_main), "button_ok", button_ok,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
285 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
286 gtk_widget_show (button_ok);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
287 gtk_box_pack_start (GTK_BOX (hbox_main_buttons), button_ok, FALSE, TRUE, 0);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
288 GTK_WIDGET_SET_FLAGS (button_ok, GTK_CAN_DEFAULT);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
289
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
290 button_apply = gtk_button_new_with_label (_("Apply"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
291 gtk_widget_ref (button_apply);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
292 gtk_object_set_data_full (GTK_OBJECT (window_main), "button_apply", button_apply,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
293 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
294 gtk_widget_show (button_apply);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
295 gtk_box_pack_start (GTK_BOX (hbox_main_buttons), button_apply, FALSE, TRUE, 6);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
296 GTK_WIDGET_SET_FLAGS (button_apply, GTK_CAN_DEFAULT);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
297
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
298 button_cancel = gtk_button_new_with_label (_("Cancel"));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
299 gtk_widget_ref (button_cancel);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
300 gtk_object_set_data_full (GTK_OBJECT (window_main), "button_cancel", button_cancel,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
301 (GtkDestroyNotify) gtk_widget_unref);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
302 gtk_widget_show (button_cancel);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
303 gtk_box_pack_start (GTK_BOX (hbox_main_buttons), button_cancel, FALSE, TRUE, 6);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
304 GTK_WIDGET_SET_FLAGS (button_cancel, GTK_CAN_DEFAULT);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
305
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
306 gtk_object_set_data (GTK_OBJECT (window_main), "tooltips", tooltips);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
307
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
308 config_gui = g_new0 (ConfigWin, 1);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
309
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
310 config_gui->window_main = window_main;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
311
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
312 config_gui->list_vis_plugins = list_vis_plugins;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
313 config_gui->button_vis_plugin_conf = button_vis_plugin_conf;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
314 config_gui->button_vis_plugin_about = button_vis_plugin_about;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
315 config_gui->checkbutton_vis_plugin = checkbutton_vis_plugin;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
316
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
317 config_gui->checkbutton_fullscreen = checkbutton_fullscreen;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
318 config_gui->radiobutton_onlygl = radiobutton_onlygl;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
319 config_gui->radiobutton_onlynongl = radiobutton_onlynongl;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
320 config_gui->radiobutton_all_plugins = radiobutton_all_plugins;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
321 config_gui->spinbutton_fps = spinbutton_fps;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
322
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
323 config_gui->optionmenu_morph_plugin = optionmenu_morph_plugin;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
324 config_gui->optionmenu_morph_plugin_group = NULL;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
325 config_gui->button_morph_plugin_conf = button_morph_plugin_conf;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
326 config_gui->button_morph_plugin_about = button_morph_plugin_about;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
327 config_gui->checkbutton_morph_random = checkbutton_morph_random;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
328
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
329 config_gui->button_ok = button_ok;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
330 config_gui->button_apply = button_apply;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
331 config_gui->button_cancel = button_cancel;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
332
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
333 return config_gui;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
334 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
335
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
336 /* This is a dummy pixmap we use when a pixmap can't be found. */
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
337 static char *dummy_pixmap_xpm[] = {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
338 /* columns rows colors chars-per-pixel */
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
339 "1 1 1 1",
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
340 " c None",
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
341 /* pixels */
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
342 " "
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
343 };
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
344
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
345 static GtkWidget *create_dummy_pixmap (GtkWidget *widget)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
346 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
347 GdkColormap *colormap;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
348 GdkPixmap *gdkpixmap;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
349 GdkBitmap *mask;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
350 GtkWidget *pixmap;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
351
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
352 colormap = gtk_widget_get_colormap (widget);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
353 gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
354 NULL, dummy_pixmap_xpm);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
355 if (gdkpixmap == NULL)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
356 g_error (_("Couldn't create replacement pixmap."));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
357 pixmap = gtk_pixmap_new (gdkpixmap, mask);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
358 gdk_pixmap_unref (gdkpixmap);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
359 gdk_bitmap_unref (mask);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
360 return pixmap;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
361 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
362
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
363 static GList *pixmaps_directories = NULL;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
364
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
365 static void add_pixmap_directory (const gchar *directory)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
366 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
367 pixmaps_directories = g_list_prepend (pixmaps_directories,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
368 g_strdup (directory));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
369 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
370
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
371 static GtkWidget *create_pixmap (GtkWidget *widget, const gchar *filename)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
372 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
373 gchar *found_filename = NULL;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
374 GdkColormap *colormap;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
375 GdkPixmap *gdkpixmap;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
376 GdkBitmap *mask;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
377 GtkWidget *pixmap;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
378 GList *elem;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
379
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
380 if (!filename || !filename[0])
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
381 return create_dummy_pixmap (widget);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
382
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
383 /* We first try any pixmaps directories set by the application. */
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
384 elem = pixmaps_directories;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
385 while (elem)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
386 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
387 found_filename = check_file_exists ((gchar*)elem->data, filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
388 if (found_filename)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
389 break;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
390 elem = elem->next;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
391 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
392
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
393 /* If we haven't found the pixmap, try the source directory. */
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
394 if (!found_filename)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
395 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
396 found_filename = check_file_exists ("../pixmaps", filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
397 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
398
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
399 if (!found_filename)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
400 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
401 g_warning (_("Couldn't find pixmap file: %s"), filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
402 return create_dummy_pixmap (widget);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
403 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
404
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
405 colormap = gtk_widget_get_colormap (widget);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
406 gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap, &mask,
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
407 NULL, found_filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
408 if (gdkpixmap == NULL)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
409 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
410 g_warning (_("Error loading pixmap file: %s"), found_filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
411 g_free (found_filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
412 return create_dummy_pixmap (widget);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
413 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
414 g_free (found_filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
415 pixmap = gtk_pixmap_new (gdkpixmap, mask);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
416 gdk_pixmap_unref (gdkpixmap);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
417 gdk_bitmap_unref (mask);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
418 return pixmap;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
419 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
420
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
421 static gchar *check_file_exists (const gchar *directory, const gchar *filename)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
422 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
423 gchar *full_filename;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
424 struct stat s;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
425 gint status;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
426
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
427 full_filename = (gchar*) g_malloc (strlen (directory) + 1
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
428 + strlen (filename) + 1);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
429 strcpy (full_filename, directory);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
430 strcat (full_filename, G_DIR_SEPARATOR_S);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
431 strcat (full_filename, filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
432
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
433 status = stat (full_filename, &s);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
434 if (status == 0 && S_ISREG (s.st_mode))
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
435 return full_filename;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
436 g_free (full_filename);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
437 return NULL;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
438 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
439
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
440 /*static GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
441 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
442 GtkWidget *parent, *found_widget;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
443
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
444 for (;;)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
445 {
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
446 if (GTK_IS_MENU (widget))
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
447 parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
448 else
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
449 parent = widget->parent;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
450 if (parent == NULL)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
451 break;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
452 widget = parent;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
453 }
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
454
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
455 found_widget = (GtkWidget*) gtk_object_get_data (GTK_OBJECT (widget),
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
456 widget_name);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
457 if (!found_widget)
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
458 g_warning ("Widget not found: %s", widget_name);
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
459 return found_widget;
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
460 }*/
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
461
639f07a07590 [svn] Merge libvisual-proxy.
nenolod
parents:
diff changeset
462 #endif