1 |
|
/* |
2 |
|
* Prefs_glade.h - Global preferences, Glade/Gnome/Gtk+ specific stuff |
3 |
|
* |
4 |
< |
* Frodo (C) 1994-1997,2002-2004 Christian Bauer |
4 |
> |
* Frodo Copyright (C) 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 |
18 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
|
*/ |
20 |
|
|
21 |
+ |
#include "Version.h" |
22 |
+ |
|
23 |
|
#include <gnome.h> |
24 |
|
#include <glade/glade.h> |
25 |
|
|
49 |
|
* prefs_name points to the file name of the preferences (which may be changed) |
50 |
|
*/ |
51 |
|
|
52 |
< |
bool Prefs::ShowEditor(bool startup, char *path) |
52 |
> |
bool Prefs::ShowEditor(bool startup, char *prefs_name) |
53 |
|
{ |
54 |
|
prefs = this; |
55 |
< |
prefs_path = path; |
55 |
> |
prefs_path = prefs_name; |
56 |
|
|
57 |
|
// Load XML user interface file on startup |
58 |
|
if (startup) { |
69 |
|
|
70 |
|
// Run editor |
71 |
|
result = false; |
72 |
+ |
|
73 |
+ |
gtk_widget_show(glade_xml_get_widget(xml, "prefs_win")); |
74 |
|
gtk_main(); |
75 |
+ |
|
76 |
|
return result; |
77 |
|
} |
78 |
|
|
204 |
|
|
205 |
|
ghost_widget("sid_filters", prefs->SIDType != SIDTYPE_DIGITAL); |
206 |
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "sid_filters")), prefs->SIDType == SIDTYPE_DIGITAL ? prefs->SIDFilters : (prefs->SIDType == SIDTYPE_SIDCARD ? true : false)); |
207 |
+ |
|
208 |
+ |
ghost_widget("timing_control", IsFrodoSC); |
209 |
+ |
ghost_widget("advanced_options", IsFrodoSC); |
210 |
|
} |
211 |
|
|
212 |
|
|
224 |
|
result = true; |
225 |
|
get_values(); |
226 |
|
prefs->Save(prefs_path); |
227 |
+ |
gtk_widget_hide(glade_xml_get_widget(xml, "prefs_win")); |
228 |
|
gtk_main_quit(); |
229 |
|
} |
230 |
|
|
237 |
|
extern "C" void on_about_activate(GtkMenuItem *menuitem, gpointer user_data) |
238 |
|
{ |
239 |
|
GladeXML *about_xml = glade_xml_new(DATADIR "Frodo.glade", "about_win", NULL); |
240 |
< |
if (about_xml) |
241 |
< |
gtk_widget_show(glade_xml_get_widget(about_xml, "about_win")); |
240 |
> |
if (about_xml) { |
241 |
> |
GtkWidget *about_win = glade_xml_get_widget(about_xml, "about_win"); |
242 |
> |
g_object_set(about_win, "name", VERSION_STRING, NULL); |
243 |
> |
gtk_widget_show(about_win); |
244 |
> |
} |
245 |
|
} |
246 |
|
|
247 |
|
extern "C" void on_emul1541_proc_toggled(GtkToggleButton *button, gpointer user_data) |