Commit graph

5567 commits

Author SHA1 Message Date
72974f2548 TiddlyWiki: bugfix for Firefox Quantum -- use HTML5 web storage instead of a Cookie
Firefox Quantum adopted the idiotic behaviour of Chrome and does no longer
retrieve Cookies for pages read from local file system. It stores the Cookie
data into its local cookies.sqlite, but it does not retrieve it anymore.
For aledged "security reasons", however it happily retrieves HTML 5 web storage

Since TiddlyWiki classic just accesses the document.cookie at 3 points,
it is easy to patch around that problem. Just check, if we're using a modern
browser with support for HTML5 web storage and branch accordingly.
2018-10-20 02:07:10 +02:00
7e562a4c66 upgrade TiddlyWiki to v2.9.1
Basically, TiddlyWiki "classic" is in maintenance mode, but it is still supported.
This minor upgarde brings some bugfixes, most notably a minor adjustment to work well
with the new Firefox Quantum, which switched to the more restricted WebExtensions
and discontinued support for the old-style XUL based plug-ins.

This bold move by the firefox project placed a lot of well established, mature
extensions on the brink of extinction. Especially TiddlyWiki has gradually lost
its original appeal of a low-ceremony guerrilla wiki. However, it is still
a sweet little gem for experienced users, albeit a bit brittle to use.

