ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/prefs_editor_gtk.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/prefs_editor_gtk.cpp (file contents):
Revision 1.23 by gbeauche, 2002-09-17T16:06:37Z vs.
Revision 1.25 by cebix, 2004-01-12T15:29:25Z

# Line 1 | Line 1
1   /*
2   *  prefs_editor_gtk.cpp - Preferences editor, Unix implementation using GTK+
3   *
4 < *  Basilisk II (C) 1997-2002 Christian Bauer
4 > *  Basilisk II (C) 1997-2004 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 306 | Line 306 | static void mn_about(...)
306          dialog = gnome_about_new(
307                  "Basilisk II",
308                  version,
309 <                "Copyright (C) 1997-2002 Christian Bauer",
309 >                "Copyright (C) 1997-2004 Christian Bauer",
310                  authors,
311                  "Basilisk II comes with ABSOLUTELY NO WARRANTY."
312                  "This is free software, and you are welcome to redistribute it"
# Line 322 | Line 322 | static void mn_about(...)
322          char str[512];
323          sprintf(str,
324                  "Basilisk II\nVersion %d.%d\n\n"
325 <                "Copyright (C) 1997-2002 Christian Bauer et al.\n"
325 >                "Copyright (C) 1997-2004 Christian Bauer et al.\n"
326                  "E-mail: Christian.Bauer@uni-mainz.de\n"
327                  "http://www.uni-mainz.de/~bauec002/B2Main.html\n\n"
328                  "Basilisk II comes with ABSOLUTELY NO\n"
# Line 715 | Line 715 | static GtkWidget *l_fbdev_name, *l_fbdev
715   static char fbdev_name[256];
716   #endif
717  
718 + static GtkWidget *w_dspdevice_file, *w_mixerdevice_file;
719 +
720   // Hide/show graphics widgets
721   static void hide_show_graphics_widgets(void)
722   {
# Line 761 | Line 763 | static void mn_30hz(...) {PrefsReplaceIn
763   static void mn_60hz(...) {PrefsReplaceInt32("frameskip", 1);}
764   static void mn_dynamic(...) {PrefsReplaceInt32("frameskip", 0);}
765  
766 + // Set sensitivity of widgets
767 + static void set_graphics_sensitive(void)
768 + {
769 +        const bool sound_enabled = !PrefsFindBool("nosound");
770 +        gtk_widget_set_sensitive(w_dspdevice_file, sound_enabled);
771 +        gtk_widget_set_sensitive(w_mixerdevice_file, sound_enabled);
772 + }
773 +
774   // "Disable Sound Output" button toggled
775   static void tb_nosound(GtkWidget *widget)
776   {
777          PrefsReplaceBool("nosound", GTK_TOGGLE_BUTTON(widget)->active);
778 +        set_graphics_sensitive();
779   }
780  
781   // Read graphics preferences
# Line 827 | Line 838 | static void read_graphics_settings(void)
838          else
839                  PrefsRemoveItem("fbdevicefile");
840   #endif
841 +        PrefsReplaceString("dsp", get_file_entry_path(w_dspdevice_file));
842 +        PrefsReplaceString("mixer", get_file_entry_path(w_mixerdevice_file));
843   }
844  
845   // Create "Graphics/Sound" pane
# Line 947 | Line 960 | static void create_graphics_pane(GtkWidg
960  
961          make_separator(box);
962          make_checkbox(box, STR_NOSOUND_CTRL, "nosound", GTK_SIGNAL_FUNC(tb_nosound));
963 +        w_dspdevice_file = make_file_entry(box, STR_DSPDEVICE_FILE_CTRL, "dsp");
964 +        w_mixerdevice_file = make_file_entry(box, STR_MIXERDEVICE_FILE_CTRL, "mixer");
965 +
966 +        set_graphics_sensitive();
967  
968          hide_show_graphics_widgets();
969   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines