forked from drahnr/oregano
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The following patch adds the following features and fixes:
- add noise analysis (initial version: integrated noise only); - add user documentation for the simulation settings (DC, AC and Noise); - increase the minimum width of the simulation settings window in order to fit all the descriptions (labels); - fix units of measurements for several simulation settings (DC and AC, from incorrect units of "seconds"); - properly set Pango Text Attribute Markup Language in oregano_error(), oregano_warning() and oregano_question(); - add auxiliary functions to schedule calls to oregano_error(), oregano_warning() and oregano_question() using the GLib function g_idle_add_full() (thanks Bernhard for the tip, this is a local ngspice_analysis resolution for drahnr#194); - some style improvements here and there; - insert the proper GNU copyright notice in new files (proper copyright information and full name is still missing for user "Michi" !); - update authors, copyright information and contact details in the GUI; - version bump. Signed-off-by: Guido Trentalancia <[email protected]> --- AUTHORS | 1 data/xml/sim-settings.ui | 566 +++- docs/user-docs/Simulation-Settings-HOWTO.md | 30 src/dialogs.c | 66 src/dialogs.h | 5 src/engines/netlist-helper.c | 10 src/engines/netlist-helper.h | 2 src/engines/ngspice-analysis.c | 98 src/engines/ngspice-watcher.c | 23 src/engines/ngspice-watcher.h | 23 src/engines/ngspice.c | 23 src/load-schematic.c | 81 src/log-interface.h | 25 src/plot.c | 32 src/save-schematic.c | 31 src/sim-settings-gui.c | 401 ++- src/sim-settings-gui.h | 46 src/sim-settings.c | 95 src/sim-settings.h | 37 src/simulation.h | 3 src/tools/cancel-info.c | 23 src/tools/cancel-info.h | 23 src/tools/thread-pipe.c | 29 src/tools/thread-pipe.h | 23 test/test-files/test_engine_ngspice_watcher/basic/result/actual.txt | 1176 ---------- test/test-files/test_engine_ngspice_watcher/error/step_zero/result/actual.txt | 5 test/test_engine_ngspice.c | 23 test/test_thread_pipe.c | 23 test/test_update_connection_designators.c | 24 wscript | 2 30 files changed, 1394 insertions(+), 1555 deletions(-)
- Loading branch information
1 parent
2fecae3
commit 276f903
Showing
30 changed files
with
1,395 additions
and
1,556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ Ricardo Markiewicz <[email protected]> | |
Andrés de Barbará <[email protected]> | ||
Marc Lorber <[email protected]> | ||
Bernhard Schuster <[email protected]> | ||
Guido Trentalancia <[email protected]> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,15 @@ | |
* Andres de Barbara <[email protected]> | ||
* Marc Lorber <[email protected]> | ||
* Bernhard Schuster <[email protected]> | ||
* Guido Trentalancia <[email protected]> | ||
* | ||
* Web page: https://ahoi.io/project/oregano | ||
* | ||
* Copyright (C) 1999-2001 Richard Hult | ||
* Copyright (C) 2003,2006 Ricardo Markiewicz | ||
* Copyright (C) 2009-2012 Marc Lorber | ||
* Copyright (C) 2013 Bernhard Schuster | ||
* Copyright (C) 2017 Guido Trentalancia | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -37,6 +39,15 @@ | |
|
||
#include "pixmaps/logo.xpm" | ||
|
||
/* | ||
* Schedule a call to the oregano_error() function so that it is | ||
* called whenever there are no higher priority events pending. | ||
* | ||
* The caller should schedule this function call using the GLib | ||
* function g_idle_add_full(). | ||
*/ | ||
gboolean oregano_schedule_error (gchar *msg) { oregano_error_with_title (msg, NULL); return FALSE; } | ||
|
||
void oregano_error (gchar *msg) { oregano_error_with_title (msg, NULL); } | ||
|
||
void oregano_error_with_title (gchar *title, gchar *desc) | ||
|
@@ -53,17 +64,28 @@ void oregano_error_with_title (gchar *title, gchar *desc) | |
span_msg = g_string_append (span_msg, desc); | ||
} | ||
|
||
dialog = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, | ||
GTK_BUTTONS_OK, "%s", span_msg->str); | ||
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, | ||
GTK_BUTTONS_CLOSE, NULL); | ||
|
||
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), span_msg->str); | ||
|
||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); | ||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); | ||
|
||
gtk_dialog_run (GTK_DIALOG (dialog)); | ||
|
||
g_string_free (span_msg, TRUE); | ||
gtk_widget_destroy (dialog); | ||
} | ||
|
||
/* | ||
* Schedule a call to the oregano_warning() function so that it is | ||
* called whenever there are no higher priority events pending. | ||
* | ||
* The caller should schedule this function call using the GLib | ||
* function g_idle_add_full(). | ||
*/ | ||
gboolean oregano_schedule_warning (gchar *msg) { oregano_warning_with_title (msg, NULL); return FALSE; } | ||
|
||
void oregano_warning (gchar *msg) { oregano_warning_with_title (msg, NULL); } | ||
|
||
void oregano_warning_with_title (gchar *title, gchar *desc) | ||
|
@@ -80,28 +102,42 @@ void oregano_warning_with_title (gchar *title, gchar *desc) | |
span_msg = g_string_append (span_msg, desc); | ||
} | ||
|
||
dialog = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, | ||
GTK_BUTTONS_OK, "%s", span_msg->str); | ||
dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, | ||
GTK_BUTTONS_CLOSE, NULL); | ||
|
||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); | ||
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), span_msg->str); | ||
|
||
gtk_dialog_run (GTK_DIALOG (dialog)); | ||
gtk_dialog_set_default_response (GTK_MESSAGE_DIALOG (dialog), GTK_RESPONSE_CLOSE); | ||
|
||
gtk_dialog_run (GTK_MESSAGE_DIALOG (dialog)); | ||
|
||
g_string_free (span_msg, TRUE); | ||
|
||
gtk_widget_destroy (dialog); | ||
} | ||
|
||
/* | ||
* Schedule a call to the oregano_question() function so that it is | ||
* called whenever there are no higher priority events pending. | ||
* | ||
* The caller should schedule this function call using the GLib | ||
* function g_idle_add_full(). | ||
*/ | ||
gboolean oregano_schedule_question (gchar *msg) { oregano_question (msg); return FALSE; } | ||
|
||
gint oregano_question (gchar *msg) | ||
{ | ||
GtkWidget *dialog; | ||
gint ans; | ||
|
||
dialog = gtk_message_dialog_new_with_markup (NULL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK, | ||
GTK_BUTTONS_CANCEL, "%s", msg); | ||
dialog = gtk_message_dialog_new (NULL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK, | ||
GTK_BUTTONS_CANCEL, NULL); | ||
|
||
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), msg); | ||
|
||
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL); | ||
gtk_dialog_set_default_response (GTK_MESSAGE_DIALOG (dialog), GTK_RESPONSE_CANCEL); | ||
|
||
ans = gtk_dialog_run (GTK_DIALOG (dialog)); | ||
ans = gtk_dialog_run (GTK_MESSAGE_DIALOG (dialog)); | ||
gtk_widget_destroy (dialog); | ||
return (ans == GTK_RESPONSE_ACCEPT); | ||
} | ||
|
@@ -113,15 +149,17 @@ void dialog_about (void) | |
|
||
const gchar *authors[] = {"Richard Hult", "Margarita Manterola", "Andres de Barbara", | ||
"Gustavo M. Pereyra", "Maximiliano Curia", "Ricardo Markiewicz", | ||
"Marc Lorber", "Bernhard Schuster", NULL}; | ||
"Marc Lorber", "Bernhard Schuster", "Guido Trentalancia", | ||
NULL}; | ||
|
||
const char *docs[] = {"Ricardo Markiewicz <[email protected]> (es)", | ||
"Jordi Mallach <[email protected]> (ca)", | ||
"Marc Lorber <[email protected]> (en)", | ||
"Bernhard Schuster <[email protected]> (de)", | ||
"Bernhard Schuster <[email protected]> (de)", | ||
NULL}; | ||
|
||
const gchar *copy = _ ("(c) 2012-2017 Bernhard Schuster\n" | ||
const gchar *copy = _ ("(c) 2017 Guido Trentalancia\n" | ||
"(c) 2012-2017 Bernhard Schuster\n" | ||
"(c) 2009-2012 Marc Lorber\n" | ||
"(c) 2003-2006 LUGFi\n" | ||
"(c) 1999-2001 Richard Hult"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,14 @@ | |
* Ricardo Markiewicz <[email protected]> | ||
* Andres de Barbara <[email protected]> | ||
* Marc Lorber <[email protected]> | ||
* Guido Trentalancia <[email protected]> | ||
* | ||
* Web page: https://ahoi.io/project/oregano | ||
* | ||
* Copyright (C) 1999-2001 Richard Hult | ||
* Copyright (C) 2003,2004 Ricardo Markiewicz | ||
* Copyright (C) 2009-2012 Marc Lorber | ||
* Copyright (C) 2017 Guido Trentalancia | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
|
@@ -35,10 +37,13 @@ | |
|
||
#include "schematic.h" | ||
|
||
gboolean oregano_schedule_error (gchar *msg); | ||
void oregano_error (gchar *msg); | ||
void oregano_error_with_title (gchar *title, gchar *desc); | ||
gboolean oregano_schedule_warning (gchar *msg); | ||
void oregano_warning (gchar *msg); | ||
void oregano_warning_with_title (gchar *title, gchar *desc); | ||
gboolean oregano_schedule_question (gchar *msg); | ||
gint oregano_question (gchar *msg); | ||
void dialog_about (void); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.