Compare commits

..

57 Commits

Author SHA1 Message Date
Matthias Clasen a59ef54dc8 searchengine: Implement GListModel
This is a quick attempt to turn GtkSearchEngine
into a GListModel.
2020-06-11 00:41:50 -04:00
Matthias Clasen 63692a491d Merge branch 'michaelweghorn/master_issue1820_gtkfilechoosernative_get_filter' into 'master'
filechoosernative: Make get_filter work for (non-portal) native chooser (master, issue #1820)

Closes #1820

See merge request GNOME/gtk!2069
2020-06-10 14:47:36 +00:00
Emmanuele Bassi bbe79c1ef9 Merge branch 'wip/carlosg/zoom-no-touchpad-warnings' into 'master'
gtkgesturezoom: Do not check touchpad phase on generic events

Closes #2825

See merge request GNOME/gtk!2071
2020-06-10 14:35:10 +00:00
Matthias Clasen 4b241f8da2 Merge branch 'scroll-compression' into 'master'
gdk: Compress scroll events

Closes #2800

See merge request GNOME/gtk!2066
2020-06-10 14:35:01 +00:00
Matthias Clasen bdd6ae3252 Merge branch 'device-cleanup' into 'master'
Device cleanup

See merge request GNOME/gtk!2068
2020-06-10 13:06:13 +00:00
sicklylife 24a3ff3aef Update Japanese translation 2020-06-10 12:34:42 +00:00
Carlos Garnacho ba988cd899 gtkgesturezoom: Do not check touchpad phase on generic events
This gesture handles both individual touch events and touchpad gesture
events, and was checking the touchpad phase in generic code paths. This
is dubious since event methods error out on the wrong GdkEventTypes.

Check the touchpad gesture phase within the branch handling touchpad
events, and make it clear which is the gesture phase of all that we are
ignoring.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2825
2020-06-10 14:30:58 +02:00
sicklylife 1bf1646d25 Update Japanese translation 2020-06-10 12:18:55 +00:00
Matthias Clasen 2c82151d65 gdk: Drop axis labels
This was only ever implemented on X11, and the labels
here were atom names, so unlikely to be useful for
anything interesting.
2020-06-10 07:36:30 -04:00
Alexander Larsson d2235b71f3 Merge branch 'win32-use-g-stat' into 'master'
gtkiconcache: Use g_stat instead of fstat

See merge request GNOME/gtk!2019
2020-06-10 07:19:22 +00:00
Michael Weghorn 57135acd2d filechoosernative: Make get_filter work for (non-portal) native chooser
'gtk_file_chooser_get_filter' did not work for GtkFileChooserNative,
since the previous way did not properly handle the delegate dialog,
s.a. commit a136cbae8f
("filechoosernative: forward current_filter to delegate dialog",
2018-11-29) for details, wich basiscally fixed the same thing for
the 'gtk_file_chooser_set_filter' case.

This fixes #1820 for the fallback dialog. A solution for the portal
one (which also requires changes to xdg-desktop-portal and
xdg-desktop-portal-gtk as well) will be suggested in a subsequent step.

Bug: #1820
2020-06-09 22:59:34 +02:00
Matthias Clasen 54c098761f gdk: Drop gdk_device_set_axis_use
If you need some axes changed, you can just flip
the values when you receive them.
2020-06-09 15:27:34 -04:00
Matthias Clasen 2f98400b80 gdk: Drop gdk_device_get/set_keys
This functionality was only ever half-implemented
on X11, and is not useful enough to keep around.
2020-06-09 15:27:33 -04:00
Matthias Clasen ea7c9b93ea x11: Stop setting device keys
This is very vestigial functionality, and basically
unused.
2020-06-09 15:05:55 -04:00
Matthias Clasen 4317c008f0 Address review comments
We were casting scroll events to motion events
rather carelessly. Don't do that.
2020-06-09 14:13:22 -04:00
Matthias Clasen d605d9ae73 gdk: Add documentation
Add some useful information about event history.
2020-06-09 13:59:26 -04:00
Matthias Clasen c9fad25131 gdk: Rename gdk_motion_event_get_history
Scroll events can have history too, so make a
getter that works for both. This drops the
gdk_scroll_event_get_history getter that was
added a few commits earlier, since we now
store scroll history in the same way as
motion history.

Update the docs, and all callers.
2020-06-09 13:43:12 -04:00
Matthias Clasen 693200f1eb gdk: Shrink GdkTimeCoord
There is really no need to store 128 doubles as axes,
ever. We can do just fine with 10. At the same time,
add a GdkAxisFlags member, so we can interpret the
values without having to go chasing the right device
for this information.
2020-06-09 13:43:03 -04:00
Matthias Clasen 5f087a9dff gdk: Add scroll delta x/y as device axes
They really are axes, and having them present
in these enums lets use store delta values in
GdkTimeCoord for keeping history.
2020-06-09 13:43:03 -04:00
Matthias Clasen b9cde6f8ea Keep scroll history
Similar to how we keep motion history for compressed
events, keep scroll history for compressed scroll
events.
2020-06-09 13:43:03 -04:00
Matthias Clasen 86eece78b1 gdk: Compress scroll events
Only return one accumulated scroll event per frame.
Compress them by adding up the deltas.

Still missing: a way to capture history, like
we do for motion events.

Fixes: #2800
2020-06-09 13:43:03 -04:00
Daniel Mustieles 8cb50ac6e9 Updated Spanish translation 2020-06-09 17:19:50 +02:00
Matthias Clasen 997fbbde8f Merge branch 'drop-device-history' into 'master'
Drop device history

See merge request GNOME/gtk!2065
2020-06-08 23:56:30 +00:00
Matthias Clasen 805ddc3c3a gdk: Drop gdk_device_get_history
This function is not implemented anywhere.
2020-06-08 18:24:20 -04:00
Matthias Clasen da9b3a9256 win32: Drop pointless vfuncs
These are not useful.
2020-06-08 18:24:20 -04:00
Matthias Clasen 876560924f wayland: Drop a pointless vfunc
A vfunc that just returns FALSE is not useful.
2020-06-08 18:24:20 -04:00
Matthias Clasen ca1c89c5bd broadway: Drop a pointless vfunc
A vfunc that just returns FALSE is not useful.
2020-06-08 18:24:20 -04:00
Jordi Mas 7875e28d9f Update Catalan translation 2020-06-08 22:50:03 +02:00
Benjamin Otte bd2f2a6f65 Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master

See merge request GNOME/gtk!2064
2020-06-08 18:43:31 +00:00
Benjamin Otte 541aaa2392 selectionmodel: Add unselect_rest argument to select_callback
This is not just about consistency with other functions.

It is about avoiding reentrancy problems.

GtkListBase first doing an unselect_all() will then force the
SelectionModel to consider a state where all items are unselected
(and potentially deciding to autoselect one) and then cause a
"selection-changed" emission that unselects all items and potentially
updates all the list item widgets in the GtkListBase to the unselected
state.

After this, GtkListBase selects new items, but to the SelectionModel and
the list item widgets this looks like an enitrely new operation and
there is no way to associate it with the previous state, so the
SelectionModel cannot undo any previous actions it took when
unselecting.
And all listitem widgets will now think they were just selected and
start running animations about selecting.
2020-06-08 19:06:56 +02:00
Benjamin Otte d294b01cee selectionmodel: Rename "exclusive" to "unselect_rest"
The name is better at explaining what this boolean is meant to do.
2020-06-08 18:26:48 +02:00
Benjamin Otte 5d9dc25115 listitemmanager: Update selections properly
Replace a previous fix with a more correct one: Update the
selected state from the model instead of reusing the old state, the
model might have updated the selected state.
2020-06-08 18:14:24 +02:00
Daniel Mustieles c8988ec784 Updated Spanish translation 2020-06-08 17:21:58 +02:00
Daniel Mustieles 071dbc1115 Updated Spanish translation 2020-06-08 16:11:28 +02:00
Matthias Clasen 80c5e4a156 Merge branch 'matthiasc/for-master' into 'master'
dropdown: Use our own CSS name

See merge request GNOME/gtk!2061
2020-06-08 11:15:28 +00:00
Emmanuele Bassi 6eac3063fa Merge branch 'tintou/places-sidebar-cloudproviders' into 'master'
placessidebar: Fix build with libcloudproviders

See merge request GNOME/gtk!2062
2020-06-08 09:35:23 +00:00
Corentin Noël 27925fcb0e placessidebar: Fix build with libcloudproviders
Make it build with cloudproviders=true as the GtkPopover API for menus is now in GtkPopoverMenu.

Fix some leaks while looking at the code.
2020-06-08 10:40:46 +02:00
Matthias Clasen 5f4d21422a Merge branch 'fix-cell-editing' into 'master'
Fix cell editing

Closes #2831

See merge request GNOME/gtk!2060
2020-06-07 14:54:37 +00:00
Matthias Clasen b0bb413faa dropdown: Use our own CSS name
Use the name dropdown for the css node, and document it.
2020-06-07 09:01:20 -04:00
Matthias Clasen 37633985bd Drop gtknativeprivate.h
No need to ship empty headers.
2020-06-07 08:52:45 -04:00
Matthias Clasen 6ff8f1b2fd Merge branch 'gtk-demo-tweaks' into 'master'
Gtk demo tweaks

See merge request GNOME/gtk!2059
2020-06-07 12:51:34 +00:00
Matthias Clasen d13a3c7540 Fix cell editing
When translating coordinates from an event, we need to
take the surface transform into account. This makes
double-clicking on editable cells in treeviews work
again.

Fixes: #2831
2020-06-07 08:46:31 -04:00
Yuri Chornoivan 0a469d7bd6 Update Ukrainian translation 2020-06-07 08:51:44 +00:00
Piotr Drąg 115edc5fd1 Update POTFILES.in 2020-06-07 09:27:34 +02:00
Matthias Clasen a28c75f215 gtk-demo: Expand the sidebar by default
Seems better to show what we have. Plus, clicking
those arrows is a little fiddly.
2020-06-06 22:12:12 -04:00
Matthias Clasen b9d7dab329 gtk-demo: Improve display of image sources
Make the images expand to fill the space.
2020-06-06 22:12:12 -04:00
Matthias Clasen bb7500e984 gtk-demo: Cosmetics
Tweak the formatting of the descriptions of
various demos.
2020-06-06 22:05:52 -04:00
Matthias Clasen e94268944b gtk-demo: Cosmetics
Make the titles of some demos match between sidebar
and window.
2020-06-06 21:42:42 -04:00
Emmanuele Bassi 3225b487e8 Merge branch 'ebassi/for-master' into 'master'
Annotate the GtkSelectionModel callbacks

See merge request GNOME/gtk!2057
2020-06-07 01:42:21 +00:00
Matthias Clasen e35c0e043e gtk-demo: Add overline to the markup demo
This is a new-ish Pango feature.
2020-06-06 21:38:31 -04:00
Matthias Clasen b251893030 Drop pango version checks
We are requiring pango 1.45.0 now, so no need to
Keep these ifdefs in the code any longer.
2020-06-06 21:32:55 -04:00
Matthias Clasen 15257e3922 gtk-demo: Fix a leak
The themes demo was leaking its builder, and
therefore couldn't be closed.
2020-06-06 20:09:42 -04:00
Matthias Clasen 180a5a1ad7 gtk-demo: Cosmetic changes to the dropdown demo
Match the window title and the sidebar.
2020-06-06 20:08:50 -04:00
Matthias Clasen 11f971d870 gtk-demo: Cosmetic improvements to clocks demo
Reformat the code comments, and add a 10th clock.
2020-06-06 19:43:21 -04:00
Emmanuele Bassi 7c382c6b47 Annotate the GtkSelectionModel callbacks
We need a scope for the select and unselect callback arguments.
2020-06-07 00:39:33 +01:00
Jordi Mas 087f42d998 Update Catalan translation 2020-06-06 23:13:17 +02:00
Christoph Reiter e7c9e2060c gtkiconcache: Use g_stat instead of fstat
stat/fstat aren't compatible with GStatBuf on Windows in all cases.
Since we don't really need the file descriptor anyway here replace it with
a g_stat call.

This fixes a compiler warning with 64bit mingw.
And lets us remove this scary ifdeffery.
2020-06-02 20:35:56 +02:00
70 changed files with 4038 additions and 3787 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
/* Constraints/Interactive
*
* Demonstrate how constraints can be updates during
* user interaction.
* Demonstrate how constraints can be updates during user interaction.
* The vertical edge between the buttons can be dragged with the mouse.
*/
#include <glib/gi18n.h>
+3 -4
View File
@@ -1,9 +1,8 @@
/* Cursors
*
* Demonstrates a useful set of available cursors. The cursors shown here are the ones
* defined by CSS, which we assume to be available.
*
* The example shows creating cursors by name or from an image, with or without a fallback.
* Demonstrates a useful set of available cursors. The cursors shown here are the
* ones defined by CSS, which we assume to be available. The example shows creating
* cursors by name or from an image, with or without a fallback.
*/
#include <gtk/gtk.h>
+2 -1
View File
@@ -9,6 +9,7 @@
* display the selected item differently from the presentation
* in the popup.
*/
#include <gtk/gtk.h>
@@ -242,7 +243,7 @@ do_dropdown (GtkWidget *do_widget)
window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Drop Down");
gtk_window_set_title (GTK_WINDOW (window), "Drop Downs");
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
+2 -2
View File
@@ -1,4 +1,4 @@
/* Fixed layout
/* Fixed Layout
*
* GtkFixed is a container that allows placing and transforming
* widgets manually.
@@ -126,7 +126,7 @@ create_demo_window (GtkWidget *do_widget)
window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Fixed layout");
gtk_window_set_title (GTK_WINDOW (window), "Fixed Layout");
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
+2 -3
View File
@@ -1,9 +1,8 @@
/* Flow Box
*
* GtkFlowBox allows flexible and responsive grids which reflow
* as needed and support sorting and filtering.
*
* The children of a GtkFlowBox are regular widgets
* as needed and support sorting and filtering. The children of
* a GtkFlowBox are regular widgets
*
* The dataset used here has 665 colors.
*/
+50 -33
View File
@@ -3,10 +3,9 @@
* This demo displays the time in different timezones.
*
* The goal is to show how to set up expressions that track changes
* in objects and make them update widgets.
*
* For that, we create a GtkClock object that updates its time every
* second and then use various ways to display that time.
* in objects and make them update widgets. For that, we create a
* GtkClock object that updates its time every second and then use
* various ways to display that time.
*
* Typically, this will be done using GtkBuilder .ui files with the
* help of the <binding> tag, but this demo shows the code that runs
@@ -41,7 +40,8 @@ enum {
/* This function returns the current time in the clock's timezone.
* Note that this returns a new object every time, so we need to
* remember to unref it after use. */
* remember to unref it after use.
*/
static GDateTime *
gtk_clock_get_time (GtkClock *clock)
{
@@ -51,10 +51,11 @@ gtk_clock_get_time (GtkClock *clock)
return g_date_time_new_now_local ();
}
/* Here, we implement the functionality required by the GdkPaintable interface.
* This way we have a trivial way to display an analog clock.
* It also allows demonstrating how to directly use objects in the listview
* later by making this object do something interesting. */
/* Here, we implement the functionality required by the GdkPaintable
* interface. This way we have a trivial way to display an analog clock.
* It also allows demonstrating how to directly use objects in the
* listview later by making this object do something interesting.
*/
static void
gtk_clock_snapshot (GdkPaintable *paintable,
GdkSnapshot *snapshot,
@@ -68,26 +69,31 @@ gtk_clock_snapshot (GdkPaintable *paintable,
#define BLACK ((GdkRGBA) { 0, 0, 0, 1 })
/* save/restore() is necessary so we can undo the transforms we start
* out with. */
* out with.
*/
gtk_snapshot_save (snapshot);
/* First, we move the (0, 0) point to the center of the area so
* we can draw everything relative to it. */
* we can draw everything relative to it.
*/
gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (width / 2, height / 2));
/* Next we scale it, so that we can pretend that the clock is
* 100px in size. That way, we don't need to do any complicated
* math later.
* We use MIN() here so that we use the smaller dimension for sizing.
* That way we don't overdraw but keep the aspect ratio. */
* math later. We use MIN() here so that we use the smaller
* dimension for sizing. That way we don't overdraw but keep
* the aspect ratio.
*/
gtk_snapshot_scale (snapshot, MIN (width, height) / 100.0, MIN (width, height) / 100.0);
/* Now we have a circle with diameter 100px (and radius 50px) that
* has its (0, 0) point at the center.
* Let's draw a simple clock into it. */
/* Now we have a circle with diameter 100px (and radius 50px) that
* has its (0, 0) point at the center. Let's draw a simple clock into it.
*/
time = gtk_clock_get_time (self);
/* First, draw a circle. This is a neat little trick to draw a circle
* without requiring Cairo. */
* without requiring Cairo.
*/
gsk_rounded_rect_init_from_rect (&outline, &GRAPHENE_RECT_INIT(-50, -50, 100, 100), 50);
gtk_snapshot_append_border (snapshot,
&outline,
@@ -95,9 +101,11 @@ gtk_clock_snapshot (GdkPaintable *paintable,
(GdkRGBA [4]) { BLACK, BLACK, BLACK, BLACK });
/* Next, draw the hour hand.
* We do this using tranforms again: Instead of computing where the angle points
* to, we just rotate everything and then draw the hand as if if was :00.
* We don't even need to care about am/pm here because rotations just work. */
* We do this using tranforms again: Instead of computing where the angle
* points to, we just rotate everything and then draw the hand as if it
* was :00. We don't even need to care about am/pm here because rotations
* just work.
*/
gtk_snapshot_save (snapshot);
gtk_snapshot_rotate (snapshot, 30 * g_date_time_get_hour (time) + 0.5 * g_date_time_get_minute (time));
gsk_rounded_rect_init_from_rect (&outline, &GRAPHENE_RECT_INIT(-2, -23, 4, 25), 2);
@@ -107,7 +115,8 @@ gtk_clock_snapshot (GdkPaintable *paintable,
gtk_snapshot_restore (snapshot);
/* And the same as above for the minute hand. Just make this one longer
* so people can tell the hands apart. */
* so people can tell the hands apart.
*/
gtk_snapshot_save (snapshot);
gtk_snapshot_rotate (snapshot, 6 * g_date_time_get_minute (time));
gsk_rounded_rect_init_from_rect (&outline, &GRAPHENE_RECT_INIT(-2, -43, 4, 45), 2);
@@ -125,8 +134,9 @@ gtk_clock_snapshot (GdkPaintable *paintable,
gtk_snapshot_pop (snapshot);
gtk_snapshot_restore (snapshot);
/* And finally, don't forget to restore the initial save() that we did for
* the initial transformations. */
/* And finally, don't forget to restore the initial save() that
* we did for the initial transformations.
*/
gtk_snapshot_restore (snapshot);
g_date_time_unref (time);
@@ -145,10 +155,9 @@ gtk_clock_get_intrinsic_height (GdkPaintable *paintable)
return 100;
}
/* Initialize the paintable interface. This way we turn our clock objects
* into objects that can be drawn.
* There are more functions to this interface to define desired size,
* but this is enough.
/* Initialize the paintable interface. This way we turn our clocks
* into objects that can be drawn. There are more functions to this
* interface to define desired size, but this is enough.
*/
static void
gtk_clock_paintable_init (GdkPaintableInterface *iface)
@@ -158,8 +167,9 @@ gtk_clock_paintable_init (GdkPaintableInterface *iface)
iface->get_intrinsic_height = gtk_clock_get_intrinsic_height;
}
/* Finally, we define the type. The important part is adding the paintable
* interface, so GTK knows that this object can indeed be drawm.
/* Finally, we define the type. The important part is adding the
* paintable interface, so GTK knows that this object can indeed
* be drawn.
*/
G_DEFINE_TYPE_WITH_CODE (GtkClock, gtk_clock, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
@@ -221,11 +231,14 @@ gtk_clock_set_property (GObject *object,
/* This is the list of all the ticking clocks */
static GSList *ticking_clocks = NULL;
/* This is the id of the timeout source that is updating all ticking clocks */
/* This is the ID of the timeout source that is updating all
* ticking clocks.
*/
static guint ticking_clock_id = 0;
/* Every second, this function is called to tell everybody that the
* clocks are ticking.
/* Every second, this function is called to tell everybody that
* the clocks are ticking.
*/
static gboolean
gtk_clock_tick (gpointer unused)
@@ -240,6 +253,7 @@ gtk_clock_tick (gpointer unused)
* so notify about that.
*/
g_object_notify_by_pspec (G_OBJECT (clock), properties[PROP_TIME]);
/* We will also draw the hands of the clock differently.
* So notify about that, too.
*/
@@ -343,6 +357,9 @@ create_clocks_model (void)
clock = gtk_clock_new ("San Francisco", g_time_zone_new ("America/Los_Angeles"));
g_list_store_append (result, clock);
g_object_unref (clock);
clock = gtk_clock_new ("Xalapa", g_time_zone_new ("America/Mexico_City"));
g_list_store_append (result, clock);
g_object_unref (clock);
clock = gtk_clock_new ("Boston", g_time_zone_new ("America/New_York"));
g_list_store_append (result, clock);
g_object_unref (clock);
+1 -1
View File
@@ -6,7 +6,7 @@
* and sort the data in various ways. The controls for
* this are implemented using GtkDropDown.
*
* The dataset used here has 9283 items.
* The dataset used here has 9283 items.
*/
#include <gtk/gtk.h>
+1 -1
View File
@@ -11,7 +11,7 @@
* A GtkNoSelectionModel is used to make sure no item in the list can be
* selected. All other interactions with the items is still possible.
*
* The dataset used here has 70000 items.
* The dataset used here has 70000 items.
*/
#include <gtk/gtk.h>
+2 -2
View File
@@ -599,7 +599,7 @@ display_image (const char *resource)
{
GtkWidget *sw, *image;
image = gtk_image_new_from_resource (resource);
image = gtk_picture_new_for_resource (resource);
gtk_widget_set_halign (image, GTK_ALIGN_CENTER);
gtk_widget_set_valign (image, GTK_ALIGN_CENTER);
sw = gtk_scrolled_window_new (NULL, NULL);
@@ -1040,7 +1040,7 @@ activate (GApplication *app)
listmodel = create_demo_model ();
treemodel = gtk_tree_list_model_new (FALSE,
G_LIST_MODEL (listmodel),
FALSE,
TRUE,
get_child_model,
NULL,
NULL);
+1 -1
View File
@@ -5,7 +5,7 @@ Text <span color="gray">c<span color="green">o</span>l<span color="tomato">o</sp
Colorful <span underline="low" underline-color="blue"><span underline="double" underline-color="red">under</span>lines</span> and <span background="pink"><span underline="error">mo</span><span underline="error" underline-color="green">re</span></span>
Colorful <span strikethrough="true" strikethrough-color="magenta">strikethroughs</span>
Colorful <span strikethrough="true" strikethrough-color="magenta">strikethroughs</span> and <span overline="single" overline_color="green">overlines</span>
Superscripts and subscripts: 𝜀<span rise="-6000" size="x-small" font_desc="italic">0</span> = 𝜔<span rise="8000" size="smaller">𝜔<span rise="14000" size="smaller">𝜔<span rise="20000">.<span rise="23000">.<span rise="26000">.</span></span></span></span></span>
+1 -1
View File
@@ -1,4 +1,4 @@
/* Sliding puzzle
/* Sliding Puzzle
*
* This demo demonstrates how to use gestures and paintables to create a
* small sliding puzzle game.
+14 -11
View File
@@ -92,12 +92,11 @@ static Theme themes[] = {
static int theme;
static gboolean
change_theme (GtkWidget *widget,
change_theme (GtkWidget *widget,
GdkFrameClock *frame_clock,
gpointer data)
gpointer data)
{
GtkBuilder *builder = data;
GtkWidget *label;
GtkWidget *label = data;
Theme next = themes[theme++ % G_N_ELEMENTS (themes)];
char *name;
@@ -110,7 +109,6 @@ change_theme (GtkWidget *widget,
gtk_window_set_title (GTK_WINDOW (widget), name);
g_free (name);
label = GTK_WIDGET (gtk_builder_get_object (builder, "fps"));
if (frame_clock)
{
char *fps;
@@ -127,10 +125,10 @@ change_theme (GtkWidget *widget,
static void
clicked (GtkGestureClick *gesture,
int n_press,
double x,
double y,
gpointer data)
int n_press,
double x,
double y,
gpointer data)
{
GtkWidget *window;
GdkEvent *event;
@@ -198,6 +196,7 @@ do_themes (GtkWidget *do_widget)
GtkBuilder *builder;
GtkWidget *header;
GtkWidget *button;
GtkWidget *label;
GtkGesture *gesture;
builder = gtk_builder_new_from_resource ("/themes/themes.ui");
@@ -207,13 +206,17 @@ do_themes (GtkWidget *do_widget)
gtk_widget_get_display (do_widget));
header = GTK_WIDGET (gtk_builder_get_object (builder, "header"));
label = GTK_WIDGET (gtk_builder_get_object (builder, "fps"));
gesture = gtk_gesture_click_new ();
g_signal_connect (gesture, "pressed", G_CALLBACK (clicked), builder);
g_signal_connect (gesture, "pressed", G_CALLBACK (clicked), label);
gtk_widget_add_controller (header, GTK_EVENT_CONTROLLER (gesture));
button = GTK_WIDGET (gtk_builder_get_object (builder, "toggle"));
g_signal_connect (button, "notify::active", G_CALLBACK (toggle_cycle), builder);
g_signal_connect (button, "notify::active", G_CALLBACK (toggle_cycle), label);
gtk_widget_realize (window);
g_object_unref (builder);
}
if (!gtk_widget_get_visible (window))
+1 -7
View File
@@ -357,9 +357,6 @@ gdk_device_get_name
gdk_device_get_vendor_id
gdk_device_get_product_id
gdk_device_get_source
gdk_device_set_key
gdk_device_get_key
gdk_device_set_axis_use
gdk_device_get_axis_use
gdk_device_get_associated_device
gdk_device_list_slave_devices
@@ -367,7 +364,6 @@ gdk_device_get_device_type
gdk_device_get_display
gdk_device_get_has_cursor
gdk_device_get_n_axes
gdk_device_get_n_keys
gdk_device_get_axes
gdk_device_get_seat
gdk_device_get_num_touches
@@ -382,8 +378,6 @@ gdk_device_has_bidi_layouts
<SUBSECTION>
gdk_device_get_state
gdk_device_get_surface_at_position
gdk_device_get_history
gdk_device_free_history
GdkTimeCoord
gdk_device_get_axis
gdk_device_get_axis_names
@@ -500,6 +494,7 @@ gdk_event_get_modifier_state
gdk_event_get_position
gdk_event_get_axes
gdk_event_get_axis
gdk_event_get_history
gdk_event_get_pointer_emulated
gdk_event_triggers_context_menu
gdk_button_event_get_button
@@ -531,7 +526,6 @@ gdk_touchpad_event_get_pinch_scale
gdk_pad_event_get_axis_value
gdk_pad_event_get_button
gdk_pad_event_get_group_mode
gdk_motion_event_get_history
<SUBSECTION>
gdk_events_get_angle
+2 -20
View File
@@ -23,12 +23,6 @@
#include "gdksurfaceprivate.h"
#include "gdkprivate-broadway.h"
static gboolean gdk_broadway_device_get_history (GdkDevice *device,
GdkSurface *surface,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events);
static void gdk_broadway_device_get_state (GdkDevice *device,
GdkSurface *surface,
gdouble *axes,
@@ -64,7 +58,6 @@ gdk_broadway_device_class_init (GdkBroadwayDeviceClass *klass)
{
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
device_class->get_history = gdk_broadway_device_get_history;
device_class->get_state = gdk_broadway_device_get_state;
device_class->set_surface_cursor = gdk_broadway_device_set_surface_cursor;
device_class->query_state = gdk_broadway_device_query_state;
@@ -80,19 +73,8 @@ gdk_broadway_device_init (GdkBroadwayDevice *device_core)
device = GDK_DEVICE (device_core);
_gdk_device_add_axis (device, NULL, GDK_AXIS_X, 0, 0, 1);
_gdk_device_add_axis (device, NULL, GDK_AXIS_Y, 0, 0, 1);
}
static gboolean
gdk_broadway_device_get_history (GdkDevice *device,
GdkSurface *surface,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events)
{
return FALSE;
_gdk_device_add_axis (device, GDK_AXIS_X, 0, 0, 1);
_gdk_device_add_axis (device, GDK_AXIS_Y, 0, 0, 1);
}
static void
+9 -319
View File
@@ -51,9 +51,7 @@ typedef struct _GdkAxisInfo GdkAxisInfo;
struct _GdkAxisInfo
{
char *label;
GdkAxisUse use;
gdouble min_axis;
gdouble max_axis;
gdouble min_value;
@@ -366,19 +364,10 @@ gdk_device_class_init (GdkDeviceClass *klass)
G_TYPE_NONE, 1, GDK_TYPE_DEVICE_TOOL);
}
static void
gdk_device_axis_info_clear (gpointer data)
{
GdkAxisInfo *info = data;
g_free (info->label);
}
static void
gdk_device_init (GdkDevice *device)
{
device->axes = g_array_new (FALSE, TRUE, sizeof (GdkAxisInfo));
g_array_set_clear_func (device->axes, gdk_device_axis_info_clear);
}
static void
@@ -393,7 +382,6 @@ gdk_device_finalize (GObject *object)
}
g_clear_pointer (&device->name, g_free);
g_clear_pointer (&device->keys, g_free);
g_clear_pointer (&device->vendor_id, g_free);
g_clear_pointer (&device->product_id, g_free);
@@ -635,93 +623,6 @@ gdk_device_get_surface_at_position (GdkDevice *device,
return surface;
}
/**
* gdk_device_get_history: (skip)
* @device: a #GdkDevice
* @surface: the surface with respect to which the event coordinates will be reported
* @start: starting timestamp for range of events to return
* @stop: ending timestamp for the range of events to return
* @events: (array length=n_events) (out) (transfer full) (optional):
* location to store a newly-allocated array of #GdkTimeCoord, or
* %NULL
* @n_events: (out) (optional): location to store the length of
* @events, or %NULL
*
* Obtains the motion history for a pointer device; given a starting and
* ending timestamp, return all events in the motion history for
* the device in the given range of time. Some windowing systems
* do not support motion history, in which case, %FALSE will
* be returned. (This is not distinguishable from the case where
* motion history is supported and no events were found.)
*
* Note that there is also gdk_surface_set_event_compression() to get
* more motion events delivered directly, independent of the windowing
* system.
*
* Returns: %TRUE if the windowing system supports motion history and
* at least one event was found.
**/
gboolean
gdk_device_get_history (GdkDevice *device,
GdkSurface *surface,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
g_return_val_if_fail (device->source != GDK_SOURCE_KEYBOARD, FALSE);
g_return_val_if_fail (GDK_IS_SURFACE (surface), FALSE);
if (n_events)
*n_events = 0;
if (events)
*events = NULL;
if (GDK_SURFACE_DESTROYED (surface))
return FALSE;
if (!GDK_DEVICE_GET_CLASS (device)->get_history)
return FALSE;
return GDK_DEVICE_GET_CLASS (device)->get_history (device, surface,
start, stop,
events, n_events);
}
GdkTimeCoord **
_gdk_device_allocate_history (GdkDevice *device,
gint n_events)
{
GdkTimeCoord **result = g_new (GdkTimeCoord *, n_events);
gint i;
for (i = 0; i < n_events; i++)
result[i] = g_malloc (sizeof (GdkTimeCoord) -
sizeof (double) * (GDK_MAX_TIMECOORD_AXES - device->axes->len));
return result;
}
/**
* gdk_device_free_history: (skip)
* @events: (array length=n_events): an array of #GdkTimeCoord.
* @n_events: the length of the array.
*
* Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history().
*/
void
gdk_device_free_history (GdkTimeCoord **events,
gint n_events)
{
gint i;
for (i = 0; i < n_events; i++)
g_free (events[i]);
g_free (events);
}
/**
* gdk_device_get_name:
* @device: a #GdkDevice
@@ -771,79 +672,6 @@ gdk_device_get_source (GdkDevice *device)
return device->source;
}
/**
* gdk_device_get_n_keys:
* @device: a #GdkDevice
*
* Returns the number of keys the device currently has.
*
* Returns: the number of keys.
**/
gint
gdk_device_get_n_keys (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
return device->num_keys;
}
/**
* gdk_device_get_key:
* @device: a #GdkDevice.
* @index_: the index of the macro button to get.
* @keyval: (out): return value for the keyval.
* @modifiers: (out): return value for modifiers.
*
* If @index_ has a valid keyval, this function will return %TRUE
* and fill in @keyval and @modifiers with the keyval settings.
*
* Returns: %TRUE if keyval is set for @index.
**/
gboolean
gdk_device_get_key (GdkDevice *device,
guint index_,
guint *keyval,
GdkModifierType *modifiers)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
g_return_val_if_fail (index_ < device->num_keys, FALSE);
if (!device->keys[index_].keyval &&
!device->keys[index_].modifiers)
return FALSE;
if (keyval)
*keyval = device->keys[index_].keyval;
if (modifiers)
*modifiers = device->keys[index_].modifiers;
return TRUE;
}
/**
* gdk_device_set_key:
* @device: a #GdkDevice
* @index_: the index of the macro button to set
* @keyval: the keyval to generate
* @modifiers: the modifiers to set
*
* Specifies the X key event to generate when a macro button of a device
* is pressed.
**/
void
gdk_device_set_key (GdkDevice *device,
guint index_,
guint keyval,
GdkModifierType modifiers)
{
g_return_if_fail (GDK_IS_DEVICE (device));
g_return_if_fail (index_ < device->num_keys);
device->keys[index_].keyval = keyval;
device->keys[index_].modifiers = modifiers;
}
/**
* gdk_device_get_axis_use:
* @device: a pointer #GdkDevice.
@@ -868,47 +696,6 @@ gdk_device_get_axis_use (GdkDevice *device,
return info->use;
}
/**
* gdk_device_set_axis_use:
* @device: a pointer #GdkDevice
* @index_: the index of the axis
* @use: specifies how the axis is used
*
* Specifies how an axis of a device is used.
**/
void
gdk_device_set_axis_use (GdkDevice *device,
guint index_,
GdkAxisUse use)
{
GdkAxisInfo *info;
g_return_if_fail (GDK_IS_DEVICE (device));
g_return_if_fail (device->source != GDK_SOURCE_KEYBOARD);
g_return_if_fail (index_ < device->axes->len);
info = &g_array_index (device->axes, GdkAxisInfo, index_);
info->use = use;
switch ((guint) use)
{
case GDK_AXIS_X:
case GDK_AXIS_Y:
info->min_axis = 0;
info->max_axis = 0;
break;
case GDK_AXIS_XTILT:
case GDK_AXIS_YTILT:
info->min_axis = -1;
info->max_axis = 1;
break;
default:
info->min_axis = 0;
info->max_axis = 1;
break;
}
}
/**
* gdk_device_get_display:
* @device: a #GdkDevice
@@ -1074,89 +861,6 @@ gdk_device_get_n_axes (GdkDevice *device)
return device->axes->len;
}
/**
* gdk_device_get_axis_names:
* @device: a #GdkDevice
*
* Returns a null-terminated array of strings, containing the labels for
* the axes that @device currently has.
* If the device has no axes, %NULL is returned.
*
* Returns: (nullable) (transfer full): A null-terminated string array,
* free with g_strfreev().
**/
char **
gdk_device_get_axis_names (GdkDevice *device)
{
GPtrArray *axes;
gint i;
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
g_return_val_if_fail (device->source != GDK_SOURCE_KEYBOARD, NULL);
if (device->axes->len == 0)
return NULL;
axes = g_ptr_array_new ();
for (i = 0; i < device->axes->len; i++)
{
GdkAxisInfo axis_info;
axis_info = g_array_index (device->axes, GdkAxisInfo, i);
g_ptr_array_add (axes, g_strdup (axis_info.label));
}
g_ptr_array_add (axes, NULL);
return (char **) g_ptr_array_free (axes, FALSE);
}
/**
* gdk_device_get_axis_value: (skip)
* @device: a pointer #GdkDevice.
* @axes: (array): pointer to an array of axes
* @axis_label: name of the label
* @value: (out): location to store the found value.
*
* Interprets an array of double as axis values for a given device,
* and locates the value in the array for a given axis label, as returned
* by gdk_device_get_axes()
*
* Returns: %TRUE if the given axis use was found, otherwise %FALSE.
**/
gboolean
gdk_device_get_axis_value (GdkDevice *device,
gdouble *axes,
const char *axis_label,
gdouble *value)
{
gint i;
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
g_return_val_if_fail (device->source != GDK_SOURCE_KEYBOARD, FALSE);
if (axes == NULL)
return FALSE;
for (i = 0; i < device->axes->len; i++)
{
GdkAxisInfo axis_info;
axis_info = g_array_index (device->axes, GdkAxisInfo, i);
if (!g_str_equal (axis_info.label, axis_label))
continue;
if (value)
*value = axes[i];
return TRUE;
}
return FALSE;
}
/**
* gdk_device_get_axis: (skip)
* @device: a #GdkDevice
@@ -1293,7 +997,6 @@ _gdk_device_reset_axes (GdkDevice *device)
guint
_gdk_device_add_axis (GdkDevice *device,
const char *label_name,
GdkAxisUse use,
gdouble min_value,
gdouble max_value,
@@ -1303,7 +1006,6 @@ _gdk_device_add_axis (GdkDevice *device,
guint pos;
axis_info.use = use;
axis_info.label = g_strdup (label_name);
axis_info.min_value = min_value;
axis_info.max_value = max_value;
axis_info.resolution = resolution;
@@ -1339,12 +1041,11 @@ _gdk_device_add_axis (GdkDevice *device,
void
_gdk_device_get_axis_info (GdkDevice *device,
guint index_,
const char **label_name,
GdkAxisUse *use,
gdouble *min_value,
gdouble *max_value,
gdouble *resolution)
guint index_,
GdkAxisUse *use,
gdouble *min_value,
gdouble *max_value,
gdouble *resolution)
{
GdkAxisInfo *info;
@@ -1353,23 +1054,12 @@ _gdk_device_get_axis_info (GdkDevice *device,
info = &g_array_index (device->axes, GdkAxisInfo, index_);
*label_name = info->label;
*use = info->use;
*min_value = info->min_value;
*max_value = info->max_value;
*resolution = info->resolution;
}
void
_gdk_device_set_keys (GdkDevice *device,
guint num_keys)
{
g_free (device->keys);
device->num_keys = num_keys;
device->keys = g_new0 (GdkDeviceKey, num_keys);
}
static GdkAxisInfo *
find_axis_info (GArray *array,
GdkAxisUse use)
@@ -1390,10 +1080,10 @@ find_axis_info (GArray *array,
gboolean
_gdk_device_translate_surface_coord (GdkDevice *device,
GdkSurface *surface,
guint index_,
gdouble value,
gdouble *axis_value)
GdkSurface *surface,
guint index_,
gdouble value,
gdouble *axis_value)
{
GdkAxisInfo axis_info;
GdkAxisInfo *axis_info_x, *axis_info_y;
+4 -36
View File
@@ -85,22 +85,20 @@ typedef enum {
GDK_DEVICE_TYPE_FLOATING
} GdkDeviceType;
/* We don't allocate each coordinate this big, but we use it to
* be ANSI compliant and avoid accessing past the defined limits.
*/
#define GDK_MAX_TIMECOORD_AXES 128
/**
* GdkTimeCoord:
* @time: The timestamp for this event.
* @axes: the values of the devices axes.
* @flags: Flags indicating what axes are present
* @axes: axis values
*
* A #GdkTimeCoord stores a single event in a motion history.
*/
struct _GdkTimeCoord
{
guint32 time;
gdouble axes[GDK_MAX_TIMECOORD_AXES];
GdkAxisFlags flags;
double axes[GDK_AXIS_LAST];
};
GDK_AVAILABLE_IN_ALL
@@ -115,26 +113,9 @@ gboolean gdk_device_get_has_cursor (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
GdkInputSource gdk_device_get_source (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
gint gdk_device_get_n_keys (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
gboolean gdk_device_get_key (GdkDevice *device,
guint index_,
guint *keyval,
GdkModifierType *modifiers);
GDK_AVAILABLE_IN_ALL
void gdk_device_set_key (GdkDevice *device,
guint index_,
guint keyval,
GdkModifierType modifiers);
GDK_AVAILABLE_IN_ALL
GdkAxisUse gdk_device_get_axis_use (GdkDevice *device,
guint index_);
GDK_AVAILABLE_IN_ALL
void gdk_device_set_axis_use (GdkDevice *device,
guint index_,
GdkAxisUse use);
GDK_AVAILABLE_IN_ALL
@@ -146,25 +127,12 @@ GDK_AVAILABLE_IN_ALL
GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device,
double *win_x,
double *win_y);
GDK_AVAILABLE_IN_ALL
gboolean gdk_device_get_history (GdkDevice *device,
GdkSurface *surface,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events);
GDK_AVAILABLE_IN_ALL
void gdk_device_free_history (GdkTimeCoord **events,
gint n_events);
GDK_AVAILABLE_IN_ALL
gint gdk_device_get_n_axes (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
char ** gdk_device_get_axis_names (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
gboolean gdk_device_get_axis_value (GdkDevice *device,
gdouble *axes,
const char *axis_label,
gdouble *value);
GDK_AVAILABLE_IN_ALL
+5 -26
View File
@@ -31,13 +31,6 @@ G_BEGIN_DECLS
#define GDK_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_DEVICE, GdkDeviceClass))
typedef struct _GdkDeviceClass GdkDeviceClass;
typedef struct _GdkDeviceKey GdkDeviceKey;
struct _GdkDeviceKey
{
guint keyval;
GdkModifierType modifiers;
};
struct _GdkDevice
{
@@ -46,9 +39,7 @@ struct _GdkDevice
gchar *name;
GdkInputSource source;
gboolean has_cursor;
gint num_keys;
GdkAxisFlags axis_flags;
GdkDeviceKey *keys;
GdkDisplay *display;
/* Paired master for master,
* associated master for slaves
@@ -70,13 +61,6 @@ struct _GdkDeviceClass
{
GObjectClass parent_class;
gboolean (* get_history) (GdkDevice *device,
GdkSurface *surface,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events);
void (* get_state) (GdkDevice *device,
GdkSurface *surface,
gdouble *axes,
@@ -113,21 +97,16 @@ void _gdk_device_set_associated_device (GdkDevice *device,
void _gdk_device_reset_axes (GdkDevice *device);
guint _gdk_device_add_axis (GdkDevice *device,
const char *label_atom,
GdkAxisUse use,
gdouble min_value,
gdouble max_value,
gdouble resolution);
void _gdk_device_get_axis_info (GdkDevice *device,
guint index,
const char**label_atom,
GdkAxisUse *use,
gdouble *min_value,
gdouble *max_value,
gdouble *resolution);
void _gdk_device_set_keys (GdkDevice *device,
guint num_keys);
guint index,
GdkAxisUse *use,
gdouble *min_value,
gdouble *max_value,
gdouble *resolution);
gboolean _gdk_device_translate_surface_coord (GdkDevice *device,
GdkSurface *surface,
+149 -17
View File
@@ -619,6 +619,114 @@ _gdk_event_unqueue (GdkDisplay *display)
return event;
}
/*
* If the last N events in the event queue are smooth scroll events
* for the same surface and device, combine them into one.
*/
void
gdk_event_queue_handle_scroll_compression (GdkDisplay *display)
{
GList *l;
GdkSurface *surface = NULL;
GdkDevice *device = NULL;
GdkEvent *last_event = NULL;
GList *scrolls = NULL;
double delta_x, delta_y;
GArray *history = NULL;
GdkTimeCoord hist;
l = g_queue_peek_tail_link (&display->queued_events);
while (l)
{
GdkEvent *event = l->data;
if (event->flags & GDK_EVENT_PENDING)
break;
if (event->event_type != GDK_SCROLL ||
gdk_scroll_event_get_direction (event) != GDK_SCROLL_SMOOTH)
break;
if (surface != NULL &&
surface != event->surface)
break;
if (device != NULL &&
device != event->device)
break;
if (!last_event)
last_event = event;
surface = event->surface;
device = event->device;
scrolls = l;
l = l->prev;
}
delta_x = delta_y = 0;
while (scrolls && scrolls->next != NULL)
{
GdkEvent *event = scrolls->data;
GList *next = scrolls->next;
double dx, dy;
if (!history)
history = g_array_new (FALSE, TRUE, sizeof (GdkTimeCoord));
gdk_scroll_event_get_deltas (event, &dx, &dy);
delta_x += dx;
delta_y += dy;
memset (&hist, 0, sizeof (GdkTimeCoord));
hist.time = gdk_event_get_time (event);
hist.flags = GDK_AXIS_FLAG_DELTA_X | GDK_AXIS_FLAG_DELTA_Y;
hist.axes[GDK_AXIS_DELTA_X] = dx;
hist.axes[GDK_AXIS_DELTA_Y] = dy;
g_array_append_val (history, hist);
gdk_event_unref (event);
g_queue_delete_link (&display->queued_events, scrolls);
scrolls = next;
}
if (scrolls)
{
GdkEvent *old_event, *event;
double dx, dy;
old_event = scrolls->data;
gdk_scroll_event_get_deltas (old_event, &dx, &dy);
event = gdk_scroll_event_new (surface,
device,
gdk_event_get_source_device (old_event),
gdk_event_get_device_tool (old_event),
gdk_event_get_time (old_event),
gdk_event_get_modifier_state (old_event),
delta_x + dx,
delta_y + dy,
gdk_scroll_event_is_stop (old_event));
((GdkScrollEvent *)event)->history = history;
g_queue_delete_link (&display->queued_events, scrolls);
g_queue_push_tail (&display->queued_events, event);
}
if (g_queue_get_length (&display->queued_events) == 1 &&
g_queue_peek_head_link (&display->queued_events) == scrolls)
{
GdkFrameClock *clock = gdk_surface_get_frame_clock (surface);
if (clock) /* might be NULL if surface was destroyed */
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
}
}
static void
gdk_motion_event_push_history (GdkEvent *event,
GdkEvent *history_event)
@@ -634,14 +742,20 @@ gdk_motion_event_push_history (GdkEvent *event,
device = gdk_event_get_device (history_event);
n_axes = gdk_device_get_n_axes (device);
for (i = 0; i <= MIN (n_axes, GDK_MAX_TIMECOORD_AXES); i++)
gdk_event_get_axis (history_event, i, &hist.axes[i]);
memset (&hist, 0, sizeof (GdkTimeCoord));
hist.time = gdk_event_get_time (history_event);
hist.flags = gdk_device_get_axes (device);
for (i = 0; i < n_axes; i++)
{
GdkAxisUse use = gdk_device_get_axis_use (device, i);
gdk_event_get_axis (history_event, use, &hist.axes[use]);
}
if (G_UNLIKELY (!self->history))
self->history = g_array_new (FALSE, TRUE, sizeof (GdkTimeCoord));
g_array_append_val (self->history, hist);
}
void
@@ -710,7 +824,7 @@ _gdk_event_queue_handle_motion_compression (GdkDisplay *display)
{
GdkFrameClock *clock = gdk_surface_get_frame_clock (pending_motion_surface);
if (clock) /* might be NULL if surface was destroyed */
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS);
}
}
@@ -2158,6 +2272,8 @@ gdk_scroll_event_finalize (GdkEvent *event)
GdkScrollEvent *self = (GdkScrollEvent *) event;
g_clear_object (&self->tool);
if (self->history)
g_array_free (self->history, TRUE);
GDK_EVENT_SUPER (self)->finalize (event);
}
@@ -2777,35 +2893,51 @@ gdk_motion_event_new (GdkSurface *surface,
}
/**
* gdk_motion_event_get_history:
* @event: (type GdkMotionEvent): a motion #GdkEvent
* gdk_event_get_history:
* @event: a motion or scroll #GdkEvent
* @out_n_coords: (out): Return location for the length of the returned array
*
* Retrieves the history of the @event motion, as a list of time and
* coordinates.
* Retrieves the history of the @event, as a list of time and coordinates.
*
* The history includes events that are not delivered to the application
* because they occurred in the same frame as @event.
*
* Note that only motion and scroll events record history, and motion
* events only if one of the mouse buttons is down.
*
* Returns: (transfer container) (array length=out_n_coords) (nullable): an
* array of time and coordinates
*/
GdkTimeCoord *
gdk_motion_event_get_history (GdkEvent *event,
guint *out_n_coords)
gdk_event_get_history (GdkEvent *event,
guint *out_n_coords)
{
GdkMotionEvent *self = (GdkMotionEvent *) event;
GArray *history;
g_return_val_if_fail (GDK_IS_EVENT (event), NULL);
g_return_val_if_fail (GDK_IS_EVENT_TYPE (event, GDK_MOTION_NOTIFY), NULL);
g_return_val_if_fail (GDK_IS_EVENT_TYPE (event, GDK_MOTION_NOTIFY) ||
GDK_IS_EVENT_TYPE (event, GDK_SCROLL), NULL);
g_return_val_if_fail (out_n_coords != NULL, NULL);
if (self->history &&
self->history->len > 0)
if (GDK_IS_EVENT_TYPE (event, GDK_MOTION_NOTIFY))
{
GdkMotionEvent *self = (GdkMotionEvent *) event;
history = self->history;
}
else
{
GdkScrollEvent *self = (GdkScrollEvent *) event;
history = self->history;
}
if (history && history->len > 0)
{
GdkTimeCoord *result;
*out_n_coords = self->history->len;
*out_n_coords = history->len;
result = g_malloc (sizeof (GdkTimeCoord) * self->history->len);
memcpy (result, self->history->data, sizeof (GdkTimeCoord) * self->history->len);
result = g_malloc (sizeof (GdkTimeCoord) * history->len);
memcpy (result, history->data, sizeof (GdkTimeCoord) * history->len);
return result;
}
+4 -3
View File
@@ -378,6 +378,9 @@ gboolean gdk_event_get_axis (GdkEvent *event,
GdkAxisUse axis_use,
double *value);
GDK_AVAILABLE_IN_ALL
GdkTimeCoord * gdk_event_get_history (GdkEvent *event,
guint *out_n_coords);
GDK_AVAILABLE_IN_ALL
gboolean gdk_event_get_pointer_emulated (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
@@ -392,6 +395,7 @@ GDK_AVAILABLE_IN_ALL
void gdk_scroll_event_get_deltas (GdkEvent *event,
double *delta_x,
double *delta_y);
GDK_AVAILABLE_IN_ALL
gboolean gdk_scroll_event_is_stop (GdkEvent *event);
GDK_AVAILABLE_IN_ALL
@@ -470,9 +474,6 @@ gboolean gdk_grab_broken_event_get_implicit (GdkEvent *event)
GDK_AVAILABLE_IN_ALL
GType gdk_motion_event_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkTimeCoord * gdk_motion_event_get_history (GdkEvent *event,
guint *out_n_coords);
GDK_AVAILABLE_IN_ALL
GType gdk_delete_event_get_type (void) G_GNUC_CONST;
+4
View File
@@ -211,6 +211,9 @@ struct _GdkTouchEvent
* @pointer_emulated: whether the scroll event was the result of
* a pointer emulation
* @tool: a #GdkDeviceTool
* @history: (element-type GdkScrollHistory): array of times and deltas
* for other scroll events that were compressed before delivering the
* current event
*
* Generated from button presses for the buttons 4 to 7. Wheel mice are
* usually configured to generate button press events for buttons 4 and 5
@@ -232,6 +235,7 @@ struct _GdkScrollEvent
gboolean pointer_emulated;
gboolean is_stop;
GdkDeviceTool *tool;
GArray *history; /* <GdkScrollHistory> */
};
/*
+1
View File
@@ -123,6 +123,7 @@ GList* _gdk_event_queue_append (GdkDisplay *display,
GdkEvent *event);
void _gdk_event_queue_handle_motion_compression (GdkDisplay *display);
void gdk_event_queue_handle_scroll_compression (GdkDisplay *display);
void _gdk_event_queue_flush (GdkDisplay *display);
gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface,
+1
View File
@@ -2366,6 +2366,7 @@ _gdk_windowing_got_event (GdkDisplay *display,
* candidate it queues up flushing the event queue.
*/
_gdk_event_queue_handle_motion_compression (display);
gdk_event_queue_handle_scroll_compression (display);
}
/**
+8
View File
@@ -247,6 +247,8 @@ typedef enum {
* @GDK_AXIS_IGNORE: the axis is ignored.
* @GDK_AXIS_X: the axis is used as the x axis.
* @GDK_AXIS_Y: the axis is used as the y axis.
* @GDK_AXIS_DELTA_X: the axis is used as the scroll x delta
* @GDK_AXIS_DELTA_Y: the axis is used as the scroll y delta
* @GDK_AXIS_PRESSURE: the axis is used for pressure information.
* @GDK_AXIS_XTILT: the axis is used for x tilt information.
* @GDK_AXIS_YTILT: the axis is used for y tilt information.
@@ -269,6 +271,8 @@ typedef enum
GDK_AXIS_IGNORE,
GDK_AXIS_X,
GDK_AXIS_Y,
GDK_AXIS_DELTA_X,
GDK_AXIS_DELTA_Y,
GDK_AXIS_PRESSURE,
GDK_AXIS_XTILT,
GDK_AXIS_YTILT,
@@ -283,6 +287,8 @@ typedef enum
* GdkAxisFlags:
* @GDK_AXIS_FLAG_X: X axis is present
* @GDK_AXIS_FLAG_Y: Y axis is present
* @GDK_AXIS_FLAG_DELTA_X: Scroll X delta axis is present
* @GDK_AXIS_FLAG_DELTA_Y: Scroll Y delta axis is present
* @GDK_AXIS_FLAG_PRESSURE: Pressure axis is present
* @GDK_AXIS_FLAG_XTILT: X tilt axis is present
* @GDK_AXIS_FLAG_YTILT: Y tilt axis is present
@@ -297,6 +303,8 @@ typedef enum
{
GDK_AXIS_FLAG_X = 1 << GDK_AXIS_X,
GDK_AXIS_FLAG_Y = 1 << GDK_AXIS_Y,
GDK_AXIS_FLAG_DELTA_X = 1 << GDK_AXIS_DELTA_X,
GDK_AXIS_FLAG_DELTA_Y = 1 << GDK_AXIS_DELTA_Y,
GDK_AXIS_FLAG_PRESSURE = 1 << GDK_AXIS_PRESSURE,
GDK_AXIS_FLAG_XTILT = 1 << GDK_AXIS_XTILT,
GDK_AXIS_FLAG_YTILT = 1 << GDK_AXIS_YTILT,
+12 -25
View File
@@ -309,17 +309,6 @@ static void deliver_key_event (GdkWaylandSeat *seat,
uint32_t state,
gboolean from_key_repeat);
static gboolean
gdk_wayland_device_get_history (GdkDevice *device,
GdkSurface *surface,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events)
{
return FALSE;
}
static void
gdk_wayland_device_get_state (GdkDevice *device,
GdkSurface *surface,
@@ -828,7 +817,6 @@ gdk_wayland_device_class_init (GdkWaylandDeviceClass *klass)
{
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
device_class->get_history = gdk_wayland_device_get_history;
device_class->get_state = gdk_wayland_device_get_state;
device_class->set_surface_cursor = gdk_wayland_device_set_surface_cursor;
device_class->query_state = gdk_wayland_device_query_state;
@@ -844,8 +832,8 @@ gdk_wayland_device_init (GdkWaylandDevice *device_core)
device = GDK_DEVICE (device_core);
_gdk_device_add_axis (device, NULL, GDK_AXIS_X, 0, 0, 1);
_gdk_device_add_axis (device, NULL, GDK_AXIS_Y, 0, 0, 1);
_gdk_device_add_axis (device, GDK_AXIS_X, 0, 0, 1);
_gdk_device_add_axis (device, GDK_AXIS_Y, 0, 0, 1);
}
static gint
@@ -3398,42 +3386,42 @@ gdk_wayland_device_tablet_clone_tool_axes (GdkWaylandTabletData *tablet,
g_object_freeze_notify (G_OBJECT (tablet->current_device));
_gdk_device_reset_axes (tablet->current_device);
_gdk_device_add_axis (tablet->current_device, NULL, GDK_AXIS_X, 0, 0, 0);
_gdk_device_add_axis (tablet->current_device, NULL, GDK_AXIS_Y, 0, 0, 0);
_gdk_device_add_axis (tablet->current_device, GDK_AXIS_X, 0, 0, 0);
_gdk_device_add_axis (tablet->current_device, GDK_AXIS_Y, 0, 0, 0);
if (tool->tool_axes & (GDK_AXIS_FLAG_XTILT | GDK_AXIS_FLAG_YTILT))
{
axis_pos = _gdk_device_add_axis (tablet->current_device, NULL,
axis_pos = _gdk_device_add_axis (tablet->current_device,
GDK_AXIS_XTILT, -90, 90, 0);
tablet->axis_indices[GDK_AXIS_XTILT] = axis_pos;
axis_pos = _gdk_device_add_axis (tablet->current_device, NULL,
axis_pos = _gdk_device_add_axis (tablet->current_device,
GDK_AXIS_YTILT, -90, 90, 0);
tablet->axis_indices[GDK_AXIS_YTILT] = axis_pos;
}
if (tool->tool_axes & GDK_AXIS_FLAG_DISTANCE)
{
axis_pos = _gdk_device_add_axis (tablet->current_device, NULL,
axis_pos = _gdk_device_add_axis (tablet->current_device,
GDK_AXIS_DISTANCE, 0, 65535, 0);
tablet->axis_indices[GDK_AXIS_DISTANCE] = axis_pos;
}
if (tool->tool_axes & GDK_AXIS_FLAG_PRESSURE)
{
axis_pos = _gdk_device_add_axis (tablet->current_device, NULL,
axis_pos = _gdk_device_add_axis (tablet->current_device,
GDK_AXIS_PRESSURE, 0, 65535, 0);
tablet->axis_indices[GDK_AXIS_PRESSURE] = axis_pos;
}
if (tool->tool_axes & GDK_AXIS_FLAG_ROTATION)
{
axis_pos = _gdk_device_add_axis (tablet->current_device, NULL,
axis_pos = _gdk_device_add_axis (tablet->current_device,
GDK_AXIS_ROTATION, 0, 360, 0);
tablet->axis_indices[GDK_AXIS_ROTATION] = axis_pos;
}
if (tool->tool_axes & GDK_AXIS_FLAG_SLIDER)
{
axis_pos = _gdk_device_add_axis (tablet->current_device, NULL,
axis_pos = _gdk_device_add_axis (tablet->current_device,
GDK_AXIS_SLIDER, -65535, 65535, 0);
tablet->axis_indices[GDK_AXIS_SLIDER] = axis_pos;
}
@@ -3452,7 +3440,6 @@ gdk_wayland_mimic_device_axes (GdkDevice *master,
GdkDevice *slave)
{
gdouble axis_min, axis_max, axis_resolution;
const char *axis_label;
GdkAxisUse axis_use;
gint axis_count;
gint i;
@@ -3463,9 +3450,9 @@ gdk_wayland_mimic_device_axes (GdkDevice *master,
for (i = 0; i < axis_count; i++)
{
_gdk_device_get_axis_info (slave, i, &axis_label, &axis_use, &axis_min,
_gdk_device_get_axis_info (slave, i, &axis_use, &axis_min,
&axis_max, &axis_resolution);
_gdk_device_add_axis (master, axis_label, axis_use, axis_min,
_gdk_device_add_axis (master, axis_use, axis_min,
axis_max, axis_resolution);
}
+6 -23
View File
@@ -32,11 +32,10 @@ G_DEFINE_TYPE (GdkDeviceVirtual, gdk_device_virtual, GDK_TYPE_DEVICE)
void
_gdk_device_virtual_set_active (GdkDevice *device,
GdkDevice *new_active)
GdkDevice *new_active)
{
GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device);
int n_axes, i;
const char *label_atom;
GdkAxisUse use;
gdouble min_value, max_value, resolution;
@@ -50,31 +49,16 @@ _gdk_device_virtual_set_active (GdkDevice *device,
_gdk_device_reset_axes (device);
n_axes = gdk_device_get_n_axes (new_active);
for (i = 0; i < n_axes; i++)
{
_gdk_device_get_axis_info (new_active, i,
&label_atom, &use,
&min_value, &max_value, &resolution);
_gdk_device_add_axis (device,
label_atom, use,
min_value, max_value, resolution);
}
{
_gdk_device_get_axis_info (new_active, i, &use,
&min_value, &max_value, &resolution);
_gdk_device_add_axis (device, use, min_value, max_value, resolution);
}
}
g_signal_emit_by_name (G_OBJECT (device), "changed");
}
static gboolean
gdk_device_virtual_get_history (GdkDevice *device,
GdkSurface *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events)
{
/* History is only per slave device */
return FALSE;
}
static void
gdk_device_virtual_get_state (GdkDevice *device,
GdkSurface *window,
@@ -188,7 +172,6 @@ gdk_device_virtual_class_init (GdkDeviceVirtualClass *klass)
{
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
device_class->get_history = gdk_device_virtual_get_history;
device_class->get_state = gdk_device_virtual_get_state;
device_class->set_surface_cursor = gdk_device_virtual_set_surface_cursor;
device_class->query_state = gdk_device_virtual_query_state;
+2 -14
View File
@@ -29,17 +29,6 @@
G_DEFINE_TYPE (GdkDeviceWin32, gdk_device_win32, GDK_TYPE_DEVICE)
static gboolean
gdk_device_win32_get_history (GdkDevice *device,
GdkSurface *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events)
{
return FALSE;
}
static void
gdk_device_win32_get_state (GdkDevice *device,
GdkSurface *window,
@@ -235,7 +224,6 @@ gdk_device_win32_class_init (GdkDeviceWin32Class *klass)
{
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
device_class->get_history = gdk_device_win32_get_history;
device_class->get_state = gdk_device_win32_get_state;
device_class->set_surface_cursor = gdk_device_win32_set_surface_cursor;
device_class->query_state = gdk_device_win32_query_state;
@@ -251,6 +239,6 @@ gdk_device_win32_init (GdkDeviceWin32 *device_win32)
device = GDK_DEVICE (device_win32);
_gdk_device_add_axis (device, NULL, GDK_AXIS_X, 0, 0, 1);
_gdk_device_add_axis (device, NULL, GDK_AXIS_Y, 0, 0, 1);
_gdk_device_add_axis (device, GDK_AXIS_X, 0, 0, 1);
_gdk_device_add_axis (device, GDK_AXIS_Y, 0, 0, 1);
}
-12
View File
@@ -28,17 +28,6 @@
G_DEFINE_TYPE (GdkDeviceWintab, gdk_device_wintab, GDK_TYPE_DEVICE)
static gboolean
gdk_device_wintab_get_history (GdkDevice *device,
GdkSurface *window,
guint32 start,
guint32 stop,
GdkTimeCoord ***events,
gint *n_events)
{
return FALSE;
}
static GdkModifierType
get_current_mask (void)
{
@@ -267,7 +256,6 @@ gdk_device_wintab_class_init (GdkDeviceWintabClass *klass)
{
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
device_class->get_history = gdk_device_wintab_get_history;
device_class->get_state = gdk_device_wintab_get_state;
device_class->set_surface_cursor = gdk_device_wintab_set_surface_cursor;
device_class->query_state = gdk_device_wintab_query_state;
-5
View File
@@ -577,7 +577,6 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager)
if (device->pktdata & PK_X)
{
_gdk_device_add_axis (GDK_DEVICE (device),
NULL,
GDK_AXIS_X,
axis_x.axMin,
axis_x.axMax,
@@ -588,7 +587,6 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager)
if (device->pktdata & PK_Y)
{
_gdk_device_add_axis (GDK_DEVICE (device),
NULL,
GDK_AXIS_Y,
axis_y.axMin,
axis_y.axMax,
@@ -600,7 +598,6 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager)
if (device->pktdata & PK_NORMAL_PRESSURE)
{
_gdk_device_add_axis (GDK_DEVICE (device),
NULL,
GDK_AXIS_PRESSURE,
axis_npressure.axMin,
axis_npressure.axMax,
@@ -617,14 +614,12 @@ wintab_init_check (GdkDeviceManagerWin32 *device_manager)
* we convert to x and y tilt in the -1000..1000 range
*/
_gdk_device_add_axis (GDK_DEVICE (device),
NULL,
GDK_AXIS_XTILT,
-1000,
1000,
1000);
_gdk_device_add_axis (GDK_DEVICE (device),
NULL,
GDK_AXIS_YTILT,
-1000,
1000,
+12 -14
View File
@@ -211,7 +211,6 @@ translate_valuator_class (GdkDisplay *display,
static gboolean initialized = FALSE;
static Atom label_atoms [GDK_AXIS_LAST] = { 0 };
GdkAxisUse use = GDK_AXIS_IGNORE;
const char *label;
gint i;
if (!initialized)
@@ -234,13 +233,18 @@ translate_valuator_class (GdkDisplay *display,
}
}
if (valuator_label != None)
label = gdk_x11_get_xatom_name_for_display (display, valuator_label);
else
label = NULL;
_gdk_device_add_axis (device, use, min, max, resolution);
GDK_DISPLAY_NOTE (display, INPUT,
{
const char *label;
_gdk_device_add_axis (device, label, use, min, max, resolution);
GDK_DISPLAY_NOTE (display, INPUT, g_message ("\n\taxis: %s %s", label, use == GDK_AXIS_IGNORE ? "(ignored)" : "(used)"));
if (valuator_label != None)
label = gdk_x11_get_xatom_name_for_display (display, valuator_label);
else
label = NULL;
g_message ("\n\taxis: %s %s", label, use == GDK_AXIS_IGNORE ? "(ignored)" : "(used)");
});
}
static void
@@ -261,13 +265,7 @@ translate_device_classes (GdkDisplay *display,
{
case XIKeyClass:
{
XIKeyClassInfo *key_info = (XIKeyClassInfo *) class_info;
gint j;
_gdk_device_set_keys (device, key_info->num_keycodes);
for (j = 0; j < key_info->num_keycodes; j++)
gdk_device_set_key (device, j, key_info->keycodes[j], 0);
/* Not used */
}
break;
case XIValuatorClass:
+4 -1
View File
@@ -353,6 +353,7 @@
#include "gtkprivate.h"
#include "gtksnapshot.h"
#include "gtkstylecontext.h"
#include "gtknative.h"
#include <gobject/gvaluecollector.h>
@@ -1043,6 +1044,7 @@ gtk_cell_area_real_event (GtkCellArea *area,
GtkCellRenderer *focus_renderer;
GdkRectangle alloc_area;
double event_x, event_y;
double nx, ny;
double x, y;
GtkNative *native;
@@ -1051,7 +1053,8 @@ gtk_cell_area_real_event (GtkCellArea *area,
gdk_event_get_position (event, &event_x, &event_y);
native = gtk_widget_get_native (widget);
gtk_widget_translate_coordinates (GTK_WIDGET (native), widget, event_x, event_y, &x, &y);
gtk_native_get_surface_transform (native, &nx, &ny);
gtk_widget_translate_coordinates (GTK_WIDGET (native), widget, event_x - nx, event_y - ny, &x, &y);
event_x = x;
event_y = y;
-2
View File
@@ -1527,7 +1527,6 @@ get_layout (GtkCellRendererText *celltext,
uline = PANGO_UNDERLINE_DOUBLE;
break;
#if PANGO_VERSION_CHECK(1,45,0)
case PANGO_UNDERLINE_SINGLE_LINE:
uline = PANGO_UNDERLINE_DOUBLE_LINE;
break;
@@ -1535,7 +1534,6 @@ get_layout (GtkCellRendererText *celltext,
case PANGO_UNDERLINE_DOUBLE_LINE:
case PANGO_UNDERLINE_ERROR_LINE:
break;
#endif
case PANGO_UNDERLINE_DOUBLE:
case PANGO_UNDERLINE_LOW:
+1 -1
View File
@@ -25,7 +25,7 @@
#include "gtkcssstyleprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtkcsstypesprivate.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
#include "gtkpicture.h"
#include "gtkcssboxesimplprivate.h"
#include "gtkcssnumbervalueprivate.h"
+6 -2
View File
@@ -88,7 +88,11 @@
* </items>
* </object>
* ]|
*
* * # CSS nodes
*
* GtkDropDown has a single CSS node with name dropdown,
* with the button and popover nodes as children.
*/
struct _GtkDropDown
@@ -526,7 +530,7 @@ gtk_drop_down_class_init (GtkDropDownClass *klass)
gtk_widget_class_bind_template_callback (widget_class, search_changed);
gtk_widget_class_bind_template_callback (widget_class, search_stop);
gtk_widget_class_set_css_name (widget_class, I_("combobox"));
gtk_widget_class_set_css_name (widget_class, I_("dropdown"));
}
static void
+1
View File
@@ -489,6 +489,7 @@ gtk_file_chooser_native_get_property (GObject *object,
break;
case GTK_FILE_CHOOSER_PROP_FILTER:
self->current_filter = gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (self->dialog));
g_value_set_object (value, self->current_filter);
break;
+3 -3
View File
@@ -278,8 +278,8 @@ gtk_gesture_stylus_get_axes (GtkGestureStylus *gesture,
**/
gboolean
gtk_gesture_stylus_get_backlog (GtkGestureStylus *gesture,
GdkTimeCoord **backlog,
guint *n_elems)
GdkTimeCoord **backlog,
guint *n_elems)
{
GdkEvent *event;
GArray *backlog_array;
@@ -292,7 +292,7 @@ gtk_gesture_stylus_get_backlog (GtkGestureStylus *gesture,
event = gesture_get_current_event (gesture);
if (event && GDK_IS_EVENT_TYPE (event, GDK_MOTION_NOTIFY))
history = gdk_motion_event_get_history (event, &n_coords);
history = gdk_event_get_history (event, &n_coords);
if (!history)
return FALSE;
+5 -5
View File
@@ -94,15 +94,15 @@ _gtk_gesture_zoom_get_distance (GtkGestureZoom *zoom,
goto out;
last_event = gtk_gesture_get_last_event (gesture, sequences->data);
phase = gdk_touchpad_event_get_gesture_phase (last_event);
if (gdk_event_get_event_type (last_event) == GDK_TOUCHPAD_PINCH &&
(phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN ||
phase == GDK_TOUCHPAD_GESTURE_PHASE_UPDATE ||
phase == GDK_TOUCHPAD_GESTURE_PHASE_END))
if (gdk_event_get_event_type (last_event) == GDK_TOUCHPAD_PINCH)
{
double scale;
/* Touchpad pinch */
phase = gdk_touchpad_event_get_gesture_phase (last_event);
if (phase == GDK_TOUCHPAD_GESTURE_PHASE_CANCEL)
goto out;
scale = gdk_touchpad_event_get_pinch_scale (last_event);
*distance = scale;
+1 -21
View File
@@ -81,7 +81,6 @@ gtk_icon_cache_new_for_path (const gchar *path)
GMappedFile *map;
gchar *cache_filename;
gint fd = -1;
GStatBuf st;
GStatBuf path_st;
@@ -93,24 +92,7 @@ gtk_icon_cache_new_for_path (const gchar *path)
if (g_stat (path, &path_st) < 0)
goto done;
/* Open the file and map it into memory */
fd = g_open (cache_filename, O_RDONLY|_O_BINARY, 0);
if (fd < 0)
goto done;
#ifdef G_OS_WIN32
/* Bug 660730: _fstat32 is only defined in msvcrt80.dll+/VS 2005+ */
/* or possibly in the msvcrt.dll linked to by the Windows DDK */
/* (will need to check on the Windows DDK part later) */
#if ((defined (_MSC_VER) && (_MSC_VER >= 1400 || __MSVCRT_VERSION__ >= 0x0800)) || defined (__MINGW64_VERSION_MAJOR)) && !defined(_WIN64)
#undef fstat /* Just in case */
#define fstat _fstat32
#endif
#endif
if (fstat (fd, &st) < 0 || st.st_size < 4)
if (g_stat (cache_filename, &st) < 0 || st.st_size < 4)
goto done;
/* Verify cache is uptodate */
@@ -154,8 +136,6 @@ gtk_icon_cache_new_for_path (const gchar *path)
done:
g_free (cache_filename);
if (fd >= 0)
close (fd);
return cache;
}
+3 -4
View File
@@ -1389,10 +1389,9 @@ gtk_list_base_stop_rubberband (GtkListBase *self)
}
else
{
if (!priv->rubberband->extend)
gtk_selection_model_unselect_all (model);
gtk_selection_model_select_callback (model, range_cb, priv->rubberband->active);
gtk_selection_model_select_callback (model,
!priv->rubberband->extend,
range_cb, priv->rubberband->active);
}
g_clear_pointer (&priv->rubberband, rubberband_data_free);
+1 -10
View File
@@ -395,7 +395,6 @@ gtk_list_item_manager_add_items (GtkListItemManager *self,
if (item == NULL || item->widget)
item = gtk_rb_tree_insert_before (self->items, item);
item->n_items += n_items;
gtk_rb_tree_node_mark_dirty (item);
@@ -570,12 +569,6 @@ gtk_list_item_manager_ensure_items (GtkListItemManager *self,
gtk_list_item_manager_release_list_item (self, NULL, widget);
}
static void
gtk_list_item_manager_model_selection_changed_cb (GListModel *model,
guint position,
guint n_items,
GtkListItemManager *self);
static void
gtk_list_item_manager_model_items_changed_cb (GListModel *model,
guint position,
@@ -742,8 +735,6 @@ gtk_list_item_manager_model_items_changed_cb (GListModel *model,
g_hash_table_unref (change);
gtk_list_item_manager_model_selection_changed_cb (model, position, added, self);
gtk_widget_queue_resize (self->widget);
}
@@ -988,7 +979,7 @@ gtk_list_item_manager_try_reacquire_list_item (GtkListItemManager *self,
gtk_list_item_widget_update (list_item,
position,
gtk_list_item_widget_get_item (list_item),
gtk_list_item_widget_get_selected (list_item));
gtk_selection_model_is_selected (self->model, position));
gtk_widget_insert_after (result, self->widget, prev_sibling);
/* XXX: Should we let the listview do this? */
gtk_widget_queue_resize (result);
+1 -1
View File
@@ -96,7 +96,7 @@
#include "gsk/gskprivate.h"
#include "gsk/gskrendernodeprivate.h"
#include "gtkarrayimplprivate.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
#include <locale.h>
+11 -2
View File
@@ -175,6 +175,7 @@ gtk_multi_selection_unselect_all (GtkSelectionModel *model)
static gboolean
gtk_multi_selection_add_or_remove (GtkSelectionModel *model,
gboolean unselect_rest,
gboolean add,
GtkSelectionCallback callback,
gpointer data)
@@ -190,6 +191,13 @@ gtk_multi_selection_add_or_remove (GtkSelectionModel *model,
min = G_MAXUINT;
max = 0;
if (unselect_rest)
{
min = gtk_set_get_min (self->selected);
max = gtk_set_get_max (self->selected);
gtk_set_remove_all (self->selected);
}
for (pos = 0; pos < n; pos = start + n_items)
{
callback (pos, &start, &n_items, &in, data);
@@ -223,10 +231,11 @@ gtk_multi_selection_add_or_remove (GtkSelectionModel *model,
static gboolean
gtk_multi_selection_select_callback (GtkSelectionModel *model,
gboolean unselect_rest,
GtkSelectionCallback callback,
gpointer data)
{
return gtk_multi_selection_add_or_remove (model, TRUE, callback, data);
return gtk_multi_selection_add_or_remove (model, unselect_rest, TRUE, callback, data);
}
static gboolean
@@ -234,7 +243,7 @@ gtk_multi_selection_unselect_callback (GtkSelectionModel *model,
GtkSelectionCallback callback,
gpointer data)
{
return gtk_multi_selection_add_or_remove (model, FALSE, callback, data);
return gtk_multi_selection_add_or_remove (model, FALSE, FALSE, callback, data);
}
static void
+1 -1
View File
@@ -19,7 +19,7 @@
#include "config.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
#include "gtkcssnodeprivate.h"
#include "gtkwidgetprivate.h"
#include "gdk/gdk-private.h"
-10
View File
@@ -1,10 +0,0 @@
#ifndef __GTK_NATIVE_PRIVATE_H__
#define __GTK_NATIVE_PRIVATE_H__
#include "gtknative.h"
G_BEGIN_DECLS
G_END_DECLS
#endif /* __GTK_NATIVE_PRIVATE_H__ */
-4
View File
@@ -1241,7 +1241,6 @@ attribute_from_text (GtkBuilder *builder,
if (gtk_builder_value_from_string_type (builder, G_TYPE_INT, value, &val, error))
attribute = pango_attr_background_alpha_new ((guint16)g_value_get_int (&val));
break;
#if PANGO_VERSION_CHECK(1,44,0)
case PANGO_ATTR_ALLOW_BREAKS:
if (gtk_builder_value_from_string_type (builder, G_TYPE_BOOLEAN, value, &val, error))
attribute = pango_attr_allow_breaks_new (g_value_get_boolean (&val));
@@ -1254,8 +1253,6 @@ attribute_from_text (GtkBuilder *builder,
if (gtk_builder_value_from_string_type (builder, G_TYPE_BOOLEAN, value, &val, error))
attribute = pango_attr_insert_hyphens_new (g_value_get_boolean (&val));
break;
#endif
#if PANGO_VERSION_CHECK(1,45,0)
case PANGO_ATTR_OVERLINE:
if (gtk_builder_value_from_string_type (builder, PANGO_TYPE_OVERLINE, value, &val, NULL))
attribute = pango_attr_overline_new (g_value_get_enum (&val));
@@ -1269,7 +1266,6 @@ attribute_from_text (GtkBuilder *builder,
color->blue * 65535);
}
break;
#endif
case PANGO_ATTR_INVALID:
default:
break;
+10 -6
View File
@@ -890,19 +890,20 @@ create_cloud_provider_account_row (GtkPlacesSidebar *sidebar,
{
GIcon *end_icon;
GIcon *start_icon;
const gchar *mount_path;
const gchar *name;
gchar *mount_uri;
gchar *name;
gchar *tooltip;
guint provider_account_status;
start_icon = cloud_providers_account_get_icon (account);
name = cloud_providers_account_get_name (account);
provider_account_status = cloud_providers_account_get_status (account);
mount_uri = cloud_providers_account_get_path (account);
mount_path = cloud_providers_account_get_path (account);
if (start_icon != NULL
&& name != NULL
&& provider_account_status != CLOUD_PROVIDERS_ACCOUNT_STATUS_INVALID
&& mount_uri != NULL)
&& mount_path != NULL)
{
switch (provider_account_status)
{
@@ -922,7 +923,7 @@ create_cloud_provider_account_row (GtkPlacesSidebar *sidebar,
return FALSE;
}
mount_uri = g_strconcat ("file://", mount_uri, NULL);
mount_uri = g_strconcat ("file://", mount_path, NULL);
/* translators: %s is the name of a cloud provider for files */
tooltip = g_strdup_printf (_("Open %s"), name);
@@ -933,6 +934,9 @@ create_cloud_provider_account_row (GtkPlacesSidebar *sidebar,
NULL, NULL, NULL, account, 0,
tooltip);
g_free (tooltip);
g_free (mount_uri);
g_object_unref (end_icon);
return TRUE;
}
else
@@ -3155,8 +3159,8 @@ build_popup_menu_using_gmenu (GtkSidebarRow *row)
if (sidebar->popover)
gtk_widget_unparent (sidebar->popover);
sidebar->popover = gtk_popover_new_from_model (GTK_WIDGET (sidebar),
G_MENU_MODEL (menu));
sidebar->popover = gtk_popover_menu_new_from_model (G_MENU_MODEL (menu));
gtk_widget_set_parent (sidebar->popover, GTK_WIDGET (sidebar));
g_signal_connect (sidebar->popover, "destroy",
G_CALLBACK (on_row_popover_destroy), sidebar);
g_object_unref (sidebar);
+1 -1
View File
@@ -122,7 +122,7 @@
#include "gtkbuildable.h"
#include "gtktooltipprivate.h"
#include "gtkcssboxesimplprivate.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
#include "gtkrender.h"
#include "gtkstylecontextprivate.h"
+16 -4
View File
@@ -210,16 +210,24 @@ gtk_property_selection_unselect_all (GtkSelectionModel *model)
static gboolean
gtk_property_selection_add_or_remove (GtkSelectionModel *model,
gboolean unselect_rest,
gboolean add,
GtkSelectionCallback callback,
gpointer data)
{
GtkPropertySelection *self = GTK_PROPERTY_SELECTION (model);
guint pos, start, n;
guint pos, start, n, n_items;
gboolean in;
guint min, max;
guint i;
n_items = g_list_model_get_n_items (G_LIST_MODEL (self));
if (unselect_rest)
{
for (i = 0; i < n_items; i++)
set_selected (self, i, FALSE);
}
min = G_MAXUINT;
max = 0;
@@ -241,7 +249,10 @@ gtk_property_selection_add_or_remove (GtkSelectionModel *model,
}
while (n > 0);
if (min <= max)
/* FIXME: do better here */
if (unselect_rest)
gtk_selection_model_selection_changed (model, 0, n_items);
else if (min <= max)
gtk_selection_model_selection_changed (model, min, max - min + 1);
return TRUE;
@@ -249,10 +260,11 @@ gtk_property_selection_add_or_remove (GtkSelectionModel *model,
static gboolean
gtk_property_selection_select_callback (GtkSelectionModel *model,
gboolean unselect_rest,
GtkSelectionCallback callback,
gpointer data)
{
return gtk_property_selection_add_or_remove (model, TRUE, callback, data);
return gtk_property_selection_add_or_remove (model, unselect_rest, TRUE, callback, data);
}
static gboolean
@@ -260,7 +272,7 @@ gtk_property_selection_unselect_callback (GtkSelectionModel *model,
GtkSelectionCallback callback,
gpointer data)
{
return gtk_property_selection_add_or_remove (model, FALSE, callback, data);
return gtk_property_selection_add_or_remove (model, FALSE, FALSE, callback, data);
}
static void
+64 -1
View File
@@ -46,6 +46,7 @@ struct _GtkSearchEnginePrivate {
GHashTable *hits;
GtkQuery *query;
GSequence *items;
};
enum
@@ -58,7 +59,46 @@ enum
static guint signals[LAST_SIGNAL];
G_DEFINE_TYPE_WITH_PRIVATE (GtkSearchEngine, _gtk_search_engine, G_TYPE_OBJECT);
static GType
gtk_search_engine_get_item_type (GListModel *list)
{
return G_TYPE_FILE_INFO;
}
static guint
gtk_search_engine_get_n_items (GListModel *list)
{
GtkSearchEngine *self = GTK_SEARCH_ENGINE (list);
return g_sequence_get_length (self->priv->items);
}
static gpointer
gtk_search_engine_get_item (GListModel *list,
guint position)
{
GtkSearchEngine *self = GTK_SEARCH_ENGINE (list);
GSequenceIter *iter;
iter = g_sequence_get_iter_at_pos (self->priv->items, position);
if (g_sequence_iter_is_end (iter))
return NULL;
else
return g_object_ref (g_sequence_get (iter));
}
static void
gtk_search_engine_list_model_init (GListModelInterface *iface)
{
iface->get_item_type = gtk_search_engine_get_item_type;
iface->get_n_items = gtk_search_engine_get_n_items;
iface->get_item = gtk_search_engine_get_item;
}
G_DEFINE_TYPE_WITH_CODE (GtkSearchEngine, _gtk_search_engine, G_TYPE_OBJECT,
G_ADD_PRIVATE (GtkSearchEngine)
G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_search_engine_list_model_init))
static void
set_query (GtkSearchEngine *engine,
@@ -73,9 +113,25 @@ set_query (GtkSearchEngine *engine,
_gtk_search_engine_set_query (engine->priv->model, query);
}
static void
gtk_search_engine_clear_items (GtkSearchEngine *engine)
{
guint n_items;
n_items = g_sequence_get_length (engine->priv->items);
if (n_items > 0)
{
g_sequence_remove_range (g_sequence_get_begin_iter (engine->priv->items),
g_sequence_get_end_iter (engine->priv->items));
g_list_model_items_changed (G_LIST_MODEL (engine), 0, n_items, 0);
}
}
static void
start (GtkSearchEngine *engine)
{
gtk_search_engine_clear_items (engine);
g_hash_table_remove_all (engine->priv->hits);
if (engine->priv->native)
@@ -112,6 +168,7 @@ stop (GtkSearchEngine *engine)
engine->priv->running = FALSE;
gtk_search_engine_clear_items (engine);
g_hash_table_remove_all (engine->priv->hits);
}
@@ -127,6 +184,7 @@ finalize (GObject *object)
g_free (engine->priv->model_error);
g_clear_pointer (&engine->priv->hits, g_hash_table_unref);
g_clear_pointer (&engine->priv->items, g_sequence_free);
g_clear_object (&engine->priv->query);
@@ -201,12 +259,16 @@ hits_added (GtkSearchEngine *engine,
{
hit = _gtk_search_hit_dup (hit);
g_hash_table_add (composite->priv->hits, hit);
g_sequence_append (composite->priv->items, g_object_ref (hit->info));
added = g_list_prepend (added, hit);
}
}
if (added)
{
guint n = g_list_length (added);
g_list_model_items_changed (G_LIST_MODEL (composite), g_sequence_get_length (composite->priv->items) - n, 0, n);
_gtk_search_engine_hits_added (composite, added);
g_list_free (added);
}
@@ -353,6 +415,7 @@ _gtk_search_engine_new (void)
engine->priv->hits = g_hash_table_new_full (search_hit_hash, search_hit_equal,
(GDestroyNotify)_gtk_search_hit_free, NULL);
engine->priv->items = g_sequence_new (g_object_unref);
return engine;
}
+14 -11
View File
@@ -85,7 +85,7 @@ gtk_selection_model_default_is_selected (GtkSelectionModel *model,
static gboolean
gtk_selection_model_default_select_item (GtkSelectionModel *model,
guint position,
gboolean exclusive)
gboolean unselect_rest)
{
return FALSE;
}
@@ -100,7 +100,7 @@ static gboolean
gtk_selection_model_default_select_range (GtkSelectionModel *model,
guint position,
guint n_items,
gboolean exclusive)
gboolean unselect_rest)
{
return FALSE;
}
@@ -115,6 +115,7 @@ gtk_selection_model_default_unselect_range (GtkSelectionModel *model,
static gboolean
gtk_selection_model_default_select_callback (GtkSelectionModel *model,
gboolean unselect_rest,
GtkSelectionCallback callback,
gpointer data)
{
@@ -228,21 +229,21 @@ gtk_selection_model_is_selected (GtkSelectionModel *model,
* gtk_selection_model_select_item:
* @model: a #GtkSelectionModel
* @position: the position of the item to select
* @exclusive: whether previously selected items should be unselected
* @unselect_rest: whether previously selected items should be unselected
*
* Requests to select an item in the model.
*/
gboolean
gtk_selection_model_select_item (GtkSelectionModel *model,
guint position,
gboolean exclusive)
gboolean unselect_rest)
{
GtkSelectionModelInterface *iface;
g_return_val_if_fail (GTK_IS_SELECTION_MODEL (model), 0);
iface = GTK_SELECTION_MODEL_GET_IFACE (model);
return iface->select_item (model, position, exclusive);
return iface->select_item (model, position, unselect_rest);
}
/**
@@ -269,7 +270,7 @@ gtk_selection_model_unselect_item (GtkSelectionModel *model,
* @model: a #GtkSelectionModel
* @position: the first item to select
* @n_items: the number of items to select
* @exclusive: whether previously selected items should be unselected
* @unselect_rest: whether previously selected items should be unselected
*
* Requests to select a range of items in the model.
*/
@@ -277,14 +278,14 @@ gboolean
gtk_selection_model_select_range (GtkSelectionModel *model,
guint position,
guint n_items,
gboolean exclusive)
gboolean unselect_rest)
{
GtkSelectionModelInterface *iface;
g_return_val_if_fail (GTK_IS_SELECTION_MODEL (model), 0);
iface = GTK_SELECTION_MODEL_GET_IFACE (model);
return iface->select_range (model, position, n_items, exclusive);
return iface->select_range (model, position, n_items, unselect_rest);
}
/**
@@ -345,7 +346,8 @@ gtk_selection_model_unselect_all (GtkSelectionModel *model)
/**
* gtk_selection_model_select_callback:
* @model: a #GtkSelectionModel
* @callback: a #GtkSelectionCallback to determine items to select
* @unselect_rest: whether previously selected items should be unselected
* @callback: (scope call): a #GtkSelectionCallback to determine items to select
* @data: data to pass to @callback
*
* Requests to select all items for which @callback returns
@@ -353,18 +355,19 @@ gtk_selection_model_unselect_all (GtkSelectionModel *model)
*/
gboolean
gtk_selection_model_select_callback (GtkSelectionModel *model,
gboolean unselect_rest,
GtkSelectionCallback callback,
gpointer data)
{
g_return_val_if_fail (GTK_IS_SELECTION_MODEL (model), FALSE);
return GTK_SELECTION_MODEL_GET_IFACE (model)->select_callback (model, callback, data);
return GTK_SELECTION_MODEL_GET_IFACE (model)->select_callback (model, unselect_rest, callback, data);
}
/**
* gtk_selection_model_unselect_callback:
* @model: a #GtkSelectionModel
* @callback: a #GtkSelectionCallback to determine items to select
* @callback: (scope call): a #GtkSelectionCallback to determine items to select
* @data: data to pass to @callback
*
* Requests to unselect all items for which @callback returns
+6 -4
View File
@@ -97,19 +97,20 @@ struct _GtkSelectionModelInterface
gboolean (* select_item) (GtkSelectionModel *model,
guint position,
gboolean exclusive);
gboolean unselect_rest);
gboolean (* unselect_item) (GtkSelectionModel *model,
guint position);
gboolean (* select_range) (GtkSelectionModel *model,
guint position,
guint n_items,
gboolean exclusive);
gboolean unselect_rest);
gboolean (* unselect_range) (GtkSelectionModel *model,
guint position,
guint n_items);
gboolean (* select_all) (GtkSelectionModel *model);
gboolean (* unselect_all) (GtkSelectionModel *model);
gboolean (* select_callback) (GtkSelectionModel *model,
gboolean unselect_rest,
GtkSelectionCallback callback,
gpointer data);
gboolean (* unselect_callback) (GtkSelectionModel *model,
@@ -129,7 +130,7 @@ gboolean gtk_selection_model_is_selected (GtkSelectionMod
GDK_AVAILABLE_IN_ALL
gboolean gtk_selection_model_select_item (GtkSelectionModel *model,
guint position,
gboolean exclusive);
gboolean unselect_rest);
GDK_AVAILABLE_IN_ALL
gboolean gtk_selection_model_unselect_item (GtkSelectionModel *model,
guint position);
@@ -137,7 +138,7 @@ GDK_AVAILABLE_IN_ALL
gboolean gtk_selection_model_select_range (GtkSelectionModel *model,
guint position,
guint n_items,
gboolean exclusive);
gboolean unselect_rest);
GDK_AVAILABLE_IN_ALL
gboolean gtk_selection_model_unselect_range (GtkSelectionModel *model,
guint position,
@@ -149,6 +150,7 @@ gboolean gtk_selection_model_unselect_all (GtkSelectionMod
GDK_AVAILABLE_IN_ALL
gboolean gtk_selection_model_select_callback (GtkSelectionModel *model,
gboolean unselect_rest,
GtkSelectionCallback callback,
gpointer data);
GDK_AVAILABLE_IN_ALL
-2
View File
@@ -4772,7 +4772,6 @@ get_tag_for_attributes (PangoAttrIterator *iter)
g_object_set (tag, "underline-rgba", &rgba, NULL);
}
#if PANGO_VERSION_CHECK(1,45,0)
attr = pango_attr_iterator_get (iter, PANGO_ATTR_OVERLINE);
if (attr)
g_object_set (tag, "overline", ((PangoAttrInt*)attr)->value, NULL);
@@ -4790,7 +4789,6 @@ get_tag_for_attributes (PangoAttrIterator *iter)
rgba.alpha = 1.;
g_object_set (tag, "overline-rgba", &rgba, NULL);
}
#endif
attr = pango_attr_iterator_get (iter, PANGO_ATTR_STRIKETHROUGH);
if (attr)
-4
View File
@@ -1597,7 +1597,6 @@ add_generic_attrs (GtkTextLayout *layout,
pango_attr_list_insert (attrs, attr);
}
#if PANGO_VERSION_CHECK(1,45,0)
if (appearance->overline != PANGO_OVERLINE_NONE)
{
attr = pango_attr_overline_new (appearance->overline);
@@ -1619,7 +1618,6 @@ add_generic_attrs (GtkTextLayout *layout,
pango_attr_list_insert (attrs, attr);
}
#endif
if (appearance->strikethrough)
{
@@ -2140,7 +2138,6 @@ add_preedit_attrs (GtkTextLayout *layout,
gdk_rgba_free (appearance.underline_rgba);
appearance.underline_rgba = gdk_rgba_copy (&rgba);
break;
#if PANGO_VERSION_CHECK(1,45,0)
case PANGO_ATTR_OVERLINE:
appearance.overline = ((PangoAttrInt *)attr)->value;
break;
@@ -2150,7 +2147,6 @@ add_preedit_attrs (GtkTextLayout *layout,
gdk_rgba_free (appearance.overline_rgba);
appearance.overline_rgba = gdk_rgba_copy (&rgba);
break;
#endif
case PANGO_ATTR_STRIKETHROUGH:
appearance.strikethrough = ((PangoAttrInt *)attr)->value;
break;
-18
View File
@@ -117,10 +117,8 @@ enum {
PROP_RIGHT_MARGIN,
PROP_UNDERLINE,
PROP_UNDERLINE_RGBA,
#if PANGO_VERSION_CHECK(1,45,0)
PROP_OVERLINE,
PROP_OVERLINE_RGBA,
#endif
PROP_RISE,
PROP_BACKGROUND_FULL_HEIGHT,
PROP_LANGUAGE,
@@ -161,10 +159,8 @@ enum {
PROP_RIGHT_MARGIN_SET,
PROP_UNDERLINE_SET,
PROP_UNDERLINE_RGBA_SET,
#if PANGO_VERSION_CHECK(1,45,0)
PROP_OVERLINE_SET,
PROP_OVERLINE_RGBA_SET,
#endif
PROP_RISE_SET,
PROP_BACKGROUND_FULL_HEIGHT_SET,
PROP_LANGUAGE_SET,
@@ -514,7 +510,6 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
GDK_TYPE_RGBA,
GTK_PARAM_READWRITE));
#if PANGO_VERSION_CHECK(1,45,0)
g_object_class_install_property (object_class,
PROP_OVERLINE,
g_param_spec_enum ("overline",
@@ -531,7 +526,6 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
P_("Color of overline for this text"),
GDK_TYPE_RGBA,
GTK_PARAM_READWRITE));
#endif
/**
* GtkTextTag:strikethrough-rgba:
@@ -793,7 +787,6 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
P_("Underline RGBA set"),
P_("Whether this tag affects underlining color"));
#if PANGO_VERSION_CHECK(1,45,0)
ADD_SET_PROP ("overline-set", PROP_OVERLINE_SET,
P_("Overline set"),
P_("Whether this tag affects overlining"));
@@ -801,7 +794,6 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
ADD_SET_PROP ("overline-rgba-set", PROP_OVERLINE_RGBA_SET,
P_("Overline RGBA set"),
P_("Whether this tag affects overlining color"));
#endif
/**
* GtkTextTag:strikethrough-rgba-set:
@@ -929,7 +921,6 @@ set_underline_rgba (GtkTextTag *tag,
}
}
#if PANGO_VERSION_CHECK(1,45,0)
static void
set_overline_rgba (GtkTextTag *tag,
const GdkRGBA *rgba)
@@ -959,7 +950,6 @@ set_overline_rgba (GtkTextTag *tag,
}
}
}
#endif
static void
set_strikethrough_rgba (GtkTextTag *tag,
@@ -1485,7 +1475,6 @@ gtk_text_tag_set_property (GObject *object,
}
break;
#if PANGO_VERSION_CHECK(1,45,0)
case PROP_OVERLINE:
priv->overline_set = TRUE;
priv->values->appearance.overline = g_value_get_enum (value);
@@ -1498,7 +1487,6 @@ gtk_text_tag_set_property (GObject *object,
set_overline_rgba (text_tag, color);
}
break;
#endif
case PROP_RISE:
priv->rise_set = TRUE;
@@ -1702,7 +1690,6 @@ gtk_text_tag_set_property (GObject *object,
priv->underline_rgba_set = g_value_get_boolean (value);
break;
#if PANGO_VERSION_CHECK(1,45,0)
case PROP_OVERLINE_SET:
priv->overline_set = g_value_get_boolean (value);
break;
@@ -1710,7 +1697,6 @@ gtk_text_tag_set_property (GObject *object,
case PROP_OVERLINE_RGBA_SET:
priv->overline_rgba_set = g_value_get_boolean (value);
break;
#endif
case PROP_RISE_SET:
priv->rise_set = g_value_get_boolean (value);
@@ -1913,7 +1899,6 @@ gtk_text_tag_get_property (GObject *object,
g_value_set_boxed (value, priv->values->appearance.underline_rgba);
break;
#if PANGO_VERSION_CHECK(1,45,0)
case PROP_OVERLINE:
g_value_set_enum (value, priv->values->appearance.overline);
break;
@@ -1922,7 +1907,6 @@ gtk_text_tag_get_property (GObject *object,
if (priv->overline_rgba_set)
g_value_set_boxed (value, priv->values->appearance.overline_rgba);
break;
#endif
case PROP_RISE:
g_value_set_int (value, priv->values->appearance.rise);
@@ -2056,7 +2040,6 @@ gtk_text_tag_get_property (GObject *object,
g_value_set_boolean (value, priv->underline_rgba_set);
break;
#if PANGO_VERSION_CHECK(1,45,0)
case PROP_OVERLINE_SET:
g_value_set_boolean (value, priv->overline_set);
break;
@@ -2064,7 +2047,6 @@ gtk_text_tag_get_property (GObject *object,
case PROP_OVERLINE_RGBA_SET:
g_value_set_boolean (value, priv->overline_rgba_set);
break;
#endif
case PROP_RISE_SET:
g_value_set_boolean (value, priv->rise_set);
+1 -1
View File
@@ -53,7 +53,7 @@
#include "gtkmagnifierprivate.h"
#include "gtkemojichooser.h"
#include "gtkpango.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
#include "gtkwidgetprivate.h"
#include "a11y/gtktextviewaccessibleprivate.h"
+1 -1
View File
@@ -35,7 +35,7 @@
#include "gtkwindowprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkaccessible.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
/**
* SECTION:gtktooltip
+1 -1
View File
@@ -49,7 +49,7 @@
#include "gtklayoutmanagerprivate.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
#include "gtkpopover.h"
#include "gtkprivate.h"
#include "gtkrenderbackgroundprivate.h"
+1 -1
View File
@@ -51,7 +51,7 @@
#include "gtkpointerfocusprivate.h"
#include "gtkprivate.h"
#include "gtkroot.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
#include "gtksettings.h"
#include "gtkshortcut.h"
#include "gtkshortcutcontroller.h"
+1 -1
View File
@@ -28,7 +28,7 @@
#include "gtkgestureprivate.h"
#include "gtkintl.h"
#include "gtkmodelbuttonprivate.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
#include "gtkpopovermenuprivate.h"
#include "gtkprivate.h"
#include "gtkseparator.h"
+1 -1
View File
@@ -24,7 +24,7 @@
#include "gtkintl.h"
#include "gtkwidget.h"
#include "gtkroot.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
struct _GtkFocusOverlay
{
+1 -1
View File
@@ -34,7 +34,7 @@
#include "gtkwidgetprivate.h"
#include "gtkeventcontrollermotion.h"
#include "gtkeventcontrollerkey.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
#include "gtkwindowprivate.h"
static GtkWidget *
+1 -1
View File
@@ -5,7 +5,7 @@
#include "gtkcssstyleprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtknativeprivate.h"
#include "gtknative.h"
struct _GtkLayoutOverlay
{
+1
View File
@@ -253,6 +253,7 @@ gtk/gtkprintoperation-win32.c
gtk/gtkprintunixdialog.c
gtk/gtkprogressbar.c
gtk/gtkpropertylookuplistmodel.c
gtk/gtkpropertyselection.c
gtk/gtkradiobutton.c
gtk/gtkrange.c
gtk/gtkrecentmanager.c
+2 -2
View File
@@ -2216,7 +2216,7 @@ msgstr "Valor inicial"
#: gtk/gtkcssstyleproperty.c:201
msgid "The initial specified value used for this property"
msgstr "El valor inicial especificat que s'utilitza per aquesta propietat"
msgstr "El valor inicial especificat que s'utilitza per a aquesta propietat"
#: gtk/gtkdragicon.c:373
#, fuzzy
@@ -7013,7 +7013,7 @@ msgstr "El model del fill"
#: gtk/gtktreemodelfilter.c:533
msgid "The model for the filtermodel to filter"
msgstr "El model per al model de filtre que filtrar"
msgstr "El model per al model de filtre a filtrar"
#: gtk/gtktreemodelfilter.c:540
msgid "The virtual root"
+774 -507
View File
File diff suppressed because it is too large Load Diff
+27 -68
View File
@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+ 2.4.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-06-06 12:03+0000\n"
"PO-Revision-Date: 2020-06-06 16:43+0300\n"
"POT-Creation-Date: 2020-06-07 07:28+0000\n"
"PO-Revision-Date: 2020-06-07 11:50+0300\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <kde-i18n-uk@kde.org>\n"
"Language: uk\n"
@@ -871,7 +871,6 @@ msgid "Bytes"
msgstr "Байти"
#: gtk/gtkbuilderlistitemfactory.c:270
#| msgid "Merged UI definition"
msgid "bytes containing the UI definition"
msgstr "байти, які містять визначення інтерфейсу користувача"
@@ -880,7 +879,6 @@ msgid "Resource"
msgstr "Ресурс"
#: gtk/gtkbuilderlistitemfactory.c:282
#| msgid "Merged UI definition"
msgid "resource containing the UI definition"
msgstr "ресурс, який містить визначення інтерфейсу користувача"
@@ -1215,9 +1213,9 @@ msgstr "Чи встановлено колір тла комірки"
#: gtk/gtkcellrenderercombo.c:136 gtk/gtkcolumnview.c:628 gtk/gtkdropdown.c:467
#: gtk/gtkfilterlistmodel.c:684 gtk/gtkflattenlistmodel.c:438
#: gtk/gtkgridview.c:1087 gtk/gtklistview.c:843 gtk/gtkmaplistmodel.c:404
#: gtk/gtkmultiselection.c:359 gtk/gtkshortcutcontroller.c:539
#: gtk/gtkslicelistmodel.c:287 gtk/gtksortlistmodel.c:394
#: gtk/gtktreelistmodel.c:716
#: gtk/gtkmultiselection.c:372 gtk/gtkpropertyselection.c:441
#: gtk/gtkshortcutcontroller.c:539 gtk/gtkslicelistmodel.c:287
#: gtk/gtksortlistmodel.c:394 gtk/gtktreelistmodel.c:716
msgid "Model"
msgstr "Модель"
@@ -1945,22 +1943,18 @@ msgid "Whether the swatch should accept drops"
msgstr "Чи прийматиме пробник події скидання"
#: gtk/gtkcolumnview.c:616
#| msgid "Column span"
msgid "Columns"
msgstr "Стовпчики"
#: gtk/gtkcolumnview.c:617
#| msgid "List of classes"
msgid "List of columns"
msgstr "Список стовпчиків"
#: gtk/gtkcolumnview.c:629 gtk/gtkgridview.c:1088 gtk/gtklistview.c:844
#| msgid "The sorting order of the items displayed"
msgid "Model for the items displayed"
msgstr "Модель для показаних пунктів"
#: gtk/gtkcolumnview.c:640
#| msgid "Show separators"
msgid "Show row separators"
msgstr "Показувати роздільники рядків"
@@ -1969,12 +1963,10 @@ msgid "Show separators between rows"
msgstr "Показувати роздільники між рядками"
#: gtk/gtkcolumnview.c:652
#| msgid "Show separators"
msgid "Show column separators"
msgstr "Показувати роздільники стовпчиків"
#: gtk/gtkcolumnview.c:653
#| msgid "Show separators between rows"
msgid "Show separators between columns"
msgstr "Показувати роздільники між стовпчиками"
@@ -1992,7 +1984,6 @@ msgid "Single click activate"
msgstr "Активація одним клацанням"
#: gtk/gtkcolumnview.c:677 gtk/gtkgridview.c:1100 gtk/gtklistview.c:868
#| msgid "Activate row on a single click"
msgid "Activate rows on single click"
msgstr "Активувати рядки одинарним клацанням"
@@ -2002,24 +1993,18 @@ msgid "Reorderable"
msgstr "Дозволено перестановку"
#: gtk/gtkcolumnview.c:689
#| msgid "Whether the column can be reordered around the headers"
msgid "Whether columns are reorderable"
msgstr "Чи можна змінювати порядок стовпчиків"
#: gtk/gtkcolumnview.c:700 gtk/gtkgridview.c:1111 gtk/gtklistview.c:879
#| msgid "Inline selection"
msgid "Enable rubberband selection"
msgstr "Увімкнути еластичне позначення"
#: gtk/gtkcolumnview.c:701 gtk/gtkgridview.c:1112 gtk/gtklistview.c:880
#| msgid ""
#| "Whether to enable selection of multiple items by dragging the mouse "
#| "pointer"
msgid "Allow selecting items by dragging with the mouse"
msgstr "Дозволити позначення пунктів перетягуванням вказівника миші"
#: gtk/gtkcolumnviewcolumn.c:234
#| msgid "Column spacing"
msgid "Column view"
msgstr "Перегляд стовпцями"
@@ -2038,7 +2023,6 @@ msgid "Factory for populating list items"
msgstr "Фабрика для заповнення пунктів списку"
#: gtk/gtkcolumnviewcolumn.c:259
#| msgid "Text to be displayed in the progress bar"
msgid "Title displayed in the header"
msgstr "Назва, яку показано у заголовку"
@@ -2052,17 +2036,14 @@ msgid "Visible"
msgstr "Видима"
#: gtk/gtkcolumnviewcolumn.c:283
#| msgid "Whether the action is visible."
msgid "Whether this column is visible"
msgstr "Чи буде цей стовпчик видимим"
#: gtk/gtkcolumnviewcolumn.c:294
#| msgid "Header image"
msgid "Header menu"
msgstr "Меню заголовка"
#: gtk/gtkcolumnviewcolumn.c:295
#| msgid "The title of this tray icon"
msgid "Menu to use on the title of this column"
msgstr "Меню, яким слід скористатися для заголовка цього стовпчика"
@@ -2072,22 +2053,18 @@ msgid "Resizable"
msgstr "Розмір можна змінювати"
#: gtk/gtkcolumnviewcolumn.c:307
#| msgid "Whether the action is enabled."
msgid "Whether this column is resizable"
msgstr "Чи можна змінювати розміри цього стовпчика"
#: gtk/gtkcolumnviewcolumn.c:319
#| msgid "Column gets share of extra width allocated to the widget"
msgid "column gets share of extra width"
msgstr "стовпчик отримує частину додаткової ширини"
#: gtk/gtkcolumnviewcolumn.c:331
#| msgid "Fixed Width"
msgid "Fixed width"
msgstr "Фіксована ширина"
#: gtk/gtkcolumnviewcolumn.c:332
#| msgid "Current fixed width of the column"
msgid "Fixed width of this column"
msgstr "Фіксована ширина цього стовпчика"
@@ -2315,17 +2292,14 @@ msgid "The initial specified value used for this property"
msgstr "Початкове вказане значення потрібне для властивості"
#: gtk/gtkdirectorylist.c:239
#| msgid "Attributes"
msgid "attributes"
msgstr "атрибути"
#: gtk/gtkdirectorylist.c:240
#| msgid "Attributes"
msgid "Attributes to query"
msgstr "Атрибути для запиту"
#: gtk/gtkdirectorylist.c:251
#| msgid "Error"
msgid "error"
msgstr "помилка"
@@ -2339,7 +2313,6 @@ msgid "File"
msgstr "Файл"
#: gtk/gtkdirectorylist.c:264
#| msgid "The title to display"
msgid "The file to query"
msgstr "Файл для запиту"
@@ -2365,12 +2338,10 @@ msgid "The type of elements of this object"
msgstr "Тип елементів цього об'єкта"
#: gtk/gtkdirectorylist.c:299
#| msgid "Loading"
msgid "loading"
msgstr "завантаження"
#: gtk/gtkdirectorylist.c:300
#| msgid "TRUE if this printer is paused"
msgid "TRUE if files are being loaded"
msgstr "TRUE, якщо файли завантажуються"
@@ -2439,31 +2410,27 @@ msgid "List Factory"
msgstr "Фабрика списку"
#: gtk/gtkdropdown.c:468
#| msgid "The model for the filtermodel to filter"
msgid "Model for the displayed items"
msgstr "Модель для показаних пунктів"
#: gtk/gtkdropdown.c:480 gtk/gtklistitem.c:233 gtk/gtksingleselection.c:439
#: gtk/gtkdropdown.c:480 gtk/gtklistitem.c:233 gtk/gtksingleselection.c:444
msgid "Selected"
msgstr "Позначений"
#: gtk/gtkdropdown.c:481 gtk/gtksingleselection.c:440
#: gtk/gtkdropdown.c:481 gtk/gtksingleselection.c:445
msgid "Position of the selected item"
msgstr "Розташування позначеного пункту"
#: gtk/gtkdropdown.c:494
#| msgid "Enable Search"
msgid "Enable search"
msgstr "Дозволено пошук"
#: gtk/gtkdropdown.c:495
#| msgid "Whether to show a sort indicator"
msgid "Whether to show a search entry in the popup"
msgstr "Чи слід показувати запис пошуку у контекстній підказці"
#: gtk/gtkdropdown.c:509 gtk/gtknumericsorter.c:282 gtk/gtkstringfilter.c:252
#: gtk/gtkstringsorter.c:218
#| msgid "Permission"
msgid "Expression"
msgstr "Вираз"
@@ -3309,7 +3276,7 @@ msgstr "Коефіцієнт затримки"
msgid "Factor by which to modify the default timeout"
msgstr "Коефіцієнт, за допомогою якого змінюється типовий час очікування"
#: gtk/gtkgesturepan.c:236 gtk/gtklistbase.c:1149 gtk/gtkorientable.c:60
#: gtk/gtkgesturepan.c:236 gtk/gtklistbase.c:1154 gtk/gtkorientable.c:60
msgid "Orientation"
msgstr "Орієнтація"
@@ -3452,22 +3419,18 @@ msgid "The number of rows that a child spans"
msgstr "Кількість рядків, які займає дочірній об'єкт"
#: gtk/gtkgridview.c:1063
#| msgid "Markup column"
msgid "Max columns"
msgstr "Макс. кількість стовпчиків"
#: gtk/gtkgridview.c:1064
#| msgid "Number of columns"
msgid "Maximum number of columns per row"
msgstr "Максимальна кількість стовпчиків на рядок"
#: gtk/gtkgridview.c:1075
#| msgid "Pixbuf column"
msgid "Min columns"
msgstr "Мін. кількість стовпчиків"
#: gtk/gtkgridview.c:1076
#| msgid "Number of columns"
msgid "Minimum number of columns per row"
msgstr "Мінімальна кількість стовпчиків на рядок"
@@ -3863,7 +3826,7 @@ msgstr "Відвіданий"
msgid "Whether this link has been visited."
msgstr "Чи це посилання було відвідано."
#: gtk/gtklistbase.c:1150 gtk/gtkorientable.c:61
#: gtk/gtklistbase.c:1155 gtk/gtkorientable.c:61
msgid "The orientation of the orientable"
msgstr "Орієнтація елемента"
@@ -3880,12 +3843,10 @@ msgid "Whether this row can be selected"
msgstr "Чи можна позначати цей рядок"
#: gtk/gtklistitem.c:174
#| msgid "Whether the text can be modified by the user"
msgid "If the item can be activated by the user"
msgstr "Чи може користувач активувати пункт"
#: gtk/gtklistitem.c:186
#| msgid "Title widget to display"
msgid "Widget used for display"
msgstr "Віджет, який використано для показу"
@@ -3894,7 +3855,6 @@ msgid "Item"
msgstr "Пункт"
#: gtk/gtklistitem.c:198
#| msgid "Display"
msgid "Displayed item"
msgstr "Показаний пункт"
@@ -3904,17 +3864,14 @@ msgid "Position"
msgstr "Позиція"
#: gtk/gtklistitem.c:210
#| msgid "Position of the selected item"
msgid "Position of the item"
msgstr "Розташування пункту"
#: gtk/gtklistitem.c:222
#| msgid "Whether the text can be modified by the user"
msgid "If the item can be selected by the user"
msgstr "Чи може користувач позначати пункт"
#: gtk/gtklistitem.c:234
#| msgid "The item which is currently active"
msgid "If the item is currently selected"
msgstr "Чи позначено зараз якийсь пункт"
@@ -4270,7 +4227,7 @@ msgstr "Чи виводити діалог"
msgid "The display where this window will be displayed."
msgstr "Дисплей, на якому буде показано це вікно."
#: gtk/gtkmultiselection.c:360
#: gtk/gtkmultiselection.c:373 gtk/gtkpropertyselection.c:442
msgid "List managed by this selection"
msgstr "Список, який керується цим вибором"
@@ -4302,11 +4259,11 @@ msgstr "Прозорий для вікна"
msgid "The transient parent of the dialog"
msgstr "Прозорий батьківський віджет діалогу"
#: gtk/gtknoselection.c:208 gtk/gtksingleselection.c:463
#: gtk/gtknoselection.c:208 gtk/gtksingleselection.c:468
msgid "The model"
msgstr "Модель"
#: gtk/gtknoselection.c:209 gtk/gtksingleselection.c:464
#: gtk/gtknoselection.c:209 gtk/gtksingleselection.c:469
msgid "The model being managed"
msgstr "Модель, яка керується"
@@ -4458,7 +4415,6 @@ msgid "Sort order"
msgstr "Порядок сортування"
#: gtk/gtknumericsorter.c:294
#| msgid "Whether to reserve space for a subtitle"
msgid "Whether to sort smaller numbers first"
msgstr "Чи слід упорядковувати із розташуванням малих чисел першими"
@@ -5185,6 +5141,15 @@ msgstr "Об'єкт"
msgid "The root object"
msgstr "Кореневий об'єкт"
#: gtk/gtkpropertyselection.c:448
#| msgid "Property name"
msgid "Property"
msgstr "Властивість"
#: gtk/gtkpropertyselection.c:449
msgid "Item property to store selection state in"
msgstr "Властивість пункту, до якої слід записати стан позначення"
#: gtk/gtkradiobutton.c:200
msgid "Group"
msgstr "Група"
@@ -6071,27 +6036,27 @@ msgstr "Другий"
msgid "The second trigger to check"
msgstr "Другий перемикач для перевірки"
#: gtk/gtksingleselection.c:415
#: gtk/gtksingleselection.c:420
msgid "Autoselect"
msgstr "Автовибір"
#: gtk/gtksingleselection.c:416
#: gtk/gtksingleselection.c:421
msgid "If the selection will always select an item"
msgstr "Чи позначення завжди позначає пункт"
#: gtk/gtksingleselection.c:427
#: gtk/gtksingleselection.c:432
msgid "Can unselect"
msgstr "Можна знімати позначення"
#: gtk/gtksingleselection.c:428
#: gtk/gtksingleselection.c:433
msgid "If unselecting the selected item is allowed"
msgstr "Чи зняття позначення з позначеного пункту дозволене"
#: gtk/gtksingleselection.c:451
#: gtk/gtksingleselection.c:456
msgid "Selected Item"
msgstr "Вибраний елемент"
#: gtk/gtksingleselection.c:452
#: gtk/gtksingleselection.c:457
msgid "The selected item"
msgstr "Позначений пункт"
@@ -6297,7 +6262,6 @@ msgid "Associated stack for this GtkStackSidebar"
msgstr "Пов'язаний стос для цього GtkStackSidebar"
#: gtk/gtkstringfilter.c:263 gtk/gtkstringsorter.c:229
#| msgid "Ignore hidden"
msgid "Ignore case"
msgstr "Без врахування регістру"
@@ -6306,7 +6270,6 @@ msgid "If matching is case sensitive"
msgstr "Чи слід враховувати регістр символів при встановленні відповідності"
#: gtk/gtkstringfilter.c:275
#| msgid "Search mode"
msgid "Match mode"
msgstr "Режим відповідності"
@@ -6315,12 +6278,10 @@ msgid "If exact matches are necessary or if substrings are allowed"
msgstr "Має бути відповідність точною чи достатньо збігу частини рядка"
#: gtk/gtkstringfilter.c:288
#| msgid "Search mode"
msgid "Search"
msgstr "Пошук"
#: gtk/gtkstringfilter.c:289
#| msgid "The selected item"
msgid "The search term"
msgstr "Критерій пошуку"
@@ -6990,7 +6951,6 @@ msgid "The child widget with the actual contents"
msgstr "Дочірній віджет, який містить самі дані"
#: gtk/gtktreeexpander.c:462
#| msgid "The item held in this row"
msgid "The item held by this expander's row"
msgstr "Запис, який зберігається у цьому рядку розгортання"
@@ -7055,7 +7015,6 @@ msgid "The item held in this row"
msgstr "Запис, який зберігається у цьому рядку"
#: gtk/gtktreelistrowsorter.c:244
#| msgid "The model being sorted"
msgid "The underlying sorter"
msgstr "Базовий сортувальник"
+1
View File
@@ -255,6 +255,7 @@ gtk/gtkprintoperation-win32.c
gtk/gtkprintunixdialog.c
gtk/gtkprogressbar.c
gtk/gtkpropertylookuplistmodel.c
gtk/gtkpropertyselection.c
gtk/gtkradiobutton.c
gtk/gtkrange.c
gtk/gtkrecentmanager.c
+1767 -1576
View File
File diff suppressed because it is too large Load Diff
+293 -267
View File
File diff suppressed because it is too large Load Diff
+714 -657
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -496,7 +496,7 @@ test_callback (void)
assert_selection (selection, "");
assert_selection_changes (selection, "");
ret = gtk_selection_model_select_callback (selection, select_some, data);
ret = gtk_selection_model_select_callback (selection, FALSE, select_some, data);
g_assert_true (ret);
assert_selection (selection, "3 4 5 7 8 9");
assert_selection_changes (selection, "2:7");