annotate src/audacious/ui_preferences.c @ 4051:c07a3723777c

Prevent segfault when adding M3U playlists with URIs. Needs a cleaner solutions later.
author Christian Birchinger <joker@netswarm.net>
date Sat, 01 Dec 2007 20:51:47 +0100
parents 92e3662004d6
children 7ecdb78a051e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1 /* Audacious - Cross-platform multimedia player
4034
efd6c22780f9 This code no longer has anything to do with BMP classic, dropping that copyright notice.
William Pitcock <nenolod@atheme.org>
parents: 4033
diff changeset
2 * Copyright (C) 2005-2007 Audacious development team.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 3113
diff changeset
6 * the Free Software Foundation; under version 3 of the License.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
7 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
8 * This program is distributed in the hope that it will be useful,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
11 * GNU General Public License for more details.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
12 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
13 * You should have received a copy of the GNU General Public License
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 3113
diff changeset
14 * along with this program. If not, see <http://www.gnu.org/licenses>.
3123
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
15 *
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
16 * The Audacious team does not consider modular code linking to
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
17 * Audacious or using our public API to be a derived work.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
20 #ifdef HAVE_CONFIG_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
21 # include "config.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
22 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
23
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
24 #include <glib.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
25 #include <glib/gi18n.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26 #include <gtk/gtk.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27 #include <string.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
28 #include <stddef.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
29 #include <stdio.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
30 #include <sys/types.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
31 #include <dirent.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
32 #include <unistd.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33 #include <errno.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
34 #include <sys/types.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
35 #include <sys/stat.h>
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
36 #include <gdk/gdkkeysyms.h>
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
37
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38 #include "plugin.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
39 #include "pluginenum.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
40 #include "input.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
41 #include "effect.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
42 #include "general.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
43 #include "output.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
44 #include "visualization.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
45
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
46 #include "main.h"
2911
cd21a4556dd2 include UiSkinnedTextbox
Tomasz Mon <desowin@gmail.com>
parents: 2717
diff changeset
47 #include "ui_skinned_textbox.h"
2373
ad1d7687814c [svn] made strings.h for existing strings.c, cleanups
mf0102
parents: 2328
diff changeset
48 #include "strings.h"
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
49 #include "util.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
50 #include "dnd.h"
2717
6884a2144a01 [svn] - make audacious build again
nenolod
parents: 2682
diff changeset
51 #include "configdb.h"
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
52
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
53 #include "ui_main.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
54 #include "ui_playlist.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
55 #include "ui_skinselector.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
56 #include "ui_preferences.h"
2328
d88558b0de0a [svn] - Added script for migration to XDG basedir.
js
parents: 2313
diff changeset
57 #include "ui_equalizer.h"
3217
764e8f87c186 port PlayList_List to gtk2
Tomasz Mon <desowin@gmail.com>
parents: 3165
diff changeset
58 #include "ui_skinned_playlist.h"
3221
9583cd62231f implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents: 3217
diff changeset
59 #include "ui_skinned_window.h"
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
60
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
61 #include "build_stamp.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
62
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
63 enum CategoryViewCols {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
64 CATEGORY_VIEW_COL_ICON,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
65 CATEGORY_VIEW_COL_NAME,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
66 CATEGORY_VIEW_COL_ID,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
67 CATEGORY_VIEW_N_COLS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
68 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
69
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
70 enum PluginViewCols {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
71 PLUGIN_VIEW_COL_ACTIVE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
72 PLUGIN_VIEW_COL_DESC,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
73 PLUGIN_VIEW_COL_FILENAME,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
74 PLUGIN_VIEW_COL_ID,
3439
93584d1b3e7e Add plugin pointer to the plugin treestore.
William Pitcock <nenolod@atheme.org>
parents: 3437
diff changeset
75 PLUGIN_VIEW_COL_PLUGIN_PTR,
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
76 PLUGIN_VIEW_N_COLS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
77 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
78
3353
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
79 enum PluginViewType {
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
80 PLUGIN_VIEW_TYPE_INPUT,
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
81 PLUGIN_VIEW_TYPE_GENERAL,
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
82 PLUGIN_VIEW_TYPE_VIS,
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
83 PLUGIN_VIEW_TYPE_EFFECT
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
84 };
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
85
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
86 typedef struct {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
87 const gchar *icon_path;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
88 const gchar *name;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
89 gint id;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
90 } Category;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
91
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
92 typedef struct {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
93 const gchar *name;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
94 const gchar *tag;
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
95 } TitleFieldTag;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
96
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
97 static GtkWidget *prefswin = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
98 static GtkWidget *filepopup_settings = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
99 static GtkWidget *colorize_settings = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
100 static GtkWidget *category_treeview = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
101 static GtkWidget *category_notebook = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
102 GtkWidget *filepopupbutton = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
103
3989
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
104 /* colorize settings scales */
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
105 GtkWidget *green_scale;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
106 GtkWidget *red_scale;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
107 GtkWidget *blue_scale;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
108
3990
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
109 /* filepopup settings widgets */
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
110 GtkWidget *filepopup_settings_cover_name_include;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
111 GtkWidget *filepopup_settings_cover_name_exclude;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
112 GtkWidget *filepopup_settings_recurse_for_cover;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
113 GtkWidget *filepopup_settings_recurse_for_cover_depth;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
114 GtkWidget *filepopup_settings_recurse_for_cover_depth_box;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
115 GtkWidget *filepopup_settings_use_file_cover;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
116 GtkWidget *filepopup_settings_showprogressbar;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
117 GtkWidget *filepopup_settings_delay;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
118
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
119 /* prefswin widgets */
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
120 GtkWidget *titlestring_entry;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
121 GtkWidget *skin_view;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
122 GtkWidget *skin_refresh_button;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
123 GtkWidget *filepopup_for_tuple_settings_button;
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
124 GtkTooltips *tooltips;
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
125
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
126 static Category categories[] = {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
127 {DATA_DIR "/images/appearance.png", N_("Appearance"), 1},
4045
f81e86d8e8e4 removed equalizer options page, because i can imagine hardly anyone who
mf0102 <0102@gmx.at>
parents: 4043
diff changeset
128 {DATA_DIR "/images/audio.png", N_("Audio"), 5},
f81e86d8e8e4 removed equalizer options page, because i can imagine hardly anyone who
mf0102 <0102@gmx.at>
parents: 4043
diff changeset
129 {DATA_DIR "/images/connectivity.png", N_("Connectivity"), 4},
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
130 {DATA_DIR "/images/mouse.png", N_("Mouse"), 2},
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
131 {DATA_DIR "/images/playlist.png", N_("Playlist"), 3},
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
132 {DATA_DIR "/images/plugins.png", N_("Plugins"), 0},
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
133 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
134
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
135 static gint n_categories = G_N_ELEMENTS(categories);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
136
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
137 static TitleFieldTag title_field_tags[] = {
3441
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
138 { N_("Artist") , "${artist}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
139 { N_("Album") , "${album}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
140 { N_("Title") , "${title}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
141 { N_("Tracknumber"), "${track-number}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
142 { N_("Genre") , "${genre}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
143 { N_("Filename") , "${file-name}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
144 { N_("Filepath") , "${file-path}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
145 { N_("Date") , "${date}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
146 { N_("Year") , "${year}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
147 { N_("Comment") , "${comment}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
148 { N_("Codec") , "${codec}" },
bd1a68dc9ebb Change xmms titlestring format values to Tuplez.
William Pitcock <nenolod@atheme.org>
parents: 3439
diff changeset
149 { N_("Quality") , "${quality}" },
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
150 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
151
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
152 typedef struct {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
153 void *next;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
154 GtkWidget *container;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
155 char *pg_name;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
156 char *img_url;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
157 } CategoryQueueEntry;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
158
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
159 CategoryQueueEntry *category_queue = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
160
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
161 static const guint n_title_field_tags = G_N_ELEMENTS(title_field_tags);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
162
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
163 typedef enum {
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
164 WIDGET_NONE,
4003
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
165 WIDGET_CHK_BTN,
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
166 WIDGET_LABEL,
4006
8a3cee5c303b one more commit
Tomasz Mon <desowin@gmail.com>
parents: 4005
diff changeset
167 WIDGET_RADIO_BTN,
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
168 WIDGET_SPIN_BTN,
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
169 WIDGET_CUSTOM, /* 'custom' widget, you hand back the widget you want to add --nenolod */
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
170 } WidgetType;
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
171
4040
83d9f8f98e36 Use PreferencesWidget instead of preferences_widget_t so that the code matches the established style of that file.
William Pitcock <nenolod@atheme.org>
parents: 4038
diff changeset
172 typedef struct {
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
173 WidgetType type; /* widget type */
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
174 char *label; /* widget title (for SPIN_BTN it's text left to widget)*/
4047
92e3662004d6 Use "gpointer cfg;" instead of "gboolean *cfg;" to avoid warnings when setting a string.
William Pitcock <nenolod@atheme.org>
parents: 4045
diff changeset
175 gpointer cfg; /* connected config value */
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
176 void (*callback) (void); /* this func will be called after value change, can be NULL */
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
177 char *tooltip; /* widget tooltip (for SPIN_BTN it's text right to widget), can be NULL */
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
178 gboolean child;
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
179 GtkWidget *(*populate) (void); /* for WIDGET_CUSTOM --nenolod */
4040
83d9f8f98e36 Use PreferencesWidget instead of preferences_widget_t so that the code matches the established style of that file.
William Pitcock <nenolod@atheme.org>
parents: 4038
diff changeset
180 } PreferencesWidget;
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
181
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
182 static void playlist_show_pl_separator_numbers_cb();
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
183 static void show_wm_decorations_cb();
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
184 GtkWidget *ui_preferences_chardet_table_populate(void);
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
185
4045
f81e86d8e8e4 removed equalizer options page, because i can imagine hardly anyone who
mf0102 <0102@gmx.at>
parents: 4043
diff changeset
186 static PreferencesWidget appearance_misc_widgets[] = {
4033
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
187 {WIDGET_LABEL, N_("<b>_Miscellaneous</b>"), NULL, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
188 {WIDGET_CHK_BTN, N_("Show track numbers in playlist"), &cfg.show_numbers_in_pl,
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
189 G_CALLBACK(playlist_show_pl_separator_numbers_cb), NULL, FALSE},
4033
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
190 {WIDGET_CHK_BTN, N_("Show separators in playlist"), &cfg.show_separator_in_pl,
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
191 G_CALLBACK(playlist_show_pl_separator_numbers_cb), NULL, FALSE},
4033
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
192 {WIDGET_CHK_BTN, N_("Use custom cursors"), &cfg.custom_cursors, G_CALLBACK(skin_reload_forced), NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
193 {WIDGET_CHK_BTN, N_("Show window manager decoration"), &cfg.show_wm_decorations, G_CALLBACK(show_wm_decorations_cb),
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
194 N_("This enables the window manager to show decorations for windows."), FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
195 {WIDGET_CHK_BTN, N_("Use XMMS-style file selector instead of the default selector"), &cfg.use_xmms_style_fileselector, NULL,
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
196 N_("This enables the XMMS/GTK1-style file selection dialogs. This selector is provided by Audacious itself and is faster than the default GTK2 selector (but sadly not as user-friendly)."), FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
197 {WIDGET_CHK_BTN, N_("Use two-way text scroller"), &cfg.twoway_scroll, NULL,
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
198 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},
4003
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
199 };
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
200
4040
83d9f8f98e36 Use PreferencesWidget instead of preferences_widget_t so that the code matches the established style of that file.
William Pitcock <nenolod@atheme.org>
parents: 4038
diff changeset
201 static PreferencesWidget audio_page_widgets[] = {
4033
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
202 {WIDGET_LABEL, N_("<b>Format Detection</b>"), NULL, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
203 {WIDGET_CHK_BTN, N_("Detect file formats on demand, instead of immediately."), &cfg.playlist_detect, NULL,
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
204 N_("When checked, Audacious will detect file formats on demand. This can result in a messier playlist, but delivers a major speed benefit."), FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
205 {WIDGET_CHK_BTN, N_("Detect file formats by extension."), &cfg.use_extension_probing, NULL,
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
206 N_("When checked, Audacious will detect file formats based by extension. Only files with extensions of supported formats will be loaded."), FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
207 {WIDGET_LABEL, N_("<b>Playback</b>"), NULL, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
208 {WIDGET_CHK_BTN, N_("Continue playback on startup"), &cfg.resume_playback_on_startup, NULL,
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
209 N_("When Audacious starts, automatically begin playing from the point where we stopped before."), FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
210 {WIDGET_CHK_BTN, N_("Don't advance in the playlist"), &cfg.no_playlist_advance, NULL,
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
211 N_("When finished playing a song, don't automatically advance to the next."), FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
212 {WIDGET_CHK_BTN, N_("Pause between songs"), &cfg.pause_between_songs, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
213 {WIDGET_SPIN_BTN, N_("Pause for"), &cfg.pause_between_songs_time, NULL, N_("seconds"), TRUE},
4004
196c326d9b70 again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4003
diff changeset
214 };
196c326d9b70 again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4003
diff changeset
215
4040
83d9f8f98e36 Use PreferencesWidget instead of preferences_widget_t so that the code matches the established style of that file.
William Pitcock <nenolod@atheme.org>
parents: 4038
diff changeset
216 static PreferencesWidget playlist_page_widgets[] = {
4033
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
217 {WIDGET_LABEL, N_("<b>Filename</b>"), NULL, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
218 {WIDGET_CHK_BTN, N_("Convert underscores to blanks"), &cfg.convert_underscore, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
219 {WIDGET_CHK_BTN, N_("Convert %20 to blanks"), &cfg.convert_twenty, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
220 {WIDGET_CHK_BTN, N_("Convert backslash '\\' to forward slash '/'"), &cfg.convert_slash, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
221 {WIDGET_LABEL, N_("<b>Metadata</b>"), NULL, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
222 {WIDGET_CHK_BTN, N_("Load metadata from playlists and files"), &cfg.use_pl_metadata, NULL, N_("Load metadata (tag information) from music files."), FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
223 {WIDGET_RADIO_BTN, N_("On load"), &cfg.get_info_on_load, NULL, N_("Load metadata when adding the file to the playlist or opening it"), TRUE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
224 {WIDGET_RADIO_BTN, N_("On display"), &cfg.get_info_on_demand, NULL, N_("Load metadata on demand when displaying the file in the playlist. You may need to set \"Detect file formats on demand\" in Audio page for full benefit."), TRUE},
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
225 {WIDGET_CUSTOM, NULL, NULL, NULL, NULL, TRUE, ui_preferences_chardet_table_populate},
4033
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
226 {WIDGET_LABEL, N_("<b>File Dialog</b>"), NULL, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
227 {WIDGET_CHK_BTN, N_("Always refresh directory when opening file dialog"), &cfg.refresh_file_list, NULL, N_("Always refresh the file dialog (this will slow opening the dialog on large directories, and Gnome VFS should handle automatically)."), FALSE},
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
228 };
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
229
4040
83d9f8f98e36 Use PreferencesWidget instead of preferences_widget_t so that the code matches the established style of that file.
William Pitcock <nenolod@atheme.org>
parents: 4038
diff changeset
230 static PreferencesWidget mouse_page_widgets[] = {
4033
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
231 {WIDGET_LABEL, N_("<b>Mouse wheel</b>"), NULL, NULL, NULL, FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
232 {WIDGET_SPIN_BTN, N_("Changes volume by"), &cfg.mouse_change, NULL, N_("percent"), FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
233 {WIDGET_SPIN_BTN, N_("Scrolls playlist by"), &cfg.scroll_pl_by, NULL, N_("lines"), FALSE},
ce2f168de9a6 style cleanups:
William Pitcock <nenolod@atheme.org>
parents: 4008
diff changeset
234 };
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
235
3991
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
236 static void create_colorize_settings(void);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
237 static void prefswin_page_queue_destroy(CategoryQueueEntry *ent);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
238
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
239 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
240 change_category(GtkNotebook * notebook,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
241 GtkTreeSelection * selection)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
242 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
243 GtkTreeModel *model;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
244 GtkTreeIter iter;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
245 gint index;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
246
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
247 if (!gtk_tree_selection_get_selected(selection, &model, &iter))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
248 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
249
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
250 gtk_tree_model_get(model, &iter, CATEGORY_VIEW_COL_ID, &index, -1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
251 gtk_notebook_set_current_page(notebook, index);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
252 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
253
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
254 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
255 prefswin_set_category(gint index)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
256 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
257 g_return_if_fail(index >= 0 && index < n_categories);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
258
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
259 gtk_notebook_set_current_page(GTK_NOTEBOOK(category_treeview), index);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
260 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
261
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
262 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
263 output_plugin_open_prefs(GtkComboBox * cbox,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
264 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
265 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
266 output_configure(gtk_combo_box_get_active(cbox));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
267 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
268
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
269 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
270 output_plugin_open_info(GtkComboBox * cbox,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
271 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
272 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
273 output_about(gtk_combo_box_get_active(cbox));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
274 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
275
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
276 static void
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
277 plugin_toggle(GtkCellRendererToggle * cell,
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
278 const gchar * path_str,
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
279 gpointer data)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
280 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
281 GtkTreeModel *model = GTK_TREE_MODEL(data);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
282 GtkTreeIter iter;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
283 GtkTreePath *path = gtk_tree_path_new_from_string(path_str);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
284 gint pluginnr;
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
285 gint plugin_type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(data), "plugin_type"));
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
286
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
287 /* get toggled iter */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
288 gtk_tree_model_get_iter(model, &iter, path);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
289
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
290 if (plugin_type == PLUGIN_VIEW_TYPE_INPUT) {
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
291 Plugin *plugin;
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
292 /*GList *diplist, *tmplist; */
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
293
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
294 gtk_tree_model_get(model, &iter,
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
295 PLUGIN_VIEW_COL_ID, &pluginnr,
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
296 PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
297
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
298 /* do something with the value */
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
299 plugin->enabled ^= 1;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
300
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
301 /* set new value */
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
302 gtk_list_store_set(GTK_LIST_STORE(model), &iter,
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
303 PLUGIN_VIEW_COL_ACTIVE, plugin->enabled, -1);
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
304 } else {
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
305 gboolean fixed;
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
306 gtk_tree_model_get(model, &iter,
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
307 PLUGIN_VIEW_COL_ACTIVE, &fixed,
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
308 PLUGIN_VIEW_COL_ID, &pluginnr, -1);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
309
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
310 /* do something with the value */
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
311 fixed ^= 1;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
312
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
313 switch (plugin_type) {
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
314 case PLUGIN_VIEW_TYPE_GENERAL:
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
315 enable_general_plugin(pluginnr, fixed);
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
316 break;
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
317 case PLUGIN_VIEW_TYPE_VIS:
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
318 enable_vis_plugin(pluginnr, fixed);
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
319 break;
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
320 case PLUGIN_VIEW_TYPE_EFFECT:
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
321 enable_effect_plugin(pluginnr, fixed);
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
322 break;
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
323 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
324
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
325 /* set new value */
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
326 gtk_list_store_set(GTK_LIST_STORE(model), &iter,
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
327 PLUGIN_VIEW_COL_ACTIVE, fixed, -1);
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
328 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
329
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
330 /* clean up */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
331 gtk_tree_path_free(path);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
332 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
333
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
334 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
335 on_output_plugin_cbox_changed(GtkComboBox * combobox,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
336 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
337 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
338 gint selected;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
339 selected = gtk_combo_box_get_active(combobox);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
340
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
341 set_current_output_plugin(selected);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
342 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
343
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
344 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
345 on_output_plugin_cbox_realize(GtkComboBox * cbox,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
346 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
347 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
348 GList *olist = get_output_list();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
349 OutputPlugin *op, *cp = get_current_output_plugin();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
350 gint i = 0, selected = 0;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
351
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
352 if (!olist) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
353 gtk_widget_set_sensitive(GTK_WIDGET(cbox), FALSE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
354 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
355 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
356
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
357 for (i = 0; olist; i++, olist = g_list_next(olist)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
358 op = OUTPUT_PLUGIN(olist->data);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
359
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
360 if (olist->data == cp)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
361 selected = i;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
362
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
363 gtk_combo_box_append_text(cbox, op->description);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
364 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
365
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
366 gtk_combo_box_set_active(cbox, selected);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
367 g_signal_connect(cbox, "changed",
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
368 G_CALLBACK(on_output_plugin_cbox_changed), NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
369 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
370
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
371 static void
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
372 on_plugin_view_realize(GtkTreeView * treeview,
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
373 GCallback callback,
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
374 gpointer data,
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
375 gint plugin_type)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
376 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
377 GtkListStore *store;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
378 GtkTreeIter iter;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
379
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
380 GtkCellRenderer *renderer;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
381 GtkTreeViewColumn *column;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
382
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
383 GList *ilist;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
384 gchar *description[2];
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
385 gint id = 0;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
386
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
387 GList *list = (GList *) data;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
388
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
389 store = gtk_list_store_new(PLUGIN_VIEW_N_COLS,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
390 G_TYPE_BOOLEAN, G_TYPE_STRING,
3439
93584d1b3e7e Add plugin pointer to the plugin treestore.
William Pitcock <nenolod@atheme.org>
parents: 3437
diff changeset
391 G_TYPE_STRING, G_TYPE_INT, G_TYPE_POINTER);
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
392 g_object_set_data(G_OBJECT(store), "plugin_type" , GINT_TO_POINTER(plugin_type));
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
393
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
394 column = gtk_tree_view_column_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
395 gtk_tree_view_column_set_title(column, _("Enabled"));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
396 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
397 gtk_tree_view_column_set_spacing(column, 4);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
398 gtk_tree_view_column_set_resizable(column, FALSE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
399 gtk_tree_view_column_set_fixed_width(column, 50);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
400
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
401 renderer = gtk_cell_renderer_toggle_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
402 g_signal_connect(renderer, "toggled",
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
403 G_CALLBACK(callback), store);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
404 gtk_tree_view_column_pack_start(column, renderer, TRUE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
405 gtk_tree_view_column_set_attributes(column, renderer, "active",
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
406 PLUGIN_VIEW_COL_ACTIVE, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
407
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
408 gtk_tree_view_append_column(treeview, column);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
409
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
410 column = gtk_tree_view_column_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
411 gtk_tree_view_column_set_title(column, _("Description"));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
412 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
413 gtk_tree_view_column_set_spacing(column, 4);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
414 gtk_tree_view_column_set_resizable(column, TRUE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
415
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
416
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
417 renderer = gtk_cell_renderer_text_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
418 gtk_tree_view_column_pack_start(column, renderer, FALSE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
419 gtk_tree_view_column_set_attributes(column, renderer,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
420 "text", PLUGIN_VIEW_COL_DESC, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
421 gtk_tree_view_append_column(treeview, column);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
422
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
423 column = gtk_tree_view_column_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
424
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
425 gtk_tree_view_column_set_title(column, _("Filename"));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
426 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
427 gtk_tree_view_column_set_spacing(column, 4);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
428 gtk_tree_view_column_set_resizable(column, TRUE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
429
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
430 renderer = gtk_cell_renderer_text_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
431 gtk_tree_view_column_pack_start(column, renderer, TRUE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
432 gtk_tree_view_column_set_attributes(column, renderer, "text",
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
433 PLUGIN_VIEW_COL_FILENAME, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
434
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
435 gtk_tree_view_append_column(treeview, column);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
436
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
437 MOWGLI_ITER_FOREACH(ilist, list)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
438 {
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
439 Plugin *plugin = PLUGIN(ilist->data);
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
440
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
441 description[0] = g_strdup(plugin->description);
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
442 description[1] = g_strdup(plugin->filename);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
443
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
444 gtk_list_store_append(store, &iter);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
445 gtk_list_store_set(store, &iter,
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
446 PLUGIN_VIEW_COL_ACTIVE, plugin->enabled,
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
447 PLUGIN_VIEW_COL_DESC, description[0],
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
448 PLUGIN_VIEW_COL_FILENAME, description[1],
3439
93584d1b3e7e Add plugin pointer to the plugin treestore.
William Pitcock <nenolod@atheme.org>
parents: 3437
diff changeset
449 PLUGIN_VIEW_COL_ID, id++,
93584d1b3e7e Add plugin pointer to the plugin treestore.
William Pitcock <nenolod@atheme.org>
parents: 3437
diff changeset
450 PLUGIN_VIEW_COL_PLUGIN_PTR, plugin, -1);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
451
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
452 g_free(description[1]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
453 g_free(description[0]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
454 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
455
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
456 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
457 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
458
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
459 static void
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
460 on_input_plugin_view_realize(GtkTreeView * treeview,
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
461 gpointer data)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
462 {
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
463 on_plugin_view_realize(treeview, G_CALLBACK(plugin_toggle), ip_data.input_list, PLUGIN_VIEW_TYPE_INPUT);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
464 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
465
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
466 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
467 on_effect_plugin_view_realize(GtkTreeView * treeview,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
468 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
469 {
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
470 on_plugin_view_realize(treeview, G_CALLBACK(plugin_toggle), ep_data.effect_list, PLUGIN_VIEW_TYPE_EFFECT);
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
471 }
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
472
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
473 static void
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
474 on_general_plugin_view_realize(GtkTreeView * treeview,
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
475 gpointer data)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
476 {
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
477 on_plugin_view_realize(treeview, G_CALLBACK(plugin_toggle), gp_data.general_list, PLUGIN_VIEW_TYPE_GENERAL);
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
478 }
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
479
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
480 static void
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
481 on_vis_plugin_view_realize(GtkTreeView * treeview,
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
482 gpointer data)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
483 {
3985
ba5af8e85857 remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3917
diff changeset
484 on_plugin_view_realize(treeview, G_CALLBACK(plugin_toggle), vp_data.vis_list, PLUGIN_VIEW_TYPE_VIS);
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
485 }
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
486
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
487 static void
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
488 editable_insert_text(GtkEditable * editable,
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
489 const gchar * text,
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
490 gint * pos)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
491 {
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3357
diff changeset
492 gtk_editable_insert_text(editable, text, strlen(text), pos);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
493 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
494
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
495 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
496 titlestring_tag_menu_callback(GtkMenuItem * menuitem,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
497 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
498 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
499 const gchar *separator = " - ";
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
500 gint item = GPOINTER_TO_INT(data);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
501 gint pos;
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
502
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
503 pos = gtk_editable_get_position(GTK_EDITABLE(titlestring_entry));
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
504
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
505 /* insert separator as needed */
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
506 if (g_utf8_strlen(gtk_entry_get_text(GTK_ENTRY(titlestring_entry)), -1) > 0)
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
507 editable_insert_text(GTK_EDITABLE(titlestring_entry), separator, &pos);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
508
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
509 editable_insert_text(GTK_EDITABLE(titlestring_entry), _(title_field_tags[item].tag),
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
510 &pos);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
511
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
512 gtk_editable_set_position(GTK_EDITABLE(titlestring_entry), pos);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
513 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
514
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
515 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
516 on_titlestring_help_button_clicked(GtkButton * button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
517 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
518 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
519
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
520 GtkMenu *menu;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
521 MenuPos *pos = g_new0(MenuPos, 1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
522 GdkWindow *parent;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
523
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
524 gint x_ro, y_ro;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
525 gint x_widget, y_widget;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
526 gint x_size, y_size;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
527
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
528 g_return_if_fail (button != NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
529 g_return_if_fail (GTK_IS_MENU (data));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
530
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
531 parent = gtk_widget_get_parent_window(GTK_WIDGET(button));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
532
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
533 gdk_drawable_get_size(parent, &x_size, &y_size);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
534 gdk_window_get_root_origin(GTK_WIDGET(button)->window, &x_ro, &y_ro);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
535 gdk_window_get_position(GTK_WIDGET(button)->window, &x_widget, &y_widget);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
536
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
537 pos->x = x_size + x_ro;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
538 pos->y = y_size + y_ro - 100;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
539
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
540 menu = GTK_MENU(data);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
541 gtk_menu_popup (menu, NULL, NULL, util_menu_position, pos,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
542 0, GDK_CURRENT_TIME);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
543 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
544
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
545
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
546 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
547 on_titlestring_entry_realize(GtkWidget * entry,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
548 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
549 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
550 gtk_entry_set_text(GTK_ENTRY(entry), cfg.gentitle_format);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
551 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
552
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
553 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
554 on_titlestring_entry_changed(GtkWidget * entry,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
555 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
556 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
557 g_free(cfg.gentitle_format);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
558 cfg.gentitle_format = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry)));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
559 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
560
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
561 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
562 on_titlestring_cbox_realize(GtkWidget * cbox,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
563 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
564 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
565 gtk_combo_box_set_active(GTK_COMBO_BOX(cbox), cfg.titlestring_preset);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
566 gtk_widget_set_sensitive(GTK_WIDGET(data),
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
567 (cfg.titlestring_preset == (gint)n_titlestring_presets));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
568 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
569
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
570 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
571 on_titlestring_cbox_changed(GtkWidget * cbox,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
572 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
573 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
574 gint position = gtk_combo_box_get_active(GTK_COMBO_BOX(cbox));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
575
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
576 cfg.titlestring_preset = position;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
577 gtk_widget_set_sensitive(GTK_WIDGET(data), (position == 6));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
578 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
579
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
580 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
581 on_mainwin_font_button_font_set(GtkFontButton * button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
582 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
583 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
584 g_free(cfg.mainwin_font);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
585 cfg.mainwin_font = g_strdup(gtk_font_button_get_font_name(button));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
586
2911
cd21a4556dd2 include UiSkinnedTextbox
Tomasz Mon <desowin@gmail.com>
parents: 2717
diff changeset
587 ui_skinned_textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
588 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
589
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
590 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
591 on_use_bitmap_fonts_realize(GtkToggleButton * button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
592 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
593 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
594 gtk_toggle_button_set_active(button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
595 cfg.mainwin_use_xfont != FALSE ? FALSE : TRUE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
596 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
597
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
598 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
599 on_use_bitmap_fonts_toggled(GtkToggleButton * button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
600 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
601 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
602 gboolean useit = gtk_toggle_button_get_active(button);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
603 cfg.mainwin_use_xfont = useit != FALSE ? FALSE : TRUE;
2911
cd21a4556dd2 include UiSkinnedTextbox
Tomasz Mon <desowin@gmail.com>
parents: 2717
diff changeset
604 ui_skinned_textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
605 playlistwin_set_sinfo_font(cfg.playlist_font);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
606
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
607 if (cfg.playlist_shaded) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
608 playlistwin_update_list(playlist_get_active());
3221
9583cd62231f implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents: 3217
diff changeset
609 ui_skinned_window_draw_all(playlistwin);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
610 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
611 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
612
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
613 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
614 on_mainwin_font_button_realize(GtkFontButton * button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
615 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
616 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
617 gtk_font_button_set_font_name(button, cfg.mainwin_font);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
618 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
619
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
620 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
621 on_playlist_font_button_font_set(GtkFontButton * button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
622 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
623 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
624 g_free(cfg.playlist_font);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
625 cfg.playlist_font = g_strdup(gtk_font_button_get_font_name(button));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
626
3217
764e8f87c186 port PlayList_List to gtk2
Tomasz Mon <desowin@gmail.com>
parents: 3165
diff changeset
627 ui_skinned_playlist_set_font(cfg.playlist_font);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
628 playlistwin_set_sinfo_font(cfg.playlist_font); /* propagate font setting to playlistwin_sinfo */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
629 playlistwin_update_list(playlist_get_active());
3221
9583cd62231f implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents: 3217
diff changeset
630 gtk_widget_queue_draw(playlistwin_list);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
631 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
632
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
633 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
634 on_playlist_font_button_realize(GtkFontButton * button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
635 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
636 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
637 gtk_font_button_set_font_name(button, cfg.playlist_font);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
638 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
639
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
640 static void
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
641 playlist_show_pl_separator_numbers_cb()
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
642 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
643 playlistwin_update_list(playlist_get_active());
3221
9583cd62231f implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents: 3217
diff changeset
644 gtk_widget_queue_draw(playlistwin_list);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
645 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
646
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
647 /* proxy */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
648 static void
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
649 on_proxy_button_realize(GtkToggleButton *button, gchar *cfg)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
650 {
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
651 g_return_if_fail(cfg != NULL);
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
652
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
653 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
654 gboolean ret;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
655
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
656 db = cfg_db_open();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
657
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
658 if (cfg_db_get_bool(db, NULL, cfg, &ret) != FALSE)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
659 gtk_toggle_button_set_active(button, ret);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
660
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
661 cfg_db_close(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
662 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
663
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
664 static void
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
665 on_proxy_button_toggled(GtkToggleButton *button, gchar *cfg)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
666 {
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
667 g_return_if_fail(cfg != NULL);
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
668
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
669 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
670 gboolean ret = gtk_toggle_button_get_active(button);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
671
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
672 db = cfg_db_open();
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
673 cfg_db_set_bool(db, NULL, cfg, ret);
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
674 cfg_db_close(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
675 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
676
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
677 static void
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
678 on_proxy_entry_changed(GtkEntry *entry, gchar *cfg)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
679 {
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
680 g_return_if_fail(cfg != NULL);
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
681
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
682 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
683 gchar *ret = g_strdup(gtk_entry_get_text(entry));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
684
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
685 db = cfg_db_open();
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
686 cfg_db_set_string(db, NULL, cfg, ret);
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
687 cfg_db_close(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
688
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
689 g_free(ret);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
690 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
691
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
692 static void
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
693 on_proxy_entry_realize(GtkEntry *entry, gchar *cfg)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
694 {
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
695 g_return_if_fail(cfg != NULL);
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
696
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
697 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
698 gchar *ret;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
699
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
700 db = cfg_db_open();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
701
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
702 if (cfg_db_get_string(db, NULL, cfg, &ret) != FALSE)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
703 gtk_entry_set_text(entry, ret);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
704
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
705 cfg_db_close(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
706 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
707
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
708 static void
3356
3d42ab53521d little more merging
Tomasz Mon <desowin@gmail.com>
parents: 3355
diff changeset
709 plugin_treeview_open_prefs(GtkTreeView *treeview)
3353
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
710 {
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
711 GtkTreeSelection *selection;
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
712 GtkTreeModel *model;
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
713 GtkTreeIter iter;
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
714 Plugin *plugin = NULL;
3353
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
715
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
716 selection = gtk_tree_view_get_selection(treeview);
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
717 if (!gtk_tree_selection_get_selected(selection, &model, &iter))
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
718 return;
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
719 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1);
3353
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
720
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
721 g_return_if_fail(plugin != NULL);
3542
f8880f2e0501 Fix crash on calling plugin->configure() in preferences when plugin->configure==NULL
Sascha Hlusiak <contact@saschahlusiak.de>
parents: 3442
diff changeset
722 g_return_if_fail(plugin->configure != NULL);
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
723
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
724 plugin->configure();
3353
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
725 }
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
726
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
727 static void
3357
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
728 plugin_treeview_open_info(GtkTreeView *treeview)
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
729 {
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
730 GtkTreeSelection *selection;
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
731 GtkTreeModel *model;
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
732 GtkTreeIter iter;
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
733 Plugin *plugin = NULL;
3357
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
734
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
735 selection = gtk_tree_view_get_selection(treeview);
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
736 if (!gtk_tree_selection_get_selected(selection, &model, &iter))
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
737 return;
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
738 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1);
3357
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
739
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
740 g_return_if_fail(plugin != NULL);
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
741
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
742 plugin->about();
3357
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
743 }
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
744
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
745 static void
3355
31ecb89e871c introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents: 3353
diff changeset
746 plugin_treeview_enable_prefs(GtkTreeView * treeview, GtkButton * button)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
747 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
748 GtkTreeSelection *selection;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
749 GtkTreeModel *model;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
750 GtkTreeIter iter;
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
751 Plugin *plugin = NULL;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
752
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
753 selection = gtk_tree_view_get_selection(treeview);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
754 if (!gtk_tree_selection_get_selected(selection, &model, &iter))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
755 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
756
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
757 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
758
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
759 g_return_if_fail(plugin != NULL);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
760
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
761 gtk_widget_set_sensitive(GTK_WIDGET(button), plugin->configure != NULL);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
762 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
763
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
764 static void
3355
31ecb89e871c introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents: 3353
diff changeset
765 plugin_treeview_enable_info(GtkTreeView * treeview, GtkButton * button)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
766 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
767 GtkTreeSelection *selection;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
768 GtkTreeModel *model;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
769 GtkTreeIter iter;
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
770 Plugin *plugin = NULL;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
771
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
772 selection = gtk_tree_view_get_selection(treeview);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
773 if (!gtk_tree_selection_get_selected(selection, &model, &iter))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
774 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
775
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
776 gtk_tree_model_get(model, &iter, PLUGIN_VIEW_COL_PLUGIN_PTR, &plugin, -1);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
777
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
778 g_return_if_fail(plugin != NULL);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
779
3442
b0f4ab42dd3b Rework configuration and about calls.
William Pitcock <nenolod@atheme.org>
parents: 3441
diff changeset
780 gtk_widget_set_sensitive(GTK_WIDGET(button), plugin->about != NULL);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
781 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
782
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
783
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
784 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
785 output_plugin_enable_info(GtkComboBox * cbox, GtkButton * button)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
786 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
787 GList *plist;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
788
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
789 gint id = gtk_combo_box_get_active(cbox);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
790
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
791 plist = get_output_list();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
792 plist = g_list_nth(plist, id);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
793
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
794 gtk_widget_set_sensitive(GTK_WIDGET(button),
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
795 OUTPUT_PLUGIN(plist->data)->about != NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
796 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
797
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
798 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
799 output_plugin_enable_prefs(GtkComboBox * cbox, GtkButton * button)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
800 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
801 GList *plist;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
802 gint id = gtk_combo_box_get_active(cbox);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
803
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
804 plist = get_output_list();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
805 plist = g_list_nth(plist, id);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
806
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
807 gtk_widget_set_sensitive(GTK_WIDGET(button),
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
808 OUTPUT_PLUGIN(plist->data)->configure != NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
809 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
810
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
811 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
812 on_output_plugin_bufsize_realize(GtkSpinButton *button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
813 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
814 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
815 gtk_spin_button_set_value(button, cfg.output_buffer_size);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
816 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
817
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
818 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
819 on_output_plugin_bufsize_value_changed(GtkSpinButton *button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
820 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
821 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
822 cfg.output_buffer_size = gtk_spin_button_get_value_as_int(button);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
823 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
824
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
825 static void
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
826 on_enable_src_realize(GtkToggleButton * button,
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
827 gpointer data)
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
828 {
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
829 #ifdef USE_SRC
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
830 ConfigDb *db;
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
831 gboolean ret;
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
832
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
833 db = cfg_db_open();
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
834
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
835 if (cfg_db_get_bool(db, NULL, "enable_src", &ret) != FALSE)
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
836 gtk_toggle_button_set_active(button, ret);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
837
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
838 cfg_db_close(db);
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
839 #else
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
840 gtk_toggle_button_set_active(button, FALSE);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
841 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
842 #endif
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
843 }
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
844
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
845 static void
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
846 on_enable_src_toggled(GtkToggleButton * button,
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
847 gpointer data)
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
848 {
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
849 ConfigDb *db;
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
850 gboolean ret = gtk_toggle_button_get_active(button);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
851
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
852 db = cfg_db_open();
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
853 cfg_db_set_bool(db, NULL, "enable_src", ret);
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
854 cfg_db_close(db);
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
855 }
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
856
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
857 static void
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
858 on_src_rate_realize(GtkSpinButton * button,
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
859 gpointer data)
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
860 {
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
861 #ifdef USE_SRC
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
862 ConfigDb *db;
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
863 gint value;
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
864
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
865 db = cfg_db_open();
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
866
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
867 if (cfg_db_get_int(db, NULL, "src_rate", &value) != FALSE)
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
868 gtk_spin_button_set_value(button, (gdouble)value);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
869
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
870 cfg_db_close(db);
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
871 #else
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
872 gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
873 #endif
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
874 }
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
875
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
876 static void
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
877 on_src_rate_value_changed(GtkSpinButton * button,
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
878 gpointer data)
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
879 {
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
880 ConfigDb *db;
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
881 gint value = gtk_spin_button_get_value_as_int(button);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
882
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
883 db = cfg_db_open();
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
884 cfg_db_set_int(db, NULL, "src_rate", value);
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
885 cfg_db_close(db);
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
886 }
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
887
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
888 static void
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
889 on_src_converter_type_realize(GtkComboBox * box,
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
890 gpointer data)
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
891 {
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
892 #ifdef USE_SRC
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
893 ConfigDb *db;
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
894 gint value;
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
895
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
896 db = cfg_db_open();
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
897
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
898 if (cfg_db_get_int(db, NULL, "src_type", &value) != FALSE)
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
899 gtk_combo_box_set_active(box, value);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
900 else
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
901 gtk_combo_box_set_active(box, 0);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
902
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
903 cfg_db_close(db);
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
904 #else
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
905 gtk_widget_set_sensitive(GTK_WIDGET(box), FALSE);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
906 #endif
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
907 }
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
908
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
909 static void
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
910 on_src_converter_type_changed(GtkComboBox * box,
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
911 gpointer data)
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
912 {
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
913 ConfigDb *db;
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
914 gint value = gtk_combo_box_get_active(box);
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
915
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
916 db = cfg_db_open();
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
917 cfg_db_set_int(db, NULL, "src_type", value);
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
918 cfg_db_close(db);
2538
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
919 }
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
920
719e0898ff3c [svn] - Patch to use libsamplerate for high-quality interpolated upsampling,
nenolod
parents: 2468
diff changeset
921 static void
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
922 on_spin_btn_realize(GtkSpinButton *button, gboolean *cfg)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
923 {
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
924 gtk_spin_button_set_value(button, *cfg);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
925 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
926
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
927 static void
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
928 on_spin_btn_changed(GtkSpinButton *button, gboolean *cfg)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
929 {
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
930 *cfg = gtk_spin_button_get_value_as_int(button);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
931 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
932
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
933 static void
3544
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
934 on_software_volume_control_toggled(GtkToggleButton * button, gpointer data)
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
935 {
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
936 cfg.software_volume_control = gtk_toggle_button_get_active(button);
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
937 }
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
938
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
939 static void
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
940 on_software_volume_control_realize(GtkToggleButton * button, gpointer data)
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
941 {
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
942 gtk_toggle_button_set_active(button, cfg.software_volume_control);
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
943 }
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
944
e235357029ba Add preferences option.
William Pitcock <nenolod@atheme.org>
parents: 3442
diff changeset
945 static void
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
946 on_skin_refresh_button_clicked(GtkButton * button,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
947 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
948 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
949 const mode_t mode755 = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
950
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
951 del_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
952 make_directory(bmp_paths[BMP_PATH_SKIN_THUMB_DIR], mode755);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
953
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
954 skin_view_update(GTK_TREE_VIEW(skin_view), GTK_WIDGET(skin_refresh_button));
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
955 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
956
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
957 static gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
958 on_skin_view_realize(GtkTreeView * treeview,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
959 gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
960 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
961 skin_view_realize(treeview);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
962
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
963 return TRUE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
964 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
965
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
966 static void
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
967 on_category_treeview_realize(GtkTreeView * treeview,
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
968 GtkNotebook * notebook)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
969 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
970 GtkListStore *store;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
971 GtkCellRenderer *renderer;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
972 GtkTreeViewColumn *column;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
973 GtkTreeSelection *selection;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
974 GtkTreeIter iter;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
975 GdkPixbuf *img;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
976 CategoryQueueEntry *qlist;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
977 gint i;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
978
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
979 column = gtk_tree_view_column_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
980 gtk_tree_view_column_set_title(column, _("Category"));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
981 gtk_tree_view_append_column(treeview, column);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
982 gtk_tree_view_column_set_spacing(column, 2);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
983
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
984 renderer = gtk_cell_renderer_pixbuf_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
985 gtk_tree_view_column_pack_start(column, renderer, FALSE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
986 gtk_tree_view_column_set_attributes(column, renderer, "pixbuf", 0, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
987
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
988 renderer = gtk_cell_renderer_text_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
989 gtk_tree_view_column_pack_start(column, renderer, FALSE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
990 gtk_tree_view_column_set_attributes(column, renderer, "text", 1, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
991
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
992 store = gtk_list_store_new(CATEGORY_VIEW_N_COLS,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
993 GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
994 gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
995
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
996 for (i = 0; i < n_categories; i++) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
997 img = gdk_pixbuf_new_from_file(categories[i].icon_path, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
998 gtk_list_store_append(store, &iter);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
999 gtk_list_store_set(store, &iter,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1000 CATEGORY_VIEW_COL_ICON, img,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1001 CATEGORY_VIEW_COL_NAME,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1002 gettext(categories[i].name), CATEGORY_VIEW_COL_ID,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1003 categories[i].id, -1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1004 g_object_unref(img);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1005 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1006
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1007 selection = gtk_tree_view_get_selection(treeview);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1008
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1009 g_signal_connect_swapped(selection, "changed",
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1010 G_CALLBACK(change_category), notebook);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1011
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1012 /* mark the treeview widget as available to third party plugins */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1013 category_treeview = GTK_WIDGET(treeview);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1014
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1015 /* prefswin_page_queue_destroy already pops the queue forward for us. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1016 for (qlist = category_queue; qlist != NULL; qlist = category_queue)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1017 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1018 CategoryQueueEntry *ent = (CategoryQueueEntry *) qlist;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1019
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1020 prefswin_page_new(ent->container, ent->pg_name, ent->img_url);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1021 prefswin_page_queue_destroy(ent);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1022 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1023 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1024
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1025 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1026 on_skin_view_drag_data_received(GtkWidget * widget,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1027 GdkDragContext * context,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1028 gint x, gint y,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1029 GtkSelectionData * selection_data,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1030 guint info, guint time,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1031 gpointer user_data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1032 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1033 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1034 gchar *path;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1035
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1036 if (!selection_data->data) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1037 g_warning("DND data string is NULL");
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1038 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1039 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1040
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1041 path = (gchar *) selection_data->data;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1042
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1043 /* FIXME: use a real URL validator/parser */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1044
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1045 if (str_has_prefix_nocase(path, "file:///")) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1046 path[strlen(path) - 2] = 0; /* Why the hell a CR&LF? */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1047 path += 7;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1048 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1049 else if (str_has_prefix_nocase(path, "file:")) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1050 path += 5;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1051 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1052
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1053 if (file_is_archive(path)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1054 bmp_active_skin_load(path);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1055 skin_install_skin(path);
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1056 skin_view_update(GTK_TREE_VIEW(widget), GTK_WIDGET(skin_refresh_button));
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1057 /* Change skin name in the config file */
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1058 db = cfg_db_open();
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1059 cfg_db_set_string(db, NULL, "skin", path);
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1060 cfg_db_close(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1061 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1062
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1063 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1064
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1065 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1066 on_chardet_detector_cbox_changed(GtkComboBox * combobox, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1067 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1068 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1069 gint position = 0;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1070
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1071 position = gtk_combo_box_get_active(GTK_COMBO_BOX(combobox));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1072 cfg.chardet_detector = (char *)chardet_detector_presets[position];
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1073
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1074 db = cfg_db_open();
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1075 cfg_db_set_string(db, NULL, "chardet_detector", cfg.chardet_detector);
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1076 cfg_db_close(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1077 if (data != NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1078 gtk_widget_set_sensitive(GTK_WIDGET(data), 1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1079 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1080
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1081 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1082 on_chardet_detector_cbox_realize(GtkComboBox *combobox, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1083 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1084 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1085 gchar *ret=NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1086 guint i=0,index=0;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1087
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1088 for(i=0; i<n_chardet_detector_presets; i++) {
4043
c86f63f652aa made character set detection combo box translatable
mf0102 <0102@gmx.at>
parents: 4040
diff changeset
1089 gtk_combo_box_append_text(combobox, _(chardet_detector_presets[i]));
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1090 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1091
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1092 db = cfg_db_open();
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1093 if(cfg_db_get_string(db, NULL, "chardet_detector", &ret) != FALSE) {
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1094 for(i=0; i<n_chardet_detector_presets; i++) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1095 if(!strcmp(chardet_detector_presets[i], ret)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1096 cfg.chardet_detector = (char *)chardet_detector_presets[i];
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1097 index = i;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1098 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1099 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1100 }
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1101 cfg_db_close(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1102
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1103 #ifdef USE_CHARDET
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1104 gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), index);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1105
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1106 if (data != NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1107 gtk_widget_set_sensitive(GTK_WIDGET(data), TRUE);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1108
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1109 g_signal_connect(combobox, "changed",
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1110 G_CALLBACK(on_chardet_detector_cbox_changed), NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1111 #else
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1112 gtk_combo_box_set_active(GTK_COMBO_BOX(combobox), -1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1113 gtk_widget_set_sensitive(GTK_WIDGET(combobox), 0);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1114 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1115 if(ret)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1116 g_free(ret);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1117 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1118
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1119 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1120 on_chardet_fallback_realize(GtkEntry *entry, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1121 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1122 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1123 gchar *ret = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1124
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1125 db = cfg_db_open();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1126
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1127 if (cfg_db_get_string(db, NULL, "chardet_fallback", &ret) != FALSE) {
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1128 if(cfg.chardet_fallback)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1129 g_free(cfg.chardet_fallback);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1130
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1131 if(ret && strncasecmp(ret, "None", sizeof("None"))) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1132 cfg.chardet_fallback = ret;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1133 } else {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1134 cfg.chardet_fallback = g_strdup("");
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1135 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1136 gtk_entry_set_text(entry, cfg.chardet_fallback);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1137 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1138
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1139 cfg_db_close(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1140 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1141
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1142 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1143 on_chardet_fallback_changed(GtkEntry *entry, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1144 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1145 ConfigDb *db;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1146 gchar *ret = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1147
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1148 if(cfg.chardet_fallback)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1149 g_free(cfg.chardet_fallback);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1150
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1151 ret = g_strdup(gtk_entry_get_text(entry));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1152
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1153 if(ret == NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1154 cfg.chardet_fallback = g_strdup("");
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1155 else
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1156 cfg.chardet_fallback = ret;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1157
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1158 db = cfg_db_open();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1159
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1160 if(cfg.chardet_fallback == NULL || !strcmp(cfg.chardet_fallback, ""))
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1161 cfg_db_set_string(db, NULL, "chardet_fallback", "None");
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1162 else
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1163 cfg_db_set_string(db, NULL, "chardet_fallback", cfg.chardet_fallback);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1164
3686
259b7d3e0976 sed s/bmp_cfg_db/cfg_db/.
William Pitcock <nenolod@atheme.org>
parents: 3664
diff changeset
1165 cfg_db_close(db);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1166 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1167
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1168 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1169 on_show_filepopup_for_tuple_realize(GtkToggleButton * button, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1170 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1171 gtk_toggle_button_set_active(button, cfg.show_filepopup_for_tuple);
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1172 filepopupbutton = GTK_WIDGET(button);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1173
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1174 gtk_widget_set_sensitive(filepopup_for_tuple_settings_button, cfg.show_filepopup_for_tuple);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1175 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1176
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1177 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1178 on_show_filepopup_for_tuple_toggled(GtkToggleButton * button, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1179 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1180 cfg.show_filepopup_for_tuple = gtk_toggle_button_get_active(button);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1181
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1182 gtk_widget_set_sensitive(filepopup_for_tuple_settings_button, cfg.show_filepopup_for_tuple);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1183 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1184
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1185 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1186 on_recurse_for_cover_toggled(GtkToggleButton *button, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1187 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1188 gtk_widget_set_sensitive(GTK_WIDGET(data),
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1189 gtk_toggle_button_get_active(button));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1190 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1191
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1192 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1193 on_colorize_button_clicked(GtkButton *button, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1194 {
3992
50bf02b4f048 correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents: 3991
diff changeset
1195 if (colorize_settings)
50bf02b4f048 correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents: 3991
diff changeset
1196 gtk_window_present(GTK_WINDOW(colorize_settings));
50bf02b4f048 correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents: 3991
diff changeset
1197 else
50bf02b4f048 correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents: 3991
diff changeset
1198 create_colorize_settings();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1199 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1200
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1201 static void
3856
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1202 reload_skin()
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1203 {
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1204 /* reload the skin to apply the change */
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1205 skin_reload_forced();
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1206 ui_skinned_window_draw_all(mainwin);
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1207 ui_skinned_window_draw_all(equalizerwin);
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1208 ui_skinned_window_draw_all(playlistwin);
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1209 }
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1210
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1211 static void
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1212 on_red_scale_value_changed(GtkHScale *scale, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1213 {
3856
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1214 cfg.colorize_r = gtk_range_get_value(GTK_RANGE(scale));
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1215 reload_skin();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1216 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1217
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1218 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1219 on_green_scale_value_changed(GtkHScale *scale, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1220 {
3856
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1221 cfg.colorize_g = gtk_range_get_value(GTK_RANGE(scale));
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1222 reload_skin();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1223 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1224
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1225 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1226 on_blue_scale_value_changed(GtkHScale *scale, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1227 {
3856
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1228 cfg.colorize_b = gtk_range_get_value(GTK_RANGE(scale));
de26ea4a42fc fixed bugs in interface color changing (that was TOTALLY BROKEN and
mf0102 <0102@gmx.at>
parents: 3712
diff changeset
1229 reload_skin();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1230 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1231
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1232 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1233 on_colorize_close_clicked(GtkButton *button, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1234 {
3992
50bf02b4f048 correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents: 3991
diff changeset
1235 gtk_widget_destroy(colorize_settings);
50bf02b4f048 correct mf0102's commit a bit
Tomasz Mon <desowin@gmail.com>
parents: 3991
diff changeset
1236 colorize_settings = NULL;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1237 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1238
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1239 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1240 on_filepopup_for_tuple_settings_clicked(GtkButton *button, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1241 {
3990
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1242 gtk_entry_set_text(GTK_ENTRY(filepopup_settings_cover_name_include), cfg.cover_name_include);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1243 gtk_entry_set_text(GTK_ENTRY(filepopup_settings_cover_name_exclude), cfg.cover_name_exclude);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1244 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filepopup_settings_recurse_for_cover), cfg.recurse_for_cover);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1245 gtk_spin_button_set_value(GTK_SPIN_BUTTON(filepopup_settings_recurse_for_cover_depth), cfg.recurse_for_cover_depth);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1246 on_recurse_for_cover_toggled(GTK_TOGGLE_BUTTON(filepopup_settings_recurse_for_cover), filepopup_settings_recurse_for_cover_depth_box);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1247 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filepopup_settings_use_file_cover), cfg.use_file_cover);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1248 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filepopup_settings_showprogressbar), cfg.filepopup_showprogressbar);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1249 gtk_spin_button_set_value(GTK_SPIN_BUTTON(filepopup_settings_delay), cfg.filepopup_delay);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1250
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1251 gtk_widget_show(filepopup_settings);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1252 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1253
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1254 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1255 on_filepopup_settings_ok_clicked(GtkButton *button, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1256 {
3990
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1257 g_free(cfg.cover_name_include);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1258 cfg.cover_name_include = g_strdup(gtk_entry_get_text(GTK_ENTRY(filepopup_settings_cover_name_include)));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1259
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1260 g_free(cfg.cover_name_exclude);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1261 cfg.cover_name_exclude = g_strdup(gtk_entry_get_text(GTK_ENTRY(filepopup_settings_cover_name_exclude)));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1262
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1263 cfg.recurse_for_cover = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filepopup_settings_recurse_for_cover));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1264 cfg.recurse_for_cover_depth = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(filepopup_settings_recurse_for_cover_depth));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1265 cfg.use_file_cover = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filepopup_settings_use_file_cover));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1266 cfg.filepopup_showprogressbar = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filepopup_settings_showprogressbar));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1267 cfg.filepopup_delay = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(filepopup_settings_delay));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1268
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1269 gtk_widget_hide(filepopup_settings);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1270 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1271
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1272 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1273 on_filepopup_settings_cancel_clicked(GtkButton *button, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1274 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1275 gtk_widget_hide(filepopup_settings);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1276 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1277
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1278 static void
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1279 on_toggle_button_toggled(GtkToggleButton * button, gboolean *cfg)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1280 {
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1281 *cfg = gtk_toggle_button_get_active(button);
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1282 void (*callback) (void) = g_object_get_data(G_OBJECT(button), "callback");
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1283 if (callback) callback();
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1284 GtkWidget *child = g_object_get_data(G_OBJECT(button), "child");
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1285 if (child) gtk_widget_set_sensitive(GTK_WIDGET(child), *cfg);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1286 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1287
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1288 static void
4001
733820bc7744 some more duplicate code removal
Tomasz Mon <desowin@gmail.com>
parents: 4000
diff changeset
1289 on_toggle_button_realize(GtkToggleButton * button, gboolean *cfg)
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1290 {
4001
733820bc7744 some more duplicate code removal
Tomasz Mon <desowin@gmail.com>
parents: 4000
diff changeset
1291 gtk_toggle_button_set_active(button, *cfg);
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1292 GtkWidget *child = g_object_get_data(G_OBJECT(button), "child");
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1293 if (child) gtk_widget_set_sensitive(GTK_WIDGET(child), *cfg);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1294 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1295
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1296 static void
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1297 show_wm_decorations_cb()
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1298 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1299 gtk_window_set_decorated(GTK_WINDOW(mainwin), cfg.show_wm_decorations);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1300 gtk_window_set_decorated(GTK_WINDOW(playlistwin), cfg.show_wm_decorations);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1301 gtk_window_set_decorated(GTK_WINDOW(equalizerwin), cfg.show_wm_decorations);
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1302 }
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1303
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1304 static void
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1305 on_reload_plugins_clicked(GtkButton * button, gpointer data)
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1306 {
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1307 /* TBD: should every playlist entry have to be reprobed?
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1308 * Pointers could come back stale if new plugins are added or
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1309 * symbol sizes change. - nenolod
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1310 */
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1311
2682
c3cd6e47faf6 [svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents: 2635
diff changeset
1312 bmp_config_save();
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1313 plugin_system_cleanup();
2682
c3cd6e47faf6 [svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents: 2635
diff changeset
1314 bmp_config_free();
c3cd6e47faf6 [svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents: 2635
diff changeset
1315 bmp_config_load();
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2538
diff changeset
1316 plugin_system_init();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1317 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1318
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1319 void
3989
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1320 create_colorize_settings(void)
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1321 {
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1322 GtkWidget *vbox;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1323 GtkWidget *label;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1324 GtkWidget *table;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1325 GtkWidget *hbuttonbox;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1326 GtkWidget *colorize_close;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1327
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1328 GtkWidget *green_label;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1329 GtkWidget *red_label;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1330 GtkWidget *blue_label;
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1331
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1332 colorize_settings = gtk_window_new(GTK_WINDOW_TOPLEVEL);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1333 gtk_container_set_border_width(GTK_CONTAINER(colorize_settings), 12);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1334 gtk_window_set_title(GTK_WINDOW(colorize_settings), _("Color Adjustment"));
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1335 gtk_window_set_type_hint(GTK_WINDOW(colorize_settings), GDK_WINDOW_TYPE_HINT_DIALOG);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1336 gtk_window_set_transient_for(GTK_WINDOW(colorize_settings), GTK_WINDOW(prefswin));
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1337
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1338 vbox = gtk_vbox_new(FALSE, 12);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1339 gtk_container_add(GTK_CONTAINER(colorize_settings), vbox);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1340
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1341 label = gtk_label_new(_("Audacious allows you to alter the color balance of the skinned UI. The sliders below will allow you to do this."));
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1342 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1343 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1344 gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1345
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1346 table = gtk_table_new(3, 2, FALSE);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1347 gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1348 gtk_table_set_row_spacings(GTK_TABLE(table), 6);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1349 gtk_table_set_col_spacings(GTK_TABLE(table), 12);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1350
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1351 blue_label = gtk_label_new(_("Blue"));
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1352 gtk_table_attach(GTK_TABLE(table), blue_label, 0, 1, 2, 3,
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1353 (GtkAttachOptions) (0),
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1354 (GtkAttachOptions) (0), 0, 0);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1355 gtk_label_set_justify(GTK_LABEL(blue_label), GTK_JUSTIFY_RIGHT);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1356 gtk_misc_set_alignment(GTK_MISC(blue_label), 1, 0.5);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1357
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1358 green_label = gtk_label_new(_("Green"));
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1359 gtk_table_attach(GTK_TABLE(table), green_label, 0, 1, 1, 2,
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1360 (GtkAttachOptions) (0),
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1361 (GtkAttachOptions) (0), 0, 0);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1362 gtk_label_set_justify(GTK_LABEL(green_label), GTK_JUSTIFY_RIGHT);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1363 gtk_misc_set_alignment(GTK_MISC(green_label), 1, 0.5);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1364
3990
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1365 red_label = gtk_label_new(_("Red"));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1366 gtk_table_attach(GTK_TABLE(table), red_label, 0, 1, 0, 1,
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1367 (GtkAttachOptions) (0),
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1368 (GtkAttachOptions) (0), 0, 0);
3989
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1369 gtk_label_set_justify(GTK_LABEL(red_label), GTK_JUSTIFY_RIGHT);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1370 gtk_misc_set_alignment(GTK_MISC(red_label), 1, 0.5);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1371
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1372 red_scale = gtk_hscale_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 255, 0, 0, 0)));
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1373 gtk_table_attach(GTK_TABLE(table), red_scale, 1, 2, 0, 1,
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1374 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1375 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1376 gtk_scale_set_draw_value(GTK_SCALE(red_scale), FALSE);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1377 gtk_scale_set_digits(GTK_SCALE(red_scale), 3);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1378
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1379 green_scale = gtk_hscale_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 255, 0, 0, 0)));
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1380 gtk_table_attach(GTK_TABLE(table), green_scale, 1, 2, 1, 2,
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1381 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1382 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1383 gtk_scale_set_draw_value(GTK_SCALE(green_scale), FALSE);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1384 gtk_scale_set_digits(GTK_SCALE(green_scale), 3);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1385
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1386 blue_scale = gtk_hscale_new(GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 255, 0, 0, 0)));
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1387 gtk_table_attach(GTK_TABLE(table), blue_scale, 1, 2, 2, 3,
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1388 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1389 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1390 gtk_scale_set_draw_value(GTK_SCALE(blue_scale), FALSE);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1391 gtk_scale_set_digits(GTK_SCALE(blue_scale), 3);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1392
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1393 hbuttonbox = gtk_hbutton_box_new();
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1394 gtk_box_pack_start(GTK_BOX(vbox), hbuttonbox, FALSE, FALSE, 0);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1395 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1396 gtk_box_set_spacing(GTK_BOX(hbuttonbox), 6);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1397
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1398 colorize_close = gtk_button_new_from_stock("gtk-close");
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1399 gtk_container_add(GTK_CONTAINER(hbuttonbox), colorize_close);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1400 GTK_WIDGET_SET_FLAGS(colorize_close, GTK_CAN_DEFAULT);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1401
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1402 g_signal_connect((gpointer) red_scale, "value_changed",
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1403 G_CALLBACK(on_red_scale_value_changed),
3989
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1404 NULL);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1405 g_signal_connect((gpointer) green_scale, "value_changed",
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1406 G_CALLBACK(on_green_scale_value_changed),
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1407 NULL);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1408 g_signal_connect((gpointer) blue_scale, "value_changed",
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1409 G_CALLBACK(on_blue_scale_value_changed),
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1410 NULL);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1411 g_signal_connect((gpointer) colorize_close, "clicked",
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1412 G_CALLBACK(on_colorize_close_clicked),
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1413 NULL);
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1414
3991
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
1415 gtk_range_set_value(GTK_RANGE(red_scale), cfg.colorize_r);
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
1416 gtk_range_set_value(GTK_RANGE(green_scale), cfg.colorize_g);
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
1417 gtk_range_set_value(GTK_RANGE(blue_scale), cfg.colorize_b);
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
1418
3989
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1419 gtk_widget_grab_default(colorize_close);
3991
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
1420 gtk_widget_show_all(colorize_settings);
3989
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1421 }
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1422
6faed0cdc276 colorize_popup is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3985
diff changeset
1423 void
3990
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1424 create_filepopup_settings(void)
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1425 {
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1426 GtkWidget *vbox;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1427 GtkWidget *table;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1428
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1429 GtkWidget *label_cover_retrieve;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1430 GtkWidget *label_cover_search;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1431 GtkWidget *label_exclude;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1432 GtkWidget *label_include;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1433 GtkWidget *label_search_depth;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1434 GtkWidget *label_misc;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1435 GtkWidget *label_delay;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1436
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1437 GtkObject *recurse_for_cover_depth_adj;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1438 GtkObject *delay_adj;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1439 GtkWidget *alignment;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1440
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1441 GtkWidget *hbox;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1442 GtkWidget *hbuttonbox;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1443 GtkWidget *btn_cancel;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1444 GtkWidget *btn_ok;
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1445
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1446 filepopup_settings = gtk_window_new(GTK_WINDOW_TOPLEVEL);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1447 gtk_container_set_border_width(GTK_CONTAINER(filepopup_settings), 12);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1448 gtk_window_set_title(GTK_WINDOW(filepopup_settings), _("Popup Information Settings"));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1449 gtk_window_set_position(GTK_WINDOW(filepopup_settings), GTK_WIN_POS_CENTER_ON_PARENT);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1450 gtk_window_set_skip_taskbar_hint(GTK_WINDOW(filepopup_settings), TRUE);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1451 gtk_window_set_type_hint(GTK_WINDOW(filepopup_settings), GDK_WINDOW_TYPE_HINT_DIALOG);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1452 gtk_window_set_transient_for(GTK_WINDOW(filepopup_settings), GTK_WINDOW(prefswin));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1453
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1454 vbox = gtk_vbox_new(FALSE, 12);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1455 gtk_container_add(GTK_CONTAINER(filepopup_settings), vbox);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1456
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1457 label_cover_retrieve = gtk_label_new(_("<b>Cover image retrieve</b>"));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1458 gtk_box_pack_start(GTK_BOX(vbox), label_cover_retrieve, FALSE, FALSE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1459 gtk_label_set_use_markup(GTK_LABEL(label_cover_retrieve), TRUE);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1460 gtk_misc_set_alignment(GTK_MISC(label_cover_retrieve), 0, 0.5);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1461
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1462 label_cover_search = gtk_label_new(_("While searching for the album's cover, Audacious looks for certain words in the filename. You can specify those words in the lists below, separated using commas."));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1463 gtk_box_pack_start(GTK_BOX(vbox), label_cover_search, FALSE, FALSE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1464 gtk_label_set_line_wrap(GTK_LABEL(label_cover_search), TRUE);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1465 gtk_misc_set_alignment(GTK_MISC(label_cover_search), 0, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1466 gtk_misc_set_padding(GTK_MISC(label_cover_search), 12, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1467
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1468 table = gtk_table_new(2, 2, FALSE);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1469 gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1470 gtk_table_set_row_spacings(GTK_TABLE(table), 4);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1471 gtk_table_set_col_spacings(GTK_TABLE(table), 4);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1472
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1473 filepopup_settings_cover_name_include = gtk_entry_new();
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1474 gtk_table_attach(GTK_TABLE(table), filepopup_settings_cover_name_include, 1, 2, 0, 1,
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1475 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1476 (GtkAttachOptions) (0), 0, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1477 gtk_entry_set_activates_default(GTK_ENTRY(filepopup_settings_cover_name_include), TRUE);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1478
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1479 label_exclude = gtk_label_new(_("Exclude:"));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1480 gtk_table_attach(GTK_TABLE(table), label_exclude, 0, 1, 1, 2,
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1481 (GtkAttachOptions) (0),
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1482 (GtkAttachOptions) (0), 0, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1483 gtk_misc_set_alignment(GTK_MISC(label_exclude), 0, 0.5);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1484 gtk_misc_set_padding(GTK_MISC(label_exclude), 12, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1485
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1486 label_include = gtk_label_new(_("Include:"));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1487 gtk_table_attach(GTK_TABLE(table), label_include, 0, 1, 0, 1,
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1488 (GtkAttachOptions) (0),
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1489 (GtkAttachOptions) (0), 0, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1490 gtk_misc_set_alignment(GTK_MISC(label_include), 0, 0.5);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1491 gtk_misc_set_padding(GTK_MISC(label_include), 12, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1492
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1493 filepopup_settings_cover_name_exclude = gtk_entry_new();
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1494 gtk_table_attach(GTK_TABLE(table), filepopup_settings_cover_name_exclude, 1, 2, 1, 2,
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1495 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1496 (GtkAttachOptions) (0), 0, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1497 gtk_entry_set_activates_default(GTK_ENTRY(filepopup_settings_cover_name_exclude), TRUE);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1498
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1499 alignment = gtk_alignment_new(0.5, 0.5, 1, 1);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1500 gtk_box_pack_start(GTK_BOX(vbox), alignment, TRUE, TRUE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1501 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1502
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1503 filepopup_settings_recurse_for_cover = gtk_check_button_new_with_mnemonic(_("Recursively search for cover"));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1504 gtk_container_add(GTK_CONTAINER(alignment), filepopup_settings_recurse_for_cover);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1505
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1506 alignment = gtk_alignment_new(0.5, 0.5, 1, 1);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1507 gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, FALSE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1508 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 45, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1509
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1510 filepopup_settings_recurse_for_cover_depth_box = gtk_hbox_new(FALSE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1511 gtk_container_add(GTK_CONTAINER(alignment), filepopup_settings_recurse_for_cover_depth_box);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1512
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1513 label_search_depth = gtk_label_new(_("Search depth: "));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1514 gtk_box_pack_start(GTK_BOX(filepopup_settings_recurse_for_cover_depth_box), label_search_depth, TRUE, TRUE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1515 gtk_misc_set_padding(GTK_MISC(label_search_depth), 4, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1516
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1517 recurse_for_cover_depth_adj = gtk_adjustment_new(0, 0, 100, 1, 10, 10);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1518 filepopup_settings_recurse_for_cover_depth = gtk_spin_button_new(GTK_ADJUSTMENT(recurse_for_cover_depth_adj), 1, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1519 gtk_box_pack_start(GTK_BOX(filepopup_settings_recurse_for_cover_depth_box), filepopup_settings_recurse_for_cover_depth, TRUE, TRUE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1520 gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(filepopup_settings_recurse_for_cover_depth), TRUE);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1521
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1522 alignment = gtk_alignment_new(0.5, 0.5, 1, 1);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1523 gtk_box_pack_start(GTK_BOX(vbox), alignment, TRUE, TRUE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1524 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1525
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1526 filepopup_settings_use_file_cover = gtk_check_button_new_with_mnemonic(_("Use per-file cover"));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1527 gtk_container_add(GTK_CONTAINER(alignment), filepopup_settings_use_file_cover);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1528
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1529 label_misc = gtk_label_new(_("<b>Miscellaneous</b>"));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1530 gtk_box_pack_start(GTK_BOX(vbox), label_misc, FALSE, FALSE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1531 gtk_label_set_use_markup(GTK_LABEL(label_misc), TRUE);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1532 gtk_misc_set_alignment(GTK_MISC(label_misc), 0, 0.5);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1533
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1534 alignment = gtk_alignment_new(0.5, 0.5, 1, 1);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1535 gtk_box_pack_start(GTK_BOX(vbox), alignment, FALSE, FALSE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1536 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1537
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1538 filepopup_settings_showprogressbar = gtk_check_button_new_with_mnemonic(_("Show Progress bar for the current track"));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1539 gtk_container_add(GTK_CONTAINER(alignment), filepopup_settings_showprogressbar);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1540
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1541 alignment = gtk_alignment_new(0, 0.5, 1, 1);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1542 gtk_box_pack_start(GTK_BOX(vbox), alignment, TRUE, TRUE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1543 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1544
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1545 hbox = gtk_hbox_new(FALSE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1546 gtk_container_add(GTK_CONTAINER(alignment), hbox);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1547
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1548 label_delay = gtk_label_new(_("Delay until filepopup comes up: "));
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1549 gtk_box_pack_start(GTK_BOX(hbox), label_delay, TRUE, TRUE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1550 gtk_misc_set_alignment(GTK_MISC(label_delay), 0, 0.5);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1551 gtk_misc_set_padding(GTK_MISC(label_delay), 12, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1552
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1553 delay_adj = gtk_adjustment_new(0, 0, 100, 1, 10, 10);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1554 filepopup_settings_delay = gtk_spin_button_new(GTK_ADJUSTMENT(delay_adj), 1, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1555 gtk_box_pack_start(GTK_BOX(hbox), filepopup_settings_delay, TRUE, TRUE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1556 gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(filepopup_settings_delay), TRUE);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1557
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1558 hbuttonbox = gtk_hbutton_box_new();
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1559 gtk_box_pack_start(GTK_BOX(vbox), hbuttonbox, FALSE, FALSE, 0);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1560 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1561 gtk_box_set_spacing(GTK_BOX(hbuttonbox), 6);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1562
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1563 btn_cancel = gtk_button_new_from_stock("gtk-cancel");
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1564 gtk_container_add(GTK_CONTAINER(hbuttonbox), btn_cancel);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1565
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1566 btn_ok = gtk_button_new_from_stock("gtk-ok");
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1567 gtk_container_add(GTK_CONTAINER(hbuttonbox), btn_ok);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1568 GTK_WIDGET_SET_FLAGS(btn_ok, GTK_CAN_DEFAULT);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1569
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1570 g_signal_connect(G_OBJECT(filepopup_settings), "delete_event",
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1571 G_CALLBACK(gtk_widget_hide_on_delete),
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1572 NULL);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1573 g_signal_connect(G_OBJECT(btn_cancel), "clicked",
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1574 G_CALLBACK(on_filepopup_settings_cancel_clicked),
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1575 NULL);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1576 g_signal_connect(G_OBJECT(btn_ok), "clicked",
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1577 G_CALLBACK(on_filepopup_settings_ok_clicked),
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1578 NULL);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1579 g_signal_connect(G_OBJECT(filepopup_settings_recurse_for_cover), "toggled",
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1580 G_CALLBACK(on_recurse_for_cover_toggled),
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1581 filepopup_settings_recurse_for_cover_depth_box);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1582
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1583 gtk_widget_grab_default(btn_ok);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1584 gtk_widget_show_all(vbox);
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1585 }
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1586
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1587 GtkWidget *
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1588 ui_preferences_chardet_table_populate(void)
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1589 {
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1590 GtkWidget *widget = gtk_table_new(2, 2, FALSE);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1591 GtkWidget *label;
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1592
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1593 label = gtk_label_new(_("Auto character encoding detector for:"));
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1594 gtk_table_attach(GTK_TABLE(widget), label, 0, 1, 0, 1,
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1595 (GtkAttachOptions) (0),
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1596 (GtkAttachOptions) (0), 0, 0);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1597 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1598 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1599
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1600 GtkWidget *combobox = gtk_combo_box_new_text();
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1601 gtk_table_attach(GTK_TABLE(widget), combobox, 1, 2, 0, 1,
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1602 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1603 (GtkAttachOptions) (0), 0, 0);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1604 g_signal_connect_after(G_OBJECT(combobox), "realize",
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1605 G_CALLBACK(on_chardet_detector_cbox_realize),
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1606 NULL);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1607
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1608 GtkWidget *entry = gtk_entry_new();
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1609 gtk_table_attach(GTK_TABLE(widget), entry, 1, 2, 1, 2,
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1610 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1611 (GtkAttachOptions) (0), 0, 0);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1612 gtk_tooltips_set_tip (tooltips, entry, _("List of character encodings used for fall back conversion of metadata. If automatic character encoding detector failed or has been disabled, encodings in this list would be treated as candidates of the encoding of metadata, and fall back conversion from these encodings to UTF-8 would be attempted."), NULL);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1613
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1614 label = gtk_label_new(_("Fallback character encodings:"));
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1615 gtk_table_attach(GTK_TABLE(widget), label, 0, 1, 1, 2,
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1616 (GtkAttachOptions) (0),
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1617 (GtkAttachOptions) (0), 0, 0);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1618 gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1619 gtk_misc_set_alignment(GTK_MISC(label), 1, 0.5);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1620
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1621 g_signal_connect(G_OBJECT(entry), "changed",
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1622 G_CALLBACK(on_chardet_fallback_changed),
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1623 NULL);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1624 g_signal_connect_after(G_OBJECT(entry), "realize",
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1625 G_CALLBACK(on_chardet_fallback_realize),
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1626 NULL);
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1627
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1628 return widget;
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1629 }
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1630
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1631 /* it's at early stage */
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1632 static void
4040
83d9f8f98e36 Use PreferencesWidget instead of preferences_widget_t so that the code matches the established style of that file.
William Pitcock <nenolod@atheme.org>
parents: 4038
diff changeset
1633 create_widgets(GtkBox *box, PreferencesWidget* widgets, gint amt)
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1634 {
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1635 int x;
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1636 GtkWidget *alignment = NULL, *widget = NULL;
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1637 GtkWidget *child_box = NULL;
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1638 GSList *radio_btn_group = NULL;
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1639 int table_line=0; /* used for WIDGET_SPIN_BTN */
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1640
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1641 for (x = 0; x < amt; ++x) {
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1642 if (widgets[x].child) { /* perhaps this logic can be better */
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1643 if (!child_box) {
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1644 child_box = gtk_vbox_new(FALSE, 0);
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1645 g_object_set_data(G_OBJECT(widget), "child", child_box);
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1646 alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1647 gtk_box_pack_start(box, alignment, FALSE, FALSE, 0);
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1648 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 24, 0);
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1649 gtk_container_add (GTK_CONTAINER (alignment), child_box);
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1650 }
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1651 } else
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1652 child_box = NULL;
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1653
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1654 alignment = gtk_alignment_new (0.5, 0.5, 1, 1);
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1655 gtk_box_pack_start(child_box ? GTK_BOX(child_box) : box, alignment, FALSE, FALSE, 0);
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1656
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1657 if (radio_btn_group && widgets[x].type != WIDGET_RADIO_BTN)
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1658 radio_btn_group = NULL;
4003
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1659
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1660 switch(widgets[x].type) {
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1661 case WIDGET_CHK_BTN:
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1662 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 0, 0, 12, 0);
4008
a2e724d5bf62 make translations working
Tomasz Mon <desowin@gmail.com>
parents: 4007
diff changeset
1663 widget = gtk_check_button_new_with_mnemonic(_(widgets[x].label));
4003
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1664 g_object_set_data(G_OBJECT(widget), "callback", widgets[x].callback);
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1665 g_signal_connect(G_OBJECT(widget), "toggled",
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1666 G_CALLBACK(on_toggle_button_toggled),
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1667 widgets[x].cfg);
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1668 g_signal_connect(G_OBJECT(widget), "realize",
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1669 G_CALLBACK(on_toggle_button_realize),
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1670 widgets[x].cfg);
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1671 break;
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1672 case WIDGET_LABEL:
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1673 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), 12, 6, 0, 0);
4008
a2e724d5bf62 make translations working
Tomasz Mon <desowin@gmail.com>
parents: 4007
diff changeset
1674 widget = gtk_label_new_with_mnemonic(_(widgets[x].label));
4003
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1675 gtk_label_set_use_markup(GTK_LABEL(widget), TRUE);
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1676 gtk_misc_set_alignment(GTK_MISC(widget), 0, 0.5);
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1677 break;
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1678 case WIDGET_RADIO_BTN:
4008
a2e724d5bf62 make translations working
Tomasz Mon <desowin@gmail.com>
parents: 4007
diff changeset
1679 widget = gtk_radio_button_new_with_mnemonic(radio_btn_group, _(widgets[x].label));
4005
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1680 radio_btn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (widget));
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1681 g_signal_connect(G_OBJECT(widget), "toggled",
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1682 G_CALLBACK(on_toggle_button_toggled),
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1683 widgets[x].cfg);
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1684 g_signal_connect(G_OBJECT(widget), "realize",
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1685 G_CALLBACK(on_toggle_button_realize),
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1686 widgets[x].cfg);
94089cc94ccf again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4004
diff changeset
1687 break;
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1688 case WIDGET_SPIN_BTN:
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1689 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 0, 0, 12, 0);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1690
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1691 if (x > 1 && widgets[x-1].type == WIDGET_SPIN_BTN) {
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1692 table_line++;
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1693 } else {
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1694 /* check how many WIDGET_SPIN_BTNs are there */
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1695 gint lines = 0, i;
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1696 for (i=x; i<amt && widgets[i].type == WIDGET_SPIN_BTN; i++)
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1697 lines++;
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1698
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1699 widget = gtk_table_new(lines, 3, FALSE);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1700 gtk_table_set_row_spacings(GTK_TABLE(widget), 6);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1701 table_line=0;
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1702 }
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1703
4008
a2e724d5bf62 make translations working
Tomasz Mon <desowin@gmail.com>
parents: 4007
diff changeset
1704 GtkWidget *label_pre = gtk_label_new(_(widgets[x].label));
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1705 gtk_table_attach(GTK_TABLE (widget), label_pre, 0, 1, table_line, table_line+1,
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1706 (GtkAttachOptions) (0),
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1707 (GtkAttachOptions) (0), 0, 0);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1708 gtk_misc_set_alignment(GTK_MISC(label_pre), 0, 0.5);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1709 gtk_misc_set_padding(GTK_MISC(label_pre), 4, 0);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1710
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1711 GtkObject *adj = gtk_adjustment_new (1, 0, 100, 1, 10, 10);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1712 GtkWidget *spin_btn = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1, 0);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1713 gtk_table_attach(GTK_TABLE(widget), spin_btn, 1, 2, table_line, table_line+1,
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1714 (GtkAttachOptions) (0),
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1715 (GtkAttachOptions) (0), 4, 0);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1716
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1717 if (widgets[x].tooltip) {
4008
a2e724d5bf62 make translations working
Tomasz Mon <desowin@gmail.com>
parents: 4007
diff changeset
1718 GtkWidget *label_past = gtk_label_new(_(widgets[x].tooltip));
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1719 gtk_table_attach(GTK_TABLE(widget), label_past, 2, 3, table_line, table_line+1,
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1720 (GtkAttachOptions) (0),
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1721 (GtkAttachOptions) (0), 0, 0);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1722 gtk_misc_set_alignment(GTK_MISC(label_past), 0, 0.5);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1723 gtk_misc_set_padding(GTK_MISC(label_past), 4, 0);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1724 }
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1725
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1726 g_signal_connect(G_OBJECT(spin_btn), "value_changed",
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1727 G_CALLBACK(on_spin_btn_changed),
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1728 widgets[x].cfg);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1729 g_signal_connect(G_OBJECT(spin_btn), "realize",
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1730 G_CALLBACK(on_spin_btn_realize),
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1731 widgets[x].cfg);
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1732 break;
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1733 case WIDGET_CUSTOM: /* custom widget. --nenolod */
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1734 if (widgets[x].populate)
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1735 widget = widgets[x].populate();
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1736 else
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1737 widget = NULL;
4006
8a3cee5c303b one more commit
Tomasz Mon <desowin@gmail.com>
parents: 4005
diff changeset
1738
8a3cee5c303b one more commit
Tomasz Mon <desowin@gmail.com>
parents: 4005
diff changeset
1739 break;
4003
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1740 default:
4006
8a3cee5c303b one more commit
Tomasz Mon <desowin@gmail.com>
parents: 4005
diff changeset
1741 /* shouldn't ever happen - expect things to break */
4003
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
1742 continue;
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1743 }
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1744
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
1745 if (widget && !gtk_widget_get_parent(widget))
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1746 gtk_container_add(GTK_CONTAINER(alignment), widget);
4038
677c5b5bdb3b Some work on newprefs code:
William Pitcock <nenolod@atheme.org>
parents: 4034
diff changeset
1747 if (widget && widgets[x].tooltip && widgets[x].type != WIDGET_SPIN_BTN)
4008
a2e724d5bf62 make translations working
Tomasz Mon <desowin@gmail.com>
parents: 4007
diff changeset
1748 gtk_tooltips_set_tip(tooltips, widget, _(widgets[x].tooltip), NULL);
4002
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1749 }
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1750
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1751 }
d203c51d94bb you might like it or not, beginning of making preferences more friendly
Tomasz Mon <desowin@gmail.com>
parents: 4001
diff changeset
1752
3990
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
1753 void
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1754 create_prefs_window(void)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1755 {
2467
af0518a11dbf [svn] - more tweaks
nenolod
parents: 2466
diff changeset
1756 gchar *aud_version_string;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1757
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1758 GtkWidget *titlestring_tag_menu, *menu_item;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1759 guint i;
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1760
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1761 GtkWidget *vbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1762 GtkWidget *hbox1;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1763 GtkWidget *scrolledwindow6;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1764 GtkWidget *plugin_page_vbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1765 GtkWidget *plugin_notebook;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1766 GtkWidget *plugin_input_vbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1767 GtkWidget *alignment43;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1768 GtkWidget *input_plugin_list_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1769 GtkWidget *scrolledwindow3;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1770 GtkWidget *input_plugin_view;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1771 GtkWidget *input_plugin_button_box;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1772 GtkWidget *input_plugin_prefs;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1773 GtkWidget *input_plugin_info;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1774 GtkWidget *plugin_input_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1775 GtkWidget *plugin_general_vbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1776 GtkWidget *alignment45;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1777 GtkWidget *label11;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1778 GtkWidget *scrolledwindow5;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1779 GtkWidget *general_plugin_view;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1780 GtkWidget *general_plugin_button_box;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1781 GtkWidget *general_plugin_prefs;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1782 GtkWidget *general_plugin_info;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1783 GtkWidget *plugin_general_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1784 GtkWidget *vbox21;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1785 GtkWidget *alignment46;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1786 GtkWidget *label53;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1787 GtkWidget *scrolledwindow7;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1788 GtkWidget *vis_plugin_view;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1789 GtkWidget *hbuttonbox6;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1790 GtkWidget *vis_plugin_prefs;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1791 GtkWidget *vis_plugin_info;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1792 GtkWidget *vis_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1793 GtkWidget *vbox25;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1794 GtkWidget *alignment58;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1795 GtkWidget *label64;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1796 GtkWidget *scrolledwindow9;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1797 GtkWidget *effect_plugin_view;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1798 GtkWidget *hbuttonbox9;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1799 GtkWidget *effect_plugin_prefs;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1800 GtkWidget *effect_plugin_info;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1801 GtkWidget *effects_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1802 GtkWidget *plugin_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1803 GtkWidget *appearance_page_vbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1804 GtkWidget *vbox37;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1805 GtkWidget *vbox38;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1806 GtkWidget *hbox12;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1807 GtkWidget *alignment94;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1808 GtkWidget *hbox13;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1809 GtkWidget *label103;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1810 GtkWidget *colorspace_button;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1811 GtkWidget *image11;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1812 GtkWidget *image12;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1813 GtkWidget *alignment95;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1814 GtkWidget *skin_view_scrolled_window;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1815 GtkWidget *vbox39;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1816 GtkWidget *alignment96;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1817 GtkWidget *label104;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1818 GtkWidget *table14;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1819 GtkWidget *alignment97;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1820 GtkWidget *label105;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1821 GtkWidget *alignment98;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1822 GtkWidget *label106;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1823 GtkWidget *fontbutton1;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1824 GtkWidget *fontbutton2;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1825 GtkWidget *alignment99;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1826 GtkWidget *checkbutton11;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1827 GtkWidget *vbox40;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1828 GtkWidget *appearance_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1829 GtkWidget *mouse_page_vbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1830 GtkWidget *vbox20;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1831 GtkWidget *mouse_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1832 GtkWidget *playlist_page_vbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1833 GtkWidget *vbox5;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1834 GtkWidget *alignment55;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1835 GtkWidget *label60;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1836 GtkWidget *alignment56;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1837 GtkWidget *table6;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1838 GtkWidget *titlestring_help_button;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1839 GtkWidget *image1;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1840 GtkWidget *titlestring_cbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1841 GtkWidget *label62;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1842 GtkWidget *label61;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1843 GtkWidget *alignment85;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1844 GtkWidget *label84;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1845 GtkWidget *alignment86;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1846 GtkWidget *hbox9;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1847 GtkWidget *vbox34;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1848 GtkWidget *checkbutton10;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1849 GtkWidget *image8;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1850 GtkWidget *playlist_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1851 GtkWidget *connectivity_page_vbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1852 GtkWidget *vbox29;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1853 GtkWidget *alignment63;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1854 GtkWidget *connectivity_page_label;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1855 GtkWidget *alignment68;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1856 GtkWidget *vbox30;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1857 GtkWidget *alignment65;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1858 GtkWidget *proxy_use;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1859 GtkWidget *table8;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1860 GtkWidget *proxy_port;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1861 GtkWidget *proxy_host;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1862 GtkWidget *label69;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1863 GtkWidget *label68;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1864 GtkWidget *alignment67;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1865 GtkWidget *proxy_auth;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1866 GtkWidget *table9;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1867 GtkWidget *proxy_pass;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1868 GtkWidget *proxy_user;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1869 GtkWidget *label71;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1870 GtkWidget *label70;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1871 GtkWidget *alignment72;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1872 GtkWidget *hbox6;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1873 GtkWidget *image4;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1874 GtkWidget *label75;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1875 GtkWidget *label95;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1876 GtkWidget *empty_notebook_page;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1877 GtkWidget *label96;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1878 GtkWidget *audio_scrolled_window;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1879 GtkWidget *audio_page_viewport;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1880 GtkWidget *audio_page_vbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1881 GtkWidget *alignment74;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1882 GtkWidget *label77;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1883 GtkWidget *alignment73;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1884 GtkWidget *vbox33;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1885 GtkWidget *table11;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1886 GtkWidget *image7;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1887 GtkWidget *label79;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1888 GtkWidget *label82;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1889 GtkObject *output_plugin_bufsize_adj;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1890 GtkWidget *output_plugin_bufsize;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1891 GtkWidget *output_plugin_cbox;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1892 GtkWidget *label78;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1893 GtkWidget *alignment82;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1894 GtkWidget *output_plugin_button_box;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1895 GtkWidget *output_plugin_prefs;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1896 GtkWidget *alignment76;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1897 GtkWidget *hbox7;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1898 GtkWidget *image5;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1899 GtkWidget *label80;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1900 GtkWidget *output_plugin_info;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1901 GtkWidget *alignment77;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1902 GtkWidget *hbox8;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1903 GtkWidget *image6;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1904 GtkWidget *label81;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1905 GtkWidget *alignment90;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1906 GtkWidget *label93;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1907 GtkWidget *alignment92;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1908 GtkWidget *enable_src;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1909 GtkWidget *alignment91;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1910 GtkWidget *vbox36;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1911 GtkWidget *table13;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1912 GtkWidget *src_converter_type;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1913 GtkWidget *label94;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1914 GtkWidget *label92;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1915 GtkWidget *image9;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1916 GtkObject *src_rate_adj;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1917 GtkWidget *src_rate;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1918 GtkWidget *label91;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1919 GtkWidget *alignment4;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1920 GtkWidget *label2;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1921 GtkWidget *alignment7;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1922 GtkWidget *software_volume_control;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1923 GtkWidget *hseparator1;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1924 GtkWidget *hbox4;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1925 GtkWidget *audversionlabel;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1926 GtkWidget *prefswin_button_box;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1927 GtkWidget *reload_plugins;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1928 GtkWidget *alignment93;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1929 GtkWidget *hbox11;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1930 GtkWidget *image10;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1931 GtkWidget *label102;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1932 GtkWidget *close;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1933 GtkAccelGroup *accel_group;
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1934
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1935 tooltips = gtk_tooltips_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1936
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1937 accel_group = gtk_accel_group_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1938
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1939 prefswin = gtk_window_new (GTK_WINDOW_TOPLEVEL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1940 gtk_container_set_border_width (GTK_CONTAINER (prefswin), 12);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1941 gtk_window_set_title (GTK_WINDOW (prefswin), _("Audacious Preferences"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1942 gtk_window_set_position (GTK_WINDOW (prefswin), GTK_WIN_POS_CENTER);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1943 gtk_window_set_default_size (GTK_WINDOW (prefswin), 680, 400);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1944
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1945 vbox = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1946 gtk_container_add (GTK_CONTAINER (prefswin), vbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1947
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1948 hbox1 = gtk_hbox_new (FALSE, 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1949 gtk_box_pack_start (GTK_BOX (vbox), hbox1, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1950
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1951 scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1952 gtk_box_pack_start (GTK_BOX (hbox1), scrolledwindow6, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1953 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1954 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_SHADOW_IN);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1955
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1956 category_treeview = gtk_tree_view_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1957 gtk_container_add (GTK_CONTAINER (scrolledwindow6), category_treeview);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1958 gtk_widget_set_size_request (category_treeview, 172, -1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1959 gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (category_treeview), FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1960
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1961 category_notebook = gtk_notebook_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1962 gtk_box_pack_start (GTK_BOX (hbox1), category_notebook, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1963 GTK_WIDGET_UNSET_FLAGS (category_notebook, GTK_CAN_FOCUS);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1964 gtk_notebook_set_show_tabs (GTK_NOTEBOOK (category_notebook), FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1965 gtk_notebook_set_show_border (GTK_NOTEBOOK (category_notebook), FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1966 gtk_notebook_set_scrollable (GTK_NOTEBOOK (category_notebook), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1967
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1968 plugin_page_vbox = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1969 gtk_container_add (GTK_CONTAINER (category_notebook), plugin_page_vbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1970
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1971 plugin_notebook = gtk_notebook_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1972 gtk_box_pack_start (GTK_BOX (plugin_page_vbox), plugin_notebook, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1973 gtk_notebook_set_show_border (GTK_NOTEBOOK (plugin_notebook), FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1974
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1975 plugin_input_vbox = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1976 gtk_container_add (GTK_CONTAINER (plugin_notebook), plugin_input_vbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1977 gtk_container_set_border_width (GTK_CONTAINER (plugin_input_vbox), 12);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1978
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1979 alignment43 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1980 gtk_box_pack_start (GTK_BOX (plugin_input_vbox), alignment43, FALSE, FALSE, 4);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1981 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment43), 0, 6, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1982
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1983 input_plugin_list_label = gtk_label_new_with_mnemonic (_("_Decoder list:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1984 gtk_container_add (GTK_CONTAINER (alignment43), input_plugin_list_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1985 gtk_label_set_use_markup (GTK_LABEL (input_plugin_list_label), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1986 gtk_misc_set_alignment (GTK_MISC (input_plugin_list_label), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1987
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1988 scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1989 gtk_box_pack_start (GTK_BOX (plugin_input_vbox), scrolledwindow3, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1990 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1991 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1992
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1993 input_plugin_view = gtk_tree_view_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1994 gtk_container_add (GTK_CONTAINER (scrolledwindow3), input_plugin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1995 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (input_plugin_view), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1996 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (input_plugin_view), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1997
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1998 input_plugin_button_box = gtk_hbutton_box_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
1999 gtk_box_pack_start (GTK_BOX (plugin_input_vbox), input_plugin_button_box, FALSE, FALSE, 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2000 gtk_button_box_set_layout (GTK_BUTTON_BOX (input_plugin_button_box), GTK_BUTTONBOX_START);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2001 gtk_box_set_spacing (GTK_BOX (input_plugin_button_box), 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2002
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2003 input_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2004 gtk_container_add (GTK_CONTAINER (input_plugin_button_box), input_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2005 gtk_widget_set_sensitive (input_plugin_prefs, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2006 GTK_WIDGET_SET_FLAGS (input_plugin_prefs, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2007
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2008 input_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2009 gtk_container_add (GTK_CONTAINER (input_plugin_button_box), input_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2010 gtk_widget_set_sensitive (input_plugin_info, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2011 GTK_WIDGET_SET_FLAGS (input_plugin_info, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2012
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2013 plugin_input_label = gtk_label_new (_("<span size=\"medium\"><b>Decoders</b></span>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2014 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 0), plugin_input_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2015 gtk_label_set_use_markup (GTK_LABEL (plugin_input_label), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2016 gtk_misc_set_alignment (GTK_MISC (plugin_input_label), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2017
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2018 plugin_general_vbox = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2019 gtk_container_add (GTK_CONTAINER (plugin_notebook), plugin_general_vbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2020 gtk_container_set_border_width (GTK_CONTAINER (plugin_general_vbox), 12);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2021
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2022 alignment45 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2023 gtk_box_pack_start (GTK_BOX (plugin_general_vbox), alignment45, FALSE, FALSE, 4);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2024 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment45), 0, 6, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2025
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2026 label11 = gtk_label_new_with_mnemonic (_("_General plugin list:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2027 gtk_container_add (GTK_CONTAINER (alignment45), label11);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2028 gtk_label_set_use_markup (GTK_LABEL (label11), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2029 gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2030
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2031 scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2032 gtk_box_pack_start (GTK_BOX (plugin_general_vbox), scrolledwindow5, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2033 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2034 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2035
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2036 general_plugin_view = gtk_tree_view_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2037 gtk_container_add (GTK_CONTAINER (scrolledwindow5), general_plugin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2038 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (general_plugin_view), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2039 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (general_plugin_view), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2040
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2041 general_plugin_button_box = gtk_hbutton_box_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2042 gtk_box_pack_start (GTK_BOX (plugin_general_vbox), general_plugin_button_box, FALSE, FALSE, 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2043 gtk_button_box_set_layout (GTK_BUTTON_BOX (general_plugin_button_box), GTK_BUTTONBOX_START);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2044 gtk_box_set_spacing (GTK_BOX (general_plugin_button_box), 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2045
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2046 general_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2047 gtk_container_add (GTK_CONTAINER (general_plugin_button_box), general_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2048 gtk_widget_set_sensitive (general_plugin_prefs, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2049 GTK_WIDGET_SET_FLAGS (general_plugin_prefs, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2050
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2051 general_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2052 gtk_container_add (GTK_CONTAINER (general_plugin_button_box), general_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2053 gtk_widget_set_sensitive (general_plugin_info, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2054 GTK_WIDGET_SET_FLAGS (general_plugin_info, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2055
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2056 plugin_general_label = gtk_label_new (_("<span size=\"medium\"><b>General</b></span>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2057 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 1), plugin_general_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2058 gtk_label_set_use_markup (GTK_LABEL (plugin_general_label), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2059
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2060 vbox21 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2061 gtk_container_add (GTK_CONTAINER (plugin_notebook), vbox21);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2062 gtk_container_set_border_width (GTK_CONTAINER (vbox21), 12);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2063
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2064 alignment46 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2065 gtk_box_pack_start (GTK_BOX (vbox21), alignment46, FALSE, FALSE, 4);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2066 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment46), 0, 6, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2067
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2068 label53 = gtk_label_new_with_mnemonic (_("_Visualization plugin list:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2069 gtk_container_add (GTK_CONTAINER (alignment46), label53);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2070 gtk_label_set_use_markup (GTK_LABEL (label53), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2071 gtk_misc_set_alignment (GTK_MISC (label53), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2072
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2073 scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2074 gtk_box_pack_start (GTK_BOX (vbox21), scrolledwindow7, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2075 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2076 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_SHADOW_IN);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2077
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2078 vis_plugin_view = gtk_tree_view_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2079 gtk_container_add (GTK_CONTAINER (scrolledwindow7), vis_plugin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2080 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (vis_plugin_view), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2081 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (vis_plugin_view), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2082
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2083 hbuttonbox6 = gtk_hbutton_box_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2084 gtk_box_pack_start (GTK_BOX (vbox21), hbuttonbox6, FALSE, FALSE, 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2085 gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox6), GTK_BUTTONBOX_START);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2086 gtk_box_set_spacing (GTK_BOX (hbuttonbox6), 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2087
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2088 vis_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2089 gtk_container_add (GTK_CONTAINER (hbuttonbox6), vis_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2090 gtk_widget_set_sensitive (vis_plugin_prefs, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2091 GTK_WIDGET_SET_FLAGS (vis_plugin_prefs, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2092
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2093 vis_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2094 gtk_container_add (GTK_CONTAINER (hbuttonbox6), vis_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2095 gtk_widget_set_sensitive (vis_plugin_info, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2096 GTK_WIDGET_SET_FLAGS (vis_plugin_info, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2097
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2098 vis_label = gtk_label_new (_("<b>Visualization</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2099 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 2), vis_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2100 gtk_label_set_use_markup (GTK_LABEL (vis_label), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2101
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2102 vbox25 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2103 gtk_container_add (GTK_CONTAINER (plugin_notebook), vbox25);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2104 gtk_container_set_border_width (GTK_CONTAINER (vbox25), 12);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2105
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2106 alignment58 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2107 gtk_box_pack_start (GTK_BOX (vbox25), alignment58, FALSE, FALSE, 4);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2108 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment58), 0, 6, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2109
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2110 label64 = gtk_label_new_with_mnemonic (_("_Effect plugin list:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2111 gtk_container_add (GTK_CONTAINER (alignment58), label64);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2112 gtk_label_set_use_markup (GTK_LABEL (label64), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2113 gtk_misc_set_alignment (GTK_MISC (label64), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2114
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2115 scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2116 gtk_box_pack_start (GTK_BOX (vbox25), scrolledwindow9, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2117 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2118 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_SHADOW_IN);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2119
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2120 effect_plugin_view = gtk_tree_view_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2121 gtk_container_add (GTK_CONTAINER (scrolledwindow9), effect_plugin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2122 gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (effect_plugin_view), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2123 gtk_tree_view_set_reorderable (GTK_TREE_VIEW (effect_plugin_view), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2124
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2125 hbuttonbox9 = gtk_hbutton_box_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2126 gtk_box_pack_start (GTK_BOX (vbox25), hbuttonbox9, FALSE, FALSE, 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2127 gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox9), GTK_BUTTONBOX_START);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2128 gtk_box_set_spacing (GTK_BOX (hbuttonbox9), 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2129
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2130 effect_plugin_prefs = gtk_button_new_from_stock ("gtk-preferences");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2131 gtk_container_add (GTK_CONTAINER (hbuttonbox9), effect_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2132 gtk_widget_set_sensitive (effect_plugin_prefs, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2133 GTK_WIDGET_SET_FLAGS (effect_plugin_prefs, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2134
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2135 effect_plugin_info = gtk_button_new_from_stock ("gtk-dialog-info");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2136 gtk_container_add (GTK_CONTAINER (hbuttonbox9), effect_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2137 gtk_widget_set_sensitive (effect_plugin_info, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2138 GTK_WIDGET_SET_FLAGS (effect_plugin_info, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2139
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2140 effects_label = gtk_label_new (_("<b>Effects</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2141 gtk_notebook_set_tab_label (GTK_NOTEBOOK (plugin_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (plugin_notebook), 3), effects_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2142 gtk_label_set_use_markup (GTK_LABEL (effects_label), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2143
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2144 plugin_label = gtk_label_new (_("Plugins"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2145 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 0), plugin_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2146
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2147 appearance_page_vbox = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2148 gtk_container_add (GTK_CONTAINER (category_notebook), appearance_page_vbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2149
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2150 vbox37 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2151 gtk_box_pack_start (GTK_BOX (appearance_page_vbox), vbox37, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2152
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2153 vbox38 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2154 gtk_box_pack_start (GTK_BOX (vbox37), vbox38, FALSE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2155
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2156 hbox12 = gtk_hbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2157 gtk_box_pack_start (GTK_BOX (vbox38), hbox12, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2158
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2159 alignment94 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2160 gtk_box_pack_start (GTK_BOX (hbox12), alignment94, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2161 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment94), 0, 4, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2162
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2163 hbox13 = gtk_hbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2164 gtk_container_add (GTK_CONTAINER (alignment94), hbox13);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2165
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2166 label103 = gtk_label_new_with_mnemonic (_("<b>_Skin</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2167 gtk_box_pack_start (GTK_BOX (hbox13), label103, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2168 gtk_label_set_use_markup (GTK_LABEL (label103), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2169 gtk_misc_set_alignment (GTK_MISC (label103), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2170
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2171 colorspace_button = gtk_button_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2172 gtk_box_pack_start (GTK_BOX (hbox13), colorspace_button, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2173
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2174 image11 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2175 gtk_container_add (GTK_CONTAINER (colorspace_button), image11);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2176
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2177 skin_refresh_button = gtk_button_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2178 gtk_box_pack_start (GTK_BOX (hbox13), skin_refresh_button, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2179 GTK_WIDGET_UNSET_FLAGS (skin_refresh_button, GTK_CAN_FOCUS);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2180 gtk_tooltips_set_tip (tooltips, skin_refresh_button, _("Refresh skin list"), NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2181 gtk_button_set_relief (GTK_BUTTON (skin_refresh_button), GTK_RELIEF_HALF);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2182 gtk_button_set_focus_on_click (GTK_BUTTON (skin_refresh_button), FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2183
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2184 image12 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2185 gtk_container_add (GTK_CONTAINER (skin_refresh_button), image12);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2186
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2187 alignment95 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2188 gtk_box_pack_start (GTK_BOX (vbox38), alignment95, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2189 gtk_widget_set_size_request (alignment95, -1, 172);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2190 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment95), 0, 0, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2191
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2192 skin_view_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2193 gtk_container_add (GTK_CONTAINER (alignment95), skin_view_scrolled_window);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2194 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2195 gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (skin_view_scrolled_window), GTK_SHADOW_IN);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2196
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2197 skin_view = gtk_tree_view_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2198 gtk_container_add (GTK_CONTAINER (skin_view_scrolled_window), skin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2199 gtk_widget_set_size_request (skin_view, -1, 100);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2200
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2201 vbox39 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2202 gtk_box_pack_start (GTK_BOX (vbox37), vbox39, FALSE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2203
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2204 alignment96 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2205 gtk_box_pack_start (GTK_BOX (vbox39), alignment96, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2206 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment96), 12, 6, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2207
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2208 label104 = gtk_label_new_with_mnemonic (_("<b>_Fonts</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2209 gtk_container_add (GTK_CONTAINER (alignment96), label104);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2210 gtk_label_set_use_markup (GTK_LABEL (label104), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2211 gtk_misc_set_alignment (GTK_MISC (label104), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2212
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2213 table14 = gtk_table_new (2, 2, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2214 gtk_box_pack_start (GTK_BOX (vbox39), table14, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2215 gtk_table_set_row_spacings (GTK_TABLE (table14), 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2216 gtk_table_set_col_spacings (GTK_TABLE (table14), 2);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2217
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2218 alignment97 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2219 gtk_table_attach (GTK_TABLE (table14), alignment97, 0, 1, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2220 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2221 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2222 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment97), 0, 0, 12, 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2223
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2224 label105 = gtk_label_new_with_mnemonic (_("_Player:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2225 gtk_container_add (GTK_CONTAINER (alignment97), label105);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2226 gtk_label_set_use_markup (GTK_LABEL (label105), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2227 gtk_misc_set_alignment (GTK_MISC (label105), 1, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2228
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2229 alignment98 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2230 gtk_table_attach (GTK_TABLE (table14), alignment98, 0, 1, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2231 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2232 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2233 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment98), 0, 0, 12, 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2234
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2235 label106 = gtk_label_new_with_mnemonic (_("_Playlist:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2236 gtk_container_add (GTK_CONTAINER (alignment98), label106);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2237 gtk_label_set_use_markup (GTK_LABEL (label106), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2238 gtk_label_set_justify (GTK_LABEL (label106), GTK_JUSTIFY_RIGHT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2239 gtk_misc_set_alignment (GTK_MISC (label106), 1, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2240
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2241 fontbutton1 = gtk_font_button_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2242 gtk_table_attach (GTK_TABLE (table14), fontbutton1, 1, 2, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2243 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2244 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2245 gtk_font_button_set_title (GTK_FONT_BUTTON (fontbutton1), _("Select main player window font:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2246 gtk_font_button_set_use_font (GTK_FONT_BUTTON (fontbutton1), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2247 gtk_font_button_set_use_size (GTK_FONT_BUTTON (fontbutton1), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2248
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2249 fontbutton2 = gtk_font_button_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2250 gtk_table_attach (GTK_TABLE (table14), fontbutton2, 1, 2, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2251 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2252 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2253 gtk_font_button_set_title (GTK_FONT_BUTTON (fontbutton2), _("Select playlist font:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2254 gtk_font_button_set_use_font (GTK_FONT_BUTTON (fontbutton2), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2255 gtk_font_button_set_use_size (GTK_FONT_BUTTON (fontbutton2), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2256
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2257 alignment99 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2258 gtk_box_pack_start (GTK_BOX (vbox39), alignment99, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2259 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment99), 4, 0, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2260
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2261 checkbutton11 = gtk_check_button_new_with_mnemonic (_("Use Bitmap fonts if available"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2262 gtk_container_add (GTK_CONTAINER (alignment99), checkbutton11);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2263 gtk_tooltips_set_tip (tooltips, checkbutton11, _("Use bitmap fonts if they are available. Bitmap fonts do not support Unicode strings."), NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2264
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2265 vbox40 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2266 gtk_box_pack_start (GTK_BOX (vbox37), vbox40, FALSE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2267
4045
f81e86d8e8e4 removed equalizer options page, because i can imagine hardly anyone who
mf0102 <0102@gmx.at>
parents: 4043
diff changeset
2268 create_widgets(GTK_BOX(vbox40), appearance_misc_widgets, G_N_ELEMENTS(appearance_misc_widgets));
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2269
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2270 appearance_label = gtk_label_new (_("Appearance"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2271 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 1), appearance_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2272
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2273 mouse_page_vbox = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2274 gtk_container_add (GTK_CONTAINER (category_notebook), mouse_page_vbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2275
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2276 vbox20 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2277 gtk_box_pack_start (GTK_BOX (mouse_page_vbox), vbox20, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2278
4007
fc85f7ce6969 introduce WIDGET_SPIN_BTN
Tomasz Mon <desowin@gmail.com>
parents: 4006
diff changeset
2279 create_widgets(GTK_BOX(vbox20), mouse_page_widgets, G_N_ELEMENTS(mouse_page_widgets));
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2280
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2281 mouse_label = gtk_label_new (_("Mouse"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2282 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 2), mouse_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2283
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2284 playlist_page_vbox = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2285 gtk_container_add (GTK_CONTAINER (category_notebook), playlist_page_vbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2286
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2287 vbox5 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2288 gtk_box_pack_start (GTK_BOX (playlist_page_vbox), vbox5, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2289
4004
196c326d9b70 again further changes
Tomasz Mon <desowin@gmail.com>
parents: 4003
diff changeset
2290 create_widgets(GTK_BOX(vbox5), playlist_page_widgets, G_N_ELEMENTS(playlist_page_widgets));
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2291
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2292 alignment55 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2293 gtk_box_pack_start (GTK_BOX (vbox5), alignment55, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2294 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment55), 12, 12, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2295
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2296 label60 = gtk_label_new (_("<b>Song Display</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2297 gtk_container_add (GTK_CONTAINER (alignment55), label60);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2298 gtk_label_set_use_markup (GTK_LABEL (label60), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2299 gtk_misc_set_alignment (GTK_MISC (label60), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2300
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2301 alignment56 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2302 gtk_box_pack_start (GTK_BOX (vbox5), alignment56, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2303 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment56), 0, 0, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2304
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2305 table6 = gtk_table_new (2, 3, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2306 gtk_container_add (GTK_CONTAINER (alignment56), table6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2307 gtk_table_set_row_spacings (GTK_TABLE (table6), 4);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2308 gtk_table_set_col_spacings (GTK_TABLE (table6), 12);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2309
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2310 titlestring_help_button = gtk_button_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2311 gtk_table_attach (GTK_TABLE (table6), titlestring_help_button, 2, 3, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2312 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2313 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2314 GTK_WIDGET_UNSET_FLAGS (titlestring_help_button, GTK_CAN_FOCUS);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2315 gtk_tooltips_set_tip (tooltips, titlestring_help_button, _("Show information about titlestring format"), NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2316 gtk_button_set_relief (GTK_BUTTON (titlestring_help_button), GTK_RELIEF_HALF);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2317 gtk_button_set_focus_on_click (GTK_BUTTON (titlestring_help_button), FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2318
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2319 image1 = gtk_image_new_from_stock ("gtk-index", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2320 gtk_container_add (GTK_CONTAINER (titlestring_help_button), image1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2321
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2322 titlestring_cbox = gtk_combo_box_new_text ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2323 gtk_table_attach (GTK_TABLE (table6), titlestring_cbox, 1, 3, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2324 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2325 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2326 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("TITLE"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2327 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST - TITLE"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2328 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST - ALBUM - TITLE"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2329 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST - ALBUM - TRACK. TITLE"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2330 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ARTIST [ ALBUM ] - TRACK. TITLE"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2331 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("ALBUM - TITLE"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2332 gtk_combo_box_append_text (GTK_COMBO_BOX (titlestring_cbox), _("Custom"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2333
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2334 titlestring_entry = gtk_entry_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2335 gtk_table_attach (GTK_TABLE (table6), titlestring_entry, 1, 2, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2336 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2337 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2338
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2339 label62 = gtk_label_new (_("Custom string:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2340 gtk_table_attach (GTK_TABLE (table6), label62, 0, 1, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2341 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2342 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2343 gtk_label_set_justify (GTK_LABEL (label62), GTK_JUSTIFY_RIGHT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2344 gtk_misc_set_alignment (GTK_MISC (label62), 1, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2345
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2346 label61 = gtk_label_new (_("Title format:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2347 gtk_table_attach (GTK_TABLE (table6), label61, 0, 1, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2348 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2349 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2350 gtk_label_set_justify (GTK_LABEL (label61), GTK_JUSTIFY_RIGHT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2351 gtk_misc_set_alignment (GTK_MISC (label61), 1, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2352
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2353 alignment85 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2354 gtk_box_pack_start (GTK_BOX (vbox5), alignment85, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2355 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment85), 12, 12, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2356
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2357 label84 = gtk_label_new (_("<b>Popup Information</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2358 gtk_container_add (GTK_CONTAINER (alignment85), label84);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2359 gtk_label_set_use_markup (GTK_LABEL (label84), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2360 gtk_misc_set_alignment (GTK_MISC (label84), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2361
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2362 alignment86 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2363 gtk_box_pack_start (GTK_BOX (vbox5), alignment86, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2364 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment86), 0, 0, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2365
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2366 hbox9 = gtk_hbox_new (FALSE, 12);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2367 gtk_container_add (GTK_CONTAINER (alignment86), hbox9);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2368
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2369 vbox34 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2370 gtk_box_pack_start (GTK_BOX (hbox9), vbox34, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2371
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2372 checkbutton10 = gtk_check_button_new_with_mnemonic (_("Show popup information for playlist entries"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2373 gtk_box_pack_start (GTK_BOX (vbox34), checkbutton10, TRUE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2374 gtk_tooltips_set_tip (tooltips, checkbutton10, _("Toggles popup information window for the pointed entry in the playlist. The window shows title of song, name of album, genre, year of publish, track number, track length, and artwork."), NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2375
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2376 filepopup_for_tuple_settings_button = gtk_button_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2377 gtk_box_pack_start (GTK_BOX (hbox9), filepopup_for_tuple_settings_button, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2378 GTK_WIDGET_UNSET_FLAGS (filepopup_for_tuple_settings_button, GTK_CAN_FOCUS);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2379 gtk_tooltips_set_tip (tooltips, filepopup_for_tuple_settings_button, _("Edit settings for popup information"), NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2380 gtk_button_set_relief (GTK_BUTTON (filepopup_for_tuple_settings_button), GTK_RELIEF_HALF);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2381
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2382 image8 = gtk_image_new_from_stock ("gtk-properties", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2383 gtk_container_add (GTK_CONTAINER (filepopup_for_tuple_settings_button), image8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2384
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2385 playlist_label = gtk_label_new (_("Playlist"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2386 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 3), playlist_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2387
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2388 connectivity_page_vbox = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2389 gtk_container_add (GTK_CONTAINER (category_notebook), connectivity_page_vbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2390
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2391 vbox29 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2392 gtk_box_pack_start (GTK_BOX (connectivity_page_vbox), vbox29, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2393
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2394 alignment63 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2395 gtk_box_pack_start (GTK_BOX (vbox29), alignment63, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2396 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment63), 0, 12, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2397
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2398 connectivity_page_label = gtk_label_new (_("<b>Proxy Configuration</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2399 gtk_container_add (GTK_CONTAINER (alignment63), connectivity_page_label);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2400 gtk_label_set_use_markup (GTK_LABEL (connectivity_page_label), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2401 gtk_misc_set_alignment (GTK_MISC (connectivity_page_label), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2402
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2403 alignment68 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2404 gtk_box_pack_start (GTK_BOX (vbox29), alignment68, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2405 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment68), 0, 0, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2406
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2407 vbox30 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2408 gtk_container_add (GTK_CONTAINER (alignment68), vbox30);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2409
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2410 alignment65 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2411 gtk_box_pack_start (GTK_BOX (vbox30), alignment65, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2412 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment65), 0, 12, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2413
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2414 proxy_use = gtk_check_button_new_with_mnemonic (_("Enable proxy usage"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2415 gtk_container_add (GTK_CONTAINER (alignment65), proxy_use);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2416
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2417 table8 = gtk_table_new (2, 2, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2418 gtk_box_pack_start (GTK_BOX (vbox30), table8, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2419 gtk_table_set_row_spacings (GTK_TABLE (table8), 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2420 gtk_table_set_col_spacings (GTK_TABLE (table8), 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2421
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2422 proxy_port = gtk_entry_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2423 gtk_table_attach (GTK_TABLE (table8), proxy_port, 1, 2, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2424 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2425 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2426
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2427 proxy_host = gtk_entry_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2428 gtk_table_attach (GTK_TABLE (table8), proxy_host, 1, 2, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2429 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2430 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2431
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2432 label69 = gtk_label_new (_("Proxy port:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2433 gtk_table_attach (GTK_TABLE (table8), label69, 0, 1, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2434 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2435 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2436 gtk_misc_set_alignment (GTK_MISC (label69), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2437
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2438 label68 = gtk_label_new (_("Proxy hostname:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2439 gtk_table_attach (GTK_TABLE (table8), label68, 0, 1, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2440 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2441 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2442 gtk_misc_set_alignment (GTK_MISC (label68), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2443
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2444 alignment67 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2445 gtk_box_pack_start (GTK_BOX (vbox30), alignment67, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2446 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment67), 12, 12, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2447
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2448 proxy_auth = gtk_check_button_new_with_mnemonic (_("Use authentication with proxy"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2449 gtk_container_add (GTK_CONTAINER (alignment67), proxy_auth);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2450
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2451 table9 = gtk_table_new (2, 2, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2452 gtk_box_pack_start (GTK_BOX (vbox30), table9, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2453 gtk_table_set_row_spacings (GTK_TABLE (table9), 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2454 gtk_table_set_col_spacings (GTK_TABLE (table9), 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2455
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2456 proxy_pass = gtk_entry_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2457 gtk_table_attach (GTK_TABLE (table9), proxy_pass, 1, 2, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2458 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2459 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2460 gtk_entry_set_visibility (GTK_ENTRY (proxy_pass), FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2461
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2462 proxy_user = gtk_entry_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2463 gtk_table_attach (GTK_TABLE (table9), proxy_user, 1, 2, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2464 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2465 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2466
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2467 label71 = gtk_label_new (_("Proxy password:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2468 gtk_table_attach (GTK_TABLE (table9), label71, 0, 1, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2469 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2470 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2471 gtk_misc_set_alignment (GTK_MISC (label71), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2472
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2473 label70 = gtk_label_new (_("Proxy username:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2474 gtk_table_attach (GTK_TABLE (table9), label70, 0, 1, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2475 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2476 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2477 gtk_misc_set_alignment (GTK_MISC (label70), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2478
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2479 alignment72 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2480 gtk_box_pack_start (GTK_BOX (vbox30), alignment72, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2481 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment72), 6, 0, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2482
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2483 hbox6 = gtk_hbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2484 gtk_container_add (GTK_CONTAINER (alignment72), hbox6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2485
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2486 image4 = gtk_image_new_from_stock ("gtk-dialog-warning", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2487 gtk_box_pack_start (GTK_BOX (hbox6), image4, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2488 gtk_misc_set_padding (GTK_MISC (image4), 3, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2489
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2490 label75 = gtk_label_new (_("<span size=\"small\">Changing these settings will require a restart of Audacious.</span>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2491 gtk_box_pack_start (GTK_BOX (hbox6), label75, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2492 gtk_label_set_use_markup (GTK_LABEL (label75), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2493
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2494 label95 = gtk_label_new ("");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2495 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 5), label95);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2496
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2497 empty_notebook_page = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2498 gtk_container_add (GTK_CONTAINER (category_notebook), empty_notebook_page);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2499
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2500 label96 = gtk_label_new ("");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2501 gtk_notebook_set_tab_label (GTK_NOTEBOOK (category_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (category_notebook), 6), label96);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2502
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2503 audio_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2504 gtk_container_add (GTK_CONTAINER (empty_notebook_page), audio_scrolled_window);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2505 gtk_notebook_set_tab_label_packing (GTK_NOTEBOOK (category_notebook), audio_scrolled_window,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2506 TRUE, TRUE, GTK_PACK_START);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2507 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (audio_scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2508
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2509 audio_page_viewport = gtk_viewport_new (NULL, NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2510 gtk_container_add (GTK_CONTAINER (audio_scrolled_window), audio_page_viewport);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2511 gtk_widget_set_events (audio_page_viewport, GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2512 gtk_viewport_set_shadow_type (GTK_VIEWPORT (audio_page_viewport), GTK_SHADOW_NONE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2513
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2514 audio_page_vbox = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2515 gtk_container_add (GTK_CONTAINER (audio_page_viewport), audio_page_vbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2516
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2517 alignment74 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2518 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment74, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2519 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment74), 0, 12, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2520
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2521 label77 = gtk_label_new (_("<b>Audio System</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2522 gtk_container_add (GTK_CONTAINER (alignment74), label77);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2523 gtk_label_set_use_markup (GTK_LABEL (label77), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2524 gtk_misc_set_alignment (GTK_MISC (label77), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2525
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2526 alignment73 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2527 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment73, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2528 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment73), 0, 6, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2529
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2530 vbox33 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2531 gtk_container_add (GTK_CONTAINER (alignment73), vbox33);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2532
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2533 table11 = gtk_table_new (3, 2, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2534 gtk_box_pack_start (GTK_BOX (vbox33), table11, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2535 gtk_table_set_row_spacings (GTK_TABLE (table11), 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2536 gtk_table_set_col_spacings (GTK_TABLE (table11), 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2537
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2538 image7 = gtk_image_new_from_stock ("gtk-info", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2539 gtk_table_attach (GTK_TABLE (table11), image7, 0, 1, 2, 3,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2540 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2541 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2542 gtk_misc_set_alignment (GTK_MISC (image7), 1, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2543
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2544 label79 = gtk_label_new (_("Buffer size:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2545 gtk_table_attach (GTK_TABLE (table11), label79, 0, 1, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2546 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2547 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2548 gtk_misc_set_alignment (GTK_MISC (label79), 1, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2549
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2550 label82 = gtk_label_new (_("<span size=\"small\">This is the amount of time to prebuffer audio streams by, in milliseconds.\nIncrease this value if you are experiencing audio skipping.\nPlease note however, that high values will result in Audacious performing poorly.</span>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2551 gtk_table_attach (GTK_TABLE (table11), label82, 1, 2, 2, 3,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2552 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2553 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2554 gtk_label_set_use_markup (GTK_LABEL (label82), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2555 gtk_label_set_line_wrap (GTK_LABEL (label82), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2556 gtk_misc_set_alignment (GTK_MISC (label82), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2557
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2558 output_plugin_bufsize_adj = gtk_adjustment_new (0, 0, 600000, 100, 1000, 1000);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2559 output_plugin_bufsize = gtk_spin_button_new (GTK_ADJUSTMENT (output_plugin_bufsize_adj), 1, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2560 gtk_table_attach (GTK_TABLE (table11), output_plugin_bufsize, 1, 2, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2561 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2562 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2563
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2564 output_plugin_cbox = gtk_combo_box_new_text ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2565 gtk_table_attach (GTK_TABLE (table11), output_plugin_cbox, 1, 2, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2566 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2567 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2568
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2569 label78 = gtk_label_new (_("Current output plugin:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2570 gtk_table_attach (GTK_TABLE (table11), label78, 0, 1, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2571 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2572 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2573 gtk_misc_set_alignment (GTK_MISC (label78), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2574
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2575 alignment82 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2576 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment82, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2577 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment82), 0, 0, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2578
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2579 output_plugin_button_box = gtk_hbutton_box_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2580 gtk_container_add (GTK_CONTAINER (alignment82), output_plugin_button_box);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2581 gtk_button_box_set_layout (GTK_BUTTON_BOX (output_plugin_button_box), GTK_BUTTONBOX_START);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2582 gtk_box_set_spacing (GTK_BOX (output_plugin_button_box), 8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2583
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2584 output_plugin_prefs = gtk_button_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2585 gtk_container_add (GTK_CONTAINER (output_plugin_button_box), output_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2586 gtk_widget_set_sensitive (output_plugin_prefs, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2587 GTK_WIDGET_SET_FLAGS (output_plugin_prefs, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2588
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2589 alignment76 = gtk_alignment_new (0.5, 0.5, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2590 gtk_container_add (GTK_CONTAINER (output_plugin_prefs), alignment76);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2591
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2592 hbox7 = gtk_hbox_new (FALSE, 2);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2593 gtk_container_add (GTK_CONTAINER (alignment76), hbox7);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2594
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2595 image5 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2596 gtk_box_pack_start (GTK_BOX (hbox7), image5, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2597
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2598 label80 = gtk_label_new_with_mnemonic (_("Output Plugin Preferences"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2599 gtk_box_pack_start (GTK_BOX (hbox7), label80, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2600
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2601 output_plugin_info = gtk_button_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2602 gtk_container_add (GTK_CONTAINER (output_plugin_button_box), output_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2603 gtk_widget_set_sensitive (output_plugin_info, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2604 GTK_WIDGET_SET_FLAGS (output_plugin_info, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2605
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2606 alignment77 = gtk_alignment_new (0.5, 0.5, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2607 gtk_container_add (GTK_CONTAINER (output_plugin_info), alignment77);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2608
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2609 hbox8 = gtk_hbox_new (FALSE, 2);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2610 gtk_container_add (GTK_CONTAINER (alignment77), hbox8);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2611
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2612 image6 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2613 gtk_box_pack_start (GTK_BOX (hbox8), image6, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2614
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2615 label81 = gtk_label_new_with_mnemonic (_("Output Plugin Information"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2616 gtk_box_pack_start (GTK_BOX (hbox8), label81, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2617
4003
400b5e4cfc19 further changes
Tomasz Mon <desowin@gmail.com>
parents: 4002
diff changeset
2618 create_widgets(GTK_BOX(audio_page_vbox), audio_page_widgets, G_N_ELEMENTS(audio_page_widgets));
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2619
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2620 alignment90 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2621 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment90, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2622 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment90), 12, 12, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2623
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2624 label93 = gtk_label_new (_("<b>Sampling Rate Converter</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2625 gtk_container_add (GTK_CONTAINER (alignment90), label93);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2626 gtk_label_set_use_markup (GTK_LABEL (label93), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2627 gtk_misc_set_alignment (GTK_MISC (label93), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2628
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2629 alignment92 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2630 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment92, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2631 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment92), 0, 0, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2632
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2633 enable_src = gtk_check_button_new_with_mnemonic (_("Enable Sampling Rate Converter"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2634 gtk_container_add (GTK_CONTAINER (alignment92), enable_src);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2635 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enable_src), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2636
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2637 alignment91 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2638 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment91, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2639 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment91), 0, 6, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2640
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2641 vbox36 = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2642 gtk_container_add (GTK_CONTAINER (alignment91), vbox36);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2643
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2644 table13 = gtk_table_new (3, 2, FALSE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2645 gtk_box_pack_start (GTK_BOX (vbox36), table13, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2646 gtk_table_set_row_spacings (GTK_TABLE (table13), 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2647 gtk_table_set_col_spacings (GTK_TABLE (table13), 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2648
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2649 src_converter_type = gtk_combo_box_new_text ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2650 gtk_table_attach (GTK_TABLE (table13), src_converter_type, 1, 2, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2651 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2652 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2653 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Best Sinc Interpolation"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2654 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Medium Sinc Interpolation"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2655 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Fastest Sinc Interpolation"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2656 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("ZOH Interpolation"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2657 gtk_combo_box_append_text (GTK_COMBO_BOX (src_converter_type), _("Linear Interpolation"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2658
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2659 label94 = gtk_label_new (_("Interpolation Engine:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2660 gtk_table_attach (GTK_TABLE (table13), label94, 0, 1, 1, 2,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2661 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2662 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2663 gtk_misc_set_alignment (GTK_MISC (label94), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2664
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2665 label92 = gtk_label_new (_("<span size=\"small\">All streams will be converted to this sampling rate.\nThis should be the max supported sampling rate of\nthe sound card or output plugin.</span>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2666 gtk_table_attach (GTK_TABLE (table13), label92, 1, 2, 2, 3,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2667 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2668 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2669 gtk_label_set_use_markup (GTK_LABEL (label92), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2670 gtk_label_set_line_wrap (GTK_LABEL (label92), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2671 gtk_misc_set_alignment (GTK_MISC (label92), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2672
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2673 image9 = gtk_image_new_from_stock ("gtk-info", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2674 gtk_table_attach (GTK_TABLE (table13), image9, 0, 1, 2, 3,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2675 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2676 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2677 gtk_misc_set_alignment (GTK_MISC (image9), 1, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2678
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2679 src_rate_adj = gtk_adjustment_new (96000, 1000, 768000, 1000, 1000, 1000);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2680 src_rate = gtk_spin_button_new (GTK_ADJUSTMENT (src_rate_adj), 1, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2681 gtk_table_attach (GTK_TABLE (table13), src_rate, 1, 2, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2682 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2683 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2684
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2685 label91 = gtk_label_new (_("Sampling Rate [Hz]:"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2686 gtk_table_attach (GTK_TABLE (table13), label91, 0, 1, 0, 1,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2687 (GtkAttachOptions) (0),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2688 (GtkAttachOptions) (0), 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2689 gtk_misc_set_alignment (GTK_MISC (label91), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2690
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2691 alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2692 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment4, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2693 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 12, 12, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2694
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2695 label2 = gtk_label_new (_("<b>Volume Control</b>"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2696 gtk_container_add (GTK_CONTAINER (alignment4), label2);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2697 gtk_label_set_use_markup (GTK_LABEL (label2), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2698 gtk_misc_set_alignment (GTK_MISC (label2), 0, 0.5);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2699
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2700 alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2701 gtk_box_pack_start (GTK_BOX (audio_page_vbox), alignment7, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2702 gtk_alignment_set_padding (GTK_ALIGNMENT (alignment7), 0, 0, 12, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2703
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2704 software_volume_control = gtk_check_button_new_with_mnemonic (_("Use software volume control"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2705 gtk_container_add (GTK_CONTAINER (alignment7), software_volume_control);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2706 gtk_tooltips_set_tip (tooltips, software_volume_control, _("Use software volume control. This may be useful for situations where your audio system does not support controlling the playback volume."), NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2707
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2708 empty_notebook_page = gtk_vbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2709 gtk_container_add (GTK_CONTAINER (category_notebook), empty_notebook_page);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2710
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2711 hseparator1 = gtk_hseparator_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2712 gtk_box_pack_start (GTK_BOX (vbox), hseparator1, FALSE, FALSE, 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2713
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2714 hbox4 = gtk_hbox_new (FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2715 gtk_box_pack_start (GTK_BOX (vbox), hbox4, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2716
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2717 audversionlabel = gtk_label_new ("");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2718 gtk_box_pack_start (GTK_BOX (hbox4), audversionlabel, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2719 gtk_label_set_use_markup (GTK_LABEL (audversionlabel), TRUE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2720
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2721 prefswin_button_box = gtk_hbutton_box_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2722 gtk_box_pack_start (GTK_BOX (hbox4), prefswin_button_box, TRUE, TRUE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2723 gtk_button_box_set_layout (GTK_BUTTON_BOX (prefswin_button_box), GTK_BUTTONBOX_END);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2724 gtk_box_set_spacing (GTK_BOX (prefswin_button_box), 6);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2725
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2726 reload_plugins = gtk_button_new ();
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2727 gtk_container_add (GTK_CONTAINER (prefswin_button_box), reload_plugins);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2728 GTK_WIDGET_SET_FLAGS (reload_plugins, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2729
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2730 alignment93 = gtk_alignment_new (0.5, 0.5, 0, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2731 gtk_container_add (GTK_CONTAINER (reload_plugins), alignment93);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2732
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2733 hbox11 = gtk_hbox_new (FALSE, 2);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2734 gtk_container_add (GTK_CONTAINER (alignment93), hbox11);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2735
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2736 image10 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2737 gtk_box_pack_start (GTK_BOX (hbox11), image10, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2738
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2739 label102 = gtk_label_new_with_mnemonic (_("Reload Plugins"));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2740 gtk_box_pack_start (GTK_BOX (hbox11), label102, FALSE, FALSE, 0);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2741
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2742 close = gtk_button_new_from_stock ("gtk-close");
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2743 gtk_container_add (GTK_CONTAINER (prefswin_button_box), close);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2744 GTK_WIDGET_SET_FLAGS (close, GTK_CAN_DEFAULT);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2745 gtk_widget_add_accelerator (close, "clicked", accel_group,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2746 GDK_Escape, (GdkModifierType) 0,
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2747 GTK_ACCEL_VISIBLE);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2748
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2749
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2750 gtk_label_set_mnemonic_widget (GTK_LABEL (input_plugin_list_label), category_notebook);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2751 gtk_label_set_mnemonic_widget (GTK_LABEL (label11), category_notebook);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2752 gtk_label_set_mnemonic_widget (GTK_LABEL (label53), category_notebook);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2753 gtk_label_set_mnemonic_widget (GTK_LABEL (label64), category_notebook);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2754 gtk_label_set_mnemonic_widget (GTK_LABEL (label103), category_notebook);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2755 gtk_label_set_mnemonic_widget (GTK_LABEL (label104), category_notebook);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2756 gtk_label_set_mnemonic_widget (GTK_LABEL (label105), fontbutton1);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2757 gtk_label_set_mnemonic_widget (GTK_LABEL (label106), fontbutton2);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2758
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2759 gtk_window_add_accel_group (GTK_WINDOW (prefswin), accel_group);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2760
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2761 /* connect signals */
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2762 g_signal_connect(G_OBJECT(prefswin), "delete_event",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2763 G_CALLBACK(gtk_widget_hide_on_delete),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2764 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2765 g_signal_connect_after(G_OBJECT(input_plugin_view), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2766 G_CALLBACK(on_input_plugin_view_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2767 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2768 g_signal_connect_after(G_OBJECT(general_plugin_view), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2769 G_CALLBACK(on_general_plugin_view_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2770 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2771 g_signal_connect_after(G_OBJECT(vis_plugin_view), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2772 G_CALLBACK(on_vis_plugin_view_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2773 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2774 g_signal_connect_after(G_OBJECT(effect_plugin_view), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2775 G_CALLBACK(on_effect_plugin_view_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2776 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2777 g_signal_connect(G_OBJECT(colorspace_button), "clicked",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2778 G_CALLBACK(on_colorize_button_clicked),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2779 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2780 g_signal_connect_swapped(G_OBJECT(skin_refresh_button), "clicked",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2781 G_CALLBACK(on_skin_refresh_button_clicked),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2782 prefswin);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2783 g_signal_connect_after(G_OBJECT(skin_view), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2784 G_CALLBACK(on_skin_view_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2785 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2786 g_signal_connect_after(G_OBJECT(fontbutton1), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2787 G_CALLBACK(on_mainwin_font_button_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2788 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2789 g_signal_connect(G_OBJECT(fontbutton1), "font_set",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2790 G_CALLBACK(on_mainwin_font_button_font_set),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2791 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2792 g_signal_connect_after(G_OBJECT(fontbutton2), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2793 G_CALLBACK(on_playlist_font_button_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2794 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2795 g_signal_connect(G_OBJECT(fontbutton2), "font_set",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2796 G_CALLBACK(on_playlist_font_button_font_set),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2797 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2798 g_signal_connect(G_OBJECT(checkbutton11), "toggled",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2799 G_CALLBACK(on_use_bitmap_fonts_toggled),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2800 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2801 g_signal_connect_after(G_OBJECT(checkbutton11), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2802 G_CALLBACK(on_use_bitmap_fonts_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2803 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2804 g_signal_connect(G_OBJECT(titlestring_entry), "changed",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2805 G_CALLBACK(on_titlestring_entry_changed),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2806 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2807 g_signal_connect_after(G_OBJECT(titlestring_entry), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2808 G_CALLBACK(on_titlestring_entry_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2809 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2810 g_signal_connect(G_OBJECT(checkbutton10), "toggled",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2811 G_CALLBACK(on_show_filepopup_for_tuple_toggled),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2812 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2813 g_signal_connect_after(G_OBJECT(checkbutton10), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2814 G_CALLBACK(on_show_filepopup_for_tuple_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2815 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2816 g_signal_connect(G_OBJECT(filepopup_for_tuple_settings_button), "clicked",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2817 G_CALLBACK(on_filepopup_for_tuple_settings_clicked),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2818 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2819 g_signal_connect(G_OBJECT(proxy_use), "toggled",
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
2820 G_CALLBACK(on_proxy_button_toggled),
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
2821 "use_proxy");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2822 g_signal_connect(G_OBJECT(proxy_use), "realize",
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
2823 G_CALLBACK(on_proxy_button_realize),
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
2824 "use_proxy");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2825 g_signal_connect(G_OBJECT(proxy_port), "changed",
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2826 G_CALLBACK(on_proxy_entry_changed),
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2827 "proxy_port");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2828 g_signal_connect(G_OBJECT(proxy_port), "realize",
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2829 G_CALLBACK(on_proxy_entry_realize),
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2830 "proxy_port");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2831 g_signal_connect(G_OBJECT(proxy_host), "changed",
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2832 G_CALLBACK(on_proxy_entry_changed),
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2833 "proxy_host");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2834 g_signal_connect(G_OBJECT(proxy_host), "realize",
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2835 G_CALLBACK(on_proxy_entry_realize),
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2836 "proxy_host");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2837 g_signal_connect(G_OBJECT(proxy_auth), "toggled",
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
2838 G_CALLBACK(on_proxy_button_toggled),
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
2839 "proxy_use_auth");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2840 g_signal_connect(G_OBJECT(proxy_auth), "realize",
4000
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
2841 G_CALLBACK(on_proxy_button_realize),
a0bb67450552 more code duplication removal
Tomasz Mon <desowin@gmail.com>
parents: 3999
diff changeset
2842 "proxy_use_auth");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2843 g_signal_connect(G_OBJECT(proxy_pass), "changed",
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2844 G_CALLBACK(on_proxy_entry_changed),
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2845 "proxy_pass");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2846 g_signal_connect(G_OBJECT(proxy_pass), "realize",
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2847 G_CALLBACK(on_proxy_entry_realize),
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2848 "proxy_pass");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2849 g_signal_connect(G_OBJECT(proxy_user), "changed",
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2850 G_CALLBACK(on_proxy_entry_changed),
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2851 "proxy_user");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2852 g_signal_connect(G_OBJECT(proxy_user), "realize",
3999
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2853 G_CALLBACK(on_proxy_entry_realize),
fa3d61ea0a6e remove some duplicated code
Tomasz Mon <desowin@gmail.com>
parents: 3995
diff changeset
2854 "proxy_user");
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2855 g_signal_connect(G_OBJECT(output_plugin_bufsize), "value_changed",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2856 G_CALLBACK(on_output_plugin_bufsize_value_changed),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2857 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2858 g_signal_connect_after(G_OBJECT(output_plugin_bufsize), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2859 G_CALLBACK(on_output_plugin_bufsize_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2860 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2861 g_signal_connect_after(G_OBJECT(output_plugin_cbox), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2862 G_CALLBACK(on_output_plugin_cbox_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2863 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2864 g_signal_connect(G_OBJECT(enable_src), "toggled",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2865 G_CALLBACK(on_enable_src_toggled),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2866 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2867 g_signal_connect(G_OBJECT(enable_src), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2868 G_CALLBACK(on_enable_src_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2869 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2870 g_signal_connect(G_OBJECT(src_converter_type), "changed",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2871 G_CALLBACK(on_src_converter_type_changed),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2872 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2873 g_signal_connect_after(G_OBJECT(src_converter_type), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2874 G_CALLBACK(on_src_converter_type_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2875 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2876 g_signal_connect(G_OBJECT(src_rate), "value_changed",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2877 G_CALLBACK(on_src_rate_value_changed),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2878 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2879 g_signal_connect(G_OBJECT(src_rate), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2880 G_CALLBACK(on_src_rate_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2881 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2882 g_signal_connect(G_OBJECT(software_volume_control), "toggled",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2883 G_CALLBACK(on_software_volume_control_toggled),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2884 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2885 g_signal_connect(G_OBJECT(software_volume_control), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2886 G_CALLBACK(on_software_volume_control_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2887 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2888 g_signal_connect(G_OBJECT(reload_plugins), "clicked",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2889 G_CALLBACK(on_reload_plugins_clicked),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2890 NULL);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2891 g_signal_connect_swapped(G_OBJECT(close), "clicked",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2892 G_CALLBACK(gtk_widget_hide),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2893 GTK_OBJECT (prefswin));
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2894
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2895 /* create category view */
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2896 g_signal_connect_after(G_OBJECT(category_treeview), "realize",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2897 G_CALLBACK(on_category_treeview_realize),
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2898 category_notebook);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2899
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2900 /* plugin->input page */
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2901 g_object_set_data(G_OBJECT(input_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_INPUT));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2902 g_signal_connect(G_OBJECT(input_plugin_view), "row-activated",
3356
3d42ab53521d little more merging
Tomasz Mon <desowin@gmail.com>
parents: 3355
diff changeset
2903 G_CALLBACK(plugin_treeview_open_prefs),
3353
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
2904 NULL);
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2905 g_signal_connect(G_OBJECT(input_plugin_view), "cursor-changed",
3355
31ecb89e871c introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents: 3353
diff changeset
2906 G_CALLBACK(plugin_treeview_enable_prefs),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2907 input_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2908
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2909 g_signal_connect_swapped(G_OBJECT(input_plugin_prefs), "clicked",
3356
3d42ab53521d little more merging
Tomasz Mon <desowin@gmail.com>
parents: 3355
diff changeset
2910 G_CALLBACK(plugin_treeview_open_prefs),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2911 input_plugin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2912
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2913 g_signal_connect(G_OBJECT(input_plugin_view), "cursor-changed",
3355
31ecb89e871c introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents: 3353
diff changeset
2914 G_CALLBACK(plugin_treeview_enable_info),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2915 input_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2916 g_signal_connect_swapped(G_OBJECT(input_plugin_info), "clicked",
3357
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
2917 G_CALLBACK(plugin_treeview_open_info),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2918 input_plugin_view);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2919
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2920 /* plugin->output page */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2921
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2922 g_signal_connect(G_OBJECT(output_plugin_cbox), "changed",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2923 G_CALLBACK(output_plugin_enable_prefs),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2924 output_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2925 g_signal_connect_swapped(G_OBJECT(output_plugin_prefs), "clicked",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2926 G_CALLBACK(output_plugin_open_prefs),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2927 output_plugin_cbox);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2928
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2929 g_signal_connect(G_OBJECT(output_plugin_cbox), "changed",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2930 G_CALLBACK(output_plugin_enable_info),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2931 output_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2932 g_signal_connect_swapped(G_OBJECT(output_plugin_info), "clicked",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2933 G_CALLBACK(output_plugin_open_info),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2934 output_plugin_cbox);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2935
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2936 /* plugin->general page */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2937
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2938 g_object_set_data(G_OBJECT(general_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_GENERAL));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2939 g_signal_connect(G_OBJECT(general_plugin_view), "row-activated",
3356
3d42ab53521d little more merging
Tomasz Mon <desowin@gmail.com>
parents: 3355
diff changeset
2940 G_CALLBACK(plugin_treeview_open_prefs),
3353
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
2941 NULL);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2942
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2943 g_signal_connect(G_OBJECT(general_plugin_view), "cursor-changed",
3355
31ecb89e871c introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents: 3353
diff changeset
2944 G_CALLBACK(plugin_treeview_enable_prefs),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2945 general_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2946
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2947 g_signal_connect_swapped(G_OBJECT(general_plugin_prefs), "clicked",
3356
3d42ab53521d little more merging
Tomasz Mon <desowin@gmail.com>
parents: 3355
diff changeset
2948 G_CALLBACK(plugin_treeview_open_prefs),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2949 general_plugin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2950
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2951 g_signal_connect(G_OBJECT(general_plugin_view), "cursor-changed",
3355
31ecb89e871c introduce plugin_treeview_enable_prefs and plugin_treeview_enable_info
Tomasz Mon <desowin@gmail.com>
parents: 3353
diff changeset
2952 G_CALLBACK(plugin_treeview_enable_info),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2953 general_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2954 g_signal_connect_swapped(G_OBJECT(general_plugin_info), "clicked",
3357
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
2955 G_CALLBACK(plugin_treeview_open_info),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2956 general_plugin_view);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2957
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2958
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2959 /* plugin->vis page */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2960
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2961 g_object_set_data(G_OBJECT(vis_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_VIS));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2962 g_signal_connect(G_OBJECT(vis_plugin_view), "row-activated",
3356
3d42ab53521d little more merging
Tomasz Mon <desowin@gmail.com>
parents: 3355
diff changeset
2963 G_CALLBACK(plugin_treeview_open_prefs),
3353
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
2964 NULL);
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2965 g_signal_connect_swapped(G_OBJECT(vis_plugin_prefs), "clicked",
3356
3d42ab53521d little more merging
Tomasz Mon <desowin@gmail.com>
parents: 3355
diff changeset
2966 G_CALLBACK(plugin_treeview_open_prefs),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2967 vis_plugin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2968 g_signal_connect(G_OBJECT(vis_plugin_view), "cursor-changed",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2969 G_CALLBACK(plugin_treeview_enable_prefs), vis_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2970
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2971 g_signal_connect(G_OBJECT(vis_plugin_view), "cursor-changed",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2972 G_CALLBACK(plugin_treeview_enable_info), vis_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2973 g_signal_connect_swapped(G_OBJECT(vis_plugin_info), "clicked",
3357
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
2974 G_CALLBACK(plugin_treeview_open_info),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2975 vis_plugin_view);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2976
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2977
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2978 /* plugin->effects page */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2979
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2980 g_object_set_data(G_OBJECT(effect_plugin_view), "plugin_type" , GINT_TO_POINTER(PLUGIN_VIEW_TYPE_EFFECT));
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2981 g_signal_connect(G_OBJECT(effect_plugin_view), "row-activated",
3356
3d42ab53521d little more merging
Tomasz Mon <desowin@gmail.com>
parents: 3355
diff changeset
2982 G_CALLBACK(plugin_treeview_open_prefs),
3353
1cd5fb04e05b double click on plugin row opens plugin config (if available)
Tomasz Mon <desowin@gmail.com>
parents: 3251
diff changeset
2983 NULL);
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2984 g_signal_connect_swapped(G_OBJECT(effect_plugin_prefs), "clicked",
3356
3d42ab53521d little more merging
Tomasz Mon <desowin@gmail.com>
parents: 3355
diff changeset
2985 G_CALLBACK(plugin_treeview_open_prefs),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2986 effect_plugin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2987 g_signal_connect(G_OBJECT(effect_plugin_view), "cursor-changed",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2988 G_CALLBACK(plugin_treeview_enable_prefs), effect_plugin_prefs);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2989
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2990 g_signal_connect(G_OBJECT(effect_plugin_view), "cursor-changed",
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2991 G_CALLBACK(plugin_treeview_enable_info), effect_plugin_info);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2992 g_signal_connect_swapped(G_OBJECT(effect_plugin_info), "clicked",
3357
8e9f1b1a2d84 remove more duplicate code
Tomasz Mon <desowin@gmail.com>
parents: 3356
diff changeset
2993 G_CALLBACK(plugin_treeview_open_info),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2994 effect_plugin_view);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2995
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2996 /* playlist page */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2997
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
2998 g_signal_connect(skin_view, "drag-data-received",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2999 G_CALLBACK(on_skin_view_drag_data_received),
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3000 NULL);
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3001 bmp_drag_dest_set(skin_view);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3002
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3003 g_signal_connect(mainwin, "drag-data-received",
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3004 G_CALLBACK(mainwin_drag_data_received),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3005 skin_view);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3006
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3007 g_signal_connect(skin_refresh_button, "clicked",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3008 G_CALLBACK(on_skin_refresh_button_clicked),
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3009 NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3010
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3011 g_signal_connect(mainwin, "drag-data-received",
2975
1ec423a12756 Remove craq.
William Pitcock <nenolod@atheme-project.org>
parents: 2911
diff changeset
3012 G_CALLBACK(mainwin_drag_data_received),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3013 fontbutton2);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3014
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3015 g_signal_connect(titlestring_cbox, "realize",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3016 G_CALLBACK(on_titlestring_cbox_realize),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3017 titlestring_entry);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3018 g_signal_connect(titlestring_cbox, "changed",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3019 G_CALLBACK(on_titlestring_cbox_changed),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3020 titlestring_entry);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3021
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3022 /* FIXME: move this into a function */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3023 /* create tag menu */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3024 titlestring_tag_menu = gtk_menu_new();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3025 for(i = 0; i < n_title_field_tags; i++) {
3991
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
3026 menu_item = gtk_menu_item_new_with_label(_(title_field_tags[i].name));
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
3027 gtk_menu_shell_append(GTK_MENU_SHELL(titlestring_tag_menu), menu_item);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3028 g_signal_connect(menu_item, "activate",
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3029 G_CALLBACK(titlestring_tag_menu_callback),
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3030 GINT_TO_POINTER(i));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3031 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3032 gtk_widget_show_all(titlestring_tag_menu);
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3033
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3034 g_signal_connect(titlestring_cbox, "changed",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3035 G_CALLBACK(on_titlestring_cbox_changed),
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3036 titlestring_help_button);
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3037 g_signal_connect(titlestring_help_button, "clicked",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3038 G_CALLBACK(on_titlestring_help_button_clicked),
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3039 titlestring_tag_menu);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3040
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3041 /* audacious version label */
2467
af0518a11dbf [svn] - more tweaks
nenolod
parents: 2466
diff changeset
3042
2468
5206f4ef02f7 [svn] - the svn_stamp is no longer an svn revision, but a serial number
nenolod
parents: 2467
diff changeset
3043 aud_version_string = g_strdup_printf("<span size='small'>%s (%s) (%s@%s)</span>",
3991
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
3044 "Audacious " PACKAGE_VERSION ,
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
3045 svn_stamp ,
d6ac99c2be1d destroy colorize settings upon closing
mf0102 <0102@gmx.at>
parents: 3990
diff changeset
3046 g_get_user_name() , g_get_host_name() );
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3047
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3048 gtk_label_set_markup( GTK_LABEL(audversionlabel) , aud_version_string );
2467
af0518a11dbf [svn] - more tweaks
nenolod
parents: 2466
diff changeset
3049 g_free(aud_version_string);
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3050 gtk_widget_show_all(vbox);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3051
3990
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
3052 /* Create window for filepopup settings */
14c2d0729563 filepopup_settings is no longer in prefswin.glade
Tomasz Mon <desowin@gmail.com>
parents: 3989
diff changeset
3053 create_filepopup_settings();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3054 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3055
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3056 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3057 show_prefs_window(void)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3058 {
2628
85acf3f98ed0 [svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents: 2623
diff changeset
3059 static gboolean skinlist_filled = FALSE;
85acf3f98ed0 [svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents: 2623
diff changeset
3060
2635
9b763f1f4e6a [svn] tweak UI behaviors:
yaz
parents: 2628
diff changeset
3061 gtk_window_present(GTK_WINDOW(prefswin)); /* show or raise prefs window */
2628
85acf3f98ed0 [svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents: 2623
diff changeset
3062
85acf3f98ed0 [svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents: 2623
diff changeset
3063 if ( !skinlist_filled )
85acf3f98ed0 [svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents: 2623
diff changeset
3064 {
3993
8d8699eb659d say goodbye to libglade
Tomasz Mon <desowin@gmail.com>
parents: 3992
diff changeset
3065 skin_view_update(GTK_TREE_VIEW(skin_view), GTK_WIDGET(skin_refresh_button));
2628
85acf3f98ed0 [svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents: 2623
diff changeset
3066 skinlist_filled = TRUE;
85acf3f98ed0 [svn] - prevent skin list overlap when it's populated for the first time and user quickly switchs to other tabs in the prefswin
giacomo
parents: 2623
diff changeset
3067 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3068 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3069
3917
b5ee3a4a8e3b libaudclient:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3856
diff changeset
3070 void
b5ee3a4a8e3b libaudclient:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3856
diff changeset
3071 hide_prefs_window(void)
b5ee3a4a8e3b libaudclient:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3856
diff changeset
3072 {
b5ee3a4a8e3b libaudclient:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3856
diff changeset
3073 g_return_if_fail(prefswin);
b5ee3a4a8e3b libaudclient:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3856
diff changeset
3074 gtk_widget_hide(GTK_WIDGET(prefswin));
b5ee3a4a8e3b libaudclient:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3856
diff changeset
3075 }
b5ee3a4a8e3b libaudclient:
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3856
diff changeset
3076
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3077 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3078 prefswin_page_queue_new(GtkWidget *container, gchar *name, gchar *imgurl)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3079 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3080 CategoryQueueEntry *ent = g_malloc0(sizeof(CategoryQueueEntry));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3081
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3082 ent->container = container;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3083 ent->pg_name = name;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3084 ent->img_url = imgurl;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3085
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3086 if (category_queue)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3087 ent->next = category_queue;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3088
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3089 category_queue = ent;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3090 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3091
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3092 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3093 prefswin_page_queue_destroy(CategoryQueueEntry *ent)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3094 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3095 category_queue = ent->next;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3096 g_free(ent);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3097 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3098
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3099 /*
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3100 * Public APIs for adding new pages to the prefs window.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3101 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3102 * Basically, the concept here is that third party components can register themselves in the root
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3103 * preferences window.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3104 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3105 * From a usability standpoint this makes the application look more "united", instead of cluttered
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3106 * and malorganised. Hopefully this option will be used further in the future.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3107 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3108 * - nenolod
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3109 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3110 gint
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3111 prefswin_page_new(GtkWidget *container, gchar *name, gchar *imgurl)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3112 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3113 GtkTreeModel *model;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3114 GtkTreeIter iter;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3115 GdkPixbuf *img = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3116 GtkTreeView *treeview = GTK_TREE_VIEW(category_treeview);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3117 gint id;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3118
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3119 if (treeview == NULL || category_notebook == NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3120 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3121 prefswin_page_queue_new(container, name, imgurl);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3122 return -1;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3123 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3124
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3125 model = gtk_tree_view_get_model(treeview);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3126
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3127 if (model == NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3128 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3129 prefswin_page_queue_new(container, name, imgurl);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3130 return -1;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3131 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3132
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3133 /* Make sure the widgets are visible. */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3134 gtk_widget_show(container);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3135 id = gtk_notebook_append_page(GTK_NOTEBOOK(category_notebook), container, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3136
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3137 if (id == -1)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3138 return -1;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3139
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3140 if (imgurl != NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3141 img = gdk_pixbuf_new_from_file(imgurl, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3142
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3143 gtk_list_store_append(GTK_LIST_STORE(model), &iter);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3144 gtk_list_store_set(GTK_LIST_STORE(model), &iter,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3145 CATEGORY_VIEW_COL_ICON, img,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3146 CATEGORY_VIEW_COL_NAME,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3147 name, CATEGORY_VIEW_COL_ID, id, -1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3148
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3149 if (img != NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3150 g_object_unref(img);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3151
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3152 return id;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3153 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3154
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3155 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3156 prefswin_page_destroy(GtkWidget *container)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3157 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3158 GtkTreeModel *model;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3159 GtkTreeIter iter;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3160 GtkTreeView *treeview = GTK_TREE_VIEW(category_treeview);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3161 gboolean ret;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3162 gint id;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3163 gint index = -1;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3164
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3165 if (category_notebook == NULL || treeview == NULL || container == NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3166 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3167
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3168 id = gtk_notebook_page_num(GTK_NOTEBOOK(category_notebook), container);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3169
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3170 if (id == -1)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3171 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3172
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3173 gtk_notebook_remove_page(GTK_NOTEBOOK(category_notebook), id);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3174
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3175 model = gtk_tree_view_get_model(treeview);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3176
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3177 if (model == NULL)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3178 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3179
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3180 ret = gtk_tree_model_get_iter_first(model, &iter);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3181
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3182 while (ret == TRUE)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3183 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3184 gtk_tree_model_get(model, &iter, CATEGORY_VIEW_COL_ID, &index, -1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3185
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3186 if (index == id)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3187 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3188 gtk_list_store_remove(GTK_LIST_STORE(model), &iter);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3189 ret = gtk_tree_model_get_iter_first(model, &iter);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3190 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3191
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3192 if (index > id)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3193 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3194 index--;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3195 gtk_list_store_set(GTK_LIST_STORE(model), &iter, CATEGORY_VIEW_COL_ID, index, -1);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3196 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3197
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3198 ret = gtk_tree_model_iter_next(model, &iter);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3199 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3200 }