Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cc3c019e6 | |||
| 319aa558a5 |
@@ -1,91 +1,8 @@
|
||||
Overview of Changes in 4.5.1, 16-12-2021
|
||||
========================================
|
||||
|
||||
* GtkWidget sizing has been rewritten to implement
|
||||
width-for-height more properly. This had some fallout,
|
||||
and some widgets may still not react kindly to the
|
||||
new way of doing things.
|
||||
|
||||
See https://blog.gtk.org/2021/12/03/sizable-news/
|
||||
for details, and please file issues if you notice fallout.
|
||||
Overview of Changes
|
||||
===================
|
||||
|
||||
* Rename git `master` branch to `main`
|
||||
|
||||
* Css:
|
||||
- Fully support font-variant-caps
|
||||
- Fix a crash with gradients
|
||||
|
||||
* Make various widgets activatable:
|
||||
- GtkComboBox
|
||||
- GtkDropDown
|
||||
|
||||
* GtkPopover:
|
||||
- Make focus indicators not disappear
|
||||
|
||||
* GtkTextView:
|
||||
- Don't leave embedded children stranded when scrolling
|
||||
- Don't insert Emoji into non-editable textviews
|
||||
- Fix Emoji chooser positioning
|
||||
- Fix problems with pasting text
|
||||
- Improve scroll-to-mark behavior
|
||||
- Support right-aligned, centered and decimal tabs
|
||||
- Make child anchor replacement character settable
|
||||
- Provide more context to input methods
|
||||
|
||||
* GtkDragIcon:
|
||||
- Provide default icons for paintables and files
|
||||
|
||||
* GtkBuilder:
|
||||
- Speed up template precompilation
|
||||
|
||||
* Actions:
|
||||
- Reduce allocations during signal emissions
|
||||
- Avoid duplication and unnecessary recursion
|
||||
|
||||
* Inspector:
|
||||
- Show the selected im-module in the General tab
|
||||
- Add a clipboard viewer
|
||||
- Make the recorder record events too
|
||||
- Add a graph visualizing gtk_widget_measure()
|
||||
|
||||
* Gsk:
|
||||
- Fix hexbox rendering
|
||||
- Fix transformed linear gradient rendering
|
||||
|
||||
* Printing:
|
||||
- Fix dialog-less printing
|
||||
|
||||
* Windows:
|
||||
- Use the common EGL setup code
|
||||
- Respect GDK_DEBUG=gl-egl
|
||||
- Fix AeroSnap indicator and positioning
|
||||
|
||||
* X11:
|
||||
- Improve behavior of windows drags on headerbar controls
|
||||
- Trap errors for RANDR changes
|
||||
- Fix problems with drag icons
|
||||
|
||||
* Wayland:
|
||||
- Ensure we prefer the Wayland im-module over others
|
||||
|
||||
* Translation updates
|
||||
Basque
|
||||
Catalan
|
||||
Croatian
|
||||
Friulian
|
||||
Galician
|
||||
Hebrew
|
||||
Icelandic
|
||||
Italian
|
||||
Latvian
|
||||
Lithuanian
|
||||
Occitan
|
||||
Persian
|
||||
Portuguese
|
||||
Spanish
|
||||
Swedish
|
||||
Ukrainian
|
||||
|
||||
Overview of Changes in 4.5.0
|
||||
============================
|
||||
|
||||
|
||||
@@ -1927,12 +1927,6 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="tooltip-text" translatable="1">Insert something</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColorButton">
|
||||
<property name="rgba">#9141AC</property>
|
||||
<property name="tooltip-text" translatable="1">Select a color</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
|
||||
@@ -16,6 +16,7 @@ SYNOPSIS
|
||||
| **gtk4-builder-tool** enumerate <FILE>
|
||||
| **gtk4-builder-tool** simplify [OPTIONS...] <FILE>
|
||||
| **gtk4-builder-tool** preview [OPTIONS...] <FILE>
|
||||
| **gtk4-builder-tool** precompile [OPTIONS...] <FILE>
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
@@ -83,3 +84,10 @@ to do manual fixups after the initial conversion.
|
||||
``--3to4``
|
||||
|
||||
Transform a GTK 3 UI definition file to the equivalent GTK 4 definitions.
|
||||
|
||||
Precompilation
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
The ``precompile`` command creates a more compact, and faster to load compiled
|
||||
form of the ui file that is understood by GtkBuilder. The output is written
|
||||
to a file with the extension ``.precompiled``.
|
||||
|
||||
@@ -1276,15 +1276,6 @@ is provided in the form of a `GtkIconPaintable` (this can be checked with
|
||||
[method@Gtk.IconPaintable.is_symbolic]), you have to call
|
||||
[method@Gtk.IconPaintable.get_icon_name] and set the icon name on a `GtkImage`.
|
||||
|
||||
### Adapt to GtkImage changes
|
||||
`GtkPicture`'s behaviour was "split out" of `GtkImage` as the latter was covering
|
||||
too many use cases; if you're loading an icon, [class@Gtk.Image] in GTK3 and GTK4 are
|
||||
perfectly equivalent. If you are loading a more complex image asset, like a picture
|
||||
or a thumbnail, then [class@Gtk.Picture] is the appropriate widget.
|
||||
|
||||
One noteworthy distinction is that while `GtkImage` has its size computed by
|
||||
GTK, `GtkPicture` lets you decide about the size.
|
||||
|
||||
### Update to GtkFileChooser API changes
|
||||
|
||||
`GtkFileChooser` moved to a GFile-based API. If you need to convert a path
|
||||
|
||||
+61
-133
@@ -19,7 +19,7 @@
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@@ -522,8 +522,7 @@ _gdk_event_queue_find_first (GdkDisplay *display)
|
||||
if (pending_motion)
|
||||
return pending_motion;
|
||||
|
||||
if ((event->event_type == GDK_MOTION_NOTIFY || event->event_type == GDK_SCROLL) &&
|
||||
(event->flags & GDK_EVENT_FLUSHED) == 0)
|
||||
if (event->event_type == GDK_MOTION_NOTIFY && (event->flags & GDK_EVENT_FLUSHED) == 0)
|
||||
pending_motion = tmp_list;
|
||||
else
|
||||
return tmp_list;
|
||||
@@ -597,9 +596,6 @@ _gdk_event_unqueue (GdkDisplay *display)
|
||||
/*
|
||||
* If the last N events in the event queue are smooth scroll events
|
||||
* for the same surface and device, combine them into one.
|
||||
*
|
||||
* We give the remaining event a history with N items, and deltas
|
||||
* that are the sum over the history entries.
|
||||
*/
|
||||
void
|
||||
gdk_event_queue_handle_scroll_compression (GdkDisplay *display)
|
||||
@@ -609,6 +605,7 @@ gdk_event_queue_handle_scroll_compression (GdkDisplay *display)
|
||||
GdkDevice *device = NULL;
|
||||
GdkEvent *last_event = NULL;
|
||||
GList *scrolls = NULL;
|
||||
double delta_x, delta_y;
|
||||
GArray *history = NULL;
|
||||
GdkTimeCoord hist;
|
||||
|
||||
@@ -643,42 +640,35 @@ gdk_event_queue_handle_scroll_compression (GdkDisplay *display)
|
||||
l = l->prev;
|
||||
}
|
||||
|
||||
delta_x = delta_y = 0;
|
||||
|
||||
while (scrolls && scrolls->next != NULL)
|
||||
{
|
||||
GdkEvent *event = scrolls->data;
|
||||
GList *next = scrolls->next;
|
||||
double dx, dy;
|
||||
gboolean inherited = FALSE;
|
||||
|
||||
if (!history && ((GdkScrollEvent *)event)->history)
|
||||
{
|
||||
history = ((GdkScrollEvent *)event)->history;
|
||||
((GdkScrollEvent *)event)->history = NULL;
|
||||
inherited = TRUE;
|
||||
}
|
||||
|
||||
if (!history)
|
||||
history = g_array_new (FALSE, TRUE, sizeof (GdkTimeCoord));
|
||||
|
||||
if (!inherited)
|
||||
{
|
||||
gdk_scroll_event_get_deltas (event, &dx, &dy);
|
||||
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;
|
||||
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);
|
||||
}
|
||||
g_array_append_val (history, hist);
|
||||
|
||||
gdk_event_unref (event);
|
||||
g_queue_delete_link (&display->queued_events, scrolls);
|
||||
scrolls = next;
|
||||
}
|
||||
|
||||
if (scrolls && history)
|
||||
if (scrolls)
|
||||
{
|
||||
GdkEvent *old_event, *event;
|
||||
double dx, dy;
|
||||
@@ -686,29 +676,13 @@ gdk_event_queue_handle_scroll_compression (GdkDisplay *display)
|
||||
old_event = scrolls->data;
|
||||
|
||||
gdk_scroll_event_get_deltas (old_event, &dx, &dy);
|
||||
|
||||
memset (&hist, 0, sizeof (GdkTimeCoord));
|
||||
hist.time = gdk_event_get_time (old_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);
|
||||
|
||||
dx = dy = 0;
|
||||
for (int i = 0; i < history->len; i++)
|
||||
{
|
||||
GdkTimeCoord *val = &g_array_index (history, GdkTimeCoord, i);
|
||||
dx += val->axes[GDK_AXIS_DELTA_X];
|
||||
dy += val->axes[GDK_AXIS_DELTA_Y];
|
||||
}
|
||||
|
||||
event = gdk_scroll_event_new (surface,
|
||||
device,
|
||||
gdk_event_get_device_tool (old_event),
|
||||
gdk_event_get_time (old_event),
|
||||
gdk_event_get_modifier_state (old_event),
|
||||
dx,
|
||||
dy,
|
||||
delta_x + dx,
|
||||
delta_y + dy,
|
||||
gdk_scroll_event_is_stop (old_event));
|
||||
|
||||
((GdkScrollEvent *)event)->history = history;
|
||||
@@ -740,41 +714,24 @@ gdk_motion_event_push_history (GdkEvent *event,
|
||||
g_assert (GDK_IS_EVENT_TYPE (event, GDK_MOTION_NOTIFY));
|
||||
g_assert (GDK_IS_EVENT_TYPE (history_event, GDK_MOTION_NOTIFY));
|
||||
|
||||
if (G_UNLIKELY (!self->history))
|
||||
self->history = g_array_new (FALSE, TRUE, sizeof (GdkTimeCoord));
|
||||
|
||||
if (((GdkMotionEvent *)history_event)->history)
|
||||
{
|
||||
GArray *history = ((GdkMotionEvent *)history_event)->history;
|
||||
g_array_append_vals (self->history, history->data, history->len);
|
||||
}
|
||||
if (!self->tool)
|
||||
return;
|
||||
|
||||
tool = gdk_event_get_device_tool (history_event);
|
||||
|
||||
memset (&hist, 0, sizeof (GdkTimeCoord));
|
||||
hist.time = gdk_event_get_time (history_event);
|
||||
if (tool)
|
||||
{
|
||||
hist.flags = gdk_device_tool_get_axes (tool);
|
||||
for (i = GDK_AXIS_X; i < GDK_AXIS_LAST; i++)
|
||||
gdk_event_get_axis (history_event, i, &hist.axes[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
hist.flags = GDK_AXIS_FLAG_X | GDK_AXIS_FLAG_Y;
|
||||
gdk_event_get_position (history_event, &hist.axes[GDK_AXIS_X], &hist.axes[GDK_AXIS_Y]);
|
||||
}
|
||||
hist.flags = gdk_device_tool_get_axes (tool);
|
||||
|
||||
for (i = GDK_AXIS_X; i < GDK_AXIS_LAST; i++)
|
||||
gdk_event_get_axis (history_event, i, &hist.axes[i]);
|
||||
|
||||
if (G_UNLIKELY (!self->history))
|
||||
self->history = g_array_new (FALSE, TRUE, sizeof (GdkTimeCoord));
|
||||
|
||||
g_array_append_val (self->history, hist);
|
||||
}
|
||||
|
||||
/* If the last N events in the event queue are motion notify
|
||||
* events for the same surface, drop all but the last.
|
||||
*
|
||||
* If a button is held down or the device has a tool, then
|
||||
* we give the remaining events a history containing the N-1
|
||||
* dropped events.
|
||||
*/
|
||||
void
|
||||
_gdk_event_queue_handle_motion_compression (GdkDisplay *display)
|
||||
{
|
||||
@@ -784,6 +741,9 @@ _gdk_event_queue_handle_motion_compression (GdkDisplay *display)
|
||||
GdkDevice *pending_motion_device = NULL;
|
||||
GdkEvent *last_motion = NULL;
|
||||
|
||||
/* If the last N events in the event queue are motion notify
|
||||
* events for the same surface, drop all but the last */
|
||||
|
||||
tmp_list = g_queue_peek_tail_link (&display->queued_events);
|
||||
|
||||
while (tmp_list)
|
||||
@@ -820,11 +780,12 @@ _gdk_event_queue_handle_motion_compression (GdkDisplay *display)
|
||||
|
||||
if (last_motion != NULL)
|
||||
{
|
||||
if ((gdk_event_get_modifier_state (last_motion) &
|
||||
(GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK |
|
||||
GDK_BUTTON4_MASK | GDK_BUTTON5_MASK)) ||
|
||||
gdk_event_get_device_tool (last_motion) != NULL)
|
||||
gdk_motion_event_push_history (last_motion, pending_motions->data);
|
||||
GdkModifierType state = gdk_event_get_modifier_state (last_motion);
|
||||
|
||||
if (state &
|
||||
(GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK |
|
||||
GDK_BUTTON4_MASK | GDK_BUTTON5_MASK))
|
||||
gdk_motion_event_push_history (last_motion, pending_motions->data);
|
||||
}
|
||||
|
||||
gdk_event_unref (pending_motions->data);
|
||||
@@ -942,9 +903,6 @@ gdk_event_get_pointer_emulated (GdkEvent *event)
|
||||
* Extract the axis value for a particular axis use from
|
||||
* an event structure.
|
||||
*
|
||||
* To find out which axes are used, use [method@Gdk.DeviceTool.get_axes]
|
||||
* on the device tool returned by [method@Gdk.Event.get_device_tool].
|
||||
*
|
||||
* Returns: %TRUE if the specified axis was found, otherwise %FALSE
|
||||
*/
|
||||
gboolean
|
||||
@@ -1171,9 +1129,6 @@ G_DEFINE_BOXED_TYPE (GdkEventSequence, gdk_event_sequence,
|
||||
*
|
||||
* Extracts all axis values from an event.
|
||||
*
|
||||
* To find out which axes are used, use [method@Gdk.DeviceTool.get_axes]
|
||||
* on the device tool returned by [method@Gdk.Event.get_device_tool].
|
||||
*
|
||||
* Returns: %TRUE on success, otherwise %FALSE
|
||||
*/
|
||||
gboolean
|
||||
@@ -2476,14 +2431,6 @@ gdk_touchpad_event_get_state (GdkEvent *event)
|
||||
return self->state;
|
||||
}
|
||||
|
||||
static GdkEventSequence *
|
||||
gdk_touchpad_event_get_sequence (GdkEvent *event)
|
||||
{
|
||||
GdkTouchpadEvent *self = (GdkTouchpadEvent *) event;
|
||||
|
||||
return self->sequence;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_touchpad_event_get_position (GdkEvent *event,
|
||||
double *x,
|
||||
@@ -2503,7 +2450,7 @@ static const GdkEventTypeInfo gdk_touchpad_event_info = {
|
||||
NULL,
|
||||
gdk_touchpad_event_get_state,
|
||||
gdk_touchpad_event_get_position,
|
||||
gdk_touchpad_event_get_sequence,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
@@ -2514,28 +2461,19 @@ GDK_DEFINE_EVENT_TYPE (GdkTouchpadEvent, gdk_touchpad_event,
|
||||
GDK_EVENT_TYPE_SLOT (GDK_TOUCHPAD_PINCH))
|
||||
|
||||
GdkEvent *
|
||||
gdk_touchpad_event_new_swipe (GdkSurface *surface,
|
||||
GdkEventSequence *sequence,
|
||||
GdkDevice *device,
|
||||
guint32 time,
|
||||
GdkModifierType state,
|
||||
GdkTouchpadGesturePhase phase,
|
||||
double x,
|
||||
double y,
|
||||
int n_fingers,
|
||||
double dx,
|
||||
double dy)
|
||||
gdk_touchpad_event_new_swipe (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
guint32 time,
|
||||
GdkModifierType state,
|
||||
GdkTouchpadGesturePhase phase,
|
||||
double x,
|
||||
double y,
|
||||
int n_fingers,
|
||||
double dx,
|
||||
double dy)
|
||||
{
|
||||
GdkTouchpadEvent *self;
|
||||
GdkTouchpadEvent *self = gdk_event_alloc (GDK_TOUCHPAD_SWIPE, surface, device, time);
|
||||
|
||||
g_return_val_if_fail (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN ||
|
||||
phase == GDK_TOUCHPAD_GESTURE_PHASE_END ||
|
||||
phase == GDK_TOUCHPAD_GESTURE_PHASE_UPDATE ||
|
||||
phase == GDK_TOUCHPAD_GESTURE_PHASE_CANCEL, NULL);
|
||||
|
||||
self = gdk_event_alloc (GDK_TOUCHPAD_SWIPE, surface, device, time);
|
||||
|
||||
self->sequence = sequence;
|
||||
self->state = state;
|
||||
self->phase = phase;
|
||||
self->x = x;
|
||||
@@ -2548,30 +2486,21 @@ gdk_touchpad_event_new_swipe (GdkSurface *surface,
|
||||
}
|
||||
|
||||
GdkEvent *
|
||||
gdk_touchpad_event_new_pinch (GdkSurface *surface,
|
||||
GdkEventSequence *sequence,
|
||||
GdkDevice *device,
|
||||
guint32 time,
|
||||
GdkModifierType state,
|
||||
GdkTouchpadGesturePhase phase,
|
||||
double x,
|
||||
double y,
|
||||
int n_fingers,
|
||||
double dx,
|
||||
double dy,
|
||||
double scale,
|
||||
double angle_delta)
|
||||
gdk_touchpad_event_new_pinch (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
guint32 time,
|
||||
GdkModifierType state,
|
||||
GdkTouchpadGesturePhase phase,
|
||||
double x,
|
||||
double y,
|
||||
int n_fingers,
|
||||
double dx,
|
||||
double dy,
|
||||
double scale,
|
||||
double angle_delta)
|
||||
{
|
||||
GdkTouchpadEvent *self;
|
||||
GdkTouchpadEvent *self = gdk_event_alloc (GDK_TOUCHPAD_PINCH, surface, device, time);
|
||||
|
||||
g_return_val_if_fail (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN ||
|
||||
phase == GDK_TOUCHPAD_GESTURE_PHASE_END ||
|
||||
phase == GDK_TOUCHPAD_GESTURE_PHASE_UPDATE ||
|
||||
phase == GDK_TOUCHPAD_GESTURE_PHASE_CANCEL, NULL);
|
||||
|
||||
self = gdk_event_alloc (GDK_TOUCHPAD_PINCH, surface, device, time);
|
||||
|
||||
self->sequence = sequence;
|
||||
self->state = state;
|
||||
self->phase = phase;
|
||||
self->x = x;
|
||||
@@ -2978,8 +2907,7 @@ gdk_motion_event_new (GdkSurface *surface,
|
||||
* to the application because they occurred in the same frame as @event.
|
||||
*
|
||||
* Note that only motion and scroll events record history, and motion
|
||||
* events do it only if one of the mouse buttons is down, or the device
|
||||
* has a tool.
|
||||
* events do it only if one of the mouse buttons is down.
|
||||
*
|
||||
* Returns: (transfer container) (array length=out_n_coords) (nullable): an
|
||||
* array of time and coordinates
|
||||
|
||||
+11
-14
@@ -209,7 +209,7 @@ struct _GdkTouchEvent
|
||||
* @pointer_emulated: whether the scroll event was the result of
|
||||
* a pointer emulation
|
||||
* @tool: a `GdkDeviceTool`
|
||||
* @history: (element-type GdkTimeCoord): array of times and deltas
|
||||
* @history: (element-type GdkScrollHistory): array of times and deltas
|
||||
* for other scroll events that were compressed before delivering the
|
||||
* current event
|
||||
*
|
||||
@@ -233,7 +233,7 @@ struct _GdkScrollEvent
|
||||
gboolean pointer_emulated;
|
||||
gboolean is_stop;
|
||||
GdkDeviceTool *tool;
|
||||
GArray *history; /* <GdkTimeCoord> */
|
||||
GArray *history; /* <GdkScrollHistory> */
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -402,7 +402,6 @@ struct _GdkTouchpadEvent
|
||||
{
|
||||
GdkEvent parent_instance;
|
||||
|
||||
GdkEventSequence *sequence;
|
||||
GdkModifierType state;
|
||||
gint8 phase;
|
||||
gint8 n_fingers;
|
||||
@@ -507,20 +506,18 @@ GdkEvent * gdk_touch_event_new (GdkEventType type,
|
||||
double *axes,
|
||||
gboolean emulating);
|
||||
|
||||
GdkEvent * gdk_touchpad_event_new_swipe (GdkSurface *surface,
|
||||
GdkEventSequence *sequence,
|
||||
GdkDevice *device,
|
||||
guint32 time,
|
||||
GdkModifierType state,
|
||||
GdkEvent * gdk_touchpad_event_new_swipe (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
guint32 time,
|
||||
GdkModifierType state,
|
||||
GdkTouchpadGesturePhase phase,
|
||||
double x,
|
||||
double y,
|
||||
int n_fingers,
|
||||
double dx,
|
||||
double dy);
|
||||
double x,
|
||||
double y,
|
||||
int n_fingers,
|
||||
double dx,
|
||||
double dy);
|
||||
|
||||
GdkEvent * gdk_touchpad_event_new_pinch (GdkSurface *surface,
|
||||
GdkEventSequence *sequence,
|
||||
GdkDevice *device,
|
||||
guint32 time,
|
||||
GdkModifierType state,
|
||||
|
||||
@@ -537,7 +537,6 @@ fill_pinch_event (GdkMacosDisplay *display,
|
||||
seat = gdk_display_get_default_seat (GDK_DISPLAY (display));
|
||||
|
||||
return gdk_touchpad_event_new_pinch (GDK_SURFACE (surface),
|
||||
NULL, /* FIXME make up sequences */
|
||||
gdk_seat_get_pointer (seat),
|
||||
get_time_from_ns_event (nsevent),
|
||||
get_keyboard_modifiers_from_ns_event (nsevent),
|
||||
|
||||
@@ -137,7 +137,6 @@ struct _GdkWaylandPointerData {
|
||||
guint cursor_timeout_id;
|
||||
guint cursor_image_index;
|
||||
guint cursor_image_delay;
|
||||
guint touchpad_event_sequence;
|
||||
|
||||
guint current_output_scale;
|
||||
GSList *pointer_surface_outputs;
|
||||
@@ -1128,7 +1127,7 @@ data_offer_source_actions (void *data,
|
||||
seat->pending_source_actions = gdk_wayland_actions_to_gdk_actions (source_actions);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (seat->drop == NULL)
|
||||
return;
|
||||
|
||||
@@ -1153,7 +1152,7 @@ data_offer_action (void *data,
|
||||
seat->pending_action = gdk_wayland_actions_to_gdk_actions (action);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (seat->drop == NULL)
|
||||
return;
|
||||
|
||||
@@ -2165,7 +2164,7 @@ deliver_key_event (GdkWaylandSeat *seat,
|
||||
key,
|
||||
device_get_modifiers (seat->logical_pointer),
|
||||
_gdk_wayland_keymap_key_is_modifier (keymap, key),
|
||||
&translated,
|
||||
&translated,
|
||||
&no_lock);
|
||||
|
||||
_gdk_wayland_display_deliver_event (seat->display, event);
|
||||
@@ -2668,11 +2667,7 @@ emit_gesture_swipe_event (GdkWaylandSeat *seat,
|
||||
|
||||
seat->pointer_info.time = _time;
|
||||
|
||||
if (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN)
|
||||
seat->pointer_info.touchpad_event_sequence++;
|
||||
|
||||
event = gdk_touchpad_event_new_swipe (seat->pointer_info.focus,
|
||||
GDK_SLOT_TO_EVENT_SEQUENCE (seat->pointer_info.touchpad_event_sequence),
|
||||
seat->logical_pointer,
|
||||
_time,
|
||||
device_get_modifiers (seat->logical_pointer),
|
||||
@@ -2768,11 +2763,7 @@ emit_gesture_pinch_event (GdkWaylandSeat *seat,
|
||||
|
||||
seat->pointer_info.time = _time;
|
||||
|
||||
if (phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN)
|
||||
seat->pointer_info.touchpad_event_sequence++;
|
||||
|
||||
event = gdk_touchpad_event_new_pinch (seat->pointer_info.focus,
|
||||
GDK_SLOT_TO_EVENT_SEQUENCE (seat->pointer_info.touchpad_event_sequence),
|
||||
seat->logical_pointer,
|
||||
_time,
|
||||
device_get_modifiers (seat->logical_pointer),
|
||||
@@ -4097,7 +4088,7 @@ tablet_pad_strip_handle_frame (void *data,
|
||||
event = gdk_pad_event_new_strip (seat->keyboard_focus,
|
||||
pad->device,
|
||||
time,
|
||||
g_list_index (pad->mode_groups, group),
|
||||
g_list_index (pad->mode_groups, group),
|
||||
g_list_index (pad->strips, wp_tablet_pad_strip),
|
||||
group->current_mode,
|
||||
group->axis_tmp_info.value);
|
||||
|
||||
+84
-128
@@ -653,7 +653,6 @@ _gdk_win32_display_create_surface (GdkDisplay *display,
|
||||
|
||||
g_object_unref (frame_clock);
|
||||
impl->hdc = GetDC (impl->handle);
|
||||
impl->inhibit_configure = TRUE;
|
||||
|
||||
return surface;
|
||||
}
|
||||
@@ -1043,15 +1042,14 @@ gdk_win32_surface_do_move (GdkSurface *window,
|
||||
}
|
||||
|
||||
void
|
||||
gdk_win32_surface_resize (GdkSurface *surface,
|
||||
int width,
|
||||
int height)
|
||||
gdk_win32_surface_resize (GdkSurface *window,
|
||||
int width, int height)
|
||||
{
|
||||
RECT outer_rect;
|
||||
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
g_return_if_fail (GDK_IS_SURFACE (window));
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (surface))
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
return;
|
||||
|
||||
if (width < 1)
|
||||
@@ -1060,29 +1058,28 @@ gdk_win32_surface_resize (GdkSurface *surface,
|
||||
height = 1;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_win32_surface_resize: %p: %dx%d\n",
|
||||
GDK_SURFACE_HWND (surface), width, height));
|
||||
GDK_SURFACE_HWND (window), width, height));
|
||||
|
||||
if (surface->state & GDK_TOPLEVEL_STATE_FULLSCREEN)
|
||||
if (window->state & GDK_TOPLEVEL_STATE_FULLSCREEN)
|
||||
return;
|
||||
|
||||
get_outer_rect (surface, width, height, &outer_rect);
|
||||
get_outer_rect (window, width, height, &outer_rect);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("... SetWindowPos(%p,NULL,0,0,%ld,%ld,"
|
||||
"NOACTIVATE|NOMOVE|NOZORDER)\n",
|
||||
GDK_SURFACE_HWND (surface),
|
||||
GDK_SURFACE_HWND (window),
|
||||
outer_rect.right - outer_rect.left,
|
||||
outer_rect.bottom - outer_rect.top));
|
||||
|
||||
API_CALL (SetWindowPos, (GDK_SURFACE_HWND (surface),
|
||||
API_CALL (SetWindowPos, (GDK_SURFACE_HWND (window),
|
||||
SWP_NOZORDER_SPECIFIED,
|
||||
0, 0,
|
||||
outer_rect.right - outer_rect.left,
|
||||
outer_rect.bottom - outer_rect.top,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER));
|
||||
surface->resize_count += 1;
|
||||
window->resize_count += 1;
|
||||
|
||||
if (!GDK_WIN32_SURFACE (surface)->force_recompute_size)
|
||||
gdk_surface_request_layout (surface);
|
||||
gdk_surface_request_layout (window);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2498,41 +2495,35 @@ _gdk_win32_surface_handle_aerosnap (GdkSurface *window,
|
||||
}
|
||||
|
||||
static void
|
||||
apply_snap (GdkSurface *surface,
|
||||
GdkWin32AeroSnapState snap)
|
||||
apply_snap (GdkSurface *window,
|
||||
GdkWin32AeroSnapState snap)
|
||||
{
|
||||
GdkMonitor *monitor;
|
||||
GdkDisplay *display;
|
||||
|
||||
display = gdk_surface_get_display (surface);
|
||||
monitor = gdk_display_get_monitor_at_surface (display, surface);
|
||||
display = gdk_surface_get_display (window);
|
||||
monitor = gdk_display_get_monitor_at_surface (display, window);
|
||||
|
||||
switch (snap)
|
||||
{
|
||||
case GDK_WIN32_AEROSNAP_STATE_UNDETERMINED:
|
||||
break;
|
||||
case GDK_WIN32_AEROSNAP_STATE_MAXIMIZE:
|
||||
unsnap (surface, monitor);
|
||||
gdk_win32_surface_maximize (surface);
|
||||
unsnap (window, monitor);
|
||||
gdk_win32_surface_maximize (window);
|
||||
break;
|
||||
case GDK_WIN32_AEROSNAP_STATE_HALFLEFT:
|
||||
unsnap (surface, monitor);
|
||||
snap_left (surface, monitor, monitor);
|
||||
unsnap (window, monitor);
|
||||
snap_left (window, monitor, monitor);
|
||||
break;
|
||||
case GDK_WIN32_AEROSNAP_STATE_HALFRIGHT:
|
||||
unsnap (surface, monitor);
|
||||
snap_right (surface, monitor, monitor);
|
||||
unsnap (window, monitor);
|
||||
snap_right (window, monitor, monitor);
|
||||
break;
|
||||
case GDK_WIN32_AEROSNAP_STATE_FULLUP:
|
||||
snap_up (surface);
|
||||
snap_up (window);
|
||||
break;
|
||||
}
|
||||
|
||||
if (snap != GDK_WIN32_AEROSNAP_STATE_UNDETERMINED)
|
||||
{
|
||||
GDK_WIN32_SURFACE (surface)->inhibit_configure = TRUE;
|
||||
GDK_WIN32_SURFACE (surface)->force_recompute_size = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Registers a dumb window class. This window
|
||||
@@ -3412,10 +3403,10 @@ get_cursor_name_from_op (GdkW32WindowDragOp op,
|
||||
}
|
||||
|
||||
static void
|
||||
setup_drag_move_resize_context (GdkSurface *surface,
|
||||
setup_drag_move_resize_context (GdkSurface *window,
|
||||
GdkW32DragMoveResizeContext *context,
|
||||
GdkW32WindowDragOp op,
|
||||
GdkSurfaceEdge edge,
|
||||
GdkSurfaceEdge edge,
|
||||
GdkDevice *device,
|
||||
int button,
|
||||
double x,
|
||||
@@ -3424,13 +3415,12 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
{
|
||||
RECT rect;
|
||||
const char *cursor_name;
|
||||
GdkSurface *pointer_surface;
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (surface);
|
||||
gboolean maximized = gdk_toplevel_get_state (GDK_TOPLEVEL (surface)) & GDK_TOPLEVEL_STATE_MAXIMIZED;
|
||||
GdkSurface *pointer_window;
|
||||
GdkWin32Surface *impl = GDK_WIN32_SURFACE (window);
|
||||
gboolean maximized = gdk_toplevel_get_state (GDK_TOPLEVEL (window)) & GDK_TOPLEVEL_STATE_MAXIMIZED;
|
||||
int root_x, root_y;
|
||||
gboolean restore_configure = FALSE;
|
||||
|
||||
gdk_win32_surface_get_root_coords (surface, x, y, &root_x, &root_y);
|
||||
gdk_win32_surface_get_root_coords (window, x, y, &root_x, &root_y);
|
||||
|
||||
/* Before we drag, we need to undo any maximization or snapping.
|
||||
* AeroSnap behaviour:
|
||||
@@ -3453,7 +3443,7 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
* resize
|
||||
* don't unsnap
|
||||
* apply new width and x position to unsnapped cache,
|
||||
* so that unsnapped surface only regains its height
|
||||
* so that unsnapped window only regains its height
|
||||
* and y position, but inherits x and width from
|
||||
* the fullup snapped state
|
||||
* vertical resize:
|
||||
@@ -3468,7 +3458,7 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
*
|
||||
* TODO: make this implementation behave as AeroSnap on resizes?
|
||||
* There's also the case where
|
||||
* a halfleft/halfright surface isn't unsnapped when it's
|
||||
* a halfleft/halfright window isn't unsnapped when it's
|
||||
* being moved horizontally, but it's more difficult to implement.
|
||||
*/
|
||||
if (op == GDK_WIN32_DRAGOP_RESIZE &&
|
||||
@@ -3476,8 +3466,7 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
impl->snap_state == GDK_WIN32_AEROSNAP_STATE_HALFLEFT ||
|
||||
impl->snap_state == GDK_WIN32_AEROSNAP_STATE_FULLUP))
|
||||
{
|
||||
discard_snapinfo (surface);
|
||||
restore_configure = TRUE;
|
||||
discard_snapinfo (window);
|
||||
}
|
||||
else if (maximized ||
|
||||
(impl->snap_state == GDK_WIN32_AEROSNAP_STATE_HALFRIGHT ||
|
||||
@@ -3487,25 +3476,24 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
GdkMonitor *monitor;
|
||||
int wx, wy, wwidth, wheight;
|
||||
int swx, swy, swwidth, swheight;
|
||||
gboolean pointer_outside_of_surface;
|
||||
gboolean pointer_outside_of_window;
|
||||
int offsetx, offsety;
|
||||
gboolean left_half;
|
||||
GdkDisplay *display;
|
||||
|
||||
restore_configure = TRUE;
|
||||
display = gdk_surface_get_display (surface);
|
||||
monitor = gdk_display_get_monitor_at_surface (display, surface);
|
||||
gdk_surface_get_geometry (surface, &wx, &wy, &wwidth, &wheight);
|
||||
display = gdk_surface_get_display (window);
|
||||
monitor = gdk_display_get_monitor_at_surface (display, window);
|
||||
gdk_surface_get_geometry (window, &wx, &wy, &wwidth, &wheight);
|
||||
|
||||
swx = wx;
|
||||
swy = wy;
|
||||
swwidth = wwidth;
|
||||
swheight = wheight;
|
||||
|
||||
/* Subtract surface shadow. We don't want pointer to go outside of
|
||||
* the visible surface during drag-move. For drag-resize it's OK.
|
||||
* Don't take shadow into account if the surface is maximized -
|
||||
* maximized surfaces don't have shadows.
|
||||
/* Subtract window shadow. We don't want pointer to go outside of
|
||||
* the visible window during drag-move. For drag-resize it's OK.
|
||||
* Don't take shadow into account if the window is maximized -
|
||||
* maximized windows don't have shadows.
|
||||
*/
|
||||
if (op == GDK_WIN32_DRAGOP_MOVE && !maximized)
|
||||
{
|
||||
@@ -3515,16 +3503,16 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
swheight -= impl->shadow_y;
|
||||
}
|
||||
|
||||
pointer_outside_of_surface = root_x < swx || root_x > swx + swwidth ||
|
||||
pointer_outside_of_window = root_x < swx || root_x > swx + swwidth ||
|
||||
root_y < swy || root_y > swy + swheight;
|
||||
/* Calculate the offset of the pointer relative to the surface */
|
||||
/* Calculate the offset of the pointer relative to the window */
|
||||
offsetx = root_x - swx;
|
||||
offsety = root_y - swy;
|
||||
|
||||
/* Figure out in which half of the surface the pointer is.
|
||||
/* Figure out in which half of the window the pointer is.
|
||||
* The code currently only concerns itself with horizontal
|
||||
* dimension (left/right halves).
|
||||
* There's no upper/lower half, because usually surface
|
||||
* There's no upper/lower half, because usually window
|
||||
* is dragged by its upper half anyway. If that changes, adjust
|
||||
* accordingly.
|
||||
*/
|
||||
@@ -3534,26 +3522,26 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
if (!left_half)
|
||||
offsetx = swwidth - offsetx;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("Pointer at %d : %d, this is %d : %d relative to the surface's %s\n",
|
||||
GDK_NOTE (MISC, g_print ("Pointer at %d : %d, this is %d : %d relative to the window's %s\n",
|
||||
root_x, root_y, offsetx, offsety,
|
||||
left_half ? "left half" : "right half"));
|
||||
|
||||
/* Move surface in such a way that on unmaximization/unsnapping the pointer
|
||||
* is still pointing at the appropriate half of the surface,
|
||||
/* Move window in such a way that on unmaximization/unsnapping the pointer
|
||||
* is still pointing at the appropriate half of the window,
|
||||
* with the same offset from the left or right edge. If the new
|
||||
* surface size is too small, and adding that offset puts the pointer
|
||||
* window size is too small, and adding that offset puts the pointer
|
||||
* into the other half or even beyond, move the pointer to the middle.
|
||||
*/
|
||||
if (!pointer_outside_of_surface && maximized)
|
||||
if (!pointer_outside_of_window && maximized)
|
||||
{
|
||||
WINDOWPLACEMENT placement;
|
||||
int unmax_width, unmax_height;
|
||||
int shadow_unmax_width, shadow_unmax_height;
|
||||
|
||||
placement.length = sizeof (placement);
|
||||
API_CALL (GetWindowPlacement, (GDK_SURFACE_HWND (surface), &placement));
|
||||
API_CALL (GetWindowPlacement, (GDK_SURFACE_HWND (window), &placement));
|
||||
|
||||
GDK_NOTE (MISC, g_print ("W32 WM unmaximized surface placement is %ld x %ld @ %ld : %ld\n",
|
||||
GDK_NOTE (MISC, g_print ("W32 WM unmaximized window placement is %ld x %ld @ %ld : %ld\n",
|
||||
placement.rcNormalPosition.right - placement.rcNormalPosition.left,
|
||||
placement.rcNormalPosition.bottom - placement.rcNormalPosition.top,
|
||||
placement.rcNormalPosition.left,
|
||||
@@ -3599,9 +3587,9 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
placement.rcNormalPosition.left,
|
||||
placement.rcNormalPosition.top));
|
||||
|
||||
API_CALL (SetWindowPlacement, (GDK_SURFACE_HWND (surface), &placement));
|
||||
API_CALL (SetWindowPlacement, (GDK_SURFACE_HWND (window), &placement));
|
||||
}
|
||||
else if (!pointer_outside_of_surface && impl->snap_stash_int)
|
||||
else if (!pointer_outside_of_window && impl->snap_stash_int)
|
||||
{
|
||||
GdkRectangle new_pos;
|
||||
GdkRectangle snew_pos;
|
||||
@@ -3631,22 +3619,22 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
new_pos.y = root_y - new_pos.height / 2;
|
||||
}
|
||||
|
||||
GDK_NOTE (MISC, g_print ("Unsnapped surface to %d : %d\n",
|
||||
GDK_NOTE (MISC, g_print ("Unsnapped window to %d : %d\n",
|
||||
new_pos.x, new_pos.y));
|
||||
discard_snapinfo (surface);
|
||||
gdk_win32_surface_move_resize (surface, new_pos.x, new_pos.y,
|
||||
discard_snapinfo (window);
|
||||
gdk_win32_surface_move_resize (window, new_pos.x, new_pos.y,
|
||||
new_pos.width, new_pos.height);
|
||||
}
|
||||
|
||||
|
||||
if (maximized)
|
||||
gdk_win32_surface_unmaximize (surface);
|
||||
gdk_win32_surface_unmaximize (window);
|
||||
else
|
||||
unsnap (surface, monitor);
|
||||
unsnap (window, monitor);
|
||||
|
||||
if (pointer_outside_of_surface)
|
||||
if (pointer_outside_of_window)
|
||||
{
|
||||
/* Pointer outside of the surface, move pointer into surface */
|
||||
/* Pointer outside of the window, move pointer into window */
|
||||
GDK_NOTE (MISC, g_print ("Pointer at %d : %d is outside of %d x %d @ %d : %d, move it to %d : %d\n",
|
||||
root_x, root_y, wwidth, wheight, wx, wy, wx + wwidth / 2, wy + wheight / 2));
|
||||
root_x = wx + wwidth / 2;
|
||||
@@ -3659,29 +3647,26 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
}
|
||||
}
|
||||
|
||||
if (restore_configure)
|
||||
impl->inhibit_configure = FALSE;
|
||||
|
||||
_gdk_win32_get_window_rect (surface, &rect);
|
||||
_gdk_win32_get_window_rect (window, &rect);
|
||||
|
||||
cursor_name = get_cursor_name_from_op (op, edge);
|
||||
|
||||
context->cursor = gdk_cursor_new_from_name (cursor_name, NULL);
|
||||
|
||||
pointer_surface = surface;
|
||||
pointer_window = window;
|
||||
|
||||
/* Note: This triggers a WM_CAPTURECHANGED, which will trigger
|
||||
* gdk_win32_surface_end_move_resize_drag(), which will end
|
||||
* our op before it even begins, but only if context->op is not NONE.
|
||||
* This is why we first do the grab, *then* set the op.
|
||||
*/
|
||||
gdk_device_grab (device, pointer_surface,
|
||||
gdk_device_grab (device, pointer_window,
|
||||
FALSE,
|
||||
GDK_ALL_EVENTS_MASK,
|
||||
context->cursor,
|
||||
timestamp);
|
||||
|
||||
context->window = g_object_ref (surface);
|
||||
context->window = g_object_ref (window);
|
||||
context->op = op;
|
||||
context->edge = edge;
|
||||
context->device = device;
|
||||
@@ -3701,10 +3686,10 @@ setup_drag_move_resize_context (GdkSurface *surface,
|
||||
calculate_aerosnap_regions (context);
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print ("begin drag moveresize: surface %p, toplevel %p, "
|
||||
g_print ("begin drag moveresize: window %p, toplevel %p, "
|
||||
"op %u, edge %d, device %p, "
|
||||
"button %d, coord %d:%d, time %u\n",
|
||||
pointer_surface, surface,
|
||||
pointer_window, window,
|
||||
context->op, context->edge, context->device,
|
||||
context->button, context->start_root_x,
|
||||
context->start_root_y, context->timestamp));
|
||||
@@ -4099,61 +4084,45 @@ gdk_win32_surface_minimize (GdkSurface *window)
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_surface_maximize (GdkSurface *surface)
|
||||
gdk_win32_surface_maximize (GdkSurface *window)
|
||||
{
|
||||
GdkWin32Surface *impl;
|
||||
g_return_if_fail (GDK_IS_SURFACE (window));
|
||||
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (surface))
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
return;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_surface_maximize: %p: %s\n",
|
||||
GDK_SURFACE_HWND (surface),
|
||||
_gdk_win32_surface_state_to_string (surface->state)));
|
||||
GDK_SURFACE_HWND (window),
|
||||
_gdk_win32_surface_state_to_string (window->state)));
|
||||
|
||||
impl = GDK_WIN32_SURFACE (surface);
|
||||
impl->inhibit_configure = TRUE;
|
||||
impl->force_recompute_size = FALSE;
|
||||
|
||||
if (GDK_SURFACE_IS_MAPPED (surface))
|
||||
GtkShowWindow (surface, SW_MAXIMIZE);
|
||||
if (GDK_SURFACE_IS_MAPPED (window))
|
||||
GtkShowWindow (window, SW_MAXIMIZE);
|
||||
else
|
||||
gdk_synthesize_surface_state (surface,
|
||||
gdk_synthesize_surface_state (window,
|
||||
0,
|
||||
GDK_TOPLEVEL_STATE_MAXIMIZED);
|
||||
}
|
||||
|
||||
static void
|
||||
gdk_win32_surface_unmaximize (GdkSurface *surface)
|
||||
gdk_win32_surface_unmaximize (GdkSurface *window)
|
||||
{
|
||||
GdkWin32Surface *impl;
|
||||
g_return_if_fail (GDK_IS_SURFACE (window));
|
||||
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (surface))
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
return;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_surface_unmaximize: %p: %s\n",
|
||||
GDK_SURFACE_HWND (surface),
|
||||
_gdk_win32_surface_state_to_string (surface->state)));
|
||||
GDK_SURFACE_HWND (window),
|
||||
_gdk_win32_surface_state_to_string (window->state)));
|
||||
|
||||
_gdk_win32_surface_invalidate_egl_framebuffer (surface);
|
||||
_gdk_win32_surface_invalidate_egl_framebuffer (window);
|
||||
|
||||
if (GDK_SURFACE_IS_MAPPED (surface))
|
||||
GtkShowWindow (surface, SW_RESTORE);
|
||||
if (GDK_SURFACE_IS_MAPPED (window))
|
||||
GtkShowWindow (window, SW_RESTORE);
|
||||
else
|
||||
gdk_synthesize_surface_state (surface,
|
||||
gdk_synthesize_surface_state (window,
|
||||
GDK_TOPLEVEL_STATE_MAXIMIZED,
|
||||
0);
|
||||
|
||||
impl = GDK_WIN32_SURFACE (surface);
|
||||
|
||||
if (impl->inhibit_configure)
|
||||
{
|
||||
impl->inhibit_configure = FALSE;
|
||||
impl->force_recompute_size = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4578,9 +4547,6 @@ _gdk_win32_surface_request_layout (GdkSurface *surface)
|
||||
&surface->x, &surface->y,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
if (!impl->inhibit_configure)
|
||||
impl->force_recompute_size = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4595,18 +4561,8 @@ _gdk_win32_surface_compute_size (GdkSurface *surface)
|
||||
|
||||
if (!impl->drag_move_resize_context.native_move_resize_pending)
|
||||
{
|
||||
if (GDK_IS_TOPLEVEL (surface) && impl->force_recompute_size)
|
||||
{
|
||||
surface->width = width;
|
||||
surface->height = height;
|
||||
gdk_win32_surface_resize (surface, width, height);
|
||||
impl->force_recompute_size = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
surface->width = impl->next_layout.configured_width;
|
||||
surface->height = impl->next_layout.configured_height;
|
||||
}
|
||||
surface->width = impl->next_layout.configured_width;
|
||||
surface->height = impl->next_layout.configured_height;
|
||||
|
||||
_gdk_surface_update_size (surface);
|
||||
}
|
||||
|
||||
@@ -337,7 +337,6 @@ struct _GdkWin32Surface
|
||||
int configured_height;
|
||||
RECT configured_rect;
|
||||
} next_layout;
|
||||
gboolean force_recompute_size;
|
||||
|
||||
#ifdef HAVE_EGL
|
||||
guint egl_force_redraw_all : 1;
|
||||
|
||||
@@ -1665,7 +1665,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
_gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group),
|
||||
direction,
|
||||
FALSE);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1799,7 +1799,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
_gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group),
|
||||
x, y,
|
||||
axes);
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1838,7 +1838,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
|
||||
x = (double) xev->event_x / scale;
|
||||
y = (double) xev->event_y / scale;
|
||||
|
||||
|
||||
event = gdk_touch_event_new (ev->evtype == XI_TouchBegin
|
||||
? GDK_TOUCH_BEGIN
|
||||
: GDK_TOUCH_END,
|
||||
@@ -1946,7 +1946,6 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
y = (double) xev->event_y / scale;
|
||||
|
||||
event = gdk_touchpad_event_new_pinch (surface,
|
||||
NULL, /* FIXME make up sequences */
|
||||
device,
|
||||
xev->time,
|
||||
state,
|
||||
@@ -2007,7 +2006,6 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
|
||||
y = (double) xev->event_y / scale;
|
||||
|
||||
event = gdk_touchpad_event_new_swipe (surface,
|
||||
NULL, /* FIXME make up sequences */
|
||||
device,
|
||||
xev->time,
|
||||
state,
|
||||
|
||||
@@ -952,9 +952,9 @@ gsk_gl_command_queue_execute (GskGLCommandQueue *self,
|
||||
guint program = 0;
|
||||
guint width = 0;
|
||||
guint height = 0;
|
||||
G_GNUC_UNUSED guint n_binds = 0;
|
||||
guint n_binds = 0;
|
||||
guint n_fbos = 0;
|
||||
G_GNUC_UNUSED guint n_uniforms = 0;
|
||||
guint n_uniforms = 0;
|
||||
guint n_programs = 0;
|
||||
guint vao_id;
|
||||
guint vbo_id;
|
||||
|
||||
@@ -334,9 +334,6 @@ get_index_in_parent (GtkWidget *widget)
|
||||
GtkWidget *child;
|
||||
int idx;
|
||||
|
||||
if (parent == NULL)
|
||||
return -1;
|
||||
|
||||
idx = 0;
|
||||
for (child = gtk_widget_get_first_child (parent);
|
||||
child;
|
||||
|
||||
@@ -66,7 +66,7 @@ for f in get_files('theme/Default/assets-hc', '.svg'):
|
||||
xml += ' <file preprocess=\'xml-stripblanks\'>theme/Default/assets-hc/{0}</file>\n'.format(f)
|
||||
|
||||
for f in get_files('ui', '.ui'):
|
||||
xml += ' <file>ui/{0}</file>\n'.format(f)
|
||||
xml += ' <file alias="ui/{0}">ui/{0}.precompiled</file>\n'.format(f)
|
||||
|
||||
xml += '\n'
|
||||
|
||||
|
||||
+4
-22
@@ -546,7 +546,7 @@ gtk_bitset_union (GtkBitset *self,
|
||||
{
|
||||
g_return_if_fail (self != NULL);
|
||||
g_return_if_fail (other != NULL);
|
||||
|
||||
|
||||
if (self == other)
|
||||
return;
|
||||
|
||||
@@ -571,7 +571,7 @@ gtk_bitset_intersect (GtkBitset *self,
|
||||
{
|
||||
g_return_if_fail (self != NULL);
|
||||
g_return_if_fail (other != NULL);
|
||||
|
||||
|
||||
if (self == other)
|
||||
return;
|
||||
|
||||
@@ -596,7 +596,7 @@ gtk_bitset_subtract (GtkBitset *self,
|
||||
{
|
||||
g_return_if_fail (self != NULL);
|
||||
g_return_if_fail (other != NULL);
|
||||
|
||||
|
||||
if (self == other)
|
||||
{
|
||||
roaring_bitmap_clear (&self->roaring);
|
||||
@@ -626,7 +626,7 @@ gtk_bitset_difference (GtkBitset *self,
|
||||
{
|
||||
g_return_if_fail (self != NULL);
|
||||
g_return_if_fail (other != NULL);
|
||||
|
||||
|
||||
if (self == other)
|
||||
{
|
||||
roaring_bitmap_clear (&self->roaring);
|
||||
@@ -756,24 +756,6 @@ gtk_bitset_splice (GtkBitset *self,
|
||||
|
||||
G_STATIC_ASSERT (sizeof (GtkBitsetIter) >= sizeof (roaring_uint32_iterator_t));
|
||||
|
||||
static GtkBitsetIter *
|
||||
gtk_bitset_iter_copy (GtkBitsetIter *iter)
|
||||
{
|
||||
roaring_uint32_iterator_t *riter = (roaring_uint32_iterator_t *) iter;
|
||||
|
||||
return (GtkBitsetIter *) roaring_copy_uint32_iterator (riter);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_bitset_iter_free (GtkBitsetIter *iter)
|
||||
{
|
||||
roaring_uint32_iterator_t *riter = (roaring_uint32_iterator_t *) iter;
|
||||
|
||||
roaring_free_uint32_iterator (riter);
|
||||
}
|
||||
|
||||
G_DEFINE_BOXED_TYPE (GtkBitsetIter, gtk_bitset_iter, gtk_bitset_iter_copy, gtk_bitset_iter_free)
|
||||
|
||||
/**
|
||||
* gtk_bitset_iter_init_first:
|
||||
* @iter: (out): a pointer to an uninitialized `GtkBitsetIter`
|
||||
|
||||
+2
-3
@@ -148,9 +148,6 @@ struct _GtkBitsetIter
|
||||
gpointer private_data[10];
|
||||
};
|
||||
|
||||
GDK_AVAILABLE_IN_4_6
|
||||
GType gtk_bitset_iter_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_bitset_iter_init_first (GtkBitsetIter *iter,
|
||||
const GtkBitset *set,
|
||||
@@ -174,6 +171,8 @@ GDK_AVAILABLE_IN_ALL
|
||||
guint gtk_bitset_iter_get_value (const GtkBitsetIter *iter);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_bitset_iter_is_valid (const GtkBitsetIter *iter);
|
||||
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
+20
-39
@@ -1158,34 +1158,6 @@ get_height_for_width (GtkLabel *self,
|
||||
g_object_unref (layout);
|
||||
}
|
||||
|
||||
static int
|
||||
my_pango_layout_get_width_for_height (PangoLayout *layout,
|
||||
int for_height,
|
||||
int min,
|
||||
int max)
|
||||
{
|
||||
int mid, text_width, text_height;
|
||||
|
||||
min = PANGO_PIXELS_CEIL (min);
|
||||
max = PANGO_PIXELS_CEIL (max);
|
||||
|
||||
while (min < max)
|
||||
{
|
||||
mid = (min + max) / 2;
|
||||
pango_layout_set_width (layout, mid * PANGO_SCALE);
|
||||
pango_layout_get_size (layout, &text_width, &text_height);
|
||||
text_width = PANGO_PIXELS_CEIL (text_width);
|
||||
if (text_width > mid)
|
||||
min = mid = text_width;
|
||||
else if (text_height > for_height)
|
||||
min = mid + 1;
|
||||
else
|
||||
max = mid;
|
||||
}
|
||||
|
||||
return min * PANGO_SCALE;
|
||||
}
|
||||
|
||||
static void
|
||||
get_width_for_height (GtkLabel *self,
|
||||
int height,
|
||||
@@ -1211,15 +1183,13 @@ get_width_for_height (GtkLabel *self,
|
||||
}
|
||||
else
|
||||
{
|
||||
int min, max;
|
||||
int min, max, mid, text_width, text_height;
|
||||
|
||||
/* Can't use a measuring layout here, because we need to force
|
||||
* ellipsizing mode */
|
||||
gtk_label_ensure_layout (self);
|
||||
layout = pango_layout_copy (self->layout);
|
||||
pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_NONE);
|
||||
if (self->wrap_mode == PANGO_WRAP_WORD_CHAR)
|
||||
pango_layout_set_wrap (layout, PANGO_WRAP_WORD);
|
||||
|
||||
/* binary search for the smallest width where the height doesn't
|
||||
* eclipse the given height */
|
||||
@@ -1228,7 +1198,23 @@ get_width_for_height (GtkLabel *self,
|
||||
pango_layout_set_width (layout, -1);
|
||||
pango_layout_get_size (layout, &max, NULL);
|
||||
|
||||
*natural_width = my_pango_layout_get_width_for_height (layout, height, min, max);
|
||||
min = PANGO_PIXELS_CEIL (min);
|
||||
max = PANGO_PIXELS_CEIL (max);
|
||||
while (min < max)
|
||||
{
|
||||
mid = (min + max) / 2;
|
||||
pango_layout_set_width (layout, mid * PANGO_SCALE);
|
||||
pango_layout_get_size (layout, &text_width, &text_height);
|
||||
text_width = PANGO_PIXELS_CEIL (text_width);
|
||||
if (text_width > mid)
|
||||
min = mid = text_width;
|
||||
else if (text_height > height)
|
||||
min = mid + 1;
|
||||
else
|
||||
max = mid;
|
||||
}
|
||||
|
||||
*natural_width = min * PANGO_SCALE;
|
||||
|
||||
if (self->ellipsize != PANGO_ELLIPSIZE_NONE)
|
||||
{
|
||||
@@ -1237,11 +1223,6 @@ get_width_for_height (GtkLabel *self,
|
||||
pango_layout_get_size (layout, minimum_width, NULL);
|
||||
*minimum_width = MAX (*minimum_width, minimum_default);
|
||||
}
|
||||
else if (self->wrap_mode == PANGO_WRAP_WORD_CHAR)
|
||||
{
|
||||
pango_layout_set_wrap (layout, PANGO_WRAP_WORD_CHAR);
|
||||
*minimum_width = my_pango_layout_get_width_for_height (layout, height, min, *natural_width);
|
||||
}
|
||||
else
|
||||
{
|
||||
*minimum_width = *natural_width;
|
||||
@@ -4022,12 +4003,12 @@ gtk_label_set_wrap_mode (GtkLabel *self,
|
||||
*
|
||||
* See [method@Gtk.Label.set_wrap_mode].
|
||||
*
|
||||
* Returns: the line wrap mode
|
||||
* Returns: %TRUE if the lines of the label are automatically wrapped.
|
||||
*/
|
||||
PangoWrapMode
|
||||
gtk_label_get_wrap_mode (GtkLabel *self)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_LABEL (self), PANGO_WRAP_WORD);
|
||||
g_return_val_if_fail (GTK_IS_LABEL (self), FALSE);
|
||||
|
||||
return self->wrap_mode;
|
||||
}
|
||||
|
||||
@@ -951,7 +951,6 @@ rewrite_event_for_surface (GdkEvent *event,
|
||||
case GDK_TOUCHPAD_SWIPE:
|
||||
gdk_touchpad_event_get_deltas (event, &dx, &dy);
|
||||
return gdk_touchpad_event_new_swipe (new_surface,
|
||||
gdk_event_get_event_sequence (event),
|
||||
gdk_event_get_device (event),
|
||||
gdk_event_get_time (event),
|
||||
gdk_event_get_modifier_state (event),
|
||||
@@ -962,7 +961,6 @@ rewrite_event_for_surface (GdkEvent *event,
|
||||
case GDK_TOUCHPAD_PINCH:
|
||||
gdk_touchpad_event_get_deltas (event, &dx, &dy);
|
||||
return gdk_touchpad_event_new_pinch (new_surface,
|
||||
gdk_event_get_event_sequence (event),
|
||||
gdk_event_get_device (event),
|
||||
gdk_event_get_time (event),
|
||||
gdk_event_get_modifier_state (event),
|
||||
|
||||
+23
-3
@@ -1157,6 +1157,7 @@ totally_invisible_line (GtkTextLayout *layout,
|
||||
GtkTextIter *iter)
|
||||
{
|
||||
GtkTextLineSegment *seg;
|
||||
int bytes = 0;
|
||||
|
||||
/* Check if the first char is visible, if so we are partially visible.
|
||||
* Note that we have to check this since we don't know the current
|
||||
@@ -1167,12 +1168,22 @@ totally_invisible_line (GtkTextLayout *layout,
|
||||
if (!_gtk_text_btree_char_is_invisible (iter))
|
||||
return FALSE;
|
||||
|
||||
bytes = 0;
|
||||
seg = line->segments;
|
||||
|
||||
while (seg != NULL)
|
||||
{
|
||||
if (seg->byte_count <= 0 &&
|
||||
seg->type == >k_text_toggle_on_type)
|
||||
if (seg->byte_count > 0)
|
||||
bytes += seg->byte_count;
|
||||
|
||||
/* Note that these two tests can cause us to bail out
|
||||
* when we shouldn't, because a higher-priority tag
|
||||
* may override these settings. However the important
|
||||
* thing is to only invisible really-invisible lines, rather
|
||||
* than to invisible all really-invisible lines.
|
||||
*/
|
||||
|
||||
else if (seg->type == >k_text_toggle_on_type)
|
||||
{
|
||||
invalidate_cached_style (layout);
|
||||
|
||||
@@ -2286,7 +2297,7 @@ gtk_text_layout_create_display (GtkTextLayout *layout,
|
||||
char *text;
|
||||
int text_pixel_width;
|
||||
PangoAttrList *attrs;
|
||||
int text_allocated, layout_byte_offset;
|
||||
int text_allocated, layout_byte_offset, buffer_byte_offset;
|
||||
PangoRectangle extents;
|
||||
gboolean para_values_set = FALSE;
|
||||
GSList *cursor_byte_offsets = NULL;
|
||||
@@ -2345,6 +2356,7 @@ gtk_text_layout_create_display (GtkTextLayout *layout,
|
||||
|
||||
/* Iterate over segments, creating display chunks for them, and updating the tags array. */
|
||||
layout_byte_offset = 0; /* current length of layout text (includes preedit, does not include invisible text) */
|
||||
buffer_byte_offset = 0; /* position in the buffer line */
|
||||
seg = _gtk_text_iter_get_any_segment (&iter);
|
||||
tags = _gtk_text_btree_get_tags (&iter);
|
||||
initial_toggle_segments = TRUE;
|
||||
@@ -2394,6 +2406,7 @@ gtk_text_layout_create_display (GtkTextLayout *layout,
|
||||
{
|
||||
memcpy (text + layout_byte_offset, seg->body.chars, seg->byte_count);
|
||||
layout_byte_offset += seg->byte_count;
|
||||
buffer_byte_offset += seg->byte_count;
|
||||
bytes += seg->byte_count;
|
||||
}
|
||||
else if (seg->type == >k_text_right_mark_type ||
|
||||
@@ -2445,6 +2458,7 @@ gtk_text_layout_create_display (GtkTextLayout *layout,
|
||||
memcpy (text + layout_byte_offset, _gtk_text_unknown_char_utf8,
|
||||
seg->byte_count);
|
||||
layout_byte_offset += seg->byte_count;
|
||||
buffer_byte_offset += seg->byte_count;
|
||||
}
|
||||
else if (seg->type == >k_text_child_type)
|
||||
{
|
||||
@@ -2459,6 +2473,7 @@ gtk_text_layout_create_display (GtkTextLayout *layout,
|
||||
memcpy (text + layout_byte_offset, gtk_text_child_anchor_get_replacement (seg->body.child.obj),
|
||||
seg->byte_count);
|
||||
layout_byte_offset += seg->byte_count;
|
||||
buffer_byte_offset += seg->byte_count;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2467,6 +2482,11 @@ gtk_text_layout_create_display (GtkTextLayout *layout,
|
||||
}
|
||||
|
||||
} /* if (segment was visible) */
|
||||
else
|
||||
{
|
||||
/* Invisible segment */
|
||||
buffer_byte_offset += seg->byte_count;
|
||||
}
|
||||
|
||||
release_style (layout, style);
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="16px" viewBox="0 0 16 16" width="16px"><filter id="a" height="100%" width="100%" x="0%" y="0%"><feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/></filter><mask id="b"><g filter="url(#a)"><path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.3"/></g></mask><clipPath id="c"><path d="m 0 0 h 1600 v 1200 h -1600 z"/></clipPath><mask id="d"><g filter="url(#a)"><path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/></g></mask><clipPath id="e"><path d="m 0 0 h 1600 v 1200 h -1600 z"/></clipPath><mask id="f"><g filter="url(#a)"><path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/></g></mask><clipPath id="g"><path d="m 0 0 h 1600 v 1200 h -1600 z"/></clipPath><mask id="h"><g filter="url(#a)"><path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/></g></mask><clipPath id="i"><path d="m 0 0 h 1600 v 1200 h -1600 z"/></clipPath><mask id="j"><g filter="url(#a)"><path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/></g></mask><clipPath id="k"><path d="m 0 0 h 1600 v 1200 h -1600 z"/></clipPath><mask id="l"><g filter="url(#a)"><path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/></g></mask><clipPath id="m"><path d="m 0 0 h 1600 v 1200 h -1600 z"/></clipPath><mask id="n"><g filter="url(#a)"><path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/></g></mask><clipPath id="o"><path d="m 0 0 h 1600 v 1200 h -1600 z"/></clipPath><mask id="p"><g filter="url(#a)"><path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.3"/></g></mask><clipPath id="q"><path d="m 0 0 h 1600 v 1200 h -1600 z"/></clipPath><mask id="r"><g filter="url(#a)"><path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.5"/></g></mask><clipPath id="s"><path d="m 0 0 h 1600 v 1200 h -1600 z"/></clipPath><g clip-path="url(#c)" mask="url(#b)" transform="matrix(1 0 0 1 -16 -816)"><path d="m 562.460938 212.058594 h 10.449218 c -1.183594 0.492187 -1.296875 2.460937 0 3 h -10.449218 z m 0 0" fill="#2e3436"/></g><g clip-path="url(#e)" mask="url(#d)" transform="matrix(1 0 0 1 -16 -816)"><path d="m 16 748 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/></g><g clip-path="url(#g)" mask="url(#f)" transform="matrix(1 0 0 1 -16 -816)"><path d="m 17 747 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/></g><g clip-path="url(#i)" mask="url(#h)" transform="matrix(1 0 0 1 -16 -816)"><path d="m 18 750 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/></g><g clip-path="url(#k)" mask="url(#j)" transform="matrix(1 0 0 1 -16 -816)"><path d="m 16 750 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/></g><g clip-path="url(#m)" mask="url(#l)" transform="matrix(1 0 0 1 -16 -816)"><path d="m 17 751 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/></g><g clip-path="url(#o)" mask="url(#n)" transform="matrix(1 0 0 1 -16 -816)"><path d="m 19 751 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/></g><g clip-path="url(#q)" mask="url(#p)" transform="matrix(1 0 0 1 -16 -816)"><path d="m 136 776 v 7 h 7 v -7 z m 0 0" fill="#2e3436"/></g><g clip-path="url(#s)" mask="url(#r)" transform="matrix(1 0 0 1 -16 -816)"><path d="m 219 758 h 3 v 12 h -3 z m 0 0" fill="#2e3436"/></g><g fill="#2e3436"><path d="m 11.507812 3.078125 l -8.429687 8.429687 c 0.765625 0.039063 1.375 0.648438 1.414063 1.414063 l 8.429687 -8.429687 c -0.765625 -0.039063 -1.375 -0.648438 -1.414063 -1.414063 z m 0 0"/><path d="m 3 11 c -1.097656 0 -2 0.902344 -2 2 s 0.902344 2 2 2 s 2 -0.902344 2 -2 s -0.902344 -2 -2 -2 z m 0 1 c 0.558594 0 1 0.441406 1 1 s -0.441406 1 -1 1 s -1 -0.441406 -1 -1 s 0.441406 -1 1 -1 z m 0 0"/><path d="m 13 1 c -1.097656 0 -2 0.902344 -2 2 s 0.902344 2 2 2 s 2 -0.902344 2 -2 s -0.902344 -2 -2 -2 z m 0 1 c 0.558594 0 1 0.441406 1 1 s -0.441406 1 -1 1 s -1 -0.441406 -1 -1 s 0.441406 -1 1 -1 z m 0 0"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 3.8 KiB |
@@ -181,7 +181,7 @@ init_formats (GtkInspectorClipboard *self,
|
||||
gtk_list_box_remove (list, GTK_WIDGET (row));
|
||||
|
||||
formats = gdk_clipboard_get_formats (clipboard);
|
||||
|
||||
|
||||
gtypes = gdk_content_formats_get_gtypes (formats, &n);
|
||||
for (i = 0; i < n; i++)
|
||||
add_content_type_row (self, list, g_type_name (gtypes[i]), clipboard, G_CALLBACK (load_gtype), GSIZE_TO_POINTER (gtypes[i]));
|
||||
@@ -235,6 +235,7 @@ primary_notify (GdkClipboard *clipboard,
|
||||
init_formats (self, GTK_LIST_BOX (self->primary_formats), clipboard);
|
||||
}
|
||||
|
||||
g_print ("%s: %s\n", pspec->name, gdk_content_formats_to_string (gdk_clipboard_get_formats (clipboard)));
|
||||
init_info (self, GTK_LABEL (self->primary_info), clipboard);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#include "eventrecording.h"
|
||||
|
||||
G_DEFINE_TYPE (GtkInspectorEventRecording, gtk_inspector_event_recording, GTK_TYPE_INSPECTOR_RECORDING)
|
||||
|
||||
static void
|
||||
gtk_inspector_event_recording_finalize (GObject *object)
|
||||
{
|
||||
GtkInspectorEventRecording *recording = GTK_INSPECTOR_EVENT_RECORDING (object);
|
||||
|
||||
g_clear_pointer (&recording->event, gdk_event_unref);
|
||||
|
||||
G_OBJECT_CLASS (gtk_inspector_event_recording_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_inspector_event_recording_class_init (GtkInspectorEventRecordingClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gtk_inspector_event_recording_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_inspector_event_recording_init (GtkInspectorEventRecording *vis)
|
||||
{
|
||||
}
|
||||
|
||||
GtkInspectorRecording *
|
||||
gtk_inspector_event_recording_new (gint64 timestamp,
|
||||
GdkEvent *event)
|
||||
{
|
||||
GtkInspectorEventRecording *recording;
|
||||
|
||||
recording = g_object_new (GTK_TYPE_INSPECTOR_EVENT_RECORDING,
|
||||
"timestamp", timestamp,
|
||||
NULL);
|
||||
|
||||
recording->event = gdk_event_ref (event);
|
||||
|
||||
return GTK_INSPECTOR_RECORDING (recording);
|
||||
}
|
||||
|
||||
GdkEvent *
|
||||
gtk_inspector_event_recording_get_event (GtkInspectorEventRecording *recording)
|
||||
{
|
||||
return recording->event;
|
||||
}
|
||||
|
||||
// vim: set et sw=2 ts=2:
|
||||
@@ -1,64 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _GTK_INSPECTOR_EVENT_RECORDING_H_
|
||||
#define _GTK_INSPECTOR_EVENT_RECORDING_H_
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gsk/gsk.h>
|
||||
#include "gsk/gskprofilerprivate.h"
|
||||
|
||||
#include "inspector/recording.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_INSPECTOR_EVENT_RECORDING (gtk_inspector_event_recording_get_type())
|
||||
#define GTK_INSPECTOR_EVENT_RECORDING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_INSPECTOR_EVENT_RECORDING, GtkInspectorEventRecording))
|
||||
#define GTK_INSPECTOR_EVENT_RECORDING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_INSPECTOR_EVENT_RECORDING, GtkInspectorEventRecordingClass))
|
||||
#define GTK_INSPECTOR_IS_EVENT_RECORDING(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_INSPECTOR_EVENT_RECORDING))
|
||||
#define GTK_INSPECTOR_IS_EVENT_RECORDING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_INSPECTOR_EVENT_RECORDING))
|
||||
#define GTK_INSPECTOR_EVENT_RECORDING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_INSPECTOR_EVENT_RECORDING, GtkInspectorEventRecordingClass))
|
||||
|
||||
|
||||
typedef struct _GtkInspectorEventRecordingPrivate GtkInspectorEventRecordingPrivate;
|
||||
|
||||
typedef struct _GtkInspectorEventRecording
|
||||
{
|
||||
GtkInspectorRecording parent;
|
||||
|
||||
GdkEvent *event;
|
||||
} GtkInspectorEventRecording;
|
||||
|
||||
typedef struct _GtkInspectorEventRecordingClass
|
||||
{
|
||||
GtkInspectorRecordingClass parent;
|
||||
} GtkInspectorEventRecordingClass;
|
||||
|
||||
GType gtk_inspector_event_recording_get_type (void);
|
||||
|
||||
GtkInspectorRecording *
|
||||
gtk_inspector_event_recording_new (gint64 timestamp,
|
||||
GdkEvent *event);
|
||||
|
||||
GdkEvent * gtk_inspector_event_recording_get_event (GtkInspectorEventRecording *recording);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif // _GTK_INSPECTOR_EVENT_RECORDING_H_
|
||||
|
||||
// vim: set et sw=2 ts=2:
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "list-data.h"
|
||||
#include "logs.h"
|
||||
#include "magnifier.h"
|
||||
#include "measuregraph.h"
|
||||
#include "menu.h"
|
||||
#include "misc-info.h"
|
||||
#include "object-tree.h"
|
||||
@@ -75,7 +74,6 @@ gtk_inspector_init (void)
|
||||
g_type_ensure (GTK_TYPE_INSPECTOR_LOGS);
|
||||
g_type_ensure (GTK_TYPE_MAGNIFIER);
|
||||
g_type_ensure (GTK_TYPE_INSPECTOR_MAGNIFIER);
|
||||
g_type_ensure (GTK_TYPE_INSPECTOR_MEASURE_GRAPH);
|
||||
g_type_ensure (GTK_TYPE_INSPECTOR_MENU);
|
||||
g_type_ensure (GTK_TYPE_INSPECTOR_MISC_INFO);
|
||||
g_type_ensure (GTK_TYPE_INSPECTOR_OBJECT_TREE);
|
||||
|
||||
@@ -55,7 +55,3 @@ picture.light {
|
||||
min-width: 10px;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
row:not(:selected) > .highlight {
|
||||
background-color: rgba(135, 206, 250, 0.4);
|
||||
}
|
||||
|
||||
@@ -1,250 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2021 Benjamin Otte
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Benjamin Otte <otte@gnome.org>
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "measuregraph.h"
|
||||
|
||||
/* gdk_texture_new_for_surface() */
|
||||
#include "gdk/gdktextureprivate.h"
|
||||
|
||||
#define MAX_SIZES 2048
|
||||
|
||||
typedef struct _Size Size;
|
||||
struct _Size
|
||||
{
|
||||
int min;
|
||||
int nat;
|
||||
};
|
||||
|
||||
struct _GtkInspectorMeasureGraph
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
GdkPaintable *texture;
|
||||
Size width;
|
||||
Size height;
|
||||
Size width_for_height[MAX_SIZES];
|
||||
Size height_for_width[MAX_SIZES];
|
||||
};
|
||||
|
||||
struct _GtkInspectorMeasureGraphClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
static void
|
||||
gtk_inspector_measure_graph_ensure_texture (GtkInspectorMeasureGraph *self)
|
||||
{
|
||||
int i, width, height;
|
||||
cairo_surface_t *surface;
|
||||
cairo_t *cr;
|
||||
|
||||
if (self->texture)
|
||||
return;
|
||||
|
||||
if (self->width.nat == 0 || self->height.nat == 0)
|
||||
{
|
||||
self->texture = gdk_paintable_new_empty (0, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
width = self->width.nat;
|
||||
for (i = 0; i < MAX_SIZES; i++)
|
||||
width = MAX (width, self->width_for_height[i].nat);
|
||||
width = MIN (width, MAX_SIZES);
|
||||
height = self->height.nat;
|
||||
for (i = 0; i < MAX_SIZES; i++)
|
||||
height = MAX (height, self->height_for_width[i].nat);
|
||||
height = MIN (height, MAX_SIZES);
|
||||
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
|
||||
cr = cairo_create (surface);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_ADD);
|
||||
|
||||
cairo_set_source_rgba (cr, 0.5, 0, 0, 1);
|
||||
cairo_rectangle (cr, 0, 0, self->width.min, height);
|
||||
cairo_fill (cr);
|
||||
cairo_set_source_rgba (cr, 1, 0, 0, 1);
|
||||
for (i = self->width.min; i < width; i++)
|
||||
cairo_rectangle (cr, i, 0, 1, self->height_for_width[i].min);
|
||||
cairo_fill (cr);
|
||||
cairo_set_source_rgba (cr, 1, 0, 0, 0.3);
|
||||
for (i = self->width.min; i < width; i++)
|
||||
cairo_rectangle (cr, i, self->height_for_width[i].min, 1, self->height_for_width[i].nat - self->height_for_width[i].min);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_set_source_rgba (cr, 0, 0, 0.5, 1);
|
||||
cairo_rectangle (cr, 0, 0, width, self->height.min);
|
||||
cairo_fill (cr);
|
||||
cairo_set_source_rgba (cr, 0, 0, 1, 1);
|
||||
for (i = self->height.min; i < height; i++)
|
||||
cairo_rectangle (cr, 0, i, self->width_for_height[i].min, 1);
|
||||
cairo_fill (cr);
|
||||
cairo_set_source_rgba (cr, 0, 0, 1, 0.3);
|
||||
for (i = self->height.min; i < height; i++)
|
||||
cairo_rectangle (cr, self->width_for_height[i].min, i, self->width_for_height[i].nat - self->width_for_height[i].min, 1);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
|
||||
cairo_set_source_rgba (cr, 0, 0, 0, 1);
|
||||
cairo_rectangle (cr, self->width.nat, 0, 1, height);
|
||||
cairo_rectangle (cr, 0, self->height.nat, width, 1);
|
||||
cairo_fill (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
self->texture = GDK_PAINTABLE (gdk_texture_new_for_surface (surface));
|
||||
cairo_surface_destroy (surface);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_inspector_measure_graph_paintable_snapshot (GdkPaintable *paintable,
|
||||
GdkSnapshot *snapshot,
|
||||
double width,
|
||||
double height)
|
||||
{
|
||||
GtkInspectorMeasureGraph *self = GTK_INSPECTOR_MEASURE_GRAPH (paintable);
|
||||
|
||||
gtk_inspector_measure_graph_ensure_texture (self);
|
||||
|
||||
if (self->texture == NULL)
|
||||
return;
|
||||
|
||||
gdk_paintable_snapshot (self->texture, snapshot, width, height);
|
||||
}
|
||||
|
||||
static int
|
||||
gtk_inspector_measure_graph_paintable_get_intrinsic_width (GdkPaintable *paintable)
|
||||
{
|
||||
GtkInspectorMeasureGraph *self = GTK_INSPECTOR_MEASURE_GRAPH (paintable);
|
||||
|
||||
gtk_inspector_measure_graph_ensure_texture (self);
|
||||
|
||||
return gdk_paintable_get_intrinsic_width (self->texture);
|
||||
}
|
||||
|
||||
static int
|
||||
gtk_inspector_measure_graph_paintable_get_intrinsic_height (GdkPaintable *paintable)
|
||||
{
|
||||
GtkInspectorMeasureGraph *self = GTK_INSPECTOR_MEASURE_GRAPH (paintable);
|
||||
|
||||
gtk_inspector_measure_graph_ensure_texture (self);
|
||||
|
||||
return gdk_paintable_get_intrinsic_height (self->texture);
|
||||
}
|
||||
|
||||
static double
|
||||
gtk_inspector_measure_graph_paintable_get_intrinsic_aspect_ratio (GdkPaintable *paintable)
|
||||
{
|
||||
GtkInspectorMeasureGraph *self = GTK_INSPECTOR_MEASURE_GRAPH (paintable);
|
||||
|
||||
gtk_inspector_measure_graph_ensure_texture (self);
|
||||
|
||||
return gdk_paintable_get_intrinsic_aspect_ratio (self->texture);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_inspector_measure_graph_paintable_init (GdkPaintableInterface *iface)
|
||||
{
|
||||
iface->snapshot = gtk_inspector_measure_graph_paintable_snapshot;
|
||||
iface->get_intrinsic_width = gtk_inspector_measure_graph_paintable_get_intrinsic_width;
|
||||
iface->get_intrinsic_height = gtk_inspector_measure_graph_paintable_get_intrinsic_height;
|
||||
iface->get_intrinsic_aspect_ratio = gtk_inspector_measure_graph_paintable_get_intrinsic_aspect_ratio;
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE_EXTENDED (GtkInspectorMeasureGraph, gtk_inspector_measure_graph, G_TYPE_OBJECT, 0,
|
||||
G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
|
||||
gtk_inspector_measure_graph_paintable_init))
|
||||
|
||||
static void
|
||||
gtk_inspector_measure_graph_dispose (GObject *object)
|
||||
{
|
||||
GtkInspectorMeasureGraph *self = GTK_INSPECTOR_MEASURE_GRAPH (object);
|
||||
|
||||
g_clear_object (&self->texture);
|
||||
|
||||
G_OBJECT_CLASS (gtk_inspector_measure_graph_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_inspector_measure_graph_class_init (GtkInspectorMeasureGraphClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gobject_class->dispose = gtk_inspector_measure_graph_dispose;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_inspector_measure_graph_init (GtkInspectorMeasureGraph *self)
|
||||
{
|
||||
}
|
||||
|
||||
GtkInspectorMeasureGraph *
|
||||
gtk_inspector_measure_graph_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_INSPECTOR_MEASURE_GRAPH, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_inspector_measure_graph_clear (GtkInspectorMeasureGraph *self)
|
||||
{
|
||||
g_clear_object (&self->texture);
|
||||
|
||||
memset (&self->width, 0, sizeof (self->width));
|
||||
memset (&self->height, 0, sizeof (self->height));
|
||||
memset (&self->width_for_height, 0, sizeof (self->width_for_height));
|
||||
memset (&self->height_for_width, 0, sizeof (self->height_for_width));
|
||||
|
||||
gdk_paintable_invalidate_size (GDK_PAINTABLE (self));
|
||||
gdk_paintable_invalidate_contents (GDK_PAINTABLE (self));
|
||||
}
|
||||
|
||||
void
|
||||
gtk_inspector_measure_graph_measure (GtkInspectorMeasureGraph *self,
|
||||
GtkWidget *widget)
|
||||
{
|
||||
int i;
|
||||
|
||||
g_clear_object (&self->texture);
|
||||
|
||||
gtk_widget_measure (widget, GTK_ORIENTATION_HORIZONTAL, -1, &self->width.min, &self->width.nat, NULL, NULL);
|
||||
gtk_widget_measure (widget, GTK_ORIENTATION_VERTICAL, -1 ,&self->height.min, &self->height.nat, NULL, NULL);
|
||||
|
||||
memset (&self->width_for_height, 0, sizeof (Size) * MIN (self->height.min, MAX_SIZES));
|
||||
for (i = self->height.min; i < MAX_SIZES; i++)
|
||||
gtk_widget_measure (widget, GTK_ORIENTATION_HORIZONTAL, i, &self->width_for_height[i].min, &self->width_for_height[i].nat, NULL, NULL);
|
||||
memset (&self->height_for_width, 0, sizeof (Size) * MIN (self->width.min, MAX_SIZES));
|
||||
for (i = self->width.min; i < MAX_SIZES; i++)
|
||||
gtk_widget_measure (widget, GTK_ORIENTATION_VERTICAL, i, &self->height_for_width[i].min, &self->height_for_width[i].nat, NULL, NULL);
|
||||
|
||||
gdk_paintable_invalidate_size (GDK_PAINTABLE (self));
|
||||
gdk_paintable_invalidate_contents (GDK_PAINTABLE (self));
|
||||
}
|
||||
|
||||
GdkTexture *
|
||||
gtk_inspector_measure_graph_get_texture (GtkInspectorMeasureGraph *self)
|
||||
{
|
||||
gtk_inspector_measure_graph_ensure_texture (self);
|
||||
|
||||
if (!GDK_IS_TEXTURE (self->texture))
|
||||
return NULL;
|
||||
|
||||
return GDK_TEXTURE (self->texture);
|
||||
}
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2021 Benjamin Otte
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Benjamin Otte <otte@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __GTK_INSPECTOR_MEASURE_GRAPH_H__
|
||||
#define __GTK_INSPECTOR_MEASURE_GRAPH_H__
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_INSPECTOR_MEASURE_GRAPH (gtk_inspector_measure_graph_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (GtkInspectorMeasureGraph, gtk_inspector_measure_graph, GTK, INSPECTOR_MEASURE_GRAPH, GObject)
|
||||
|
||||
GtkInspectorMeasureGraph * gtk_inspector_measure_graph_new (void);
|
||||
|
||||
void gtk_inspector_measure_graph_clear (GtkInspectorMeasureGraph *self);
|
||||
void gtk_inspector_measure_graph_measure (GtkInspectorMeasureGraph *self,
|
||||
GtkWidget *widget);
|
||||
GdkTexture * gtk_inspector_measure_graph_get_texture (GtkInspectorMeasureGraph *self);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_INSPECTOR_MEASURE_GRAPH_H__ */
|
||||
@@ -9,7 +9,6 @@ inspector_sources = files(
|
||||
'controllers.c',
|
||||
'css-editor.c',
|
||||
'css-node-tree.c',
|
||||
'eventrecording.c',
|
||||
'focusoverlay.c',
|
||||
'fpsoverlay.c',
|
||||
'general.c',
|
||||
@@ -24,7 +23,6 @@ inspector_sources = files(
|
||||
'layoutoverlay.c',
|
||||
'logs.c',
|
||||
'magnifier.c',
|
||||
'measuregraph.c',
|
||||
'menu.c',
|
||||
'misc-info.c',
|
||||
'object-tree.c',
|
||||
@@ -32,7 +30,6 @@ inspector_sources = files(
|
||||
'prop-holder.c',
|
||||
'prop-list.c',
|
||||
'recorder.c',
|
||||
'recorderrow.c',
|
||||
'recording.c',
|
||||
'renderrecording.c',
|
||||
'resource-holder.c',
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#include "misc-info.h"
|
||||
|
||||
#include "measuregraph.h"
|
||||
#include "window.h"
|
||||
#include "type-info.h"
|
||||
|
||||
@@ -57,10 +55,6 @@ struct _GtkInspectorMiscInfo
|
||||
GtkWidget *mnemonic_label;
|
||||
GtkWidget *request_mode_row;
|
||||
GtkWidget *request_mode;
|
||||
GtkWidget *measure_row;
|
||||
GtkWidget *measure_expand_toggle;
|
||||
GtkWidget *measure_picture;
|
||||
GdkPaintable *measure_graph;
|
||||
GtkWidget *allocated_size_row;
|
||||
GtkWidget *allocated_size;
|
||||
GtkWidget *baseline_row;
|
||||
@@ -164,8 +158,6 @@ update_allocation (GtkWidget *w,
|
||||
value = g_enum_get_value (class, gtk_widget_get_request_mode (w));
|
||||
gtk_label_set_label (GTK_LABEL (sl->request_mode), value->value_nick);
|
||||
g_type_class_unref (class);
|
||||
|
||||
gtk_inspector_measure_graph_measure (GTK_INSPECTOR_MEASURE_GRAPH (sl->measure_graph), w);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -432,50 +424,6 @@ update_info (gpointer data)
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
static GdkContentProvider *
|
||||
measure_picture_drag_prepare (GtkDragSource *source,
|
||||
double x,
|
||||
double y,
|
||||
gpointer unused)
|
||||
{
|
||||
GtkWidget *picture;
|
||||
GdkPaintable *measure_graph;
|
||||
GdkTexture *texture;
|
||||
|
||||
picture = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (source));
|
||||
measure_graph = gtk_picture_get_paintable (GTK_PICTURE (picture));
|
||||
if (!GTK_IS_INSPECTOR_MEASURE_GRAPH (measure_graph))
|
||||
return NULL;
|
||||
|
||||
texture = gtk_inspector_measure_graph_get_texture (GTK_INSPECTOR_MEASURE_GRAPH (measure_graph));
|
||||
if (texture == NULL)
|
||||
return NULL;
|
||||
|
||||
return gdk_content_provider_new_typed (GDK_TYPE_TEXTURE, texture);
|
||||
}
|
||||
|
||||
static void
|
||||
update_measure_picture (GtkPicture *picture,
|
||||
GtkToggleButton *toggle)
|
||||
{
|
||||
GdkPaintable *paintable = gtk_picture_get_paintable (picture);
|
||||
|
||||
if (gtk_toggle_button_get_active (toggle) ||
|
||||
(gdk_paintable_get_intrinsic_width (paintable) <= 200 &&
|
||||
gdk_paintable_get_intrinsic_height (paintable) <= 100))
|
||||
{
|
||||
gtk_picture_set_can_shrink (picture, FALSE);
|
||||
gtk_widget_set_size_request (GTK_WIDGET (picture), -1, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_picture_set_can_shrink (picture, TRUE);
|
||||
gtk_widget_set_size_request (GTK_WIDGET (picture),
|
||||
-1,
|
||||
MIN (100, 200 / gdk_paintable_get_intrinsic_aspect_ratio (paintable)));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_inspector_misc_info_set_object (GtkInspectorMiscInfo *sl,
|
||||
GObject *object)
|
||||
@@ -500,7 +448,6 @@ gtk_inspector_misc_info_set_object (GtkInspectorMiscInfo *sl,
|
||||
gtk_widget_show (sl->state_row);
|
||||
gtk_widget_show (sl->direction_row);
|
||||
gtk_widget_show (sl->request_mode_row);
|
||||
gtk_widget_show (sl->measure_row);
|
||||
gtk_widget_show (sl->allocated_size_row);
|
||||
gtk_widget_show (sl->baseline_row);
|
||||
gtk_widget_show (sl->mnemonic_label_row);
|
||||
@@ -515,15 +462,12 @@ gtk_inspector_misc_info_set_object (GtkInspectorMiscInfo *sl,
|
||||
state_flags_changed (GTK_WIDGET (sl->object), 0, sl);
|
||||
|
||||
update_allocation (GTK_WIDGET (sl->object), sl);
|
||||
update_measure_picture (GTK_PICTURE (sl->measure_picture), GTK_TOGGLE_BUTTON (sl->measure_expand_toggle));
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_widget_hide (sl->state_row);
|
||||
gtk_widget_hide (sl->direction_row);
|
||||
gtk_widget_hide (sl->request_mode_row);
|
||||
gtk_widget_hide (sl->measure_row);
|
||||
gtk_inspector_measure_graph_clear (GTK_INSPECTOR_MEASURE_GRAPH (sl->measure_graph));
|
||||
gtk_widget_hide (sl->mnemonic_label_row);
|
||||
gtk_widget_hide (sl->allocated_size_row);
|
||||
gtk_widget_hide (sl->baseline_row);
|
||||
@@ -628,10 +572,6 @@ gtk_inspector_misc_info_class_init (GtkInspectorMiscInfoClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, mnemonic_label);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, request_mode_row);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, request_mode);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, measure_row);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, measure_expand_toggle);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, measure_picture);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, measure_graph);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, allocated_size_row);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, allocated_size);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, baseline_row);
|
||||
@@ -660,8 +600,6 @@ gtk_inspector_misc_info_class_init (GtkInspectorMiscInfoClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, child_visible_row);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorMiscInfo, child_visible);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, update_measure_picture);
|
||||
gtk_widget_class_bind_template_callback (widget_class, measure_picture_drag_prepare);
|
||||
gtk_widget_class_bind_template_callback (widget_class, show_surface);
|
||||
gtk_widget_class_bind_template_callback (widget_class, show_renderer);
|
||||
gtk_widget_class_bind_template_callback (widget_class, show_frame_clock);
|
||||
|
||||
@@ -254,65 +254,6 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="measure_info_row">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">40</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Measure map</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="measure_expand_toggle">
|
||||
<property name="label" translatable="yes">Expand</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">baseline</property>
|
||||
<signal name="clicked" handler="update_measure_picture" swapped="yes" after="1" object="measure_picture"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="measure_row">
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">40</property>
|
||||
<child>
|
||||
<object class="GtkPicture" id="measure_picture">
|
||||
<property name="paintable">
|
||||
<object class="GtkInspectorMeasureGraph" id="measure_graph" />
|
||||
</property>
|
||||
<property name="can-shrink">0</property>
|
||||
<property name="hexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkDragSource">
|
||||
<signal name="prepare" handler="measure_picture_drag_prepare" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="allocated_size_row">
|
||||
<property name="activatable">0</property>
|
||||
|
||||
+71
-714
@@ -39,7 +39,6 @@
|
||||
#include <gtk/gtktreelistmodel.h>
|
||||
#include <gtk/gtktreemodel.h>
|
||||
#include <gtk/gtktreeview.h>
|
||||
#include <gtk/gtkstack.h>
|
||||
#include <gsk/gskrendererprivate.h>
|
||||
#include <gsk/gskrendernodeprivate.h>
|
||||
#include <gsk/gskroundedrectprivate.h>
|
||||
@@ -54,8 +53,6 @@
|
||||
#include "recording.h"
|
||||
#include "renderrecording.h"
|
||||
#include "startrecording.h"
|
||||
#include "eventrecording.h"
|
||||
#include "recorderrow.h"
|
||||
|
||||
struct _GtkInspectorRecorder
|
||||
{
|
||||
@@ -73,19 +70,11 @@ struct _GtkInspectorRecorder
|
||||
GtkWidget *render_node_save_button;
|
||||
GtkWidget *render_node_clip_button;
|
||||
GtkWidget *node_property_tree;
|
||||
GtkWidget *recording_data_stack;
|
||||
GtkTreeModel *render_node_properties;
|
||||
GtkTreeModel *event_properties;
|
||||
GtkWidget *event_property_tree;
|
||||
GtkWidget *event_view;
|
||||
|
||||
GtkInspectorRecording *recording; /* start recording if recording or NULL if not */
|
||||
gint64 start_time;
|
||||
|
||||
gboolean debug_nodes;
|
||||
gboolean highlight_sequences;
|
||||
|
||||
GdkEventSequence *selected_sequence;
|
||||
};
|
||||
|
||||
typedef struct _GtkInspectorRecorderClass
|
||||
@@ -99,8 +88,6 @@ enum
|
||||
PROP_0,
|
||||
PROP_RECORDING,
|
||||
PROP_DEBUG_NODES,
|
||||
PROP_HIGHLIGHT_SEQUENCES,
|
||||
PROP_SELECTED_SEQUENCE,
|
||||
LAST_PROP
|
||||
};
|
||||
|
||||
@@ -181,7 +168,7 @@ create_list_model_for_render_node (GskRenderNode *node)
|
||||
return create_render_node_list_model ((GskRenderNode *[1]) { gsk_shadow_node_get_child (node) }, 1);
|
||||
|
||||
case GSK_BLEND_NODE:
|
||||
return create_render_node_list_model ((GskRenderNode *[2]) { gsk_blend_node_get_bottom_child (node),
|
||||
return create_render_node_list_model ((GskRenderNode *[2]) { gsk_blend_node_get_bottom_child (node),
|
||||
gsk_blend_node_get_top_child (node) }, 2);
|
||||
|
||||
case GSK_CROSS_FADE_NODE:
|
||||
@@ -438,136 +425,45 @@ bind_widget_for_render_node (GtkSignalListItemFactory *factory,
|
||||
}
|
||||
|
||||
static void
|
||||
show_render_node (GtkInspectorRecorder *recorder,
|
||||
GskRenderNode *node)
|
||||
recordings_list_row_selected (GtkListBox *box,
|
||||
GtkListBoxRow *row,
|
||||
GtkInspectorRecorder *recorder)
|
||||
{
|
||||
graphene_rect_t bounds;
|
||||
GdkPaintable *paintable;
|
||||
GtkInspectorRecording *recording;
|
||||
|
||||
gsk_render_node_get_bounds (node, &bounds);
|
||||
paintable = gtk_render_node_paintable_new (node, &bounds);
|
||||
if (recorder->recordings == NULL)
|
||||
return;
|
||||
|
||||
if (strcmp (gtk_stack_get_visible_child_name (GTK_STACK (recorder->recording_data_stack)), "frame_data") == 0)
|
||||
if (row)
|
||||
recording = g_list_model_get_item (recorder->recordings, gtk_list_box_row_get_index (row));
|
||||
else
|
||||
recording = NULL;
|
||||
|
||||
if (GTK_INSPECTOR_IS_RENDER_RECORDING (recording))
|
||||
{
|
||||
graphene_rect_t bounds;
|
||||
GskRenderNode *node;
|
||||
GdkPaintable *paintable;
|
||||
|
||||
node = gtk_inspector_render_recording_get_node (GTK_INSPECTOR_RENDER_RECORDING (recording));
|
||||
gsk_render_node_get_bounds (node, &bounds);
|
||||
paintable = gtk_render_node_paintable_new (node, &bounds);
|
||||
gtk_picture_set_paintable (GTK_PICTURE (recorder->render_node_view), paintable);
|
||||
|
||||
g_list_store_splice (recorder->render_node_root_model,
|
||||
0, g_list_model_get_n_items (G_LIST_MODEL (recorder->render_node_root_model)),
|
||||
(gpointer[1]) { paintable },
|
||||
1);
|
||||
g_object_unref (paintable);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_picture_set_paintable (GTK_PICTURE (recorder->event_view), paintable);
|
||||
}
|
||||
|
||||
g_object_unref (paintable);
|
||||
}
|
||||
|
||||
static GskRenderNode *
|
||||
make_dot (double x, double y)
|
||||
{
|
||||
GskRenderNode *fill, *dot;
|
||||
GdkRGBA red = (GdkRGBA){ 1, 0, 0, 1 };
|
||||
graphene_rect_t rect = GRAPHENE_RECT_INIT (x - 3, y - 3, 6, 6);
|
||||
graphene_size_t corner = GRAPHENE_SIZE_INIT (3, 3);
|
||||
GskRoundedRect clip;
|
||||
|
||||
fill = gsk_color_node_new (&red, &rect);
|
||||
dot = gsk_rounded_clip_node_new (fill, gsk_rounded_rect_init (&clip, &rect,
|
||||
&corner, &corner, &corner, &corner));
|
||||
gsk_render_node_unref (fill);
|
||||
|
||||
return dot;
|
||||
}
|
||||
|
||||
static void
|
||||
show_event (GtkInspectorRecorder *recorder,
|
||||
GskRenderNode *node,
|
||||
GdkEvent *event)
|
||||
{
|
||||
GskRenderNode *temp;
|
||||
double x, y;
|
||||
|
||||
if (gdk_event_get_position (event, &x, &y))
|
||||
{
|
||||
GskRenderNode *dot = make_dot (x, y);
|
||||
temp = gsk_container_node_new ((GskRenderNode *[]) { node, dot }, 2);
|
||||
gsk_render_node_unref (dot);
|
||||
}
|
||||
else
|
||||
temp = gsk_render_node_ref (node);
|
||||
|
||||
show_render_node (recorder, temp);
|
||||
|
||||
gsk_render_node_unref (temp);
|
||||
}
|
||||
|
||||
static void populate_event_properties (GtkListStore *store,
|
||||
GdkEvent *event);
|
||||
|
||||
static void
|
||||
recording_selected (GtkSingleSelection *selection,
|
||||
GParamSpec *pspec,
|
||||
GtkInspectorRecorder *recorder)
|
||||
{
|
||||
GtkInspectorRecording *recording;
|
||||
GdkEventSequence *selected_sequence = NULL;
|
||||
|
||||
if (recorder->recordings == NULL)
|
||||
{
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (recorder->recording_data_stack), "no_data");
|
||||
return;
|
||||
}
|
||||
|
||||
recording = gtk_single_selection_get_selected_item (selection);
|
||||
|
||||
if (GTK_INSPECTOR_IS_RENDER_RECORDING (recording))
|
||||
{
|
||||
GskRenderNode *node;
|
||||
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (recorder->recording_data_stack), "frame_data");
|
||||
|
||||
node = gtk_inspector_render_recording_get_node (GTK_INSPECTOR_RENDER_RECORDING (recording));
|
||||
show_render_node (recorder, node);
|
||||
}
|
||||
else if (GTK_INSPECTOR_IS_EVENT_RECORDING (recording))
|
||||
{
|
||||
GdkEvent *event;
|
||||
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (recorder->recording_data_stack), "event_data");
|
||||
|
||||
event = gtk_inspector_event_recording_get_event (GTK_INSPECTOR_EVENT_RECORDING (recording));
|
||||
|
||||
for (guint pos = gtk_single_selection_get_selected (selection) - 1; pos > 0; pos--)
|
||||
{
|
||||
GtkInspectorRecording *item = g_list_model_get_item (G_LIST_MODEL (selection), pos);
|
||||
|
||||
g_object_unref (item);
|
||||
if (GTK_INSPECTOR_IS_RENDER_RECORDING (item))
|
||||
{
|
||||
GskRenderNode *node;
|
||||
|
||||
node = gtk_inspector_render_recording_get_node (GTK_INSPECTOR_RENDER_RECORDING (item));
|
||||
show_event (recorder, node, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
populate_event_properties (GTK_LIST_STORE (recorder->event_properties), event);
|
||||
|
||||
if (recorder->highlight_sequences)
|
||||
selected_sequence = gdk_event_get_event_sequence (event);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (recorder->recording_data_stack), "no_data");
|
||||
|
||||
gtk_picture_set_paintable (GTK_PICTURE (recorder->render_node_view), NULL);
|
||||
g_list_store_remove_all (recorder->render_node_root_model);
|
||||
}
|
||||
|
||||
gtk_inspector_recorder_set_selected_sequence (recorder, selected_sequence);
|
||||
if (recording)
|
||||
g_object_unref (recording);
|
||||
}
|
||||
|
||||
static GdkTexture *
|
||||
@@ -1271,337 +1167,6 @@ populate_render_node_properties (GtkListStore *store,
|
||||
}
|
||||
}
|
||||
|
||||
static const char *
|
||||
event_type_name (GdkEventType type)
|
||||
{
|
||||
const char *event_name[] = {
|
||||
"Delete",
|
||||
"Motion",
|
||||
"Button Press",
|
||||
"Button Release",
|
||||
"Key Press",
|
||||
"Key Release",
|
||||
"Enter",
|
||||
"Leave",
|
||||
"Focus",
|
||||
"Proximity In",
|
||||
"Proximity Out",
|
||||
"Drag Enter",
|
||||
"Drag Leave",
|
||||
"Drag Motion",
|
||||
"Drop Start",
|
||||
"Scroll",
|
||||
"Grab Broken",
|
||||
"Touch Begin",
|
||||
"Touch Update",
|
||||
"Touch End",
|
||||
"Touch Cancel",
|
||||
"Touchpad Swipe",
|
||||
"Touchpad Pinch",
|
||||
"Pad Button Press",
|
||||
"Pad Button Release",
|
||||
"Pad Rind",
|
||||
"Pad Strip",
|
||||
"Pad Group Mode"
|
||||
};
|
||||
|
||||
return event_name[type];
|
||||
}
|
||||
|
||||
static const char *
|
||||
scroll_direction_name (GdkScrollDirection dir)
|
||||
{
|
||||
const char *scroll_dir[] = {
|
||||
"Up", "Down", "Left", "Right", "Smooth"
|
||||
};
|
||||
return scroll_dir[dir];
|
||||
}
|
||||
|
||||
static char *
|
||||
modifier_names (GdkModifierType state)
|
||||
{
|
||||
struct {
|
||||
const char *name;
|
||||
int mask;
|
||||
} mods[] = {
|
||||
{ "Shift", GDK_SHIFT_MASK },
|
||||
{ "Lock", GDK_LOCK_MASK },
|
||||
{ "Control", GDK_CONTROL_MASK },
|
||||
{ "Alt", GDK_ALT_MASK },
|
||||
{ "Button1", GDK_BUTTON1_MASK },
|
||||
{ "Button2", GDK_BUTTON2_MASK },
|
||||
{ "Button3", GDK_BUTTON3_MASK },
|
||||
{ "Button4", GDK_BUTTON4_MASK },
|
||||
{ "Button5", GDK_BUTTON5_MASK },
|
||||
{ "Super", GDK_SUPER_MASK },
|
||||
{ "Hyper", GDK_HYPER_MASK },
|
||||
{ "Meta", GDK_META_MASK },
|
||||
};
|
||||
GString *s;
|
||||
|
||||
s = g_string_new ("");
|
||||
|
||||
for (int i = 0; i < G_N_ELEMENTS (mods); i++)
|
||||
{
|
||||
if (state & mods[i].mask)
|
||||
{
|
||||
if (s->len > 0)
|
||||
g_string_append (s, " ");
|
||||
g_string_append (s, mods[i].name);
|
||||
}
|
||||
}
|
||||
|
||||
return g_string_free (s, FALSE);
|
||||
}
|
||||
|
||||
static char *
|
||||
key_event_string (GdkEvent *event)
|
||||
{
|
||||
guint keyval;
|
||||
gunichar c;
|
||||
char buf[5] = { 0, };
|
||||
|
||||
keyval = gdk_key_event_get_keyval (event);
|
||||
c = gdk_keyval_to_unicode (keyval);
|
||||
if (c)
|
||||
{
|
||||
g_unichar_to_utf8 (c, buf);
|
||||
return g_strdup (buf);
|
||||
}
|
||||
|
||||
return g_strdup (gdk_keyval_name (keyval));
|
||||
}
|
||||
|
||||
static const char *
|
||||
device_tool_name (GdkDeviceTool *tool)
|
||||
{
|
||||
const char *name[] = {
|
||||
"Unknown",
|
||||
"Pen",
|
||||
"Eraser",
|
||||
"Brush",
|
||||
"Pencil",
|
||||
"Airbrush",
|
||||
"Mouse",
|
||||
"Lens"
|
||||
};
|
||||
|
||||
return name[gdk_device_tool_get_tool_type (tool)];
|
||||
}
|
||||
|
||||
static const char *
|
||||
axis_name (GdkAxisUse axis)
|
||||
{
|
||||
const char *name[] = {
|
||||
"",
|
||||
"X",
|
||||
"Y",
|
||||
"Delta X",
|
||||
"Delta Y",
|
||||
"Pressure",
|
||||
"X Tilt",
|
||||
"Y Tilt",
|
||||
"Wheel",
|
||||
"Distance",
|
||||
"Rotation",
|
||||
"Slider"
|
||||
};
|
||||
|
||||
return name[axis];
|
||||
}
|
||||
|
||||
static const char *
|
||||
gesture_phase_name (GdkTouchpadGesturePhase phase)
|
||||
{
|
||||
const char *name[] = {
|
||||
"Begin",
|
||||
"Update",
|
||||
"End",
|
||||
"Cancel"
|
||||
};
|
||||
|
||||
return name[phase];
|
||||
}
|
||||
|
||||
static void
|
||||
populate_event_properties (GtkListStore *store,
|
||||
GdkEvent *event)
|
||||
{
|
||||
GdkEventType type;
|
||||
GdkDevice *device;
|
||||
GdkDeviceTool *tool;
|
||||
double x, y;
|
||||
double dx, dy;
|
||||
char *tmp;
|
||||
GdkModifierType state;
|
||||
|
||||
gtk_list_store_clear (store);
|
||||
|
||||
type = gdk_event_get_event_type (event);
|
||||
|
||||
add_text_row (store, "Type", event_type_name (type));
|
||||
if (gdk_event_get_event_sequence (event) != NULL)
|
||||
{
|
||||
tmp = g_strdup_printf ("%p", gdk_event_get_event_sequence (event));
|
||||
add_text_row (store, "Sequence", tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
add_int_row (store, "Timestamp", gdk_event_get_time (event));
|
||||
|
||||
device = gdk_event_get_device (event);
|
||||
if (device)
|
||||
add_text_row (store, "Device", gdk_device_get_name (device));
|
||||
|
||||
tool = gdk_event_get_device_tool (event);
|
||||
if (tool)
|
||||
add_text_row (store, "Device Tool", device_tool_name (tool));
|
||||
|
||||
if (gdk_event_get_position (event, &x, &y))
|
||||
{
|
||||
tmp = g_strdup_printf ("%.2f %.2f", x, y);
|
||||
add_text_row (store, "Position", tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
|
||||
if (tool)
|
||||
{
|
||||
GdkAxisFlags axes = gdk_device_tool_get_axes (tool);
|
||||
|
||||
/* We report position and scroll delta separately, so skip them here */
|
||||
axes &= ~(GDK_AXIS_FLAG_X|GDK_AXIS_FLAG_Y|GDK_AXIS_FLAG_DELTA_X|GDK_AXIS_FLAG_DELTA_Y);
|
||||
|
||||
for (int i = 1; i < GDK_AXIS_LAST; i++)
|
||||
{
|
||||
if (axes & (1 << i))
|
||||
{
|
||||
double val;
|
||||
gdk_event_get_axis (event, i, &val);
|
||||
tmp = g_strdup_printf ("%.2f", val);
|
||||
add_text_row (store, axis_name (i), tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
state = gdk_event_get_modifier_state (event);
|
||||
if (state != 0)
|
||||
{
|
||||
tmp = modifier_names (state);
|
||||
add_text_row (store, "State", tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
|
||||
switch ((int)type)
|
||||
{
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
add_int_row (store, "Button", gdk_button_event_get_button (event));
|
||||
break;
|
||||
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
add_int_row (store, "Keycode", gdk_key_event_get_keycode (event));
|
||||
add_int_row (store, "Keyval", gdk_key_event_get_keyval (event));
|
||||
tmp = key_event_string (event);
|
||||
add_text_row (store, "Key", tmp);
|
||||
g_free (tmp);
|
||||
add_int_row (store, "Layout", gdk_key_event_get_layout (event));
|
||||
add_int_row (store, "Level", gdk_key_event_get_level (event));
|
||||
add_boolean_row (store, "Is Modifier", gdk_key_event_is_modifier (event));
|
||||
break;
|
||||
|
||||
case GDK_SCROLL:
|
||||
if (gdk_scroll_event_get_direction (event) == GDK_SCROLL_SMOOTH)
|
||||
{
|
||||
gdk_scroll_event_get_deltas (event, &x, &y);
|
||||
tmp = g_strdup_printf ("%.2f %.2f", x, y);
|
||||
add_text_row (store, "Delta", tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
add_text_row (store, "Direction", scroll_direction_name (gdk_scroll_event_get_direction (event)));
|
||||
}
|
||||
add_boolean_row (store, "Is Stop", gdk_scroll_event_is_stop (event));
|
||||
break;
|
||||
|
||||
case GDK_FOCUS_CHANGE:
|
||||
add_text_row (store, "Direction", gdk_focus_event_get_in (event) ? "In" : "Out");
|
||||
break;
|
||||
|
||||
case GDK_ENTER_NOTIFY:
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
add_int_row (store, "Mode", gdk_crossing_event_get_mode (event));
|
||||
add_int_row (store, "Detail", gdk_crossing_event_get_detail (event));
|
||||
add_boolean_row (store, "Is Focus", gdk_crossing_event_get_focus (event));
|
||||
break;
|
||||
|
||||
case GDK_GRAB_BROKEN:
|
||||
add_boolean_row (store, "Implicit", gdk_grab_broken_event_get_implicit (event));
|
||||
break;
|
||||
|
||||
case GDK_TOUCHPAD_SWIPE:
|
||||
case GDK_TOUCHPAD_PINCH:
|
||||
add_text_row (store, "Phase", gesture_phase_name (gdk_touchpad_event_get_gesture_phase (event)));
|
||||
add_int_row (store, "Fingers", gdk_touchpad_event_get_n_fingers (event));
|
||||
gdk_touchpad_event_get_deltas (event, &dx, &dy);
|
||||
tmp = g_strdup_printf ("%.2f %.f2", dx, dy);
|
||||
add_text_row (store, "Delta", tmp);
|
||||
g_free (tmp);
|
||||
if (type == GDK_TOUCHPAD_PINCH)
|
||||
{
|
||||
tmp = g_strdup_printf ("%.2f", gdk_touchpad_event_get_pinch_angle_delta (event));
|
||||
add_text_row (store, "Angle Delta", tmp);
|
||||
g_free (tmp);
|
||||
tmp = g_strdup_printf ("%.2f", gdk_touchpad_event_get_pinch_scale (event));
|
||||
add_text_row (store, "Scale", tmp);
|
||||
g_free (tmp);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
/* FIXME */
|
||||
;
|
||||
}
|
||||
|
||||
if (type == GDK_MOTION_NOTIFY || type == GDK_SCROLL)
|
||||
{
|
||||
GdkTimeCoord *history;
|
||||
guint n_coords;
|
||||
|
||||
history = gdk_event_get_history (event, &n_coords);
|
||||
if (history)
|
||||
{
|
||||
GString *s = g_string_new ("");
|
||||
|
||||
for (int i = 0; i < n_coords; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
g_string_append (s, "\n");
|
||||
|
||||
g_string_append_printf (s, "%d", history[i].time);
|
||||
|
||||
if (history[i].flags & (GDK_AXIS_FLAG_X|GDK_AXIS_FLAG_Y))
|
||||
g_string_append_printf (s, " Position %.2f %.2f", history[i].axes[GDK_AXIS_X], history[i].axes[GDK_AXIS_Y]);
|
||||
|
||||
if (history[i].flags & (GDK_AXIS_FLAG_DELTA_X|GDK_AXIS_FLAG_DELTA_Y))
|
||||
g_string_append_printf (s, " Delta %.2f %.2f", history[i].axes[GDK_AXIS_DELTA_X], history[i].axes[GDK_AXIS_DELTA_Y]);
|
||||
|
||||
for (int j = GDK_AXIS_PRESSURE; j < GDK_AXIS_LAST; j++)
|
||||
{
|
||||
if (history[i].flags & (1 << j))
|
||||
g_string_append_printf (s, " %s %.2f", axis_name (j), history[i].axes[j]);
|
||||
}
|
||||
}
|
||||
|
||||
add_text_row (store, "History", s->str);
|
||||
|
||||
g_string_free (s, TRUE);
|
||||
g_free (history);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static GskRenderNode *
|
||||
get_selected_node (GtkInspectorRecorder *recorder)
|
||||
{
|
||||
@@ -1760,153 +1325,58 @@ toggle_dark_mode (GtkToggleButton *button,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
setup_widget_for_recording (GtkListItemFactory *factory,
|
||||
GtkListItem *item,
|
||||
gpointer data)
|
||||
static GtkWidget *
|
||||
gtk_inspector_recorder_recordings_list_create_widget (gpointer item,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *row, *box, *label;
|
||||
|
||||
row = g_object_new (GTK_TYPE_INSPECTOR_RECORDER_ROW, NULL);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
label = gtk_label_new ("");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0f);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
|
||||
gtk_widget_set_margin_start (box, 6);
|
||||
gtk_widget_set_margin_end (box, 6);
|
||||
gtk_widget_set_margin_top (box, 6);
|
||||
gtk_widget_set_margin_bottom (box, 6);
|
||||
|
||||
gtk_widget_set_parent (box, row);
|
||||
|
||||
gtk_list_item_set_child (item, row);
|
||||
}
|
||||
|
||||
static char *
|
||||
get_event_summary (GdkEvent *event)
|
||||
{
|
||||
double x, y;
|
||||
int type;
|
||||
const char *name;
|
||||
|
||||
gdk_event_get_position (event, &x, &y);
|
||||
type = gdk_event_get_event_type (event);
|
||||
name = event_type_name (type);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case GDK_ENTER_NOTIFY:
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
case GDK_MOTION_NOTIFY:
|
||||
case GDK_DRAG_ENTER:
|
||||
case GDK_DRAG_LEAVE:
|
||||
case GDK_DRAG_MOTION:
|
||||
case GDK_DROP_START:
|
||||
case GDK_TOUCH_BEGIN:
|
||||
case GDK_TOUCH_UPDATE:
|
||||
case GDK_TOUCH_END:
|
||||
case GDK_TOUCH_CANCEL:
|
||||
case GDK_TOUCHPAD_SWIPE:
|
||||
case GDK_TOUCHPAD_PINCH:
|
||||
case GDK_BUTTON_PRESS:
|
||||
case GDK_BUTTON_RELEASE:
|
||||
return g_strdup_printf ("%s (%.2f %.2f)", name, x, y);
|
||||
|
||||
case GDK_KEY_PRESS:
|
||||
case GDK_KEY_RELEASE:
|
||||
{
|
||||
char *tmp, *ret;
|
||||
tmp = key_event_string (event);
|
||||
ret = g_strdup_printf ("%s %s\n", name, tmp);
|
||||
g_free (tmp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
case GDK_FOCUS_CHANGE:
|
||||
return g_strdup_printf ("%s %s", name, gdk_focus_event_get_in (event) ? "In" : "Out");
|
||||
|
||||
case GDK_GRAB_BROKEN:
|
||||
case GDK_PROXIMITY_IN:
|
||||
case GDK_PROXIMITY_OUT:
|
||||
case GDK_PAD_BUTTON_PRESS:
|
||||
case GDK_PAD_BUTTON_RELEASE:
|
||||
case GDK_PAD_RING:
|
||||
case GDK_PAD_STRIP:
|
||||
case GDK_PAD_GROUP_MODE:
|
||||
return g_strdup_printf ("%s", name);
|
||||
|
||||
case GDK_SCROLL:
|
||||
if (gdk_scroll_event_get_direction (event) == GDK_SCROLL_SMOOTH)
|
||||
{
|
||||
gdk_scroll_event_get_deltas (event, &x, &y);
|
||||
return g_strdup_printf ("%s %.2f %.2f", name, x, y);
|
||||
}
|
||||
else
|
||||
{
|
||||
return g_strdup_printf ("%s %s", name, scroll_direction_name (gdk_scroll_event_get_direction (event)));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
bind_widget_for_recording (GtkListItemFactory *factory,
|
||||
GtkListItem *item,
|
||||
gpointer data)
|
||||
{
|
||||
GtkInspectorRecorder *recorder = GTK_INSPECTOR_RECORDER (data);
|
||||
GtkInspectorRecording *recording = gtk_list_item_get_item (item);
|
||||
GtkWidget *row, *box, *label, *label2;
|
||||
char *text;
|
||||
|
||||
row = gtk_list_item_get_child (item);
|
||||
box = gtk_widget_get_first_child (row);
|
||||
label = gtk_widget_get_first_child (box);
|
||||
label2 = gtk_widget_get_next_sibling (label);
|
||||
|
||||
g_object_set (row, "sequence", NULL, NULL);
|
||||
g_object_bind_property (recorder, "selected-sequence", row, "match-sequence", G_BINDING_SYNC_CREATE);
|
||||
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), FALSE);
|
||||
GtkInspectorRecording *recording = GTK_INSPECTOR_RECORDING (item);
|
||||
GtkWidget *widget;
|
||||
|
||||
if (GTK_INSPECTOR_IS_RENDER_RECORDING (recording))
|
||||
{
|
||||
gtk_label_set_label (GTK_LABEL (label), "Frame");
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), FALSE);
|
||||
cairo_region_t *region;
|
||||
GtkWidget *hbox, *label, *button;
|
||||
|
||||
text = g_strdup_printf ("%.3f", gtk_inspector_recording_get_timestamp (recording) / 1000.0);
|
||||
gtk_label_set_label (GTK_LABEL (label2), text);
|
||||
g_free (text);
|
||||
}
|
||||
else if (GTK_INSPECTOR_IS_EVENT_RECORDING (recording))
|
||||
{
|
||||
GdkEvent *event = gtk_inspector_event_recording_get_event (GTK_INSPECTOR_EVENT_RECORDING (recording));
|
||||
widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
g_object_set (row, "sequence", gdk_event_get_event_sequence (event), NULL);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
gtk_box_append (GTK_BOX (widget), hbox);
|
||||
|
||||
text = get_event_summary (event);
|
||||
gtk_label_set_label (GTK_LABEL (label), text);
|
||||
g_free (text);
|
||||
region = cairo_region_create_rectangle (
|
||||
gtk_inspector_render_recording_get_area (GTK_INSPECTOR_RENDER_RECORDING (recording)));
|
||||
cairo_region_subtract (region,
|
||||
gtk_inspector_render_recording_get_clip_region (GTK_INSPECTOR_RENDER_RECORDING (recording)));
|
||||
cairo_region_destroy (region);
|
||||
|
||||
text = g_strdup_printf ("%.3f", gtk_inspector_recording_get_timestamp (recording) / 1000.0);
|
||||
gtk_label_set_label (GTK_LABEL (label2), text);
|
||||
g_free (text);
|
||||
label = gtk_label_new ("<b>Frame</b>");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0f);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
gtk_box_append (GTK_BOX (hbox), label);
|
||||
|
||||
button = gtk_toggle_button_new ();
|
||||
gtk_button_set_has_frame (GTK_BUTTON (button), FALSE);
|
||||
gtk_button_set_icon_name (GTK_BUTTON (button), "view-more-symbolic");
|
||||
|
||||
gtk_box_append (GTK_BOX (hbox), button);
|
||||
|
||||
label = gtk_label_new (gtk_inspector_render_recording_get_profiler_info (GTK_INSPECTOR_RENDER_RECORDING (recording)));
|
||||
gtk_widget_hide (label);
|
||||
gtk_box_append (GTK_BOX (widget), label);
|
||||
g_object_bind_property (button, "active", label, "visible", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_label_set_label (GTK_LABEL (label), "<b>Start of Recording</b>");
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_label (GTK_LABEL (label2), "");
|
||||
widget = gtk_label_new ("<b>Start of Recording</b>");
|
||||
gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
|
||||
}
|
||||
|
||||
gtk_widget_set_margin_start (widget, 6);
|
||||
gtk_widget_set_margin_end (widget, 6);
|
||||
gtk_widget_set_margin_top (widget, 6);
|
||||
gtk_widget_set_margin_bottom (widget, 6);
|
||||
|
||||
return widget;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1968,14 +1438,6 @@ gtk_inspector_recorder_get_property (GObject *object,
|
||||
g_value_set_boolean (value, recorder->debug_nodes);
|
||||
break;
|
||||
|
||||
case PROP_HIGHLIGHT_SEQUENCES:
|
||||
g_value_set_boolean (value, recorder->highlight_sequences);
|
||||
break;
|
||||
|
||||
case PROP_SELECTED_SEQUENCE:
|
||||
g_value_set_pointer (value, recorder->selected_sequence);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
||||
break;
|
||||
@@ -2000,14 +1462,6 @@ gtk_inspector_recorder_set_property (GObject *object,
|
||||
gtk_inspector_recorder_set_debug_nodes (recorder, g_value_get_boolean (value));
|
||||
break;
|
||||
|
||||
case PROP_HIGHLIGHT_SEQUENCES:
|
||||
gtk_inspector_recorder_set_highlight_sequences (recorder, g_value_get_boolean (value));
|
||||
break;
|
||||
|
||||
case PROP_SELECTED_SEQUENCE:
|
||||
recorder->selected_sequence = g_value_get_pointer (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
||||
break;
|
||||
@@ -2050,9 +1504,6 @@ gtk_inspector_recorder_class_init (GtkInspectorRecorderClass *klass)
|
||||
FALSE,
|
||||
G_PARAM_READWRITE);
|
||||
|
||||
props[PROP_HIGHLIGHT_SEQUENCES] = g_param_spec_boolean ("highlight-sequences", "", "", FALSE, G_PARAM_READWRITE);
|
||||
props[PROP_SELECTED_SEQUENCE] = g_param_spec_pointer ("selected-sequence", "", "", G_PARAM_READWRITE);
|
||||
|
||||
g_object_class_install_properties (object_class, LAST_PROP, props);
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/inspector/recorder.ui");
|
||||
@@ -2065,12 +1516,9 @@ gtk_inspector_recorder_class_init (GtkInspectorRecorderClass *klass)
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorRecorder, render_node_save_button);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorRecorder, render_node_clip_button);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorRecorder, node_property_tree);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorRecorder, recording_data_stack);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorRecorder, event_view);
|
||||
gtk_widget_class_bind_template_child (widget_class, GtkInspectorRecorder, event_property_tree);
|
||||
|
||||
gtk_widget_class_bind_template_callback (widget_class, recordings_clear_all);
|
||||
gtk_widget_class_bind_template_callback (widget_class, recording_selected);
|
||||
gtk_widget_class_bind_template_callback (widget_class, recordings_list_row_selected);
|
||||
gtk_widget_class_bind_template_callback (widget_class, render_node_save);
|
||||
gtk_widget_class_bind_template_callback (widget_class, render_node_clip);
|
||||
gtk_widget_class_bind_template_callback (widget_class, node_property_activated);
|
||||
@@ -2086,11 +1534,11 @@ gtk_inspector_recorder_init (GtkInspectorRecorder *recorder)
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (recorder));
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_widget_for_recording), recorder);
|
||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_widget_for_recording), recorder);
|
||||
gtk_list_view_set_factory (GTK_LIST_VIEW (recorder->recordings_list), factory);
|
||||
g_object_unref (factory);
|
||||
gtk_list_box_bind_model (GTK_LIST_BOX (recorder->recordings_list),
|
||||
recorder->recordings,
|
||||
gtk_inspector_recorder_recordings_list_create_widget,
|
||||
recorder,
|
||||
NULL);
|
||||
|
||||
recorder->render_node_root_model = g_list_store_new (GDK_TYPE_PAINTABLE);
|
||||
recorder->render_node_model = gtk_tree_list_model_new (g_object_ref (G_LIST_MODEL (recorder->render_node_root_model)),
|
||||
@@ -2113,10 +1561,6 @@ gtk_inspector_recorder_init (GtkInspectorRecorder *recorder)
|
||||
recorder->render_node_properties = GTK_TREE_MODEL (gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, GDK_TYPE_TEXTURE));
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (recorder->node_property_tree), recorder->render_node_properties);
|
||||
g_object_unref (recorder->render_node_properties);
|
||||
|
||||
recorder->event_properties = GTK_TREE_MODEL (gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, GDK_TYPE_TEXTURE));
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (recorder->event_property_tree), recorder->event_properties);
|
||||
g_object_unref (recorder->event_properties);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2136,7 +1580,6 @@ gtk_inspector_recorder_set_recording (GtkInspectorRecorder *recorder,
|
||||
if (recording)
|
||||
{
|
||||
recorder->recording = gtk_inspector_start_recording_new ();
|
||||
recorder->start_time = 0;
|
||||
gtk_inspector_recorder_add_recording (recorder, recorder->recording);
|
||||
}
|
||||
else
|
||||
@@ -2163,25 +1606,13 @@ gtk_inspector_recorder_record_render (GtkInspectorRecorder *recorder,
|
||||
{
|
||||
GtkInspectorRecording *recording;
|
||||
GdkFrameClock *frame_clock;
|
||||
gint64 frame_time;
|
||||
|
||||
if (!gtk_inspector_recorder_is_recording (recorder))
|
||||
return;
|
||||
|
||||
frame_clock = gtk_widget_get_frame_clock (widget);
|
||||
frame_time = gdk_frame_clock_get_frame_time (frame_clock);
|
||||
|
||||
if (recorder->start_time == 0)
|
||||
{
|
||||
recorder->start_time = frame_time;
|
||||
frame_time = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
frame_time = frame_time - recorder->start_time;
|
||||
}
|
||||
|
||||
recording = gtk_inspector_render_recording_new (frame_time,
|
||||
recording = gtk_inspector_render_recording_new (gdk_frame_clock_get_frame_time (frame_clock),
|
||||
gsk_renderer_get_profiler (renderer),
|
||||
&(GdkRectangle) { 0, 0,
|
||||
gdk_surface_get_width (surface),
|
||||
@@ -2192,36 +1623,6 @@ gtk_inspector_recorder_record_render (GtkInspectorRecorder *recorder,
|
||||
g_object_unref (recording);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_inspector_recorder_record_event (GtkInspectorRecorder *recorder,
|
||||
GtkWidget *widget,
|
||||
GdkEvent *event)
|
||||
{
|
||||
GtkInspectorRecording *recording;
|
||||
GdkFrameClock *frame_clock;
|
||||
gint64 frame_time;
|
||||
|
||||
if (!gtk_inspector_recorder_is_recording (recorder))
|
||||
return;
|
||||
|
||||
frame_clock = gtk_widget_get_frame_clock (widget);
|
||||
frame_time = gdk_frame_clock_get_frame_time (frame_clock);
|
||||
|
||||
if (recorder->start_time == 0)
|
||||
{
|
||||
recorder->start_time = frame_time;
|
||||
frame_time = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
frame_time = frame_time - recorder->start_time;
|
||||
}
|
||||
|
||||
recording = gtk_inspector_event_recording_new (frame_time, event);
|
||||
gtk_inspector_recorder_add_recording (recorder, recording);
|
||||
g_object_unref (recording);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_inspector_recorder_set_debug_nodes (GtkInspectorRecorder *recorder,
|
||||
gboolean debug_nodes)
|
||||
@@ -2245,48 +1646,4 @@ gtk_inspector_recorder_set_debug_nodes (GtkInspectorRecorder *recorder,
|
||||
g_object_notify_by_pspec (G_OBJECT (recorder), props[PROP_DEBUG_NODES]);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_inspector_recorder_set_highlight_sequences (GtkInspectorRecorder *recorder,
|
||||
gboolean highlight_sequences)
|
||||
{
|
||||
GdkEventSequence *sequence = NULL;
|
||||
|
||||
if (recorder->highlight_sequences == highlight_sequences)
|
||||
return;
|
||||
|
||||
recorder->highlight_sequences = highlight_sequences;
|
||||
|
||||
if (highlight_sequences)
|
||||
{
|
||||
GtkSingleSelection *selection;
|
||||
GtkInspectorRecording *recording;
|
||||
GdkEvent *event;
|
||||
|
||||
selection = GTK_SINGLE_SELECTION (gtk_list_view_get_model (GTK_LIST_VIEW (recorder->recordings_list)));
|
||||
recording = gtk_single_selection_get_selected_item (selection);
|
||||
|
||||
if (GTK_INSPECTOR_IS_EVENT_RECORDING (recording))
|
||||
{
|
||||
event = gtk_inspector_event_recording_get_event (GTK_INSPECTOR_EVENT_RECORDING (recording));
|
||||
sequence = gdk_event_get_event_sequence (event);
|
||||
}
|
||||
}
|
||||
|
||||
gtk_inspector_recorder_set_selected_sequence (recorder, sequence);
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (recorder), props[PROP_HIGHLIGHT_SEQUENCES]);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_inspector_recorder_set_selected_sequence (GtkInspectorRecorder *recorder,
|
||||
GdkEventSequence *sequence)
|
||||
{
|
||||
if (recorder->selected_sequence == sequence)
|
||||
return;
|
||||
|
||||
recorder->selected_sequence = sequence;
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (recorder), props[PROP_SELECTED_SEQUENCE]);
|
||||
}
|
||||
|
||||
|
||||
// vim: set et sw=2 ts=2:
|
||||
|
||||
@@ -37,12 +37,6 @@ gboolean gtk_inspector_recorder_is_recording (GtkInspectorRec
|
||||
void gtk_inspector_recorder_set_debug_nodes (GtkInspectorRecorder *recorder,
|
||||
gboolean debug_nodes);
|
||||
|
||||
void gtk_inspector_recorder_set_highlight_sequences (GtkInspectorRecorder *recorder,
|
||||
gboolean highlight_sequences);
|
||||
|
||||
void gtk_inspector_recorder_set_selected_sequence (GtkInspectorRecorder *recorder,
|
||||
GdkEventSequence *sequence);
|
||||
|
||||
void gtk_inspector_recorder_record_render (GtkInspectorRecorder *recorder,
|
||||
GtkWidget *widget,
|
||||
GskRenderer *renderer,
|
||||
@@ -50,10 +44,6 @@ void gtk_inspector_recorder_record_render (GtkInspectorRec
|
||||
const cairo_region_t *region,
|
||||
GskRenderNode *node);
|
||||
|
||||
void gtk_inspector_recorder_record_event (GtkInspectorRecorder *recorder,
|
||||
GtkWidget *widget,
|
||||
GdkEvent *event);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif // _GTK_INSPECTOR_RECORDER_H_
|
||||
|
||||
+68
-161
@@ -1,10 +1,5 @@
|
||||
<interface domain="gtk40">
|
||||
<object class="GtkSingleSelection" id="selection">
|
||||
<signal name="notify::selected" handler="recording_selected"/>
|
||||
<property name="model">
|
||||
<object class="GListStore" id="recordings"/>
|
||||
</property>
|
||||
</object>
|
||||
<object class="GListStore" id="recordings"/>
|
||||
<template class="GtkInspectorRecorder" parent="GtkWidget">
|
||||
<child>
|
||||
<object class="GtkBox" id="box">
|
||||
@@ -34,14 +29,6 @@
|
||||
<property name="tooltip-text" translatable="yes">Add debug nodes</property>
|
||||
<property name="active" bind-source="GtkInspectorRecorder" bind-property="debug-nodes" bind-flags="bidirectional|sync-create"/>
|
||||
<property name="halign">start</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton">
|
||||
<property name="icon-name">function-linear-symbolic</property>
|
||||
<property name="tooltip-text" translatable="yes">Highlight event sequences</property>
|
||||
<property name="active" bind-source="GtkInspectorRecorder" bind-property="highlight-sequences" bind-flags="bidirectional|sync-create"/>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -83,9 +70,9 @@
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="propagate-natural-width">1</property>
|
||||
<child>
|
||||
<object class="GtkListView" id="recordings_list">
|
||||
<object class="GtkListBox" id="recordings_list">
|
||||
<property name="vexpand">1</property>
|
||||
<property name="model">selection</property>
|
||||
<signal name="row-selected" handler="recordings_list_row_selected"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -94,155 +81,76 @@
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="recording_data_stack">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="propagate-natural-width">1</property>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">no_data</property>
|
||||
<property name="child">
|
||||
<object class="GtkLabel">
|
||||
<property name="label">No data.</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<object class="GtkListView" id="render_node_list">
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkPaned" id="render_paned">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="position">300</property>
|
||||
<property name="wide-handle">1</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<child>
|
||||
<object class="GtkTreeView" id="node_property_tree">
|
||||
<property name="activate-on-single-click">1</property>
|
||||
<signal name="row-activated" handler="node_property_activated"/>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn">
|
||||
<property name="title" translatable="yes">Property</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
<property name="yalign">0</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn">
|
||||
<property name="title" translatable="yes">Value</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
<property name="yalign">0</property>
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCellRendererPixbuf">
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="visible">2</attribute>
|
||||
<attribute name="texture">3</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">frame_data</property>
|
||||
<property name="child">
|
||||
<object class="GtkPaned">
|
||||
<property name="position">400</property>
|
||||
<property name="wide-handle">1</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="propagate-natural-width">1</property>
|
||||
<child>
|
||||
<object class="GtkListView" id="render_node_list">
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkPaned" id="render_paned">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="position">200</property>
|
||||
<property name="wide-handle">1</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="propagate-natural-width">1</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="node_property_tree">
|
||||
<property name="activate-on-single-click">1</property>
|
||||
<signal name="row-activated" handler="node_property_activated"/>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn">
|
||||
<property name="title" translatable="yes">Property</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
<property name="yalign">0</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn">
|
||||
<property name="title" translatable="yes">Value</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
<property name="yalign">0</property>
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCellRendererPixbuf">
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="visible">2</attribute>
|
||||
<attribute name="texture">3</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkPicture" id="render_node_view">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">event_data</property>
|
||||
<property name="child">
|
||||
<object class="GtkPaned">
|
||||
<property name="position">400</property>
|
||||
<property name="wide-handle">1</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="propagate-natural-width">1</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="event_property_tree">
|
||||
<property name="activate-on-single-click">1</property>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn">
|
||||
<property name="title" translatable="yes">Property</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
<property name="yalign">0</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn">
|
||||
<property name="title" translatable="yes">Value</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText">
|
||||
<property name="yalign">0</property>
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
</object>
|
||||
<attributes>
|
||||
<attribute name="text">1</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkPicture" id="event_view">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
<object class="GtkPicture" id="render_node_view">
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -253,4 +161,3 @@
|
||||
</child>
|
||||
</template>
|
||||
</interface>
|
||||
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <glib/gi18n-lib.h>
|
||||
|
||||
#include "recorderrow.h"
|
||||
|
||||
#include <gtk/gtkbinlayout.h>
|
||||
|
||||
/* This is a minimal widget whose purpose it is to compare the event sequence
|
||||
* of its row in the recordings list with the event sequence of the selected
|
||||
* row, and highlight itself if they match.
|
||||
*/
|
||||
|
||||
struct _GtkInspectorRecorderRow
|
||||
{
|
||||
GtkWidget parent;
|
||||
|
||||
gpointer sequence;
|
||||
gpointer match_sequence;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_SEQUENCE = 1,
|
||||
PROP_MATCH_SEQUENCE,
|
||||
LAST_PROP
|
||||
};
|
||||
|
||||
static GParamSpec *props[LAST_PROP] = { NULL, };
|
||||
|
||||
G_DEFINE_TYPE (GtkInspectorRecorderRow, gtk_inspector_recorder_row, GTK_TYPE_WIDGET)
|
||||
|
||||
static void
|
||||
gtk_inspector_recorder_row_init (GtkInspectorRecorderRow *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
dispose (GObject *object)
|
||||
{
|
||||
GtkInspectorRecorderRow *self = GTK_INSPECTOR_RECORDER_ROW (object);
|
||||
|
||||
gtk_widget_unparent (gtk_widget_get_first_child (GTK_WIDGET (self)));
|
||||
|
||||
G_OBJECT_CLASS (gtk_inspector_recorder_row_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
update_style (GtkInspectorRecorderRow *self)
|
||||
{
|
||||
if (self->sequence == self->match_sequence && self->sequence != NULL)
|
||||
gtk_widget_add_css_class (GTK_WIDGET (self), "highlight");
|
||||
else
|
||||
gtk_widget_remove_css_class (GTK_WIDGET (self), "highlight");
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_inspector_recorder_row_get_property (GObject *object,
|
||||
guint param_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkInspectorRecorderRow *self = GTK_INSPECTOR_RECORDER_ROW (object);
|
||||
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_SEQUENCE:
|
||||
g_value_set_pointer (value, self->sequence);
|
||||
break;
|
||||
|
||||
case PROP_MATCH_SEQUENCE:
|
||||
g_value_set_pointer (value, self->match_sequence);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_inspector_recorder_row_set_property (GObject *object,
|
||||
guint param_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkInspectorRecorderRow *self = GTK_INSPECTOR_RECORDER_ROW (object);
|
||||
|
||||
switch (param_id)
|
||||
{
|
||||
case PROP_SEQUENCE:
|
||||
self->sequence = g_value_get_pointer (value);
|
||||
update_style (self);
|
||||
break;
|
||||
|
||||
case PROP_MATCH_SEQUENCE:
|
||||
self->match_sequence = g_value_get_pointer (value);
|
||||
update_style (self);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_inspector_recorder_row_class_init (GtkInspectorRecorderRowClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||
|
||||
object_class->dispose = dispose;
|
||||
object_class->set_property = gtk_inspector_recorder_row_set_property;
|
||||
object_class->get_property = gtk_inspector_recorder_row_get_property;
|
||||
|
||||
props[PROP_SEQUENCE] = g_param_spec_pointer ("sequence", "", "", G_PARAM_READWRITE);
|
||||
props[PROP_MATCH_SEQUENCE] = g_param_spec_pointer ("match-sequence", "", "", G_PARAM_READWRITE);
|
||||
|
||||
g_object_class_install_properties (object_class, LAST_PROP, props);
|
||||
|
||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtkwidget.h>
|
||||
|
||||
#define GTK_TYPE_INSPECTOR_RECORDER_ROW (gtk_inspector_recorder_row_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (GtkInspectorRecorderRow, gtk_inspector_recorder_row, GTK, INSPECTOR_RECORDER_ROW, GtkWidget)
|
||||
@@ -184,7 +184,7 @@ open_object_details (GtkWidget *button, GtkInspectorWindow *iw)
|
||||
GObject *selected;
|
||||
|
||||
selected = gtk_inspector_object_tree_get_selected (GTK_INSPECTOR_OBJECT_TREE (iw->object_tree));
|
||||
|
||||
|
||||
gtk_inspector_window_set_object (iw, selected, CHILD_KIND_WIDGET, 0);
|
||||
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (iw->object_stack), "object-details");
|
||||
@@ -752,7 +752,7 @@ gtk_inspector_window_get (GdkDisplay *display)
|
||||
iw = GTK_WIDGET (g_object_get_data (G_OBJECT (display), "-gtk-inspector"));
|
||||
|
||||
if (!iw)
|
||||
iw = GTK_WIDGET (gtk_inspector_window_new (display));
|
||||
iw = GTK_WIDGET (gtk_inspector_window_new (display));
|
||||
|
||||
return iw;
|
||||
}
|
||||
@@ -873,10 +873,6 @@ gtk_inspector_handle_event (GdkEvent *event)
|
||||
if (iw == NULL)
|
||||
return FALSE;
|
||||
|
||||
gtk_inspector_recorder_record_event (GTK_INSPECTOR_RECORDER (iw->widget_recorder),
|
||||
gtk_get_event_widget (event),
|
||||
event);
|
||||
|
||||
g_signal_emit (iw, signals[EVENT], 0, event, &handled);
|
||||
|
||||
return handled;
|
||||
|
||||
@@ -622,7 +622,7 @@ button {
|
||||
min-width: 26px;
|
||||
min-height: 32px;
|
||||
|
||||
&.image-button {
|
||||
&.image-button {
|
||||
min-width: 30px;
|
||||
&:only-child {
|
||||
margin: 4px;
|
||||
@@ -911,15 +911,7 @@ modelbutton.flat arrow {
|
||||
|
||||
/* oldstyle toolbar buttons */
|
||||
|
||||
.toolbar > button,
|
||||
.toolbar > :not(.linked) > button,
|
||||
.toolbar :not(.linked) > menubutton > button,
|
||||
.toolbar :not(.linked) > scalebutton > button,
|
||||
.toolbar :not(.linked) > dropdown > button,
|
||||
.toolbar :not(.linked) > colorbutton > button,
|
||||
.toolbar :not(.linked) > fontbutton > button,
|
||||
.toolbar :not(.linked) > appchooserbutton > button,
|
||||
.toolbar :not(.linked) > combobox > box > button {
|
||||
.toolbar button {
|
||||
margin: 1px;
|
||||
|
||||
@extend %button_basic_flat;
|
||||
@@ -1327,7 +1319,8 @@ combobox {
|
||||
background-color: $bg_color;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
.toolbar,
|
||||
toolbar {
|
||||
@extend %toolbar;
|
||||
|
||||
// on OSD
|
||||
@@ -1876,7 +1869,7 @@ popover.background {
|
||||
|
||||
> list,
|
||||
> .view,
|
||||
> .toolbar {
|
||||
> toolbar {
|
||||
border-style: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
@@ -2431,7 +2424,7 @@ switch {
|
||||
border-radius: 50%;
|
||||
transition: $button_transition;
|
||||
}
|
||||
|
||||
|
||||
> image { color: transparent; } /* only show i / o for the accessible theme */
|
||||
|
||||
&:hover > slider {
|
||||
@@ -2540,7 +2533,7 @@ radio {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@if $variant == 'light' {
|
||||
// the borders of the light variant versions of checks and radios are too similar in luminosity to the selected background
|
||||
// color, hence we need special casing.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1,5 +1,5 @@
|
||||
project('gtk', 'c',
|
||||
version: '4.5.1',
|
||||
version: '4.5.0',
|
||||
default_options: [
|
||||
'buildtype=debugoptimized',
|
||||
'warning_level=1',
|
||||
|
||||
+5205
-4447
File diff suppressed because it is too large
Load Diff
+222
-205
File diff suppressed because it is too large
Load Diff
+239
-249
File diff suppressed because it is too large
Load Diff
@@ -15,8 +15,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: lt\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2021-12-14 00:32+0000\n"
|
||||
"PO-Revision-Date: 2021-12-14 13:40+0200\n"
|
||||
"POT-Creation-Date: 2021-11-18 23:46+0000\n"
|
||||
"PO-Revision-Date: 2021-11-21 21:50+0200\n"
|
||||
"Last-Translator: Aurimas Černius <aurisc4@gmail.com>\n"
|
||||
"Language-Team: Lietuvių <gnome-lt@lists.akl.lt>\n"
|
||||
"Language: lt\n"
|
||||
@@ -63,46 +63,46 @@ msgstr "Dabartinė realizacija nepalaiko OpenGL"
|
||||
msgid "GL support disabled via GDK_DEBUG"
|
||||
msgstr "GL palaikymas išjungtas naudojant GDK_DEBUG"
|
||||
|
||||
#: gdk/gdkdisplay.c:1544
|
||||
#: gdk/gdkdisplay.c:1569
|
||||
msgid "No EGL configuration available"
|
||||
msgstr "Nėra prieinamos EGL konfigūracijos"
|
||||
|
||||
#: gdk/gdkdisplay.c:1552
|
||||
#: gdk/gdkdisplay.c:1577
|
||||
msgid "Failed to get EGL configurations"
|
||||
msgstr "Nepavyko gauti EGL konfigūracijų"
|
||||
|
||||
#: gdk/gdkdisplay.c:1582
|
||||
#: gdk/gdkdisplay.c:1607
|
||||
msgid "No EGL configuration with required features found"
|
||||
msgstr "Nerasta EGL konfigūracija su reikiamomis savybėmis"
|
||||
|
||||
#: gdk/gdkdisplay.c:1589
|
||||
#: gdk/gdkdisplay.c:1614
|
||||
msgid "No perfect EGL configuration found"
|
||||
msgstr "Nerasta puikiai tinkanti EGL konfigūracija"
|
||||
|
||||
#: gdk/gdkdisplay.c:1631
|
||||
#: gdk/gdkdisplay.c:1656
|
||||
msgid "EGL implementation is missing extension %2$s"
|
||||
msgid_plural "EGL implementation is missing %d extensions: %s"
|
||||
msgstr[0] "EGL realizacijai trūksta %d plėtinio: %s"
|
||||
msgstr[1] "EGL realizacijai trūksta %d plėtinių: %s"
|
||||
msgstr[2] "EGL realizacijai trūksta %d plėtinių: %s"
|
||||
|
||||
#: gdk/gdkdisplay.c:1664
|
||||
#: gdk/gdkdisplay.c:1689
|
||||
msgid "libEGL not available in this sandbox"
|
||||
msgstr "libEGL šioje apribotoje veiksenoje neprieinama"
|
||||
|
||||
#: gdk/gdkdisplay.c:1665
|
||||
#: gdk/gdkdisplay.c:1690
|
||||
msgid "libEGL not available"
|
||||
msgstr "libEGL neprieinama"
|
||||
|
||||
#: gdk/gdkdisplay.c:1675
|
||||
#: gdk/gdkdisplay.c:1700
|
||||
msgid "Failed to create EGL display"
|
||||
msgstr "Nepavyko sukurti EGL vaizduoklio"
|
||||
|
||||
#: gdk/gdkdisplay.c:1685
|
||||
#: gdk/gdkdisplay.c:1710
|
||||
msgid "Could not initialize EGL display"
|
||||
msgstr "Nepavyko inicializuoti EGL vaizduoklio"
|
||||
|
||||
#: gdk/gdkdisplay.c:1696
|
||||
#: gdk/gdkdisplay.c:1721
|
||||
#, c-format
|
||||
msgid "EGL version %d.%d is too old. GTK requires %d.%d"
|
||||
msgstr "EGL versija %d.%d yra per sena. GTK reikalauja %d.%d"
|
||||
@@ -119,12 +119,13 @@ msgstr "Nėra suderinamų formatų turinio perdavimui."
|
||||
msgid "The EGL implementation does not support any allowed APIs"
|
||||
msgstr "EGL realizacija nepalaiko jokių leistinų API"
|
||||
|
||||
#: gdk/gdkglcontext.c:404 gdk/win32/gdkglcontext-win32-wgl.c:624
|
||||
#: gdk/x11/gdkglcontext-glx.c:622
|
||||
#: gdk/gdkglcontext.c:404 gdk/win32/gdkglcontext-win32-egl.c:401
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:627 gdk/x11/gdkglcontext-glx.c:622
|
||||
msgid "Unable to create a GL context"
|
||||
msgstr "Nepavyko sukurti GL konteksto"
|
||||
|
||||
#: gdk/gdkglcontext.c:1237
|
||||
#| msgid "GL support disabled via GDK_DEBUG"
|
||||
msgid "Anything but OpenGL ES disabled via GDK_DEBUG"
|
||||
msgstr "Bet kas išskyrus OpenGL ES išjungta naudojant GDK_DEBUG"
|
||||
|
||||
@@ -140,11 +141,12 @@ msgstr "Programa nepalaiko API %s"
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "Bandoma naudoti %s, bet %s jau naudojama"
|
||||
|
||||
#: gdk/gdksurface.c:1238
|
||||
#: gdk/gdksurface.c:1235
|
||||
msgid "Vulkan support disabled via GDK_DEBUG"
|
||||
msgstr "Vulkan palaikymas išjungtas naudojant GDK_DEBUG"
|
||||
|
||||
#: gdk/gdktexture.c:529
|
||||
#: gdk/gdktexture.c:530
|
||||
#| msgid "Unknown item"
|
||||
msgid "Unknown image format."
|
||||
msgstr "Nežinomas paveikslėlio formatas."
|
||||
|
||||
@@ -535,13 +537,15 @@ msgstr "Klaida interpretuojant JPEG paveikslėlio failą (%s)"
|
||||
msgid "Unsupported JPEG colorspace (%d)"
|
||||
msgstr "Nepalaikoma JPEG spalvų sritis (%d)"
|
||||
|
||||
#: gdk/loaders/gdkjpeg.c:197 gdk/loaders/gdkpng.c:273 gdk/loaders/gdktiff.c:453
|
||||
#: gdk/loaders/gdkjpeg.c:197 gdk/loaders/gdkpng.c:273 gdk/loaders/gdktiff.c:446
|
||||
#, c-format
|
||||
#| msgid "Not enough memory"
|
||||
msgid "Not enough memory for image size %ux%u"
|
||||
msgstr "Nepakanka atminties paveikslėlio dydžiui %ux%u"
|
||||
|
||||
#: gdk/loaders/gdkpng.c:119
|
||||
#, c-format
|
||||
#| msgid "Error creating print preview"
|
||||
msgid "Error reading png (%s)"
|
||||
msgstr "Klaida skaitant png (%s)"
|
||||
|
||||
@@ -559,11 +563,7 @@ msgstr "Nepalaikomas spalvos tipas %u png paveikslėlyje"
|
||||
msgid "Failed to load RGB data from TIFF file"
|
||||
msgstr "Nepavyko įkelti RGB duomenų iš TIFF failo"
|
||||
|
||||
#: gdk/loaders/gdktiff.c:383
|
||||
msgid "Could not load TIFF data"
|
||||
msgstr "Nepavyko įkelti TIFF duomenų"
|
||||
|
||||
#: gdk/loaders/gdktiff.c:465
|
||||
#: gdk/loaders/gdktiff.c:458
|
||||
#, c-format
|
||||
msgid "Reading data failed at row %d"
|
||||
msgstr "Duomenų skaitymas nepavyko ties eilute %d"
|
||||
@@ -571,7 +571,7 @@ msgstr "Duomenų skaitymas nepavyko ties eilute %d"
|
||||
#: gdk/macos/gdkmacosclipboard.c:557 gdk/wayland/gdkclipboard-wayland.c:231
|
||||
#: gdk/wayland/gdkdrop-wayland.c:203 gdk/wayland/gdkprimary-wayland.c:312
|
||||
#: gdk/win32/gdkdrop-win32.c:1006 gdk/win32/gdkdrop-win32.c:1051
|
||||
#: gdk/x11/gdkclipboard-x11.c:787 gdk/x11/gdkdrop-x11.c:233
|
||||
#: gdk/x11/gdkclipboard-x11.c:763 gdk/x11/gdkdrop-x11.c:233
|
||||
msgid "No compatible transfer format found"
|
||||
msgstr "Nerasta suderinamų perdavimo formatų"
|
||||
|
||||
@@ -703,15 +703,18 @@ msgstr "IDataObject_GetData (0x%x) klaida, grąžinama 0x%lx"
|
||||
msgid "Failed to transmute DnD data W32 format 0x%x to %p (%s)"
|
||||
msgstr "Nepavyko konvertuoti tempiamų duomenų W32 formato 0x%x į %p (%s)"
|
||||
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:279
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:296
|
||||
msgid "No GL implementation is available"
|
||||
msgstr "Nėra galimo GL realizacijos"
|
||||
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:590
|
||||
#: gdk/win32/gdkglcontext-win32-egl.c:215
|
||||
#: gdk/win32/gdkglcontext-win32-egl.c:225
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:593
|
||||
msgid "No available configurations for the given pixel format"
|
||||
msgstr "Nėra galimų konfigūracijų nurodytam pikselių formatui"
|
||||
|
||||
#: gdk/win32/gdkglcontext-win32-egl.c:275
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:282
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:299
|
||||
msgid "No GL implementation is available"
|
||||
msgstr "Nėra galimo GL realizacijos"
|
||||
|
||||
#: gdk/win32/gdkhdataoutputstream-win32.c:63
|
||||
msgid "writing a closed stream"
|
||||
msgstr "rašoma į užvertą srautą"
|
||||
@@ -764,11 +767,11 @@ msgstr[0] "Atveriamas %d objektas"
|
||||
msgstr[1] "Atveriami %d objektai"
|
||||
msgstr[2] "Atveriama %d objektų"
|
||||
|
||||
#: gdk/x11/gdkclipboard-x11.c:457
|
||||
#: gdk/x11/gdkclipboard-x11.c:433
|
||||
msgid "Clipboard manager could not store selection."
|
||||
msgstr "Iškarpinės valdyklė negali įrašyti žymėjimo."
|
||||
|
||||
#: gdk/x11/gdkclipboard-x11.c:637
|
||||
#: gdk/x11/gdkclipboard-x11.c:613
|
||||
msgid "Cannot store clipboard. No clipboard manager is active."
|
||||
msgstr "Nepavyko įrašyti iškarpinės. Nėra aktyvios iškarpinės valdyklės."
|
||||
|
||||
@@ -1700,16 +1703,16 @@ msgctxt "progress bar label"
|
||||
msgid "%d %%"
|
||||
msgstr "%d %%"
|
||||
|
||||
#: gtk/gtkcolorbutton.c:181 gtk/gtkcolorbutton.c:311
|
||||
#: gtk/gtkcolorbutton.c:181 gtk/gtkcolorbutton.c:310
|
||||
msgid "Pick a Color"
|
||||
msgstr "Pasirinkite spalvą"
|
||||
|
||||
#: gtk/gtkcolorbutton.c:500 gtk/gtkcolorchooserwidget.c:308
|
||||
#: gtk/gtkcolorbutton.c:499 gtk/gtkcolorchooserwidget.c:308
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%, Alpha %d%%"
|
||||
msgstr "Raudona %d%%, Žalia %d%%, Mėlyna %d%%, Alfa %d%%"
|
||||
|
||||
#: gtk/gtkcolorbutton.c:506 gtk/gtkcolorchooserwidget.c:314
|
||||
#: gtk/gtkcolorbutton.c:505 gtk/gtkcolorchooserwidget.c:314
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%"
|
||||
msgstr "Raudona %d%%, Žalia %d%%, Mėlyna %d%%"
|
||||
@@ -1954,7 +1957,7 @@ msgstr "Pasirinktinė"
|
||||
msgid "Custom color %d: %s"
|
||||
msgstr "Pasirinktinė spalva %d: %s"
|
||||
|
||||
#: gtk/gtkcolorswatch.c:231
|
||||
#: gtk/gtkcolorswatch.c:229
|
||||
msgid "Customize"
|
||||
msgstr "Tinkinti"
|
||||
|
||||
@@ -2096,7 +2099,7 @@ msgstr "Jau yra failas tokiu pavadinimu"
|
||||
#: gtk/gtkmountoperation.c:610 gtk/gtkpagesetupunixdialog.c:283
|
||||
#: gtk/gtkprintbackend.c:642 gtk/gtkprinteroptionwidget.c:713
|
||||
#: gtk/gtkprintunixdialog.c:667 gtk/gtkprintunixdialog.c:823
|
||||
#: gtk/gtkwindow.c:6218 gtk/inspector/css-editor.c:248
|
||||
#: gtk/gtkwindow.c:6138 gtk/inspector/css-editor.c:248
|
||||
#: gtk/inspector/recorder.c:1271
|
||||
msgid "_Cancel"
|
||||
msgstr "_Atsisakyti"
|
||||
@@ -2185,7 +2188,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "Jei ištrinsite elementą, jis bus negrįžtamai prarastas."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1210 gtk/gtkfilechooserwidget.c:1826
|
||||
#: gtk/gtklabel.c:5533 gtk/gtktext.c:6064 gtk/gtktextview.c:8920
|
||||
#: gtk/gtklabel.c:5515 gtk/gtktext.c:6062 gtk/gtktextview.c:8908
|
||||
msgid "_Delete"
|
||||
msgstr "Iš_trinti"
|
||||
|
||||
@@ -2399,51 +2402,51 @@ msgctxt "font"
|
||||
msgid "None"
|
||||
msgstr "Nėra"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1569
|
||||
#: gtk/gtkfontchooserwidget.c:1568
|
||||
msgid "Width"
|
||||
msgstr "Plotis"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1570
|
||||
#: gtk/gtkfontchooserwidget.c:1569
|
||||
msgid "Weight"
|
||||
msgstr "Svoris"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1571
|
||||
#: gtk/gtkfontchooserwidget.c:1570
|
||||
msgid "Italic"
|
||||
msgstr "Kursyvas"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1572
|
||||
#: gtk/gtkfontchooserwidget.c:1571
|
||||
msgid "Slant"
|
||||
msgstr "Pasviręs"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1573
|
||||
#: gtk/gtkfontchooserwidget.c:1572
|
||||
msgid "Optical Size"
|
||||
msgstr "Optinis dydis"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2120
|
||||
#: gtk/gtkfontchooserwidget.c:2118
|
||||
msgid "Default"
|
||||
msgstr "Numatyta"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2166
|
||||
#: gtk/gtkfontchooserwidget.c:2164
|
||||
msgid "Ligatures"
|
||||
msgstr "Ligatūros"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2167
|
||||
#: gtk/gtkfontchooserwidget.c:2165
|
||||
msgid "Letter Case"
|
||||
msgstr "Raidžių registras"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2168
|
||||
#: gtk/gtkfontchooserwidget.c:2166
|
||||
msgid "Number Case"
|
||||
msgstr "Skaitmenų registras"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2169
|
||||
#: gtk/gtkfontchooserwidget.c:2167
|
||||
msgid "Number Spacing"
|
||||
msgstr "Skaitmenų tarpai"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2170
|
||||
#: gtk/gtkfontchooserwidget.c:2168
|
||||
msgid "Number Formatting"
|
||||
msgstr "Skaitmenų formatas"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2171
|
||||
#: gtk/gtkfontchooserwidget.c:2169
|
||||
msgid "Character Variants"
|
||||
msgstr "Simbolių variantai"
|
||||
|
||||
@@ -2451,27 +2454,27 @@ msgstr "Simbolių variantai"
|
||||
msgid "OpenGL context creation failed"
|
||||
msgstr "Nepavyko sukurti OpenGL konteksto"
|
||||
|
||||
#: gtk/gtklabel.c:5530 gtk/gtktext.c:6052 gtk/gtktextview.c:8908
|
||||
#: gtk/gtklabel.c:5512 gtk/gtktext.c:6050 gtk/gtktextview.c:8896
|
||||
msgid "Cu_t"
|
||||
msgstr "_Iškirpti"
|
||||
|
||||
#: gtk/gtklabel.c:5531 gtk/gtktext.c:6056 gtk/gtktextview.c:8912
|
||||
#: gtk/gtklabel.c:5513 gtk/gtktext.c:6054 gtk/gtktextview.c:8900
|
||||
msgid "_Copy"
|
||||
msgstr "_Kopijuoti"
|
||||
|
||||
#: gtk/gtklabel.c:5532 gtk/gtktext.c:6060 gtk/gtktextview.c:8916
|
||||
#: gtk/gtklabel.c:5514 gtk/gtktext.c:6058 gtk/gtktextview.c:8904
|
||||
msgid "_Paste"
|
||||
msgstr "Į_dėti"
|
||||
|
||||
#: gtk/gtklabel.c:5538 gtk/gtktext.c:6073 gtk/gtktextview.c:8941
|
||||
#: gtk/gtklabel.c:5520 gtk/gtktext.c:6071 gtk/gtktextview.c:8929
|
||||
msgid "Select _All"
|
||||
msgstr "P_ažymėti viską"
|
||||
|
||||
#: gtk/gtklabel.c:5543
|
||||
#: gtk/gtklabel.c:5525
|
||||
msgid "_Open Link"
|
||||
msgstr "_Atverti nuorodą"
|
||||
|
||||
#: gtk/gtklabel.c:5547
|
||||
#: gtk/gtklabel.c:5529
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "Kopijuoti _nuorodos adresą"
|
||||
|
||||
@@ -2573,7 +2576,7 @@ msgid "%d:%02d"
|
||||
msgstr "%d:%02d"
|
||||
|
||||
#: gtk/gtkmessagedialog.c:158 gtk/gtkmessagedialog.c:176
|
||||
#: gtk/gtkprintbackend.c:643 gtk/gtkwindow.c:6219
|
||||
#: gtk/gtkprintbackend.c:643 gtk/gtkwindow.c:6139
|
||||
msgid "_OK"
|
||||
msgstr "_Gerai"
|
||||
|
||||
@@ -3409,7 +3412,7 @@ msgid "Swipe right"
|
||||
msgstr "Perbraukti dešinėn"
|
||||
|
||||
#. Translators: This is the window title for the shortcuts window in normal mode
|
||||
#: gtk/gtkshortcutswindow.c:874 gtk/inspector/window.ui:498
|
||||
#: gtk/gtkshortcutswindow.c:874 gtk/inspector/window.ui:490
|
||||
msgid "Shortcuts"
|
||||
msgstr "Trumpiniai"
|
||||
|
||||
@@ -3435,15 +3438,15 @@ msgstr "Bandykite kitą paiešką"
|
||||
msgid "Could not show link"
|
||||
msgstr "Nepavyko parodyti nuorodos"
|
||||
|
||||
#: gtk/gtktext.c:6078 gtk/gtktextview.c:8946
|
||||
#: gtk/gtktext.c:6076 gtk/gtktextview.c:8934
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "Įterpti _emoji"
|
||||
|
||||
#: gtk/gtktextview.c:8928
|
||||
#: gtk/gtktextview.c:8916
|
||||
msgid "_Undo"
|
||||
msgstr "Atša_ukti"
|
||||
|
||||
#: gtk/gtktextview.c:8932
|
||||
#: gtk/gtktextview.c:8920
|
||||
msgid "_Redo"
|
||||
msgstr "Paka_rtoti"
|
||||
|
||||
@@ -3470,12 +3473,12 @@ msgctxt "volume percentage"
|
||||
msgid "%d %%"
|
||||
msgstr "%d %%"
|
||||
|
||||
#: gtk/gtkwindow.c:6206
|
||||
#: gtk/gtkwindow.c:6126
|
||||
#, c-format
|
||||
msgid "Do you want to use GTK Inspector?"
|
||||
msgstr "Ar norite naudoti GTK inspektorių?"
|
||||
|
||||
#: gtk/gtkwindow.c:6208
|
||||
#: gtk/gtkwindow.c:6128
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK Inspector is an interactive debugger that lets you explore and modify "
|
||||
@@ -3486,7 +3489,7 @@ msgstr ""
|
||||
"keisti GTK programos vidurius. Jo naudojimas gali sukelti programai problemų "
|
||||
"ar ją nulaužti."
|
||||
|
||||
#: gtk/gtkwindow.c:6213
|
||||
#: gtk/gtkwindow.c:6133
|
||||
msgid "Don’t show this message again"
|
||||
msgstr "Daugiau nerodyti šio pranešimo"
|
||||
|
||||
@@ -3556,36 +3559,6 @@ msgstr "Parametro tipas"
|
||||
msgid "State"
|
||||
msgstr "Būsena"
|
||||
|
||||
#: gtk/inspector/clipboard.c:149
|
||||
#| msgid "Show All"
|
||||
msgid "Show"
|
||||
msgstr "Rodyti"
|
||||
|
||||
#: gtk/inspector/clipboard.c:205
|
||||
#| msgid "Empty"
|
||||
msgctxt "clipboard"
|
||||
msgid "empty"
|
||||
msgstr "tuščia"
|
||||
|
||||
#: gtk/inspector/clipboard.c:210
|
||||
msgctxt "clipboard"
|
||||
msgid "local"
|
||||
msgstr "vietinis"
|
||||
|
||||
#: gtk/inspector/clipboard.c:212
|
||||
msgctxt "clipboard"
|
||||
msgid "remote"
|
||||
msgstr "nuotolinis"
|
||||
|
||||
#: gtk/inspector/clipboard.ui:31 gtk/inspector/window.ui:574
|
||||
#| msgid "Copy to clipboard"
|
||||
msgid "Clipboard"
|
||||
msgstr "Iškarpinė"
|
||||
|
||||
#: gtk/inspector/clipboard.ui:70
|
||||
msgid "Primary"
|
||||
msgstr "Pirminė"
|
||||
|
||||
#: gtk/inspector/controllers.c:126
|
||||
msgctxt "event phase"
|
||||
msgid "None"
|
||||
@@ -3652,51 +3625,46 @@ msgstr "Stiliaus klasės"
|
||||
msgid "CSS Property"
|
||||
msgstr "CSS savybė"
|
||||
|
||||
#: gtk/inspector/general.c:309 gtk/inspector/general.c:389
|
||||
#: gtk/inspector/general.c:307 gtk/inspector/general.c:387
|
||||
msgctxt "GL version"
|
||||
msgid "None"
|
||||
msgstr "Nėra"
|
||||
|
||||
#: gtk/inspector/general.c:318
|
||||
#: gtk/inspector/general.c:316
|
||||
msgctxt "GL version"
|
||||
msgid "Disabled"
|
||||
msgstr "Išjungta"
|
||||
|
||||
#: gtk/inspector/general.c:319
|
||||
#: gtk/inspector/general.c:317
|
||||
msgctxt "GL vendor"
|
||||
msgid "Disabled"
|
||||
msgstr "Išjungta"
|
||||
|
||||
#: gtk/inspector/general.c:390
|
||||
#: gtk/inspector/general.c:388
|
||||
msgctxt "GL vendor"
|
||||
msgid "None"
|
||||
msgstr "Nėra"
|
||||
|
||||
#: gtk/inspector/general.c:441
|
||||
#: gtk/inspector/general.c:439
|
||||
msgctxt "Vulkan device"
|
||||
msgid "Disabled"
|
||||
msgstr "Išjungta"
|
||||
|
||||
#: gtk/inspector/general.c:442 gtk/inspector/general.c:443
|
||||
#: gtk/inspector/general.c:440 gtk/inspector/general.c:441
|
||||
msgctxt "Vulkan version"
|
||||
msgid "Disabled"
|
||||
msgstr "Išjungta"
|
||||
|
||||
#: gtk/inspector/general.c:499
|
||||
#: gtk/inspector/general.c:497
|
||||
msgctxt "Vulkan device"
|
||||
msgid "None"
|
||||
msgstr "Nėra"
|
||||
|
||||
#: gtk/inspector/general.c:500 gtk/inspector/general.c:501
|
||||
#: gtk/inspector/general.c:498 gtk/inspector/general.c:499
|
||||
msgctxt "Vulkan version"
|
||||
msgid "None"
|
||||
msgstr "Nėra"
|
||||
|
||||
#: gtk/inspector/general.c:771
|
||||
#| msgid "Theme is hardcoded by GTK_THEME"
|
||||
msgid "IM Context is hardcoded by GTK_IM_MODULE"
|
||||
msgstr "IM kontekstas yra fiksuotas su GTK_IM_MODULE"
|
||||
|
||||
#: gtk/inspector/general.ui:32
|
||||
msgid "GTK Version"
|
||||
msgstr "GTK versija"
|
||||
@@ -3717,45 +3685,39 @@ msgstr "Pango šriftų lentelė"
|
||||
msgid "Media Backend"
|
||||
msgstr "Daugialypės terpės realizacija"
|
||||
|
||||
#: gtk/inspector/general.ui:162
|
||||
#| msgctxt "input method menu"
|
||||
#| msgid "X Input Method"
|
||||
msgid "Input Method"
|
||||
msgstr "Įvesties metodas"
|
||||
|
||||
#: gtk/inspector/general.ui:201
|
||||
#: gtk/inspector/general.ui:175
|
||||
msgid "Prefix"
|
||||
msgstr "Priešdėlis"
|
||||
|
||||
#: gtk/inspector/general.ui:403
|
||||
#: gtk/inspector/general.ui:377
|
||||
msgid "Display"
|
||||
msgstr "Displėjus"
|
||||
|
||||
#: gtk/inspector/general.ui:430
|
||||
#: gtk/inspector/general.ui:404
|
||||
msgid "RGBA Visual"
|
||||
msgstr "RGBA vaizdas"
|
||||
|
||||
#: gtk/inspector/general.ui:456
|
||||
#: gtk/inspector/general.ui:430
|
||||
msgid "Composited"
|
||||
msgstr "Kompozicija"
|
||||
|
||||
#: gtk/inspector/general.ui:508
|
||||
#: gtk/inspector/general.ui:482
|
||||
msgid "GL Version"
|
||||
msgstr "GL versija"
|
||||
|
||||
#: gtk/inspector/general.ui:558
|
||||
#: gtk/inspector/general.ui:532
|
||||
msgid "GL Vendor"
|
||||
msgstr "GL tiekėjas"
|
||||
|
||||
#: gtk/inspector/general.ui:598
|
||||
#: gtk/inspector/general.ui:572
|
||||
msgid "Vulkan Device"
|
||||
msgstr "Vulkan įrenginys"
|
||||
|
||||
#: gtk/inspector/general.ui:625
|
||||
#: gtk/inspector/general.ui:599
|
||||
msgid "Vulkan API version"
|
||||
msgstr "Vulkan API versija"
|
||||
|
||||
#: gtk/inspector/general.ui:652
|
||||
#: gtk/inspector/general.ui:626
|
||||
msgid "Vulkan driver version"
|
||||
msgstr "Vulkan tvarkyklės versija"
|
||||
|
||||
@@ -3821,8 +3783,8 @@ msgid "Surface"
|
||||
msgstr "Paviršius"
|
||||
|
||||
#: gtk/inspector/misc-info.ui:346 gtk/inspector/misc-info.ui:385
|
||||
#: gtk/inspector/misc-info.ui:424 gtk/inspector/prop-editor.c:1116
|
||||
#: gtk/inspector/prop-editor.c:1476 gtk/inspector/window.ui:396
|
||||
#: gtk/inspector/misc-info.ui:424 gtk/inspector/prop-editor.c:1111
|
||||
#: gtk/inspector/prop-editor.c:1471 gtk/inspector/window.ui:388
|
||||
msgid "Properties"
|
||||
msgstr "Savybės"
|
||||
|
||||
@@ -3899,66 +3861,66 @@ msgstr "%s %s %p"
|
||||
msgid "%s with value type %s"
|
||||
msgstr "%s su %s tipo verte"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1184
|
||||
#: gtk/inspector/prop-editor.c:1179
|
||||
#, c-format
|
||||
msgid "Uneditable property type: %s"
|
||||
msgstr "Neredaguojamas savybės tipas: %s"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1328
|
||||
#: gtk/inspector/prop-editor.c:1323
|
||||
msgctxt "column number"
|
||||
msgid "None"
|
||||
msgstr "Nėra"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1365
|
||||
#: gtk/inspector/prop-editor.c:1360
|
||||
msgid "Attribute:"
|
||||
msgstr "Atributas:"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1368
|
||||
#: gtk/inspector/prop-editor.c:1363
|
||||
msgid "Model"
|
||||
msgstr "Modelis"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1373
|
||||
#: gtk/inspector/prop-editor.c:1368
|
||||
msgid "Column:"
|
||||
msgstr "Stulpelis:"
|
||||
|
||||
#. Translators: %s is a type name, for example
|
||||
#. * Action from 0x2345678 (GtkApplicationWindow)
|
||||
#.
|
||||
#: gtk/inspector/prop-editor.c:1472
|
||||
#: gtk/inspector/prop-editor.c:1467
|
||||
#, c-format
|
||||
msgid "Action from: %p (%s)"
|
||||
msgstr "Veiksmas iš: %p (%s)"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1527
|
||||
#: gtk/inspector/prop-editor.c:1522
|
||||
msgid "Reset"
|
||||
msgstr "Atstatyti"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1535
|
||||
#: gtk/inspector/prop-editor.c:1530
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "Default"
|
||||
msgstr "Numatyta"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1538
|
||||
#: gtk/inspector/prop-editor.c:1533
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "Theme"
|
||||
msgstr "Tema"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1541
|
||||
#: gtk/inspector/prop-editor.c:1536
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "XSettings"
|
||||
msgstr "XSettings"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1545
|
||||
#: gtk/inspector/prop-editor.c:1540
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "Application"
|
||||
msgstr "Programa"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1548
|
||||
#: gtk/inspector/prop-editor.c:1543
|
||||
msgctxt "GtkSettings source"
|
||||
msgid "Unknown"
|
||||
msgstr "Nežinoma"
|
||||
|
||||
#: gtk/inspector/prop-editor.c:1551
|
||||
#: gtk/inspector/prop-editor.c:1546
|
||||
msgid "Source:"
|
||||
msgstr "Šaltinis:"
|
||||
|
||||
@@ -4219,111 +4181,111 @@ msgstr "Rodyti visus objektus"
|
||||
msgid "Show all Resources"
|
||||
msgstr "Rodyti visus išteklius"
|
||||
|
||||
#: gtk/inspector/window.ui:147
|
||||
#: gtk/inspector/window.ui:139
|
||||
msgid "Collect Statistics"
|
||||
msgstr "Rinkti statistiką"
|
||||
|
||||
#: gtk/inspector/window.ui:199
|
||||
#: gtk/inspector/window.ui:191
|
||||
msgid "Objects"
|
||||
msgstr "Objektai"
|
||||
|
||||
#: gtk/inspector/window.ui:231
|
||||
#: gtk/inspector/window.ui:223
|
||||
msgid "Toggle Sidebar"
|
||||
msgstr "Perjungti šoninę juostą"
|
||||
|
||||
#: gtk/inspector/window.ui:253
|
||||
#: gtk/inspector/window.ui:245
|
||||
msgid "Refresh action state"
|
||||
msgstr "Atnaujinti veiksmo būseną"
|
||||
|
||||
#: gtk/inspector/window.ui:327
|
||||
#: gtk/inspector/window.ui:319
|
||||
msgid "Previous object"
|
||||
msgstr "Ankstesnis objektas"
|
||||
|
||||
#: gtk/inspector/window.ui:334
|
||||
#: gtk/inspector/window.ui:326
|
||||
msgid "Child object"
|
||||
msgstr "Vaikinis objektas"
|
||||
|
||||
#: gtk/inspector/window.ui:341
|
||||
#: gtk/inspector/window.ui:333
|
||||
msgid "Previous sibling"
|
||||
msgstr "Ankstesnis porininkas"
|
||||
|
||||
#: gtk/inspector/window.ui:347
|
||||
#: gtk/inspector/window.ui:339
|
||||
msgid "List Position"
|
||||
msgstr "Padėtis sąraše"
|
||||
|
||||
#: gtk/inspector/window.ui:356
|
||||
#: gtk/inspector/window.ui:348
|
||||
msgid "Next sibling"
|
||||
msgstr "Kitas porininkas"
|
||||
|
||||
#: gtk/inspector/window.ui:386
|
||||
#: gtk/inspector/window.ui:378
|
||||
msgid "Miscellaneous"
|
||||
msgstr "Įvairūs"
|
||||
|
||||
#: gtk/inspector/window.ui:407
|
||||
#: gtk/inspector/window.ui:399
|
||||
msgid "Layout"
|
||||
msgstr "Išdėstymas"
|
||||
|
||||
#: gtk/inspector/window.ui:418
|
||||
#: gtk/inspector/window.ui:410
|
||||
msgid "CSS Nodes"
|
||||
msgstr "CSS mazgai"
|
||||
|
||||
#: gtk/inspector/window.ui:429
|
||||
#: gtk/inspector/window.ui:421
|
||||
msgid "Size Groups"
|
||||
msgstr "Dydžių grupės"
|
||||
|
||||
#: gtk/inspector/window.ui:438 gtk/inspector/window.ui:447
|
||||
#: gtk/inspector/window.ui:430 gtk/inspector/window.ui:439
|
||||
msgid "Data"
|
||||
msgstr "Duomenys"
|
||||
|
||||
#: gtk/inspector/window.ui:457
|
||||
#: gtk/inspector/window.ui:449
|
||||
msgid "Actions"
|
||||
msgstr "Veiksmai"
|
||||
|
||||
#: gtk/inspector/window.ui:468
|
||||
#: gtk/inspector/window.ui:460
|
||||
msgid "Menu"
|
||||
msgstr "Meniu"
|
||||
|
||||
#: gtk/inspector/window.ui:477
|
||||
#: gtk/inspector/window.ui:469
|
||||
msgid "Controllers"
|
||||
msgstr "Valdikliai"
|
||||
|
||||
#: gtk/inspector/window.ui:487
|
||||
#: gtk/inspector/window.ui:479
|
||||
msgid "Magnifier"
|
||||
msgstr "Lupa"
|
||||
|
||||
#: gtk/inspector/window.ui:508
|
||||
#: gtk/inspector/window.ui:500
|
||||
msgid "Accessibility"
|
||||
msgstr "Prieiga"
|
||||
|
||||
#: gtk/inspector/window.ui:532
|
||||
#: gtk/inspector/window.ui:524
|
||||
msgid "Global"
|
||||
msgstr "Visuotinė"
|
||||
|
||||
#: gtk/inspector/window.ui:545
|
||||
#: gtk/inspector/window.ui:537
|
||||
msgid "Information"
|
||||
msgstr "Informacija"
|
||||
|
||||
#: gtk/inspector/window.ui:554
|
||||
#: gtk/inspector/window.ui:546
|
||||
msgid "Settings"
|
||||
msgstr "Nuostatos"
|
||||
|
||||
#: gtk/inspector/window.ui:563
|
||||
#: gtk/inspector/window.ui:555
|
||||
msgid "Resources"
|
||||
msgstr "Ištekliai"
|
||||
|
||||
#: gtk/inspector/window.ui:584
|
||||
#: gtk/inspector/window.ui:566
|
||||
msgid "Statistics"
|
||||
msgstr "Statistika"
|
||||
|
||||
#: gtk/inspector/window.ui:595
|
||||
#: gtk/inspector/window.ui:577
|
||||
msgid "Logging"
|
||||
msgstr "Žurnalas"
|
||||
|
||||
#: gtk/inspector/window.ui:610
|
||||
#: gtk/inspector/window.ui:592
|
||||
msgid "CSS"
|
||||
msgstr "CSS"
|
||||
|
||||
#: gtk/inspector/window.ui:619
|
||||
#: gtk/inspector/window.ui:601
|
||||
msgid "Recorder"
|
||||
msgstr "Įrašymas"
|
||||
|
||||
@@ -7425,54 +7387,42 @@ msgstr ""
|
||||
"\n"
|
||||
"Atlikti įvairius veiksmus su GtkBuilder .ui failais.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:440
|
||||
#: tools/gtk-builder-tool-simplify.c:437
|
||||
#, c-format
|
||||
msgid "%s:%d: Couldn’t parse value for property '%s': %s\n"
|
||||
msgstr "%s:%d: Nepavyko perskaityti savybės %s::%s vertės\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:649
|
||||
#: tools/gtk-builder-tool-simplify.c:638
|
||||
#, c-format
|
||||
msgid "%s:%d: %sproperty %s::%s not found\n"
|
||||
msgstr "%s:%d: %savybė %s::%s nerasta\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2286
|
||||
#: tools/gtk-builder-tool-simplify.c:2275
|
||||
#, c-format
|
||||
msgid "Can’t load “%s”: %s\n"
|
||||
msgstr "Nepavyko įkelti „%s“: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2297
|
||||
#: tools/gtk-builder-tool-simplify.c:2286
|
||||
#, c-format
|
||||
msgid "Can’t parse “%s”: %s\n"
|
||||
msgstr "Nepavyko suprasti „%s“: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2303
|
||||
#, c-format
|
||||
#| msgid "Can’t parse “%s”: %s\n"
|
||||
msgid "Can't parse “%s”: %s\n"
|
||||
msgstr "Nepavyko suprasti „%s“: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2309
|
||||
#, c-format
|
||||
#| msgid "Can’t parse “%s”: %s\n"
|
||||
msgid "Can't parse “%s”\n"
|
||||
msgstr "Nepavyko suprasti „%s“\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2333
|
||||
#: tools/gtk-builder-tool-simplify.c:2310
|
||||
#, c-format
|
||||
msgid "Failed to read “%s”: %s\n"
|
||||
msgstr "Nepavyko perskaityti „%s“: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2339
|
||||
#: tools/gtk-builder-tool-simplify.c:2316
|
||||
#, c-format
|
||||
msgid "Failed to write %s: “%s”\n"
|
||||
msgstr "Nepavyko įrašyti %s: „%s“\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2379
|
||||
#: tools/gtk-builder-tool-simplify.c:2356
|
||||
#, c-format
|
||||
msgid "No .ui file specified\n"
|
||||
msgstr "Nenurodytas .ui failas\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2385
|
||||
#: tools/gtk-builder-tool-simplify.c:2362
|
||||
#, c-format
|
||||
msgid "Can only simplify a single .ui file without --replace\n"
|
||||
msgstr "Galima supaprastinti tik vieną .ui failą be --replace\n"
|
||||
@@ -8586,6 +8536,9 @@ msgstr ""
|
||||
#~ msgid "Unexpected character data on line %d char %d"
|
||||
#~ msgstr "Neleistini simboliniai duomenys eilutės %d stulpelyje %d"
|
||||
|
||||
#~ msgid "Empty"
|
||||
#~ msgstr "Tuščias"
|
||||
|
||||
#~ msgid "C_redits"
|
||||
#~ msgstr "_Padėkos"
|
||||
|
||||
@@ -9103,6 +9056,10 @@ msgstr ""
|
||||
#~ msgid "Waylandgtk"
|
||||
#~ msgstr "Waylandgtk"
|
||||
|
||||
#~ msgctxt "input method menu"
|
||||
#~ msgid "X Input Method"
|
||||
#~ msgstr "X įvesties metodas"
|
||||
|
||||
#~ msgid "printer offline"
|
||||
#~ msgstr "spausdintuvas atjungtas"
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 3.10\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2021-12-16 14:58+0000\n"
|
||||
"PO-Revision-Date: 2021-12-16 15:47+0000\n"
|
||||
"POT-Creation-Date: 2021-12-12 12:57+0000\n"
|
||||
"PO-Revision-Date: 2021-12-12 16:25+0000\n"
|
||||
"Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n"
|
||||
"Language-Team: Português <https://l10n.gnome.org/teams/pt/>\n"
|
||||
"Language: pt\n"
|
||||
@@ -533,7 +533,7 @@ msgstr "Erro na interpretação do ficheiro de imagem JPEG (%s)"
|
||||
msgid "Unsupported JPEG colorspace (%d)"
|
||||
msgstr "Espaço de cor JPEG não suportado (%d)"
|
||||
|
||||
#: gdk/loaders/gdkjpeg.c:197 gdk/loaders/gdkpng.c:273 gdk/loaders/gdktiff.c:453
|
||||
#: gdk/loaders/gdkjpeg.c:197 gdk/loaders/gdkpng.c:273 gdk/loaders/gdktiff.c:446
|
||||
#, c-format
|
||||
msgid "Not enough memory for image size %ux%u"
|
||||
msgstr "Memória insuficiente para o tamanho da imagem %ux%u"
|
||||
@@ -557,11 +557,7 @@ msgstr "Tipo de cor não suportada %u em imagem png"
|
||||
msgid "Failed to load RGB data from TIFF file"
|
||||
msgstr "Falha no carregamento de dados RGB do ficheiro TIFF"
|
||||
|
||||
#: gdk/loaders/gdktiff.c:383
|
||||
msgid "Could not load TIFF data"
|
||||
msgstr "Não foi possível carregar os dados TIFF"
|
||||
|
||||
#: gdk/loaders/gdktiff.c:465
|
||||
#: gdk/loaders/gdktiff.c:458
|
||||
#, c-format
|
||||
msgid "Reading data failed at row %d"
|
||||
msgstr "Dados de leitura falhados na fila %d"
|
||||
@@ -569,7 +565,7 @@ msgstr "Dados de leitura falhados na fila %d"
|
||||
#: gdk/macos/gdkmacosclipboard.c:557 gdk/wayland/gdkclipboard-wayland.c:231
|
||||
#: gdk/wayland/gdkdrop-wayland.c:203 gdk/wayland/gdkprimary-wayland.c:312
|
||||
#: gdk/win32/gdkdrop-win32.c:1006 gdk/win32/gdkdrop-win32.c:1051
|
||||
#: gdk/x11/gdkclipboard-x11.c:787 gdk/x11/gdkdrop-x11.c:233
|
||||
#: gdk/x11/gdkclipboard-x11.c:763 gdk/x11/gdkdrop-x11.c:233
|
||||
msgid "No compatible transfer format found"
|
||||
msgstr "Nenhum formato de transferência compatível localizado"
|
||||
|
||||
@@ -789,11 +785,11 @@ msgid_plural "Opening %d Items"
|
||||
msgstr[0] "A abrir %d item"
|
||||
msgstr[1] "A abrir %d itens"
|
||||
|
||||
#: gdk/x11/gdkclipboard-x11.c:457
|
||||
#: gdk/x11/gdkclipboard-x11.c:433
|
||||
msgid "Clipboard manager could not store selection."
|
||||
msgstr "O gestor da área de transferência não pôde armazenar a seleção."
|
||||
|
||||
#: gdk/x11/gdkclipboard-x11.c:637
|
||||
#: gdk/x11/gdkclipboard-x11.c:613
|
||||
msgid "Cannot store clipboard. No clipboard manager is active."
|
||||
msgstr ""
|
||||
"Não foi possível armazenar a área de transferência. Nenhum gestor está ativo."
|
||||
@@ -1729,16 +1725,16 @@ msgctxt "progress bar label"
|
||||
msgid "%d %%"
|
||||
msgstr "%d %%"
|
||||
|
||||
#: gtk/gtkcolorbutton.c:181 gtk/gtkcolorbutton.c:311
|
||||
#: gtk/gtkcolorbutton.c:181 gtk/gtkcolorbutton.c:310
|
||||
msgid "Pick a Color"
|
||||
msgstr "Escolha uma cor"
|
||||
|
||||
#: gtk/gtkcolorbutton.c:500 gtk/gtkcolorchooserwidget.c:308
|
||||
#: gtk/gtkcolorbutton.c:499 gtk/gtkcolorchooserwidget.c:308
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%, Alpha %d%%"
|
||||
msgstr "Vermelho %d%%, verde %d%%, azul %d%%, alfa %d%%"
|
||||
|
||||
#: gtk/gtkcolorbutton.c:506 gtk/gtkcolorchooserwidget.c:314
|
||||
#: gtk/gtkcolorbutton.c:505 gtk/gtkcolorchooserwidget.c:314
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%"
|
||||
msgstr "Vermelho %d%%, verde %d%%, azul %d%%"
|
||||
@@ -1983,7 +1979,7 @@ msgstr "Personalizada"
|
||||
msgid "Custom color %d: %s"
|
||||
msgstr "Cor personalizada %d: %s"
|
||||
|
||||
#: gtk/gtkcolorswatch.c:231
|
||||
#: gtk/gtkcolorswatch.c:229
|
||||
msgid "Customize"
|
||||
msgstr "Personalizar"
|
||||
|
||||
@@ -2126,7 +2122,7 @@ msgstr "Já existe um ficheiro com esse nome"
|
||||
#: gtk/gtkprintbackend.c:642 gtk/gtkprinteroptionwidget.c:713
|
||||
#: gtk/gtkprintunixdialog.c:667 gtk/gtkprintunixdialog.c:823
|
||||
#: gtk/gtkwindow.c:6218 gtk/inspector/css-editor.c:248
|
||||
#: gtk/inspector/recorder.c:1706
|
||||
#: gtk/inspector/recorder.c:1271
|
||||
msgid "_Cancel"
|
||||
msgstr "_Cancelar"
|
||||
|
||||
@@ -2137,7 +2133,7 @@ msgid "_Open"
|
||||
msgstr "_Abrir"
|
||||
|
||||
#: gtk/gtkfilechoosernative.c:574 gtk/inspector/css-editor.c:249
|
||||
#: gtk/inspector/recorder.c:1707
|
||||
#: gtk/inspector/recorder.c:1272
|
||||
msgid "_Save"
|
||||
msgstr "_Gravar"
|
||||
|
||||
@@ -3567,8 +3563,7 @@ msgid "Attribute"
|
||||
msgstr "Atributo"
|
||||
|
||||
#: gtk/inspector/a11y.ui:78 gtk/inspector/css-node-tree.ui:119
|
||||
#: gtk/inspector/prop-list.ui:57 gtk/inspector/recorder.ui:155
|
||||
#: gtk/inspector/recorder.ui:221
|
||||
#: gtk/inspector/prop-list.ui:57 gtk/inspector/recorder.ui:124
|
||||
msgid "Value"
|
||||
msgstr "Valor"
|
||||
|
||||
@@ -3999,46 +3994,42 @@ msgstr "Origem:"
|
||||
msgid "Defined At"
|
||||
msgstr "Definido em"
|
||||
|
||||
#: gtk/inspector/recorder.c:1677
|
||||
#: gtk/inspector/recorder.c:1242
|
||||
#, c-format
|
||||
msgid "Saving RenderNode failed"
|
||||
msgstr "Falha ao gravar RenderNode"
|
||||
|
||||
#: gtk/inspector/recorder.ui:20
|
||||
#: gtk/inspector/recorder.ui:15
|
||||
msgid "Record frames"
|
||||
msgstr "Imagens registadas"
|
||||
msgstr "Quadros registados"
|
||||
|
||||
#: gtk/inspector/recorder.ui:27
|
||||
#: gtk/inspector/recorder.ui:22
|
||||
msgid "Clear recorded frames"
|
||||
msgstr "Limpar imagens gravadas"
|
||||
|
||||
#: gtk/inspector/recorder.ui:34
|
||||
#: gtk/inspector/recorder.ui:29
|
||||
msgid "Add debug nodes"
|
||||
msgstr "Adicionar nodes de depuração"
|
||||
|
||||
#: gtk/inspector/recorder.ui:42
|
||||
msgid "Highlight event sequences"
|
||||
msgstr "Destacar sequências de eventos"
|
||||
|
||||
#: gtk/inspector/recorder.ui:51
|
||||
#: gtk/inspector/recorder.ui:38
|
||||
msgid "Use a dark background"
|
||||
msgstr "Usar um fundo escuro"
|
||||
|
||||
#: gtk/inspector/recorder.ui:59
|
||||
#: gtk/inspector/recorder.ui:46
|
||||
msgid "Save selected node"
|
||||
msgstr "Gravar node selecionado"
|
||||
|
||||
#: gtk/inspector/recorder.ui:67
|
||||
#: gtk/inspector/recorder.ui:54
|
||||
msgid "Copy to clipboard"
|
||||
msgstr "Copiar para a área de transferência"
|
||||
|
||||
#: gtk/inspector/recorder.ui:142 gtk/inspector/recorder.ui:208
|
||||
#: gtk/inspector/recorder.ui:111
|
||||
msgid "Property"
|
||||
msgstr "Propriedade"
|
||||
|
||||
#: gtk/inspector/resource-list.ui:59
|
||||
msgid "Path"
|
||||
msgstr "Localização"
|
||||
msgstr "Caminho"
|
||||
|
||||
#: gtk/inspector/resource-list.ui:71
|
||||
msgid "Count"
|
||||
@@ -4062,7 +4053,7 @@ msgstr "Tamanho:"
|
||||
|
||||
#: gtk/inspector/shortcuts.ui:17
|
||||
msgid "Trigger"
|
||||
msgstr "Acionador"
|
||||
msgstr "Gatilho"
|
||||
|
||||
#: gtk/inspector/size-groups.c:225
|
||||
msgctxt "sizegroup mode"
|
||||
@@ -7409,17 +7400,17 @@ msgstr "Tamanho inválido: %s\n"
|
||||
#: tools/encodesymbolic.c:106 tools/encodesymbolic.c:115
|
||||
#, c-format
|
||||
msgid "Can’t load file: %s\n"
|
||||
msgstr "Não é possível carregar o ficheiro: %s\n"
|
||||
msgstr "Falha ao carregar o ficheiro: %s\n"
|
||||
|
||||
#: tools/encodesymbolic.c:143 tools/encodesymbolic.c:149
|
||||
#, c-format
|
||||
msgid "Can’t save file %s: %s\n"
|
||||
msgstr "Não é possível guardar o ficheiro %s: %s\n"
|
||||
msgstr "Falha ao guardar o ficheiro %s: %s\n"
|
||||
|
||||
#: tools/encodesymbolic.c:155
|
||||
#, c-format
|
||||
msgid "Can’t close stream"
|
||||
msgstr "Não é possível fechar a transmissão"
|
||||
msgstr "Falha ao fechar transmissão"
|
||||
|
||||
#: tools/gtk-builder-tool.c:34
|
||||
#, c-format
|
||||
@@ -7462,52 +7453,42 @@ msgstr ""
|
||||
"\n"
|
||||
"Efetua várias tarefas em ficheiros .ui do GtkBuilder.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:440
|
||||
#: tools/gtk-builder-tool-simplify.c:437
|
||||
#, c-format
|
||||
msgid "%s:%d: Couldn’t parse value for property '%s': %s\n"
|
||||
msgstr "%s:%d: Não foi possível analisar o valor para a propriedade '%s': %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:649
|
||||
#: tools/gtk-builder-tool-simplify.c:646
|
||||
#, c-format
|
||||
msgid "%s:%d: %sproperty %s::%s not found\n"
|
||||
msgstr "%s:%d: %spropriedade %s::%s não encontrada\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2286
|
||||
#: tools/gtk-builder-tool-simplify.c:2283
|
||||
#, c-format
|
||||
msgid "Can’t load “%s”: %s\n"
|
||||
msgstr "Não é possível carregar “%s”: %s\n"
|
||||
msgstr "Não foi possível carregar “%s”: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2297
|
||||
#: tools/gtk-builder-tool-simplify.c:2294
|
||||
#, c-format
|
||||
msgid "Can’t parse “%s”: %s\n"
|
||||
msgstr "Não é possível analisar “%s”: %s\n"
|
||||
msgstr "Não foi possível analisar “%s”: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2303
|
||||
#, c-format
|
||||
msgid "Can't parse “%s”: %s\n"
|
||||
msgstr "Não é possível analisar “%s”: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2309
|
||||
#, c-format
|
||||
msgid "Can't parse “%s”\n"
|
||||
msgstr "Não é possível analisar “%s”\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2333
|
||||
#: tools/gtk-builder-tool-simplify.c:2318
|
||||
#, c-format
|
||||
msgid "Failed to read “%s”: %s\n"
|
||||
msgstr "Falha ao ler “%s”: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2339
|
||||
#: tools/gtk-builder-tool-simplify.c:2324
|
||||
#, c-format
|
||||
msgid "Failed to write %s: “%s”\n"
|
||||
msgstr "Falha ao gravar %s: “%s”\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2379
|
||||
#: tools/gtk-builder-tool-simplify.c:2364
|
||||
#, c-format
|
||||
msgid "No .ui file specified\n"
|
||||
msgstr "Nenhum ficheiro .ui especificado\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2385
|
||||
#: tools/gtk-builder-tool-simplify.c:2370
|
||||
#, c-format
|
||||
msgid "Can only simplify a single .ui file without --replace\n"
|
||||
msgstr "Apenas pode simplificar um único ficheiro .ui sem --replace\n"
|
||||
|
||||
@@ -9,8 +9,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2021-12-14 00:32+0000\n"
|
||||
"PO-Revision-Date: 2021-12-14 15:20+0200\n"
|
||||
"POT-Creation-Date: 2021-12-12 12:57+0000\n"
|
||||
"PO-Revision-Date: 2021-12-12 19:17+0200\n"
|
||||
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
|
||||
"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
|
||||
"Language: uk\n"
|
||||
@@ -533,7 +533,7 @@ msgstr "Помилка інтерпретації файлу зображенн
|
||||
msgid "Unsupported JPEG colorspace (%d)"
|
||||
msgstr "Непідтримуваний простір кольорів JPEG (%d)"
|
||||
|
||||
#: gdk/loaders/gdkjpeg.c:197 gdk/loaders/gdkpng.c:273 gdk/loaders/gdktiff.c:453
|
||||
#: gdk/loaders/gdkjpeg.c:197 gdk/loaders/gdkpng.c:273 gdk/loaders/gdktiff.c:446
|
||||
#, c-format
|
||||
msgid "Not enough memory for image size %ux%u"
|
||||
msgstr "Недостатньо пам'яті для зображення розміром %ux%u"
|
||||
@@ -557,12 +557,7 @@ msgstr "Непідтримуваний тип кольору, %u, у зобра
|
||||
msgid "Failed to load RGB data from TIFF file"
|
||||
msgstr "Не вдалося завантажити дані RGB з файлу формату TIFF"
|
||||
|
||||
#: gdk/loaders/gdktiff.c:383
|
||||
msgid "Could not load TIFF data"
|
||||
msgstr ""
|
||||
"Не вдалося завантажити дані TIFF"
|
||||
|
||||
#: gdk/loaders/gdktiff.c:465
|
||||
#: gdk/loaders/gdktiff.c:458
|
||||
#, c-format
|
||||
msgid "Reading data failed at row %d"
|
||||
msgstr "Помилка читання даних у рядку %d"
|
||||
@@ -570,7 +565,7 @@ msgstr "Помилка читання даних у рядку %d"
|
||||
#: gdk/macos/gdkmacosclipboard.c:557 gdk/wayland/gdkclipboard-wayland.c:231
|
||||
#: gdk/wayland/gdkdrop-wayland.c:203 gdk/wayland/gdkprimary-wayland.c:312
|
||||
#: gdk/win32/gdkdrop-win32.c:1006 gdk/win32/gdkdrop-win32.c:1051
|
||||
#: gdk/x11/gdkclipboard-x11.c:787 gdk/x11/gdkdrop-x11.c:233
|
||||
#: gdk/x11/gdkclipboard-x11.c:763 gdk/x11/gdkdrop-x11.c:233
|
||||
msgid "No compatible transfer format found"
|
||||
msgstr "Не знайдено сумісного формату передавання даних"
|
||||
|
||||
@@ -791,11 +786,11 @@ msgstr[1] "Відкривається %d пункти"
|
||||
msgstr[2] "Відкривається %d пунктів"
|
||||
msgstr[3] "Відкривається %d пункт"
|
||||
|
||||
#: gdk/x11/gdkclipboard-x11.c:457
|
||||
#: gdk/x11/gdkclipboard-x11.c:433
|
||||
msgid "Clipboard manager could not store selection."
|
||||
msgstr "Засобу керування буфером обміну не вдалося зберегти позначене."
|
||||
|
||||
#: gdk/x11/gdkclipboard-x11.c:637
|
||||
#: gdk/x11/gdkclipboard-x11.c:613
|
||||
msgid "Cannot store clipboard. No clipboard manager is active."
|
||||
msgstr ""
|
||||
"Не вдалося зберегти буфер обміну. Немає активної програми для керування "
|
||||
@@ -1731,16 +1726,16 @@ msgctxt "progress bar label"
|
||||
msgid "%d %%"
|
||||
msgstr "%d %%"
|
||||
|
||||
#: gtk/gtkcolorbutton.c:181 gtk/gtkcolorbutton.c:311
|
||||
#: gtk/gtkcolorbutton.c:181 gtk/gtkcolorbutton.c:310
|
||||
msgid "Pick a Color"
|
||||
msgstr "Вибір кольору"
|
||||
|
||||
#: gtk/gtkcolorbutton.c:500 gtk/gtkcolorchooserwidget.c:308
|
||||
#: gtk/gtkcolorbutton.c:499 gtk/gtkcolorchooserwidget.c:308
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%, Alpha %d%%"
|
||||
msgstr "Червоний %d%%, Зелений %d%%, Синій %d%%, Альфа %d%%"
|
||||
|
||||
#: gtk/gtkcolorbutton.c:506 gtk/gtkcolorchooserwidget.c:314
|
||||
#: gtk/gtkcolorbutton.c:505 gtk/gtkcolorchooserwidget.c:314
|
||||
#, c-format
|
||||
msgid "Red %d%%, Green %d%%, Blue %d%%"
|
||||
msgstr "Червоний %d%%, Зелений %d%%, Синій %d%%"
|
||||
@@ -1985,7 +1980,7 @@ msgstr "Власний"
|
||||
msgid "Custom color %d: %s"
|
||||
msgstr "Власний колір %d: %s"
|
||||
|
||||
#: gtk/gtkcolorswatch.c:231
|
||||
#: gtk/gtkcolorswatch.c:229
|
||||
msgid "Customize"
|
||||
msgstr "Налаштувати"
|
||||
|
||||
@@ -3592,31 +3587,37 @@ msgid "State"
|
||||
msgstr "Стан"
|
||||
|
||||
#: gtk/inspector/clipboard.c:149
|
||||
#| msgid "Show All"
|
||||
msgid "Show"
|
||||
msgstr "Показати"
|
||||
|
||||
#: gtk/inspector/clipboard.c:205
|
||||
msgctxt "clipboard"
|
||||
msgid "empty"
|
||||
msgstr "порожній"
|
||||
msgstr ""
|
||||
"порожній"
|
||||
|
||||
#: gtk/inspector/clipboard.c:210
|
||||
msgctxt "clipboard"
|
||||
msgid "local"
|
||||
msgstr "локальний"
|
||||
msgstr ""
|
||||
"локальний"
|
||||
|
||||
#: gtk/inspector/clipboard.c:212
|
||||
msgctxt "clipboard"
|
||||
msgid "remote"
|
||||
msgstr "віддалений"
|
||||
msgstr ""
|
||||
"віддалений"
|
||||
|
||||
#: gtk/inspector/clipboard.ui:31 gtk/inspector/window.ui:574
|
||||
#| msgid "Copy to clipboard"
|
||||
msgid "Clipboard"
|
||||
msgstr "Буфер обміну"
|
||||
|
||||
#: gtk/inspector/clipboard.ui:70
|
||||
msgid "Primary"
|
||||
msgstr "Основний"
|
||||
msgstr ""
|
||||
"Основний"
|
||||
|
||||
#: gtk/inspector/controllers.c:126
|
||||
msgctxt "event phase"
|
||||
@@ -7452,54 +7453,42 @@ msgstr ""
|
||||
"\n"
|
||||
"Виконати різні завдання на файлах GtkBuilder .ui.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:440
|
||||
#: tools/gtk-builder-tool-simplify.c:437
|
||||
#, c-format
|
||||
msgid "%s:%d: Couldn’t parse value for property '%s': %s\n"
|
||||
msgstr "%s:%d: не вдалося обробити значення для властивості «%s»: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:649
|
||||
#: tools/gtk-builder-tool-simplify.c:646
|
||||
#, c-format
|
||||
msgid "%s:%d: %sproperty %s::%s not found\n"
|
||||
msgstr "%s:%d: %sвластивість %s::%s не знайдено\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2286
|
||||
#: tools/gtk-builder-tool-simplify.c:2283
|
||||
#, c-format
|
||||
msgid "Can’t load “%s”: %s\n"
|
||||
msgstr "Не вдалося завантажити «%s»: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2297
|
||||
#: tools/gtk-builder-tool-simplify.c:2294
|
||||
#, c-format
|
||||
msgid "Can’t parse “%s”: %s\n"
|
||||
msgstr "Не вдалося обробити «%s»: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2303
|
||||
#, c-format
|
||||
#| msgid "Can’t parse “%s”: %s\n"
|
||||
msgid "Can't parse “%s”: %s\n"
|
||||
msgstr "Не вдалося обробити «%s»: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2309
|
||||
#, c-format
|
||||
#| msgid "Can’t parse “%s”: %s\n"
|
||||
msgid "Can't parse “%s”\n"
|
||||
msgstr "Не вдалося обробити «%s»\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2333
|
||||
#: tools/gtk-builder-tool-simplify.c:2318
|
||||
#, c-format
|
||||
msgid "Failed to read “%s”: %s\n"
|
||||
msgstr "Не вдалося прочитати «%s»: %s\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2339
|
||||
#: tools/gtk-builder-tool-simplify.c:2324
|
||||
#, c-format
|
||||
msgid "Failed to write %s: “%s”\n"
|
||||
msgstr "Не вдалося записати %s: «%s»\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2379
|
||||
#: tools/gtk-builder-tool-simplify.c:2364
|
||||
#, c-format
|
||||
msgid "No .ui file specified\n"
|
||||
msgstr "Не вказано файла .ui\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2385
|
||||
#: tools/gtk-builder-tool-simplify.c:2370
|
||||
#, c-format
|
||||
msgid "Can only simplify a single .ui file without --replace\n"
|
||||
msgstr "Без --replace можна спрощувати лише один файл .ui\n"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="default-width">300</property>
|
||||
<property name="default-height">300</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">two
|
||||
lines</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">unwrapped</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow">
|
||||
<property name="default-width">300</property>
|
||||
<property name="default-height">300</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">two
|
||||
lines</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">unwrapped</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="wrap-mode">word-char</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -412,8 +412,6 @@ testdata = [
|
||||
'label-width-chars-dont-shrink.ui',
|
||||
'label-wrap-width-chars.ref.ui',
|
||||
'label-wrap-width-chars.ui',
|
||||
'label-wrap-word-char-natural-size.ref.ui',
|
||||
'label-wrap-word-char-natural-size.ui',
|
||||
'label-wrapped-huge-max-width-chars.ref.ui',
|
||||
'label-wrapped-huge-max-width-chars.ui',
|
||||
# this seems to make assumptions on text positioning
|
||||
|
||||
@@ -10,11 +10,8 @@ echo "1..1"
|
||||
name=gtk-query-settings
|
||||
result=$TEST_RESULT_DIR/$name.out
|
||||
$GTK_QUERY_SETTINGS 2>/dev/null >$result
|
||||
EXPECTED=50
|
||||
SEEN=$(wc -l $result | cut -f1 -d' ')
|
||||
|
||||
if [ $SEEN -eq $EXPECTED ]; then
|
||||
echo "ok 1 $name."
|
||||
if [ $(wc -l $result | cut -f1 -d' ') -eq 50 ]; then
|
||||
echo "ok 1 $name"
|
||||
else
|
||||
echo "not ok 1 $name. Expected: $EXPECTED. Seen: $SEEN"
|
||||
echo "not ok 1 $name"
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
/* Copyright 2020 Red Hat, Inc.
|
||||
*
|
||||
* GTK+ is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* GLib is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with GTK+; see the file COPYING. If not,
|
||||
* see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Author: Matthias Clasen
|
||||
*/
|
||||
|
||||
#define GTK_COMPILATION
|
||||
#include "../gtk/gtkbuilderprecompile.c"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib/gprintf.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "gtk-builder-tool.h"
|
||||
|
||||
static void
|
||||
precompile_file (const char *filename)
|
||||
{
|
||||
char *data;
|
||||
gsize len;
|
||||
GError *error = NULL;
|
||||
char *outfile;
|
||||
GBytes *bytes;
|
||||
|
||||
if (!g_file_get_contents (filename, &data, &len, &error))
|
||||
{
|
||||
g_warning ("Failed to load '%s': %s", filename, error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
bytes = _gtk_buildable_parser_precompile (data, len, &error);
|
||||
if (bytes == NULL)
|
||||
{
|
||||
g_warning ("Failed to precompile '%s': %s", filename, error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
outfile = g_strconcat (filename, ".precompiled", NULL);
|
||||
if (!g_file_set_contents (outfile, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes), &error))
|
||||
if (bytes == NULL)
|
||||
{
|
||||
g_warning ("Failed to write precompiled data to '%s': %s", outfile, error->message);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_print ("Wrote %ld bytes to %s.\n", g_bytes_get_size (bytes), outfile);
|
||||
|
||||
g_free (outfile);
|
||||
g_bytes_unref (bytes);
|
||||
}
|
||||
|
||||
void
|
||||
do_precompile (int *argc,
|
||||
const char ***argv)
|
||||
{
|
||||
GOptionContext *context;
|
||||
char **filenames = NULL;
|
||||
const GOptionEntry entries[] = {
|
||||
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, NULL, NULL },
|
||||
{ NULL, }
|
||||
};
|
||||
GError *error = NULL;
|
||||
int i;
|
||||
|
||||
context = g_option_context_new (NULL);
|
||||
g_option_context_set_help_enabled (context, FALSE);
|
||||
g_option_context_add_main_entries (context, entries, NULL);
|
||||
|
||||
if (!g_option_context_parse (context, argc, (char ***)argv, &error))
|
||||
{
|
||||
g_printerr ("%s\n", error->message);
|
||||
g_error_free (error);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_option_context_free (context);
|
||||
|
||||
if (filenames == NULL)
|
||||
{
|
||||
g_printerr ("No .ui file specified\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
for (i = 0; filenames[i]; i++)
|
||||
precompile_file (filenames[i]);
|
||||
|
||||
g_strfreev (filenames);
|
||||
}
|
||||
@@ -134,6 +134,8 @@ main (int argc, const char *argv[])
|
||||
do_enumerate (&argc, &argv);
|
||||
else if (strcmp (argv[0], "preview") == 0)
|
||||
do_preview (&argc, &argv);
|
||||
else if (strcmp (argv[0], "precompile") == 0)
|
||||
do_precompile (&argc, &argv);
|
||||
else
|
||||
usage ();
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
#ifndef __GTK_BUILDER_TOOL_H__
|
||||
#define __GTK_BUILDER_TOOL_H__
|
||||
|
||||
void do_simplify (int *argc, const char ***argv);
|
||||
void do_validate (int *argc, const char ***argv);
|
||||
void do_enumerate (int *argc, const char ***argv);
|
||||
void do_preview (int *argc, const char ***argv);
|
||||
void do_simplify (int *argc, const char ***argv);
|
||||
void do_validate (int *argc, const char ***argv);
|
||||
void do_enumerate (int *argc, const char ***argv);
|
||||
void do_preview (int *argc, const char ***argv);
|
||||
void do_precompile (int *argc, const char ***argv);
|
||||
|
||||
#endif
|
||||
|
||||
+2
-1
@@ -28,7 +28,8 @@ gtk_tools = [
|
||||
'gtk-builder-tool-simplify.c',
|
||||
'gtk-builder-tool-validate.c',
|
||||
'gtk-builder-tool-enumerate.c',
|
||||
'gtk-builder-tool-preview.c'], [libgtk_dep] ],
|
||||
'gtk-builder-tool-preview.c',
|
||||
'gtk-builder-tool-precompile.c'], [libgtk_dep] ],
|
||||
['gtk4-update-icon-cache', ['updateiconcache.c'] + extra_update_icon_cache_objs, [ libgtk_static_dep ] ],
|
||||
['gtk4-encode-symbolic-svg', ['encodesymbolic.c'], [ libgtk_static_dep ] ],
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user