Commit Graph

1239 Commits

Author SHA1 Message Date
Matthias Clasen
029a84aa74 Fix fallout from the show-close-button rename
I had overlooked ui files. We should really
validate those during build.
2017-12-08 11:29:14 -05:00
Matthias Clasen
fec0dc2b13 Rename GtkHeaderBar::show-close-button
It is about all window buttons, so rename it to ::show-title-buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=779862
2017-12-07 22:37:06 -05:00
Matthias Clasen
62f1695cb3 Move editing to button release
This will free up primary button press for drags.
2017-12-07 21:25:44 -05:00
Matthias Clasen
b6f33919b7 Make sure stopped spinner stay visible
This demo needs stopped spinners to be visible,
so the user can interact with them.
2017-12-06 23:49:48 -05:00
Matthias Clasen
79ddb14404 Add a Cut menuitem to the dnd demo 2017-12-06 23:36:35 -05:00
Matthias Clasen
e104cf012d More work on the dnd demo
Still no dnd in the drag-and-drop demo...
2017-12-06 23:10:56 -05:00
Matthias Clasen
2dae71c619 Add some copy-paste for widgets demo
Not sure this is quite right yet.
2017-12-05 17:45:39 -08:00
Matthias Clasen
2a49371e07 Start a dnd demo
Nothing to see yet.
2017-12-05 16:22:06 -08:00
Benjamin Otte
4658d7ea54 dnd: Remove x/y coordinates from drag-data-received
This is in preparation of using input streams to show that these
coordinates aren't needed most of the time and can otherwise be saved
during GtkWidget::drag-drop.
2017-12-05 05:29:00 +01:00
Timm Bäder
1ed364a000 widgetbowl: Add some more widget types 2017-12-04 12:24:33 +01:00
Benjamin Otte
c8edc6ed58 icon-browser: Port to new clipboard 2017-12-03 05:46:49 +01:00
Benjamin Otte
c833b47b21 gtk-demo: Port to GdkClipboard 2017-12-03 05:46:49 +01:00
Benjamin Otte
f53848c360 textview: Redo clipboard handling
Instead of using GtkClipboard and handling everything ourselves, we now
put GtkTextBuffer into the GdkClipboard and register (de)serializers for
text/plain.
2017-12-03 05:46:48 +01:00
Benjamin Otte
c146132a4a gtk-demo: Port clipboards example to new clipboard 2017-12-03 05:46:48 +01:00
Benjamin Otte
a59572f96d widget: gtk_widget_get_clipboard => gtk_widget_get_old_clipboard
Just rename the function, so the previous one can be used for the
new clipboard.
2017-12-03 05:46:47 +01:00
Matthias Clasen
4930153413 Finish conversion of pixbuf cell renderer icon size
Change the name of the property from stock-size to icon-size,
and make it an enum property instead of uint. This makes it
impossible to specify invalid numeric values in ui files, and
at the same time makes it possible to refer to the existing
values by their nick.

Fix up the callers.
2017-12-01 10:36:17 -05:00
Matthias Clasen
b9035fc3a6 widget-factory: Fix up icon size handling
Make the icon grid on page 2 work with our new
approach to icon sizes.
2017-12-01 10:29:53 -05:00
Timm Bäder
7b60ee9316 widgetbowl: Only use one widget type
Every added widget having a separate random widget type makes it useless
to use the widgetbowl demo for any sort of performance comparison.
Instead. use only one widget type for all the moving children but make
that changable.
2017-12-01 07:33:52 +01:00
Matthias Clasen
b65f871929 Use a texture instead of a pixbuf in gtk_render_icon
This gets rid of more GdkPixbuf in the API.

Update all callers.
2017-11-29 23:30:47 -05:00
Matthias Clasen
0b39631464 textview: Replace pixbufs by textures
This affects a few apis, such as gtk_text_iter_get_pixbuf,
gtk_text_buffer_insert_pixbuf and GtkTextBuffer::insert-pixbuf,
which have all been replaced by texture equivalents.

Update all callers.
2017-11-29 23:22:13 -05:00
Matthias Clasen
c0d6fd4f86 icon-browser: Stop using gtk_drag_source_set_icon_pixbuf
We can just use gtk_drag_source_set_icon_name.
2017-11-29 20:01:32 -05:00
Benjamin Otte
fc2ce5a925 gdk: Make GdkContentFormats immutable 2017-11-20 23:13:10 +01:00
Benjamin Otte
9a6ec4e959 contentformats: Rename GtkTargetList
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Benjamin Otte
c863ac0f90 dnd: Remove GtkTargetEntry and GtkTargetFlags
warning: We don't do any same-app checks anymore so you currently can
copy local data into external apps.

This will be fixed later.
2017-11-20 23:12:33 +01:00
Benjamin Otte
8d7d5343d8 gtk-demo: No need to gdk_flush() here
And if there was a need, GDK should have done it.
2017-11-17 08:36:35 +01:00
Benjamin Otte
3f5178dc21 selection: Remove the info uint
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.

