-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gtk+3 port #42
Open
GeorgesStavracas
wants to merge
12
commits into
julius-speech:master
Choose a base branch
from
GeorgesStavracas:wip/gtk3-port
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Gtk+3 port #42
GeorgesStavracas
wants to merge
12
commits into
julius-speech:master
from
GeorgesStavracas:wip/gtk3-port
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GeorgesStavracas
force-pushed
the
wip/gtk3-port
branch
3 times, most recently
from
September 6, 2016 16:26
8050816
to
831f94d
Compare
When compiling Julius with Gtk+ support for visualization, it needs some structures from libjulius that are conditionally compiled based on VISUALIZE define. To try and define it at compile time, Julius uses --enable-visualize flag. Libjulius, however, doesn't use that flag and ends up not defining this variable, which causes compilation errors with --enable-visualize. Fix that by adding a configure flag for --enable-visualize.
GTK is now called Gtk+, and it works on Wayland as well.
Just like libjulius received an --enable-visualize flag, this commit readds Gtk+ support in Julius by properly checking for Gtk+ with pkg-config. Warning: this commit makes Julius unbuildable. The build issue will be fixed in the next commit.
After properly reintroducing the --enable-visualize flag to configure, this commit updates the code of visual.c to work on Gtk+ >= 3.16. This rework involved the following things: - Drop GdkGC usage and use GtkStyleContext instead - Drop GdkPixbuf and use cairo_t - Use CSS styles rather than GdkColors - Adapt some other minor things to work with new Gtk+ internals - Add a headerbar to the window
By moving the bottom texts to labels, we're able to simplify the drawing code a little bit and completely get rid of the draw_background() function.
Instead of using a set of pre-defined zoom levels that are not based on the visible area of the window, the zooming action was very confusing and had some weird behaviors, e.g. when zooming 8x and the tree actually shrinks. Fix this misbehavior by adding a set of buttons at the headerbar and using relative zooming rather than absolute zooming.
Using CALLBACK_EVENT_SEGMENT_END doesn't give us a valid backtrellis pointer and causes segmentation faults when searching.
To make it more visually appealing, do the following changes: - Improve the side widgets to be more like a list. - Move the search bar to the header. - Reorganize side widgets.
For the sake of sanity, the drawing code omits some words from being rendered, otherwise it'd be too hard to understand the backtrellis. The problem with that approach is that we don't know where some branchs point to, since some words are not rendered. Fix that by showing a sidebar with the words, in the order they're displayed in the graph.
The view area is the most important piece of graph here, thus we should make it the most visually recognizable section of the window.
To improve the rendering and ease the visualization of the word trellis, this patch adds the following changes: - Render small dots at the end of each line - Show horizontal stripes, so we can easily detect which word each line is related to.
Instead of always showing the GUI when compiling with visualization support, add a new flag '-visualize' so we can still run Julius like before (without an actual user interface).
GeorgesStavracas
force-pushed
the
wip/gtk3-port
branch
from
July 24, 2017 18:53
d921616
to
412f7ad
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to port the word trellis visualizer to Gtk+ 3. Comments are more than welcomed.
[#41]