Přemysl Eric Janouch
0d0ac40f96
sdtui: handle input field overflows reasonably
2021-11-04 11:43:18 +01:00
Přemysl Eric Janouch
b36f185426
Fix various macOS-related/found issues
...
Even though this software isn't very useful on that system either,
due to its lack of PRIMARY.
2021-11-02 17:04:37 +01:00
Přemysl Eric Janouch
ecab86966f
sdtui: make M-Tab go to the last chosen dictionary
2021-10-30 10:18:20 +02:00
Přemysl Eric Janouch
e383a50af7
Add clang-format configuration, clean up
2021-10-30 03:02:33 +02:00
Přemysl Eric Janouch
c0a094e473
sdgui: load dictionaries in parallel, as sdtui did
...
Also, resolve some use-after-frees in GTK+.
2021-10-16 08:34:37 +02:00
Přemysl Eric Janouch
f147b54393
sdgui: load dictionaries from sdtui configuration
2021-10-16 06:46:44 +02:00
Přemysl Eric Janouch
573554b9de
sdgtk -> sdgui, improve build, mention in README
...
It's finally not horrible.
2021-10-15 12:09:37 +02:00
Přemysl Eric Janouch
9d7bc2a839
sdgtk: add and use a custom listview widget
...
Nothing in GTK+ appears to be suited for what are virtually infinite
lists. Our workaround with GtkLabel and GtkScrolledWindow has been
heavily suboptimal and needs to be replaced.
Use Pango directly to handle our relatively simple needs.
Upgrades:
- the widget can be scrolled,
- keywords are repeated for each definition line,
- definition lines are now wrapped, and support 'g' and 'x' fields.
Downgrades:
- text can no longer be selected, so far.
2021-10-15 11:46:09 +02:00
Přemysl Eric Janouch
627c296057
query-tool: support more field types
...
Add options to format the output for the terminal, or IRC messages.
Changed the output format to separate dictionary name with a tab,
so it's now rather similar to tabfiles.
2021-10-12 02:38:40 +02:00
Přemysl Eric Janouch
e2790b42f3
sdtui: fix introductory message centring
2021-10-11 21:15:11 +02:00
Přemysl Eric Janouch
9b220b74cc
sdtui: minor rendering clean-up
2021-10-11 21:15:11 +02:00
Přemysl Eric Janouch
6f569e076e
sdtui: further improve the XML mangler
...
Comments should be more or less reliably handled by GMarkup now.
2021-10-11 06:32:00 +02:00
Přemysl Eric Janouch
e57751fe0e
sdtui: skip keywords in XDXF
2021-10-11 02:43:34 +02:00
Přemysl Eric Janouch
4d6cd247cb
sdtui: implement elementary XDXF display
...
We're lacking word wrapping, but it's more or less usable.
2021-10-11 02:43:30 +02:00
Přemysl Eric Janouch
16d6eaf012
sdtui: support <b>/<i>/<u> in Pango entries
2021-10-10 06:13:49 +02:00
Přemysl Eric Janouch
bc939712cb
sdtui: lay the groundwork for formatted entries
2021-10-10 06:13:49 +02:00
Přemysl Eric Janouch
6f7fbbb438
sdtui: keep the per-ViewEntry GPtrArrays
2021-10-10 06:13:48 +02:00
Přemysl Eric Janouch
3c87b95c31
Make Tab put the current definition into search
...
Moving some X11-only code out.
2021-10-06 13:44:54 +02:00
Přemysl Eric Janouch
2b5eb86a9f
sdtui: enable styling of defocused selected rows
...
The defaults are unaffected, the row is always reverse, like it used to.
Having the deselected row just be underlined seems sensible.
It isn't currently possible to change /just/ the foreground or
the background colour of the selection, due to how ncurses works
with colours.
Bumped termo to enable requesting the appropriate events.
2021-07-03 11:44:01 +02:00
Přemysl Eric Janouch
85ca0c5857
sdtui: normalize whitespace in clipboard input
2021-07-03 11:36:46 +02:00
Přemysl Eric Janouch
fda956093c
Update copyright years within the program
2020-09-07 19:05:16 +02:00
Přemysl Eric Janouch
bbe22712fe
Enable switching among more than 10 dictionaries
...
Ctrl + PageUp/PageDown/Left/Right now change the active tab.
2020-09-02 16:29:59 +02:00
Přemysl Eric Janouch
37bf8ee648
Name change
2020-09-02 16:27:45 +02:00
Přemysl Eric Janouch
fcc0c3ef2d
Fix an unimportant memory leak
2018-09-23 11:45:23 +02:00
Přemysl Eric Janouch
2efaed1a56
Implement the INCR ICCCM selection mechanism
...
xcb_get_property is now also called with a length that is a multiple
of four so that we advance the offset properly.
Some cleanup.
Selection code should work pretty well by now. The amount of code
supporting it has more than doubled since GTK+.
2018-09-23 11:45:13 +02:00
Přemysl Eric Janouch
86417d512b
Re-shuffle code, no functional changes
2018-09-23 06:38:03 +02:00
Přemysl Eric Janouch
942bda7db4
Use XCB and SelectSelectionInput instead of GTK+
...
As it happens, there is no real need to constantly poll for changes,
since XFixes can inform us of updates as they happen.
With GTK+ gone we've got dependencies and error handling under control.
XCB is a truly awful thing to learn, though.
Our method will never work on Wayland or Windows, so we don't miss out
on anything by abandoning the huge toolkit.
2018-09-23 06:38:03 +02:00
Přemysl Eric Janouch
b0d3b2dcb5
Strip whitespace from clipboard contents
2018-06-30 13:23:30 +02:00
Přemysl Eric Janouch
e5faed57c2
Relicense to 0BSD, update mail address
...
I've come to the conclusion that copyright mostly just stands in the way
of software development. In my jurisdiction I cannot give up my own
copyright and 0BSD seems to be the closest thing to public domain.
The updated mail address, also used in my author/committer lines,
is shorter and looks nicer. People rarely interact anyway.
2018-06-24 05:23:31 +02:00
Přemysl Eric Janouch
80306c5779
Skip combining marks in the editor
...
For slightly more correct Unicode handling.
2017-06-27 20:03:38 +02:00
Přemysl Eric Janouch
3067e15929
Fix and update LICENSE
2017-02-03 23:14:34 +01:00
Přemysl Eric Janouch
77918d8a8c
Fix some character width counting
2016-10-22 23:38:00 +02:00
Přemysl Eric Janouch
fc395d4068
Fix mouse clicks on full width characters
2016-10-22 23:29:29 +02:00
Přemysl Eric Janouch
6155c9bf91
Try to make the view full
2016-10-22 23:10:58 +02:00
Přemysl Eric Janouch
dcfc9bfd22
Disallow scrolling down too much
...
The ability to scroll past the end was rather unusual.
You can still achieve that by searching and resizing the window now.
2016-10-18 20:46:51 +02:00
Přemysl Eric Janouch
e06d9c9f71
Tiny enhancements and cleanups
2016-10-18 20:46:38 +02:00
Přemysl Eric Janouch
6f91f8131a
Microoptimization
...
It hurts me to see wasted mallocs.
2016-10-18 19:06:51 +02:00
Přemysl Eric Janouch
a63db9d978
Fix regression in GLib message handler
2016-10-12 22:21:15 +02:00
Přemysl Eric Janouch
1f811d903e
Don't increment the result from GUINT_TO_POINTER
...
Increment the argument instead.
2016-10-08 09:21:54 +02:00
Přemysl Eric Janouch
a7068157f2
Parallelize dictionary loading
...
It gives me about 2.5 times speed-up on a 4-core CPU.
It could be even better and I mainly blame GLib.
2016-10-08 03:39:06 +02:00
Přemysl Eric Janouch
36236955e5
Simplify, optimize terminal output
...
Finally getting rid off app_add_utf8_string().
Just like in nncmpp, the dependency on ncurses is now a bit narrower.
2016-10-07 18:35:27 +02:00
Přemysl Eric Janouch
930ce8a944
Fix regression in locale support
2016-10-07 17:26:56 +02:00
Přemysl Eric Janouch
ee37895206
Update documentation
2016-09-28 16:11:56 +02:00
Přemysl Eric Janouch
38b463c883
Move the -w switch to the configuration file
...
Update README accordingly.
Woo, I get to remove code.
2016-09-28 06:01:13 +02:00
Přemysl Eric Janouch
b3458d84a0
Handle mouse clicks on dictionary names
2016-09-28 05:27:53 +02:00
Přemysl Eric Janouch
1f60d096ea
Fix mouse in the search bar
2016-09-28 05:27:22 +02:00
Přemysl Eric Janouch
30345ec8d4
Show all dictionaries in the header
...
Make the style of the active dictionary's name configurable.
2016-09-28 05:05:24 +02:00
Přemysl Eric Janouch
4f0a47d5f7
Allow loading multiple dictionaries
...
They can also be specified in the configuration.
They can be switched between using Alt+<number>.
2016-09-28 04:30:15 +02:00
Přemysl Eric Janouch
f453b9dd43
Extract get_xdg_config_dirs()
2016-09-28 04:16:00 +02:00
Přemysl Eric Janouch
021fdcc97c
Use GLib booleans
2016-09-28 03:05:39 +02:00