You are now either
- forced to enter the target destination on each save
- or forced to arrange tiddly wiki to reside within your default download folder
  and use a firefox plug-in to automate the save process (I use at the moment
  https://addons.mozilla.org/en-GB/firefox/addon/file-backups/
- or forced to install a 100 MB blurb of java-script based local server
  to run TiddlyWikiDesktop

The bitter irony of the situation is, what still works more-or-less painless
is to place your TiddlyWiki into the cloud. Yikes, here we go.
2018-10-19 16:19:24 +02:00
572bd38fec DummySessionConnection: produce a simple population diff message
seems to work surprisingly well...
the diff application poceeds in the GUI up to the point
where the TrackPresenter need to be inserted into a two-fold display context
2018-10-15 02:54:42 +02:00
de5f0b85d4 DummySessionConnection: new tab in the TestControl dialog box
...to trigger the new fake-functionality
2018-10-14 23:59:35 +02:00
77902d54a6 DummySessionConnection: prepare schaffolding for fake-commands (see #1042)
To drive the timeline display in the UI ahead, the plan is to have
a faked action, which injects dummy population diff messages into the GUI,
resulting in the build-up of a typical simple session timeline
2018-10-14 17:24:13 +02:00
67cccbdc5d Timeline: actually accept and install the TimelineWidget
As starting point, provide an empty placeholder widget to fill the void
2018-10-14 03:48:39 +02:00
6e18452c37 Timeline: arrange for a tabbed notebook to hold the timeline widgets
...and remove all the leftover test and research code from 2016
which was archived to /research some days ago
in 3f87ef43ec
2018-10-13 21:56:36 +02:00
202b1e4dbd Timeline: implement handling of INS verb to create new Timeline
decision: for now we will represent *every* Timeline present in the Session.
Later it would also possible to skip some representation; however we'd need
a way to store such presentation state such that we'd be able to get at this
persisted stat right at this point here, when processing the Diff.
2018-10-13 03:47:31 +02:00
bfca473dce Timeline: decide upon the diff format expected for creating a timeline
other than the regular way of building an object,
we do expect a minimal structure to be sent right within the INS message.

Rationale: the standard way would allow for too much leeway and created
unwanted intermediary states. The non-standard way decided upon here
is well within the limits of our diff language
2018-10-13 02:46:09 +02:00
edf577187b Timeline: now able to define delegating diff mutation binding 2018-10-13 00:25:51 +02:00
a77ecb6d5d change util::sanitise to filter out '
Only reatain chars, numbers and -_.+$()@
Allowing the appostroph seems entirely random and unjustified here
2018-10-12 23:45:49 +02:00
d2309f003d fix an off-by one, spotted by chance 2018-10-12 23:43:36 +02:00
fa6ba76f85 investigate insidious ill-guided conversion
As it turns out, using the functional-notation form conversion
with *parentheses* will fall back on a C-style (wild, re-interpret) cast
when the target type is *not* a class. As in the case in question here, where
it is a const& to a class. To the contrary, using *curly braces* will always
attempt to go through a constructor, and thus fail as expected, when there is
no conversion path available.

I wasn't aware of that pitfall. I noticed it since the recently introduced
class TimelineGui lacked a conversion operator to BareEntryID const& and just
happily used the TimelineGui object itself and did a reinterpret_cast into BareEntryID
2018-10-12 23:42:56 +02:00
e81b0592d3 TreeMutator: combine no-op layer with selective other diff binding
...and complete unit test coverage.
This is complex stuff and we'd better be careful it actually works
2018-10-12 02:05:11 +02:00
0d5f29446b TreeMutator: provide no-op implementation
how to further your career with eight simple steps
2018-10-12 01:07:13 +02:00
fb93e349da TreeMutator: conjure up a black hole mutator
...which is a somewhat involved version of /dev/null
2018-10-11 23:56:33 +02:00
82321a7594 Timeline: draft solution how to delegate to the actual TimelineWidget
Problem is, the InteractionDirector, being the representation of the model root,
needs to manage and maintain the collection of "timelines". However, these
can not be widgets, rather, they need to attach to widgets living within
the GUI widget structure proper, i.e. within the TimelinePanel

proposed solution is to build a smart handle based on WLink,
but also delegating the DiffMutable interface
2018-10-11 17:21:47 +02:00
b65db50666 Timeline: some considerations regarding timeline slave display (#1083) 2018-10-11 14:29:55 +02:00
2adcabbef5 Timeline: draft the root attachment point where timelines are created by diff
This involves a fundamental decision about how to build structures in the Lumiera UI:
They shall be solely created in response to diff messages. Which leads us to
introduce a new (and quite challenging) concept: the »DiffConstituent«
2018-10-10 05:45:46 +02:00
9894542bf9 Introduce predefined constants for magic IDs in UI communication
...these magical strings are already spreading dangerously throughout the code base


PS: also fixup for c6b8811af0  (broken whitespace in test definition)
2018-10-08 05:00:06 +02:00
08ed6e1ee8 Timeline: building the layout and control structure (#1016)
This marks start of actual work on this fundamental task.

Extensive planning from 2016 is available, together with an almost
complete diff binding for the entities involved into timeline display.
2018-10-08 02:27:28 +02:00
3f87ef43ec ...tidy.up: preserve the Gtk::Canvas experiment (see #1020)
Turning this investigation experiment from 2016 into a stand-alone Gtk application.
Using the research folder as final disposal site for now...
2018-10-07 17:31:49 +02:00
76dd4fb5dc ...tidy.up: prepare for working on the timeline display
''a new hope''

This was quite a long way until we're back at the point of
re-building the timeline anew.

Stash the canvas research code to make room for new things to come
2018-10-07 03:44:00 +02:00
cd557f50ec DemoGuiRoundtrip: successfully completed (closes #1999) 2018-10-06 17:42:22 +02:00
e8931bf4bf NotificationDisplay: react on changes of the error state
this turned out to be more tricky than expected.
When we initially configure the UI and invoke this->show_all(),
seemingly some draw-callbacks will be scheduled into the event loop.
Just set_visible(false) on the relevant buttons directly after that call
will have no effect (since the widget is still hidden at that point anyway,
it is not yet mapped and realised).

Thus we need to schedule a callback with the Glib::signal_idle(),
so our state detection runs after the initial mapping of the UI


NOTE: there is a minor itch, which I don't address right now:
when adding the error state and thus revealing the additional buttons,
the error log grabs some additional horizontal space, even while there
would be ample space for the additional buttons within the button bar.
When the error state is cleared and the buttons thus hidden again,
the additional horizontal space is dropped and the error log gets
narrower. Probably we'd need some special GTK call to re-allocate
the required space properly
2018-10-05 18:26:26 +02:00
12344ae9d8 NotificationDisplay: add an Error-State and implement signal to trigger on change
this is more or less gratitious functionality for now,
yet I consider it a proof-of-concept
2018-10-05 15:59:21 +02:00
33af82cf73 NotificationDisplay: now responding to the "Flash" message on UI-Bus
solved by temporarily adding a CSS class.
Mostly this was an issue of writing the Stylesheet properly.

Hint: use the GTK+ inspector, i.e. run with

GTK_DEBUG=interactive target/lumiera
2018-10-05 05:36:53 +02:00
e573d3cc96 StyleCSS: add alternative stylesheet to be comined with the system theme (#1170)
Even while we (still) have the goal to ship our own stylesheet and provide
the typical subdued media-aplication look, right now this porting and styling effort (#1023)
is unfinished and handled with rather low priority (writing code is more important
than toying with styles and looks).

This alternative stylesheet is meant to be used with a typical "light" desktop theme.
We'll add just the bare minimum of definitions to make lumiera work well in that setup.
And right now, I'll use that setup to continue with my development work
2018-10-05 03:25:50 +02:00
b7180735f9 StyleCSS: abandon using a theme engine
In GTK-2 you'd always use a theming engine.
During the transitional period, GTK-3 followed that path,
but at the point when the new CSS based system was mature enough,
this approach was discouraged, since it means to ship additional
executable code and defeats the purpose of configuring the look
of the application through one coherent set of rules.

As it turns out, debian continued to ship the 'adwaita' for some
extended transitional period, but in Stretch it is gone, which broke
our half-way ported stylesheet.

This changeset removes the use of a theming engine, and fixes tha
basic look by adding the background-color: inherit, which pushes aside
many (but not all) of the default theme definitions.

However, our stylesheet remains mostly broken and TODO for now
2018-10-05 00:29:48 +02:00
fb4d9be2b4 draft generic decorator to make a widget flash
not finished, having problems with Lumiera's stylesheet
2018-10-05 00:16:45 +02:00
5aa28626ad NotificationDisplay: function to demote error entries into warnings
...and remove them from the mark-index for special handling
2018-10-03 19:33:28 +02:00
e9527d6304 NotificationDisplay: proper handling of marks at insert position
Basically we create a pair of marks, with left/right gravity and then
inject the content between. Unfortunately, when the insert position
is the very end of the buffer (which it always is), this trick
leads to nesting the marked regions into each other.

As a remedy, we first insert the trailing newline,
and then attach the insert position one step before
2018-10-03 19:13:39 +02:00
4635d18265 NotificationDisplay: draft function to retain only the errors
discard all other info log messages and retain only the entries marked as error.
This is also a proof-of-concept regarding position bookmarks and markup.

Implemented by populating a new buffer and swapping it into place.
2018-10-03 17:50:20 +02:00
c6b8811af0 Library: utility to interpret a text as bool value (yes/no)
...also fixes the problem with the "expand" mark in DemoGuiRoundtrip
2018-10-03 04:43:16 +02:00
7655960b23 Fix Zombie invocation in GUI shutdown (closes #1178)
== possible Scenario ==
 1. Gui: sigTerm invoked
 2. last Subsystem -> cleans all remaining Subsy entries
 3. main-Thread wakens
 4. leaves main() und undloads the GUI plug-in
 5. which destroys the `DependencyFactory<LocationQuery>` placed in static memory
 6. the Gui-Thread returns from sigTerm()  and invokes `~UiManager()`
 7. which indirectly deregisters through `InteractionDirector` the `LocationQuery` Service
 8. `DependInject::Service::shutdown()` grabs the Lock ==> **BOOM**

== Solution ==
Ensure all dtors of the UI backbone are invoked ''prior'' to calling sigTerm()
2018-10-02 02:45:01 +02:00
4e94dfd4d9 FailureHandling: improved ZombieCheck
now capturing the Zombie's ID

==> surprise, its ClassLock<gui::interact::LocationQuery>
2018-10-01 05:51:21 +02:00
70c8718258 FailureHandling: rectify shortcomings in Proc-Command error handling
and especially our provisional dummy code to execute some commands "right here"
should also check and raise captured exceptions from command invocation
2018-10-01 04:09:45 +02:00
77c9a6a1da FailureHandling: investigate crash in emergency shutdown
As it turns out, several problems reinforce each other
- lumiera error does not properly propagate the cause message
- our test/dummy code does not check the ExecResult
- thus the exception is detected rather accidentally, when entring the next sync/wait state
- emergency shutdown is chaotic in its very nature (this is well known...)
- but especially triggerShutdown is not airtight and might die...
- causing the shutdown to hang....

And last but not least, a ZombieCheck tripwire got triggered,
but unfortunately I was unable to get hold of the zombie iteself
2018-10-01 04:09:45 +02:00
23430f8800 NotificationDisplay: fix improper state mark for "expand" (WIP)
test_meta_markAction always produces a state mark with payload type string.
However, the model::Tangible expects a bool payload when handling the "expand" mark.

- add diagnostics to lib::variant to indicate expected and actual payload type
- attempt to fix with boost::lexical_cast; this is insufficient, since
  you'd expect such a function to understand "true" and "false" etc.

Moreover, raising this exception causes emergency shutdown, which
flounders due to triggering a ZombieCheck. Interesting.
2018-10-01 00:47:19 +02:00
f9c6a49b9b NotificationDisplay: implement reset/clearAll 2018-10-01 00:47:19 +02:00
f97beaa774 GuiNotification: implementation complete (closes #1047)
The very backbone structure of the Lumiera UI, the UI-Bus is now fully defined
and proven to be operative, including asynchronous dispatch of messages
an a generic notification mechanism
2018-10-01 00:46:22 +02:00
5fd3fb3d7b DemoGuiRoundtrip: first successful complete roundtrip GUI->Proc->GUI (see #1099)
A communication chain, triggered from a button in a non-modal dialog box,
passing invocation into another thread, dispatched by the ProcDispatcher,
then again passing thread boundaries to push a response back into the UI.

This is a milestone, and integrates several components built during the last years.
2018-09-29 17:34:25 +02:00
abfb897336 DemoGuiRoundtrip: now invoke the Proc-Layer commands from within the UI dialog 2018-09-29 15:23:47 +02:00
e54556f565 DemoGuiRoundtrip: draft mock commands to be invoked
this would be the first half of the roundtrip, the call UI -> Proc
2018-09-29 13:37:48 +02:00
6b941b2c1e TestControl: retrieve action arguments from the dialog controls
...and this also demonstrates how action code will typically be arranged within such a dialog page
2018-09-29 01:26:35 +02:00
10b9abd79b TestControl: build the necessary control widgets
- a text input field
- a trigger to invoke the showInfo function on GuiNotification
- triggers to send state mark messages via GuiNotification into the UI-Bus
- a combo box to define the action-ID within those state mark messages

With these controls, it should be possible to execute all the variations
of the Tangible element protocol and verify the respective behaviour
has been coded up properly within the receiving ErrorLogDisplay widget

Note the key point (and the next step to code up) is for #1099 to
invoke a dummy/demo command in Proc-Layer, which in turn pushes an
reaction via the GuiNotification facade back into the UI asynchronously...
2018-09-27 04:15:27 +02:00
77980ef024 TestControl: the first tangible UI feedback caused via UI-Bus (see #1099)
wrap up the helpers and wire the connection to the UI-Bus.
Then attempt a direct invocation, still within the GTK thread.

While this might seem as just some silly experiment, in fact it is
*** THE FUCKING FIRST TIME to transmit a visible action to a real widget ***

this links together and integrates various efforts achieved during the last years
2018-09-26 17:17:59 +02:00
74f3ab3932 TestControl: concept draft how to simplify building notebook widgets
Gtk::Notebook is a quite powerful container foundation to build complex dialog widgets with multible pages on tabs.
Hower, the construction, wiring an setup is notoriously tedious, due to the repetitiveness
and the sheer amount of child widgets spread over various pages.

This design draft is an attempt to mitigate the required boilerplate, without
overly much obscuring the structure. The basic idea is to package each page into
a locally defined child struct, which is actually heap allocated and managed automatically.
This way, each child page gets its own namespace, and wiring to other components
is made explicit by passing named ctor arguments -- while the overall structure
of building and wiring of widgets stays close to the habits of Gtkmm programming.
2018-09-26 15:47:39 +02:00
0c082361f3 TestControl: hooked up a simple child-dialog (see #1174)
...which gives us already the base functionality required to run the first tests

- can be triggered from the Help menu
- non-modal dialog (Gtk::Dialog)
- attached as child / slave-Window to the current active workspace window
- window manager hint to keep it on top
- have a notebook control within the dialog
- attached (passively) to the UI-Bus
2018-09-25 06:11:38 +02:00
7f760d77e5 TestControl: prepare a location in the UI for test and diagnostics (#1074) 2018-09-25 05:31:41 +02:00