Mercurial > audlegacy-plugins
annotate src/skins/plugin.c @ 2680:e540e041b34b
add basic configuration gui
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Wed, 04 Jun 2008 14:27:05 +0200 |
parents | 096aa996e4fa |
children | a8328c40a5c1 |
rev | line source |
---|---|
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
1 /* |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
2 * Audacious - a cross-platform multimedia player |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
3 * Copyright (c) 2008 Tomasz Moń |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
4 * |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
6 * it under the terms of the GNU General Public License as published by |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
7 * the Free Software Foundation; under version 3 of the License. |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
8 * |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
9 * This program is distributed in the hope that it will be useful, |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
13 * |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses>. |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
16 * |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
17 * The Audacious team does not consider modular code linking to |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
18 * Audacious or using our public API to be a derived work. |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
19 */ |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
20 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
21 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
22 #include "plugin.h" |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
23 #include "skins_cfg.h" |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
24 #include "ui_skin.h" |
2579 | 25 #include "ui_skinned_window.h" |
2602
7cd898f08f31
work in progress - add ui_manager and ui_main_evlisteners
Tomasz Mon <desowin@gmail.com>
parents:
2592
diff
changeset
|
26 #include "ui_manager.h" |
7cd898f08f31
work in progress - add ui_manager and ui_main_evlisteners
Tomasz Mon <desowin@gmail.com>
parents:
2592
diff
changeset
|
27 #include "icons-stock.h" |
2633
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2608
diff
changeset
|
28 #include "ui_main_evlisteners.h" |
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2608
diff
changeset
|
29 #include "ui_playlist_evlisteners.h" |
2680
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
30 #include "ui_skinned_textbox.h" |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
31 #include "ui_skinned_playlist.h" |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
32 #include "ui_skinselector.h" |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
33 #include <audacious/i18n.h> |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
34 #include <libintl.h> |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
35 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
36 #define PACKAGE "audacious-plugins" |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
37 |
2675 | 38 gchar *skins_paths[SKINS_PATH_COUNT] = {}; |
39 | |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
40 GeneralPlugin skins_gp = |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
41 { |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
42 .description= "Audacious Skinned GUI", |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
43 .init = skins_init, |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
44 .about = skins_about, |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
45 .configure = skins_configure, |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
46 .cleanup = skins_cleanup |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
47 }; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
48 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
49 GeneralPlugin *skins_gplist[] = { &skins_gp, NULL }; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
50 SIMPLE_GENERAL_PLUGIN(skins, skins_gplist); |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
51 gboolean plugin_is_active = FALSE; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
52 |
2680
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
53 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
54 GtkWidget *skin_view; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
55 GtkWidget *skin_refresh_button; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
56 |
2675 | 57 static void skins_free_paths(void) { |
58 int i; | |
59 | |
2676
096aa996e4fa
clean some more stuff at skins_cleanup()
Tomasz Mon <desowin@gmail.com>
parents:
2675
diff
changeset
|
60 for (i = 0; i < SKINS_PATH_COUNT; i++) { |
2675 | 61 g_free(skins_paths[i]); |
2676
096aa996e4fa
clean some more stuff at skins_cleanup()
Tomasz Mon <desowin@gmail.com>
parents:
2675
diff
changeset
|
62 skins_paths[i] = NULL; |
2675 | 63 } |
64 } | |
65 | |
66 static void skins_init_paths() { | |
67 char *xdg_data_home; | |
68 char *xdg_cache_home; | |
69 | |
70 xdg_data_home = (getenv("XDG_DATA_HOME") == NULL | |
71 ? g_build_filename(g_get_home_dir(), ".local", "share", NULL) | |
72 : g_strdup(getenv("XDG_DATA_HOME"))); | |
73 xdg_cache_home = (getenv("XDG_CACHE_HOME") == NULL | |
74 ? g_build_filename(g_get_home_dir(), ".cache", NULL) | |
75 : g_strdup(getenv("XDG_CACHE_HOME"))); | |
76 | |
77 skins_paths[SKINS_PATH_USER_SKIN_DIR] = | |
78 g_build_filename(xdg_data_home, "audacious", "Skins", NULL); | |
79 skins_paths[SKINS_PATH_SKIN_THUMB_DIR] = | |
80 g_build_filename(xdg_cache_home, "audacious", "thumbs", NULL); | |
81 | |
82 g_free(xdg_data_home); | |
83 g_free(xdg_cache_home); | |
84 } | |
85 | |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
86 void skins_init(void) { |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
87 plugin_is_active = TRUE; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
88 g_log_set_handler(NULL, G_LOG_LEVEL_WARNING, g_log_default_handler, NULL); |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
89 |
2675 | 90 skins_init_paths(); |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2579
diff
changeset
|
91 skins_cfg_load(); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
92 |
2602
7cd898f08f31
work in progress - add ui_manager and ui_main_evlisteners
Tomasz Mon <desowin@gmail.com>
parents:
2592
diff
changeset
|
93 register_aud_stock_icons(); |
7cd898f08f31
work in progress - add ui_manager and ui_main_evlisteners
Tomasz Mon <desowin@gmail.com>
parents:
2592
diff
changeset
|
94 ui_manager_init(); |
7cd898f08f31
work in progress - add ui_manager and ui_main_evlisteners
Tomasz Mon <desowin@gmail.com>
parents:
2592
diff
changeset
|
95 ui_manager_create_menus(); |
7cd898f08f31
work in progress - add ui_manager and ui_main_evlisteners
Tomasz Mon <desowin@gmail.com>
parents:
2592
diff
changeset
|
96 mainwin_setup_menus(); |
7cd898f08f31
work in progress - add ui_manager and ui_main_evlisteners
Tomasz Mon <desowin@gmail.com>
parents:
2592
diff
changeset
|
97 |
2592
8f5999909416
add ui_main - with huge amount of #if 0 to sort out later
Tomasz Mon <desowin@gmail.com>
parents:
2582
diff
changeset
|
98 init_skins(config.skin); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
99 |
2635
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2633
diff
changeset
|
100 if (config.player_visible) mainwin_real_show(); |
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2633
diff
changeset
|
101 if (config.equalizer_visible) equalizerwin_show(TRUE); |
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2633
diff
changeset
|
102 if (config.playlist_visible) playlistwin_show(); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
103 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
104 return; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
105 } |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
106 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
107 void skins_cleanup(void) { |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
108 if (plugin_is_active == TRUE) { |
2635
b990e7eb0c25
save config on plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2633
diff
changeset
|
109 skins_cfg_save(); |
2675 | 110 skins_free_paths(); |
2633
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2608
diff
changeset
|
111 ui_main_evlistener_dissociate(); |
8e4af29f7e17
dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents:
2608
diff
changeset
|
112 ui_playlist_evlistener_dissociate(); |
2582
9b4dfc007b87
use more local configuration options
Tomasz Mon <desowin@gmail.com>
parents:
2579
diff
changeset
|
113 skins_cfg_free(); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
114 gtk_widget_destroy(mainwin); |
2608
857910a58188
don't quit audacious if skins plugin gets unloaded
Tomasz Mon <desowin@gmail.com>
parents:
2602
diff
changeset
|
115 gtk_widget_destroy(equalizerwin); |
2676
096aa996e4fa
clean some more stuff at skins_cleanup()
Tomasz Mon <desowin@gmail.com>
parents:
2675
diff
changeset
|
116 gtk_widget_destroy(playlistwin); |
096aa996e4fa
clean some more stuff at skins_cleanup()
Tomasz Mon <desowin@gmail.com>
parents:
2675
diff
changeset
|
117 ui_manager_destroy(); |
2608
857910a58188
don't quit audacious if skins plugin gets unloaded
Tomasz Mon <desowin@gmail.com>
parents:
2602
diff
changeset
|
118 skin_destroy(aud_active_skin); |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
119 aud_active_skin = NULL; |
2608
857910a58188
don't quit audacious if skins plugin gets unloaded
Tomasz Mon <desowin@gmail.com>
parents:
2602
diff
changeset
|
120 mainwin = NULL; |
857910a58188
don't quit audacious if skins plugin gets unloaded
Tomasz Mon <desowin@gmail.com>
parents:
2602
diff
changeset
|
121 equalizerwin = NULL; |
2637 | 122 playlistwin = NULL; |
123 mainwin_info = NULL; | |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
124 plugin_is_active = FALSE; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
125 } |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
126 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
127 return; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
128 } |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
129 |
2680
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
130 static void |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
131 playlist_show_pl_separator_numbers_cb() |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
132 { |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
133 playlistwin_update_list(aud_playlist_get_active()); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
134 } |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
135 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
136 static void |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
137 mainwin_font_set_cb() |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
138 { |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
139 ui_skinned_textbox_set_xfont(mainwin_info, !config.mainwin_use_bitmapfont, config.mainwin_font); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
140 } |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
141 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
142 static void |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
143 playlist_font_set_cb() |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
144 { |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
145 AUDDBG("Attempt to set font \"%s\"\n", config.playlist_font); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
146 ui_skinned_playlist_set_font(config.playlist_font); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
147 playlistwin_set_sinfo_font(config.playlist_font); /* propagate font setting to playlistwin_sinfo */ |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
148 playlistwin_update_list(aud_playlist_get_active()); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
149 } |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
150 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
151 static void |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
152 bitmap_fonts_cb() |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
153 { |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
154 ui_skinned_textbox_set_xfont(mainwin_info, !config.mainwin_use_bitmapfont, config.mainwin_font); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
155 playlistwin_set_sinfo_font(config.playlist_font); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
156 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
157 if (config.playlist_shaded) { |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
158 playlistwin_update_list(aud_playlist_get_active()); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
159 ui_skinned_window_draw_all(playlistwin); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
160 } |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
161 } |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
162 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
163 static void |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
164 show_wm_decorations_cb() |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
165 { |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
166 gtk_window_set_decorated(GTK_WINDOW(mainwin), config.show_wm_decorations); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
167 gtk_window_set_decorated(GTK_WINDOW(playlistwin), config.show_wm_decorations); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
168 gtk_window_set_decorated(GTK_WINDOW(equalizerwin), config.show_wm_decorations); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
169 } |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
170 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
171 static PreferencesWidget appearance_misc_widgets[] = { |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
172 {WIDGET_LABEL, N_("<b>_Fonts</b>"), NULL, NULL, NULL, FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
173 {WIDGET_FONT_BTN, N_("_Player:"), &config.mainwin_font, G_CALLBACK(mainwin_font_set_cb), N_("Select main player window font:"), FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
174 {WIDGET_FONT_BTN, N_("_Playlist:"), &config.playlist_font, G_CALLBACK(playlist_font_set_cb), N_("Select playlist font:"), FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
175 {WIDGET_CHK_BTN, N_("Use Bitmap fonts if available"), &config.mainwin_use_bitmapfont, G_CALLBACK(bitmap_fonts_cb), N_("Use bitmap fonts if they are available. Bitmap fonts do not support Unicode strings."), FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
176 {WIDGET_LABEL, N_("<b>_Miscellaneous</b>"), NULL, NULL, NULL, FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
177 {WIDGET_CHK_BTN, N_("Show track numbers in playlist"), &config.show_numbers_in_pl, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
178 G_CALLBACK(playlist_show_pl_separator_numbers_cb), NULL, FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
179 {WIDGET_CHK_BTN, N_("Show separators in playlist"), &config.show_separator_in_pl, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
180 G_CALLBACK(playlist_show_pl_separator_numbers_cb), NULL, FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
181 {WIDGET_CHK_BTN, N_("Show window manager decoration"), &config.show_wm_decorations, G_CALLBACK(show_wm_decorations_cb), |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
182 N_("This enables the window manager to show decorations for windows."), FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
183 {WIDGET_CHK_BTN, N_("Use two-way text scroller"), &config.twoway_scroll, NULL, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
184 N_("If selected, the file information text in the main window will scroll back and forth. If not selected, the text will only scroll in one direction."), FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
185 {WIDGET_CHK_BTN, N_("Disable inline gtk theme"), &config.disable_inline_gtk, NULL, NULL, FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
186 {WIDGET_CHK_BTN, N_("Allow loading incomplete skins"), &config.allow_broken_skins, NULL, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
187 N_("If selected, audacious won't refuse loading broken skins. Use only if your favourite skin doesn't work"), FALSE}, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
188 }; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
189 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
190 static gboolean |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
191 on_skin_view_realize(GtkTreeView * treeview, |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
192 gpointer data) |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
193 { |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
194 skin_view_realize(treeview); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
195 skin_view_update(GTK_TREE_VIEW(skin_view), GTK_WIDGET(skin_refresh_button)); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
196 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
197 return TRUE; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
198 } |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
199 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
200 void skins_configure(void) { |
2680
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
201 static GtkWidget *cfg_win = NULL; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
202 GtkWidget *appearance_page_vbox; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
203 GtkWidget *vbox37; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
204 GtkWidget *vbox38; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
205 GtkWidget *hbox12; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
206 GtkWidget *alignment94; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
207 GtkWidget *hbox13; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
208 GtkWidget *label103; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
209 GtkWidget *colorspace_button; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
210 GtkWidget *image11; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
211 GtkWidget *image12; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
212 GtkWidget *alignment95; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
213 GtkWidget *skin_view_scrolled_window; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
214 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
215 if (cfg_win != NULL) { |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
216 gtk_window_present(GTK_WINDOW(cfg_win)); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
217 return; |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
218 } |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
219 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
220 cfg_win = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
221 gtk_window_set_type_hint(GTK_WINDOW(cfg_win), GDK_WINDOW_TYPE_HINT_DIALOG); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
222 gtk_window_set_title(GTK_WINDOW(cfg_win), _("Audacious Skinned GUI Configuration")); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
223 gtk_container_set_border_width(GTK_CONTAINER(cfg_win), 10); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
224 g_signal_connect(G_OBJECT(cfg_win), "destroy" , |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
225 G_CALLBACK(gtk_widget_destroyed), &cfg_win); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
226 gtk_widget_set_size_request(cfg_win, 500, -1); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
227 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
228 appearance_page_vbox = gtk_vbox_new (FALSE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
229 gtk_container_add(GTK_CONTAINER(cfg_win), appearance_page_vbox); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
230 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
231 vbox37 = gtk_vbox_new (FALSE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
232 gtk_box_pack_start (GTK_BOX (appearance_page_vbox), vbox37, TRUE, TRUE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
233 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
234 vbox38 = gtk_vbox_new (FALSE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
235 gtk_box_pack_start (GTK_BOX (vbox37), vbox38, FALSE, TRUE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
236 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
237 hbox12 = gtk_hbox_new (FALSE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
238 gtk_box_pack_start (GTK_BOX (vbox38), hbox12, TRUE, TRUE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
239 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
240 alignment94 = gtk_alignment_new (0.5, 0.5, 1, 1); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
241 gtk_box_pack_start (GTK_BOX (hbox12), alignment94, TRUE, TRUE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
242 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment94), 0, 4, 0, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
243 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
244 hbox13 = gtk_hbox_new (FALSE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
245 gtk_container_add (GTK_CONTAINER (alignment94), hbox13); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
246 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
247 label103 = gtk_label_new_with_mnemonic (_("<b>_Skin</b>")); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
248 gtk_box_pack_start (GTK_BOX (hbox13), label103, TRUE, TRUE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
249 gtk_label_set_use_markup (GTK_LABEL (label103), TRUE); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
250 gtk_misc_set_alignment (GTK_MISC (label103), 0, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
251 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
252 colorspace_button = gtk_button_new (); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
253 gtk_box_pack_start (GTK_BOX (hbox13), colorspace_button, FALSE, FALSE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
254 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
255 image11 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
256 gtk_container_add (GTK_CONTAINER (colorspace_button), image11); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
257 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
258 skin_refresh_button = gtk_button_new (); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
259 gtk_box_pack_start (GTK_BOX (hbox13), skin_refresh_button, FALSE, FALSE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
260 GTK_WIDGET_UNSET_FLAGS (skin_refresh_button, GTK_CAN_FOCUS); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
261 gtk_button_set_relief (GTK_BUTTON (skin_refresh_button), GTK_RELIEF_HALF); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
262 gtk_button_set_focus_on_click (GTK_BUTTON (skin_refresh_button), FALSE); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
263 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
264 image12 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
265 gtk_container_add (GTK_CONTAINER (skin_refresh_button), image12); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
266 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
267 alignment95 = gtk_alignment_new (0.5, 0.5, 1, 1); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
268 gtk_box_pack_start (GTK_BOX (vbox38), alignment95, TRUE, TRUE, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
269 gtk_widget_set_size_request (alignment95, -1, 172); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
270 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment95), 0, 0, 12, 0); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
271 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
272 skin_view_scrolled_window = gtk_scrolled_window_new (NULL, NULL); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
273 gtk_container_add (GTK_CONTAINER (alignment95), skin_view_scrolled_window); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
274 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
275 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_SHADOW_IN); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
276 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
277 skin_view = gtk_tree_view_new (); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
278 gtk_container_add (GTK_CONTAINER (skin_view_scrolled_window), skin_view); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
279 gtk_widget_set_size_request (skin_view, -1, 100); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
280 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
281 aud_create_widgets(GTK_BOX(vbox37), appearance_misc_widgets, G_N_ELEMENTS(appearance_misc_widgets)); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
282 gtk_widget_show_all(appearance_page_vbox); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
283 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
284 #if 0 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
285 g_signal_connect(G_OBJECT(colorspace_button), "clicked", |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
286 G_CALLBACK(on_colorize_button_clicked), |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
287 NULL); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
288 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
289 g_signal_connect(skin_view, "drag-data-received", |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
290 G_CALLBACK(on_skin_view_drag_data_received), |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
291 NULL); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
292 aud_drag_dest_set(skin_view); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
293 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
294 g_signal_connect(mainwin, "drag-data-received", |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
295 G_CALLBACK(mainwin_drag_data_received), |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
296 skin_view); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
297 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
298 g_signal_connect(skin_refresh_button, "clicked", |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
299 G_CALLBACK(on_skin_refresh_button_clicked), |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
300 NULL); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
301 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
302 g_signal_connect_swapped(G_OBJECT(skin_refresh_button), "clicked", |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
303 G_CALLBACK(on_skin_refresh_button_clicked), |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
304 prefswin); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
305 #endif |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
306 g_signal_connect_after(G_OBJECT(skin_view), "realize", |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
307 G_CALLBACK(on_skin_view_realize), |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
308 NULL); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
309 |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
310 gtk_window_present(GTK_WINDOW(cfg_win)); |
e540e041b34b
add basic configuration gui
Tomasz Mon <desowin@gmail.com>
parents:
2676
diff
changeset
|
311 |
2572
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
312 return; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
313 } |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
314 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
315 void skins_about(void) { |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
316 static GtkWidget* about_window = NULL; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
317 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
318 if (about_window) { |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
319 gtk_window_present(GTK_WINDOW(about_window)); |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
320 return; |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
321 } |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
322 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
323 about_window = audacious_info_dialog(_("About Skinned GUI"), |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
324 _("Copyright (c) 2008, by Tomasz Moń <desowin@gmail.com>\n\n"), |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
325 _("OK"), FALSE, NULL, NULL); |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
326 |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
327 g_signal_connect(G_OBJECT(about_window), "destroy", G_CALLBACK(gtk_widget_destroyed), &about_window); |
d0daee216c8d
stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff
changeset
|
328 } |