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.27 by gbeauche, 2005-06-06T20:11:50Z

# 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-2005 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 589 | Line 589 | static GtkWidget *w_jit_fpu;
589   static GtkWidget *w_jit_atraps;
590   static GtkWidget *w_jit_cache_size;
591   static GtkWidget *w_jit_lazy_flush;
592 + static GtkWidget *w_jit_follow_const_jumps;
593  
594   // Set sensitivity of widgets
595   static void set_jit_sensitive(void)
# Line 597 | Line 598 | static void set_jit_sensitive(void)
598          gtk_widget_set_sensitive(w_jit_fpu, jit_enabled);
599          gtk_widget_set_sensitive(w_jit_cache_size, jit_enabled);
600          gtk_widget_set_sensitive(w_jit_lazy_flush, jit_enabled);
601 +        gtk_widget_set_sensitive(w_jit_follow_const_jumps, jit_enabled);
602   }
603  
604   // "Use JIT Compiler" button toggled
# Line 618 | Line 620 | static void tb_jit_lazy_flush(GtkWidget
620          PrefsReplaceBool("jitlazyflush", GTK_TOGGLE_BUTTON(widget)->active);
621   }
622  
623 + // "Translate through constant jumps (inline blocks)" button toggled
624 + static void tb_jit_follow_const_jumps(GtkWidget *widget)
625 + {
626 +        PrefsReplaceBool("jitinline", GTK_TOGGLE_BUTTON(widget)->active);
627 + }
628 +
629   // Read settings from widgets and set preferences
630   static void read_jit_settings(void)
631   {
# Line 654 | Line 662 | static void create_jit_pane(GtkWidget *t
662          
663          // Lazy translation cache invalidation
664          w_jit_lazy_flush = make_checkbox(box, STR_JIT_LAZY_CINV_CTRL, "jitlazyflush", GTK_SIGNAL_FUNC(tb_jit_lazy_flush));
665 <        
665 >
666 >        // Follow constant jumps (inline basic blocks)
667 >        w_jit_follow_const_jumps = make_checkbox(box, STR_JIT_FOLLOW_CONST_JUMPS, "jitinline", GTK_SIGNAL_FUNC(tb_jit_follow_const_jumps));
668 >
669          set_jit_sensitive();
670   #endif
671   }
# Line 715 | Line 726 | static GtkWidget *l_fbdev_name, *l_fbdev
726   static char fbdev_name[256];
727   #endif
728  
729 + static GtkWidget *w_dspdevice_file, *w_mixerdevice_file;
730 +
731   // Hide/show graphics widgets
732   static void hide_show_graphics_widgets(void)
733   {
# Line 761 | Line 774 | static void mn_30hz(...) {PrefsReplaceIn
774   static void mn_60hz(...) {PrefsReplaceInt32("frameskip", 1);}
775   static void mn_dynamic(...) {PrefsReplaceInt32("frameskip", 0);}
776  
777 + // Set sensitivity of widgets
778 + static void set_graphics_sensitive(void)
779 + {
780 +        const bool sound_enabled = !PrefsFindBool("nosound");
781 +        gtk_widget_set_sensitive(w_dspdevice_file, sound_enabled);
782 +        gtk_widget_set_sensitive(w_mixerdevice_file, sound_enabled);
783 + }
784 +
785   // "Disable Sound Output" button toggled
786   static void tb_nosound(GtkWidget *widget)
787   {
788          PrefsReplaceBool("nosound", GTK_TOGGLE_BUTTON(widget)->active);
789 +        set_graphics_sensitive();
790   }
791  
792   // Read graphics preferences
# Line 827 | Line 849 | static void read_graphics_settings(void)
849          else
850                  PrefsRemoveItem("fbdevicefile");
851   #endif
852 +        PrefsReplaceString("dsp", get_file_entry_path(w_dspdevice_file));
853 +        PrefsReplaceString("mixer", get_file_entry_path(w_mixerdevice_file));
854   }
855  
856   // Create "Graphics/Sound" pane
# Line 947 | Line 971 | static void create_graphics_pane(GtkWidg
971  
972          make_separator(box);
973          make_checkbox(box, STR_NOSOUND_CTRL, "nosound", GTK_SIGNAL_FUNC(tb_nosound));
974 +        w_dspdevice_file = make_file_entry(box, STR_DSPDEVICE_FILE_CTRL, "dsp");
975 +        w_mixerdevice_file = make_file_entry(box, STR_MIXERDEVICE_FILE_CTRL, "mixer");
976 +
977 +        set_graphics_sensitive();
978  
979          hide_show_graphics_widgets();
980   }
# Line 1146 | Line 1174 | static GList *add_ether_names(void)
1174                  }
1175                  close(s);
1176          }
1177 + #ifdef HAVE_SLIRP
1178 +        static char s_slirp[] = "slirp";
1179 +        glist = g_list_append(glist, s_slirp);
1180 + #endif
1181          if (glist)
1182                  g_list_sort(glist, gl_str_cmp);
1183          else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines