Commit Graph

55040 Commits

Author SHA1 Message Date
Руслан Ижбулатов
10b2f6540a Fix wrong format strings in various places 2018-06-10 21:20:59 +00:00
Piotr Drąg
ef2daa3bdd Update Polish translation 2018-06-10 15:35:50 +02:00
Piotr Drąg
d8c8a25c2f Update POTFILES.in 2018-06-10 15:19:06 +02:00
Benjamin Otte
a34a5df674 picture: Don't use g_str_equal() with potential NULLs 2018-06-10 02:56:18 +02:00
Benjamin Otte
299e2ed44c docs: Add GtkEventControllerKey to index 2018-06-10 02:35:30 +02:00
Benjamin Otte
4c961349ab dnd: Ref the GdkDrop during the DND operation
It might go away if the DND takes too long otherwise...
2018-06-10 02:35:30 +02:00
Benjamin Otte
b7ecfbce21 quartz: Remove gtkdnd-quartz.c
It shows up in my git diff calls and is completely broken.
2018-06-10 02:33:53 +02:00
Benjamin Otte
40321d331f x11: Remove useless check
The check survived from GTK2 when that function could still return
GdkPixmap and GdkFont objects and was accompanied by this comment:

  /* We may receive events such as NoExpose/GraphicsExpose
   * and ShmCompletion for pixmaps
   */
2018-06-10 02:33:53 +02:00
Benjamin Otte
ce6227840d clipboard: Remove return statements from void function 2018-06-10 02:31:10 +02:00
Benjamin Otte
896f72d33b gtk-demo: Use GtkImages to select the puzzle 2018-06-10 02:25:55 +02:00
Benjamin Otte
884aaa2193 iconhelper: Always size contents to icon size
No more special casing for paintables. If you want the special case for
paintables, you should use GtkPicture.
2018-06-10 02:25:28 +02:00
Benjamin Otte
f58c556adb image: Remove gtk_image_set_keep_aspect_ratio()
and gtk_image_set_can_shrink().

Images are meant to always be icon-sized, they can never shrink below
that.

And images are icons, so they are meant to be square. If they are
not, we pretned that's by accident and keep aspect ratio.
2018-06-10 02:25:28 +02:00
Benjamin Otte
7690c2d042 gtk-demo: Make sliding puzzle demo use GtkPicture 2018-06-10 02:25:28 +02:00
Benjamin Otte
cbd47fa770 gtk-demo: Port images demo to use a GtkPicture in places 2018-06-10 02:23:02 +02:00
Benjamin Otte
45d78f360f video: Use a Picture instead of an Image 2018-06-10 02:23:02 +02:00
Benjamin Otte
6546ef3459 picture: Introduce
This commit introduces GtkPicture, which is supposed to complement
GtkImage.

GtkImage will be adapted to always display an icon, while
GtkPicture displays regular imagery.
2018-06-10 02:23:02 +02:00
Matthias Clasen
9d48a95d9a puzzle: fix some compiler warnings
These slipped under the radar, sorry.
2018-06-09 19:39:43 -04:00
Timm Bäder
cfbba2c710 widget: Use priv pointer less
Instead declare a priv local. We should do this even if we don't remove
the priv pointer from GtkWidget entirely, just to stay consistent with
new code we introduce.
2018-06-09 21:25:15 +02:00
Fran Dieguez
085368eb93 Update Galician translation 2018-06-08 08:09:57 +00:00
Matthias Clasen
1ee23d0d49 puzzle: Add mouse support
Make it so that clicking on a puzzle piece moves enough
pieces to move the empty space there, if it is possible.
2018-06-07 21:47:30 -04:00
Matthias Clasen
ebf042d305 puzzle: Use plain labels
The previous code looked cool in the UI, but was too much
of a hack in the code.
2018-06-07 21:47:30 -04:00
Matthias Clasen
a849ffbd79 Add tweaks
Allow setting the puzzle size, and allow chosing between
the rose and the radioactive animation. Change the default
size to 3. 6 is just too hard.
2018-06-07 21:47:30 -04:00
Matthias Clasen
547d63d56a puzzle: Add a reshuffle button 2018-06-07 21:47:30 -04:00
Matthias Clasen
ddad5c3ce9 Keep aspect ratio of the image
Since we don't have a good way to control the window size tightly,
make the content keep aspect ratio.
2018-06-07 21:47:30 -04:00
Benjamin Otte
b6c8943bbf demo: Add the sliding puzzle demo 2018-06-07 21:47:30 -04:00
Matthias Clasen
46d8c84049 Merge branch 'master' into 'master'
Fix reference to user styles in gtkstyleprovider.h

See merge request GNOME/gtk!184
2018-06-07 18:27:25 +00:00
Mohammed Sadiq
59c8fdff29 font-button: Suggest non deprecated function in docs
gtk_font_button_get_font_name() has been deprecated in 3.22 and
its public API is removed from GTK4.
2018-06-07 15:45:32 +05:30
Matijs van Zuijlen
932e5ea34e Fix reference to user styles in gtkstyleprovider.h 2018-06-07 08:54:23 +00:00
Matthias Clasen
d2d4ea6f0a Merge branch 'wip/move-to-rect-public' into 'master'
gdk: Make gdk_surface_move_to_rect public

See merge request GNOME/gtk!179
2018-06-05 21:02:51 +00:00
Daniel Boles
3396c5e983 SizeRequest: Round px values up for min CSS sizes
Otherwise, requesting a min size in em where the equivalent in px had a
fractional part would lead to the widget getting allocated 1 too few px.
You could see this in the CSS property vs. allocation in the Inspector.

Note that margin/border/padding are left alone: the rationale is that we
do as browsers do, and Benjamin said we already do that for those,
whereas his tests on min-(width|height) showed otherwise. My subsequent
analysis indicated it to be far less clear-cut than that, but he remains
unconvinced that we should ceil() all the things! So just do these ones.

https://gitlab.gnome.org/GNOME/gtk/issues/1088
2018-06-05 18:49:52 +01:00
Jonas Ådahl
c0e1044d5c gdk: Make gdk_surface_move_to_rect public
This is the API used by GtkMenu to properly position menus on the screen
without requiring GTK to query the menu window's position or the work
area of where the window is positioned. It makes it possible to position
popup windows properly when using Wayland.

Make this API available to external users so custom popup windows can be
positioned properly as well.

Related: https://gitlab.gnome.org/GNOME/gtk/issues/997
2018-06-05 17:53:05 +02:00
Timm Bäder
5c24bbf00c popover: Add missing close paren in docs 2018-06-04 21:58:44 +02:00
Timm Bäder
a1e3e9dd17 colorbutton: Remove priv pointer 2018-06-04 21:58:44 +02:00
Timm Bäder
d53c28b07a aspectframe: Remove unused member 2018-06-04 21:58:44 +02:00
Timm Bäder
a3987f3386 bin: Remove public GtkBinPrivate typedef 2018-06-04 21:58:44 +02:00
Timm Bäder
4e9a879de0 statusbar: Remove garbage from header file
Nobody will ever read those comments; documentation belongs into the
soruce file so gtk-doc actually picks it up.
2018-06-04 21:58:44 +02:00
Timm Bäder
9109b0c3f2 statusbar: Remove priv pointer 2018-06-04 21:58:44 +02:00
Timm Bäder
758137b5d9 widget: Add docs for {get,set}_focus_child
With get_ being still private.
2018-06-04 21:58:44 +02:00
Timm Bäder
4ab3aada3f gl renderer: use w axis vector from graphene
Instead of initializing our own one every time.
2018-06-04 21:58:44 +02:00
Matthias Clasen
7a5567bf41 Merge branch 'patch-1' into 'master'
GtkWindow: Handle non-square icons with height > width correctly

Closes #657

See merge request GNOME/gtk!170
2018-06-03 18:10:03 +00:00
Christian Stadelmann
a70f0356e9 GtkWindow: Handle non-square icons with height > width correctly 2018-05-31 17:26:17 +02:00
Mohammed Sadiq
f4c1a40446 widget: Fix example code in doc 2018-05-31 16:24:00 +05:30
Matthias Clasen
8b24d59cde Merge branch 'gesture-docs' into 'master'
Gesture stuff

See merge request GNOME/gtk!169
2018-05-30 02:13:04 +00:00
Matthias Clasen
60aeb15116 x11: Don't set NET_WM_PID when sandboxed
It is not useful, and some window managers misinterpret it and
add some "runs as root" indication to the window decoration.

See https://github.com/mate-desktop/marco/issues/301
2018-05-29 20:19:05 -04:00
Matthias Clasen
c83441ae4a gdk: Add a private api to find sandboxes
This will be used in more places in the future.
2018-05-29 20:17:22 -04:00
Benjamin Otte
83a80ab866 events: Mark static function as such 2018-05-29 21:54:47 +02:00
Benjamin Otte
7e574fa98c gdk: Get rid of gdk_event_free()
Events are objects, so use g_object_unref().
2018-05-29 21:53:44 +02:00
Ernestas Kulik
4d2b39d98c gesturemultipress: Don’t fire ::released after ::cancel
Causing a grab in the handler for ::pressed by, e.g., popping up a
context menu will cause the gesture to be canceled and, subsequently,
::end and ::released to be fired, all while the button is still
physically pressed. That results in no event being available to the
::released handler and garbage coordinates, given that
gtk_gesture_get_point() returns FALSE.

Emitting ::released can be avoided by checking the return value
gtk_gesture_get_point().
2018-05-29 19:09:28 +03:00
Ernestas Kulik
e9765c0405 gesture: Fix code snippet
GTK_EVENT_SEQUENCE_ACCEPTED seems to never have been a valid enumeration
value. GTK_EVENT_SEQUENCE_CLAIMED is the closest in meaning.
2018-05-29 18:27:59 +03:00
Ernestas Kulik
334c7911c1 gesture: Fix get_last_event() docs
Querying the event sequence of a gesture will always yield NULL for
non-touch events, but passing NULL in to calls to
gtk_gesture_get_last_event() is a perfectly valid use case.
2018-05-29 18:15:20 +03:00