Christian Hergert
7587996279
editable: add enable-undo property
...
This property is intended to be mapped to a GtkText so that undo/redo
support can be used from a number of editable widgets.
2019-11-05 10:27:27 -08:00
Christian Hergert
15b3c0f563
textview: add undo/redo support to GtkTextView
...
This builds upon the GtkTextHistory helper to provide undo and redo support
for the GtkTextView widget and GtkTextBuffer object.
You can undo/redo using familiar shortcuts such as Primary+Z,
Primary+Shift+Z, ad Primary+Y.
Developers that wish to disable undo, should set the
GtkTextBuffer:enable-undo property to FALSE.
You can wrap irreversible actions
gtk_text_buffer_begin_irreversible_action() and
gtk_text_buffer_end_irreversible_action(). This will cause the undo stack
to drop all undo/redo actions and the changes made between them will be
the "initial state" of the buffer.
Calling gtk_text_buffer_set_text() will do this automatically for you.
2019-11-05 09:34:29 -08:00
Christian Hergert
5e341210a1
texthistory: add GtkTextHistory helper
...
The GtkTextHistory helper provides the fundamental undo/redo stack that
can be integrated with other text widgets. It allows coalescing related
actions to reduce both the number of undo actions to the user as well as
the memory overhead.
A new istring helper is used by GtkTextHistory to allow for "inline
strings" that gracefully grow to using allocations with g_realloc(). This
ensure that most undo operations require no additional allocations other
than the struct for the action itself.
A queue of undoable and redoable actions are maintained and the link for
the queue is embedded in the undo action union. This allows again, for
reducing the number of allocations involved for undo operations.
2019-11-05 09:34:29 -08:00
Emmanuele Bassi
3bf9277de6
Revert "Adwaita: radios & checkboxes styling updates"
...
This reverts commit 427b5d187c
.
The commit breaks Adwaita:
Theme parsing error: gtk-contained.css:1191:28-44: No property named "-gtk-icon-effect"
2019-11-04 23:35:49 +00:00
Matthias Clasen
53c9eb5a5b
Move the ifdef to the right spot
2019-11-04 23:24:49 +00:00
Matthias Clasen
6e5da14294
cell text: Handle new pango enum values
...
The PangoUnderline enum grew some new values.
2019-11-04 23:14:44 +00:00
Jakub Steiner
427b5d187c
Adwaita: radios & checkboxes styling updates
...
- port from gtk3
2019-11-04 19:41:58 +01:00
Andy Holmes
44093f4966
stack: return the stack page when adding a child, to ease setting props
2019-11-03 18:05:03 -08:00
Christian Hergert
6d16f7ad35
textview: use g_slice_new0 for proper initial state
...
This fixes the missuse of the GList embedded node for prev/next.
2019-11-01 11:37:07 -07:00
Matthias Clasen
828b58247c
label: Handle new pango attributes
...
overline and overline-color were introduced in Pango 1.45.
2019-11-01 13:01:54 -04:00
Matthias Clasen
de29c3e193
label: Handle insert_hyphens pango attribute
...
This was introduced in Pango 1.44.4.
2019-11-01 13:01:54 -04:00
Matthias Clasen
eaa6301e53
Port the font chooser to just use harfbuzz
2019-11-01 13:01:54 -04:00
Matthias Clasen
19a4e76034
Update the print dialog for headerbar changes
...
This was breaking the templates test.
2019-11-01 12:51:42 -04:00
Benjamin Otte
4b41dd4eb1
Merge branch 'otte/for-master' into 'master'
...
Otte/for master
See merge request GNOME/gtk!1153
2019-11-01 14:13:28 +00:00
Matthias Clasen
745a701b3d
inspector: Add a switch for fallback rendering
2019-10-30 22:31:47 -04:00
Matthias Clasen
03738634ac
inspector: Remove fallback from logs
...
There are no logs that this debug flag produces.
2019-10-30 22:31:47 -04:00
Benjamin Otte
4cca27a7af
builder: Allow parsing G_TYPE_BYTES from strings
...
Just create a bytes containing the literal string.
2019-10-29 04:56:19 +01:00
Benjamin Otte
553a9c292d
togglebutton: Don't emit clicked during set_active()
...
set_active() is meant to set the state of the property, which happens
during setup.
The clicked signal is emitting events from user actions.
It is impossible to use Togglebuttons for MVC applications as long as it
does that.
2019-10-29 04:56:19 +01:00
Benjamin Otte
abd4754648
messagedialog: Remove useless GTK_TYPE_BUILDABLE interface
...
It was just chaining up.
2019-10-29 04:56:19 +01:00
Matthias Clasen
0284d40e24
window: Unrealize renderer before children
...
Unrealize the GSK renderer before destroying children.
This makes the renderer drop any texture caches that
it might have, so that we don't needlessly download
them when releasing the widget-side holder objects.
As a fortunate side effect, this fixes crashes on
exit with GtkGLArea-containing windows under Wayland.
2019-10-22 20:28:28 -04:00
Timm Bäder
44137574a1
inspector: Fix expander arrow node names
...
They vanished after the GtkExpander node rename
2019-10-22 09:37:08 +02:00
Timm Bäder
6b07ce2b13
filechooserwidget: Remove unused function parameter
2019-10-22 09:37:08 +02:00
Timm Bäder
008e8076a1
filechooserwidget: Inline function into only caller
2019-10-22 09:37:08 +02:00
Timm Bäder
2cd4b255cd
placesview: open address popover upwards
2019-10-22 09:37:08 +02:00
Timm Bäder
11a38dd455
entry: Remove unused function
2019-10-22 09:37:08 +02:00
Timm Bäder
dfcc40ef9a
text: Propagate pango attributes to placeholder
...
Not sure if this is really always wanted or whether we need to filter
the attributes, or even create a separate property for them.
2019-10-22 09:37:08 +02:00
Timm Bäder
1882034323
text: Fix _set_attributes docs
...
The list is nullable.
2019-10-22 09:37:08 +02:00
Timm Bäder
aaaa3e141b
placessidebar: Remove some unused members
2019-10-22 09:37:08 +02:00
Timm Bäder
15af87345d
placesview: Use proper setters for properties
2019-10-22 09:37:08 +02:00
Timm Bäder
640db05b18
text: Remove some unused members
2019-10-22 09:37:08 +02:00
Timm Bäder
31ae93475d
text: Fix context menu position
...
Fixes #2209
2019-10-22 09:37:08 +02:00
Timm Bäder
8fc4d229da
text: Inline function into only caller
2019-10-22 09:37:08 +02:00
Timm Bäder
a62efb8257
text: Remove gtk_text_get_text_allocation
...
We can just replace that with get_width/get_height everywhere.
2019-10-22 09:37:08 +02:00
Timm Bäder
acf927fe14
text: Don't destroy pango layout in size_allocate
...
It's not needed.
2019-10-22 09:37:08 +02:00
Timm Bäder
ca71340c6b
Adwaita: Fix menubutton in headerbar margins
...
Add the margins to the menubutton and not the button inside the
menubutton. This way popovers properly point to the inner button again
instead to somewhere 6px off.
2019-10-22 09:37:08 +02:00
Timm Bäder
350495cf1c
Adwaita: Remove padding from popover.menu
...
The padding belongs to the contents subnode in this case.
2019-10-22 09:37:08 +02:00
Timm Bäder
426d5ca1b7
filechooserwidget: Add .menu to right-click popover
...
Make it look like the other menus.
2019-10-22 09:37:08 +02:00
Timm Bäder
aaae141687
filechooserwidget: Focus the searchbar when searching
...
This code path is taken if the search is already active, so focus the
search entry.
2019-10-22 09:37:08 +02:00
Timm Bäder
4826255ea3
filechooserwidget: Rename a callback
2019-10-22 09:37:08 +02:00
Timm Bäder
9ba08a09cb
shortcutlabel: Inherit from GtkWidget
2019-10-22 09:37:08 +02:00
Timm Bäder
bb2c68452c
shortcutlabel: Inherit from GtkWidget
2019-10-22 09:37:07 +02:00
Timm Bäder
23be10cf69
searchentry: Make the text entry expand
...
Fixes the broken layout.
2019-10-22 09:37:07 +02:00
Timm Bäder
17a111968b
text: Remove an unnecessary queue_draw() call
2019-10-22 09:37:07 +02:00
Matthias Clasen
1dd55ed600
Drop gtk_icon_info_new_for_pixbuf
...
It is better to keep icon infos as something you
only get from the icon theme.
2019-10-18 08:53:23 -05:00
Matthias Clasen
416b2cd18d
Move symbolic pixbuf recoloring code
...
This function is better off next to the other
symbolic png code in gdkpixbufutils.c.
2019-10-18 08:53:23 -05:00
Matthias Clasen
15dffb47dc
icon theme: Drop icon_file from GtkIconInfo
...
It is not used anymore.
2019-10-18 08:53:23 -05:00
Matthias Clasen
20e70a78c4
Drop another use of icon_file
...
Stop using icon_file when loading symbolic svgs.
2019-10-18 08:53:23 -05:00
Matthias Clasen
e190b4536a
Drop another use of icon_file
2019-10-18 08:53:23 -05:00
Matthias Clasen
3c219bf968
Add another symbolic pixbuf helper
2019-10-18 08:53:23 -05:00
Matthias Clasen
c3de5e3624
Avoid a use of icon_file
...
This is a step towards getting rid of GtkIconInfo->icon_file.
2019-10-18 08:53:23 -05:00