Commit Graph

21 Commits

Author SHA1 Message Date
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Timm Bäder
a3bada37fb css-editor: Remove unused if statement
The static local is set to NULL and never set to anything else, so we
never use it anyway.
2017-03-20 15:01:28 +01:00
Benjamin Otte
dbeeaf7de6 cssprovider: Remove GError out argument from load functions
People should use the GtkCssProvider::parsing-error signal instead.
2016-10-17 16:52:05 +02:00
Benjamin Otte
eeb945e4c1 inspector: Widgets update automatically when CSS changes
There's no need to force-invalidate their CSS.
2016-03-11 17:00:41 +01:00
Matthias Clasen
4b5bcdeaa5 inspector: Drop the per-object CSS editor
The global editor is good enough for all uses.
2016-03-06 21:41:46 -05:00
Matthias Clasen
6a67df79a8 inspector: Avoid criticals in the css editro
We can't keep text iters around after text buffer has been
changed. Just clear the list errors when the buffer changes
before we've passed it again.
2015-12-20 14:43:14 -05:00
Matthias Clasen
036ee7a68b inspector: Always underline at least one char
Empty underlines are hard to make out. Since we get somewhat
unreliable section information from the CSS parser, we just
make sure that we always underline at least one character.
2015-11-20 20:59:53 -05:00
Matthias Clasen
ad49103b93 inspector: Show css parsing errors
The squiggly underline is useful, but seeing the error message
is much better, so show it in a tooltip.
2015-11-20 18:18:01 -05:00
Sébastien Wilmet
9d3e9c9375 inspector: remove gtk_text_buffer_get_iter_at_line_index() workaround
The function is now safe to use.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-10-16 08:43:27 +02:00
Matthias Clasen
383d5b137b inspector: Build nonrecursively 2014-11-30 16:11:56 -05:00
Matthias Clasen
fe5f9c560b inspector: Show object title in the css tab 2014-11-22 21:38:47 -05:00
Matthias Clasen
0c02bc4239 Inspector: Use the new monospace support 2014-10-07 00:42:21 -04:00
Matthias Clasen
05a9006715 inspector: Better typography
Use U+201C/U+201D for quoting.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
1041f93f7f inspector: life-cycle fixes
When closing the inspector before the main window, we must take
care to sever all signal connections and weak refs, otherwise
things will go bad when the window is closed later.
2014-09-25 23:05:15 -04:00
Sébastien Wilmet
6525a11b8d inspector: fix a crash in the CSS editor
gtk_css_section_get_end_position() can return a position one byte beyond
the end of the last line.

gtk_text_buffer_get_iter_at_line_index() accepts only valid
line_number/byte_index pairs. Another solution is to make the
GtkTextBuffer function less strict, by returning a boolean if the exact
position was found.

The CSS parser should also be fixed to always return valid positions.
But it's better to have a safety net in the CSS editor, just in case (a
warning could be print).

https://bugzilla.gnome.org/show_bug.cgi?id=735337
2014-08-25 14:25:09 +02:00
Matthias Clasen
0f47ffb6f5 inspector: Set a filename for saving css
This is good practice when using save dialogs.
2014-07-29 13:59:02 +02:00
Matthias Clasen
f8986d9aa7 inspector: Clean up includes
Don't include gtk.h, instead include individual headers.
And include config.h and gi18n-lib.h everywhere.
2014-07-11 23:14:04 -04:00
Matthias Clasen
f6cf7fee73 inspector: Parse custom css with a delay
The CSS editor was feeling a little sluggish, because it was
reparsing and reapplying the CSS on every keystroke. Add a small
delay, to make this feel smoother.
2014-06-03 09:44:28 -04:00
Matthias Clasen
6a9ea3487e inspector: Support saving CSS
We have a file chooser, lets use it.
2014-05-30 20:35:43 -04:00
Matthias Clasen
42dc501133 inspector: Drop unused functions
The entire UI is constructed with templates, so the wrapper
constructors are never called, except for gtk_inspector_window_new,
which gets called from the GTK+ code.
2014-05-15 00:14:37 -04:00
Matthias Clasen
59c9d24bbf inspector: stop being a module
Moving the inspector into libgtk lets use reuse internals without
having to add public API for everything or inventing awkward private
call conventions.

https://bugzilla.gnome.org/show_bug.cgi?id=730095
2014-05-14 21:23:44 -04:00