Canola
0.8.D001
|
00001 // 00002 // canola - canon canola 1614p emulator 00003 // Copyright (C) 2012 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License, version 3, as 00007 // published by the Free Software Foundation. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License along 00015 // with this program. If not, see <http://www.gnu.org/licenses/>. 00016 // 00017 00018 #include <canola/calculator/gnome.h> 00019 #include <canola/dialog/preferences.h> 00020 #include <canola/load_image.h> 00021 00022 00023 dialog_preferences::~dialog_preferences() 00024 { 00025 } 00026 00027 00028 dialog_preferences::dialog_preferences(calculator_gnome *a_subject) : 00029 Dialog("Preferences", *a_subject, true), 00030 subject(a_subject), 00031 animate_card_reader("Animate card reader"), 00032 strict_memory_numbers("Strict memory number-key checking") 00033 { 00034 set_icon(load_gui_image("canola")); 00035 layout.pack_start(animate_card_reader); 00036 layout.pack_start(strict_memory_numbers); 00037 get_content_area()->add(layout); 00038 add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK); 00039 add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); 00040 show_all_children(); 00041 } 00042 00043 00044 void 00045 dialog_preferences::set_animate_card_reader(bool value) 00046 { 00047 animate_card_reader.set_active(value); 00048 } 00049 00050 00051 bool 00052 dialog_preferences::get_animate_card_reader(void) 00053 { 00054 return animate_card_reader.get_active(); 00055 } 00056 00057 00058 void 00059 dialog_preferences::set_strict_memory_numbers(bool value) 00060 { 00061 strict_memory_numbers.set_active(value); 00062 } 00063 00064 00065 bool 00066 dialog_preferences::get_strict_memory_numbers(void) 00067 { 00068 return strict_memory_numbers.get_active(); 00069 } 00070 00071 00072 // vim: set ts=8 sw=4 et :