198 Commits

Author SHA1 Message Date
Tom A. Wagner
ce6cab8134 Run rustfmt 2021-10-13 12:01:22 +02:00
Tom A. Wagner
8a552d0712 graphview: Add missing }; to fix build. 2021-10-13 11:56:46 +02:00
halfbro
f76235674c Add small control point offset to links that connect from right to left (loopbacks) 2021-10-13 09:11:10 +00:00
Tom A. Wagner
92dcfd61a1 Add gpl snippets to the start of each rust source file. 2021-10-03 11:27:36 +02:00
Tom A. Wagner
02e58e9bfa LICENSE: Replace outdated and edited GPL with the lastest stock version.
The old license file contained project specific edits, but editing the GPL text is disallowed by the fsf.
The new file also contains updated links.
2021-10-03 11:14:30 +02:00
Tom A. Wagner
958fa15230 Release 0.3.1 0.3.1 2021-09-30 08:45:11 +02:00
Tom A. Wagner
e9753dd078 Update dependencies 2021-09-30 08:45:00 +02:00
Tom A. Wagner
dfb1b754c7 Add and install icons.
This adds one new app icon and one new symbolic icon, and makes meson install these to the appropriate
directories, and adds an appropriate entry in the .desktop file.
2021-09-30 08:28:06 +02:00
Tom A. Wagner
497da8b953 graphview: Do not crash when the position of a node not on the graph is requested
While the position of a node not on the graph should never be requested, this seems to occur sometimes,
so instead of panicking, we only log an error now, or ignore that node if it wasn't
important.
2021-09-11 15:03:03 +02:00
Tom A. Wagner
da5da90352 Add .desktop file
This adds a .desktop file (without icon for now), which will automatically be installed when
`meson install` is run.
2021-08-29 18:41:09 +02:00
Tom A. Wagner
a8bfd8383e buildsystem: Move to meson for building the project
Meson will allow us to:
- Verify the used rust compiler is recent enough
- Install ressources such as a .desktop files, icons, etc.
2021-08-29 17:28:55 +02:00
Tom A. Wagner
7ef8677c4c readme: move screenshot.png into docs/ folder 2021-08-29 16:56:56 +02:00
Roger Roger
487dc3b2d3 Group nodes into columns by major type 2021-08-18 07:23:50 +00:00
Tom A. Wagner
2ee7bca68a Release 0.3.0 0.3.0 2021-08-08 09:51:55 +02:00
Tom A. Wagner
494d3a383f Update dependencies 2021-08-08 09:51:42 +02:00
Tom A. Wagner
b719e0d2ec Add simple flatpak manifest 2021-07-22 11:35:12 +02:00
Tom A. Wagner
f64a936dd9 Update dependencies 2021-07-18 09:58:39 +02:00
Tom A. Wagner
179665778d view: Draw a dashed line for links that are not active 2021-07-08 13:37:37 +02:00
er888kh
be9339472e First nodes that GraphView::add_node creates, get pushed
to the left side of the screen. So by adding a constant offset,
we can avoid having possible links that are partly out of the view
just after starting the program
2021-07-06 09:39:34 +00:00
Tom A. Wagner
e29ffdeea8 view: Port: Do not inherit from gtk::Button
We do not need any button functionality, so it is more appropriate to inherit directly from gtk::Widget
2021-07-06 11:01:20 +02:00
Tom A. Wagner
add1a96b75 Deduplicate port dragging code and add some extra logging 2021-07-06 10:23:20 +02:00
Tom A. Wagner
9445e173f9 view: ports: Improve linking between ports.
Links can now created by dragging in both directions, so now from an input port to an output port, too.
The drag-n-drop handlers now use dedicated types for each direction, so that no mismatched things can be dropped on each other.
2021-06-28 13:54:53 +02:00
Tom A. Wagner
58794fe123 Remove unneeded Rc, Port is now a refcounted gobject 2021-06-28 13:29:46 +02:00
Tom A. Wagner
8d6fbe2997 Remove outdated doc comment 2021-06-28 13:29:46 +02:00
Tom A. Wagner
b0bf5e5281 Slightly improve logging 2021-06-28 13:29:46 +02:00
Tom A. Wagner
edc4064009 graphview: Place link curve control points more dynamically
Control points are now offset by half the x distance of the start and end points instead of a constant,
which makes the curve scale better with varying distance.
2021-06-28 10:48:09 +02:00
Tom A. Wagner
58cdcd859b graphview: Draw links in front of nodes, instead of behind them. 2021-06-26 12:34:48 +02:00
Tom A. Wagner
7977481689 Fix some pedantic clippy warnings 2021-06-26 12:10:36 +02:00
Tom A. Wagner
f09fd596c8 Update dependencies§ 2021-06-25 15:40:17 +02:00
Tom A. Wagner
1247b29bae Use pipewire from crates.io
The newest release contains everything we need, so we can use the crates.io version again.
2021-06-25 15:38:54 +02:00
Tom A. Wagner
74ffb06b40 Use gtk4-rs from crates.io instead from their git.
The gtk4 crate finally had its first release, so we no longer have to use their git repository directly.
2021-06-25 15:06:41 +02:00
Tom A. Wagner
81467154d9 Readme.md: Replace "Packages" section with repology badge, add license section 2021-06-07 16:03:50 +02:00
Tom A. Wagner
46b2175a78 Release v0.2.1 0.2.1 2021-06-06 20:44:10 +02:00
Tom A. Wagner
9aeea6b108 Update dependencies 2021-06-06 20:42:00 +02:00
Tom A. Wagner
c8f94ae302 Use link info callback instead of properties to get ids.
While the properties for a links node ids are not always set, they always are in the link info.

