Compare commits
82 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 127685ef22 | |||
| be81f6b4ab | |||
| 716e0b97bd | |||
| ff862dc926 | |||
| 17c2a1cb4e | |||
| 895e640fd0 | |||
| e8f5f86ad5 | |||
| 5055b41ee7 | |||
| 7efd08ca2e | |||
| 76b421e064 | |||
| 063e6baa0a | |||
| 9e5d412a8b | |||
| fa9b634d8f | |||
| d76379428d | |||
| 46509b6dd2 | |||
| 89dbf9cc81 | |||
| c138aaabf3 | |||
| 7cef454c86 | |||
| 5cb8d15505 | |||
| 2aab55983d | |||
| 31714e5c1d | |||
| 96c351e792 | |||
| edd57004d3 | |||
| 234d20641c | |||
| dd802f21e7 | |||
| dbbc990c72 | |||
| 3a6e772cba | |||
| c9fa16fcfa | |||
| 07b04fbea9 | |||
| 1c633cbea2 | |||
| 2f685d5d2a | |||
| 0fdf2cc195 | |||
| 4f7d18a28f | |||
| c77272a7d7 | |||
| 7a1004df73 | |||
| 0e86d2b345 | |||
| 2441bdb900 | |||
| 57679b7b7f | |||
| 37063e7a05 | |||
| 791dc7b9be | |||
| ff24dfb2e7 | |||
| 4db60fa5a8 | |||
| 5301367630 | |||
| 9409b7ef7d | |||
| afeb7f668b | |||
| 38b8da0f5f | |||
| d029b62d23 | |||
| 1e9bdb4647 | |||
| 1d72024605 | |||
| 06570443b7 | |||
| 77f7caf18d | |||
| 8767ffde2f | |||
| d58b7fa779 | |||
| dcbf3f8879 | |||
| 30d8c8e17c | |||
| b803bb5edb | |||
| 985a39d41f | |||
| f846eec894 | |||
| e7fc8ad1f5 | |||
| 95169ad54b | |||
| ddb2e91a42 | |||
| 90357193c9 | |||
| a336fe2850 | |||
| fcb8e4cf37 | |||
| b7b6c147f9 | |||
| 35ee82ca07 | |||
| 2dc56a6e9b | |||
| e12ef76de5 | |||
| 536b05e35b | |||
| 1354854d23 | |||
| 2b062d60f2 | |||
| c8bdb4c7fb | |||
| 80328e8a4f | |||
| 1138e3770b | |||
| ec58013b22 | |||
| 70cb61fb71 | |||
| 8e6a0ec23d | |||
| e2ab334636 | |||
| ac210c1765 | |||
| c58e48e648 | |||
| acdadab617 | |||
| a619e8af4a |
@@ -1,3 +1,39 @@
|
||||
Overview of Changes
|
||||
===================
|
||||
|
||||
* GtkProgressBar:
|
||||
- Fix handling of "inverted"
|
||||
|
||||
* GtkLabel:
|
||||
- Add a "natural wrap mode" property to influence how
|
||||
natural width is determined
|
||||
|
||||
* GtkTextView
|
||||
- Scroll insertion on-screen after undo / redo
|
||||
|
||||
* gsk:
|
||||
- Abort region diffing when changes are too complex
|
||||
|
||||
* gdk:
|
||||
- Avoid compressing discrete scroll events
|
||||
- Fix problems with hiding windows
|
||||
- Improve GL and GLES version checks
|
||||
|
||||
* Wayland:
|
||||
- Support new high-contrast setting
|
||||
|
||||
* Inspector:
|
||||
- Add DND inspection support
|
||||
|
||||
* build:
|
||||
- Avoid deprecated meson apis
|
||||
|
||||
* Translation updates
|
||||
Galician
|
||||
Portuguese
|
||||
Ukrainian
|
||||
|
||||
|
||||
Overview of Changes in 4.5.1, 16-12-2021
|
||||
========================================
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ gdk_content_deserializer_get_priority (GdkContentDeserializer *deserializer)
|
||||
*
|
||||
* This is the `GCancellable` that was passed to [func@Gdk.content_deserialize_async].
|
||||
*
|
||||
* Returns: (transfer none): the cancellable for the current operation
|
||||
* Returns: (transfer none) (nullable): the cancellable for the current operation
|
||||
*/
|
||||
GCancellable *
|
||||
gdk_content_deserializer_get_cancellable (GdkContentDeserializer *deserializer)
|
||||
|
||||
@@ -270,7 +270,7 @@ gdk_content_serializer_get_priority (GdkContentSerializer *serializer)
|
||||
*
|
||||
* This is the `GCancellable` that was passed to [func@content_serialize_async].
|
||||
*
|
||||
* Returns: (transfer none): the cancellable for the current operation
|
||||
* Returns: (transfer none) (nullable): the cancellable for the current operation
|
||||
*/
|
||||
GCancellable *
|
||||
gdk_content_serializer_get_cancellable (GdkContentSerializer *serializer)
|
||||
|
||||
+1
-2
@@ -47,8 +47,7 @@
|
||||
* Cursors by themselves are not very interesting: they must be bound to a
|
||||
* window for users to see them. This is done with [method@Gdk.Surface.set_cursor]
|
||||
* or [method@Gdk.Surface.set_device_cursor]. Applications will typically
|
||||
* use higher-level GTK functions such as [method@Gtk.Widget.set_cursor]`
|
||||
* instead.
|
||||
* use higher-level GTK functions such as [method@Gtk.Widget.set_cursor] instead.
|
||||
*
|
||||
* Cursors are not bound to a given [class@Gdk.Display], so they can be shared.
|
||||
* However, the appearance of cursors may vary when used on different
|
||||
|
||||
+1
-1
@@ -1225,7 +1225,7 @@ gdk_event_get_event_type (GdkEvent *event)
|
||||
*
|
||||
* Extracts the surface associated with an event.
|
||||
*
|
||||
* Returns: (transfer none): The `GdkSurface` associated with the event
|
||||
* Returns: (transfer none) (nullable): The `GdkSurface` associated with the event
|
||||
*/
|
||||
GdkSurface *
|
||||
gdk_event_get_surface (GdkEvent *event)
|
||||
|
||||
+1
-1
@@ -187,7 +187,7 @@ gdk_popup_get_rect_anchor (GdkPopup *popup)
|
||||
*
|
||||
* Returns the parent surface of a popup.
|
||||
*
|
||||
* Returns: (transfer none): the parent surface
|
||||
* Returns: (transfer none) (nullable): the parent surface
|
||||
*/
|
||||
GdkSurface *
|
||||
gdk_popup_get_parent (GdkPopup *popup)
|
||||
|
||||
+1
-1
@@ -454,7 +454,7 @@ gdk_texture_new_from_resource (const char *resource_path)
|
||||
texture = NULL;
|
||||
|
||||
if (texture == NULL)
|
||||
g_error ("Resource path %s s not a valid image: %s", resource_path, error->message);
|
||||
g_error ("Resource path %s is not a valid image: %s", resource_path, error->message);
|
||||
|
||||
return texture;
|
||||
}
|
||||
|
||||
@@ -2110,7 +2110,11 @@ set_theme_from_entry (GdkDisplay *display,
|
||||
GSettingsSchema *schema = NULL;
|
||||
gboolean hc = FALSE;
|
||||
|
||||
settings = (GSettings *)g_hash_table_lookup (display_wayland->settings, "org.gnome.desktop.a11y.interface");
|
||||
if (display_wayland->settings_portal == NULL)
|
||||
{
|
||||
settings = (GSettings *)g_hash_table_lookup (display_wayland->settings,
|
||||
"org.gnome.desktop.a11y.interface");
|
||||
}
|
||||
|
||||
if (settings)
|
||||
g_object_get (settings, "settings-schema", &schema, NULL);
|
||||
|
||||
@@ -1,406 +0,0 @@
|
||||
/* GDK - The GIMP Drawing Kit
|
||||
* Copyright (C) 2001 Stefan Ondrejicka
|
||||
*
|
||||
* 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 <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
int id;
|
||||
char *bitmap;
|
||||
int hotx;
|
||||
int hoty;
|
||||
} font_info_t;
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
int id;
|
||||
int width;
|
||||
int height;
|
||||
int hotx;
|
||||
int hoty;
|
||||
char *data;
|
||||
} cursor_info_t;
|
||||
|
||||
static GSList *fonts = NULL;
|
||||
static GSList *cursors = NULL;
|
||||
|
||||
static int dw,dh;
|
||||
|
||||
static gboolean debug = FALSE;
|
||||
|
||||
#define HEX(c) (((c) >= '0' && (c) <= '9') ? \
|
||||
((c) - '0') : (toupper(c) - 'A' + 10))
|
||||
|
||||
static void print_font(fi)
|
||||
font_info_t *fi;
|
||||
{
|
||||
int x,y;
|
||||
|
||||
for (y = 0; y < dh; y++)
|
||||
{
|
||||
for (x = 0; x < dw; x++)
|
||||
{
|
||||
printf(fi->bitmap[y*dw+x]? "X" : " ");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void print_cursor(ci)
|
||||
cursor_info_t *ci;
|
||||
{
|
||||
int x,y;
|
||||
|
||||
for (y = 0; y < ci->height; y++)
|
||||
{
|
||||
printf("/* ");
|
||||
for (x = 0; x < ci->width; x++)
|
||||
{
|
||||
if (ci->hotx == x && ci->hoty == y)
|
||||
printf("o");
|
||||
else
|
||||
switch (ci->data[y*ci->width+x])
|
||||
{
|
||||
case 0:
|
||||
printf(" ");
|
||||
break;
|
||||
case 1:
|
||||
printf(".");
|
||||
break;
|
||||
case 2:
|
||||
printf("X");
|
||||
break;
|
||||
}
|
||||
}
|
||||
printf(" */\n");
|
||||
}
|
||||
}
|
||||
|
||||
static int read_bdf_font(fname)
|
||||
char *fname;
|
||||
{
|
||||
FILE *f;
|
||||
char line[2048];
|
||||
int rv = 0;
|
||||
gboolean startchar = FALSE, startbitmap = FALSE;
|
||||
char *charname,*p,*bitmap;
|
||||
int dx = 0,dy = 0;
|
||||
int w,h,x,y,py;
|
||||
int id,tmp;
|
||||
|
||||
dw = 0;
|
||||
dh = 0;
|
||||
|
||||
if (!(f = fopen(fname, "r")))
|
||||
{
|
||||
perror(fname);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fgets(line, sizeof(line), f) && strncasecmp("STARTFONT ", line, 10))
|
||||
{
|
||||
printf("!BDF font file\n");
|
||||
fclose(f);
|
||||
return -1;
|
||||
}
|
||||
|
||||
p = line;
|
||||
while (fgets(line, sizeof(line), f))
|
||||
{
|
||||
if (!startchar)
|
||||
{
|
||||
if (!strncasecmp("STARTCHAR ", line, 10))
|
||||
{
|
||||
startchar = TRUE;
|
||||
charname = g_strndup(p + 10,
|
||||
strcspn(p+10, "\r\n"));
|
||||
}
|
||||
else if (!strncasecmp("FONTBOUNDINGBOX ", line, 16))
|
||||
sscanf(p+16, "%d %d %d %d", &dw, &dh, &dx, &dy);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!strncasecmp("ENDCHAR", line, 7))
|
||||
{
|
||||
font_info_t *nfi;
|
||||
|
||||
if (debug)
|
||||
printf(" %*s*/\n", dw, "");
|
||||
startchar = FALSE;
|
||||
startbitmap = FALSE;
|
||||
|
||||
nfi = g_malloc(sizeof(font_info_t));
|
||||
memset(nfi, '\0', sizeof(font_info_t));
|
||||
|
||||
nfi->name = charname;
|
||||
nfi->id = id;
|
||||
nfi->bitmap = bitmap;
|
||||
nfi->hotx = 0 - dx;
|
||||
nfi->hoty = 0 - dy;
|
||||
|
||||
fonts = g_slist_append(fonts, nfi);
|
||||
}
|
||||
else if (startbitmap)
|
||||
{
|
||||
int px,cx;
|
||||
guchar mask;
|
||||
|
||||
px = x - dx + py * dw;
|
||||
for (cx = 0; cx < w; cx++)
|
||||
{
|
||||
mask = 1 << (3 - (cx % 4));
|
||||
|
||||
bitmap[px+cx] =
|
||||
(mask & HEX(line[cx/4])) != 0;
|
||||
|
||||
if (debug)
|
||||
printf(bitmap[px+cx] ? "X" : " ");
|
||||
}
|
||||
py++;
|
||||
if (debug)
|
||||
printf(" %*s*/\n/* %*s", dw-w, "", dw+dx, "");
|
||||
}
|
||||
else if (!strncasecmp("BBX ", line, 4))
|
||||
{
|
||||
sscanf(p+4, "%d %d %d %d", &w, &h, &x, &y);
|
||||
if (debug)
|
||||
printf("/* %s: */\n/* %*s", charname, dw+dx, "");
|
||||
}
|
||||
else if (!strncasecmp("ENCODING ", line, 9))
|
||||
{
|
||||
if (sscanf(p+9, "%d %d", &tmp, &id) != 2)
|
||||
id = tmp;
|
||||
}
|
||||
else if (!strncasecmp("BITMAP", line, 6))
|
||||
{
|
||||
py = y - dy;
|
||||
startbitmap = TRUE;
|
||||
bitmap = g_malloc(dw*dh);
|
||||
memset(bitmap, '\0', dw*dh);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (strncasecmp("ENDFONT", line, 7))
|
||||
rv = -1;
|
||||
|
||||
fclose(f);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int font_info_compare(fi, name)
|
||||
font_info_t *fi;
|
||||
char *name;
|
||||
{
|
||||
return strcmp(name, fi->name);
|
||||
}
|
||||
|
||||
static cursor_info_t *gen_cursor(bmap, mask)
|
||||
font_info_t *bmap;
|
||||
font_info_t *mask;
|
||||
{
|
||||
cursor_info_t *ci;
|
||||
int bx = dw,by = dh,ex = 0,ey = 0;
|
||||
int i,j;
|
||||
|
||||
for (j = 0; j < dh; j++)
|
||||
{
|
||||
gboolean havep = FALSE;
|
||||
|
||||
for (i = 0; i < dw; i++)
|
||||
{
|
||||
if (bmap->bitmap[j*dw+i] || mask->bitmap[j*dw+i])
|
||||
{
|
||||
havep = TRUE;
|
||||
bx = MIN(bx, i);
|
||||
ex = MAX(i+1, ex);
|
||||
}
|
||||
}
|
||||
|
||||
if (havep)
|
||||
{
|
||||
by = MIN(by, j);
|
||||
ey = MAX(ey, j+1);
|
||||
}
|
||||
}
|
||||
|
||||
ci = g_malloc(sizeof(cursor_info_t));
|
||||
ci->name = g_strdup(bmap->name);
|
||||
ci->id = bmap->id;
|
||||
|
||||
ci->width = ex - bx;
|
||||
ci->height = ey - by;
|
||||
|
||||
ci->hotx = bmap->hotx - bx;
|
||||
ci->hoty = ci->height - (bmap->hoty - by);
|
||||
|
||||
ci->data = g_malloc(ci->width * ci->height);
|
||||
memset(ci->data, '\0', ci->width * ci->height);
|
||||
|
||||
for (j = 0; j < ci->height; j++)
|
||||
{
|
||||
for (i = 0; i < ci->width; i++)
|
||||
{
|
||||
int ofs = (by + j) * dw + bx + i;
|
||||
|
||||
ci->data[j*ci->width + i] = mask->bitmap[ofs] *
|
||||
(1 + bmap->bitmap[ofs]);
|
||||
}
|
||||
}
|
||||
|
||||
return ci;
|
||||
}
|
||||
|
||||
static void compose_cursors_from_fonts()
|
||||
{
|
||||
GSList *l;
|
||||
|
||||
for (l = g_slist_copy (fonts); l; l = g_slist_delete_link (l,l))
|
||||
{
|
||||
font_info_t *fi = l->data;
|
||||
char *name;
|
||||
GSList *ml;
|
||||
|
||||
name = g_strconcat(fi->name, "_mask", NULL);
|
||||
|
||||
if ((ml = g_slist_find_custom(fonts, name,
|
||||
(GCompareFunc) font_info_compare)))
|
||||
{
|
||||
cursors = g_slist_append(cursors, gen_cursor(l->data, ml->data));
|
||||
fonts = g_slist_remove(fonts, l->data);
|
||||
fonts = g_slist_remove(fonts, ml->data);
|
||||
}
|
||||
|
||||
g_free(name);
|
||||
}
|
||||
}
|
||||
|
||||
static char *dump_cursor(ci, id)
|
||||
cursor_info_t *ci;
|
||||
int id;
|
||||
{
|
||||
static char cdata[8192];
|
||||
char *p;
|
||||
int i;
|
||||
int c;
|
||||
gboolean flushed;
|
||||
|
||||
sprintf(cdata, " { \"%s\", %d, %d, %d, %d, %d, \n \"",
|
||||
ci->name, ci->id, ci->width, ci->height, ci->hotx, ci->hoty);
|
||||
p = cdata + strlen(cdata);
|
||||
|
||||
for (i = 0; i < ci->width * ci->height; i++)
|
||||
{
|
||||
flushed = FALSE;
|
||||
|
||||
if (!(i%4))
|
||||
c = 0;
|
||||
|
||||
c = c << 2;
|
||||
|
||||
c += ci->data[i];
|
||||
|
||||
if ((i % 4) == 3)
|
||||
{
|
||||
flushed = TRUE;
|
||||
sprintf(p, "\\%03o", c);
|
||||
p += strlen(p);
|
||||
}
|
||||
|
||||
if (i > 0 && !(i % 64))
|
||||
{
|
||||
strcpy(p ,"\"\n \"");
|
||||
p += strlen(p);
|
||||
}
|
||||
}
|
||||
if (!flushed)
|
||||
{
|
||||
sprintf(p, "\\%03o", c);
|
||||
p += strlen(p);
|
||||
}
|
||||
|
||||
strcpy(p, "\" }");
|
||||
|
||||
return cdata;
|
||||
}
|
||||
|
||||
static int dump_cursors()
|
||||
{
|
||||
GSList *ptr;
|
||||
FILE *f = stdout;
|
||||
|
||||
fprintf(f, "static const struct { const char *name; int type; guchar width; guchar height; guchar hotx; guchar hoty; guchar *data; } cursors[] = {\n");
|
||||
|
||||
for (ptr = cursors; ptr; ptr = ptr->next)
|
||||
{
|
||||
if (debug)
|
||||
print_cursor(ptr->data);
|
||||
fprintf(f, "%s, \n", dump_cursor(ptr->data));
|
||||
}
|
||||
|
||||
fprintf(f, " { NULL, 0, 0, 0, 0, 0, NULL },\n};\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
printf("missing parameters !\n");
|
||||
printf("Usage: %s [BDF cursor file]\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (g_getenv ("BDFCURSOR_DEBUG") != NULL)
|
||||
debug = TRUE;
|
||||
|
||||
if (read_bdf_font(argv[1]) || !fonts)
|
||||
{
|
||||
printf("Error reading font\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
compose_cursors_from_fonts();
|
||||
|
||||
if (!cursors)
|
||||
{
|
||||
printf("failed to generate cursors from font!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
dump_cursors();
|
||||
|
||||
if (fonts)
|
||||
{
|
||||
printf("some fonts remained unconverted!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -157,7 +157,6 @@ static HKL latin_locale = NULL;
|
||||
|
||||
static gboolean in_ime_composition = FALSE;
|
||||
static UINT modal_timer;
|
||||
static UINT sync_timer = 0;
|
||||
|
||||
static int debug_indent = 0;
|
||||
|
||||
@@ -1453,23 +1452,6 @@ _gdk_win32_end_modal_call (GdkWin32ModalOpKind kind)
|
||||
}
|
||||
}
|
||||
|
||||
static VOID CALLBACK
|
||||
sync_timer_proc (HWND hwnd,
|
||||
UINT msg,
|
||||
UINT_PTR id,
|
||||
DWORD time)
|
||||
{
|
||||
MSG message;
|
||||
if (PeekMessageW (&message, hwnd, WM_PAINT, WM_PAINT, PM_REMOVE))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
RedrawWindow (hwnd, NULL, NULL, RDW_INVALIDATE|RDW_UPDATENOW|RDW_ALLCHILDREN);
|
||||
|
||||
KillTimer (hwnd, sync_timer);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
handle_nchittest (HWND hwnd,
|
||||
GdkSurface *window,
|
||||
@@ -2854,12 +2836,6 @@ gdk_event_translate (MSG *msg,
|
||||
*ret_valp = 1;
|
||||
break;
|
||||
|
||||
case WM_SYNCPAINT:
|
||||
sync_timer = SetTimer (GDK_SURFACE_HWND (window),
|
||||
1,
|
||||
200, sync_timer_proc);
|
||||
break;
|
||||
|
||||
case WM_PAINT:
|
||||
handle_wm_paint (msg, window);
|
||||
break;
|
||||
|
||||
@@ -787,26 +787,6 @@ show_window_internal (GdkSurface *window,
|
||||
if (!unminimize && !already_mapped && IsWindowVisible (GDK_SURFACE_HWND (window)))
|
||||
return;
|
||||
|
||||
/* Other cases */
|
||||
|
||||
exstyle = GetWindowLong (GDK_SURFACE_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
/* Use SetWindowPos to show transparent windows so automatic redraws
|
||||
* in other windows can be suppressed.
|
||||
*/
|
||||
if (exstyle & WS_EX_TRANSPARENT)
|
||||
{
|
||||
UINT flags = SWP_SHOWWINDOW | SWP_NOREDRAW | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER;
|
||||
|
||||
if (GDK_IS_DRAG_SURFACE (window))
|
||||
flags |= SWP_NOACTIVATE;
|
||||
|
||||
SetWindowPos (GDK_SURFACE_HWND (window),
|
||||
SWP_NOZORDER_SPECIFIED, 0, 0, 0, 0, flags);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* For initial map of "normal" windows we want to emulate WM window
|
||||
* positioning behaviour, which means:
|
||||
* + default to the initial CW_USEDEFAULT placement,
|
||||
@@ -953,6 +933,8 @@ show_window_internal (GdkSurface *window,
|
||||
GtkShowWindow (window, SW_SHOW);
|
||||
}
|
||||
|
||||
exstyle = GetWindowLong (GDK_SURFACE_HWND (window), GWL_EXSTYLE);
|
||||
|
||||
/* Sync STATE_ABOVE to TOPMOST */
|
||||
if (!GDK_IS_DRAG_SURFACE (window) &&
|
||||
(((window->state & GDK_TOPLEVEL_STATE_ABOVE) &&
|
||||
@@ -989,22 +971,7 @@ gdk_win32_surface_hide (GdkSurface *window)
|
||||
|
||||
_gdk_surface_clear_update_area (window);
|
||||
|
||||
if (GDK_IS_TOPLEVEL (window))
|
||||
ShowOwnedPopups (GDK_SURFACE_HWND (window), FALSE);
|
||||
|
||||
/* Use SetWindowPos to hide transparent windows so automatic redraws
|
||||
* in other windows can be suppressed.
|
||||
*/
|
||||
if (GetWindowLong (GDK_SURFACE_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
|
||||
{
|
||||
SetWindowPos (GDK_SURFACE_HWND (window), SWP_NOZORDER_SPECIFIED,
|
||||
0, 0, 0, 0,
|
||||
SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkShowWindow (window, SW_HIDE);
|
||||
}
|
||||
GtkShowWindow (window, SW_HIDE);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1336,33 +1303,22 @@ gdk_win32_surface_set_urgency_hint (GdkSurface *window,
|
||||
gboolean urgent)
|
||||
{
|
||||
FLASHWINFO flashwinfo;
|
||||
typedef BOOL (WINAPI *PFN_FlashWindowEx) (FLASHWINFO*);
|
||||
PFN_FlashWindowEx flashWindowEx = NULL;
|
||||
|
||||
g_return_if_fail (GDK_IS_SURFACE (window));
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (window))
|
||||
return;
|
||||
|
||||
flashWindowEx = (PFN_FlashWindowEx) GetProcAddress (GetModuleHandle ("user32.dll"), "FlashWindowEx");
|
||||
|
||||
if (flashWindowEx)
|
||||
{
|
||||
flashwinfo.cbSize = sizeof (flashwinfo);
|
||||
flashwinfo.hwnd = GDK_SURFACE_HWND (window);
|
||||
if (urgent)
|
||||
flashwinfo.dwFlags = FLASHW_ALL | FLASHW_TIMER;
|
||||
else
|
||||
flashwinfo.dwFlags = FLASHW_STOP;
|
||||
flashwinfo.uCount = 0;
|
||||
flashwinfo.dwTimeout = 0;
|
||||
|
||||
flashWindowEx (&flashwinfo);
|
||||
}
|
||||
flashwinfo.cbSize = sizeof (flashwinfo);
|
||||
flashwinfo.hwnd = GDK_SURFACE_HWND (window);
|
||||
if (urgent)
|
||||
flashwinfo.dwFlags = FLASHW_ALL | FLASHW_TIMER;
|
||||
else
|
||||
{
|
||||
FlashWindow (GDK_SURFACE_HWND (window), urgent);
|
||||
}
|
||||
flashwinfo.dwFlags = FLASHW_STOP;
|
||||
flashwinfo.uCount = 0;
|
||||
flashwinfo.dwTimeout = 0;
|
||||
|
||||
FlashWindowEx (&flashwinfo);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# libwntab32x.la - a libtool library file
|
||||
# Generated by hand, compatible with libtool
|
||||
# Just a wrapper for libwntab32x.a, which is just a copy of wntab32x.lib
|
||||
#
|
||||
# The name that we can dlopen(3).
|
||||
dlname=''
|
||||
|
||||
# Names of this library.
|
||||
library_names=''
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='libwntab32x.a'
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Version information
|
||||
current=0
|
||||
age=0
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir=''
|
||||
@@ -3535,7 +3535,7 @@ gdk_x11_surface_unfullscreen (GdkSurface *surface)
|
||||
*
|
||||
* Returns the group this surface belongs to.
|
||||
*
|
||||
* Returns: (transfer none): The group of this surface;
|
||||
* Returns: (transfer none) (nullable): The group of this surface;
|
||||
*/
|
||||
GdkSurface *
|
||||
gdk_x11_surface_get_group (GdkSurface *surface)
|
||||
|
||||
@@ -147,7 +147,8 @@ gsk_gl_compiler_new (GskGLDriver *driver,
|
||||
|
||||
gdk_gl_context_get_version (context, &maj, &min);
|
||||
|
||||
if (maj == 3)
|
||||
/* On Windows, legacy contexts can give us a GL 4.x context */
|
||||
if (maj >= 3)
|
||||
self->glsl_version = SHADER_VERSION_GL3_LEGACY;
|
||||
else
|
||||
self->glsl_version = SHADER_VERSION_GL2_LEGACY;
|
||||
|
||||
@@ -140,7 +140,7 @@ gtk_css_section_get_parent (const GtkCssSection *section)
|
||||
* If no such file exists, for example because the CSS was loaded via
|
||||
* [method@Gtk.CssProvider.load_from_data], then `NULL` is returned.
|
||||
*
|
||||
* Returns: (transfer none): the `GFile` from which the `section`
|
||||
* Returns: (transfer none) (nullable): the `GFile` from which the `section`
|
||||
* was parsed
|
||||
**/
|
||||
GFile *
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ gtk_buildable_set_buildable_id (GtkBuildable *buildable,
|
||||
* `GtkBuilder` sets the name based on the ID attribute
|
||||
* of the <object> tag used to construct the @buildable.
|
||||
*
|
||||
* Returns: the ID of the buildable object
|
||||
* Returns: (nullable): the ID of the buildable object
|
||||
**/
|
||||
const char *
|
||||
gtk_buildable_get_buildable_id (GtkBuildable *buildable)
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Copyright © 2019 Benjamin Otte
|
||||
*
|
||||
@@ -1372,7 +1371,7 @@ gtk_property_expression_new_for_pspec (GtkExpression *expression,
|
||||
* Gets the expression specifying the object of
|
||||
* a property expression.
|
||||
*
|
||||
* Returns: (transfer none): the object expression
|
||||
* Returns: (transfer none) (nullable): the object expression
|
||||
*/
|
||||
GtkExpression *
|
||||
gtk_property_expression_get_expression (GtkExpression *expression)
|
||||
|
||||
@@ -50,6 +50,7 @@ GDK_AVAILABLE_IN_ALL
|
||||
GtkExpression * gtk_expression_ref (GtkExpression *self);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_expression_unref (GtkExpression *self);
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkExpression, gtk_expression_unref)
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gtk_expression_get_value_type (GtkExpression *self);
|
||||
|
||||
@@ -523,7 +523,7 @@ gtk_file_chooser_set_file (GtkFileChooser *chooser,
|
||||
* If the file chooser is in folder mode, this function returns
|
||||
* the selected folder.
|
||||
*
|
||||
* Returns: (transfer full): a selected `GFile`. You own the
|
||||
* Returns: (transfer full) (nullable): a selected `GFile`. You own the
|
||||
* returned file; use g_object_unref() to release it.
|
||||
*/
|
||||
GFile *
|
||||
@@ -794,7 +794,7 @@ gtk_file_chooser_set_choice (GtkFileChooser *chooser,
|
||||
*
|
||||
* Gets the currently selected option in the 'choice' with the given ID.
|
||||
*
|
||||
* Returns: the ID of the currently selected option
|
||||
* Returns: (nullable): the ID of the currently selected option
|
||||
*/
|
||||
const char *
|
||||
gtk_file_chooser_get_choice (GtkFileChooser *chooser,
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "gtktogglebutton.h"
|
||||
#include "gtkheaderbar.h"
|
||||
#include "gtklabel.h"
|
||||
#include "gtkmain.h"
|
||||
#include "gtkfilefilterprivate.h"
|
||||
#include "gtknative.h"
|
||||
|
||||
@@ -50,6 +51,9 @@
|
||||
|
||||
typedef struct {
|
||||
GtkFileChooserNative *self;
|
||||
|
||||
GtkWidget *grab_widget;
|
||||
|
||||
IFileDialogEvents *events;
|
||||
|
||||
HWND parent;
|
||||
@@ -318,6 +322,12 @@ filechooser_win32_thread_data_free (FilechooserWin32ThreadData *data)
|
||||
if (data->events)
|
||||
IFileDialogEvents_Release (data->events);
|
||||
|
||||
if (data->grab_widget)
|
||||
{
|
||||
gtk_grab_remove (data->grab_widget);
|
||||
g_object_unref (data->grab_widget);
|
||||
}
|
||||
|
||||
g_clear_object (&data->current_folder);
|
||||
g_clear_object (&data->current_file);
|
||||
g_free (data->current_name);
|
||||
@@ -969,6 +979,12 @@ gtk_file_chooser_native_win32_show (GtkFileChooserNative *self)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (data->modal)
|
||||
{
|
||||
data->grab_widget = g_object_ref_sink (gtk_label_new (""));
|
||||
gtk_grab_add (GTK_WIDGET (data->grab_widget));
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -510,7 +510,7 @@ gtk_flatten_list_model_get_model (GtkFlattenListModel *self)
|
||||
*
|
||||
* Returns the model containing the item at the given position.
|
||||
*
|
||||
* Returns: (transfer none): the model containing the item at @position
|
||||
* Returns: (transfer none) (nullable): the model containing the item at @position
|
||||
*/
|
||||
GListModel *
|
||||
gtk_flatten_list_model_get_model_for_item (GtkFlattenListModel *self,
|
||||
|
||||
@@ -433,6 +433,8 @@ gtk_font_button_font_chooser_set_font_map (GtkFontChooser *chooser,
|
||||
|
||||
context = gtk_widget_get_pango_context (font_button->font_label);
|
||||
pango_context_set_font_map (context, font_map);
|
||||
if (font_button->font_dialog)
|
||||
gtk_font_chooser_set_font_map (GTK_FONT_CHOOSER (font_button->font_dialog), font_map);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+234
-201
@@ -64,9 +64,6 @@
|
||||
#include "gtkstringsorter.h"
|
||||
|
||||
#include <hb-ot.h>
|
||||
#if defined(HAVE_PANGOFT) && defined(HAVE_HARFBUZZ)
|
||||
#include <pango/pangofc-font.h>
|
||||
#endif
|
||||
|
||||
#include "language-names.h"
|
||||
#include "script-names.h"
|
||||
@@ -155,6 +152,8 @@ struct _GtkFontChooserWidget
|
||||
GList *feature_items;
|
||||
|
||||
GAction *tweak_action;
|
||||
|
||||
hb_map_t *glyphmap;
|
||||
};
|
||||
|
||||
struct _GtkFontChooserWidgetClass
|
||||
@@ -362,7 +361,6 @@ user_filter_cb (gpointer item,
|
||||
!pango_font_family_is_monospace (family))
|
||||
return FALSE;
|
||||
|
||||
#ifdef HAVE_PANGOFT
|
||||
if (self->filter_by_language &&
|
||||
self->filter_language)
|
||||
{
|
||||
@@ -370,6 +368,7 @@ user_filter_cb (gpointer item,
|
||||
PangoContext *context;
|
||||
PangoFont *font;
|
||||
gboolean ret;
|
||||
PangoLanguage **langs;
|
||||
|
||||
desc = pango_font_face_describe (face);
|
||||
pango_font_description_set_size (desc, 20);
|
||||
@@ -377,27 +376,19 @@ user_filter_cb (gpointer item,
|
||||
context = gtk_widget_get_pango_context (GTK_WIDGET (self));
|
||||
font = pango_context_load_font (context, desc);
|
||||
|
||||
ret = TRUE;
|
||||
ret = FALSE;
|
||||
|
||||
if (PANGO_IS_FC_FONT (font))
|
||||
langs = pango_font_get_languages (font);
|
||||
if (langs)
|
||||
{
|
||||
PangoLanguage **langs;
|
||||
int i;
|
||||
|
||||
ret = FALSE;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
langs = pango_fc_font_get_languages (PANGO_FC_FONT (font));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
if (langs)
|
||||
for (i = 0; langs[i]; i++)
|
||||
{
|
||||
if (langs[i] == self->filter_language)
|
||||
{
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (int i = 0; langs[i]; i++)
|
||||
{
|
||||
if (langs[i] == self->filter_language)
|
||||
{
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (font);
|
||||
@@ -405,7 +396,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -549,10 +539,16 @@ maybe_update_preview_text (GtkFontChooserWidget *self,
|
||||
PangoFontFace *face,
|
||||
PangoFontDescription *desc)
|
||||
{
|
||||
#if defined(HAVE_PANGOFT) && defined(HAVE_HARFBUZZ)
|
||||
PangoContext *context;
|
||||
PangoFont *font;
|
||||
const char *sample;
|
||||
PangoLanguage **languages;
|
||||
GHashTable *langs = NULL;
|
||||
PangoLanguage *default_lang;
|
||||
PangoLanguage *alt_default = NULL;
|
||||
PangoLanguage *lang = NULL;
|
||||
int i;
|
||||
const char *p;
|
||||
|
||||
/* If the user has typed text into the entry, we don't touch it */
|
||||
if (self->preview_text_set)
|
||||
@@ -576,88 +572,77 @@ maybe_update_preview_text (GtkFontChooserWidget *self,
|
||||
context = gtk_widget_get_pango_context (GTK_WIDGET (self));
|
||||
font = pango_context_load_font (context, desc);
|
||||
|
||||
if (PANGO_IS_FC_FONT (font))
|
||||
default_lang = pango_language_get_default ();
|
||||
p = pango_language_to_string (default_lang);
|
||||
|
||||
/* The default language tends to be of the form en-us.
|
||||
* Since fontconfig languages just have the language part,
|
||||
* and we want to use direct pointer comparisons, we need
|
||||
* an PangoLanguage for the shortened default language.
|
||||
*/
|
||||
if (strchr (p, '-'))
|
||||
{
|
||||
PangoLanguage **languages;
|
||||
GHashTable *langs = NULL;
|
||||
PangoLanguage *default_lang;
|
||||
PangoLanguage *alt_default = NULL;
|
||||
PangoLanguage *lang = NULL;
|
||||
int i;
|
||||
const char *p;
|
||||
char q[10];
|
||||
for (i = 0; p[i] != '-' && i < 9; i++)
|
||||
q[i] = p[i];
|
||||
q[i] = '\0';
|
||||
alt_default = pango_language_from_string (q);
|
||||
}
|
||||
|
||||
default_lang = pango_language_get_default ();
|
||||
p = pango_language_to_string (default_lang);
|
||||
languages = pango_font_get_languages (font);
|
||||
|
||||
/* The default language tends to be of the form en-us.
|
||||
* Since fontconfig languages just have the language part,
|
||||
* and we want to use direct pointer comparisons, we need
|
||||
* an PangoLanguage for the shortened default language.
|
||||
*/
|
||||
if (strchr (p, '-'))
|
||||
{
|
||||
char q[10];
|
||||
for (i = 0; p[i] != '-' && i < 9; i++)
|
||||
q[i] = p[i];
|
||||
q[i] = '\0';
|
||||
alt_default = pango_language_from_string (q);
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
languages = pango_fc_font_get_languages (PANGO_FC_FONT (font));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
/* If the font supports the default language, just use it. */
|
||||
if (languages)
|
||||
for (i = 0; languages[i]; i++)
|
||||
/* If the font supports the default language, just use it. */
|
||||
if (languages)
|
||||
for (i = 0; languages[i]; i++)
|
||||
{
|
||||
if (languages[i] == default_lang || languages[i] == alt_default)
|
||||
{
|
||||
if (languages[i] == default_lang || languages[i] == alt_default)
|
||||
{
|
||||
lang = default_lang;
|
||||
goto found;
|
||||
}
|
||||
lang = default_lang;
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
|
||||
/* Otherwise, we make a list of representative languages */
|
||||
langs = g_hash_table_new (NULL, NULL);
|
||||
/* Otherwise, we make a list of representative languages */
|
||||
langs = g_hash_table_new (NULL, NULL);
|
||||
|
||||
for (i = 0; languages[i]; i++)
|
||||
if (languages)
|
||||
for (i = 0; languages[i]; i++)
|
||||
{
|
||||
const PangoScript *scripts;
|
||||
int num, j;
|
||||
|
||||
scripts = pango_language_get_scripts (languages[i], &num);
|
||||
for (j = 0; j < num; j++)
|
||||
{
|
||||
lang = pango_script_get_sample_language (scripts[j]);
|
||||
if (lang)
|
||||
g_hash_table_add (langs, lang);
|
||||
}
|
||||
}
|
||||
|
||||
/* ... and compare it to the users default and preferred languages */
|
||||
if (g_hash_table_contains (langs, default_lang) ||
|
||||
g_hash_table_contains (langs, alt_default))
|
||||
{
|
||||
lang = default_lang;
|
||||
}
|
||||
else
|
||||
{
|
||||
PangoLanguage **preferred;
|
||||
|
||||
preferred = pango_language_get_preferred ();
|
||||
if (preferred)
|
||||
{
|
||||
const PangoScript *scripts;
|
||||
int num, j;
|
||||
|
||||
scripts = pango_language_get_scripts (languages[i], &num);
|
||||
for (j = 0; j < num; j++)
|
||||
for (i = 0; preferred[i]; i++)
|
||||
{
|
||||
lang = pango_script_get_sample_language (scripts[j]);
|
||||
if (lang)
|
||||
g_hash_table_add (langs, lang);
|
||||
}
|
||||
}
|
||||
|
||||
/* ... and compare it to the users default and preferred languages */
|
||||
if (g_hash_table_contains (langs, default_lang) ||
|
||||
g_hash_table_contains (langs, alt_default))
|
||||
{
|
||||
lang = default_lang;
|
||||
}
|
||||
else
|
||||
{
|
||||
PangoLanguage **preferred;
|
||||
|
||||
preferred = pango_language_get_preferred ();
|
||||
if (preferred)
|
||||
{
|
||||
for (i = 0; preferred[i]; i++)
|
||||
if (g_hash_table_contains (langs, preferred[i]))
|
||||
{
|
||||
if (g_hash_table_contains (langs, preferred[i]))
|
||||
{
|
||||
lang = preferred[i];
|
||||
break;
|
||||
}
|
||||
lang = preferred[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_hash_table_unref (langs);
|
||||
|
||||
found:
|
||||
@@ -667,7 +652,6 @@ found:
|
||||
}
|
||||
|
||||
g_object_unref (font);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1027,7 +1011,6 @@ axis_free (gpointer v)
|
||||
g_free (a);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PANGOFT
|
||||
static void
|
||||
select_added (GListModel *model,
|
||||
guint position,
|
||||
@@ -1051,6 +1034,10 @@ add_languages_from_font (GtkFontChooserWidget *self,
|
||||
PangoFontDescription *desc;
|
||||
PangoFont *font;
|
||||
PangoContext *context;
|
||||
GtkSelectionModel *model = gtk_list_view_get_model (GTK_LIST_VIEW (self->language_list));
|
||||
PangoLanguage *default_lang = pango_language_get_default ();
|
||||
PangoLanguage **langs;
|
||||
int i;
|
||||
|
||||
if (PANGO_IS_FONT_FAMILY (item))
|
||||
face = pango_font_family_get_face (PANGO_FONT_FAMILY (item), NULL);
|
||||
@@ -1066,44 +1053,35 @@ add_languages_from_font (GtkFontChooserWidget *self,
|
||||
context = gtk_widget_get_pango_context (GTK_WIDGET (self));
|
||||
font = pango_context_load_font (context, desc);
|
||||
|
||||
if (PANGO_IS_FC_FONT (font))
|
||||
langs = pango_font_get_languages (font);
|
||||
if (langs)
|
||||
{
|
||||
GtkSelectionModel *model = gtk_list_view_get_model (GTK_LIST_VIEW (self->language_list));
|
||||
PangoLanguage *default_lang = pango_language_get_default ();
|
||||
PangoLanguage **langs;
|
||||
int i;
|
||||
for (i = 0; langs[i]; i++)
|
||||
{
|
||||
if (!g_hash_table_contains (self->language_table, langs[i]))
|
||||
{
|
||||
g_hash_table_add (self->language_table, langs[i]);
|
||||
if (get_language_name (langs[i]))
|
||||
{
|
||||
const char *l = pango_language_to_string (langs[i]);
|
||||
gulong id = 0;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
langs = pango_fc_font_get_languages (PANGO_FC_FONT (font));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
if (langs)
|
||||
for (i = 0; langs[i]; i++)
|
||||
{
|
||||
if (!g_hash_table_contains (self->language_table, langs[i]))
|
||||
{
|
||||
g_hash_table_add (self->language_table, langs[i]);
|
||||
if (get_language_name (langs[i]))
|
||||
{
|
||||
const char *l = pango_language_to_string (langs[i]);
|
||||
gulong id = 0;
|
||||
/* Pre-select the default language */
|
||||
if (pango_language_matches (default_lang, l))
|
||||
id = g_signal_connect (model, "items-changed", G_CALLBACK (select_added), NULL);
|
||||
|
||||
/* Pre-select the default language */
|
||||
if (pango_language_matches (default_lang, l))
|
||||
id = g_signal_connect (model, "items-changed", G_CALLBACK (select_added), NULL);
|
||||
gtk_string_list_append (self->languages, l);
|
||||
|
||||
gtk_string_list_append (self->languages, l);
|
||||
|
||||
if (id)
|
||||
g_signal_handler_disconnect (model, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (id)
|
||||
g_signal_handler_disconnect (model, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (font);
|
||||
pango_font_description_free (desc);
|
||||
}
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
gtk_font_chooser_widget_ensure_matching_selection (GtkFontChooserWidget *self);
|
||||
@@ -1130,7 +1108,6 @@ add_to_fontlist (GtkWidget *widget,
|
||||
|
||||
n = gtk_slice_list_model_get_size (model);
|
||||
|
||||
#ifdef HAVE_PANGOFT
|
||||
for (i = n; i < n + 10; i++)
|
||||
{
|
||||
gpointer item = g_list_model_get_item (child_model, i);
|
||||
@@ -1139,7 +1116,6 @@ add_to_fontlist (GtkWidget *widget,
|
||||
add_languages_from_font (self, item);
|
||||
g_object_unref (item);
|
||||
}
|
||||
#endif
|
||||
|
||||
n += 10;
|
||||
|
||||
@@ -1179,7 +1155,6 @@ update_fontlist (GtkFontChooserWidget *self)
|
||||
g_object_unref (model);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PANGOFT
|
||||
static void
|
||||
setup_lang_item (GtkSignalListItemFactory *factory,
|
||||
gpointer item,
|
||||
@@ -1269,7 +1244,6 @@ setup_language_list (GtkFontChooserWidget *self)
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
gtk_font_chooser_widget_init (GtkFontChooserWidget *self)
|
||||
@@ -1310,12 +1284,7 @@ gtk_font_chooser_widget_init (GtkFontChooserWidget *self)
|
||||
|
||||
gtk_custom_filter_set_filter_func (self->user_filter, user_filter_cb, self, NULL);
|
||||
|
||||
#ifdef HAVE_PANGOFT
|
||||
setup_language_list (self);
|
||||
#else
|
||||
gtk_widget_hide (GTK_WIDGET (self->language_button));
|
||||
gtk_widget_hide (GTK_WIDGET (self->language_frame));
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1501,26 +1470,23 @@ add_font_variations (GtkFontChooserWidget *fontchooser,
|
||||
{
|
||||
GHashTableIter iter;
|
||||
Axis *axis;
|
||||
const char *sep = "";
|
||||
char buf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||
|
||||
g_hash_table_iter_init (&iter, fontchooser->axes);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)NULL, (gpointer *)&axis))
|
||||
{
|
||||
char tag[5];
|
||||
double value;
|
||||
char buf[128];
|
||||
|
||||
value = gtk_adjustment_get_value (axis->adjustment);
|
||||
|
||||
if (value == axis->default_value)
|
||||
continue;
|
||||
|
||||
tag[0] = (axis->tag >> 24) & 0xff;
|
||||
tag[1] = (axis->tag >> 16) & 0xff;
|
||||
tag[2] = (axis->tag >> 8) & 0xff;
|
||||
tag[3] = (axis->tag >> 0) & 0xff;
|
||||
tag[4] = '\0';
|
||||
g_string_append_printf (s, "%s%s=%s", sep, tag, g_ascii_dtostr (buf, sizeof(buf), value));
|
||||
sep = ",";
|
||||
hb_variation_to_string (&(hb_variation_t) { axis->tag, value }, buf, sizeof (buf));
|
||||
|
||||
if (s->len > 0)
|
||||
g_string_append_c (s, ',');
|
||||
g_string_append (s, buf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1549,10 +1515,7 @@ adjustment_changed (GtkAdjustment *adjustment,
|
||||
static gboolean
|
||||
should_show_axis (hb_ot_var_axis_info_t *ax)
|
||||
{
|
||||
if (ax->flags & HB_OT_VAR_AXIS_FLAG_HIDDEN)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return (ax->flags & HB_OT_VAR_AXIS_FLAG_HIDDEN) == 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1566,11 +1529,11 @@ static struct {
|
||||
guint32 tag;
|
||||
const char *name;
|
||||
} axis_names[] = {
|
||||
{ HB_OT_TAG_VAR_AXIS_WIDTH, N_("Width") },
|
||||
{ HB_OT_TAG_VAR_AXIS_WEIGHT, N_("Weight") },
|
||||
{ HB_OT_TAG_VAR_AXIS_ITALIC, N_("Italic") },
|
||||
{ HB_OT_TAG_VAR_AXIS_SLANT, N_("Slant") },
|
||||
{ HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE, N_("Optical Size") },
|
||||
{ HB_OT_TAG_VAR_AXIS_WIDTH, NC_("Font variation axis", "Width") },
|
||||
{ HB_OT_TAG_VAR_AXIS_WEIGHT, NC_("Font variation axis", "Weight") },
|
||||
{ HB_OT_TAG_VAR_AXIS_ITALIC, NC_("Font variation axis", "Italic") },
|
||||
{ HB_OT_TAG_VAR_AXIS_SLANT, NC_("Font variation axis", "Slant") },
|
||||
{ HB_OT_TAG_VAR_AXIS_OPTICAL_SIZE, NC_("Font variation axis", "Optical Size") },
|
||||
};
|
||||
|
||||
static gboolean
|
||||
@@ -1601,7 +1564,7 @@ add_axis (GtkFontChooserWidget *fontchooser,
|
||||
{
|
||||
if (axis_names[i].tag == ax->tag)
|
||||
{
|
||||
name = _(axis_names[i].name);
|
||||
name = g_dpgettext2 (NULL, "Font variation axis", axis_names[i].name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1643,6 +1606,33 @@ add_axis (GtkFontChooserWidget *fontchooser,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if HB_VERSION_ATLEAST (3, 3, 0)
|
||||
static void
|
||||
get_axes_and_values (hb_font_t *font,
|
||||
unsigned int n_axes,
|
||||
hb_ot_var_axis_info_t *axes,
|
||||
float *coords)
|
||||
{
|
||||
const float *dcoords;
|
||||
unsigned int length = n_axes;
|
||||
|
||||
hb_ot_var_get_axis_infos (hb_font_get_face (font), 0, &length, axes);
|
||||
|
||||
dcoords = hb_font_get_var_coords_design (font, &length);
|
||||
if (dcoords)
|
||||
memcpy (coords, dcoords, sizeof (float) * length);
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < n_axes; i++)
|
||||
{
|
||||
hb_ot_var_axis_info_t *axis = &axes[i];
|
||||
coords[axis->axis_index] = axis->default_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/* FIXME: This doesn't work if the font has an avar table */
|
||||
static float
|
||||
denorm_coord (hb_ot_var_axis_info_t *axis, int coord)
|
||||
@@ -1655,16 +1645,40 @@ denorm_coord (hb_ot_var_axis_info_t *axis, int coord)
|
||||
return axis->default_value + r * (axis->max_value - axis->default_value);
|
||||
}
|
||||
|
||||
static void
|
||||
get_axes_and_values (hb_font_t *font,
|
||||
unsigned int n_axes,
|
||||
hb_ot_var_axis_info_t *axes,
|
||||
float *coords)
|
||||
{
|
||||
const int *ncoords;
|
||||
unsigned int length = n_axes;
|
||||
|
||||
hb_ot_var_get_axis_infos (hb_font_get_face (font), 0, &length, axes);
|
||||
|
||||
ncoords = hb_font_get_var_coords_normalized (font, &length);
|
||||
|
||||
for (int i = 0; i < n_axes; i++)
|
||||
{
|
||||
hb_ot_var_axis_info_t *axis = &axes[i];
|
||||
int idx = axis->axis_index;
|
||||
if (ncoords)
|
||||
coords[idx] = denorm_coord (axis, ncoords[idx]);
|
||||
else
|
||||
coords[idx] = axis->default_value;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
gtk_font_chooser_widget_update_font_variations (GtkFontChooserWidget *fontchooser)
|
||||
{
|
||||
PangoFont *pango_font;
|
||||
hb_font_t *hb_font;
|
||||
hb_face_t *hb_face;
|
||||
const int *coords;
|
||||
unsigned int n_coords;
|
||||
unsigned int n_axes;
|
||||
hb_ot_var_axis_info_t *axes;
|
||||
float *coords;
|
||||
gboolean has_axis = FALSE;
|
||||
int i;
|
||||
|
||||
@@ -1685,24 +1699,17 @@ gtk_font_chooser_widget_update_font_variations (GtkFontChooserWidget *fontchoose
|
||||
if (!hb_ot_var_has_data (hb_face))
|
||||
return FALSE;
|
||||
|
||||
coords = hb_font_get_var_coords_normalized (hb_font, &n_coords);
|
||||
|
||||
n_axes = hb_ot_var_get_axis_count (hb_face);
|
||||
axes = g_new0 (hb_ot_var_axis_info_t, n_axes);
|
||||
hb_ot_var_get_axis_infos (hb_face, 0, &n_axes, axes);
|
||||
axes = g_alloca (sizeof (hb_ot_var_axis_info_t) * n_axes);
|
||||
coords = g_alloca (sizeof (float) * n_axes);
|
||||
get_axes_and_values (hb_font, n_axes, axes, coords);
|
||||
|
||||
for (i = 0; i < n_axes; i++)
|
||||
{
|
||||
float value;
|
||||
if (coords && i < n_coords)
|
||||
value = denorm_coord (&axes[i], coords[i]);
|
||||
else
|
||||
value = axes[i].default_value;
|
||||
if (add_axis (fontchooser, hb_font, &axes[i], value, i + 4))
|
||||
if (add_axis (fontchooser, hb_font, &axes[i], coords[axes[i].axis_index], i + 4))
|
||||
has_axis = TRUE;
|
||||
}
|
||||
|
||||
g_free (axes);
|
||||
g_object_unref (pango_font);
|
||||
|
||||
return has_axis;
|
||||
@@ -1827,11 +1834,12 @@ feat_pressed (GtkGestureClick *gesture,
|
||||
}
|
||||
|
||||
static char *
|
||||
find_affected_text (hb_tag_t feature_tag,
|
||||
hb_font_t *hb_font,
|
||||
hb_tag_t script_tag,
|
||||
hb_tag_t lang_tag,
|
||||
int max_chars)
|
||||
find_affected_text (GtkFontChooserWidget *fontchooser,
|
||||
hb_tag_t feature_tag,
|
||||
hb_font_t *hb_font,
|
||||
hb_tag_t script_tag,
|
||||
hb_tag_t lang_tag,
|
||||
int max_chars)
|
||||
{
|
||||
hb_face_t *hb_face;
|
||||
unsigned int script_index = 0;
|
||||
@@ -1881,24 +1889,35 @@ find_affected_text (hb_tag_t feature_tag,
|
||||
glyphs_after,
|
||||
glyphs_output);
|
||||
|
||||
gid = -1;
|
||||
while (hb_set_next (glyphs_input, &gid)) {
|
||||
hb_codepoint_t ch;
|
||||
if (n_chars == max_chars)
|
||||
{
|
||||
g_string_append (chars, "…");
|
||||
break;
|
||||
}
|
||||
for (ch = 0; ch < 0xffff; ch++) {
|
||||
hb_codepoint_t glyph = 0;
|
||||
hb_font_get_nominal_glyph (hb_font, ch, &glyph);
|
||||
if (glyph == gid) {
|
||||
g_string_append_unichar (chars, (gunichar)ch);
|
||||
n_chars++;
|
||||
break;
|
||||
}
|
||||
if (!fontchooser->glyphmap)
|
||||
{
|
||||
fontchooser->glyphmap = hb_map_create ();
|
||||
for (hb_codepoint_t ch = 0; ch < 0xffff; ch++)
|
||||
{
|
||||
hb_codepoint_t glyph = 0;
|
||||
if (hb_font_get_nominal_glyph (hb_font, ch, &glyph) &&
|
||||
!hb_map_has (fontchooser->glyphmap, glyph))
|
||||
hb_map_set (fontchooser->glyphmap, glyph, ch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (hb_set_next (glyphs_input, &gid))
|
||||
{
|
||||
hb_codepoint_t ch;
|
||||
|
||||
if (n_chars == max_chars)
|
||||
{
|
||||
g_string_append (chars, "…");
|
||||
break;
|
||||
}
|
||||
ch = hb_map_get (fontchooser->glyphmap, gid);
|
||||
if (ch != HB_MAP_VALUE_INVALID)
|
||||
{
|
||||
g_string_append_unichar (chars, (gunichar)ch);
|
||||
n_chars++;
|
||||
}
|
||||
}
|
||||
|
||||
hb_set_destroy (glyphs_input);
|
||||
}
|
||||
}
|
||||
@@ -1907,7 +1926,8 @@ find_affected_text (hb_tag_t feature_tag,
|
||||
}
|
||||
|
||||
static void
|
||||
update_feature_example (FeatureItem *item,
|
||||
update_feature_example (GtkFontChooserWidget *fontchooser,
|
||||
FeatureItem *item,
|
||||
hb_font_t *hb_font,
|
||||
hb_tag_t script_tag,
|
||||
hb_tag_t lang_tag,
|
||||
@@ -1962,9 +1982,9 @@ update_feature_example (FeatureItem *item,
|
||||
else if (strcmp (item->name, "frac") == 0)
|
||||
input = g_strdup ("1/2 2/3 7/8");
|
||||
else if (strcmp (item->name, "nalt") == 0)
|
||||
input = find_affected_text (item->tag, hb_font, script_tag, lang_tag, 3);
|
||||
input = find_affected_text (fontchooser, item->tag, hb_font, script_tag, lang_tag, 3);
|
||||
else
|
||||
input = find_affected_text (item->tag, hb_font, script_tag, lang_tag, 10);
|
||||
input = find_affected_text (fontchooser, item->tag, hb_font, script_tag, lang_tag, 10);
|
||||
|
||||
if (input[0] != '\0')
|
||||
{
|
||||
@@ -2244,7 +2264,7 @@ gtk_font_chooser_widget_update_font_features (GtkFontChooserWidget *fontchooser)
|
||||
gtk_widget_show (item->top);
|
||||
gtk_widget_show (gtk_widget_get_parent (item->top));
|
||||
|
||||
update_feature_example (item, hb_font, script_tag, lang_tag, fontchooser->font_desc);
|
||||
update_feature_example (fontchooser, item, hb_font, script_tag, lang_tag, fontchooser->font_desc);
|
||||
|
||||
if (GTK_IS_CHECK_BUTTON (item->feat))
|
||||
{
|
||||
@@ -2260,6 +2280,12 @@ gtk_font_chooser_widget_update_font_features (GtkFontChooserWidget *fontchooser)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fontchooser->glyphmap)
|
||||
{
|
||||
hb_map_destroy (fontchooser->glyphmap);
|
||||
fontchooser->glyphmap = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (pango_font);
|
||||
@@ -2272,6 +2298,7 @@ update_font_features (GtkFontChooserWidget *fontchooser)
|
||||
{
|
||||
GString *s;
|
||||
GList *l;
|
||||
char buf[128];
|
||||
|
||||
s = g_string_new ("");
|
||||
|
||||
@@ -2287,17 +2314,24 @@ update_font_features (GtkFontChooserWidget *fontchooser)
|
||||
if (gtk_check_button_get_active (GTK_CHECK_BUTTON (item->feat)) &&
|
||||
strcmp (item->name, "xxxx") != 0)
|
||||
{
|
||||
g_string_append_printf (s, "%s\"%s\" %d", s->len > 0 ? ", " : "", item->name, 1);
|
||||
hb_feature_to_string (&(hb_feature_t) { item->tag, 1, 0, -1 }, buf, sizeof (buf));
|
||||
if (s->len > 0)
|
||||
g_string_append_c (s, ',');
|
||||
g_string_append (s, buf);
|
||||
}
|
||||
}
|
||||
else if (GTK_IS_CHECK_BUTTON (item->feat))
|
||||
{
|
||||
guint32 value;
|
||||
|
||||
if (gtk_check_button_get_inconsistent (GTK_CHECK_BUTTON (item->feat)))
|
||||
continue;
|
||||
|
||||
g_string_append_printf (s, "%s\"%s\" %d",
|
||||
s->len > 0 ? ", " : "", item->name,
|
||||
gtk_check_button_get_active (GTK_CHECK_BUTTON (item->feat)));
|
||||
value = gtk_check_button_get_active (GTK_CHECK_BUTTON (item->feat));
|
||||
hb_feature_to_string (&(hb_feature_t) { item->tag, value, 0, -1 }, buf, sizeof (buf));
|
||||
if (s->len > 0)
|
||||
g_string_append_c (s, ',');
|
||||
g_string_append (s, buf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2334,12 +2368,11 @@ gtk_font_chooser_widget_merge_font_desc (GtkFontChooserWidget *fontchooser
|
||||
if (mask & PANGO_FONT_MASK_SIZE)
|
||||
{
|
||||
double font_size = (double) pango_font_description_get_size (fontchooser->font_desc) / PANGO_SCALE;
|
||||
g_signal_handlers_block_by_func (gtk_range_get_adjustment (GTK_RANGE (fontchooser->size_slider)), size_change_cb, fontchooser);
|
||||
g_signal_handlers_block_by_func (gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON(fontchooser->size_spin)), size_change_cb, fontchooser);
|
||||
/* XXX: This clamps, which can cause it to reloop into here, do we need
|
||||
* to block its signal handler?
|
||||
*/
|
||||
gtk_range_set_value (GTK_RANGE (fontchooser->size_slider), font_size);
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (fontchooser->size_spin), font_size);
|
||||
g_signal_handlers_unblock_by_func (gtk_range_get_adjustment (GTK_RANGE (fontchooser->size_slider)), size_change_cb, fontchooser);
|
||||
g_signal_handlers_unblock_by_func (gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON(fontchooser->size_spin)), size_change_cb, fontchooser);
|
||||
}
|
||||
if (mask & (PANGO_FONT_MASK_FAMILY | PANGO_FONT_MASK_STYLE | PANGO_FONT_MASK_VARIANT |
|
||||
PANGO_FONT_MASK_WEIGHT | PANGO_FONT_MASK_STRETCH))
|
||||
|
||||
+1
-1
@@ -1317,7 +1317,7 @@ gtk_gl_area_set_auto_render (GtkGLArea *area,
|
||||
*
|
||||
* Retrieves the `GdkGLContext` used by @area.
|
||||
*
|
||||
* Returns: (transfer none): the `GdkGLContext`
|
||||
* Returns: (transfer none) (nullable): the `GdkGLContext`
|
||||
*/
|
||||
GdkGLContext *
|
||||
gtk_gl_area_get_context (GtkGLArea *area)
|
||||
|
||||
+1
-1
@@ -6519,7 +6519,7 @@ gtk_icon_view_get_dest_item_at_pos (GtkIconView *icon_view,
|
||||
* Creates a `GdkPaintable` representation of the item at @path.
|
||||
* This image is used for a drag icon.
|
||||
*
|
||||
* Returns: (transfer full): a newly-allocated `GdkPaintable` of the drag icon.
|
||||
* Returns: (transfer full) (nullable): a newly-allocated `GdkPaintable` of the drag icon.
|
||||
**/
|
||||
GdkPaintable *
|
||||
gtk_icon_view_create_drag_icon (GtkIconView *icon_view,
|
||||
|
||||
+3
-2
@@ -55,6 +55,7 @@
|
||||
#include "gtkjoinedmenuprivate.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/**
|
||||
@@ -2492,7 +2493,7 @@ gtk_label_class_init (GtkLabelClass *class)
|
||||
*
|
||||
* If this property is set to -1, the width will be calculated automatically.
|
||||
*
|
||||
* See the section on [text layout](#text-layout) for details of how
|
||||
* See the section on [text layout](class.Label.html#text-layout) for details of how
|
||||
* [property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars]
|
||||
* determine the width of ellipsized and wrapped labels.
|
||||
*/
|
||||
@@ -2528,7 +2529,7 @@ gtk_label_class_init (GtkLabelClass *class)
|
||||
*
|
||||
* If this property is set to -1, the width will be calculated automatically.
|
||||
*
|
||||
* See the section on [text layout](#text-layout) for details of how
|
||||
* See the section on [text layout](class.Label.html#text-layout) for details of how
|
||||
* [property@Gtk.Label:width-chars] and [property@Gtk.Label:max-width-chars]
|
||||
* determine the width of ellipsized and wrapped labels.
|
||||
*/
|
||||
|
||||
+1
-1
@@ -1078,7 +1078,7 @@ gtk_list_box_set_adjustment (GtkListBox *box,
|
||||
* Gets the adjustment (if any) that the widget uses to
|
||||
* for vertical scrolling.
|
||||
*
|
||||
* Returns: (transfer none): the adjustment
|
||||
* Returns: (transfer none) (nullable): the adjustment
|
||||
*/
|
||||
GtkAdjustment *
|
||||
gtk_list_box_get_adjustment (GtkListBox *box)
|
||||
|
||||
+1
-1
@@ -535,7 +535,7 @@ gtk_lock_button_new (GPermission *permission)
|
||||
*
|
||||
* Obtains the `GPermission` object that controls @button.
|
||||
*
|
||||
* Returns: (transfer none): the `GPermission` of @button
|
||||
* Returns: (transfer none) (nullable): the `GPermission` of @button
|
||||
*/
|
||||
GPermission *
|
||||
gtk_lock_button_get_permission (GtkLockButton *button)
|
||||
|
||||
@@ -45,8 +45,7 @@
|
||||
*
|
||||
* widgets = gtk_widget_observe_children (widget);
|
||||
*
|
||||
* controllers = gtk_map_list_model_new (G_TYPE_LIST_MODEL,
|
||||
* widgets,
|
||||
* controllers = gtk_map_list_model_new (widgets,
|
||||
* map_to_controllers,
|
||||
* NULL, NULL);
|
||||
*
|
||||
|
||||
+4
-2
@@ -1028,6 +1028,7 @@ gtk_menu_button_set_icon_name (GtkMenuButton *menu_button,
|
||||
*/
|
||||
gtk_accessible_update_relation (GTK_ACCESSIBLE (menu_button->button),
|
||||
GTK_ACCESSIBLE_RELATION_LABELLED_BY, menu_button, NULL,
|
||||
GTK_ACCESSIBLE_RELATION_DESCRIBED_BY, menu_button, NULL,
|
||||
-1);
|
||||
|
||||
image_widget = g_object_new (GTK_TYPE_IMAGE,
|
||||
@@ -1059,7 +1060,7 @@ gtk_menu_button_set_icon_name (GtkMenuButton *menu_button,
|
||||
*
|
||||
* Gets the name of the icon shown in the button.
|
||||
*
|
||||
* Returns: the name of the icon shown in the button
|
||||
* Returns: (nullable): the name of the icon shown in the button
|
||||
*/
|
||||
const char *
|
||||
gtk_menu_button_get_icon_name (GtkMenuButton *menu_button)
|
||||
@@ -1164,6 +1165,7 @@ gtk_menu_button_set_label (GtkMenuButton *menu_button,
|
||||
|
||||
gtk_accessible_update_relation (GTK_ACCESSIBLE (menu_button->button),
|
||||
GTK_ACCESSIBLE_RELATION_LABELLED_BY, menu_button->label_widget, NULL,
|
||||
GTK_ACCESSIBLE_RELATION_DESCRIBED_BY, menu_button->label_widget, NULL,
|
||||
-1);
|
||||
|
||||
menu_button->image_widget = NULL;
|
||||
@@ -1182,7 +1184,7 @@ gtk_menu_button_set_label (GtkMenuButton *menu_button,
|
||||
*
|
||||
* Gets the label shown in the button
|
||||
*
|
||||
* Returns: the label shown in the button
|
||||
* Returns: (nullable): the label shown in the button
|
||||
*/
|
||||
const char *
|
||||
gtk_menu_button_get_label (GtkMenuButton *menu_button)
|
||||
|
||||
@@ -1873,7 +1873,7 @@ gtk_mount_operation_set_parent (GtkMountOperation *op,
|
||||
*
|
||||
* Gets the transient parent used by the `GtkMountOperation`.
|
||||
*
|
||||
* Returns: (transfer none): the transient parent for windows shown by @op
|
||||
* Returns: (transfer none) (nullable): the transient parent for windows shown by @op
|
||||
*/
|
||||
GtkWindow *
|
||||
gtk_mount_operation_get_parent (GtkMountOperation *op)
|
||||
|
||||
@@ -396,7 +396,7 @@ gtk_multi_selection_new (GListModel *model)
|
||||
*
|
||||
* Returns the underlying model of @self.
|
||||
*
|
||||
* Returns: (transfer none): the underlying model
|
||||
* Returns: (transfer none) (nullable): the underlying model
|
||||
*/
|
||||
GListModel *
|
||||
gtk_multi_selection_get_model (GtkMultiSelection *self)
|
||||
|
||||
+1
-1
@@ -267,7 +267,7 @@ gtk_native_get_surface_transform (GtkNative *self,
|
||||
*
|
||||
* Finds the `GtkNative` associated with the surface.
|
||||
*
|
||||
* Returns: (transfer none): the `GtkNative` that is associated with @surface
|
||||
* Returns: (transfer none) (nullable): the `GtkNative` that is associated with @surface
|
||||
*/
|
||||
GtkNative *
|
||||
gtk_native_get_for_surface (GdkSurface *surface)
|
||||
|
||||
@@ -242,7 +242,7 @@ gtk_no_selection_new (GListModel *model)
|
||||
*
|
||||
* Gets the model that @self is wrapping.
|
||||
*
|
||||
* Returns: (transfer none): The model being wrapped
|
||||
* Returns: (transfer none) (nullable): The model being wrapped
|
||||
*/
|
||||
GListModel *
|
||||
gtk_no_selection_get_model (GtkNoSelection *self)
|
||||
|
||||
@@ -729,7 +729,7 @@ gtk_password_entry_set_extra_menu (GtkPasswordEntry *entry,
|
||||
*
|
||||
* Gets the menu model set with gtk_password_entry_set_extra_menu().
|
||||
*
|
||||
* Returns: (transfer none): (nullable): the menu model
|
||||
* Returns: (transfer none) (nullable): the menu model
|
||||
*/
|
||||
GMenuModel *
|
||||
gtk_password_entry_get_extra_menu (GtkPasswordEntry *entry)
|
||||
|
||||
@@ -819,7 +819,7 @@ gtk_popover_menu_set_menu_model (GtkPopoverMenu *popover,
|
||||
*
|
||||
* Returns the menu model used to populate the popover.
|
||||
*
|
||||
* Returns: (transfer none): the menu model of @popover
|
||||
* Returns: (transfer none) (nullable): the menu model of @popover
|
||||
*/
|
||||
GMenuModel *
|
||||
gtk_popover_menu_get_menu_model (GtkPopoverMenu *popover)
|
||||
|
||||
@@ -746,7 +746,7 @@ gtk_popover_menu_bar_set_menu_model (GtkPopoverMenuBar *bar,
|
||||
*
|
||||
* Returns the model from which the contents of @bar are taken.
|
||||
*
|
||||
* Returns: (transfer none): a `GMenuModel`
|
||||
* Returns: (transfer none) (nullable): a `GMenuModel`
|
||||
*/
|
||||
GMenuModel *
|
||||
gtk_popover_menu_bar_get_menu_model (GtkPopoverMenuBar *bar)
|
||||
|
||||
@@ -154,7 +154,7 @@ gtk_print_settings_copy (GtkPrintSettings *other)
|
||||
*
|
||||
* Looks up the string value associated with @key.
|
||||
*
|
||||
* Returns: the string value for @key
|
||||
* Returns: (nullable): the string value for @key
|
||||
*/
|
||||
const char *
|
||||
gtk_print_settings_get (GtkPrintSettings *settings,
|
||||
@@ -480,7 +480,7 @@ gtk_print_settings_foreach (GtkPrintSettings *settings,
|
||||
* Convenience function to obtain the value of
|
||||
* %GTK_PRINT_SETTINGS_PRINTER.
|
||||
*
|
||||
* Returns: the printer name
|
||||
* Returns: (nullable): the printer name
|
||||
*/
|
||||
const char *
|
||||
gtk_print_settings_get_printer (GtkPrintSettings *settings)
|
||||
@@ -574,7 +574,7 @@ gtk_print_settings_set_orientation (GtkPrintSettings *settings,
|
||||
* Gets the value of %GTK_PRINT_SETTINGS_PAPER_FORMAT,
|
||||
* converted to a `GtkPaperSize`.
|
||||
*
|
||||
* Returns: the paper size
|
||||
* Returns: (nullable): the paper size
|
||||
*/
|
||||
GtkPaperSize *
|
||||
gtk_print_settings_get_paper_size (GtkPrintSettings *settings)
|
||||
@@ -779,7 +779,7 @@ gtk_print_settings_set_collate (GtkPrintSettings *settings,
|
||||
*
|
||||
* Gets the value of %GTK_PRINT_SETTINGS_REVERSE.
|
||||
*
|
||||
* Returns: whether to reverse the order of the printed pages
|
||||
* Returns: whether to reverse the order of the printed pages
|
||||
*/
|
||||
gboolean
|
||||
gtk_print_settings_get_reverse (GtkPrintSettings *settings)
|
||||
@@ -1415,7 +1415,7 @@ gtk_print_settings_set_page_ranges (GtkPrintSettings *settings,
|
||||
*
|
||||
* Gets the value of %GTK_PRINT_SETTINGS_DEFAULT_SOURCE.
|
||||
*
|
||||
* Returns: the default source
|
||||
* Returns: (nullable): the default source
|
||||
*/
|
||||
const char *
|
||||
gtk_print_settings_get_default_source (GtkPrintSettings *settings)
|
||||
@@ -1445,7 +1445,7 @@ gtk_print_settings_set_default_source (GtkPrintSettings *settings,
|
||||
*
|
||||
* The set of media types is defined in PWG 5101.1-2002 PWG.
|
||||
*
|
||||
* Returns: the media type
|
||||
* Returns: (nullable): the media type
|
||||
*/
|
||||
const char *
|
||||
gtk_print_settings_get_media_type (GtkPrintSettings *settings)
|
||||
@@ -1475,7 +1475,7 @@ gtk_print_settings_set_media_type (GtkPrintSettings *settings,
|
||||
*
|
||||
* Gets the value of %GTK_PRINT_SETTINGS_DITHER.
|
||||
*
|
||||
* Returns: the dithering that is used
|
||||
* Returns: (nullable): the dithering that is used
|
||||
*/
|
||||
const char *
|
||||
gtk_print_settings_get_dither (GtkPrintSettings *settings)
|
||||
@@ -1503,7 +1503,7 @@ gtk_print_settings_set_dither (GtkPrintSettings *settings,
|
||||
*
|
||||
* Gets the value of %GTK_PRINT_SETTINGS_FINISHINGS.
|
||||
*
|
||||
* Returns: the finishings
|
||||
* Returns: (nullable): the finishings
|
||||
*/
|
||||
const char *
|
||||
gtk_print_settings_get_finishings (GtkPrintSettings *settings)
|
||||
@@ -1531,7 +1531,7 @@ gtk_print_settings_set_finishings (GtkPrintSettings *settings,
|
||||
*
|
||||
* Gets the value of %GTK_PRINT_SETTINGS_OUTPUT_BIN.
|
||||
*
|
||||
* Returns: the output bin
|
||||
* Returns: (nullable): the output bin
|
||||
*/
|
||||
const char *
|
||||
gtk_print_settings_get_output_bin (GtkPrintSettings *settings)
|
||||
|
||||
+2
-2
@@ -130,7 +130,7 @@ gtk_scrollable_default_init (GtkScrollableInterface *iface)
|
||||
*
|
||||
* Retrieves the `GtkAdjustment` used for horizontal scrolling.
|
||||
*
|
||||
* Returns: (transfer none): horizontal `GtkAdjustment`.
|
||||
* Returns: (transfer none) (nullable): horizontal `GtkAdjustment`.
|
||||
*/
|
||||
GtkAdjustment *
|
||||
gtk_scrollable_get_hadjustment (GtkScrollable *scrollable)
|
||||
@@ -174,7 +174,7 @@ gtk_scrollable_set_hadjustment (GtkScrollable *scrollable,
|
||||
*
|
||||
* Retrieves the `GtkAdjustment` used for vertical scrolling.
|
||||
*
|
||||
* Returns: (transfer none): vertical `GtkAdjustment`.
|
||||
* Returns: (transfer none) (nullable): vertical `GtkAdjustment`.
|
||||
*/
|
||||
GtkAdjustment *
|
||||
gtk_scrollable_get_vadjustment (GtkScrollable *scrollable)
|
||||
|
||||
@@ -461,9 +461,9 @@ gtk_widget_query_size_for_orientation (GtkWidget *widget,
|
||||
* @minimum: (out) (optional): location to store the minimum size
|
||||
* @natural: (out) (optional): location to store the natural size
|
||||
* @minimum_baseline: (out) (optional): location to store the baseline
|
||||
* position for the minimum size
|
||||
* position for the minimum size, or -1 to report no baseline
|
||||
* @natural_baseline: (out) (optional): location to store the baseline
|
||||
* position for the natural size
|
||||
* position for the natural size, or -1 to report no baseline
|
||||
*
|
||||
* Measures @widget in the orientation @orientation and for the given @for_size.
|
||||
*
|
||||
|
||||
+1
-1
@@ -346,7 +346,7 @@ gtk_text_mark_get_deleted (GtkTextMark *mark)
|
||||
*
|
||||
* Returns %NULL if the mark is deleted.
|
||||
*
|
||||
* Returns: (transfer none): the mark’s `GtkTextBuffer`
|
||||
* Returns: (transfer none) (nullable): the mark’s `GtkTextBuffer`
|
||||
*/
|
||||
GtkTextBuffer*
|
||||
gtk_text_mark_get_buffer (GtkTextMark *mark)
|
||||
|
||||
+9
-1
@@ -148,6 +148,14 @@
|
||||
* # Accessibility
|
||||
*
|
||||
* `GtkWindow` uses the %GTK_ACCESSIBLE_ROLE_WINDOW role.
|
||||
*
|
||||
* # Actions
|
||||
*
|
||||
* `GtkWindow` defines a set of built-in actions:
|
||||
* - `default.activate`: Activate the default widget.
|
||||
* - `window.minimize`: Minimize the window.
|
||||
* - `window.toggle-maximized`: Maximize or restore the window.
|
||||
* - `window.close`: Close the window.
|
||||
*/
|
||||
|
||||
#define MENU_BAR_ACCEL GDK_KEY_F10
|
||||
@@ -1200,7 +1208,7 @@ gtk_window_class_init (GtkWindowClass *klass)
|
||||
/**
|
||||
* GtkWindow|window.minimize:
|
||||
*
|
||||
* Close the window.
|
||||
* Minimize the window.
|
||||
*/
|
||||
gtk_widget_class_install_action (widget_class, "window.minimize", NULL,
|
||||
gtk_window_activate_minimize);
|
||||
|
||||
@@ -108,10 +108,11 @@ gtk_inspector_init (void)
|
||||
void
|
||||
gtk_inspector_register_extension (void)
|
||||
{
|
||||
if (extension_point == NULL) {
|
||||
extension_point = g_io_extension_point_register ("gtk-inspector-page");
|
||||
g_io_extension_point_set_required_type (extension_point, GTK_TYPE_WIDGET);
|
||||
}
|
||||
if (extension_point == NULL)
|
||||
{
|
||||
extension_point = g_io_extension_point_register ("gtk-inspector-page");
|
||||
g_io_extension_point_set_required_type (extension_point, GTK_TYPE_WIDGET);
|
||||
}
|
||||
}
|
||||
|
||||
// vim: set et sw=2 ts=2:
|
||||
|
||||
+16
-2
@@ -18,6 +18,7 @@
|
||||
#include <hb-ot.h>
|
||||
|
||||
#include "language-names.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
#ifndef ISO_CODES_PREFIX
|
||||
#define ISO_CODES_PREFIX "/usr"
|
||||
@@ -200,11 +201,22 @@ languages_variant_init (const char *variant)
|
||||
char *filename;
|
||||
GError *error;
|
||||
|
||||
bindtextdomain (variant, ISO_CODES_LOCALESDIR);
|
||||
char *iso_codes_datadir;
|
||||
char *iso_codes_localedir;
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
iso_codes_datadir = g_build_filename (_gtk_get_datadir (), "xml", "iso-codes", NULL);
|
||||
iso_codes_localedir = _gtk_get_localedir ();
|
||||
#else
|
||||
iso_codes_datadir = g_strdup (ISO_CODES_DATADIR);
|
||||
iso_codes_localedir = g_strdup (ISO_CODES_LOCALESDIR);
|
||||
#endif
|
||||
|
||||
bindtextdomain (variant, iso_codes_localedir);
|
||||
bind_textdomain_codeset (variant, "UTF-8");
|
||||
|
||||
error = NULL;
|
||||
filename = g_strconcat (ISO_CODES_DATADIR, "/", variant, ".xml", NULL);
|
||||
filename = g_strconcat (iso_codes_datadir, "/", variant, ".xml", NULL);
|
||||
res = g_file_get_contents (filename, &buf, &buf_len, &error);
|
||||
if (res)
|
||||
{
|
||||
@@ -230,6 +242,8 @@ languages_variant_init (const char *variant)
|
||||
|
||||
g_free (filename);
|
||||
g_free (buf);
|
||||
g_free (iso_codes_datadir);
|
||||
g_free (iso_codes_localedir);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -883,6 +883,7 @@ if not meson.is_cross_build() and build_machine.system() == 'linux' and objcopy.
|
||||
depfile : 'gtk.gresource.d',
|
||||
command : [glib_compile_resources,
|
||||
'--generate',
|
||||
'--internal',
|
||||
'--target=@OUTPUT@',
|
||||
'--dependency-file=@DEPFILE@',
|
||||
'--sourcedir=' + meson.current_source_dir(),
|
||||
@@ -897,6 +898,7 @@ if not meson.is_cross_build() and build_machine.system() == 'linux' and objcopy.
|
||||
depfile : 'gtkresources.c.d',
|
||||
command : [glib_compile_resources,
|
||||
'--generate-source',
|
||||
'--internal',
|
||||
'--target=@OUTPUT@',
|
||||
'--dependency-file=@DEPFILE@',
|
||||
'--sourcedir=' + meson.current_source_dir(),
|
||||
@@ -913,6 +915,7 @@ if not meson.is_cross_build() and build_machine.system() == 'linux' and objcopy.
|
||||
depfile : 'gtkresources.h.d',
|
||||
command : [glib_compile_resources,
|
||||
'--generate-header',
|
||||
'--internal',
|
||||
'--target=@OUTPUT@',
|
||||
'--dependency-file=@DEPFILE@',
|
||||
'--sourcedir=' + meson.current_source_dir(),
|
||||
@@ -927,6 +930,7 @@ if not meson.is_cross_build() and build_machine.system() == 'linux' and objcopy.
|
||||
input : gtk_gresource,
|
||||
output : 'gtkresources_blob.o',
|
||||
command : [ld,
|
||||
'-z', 'noexecstack',
|
||||
'-r',
|
||||
'-b','binary',
|
||||
'@INPUT@',
|
||||
@@ -937,6 +941,7 @@ if not meson.is_cross_build() and build_machine.system() == 'linux' and objcopy.
|
||||
input : gtk_resources_binary,
|
||||
output : 'gtkresources_blob2.o',
|
||||
command : [objcopy,
|
||||
'--strip-all',
|
||||
'--add-symbol','_gtk_resource_data=.data:0',
|
||||
'@INPUT@',
|
||||
'@OUTPUT@'])
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface domain="gtk40">
|
||||
<object class="GtkSingleSelection" id="selection">
|
||||
<property name="autoselect">0</property>
|
||||
<signal name="notify::selected-item" handler="selection_changed_cb" object="GtkFontChooserWidget" swapped="0"/>
|
||||
<signal name="items-changed" handler="rows_changed_cb" object="GtkFontChooserWidget" swapped="1"/>
|
||||
<property name="model">
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
project('gtk', 'c',
|
||||
version: '4.5.1',
|
||||
version: '4.6.0',
|
||||
default_options: [
|
||||
'buildtype=debugoptimized',
|
||||
'warning_level=1',
|
||||
@@ -614,7 +614,7 @@ if win32_enabled
|
||||
else
|
||||
pc_gdk_extra_libs += ['-Wl,-luuid']
|
||||
endif
|
||||
pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32']
|
||||
pc_gdk_extra_libs += ['-lwinmm', '-ldwmapi', '-lsetupapi', '-lcfgmgr32', '-lhid']
|
||||
|
||||
# Check whether libepoxy is built with EGL support on Windows
|
||||
endif
|
||||
|
||||
+248
-232
File diff suppressed because it is too large
Load Diff
+268
-283
File diff suppressed because it is too large
Load Diff
+3792
-5547
File diff suppressed because it is too large
Load Diff
@@ -12,8 +12,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 3.10\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2021-12-27 13:54+0000\n"
|
||||
"PO-Revision-Date: 2021-12-27 22:51+0000\n"
|
||||
"POT-Creation-Date: 2022-01-04 11:18+0000\n"
|
||||
"PO-Revision-Date: 2022-01-04 14:12+0000\n"
|
||||
"Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n"
|
||||
"Language-Team: Português <https://l10n.gnome.org/teams/pt/>\n"
|
||||
"Language: pt\n"
|
||||
@@ -2125,7 +2125,7 @@ msgstr "Já existe um ficheiro com esse nome"
|
||||
#: gtk/gtkmountoperation.c:610 gtk/gtkpagesetupunixdialog.c:283
|
||||
#: gtk/gtkprintbackend.c:642 gtk/gtkprinteroptionwidget.c:713
|
||||
#: gtk/gtkprintunixdialog.c:667 gtk/gtkprintunixdialog.c:823
|
||||
#: gtk/gtkwindow.c:6218 gtk/inspector/css-editor.c:248
|
||||
#: gtk/gtkwindow.c:6226 gtk/inspector/css-editor.c:248
|
||||
#: gtk/inspector/recorder.c:1706
|
||||
msgid "_Cancel"
|
||||
msgstr "_Cancelar"
|
||||
@@ -2215,7 +2215,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "Se eliminar um item, estará permanentemente perdido."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1210 gtk/gtkfilechooserwidget.c:1826
|
||||
#: gtk/gtklabel.c:5644 gtk/gtktext.c:6064 gtk/gtktextview.c:8920
|
||||
#: gtk/gtklabel.c:5645 gtk/gtktext.c:6064 gtk/gtktextview.c:8920
|
||||
msgid "_Delete"
|
||||
msgstr "_Eliminar"
|
||||
|
||||
@@ -2336,7 +2336,7 @@ msgstr "Programa"
|
||||
msgid "Audio"
|
||||
msgstr "Áudio"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4303 gtk/gtkfontbutton.c:602
|
||||
#: gtk/gtkfilechooserwidget.c:4303 gtk/gtkfontbutton.c:604
|
||||
#: gtk/inspector/visual.ui:170
|
||||
msgid "Font"
|
||||
msgstr "Letra"
|
||||
@@ -2421,60 +2421,65 @@ msgstr "Acedido"
|
||||
msgid "Sans 12"
|
||||
msgstr "Sans 12"
|
||||
|
||||
#: gtk/gtkfontbutton.c:506 gtk/gtkfontbutton.c:626
|
||||
#: gtk/gtkfontbutton.c:508 gtk/gtkfontbutton.c:628
|
||||
msgid "Pick a Font"
|
||||
msgstr "Escolha uma letra"
|
||||
|
||||
#: gtk/gtkfontbutton.c:1363
|
||||
#: gtk/gtkfontbutton.c:1365
|
||||
msgctxt "font"
|
||||
msgid "None"
|
||||
msgstr "Nenhuma"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1569
|
||||
#: gtk/gtkfontchooserwidget.c:1532
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Width"
|
||||
msgstr "Largura"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1570
|
||||
#: gtk/gtkfontchooserwidget.c:1533
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Weight"
|
||||
msgstr "Peso"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1571
|
||||
#: gtk/gtkfontchooserwidget.c:1534
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Italic"
|
||||
msgstr "Itálico"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1572
|
||||
#: gtk/gtkfontchooserwidget.c:1535
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Slant"
|
||||
msgstr "Inclinado"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1573
|
||||
#: gtk/gtkfontchooserwidget.c:1536
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Optical Size"
|
||||
msgstr "Tamanho ótico"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2120
|
||||
#: gtk/gtkfontchooserwidget.c:2140
|
||||
msgid "Default"
|
||||
msgstr "Predefinição"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2166
|
||||
#: gtk/gtkfontchooserwidget.c:2186
|
||||
msgid "Ligatures"
|
||||
msgstr "Ligaduras"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2167
|
||||
#: gtk/gtkfontchooserwidget.c:2187
|
||||
msgid "Letter Case"
|
||||
msgstr "Caixa de letra"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2168
|
||||
#: gtk/gtkfontchooserwidget.c:2188
|
||||
msgid "Number Case"
|
||||
msgstr "Caixa de número"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2169
|
||||
#: gtk/gtkfontchooserwidget.c:2189
|
||||
msgid "Number Spacing"
|
||||
msgstr "Espaçamento de número"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2170
|
||||
#: gtk/gtkfontchooserwidget.c:2190
|
||||
msgid "Number Formatting"
|
||||
msgstr "Formatação de número"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2171
|
||||
#: gtk/gtkfontchooserwidget.c:2191
|
||||
msgid "Character Variants"
|
||||
msgstr "Variantes de carácter"
|
||||
|
||||
@@ -2482,27 +2487,27 @@ msgstr "Variantes de carácter"
|
||||
msgid "OpenGL context creation failed"
|
||||
msgstr "Falha ao criar o contexto OpenGL"
|
||||
|
||||
#: gtk/gtklabel.c:5641 gtk/gtktext.c:6052 gtk/gtktextview.c:8908
|
||||
#: gtk/gtklabel.c:5642 gtk/gtktext.c:6052 gtk/gtktextview.c:8908
|
||||
msgid "Cu_t"
|
||||
msgstr "Cor_tar"
|
||||
|
||||
#: gtk/gtklabel.c:5642 gtk/gtktext.c:6056 gtk/gtktextview.c:8912
|
||||
#: gtk/gtklabel.c:5643 gtk/gtktext.c:6056 gtk/gtktextview.c:8912
|
||||
msgid "_Copy"
|
||||
msgstr "_Copiar"
|
||||
|
||||
#: gtk/gtklabel.c:5643 gtk/gtktext.c:6060 gtk/gtktextview.c:8916
|
||||
#: gtk/gtklabel.c:5644 gtk/gtktext.c:6060 gtk/gtktextview.c:8916
|
||||
msgid "_Paste"
|
||||
msgstr "Co_lar"
|
||||
|
||||
#: gtk/gtklabel.c:5649 gtk/gtktext.c:6073 gtk/gtktextview.c:8941
|
||||
#: gtk/gtklabel.c:5650 gtk/gtktext.c:6073 gtk/gtktextview.c:8941
|
||||
msgid "Select _All"
|
||||
msgstr "Selecionar _tudo"
|
||||
|
||||
#: gtk/gtklabel.c:5654
|
||||
#: gtk/gtklabel.c:5655
|
||||
msgid "_Open Link"
|
||||
msgstr "_Abrir Ligação"
|
||||
|
||||
#: gtk/gtklabel.c:5658
|
||||
#: gtk/gtklabel.c:5659
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "Copiar endereço da _ligação"
|
||||
|
||||
@@ -2551,7 +2556,7 @@ msgstr ""
|
||||
#. * Do *not* translate it to "predefinito:LTR", if it
|
||||
#. * it isn't default:LTR or default:RTL it will not work
|
||||
#.
|
||||
#: gtk/gtkmain.c:768
|
||||
#: gtk/gtkmain.c:771
|
||||
msgid "default:LTR"
|
||||
msgstr "default:LTR"
|
||||
|
||||
@@ -2604,7 +2609,7 @@ msgid "%d:%02d"
|
||||
msgstr "%d:%02d"
|
||||
|
||||
#: gtk/gtkmessagedialog.c:158 gtk/gtkmessagedialog.c:176
|
||||
#: gtk/gtkprintbackend.c:643 gtk/gtkwindow.c:6219
|
||||
#: gtk/gtkprintbackend.c:643 gtk/gtkwindow.c:6227
|
||||
msgid "_OK"
|
||||
msgstr "_Aceitar"
|
||||
|
||||
@@ -3506,12 +3511,12 @@ msgctxt "volume percentage"
|
||||
msgid "%d %%"
|
||||
msgstr "%d %%"
|
||||
|
||||
#: gtk/gtkwindow.c:6206
|
||||
#: gtk/gtkwindow.c:6214
|
||||
#, c-format
|
||||
msgid "Do you want to use GTK Inspector?"
|
||||
msgstr "Deseja usar o Inspetor GTK?"
|
||||
|
||||
#: gtk/gtkwindow.c:6208
|
||||
#: gtk/gtkwindow.c:6216
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK Inspector is an interactive debugger that lets you explore and modify "
|
||||
@@ -3522,7 +3527,7 @@ msgstr ""
|
||||
"estado interno de qualquer aplicação GTK. Usá-lo pode fazer que a aplicação "
|
||||
"se encerre ou falhe."
|
||||
|
||||
#: gtk/gtkwindow.c:6213
|
||||
#: gtk/gtkwindow.c:6221
|
||||
msgid "Don’t show this message again"
|
||||
msgstr "Não mostrar esta mensagem novamente"
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
# Maxim Dziumanenko <dziumanenko@gmail.com>, 2004-2010.
|
||||
# wanderlust <wanderlust@ukr.net>, 2009.
|
||||
# Daniel Korostil <ted.korostiled@gmail.com>, 2013, 2014, 2015, 2016.
|
||||
# Yuri Chornoivan <yurchor@ukr.net>, 2014, 2020, 2021.
|
||||
# Yuri Chornoivan <yurchor@ukr.net>, 2014, 2020, 2021, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2021-12-27 13:54+0000\n"
|
||||
"PO-Revision-Date: 2021-12-27 16:07+0200\n"
|
||||
"POT-Creation-Date: 2022-01-03 02:53+0000\n"
|
||||
"PO-Revision-Date: 2022-01-03 22:50+0200\n"
|
||||
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
|
||||
"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
|
||||
"Language: uk\n"
|
||||
@@ -2126,7 +2126,7 @@ msgstr "Файл з такою назвою вже існує"
|
||||
#: gtk/gtkmountoperation.c:610 gtk/gtkpagesetupunixdialog.c:283
|
||||
#: gtk/gtkprintbackend.c:642 gtk/gtkprinteroptionwidget.c:713
|
||||
#: gtk/gtkprintunixdialog.c:667 gtk/gtkprintunixdialog.c:823
|
||||
#: gtk/gtkwindow.c:6218 gtk/inspector/css-editor.c:248
|
||||
#: gtk/gtkwindow.c:6226 gtk/inspector/css-editor.c:248
|
||||
#: gtk/inspector/recorder.c:1706
|
||||
msgid "_Cancel"
|
||||
msgstr "_Скасувати"
|
||||
@@ -2336,7 +2336,7 @@ msgstr "Програма"
|
||||
msgid "Audio"
|
||||
msgstr "Звук"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:4303 gtk/gtkfontbutton.c:602
|
||||
#: gtk/gtkfilechooserwidget.c:4303 gtk/gtkfontbutton.c:604
|
||||
#: gtk/inspector/visual.ui:170
|
||||
msgid "Font"
|
||||
msgstr "Шрифт"
|
||||
@@ -2420,60 +2420,70 @@ msgstr "Дозволено"
|
||||
msgid "Sans 12"
|
||||
msgstr "Sans 12"
|
||||
|
||||
#: gtk/gtkfontbutton.c:506 gtk/gtkfontbutton.c:626
|
||||
#: gtk/gtkfontbutton.c:508 gtk/gtkfontbutton.c:628
|
||||
msgid "Pick a Font"
|
||||
msgstr "Виберіть шрифт"
|
||||
|
||||
#: gtk/gtkfontbutton.c:1363
|
||||
#: gtk/gtkfontbutton.c:1365
|
||||
msgctxt "font"
|
||||
msgid "None"
|
||||
msgstr "Немає"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1569
|
||||
#: gtk/gtkfontchooserwidget.c:1532
|
||||
#| msgid "Width"
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Width"
|
||||
msgstr "Ширина"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1570
|
||||
#: gtk/gtkfontchooserwidget.c:1533
|
||||
#| msgid "Weight"
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Weight"
|
||||
msgstr "Вага"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1571
|
||||
#: gtk/gtkfontchooserwidget.c:1534
|
||||
#| msgid "Italic"
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Italic"
|
||||
msgstr "Курсив"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1572
|
||||
#: gtk/gtkfontchooserwidget.c:1535
|
||||
#| msgid "Slant"
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Slant"
|
||||
msgstr "Нахил"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1573
|
||||
#: gtk/gtkfontchooserwidget.c:1536
|
||||
#| msgid "Optical Size"
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Optical Size"
|
||||
msgstr "Оптичний розмір"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2120
|
||||
#: gtk/gtkfontchooserwidget.c:2140
|
||||
msgid "Default"
|
||||
msgstr "Типово"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2166
|
||||
#: gtk/gtkfontchooserwidget.c:2186
|
||||
msgid "Ligatures"
|
||||
msgstr "Лігатури"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2167
|
||||
#: gtk/gtkfontchooserwidget.c:2187
|
||||
msgid "Letter Case"
|
||||
msgstr "Розмір літер"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2168
|
||||
#: gtk/gtkfontchooserwidget.c:2188
|
||||
msgid "Number Case"
|
||||
msgstr "Розмір цифр"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2169
|
||||
#: gtk/gtkfontchooserwidget.c:2189
|
||||
msgid "Number Spacing"
|
||||
msgstr "Інтервали між цифрами"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2170
|
||||
#: gtk/gtkfontchooserwidget.c:2190
|
||||
msgid "Number Formatting"
|
||||
msgstr "Форматування чисел"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2171
|
||||
#: gtk/gtkfontchooserwidget.c:2191
|
||||
msgid "Character Variants"
|
||||
msgstr "Варіанти символів"
|
||||
|
||||
@@ -2550,7 +2560,7 @@ msgstr ""
|
||||
#. * Do *not* translate it to "predefinito:LTR", if it
|
||||
#. * it isn't default:LTR or default:RTL it will not work
|
||||
#.
|
||||
#: gtk/gtkmain.c:768
|
||||
#: gtk/gtkmain.c:771
|
||||
msgid "default:LTR"
|
||||
msgstr "default:LTR"
|
||||
|
||||
@@ -2603,7 +2613,7 @@ msgid "%d:%02d"
|
||||
msgstr "%d:%02d"
|
||||
|
||||
#: gtk/gtkmessagedialog.c:158 gtk/gtkmessagedialog.c:176
|
||||
#: gtk/gtkprintbackend.c:643 gtk/gtkwindow.c:6219
|
||||
#: gtk/gtkprintbackend.c:643 gtk/gtkwindow.c:6227
|
||||
msgid "_OK"
|
||||
msgstr "_Гаразд"
|
||||
|
||||
@@ -2942,7 +2952,7 @@ msgstr "_Додати до закладок"
|
||||
|
||||
#: gtk/gtkplacessidebar.c:3244
|
||||
msgid "_Remove"
|
||||
msgstr "В_лучити"
|
||||
msgstr "Ви_лучити"
|
||||
|
||||
#: gtk/gtkplacessidebar.c:3260 gtk/gtkplacesview.c:1692
|
||||
msgid "_Mount"
|
||||
@@ -3504,12 +3514,12 @@ msgctxt "volume percentage"
|
||||
msgid "%d %%"
|
||||
msgstr "%d %%"
|
||||
|
||||
#: gtk/gtkwindow.c:6206
|
||||
#: gtk/gtkwindow.c:6214
|
||||
#, c-format
|
||||
msgid "Do you want to use GTK Inspector?"
|
||||
msgstr "Бажаєте використовувати інспектор GTK?"
|
||||
|
||||
#: gtk/gtkwindow.c:6208
|
||||
#: gtk/gtkwindow.c:6216
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK Inspector is an interactive debugger that lets you explore and modify "
|
||||
@@ -3520,7 +3530,7 @@ msgstr ""
|
||||
"редагувати внутрішні частини будь-які програми GTK. Його використання може "
|
||||
"спричинити збої в програмі."
|
||||
|
||||
#: gtk/gtkwindow.c:6213
|
||||
#: gtk/gtkwindow.c:6221
|
||||
msgid "Don’t show this message again"
|
||||
msgstr "Не показувати це повідомлення надалі"
|
||||
|
||||
@@ -3596,7 +3606,6 @@ msgid "Show"
|
||||
msgstr "Показати"
|
||||
|
||||
#: gtk/inspector/clipboard.c:228
|
||||
#| msgid "Copy to clipboard"
|
||||
msgid "Hover to load"
|
||||
msgstr "Наведення для завантаження"
|
||||
|
||||
@@ -3617,8 +3626,7 @@ msgstr "віддалений"
|
||||
|
||||
#: gtk/inspector/clipboard.ui:31
|
||||
msgid "Drag and hold here"
|
||||
msgstr ""
|
||||
"Перетягніть і затримайте тут"
|
||||
msgstr "Перетягніть і затримайте тут"
|
||||
|
||||
#: gtk/inspector/clipboard.ui:75 gtk/inspector/window.ui:574
|
||||
msgid "Clipboard"
|
||||
|
||||
@@ -1 +1 @@
|
||||
invalid5.ui:3:1 Required GTK version 5.10, current version is 4.5
|
||||
invalid5.ui:3:1 Required GTK version 5.10, current version is 4.6
|
||||
|
||||
Reference in New Issue
Block a user