258 |
|
|
259 |
|
// Menu item descriptions |
260 |
|
static GtkItemFactoryEntry menu_items[] = { |
261 |
< |
{GetString(STR_PREFS_MENU_FILE_GTK), NULL, NULL, 0, "<Branch>"}, |
262 |
< |
{GetString(STR_PREFS_ITEM_START_GTK), NULL, GTK_SIGNAL_FUNC(cb_start), 0, NULL}, |
263 |
< |
{GetString(STR_PREFS_ITEM_ZAP_PRAM_GTK), NULL, GTK_SIGNAL_FUNC(mn_zap_pram), 0, NULL}, |
264 |
< |
{GetString(STR_PREFS_ITEM_SEPL_GTK), NULL, NULL, 0, "<Separator>"}, |
265 |
< |
{GetString(STR_PREFS_ITEM_QUIT_GTK), "<control>Q", GTK_SIGNAL_FUNC(cb_quit), 0, NULL}, |
266 |
< |
{GetString(STR_HELP_MENU_GTK), NULL, NULL, 0, "<LastBranch>"}, |
267 |
< |
{GetString(STR_HELP_ITEM_ABOUT_GTK), NULL, GTK_SIGNAL_FUNC(mn_about), 0, NULL} |
261 |
> |
{(gchar *)GetString(STR_PREFS_MENU_FILE_GTK), NULL, NULL, 0, "<Branch>"}, |
262 |
> |
{(gchar *)GetString(STR_PREFS_ITEM_START_GTK), NULL, GTK_SIGNAL_FUNC(cb_start), 0, NULL}, |
263 |
> |
{(gchar *)GetString(STR_PREFS_ITEM_ZAP_PRAM_GTK), NULL, GTK_SIGNAL_FUNC(mn_zap_pram), 0, NULL}, |
264 |
> |
{(gchar *)GetString(STR_PREFS_ITEM_SEPL_GTK), NULL, NULL, 0, "<Separator>"}, |
265 |
> |
{(gchar *)GetString(STR_PREFS_ITEM_QUIT_GTK), "<control>Q", GTK_SIGNAL_FUNC(cb_quit), 0, NULL}, |
266 |
> |
{(gchar *)GetString(STR_HELP_MENU_GTK), NULL, NULL, 0, "<LastBranch>"}, |
267 |
> |
{(gchar *)GetString(STR_HELP_ITEM_ABOUT_GTK), NULL, GTK_SIGNAL_FUNC(mn_about), 0, NULL} |
268 |
|
}; |
269 |
|
|
270 |
|
bool PrefsEditor(void) |
436 |
|
gtk_widget_show(volume_list); |
437 |
|
gtk_clist_set_selection_mode(GTK_CLIST(volume_list), GTK_SELECTION_SINGLE); |
438 |
|
gtk_clist_set_shadow_type(GTK_CLIST(volume_list), GTK_SHADOW_NONE); |
439 |
+ |
gtk_clist_set_reorderable(GTK_CLIST(volume_list), true); |
440 |
|
gtk_signal_connect(GTK_OBJECT(volume_list), "select_row", GTK_SIGNAL_FUNC(cl_selected), NULL); |
441 |
|
char *str; |
442 |
|
int32 index = 0; |
679 |
|
combo = gtk_combo_new(); |
680 |
|
gtk_widget_show(combo); |
681 |
|
GList *glist1 = NULL; |
682 |
< |
glist1 = g_list_append(glist1, (char *)"512"); |
683 |
< |
glist1 = g_list_append(glist1, (char *)"640"); |
684 |
< |
glist1 = g_list_append(glist1, (char *)"800"); |
685 |
< |
glist1 = g_list_append(glist1, (char *)"1024"); |
686 |
< |
glist1 = g_list_append(glist1, (char *)"MAX"); |
682 |
> |
glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_512_LAB)); |
683 |
> |
glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_640_LAB)); |
684 |
> |
glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_800_LAB)); |
685 |
> |
glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_1024_LAB)); |
686 |
> |
glist1 = g_list_append(glist1, (void *)GetString(STR_SIZE_MAX_LAB)); |
687 |
|
gtk_combo_set_popdown_strings(GTK_COMBO(combo), glist1); |
688 |
|
if (dis_width) |
689 |
|
sprintf(str, "%d", dis_width); |
690 |
|
else |
691 |
< |
strcpy(str, "MAX"); |
691 |
> |
strcpy(str, GetString(STR_SIZE_MAX_LAB)); |
692 |
|
gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), str); |
693 |
|
gtk_table_attach(GTK_TABLE(table), combo, 1, 2, 2, 3, (GtkAttachOptions)GTK_FILL, (GtkAttachOptions)0, 4, 4); |
694 |
|
w_display_x = GTK_COMBO(combo)->entry; |
700 |
|
combo = gtk_combo_new(); |
701 |
|
gtk_widget_show(combo); |
702 |
|
GList *glist2 = NULL; |
703 |
< |
glist2 = g_list_append(glist2, (char *)"384"); |
704 |
< |
glist2 = g_list_append(glist2, (char *)"480"); |
705 |
< |
glist2 = g_list_append(glist2, (char *)"600"); |
706 |
< |
glist2 = g_list_append(glist2, (char *)"768"); |
707 |
< |
glist2 = g_list_append(glist2, (char *)"MAX"); |
703 |
> |
glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_384_LAB)); |
704 |
> |
glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_480_LAB)); |
705 |
> |
glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_600_LAB)); |
706 |
> |
glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_768_LAB)); |
707 |
> |
glist2 = g_list_append(glist2, (void *)GetString(STR_SIZE_MAX_LAB)); |
708 |
|
gtk_combo_set_popdown_strings(GTK_COMBO(combo), glist2); |
709 |
|
if (dis_height) |
710 |
|
sprintf(str, "%d", dis_height); |
711 |
|
else |
712 |
< |
strcpy(str, "MAX"); |
712 |
> |
strcpy(str, GetString(STR_SIZE_MAX_LAB)); |
713 |
|
gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), str); |
714 |
|
gtk_table_attach(GTK_TABLE(table), combo, 1, 2, 3, 4, (GtkAttachOptions)GTK_FILL, (GtkAttachOptions)0, 4, 4); |
715 |
|
w_display_y = GTK_COMBO(combo)->entry; |
763 |
|
if (strncmp(de->d_name, "ttyS", 4) == 0 || strncmp(de->d_name, "lp", 2) == 0) { |
764 |
|
#elif defined(__FreeBSD__) |
765 |
|
if (strncmp(de->d_name, "cuaa", 4) == 0 || strncmp(de->d_name, "lpt", 3) == 0) { |
766 |
+ |
#elif defined(__NetBSD__) |
767 |
+ |
if (strncmp(de->d_name, "tty0", 4) == 0 || strncmp(de->d_name, "lpt", 3) == 0) { |
768 |
|
#elif defined(sgi) |
769 |
|
if (strncmp(de->d_name, "ttyf", 4) == 0 || strncmp(de->d_name, "plp", 3) == 0) { |
770 |
|
#else |
780 |
|
if (glist) |
781 |
|
g_list_sort(glist, gl_str_cmp); |
782 |
|
else |
783 |
< |
glist = g_list_append(glist, (char *)"<none>"); |
783 |
> |
glist = g_list_append(glist, (void *)GetString(STR_NONE_LAB)); |
784 |
|
return glist; |
785 |
|
} |
786 |
|
|
800 |
|
struct ifreq req, *ifr = ifc.ifc_req; |
801 |
|
for (int i=0; i<ifc.ifc_len; i+=sizeof(ifreq), ifr++) { |
802 |
|
req = *ifr; |
803 |
< |
#if defined(__FreeBSD__) || defined(sgi) |
803 |
> |
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(sgi) |
804 |
|
if (ioctl(s, SIOCGIFADDR, &req) == 0 && (req.ifr_addr.sa_family == ARPHRD_ETHER || req.ifr_addr.sa_family == ARPHRD_ETHER+1)) { |
805 |
< |
#else |
805 |
> |
#elif defined(__linux__) |
806 |
|
if (ioctl(s, SIOCGIFHWADDR, &req) == 0 && req.ifr_hwaddr.sa_family == ARPHRD_ETHER) { |
807 |
+ |
#else |
808 |
+ |
if (false) { |
809 |
|
#endif |
810 |
|
char *str = new char[64]; |
811 |
|
strncpy(str, ifr->ifr_name, 63); |
818 |
|
if (glist) |
819 |
|
g_list_sort(glist, gl_str_cmp); |
820 |
|
else |
821 |
< |
glist = g_list_append(glist, (char *)"<none>"); |
821 |
> |
glist = g_list_append(glist, (void *)GetString(STR_NONE_LAB)); |
822 |
|
return glist; |
823 |
|
} |
824 |
|
|
915 |
|
// Create "Memory/Misc" pane |
916 |
|
static void create_memory_pane(GtkWidget *top) |
917 |
|
{ |
918 |
< |
GtkWidget *box, *vbox, *hbox, *hbox2, *label, *scale, *opt, *menu; |
918 |
> |
GtkWidget *box, *vbox, *hbox, *hbox2, *label, *scale, *menu; |
919 |
|
|
920 |
|
box = make_pane(top, STR_MEMORY_MISC_PANE_TITLE); |
921 |
|
|