1 |
|
/* |
2 |
|
* prefs_editor_gtk.cpp - Preferences editor, Unix implementation using GTK+ |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2000 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2001 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 |
227 |
|
{ |
228 |
|
GtkWidget *dialog, *label, *button; |
229 |
|
|
230 |
< |
char str[256]; |
231 |
< |
sprintf(str, GetString(STR_ABOUT_TEXT1), VERSION_MAJOR, VERSION_MINOR); |
232 |
< |
strncat(str, "\n", 255); |
233 |
< |
strncat(str, GetString(STR_ABOUT_TEXT2), 255); |
230 |
> |
char str[512]; |
231 |
> |
sprintf(str, |
232 |
> |
"Basilisk II\nVersion %d.%d\n\n" |
233 |
> |
"Copyright (C) 1997-2001 Christian Bauer et al.\n" |
234 |
> |
"E-mail: Christian.Bauer@uni-mainz.de\n" |
235 |
> |
"http://www.uni-mainz.de/~bauec002/B2Main.html\n\n" |
236 |
> |
"Basilisk II comes with ABSOLUTELY NO\n" |
237 |
> |
"WARRANTY. This is free software, and\n" |
238 |
> |
"you are welcome to redistribute it\n" |
239 |
> |
"under the terms of the GNU General\n" |
240 |
> |
"Public License.\n", |
241 |
> |
VERSION_MAJOR, VERSION_MINOR |
242 |
> |
); |
243 |
|
|
244 |
|
dialog = gtk_dialog_new(); |
236 |
– |
gtk_widget_set_usize(GTK_WIDGET(dialog), strlen(GetString(STR_ABOUT_TEXT2)) + 200, 120); |
245 |
|
gtk_window_set_title(GTK_WINDOW(dialog), GetString(STR_ABOUT_TITLE)); |
246 |
|
gtk_container_border_width(GTK_CONTAINER(dialog), 5); |
247 |
|
gtk_widget_set_uposition(GTK_WIDGET(dialog), 100, 150); |
410 |
|
} |
411 |
|
|
412 |
|
// "Boot From" selected |
413 |
< |
static void mn_boot_any(...) {PrefsReplaceInt16("bootdriver", 0);} |
414 |
< |
static void mn_boot_cdrom(...) {PrefsReplaceInt16("bootdriver", CDROMRefNum);} |
413 |
> |
static void mn_boot_any(...) {PrefsReplaceInt32("bootdriver", 0);} |
414 |
> |
static void mn_boot_cdrom(...) {PrefsReplaceInt32("bootdriver", CDROMRefNum);} |
415 |
|
|
416 |
|
// "No CD-ROM Driver" button toggled |
417 |
|
static void tb_nocdrom(GtkWidget *widget) |
474 |
|
{STR_BOOT_CDROM_LAB, GTK_SIGNAL_FUNC(mn_boot_cdrom)}, |
475 |
|
{0, NULL} |
476 |
|
}; |
477 |
< |
int bootdriver = PrefsFindInt16("bootdriver"), active = 0; |
477 |
> |
int bootdriver = PrefsFindInt32("bootdriver"), active = 0; |
478 |
|
switch (bootdriver) { |
479 |
|
case 0: active = 0; break; |
480 |
|
case CDROMRefNum: active = 1; break; |
781 |
|
static void set_input_sensitive(void) |
782 |
|
{ |
783 |
|
gtk_widget_set_sensitive(w_keycode_file, PrefsFindBool("keycodes")); |
784 |
< |
gtk_widget_set_sensitive(w_mouse_wheel_lines, PrefsFindInt16("mousewheelmode") == 1); |
784 |
> |
gtk_widget_set_sensitive(w_mouse_wheel_lines, PrefsFindInt32("mousewheelmode") == 1); |
785 |
|
} |
786 |
|
|
787 |
|
// "Use Raw Keycodes" button toggled |
792 |
|
} |
793 |
|
|
794 |
|
// "Mouse Wheel Mode" selected |
795 |
< |
static void mn_wheel_page(...) {PrefsReplaceInt16("mousewheelmode", 0); set_input_sensitive();} |
796 |
< |
static void mn_wheel_cursor(...) {PrefsReplaceInt16("mousewheelmode", 1); set_input_sensitive();} |
795 |
> |
static void mn_wheel_page(...) {PrefsReplaceInt32("mousewheelmode", 0); set_input_sensitive();} |
796 |
> |
static void mn_wheel_cursor(...) {PrefsReplaceInt32("mousewheelmode", 1); set_input_sensitive();} |
797 |
|
|
798 |
|
// Read settings from widgets and set preferences |
799 |
|
static void read_input_settings(void) |
804 |
|
else |
805 |
|
PrefsRemoveItem("keycodefile"); |
806 |
|
|
807 |
< |
PrefsReplaceInt16("mousewheellines", gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(w_mouse_wheel_lines))); |
807 |
> |
PrefsReplaceInt32("mousewheellines", gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(w_mouse_wheel_lines))); |
808 |
|
} |
809 |
|
|
810 |
|
// Create "Input" pane |
825 |
|
{STR_MOUSEWHEELMODE_CURSOR_LAB, GTK_SIGNAL_FUNC(mn_wheel_cursor)}, |
826 |
|
{0, NULL} |
827 |
|
}; |
828 |
< |
int wheelmode = PrefsFindInt16("mousewheelmode"), active = 0; |
828 |
> |
int wheelmode = PrefsFindInt32("mousewheelmode"), active = 0; |
829 |
|
switch (wheelmode) { |
830 |
|
case 0: active = 0; break; |
831 |
|
case 1: active = 1; break; |
840 |
|
gtk_widget_show(label); |
841 |
|
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); |
842 |
|
|
843 |
< |
adj = gtk_adjustment_new(PrefsFindInt16("mousewheellines"), 1, 1000, 1, 5, 0); |
843 |
> |
adj = gtk_adjustment_new(PrefsFindInt32("mousewheellines"), 1, 1000, 1, 5, 0); |
844 |
|
w_mouse_wheel_lines = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0.0, 0); |
845 |
|
gtk_widget_show(w_mouse_wheel_lines); |
846 |
|
gtk_box_pack_start(GTK_BOX(hbox), w_mouse_wheel_lines, FALSE, FALSE, 0); |