Remove multiple library support
This commit is contained in:
parent
3d94eddd57
commit
43b208a467
@ -28,14 +28,14 @@
|
|||||||
#define IS_LAYE_RELEMENT(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, layer_element_get_type())
|
#define IS_LAYE_RELEMENT(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, layer_element_get_type())
|
||||||
|
|
||||||
typedef struct _LayerElement {
|
typedef struct _LayerElement {
|
||||||
/* Inheritance */
|
/* Inheritance */
|
||||||
GtkBox hbox;
|
GtkBox hbox;
|
||||||
/* Custom Elements */
|
/* Custom Elements */
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
} LayerElement;
|
} LayerElement;
|
||||||
|
|
||||||
typedef struct _LayerElementClass {
|
typedef struct _LayerElementClass {
|
||||||
GtkBoxClass parent_class;
|
GtkBoxClass parent_class;
|
||||||
} LayerElementClass;
|
} LayerElementClass;
|
||||||
|
|
||||||
|
|
||||||
|
18
main.c
18
main.c
@ -60,7 +60,6 @@ void on_load_gds(gpointer button, gpointer user)
|
|||||||
GtkTreeStore *store = ptr->cell_store;
|
GtkTreeStore *store = ptr->cell_store;
|
||||||
GtkWidget *open_dialog;
|
GtkWidget *open_dialog;
|
||||||
GtkFileChooser *file_chooser;
|
GtkFileChooser *file_chooser;
|
||||||
GtkWidget *msg_dialog;
|
|
||||||
GtkFileFilter *filter;
|
GtkFileFilter *filter;
|
||||||
GtkStyleContext *button_style;
|
GtkStyleContext *button_style;
|
||||||
gint dialog_result;
|
gint dialog_result;
|
||||||
@ -83,24 +82,9 @@ void on_load_gds(gpointer button, gpointer user)
|
|||||||
/* Get File name */
|
/* Get File name */
|
||||||
filename = gtk_file_chooser_get_filename(file_chooser);
|
filename = gtk_file_chooser_get_filename(file_chooser);
|
||||||
|
|
||||||
if (*ptr->list_ptr) {
|
|
||||||
/* Libraries present */
|
|
||||||
msg_dialog =
|
|
||||||
gtk_message_dialog_new(ptr->main_window, GTK_DIALOG_USE_HEADER_BAR,
|
|
||||||
GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO,
|
|
||||||
"There's already data present? Delete old data?");
|
|
||||||
dialog_result = gtk_dialog_run(GTK_DIALOG(msg_dialog));
|
|
||||||
gtk_widget_destroy(msg_dialog);
|
|
||||||
} else
|
|
||||||
dialog_result = GTK_RESPONSE_YES;
|
|
||||||
|
|
||||||
/* Clear Display Will be completely refreshed in any case */
|
|
||||||
gtk_tree_store_clear(store);
|
gtk_tree_store_clear(store);
|
||||||
|
clear_lib_list(ptr->list_ptr);
|
||||||
|
|
||||||
if (dialog_result == GTK_RESPONSE_YES) {
|
|
||||||
/* Delete parsed GDS data */
|
|
||||||
clear_lib_list(ptr->list_ptr);
|
|
||||||
}
|
|
||||||
/* Parse new GDSII file */
|
/* Parse new GDSII file */
|
||||||
gds_result = parse_gds_from_file(filename, ptr->list_ptr);
|
gds_result = parse_gds_from_file(filename, ptr->list_ptr);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user