~ubuntu-branches/ubuntu/oneiric/audacious-plugins/oneiric

« back to all changes in this revision

Viewing changes to src/skins/skins_cfg.c

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2010-04-13 22:48:07 UTC
  • mfrom: (1.1.12 upstream) (2.1.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20100413224807-imw9qnn26cxcgefq
Tags: 2.3-1ubuntu1
* Merge from Debian experimental (LP: #494604), remaining change:
  - audacious-plugins suggests timidiy for midi playback
* Build-Depend on libav* for ffaudio.
* Break and replace audacious (<< 2.3).
* Drop audacious-plugins-dev package. "apt-get build-dep audacious-plugins"
  will do the same job.
* audacious-plugins recommends audacious instead of depending on it to break
  the circular dependency (Closes: #528588).

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
#include <libintl.h>
39
39
 
40
40
skins_cfg_t config;
41
 
 
42
 
 
43
 
static GtkWidget *cfg_win = NULL;
44
41
GtkWidget *skin_view;
45
42
GtkWidget *skin_refresh_button;
46
43
static GtkWidget *colorize_settings = NULL;
62
59
    .skin = NULL,
63
60
    .filesel_path = NULL,
64
61
    .playlist_visible = FALSE,
 
62
    .playlist_visible_prev = FALSE,
65
63
    .equalizer_visible = FALSE,
 
64
    .equalizer_visible_prev = FALSE,
66
65
    .player_visible = TRUE,
 
66
    .player_visible_prev = TRUE,
67
67
    .player_shaded = FALSE,
68
68
    .equalizer_shaded = FALSE,
69
69
    .playlist_shaded = FALSE,
104
104
    .playlist_font = NULL,
105
105
    .mainwin_font = NULL,
106
106
    .random_skin_on_play = FALSE,
 
107
    .no_confirm_playlist_delete = FALSE,
107
108
};
108
109
 
109
110
typedef struct skins_cfg_boolent_t {
125
126
    {"player_shaded", &config.player_shaded, TRUE},
126
127
    {"equalizer_shaded", &config.equalizer_shaded, TRUE},
127
128
    {"playlist_shaded", &config.playlist_shaded, TRUE},
 
129
    {"equalizer_visible_prev", &config.equalizer_visible_prev, TRUE},
 
130
    {"playlist_visible_prev", &config.playlist_visible_prev, TRUE},
 
131
    {"player_visible_prev", &config.player_visible_prev, TRUE},
128
132
    {"dim_titlebar", &config.dim_titlebar, TRUE},
129
133
    {"show_wm_decorations", &config.show_wm_decorations, TRUE},
130
134
    {"easy_move", &config.easy_move, TRUE},
140
144
    {"eq_scaled_linked", &config.eq_scaled_linked, TRUE},
141
145
    {"show_separator_in_pl", &config.show_separator_in_pl, TRUE},
142
146
    {"random_skin_on_play", &config.random_skin_on_play, TRUE},
 
147
    {"no_confirm_playlist_delete", & config.no_confirm_playlist_delete, TRUE},
143
148
};
144
149
 
145
150
static gint ncfgbent = G_N_ELEMENTS(skins_boolents);
191
196
 
192
197
static gint ncfgsent = G_N_ELEMENTS(skins_strents);
193
198
 
 
199
static void reload_skin (void);
 
200
 
194
201
void skins_cfg_free() {
195
202
    gint i;
196
203
    for (i = 0; i < ncfgsent; ++i) {
250
257
 
251
258
    int i;
252
259
 
253
 
    if (config.save_window_position)
 
260
    if (config.save_window_position == FALSE)
254
261
    {
255
 
        if (GTK_WIDGET_VISIBLE (mainwin))
256
 
            gtk_window_get_position ((GtkWindow *) mainwin, & config.player_x,
257
 
             & config.player_y);
258
 
        if (GTK_WIDGET_VISIBLE (equalizerwin))
259
 
            gtk_window_get_position ((GtkWindow *) equalizerwin,
260
 
             & config.equalizer_x, & config.equalizer_y);
261
 
        if (GTK_WIDGET_VISIBLE (playlistwin))
262
 
            gtk_window_get_position ((GtkWindow *) playlistwin,
263
 
             & config.playlist_x, & config.playlist_y);
 
262
        config.player_x = MAINWIN_DEFAULT_POS_X;
 
263
        config.player_y = MAINWIN_DEFAULT_POS_Y;
 
264
        config.equalizer_x = EQUALIZER_DEFAULT_POS_X;
 
265
        config.equalizer_y = EQUALIZER_DEFAULT_POS_Y;
 
266
        config.playlist_x = PLAYLISTWIN_DEFAULT_POS_X;
 
267
        config.playlist_y = PLAYLISTWIN_DEFAULT_POS_Y;
264
268
    }
265
269
 
266
270
    for (i = 0; i < ncfgsent; ++i) {
338
342
        N_("This enables the window manager to show decorations for windows."), FALSE},
339
343
    {WIDGET_CHK_BTN, N_("Use two-way text scroller"), &config.twoway_scroll, NULL,
340
344
        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},
341
 
    {WIDGET_CHK_BTN, N_("Disable inline gtk theme"), &config.disable_inline_gtk, NULL, NULL, FALSE},
 
345
    {WIDGET_CHK_BTN, N_("Disable inline gtk theme"), &config.disable_inline_gtk,
 
346
     reload_skin, NULL, FALSE},
342
347
    {WIDGET_CHK_BTN, N_("Random skin on play"), &config.random_skin_on_play, NULL, NULL, FALSE},
343
348
    {WIDGET_CHK_BTN, N_("Allow loading incomplete skins"), &config.allow_broken_skins, NULL,
344
349
        N_("If selected, audacious won't refuse loading broken skins. Use only if your favourite skin doesn't work"), FALSE},
409
414
    gtk_container_set_border_width(GTK_CONTAINER(colorize_settings), 12);
410
415
    gtk_window_set_title(GTK_WINDOW(colorize_settings), _("Color Adjustment"));
411
416
    gtk_window_set_type_hint(GTK_WINDOW(colorize_settings), GDK_WINDOW_TYPE_HINT_DIALOG);
412
 
    gtk_window_set_transient_for(GTK_WINDOW(colorize_settings), GTK_WINDOW(cfg_win));
413
417
 
414
418
    vbox = gtk_vbox_new(FALSE, 12);
415
419
    gtk_container_add(GTK_CONTAINER(colorize_settings), vbox);
642
646
                           G_CALLBACK(on_skin_view_realize),
643
647
                           NULL);
644
648
 
645
 
    gtk_window_present(GTK_WINDOW(cfg_win));
646
 
 
647
649
    return appearance_page_vbox;
648
650
}