sat-pref-interfaces.c
1 /* 2 Gpredict: Real-time satellite tracking and orbit prediction program 3 4 Copyright (C) 2001-2015 Alexandru Csete, OZ9AEC. 5 6 Authors: Alexandru Csete <oz9aec@gmail.com> 7 8 Comments, questions and bugreports should be submitted via 9 http://sourceforge.net/projects/gpredict/ 10 More details can be found at the project home page: 11 12 http://gpredict.oz9aec.net/ 13 14 This program is free software; you can redistribute it and/or modify 15 it under the terms of the GNU General Public License as published by 16 the Free Software Foundation; either version 2 of the License, or 17 (at your option) any later version. 18 19 This program is distributed in the hope that it will be useful, 20 but WITHOUT ANY WARRANTY; without even the implied warranty of 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 GNU General Public License for more details. 23 24 You should have received a copy of the GNU General Public License 25 along with this program; if not, visit http://www.fsf.org/ 26 */ 27 #ifdef HAVE_CONFIG_H 28 #include <build-config.h> 29 #endif 30 #include <glib/gi18n.h> 31 #include <gtk/gtk.h> 32 33 #include "sat-cfg.h" 34 #include "sat-pref-interfaces.h" 35 #include "sat-pref-rig.h" 36 #include "sat-pref-rot.h" 37 38 /** 39 * Create and initialise widgets for the hardware interfaces prefs tab. 40 * 41 * The widgets must be preloaded with values from config. If a config value 42 * is NULL, sensible default values, eg. those from defaults.h should 43 * be loaded. 44 */ 45 GtkWidget *sat_pref_interfaces_create() 46 { 47 GtkWidget *nbook; 48 49 nbook = gtk_notebook_new(); 50 51 gtk_notebook_append_page(GTK_NOTEBOOK(nbook), 52 sat_pref_rig_create(), 53 gtk_label_new(_("Radios"))); 54 gtk_notebook_append_page(GTK_NOTEBOOK(nbook), 55 sat_pref_rot_create(), 56 gtk_label_new(_("Rotators"))); 57 58 return nbook; 59 } 60 61 /** User pressed cancel. Any changes to config must be cancelled. */ 62 void sat_pref_interfaces_cancel() 63 { 64 sat_pref_rig_cancel(); 65 sat_pref_rot_cancel(); 66 } 67 68 /** User pressed OK. Any changes should be stored in config. */ 69 void sat_pref_interfaces_ok() 70 { 71 sat_pref_rig_ok(); 72 sat_pref_rot_ok(); 73 }