summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-10-15 21:36:55 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-10-15 21:36:55 (GMT)
commit56da4d4f17ebf1fcfa25bd6cb575feea16924086 (patch)
treeed4b09aaff28ce24caaba5fd3efa9e3b5d7f531c /gui
parentdbbf05c1d3adbc5a26bdaf5ca1237f7c3cea342a (diff)
downloadeeshow-56da4d4f17ebf1fcfa25bd6cb575feea16924086.zip
eeshow-56da4d4f17ebf1fcfa25bd6cb575feea16924086.tar.gz
eeshow-56da4d4f17ebf1fcfa25bd6cb575feea16924086.tar.bz2
main/eeshow.c, gui/comp.c: -d file.doc_db load doc db; comp pop shows entries
Diffstat (limited to 'gui')
-rw-r--r--gui/comp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gui/comp.c b/gui/comp.c
index cc7d6a6..48b9421 100644
--- a/gui/comp.c
+++ b/gui/comp.c
@@ -17,6 +17,7 @@
#include <gtk/gtk.h>
#include "misc/util.h"
+#include "db/doc.h"
#include "kicad/dwg.h"
#include "gfx/misc.h"
#include "gui/aoi.h"
@@ -126,6 +127,14 @@ static void comp_click(void *user)
}
+static void add_doc(void *user, const char *tag, const char *s)
+{
+ struct gui *gui = user;
+
+ add_pop_item(gui, comp_click, (void *) s, COMP_W, 0, "%s", tag);
+}
+
+
static bool hover_comp(void *user, bool on, int dx, int dy)
{
struct comp_aoi_ctx *aoi_ctx = user;
@@ -165,6 +174,7 @@ static bool hover_comp(void *user, bool on, int dx, int dy)
add_pop_header(gui, COMP_W, ref ? ref : "???");
if (doc)
add_pop_item(gui, comp_click, (void *) doc, COMP_W, 0, "Doc");
+ doc_find(ref, add_doc, gui);
add_pop_frame(gui);
place_pop(gui, &aoi_ctx->bbox);