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

Comparing BasiliskII/src/Windows/prefs_editor_gtk.cpp (file contents):
Revision 1.12 by gbeauche, 2006-04-29T14:15:01Z vs.
Revision 1.15 by gbeauche, 2006-05-14T16:13:54Z

# Line 1402 | Line 1402 | static void mn_ether_b2ether(GtkWidget *
1402          PrefsReplaceString("etherguid", guid);
1403   }
1404  
1405 + // Ethernet option for Basilisk II driver selected
1406 + static void mn_ether_tap(GtkWidget *, const char *guid)
1407 + {
1408 +        PrefsReplaceString("ether", "tap");
1409 +        PrefsReplaceString("etherguid", guid);
1410 + }
1411 +
1412   // Create ethernet interfaces menu
1413   static int create_ether_menu(GtkWidget *menu)
1414   {
# Line 1410 | Line 1417 | static int create_ether_menu(GtkWidget *
1417          const char *ether = PrefsFindString("ether");
1418          const char *etherguid = PrefsFindString("etherguid");
1419  
1420 +        // No Ethernet
1421          add_menu_item(menu, STR_NONE_LAB, (GtkSignalFunc)mn_ether_none);
1422          if (ether == NULL)
1423                  active = n_items;
1424          n_items++;
1425  
1426 +        // Basilisk II Router
1427          add_menu_item(menu, "Basilisk II Router", (GtkSignalFunc)mn_ether_router);
1428          if (ether && strcmp(ether, "router") == 0)
1429                  active = n_items;
1430          n_items++;
1431  
1432 <        add_menu_item(menu, "Basilisk II Slirp", (GtkSignalFunc)mn_ether_router);
1432 >        // Basilisk II Slirp
1433 >        add_menu_item(menu, "Basilisk II Slirp", (GtkSignalFunc)mn_ether_slirp);
1434          if (ether && strcmp(ether, "slirp") == 0)
1435                  active = n_items;
1436          n_items++;
1437  
1438 +        // Basilisk II Ethernet Adapter
1439          PacketOpenAdapter("", 0);
1440          {
1441                  ULONG sz;
# Line 1456 | Line 1467 | static int create_ether_menu(GtkWidget *
1467          }
1468          PacketCloseAdapter(NULL);
1469  
1470 +        // TAP-Win32
1471 +        const char *tap_devices;
1472 +        if ((tap_devices = ether_tap_devices()) != NULL) {
1473 +                const char *guid = tap_devices;
1474 +                while (*guid) {
1475 +                        const char *name = ether_guid_to_name(guid);
1476 +                        if (name && (name = g_locale_to_utf8(name, -1, NULL, NULL, NULL))) {
1477 +                                add_menu_item(menu, name, (GtkSignalFunc)mn_ether_tap, strdup(guid));
1478 +                                if (etherguid && strcmp(guid, etherguid) == 0 &&
1479 +                                        ether && strcmp(ether, "tap") == 0)
1480 +                                        active = n_items;
1481 +                                n_items++;
1482 +                        }
1483 +                        guid += strlen(guid) + 1;
1484 +                }
1485 +                free((char *)tap_devices);
1486 +        }
1487 +
1488          return active;
1489   }
1490  
# Line 1523 | Line 1552 | static GtkWidget *w_ramsize;
1552   static GtkWidget *w_rom_file;
1553  
1554   // Don't use CPU when idle?
1526 #ifdef SHEEPSHAVER
1555   static void tb_idlewait(GtkWidget *widget)
1556   {
1557          PrefsReplaceBool("idlewait", GTK_TOGGLE_BUTTON(widget)->active);
1558   }
1531 #endif
1559  
1560   // "Ignore SEGV" button toggled
1561   #ifdef HAVE_SIGSEGV_SKIP_INSTRUCTION
# Line 1583 | Line 1610 | static void create_memory_pane(GtkWidget
1610                  STR_RAMSIZE_128MB_LAB,
1611                  STR_RAMSIZE_256MB_LAB,
1612                  STR_RAMSIZE_512MB_LAB,
1586 #ifndef SHEEPSHAVER
1613                  STR_RAMSIZE_1024MB_LAB,
1588 #endif
1614                  0
1615          };
1616 <        char default_ramsize[10];
1616 >        char default_ramsize[16];
1617          sprintf(default_ramsize, "%d", PrefsFindInt32("ramsize") >> 20);
1618          w_ramsize = table_make_combobox(table, 0, STR_RAMSIZE_CTRL, default_ramsize, options);
1619  
# Line 1628 | Line 1653 | static void create_memory_pane(GtkWidget
1653  
1654          w_rom_file = table_make_file_entry(table, 4, STR_ROM_FILE_CTRL, "rom");
1655  
1656 +        make_checkbox(box, STR_IDLEWAIT_CTRL, "idlewait", GTK_SIGNAL_FUNC(tb_idlewait));
1657 +
1658   #ifdef HAVE_SIGSEGV_SKIP_INSTRUCTION
1659          make_checkbox(box, STR_IGNORESEGV_CTRL, "ignoresegv", GTK_SIGNAL_FUNC(tb_ignoresegv));
1660   #endif
1634
1635 #ifdef SHEEPSHAVER
1636        make_checkbox(box, STR_IDLEWAIT_CTRL, "idlewait", GTK_SIGNAL_FUNC(tb_idlewait));
1637 #endif
1661   }
1662  
1663  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines