00001
00029 #ifdef HAVE_CONFIG_H
00030 # include <config.h>
00031 #endif
00032
00033 #include <gtk/gtk.h>
00034
00035 #include "interface.h"
00036 #include "support.h"
00037
00038
00044 int
00045 main
00046 (
00047 int argc,
00048 char *argv[]
00049 )
00050 {
00051 GtkWidget *pcb_gfpw;
00052 GtkWidget *about_dialog;
00053
00054 #ifdef ENABLE_NLS
00055 bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
00056 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
00057 textdomain (GETTEXT_PACKAGE);
00058 #endif
00059 gtk_set_locale ();
00060 gtk_init (&argc, &argv);
00061 add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
00062
00063
00064
00065
00066
00067
00068
00069 about_dialog = create_about_dialog ();
00070 gtk_widget_show (about_dialog);
00071
00072 pcb_gfpw = create_pcb_gfpw ();
00073
00074
00075 GtkWidget *add_license_checkbutton = lookup_widget (GTK_WIDGET (pcb_gfpw),
00076 "add_license_checkbutton");
00077 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (add_license_checkbutton),
00078 TRUE);
00079
00080
00081
00082
00083
00084 GtkWidget *number_total_pins_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00085 "number_total_pins_entry");
00086 gtk_widget_set_sensitive (number_total_pins_entry, TRUE);
00087 GtkWidget *pin_pad_exceptions_button = lookup_widget (GTK_WIDGET (pcb_gfpw),
00088 "pin_pad_exceptions_button");
00089 gtk_widget_set_sensitive (pin_pad_exceptions_button, FALSE);
00090
00091
00092
00093
00094
00095
00096 GtkWidget *thermal_checkbutton = lookup_widget (GTK_WIDGET (pcb_gfpw),
00097 "thermal_checkbutton");
00098 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (thermal_checkbutton), FALSE);
00099 GtkWidget *thermal_nopaste_checkbutton = lookup_widget (GTK_WIDGET (pcb_gfpw),
00100 "thermal_nopaste_checkbutton");
00101 gtk_widget_set_sensitive (GTK_WIDGET (thermal_nopaste_checkbutton), FALSE);
00102 GtkWidget *thermal_length_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00103 "thermal_length_entry");
00104 gtk_widget_set_sensitive (thermal_length_entry, FALSE);
00105 GtkWidget *thermal_width_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00106 "thermal_width_entry");
00107 gtk_widget_set_sensitive (thermal_width_entry, FALSE);
00108 GtkWidget *thermal_clearance_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00109 "thermal_clearance_entry");
00110 gtk_widget_set_sensitive (thermal_clearance_entry, FALSE);
00111 GtkWidget *thermal_solder_mask_clearance_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00112 "thermal_solder_mask_clearance_entry");
00113 gtk_widget_set_sensitive (thermal_solder_mask_clearance_entry, FALSE);
00114
00115
00116
00117
00118
00119 GtkWidget *fiducial_checkbutton = lookup_widget (GTK_WIDGET (pcb_gfpw),
00120 "fiducial_checkbutton");
00121 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fiducial_checkbutton), FALSE);
00122 GtkWidget *fiducial_pad_diameter_entry = lookup_widget
00123 (GTK_WIDGET (pcb_gfpw),
00124 "fiducial_pad_diameter_entry");
00125 gtk_widget_set_sensitive (fiducial_pad_diameter_entry, FALSE);
00126 GtkWidget *fiducial_pad_clearance_entry = lookup_widget
00127 (GTK_WIDGET (pcb_gfpw),
00128 "fiducial_pad_clearance_entry");
00129 gtk_widget_set_sensitive (fiducial_pad_clearance_entry, FALSE);
00130 GtkWidget *fiducial_pad_solder_mask_clearance_entry = lookup_widget
00131 (GTK_WIDGET (pcb_gfpw),
00132 "fiducial_pad_solder_mask_clearance_entry");
00133 gtk_widget_set_sensitive (fiducial_pad_solder_mask_clearance_entry,
00134 FALSE);
00135
00136
00137
00138 GtkWidget *silkscreen_package_outline = lookup_widget (GTK_WIDGET (pcb_gfpw),
00139 "silkscreen_package_outline_checkbutton");
00140 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (silkscreen_package_outline), TRUE);
00141 GtkWidget *silkscreen_line_width_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00142 "silkscreen_line_width_entry");
00143 gtk_widget_set_sensitive (silkscreen_line_width_entry, TRUE);
00144
00145
00146
00147
00148
00149
00150
00151 GtkWidget *courtyard_checkbutton = lookup_widget (GTK_WIDGET (pcb_gfpw),
00152 "courtyard_checkbutton");
00153 gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (courtyard_checkbutton), FALSE);
00154 GtkWidget *courtyard_length_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00155 "courtyard_length_entry");
00156 gtk_widget_set_sensitive (courtyard_length_entry, FALSE);
00157 GtkWidget *courtyard_width_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00158 "courtyard_width_entry");
00159 gtk_widget_set_sensitive (courtyard_width_entry, FALSE);
00160 GtkWidget *courtyard_line_width_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00161 "courtyard_line_width_entry");
00162 gtk_widget_set_sensitive (courtyard_line_width_entry, FALSE);
00163 GtkWidget *courtyard_clearance_with_package_entry = lookup_widget (GTK_WIDGET (pcb_gfpw),
00164 "courtyard_clearance_with_package_entry");
00165 gtk_widget_set_sensitive (courtyard_clearance_with_package_entry, FALSE);
00166
00167
00168
00169
00170
00171 GtkWidget *C1_entry = lookup_widget (GTK_WIDGET (pcb_gfpw), "C1_entry");
00172 gtk_widget_set_sensitive (C1_entry, TRUE);
00173 GtkWidget *C2_entry = lookup_widget (GTK_WIDGET (pcb_gfpw), "C2_entry");
00174 gtk_widget_set_sensitive (C2_entry, TRUE);
00175 GtkWidget *G1_entry = lookup_widget (GTK_WIDGET (pcb_gfpw), "G1_entry");
00176 gtk_widget_set_sensitive (G1_entry, FALSE);
00177 GtkWidget *G2_entry = lookup_widget (GTK_WIDGET (pcb_gfpw), "G2_entry");
00178 gtk_widget_set_sensitive (G2_entry, FALSE);
00179 GtkWidget *Z1_entry = lookup_widget (GTK_WIDGET (pcb_gfpw), "Z1_entry");
00180 gtk_widget_set_sensitive (Z1_entry, FALSE);
00181 GtkWidget *Z2_entry = lookup_widget (GTK_WIDGET (pcb_gfpw), "Z2_entry");
00182 gtk_widget_set_sensitive (Z2_entry, FALSE);
00183
00184 gtk_widget_show (pcb_gfpw);
00185
00186 gtk_main ();
00187 return 0;
00188 }
00189
00190