Commit Graph

69 Commits

Author SHA1 Message Date
6c925b7092 Clean up LdDiagram.
* Don't emit signals when disposing.
* Remove some leftovers.
2012-10-08 00:04:47 +02:00
4196a10ece Get more GTK+ 3 ready and respect seals. 2012-09-05 19:58:51 +02:00
cf5260990c Improve code in LdDiagram a bit. 2012-08-31 14:04:09 +02:00
20c2595f2d Check symbol names in LdLua during registration. 2012-08-31 14:04:09 +02:00
a1b79a55d2 Change how Cairo is presented to Lua scripts.
Makes the whole thing a bit more stable and less weird.
2012-08-12 06:10:27 +02:00
9366c42026 Do name collision checking more properly. 2012-08-12 01:29:48 +02:00
bb224bafd0 More fixing.
* Fix a resource leak in LdLibrary.
* Add missing property change notifiers
  to ld_diagram_object_{get,set}_storage().
* Don't unref the parameter in ld_symbol_category_remove_{symbol,subcategory}
  if it wasn't actually removed from the internal list.
* Fix a cyclic dependency problem in LdDiagram.
2012-08-12 01:01:13 +02:00
f55afb6542 Put subcategories and symbols in different lists.
Removes some ugliness from the code.
2012-08-11 20:17:10 +02:00
b0ecd81212 Maintenance.
* Fix setting the GSETTINGS_SCHEMA_DIR environment variable.
* Use g_value_take_boxed() instead of deprecated
  g_value_set_boxed_take_ownership().
* Remove an unused variable.
* Clean up load_category() a bit.
2012-08-11 07:25:54 +02:00
b3ccabe627 Clean up dead assignments. 2012-02-02 13:28:27 +01:00
a2b898b610 Change the cursor when scrolling the view.
For consistency with other GTK+ applications.
2011-06-09 21:56:38 +02:00
d8fd4430fc Add scrolling using the middle mouse button.
A bit of refactoring, too.
2011-06-09 21:11:41 +02:00
82bf779405 Disallow wheel zooming when holding mouse buttons. 2011-06-09 21:11:41 +02:00
cd66c3d84a Ignore terminals when hovering above selection.
Also fix checking for the shift key and rename the "object"
variable to "object_at_cursor" in button handlers.
2011-06-09 21:11:41 +02:00
c8caca073f Add API for turning off the grid. 2011-03-07 17:29:26 +01:00
6ae08ee425 Glue to terminal points when creating connections. 2011-03-07 17:29:26 +01:00
89b20380d3 Allow rotating of symbols while placing them. 2011-03-07 17:29:26 +01:00
95b92e12f9 Fix gtk-doc comments. 2011-02-20 13:39:44 +01:00
403a9d702a Disable LdDiagramView scrollbars when not needed. 2011-02-20 12:54:15 +01:00
f9827e2ff3 Refactor oper_connect_motion(). 2011-02-20 12:41:45 +01:00
f074bc6742 Also find terminals on ends of connections. 2011-02-19 22:49:21 +01:00
8aef3fc772 Use "typedef struct" in ld-diagram-view.c. 2011-02-19 22:49:20 +01:00
b5ff3b5bbb Don't emit changes when reading.
When the value for a property isn't present in it's JsonObject,
it can be assigned upon reading. Previously this could generate
history events even when just viewing an old diagram with some
of newer properties missing.

Modify the code, so setting to default doesn't count as a change
anymore.
2011-02-19 22:49:20 +01:00
6820d27efa Add "x" and "y" properties to LdDiagramView.
Plus a bit of refactoring.
2011-02-19 22:49:20 +01:00
7fa6efbaec Rename LdCanvas to LdDiagramView. 2011-02-19 22:49:20 +01:00
412a01690b Change selection color to red.
To make it more distinctive.
2011-02-19 22:49:20 +01:00
baed5ee4bd Allow rotation of symbols.
Bind this action to the right mouse button.

Due to limitations of json-glib, we can't store rotation as an enum.
2011-02-14 10:14:28 +01:00
5ccabad6ce Emit "cancel-operation", don't call the handler. 2011-02-14 08:46:41 +01:00
1730064ed3 Avoid too wide items in symbol menus. 2011-02-14 08:21:30 +01:00
8ac4674a8e Fix ld-types.h for gtk-doc. 2011-02-14 06:41:08 +01:00
68e6e4a7e8 Make symbol menus nicer. 2011-02-12 18:26:27 +01:00
b7875c361f Update the symbol library, add trivial text API. 2011-02-12 18:26:15 +01:00
2c5f2f5b3f Export more cairo functions to Lua.
Also rewrite the wrappers to be shorter.
2011-02-11 18:07:49 +01:00
d96acedcdb Speed up drawing of the grid. 2011-02-10 06:03:41 +01:00
2aac9c6f23 Fix drawing of symbol menus. 2011-02-07 13:53:56 +01:00
1277b6eaaf Add support for LdDiagramConnection to LdCanvas.
Heavy LdCanvas refactoring, some modifications to ld-types.

It just wasn't possible for me to further work with an old,
2000 lines long file without shuffling everything around
at the same time.
2011-02-07 01:10:17 +01:00
ee95916749 Fix memory leaks in LdDiagramConnection. 2011-02-06 18:29:35 +01:00
107ec13506 Fix a memory leak in LdDiagramSymbol. 2011-02-06 17:57:37 +01:00
7f08a51c66 Extend symbol area to whole pixels.
This gives better cairo performance.
2011-02-06 12:36:11 +01:00
2dcf578c12 Use correct rounding when moving selection. 2011-02-05 20:17:39 +01:00
dca71f66c3 Fix undoing, create a unit test for history. 2011-02-05 19:47:07 +01:00
611b11508a Make grid dots pixel-sharp. 2011-02-05 18:52:51 +01:00
3cec64ebe8 Refactor ld-canvas.c, extend LdCanvas operations.
Now objects can be selected and moved by dragging the mouse.
2011-02-05 18:48:11 +01:00
2b0672a2cb Implement zooming in LdWindowMain.
Add convenience methods to LdCanvas.
2011-02-04 20:19:01 +01:00
f2005e3b2f Make LdDiagram work with json-glib 0.10. 2011-02-04 17:17:57 +01:00
75c2358b69 Extend LdPointArray. 2011-02-02 23:53:38 +01:00
f864693f1b Update gtk-doc documentation. 2011-02-02 17:26:04 +01:00
2744d84896 Introduce LdDiagramConnection. 2011-02-02 17:22:34 +01:00
539f537846 Fix drawing of the grid. 2011-02-01 17:21:08 +01:00
a967a2c3b8 Bind actions to cursor keys in LdCanvas.
If there's a selection, move it. Otherwise move the viewport.
2011-02-01 14:52:48 +01:00