~blackskad/gnomeradio/dev-vol-button

« back to all changes in this revision

Viewing changes to src/prefs.c

  • Committer: mfcn
  • Date: 2006-02-24 09:42:47 UTC
  • Revision ID: svn-v3-trunk0:ba97a3d1-ec25-0410-b1c6-e06ad936ea6c:trunk:125
        * src/gui.c, src/gui.h, src/prefs.c, src/prefs.h, src/tech.c,
        src/tech.h, src/trayicon.h: added an function that scans for
        stations on first run, and adds them to the presets.
        * Code cleanup here and there

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
        if (settings.device) g_free(settings.device);
186
186
        settings.device = g_strdup(text);
187
187
        
188
 
        start_radio(TRUE);
 
188
        start_radio(TRUE, data);
189
189
        
190
190
        return FALSE;
191
191
}
213
213
        if ((tmp = strstr(settings.mixer, " (")))
214
214
                tmp[0] = '\0';
215
215
        
216
 
        start_mixer(TRUE);
 
216
        start_mixer(TRUE, data);
217
217
        
218
218
        return FALSE;
219
219
}
491
491
        g_list_free(list);
492
492
}
493
493
 
494
 
GtkWidget* prefs_window(void)
 
494
GtkWidget* prefs_window(GtkWidget *app)
495
495
{
496
496
        GtkWidget *dialog;
497
497
        GtkWidget *box, *sbox, *pbox, *rbox;
515
515
        char *settings_hdr, *presets_hdr, *record_hdr;
516
516
        preset* ps;
517
517
        
518
 
        dialog = gtk_dialog_new_with_buttons(_("Gnomeradio Settings"), NULL, 
 
518
        dialog = gtk_dialog_new_with_buttons(_("Gnomeradio Settings"), GTK_WINDOW(app), 
519
519
                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
520
520
                        GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, 
521
521
                        GTK_STOCK_HELP, GTK_RESPONSE_HELP,
598
598
 
599
599
        gtk_table_attach_defaults(GTK_TABLE(settings_table), mute_on_exit_cb, 0, 2, 2, 3);
600
600
 
601
 
        g_signal_connect(GTK_OBJECT(device_entry), "hide", GTK_SIGNAL_FUNC(device_entry_activate_cb), NULL);
 
601
        g_signal_connect(GTK_OBJECT(device_entry), "hide", GTK_SIGNAL_FUNC(device_entry_activate_cb), app);
602
602
        g_signal_connect(GTK_OBJECT(device_entry), "activate", GTK_SIGNAL_FUNC(device_entry_activate_cb), NULL);
603
 
        g_signal_connect(GTK_OBJECT(mixer_combo), "changed", GTK_SIGNAL_FUNC(mixer_combo_change_cb), NULL);
 
603
        g_signal_connect(GTK_OBJECT(mixer_combo), "changed", GTK_SIGNAL_FUNC(mixer_combo_change_cb), app);
604
604
        g_signal_connect(GTK_OBJECT(mute_on_exit_cb), "toggled", GTK_SIGNAL_FUNC(mute_on_exit_toggled_cb), NULL);
605
605
 
606
606
        gtk_tooltips_set_tip(tooltips, device_entry, _("Specify the radio-device (in most cases /dev/radio)"), NULL);