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.24 by cebix, 2002-10-15T16:25:04Z vs.
Revision 1.28 by gbeauche, 2005-06-19T15:52:09Z

# 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 189 | Line 189 | static GtkWidget *make_file_entry(GtkWid
189          return entry;
190   }
191  
192 < static char *get_file_entry_path(GtkWidget *entry)
192 > static const gchar *get_file_entry_path(GtkWidget *entry)
193   {
194   #ifdef HAVE_GNOMEUI
195          return gnome_file_entry_get_full_path(GNOME_FILE_ENTRY(entry), false);
# 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 387 | Line 387 | bool PrefsEditor(void)
387          GtkAccelGroup *accel_group = gtk_accel_group_new();
388          GtkItemFactory *item_factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", accel_group);
389          gtk_item_factory_create_items(item_factory, sizeof(menu_items) / sizeof(menu_items[0]), menu_items, NULL);
390 + #if GTK_CHECK_VERSION(1,3,15)
391 +        gtk_window_add_accel_group(GTK_WINDOW(win), accel_group);
392 + #else
393          gtk_accel_group_attach(accel_group, GTK_OBJECT(win));
394 + #endif
395          GtkWidget *menu_bar = gtk_item_factory_get_widget(item_factory, "<main>");
396          gtk_widget_show(menu_bar);
397          gtk_box_pack_start(GTK_BOX(box), menu_bar, FALSE, TRUE, 0);
# Line 442 | Line 446 | struct file_req_assoc {
446   // Volume selected for addition
447   static void add_volume_ok(GtkWidget *button, file_req_assoc *assoc)
448   {
449 <        char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(assoc->req));
449 >        gchar *file = (gchar *)gtk_file_selection_get_filename(GTK_FILE_SELECTION(assoc->req));
450          gtk_clist_append(GTK_CLIST(volume_list), &file);
451          gtk_widget_destroy(assoc->req);
452          delete assoc;
# Line 451 | Line 455 | static void add_volume_ok(GtkWidget *but
455   // Volume selected for creation
456   static void create_volume_ok(GtkWidget *button, file_req_assoc *assoc)
457   {
458 <        char *file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(assoc->req));
458 >        gchar *file = (gchar *)gtk_file_selection_get_filename(GTK_FILE_SELECTION(assoc->req));
459  
460 <        char *str = gtk_entry_get_text(GTK_ENTRY(assoc->entry));
460 >        const gchar *str = gtk_entry_get_text(GTK_ENTRY(assoc->entry));
461          int size = atoi(str);
462  
463          char cmd[1024];
# Line 589 | Line 593 | static GtkWidget *w_jit_fpu;
593   static GtkWidget *w_jit_atraps;
594   static GtkWidget *w_jit_cache_size;
595   static GtkWidget *w_jit_lazy_flush;
596 + static GtkWidget *w_jit_follow_const_jumps;
597  
598   // Set sensitivity of widgets
599   static void set_jit_sensitive(void)
# Line 597 | Line 602 | static void set_jit_sensitive(void)
602          gtk_widget_set_sensitive(w_jit_fpu, jit_enabled);
603          gtk_widget_set_sensitive(w_jit_cache_size, jit_enabled);
604          gtk_widget_set_sensitive(w_jit_lazy_flush, jit_enabled);
605 +        gtk_widget_set_sensitive(w_jit_follow_const_jumps, jit_enabled);
606   }
607  
608   // "Use JIT Compiler" button toggled
# Line 618 | Line 624 | static void tb_jit_lazy_flush(GtkWidget
624          PrefsReplaceBool("jitlazyflush", GTK_TOGGLE_BUTTON(widget)->active);
625   }
626  
627 + // "Translate through constant jumps (inline blocks)" button toggled
628 + static void tb_jit_follow_const_jumps(GtkWidget *widget)
629 + {
630 +        PrefsReplaceBool("jitinline", GTK_TOGGLE_BUTTON(widget)->active);
631 + }
632 +
633   // Read settings from widgets and set preferences
634   static void read_jit_settings(void)
635   {
# Line 654 | Line 666 | static void create_jit_pane(GtkWidget *t
666          
667          // Lazy translation cache invalidation
668          w_jit_lazy_flush = make_checkbox(box, STR_JIT_LAZY_CINV_CTRL, "jitlazyflush", GTK_SIGNAL_FUNC(tb_jit_lazy_flush));
669 <        
669 >
670 >        // Follow constant jumps (inline basic blocks)
671 >        w_jit_follow_const_jumps = make_checkbox(box, STR_JIT_FOLLOW_CONST_JUMPS, "jitinline", GTK_SIGNAL_FUNC(tb_jit_follow_const_jumps));
672 >
673          set_jit_sensitive();
674   #endif
675   }
# Line 1163 | Line 1178 | static GList *add_ether_names(void)
1178                  }
1179                  close(s);
1180          }
1181 + #ifdef HAVE_SLIRP
1182 +        static char s_slirp[] = "slirp";
1183 +        glist = g_list_append(glist, s_slirp);
1184 + #endif
1185          if (glist)
1186                  g_list_sort(glist, gl_str_cmp);
1187          else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines