Merge branch 'master' of git.shimatta.de:mhu/gds-render

This commit is contained in:
Mario Hüttel 2018-06-11 15:18:02 +02:00
commit a531da26d3
4 changed files with 15 additions and 13 deletions

View File

@ -27,6 +27,7 @@ set(SOURCE
${LATEX_SOURCES}
)
add_compile_options(-Wall)
add_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/glade/resources.c)
add_dependencies(${PROJECT_NAME} glib-resources)

View File

@ -604,6 +604,19 @@ int parse_gds_from_file(const char *filename, GList **library_list)
}
switch (rec_type) {
case HEADER:
case UNITS:
case ENDLIB:
case ENDSTR:
case BOUNDARY:
case PATH:
case SREF:
case ENDEL:
case BOX:
case INVALID:
break;
case BGNLIB:
/* Parse date record */
gds_parse_date(workbuff, read, &current_lib->mod_time, &current_lib->access_time);

View File

@ -29,13 +29,6 @@ static GtkWidget *global_load_button;
static GtkWidget *global_save_button;
static GtkListBox *global_list_box;
static void delete_layer_widget(GtkWidget *widget)
{
gtk_widget_destroy(widget);
}
void delete_layer_info_struct(struct layer_info *info)
{
if (info)
@ -271,7 +264,6 @@ static void load_layer_mapping_from_file(gchar *file_name)
char *name;
gboolean export;
int layer;
int target_layer;
GdkRGBA color;
int result;
GList *rows;
@ -295,15 +287,13 @@ static void load_layer_mapping_from_file(gchar *file_name)
gtk_container_remove(GTK_CONTAINER(global_list_box), GTK_WIDGET(le));
}
target_layer = 0;
while((result = load_csv_line(dstream, &export, &name, &layer, &color)) >= 0) {
/* skip broken line */
if (result == 1)
continue;
/* Add rows in the same order as in file */
if (le = find_layer_element_in_list(rows, layer)) {
if ((le = find_layer_element_in_list(rows, layer))) {
gtk_list_box_insert(global_list_box, GTK_WIDGET(le), -1);
layer_element_set_color(le, &color);

View File

@ -8,10 +8,8 @@ static gboolean tree_sel_func(GtkTreeSelection *selection,
gboolean path_currently_selected,
gpointer data)
{
static int cnt = 0;
GtkTreeIter iter;
struct gds_cell *cell;
gchar *p;
gtk_tree_model_get_iter(model, &iter, path);
gtk_tree_model_get(model, &iter, CELL_SEL_CELL, &cell, -1);