Also, the work done in this commit will easily allow to get the format of links and ports later,
so that we can get the format of them much more reliably,
and we can also get notified of changes to an existing global via the info callback.
2021-06-06 20:28:19 +02:00
Tom A. Wagner
92101d860c Update ARCHITECTURE.md to reflect state having moved to the pipewire thread 2021-06-06 09:36:57 +02:00
Tom A. Wagner
907ef328d2 Move state to pipewire thread instead of the gtk thread.
This will allow easier state-keeping later, when setting up info-listeners on structs.
2021-06-06 09:20:07 +02:00
Tom A. Wagner
118c1ca28c Get node_from, node_to ids from state instead of props when a new link appears.
This is more reliable than assuming the link carries the id of its nodes, as there have been cases where a link was created without those
properties set.
Instead, we can just pull them from the state via the port ids of the link.
2021-06-04 10:30:31 +02:00
Tom A. Wagner
a9aec985b0 pipewire: Edit fixme about port media type 2021-05-25 22:45:13 +02:00
Tom A. Wagner
dce228ff60 Update dependencies
Glib MainContext is now aquired manually because a change in gtk-rs would lead to
a panic when attaching the receiver otherwise, because gtk::init() doesn't
"leak" the default main context anymore.
2021-05-22 14:00:51 +02:00
Jan Vanmullem
24fd54affe references both AUR release & git packages 2021-05-18 16:25:49 +02:00
Mathias Rav
3cd19f2d1d When dragging a node, don't snap its top-left corner to the cursor
Revamp the node dragging implementation, moving it into the GraphView
widget.

When a drag is initiated, the node widget's current position is stored.
Whenever the drag gesture is updated, the node widget's position is set
by adding the relative drag vector to the position at the start of the
drag.

A drag gesture on the node widget rather than the GraphView widget was
considered, but this seems to lead to a weird flickering effect when the
node is moved while the drag gesture on the node is active.

To avoid interfering with the drag handlers on the ports, check if the
GraphView drag gesture targets a port, in which case the handler does
nothing.
2021-05-10 18:21:00 +00:00
Mathias Rav
6d60095da8 Move CSS to its own file 2021-05-09 21:53:27 +02:00
Tom A. Wagner
0cee4b0ea5 Release 0.2.0 0.2.0 2021-05-08 20:09:11 +02:00
Tom A. Wagner
a9cd428a5a Change cursor to grab hand over output port.
This lets the user know the port can be dragged to create a link.
2021-05-08 18:44:50 +02:00
Tom A. Wagner
a5d8c871ee Update dependencies 2021-05-08 18:42:49 +02:00
Tom A. Wagner
1c69dc85fb Update README.md planned features section 2021-05-08 18:13:51 +02:00
Tom A. Wagner
13f02ad317 Toggle links on and off when ports are connected by the user.
This extends the `Application` struct to keep more advanced state.
This state is then used to determine the needed information to create
or delete a link between the two connected ports.

A message to create/delete the link is then send to the pipewire thread,
which executed the request.
2021-05-08 18:06:52 +02:00
Tom A. Wagner
be240231c0 Merge Controller and View structs into one Application struct.
The `View` sturct was mostly a layer of indirection, and the controller benefitted by absorbing the gtk::Application
subclass parts, so now those two are merged into a new gtk::Application subclass.
2021-05-08 18:06:52 +02:00
Tom A. Wagner
2cc684d57c Turn struct View into a gtk::Application subclass.
This lets us keep multiple reference-counted copies easier, and lets us emit signals to the controller.
2021-05-08 18:06:52 +02:00