New upstream version 3.24.37
This commit is contained in:
commit
456e29c3ca
22
NEWS
22
NEWS
@ -1,3 +1,25 @@
|
||||
Overview of Changes in GTK+ 3.24.37, 02-03-2023
|
||||
===============================================
|
||||
|
||||
* Support the file transfer portal for copy-paste and DND
|
||||
|
||||
* Treat XKB_MODE_NAME_LODO as super key
|
||||
|
||||
* Refactor startup notification handling to be in sync with GTK 4
|
||||
|
||||
* GL: Synchronie when calling MakeCurrent
|
||||
|
||||
* CSS: Fix a problem with stopping animations
|
||||
|
||||
* Wayland: Drop the legacy text input module
|
||||
|
||||
* Windows: Set the default file extension in the native file chooser
|
||||
|
||||
* Translation updates:
|
||||
Abkhazian
|
||||
Turkish
|
||||
|
||||
|
||||
Overview of Changes in GTK+ 3.24.36, 12-22-2022
|
||||
===============================================
|
||||
|
||||
|
@ -157,7 +157,8 @@ typedef enum {
|
||||
BROADWAY_REQUEST_GRAB_POINTER,
|
||||
BROADWAY_REQUEST_UNGRAB_POINTER,
|
||||
BROADWAY_REQUEST_FOCUS_WINDOW,
|
||||
BROADWAY_REQUEST_SET_SHOW_KEYBOARD
|
||||
BROADWAY_REQUEST_SET_SHOW_KEYBOARD,
|
||||
BROADWAY_REQUEST_SET_MODAL_HINT
|
||||
} BroadwayRequestType;
|
||||
|
||||
typedef struct {
|
||||
@ -231,6 +232,12 @@ typedef struct {
|
||||
guint32 show_keyboard;
|
||||
} BroadwayRequestSetShowKeyboard;
|
||||
|
||||
typedef struct {
|
||||
BroadwayRequestBase base;
|
||||
guint32 id;
|
||||
gboolean modal_hint;
|
||||
} BroadwayRequestSetModalHint;
|
||||
|
||||
typedef union {
|
||||
BroadwayRequestBase base;
|
||||
BroadwayRequestNewWindow new_window;
|
||||
@ -248,6 +255,7 @@ typedef union {
|
||||
BroadwayRequestTranslate translate;
|
||||
BroadwayRequestFocusWindow focus_window;
|
||||
BroadwayRequestSetShowKeyboard set_show_keyboard;
|
||||
BroadwayRequestSetModalHint set_modal_hint;
|
||||
} BroadwayRequest;
|
||||
|
||||
typedef enum {
|
||||
|
@ -113,6 +113,7 @@ struct BroadwayWindow {
|
||||
gboolean is_temp;
|
||||
gboolean visible;
|
||||
gint32 transient_for;
|
||||
gboolean modal_hint;
|
||||
|
||||
BroadwayBuffer *buffer;
|
||||
gboolean buffer_synced;
|
||||
@ -276,6 +277,14 @@ update_event_state (BroadwayServer *server,
|
||||
{
|
||||
window->x = message->configure_notify.x;
|
||||
window->y = message->configure_notify.y;
|
||||
|
||||
if (server->focused_window_id != message->configure_notify.id &&
|
||||
server->pointer_grab_window_id == -1 && window->modal_hint)
|
||||
{
|
||||
broadway_server_window_raise (server, message->configure_notify.id);
|
||||
broadway_server_focus_window (server, message->configure_notify.id);
|
||||
broadway_server_flush (server);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BROADWAY_EVENT_DELETE_NOTIFY:
|
||||
@ -1435,6 +1444,7 @@ broadway_server_destroy_window (BroadwayServer *server,
|
||||
gint id)
|
||||
{
|
||||
BroadwayWindow *window;
|
||||
gint transient_for = -1;
|
||||
|
||||
if (server->mouse_in_toplevel_id == id)
|
||||
{
|
||||
@ -1453,6 +1463,9 @@ broadway_server_destroy_window (BroadwayServer *server,
|
||||
GINT_TO_POINTER (id));
|
||||
if (window != NULL)
|
||||
{
|
||||
if (server->focused_window_id == id)
|
||||
transient_for = window->transient_for;
|
||||
|
||||
server->toplevels = g_list_remove (server->toplevels, window);
|
||||
g_hash_table_remove (server->id_ht,
|
||||
GINT_TO_POINTER (id));
|
||||
@ -1463,6 +1476,17 @@ broadway_server_destroy_window (BroadwayServer *server,
|
||||
|
||||
g_free (window);
|
||||
}
|
||||
|
||||
if (transient_for != -1)
|
||||
{
|
||||
window = g_hash_table_lookup (server->id_ht,
|
||||
GINT_TO_POINTER (transient_for));
|
||||
if (window != NULL)
|
||||
{
|
||||
broadway_server_focus_window (server, transient_for);
|
||||
broadway_server_flush (server);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
@ -1588,6 +1612,20 @@ broadway_server_window_set_transient_for (BroadwayServer *server,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
broadway_server_window_set_modal_hint (BroadwayServer *server,
|
||||
gint id, gboolean modal_hint)
|
||||
{
|
||||
BroadwayWindow *window;
|
||||
|
||||
window = g_hash_table_lookup (server->id_ht,
|
||||
GINT_TO_POINTER (id));
|
||||
if (window == NULL)
|
||||
return;
|
||||
|
||||
window->modal_hint = modal_hint;
|
||||
}
|
||||
|
||||
gboolean
|
||||
broadway_server_has_client (BroadwayServer *server)
|
||||
{
|
||||
|
@ -95,5 +95,8 @@ cairo_surface_t * broadway_server_open_surface (BroadwayServer *server,
|
||||
char *name,
|
||||
int width,
|
||||
int height);
|
||||
void broadway_server_window_set_modal_hint (BroadwayServer *server,
|
||||
gint id,
|
||||
gboolean modal_hint);
|
||||
|
||||
#endif /* __BROADWAY_SERVER__ */
|
||||
|
@ -301,6 +301,11 @@ client_handle_request (BroadwayClient *client,
|
||||
case BROADWAY_REQUEST_SET_SHOW_KEYBOARD:
|
||||
broadway_server_set_show_keyboard (server, request->set_show_keyboard.show_keyboard);
|
||||
break;
|
||||
case BROADWAY_REQUEST_SET_MODAL_HINT:
|
||||
broadway_server_window_set_modal_hint (server,
|
||||
request->set_modal_hint.id,
|
||||
request->set_modal_hint.modal_hint);
|
||||
break;
|
||||
default:
|
||||
g_warning ("Unknown request of type %d", request->base.type);
|
||||
}
|
||||
|
@ -523,6 +523,18 @@ _gdk_broadway_server_window_set_transient_for (GdkBroadwayServer *server,
|
||||
BROADWAY_REQUEST_SET_TRANSIENT_FOR);
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_server_window_set_modal_hint (GdkBroadwayServer *server,
|
||||
gint id, gboolean modal_hint)
|
||||
{
|
||||
BroadwayRequestSetModalHint msg;
|
||||
|
||||
msg.id = id;
|
||||
msg.modal_hint = modal_hint;
|
||||
gdk_broadway_server_send_message (server, msg,
|
||||
BROADWAY_REQUEST_SET_MODAL_HINT);
|
||||
}
|
||||
|
||||
static void *
|
||||
map_named_shm (char *name, gsize size, gboolean *is_shm)
|
||||
{
|
||||
|
@ -71,5 +71,8 @@ gboolean _gdk_broadway_server_window_move_resize (GdkBroadwaySer
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
void _gdk_broadway_server_window_set_modal_hint (GdkBroadwayServer *server,
|
||||
gint id,
|
||||
gboolean modal_hint);
|
||||
|
||||
#endif /* __GDK_BROADWAY_SERVER__ */
|
||||
|
@ -89,6 +89,24 @@ gdk_event_source_check (GSource *source)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void
|
||||
handle_focus_change (GdkEventCrossing *event)
|
||||
{
|
||||
gboolean focus_in = (event->type != GDK_ENTER_NOTIFY);
|
||||
GdkEvent *focus_event;
|
||||
|
||||
if (event->window->parent) {
|
||||
focus_event = gdk_event_new (GDK_FOCUS_CHANGE);
|
||||
focus_event->focus_change.window = g_object_ref (event->window->parent);
|
||||
focus_event->focus_change.send_event = FALSE;
|
||||
focus_event->focus_change.in = focus_in;
|
||||
gdk_event_set_device (focus_event, gdk_event_get_device ((GdkEvent *) event));
|
||||
|
||||
gdk_event_put (focus_event);
|
||||
gdk_event_free (focus_event);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
{
|
||||
@ -160,6 +178,8 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
|
||||
gdk_event_set_device (event, device_manager->core_pointer);
|
||||
gdk_event_set_seat (event, gdk_device_get_seat (device_manager->core_pointer));
|
||||
|
||||
handle_focus_change (&event->crossing);
|
||||
|
||||
node = _gdk_event_queue_append (display, event);
|
||||
_gdk_windowing_got_event (display, node, event, message->base.serial);
|
||||
}
|
||||
|
@ -584,6 +584,15 @@ static void
|
||||
gdk_broadway_window_set_modal_hint (GdkWindow *window,
|
||||
gboolean modal)
|
||||
{
|
||||
GdkBroadwayDisplay *display;
|
||||
GdkWindowImplBroadway *impl;
|
||||
|
||||
impl = GDK_WINDOW_IMPL_BROADWAY (window->impl);
|
||||
|
||||
impl->modal_hint = modal;
|
||||
|
||||
display = GDK_BROADWAY_DISPLAY (gdk_window_get_display (impl->wrapper));
|
||||
_gdk_broadway_server_window_set_modal_hint (display->server, impl->id, impl->modal_hint);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -73,6 +73,7 @@ struct _GdkWindowImplBroadway
|
||||
|
||||
GdkGeometry geometry_hints;
|
||||
GdkWindowHints geometry_hints_mask;
|
||||
gboolean modal_hint;
|
||||
};
|
||||
|
||||
struct _GdkWindowImplBroadwayClass
|
||||
|
12
gdk/gdkgl.c
12
gdk/gdkgl.c
@ -352,6 +352,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
int alpha_size = 0;
|
||||
cairo_region_t *clip_region;
|
||||
GdkGLContextPaintData *paint_data;
|
||||
GLsync sync = NULL;
|
||||
|
||||
impl_window = window->impl_window;
|
||||
|
||||
@ -366,7 +367,18 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
|
||||
|
||||
clip_region = gdk_cairo_region_from_clip (cr);
|
||||
|
||||
if (gdk_gl_context_get_current () != paint_context)
|
||||
sync = glFenceSync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
|
||||
|
||||
gdk_gl_context_make_current (paint_context);
|
||||
|
||||
if (sync)
|
||||
{
|
||||
glWaitSync (sync, 0, GL_TIMEOUT_IGNORED);
|
||||
glDeleteSync (sync);
|
||||
sync = NULL;
|
||||
}
|
||||
|
||||
paint_data = gdk_gl_context_get_paint_data (paint_context);
|
||||
|
||||
if (paint_data->tmp_framebuffer == 0)
|
||||
|
@ -102,8 +102,17 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
|
||||
/* We do not know what happened to this surface outside of GDK.
|
||||
* Especially for foreign windows, they will have been modified
|
||||
* by external applications.
|
||||
*
|
||||
* So be on the safe side and:
|
||||
* - mark the surface as dirty, in case the GdkWindow was
|
||||
* created from a foreign X11 surface
|
||||
* - flush the Cairo state
|
||||
*
|
||||
* For reference, see:
|
||||
* - https://bugzilla.gnome.org/show_bug.cgi?id=754952
|
||||
* - https://gitlab.gnome.org/GNOME/gtk/-/issues/4456
|
||||
*/
|
||||
cairo_surface_mark_dirty (surface);
|
||||
cairo_surface_flush (surface);
|
||||
|
||||
if (cairo_surface_get_content (surface) & CAIRO_CONTENT_ALPHA)
|
||||
|
@ -229,6 +229,9 @@
|
||||
GdkWindow *window = [[self contentView] gdkWindow];
|
||||
GdkEvent *event;
|
||||
gboolean maximized = gdk_window_get_state (window) & GDK_WINDOW_STATE_MAXIMIZED;
|
||||
/* Alignment to 4 pixels is on scaled pixels and these are unscaled pixels so divide by scale to compensate. */
|
||||
const gint scale = gdk_window_get_scale_factor (window);
|
||||
const guint align = GDK_WINDOW_QUARTZ_ALIGNMENT / scale;
|
||||
|
||||
/* see same in windowDidMove */
|
||||
if (maximized && !inMaximizeTransition && !NSEqualRects (lastMaximizedFrame, [self frame]))
|
||||
@ -241,13 +244,18 @@
|
||||
window->width = content_rect.size.width;
|
||||
window->height = content_rect.size.height;
|
||||
|
||||
if(window->width % align)
|
||||
content_rect.size.width += align - window->width % align;
|
||||
|
||||
content_rect.origin.x = 0;
|
||||
content_rect.origin.y = 0;
|
||||
|
||||
[[self contentView] setFrame:content_rect];
|
||||
|
||||
/* Certain resize operations (e.g. going fullscreen), also move the
|
||||
* origin of the window.
|
||||
*/
|
||||
_gdk_quartz_window_update_position (window);
|
||||
|
||||
[[self contentView] setFrame:NSMakeRect (0, 0, window->width, window->height)];
|
||||
|
||||
_gdk_window_update_size (window);
|
||||
|
||||
/* Synthesize a configure event */
|
||||
|
@ -341,15 +341,6 @@
|
||||
return YES;
|
||||
}
|
||||
|
||||
static void
|
||||
nsrect_from_cairo_rect (NSRect *nsrect, cairo_rectangle_int_t *rect)
|
||||
{
|
||||
nsrect->origin.x = (CGFloat)rect->x;
|
||||
nsrect->origin.y = (CGFloat)rect->y;
|
||||
nsrect->size.width = (CGFloat)rect->width;
|
||||
nsrect->size.height = (CGFloat)rect->height;
|
||||
}
|
||||
|
||||
static void
|
||||
cairo_rect_from_nsrect (cairo_rectangle_int_t *rect, NSRect *nsrect)
|
||||
{
|
||||
@ -424,8 +415,7 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
|
||||
return;
|
||||
|
||||
++impl->in_paint_rect_count;
|
||||
cairo_rect_from_nsrect (&bounds_rect, &backing_bounds);
|
||||
bounds_region = cairo_region_create_rectangle (&bounds_rect);
|
||||
|
||||
if (impl->needs_display_region)
|
||||
{
|
||||
cairo_region_t *region = impl->needs_display_region;
|
||||
@ -439,7 +429,7 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
|
||||
cairo_region_t *region;
|
||||
|
||||
cairo_rect_from_nsrect (&bounds, &layer_bounds);
|
||||
region = cairo_region_create_rectangle (&bounds);
|
||||
region = cairo_region_create_rectangle(&bounds);
|
||||
_gdk_window_process_updates_recurse (gdk_window, region);
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
@ -447,8 +437,6 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
|
||||
if (!impl || !impl->cairo_surface)
|
||||
return;
|
||||
|
||||
impl_rect.width = cairo_image_surface_get_width (impl->cairo_surface);
|
||||
impl_rect.height = cairo_image_surface_get_height (impl->cairo_surface);
|
||||
CVPixelBufferLockBaseAddress (pixels, 0);
|
||||
cvpb_surface =
|
||||
cairo_image_surface_create_for_data (CVPixelBufferGetBaseAddress (pixels),
|
||||
@ -458,6 +446,12 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
|
||||
(int)CVPixelBufferGetBytesPerRow (pixels));
|
||||
|
||||
|
||||
cairo_rect_from_nsrect (&bounds_rect, &backing_bounds);
|
||||
bounds_region = cairo_region_create_rectangle (&bounds_rect);
|
||||
|
||||
impl_rect.width = cairo_image_surface_get_width (impl->cairo_surface);
|
||||
impl_rect.height = cairo_image_surface_get_height (impl->cairo_surface);
|
||||
|
||||
cairo_region_intersect_rectangle (bounds_region, &impl_rect);
|
||||
copy_rectangle_argb32 (cvpb_surface, impl->cairo_surface, bounds_region);
|
||||
|
||||
@ -465,7 +459,9 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
|
||||
cairo_region_destroy (bounds_region);
|
||||
_gdk_quartz_unref_cairo_surface (gdk_window); // reffed in gdk_window_impl_quartz_begin_paint
|
||||
CVPixelBufferUnlockBaseAddress (pixels, 0);
|
||||
|
||||
--impl->in_paint_rect_count;
|
||||
|
||||
self.layer.contents = NULL;
|
||||
self.layer.contents = (id)CVPixelBufferGetIOSurface (pixels);
|
||||
}
|
||||
@ -543,6 +539,8 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
|
||||
|
||||
-(void)createBackingStoreWithWidth: (CGFloat) width andHeight: (CGFloat) height
|
||||
{
|
||||
IOSurfaceRef surface;
|
||||
|
||||
g_return_if_fail (width && height);
|
||||
|
||||
CVPixelBufferRelease (pixels);
|
||||
@ -550,6 +548,9 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
|
||||
kCVPixelFormatType_32BGRA,
|
||||
cfpb_props, &pixels);
|
||||
|
||||
surface = CVPixelBufferGetIOSurface (pixels);
|
||||
IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"),
|
||||
kCGColorSpaceSRGB);
|
||||
}
|
||||
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 10700
|
||||
|
@ -858,7 +858,7 @@ find_window_for_ns_event (NSEvent *nsevent,
|
||||
* macOS versions. These trigger 4 pixels out from the window's
|
||||
* frame so we obtain that rect and adjust it for hit testing.
|
||||
*/
|
||||
if (!nsevent.trackingArea && gdk_quartz_osx_version >= GDK_OSX_VENTURA)
|
||||
if (!nsevent.trackingArea && gdk_quartz_osx_version() >= GDK_OSX_VENTURA)
|
||||
{
|
||||
static const int border_width = 4;
|
||||
NSRect frame = nsevent.window.frame;
|
||||
|
@ -27,7 +27,8 @@
|
||||
#include "config.h"
|
||||
|
||||
#define GDK_WINDOW_IS_QUARTZ(win) (GDK_IS_WINDOW_IMPL_QUARTZ (((GdkWindow *)win)->impl))
|
||||
|
||||
/* Cairo surface widths must be 4-pixel byte aligned so that the image will transfer to the CPU. */
|
||||
#define GDK_WINDOW_QUARTZ_ALIGNMENT 16
|
||||
|
||||
/* Display */
|
||||
|
||||
|
@ -142,7 +142,7 @@ gdk_window_get_quartz_impl (GdkWindow* window)
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WINDOW_IMPL_QUARTZ (window->impl), NULL);
|
||||
|
||||
return window->impl;
|
||||
return GDK_WINDOW_IMPL_QUARTZ (window->impl);
|
||||
}
|
||||
|
||||
NSView *
|
||||
@ -306,9 +306,10 @@ gdk_quartz_ref_cairo_surface (GdkWindow *window)
|
||||
gint height = gdk_window_get_height (impl->wrapper);
|
||||
gint scale = gdk_window_get_scale_factor (impl->wrapper);
|
||||
gint scaled_width = width * scale;
|
||||
const gint align = GDK_WINDOW_QUARTZ_ALIGNMENT;
|
||||
|
||||
if (scaled_width % 16)
|
||||
scaled_width += 16 - scaled_width % 16; // Surface widths must be 4-pixel aligned
|
||||
if (scaled_width % align)
|
||||
scaled_width += align - scaled_width % align; // Surface widths must be 4-pixel aligned
|
||||
|
||||
impl->cairo_surface = gdk_quartz_create_cairo_surface (impl,
|
||||
scaled_width,
|
||||
@ -929,6 +930,8 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
NSUInteger style_mask;
|
||||
int nx, ny;
|
||||
const char *title;
|
||||
const gint scale = gdk_window_get_scale_factor (window);
|
||||
const guint align = GDK_WINDOW_QUARTZ_ALIGNMENT / scale;
|
||||
|
||||
/* initWithContentRect will place on the mainScreen by default.
|
||||
* We want to select the screen to place on ourselves. We need
|
||||
@ -942,6 +945,9 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
|
||||
nx -= screen_rect.origin.x;
|
||||
ny -= screen_rect.origin.y;
|
||||
|
||||
if (window->width % align)
|
||||
window->width += align - window->width % align;
|
||||
|
||||
content_rect = NSMakeRect (nx, ny - window->height,
|
||||
window->width,
|
||||
window->height);
|
||||
|
@ -296,7 +296,7 @@ get_gdk_modifiers (struct xkb_keymap *xkb_keymap,
|
||||
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod3")))
|
||||
state |= GDK_MOD3_MASK;
|
||||
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_LOGO)))
|
||||
state |= GDK_MOD4_MASK;
|
||||
state |= GDK_MOD4_MASK | GDK_SUPER_MASK;
|
||||
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod5")))
|
||||
state |= GDK_MOD5_MASK;
|
||||
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Super")))
|
||||
@ -384,7 +384,7 @@ gdk_wayland_keymap_add_virtual_modifiers (GdkKeymap *keymap,
|
||||
xkb_mod_index_t idx;
|
||||
uint32_t mods, real;
|
||||
struct { const char *name; GdkModifierType mask; } vmods[] = {
|
||||
{ "Super", GDK_SUPER_MASK },
|
||||
{ "Super", GDK_SUPER_MASK | GDK_MOD4_MASK },
|
||||
{ "Hyper", GDK_HYPER_MASK },
|
||||
{ "Meta", GDK_META_MASK },
|
||||
{ NULL, 0 }
|
||||
|
@ -3850,6 +3850,8 @@ gdk_wayland_window_focus (GdkWindow *window,
|
||||
{
|
||||
struct xdg_activation_token_v1 *token;
|
||||
struct wl_event_queue *event_queue;
|
||||
struct wl_surface *wl_surface = NULL;
|
||||
GdkWindow *focus_window;
|
||||
|
||||
event_queue = wl_display_create_queue (display_wayland->wl_display);
|
||||
|
||||
@ -3862,8 +3864,13 @@ gdk_wayland_window_focus (GdkWindow *window,
|
||||
xdg_activation_token_v1_set_serial (token,
|
||||
_gdk_wayland_seat_get_last_implicit_grab_serial (seat, NULL),
|
||||
gdk_wayland_seat_get_wl_seat (seat));
|
||||
xdg_activation_token_v1_set_surface (token,
|
||||
gdk_wayland_window_get_wl_surface (window));
|
||||
|
||||
focus_window = gdk_wayland_device_get_focus (gdk_seat_get_keyboard (seat));
|
||||
if (focus_window)
|
||||
wl_surface = gdk_wayland_window_get_wl_surface (focus_window);
|
||||
if (wl_surface)
|
||||
xdg_activation_token_v1_set_surface (token, wl_surface);
|
||||
|
||||
xdg_activation_token_v1_commit (token);
|
||||
|
||||
while (startup_id == NULL)
|
||||
@ -4160,6 +4167,27 @@ static void
|
||||
gdk_wayland_window_set_startup_id (GdkWindow *window,
|
||||
const gchar *startup_id)
|
||||
{
|
||||
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
|
||||
GdkDisplay *display = gdk_window_get_display (window);
|
||||
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
|
||||
gchar *free_me = NULL;
|
||||
|
||||
if (!startup_id)
|
||||
{
|
||||
free_me = g_steal_pointer (&display_wayland->startup_notification_id);
|
||||
startup_id = free_me;
|
||||
}
|
||||
|
||||
#ifdef HAVE_XDG_ACTIVATION
|
||||
if (startup_id)
|
||||
{
|
||||
xdg_activation_v1_activate (display_wayland->xdg_activation,
|
||||
startup_id,
|
||||
impl->display_server.wl_surface);
|
||||
}
|
||||
#endif
|
||||
|
||||
g_free (free_me);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -2669,6 +2669,10 @@ gdk_event_translate (MSG *msg,
|
||||
button = 5;
|
||||
|
||||
buttonup0:
|
||||
{
|
||||
gboolean release_implicit_grab = FALSE;
|
||||
GdkWindow *prev_window = NULL;
|
||||
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" (%d,%d)",
|
||||
GET_X_LPARAM (msg->lParam), GET_Y_LPARAM (msg->lParam)));
|
||||
@ -2684,37 +2688,12 @@ gdk_event_translate (MSG *msg,
|
||||
/* We keep the implicit grab until no buttons at all are held down */
|
||||
if ((state & GDK_ANY_BUTTON_MASK & ~(GDK_BUTTON1_MASK << (button - 1))) == 0)
|
||||
{
|
||||
GdkWindow *native_window = pointer_grab->native_window;
|
||||
|
||||
ReleaseCapture ();
|
||||
|
||||
new_window = NULL;
|
||||
hwnd = WindowFromPoint (msg->pt);
|
||||
if (hwnd != NULL)
|
||||
{
|
||||
POINT client_pt = msg->pt;
|
||||
|
||||
ScreenToClient (hwnd, &client_pt);
|
||||
GetClientRect (hwnd, &rect);
|
||||
if (PtInRect (&rect, client_pt))
|
||||
new_window = gdk_win32_handle_table_lookup (hwnd);
|
||||
}
|
||||
|
||||
synthesize_crossing_events (display,
|
||||
device_manager_win32->system_pointer,
|
||||
native_window, new_window,
|
||||
GDK_CROSSING_UNGRAB,
|
||||
&msg->pt,
|
||||
0, /* TODO: Set right mask */
|
||||
_gdk_win32_get_next_tick (msg->time),
|
||||
FALSE);
|
||||
g_set_object (&mouse_window, new_window);
|
||||
mouse_window_ignored_leave = NULL;
|
||||
release_implicit_grab = TRUE;
|
||||
prev_window = pointer_grab->native_window;
|
||||
}
|
||||
}
|
||||
|
||||
generate_button_event (GDK_BUTTON_RELEASE, button,
|
||||
window, msg);
|
||||
generate_button_event (GDK_BUTTON_RELEASE, button, window, msg);
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
|
||||
@ -2723,9 +2702,37 @@ gdk_event_translate (MSG *msg,
|
||||
impl->drag_move_resize_context.button == button)
|
||||
gdk_win32_window_end_move_resize_drag (window);
|
||||
|
||||
if (release_implicit_grab)
|
||||
{
|
||||
ReleaseCapture ();
|
||||
|
||||
new_window = NULL;
|
||||
hwnd = WindowFromPoint (msg->pt);
|
||||
if (hwnd != NULL)
|
||||
{
|
||||
POINT client_pt = msg->pt;
|
||||
|
||||
ScreenToClient (hwnd, &client_pt);
|
||||
GetClientRect (hwnd, &rect);
|
||||
if (PtInRect (&rect, client_pt))
|
||||
new_window = gdk_win32_handle_table_lookup (hwnd);
|
||||
}
|
||||
|
||||
synthesize_crossing_events (display,
|
||||
device_manager_win32->system_pointer,
|
||||
prev_window, new_window,
|
||||
GDK_CROSSING_UNGRAB,
|
||||
&msg->pt,
|
||||
0, /* TODO: Set right mask */
|
||||
_gdk_win32_get_next_tick (msg->time),
|
||||
FALSE);
|
||||
g_set_object (&mouse_window, new_window);
|
||||
mouse_window_ignored_leave = NULL;
|
||||
}
|
||||
|
||||
return_val = TRUE;
|
||||
break;
|
||||
|
||||
}
|
||||
case WM_MOUSEMOVE:
|
||||
GDK_NOTE (EVENTS,
|
||||
g_print (" %p (%d,%d)",
|
||||
@ -2739,60 +2746,35 @@ gdk_event_translate (MSG *msg,
|
||||
|
||||
pen_touch_input = FALSE;
|
||||
|
||||
new_window = window;
|
||||
g_set_object (&window, find_window_for_mouse_event (window, msg));
|
||||
|
||||
if (pointer_grab != NULL)
|
||||
{
|
||||
POINT pt;
|
||||
pt = msg->pt;
|
||||
|
||||
new_window = NULL;
|
||||
hwnd = WindowFromPoint (pt);
|
||||
if (hwnd != NULL)
|
||||
{
|
||||
POINT client_pt = pt;
|
||||
|
||||
ScreenToClient (hwnd, &client_pt);
|
||||
GetClientRect (hwnd, &rect);
|
||||
if (PtInRect (&rect, client_pt))
|
||||
new_window = gdk_win32_handle_table_lookup (hwnd);
|
||||
}
|
||||
|
||||
if (!pointer_grab->owner_events &&
|
||||
new_window != NULL &&
|
||||
new_window != pointer_grab->native_window)
|
||||
new_window = NULL;
|
||||
}
|
||||
|
||||
if (mouse_window != new_window)
|
||||
if (mouse_window != window)
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print (" mouse_window %p -> %p",
|
||||
mouse_window ? GDK_WINDOW_HWND (mouse_window) : NULL,
|
||||
new_window ? GDK_WINDOW_HWND (new_window) : NULL));
|
||||
window ? GDK_WINDOW_HWND (window) : NULL));
|
||||
synthesize_crossing_events (display,
|
||||
device_manager_win32->system_pointer,
|
||||
mouse_window, new_window,
|
||||
mouse_window, window,
|
||||
GDK_CROSSING_NORMAL,
|
||||
&msg->pt,
|
||||
0, /* TODO: Set right mask */
|
||||
_gdk_win32_get_next_tick (msg->time),
|
||||
FALSE);
|
||||
g_set_object (&mouse_window, new_window);
|
||||
g_set_object (&mouse_window, window);
|
||||
mouse_window_ignored_leave = NULL;
|
||||
if (new_window != NULL)
|
||||
track_mouse_event (TME_LEAVE, GDK_WINDOW_HWND (new_window));
|
||||
if (window != NULL)
|
||||
track_mouse_event (TME_LEAVE, GDK_WINDOW_HWND (window));
|
||||
}
|
||||
else if (new_window != NULL &&
|
||||
new_window == mouse_window_ignored_leave)
|
||||
else if (window != NULL && window == mouse_window_ignored_leave)
|
||||
{
|
||||
/* If we ignored a leave event for this window and we're now getting
|
||||
input again we need to re-arm the mouse tracking, as that was
|
||||
cancelled by the mouseleave. */
|
||||
mouse_window_ignored_leave = NULL;
|
||||
track_mouse_event (TME_LEAVE, GDK_WINDOW_HWND (new_window));
|
||||
track_mouse_event (TME_LEAVE, GDK_WINDOW_HWND (window));
|
||||
}
|
||||
|
||||
g_set_object (&window, find_window_for_mouse_event (window, msg));
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
|
||||
|
||||
/* If we haven't moved, don't create any GDK event. Windows
|
||||
|
@ -2901,6 +2901,7 @@ gdk_x11_window_set_startup_id (GdkWindow *window,
|
||||
const gchar *startup_id)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
gchar *free_this = NULL;
|
||||
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
|
||||
@ -2918,6 +2919,23 @@ gdk_x11_window_set_startup_id (GdkWindow *window,
|
||||
else
|
||||
XDeleteProperty (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XID (window),
|
||||
gdk_x11_get_xatom_by_name_for_display (display, "_NET_STARTUP_ID"));
|
||||
|
||||
if (startup_id == NULL)
|
||||
{
|
||||
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
|
||||
|
||||
startup_id = free_this = display_x11->startup_notification_id;
|
||||
display_x11->startup_notification_id = NULL;
|
||||
|
||||
if (startup_id == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
gdk_x11_display_broadcast_startup_message (display, "remove",
|
||||
"ID", startup_id,
|
||||
NULL);
|
||||
|
||||
g_free (free_this);
|
||||
}
|
||||
|
||||
static void
|
||||
|
498
gtk/filetransferportal.c
Normal file
498
gtk/filetransferportal.c
Normal file
@ -0,0 +1,498 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Matthias Clasen
|
||||
*
|
||||
* 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 <errno.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
#ifdef G_OS_UNIX
|
||||
|
||||
#include <gio/gunixfdlist.h>
|
||||
|
||||
#ifndef O_PATH
|
||||
#define O_PATH 0
|
||||
#endif
|
||||
|
||||
#ifndef O_CLOEXEC
|
||||
#define O_CLOEXEC 0
|
||||
#else
|
||||
#define HAVE_O_CLOEXEC 1
|
||||
#endif
|
||||
|
||||
#include "filetransferportalprivate.h"
|
||||
|
||||
static GDBusProxy *file_transfer_proxy = NULL;
|
||||
|
||||
typedef struct {
|
||||
GTask *task;
|
||||
char **files;
|
||||
int len;
|
||||
int start;
|
||||
} AddFileData;
|
||||
|
||||
static void
|
||||
free_add_file_data (gpointer data)
|
||||
{
|
||||
AddFileData *afd = data;
|
||||
|
||||
g_object_unref (afd->task);
|
||||
g_free (afd->files);
|
||||
g_free (afd);
|
||||
}
|
||||
|
||||
static void add_files (GDBusProxy *proxy,
|
||||
AddFileData *afd);
|
||||
|
||||
static void
|
||||
add_files_done (GObject *object,
|
||||
GAsyncResult *result,
|
||||
gpointer data)
|
||||
{
|
||||
GDBusProxy *proxy = G_DBUS_PROXY (object);
|
||||
AddFileData *afd = data;
|
||||
GError *error = NULL;
|
||||
GVariant *ret;
|
||||
|
||||
ret = g_dbus_proxy_call_with_unix_fd_list_finish (proxy, NULL, result, &error);
|
||||
if (ret == NULL)
|
||||
{
|
||||
g_task_return_error (afd->task, error);
|
||||
free_add_file_data (afd);
|
||||
return;
|
||||
}
|
||||
|
||||
g_variant_unref (ret);
|
||||
|
||||
if (afd->start >= afd->len)
|
||||
{
|
||||
g_task_return_boolean (afd->task, TRUE);
|
||||
free_add_file_data (afd);
|
||||
return;
|
||||
}
|
||||
|
||||
add_files (proxy, afd);
|
||||
}
|
||||
|
||||
/* We call AddFiles in chunks of 16 to avoid running into
|
||||
* the per-message fd limit of the bus.
|
||||
*/
|
||||
static void
|
||||
add_files (GDBusProxy *proxy,
|
||||
AddFileData *afd)
|
||||
{
|
||||
GUnixFDList *fd_list;
|
||||
GVariantBuilder fds, options;
|
||||
int i;
|
||||
char *key;
|
||||
|
||||
g_variant_builder_init (&fds, G_VARIANT_TYPE ("ah"));
|
||||
fd_list = g_unix_fd_list_new ();
|
||||
|
||||
for (i = 0; afd->files[afd->start + i]; i++)
|
||||
{
|
||||
int fd;
|
||||
int fd_in;
|
||||
GError *error = NULL;
|
||||
|
||||
if (i == 16)
|
||||
break;
|
||||
|
||||
fd = open (afd->files[afd->start + i], O_PATH | O_CLOEXEC);
|
||||
if (fd == -1)
|
||||
{
|
||||
g_task_return_new_error (afd->task, G_IO_ERROR, g_io_error_from_errno (errno),
|
||||
"Failed to open %s", afd->files[afd->start + i]);
|
||||
free_add_file_data (afd);
|
||||
g_object_unref (fd_list);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef HAVE_O_CLOEXEC
|
||||
fcntl (fd, F_SETFD, FD_CLOEXEC);
|
||||
#endif
|
||||
fd_in = g_unix_fd_list_append (fd_list, fd, &error);
|
||||
close (fd);
|
||||
|
||||
if (fd_in == -1)
|
||||
{
|
||||
g_task_return_error (afd->task, error);
|
||||
free_add_file_data (afd);
|
||||
g_object_unref (fd_list);
|
||||
return;
|
||||
}
|
||||
|
||||
g_variant_builder_add (&fds, "h", fd_in);
|
||||
}
|
||||
|
||||
afd->start += 16;
|
||||
|
||||
key = (char *)g_object_get_data (G_OBJECT (afd->task), "key");
|
||||
|
||||
g_variant_builder_init (&options, G_VARIANT_TYPE_VARDICT);
|
||||
g_dbus_proxy_call_with_unix_fd_list (proxy,
|
||||
"AddFiles",
|
||||
g_variant_new ("(saha{sv})", key, &fds, &options),
|
||||
0, -1,
|
||||
fd_list,
|
||||
NULL,
|
||||
add_files_done, afd);
|
||||
|
||||
g_object_unref (fd_list);
|
||||
}
|
||||
|
||||
static void
|
||||
start_session_done (GObject *object,
|
||||
GAsyncResult *result,
|
||||
gpointer data)
|
||||
{
|
||||
GDBusProxy *proxy = G_DBUS_PROXY (object);
|
||||
AddFileData *afd = data;
|
||||
GError *error = NULL;
|
||||
GVariant *ret;
|
||||
const char *key;
|
||||
|
||||
ret = g_dbus_proxy_call_finish (proxy, result, &error);
|
||||
if (ret == NULL)
|
||||
{
|
||||
g_task_return_error (afd->task, error);
|
||||
free_add_file_data (afd);
|
||||
return;
|
||||
}
|
||||
|
||||
g_variant_get (ret, "(&s)", &key);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (afd->task), "key", g_strdup (key), g_free);
|
||||
|
||||
g_variant_unref (ret);
|
||||
|
||||
add_files (proxy, afd);
|
||||
}
|
||||
|
||||
void
|
||||
file_transfer_portal_register_files (const char **files,
|
||||
gboolean writable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
GTask *task;
|
||||
AddFileData *afd;
|
||||
GVariantBuilder options;
|
||||
|
||||
task = g_task_new (NULL, NULL, callback, data);
|
||||
|
||||
if (file_transfer_proxy == NULL)
|
||||
{
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"No portal found");
|
||||
g_object_unref (task);
|
||||
return;
|
||||
}
|
||||
|
||||
afd = g_new (AddFileData, 1);
|
||||
afd->task = task;
|
||||
afd->files = g_strdupv ((char **)files);
|
||||
afd->len = g_strv_length (afd->files);
|
||||
afd->start = 0;
|
||||
|
||||
g_variant_builder_init (&options, G_VARIANT_TYPE_VARDICT);
|
||||
g_variant_builder_add (&options, "{sv}", "writable", g_variant_new_boolean (writable));
|
||||
g_variant_builder_add (&options, "{sv}", "autostop", g_variant_new_boolean (TRUE));
|
||||
|
||||
g_dbus_proxy_call (file_transfer_proxy, "StartTransfer",
|
||||
g_variant_new ("(a{sv})", &options),
|
||||
0, -1, NULL, start_session_done, afd);
|
||||
}
|
||||
|
||||
gboolean
|
||||
file_transfer_portal_register_files_finish (GAsyncResult *result,
|
||||
char **key,
|
||||
GError **error)
|
||||
{
|
||||
if (g_task_propagate_boolean (G_TASK (result), error))
|
||||
{
|
||||
*key = g_strdup (g_object_get_data (G_OBJECT (result), "key"));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
char *
|
||||
file_transfer_portal_register_files_sync (const char **files,
|
||||
gboolean writable,
|
||||
GError **error)
|
||||
{
|
||||
const char *value;
|
||||
char *key;
|
||||
GUnixFDList *fd_list;
|
||||
GVariantBuilder fds, options;
|
||||
int i;
|
||||
GVariant *ret;
|
||||
|
||||
g_variant_builder_init (&options, G_VARIANT_TYPE_VARDICT);
|
||||
ret = g_dbus_proxy_call_sync (file_transfer_proxy,
|
||||
"StartTransfer",
|
||||
g_variant_new ("(a{sv})", &options),
|
||||
0,
|
||||
-1,
|
||||
NULL,
|
||||
error);
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
|
||||
g_variant_get (ret, "(&s)", &value);
|
||||
key = g_strdup (value);
|
||||
g_variant_unref (ret);
|
||||
|
||||
fd_list = NULL;
|
||||
|
||||
for (i = 0; files[i]; i++)
|
||||
{
|
||||
int fd;
|
||||
int fd_in;
|
||||
|
||||
if (fd_list == NULL)
|
||||
{
|
||||
g_variant_builder_init (&fds, G_VARIANT_TYPE ("ah"));
|
||||
fd_list = g_unix_fd_list_new ();
|
||||
}
|
||||
|
||||
fd = open (files[i], O_PATH | O_CLOEXEC);
|
||||
if (fd == -1)
|
||||
{
|
||||
g_set_error (error,
|
||||
G_IO_ERROR, g_io_error_from_errno (errno),
|
||||
"Failed to open %s", files[i]);
|
||||
g_variant_builder_clear (&fds);
|
||||
g_object_unref (fd_list);
|
||||
g_free (key);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef HAVE_O_CLOEXEC
|
||||
fcntl (fd, F_SETFD, FD_CLOEXEC);
|
||||
#endif
|
||||
fd_in = g_unix_fd_list_append (fd_list, fd, error);
|
||||
close (fd);
|
||||
|
||||
if (fd_in == -1)
|
||||
{
|
||||
g_variant_builder_clear (&fds);
|
||||
g_object_unref (fd_list);
|
||||
g_free (key);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_variant_builder_add (&fds, "h", fd_in);
|
||||
|
||||
if ((i + 1) % 16 == 0 || files[i + 1] == NULL)
|
||||
{
|
||||
g_variant_builder_init (&options, G_VARIANT_TYPE_VARDICT);
|
||||
ret = g_dbus_proxy_call_with_unix_fd_list_sync (file_transfer_proxy,
|
||||
"AddFiles",
|
||||
g_variant_new ("(saha{sv})",
|
||||
key,
|
||||
&fds,
|
||||
&options),
|
||||
0,
|
||||
-1,
|
||||
fd_list,
|
||||
NULL,
|
||||
NULL,
|
||||
error);
|
||||
g_clear_object (&fd_list);
|
||||
|
||||
if (ret == NULL)
|
||||
{
|
||||
g_free (key);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_variant_unref (ret);
|
||||
}
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
static void
|
||||
retrieve_files_done (GObject *object,
|
||||
GAsyncResult *result,
|
||||
gpointer data)
|
||||
{
|
||||
GDBusProxy *proxy = G_DBUS_PROXY (object);
|
||||
GTask *task = data;
|
||||
GError *error = NULL;
|
||||
GVariant *ret;
|
||||
char **files;
|
||||
|
||||
ret = g_dbus_proxy_call_finish (proxy, result, &error);
|
||||
if (ret == NULL)
|
||||
{
|
||||
g_task_return_error (task, error);
|
||||
g_object_unref (task);
|
||||
return;
|
||||
}
|
||||
|
||||
g_variant_get (ret, "(^a&s)", &files);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (task), "files", g_strdupv (files), (GDestroyNotify)g_strfreev);
|
||||
|
||||
g_variant_unref (ret);
|
||||
|
||||
g_task_return_boolean (task, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
file_transfer_portal_retrieve_files (const char *key,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data)
|
||||
{
|
||||
GTask *task;
|
||||
GVariantBuilder options;
|
||||
|
||||
task = g_task_new (NULL, NULL, callback, data);
|
||||
|
||||
if (file_transfer_proxy == NULL)
|
||||
{
|
||||
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"No portal found");
|
||||
g_object_unref (task);
|
||||
return;
|
||||
}
|
||||
|
||||
g_variant_builder_init (&options, G_VARIANT_TYPE_VARDICT);
|
||||
g_dbus_proxy_call (file_transfer_proxy,
|
||||
"RetrieveFiles",
|
||||
g_variant_new ("(sa{sv})", key, &options),
|
||||
0, -1, NULL,
|
||||
retrieve_files_done, task);
|
||||
}
|
||||
|
||||
gboolean
|
||||
file_transfer_portal_retrieve_files_finish (GAsyncResult *result,
|
||||
char ***files,
|
||||
GError **error)
|
||||
{
|
||||
if (g_task_propagate_boolean (G_TASK (result), error))
|
||||
{
|
||||
*files = g_strdupv (g_object_get_data (G_OBJECT (result), "files"));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
char **
|
||||
file_transfer_portal_retrieve_files_sync (const char *key,
|
||||
GError **error)
|
||||
{
|
||||
GVariantBuilder options;
|
||||
GVariant *ret;
|
||||
char **files = NULL;
|
||||
|
||||
g_variant_builder_init (&options, G_VARIANT_TYPE_VARDICT);
|
||||
ret = g_dbus_proxy_call_sync (file_transfer_proxy,
|
||||
"RetrieveFiles",
|
||||
g_variant_new ("(sa{sv})", key, &options),
|
||||
0, -1, NULL,
|
||||
error);
|
||||
if (ret)
|
||||
{
|
||||
const char **value;
|
||||
g_variant_get (ret, "(^a&s)", &value);
|
||||
files = g_strdupv ((char **)value);
|
||||
g_variant_unref (ret);
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
static void
|
||||
connection_closed (GDBusConnection *connection,
|
||||
gboolean remote_peer_vanished,
|
||||
GError *error)
|
||||
{
|
||||
g_clear_object (&file_transfer_proxy);
|
||||
}
|
||||
|
||||
static void
|
||||
finish_registration (void)
|
||||
{
|
||||
/* Free the singleton when the connection closes, important for test */
|
||||
g_signal_connect (g_dbus_proxy_get_connection (G_DBUS_PROXY (file_transfer_proxy)),
|
||||
"closed", G_CALLBACK (connection_closed), NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
proxy_has_owner (GDBusProxy *proxy)
|
||||
{
|
||||
char *owner;
|
||||
|
||||
owner = g_dbus_proxy_get_name_owner (proxy);
|
||||
if (owner)
|
||||
{
|
||||
g_free (owner);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
file_transfer_portal_register (void)
|
||||
{
|
||||
static gboolean called;
|
||||
|
||||
if (!called)
|
||||
{
|
||||
called = TRUE;
|
||||
|
||||
file_transfer_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES
|
||||
| G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS
|
||||
| G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
||||
NULL,
|
||||
"org.freedesktop.portal.Documents",
|
||||
"/org/freedesktop/portal/documents",
|
||||
"org.freedesktop.portal.FileTransfer",
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
if (file_transfer_proxy && !proxy_has_owner (file_transfer_proxy))
|
||||
g_clear_object (&file_transfer_proxy);
|
||||
|
||||
if (file_transfer_proxy)
|
||||
finish_registration ();
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
file_transfer_portal_supported (void)
|
||||
{
|
||||
file_transfer_portal_register ();
|
||||
|
||||
return file_transfer_proxy != NULL;
|
||||
}
|
||||
|
||||
#endif /* G_OS_UNIX */
|
49
gtk/filetransferportalprivate.h
Normal file
49
gtk/filetransferportalprivate.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Matthias Clasen
|
||||
*
|
||||
* 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 __FILE_TRANSFER_PROTOCOL_H__
|
||||
#define __FILE_TRANSFER_PROTOCOL_H__
|
||||
|
||||
|
||||
void file_transfer_portal_register (void);
|
||||
|
||||
void file_transfer_portal_register_files (const char **files,
|
||||
gboolean writable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data);
|
||||
gboolean file_transfer_portal_register_files_finish (GAsyncResult *result,
|
||||
char **key,
|
||||
GError **error);
|
||||
|
||||
void file_transfer_portal_retrieve_files (const char *key,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer data);
|
||||
gboolean file_transfer_portal_retrieve_files_finish (GAsyncResult *result,
|
||||
char ***files,
|
||||
GError **error);
|
||||
|
||||
|
||||
char * file_transfer_portal_register_files_sync (const char **files,
|
||||
gboolean writable,
|
||||
GError **error);
|
||||
|
||||
char ** file_transfer_portal_retrieve_files_sync (const char *key,
|
||||
GError **error);
|
||||
|
||||
gboolean file_transfer_portal_supported (void);
|
||||
|
||||
#endif
|
@ -376,18 +376,6 @@ static void
|
||||
gtk_application_after_emit (GApplication *application,
|
||||
GVariant *platform_data)
|
||||
{
|
||||
const char *startup_notification_id = NULL;
|
||||
|
||||
g_variant_lookup (platform_data, "desktop-startup-id", "&s", &startup_notification_id);
|
||||
if (startup_notification_id)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
|
||||
display = gdk_display_get_default ();
|
||||
if (display)
|
||||
gdk_display_notify_startup_complete (display, startup_notification_id);
|
||||
}
|
||||
|
||||
gdk_threads_leave ();
|
||||
}
|
||||
|
||||
|
@ -466,9 +466,12 @@ gtk_css_animated_style_new_advance (GtkCssAnimatedStyle *source,
|
||||
gtk_internal_return_val_if_fail (GTK_IS_CSS_ANIMATED_STYLE (source), NULL);
|
||||
gtk_internal_return_val_if_fail (GTK_IS_CSS_STYLE (base), NULL);
|
||||
|
||||
if (timestamp == 0 || timestamp == source->current_time)
|
||||
if (timestamp == 0)
|
||||
return g_object_ref (source->style);
|
||||
|
||||
if (timestamp == source->current_time)
|
||||
return g_object_ref (GTK_CSS_STYLE (source));
|
||||
|
||||
gtk_internal_return_val_if_fail (timestamp > source->current_time, NULL);
|
||||
|
||||
animations = NULL;
|
||||
|
@ -610,6 +610,10 @@ filechooser_win32_thread (gpointer _data)
|
||||
if (FAILED (hr))
|
||||
g_warning_hr ("Can't set file types", hr);
|
||||
|
||||
hr = IFileDialog_SetDefaultExtension (pfd, L"");
|
||||
if (FAILED (hr))
|
||||
g_warning_hr ("Can't set default extension", hr);
|
||||
|
||||
if (data->self->current_filter)
|
||||
{
|
||||
GSList *filters = gtk_file_chooser_list_filters (GTK_FILE_CHOOSER (data->self));
|
||||
|
@ -484,11 +484,12 @@ ensure_surface_for_gicon (GtkIconHelper *self,
|
||||
if (destination == NULL)
|
||||
{
|
||||
GError *error = NULL;
|
||||
destination = gtk_icon_theme_load_icon (icon_theme,
|
||||
"image-missing",
|
||||
width,
|
||||
flags | GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
||||
&error);
|
||||
destination = gtk_icon_theme_load_icon_for_scale (icon_theme,
|
||||
"image-missing",
|
||||
MIN (width, height),
|
||||
scale,
|
||||
flags | GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_GENERIC_FALLBACK,
|
||||
&error);
|
||||
/* We include this image as resource, so we always have it available or
|
||||
* the icontheme code is broken */
|
||||
g_assert_no_error (error);
|
||||
|
@ -253,6 +253,8 @@ init_compose_table_thread_cb (GTask *task,
|
||||
return;
|
||||
|
||||
gtk_im_context_simple_init_compose_table ();
|
||||
|
||||
g_task_return_boolean (task, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1454,10 +1454,34 @@ gboolean
|
||||
gtk_list_store_iter_is_valid (GtkListStore *list_store,
|
||||
GtkTreeIter *iter)
|
||||
{
|
||||
GtkListStorePrivate *priv;
|
||||
GSequenceIter *seq_iter;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_LIST_STORE (list_store), FALSE);
|
||||
g_return_val_if_fail (iter != NULL, FALSE);
|
||||
|
||||
return iter_is_valid (iter, list_store);
|
||||
/* can't use iter_is_valid() here, because iter might point
|
||||
* to random memory.
|
||||
*
|
||||
* We MUST NOT dereference it.
|
||||
*/
|
||||
|
||||
priv = list_store->priv;
|
||||
|
||||
if (iter == NULL ||
|
||||
iter->user_data == NULL ||
|
||||
priv->stamp != iter->stamp)
|
||||
return FALSE;
|
||||
|
||||
for (seq_iter = g_sequence_get_begin_iter (priv->seq);
|
||||
!g_sequence_iter_is_end (seq_iter);
|
||||
seq_iter = g_sequence_iter_next (seq_iter))
|
||||
{
|
||||
if (seq_iter == iter->user_data)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean real_gtk_list_store_row_draggable (GtkTreeDragSource *drag_source,
|
||||
|
@ -2711,6 +2711,9 @@ gtk_range_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
|
||||
priv->mouse_y = y;
|
||||
|
||||
gtk_range_update_mouse_location (range);
|
||||
if (!priv->mouse_location)
|
||||
return;
|
||||
|
||||
gtk_css_gadget_get_margin_box (priv->slider_gadget, &slider_alloc);
|
||||
|
||||
g_object_get (gtk_widget_get_settings (widget),
|
||||
|
@ -100,8 +100,11 @@ finalize (GObject *object)
|
||||
g_clear_object (&engine->search_query);
|
||||
g_clear_object (&engine->search_location_query);
|
||||
g_clear_object (&engine->file_check_query);
|
||||
tracker_sparql_connection_close (engine->sparql_conn);
|
||||
g_clear_object (&engine->sparql_conn);
|
||||
if (engine->sparql_conn != NULL)
|
||||
{
|
||||
tracker_sparql_connection_close (engine->sparql_conn);
|
||||
g_clear_object (&engine->sparql_conn);
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (gtk_search_engine_tracker3_parent_class)->finalize (object);
|
||||
}
|
||||
@ -391,8 +394,8 @@ gtk_search_engine_tracker3_new (void)
|
||||
NULL, &error, NULL);
|
||||
if (!engine)
|
||||
{
|
||||
g_critical ("Could not init tracker3 search engine: %s",
|
||||
error->message);
|
||||
g_warning ("Could not init tracker3 search engine: %s",
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
|
@ -116,6 +116,10 @@
|
||||
#include "broadway/gdkbroadway.h"
|
||||
#endif
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#include "filetransferportalprivate.h"
|
||||
#endif
|
||||
|
||||
#undef DEBUG_SELECTION
|
||||
|
||||
/* Maximum size of a sent chunk, in bytes. Also the default size of
|
||||
@ -338,6 +342,7 @@ static GdkAtom text_plain_atom;
|
||||
static GdkAtom text_plain_utf8_atom;
|
||||
static GdkAtom text_plain_locale_atom;
|
||||
static GdkAtom text_uri_list_atom;
|
||||
static GdkAtom portal_files_atom;
|
||||
|
||||
static void
|
||||
init_atoms (void)
|
||||
@ -358,6 +363,7 @@ init_atoms (void)
|
||||
g_free (tmp);
|
||||
|
||||
text_uri_list_atom = gdk_atom_intern_static_string ("text/uri-list");
|
||||
portal_files_atom = gdk_atom_intern_static_string ("application/vnd.portal.files");
|
||||
}
|
||||
}
|
||||
|
||||
@ -502,6 +508,10 @@ gtk_target_list_add_image_targets (GtkTargetList *list,
|
||||
* Appends the URI targets supported by #GtkSelectionData to
|
||||
* the target list. All targets are added with the same @info.
|
||||
*
|
||||
* Since 3.24.37, this includes the application/vnd.portal.files
|
||||
* target when possible, to allow sending files between sandboxed
|
||||
* apps via the FileTransfer portal.
|
||||
*
|
||||
* Since: 2.6
|
||||
**/
|
||||
void
|
||||
@ -512,7 +522,12 @@ gtk_target_list_add_uri_targets (GtkTargetList *list,
|
||||
|
||||
init_atoms ();
|
||||
|
||||
gtk_target_list_add (list, text_uri_list_atom, 0, info);
|
||||
gtk_target_list_add (list, text_uri_list_atom, 0, info);
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
if (file_transfer_portal_supported ())
|
||||
gtk_target_list_add (list, portal_files_atom, 0, info);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1835,6 +1850,9 @@ gtk_selection_data_get_pixbuf (const GtkSelectionData *selection_data)
|
||||
* Sets the contents of the selection from a list of URIs.
|
||||
* The string is converted to the form determined by
|
||||
* @selection_data->target.
|
||||
*
|
||||
* Since 3.24.37, this may involve using the FileTransfer
|
||||
* portal to send files between sandboxed apps.
|
||||
*
|
||||
* Returns: %TRUE if the selection was successfully set,
|
||||
* otherwise %FALSE.
|
||||
@ -1880,6 +1898,57 @@ gtk_selection_data_set_uris (GtkSelectionData *selection_data,
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#ifndef G_OS_WIN32
|
||||
else if (selection_data->target == portal_files_atom &&
|
||||
file_transfer_portal_supported ())
|
||||
{
|
||||
GPtrArray *a;
|
||||
char **files;
|
||||
char *key;
|
||||
GError *error = NULL;
|
||||
|
||||
a = g_ptr_array_new ();
|
||||
|
||||
for (int i = 0; uris[i]; i++)
|
||||
{
|
||||
GFile *file;
|
||||
char *path;
|
||||
|
||||
file = g_file_new_for_uri (uris[i]);
|
||||
path = g_file_get_path (file);
|
||||
g_object_unref (file);
|
||||
|
||||
if (path == NULL)
|
||||
{
|
||||
g_ptr_array_unref (a);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_ptr_array_add (a, path);
|
||||
}
|
||||
|
||||
g_ptr_array_add (a, NULL);
|
||||
files = (char **) g_ptr_array_free (a, FALSE);
|
||||
|
||||
key = file_transfer_portal_register_files_sync ((const char **)files, TRUE, &error);
|
||||
if (key == NULL)
|
||||
{
|
||||
g_strfreev (files);
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gtk_selection_data_set (selection_data,
|
||||
portal_files_atom,
|
||||
8, (guchar *)key, strlen (key));
|
||||
|
||||
g_strfreev (files);
|
||||
g_free (key);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -1890,6 +1959,9 @@ gtk_selection_data_set_uris (GtkSelectionData *selection_data,
|
||||
*
|
||||
* Gets the contents of the selection data as array of URIs.
|
||||
*
|
||||
* Since 3.24.37, this may involve using the FileTransfer
|
||||
* portal to send files between sandboxed apps.
|
||||
*
|
||||
* Returns: (array zero-terminated=1) (element-type utf8) (transfer full): if
|
||||
* the selection data contains a list of
|
||||
* URIs, a newly allocated %NULL-terminated string array
|
||||
@ -1922,6 +1994,40 @@ gtk_selection_data_get_uris (const GtkSelectionData *selection_data)
|
||||
|
||||
g_strfreev (list);
|
||||
}
|
||||
#ifndef G_OS_WIN32
|
||||
else if (selection_data->length >= 0 &&
|
||||
selection_data->type == portal_files_atom &&
|
||||
file_transfer_portal_supported ())
|
||||
{
|
||||
char *key;
|
||||
GError *error = NULL;
|
||||
char **files;
|
||||
|
||||
key = g_strndup ((char *) selection_data->data, selection_data->length);
|
||||
files = file_transfer_portal_retrieve_files_sync (key, &error);
|
||||
if (error)
|
||||
{
|
||||
g_warning ("%s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
g_free (key);
|
||||
|
||||
if (files)
|
||||
{
|
||||
GPtrArray *uris = g_ptr_array_new ();
|
||||
|
||||
for (int i = 0; files[i]; i++)
|
||||
{
|
||||
GFile *file = g_file_new_for_path (files[i]);
|
||||
g_ptr_array_add (uris, g_file_get_uri (file));
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
g_ptr_array_add (uris, NULL);
|
||||
result = (char **) g_ptr_array_free (uris, FALSE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -2246,7 +2352,8 @@ gtk_targets_include_uri (GdkAtom *targets,
|
||||
|
||||
for (i = 0; i < n_targets; i++)
|
||||
{
|
||||
if (targets[i] == text_uri_list_atom)
|
||||
if (targets[i] == text_uri_list_atom ||
|
||||
targets[i] == portal_files_atom)
|
||||
{
|
||||
result = TRUE;
|
||||
break;
|
||||
|
@ -266,6 +266,8 @@ struct _GtkWindowPrivate
|
||||
|
||||
guint use_subsurface : 1;
|
||||
|
||||
guint in_present : 1;
|
||||
|
||||
GdkWindowTypeHint type_hint;
|
||||
|
||||
GtkGesture *multipress_gesture;
|
||||
@ -2563,15 +2565,12 @@ gtk_window_set_startup_id (GtkWindow *window,
|
||||
*/
|
||||
if (startup_id_is_fake (priv->startup_id))
|
||||
gtk_window_present_with_time (window, timestamp);
|
||||
else
|
||||
else
|
||||
{
|
||||
gdk_window_set_startup_id (gdk_window,
|
||||
priv->startup_id);
|
||||
|
||||
/* If window is mapped, terminate the startup-notification too */
|
||||
/* If window is mapped, terminate the startup-notification */
|
||||
if (_gtk_widget_get_mapped (widget) &&
|
||||
!disable_startup_notification)
|
||||
gdk_notify_startup_complete_with_id (priv->startup_id);
|
||||
gdk_window_set_startup_id (gdk_window, priv->startup_id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -6279,6 +6278,36 @@ popover_map (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_window_notify_startup (GtkWindow *window)
|
||||
{
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
|
||||
if (!disable_startup_notification &&
|
||||
!GTK_IS_OFFSCREEN_WINDOW (window) &&
|
||||
priv->type != GTK_WINDOW_POPUP)
|
||||
{
|
||||
GdkWindow *gdk_window;
|
||||
|
||||
gdk_window = _gtk_widget_get_window (GTK_WIDGET (window));
|
||||
|
||||
/* Do we have a custom startup-notification id? */
|
||||
if (priv->startup_id != NULL)
|
||||
{
|
||||
/* Make sure we have a "real" id */
|
||||
if (!startup_id_is_fake (priv->startup_id))
|
||||
gdk_window_set_startup_id (gdk_window, priv->startup_id);
|
||||
|
||||
g_free (priv->startup_id);
|
||||
priv->startup_id = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_set_startup_id (gdk_window, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_window_map (GtkWidget *widget)
|
||||
{
|
||||
@ -6354,25 +6383,8 @@ gtk_window_map (GtkWidget *widget)
|
||||
|
||||
gdk_window_show (gdk_window);
|
||||
|
||||
if (!disable_startup_notification &&
|
||||
!GTK_IS_OFFSCREEN_WINDOW (window) &&
|
||||
priv->type != GTK_WINDOW_POPUP)
|
||||
{
|
||||
/* Do we have a custom startup-notification id? */
|
||||
if (priv->startup_id != NULL)
|
||||
{
|
||||
/* Make sure we have a "real" id */
|
||||
if (!startup_id_is_fake (priv->startup_id))
|
||||
gdk_notify_startup_complete_with_id (priv->startup_id);
|
||||
|
||||
g_free (priv->startup_id);
|
||||
priv->startup_id = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_notify_startup_complete ();
|
||||
}
|
||||
}
|
||||
if (!priv->in_present)
|
||||
gtk_window_notify_startup (window);
|
||||
|
||||
/* if mnemonics visible is not already set
|
||||
* (as in the case of popup menus), then hide mnemonics initially
|
||||
@ -7614,8 +7626,6 @@ gtk_window_realize (GtkWidget *widget)
|
||||
gdk_x11_window_set_user_time (gdk_window, timestamp);
|
||||
}
|
||||
#endif
|
||||
if (!startup_id_is_fake (priv->startup_id))
|
||||
gdk_window_set_startup_id (gdk_window, priv->startup_id);
|
||||
}
|
||||
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
@ -10597,8 +10607,12 @@ gtk_window_present_with_time (GtkWindow *window,
|
||||
else
|
||||
{
|
||||
priv->initial_timestamp = timestamp;
|
||||
priv->in_present = TRUE;
|
||||
gtk_widget_show (widget);
|
||||
priv->in_present = FALSE;
|
||||
}
|
||||
|
||||
gtk_window_notify_startup (window);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -659,6 +659,10 @@ if os_unix and tracker3_enabled
|
||||
gtk_unix_sources += 'gtksearchenginetracker3.c'
|
||||
endif
|
||||
|
||||
if os_unix
|
||||
gtk_unix_sources += 'filetransferportal.c'
|
||||
endif
|
||||
|
||||
if os_unix
|
||||
gtk_sources += gtk_unix_sources
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
project('gtk+', 'c',
|
||||
version: '3.24.36',
|
||||
version: '3.24.37',
|
||||
default_options: [
|
||||
'buildtype=debugoptimized',
|
||||
'warning_level=1'
|
||||
@ -706,7 +706,6 @@ endif
|
||||
|
||||
proto_sources = [
|
||||
'text-input-unstable-v3',
|
||||
'gtk-text-input',
|
||||
]
|
||||
proto_sources_outputs = []
|
||||
|
||||
@ -760,7 +759,6 @@ immodules = [
|
||||
[ 'ime', files([ immodule_srcdir + 'gtkimcontextime.c', immodule_srcdir + 'imime.c' ]), win32_enabled ],
|
||||
[ 'quartz', files([ immodule_srcdir + 'imquartz.c' ]), quartz_enabled, [ '-xobjective-c' ] ],
|
||||
[ 'wayland', files([ immodule_srcdir + 'imwayland.c' ]) + proto_sources_outputs[0], wayland_enabled ],
|
||||
[ 'waylandgtk', files([ immodule_srcdir + 'imwaylandgtk.c']) + proto_sources_outputs[1], wayland_enabled ],
|
||||
[ 'xim', files([ immodule_srcdir + 'gtkimcontextxim.c', immodule_srcdir + 'imxim.c' ]), x11_enabled ],
|
||||
]
|
||||
|
||||
@ -849,7 +847,7 @@ endif
|
||||
|
||||
# Introspection
|
||||
gir = find_program('g-ir-scanner', required : get_option('introspection'))
|
||||
build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection'))
|
||||
build_gir = gir.found() and get_option('introspection')
|
||||
|
||||
subdir('gdk')
|
||||
subdir('gtk')
|
||||
|
@ -1,302 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<protocol name="gtk_text_input">
|
||||
<copyright>
|
||||
Copyright © 2012, 2013 Intel Corporation
|
||||
Copyright © 2015, 2016 Jan Arne Petersen
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this
|
||||
software and its documentation for any purpose is hereby granted
|
||||
without fee, provided that the above copyright notice appear in
|
||||
all copies and that both that copyright notice and this permission
|
||||
notice appear in supporting documentation, and that the name of
|
||||
the copyright holders not be used in advertising or publicity
|
||||
pertaining to distribution of the software without specific,
|
||||
written prior permission. The copyright holders make no
|
||||
representations about the suitability of this software for any
|
||||
purpose. It is provided "as is" without express or implied
|
||||
warranty.
|
||||
|
||||
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
||||
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||
THIS SOFTWARE.
|
||||
</copyright>
|
||||
|
||||
<interface name="gtk_text_input" version="1">
|
||||
<description summary="text input">
|
||||
The gtk_text_input interface represents text input and input methods
|
||||
associated with a seat. It provides enter/leave events to follow the
|
||||
text input focus for a seat.
|
||||
|
||||
Requests are used to enable/disable the text-input object and set
|
||||
state information like surrounding and selected text or the content type.
|
||||
The information about the entered text is sent to the text-input object
|
||||
via the pre-edit and commit_string events. Using this interface removes
|
||||
the need for applications to directly process hardware key events and
|
||||
compose text out of them.
|
||||
|
||||
Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices
|
||||
have to always point to the first byte of an UTF-8 encoded code point.
|
||||
Lengths are not allowed to contain just a part of an UTF-8 encoded code
|
||||
point.
|
||||
|
||||
Focus moving throughout surfaces will result in the emission of
|
||||
gtk_text_input.enter and gtk_text_input.leave events. The focused
|
||||
surface must perform gtk_text_input.enable and
|
||||
gtk_text_input.disable requests as the keyboard focus moves across
|
||||
editable and non-editable elements of the UI. Those two requests are not
|
||||
expected to be paired with each other, the compositor must be able to
|
||||
handle consecutive series of the same request.
|
||||
|
||||
State is sent by the state requests (set_surrounding_text,
|
||||
set_content_type and set_cursor_rectangle) and a commit request.
|
||||
After an enter event or disable request all state information is
|
||||
invalidated and needs to be resent by the client.
|
||||
|
||||
This protocol defines requests and events necessary for regular clients
|
||||
to communicate with an input method. The gtk_input_method protocol
|
||||
defines the interfaces necessary to implement standalone input methods.
|
||||
If a compositor implements both interfaces, it will be the arbiter of the
|
||||
communication between both.
|
||||
|
||||
Warning! The protocol described in this file is experimental and
|
||||
backward incompatible changes may be made. Backward compatible changes
|
||||
may be added together with the corresponding interface version bump.
|
||||
Backward incompatible changes are done by bumping the version number in
|
||||
the protocol and interface names and resetting the interface version.
|
||||
Once the protocol is to be declared stable, the 'z' prefix and the
|
||||
version number in the protocol and interface names are removed and the
|
||||
interface version number is reset.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="Destroy the wp_text_input">
|
||||
Destroy the wp_text_input object. Also disables all surfaces enabled
|
||||
through this wp_text_input object
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<enum name="enable_flags" bitfield="true">
|
||||
<description summary="enable flags">
|
||||
Content hint is a bitmask to allow to modify the behavior of the text
|
||||
input.
|
||||
</description>
|
||||
<entry name="none" value="0x0" summary="no special behaviour"/>
|
||||
<entry name="can_show_preedit" value="0x1" summary="hints that the UI is capable of showing pre-edit text"/>
|
||||
<entry name="toggle_input_panel" value="0x2" summary="requests toggling input panel (eg. on-screen keyboard)"/>
|
||||
</enum>
|
||||
|
||||
<request name="enable">
|
||||
<description summary="Request text input to be enabled">
|
||||
Requests text input on a surface. The serial provided must be the one
|
||||
received on gtk_text_input.enter.
|
||||
</description>
|
||||
<arg name="serial" type="uint" summary="serial of enter event"/>
|
||||
<arg name="show_input_panel" type="uint" summary="details of the enable request"/>
|
||||
</request>
|
||||
|
||||
<request name="disable">
|
||||
<description summary="Disable text input on a surface">
|
||||
Explicitly disable text input in a surface (typically when there is no
|
||||
focus on any text entry inside the surface).
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="set_surrounding_text">
|
||||
<description summary="sets the surrounding text">
|
||||
Sets the plain surrounding text around the input position. Text is
|
||||
UTF-8 encoded. Cursor is the byte offset within the surrounding text.
|
||||
Anchor is the byte offset of the selection anchor within the
|
||||
surrounding text. If there is no selected text, anchor is the same as
|
||||
cursor.
|
||||
|
||||
Make sure to always send some text before and after the cursor
|
||||
except when the cursor is at the beginning or end of text.
|
||||
|
||||
When there was a configure_surrounding_text event take the
|
||||
before_cursor and after_cursor arguments into account for picking how
|
||||
much surrounding text to send.
|
||||
|
||||
There is a maximum length of wayland messages so text can not be
|
||||
longer than 4000 bytes.
|
||||
</description>
|
||||
<arg name="text" type="string"/>
|
||||
<arg name="cursor" type="int"/>
|
||||
<arg name="anchor" type="int"/>
|
||||
</request>
|
||||
|
||||
<enum name="content_hint" bitfield="true">
|
||||
<description summary="content hint">
|
||||
Content hint is a bitmask to allow to modify the behavior of the text
|
||||
input.
|
||||
</description>
|
||||
<entry name="none" value="0x0" summary="no special behaviour"/>
|
||||
<entry name="completion" value="0x1" summary="suggest word completions"/>
|
||||
<entry name="spellcheck" value="0x2" summary="suggest word corrections"/>
|
||||
<entry name="auto_capitalization" value="0x4" summary="switch to uppercase letters at the start of a sentence"/>
|
||||
<entry name="lowercase" value="0x8" summary="prefer lowercase letters"/>
|
||||
<entry name="uppercase" value="0x10" summary="prefer uppercase letters"/>
|
||||
<entry name="titlecase" value="0x20" summary="prefer casing for titles and headings (can be language dependent)"/>
|
||||
<entry name="hidden_text" value="0x40" summary="characters should be hidden"/>
|
||||
<entry name="sensitive_data" value="0x80" summary="typed text should not be stored"/>
|
||||
<entry name="latin" value="0x100" summary="just latin characters should be entered"/>
|
||||
<entry name="multiline" value="0x200" summary="the text input is multiline"/>
|
||||
</enum>
|
||||
|
||||
<enum name="content_purpose">
|
||||
<description summary="content purpose">
|
||||
The content purpose allows to specify the primary purpose of a text
|
||||
input.
|
||||
|
||||
This allows an input method to show special purpose input panels with
|
||||
extra characters or to disallow some characters.
|
||||
</description>
|
||||
<entry name="normal" value="0" summary="default input, allowing all characters"/>
|
||||
<entry name="alpha" value="1" summary="allow only alphabetic characters"/>
|
||||
<entry name="digits" value="2" summary="allow only digits"/>
|
||||
<entry name="number" value="3" summary="input a number (including decimal separator and sign)"/>
|
||||
<entry name="phone" value="4" summary="input a phone number"/>
|
||||
<entry name="url" value="5" summary="input an URL"/>
|
||||
<entry name="email" value="6" summary="input an email address"/>
|
||||
<entry name="name" value="7" summary="input a name of a person"/>
|
||||
<entry name="password" value="8" summary="input a password (combine with password or sensitive_data hint)"/>
|
||||
<entry name="pin" value="9" summary="input is a numeric password (combine with password or sensitive_data hint)"/>
|
||||
<entry name="date" value="10" summary="input a date"/>
|
||||
<entry name="time" value="11" summary="input a time"/>
|
||||
<entry name="datetime" value="12" summary="input a date and time"/>
|
||||
<entry name="terminal" value="13" summary="input for a terminal"/>
|
||||
</enum>
|
||||
|
||||
<request name="set_content_type">
|
||||
<description summary="set content purpose and hint">
|
||||
Sets the content purpose and content hint. While the purpose is the
|
||||
basic purpose of an input field, the hint flags allow to modify some
|
||||
of the behavior.
|
||||
|
||||
When no content type is explicitly set, a normal content purpose with
|
||||
none hint should be assumed.
|
||||
</description>
|
||||
<arg name="hint" type="uint" enum="content_hint"/>
|
||||
<arg name="purpose" type="uint" enum="content_purpose"/>
|
||||
</request>
|
||||
|
||||
<request name="set_cursor_rectangle">
|
||||
<description summary="set cursor position">
|
||||
Sets the cursor outline as a x, y, width, height rectangle in surface
|
||||
local coordinates.
|
||||
|
||||
Allows the compositor to put a window with word suggestions near the
|
||||
cursor.
|
||||
</description>
|
||||
<arg name="x" type="int"/>
|
||||
<arg name="y" type="int"/>
|
||||
<arg name="width" type="int"/>
|
||||
<arg name="height" type="int"/>
|
||||
</request>
|
||||
|
||||
<request name="commit">
|
||||
<description summary="commit state">
|
||||
Allows to atomically send state updates from client. The previous
|
||||
set_surrounding_text, set_content_type and set_cursor_rectangle
|
||||
become effective after this call.
|
||||
|
||||
Serial should be set to the serial from the last wp_text_input.enter
|
||||
event.
|
||||
|
||||
To make sure to not receive outdated input method events after a
|
||||
state update, wl_display_sync() should be called after making this
|
||||
request.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<event name="enter">
|
||||
<description summary="enter event">
|
||||
Notification that this seat's text-input focus is on a certain surface.
|
||||
|
||||
When the seat has the keyboard capability the text-input focus follows
|
||||
the keyboard focus.
|
||||
</description>
|
||||
<arg name="serial" type="uint" summary="serial"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
</event>
|
||||
|
||||
<event name="leave">
|
||||
<description summary="leave event">
|
||||
Notification that this seat's text-input focus is no longer on
|
||||
a certain surface. The client should reset any preedit string previously
|
||||
set.
|
||||
|
||||
The leave notification is sent before the enter notification
|
||||
for the new focus.
|
||||
|
||||
When the seat has the keyboard capability the text-input focus follows
|
||||
the keyboard focus.
|
||||
</description>
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface"/>
|
||||
</event>
|
||||
|
||||
<event name="preedit_string">
|
||||
<description summary="pre-edit">
|
||||
Notify when a new composing text (pre-edit) should be set around the
|
||||
current cursor position. Any previously set composing text should
|
||||
be removed.
|
||||
</description>
|
||||
<arg name="text" type="string" allow-null="true"/>
|
||||
<arg name="cursor" type="uint"/>
|
||||
</event>
|
||||
|
||||
<event name="commit_string">
|
||||
<description summary="text commit">
|
||||
Notify when text should be inserted into the editor widget. The text to
|
||||
commit could be either just a single character after a key press or the
|
||||
result of some composing (pre-edit).
|
||||
|
||||
The text argument could be also null if some text is removed (see
|
||||
gtk_text_input.delete_surrounding_text).
|
||||
|
||||
Any previously set composing text should be removed.
|
||||
</description>
|
||||
<arg name="text" type="string" allow-null="true"/>
|
||||
</event>
|
||||
|
||||
<event name="delete_surrounding_text">
|
||||
<description summary="delete surrounding text">
|
||||
Notify when the text around the current cursor position should be
|
||||
deleted. Before_length and after_length is the length (in bytes) of text
|
||||
before and after the current cursor position (excluding the selection)
|
||||
to delete.
|
||||
|
||||
This event should be handled as part of a following commit_string or
|
||||
preedit_string event.
|
||||
</description>
|
||||
<arg name="before_length" type="uint" summary="length of text before current cursor position"/>
|
||||
<arg name="after_length" type="uint" summary="length of text after current cursor position"/>
|
||||
</event>
|
||||
</interface>
|
||||
|
||||
<interface name="gtk_text_input_manager" version="1">
|
||||
<description summary="text input manager">
|
||||
A factory for text-input objects. This object is a global singleton.
|
||||
</description>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="Destroy the wp_text_input_manager">
|
||||
Destroy the wp_text_input_manager object.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_text_input">
|
||||
<description summary="create a new text input object">
|
||||
Creates a new text-input object for a given seat.
|
||||
</description>
|
||||
<arg name="id" type="new_id" interface="gtk_text_input"/>
|
||||
<arg name="seat" type="object" interface="wl_seat"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
@ -1,705 +0,0 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2017 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 <string.h>
|
||||
#include <wayland-client-protocol.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk/gtkintl.h"
|
||||
#include "gtk/gtkimmodule.h"
|
||||
|
||||
#include "gdk/wayland/gdkwayland.h"
|
||||
#include "gtk-text-input-client-protocol.h"
|
||||
|
||||
typedef struct _GtkIMContextWaylandGlobal GtkIMContextWaylandGlobal;
|
||||
typedef struct _GtkIMContextWayland GtkIMContextWayland;
|
||||
typedef struct _GtkIMContextWaylandClass GtkIMContextWaylandClass;
|
||||
|
||||
struct _GtkIMContextWaylandGlobal
|
||||
{
|
||||
struct wl_display *display;
|
||||
struct wl_registry *registry;
|
||||
uint32_t text_input_manager_wl_id;
|
||||
struct gtk_text_input_manager *text_input_manager;
|
||||
struct gtk_text_input *text_input;
|
||||
uint32_t enter_serial;
|
||||
|
||||
GtkIMContext *current;
|
||||
};
|
||||
|
||||
struct _GtkIMContextWaylandClass
|
||||
{
|
||||
GtkIMContextSimpleClass parent_class;
|
||||
};
|
||||
|
||||
struct _GtkIMContextWayland
|
||||
{
|
||||
GtkIMContextSimple parent_instance;
|
||||
GdkWindow *window;
|
||||
GtkWidget *widget;
|
||||
|
||||
GtkGesture *gesture;
|
||||
gdouble press_x;
|
||||
gdouble press_y;
|
||||
|
||||
struct {
|
||||
gchar *text;
|
||||
gint cursor_idx;
|
||||
} surrounding;
|
||||
|
||||
struct {
|
||||
gchar *text;
|
||||
gint cursor_idx;
|
||||
} preedit;
|
||||
|
||||
cairo_rectangle_int_t cursor_rect;
|
||||
guint use_preedit : 1;
|
||||
};
|
||||
|
||||
GType type_wayland = 0;
|
||||
static GObjectClass *parent_class;
|
||||
static GtkIMContextWaylandGlobal *global = NULL;
|
||||
|
||||
static const GtkIMContextInfo imwayland_info =
|
||||
{
|
||||
"waylandgtk", /* ID */
|
||||
NC_("input method menu", "Waylandgtk"), /* Human readable name */
|
||||
GETTEXT_PACKAGE, /* Translation domain */
|
||||
GTK_LOCALEDIR, /* Dir for bindtextdomain (not strictly needed for "gtk+") */
|
||||
"", /* Languages for which this module is the default */
|
||||
};
|
||||
|
||||
static const GtkIMContextInfo *info_list[] =
|
||||
{
|
||||
&imwayland_info,
|
||||
};
|
||||
|
||||
#define GTK_IM_CONTEXT_WAYLAND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), type_wayland, GtkIMContextWayland))
|
||||
|
||||
#ifndef INCLUDE_IM_wayland
|
||||
#define MODULE_ENTRY(type,function) G_MODULE_EXPORT type im_module_ ## function
|
||||
#else
|
||||
#define MODULE_ENTRY(type, function) type _gtk_immodule_wayland_ ## function
|
||||
#endif
|
||||
|
||||
static void
|
||||
reset_preedit (GtkIMContextWayland *context)
|
||||
{
|
||||
if (context->preedit.text == NULL)
|
||||
return;
|
||||
|
||||
g_clear_pointer (&context->preedit.text, g_free);
|
||||
context->preedit.cursor_idx = 0;
|
||||
g_signal_emit_by_name (context, "preedit-changed");
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_enter (void *data,
|
||||
struct gtk_text_input *text_input,
|
||||
uint32_t serial,
|
||||
struct wl_surface *surface)
|
||||
{
|
||||
GtkIMContextWaylandGlobal *global = data;
|
||||
|
||||
global->enter_serial = serial;
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_leave (void *data,
|
||||
struct gtk_text_input *text_input,
|
||||
uint32_t serial,
|
||||
struct wl_surface *surface)
|
||||
{
|
||||
GtkIMContextWayland *context;
|
||||
|
||||
if (!global->current)
|
||||
return;
|
||||
|
||||
context = GTK_IM_CONTEXT_WAYLAND (global->current);
|
||||
reset_preedit (context);
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_preedit (void *data,
|
||||
struct gtk_text_input *text_input,
|
||||
const char *text,
|
||||
guint cursor)
|
||||
{
|
||||
GtkIMContextWayland *context;
|
||||
gboolean state_change;
|
||||
|
||||
if (!global->current)
|
||||
return;
|
||||
|
||||
context = GTK_IM_CONTEXT_WAYLAND (global->current);
|
||||
if (!text && !context->preedit.text)
|
||||
return;
|
||||
|
||||
state_change = ((text == NULL) != (context->preedit.text == NULL));
|
||||
|
||||
if (state_change && !context->preedit.text)
|
||||
g_signal_emit_by_name (context, "preedit-start");
|
||||
|
||||
g_free (context->preedit.text);
|
||||
context->preedit.text = g_strdup (text);
|
||||
context->preedit.cursor_idx = cursor;
|
||||
|
||||
g_signal_emit_by_name (context, "preedit-changed");
|
||||
|
||||
if (state_change && !context->preedit.text)
|
||||
g_signal_emit_by_name (context, "preedit-end");
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_commit (void *data,
|
||||
struct gtk_text_input *text_input,
|
||||
const char *text)
|
||||
{
|
||||
GtkIMContextWaylandGlobal *global = data;
|
||||
|
||||
if (global->current && text)
|
||||
g_signal_emit_by_name (global->current, "commit", text);
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_delete_surrounding_text (void *data,
|
||||
struct gtk_text_input *text_input,
|
||||
uint32_t offset,
|
||||
uint32_t len)
|
||||
{
|
||||
GtkIMContextWaylandGlobal *global = data;
|
||||
|
||||
if (global->current)
|
||||
g_signal_emit_by_name (global->current, "delete-surrounding", offset, len);
|
||||
}
|
||||
|
||||
static const struct gtk_text_input_listener text_input_listener = {
|
||||
text_input_enter,
|
||||
text_input_leave,
|
||||
text_input_preedit,
|
||||
text_input_commit,
|
||||
text_input_delete_surrounding_text
|
||||
};
|
||||
|
||||
static void
|
||||
registry_handle_global (void *data,
|
||||
struct wl_registry *registry,
|
||||
uint32_t id,
|
||||
const char *interface,
|
||||
uint32_t version)
|
||||
{
|
||||
GtkIMContextWaylandGlobal *global = data;
|
||||
GdkSeat *seat = gdk_display_get_default_seat (gdk_display_get_default ());
|
||||
|
||||
if (strcmp (interface, "gtk_text_input_manager") == 0)
|
||||
{
|
||||
global->text_input_manager_wl_id = id;
|
||||
global->text_input_manager =
|
||||
wl_registry_bind (global->registry, global->text_input_manager_wl_id,
|
||||
>k_text_input_manager_interface, 1);
|
||||
global->text_input =
|
||||
gtk_text_input_manager_get_text_input (global->text_input_manager,
|
||||
gdk_wayland_seat_get_wl_seat (seat));
|
||||
gtk_text_input_add_listener (global->text_input,
|
||||
&text_input_listener, global);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
registry_handle_global_remove (void *data,
|
||||
struct wl_registry *registry,
|
||||
uint32_t id)
|
||||
{
|
||||
GtkIMContextWaylandGlobal *global = data;
|
||||
|
||||
if (id != global->text_input_manager_wl_id)
|
||||
return;
|
||||
|
||||
g_clear_pointer(&global->text_input, gtk_text_input_destroy);
|
||||
g_clear_pointer(&global->text_input_manager, gtk_text_input_manager_destroy);
|
||||
}
|
||||
|
||||
static const struct wl_registry_listener registry_listener = {
|
||||
registry_handle_global,
|
||||
registry_handle_global_remove
|
||||
};
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_global_init (GdkDisplay *display)
|
||||
{
|
||||
g_return_if_fail (global == NULL);
|
||||
|
||||
global = g_new0 (GtkIMContextWaylandGlobal, 1);
|
||||
global->display = gdk_wayland_display_get_wl_display (display);
|
||||
global->registry = wl_display_get_registry (global->display);
|
||||
|
||||
wl_registry_add_listener (global->registry, ®istry_listener, global);
|
||||
}
|
||||
|
||||
static void
|
||||
notify_surrounding_text (GtkIMContextWayland *context)
|
||||
{
|
||||
if (!global || !global->text_input)
|
||||
return;
|
||||
if (global->current != GTK_IM_CONTEXT (context))
|
||||
return;
|
||||
if (!context->surrounding.text)
|
||||
return;
|
||||
|
||||
gtk_text_input_set_surrounding_text (global->text_input,
|
||||
context->surrounding.text,
|
||||
context->surrounding.cursor_idx,
|
||||
context->surrounding.cursor_idx);
|
||||
}
|
||||
|
||||
static void
|
||||
notify_cursor_location (GtkIMContextWayland *context)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
if (!global || !global->text_input)
|
||||
return;
|
||||
if (global->current != GTK_IM_CONTEXT (context))
|
||||
return;
|
||||
if (!context->window)
|
||||
return;
|
||||
|
||||
rect = context->cursor_rect;
|
||||
gdk_window_get_root_coords (context->window, rect.x, rect.y,
|
||||
&rect.x, &rect.y);
|
||||
|
||||
gtk_text_input_set_cursor_rectangle (global->text_input,
|
||||
rect.x, rect.y,
|
||||
rect.width, rect.height);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
translate_hints (GtkInputHints input_hints,
|
||||
GtkInputPurpose purpose)
|
||||
{
|
||||
uint32_t hints = 0;
|
||||
|
||||
if (input_hints & GTK_INPUT_HINT_SPELLCHECK)
|
||||
hints |= GTK_TEXT_INPUT_CONTENT_HINT_SPELLCHECK;
|
||||
if (input_hints & GTK_INPUT_HINT_WORD_COMPLETION)
|
||||
hints |= GTK_TEXT_INPUT_CONTENT_HINT_COMPLETION;
|
||||
if (input_hints & GTK_INPUT_HINT_LOWERCASE)
|
||||
hints |= GTK_TEXT_INPUT_CONTENT_HINT_LOWERCASE;
|
||||
if (input_hints & GTK_INPUT_HINT_UPPERCASE_CHARS)
|
||||
hints |= GTK_TEXT_INPUT_CONTENT_HINT_UPPERCASE;
|
||||
if (input_hints & GTK_INPUT_HINT_UPPERCASE_WORDS)
|
||||
hints |= GTK_TEXT_INPUT_CONTENT_HINT_TITLECASE;
|
||||
if (input_hints & GTK_INPUT_HINT_UPPERCASE_SENTENCES)
|
||||
hints |= GTK_TEXT_INPUT_CONTENT_HINT_AUTO_CAPITALIZATION;
|
||||
|
||||
if (purpose == GTK_INPUT_PURPOSE_PIN ||
|
||||
purpose == GTK_INPUT_PURPOSE_PASSWORD)
|
||||
{
|
||||
hints |= (GTK_TEXT_INPUT_CONTENT_HINT_HIDDEN_TEXT |
|
||||
GTK_TEXT_INPUT_CONTENT_HINT_SENSITIVE_DATA);
|
||||
}
|
||||
|
||||
return hints;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
translate_purpose (GtkInputPurpose purpose)
|
||||
{
|
||||
switch (purpose)
|
||||
{
|
||||
case GTK_INPUT_PURPOSE_FREE_FORM:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_NORMAL;
|
||||
case GTK_INPUT_PURPOSE_ALPHA:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_ALPHA;
|
||||
case GTK_INPUT_PURPOSE_DIGITS:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_DIGITS;
|
||||
case GTK_INPUT_PURPOSE_NUMBER:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_NUMBER;
|
||||
case GTK_INPUT_PURPOSE_PHONE:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_PHONE;
|
||||
case GTK_INPUT_PURPOSE_URL:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_URL;
|
||||
case GTK_INPUT_PURPOSE_EMAIL:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_EMAIL;
|
||||
case GTK_INPUT_PURPOSE_NAME:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_NAME;
|
||||
case GTK_INPUT_PURPOSE_PASSWORD:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_PASSWORD;
|
||||
case GTK_INPUT_PURPOSE_PIN:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_PIN;
|
||||
case GTK_INPUT_PURPOSE_TERMINAL:
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_NORMAL;
|
||||
}
|
||||
|
||||
return GTK_TEXT_INPUT_CONTENT_PURPOSE_NORMAL;
|
||||
}
|
||||
|
||||
static void
|
||||
notify_content_type (GtkIMContextWayland *context)
|
||||
{
|
||||
GtkInputHints hints;
|
||||
GtkInputPurpose purpose;
|
||||
|
||||
if (global->current != GTK_IM_CONTEXT (context))
|
||||
return;
|
||||
|
||||
g_object_get (context,
|
||||
"input-hints", &hints,
|
||||
"input-purpose", &purpose,
|
||||
NULL);
|
||||
|
||||
gtk_text_input_set_content_type (global->text_input,
|
||||
translate_hints (hints, purpose),
|
||||
translate_purpose (purpose));
|
||||
}
|
||||
|
||||
static void
|
||||
commit_state (GtkIMContextWayland *context)
|
||||
{
|
||||
if (global->current != GTK_IM_CONTEXT (context))
|
||||
return;
|
||||
gtk_text_input_commit (global->text_input);
|
||||
}
|
||||
|
||||
static void
|
||||
enable_text_input (GtkIMContextWayland *context,
|
||||
gboolean toggle_panel)
|
||||
{
|
||||
guint flags = 0;
|
||||
|
||||
if (context->use_preedit)
|
||||
flags |= GTK_TEXT_INPUT_ENABLE_FLAGS_CAN_SHOW_PREEDIT;
|
||||
if (toggle_panel)
|
||||
flags |= GTK_TEXT_INPUT_ENABLE_FLAGS_TOGGLE_INPUT_PANEL;
|
||||
|
||||
gtk_text_input_enable (global->text_input,
|
||||
global->enter_serial,
|
||||
flags);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_finalize (GObject *object)
|
||||
{
|
||||
GtkIMContextWayland *context = GTK_IM_CONTEXT_WAYLAND (object);
|
||||
|
||||
g_clear_object (&context->window);
|
||||
g_clear_object (&context->gesture);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
pressed_cb (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
GtkIMContextWayland *context)
|
||||
{
|
||||
if (n_press == 1)
|
||||
{
|
||||
context->press_x = x;
|
||||
context->press_y = y;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
released_cb (GtkGestureMultiPress *gesture,
|
||||
gint n_press,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
GtkIMContextWayland *context)
|
||||
{
|
||||
GtkInputHints hints;
|
||||
|
||||
if (!global->current)
|
||||
return;
|
||||
|
||||
g_object_get (context, "input-hints", &hints, NULL);
|
||||
|
||||
if (n_press == 1 &&
|
||||
(hints & GTK_INPUT_HINT_INHIBIT_OSK) == 0 &&
|
||||
!gtk_drag_check_threshold (context->widget,
|
||||
context->press_x,
|
||||
context->press_y,
|
||||
x, y))
|
||||
{
|
||||
enable_text_input (GTK_IM_CONTEXT_WAYLAND (context), TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_set_client_window (GtkIMContext *context,
|
||||
GdkWindow *window)
|
||||
{
|
||||
GtkIMContextWayland *context_wayland = GTK_IM_CONTEXT_WAYLAND (context);
|
||||
GtkWidget *widget = NULL;
|
||||
|
||||
if (window == context_wayland->window)
|
||||
return;
|
||||
|
||||
if (window)
|
||||
gdk_window_get_user_data (window, (gpointer*) &widget);
|
||||
|
||||
if (context_wayland->widget && context_wayland->widget != widget)
|
||||
g_clear_object (&context_wayland->gesture);
|
||||
|
||||
g_set_object (&context_wayland->window, window);
|
||||
|
||||
if (context_wayland->widget != widget)
|
||||
{
|
||||
context_wayland->widget = widget;
|
||||
|
||||
if (widget)
|
||||
{
|
||||
GtkGesture *gesture;
|
||||
|
||||
gesture = gtk_gesture_multi_press_new (widget);
|
||||
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
|
||||
GTK_PHASE_CAPTURE);
|
||||
g_signal_connect (gesture, "pressed",
|
||||
G_CALLBACK (pressed_cb), context);
|
||||
g_signal_connect (gesture, "released",
|
||||
G_CALLBACK (released_cb), context);
|
||||
context_wayland->gesture = gesture;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_get_preedit_string (GtkIMContext *context,
|
||||
gchar **str,
|
||||
PangoAttrList **attrs,
|
||||
gint *cursor_pos)
|
||||
{
|
||||
GtkIMContextWayland *context_wayland = GTK_IM_CONTEXT_WAYLAND (context);
|
||||
gchar *preedit_str;
|
||||
|
||||
if (attrs)
|
||||
*attrs = NULL;
|
||||
|
||||
GTK_IM_CONTEXT_CLASS (parent_class)->get_preedit_string (context, str, attrs, cursor_pos);
|
||||
|
||||
/* If the parent implementation returns a len>0 string, go with it */
|
||||
if (str && *str)
|
||||
{
|
||||
if (**str)
|
||||
return;
|
||||
|
||||
g_free (*str);
|
||||
}
|
||||
|
||||
preedit_str =
|
||||
context_wayland->preedit.text ? context_wayland->preedit.text : "";
|
||||
|
||||
if (str)
|
||||
*str = g_strdup (preedit_str);
|
||||
if (cursor_pos)
|
||||
*cursor_pos = context_wayland->preedit.cursor_idx;
|
||||
|
||||
if (attrs)
|
||||
{
|
||||
if (!*attrs)
|
||||
*attrs = pango_attr_list_new ();
|
||||
pango_attr_list_insert (*attrs,
|
||||
pango_attr_underline_new (PANGO_UNDERLINE_SINGLE));
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_im_context_wayland_filter_keypress (GtkIMContext *context,
|
||||
GdkEventKey *key)
|
||||
{
|
||||
/* This is done by the compositor */
|
||||
return GTK_IM_CONTEXT_CLASS (parent_class)->filter_keypress (context, key);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_focus_in (GtkIMContext *context)
|
||||
{
|
||||
GtkIMContextWayland *context_wayland = GTK_IM_CONTEXT_WAYLAND (context);
|
||||
|
||||
if (global->current == context)
|
||||
return;
|
||||
if (!global->text_input)
|
||||
return;
|
||||
|
||||
global->current = context;
|
||||
enable_text_input (context_wayland, FALSE);
|
||||
notify_content_type (context_wayland);
|
||||
notify_surrounding_text (context_wayland);
|
||||
notify_cursor_location (context_wayland);
|
||||
commit_state (context_wayland);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_focus_out (GtkIMContext *context)
|
||||
{
|
||||
if (global->current != context)
|
||||
return;
|
||||
|
||||
gtk_text_input_disable (global->text_input);
|
||||
global->current = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_reset (GtkIMContext *context)
|
||||
{
|
||||
reset_preedit (GTK_IM_CONTEXT_WAYLAND (context));
|
||||
|
||||
GTK_IM_CONTEXT_CLASS (parent_class)->reset (context);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_set_cursor_location (GtkIMContext *context,
|
||||
GdkRectangle *rect)
|
||||
{
|
||||
GtkIMContextWayland *context_wayland;
|
||||
|
||||
context_wayland = GTK_IM_CONTEXT_WAYLAND (context);
|
||||
|
||||
context_wayland->cursor_rect = *rect;
|
||||
notify_cursor_location (context_wayland);
|
||||
commit_state (context_wayland);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_set_use_preedit (GtkIMContext *context,
|
||||
gboolean use_preedit)
|
||||
{
|
||||
GtkIMContextWayland *context_wayland = GTK_IM_CONTEXT_WAYLAND (context);
|
||||
|
||||
context_wayland->use_preedit = !!use_preedit;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_set_surrounding (GtkIMContext *context,
|
||||
const gchar *text,
|
||||
gint len,
|
||||
gint cursor_index)
|
||||
{
|
||||
GtkIMContextWayland *context_wayland;
|
||||
|
||||
context_wayland = GTK_IM_CONTEXT_WAYLAND (context);
|
||||
|
||||
g_free (context_wayland->surrounding.text);
|
||||
context_wayland->surrounding.text = g_strndup (text, len);
|
||||
context_wayland->surrounding.cursor_idx = cursor_index;
|
||||
|
||||
notify_surrounding_text (context_wayland);
|
||||
commit_state (context_wayland);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_im_context_wayland_get_surrounding (GtkIMContext *context,
|
||||
gchar **text,
|
||||
gint *cursor_index)
|
||||
{
|
||||
GtkIMContextWayland *context_wayland;
|
||||
|
||||
context_wayland = GTK_IM_CONTEXT_WAYLAND (context);
|
||||
|
||||
if (!context_wayland->surrounding.text)
|
||||
return FALSE;
|
||||
|
||||
*text = context_wayland->surrounding.text;
|
||||
*cursor_index = context_wayland->surrounding.cursor_idx;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_class_init (GtkIMContextWaylandClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GtkIMContextClass *im_context_class = GTK_IM_CONTEXT_CLASS (klass);
|
||||
|
||||
object_class->finalize = gtk_im_context_wayland_finalize;
|
||||
|
||||
im_context_class->set_client_window = gtk_im_context_wayland_set_client_window;
|
||||
im_context_class->get_preedit_string = gtk_im_context_wayland_get_preedit_string;
|
||||
im_context_class->filter_keypress = gtk_im_context_wayland_filter_keypress;
|
||||
im_context_class->focus_in = gtk_im_context_wayland_focus_in;
|
||||
im_context_class->focus_out = gtk_im_context_wayland_focus_out;
|
||||
im_context_class->reset = gtk_im_context_wayland_reset;
|
||||
im_context_class->set_cursor_location = gtk_im_context_wayland_set_cursor_location;
|
||||
im_context_class->set_use_preedit = gtk_im_context_wayland_set_use_preedit;
|
||||
im_context_class->set_surrounding = gtk_im_context_wayland_set_surrounding;
|
||||
im_context_class->get_surrounding = gtk_im_context_wayland_get_surrounding;
|
||||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
}
|
||||
|
||||
static void
|
||||
on_content_type_changed (GtkIMContextWayland *context)
|
||||
{
|
||||
notify_content_type (context);
|
||||
commit_state (context);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_init (GtkIMContextWayland *context)
|
||||
{
|
||||
context->use_preedit = TRUE;
|
||||
g_signal_connect_swapped (context, "notify::input-purpose",
|
||||
G_CALLBACK (on_content_type_changed), context);
|
||||
g_signal_connect_swapped (context, "notify::input-hints",
|
||||
G_CALLBACK (on_content_type_changed), context);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_im_context_wayland_register_type (GTypeModule *module)
|
||||
{
|
||||
const GTypeInfo object_info = {
|
||||
sizeof (GtkIMContextWaylandClass),
|
||||
NULL, NULL,
|
||||
(GClassInitFunc) gtk_im_context_wayland_class_init,
|
||||
NULL, NULL,
|
||||
sizeof (GtkIMContextWayland),
|
||||
0,
|
||||
(GInstanceInitFunc) gtk_im_context_wayland_init,
|
||||
};
|
||||
|
||||
type_wayland = g_type_module_register_type (module,
|
||||
GTK_TYPE_IM_CONTEXT_SIMPLE,
|
||||
"GtkIMContextWayland",
|
||||
&object_info, 0);
|
||||
}
|
||||
|
||||
MODULE_ENTRY (void, init) (GTypeModule * module)
|
||||
{
|
||||
gtk_im_context_wayland_register_type (module);
|
||||
gtk_im_context_wayland_global_init (gdk_display_get_default ());
|
||||
}
|
||||
|
||||
MODULE_ENTRY (void, exit) (void)
|
||||
{
|
||||
}
|
||||
|
||||
MODULE_ENTRY (void, list) (const GtkIMContextInfo *** contexts, int *n_contexts)
|
||||
{
|
||||
*contexts = info_list;
|
||||
*n_contexts = G_N_ELEMENTS (info_list);
|
||||
}
|
||||
|
||||
MODULE_ENTRY (GtkIMContext *, create) (const gchar * context_id)
|
||||
{
|
||||
if (strcmp (context_id, "waylandgtk") == 0)
|
||||
return g_object_new (type_wayland, NULL);
|
||||
else
|
||||
return NULL;
|
||||
}
|
@ -344,7 +344,6 @@ modules/input/imti-er.c
|
||||
modules/input/imti-et.c
|
||||
modules/input/imviqr.c
|
||||
modules/input/imwayland.c
|
||||
modules/input/imwaylandgtk.c
|
||||
modules/input/imxim.c
|
||||
modules/printbackends/cups/gtkprintbackendcups.c
|
||||
modules/printbackends/cups/gtkprintercups.c
|
||||
|
34023
po-properties/ab.po
34023
po-properties/ab.po
File diff suppressed because it is too large
Load Diff
@ -395,7 +395,6 @@ modules/input/imti-er.c
|
||||
modules/input/imti-et.c
|
||||
modules/input/imviqr.c
|
||||
modules/input/imwayland.c
|
||||
modules/input/imwaylandgtk.c
|
||||
modules/input/imxim.c
|
||||
modules/printbackends/cups/gtkprintbackendcups.c
|
||||
modules/printbackends/cups/gtkprintercups.c
|
||||
|
138
po/ab.po
138
po/ab.po
@ -1,7 +1,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-11-24 13:43+0000\n"
|
||||
"POT-Creation-Date: 2023-01-02 15:32+0000\n"
|
||||
"Last-Translator: Нанба Наала <naala-nanba@rambler.ru>\n"
|
||||
"Language-Team: Abkhazian <daniel.abzakh@gmail.com>\n"
|
||||
"Language: ab\n"
|
||||
@ -1022,7 +1022,7 @@ msgstr ""
|
||||
|
||||
#: gtk/a11y/gtkmenubuttonaccessible.c:102 gtk/inspector/window.ui:459
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
msgstr "Амениу"
|
||||
|
||||
#: gtk/a11y/gtkmenuitemaccessible.c:445
|
||||
msgctxt "Action description"
|
||||
@ -1184,7 +1184,7 @@ msgstr ""
|
||||
|
||||
#: gtk/deprecated/gtkcolorseldialog.c:191 gtk/deprecated/gtkfontsel.c:1689
|
||||
#: gtk/gtkfilechoosernative.c:545 gtk/gtkfilechoosernative.c:637
|
||||
#: gtk/gtkfilechooserwidget.c:1499 gtk/gtkfilechooserwidget.c:6573
|
||||
#: gtk/gtkfilechooserwidget.c:1502 gtk/gtkfilechooserwidget.c:6576
|
||||
#: gtk/gtkmessagedialog.c:952 gtk/gtkmessagedialog.c:965
|
||||
#: gtk/gtkmountoperation.c:594 gtk/gtkpagesetupunixdialog.c:197
|
||||
#: gtk/gtkprintbackend.c:779 gtk/gtkprinteroptionwidget.c:545
|
||||
@ -2192,7 +2192,7 @@ msgstr "_Ҵаҟа"
|
||||
|
||||
#: gtk/gtkcustompaperunixdialog.c:1173
|
||||
msgid "_Left:"
|
||||
msgstr "А_рмарахь:"
|
||||
msgstr "А_рмарала:"
|
||||
|
||||
#: gtk/gtkcustompaperunixdialog.c:1184
|
||||
msgid "_Right:"
|
||||
@ -2202,24 +2202,24 @@ msgstr "А_рӷьарахь"
|
||||
msgid "Paper Margins"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkentry.c:9596 gtk/gtklabel.c:6687 gtk/gtktextview.c:9528
|
||||
#: gtk/gtkentry.c:9596 gtk/gtklabel.c:6688 gtk/gtktextview.c:9528
|
||||
msgid "Cu_t"
|
||||
msgstr "_Агәылԥҟара "
|
||||
msgstr "_Агәылԥҟара"
|
||||
|
||||
#: gtk/gtkentry.c:9600 gtk/gtklabel.c:6688 gtk/gtktextview.c:9532
|
||||
#: gtk/gtkentry.c:9600 gtk/gtklabel.c:6689 gtk/gtktextview.c:9532
|
||||
msgid "_Copy"
|
||||
msgstr "_Ахкьыҧхьаара"
|
||||
|
||||
#: gtk/gtkentry.c:9604 gtk/gtklabel.c:6689 gtk/gtktextview.c:9534
|
||||
#: gtk/gtkentry.c:9604 gtk/gtklabel.c:6690 gtk/gtktextview.c:9534
|
||||
msgid "_Paste"
|
||||
msgstr "_Абжьаргылара"
|
||||
|
||||
#: gtk/gtkentry.c:9607 gtk/gtkfilechooserwidget.c:1500
|
||||
#: gtk/gtkfilechooserwidget.c:2335 gtk/gtklabel.c:6691 gtk/gtktextview.c:9537
|
||||
#: gtk/gtkentry.c:9607 gtk/gtkfilechooserwidget.c:1503
|
||||
#: gtk/gtkfilechooserwidget.c:2338 gtk/gtklabel.c:6692 gtk/gtktextview.c:9537
|
||||
msgid "_Delete"
|
||||
msgstr "_Аныхра"
|
||||
|
||||
#: gtk/gtkentry.c:9618 gtk/gtklabel.c:6700 gtk/gtktextview.c:9551
|
||||
#: gtk/gtkentry.c:9618 gtk/gtklabel.c:6701 gtk/gtktextview.c:9551
|
||||
msgid "Select _All"
|
||||
msgstr "З_егьы алхра"
|
||||
|
||||
@ -2409,225 +2409,225 @@ msgstr ""
|
||||
msgid "File names starting with a “.” are hidden"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1495
|
||||
#: gtk/gtkfilechooserwidget.c:1498
|
||||
#, c-format
|
||||
msgid "Are you sure you want to permanently delete “%s”?"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1498
|
||||
#: gtk/gtkfilechooserwidget.c:1501
|
||||
#, c-format
|
||||
msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1635
|
||||
#: gtk/gtkfilechooserwidget.c:1638
|
||||
msgid "The file could not be renamed"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1980
|
||||
#: gtk/gtkfilechooserwidget.c:1983
|
||||
msgid "Could not select file"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2330
|
||||
#: gtk/gtkfilechooserwidget.c:2333
|
||||
msgid "_Visit File"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2331
|
||||
#: gtk/gtkfilechooserwidget.c:2334
|
||||
msgid "_Open With File Manager"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2332
|
||||
#: gtk/gtkfilechooserwidget.c:2335
|
||||
msgid "_Copy Location"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2333
|
||||
#: gtk/gtkfilechooserwidget.c:2336
|
||||
msgid "_Add to Bookmarks"
|
||||
msgstr "_ Агәылаҵақәа рахь ацҵара"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2334 gtk/gtkplacessidebar.c:2744
|
||||
#: gtk/gtkfilechooserwidget.c:2337 gtk/gtkplacessidebar.c:2744
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:569
|
||||
msgid "_Rename"
|
||||
msgstr "_Ахьӡԥсахра"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2336
|
||||
#: gtk/gtkfilechooserwidget.c:2339
|
||||
msgid "_Move to Trash"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2340
|
||||
#: gtk/gtkfilechooserwidget.c:2343
|
||||
msgid "Show _Hidden Files"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2341
|
||||
#: gtk/gtkfilechooserwidget.c:2344
|
||||
msgid "Show _Size Column"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2342
|
||||
#: gtk/gtkfilechooserwidget.c:2345
|
||||
msgid "Show T_ype Column"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2343
|
||||
#: gtk/gtkfilechooserwidget.c:2346
|
||||
msgid "Show _Time"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2344
|
||||
#: gtk/gtkfilechooserwidget.c:2347
|
||||
msgid "Sort _Folders before Files"
|
||||
msgstr ""
|
||||
|
||||
#. this is the header for the location column in the print dialog
|
||||
#: gtk/gtkfilechooserwidget.c:2626 gtk/inspector/css-node-tree.ui:141
|
||||
#: gtk/gtkfilechooserwidget.c:2629 gtk/inspector/css-node-tree.ui:141
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:238 gtk/ui/gtkprintunixdialog.ui:123
|
||||
msgid "Location"
|
||||
msgstr "Аҭыӡҭыԥ"
|
||||
|
||||
#. Label
|
||||
#: gtk/gtkfilechooserwidget.c:2719
|
||||
#: gtk/gtkfilechooserwidget.c:2722
|
||||
msgid "_Name:"
|
||||
msgstr "_Ахьӡ:"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3344 gtk/gtkfilechooserwidget.c:3358
|
||||
#: gtk/gtkfilechooserwidget.c:3347 gtk/gtkfilechooserwidget.c:3361
|
||||
#, c-format
|
||||
msgid "Searching in %s"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3364
|
||||
#: gtk/gtkfilechooserwidget.c:3367
|
||||
msgid "Searching"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3371
|
||||
#: gtk/gtkfilechooserwidget.c:3374
|
||||
msgid "Enter location"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3373
|
||||
#: gtk/gtkfilechooserwidget.c:3376
|
||||
msgid "Enter location or URL"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4451 gtk/gtkfilechooserwidget.c:7493
|
||||
#: gtk/gtkfilechooserwidget.c:4454 gtk/gtkfilechooserwidget.c:7496
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:278
|
||||
msgid "Modified"
|
||||
msgstr "Ианыԥсахыз арыцхә"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4729
|
||||
#: gtk/gtkfilechooserwidget.c:4732
|
||||
#, c-format
|
||||
msgid "Could not read the contents of %s"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4733
|
||||
#: gtk/gtkfilechooserwidget.c:4736
|
||||
msgid "Could not read the contents of the folder"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4893 gtk/gtkfilechooserwidget.c:4941
|
||||
#: gtk/gtkfilechooserwidget.c:4896 gtk/gtkfilechooserwidget.c:4944
|
||||
msgid "%H:%M"
|
||||
msgstr "%H:%M"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4895 gtk/gtkfilechooserwidget.c:4943
|
||||
#: gtk/gtkfilechooserwidget.c:4898 gtk/gtkfilechooserwidget.c:4946
|
||||
msgid "%l:%M %p"
|
||||
msgstr "%l:%M %p"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4899
|
||||
#: gtk/gtkfilechooserwidget.c:4902
|
||||
msgid "Yesterday"
|
||||
msgstr "Иацы"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4907
|
||||
#: gtk/gtkfilechooserwidget.c:4910
|
||||
msgid "%-e %b"
|
||||
msgstr "%-e %B"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4911
|
||||
#: gtk/gtkfilechooserwidget.c:4914
|
||||
msgid "%-e %b %Y"
|
||||
msgstr "%-e %b. %Y"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5010 gtk/gtkfilechooserwidget.c:5018
|
||||
#: gtk/gtkfilechooserwidget.c:5013 gtk/gtkfilechooserwidget.c:5021
|
||||
msgid "Program"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5011
|
||||
#: gtk/gtkfilechooserwidget.c:5014
|
||||
msgid "Audio"
|
||||
msgstr "Аудио"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5012 gtk/inspector/visual.ui:230
|
||||
#: gtk/gtkfilechooserwidget.c:5015 gtk/inspector/visual.ui:230
|
||||
#: gtk/ui/gtkfontbutton.ui:13
|
||||
msgid "Font"
|
||||
msgstr "Ашрифт"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5013 gtk/inspector/visual.ui:488
|
||||
#: gtk/gtkfilechooserwidget.c:5016 gtk/inspector/visual.ui:488
|
||||
msgid "Image"
|
||||
msgstr "Асахьа"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5014
|
||||
#: gtk/gtkfilechooserwidget.c:5017
|
||||
msgid "Archive"
|
||||
msgstr "Архив"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5015
|
||||
#: gtk/gtkfilechooserwidget.c:5018
|
||||
msgid "Markup"
|
||||
msgstr "Адырганҵа"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5016 gtk/gtkfilechooserwidget.c:5017
|
||||
#: gtk/gtkfilechooserwidget.c:5019 gtk/gtkfilechooserwidget.c:5020
|
||||
msgid "Text"
|
||||
msgstr "Атекст"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5019
|
||||
#: gtk/gtkfilechooserwidget.c:5022
|
||||
msgid "Video"
|
||||
msgstr "Авидео"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5020
|
||||
#: gtk/gtkfilechooserwidget.c:5023
|
||||
msgid "Contacts"
|
||||
msgstr ""
|
||||
msgstr "Аимадарақәа"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5021
|
||||
#: gtk/gtkfilechooserwidget.c:5024
|
||||
msgid "Calendar"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5022
|
||||
#: gtk/gtkfilechooserwidget.c:5025
|
||||
msgid "Document"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5023
|
||||
#: gtk/gtkfilechooserwidget.c:5026
|
||||
msgid "Presentation"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5024
|
||||
#: gtk/gtkfilechooserwidget.c:5027
|
||||
msgid "Spreadsheet"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5055 gtk/gtkfilechooserwidget.c:5244
|
||||
#: gtk/gtkfilechooserwidget.c:5058 gtk/gtkfilechooserwidget.c:5247
|
||||
#: gtk/inspector/prop-editor.c:1689
|
||||
msgid "Unknown"
|
||||
msgstr "Еилкаам"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5283 gtk/gtkplacessidebar.c:1097
|
||||
#: gtk/gtkfilechooserwidget.c:5286 gtk/gtkplacessidebar.c:1097
|
||||
msgid "Home"
|
||||
msgstr "Home"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5780
|
||||
#: gtk/gtkfilechooserwidget.c:5783
|
||||
msgid "Cannot change to folder because it is not local"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6566 gtk/gtkprintunixdialog.c:665
|
||||
#: gtk/gtkfilechooserwidget.c:6569 gtk/gtkprintunixdialog.c:665
|
||||
#, c-format
|
||||
msgid "A file named “%s” already exists. Do you want to replace it?"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6569 gtk/gtkprintunixdialog.c:669
|
||||
#: gtk/gtkfilechooserwidget.c:6572 gtk/gtkprintunixdialog.c:669
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The file already exists in “%s”. Replacing it will overwrite its contents."
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6574 gtk/gtkprintunixdialog.c:677
|
||||
#: gtk/gtkfilechooserwidget.c:6577 gtk/gtkprintunixdialog.c:677
|
||||
msgid "_Replace"
|
||||
msgstr "_Аҧсахра"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6793
|
||||
#: gtk/gtkfilechooserwidget.c:6796
|
||||
msgid "You do not have access to the specified folder."
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:7416
|
||||
#: gtk/gtkfilechooserwidget.c:7419
|
||||
msgid "Could not send the search request"
|
||||
msgstr ""
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:7704
|
||||
#: gtk/gtkfilechooserwidget.c:7707
|
||||
msgid "Accessed"
|
||||
msgstr "Алагара аамҭарба"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:8824 gtk/ui/gtkfilechooserwidget.ui:89
|
||||
#: gtk/gtkfilechooserwidget.c:8827 gtk/ui/gtkfilechooserwidget.ui:89
|
||||
msgid "Create Folder"
|
||||
msgstr ""
|
||||
|
||||
@ -2760,12 +2760,12 @@ msgid "Error"
|
||||
msgstr ""
|
||||
|
||||
#. Open Link
|
||||
#: gtk/gtklabel.c:6668
|
||||
#: gtk/gtklabel.c:6669
|
||||
msgid "_Open Link"
|
||||
msgstr "_Азхьарԥш аартра"
|
||||
|
||||
#. Copy Link Address
|
||||
#: gtk/gtklabel.c:6677
|
||||
#: gtk/gtklabel.c:6678
|
||||
msgid "Copy _Link Address"
|
||||
msgstr ""
|
||||
|
||||
@ -2788,7 +2788,7 @@ msgstr ""
|
||||
#: gtk/gtk-launch.c:92
|
||||
#, c-format
|
||||
msgid "Error parsing commandline options: %s\n"
|
||||
msgstr ""
|
||||
msgstr "Адҵатә цәаҳәа ахышәарақәа реилыргара залымшахеит : %s\n"
|
||||
|
||||
#: gtk/gtk-launch.c:94 gtk/gtk-launch.c:115
|
||||
#, c-format
|
||||
@ -3367,7 +3367,7 @@ msgstr[1] ""
|
||||
|
||||
#: gtk/gtkplacesviewrow.c:481
|
||||
msgid "Disconnect"
|
||||
msgstr "Аҿыхра"
|
||||
msgstr "Аҽаҿыхра"
|
||||
|
||||
#: gtk/gtkplacesviewrow.c:481 gtk/ui/gtkplacesviewrow.ui:72
|
||||
#: gtk/ui/gtksidebarrow.ui:62
|
||||
@ -4094,7 +4094,7 @@ msgstr ""
|
||||
|
||||
#: gtk/inspector/general.ui:454
|
||||
msgid "Display"
|
||||
msgstr "Аԥшра"
|
||||
msgstr "Адисплеи"
|
||||
|
||||
#: gtk/inspector/general.ui:489
|
||||
msgid "RGBA visual"
|
||||
|
221
po/lt.po
221
po/lt.po
@ -9,23 +9,23 @@
|
||||
# Rimas Kudelis <rq@akl.lt>, 2008, 2010.
|
||||
# Gintautas Miliauskas <gintautas@miliauskas.lt>, 2009.
|
||||
# Algimantas Margevičius <margevicius.algimantas@gmail.com>, 2012.
|
||||
# Aurimas Černius <aurisc4@gmail.com>, 2010-2022.
|
||||
# Aurimas Černius <aurisc4@gmail.com>, 2010-2023.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: lt\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-03-05 14:57+0000\n"
|
||||
"PO-Revision-Date: 2022-03-07 18:03+0200\n"
|
||||
"POT-Creation-Date: 2023-01-02 15:32+0000\n"
|
||||
"PO-Revision-Date: 2023-01-19 23:08+0200\n"
|
||||
"Last-Translator: Aurimas Černius <aurisc4@gmail.com>\n"
|
||||
"Language-Team: Lietuvių <gnome-lt@lists.akl.lt>\n"
|
||||
"Language: lt\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
|
||||
"%100<10 || n%100>=20) ? 1 : 2)\n"
|
||||
"X-Generator: Gtranslator 40.0\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
|
||||
"(n%100<10 || n%100>=20) ? 1 : 2)\n"
|
||||
"X-Generator: Gtranslator 42.0\n"
|
||||
|
||||
#: gdk/broadway/gdkbroadway-server.c:144
|
||||
#, c-format
|
||||
@ -485,19 +485,19 @@ msgstr "Nepavyko sukurti GL pikselių formato"
|
||||
msgid "Unable to create a GL context"
|
||||
msgstr "Nepavyko sukurti GL konteksto"
|
||||
|
||||
#: gdk/wayland/gdkglcontext-wayland.c:418
|
||||
#: gdk/wayland/gdkglcontext-wayland.c:428 gdk/win32/gdkglcontext-win32.c:777
|
||||
#: gdk/wayland/gdkglcontext-wayland.c:422
|
||||
#: gdk/wayland/gdkglcontext-wayland.c:432 gdk/win32/gdkglcontext-win32.c:777
|
||||
#: gdk/win32/gdkglcontext-win32.c:1136 gdk/win32/gdkglcontext-win32.c:1146
|
||||
#: gdk/x11/gdkglcontext-x11.c:975
|
||||
msgid "No available configurations for the given pixel format"
|
||||
msgstr "Nėra galimų konfigūracijų nurodytam pikselių formatui"
|
||||
|
||||
#: gdk/wayland/gdkglcontext-wayland.c:468 gdk/win32/gdkglcontext-win32.c:1491
|
||||
#: gdk/wayland/gdkglcontext-wayland.c:472 gdk/win32/gdkglcontext-win32.c:1491
|
||||
#: gdk/x11/gdkglcontext-x11.c:1281
|
||||
msgid "No GL implementation is available"
|
||||
msgstr "Nėra galimo GL realizacijos"
|
||||
|
||||
#: gdk/wayland/gdkglcontext-wayland.c:476
|
||||
#: gdk/wayland/gdkglcontext-wayland.c:480
|
||||
msgid "Core GL is not available on EGL implementation"
|
||||
msgstr "Pagrindinis GL profilis neprieinamas EGL realizacijoje"
|
||||
|
||||
@ -664,15 +664,15 @@ msgctxt "Stock label"
|
||||
msgid "_Close"
|
||||
msgstr "_Užverti"
|
||||
|
||||
#: gtk/a11y/gtkimageaccessible.c:59 gtk/gtkheaderbar.c:415 gtk/gtkwindow.c:9320
|
||||
#: gtk/a11y/gtkimageaccessible.c:59 gtk/gtkheaderbar.c:415 gtk/gtkwindow.c:9345
|
||||
msgid "Minimize"
|
||||
msgstr "Sumažinti"
|
||||
|
||||
#: gtk/a11y/gtkimageaccessible.c:60 gtk/gtkheaderbar.c:439 gtk/gtkwindow.c:9329
|
||||
#: gtk/a11y/gtkimageaccessible.c:60 gtk/gtkheaderbar.c:439 gtk/gtkwindow.c:9354
|
||||
msgid "Maximize"
|
||||
msgstr "Išdidinti"
|
||||
|
||||
#: gtk/a11y/gtkimageaccessible.c:61 gtk/gtkheaderbar.c:439 gtk/gtkwindow.c:9286
|
||||
#: gtk/a11y/gtkimageaccessible.c:61 gtk/gtkheaderbar.c:439 gtk/gtkwindow.c:9311
|
||||
msgid "Restore"
|
||||
msgstr "Atstatyti"
|
||||
|
||||
@ -1217,12 +1217,12 @@ msgstr ""
|
||||
|
||||
#: gtk/deprecated/gtkcolorseldialog.c:191 gtk/deprecated/gtkfontsel.c:1689
|
||||
#: gtk/gtkfilechoosernative.c:545 gtk/gtkfilechoosernative.c:637
|
||||
#: gtk/gtkfilechooserwidget.c:1499 gtk/gtkfilechooserwidget.c:6573
|
||||
#: gtk/gtkfilechooserwidget.c:1502 gtk/gtkfilechooserwidget.c:6576
|
||||
#: gtk/gtkmessagedialog.c:952 gtk/gtkmessagedialog.c:965
|
||||
#: gtk/gtkmountoperation.c:594 gtk/gtkpagesetupunixdialog.c:197
|
||||
#: gtk/gtkprintbackend.c:779 gtk/gtkprinteroptionwidget.c:545
|
||||
#: gtk/gtkprintunixdialog.c:674 gtk/gtkprintunixdialog.c:747
|
||||
#: gtk/gtkwindow.c:12790 gtk/inspector/css-editor.c:201
|
||||
#: gtk/gtkwindow.c:12815 gtk/inspector/css-editor.c:201
|
||||
#: gtk/ui/gtkappchooserdialog.ui:61 gtk/ui/gtkassistant.ui:125
|
||||
#: gtk/ui/gtkcolorchooserdialog.ui:34 gtk/ui/gtkfontchooserdialog.ui:31
|
||||
msgid "_Cancel"
|
||||
@ -1271,7 +1271,7 @@ msgid "_Apply"
|
||||
msgstr "Prit_aikyti"
|
||||
|
||||
#: gtk/deprecated/gtkfontsel.c:1698 gtk/gtkmessagedialog.c:944
|
||||
#: gtk/gtkmessagedialog.c:966 gtk/gtkprintbackend.c:780 gtk/gtkwindow.c:12791
|
||||
#: gtk/gtkmessagedialog.c:966 gtk/gtkprintbackend.c:780 gtk/gtkwindow.c:12816
|
||||
msgid "_OK"
|
||||
msgstr "_Gerai"
|
||||
|
||||
@ -1628,12 +1628,21 @@ msgctxt "keyboard label"
|
||||
msgid "Meta"
|
||||
msgstr "Meta"
|
||||
|
||||
#: gtk/gtkaccellabel.c:889
|
||||
#. Translators: "KP" means "numeric key pad". This string will
|
||||
#. * be used in accelerators such as "Ctrl+Shift+KP 1" in menus,
|
||||
#. * and therefore the translation needs to be very short.
|
||||
#.
|
||||
#: gtk/gtkaccellabel.c:893
|
||||
msgctxt "keyboard label"
|
||||
msgid "KP"
|
||||
msgstr "SK"
|
||||
|
||||
#: gtk/gtkaccellabel.c:900
|
||||
msgctxt "keyboard label"
|
||||
msgid "Space"
|
||||
msgstr "Tarpas"
|
||||
|
||||
#: gtk/gtkaccellabel.c:892 gtk/gtkshortcutlabel.c:181
|
||||
#: gtk/gtkaccellabel.c:903 gtk/gtkshortcutlabel.c:181
|
||||
msgctxt "keyboard label"
|
||||
msgid "Backslash"
|
||||
msgstr "Backslash"
|
||||
@ -2245,52 +2254,52 @@ msgstr "_Dešinė:"
|
||||
msgid "Paper Margins"
|
||||
msgstr "Popieriaus paraštės"
|
||||
|
||||
#: gtk/gtkentry.c:9591 gtk/gtklabel.c:6687 gtk/gtktextview.c:9525
|
||||
#: gtk/gtkentry.c:9596 gtk/gtklabel.c:6688 gtk/gtktextview.c:9528
|
||||
msgid "Cu_t"
|
||||
msgstr "_Iškirpti"
|
||||
|
||||
#: gtk/gtkentry.c:9595 gtk/gtklabel.c:6688 gtk/gtktextview.c:9529
|
||||
#: gtk/gtkentry.c:9600 gtk/gtklabel.c:6689 gtk/gtktextview.c:9532
|
||||
msgid "_Copy"
|
||||
msgstr "_Kopijuoti"
|
||||
|
||||
#: gtk/gtkentry.c:9599 gtk/gtklabel.c:6689 gtk/gtktextview.c:9531
|
||||
#: gtk/gtkentry.c:9604 gtk/gtklabel.c:6690 gtk/gtktextview.c:9534
|
||||
msgid "_Paste"
|
||||
msgstr "Į_dėti"
|
||||
|
||||
#: gtk/gtkentry.c:9602 gtk/gtkfilechooserwidget.c:1500
|
||||
#: gtk/gtkfilechooserwidget.c:2335 gtk/gtklabel.c:6691 gtk/gtktextview.c:9534
|
||||
#: gtk/gtkentry.c:9607 gtk/gtkfilechooserwidget.c:1503
|
||||
#: gtk/gtkfilechooserwidget.c:2338 gtk/gtklabel.c:6692 gtk/gtktextview.c:9537
|
||||
msgid "_Delete"
|
||||
msgstr "Iš_trinti"
|
||||
|
||||
#: gtk/gtkentry.c:9613 gtk/gtklabel.c:6700 gtk/gtktextview.c:9548
|
||||
#: gtk/gtkentry.c:9618 gtk/gtklabel.c:6701 gtk/gtktextview.c:9551
|
||||
msgid "Select _All"
|
||||
msgstr "P_ažymėti viską"
|
||||
|
||||
#: gtk/gtkentry.c:9623 gtk/gtktextview.c:9558
|
||||
#: gtk/gtkentry.c:9628 gtk/gtktextview.c:9561
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "Įterpti _emoji"
|
||||
|
||||
#: gtk/gtkentry.c:9799 gtk/gtktextview.c:9782
|
||||
#: gtk/gtkentry.c:9804 gtk/gtktextview.c:9785
|
||||
msgid "Select all"
|
||||
msgstr "Pažymėti viską"
|
||||
|
||||
#: gtk/gtkentry.c:9802 gtk/gtktextview.c:9785
|
||||
#: gtk/gtkentry.c:9807 gtk/gtktextview.c:9788
|
||||
msgid "Cut"
|
||||
msgstr "Iškirpti"
|
||||
|
||||
#: gtk/gtkentry.c:9805 gtk/gtktextview.c:9788
|
||||
#: gtk/gtkentry.c:9810 gtk/gtktextview.c:9791
|
||||
msgid "Copy"
|
||||
msgstr "Kopijuoti"
|
||||
|
||||
#: gtk/gtkentry.c:9808 gtk/gtktextview.c:9791
|
||||
#: gtk/gtkentry.c:9813 gtk/gtktextview.c:9794
|
||||
msgid "Paste"
|
||||
msgstr "Įdėti"
|
||||
|
||||
#: gtk/gtkentry.c:10880
|
||||
#: gtk/gtkentry.c:10885
|
||||
msgid "Caps Lock is on"
|
||||
msgstr "Caps Lock įjungtas"
|
||||
|
||||
#: gtk/gtkentry.c:11158
|
||||
#: gtk/gtkentry.c:11163
|
||||
msgid "Insert Emoji"
|
||||
msgstr "Įterpti emoji"
|
||||
|
||||
@ -2453,225 +2462,225 @@ msgstr "Aplankai, kurių pavadinimai prasideda „.“ yra nerodomi"
|
||||
msgid "File names starting with a “.” are hidden"
|
||||
msgstr "Failai, kurių pavadinimai prasideda tašku (.) yra nerodomi"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1495
|
||||
#: gtk/gtkfilechooserwidget.c:1498
|
||||
#, c-format
|
||||
msgid "Are you sure you want to permanently delete “%s”?"
|
||||
msgstr "Ar tikrai norite negrįžtamai ištrinti „%s“?"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1498
|
||||
#: gtk/gtkfilechooserwidget.c:1501
|
||||
#, c-format
|
||||
msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "Jei ištrinsite elementą, jis bus negrįžtamai prarastas."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1635
|
||||
#: gtk/gtkfilechooserwidget.c:1638
|
||||
msgid "The file could not be renamed"
|
||||
msgstr "Nepavyko pervadinti aplanko"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1980
|
||||
#: gtk/gtkfilechooserwidget.c:1983
|
||||
msgid "Could not select file"
|
||||
msgstr "Failo pasirinkti nepavyko"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2330
|
||||
#: gtk/gtkfilechooserwidget.c:2333
|
||||
msgid "_Visit File"
|
||||
msgstr "_Aplankyti šį failą"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2331
|
||||
#: gtk/gtkfilechooserwidget.c:2334
|
||||
msgid "_Open With File Manager"
|
||||
msgstr "_Atverti failų tvarkyklėje"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2332
|
||||
#: gtk/gtkfilechooserwidget.c:2335
|
||||
msgid "_Copy Location"
|
||||
msgstr "Kopijuoti _vietą"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2333
|
||||
#: gtk/gtkfilechooserwidget.c:2336
|
||||
msgid "_Add to Bookmarks"
|
||||
msgstr "Į_dėti į žymeles"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2334 gtk/gtkplacessidebar.c:2744
|
||||
#: gtk/gtkfilechooserwidget.c:2337 gtk/gtkplacessidebar.c:2744
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:569
|
||||
msgid "_Rename"
|
||||
msgstr "Per_vadinti"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2336
|
||||
#: gtk/gtkfilechooserwidget.c:2339
|
||||
msgid "_Move to Trash"
|
||||
msgstr "_Perkelti į šiukšlinę"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2340
|
||||
#: gtk/gtkfilechooserwidget.c:2343
|
||||
msgid "Show _Hidden Files"
|
||||
msgstr "Rod_yti paslėptus failus"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2341
|
||||
#: gtk/gtkfilechooserwidget.c:2344
|
||||
msgid "Show _Size Column"
|
||||
msgstr "Rodyti _dydžio stulpelį"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2342
|
||||
#: gtk/gtkfilechooserwidget.c:2345
|
||||
msgid "Show T_ype Column"
|
||||
msgstr "Rodyti _tipo stulpelį"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2343
|
||||
#: gtk/gtkfilechooserwidget.c:2346
|
||||
msgid "Show _Time"
|
||||
msgstr "Rodyti _laiką"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2344
|
||||
#: gtk/gtkfilechooserwidget.c:2347
|
||||
msgid "Sort _Folders before Files"
|
||||
msgstr "Rikiuoti _aplankus prieš failus"
|
||||
|
||||
#. this is the header for the location column in the print dialog
|
||||
#: gtk/gtkfilechooserwidget.c:2626 gtk/inspector/css-node-tree.ui:141
|
||||
#: gtk/gtkfilechooserwidget.c:2629 gtk/inspector/css-node-tree.ui:141
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:238 gtk/ui/gtkprintunixdialog.ui:123
|
||||
msgid "Location"
|
||||
msgstr "Vieta"
|
||||
|
||||
#. Label
|
||||
#: gtk/gtkfilechooserwidget.c:2719
|
||||
#: gtk/gtkfilechooserwidget.c:2722
|
||||
msgid "_Name:"
|
||||
msgstr "_Pavadinimas:"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3344 gtk/gtkfilechooserwidget.c:3358
|
||||
#: gtk/gtkfilechooserwidget.c:3347 gtk/gtkfilechooserwidget.c:3361
|
||||
#, c-format
|
||||
msgid "Searching in %s"
|
||||
msgstr "Ieškoma %s"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3364
|
||||
#: gtk/gtkfilechooserwidget.c:3367
|
||||
msgid "Searching"
|
||||
msgstr "Ieškoma"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3371
|
||||
#: gtk/gtkfilechooserwidget.c:3374
|
||||
msgid "Enter location"
|
||||
msgstr "Įveskite vietą"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3373
|
||||
#: gtk/gtkfilechooserwidget.c:3376
|
||||
msgid "Enter location or URL"
|
||||
msgstr "Įveskite vietą arba URL"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4451 gtk/gtkfilechooserwidget.c:7493
|
||||
#: gtk/gtkfilechooserwidget.c:4454 gtk/gtkfilechooserwidget.c:7496
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:278
|
||||
msgid "Modified"
|
||||
msgstr "Pakeista"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4729
|
||||
#: gtk/gtkfilechooserwidget.c:4732
|
||||
#, c-format
|
||||
msgid "Could not read the contents of %s"
|
||||
msgstr "Nepavyko perskaityti %s turinio"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4733
|
||||
#: gtk/gtkfilechooserwidget.c:4736
|
||||
msgid "Could not read the contents of the folder"
|
||||
msgstr "Nepavyko perskaityti aplanko turinio"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4893 gtk/gtkfilechooserwidget.c:4941
|
||||
#: gtk/gtkfilechooserwidget.c:4896 gtk/gtkfilechooserwidget.c:4944
|
||||
msgid "%H:%M"
|
||||
msgstr "%H:%M"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4895 gtk/gtkfilechooserwidget.c:4943
|
||||
#: gtk/gtkfilechooserwidget.c:4898 gtk/gtkfilechooserwidget.c:4946
|
||||
msgid "%l:%M %p"
|
||||
msgstr "%l:%M"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4899
|
||||
#: gtk/gtkfilechooserwidget.c:4902
|
||||
msgid "Yesterday"
|
||||
msgstr "Vakar"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4907
|
||||
#: gtk/gtkfilechooserwidget.c:4910
|
||||
msgid "%-e %b"
|
||||
msgstr "%b %-e"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4911
|
||||
#: gtk/gtkfilechooserwidget.c:4914
|
||||
msgid "%-e %b %Y"
|
||||
msgstr "%Y-%b-%-e"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5010 gtk/gtkfilechooserwidget.c:5018
|
||||
#: gtk/gtkfilechooserwidget.c:5013 gtk/gtkfilechooserwidget.c:5021
|
||||
msgid "Program"
|
||||
msgstr "Programa"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5011
|
||||
#: gtk/gtkfilechooserwidget.c:5014
|
||||
msgid "Audio"
|
||||
msgstr "Garsas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5012 gtk/inspector/visual.ui:230
|
||||
#: gtk/gtkfilechooserwidget.c:5015 gtk/inspector/visual.ui:230
|
||||
#: gtk/ui/gtkfontbutton.ui:13
|
||||
msgid "Font"
|
||||
msgstr "Šriftas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5013 gtk/inspector/visual.ui:488
|
||||
#: gtk/gtkfilechooserwidget.c:5016 gtk/inspector/visual.ui:488
|
||||
msgid "Image"
|
||||
msgstr "Paveikslėlis"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5014
|
||||
#: gtk/gtkfilechooserwidget.c:5017
|
||||
msgid "Archive"
|
||||
msgstr "Archyvas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5015
|
||||
#: gtk/gtkfilechooserwidget.c:5018
|
||||
msgid "Markup"
|
||||
msgstr "Ženklinimas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5016 gtk/gtkfilechooserwidget.c:5017
|
||||
#: gtk/gtkfilechooserwidget.c:5019 gtk/gtkfilechooserwidget.c:5020
|
||||
msgid "Text"
|
||||
msgstr "Tekstas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5019
|
||||
#: gtk/gtkfilechooserwidget.c:5022
|
||||
msgid "Video"
|
||||
msgstr "Vaizdo įrašas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5020
|
||||
#: gtk/gtkfilechooserwidget.c:5023
|
||||
msgid "Contacts"
|
||||
msgstr "Adresatai"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5021
|
||||
#: gtk/gtkfilechooserwidget.c:5024
|
||||
msgid "Calendar"
|
||||
msgstr "Kalendorius"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5022
|
||||
#: gtk/gtkfilechooserwidget.c:5025
|
||||
msgid "Document"
|
||||
msgstr "Dokumentas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5023
|
||||
#: gtk/gtkfilechooserwidget.c:5026
|
||||
msgid "Presentation"
|
||||
msgstr "Pateiktis"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5024
|
||||
#: gtk/gtkfilechooserwidget.c:5027
|
||||
msgid "Spreadsheet"
|
||||
msgstr "Skaičiuoklė"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5055 gtk/gtkfilechooserwidget.c:5244
|
||||
#: gtk/gtkfilechooserwidget.c:5058 gtk/gtkfilechooserwidget.c:5247
|
||||
#: gtk/inspector/prop-editor.c:1689
|
||||
msgid "Unknown"
|
||||
msgstr "Nežinomas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5283 gtk/gtkplacessidebar.c:1097
|
||||
#: gtk/gtkfilechooserwidget.c:5286 gtk/gtkplacessidebar.c:1097
|
||||
msgid "Home"
|
||||
msgstr "Asmeninis aplankas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5780
|
||||
#: gtk/gtkfilechooserwidget.c:5783
|
||||
msgid "Cannot change to folder because it is not local"
|
||||
msgstr "Negalima pakeisti į nurodytą aplanką, nes jis nėra vietinis"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6566 gtk/gtkprintunixdialog.c:665
|
||||
#: gtk/gtkfilechooserwidget.c:6569 gtk/gtkprintunixdialog.c:665
|
||||
#, c-format
|
||||
msgid "A file named “%s” already exists. Do you want to replace it?"
|
||||
msgstr "Failas pavadinimu „%s“ jau yra. Ar norite jį perrašyti?"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6569 gtk/gtkprintunixdialog.c:669
|
||||
#: gtk/gtkfilechooserwidget.c:6572 gtk/gtkprintunixdialog.c:669
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The file already exists in “%s”. Replacing it will overwrite its contents."
|
||||
msgstr "Failas vietoje „%s“ jau yra. Pakeitus jį, jo turinys bus perrašytas."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6574 gtk/gtkprintunixdialog.c:677
|
||||
#: gtk/gtkfilechooserwidget.c:6577 gtk/gtkprintunixdialog.c:677
|
||||
msgid "_Replace"
|
||||
msgstr "_Pakeisti"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6793
|
||||
#: gtk/gtkfilechooserwidget.c:6796
|
||||
msgid "You do not have access to the specified folder."
|
||||
msgstr "Neturite teisių prieiti nurodyto aplanko."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:7416
|
||||
#: gtk/gtkfilechooserwidget.c:7419
|
||||
msgid "Could not send the search request"
|
||||
msgstr "Nepavyko išsiųsti paieškos užklausos"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:7704
|
||||
#: gtk/gtkfilechooserwidget.c:7707
|
||||
msgid "Accessed"
|
||||
msgstr "Prieitas"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:8824 gtk/ui/gtkfilechooserwidget.ui:89
|
||||
#: gtk/gtkfilechooserwidget.c:8827 gtk/ui/gtkfilechooserwidget.ui:89
|
||||
msgid "Create Folder"
|
||||
msgstr "Sukurti aplanką"
|
||||
|
||||
@ -2697,51 +2706,51 @@ msgctxt "font"
|
||||
msgid "None"
|
||||
msgstr "Nėra"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1602
|
||||
#: gtk/gtkfontchooserwidget.c:1604
|
||||
msgid "Width"
|
||||
msgstr "Plotis"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1603
|
||||
#: gtk/gtkfontchooserwidget.c:1605
|
||||
msgid "Weight"
|
||||
msgstr "Svoris"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1604
|
||||
#: gtk/gtkfontchooserwidget.c:1606
|
||||
msgid "Italic"
|
||||
msgstr "Kursyvas"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1605
|
||||
#: gtk/gtkfontchooserwidget.c:1607
|
||||
msgid "Slant"
|
||||
msgstr "Pasviręs"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1606
|
||||
#: gtk/gtkfontchooserwidget.c:1608
|
||||
msgid "Optical Size"
|
||||
msgstr "Optinis dydis"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2306 gtk/inspector/prop-editor.c:1676
|
||||
#: gtk/gtkfontchooserwidget.c:2308 gtk/inspector/prop-editor.c:1676
|
||||
msgid "Default"
|
||||
msgstr "Numatyta"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2353
|
||||
#: gtk/gtkfontchooserwidget.c:2355
|
||||
msgid "Ligatures"
|
||||
msgstr "Ligatūros"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2354
|
||||
#: gtk/gtkfontchooserwidget.c:2356
|
||||
msgid "Letter Case"
|
||||
msgstr "Raidžių registras"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2355
|
||||
#: gtk/gtkfontchooserwidget.c:2357
|
||||
msgid "Number Case"
|
||||
msgstr "Skaitmenų registras"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2356
|
||||
#: gtk/gtkfontchooserwidget.c:2358
|
||||
msgid "Number Spacing"
|
||||
msgstr "Skaitmenų tarpai"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2357
|
||||
#: gtk/gtkfontchooserwidget.c:2359
|
||||
msgid "Number Formatting"
|
||||
msgstr "Skaitmenų formatas"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2358
|
||||
#: gtk/gtkfontchooserwidget.c:2360
|
||||
msgid "Character Variants"
|
||||
msgstr "Simbolių variantai"
|
||||
|
||||
@ -2753,7 +2762,7 @@ msgstr "Nepavyko sukurti OpenGL konteksto"
|
||||
msgid "Application menu"
|
||||
msgstr "Programos meniu"
|
||||
|
||||
#: gtk/gtkheaderbar.c:458 gtk/gtkwindow.c:9356
|
||||
#: gtk/gtkheaderbar.c:458 gtk/gtkwindow.c:9381
|
||||
msgid "Close"
|
||||
msgstr "Užverti"
|
||||
|
||||
@ -2804,12 +2813,12 @@ msgid "Error"
|
||||
msgstr "Klaida"
|
||||
|
||||
#. Open Link
|
||||
#: gtk/gtklabel.c:6668
|
||||
#: gtk/gtklabel.c:6669
|
||||
msgid "_Open Link"
|
||||
msgstr "_Atverti nuorodą"
|
||||
|
||||
#. Copy Link Address
|
||||
#: gtk/gtklabel.c:6677
|
||||
#: gtk/gtklabel.c:6678
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "Kopijuoti _nuorodos adresą"
|
||||
|
||||
@ -4027,24 +4036,24 @@ msgctxt "volume percentage"
|
||||
msgid "%d %%"
|
||||
msgstr "%d %%"
|
||||
|
||||
#: gtk/gtkwindow.c:9304
|
||||
#: gtk/gtkwindow.c:9329
|
||||
msgid "Move"
|
||||
msgstr "Perkelti"
|
||||
|
||||
#: gtk/gtkwindow.c:9312
|
||||
#: gtk/gtkwindow.c:9337
|
||||
msgid "Resize"
|
||||
msgstr "Keisti dydį"
|
||||
|
||||
#: gtk/gtkwindow.c:9343
|
||||
#: gtk/gtkwindow.c:9368
|
||||
msgid "Always on Top"
|
||||
msgstr "Visada viršuje"
|
||||
|
||||
#: gtk/gtkwindow.c:12778
|
||||
#: gtk/gtkwindow.c:12803
|
||||
#, c-format
|
||||
msgid "Do you want to use GTK+ Inspector?"
|
||||
msgstr "Ar norite naudoti GTK+ inspektorių?"
|
||||
|
||||
#: gtk/gtkwindow.c:12780
|
||||
#: gtk/gtkwindow.c:12805
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK+ Inspector is an interactive debugger that lets you explore and modify "
|
||||
@ -4055,7 +4064,7 @@ msgstr ""
|
||||
"keisti GTK+ programos vidurius. Jo naudojimas gali sukelti programai "
|
||||
"problemų ar ją nulaužti."
|
||||
|
||||
#: gtk/gtkwindow.c:12785
|
||||
#: gtk/gtkwindow.c:12810
|
||||
msgid "Don't show this message again"
|
||||
msgstr "Daugiau nerodyti šio pranešimo"
|
||||
|
||||
@ -4150,12 +4159,10 @@ msgid "GDK Backend"
|
||||
msgstr "GDK realizacija"
|
||||
|
||||
#: gtk/inspector/general.ui:115
|
||||
#| msgid "Application"
|
||||
msgid "Application ID"
|
||||
msgstr "Programos ID"
|
||||
|
||||
#: gtk/inspector/general.ui:149
|
||||
#| msgid "Resources"
|
||||
msgid "Resource Path"
|
||||
msgstr "Ištekliaus kelias"
|
||||
|
||||
@ -7755,7 +7762,7 @@ msgid "Vietnamese (VIQR)"
|
||||
msgstr "Vietnamiečių (VIQR)"
|
||||
|
||||
#. ID
|
||||
#: modules/input/imwayland.c:105
|
||||
#: modules/input/imwayland.c:106
|
||||
msgctxt "input method menu"
|
||||
msgid "Wayland"
|
||||
msgstr "Wayland"
|
||||
|
192
po/tr.po
192
po/tr.po
@ -15,22 +15,22 @@
|
||||
# Çağatay Yiğit Şahin <cyigitsahin@outlook.com>, 2017.
|
||||
# Muhammet Kara <muhammetk@gmail.com>, 2014, 2015, 2017.
|
||||
# Furkan Ahmet Kara <furkanahmetkara.fk@gmail.com>, 2018.
|
||||
# Emin Tufan Çetin <etcetin@gmail.com>, 2018, 2019, 2020, 2021, 2022.
|
||||
# Emin Tufan Çetin <etcetin@gmail.com>, 2018-2023.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-11-11 11:16+0000\n"
|
||||
"PO-Revision-Date: 2022-11-15 21:21+0300\n"
|
||||
"POT-Creation-Date: 2023-01-02 15:32+0000\n"
|
||||
"PO-Revision-Date: 2023-01-11 09:56+0300\n"
|
||||
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
|
||||
"Language-Team: Türkçe <gnome-turk@gnome.org>\n"
|
||||
"Language-Team: Turkish <gnome-turk@gnome.org>\n"
|
||||
"Language: tr\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Poedit 3.0.1\n"
|
||||
"Plural-Forms: nplurals=1; plural=0\n"
|
||||
"X-Generator: Gtranslator 42.0\n"
|
||||
|
||||
#: gdk/broadway/gdkbroadway-server.c:144
|
||||
#, c-format
|
||||
@ -137,12 +137,12 @@ msgstr "Pause"
|
||||
#: gdk/keyname-table.h:6847
|
||||
msgctxt "keyboard label"
|
||||
msgid "Scroll_Lock"
|
||||
msgstr "Scroll_Lock"
|
||||
msgstr "Scroll Lock"
|
||||
|
||||
#: gdk/keyname-table.h:6848
|
||||
msgctxt "keyboard label"
|
||||
msgid "Sys_Req"
|
||||
msgstr "Sys_Req"
|
||||
msgstr "Sys Req"
|
||||
|
||||
#: gdk/keyname-table.h:6849
|
||||
msgctxt "keyboard label"
|
||||
@ -152,7 +152,7 @@ msgstr "Escape"
|
||||
#: gdk/keyname-table.h:6850
|
||||
msgctxt "keyboard label"
|
||||
msgid "Multi_key"
|
||||
msgstr "Çoklu_tuş"
|
||||
msgstr "Compose"
|
||||
|
||||
#: gdk/keyname-table.h:6851
|
||||
msgctxt "keyboard label"
|
||||
@ -223,7 +223,7 @@ msgstr "Boşluk (numerik klavye)"
|
||||
#: gdk/keyname-table.h:6865
|
||||
msgctxt "keyboard label"
|
||||
msgid "KP_Tab"
|
||||
msgstr "Tab (numerik klavye)"
|
||||
msgstr "Sekme (numerik klavye)"
|
||||
|
||||
#: gdk/keyname-table.h:6866
|
||||
msgctxt "keyboard label"
|
||||
@ -303,82 +303,82 @@ msgstr "Delete"
|
||||
#: gdk/keyname-table.h:6881
|
||||
msgctxt "keyboard label"
|
||||
msgid "MonBrightnessUp"
|
||||
msgstr "MonParlaklıkArtır"
|
||||
msgstr "Monitör Parlaklığını Artır"
|
||||
|
||||
#: gdk/keyname-table.h:6882
|
||||
msgctxt "keyboard label"
|
||||
msgid "MonBrightnessDown"
|
||||
msgstr "MonParlaklıkAzalt"
|
||||
msgstr "Monitör Parlaklığını Düşür"
|
||||
|
||||
#: gdk/keyname-table.h:6883
|
||||
msgctxt "keyboard label"
|
||||
msgid "KbdBrightnessUp"
|
||||
msgstr "KlavyeParlaklıkArtır"
|
||||
msgstr "Klavye Parlaklığını Artır"
|
||||
|
||||
#: gdk/keyname-table.h:6884
|
||||
msgctxt "keyboard label"
|
||||
msgid "KbdBrightnessDown"
|
||||
msgstr "KlavyeParlaklıkAzalt"
|
||||
msgstr "Klavye Parlaklığını Düşür"
|
||||
|
||||
#: gdk/keyname-table.h:6885
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioMute"
|
||||
msgstr "SesSessiz"
|
||||
msgstr "Sesi Kıs"
|
||||
|
||||
#: gdk/keyname-table.h:6886
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioMicMute"
|
||||
msgstr "SesMikrofonSessiz"
|
||||
msgstr "Mikrofonu Kıs"
|
||||
|
||||
#: gdk/keyname-table.h:6887
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioLowerVolume"
|
||||
msgstr "SesDüşükSes"
|
||||
msgstr "Sesi Azalt"
|
||||
|
||||
#: gdk/keyname-table.h:6888
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioRaiseVolume"
|
||||
msgstr "SesYüksekSes"
|
||||
msgstr "Sesi Artır"
|
||||
|
||||
#: gdk/keyname-table.h:6889
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioPlay"
|
||||
msgstr "SesOynat"
|
||||
msgstr "Sesi Oynat"
|
||||
|
||||
#: gdk/keyname-table.h:6890
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioStop"
|
||||
msgstr "SesDurdur"
|
||||
msgstr "Sesi Durdur"
|
||||
|
||||
#: gdk/keyname-table.h:6891
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioNext"
|
||||
msgstr "SonrakiSes"
|
||||
msgstr "Sonraki Ses"
|
||||
|
||||
#: gdk/keyname-table.h:6892
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioPrev"
|
||||
msgstr "ÖncekiSes"
|
||||
msgstr "Önceki Ses"
|
||||
|
||||
#: gdk/keyname-table.h:6893
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioRecord"
|
||||
msgstr "SesKaydet"
|
||||
msgstr "Ses Kaydet"
|
||||
|
||||
#: gdk/keyname-table.h:6894
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioPause"
|
||||
msgstr "SesDuraklat"
|
||||
msgstr "Sesi Duraklat"
|
||||
|
||||
#: gdk/keyname-table.h:6895
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioRewind"
|
||||
msgstr "SesGeriSar"
|
||||
msgstr "Sesi Geri Sar"
|
||||
|
||||
#: gdk/keyname-table.h:6896
|
||||
msgctxt "keyboard label"
|
||||
msgid "AudioMedia"
|
||||
msgstr "SesOrtam"
|
||||
msgstr "Ses Ortamı"
|
||||
|
||||
#: gdk/keyname-table.h:6897
|
||||
msgctxt "keyboard label"
|
||||
@ -393,7 +393,7 @@ msgstr "Gezgin"
|
||||
#: gdk/keyname-table.h:6899
|
||||
msgctxt "keyboard label"
|
||||
msgid "Calculator"
|
||||
msgstr "HesapMakinesi"
|
||||
msgstr "Hesap Makinesi"
|
||||
|
||||
#: gdk/keyname-table.h:6900
|
||||
msgctxt "keyboard label"
|
||||
@ -408,7 +408,7 @@ msgstr "WWW"
|
||||
#: gdk/keyname-table.h:6902
|
||||
msgctxt "keyboard label"
|
||||
msgid "Search"
|
||||
msgstr "Arama"
|
||||
msgstr "Ara"
|
||||
|
||||
#: gdk/keyname-table.h:6903
|
||||
msgctxt "keyboard label"
|
||||
@ -418,7 +418,7 @@ msgstr "Araçlar"
|
||||
#: gdk/keyname-table.h:6904
|
||||
msgctxt "keyboard label"
|
||||
msgid "ScreenSaver"
|
||||
msgstr "EkranKoruyucu"
|
||||
msgstr "Ekran Koruyucu"
|
||||
|
||||
#: gdk/keyname-table.h:6905
|
||||
msgctxt "keyboard label"
|
||||
@ -428,7 +428,7 @@ msgstr "Pil"
|
||||
#: gdk/keyname-table.h:6906
|
||||
msgctxt "keyboard label"
|
||||
msgid "Launch1"
|
||||
msgstr "Başlat1"
|
||||
msgstr "Başlat 1"
|
||||
|
||||
#: gdk/keyname-table.h:6907
|
||||
msgctxt "keyboard label"
|
||||
@ -448,17 +448,17 @@ msgstr "Uyku"
|
||||
#: gdk/keyname-table.h:6910
|
||||
msgctxt "keyboard label"
|
||||
msgid "Hibernate"
|
||||
msgstr "DerinUyku"
|
||||
msgstr "Derin Uyku"
|
||||
|
||||
#: gdk/keyname-table.h:6911
|
||||
msgctxt "keyboard label"
|
||||
msgid "WLAN"
|
||||
msgstr "KablosuzAğ"
|
||||
msgstr "Kablosuz Ağ"
|
||||
|
||||
#: gdk/keyname-table.h:6912
|
||||
msgctxt "keyboard label"
|
||||
msgid "WebCam"
|
||||
msgstr "WebKamerası"
|
||||
msgstr "Web Kamerası"
|
||||
|
||||
#: gdk/keyname-table.h:6913
|
||||
msgctxt "keyboard label"
|
||||
@ -468,7 +468,7 @@ msgstr "Ekran"
|
||||
#: gdk/keyname-table.h:6914
|
||||
msgctxt "keyboard label"
|
||||
msgid "TouchpadToggle"
|
||||
msgstr "DokunmatikFareGeçişi"
|
||||
msgstr "Dokunmatik Fare Geçişi"
|
||||
|
||||
#: gdk/keyname-table.h:6915
|
||||
msgctxt "keyboard label"
|
||||
@ -478,7 +478,7 @@ msgstr "Uyan"
|
||||
#: gdk/keyname-table.h:6916
|
||||
msgctxt "keyboard label"
|
||||
msgid "Suspend"
|
||||
msgstr "AskıyaAl"
|
||||
msgstr "Askıya Al"
|
||||
|
||||
#: gdk/quartz/gdkglcontext-quartz.c:123
|
||||
msgid "Unable to create a GL pixel format"
|
||||
@ -1218,7 +1218,7 @@ msgstr ""
|
||||
|
||||
#: gtk/deprecated/gtkcolorseldialog.c:191 gtk/deprecated/gtkfontsel.c:1689
|
||||
#: gtk/gtkfilechoosernative.c:545 gtk/gtkfilechoosernative.c:637
|
||||
#: gtk/gtkfilechooserwidget.c:1499 gtk/gtkfilechooserwidget.c:6573
|
||||
#: gtk/gtkfilechooserwidget.c:1502 gtk/gtkfilechooserwidget.c:6576
|
||||
#: gtk/gtkmessagedialog.c:952 gtk/gtkmessagedialog.c:965
|
||||
#: gtk/gtkmountoperation.c:594 gtk/gtkpagesetupunixdialog.c:197
|
||||
#: gtk/gtkprintbackend.c:779 gtk/gtkprinteroptionwidget.c:545
|
||||
@ -2255,24 +2255,24 @@ msgstr "_Sağ:"
|
||||
msgid "Paper Margins"
|
||||
msgstr "Kağıt Boşlukları"
|
||||
|
||||
#: gtk/gtkentry.c:9596 gtk/gtklabel.c:6687 gtk/gtktextview.c:9528
|
||||
#: gtk/gtkentry.c:9596 gtk/gtklabel.c:6688 gtk/gtktextview.c:9528
|
||||
msgid "Cu_t"
|
||||
msgstr "Ke_s"
|
||||
|
||||
#: gtk/gtkentry.c:9600 gtk/gtklabel.c:6688 gtk/gtktextview.c:9532
|
||||
#: gtk/gtkentry.c:9600 gtk/gtklabel.c:6689 gtk/gtktextview.c:9532
|
||||
msgid "_Copy"
|
||||
msgstr "_Kopyala"
|
||||
|
||||
#: gtk/gtkentry.c:9604 gtk/gtklabel.c:6689 gtk/gtktextview.c:9534
|
||||
#: gtk/gtkentry.c:9604 gtk/gtklabel.c:6690 gtk/gtktextview.c:9534
|
||||
msgid "_Paste"
|
||||
msgstr "_Yapıştır"
|
||||
|
||||
#: gtk/gtkentry.c:9607 gtk/gtkfilechooserwidget.c:1500
|
||||
#: gtk/gtkfilechooserwidget.c:2335 gtk/gtklabel.c:6691 gtk/gtktextview.c:9537
|
||||
#: gtk/gtkentry.c:9607 gtk/gtkfilechooserwidget.c:1503
|
||||
#: gtk/gtkfilechooserwidget.c:2338 gtk/gtklabel.c:6692 gtk/gtktextview.c:9537
|
||||
msgid "_Delete"
|
||||
msgstr "_Sil"
|
||||
|
||||
#: gtk/gtkentry.c:9618 gtk/gtklabel.c:6700 gtk/gtktextview.c:9551
|
||||
#: gtk/gtkentry.c:9618 gtk/gtklabel.c:6701 gtk/gtktextview.c:9551
|
||||
msgid "Select _All"
|
||||
msgstr "_Tümünü Seç"
|
||||
|
||||
@ -2462,205 +2462,205 @@ msgstr "Adı “.” ile başlayan klasörler gizlidir"
|
||||
msgid "File names starting with a “.” are hidden"
|
||||
msgstr "Adı “.” ile başlayan dosyalar gizlidir"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1495
|
||||
#: gtk/gtkfilechooserwidget.c:1498
|
||||
#, c-format
|
||||
msgid "Are you sure you want to permanently delete “%s”?"
|
||||
msgstr "“%s”i kalıcı olarak silmek istediğinizden emin misiniz?"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1498
|
||||
#: gtk/gtkfilechooserwidget.c:1501
|
||||
#, c-format
|
||||
msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "Eğer bir öge silerseniz kalıcı olarak kaybolur."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1635
|
||||
#: gtk/gtkfilechooserwidget.c:1638
|
||||
msgid "The file could not be renamed"
|
||||
msgstr "Dosya yeniden adlandırılamadı"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1980
|
||||
#: gtk/gtkfilechooserwidget.c:1983
|
||||
msgid "Could not select file"
|
||||
msgstr "Dosya seçilemedi"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2330
|
||||
#: gtk/gtkfilechooserwidget.c:2333
|
||||
msgid "_Visit File"
|
||||
msgstr "Dosyayı _Ziyaret Et"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2331
|
||||
#: gtk/gtkfilechooserwidget.c:2334
|
||||
msgid "_Open With File Manager"
|
||||
msgstr "Dosya Yöneticisiyle _Aç"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2332
|
||||
#: gtk/gtkfilechooserwidget.c:2335
|
||||
msgid "_Copy Location"
|
||||
msgstr "Konumu _Kopyala"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2333
|
||||
#: gtk/gtkfilechooserwidget.c:2336
|
||||
msgid "_Add to Bookmarks"
|
||||
msgstr "Yer İmlerine _Ekle"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2334 gtk/gtkplacessidebar.c:2744
|
||||
#: gtk/gtkfilechooserwidget.c:2337 gtk/gtkplacessidebar.c:2744
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:569
|
||||
msgid "_Rename"
|
||||
msgstr "_Yeniden Adlandır"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2336
|
||||
#: gtk/gtkfilechooserwidget.c:2339
|
||||
msgid "_Move to Trash"
|
||||
msgstr "_Çöpe Taşı"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2340
|
||||
#: gtk/gtkfilechooserwidget.c:2343
|
||||
msgid "Show _Hidden Files"
|
||||
msgstr "_Gizli Dosyaları Göster"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2341
|
||||
#: gtk/gtkfilechooserwidget.c:2344
|
||||
msgid "Show _Size Column"
|
||||
msgstr "_Boyut Sütununu Göster"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2342
|
||||
#: gtk/gtkfilechooserwidget.c:2345
|
||||
msgid "Show T_ype Column"
|
||||
msgstr "_Tür Sütununu Göster"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2343
|
||||
#: gtk/gtkfilechooserwidget.c:2346
|
||||
msgid "Show _Time"
|
||||
msgstr "_Saati Göster"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:2344
|
||||
#: gtk/gtkfilechooserwidget.c:2347
|
||||
msgid "Sort _Folders before Files"
|
||||
msgstr "_Klasörleri Dosyalardan Önce Sırala"
|
||||
|
||||
#. this is the header for the location column in the print dialog
|
||||
#: gtk/gtkfilechooserwidget.c:2626 gtk/inspector/css-node-tree.ui:141
|
||||
#: gtk/gtkfilechooserwidget.c:2629 gtk/inspector/css-node-tree.ui:141
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:238 gtk/ui/gtkprintunixdialog.ui:123
|
||||
msgid "Location"
|
||||
msgstr "Konum"
|
||||
|
||||
#. Label
|
||||
#: gtk/gtkfilechooserwidget.c:2719
|
||||
#: gtk/gtkfilechooserwidget.c:2722
|
||||
msgid "_Name:"
|
||||
msgstr "_Ad:"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3344 gtk/gtkfilechooserwidget.c:3358
|
||||
#: gtk/gtkfilechooserwidget.c:3347 gtk/gtkfilechooserwidget.c:3361
|
||||
#, c-format
|
||||
msgid "Searching in %s"
|
||||
msgstr "%s içinde arama"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3364
|
||||
#: gtk/gtkfilechooserwidget.c:3367
|
||||
msgid "Searching"
|
||||
msgstr "Arama"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3371
|
||||
#: gtk/gtkfilechooserwidget.c:3374
|
||||
msgid "Enter location"
|
||||
msgstr "Konum gir"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:3373
|
||||
#: gtk/gtkfilechooserwidget.c:3376
|
||||
msgid "Enter location or URL"
|
||||
msgstr "Konum ya da URL gir"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4451 gtk/gtkfilechooserwidget.c:7493
|
||||
#: gtk/gtkfilechooserwidget.c:4454 gtk/gtkfilechooserwidget.c:7496
|
||||
#: gtk/ui/gtkfilechooserwidget.ui:278
|
||||
msgid "Modified"
|
||||
msgstr "Değiştirilmiş"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4729
|
||||
#: gtk/gtkfilechooserwidget.c:4732
|
||||
#, c-format
|
||||
msgid "Could not read the contents of %s"
|
||||
msgstr "%s içerikleri okunamadı"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4733
|
||||
#: gtk/gtkfilechooserwidget.c:4736
|
||||
msgid "Could not read the contents of the folder"
|
||||
msgstr "Klasörün içeriği okunamadı"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4893 gtk/gtkfilechooserwidget.c:4941
|
||||
#: gtk/gtkfilechooserwidget.c:4896 gtk/gtkfilechooserwidget.c:4944
|
||||
msgid "%H:%M"
|
||||
msgstr "%H:%M"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4895 gtk/gtkfilechooserwidget.c:4943
|
||||
#: gtk/gtkfilechooserwidget.c:4898 gtk/gtkfilechooserwidget.c:4946
|
||||
msgid "%l:%M %p"
|
||||
msgstr "%l:%M %p"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4899
|
||||
#: gtk/gtkfilechooserwidget.c:4902
|
||||
msgid "Yesterday"
|
||||
msgstr "Dün"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4907
|
||||
#: gtk/gtkfilechooserwidget.c:4910
|
||||
msgid "%-e %b"
|
||||
msgstr "%-e %b"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4911
|
||||
#: gtk/gtkfilechooserwidget.c:4914
|
||||
msgid "%-e %b %Y"
|
||||
msgstr "%-e %b %Y"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5010 gtk/gtkfilechooserwidget.c:5018
|
||||
#: gtk/gtkfilechooserwidget.c:5013 gtk/gtkfilechooserwidget.c:5021
|
||||
msgid "Program"
|
||||
msgstr "Uygulama"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5011
|
||||
#: gtk/gtkfilechooserwidget.c:5014
|
||||
msgid "Audio"
|
||||
msgstr "Ses"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5012 gtk/inspector/visual.ui:230
|
||||
#: gtk/gtkfilechooserwidget.c:5015 gtk/inspector/visual.ui:230
|
||||
#: gtk/ui/gtkfontbutton.ui:13
|
||||
msgid "Font"
|
||||
msgstr "Yazı Tipi"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5013 gtk/inspector/visual.ui:488
|
||||
#: gtk/gtkfilechooserwidget.c:5016 gtk/inspector/visual.ui:488
|
||||
msgid "Image"
|
||||
msgstr "Görüntü"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5014
|
||||
#: gtk/gtkfilechooserwidget.c:5017
|
||||
msgid "Archive"
|
||||
msgstr "Arşiv"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5015
|
||||
#: gtk/gtkfilechooserwidget.c:5018
|
||||
msgid "Markup"
|
||||
msgstr "İşaretleme"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5016 gtk/gtkfilechooserwidget.c:5017
|
||||
#: gtk/gtkfilechooserwidget.c:5019 gtk/gtkfilechooserwidget.c:5020
|
||||
msgid "Text"
|
||||
msgstr "Metin"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5019
|
||||
#: gtk/gtkfilechooserwidget.c:5022
|
||||
msgid "Video"
|
||||
msgstr "Video"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5020
|
||||
#: gtk/gtkfilechooserwidget.c:5023
|
||||
msgid "Contacts"
|
||||
msgstr "Kişiler"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5021
|
||||
#: gtk/gtkfilechooserwidget.c:5024
|
||||
msgid "Calendar"
|
||||
msgstr "Takvim"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5022
|
||||
#: gtk/gtkfilechooserwidget.c:5025
|
||||
msgid "Document"
|
||||
msgstr "Belge"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5023
|
||||
#: gtk/gtkfilechooserwidget.c:5026
|
||||
msgid "Presentation"
|
||||
msgstr "Sunum"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5024
|
||||
#: gtk/gtkfilechooserwidget.c:5027
|
||||
msgid "Spreadsheet"
|
||||
msgstr "Çizelge"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5055 gtk/gtkfilechooserwidget.c:5244
|
||||
#: gtk/gtkfilechooserwidget.c:5058 gtk/gtkfilechooserwidget.c:5247
|
||||
#: gtk/inspector/prop-editor.c:1689
|
||||
msgid "Unknown"
|
||||
msgstr "Bilinmeyen"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5283 gtk/gtkplacessidebar.c:1097
|
||||
#: gtk/gtkfilechooserwidget.c:5286 gtk/gtkplacessidebar.c:1097
|
||||
msgid "Home"
|
||||
msgstr "Ev"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:5780
|
||||
#: gtk/gtkfilechooserwidget.c:5783
|
||||
msgid "Cannot change to folder because it is not local"
|
||||
msgstr "Klasör yerel olmadığı için değiştirilemiyor"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6566 gtk/gtkprintunixdialog.c:665
|
||||
#: gtk/gtkfilechooserwidget.c:6569 gtk/gtkprintunixdialog.c:665
|
||||
#, c-format
|
||||
msgid "A file named “%s” already exists. Do you want to replace it?"
|
||||
msgstr ""
|
||||
"\"%s\" adında bir dosya zaten var. Var olan dosya ile değiştirmek ister "
|
||||
"misiniz?"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6569 gtk/gtkprintunixdialog.c:669
|
||||
#: gtk/gtkfilechooserwidget.c:6572 gtk/gtkprintunixdialog.c:669
|
||||
#, c-format
|
||||
msgid ""
|
||||
"The file already exists in “%s”. Replacing it will overwrite its contents."
|
||||
@ -2668,23 +2668,23 @@ msgstr ""
|
||||
"\"%s\" adında bir dosya zaten var. Onun yerine koymak, dosya içeriğinin "
|
||||
"üzerine yazacak."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6574 gtk/gtkprintunixdialog.c:677
|
||||
#: gtk/gtkfilechooserwidget.c:6577 gtk/gtkprintunixdialog.c:677
|
||||
msgid "_Replace"
|
||||
msgstr "_Yerine Koy"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:6793
|
||||
#: gtk/gtkfilechooserwidget.c:6796
|
||||
msgid "You do not have access to the specified folder."
|
||||
msgstr "Belirtilen klasöre erişiminiz yok."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:7416
|
||||
#: gtk/gtkfilechooserwidget.c:7419
|
||||
msgid "Could not send the search request"
|
||||
msgstr "Arama isteği gönderilemedi"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:7704
|
||||
#: gtk/gtkfilechooserwidget.c:7707
|
||||
msgid "Accessed"
|
||||
msgstr "Erişildi"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:8824 gtk/ui/gtkfilechooserwidget.ui:89
|
||||
#: gtk/gtkfilechooserwidget.c:8827 gtk/ui/gtkfilechooserwidget.ui:89
|
||||
msgid "Create Folder"
|
||||
msgstr "Klasör Oluştur"
|
||||
|
||||
@ -2817,12 +2817,12 @@ msgid "Error"
|
||||
msgstr "Hata"
|
||||
|
||||
#. Open Link
|
||||
#: gtk/gtklabel.c:6668
|
||||
#: gtk/gtklabel.c:6669
|
||||
msgid "_Open Link"
|
||||
msgstr "Bağlantı _Aç"
|
||||
|
||||
#. Copy Link Address
|
||||
#: gtk/gtklabel.c:6677
|
||||
#: gtk/gtklabel.c:6678
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "_Bağlantı Adresini Kopyala"
|
||||
|
||||
|
@ -36,7 +36,7 @@ gtk_tests = [
|
||||
['testcombo'],
|
||||
['testcombochange'],
|
||||
['testdialog'],
|
||||
['testdnd'],
|
||||
['testdnd2'],
|
||||
['testellipsise'],
|
||||
['testemblems'],
|
||||
['testentrycompletion'],
|
||||
@ -45,6 +45,7 @@ gtk_tests = [
|
||||
['testexpander'],
|
||||
['testfilechooserbutton'],
|
||||
['testfilechooser'],
|
||||
['testfileportal'],
|
||||
['testflowbox'],
|
||||
['testfontchooser'],
|
||||
['testfontoptions'],
|
||||
|
130
tests/testfileportal.c
Normal file
130
tests/testfileportal.c
Normal file
@ -0,0 +1,130 @@
|
||||
/* simple.c
|
||||
* Copyright (C) 1997 Red Hat, Inc
|
||||
* Author: Elliot Lee
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library 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
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
drag_begin_cb (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
gpointer data)
|
||||
{
|
||||
char **uris;
|
||||
char *cwd;
|
||||
|
||||
cwd = g_get_current_dir ();
|
||||
uris = g_new0 (char *, 2);
|
||||
uris[0] = g_strconcat ("file://", cwd, "/README.md", NULL);
|
||||
g_free (cwd);
|
||||
|
||||
g_signal_handlers_disconnect_by_func (widget, drag_begin_cb, NULL);
|
||||
gtk_drag_set_icon_default (context);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (widget), "uris", g_strdupv ((char **)uris), (GDestroyNotify) g_strfreev);
|
||||
}
|
||||
|
||||
static void
|
||||
drag_data_get (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
GtkSelectionData *selection,
|
||||
unsigned int target_info,
|
||||
unsigned int time,
|
||||
gpointer data)
|
||||
{
|
||||
char **uris = (char **)g_object_get_data (G_OBJECT (widget), "uris");
|
||||
|
||||
gtk_selection_data_set_uris (selection, uris);
|
||||
|
||||
g_object_set_data (G_OBJECT (widget), "uris", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
drag_data_received (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
int x,
|
||||
int y,
|
||||
GtkSelectionData *selection_data,
|
||||
unsigned int info,
|
||||
unsigned int time,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkLabel *label = user_data;
|
||||
char **uris;
|
||||
|
||||
uris = gtk_selection_data_get_uris (selection_data);
|
||||
|
||||
if (uris)
|
||||
{
|
||||
gtk_label_set_label (label, uris[0]);
|
||||
g_strfreev (uris);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window, *label, *eventbox, *box;
|
||||
GtkTargetEntry targets[] = {
|
||||
{ "application/vnd.portal.files", 0, 0 },
|
||||
};
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
window = g_object_connect (g_object_new (gtk_window_get_type (),
|
||||
"type", GTK_WINDOW_TOPLEVEL,
|
||||
"title", "hello world",
|
||||
"resizable", FALSE,
|
||||
"border_width", 10,
|
||||
NULL),
|
||||
"signal::destroy", gtk_main_quit, NULL,
|
||||
NULL);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_widget_show (box);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
eventbox = gtk_event_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (box), eventbox);
|
||||
gtk_widget_show (eventbox);
|
||||
gtk_event_box_set_above_child (GTK_EVENT_BOX (eventbox), TRUE);
|
||||
|
||||
label = gtk_label_new ("drag me");
|
||||
gtk_container_add (GTK_CONTAINER (eventbox), label);
|
||||
|
||||
gtk_drag_source_set (eventbox, GDK_BUTTON1_MASK, targets, G_N_ELEMENTS (targets), GDK_ACTION_COPY);
|
||||
g_signal_connect (eventbox, "drag-begin", G_CALLBACK (drag_begin_cb), NULL);
|
||||
g_signal_connect (eventbox, "drag-data-get", G_CALLBACK (drag_data_get), NULL);
|
||||
gtk_widget_show (label);
|
||||
|
||||
eventbox = gtk_event_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (box), eventbox);
|
||||
gtk_widget_show (eventbox);
|
||||
gtk_event_box_set_above_child (GTK_EVENT_BOX (eventbox), TRUE);
|
||||
|
||||
label = gtk_label_new ("drop here");
|
||||
gtk_widget_show (label);
|
||||
gtk_container_add (GTK_CONTAINER (eventbox), label);
|
||||
gtk_drag_dest_set (eventbox, GTK_DEST_DEFAULT_ALL, targets, G_N_ELEMENTS (targets), GDK_ACTION_COPY);
|
||||
|
||||
g_signal_connect (eventbox, "drag-data-received", G_CALLBACK (drag_data_received), label);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
}
|
@ -55,14 +55,13 @@ test_one_accel (const char *accel,
|
||||
*keycodes,
|
||||
mods);
|
||||
|
||||
g_print ("accel %s, label %s\n", accel, label);
|
||||
|
||||
g_assert_cmpstr (label, ==, exp_label);
|
||||
|
||||
name = gtk_accelerator_name_with_keycode (NULL,
|
||||
accel_key,
|
||||
*keycodes,
|
||||
mods);
|
||||
g_print ("accel %s, label %s, name %s, modes %d\n", accel, label, name, mods);
|
||||
|
||||
g_assert_cmpstr (label, ==, exp_label);
|
||||
g_assert_cmpstr (name, ==, accel);
|
||||
|
||||
g_free (keycodes);
|
||||
|
@ -458,9 +458,6 @@ main (int argc, char **argv)
|
||||
const GType *otypes;
|
||||
guint i;
|
||||
gchar *schema_dir;
|
||||
GTestDBus *bus;
|
||||
GMainLoop *loop;
|
||||
gint result;
|
||||
|
||||
/* These must be set before before gtk_test_init */
|
||||
g_setenv ("GIO_USE_VFS", "local", TRUE);
|
||||
@ -475,12 +472,6 @@ main (int argc, char **argv)
|
||||
if (g_getenv ("GTK_TEST_MESON") == NULL)
|
||||
g_setenv ("GSETTINGS_SCHEMA_DIR", schema_dir, TRUE);
|
||||
|
||||
/* Create one test bus for all tests, as we have a lot of very small
|
||||
* and quick tests.
|
||||
*/
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
g_test_dbus_up (bus);
|
||||
|
||||
otypes = gtk_test_list_all_types (NULL);
|
||||
for (i = 0; otypes[i]; i++)
|
||||
{
|
||||
@ -497,19 +488,5 @@ main (int argc, char **argv)
|
||||
g_free (testname);
|
||||
}
|
||||
|
||||
result = g_test_run();
|
||||
|
||||
/* Work around the annoying issue that g_test_dbus_down is giving
|
||||
* us an "Error while sending AddMatch" that comes out of an idle
|
||||
*/
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
g_timeout_add (1000, (GSourceFunc)g_main_loop_quit, loop);
|
||||
g_main_loop_run (loop);
|
||||
g_main_loop_unref (loop);
|
||||
|
||||
g_test_dbus_down (bus);
|
||||
g_object_unref (bus);
|
||||
g_free (schema_dir);
|
||||
|
||||
return result;
|
||||
return g_test_run();
|
||||
}
|
||||
|
@ -79,8 +79,7 @@ main (int argc, char **argv)
|
||||
const GType *all_types;
|
||||
guint n_types = 0, i;
|
||||
gchar *schema_dir;
|
||||
GTestDBus *bus;
|
||||
gint result;
|
||||
int result;
|
||||
|
||||
/* These must be set before before gtk_test_init */
|
||||
g_setenv ("GIO_USE_VFS", "local", TRUE);
|
||||
@ -95,12 +94,6 @@ main (int argc, char **argv)
|
||||
if (g_getenv ("GTK_TEST_MESON") == NULL)
|
||||
g_setenv ("GSETTINGS_SCHEMA_DIR", schema_dir, TRUE);
|
||||
|
||||
/* Create one test bus for all tests, as we have a lot of very small
|
||||
* and quick tests.
|
||||
*/
|
||||
bus = g_test_dbus_new (G_TEST_DBUS_NONE);
|
||||
g_test_dbus_up (bus);
|
||||
|
||||
all_types = gtk_test_list_all_types (&n_types);
|
||||
|
||||
for (i = 0; i < n_types; i++)
|
||||
@ -133,8 +126,6 @@ main (int argc, char **argv)
|
||||
|
||||
result = g_test_run();
|
||||
|
||||
g_test_dbus_down (bus);
|
||||
g_object_unref (bus);
|
||||
g_free (schema_dir);
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user