The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
2017-11-16 22:59:43 +01:00
Matthias Clasen
0d23606653 Drop gtk_icon_size_lookup
Add a new, private gtk_image_get_image_size to replace it, and
update the remaining callers in a suitable way.
2017-11-15 14:22:17 -05:00
Matthias Clasen
2301d8d90b enums: Change GtkIconSize values
The new values are the ones we intend to keep. The old ones had
duplicated meanings and nobody knew which one to take.
2017-11-15 14:22:17 -05:00
Matthias Clasen
dbfaa99107 image: Remove icon-size argument from icon setters
Instead, add a function gtk_image_set_icon_size() for the cases where
overriding the icon size is necessary.

Treat icon sizes the same way as pixel sizes, too. So gtk_image_clear()
no longer unsets the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
049cc6aa01 image: Change getters
Instead of returning the icon size with them, make
gtk_image_get_icon_name() and gtk_image_get_gicon() only return the icon
itself.

As a benefit, we can turn them into regular getters that return values
instead of requiring out parameters.

Instead, provide gtk_image_get_icon_size() to query the icon size.
2017-11-15 14:22:17 -05:00
Benjamin Otte
a7754a14b5 toolbar: Remove icon sizes 2017-11-15 14:22:16 -05:00
Benjamin Otte
5a1a11bcde dnd: Make GtkDragDest and GtkDragSource use GtkTargetList
This gets rid of GtkTargetEntry in the API and consistently uses
GtkTargetList.
2017-11-15 19:07:17 +01:00
Benjamin Otte
7efc5a1558 clipboard: Consistently use GtkTargetList
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
2017-11-15 19:07:16 +01:00
Matthias Clasen
08be6651d6 Expand the cursors demo text
Explain what why we show each cursor 4 times.
2017-11-05 11:27:06 -05:00
Benjamin Otte
e6f5085255 gtk-demo: Fix popover positioning in popover test 2017-11-05 15:22:14 +01:00
Benjamin Otte
3a3f73a4dc gtk-demo: Don't use get_allocation()
Use get_width()/get_height() instead.
2017-11-05 15:01:30 +01:00
Benjamin Otte
9b37f5a45f gtk-demo: Update cursors demo
It's all glade-ified, hurray!
It also now properly tests image cursors, named cursors and fallbacks.
I'm not gonna tell how many bugs I found though.
2017-11-05 00:07:18 +01:00
Benjamin Otte
f7646cf541 textview: Remove GdkWindow usage from the public API
A sideeffect is that we don't set the correct parent window on child
widgets anymore, but that is hopefully going to be fixed once we get rid
of child windows completely.
2017-11-04 15:22:25 +01:00
Benjamin Otte
9323d098a6 gdk: Cursors no longer have a display
Change constructors to reflect that.

While doing so, also add a fallback argument to the cursor constructors,
so it is now possible to create cursors with fallback.
2017-11-04 00:07:13 +01:00
Benjamin Otte
bd6b6ed93c gdk: Remove VisibilityNotify events 2017-11-01 22:00:34 +01:00
Julian Sparber
e11e304d10 icon-browser: Centre Copy button in dialog again
This patch moves the "Copy to Clipboard" button into the same container
as the description label, to centre the button regardless of the number
of icons shown in the grid.

https://bugzilla.gnome.org/show_bug.cgi?id=789134
2017-10-31 18:41:55 +00:00
Benjamin Otte
07164e098a window: Turn gtk_window_set_screen() into gtk_window_set_display()
And have a priv->display instead of a priv->screen.

Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
2017-10-31 08:25:37 +01:00
Benjamin Otte
ecd5b399a4 icontheme: Use GdkDisplay instead of GdkScreen 2017-10-31 03:05:55 +01:00
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Benjamin Otte
a2e625692e gtk-demo: Remove calls to gtk_style_context_reset_widgets()
Those calls have been unneeded for a long time - since we gained the
changed signal on the StyleProvider in fact.
2017-10-31 03:05:54 +01:00
Matthias Clasen
d2d8fb0528 icon-browser: Make non-symbolic icons visible again
The commit that added the scalable size to the details dialog
inadvertedly caused all icons to be hidden. No need to do that.
2017-10-25 23:58:09 -04:00
Alexander Larsson
96b04836d8 Drop all uses of GdkPixbufAnimation in the gtk APIs
These are basically animated gifs, and don't fit well in how
modern things animate.
2017-10-23 16:56:49 +02:00
Alexander Larsson
2b194089dd GtkImage: Drop support for storing pixbufs
This drops the pixbuf property and the pixbuf getters. We keep
gtk_image_new/set_from_pixbuf, but these are small helpers that
immediately convert to a surface, and there is no way to later get
back the pixbuf you passed in.

The from file/resource codepaths are also changed to load a surface
instead of a pixbuf.
2017-10-23 15:28:33 +02:00
Matthias Clasen
ff6698cf5f gtk-demo: Use surface apis in the clipboard demo
Stop using gtk_drag_set_icon_pixbuf.
This api is going away.
2017-10-23 05:58:54 +02:00
Carlos Garnacho
ce1cfee48c icon-browser: Remove GtkEventBox from .ui file
The patch adding scalable icons' info was forward ported too much as-is
to master. The event box is both unused and unnecessary here.
2017-10-19 16:13:47 +02:00