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.24 by cebix, 2002-10-15T16:25:04Z

# 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