Compare commits

...

90 Commits

Author SHA1 Message Date
Matthias Clasen 3200efcbde Add gtk_builder_cscope_add_callback
This is a convenience method for the common case
that symbols are used under their own name.
2022-06-30 16:13:55 -04:00
Matthias Clasen 092fe2f712 gtk-demo: Cosmetics
Tweak the complicated textview demo a bit.
2022-06-23 07:40:55 -04:00
Matthias Clasen 5be54fad82 Merge branch 'wip/jtojnar/demo-pickers-no-dirs' into 'main'
gtk-demo: Remove mention of directories in picker examples

See merge request GNOME/gtk!4825
2022-06-23 11:39:33 +00:00
Jan Tojnar d91e669d98 gtk-demo: Remove mention of directories in picker examples
Those were removed in https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2909.
2022-06-22 23:07:28 +02:00
Asier Sarasua Garmendia 9a22577e34 Update Basque translation 2022-06-22 19:17:51 +00:00
Yuri Chornoivan 88366c5e13 Update Ukrainian translation 2022-06-22 19:06:56 +00:00
Matthias Clasen 287ed99130 Merge branch 'wip/otte/inspector-inspector' into 'main'
inspector: Inspect

See merge request GNOME/gtk!4822
2022-06-22 18:25:13 +00:00
Matthias Clasen 40e09cf2bb Merge branch 'wip/xdg-toplevel-bounds' into 'main'
wayland: Add supports for xdg_toplevel.bounds

See merge request GNOME/gtk!4261
2022-06-22 14:24:41 +00:00
Matthias Clasen 5a3ca064ea Merge branch 'gtk-window-export-handle-win32' into 'main'
Implement gtk_window_export_handle for other backends

See merge request GNOME/gtk!4824
2022-06-22 14:20:11 +00:00
Daniel Mustieles edc991dafd Updated Spanish translation 2022-06-22 10:45:59 +02:00
Luca Bacci a1d03e69a4 Add stub gtk_window_export_handle implementation for some backends 2022-06-21 22:56:33 +02:00
Benjamin Otte 18c2ba9b71 inspector: Add an "inspect inspector" button
And launch a new inspector.

The location of that button is rather random - I had no idea where to
put it.
2022-06-21 02:35:02 +02:00
Benjamin Otte 3da3cb35a6 object-tree: Allow inspecting inspectors
We filter by display, so the inspector window should show up only when
inspecting the inspector.
2022-06-21 02:35:02 +02:00
Benjamin Otte e54567611b inspector: Don't use global variable here
When inspecting the inspector, we want to create mutiple displays here.

If we need this to be global, we should store it per-inspected-display.
2022-06-21 02:35:02 +02:00
Aurimas Černius ce88d19015 Updated Lithuanian translation 2022-06-20 22:18:16 +03:00
Matthias Clasen 381c34783d Merge branch 'alatiera/inscription-since' into 'main'
inscription: Add missing Since annotations

See merge request GNOME/gtk!4815
2022-06-17 22:38:16 +00:00
Luca Bacci 3ea8dc02a3 Merge branch 'gdk-win32-gtk-overlay-scrolling' into 'main'
GdkWin32: Add code for gtk-overlay-scrolling setting

Closes #4899

See merge request GNOME/gtk!4816
2022-06-17 09:37:14 +00:00
Luca Bacci 83c780cfad GdkWin32: Add code for gtk-overlay-scrolling setting
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4899
2022-06-17 11:06:43 +02:00
Jordan Petridis 4b5d218067 inscription: Add missing Since annotations 2022-06-17 00:15:46 +03:00
Matthias Clasen 8944493eca Merge branch 'wip/jimmac/hc-sidebar-borders' into 'main'
HC: make selected items better visible

Closes #4984

See merge request GNOME/gtk!4813
2022-06-15 13:40:17 +00:00
Jakub Steiner dd9f26c492 HC: make selected items better visible
- follow libadwaita's example and outline selected items for better visibility
  in high contrast variant

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4984
2022-06-15 14:47:47 +02:00
Jordi Mas 3c038dc239 Update Catalan translation 2022-06-14 19:41:12 +02:00
Matthias Clasen 9ee555719e Merge branch 'matthiasc/for-main' into 'main'
gtk-demo: Add some keywords

See merge request GNOME/gtk!4812
2022-06-14 12:25:02 +00:00
Benjamin Otte 7953092059 Merge branch 'wip/antoniof/dont-rubberband-on-drag-end' into 'main'
listbase: Don't start rubberband on ::drag-end

See merge request GNOME/gtk!4793
2022-06-14 03:45:55 +00:00
Jonas Ådahl de1a8c8d89 wayland: Add support for xdg_toplevel.bounds
The GdkToplevelSize struct already has the concept of "bounds", which
means the largest size a window should reasonably have. It's practically
the equivalent of the monitor the window is intended to be mapped on,
with the "struts" (e.g. panels) cut out. It's used by GTK to use this
information to calculate a default window size that is "lagom" (swedish;
not too large, not too small).
2022-06-13 22:12:55 +02:00
Jordi Mas 98e000beb7 Update Catalan translation 2022-06-13 20:01:17 +02:00
Matthias Clasen 8b3a38779b gtk-demo: Add some keywords
Make it so that the right demos show up when
you search for GtkInscription.
2022-06-13 11:16:51 -04:00
Aleksandr Melman 8d72c8ee5f Update Russian translation 2022-06-13 13:26:30 +00:00
Benjamin Otte f9b0866415 Merge branch 'wip/otte/inscription' into 'main'
Inscription: Derive row alignment from xalign

See merge request GNOME/gtk!4811
2022-06-13 12:08:16 +00:00
Danial Behzadi dbe06357ec Update Persian translation 2022-06-13 06:44:53 +00:00
Danial Behzadi 9e03c3f6cd Update Persian translation 2022-06-13 05:48:56 +00:00
Benjamin Otte 2d14372142 reftests: Add an inscription xalign RTL test
This checks mainly that we do the right thing wrt PangoAlignment
weirdness.

0.25 and 0.75 are set to 0.0 and 1.0 currently because of Pango
limitations (and no desire to manually move lines).
But if that were to be fixed, both the ref and the test should update in
the same way and things should just keep working.
2022-06-13 06:49:22 +02:00
Benjamin Otte 0a4c08a7be inscription: Multiparagraph text is always multiline
Wrap this text and clip towards the bottom, no matter how high the
inscription is.
2022-06-13 06:49:12 +02:00
Benjamin Otte 883011f252 inscription: Do not try to align layouts that have a proper width set
Pango knows where to put the text.
2022-06-13 06:49:12 +02:00
Benjamin Otte 4927b6e625 reftests: Add inscription reftest for xalign
Compare with labels again.
2022-06-13 06:49:11 +02:00
Georges Basile Stavracas Neto c93a01d627 Inscription: Derive row alignment from xalign
Texts usually want the alignment of each row to match the xalign of
the text itself.

Derive the alignment of the PangoLayout from the xalign property of
the inscription. Because Pango doesn't provide float row alignment,
map left, center and right from the xalign in 1 / 3 steps.
2022-06-13 05:35:47 +02:00
Piotr Drąg 221a18704b Update POTFILES.skip 2022-06-12 14:52:37 +02:00
Matthias Clasen 62984d091a Merge branch 'wip/otte/inscription' into 'main'
More inscription work

See merge request GNOME/gtk!4808
2022-06-12 01:38:40 +00:00
Benjamin Otte 6d15549f51 inscription: Add ::wrap-mode
We use a different wrap-mode than GtkLabel, because we cannot just
resize the widget to make long words fit, we have to fit the size we are
given.
2022-06-12 03:10:50 +02:00
Benjamin Otte 4c1fc4f5d7 reftests: Test inscription multiline overflow 2022-06-12 02:42:00 +02:00
Benjamin Otte 98e0ca7477 gtk-demo: Add a "Read More" label demo. 2022-06-11 22:19:17 +02:00
Benjamin Otte 4809efd630 reftests: Test overflowing inscription yalign
Overflowing inscriptions should always align to the top, even when half
an extra line is available.
2022-06-11 22:19:17 +02:00
Matthias Clasen d88e935398 Merge branch 'wip/otte/listmodels' into 'main'
19 listmodels: Add ::item-type and ::n-items

See merge request GNOME/gtk!4807
2022-06-11 15:15:53 +00:00
Benjamin Otte 393ef4d0a2 inscription: Fixate layout at top when it doesn't fit
Ellipsized and clipped layouts shouldn't reposition themselves according
to yalign when they don't fully fit.
2022-06-11 16:28:27 +02:00
Benjamin Otte efd9aac3fa assistant: Add ::item-type and ::n-items to the pages list 2022-06-11 16:08:37 +02:00
Matthias Clasen c7c8b37e4c Merge branch 'wip/otte/inscription' into 'main'
Add GtkInscription

See merge request GNOME/gtk!4800
2022-06-11 13:47:20 +00:00
Benjamin Otte 11aef91fa5 bookmarklist: Add ::item-type and ::n-items 2022-06-11 08:25:23 +02:00
Benjamin Otte f48c9b8388 directorylist: Add ::item-type and ::n-items 2022-06-11 08:25:22 +02:00
Benjamin Otte 62096ebd16 filterlistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:22 +02:00
Benjamin Otte f7b8184b00 fattenlistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:21 +02:00
Benjamin Otte b91f60b4f9 listlistmodel: Add ::item-type and ::n-items 2022-06-11 08:25:21 +02:00
Benjamin Otte b6ba8ecbd0 maplistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:20 +02:00
Benjamin Otte 02ee10639d multifilter: Add ::item-type and ::n-items 2022-06-11 08:25:20 +02:00
Benjamin Otte 0e42fa95b1 multiselection: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:19 +02:00
Benjamin Otte 7a36632afc multisorter: Add ::item-type and ::n-items 2022-06-11 08:25:19 +02:00
Benjamin Otte 301f1a577d noselection: Add ::item-type and ::n-items 2022-06-11 08:25:18 +02:00
Benjamin Otte 67e336992f propertylookuplistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:18 +02:00
Benjamin Otte e1845f5e90 selectionfiltermodel: Add ::item-type and ::n-items 2022-06-11 08:25:17 +02:00
Benjamin Otte d7dae84af2 shortcutcontroller: Add ::item-type and ::n-items 2022-06-11 08:25:17 +02:00
Benjamin Otte 0f829c4599 singleselection: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:16 +02:00
Benjamin Otte 3fca865625 slicelistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:16 +02:00
Benjamin Otte bf8b26aa27 sortlistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:15 +02:00
Benjamin Otte cbc3d3f3ec stack: Add ::item-type and ::n-items to the pages list 2022-06-11 08:25:15 +02:00
Benjamin Otte fd4562aac9 treelistmodel: Add ::item-type and ::n-items
With tests!
2022-06-11 08:25:14 +02:00
Benjamin Otte c26962c4b1 multifilter: Actually emit ::items-changed when items change 2022-06-11 08:25:14 +02:00
Benjamin Otte 46ce19d22a multisorter: Actually emit ::items-changed when items change 2022-06-11 08:25:14 +02:00
Benjamin Otte 303bc3bb1b inspector: Use inscriptions for the rendernodes list 2022-06-11 02:15:08 +02:00
Benjamin Otte bf5edc6b7c reftests: Add test for the overflow methods
Reference is using labels again
2022-06-11 02:15:08 +02:00
Benjamin Otte 7c034cc283 inscription: Set css name
We use "label" just like GtkLabel as the two widgets differ in the way
they are measured, but they should be styled the same.

If it turns out we change our opinion on this for specific cases, we
can add style classes later.
2022-06-11 02:15:08 +02:00
Benjamin Otte e437a9c348 inscription: Add a11y support for text interface
This is entirely untested.
2022-06-11 02:15:08 +02:00
Benjamin Otte 1517c1813c inscription: Add ::text-overflow
Can't name it ::overflow, because that's taken by GtkWidget already
2022-06-11 02:15:08 +02:00
Benjamin Otte 9973a7173f reftests: Add test for inscription markup parsing
Compare with label markup parsing as the reference.
2022-06-11 02:15:08 +02:00
Benjamin Otte 01fcfc5c2a inscription: Add ::markup
Utility property that sets both the ::text and ::attributes properties,
mainly intended for use in ui files to ease translation support and bindings.
2022-06-11 02:15:08 +02:00
Benjamin Otte 3f4c88aad1 inscription: Add ::attributes property 2022-06-11 02:15:08 +02:00
Emin Tufan Çetin 8a0d6da187 Update Turkish translation 2022-06-10 06:06:14 +00:00
Benjamin Otte b8199bcc1f gtkpango: Add G_GNUC_WARN_UNUSED_RESULT
Guess who just spent 10 minutes in gdb and doesn't want to do that
again.
2022-06-10 04:34:23 +02:00
Benjamin Otte abdbef1b5e inspector: Add inscription support
Allow searching for inscription text and show it in the label column.
2022-06-10 04:34:23 +02:00
Benjamin Otte 6ac7f0562b inspector: Use inscriptions in the object tree 2022-06-10 04:34:23 +02:00
Benjamin Otte c796b30136 testcolumnview: Use GtkInscription
This test is suddenly MASSIVELY faster.

I wonder why.
Could it be because inscription does exactly what it was made for?
2022-06-10 04:34:23 +02:00
Benjamin Otte 61bc38cd61 gtk-demo: Use GtkInscription in the wordlist demo 2022-06-10 04:34:23 +02:00
Benjamin Otte b56b5ed81b gtk-demo: Use GtkInscription in the main list 2022-06-10 04:34:23 +02:00
Benjamin Otte b6a8080b2f Add GtkInscription
A label alternative that renders itself into a given rectangle.

The main use case is cells in column view.

Related: #3334
2022-06-09 05:58:27 +02:00
Matthias Clasen 0400607102 Merge branch 'symbolic-hc' into 'main'
Wayland/display: Don't force HighContrast icon theme

See merge request GNOME/gtk!4802
2022-06-08 10:36:46 +00:00
Matthias Clasen 5089fa3ecc Merge branch 'node-editor-scale' into 'main'
node-editor: Add a zoom button

See merge request GNOME/gtk!4804
2022-06-07 18:57:53 +00:00
Benjamin Otte dec6a93510 Merge branch 'wip/otte/for-main' into 'main'
inspector: Allow searching for editable text

See merge request GNOME/gtk!4801
2022-06-07 18:20:43 +00:00
Florian Müllner c3706ea9ec wayland/display: Don't force HighContrast icon theme
The theme is considered deprecated in favor of symbolic icons from
the regular theme.
2022-06-07 19:34:50 +02:00
Benjamin Otte e4869938b7 listview: Fix clipping for horizontal listviews
Fixes a bug introduced with
commit 39645d3258
2022-06-07 19:21:46 +02:00
Benjamin Otte fa1dca29b6 inspector: Allow searching for editable text
... and display it in the label column.
2022-06-07 17:33:04 +02:00
Benjamin Otte 9de027df65 video: Fix typo in docs 2022-06-07 05:56:15 +02:00
António Fernandes dc4540fae9 listbase: Don't start rubberband on ::drag-end
GtkGestrureDrag::drag-end can be emitted when the pointer has just
crossed the drag threshold and we have not started the rubberband yet.
This happens if another gesture has claimed the event sequence earlier
in the current event propagation chain.

In such situation, our ::drag-end calls gtk_list_base_drag_update(), 
which proceeds to start the rubberband. That's obviously wrong.
Additionally, it also tries to get modifiers from an event it we are 
already denied,  which obviously fails with criticals:

`gdk_event_get_modifier_state: assertion 'GDK_IS_EVENT (event)' failed`

Thus, if there is no rubberband when we receive ::drag-end, do nothing.
2022-06-04 17:30:10 +00:00
83 changed files with 7943 additions and 2487 deletions
+1
View File
@@ -329,6 +329,7 @@
<file>pickers.c</file>
<file>printing.c</file>
<file>revealer.c</file>
<file>read_more.c</file>
<file>rotated_text.c</file>
<file>scale.c</file>
<file>search_entry.c</file>
+3 -4
View File
@@ -1,5 +1,5 @@
/* Lists/Words
* #Keywords: GtkListView, GtkFilterListModel
* #Keywords: GtkListView, GtkFilterListModel, GtkInscription
*
* This demo shows filtering a long list - of words.
*
@@ -17,10 +17,9 @@ const char *factory_text =
"<interface>\n"
" <template class='GtkListItem'>\n"
" <property name='child'>\n"
" <object class='GtkLabel'>\n"
" <property name='ellipsize'>end</property>\n"
" <object class='GtkInscription'>\n"
" <property name='xalign'>0</property>\n"
" <binding name='label'>\n"
" <binding name='text'>\n"
" <lookup name='string' type='GtkStringObject'>\n"
" <lookup name='item'>GtkListItem</lookup>\n"
" </lookup>\n"
+3 -3
View File
@@ -7,9 +7,9 @@
<lookup name="item">GtkListItem</lookup>
</binding>
<property name="child">
<object class="GtkLabel">
<property name="halign">start</property>
<binding name="label">
<object class="GtkInscription">
<property name="hexpand">1</property>
<binding name="text">
<lookup name="title" type="GtkDemo">
<lookup name="item">expander</lookup>
</lookup>
+1
View File
@@ -73,6 +73,7 @@ demos = files([
'peg_solitaire.c',
'pickers.c',
'printing.c',
'read_more.c',
'revealer.c',
'rotated_text.c',
'scale.c',
+1 -1
View File
@@ -2,7 +2,7 @@
* #Keywords: GtkColorChooser, GtkFontChooser, GtkApplicationChooser
*
* These widgets are mainly intended for use in preference dialogs.
* They allow to select colors, fonts, directories and applications.
* They allow to select colors, fonts and applications.
*
* This demo shows both the default appearance for these dialogs,
* as well as some of the customizations that are possible.
+239
View File
@@ -0,0 +1,239 @@
/* Read More
* #Keywords: GtkInscription
*
* A simple implementation of a widget that can either
* display a lot of text or just the first few lines with a
* "Read More" button.
*/
#include <gtk/gtk.h>
#define READ_TYPE_MORE (read_more_get_type ())
G_DECLARE_FINAL_TYPE(ReadMore, read_more, READ, MORE, GtkWidget)
struct _ReadMore {
GtkWidget parent_instance;
GtkWidget *label;
GtkWidget *inscription;
GtkWidget *box;
gboolean show_more;
};
G_DEFINE_TYPE (ReadMore, read_more, GTK_TYPE_WIDGET)
static GtkSizeRequestMode
read_more_get_request_mode (GtkWidget *widget)
{
return GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH;
}
static void
read_more_measure (GtkWidget *widget,
GtkOrientation orientation,
int for_size,
int *minimum,
int *natural,
int *minimum_baseline,
int *natural_baseline)
{
ReadMore *self = READ_MORE (widget);
int label_min, label_nat, label_min_baseline, label_nat_baseline;
int box_min, box_nat, box_min_baseline, box_nat_baseline;
int min_check;
if (self->show_more)
min_check = G_MAXINT;
else if (for_size >= 0)
gtk_widget_measure (self->box, 1 - orientation, -1, &min_check, NULL, NULL, NULL);
else
min_check = -1;
if (min_check > for_size)
{
gtk_widget_measure (self->label,
orientation,
for_size,
minimum, natural,
minimum_baseline, natural_baseline);
return;
}
else if (for_size >= 0)
gtk_widget_measure (self->label, 1 - orientation, -1, &min_check, NULL, NULL, NULL);
else
min_check = -1;
if (min_check > for_size)
{
gtk_widget_measure (self->box,
orientation,
for_size,
minimum, natural,
minimum_baseline, natural_baseline);
return;
}
gtk_widget_measure (self->label,
orientation,
for_size,
&label_min, &label_nat,
&label_min_baseline, &label_nat_baseline);
gtk_widget_measure (self->box,
orientation,
for_size,
&box_min, &box_nat,
&box_min_baseline, &box_nat_baseline);
*minimum = MIN (label_min, box_min);
*natural = MIN (label_nat, box_nat);
/* FIXME: Figure out baselines! */
}
static void
read_more_allocate (GtkWidget *widget,
int width,
int height,
int baseline)
{
ReadMore *self = READ_MORE (widget);
gboolean show_more;
if (self->show_more)
{
show_more = TRUE;
}
else
{
int needed;
/* check to see if we have enough space to show all text */
gtk_widget_measure (self->label,
GTK_ORIENTATION_VERTICAL,
width,
&needed, NULL, NULL, NULL);
show_more = needed <= height;
}
gtk_widget_set_child_visible (self->label, show_more);
gtk_widget_set_child_visible (self->box, !show_more);
if (show_more)
gtk_widget_size_allocate (self->label, &(GtkAllocation) { 0, 0, width, height }, baseline);
else
gtk_widget_size_allocate (self->box, &(GtkAllocation) { 0, 0, width, height }, baseline);
}
static void
read_more_dispose (GObject *object)
{
ReadMore *self = READ_MORE (object);
g_clear_pointer (&self->label, gtk_widget_unparent);
g_clear_pointer (&self->box, gtk_widget_unparent);
G_OBJECT_CLASS (read_more_parent_class)->dispose (object);
}
static void
read_more_class_init (ReadMoreClass *klass)
{
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
widget_class->get_request_mode = read_more_get_request_mode;
widget_class->measure = read_more_measure;
widget_class->size_allocate = read_more_allocate;
object_class->dispose = read_more_dispose;
}
static void
read_more_clicked (GtkButton *button,
ReadMore *self)
{
self->show_more = TRUE;
gtk_widget_queue_resize (GTK_WIDGET (self));
}
static void
read_more_init (ReadMore *self)
{
GtkWidget *button;
self->label = gtk_label_new (NULL);
gtk_label_set_xalign (GTK_LABEL (self->label), 0.0);
gtk_label_set_yalign (GTK_LABEL (self->label), 0.0);
gtk_label_set_wrap (GTK_LABEL (self->label), TRUE);
gtk_label_set_width_chars (GTK_LABEL (self->label), 3);
gtk_label_set_max_width_chars (GTK_LABEL (self->label), 30);
gtk_widget_set_parent (self->label, GTK_WIDGET (self));
self->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_set_vexpand (self->box, FALSE);
gtk_widget_set_parent (self->box, GTK_WIDGET (self));
self->inscription = gtk_inscription_new (NULL);
gtk_inscription_set_xalign (GTK_INSCRIPTION (self->inscription), 0.0);
gtk_inscription_set_yalign (GTK_INSCRIPTION (self->inscription), 0.0);
gtk_inscription_set_min_lines (GTK_INSCRIPTION (self->inscription), 3);
gtk_inscription_set_nat_chars (GTK_INSCRIPTION (self->inscription), 30);
gtk_widget_set_vexpand (self->inscription, TRUE);
gtk_box_append (GTK_BOX (self->box), self->inscription);
button = gtk_button_new_with_label ("Read More");
g_signal_connect (button, "clicked", G_CALLBACK (read_more_clicked), self);
gtk_box_append (GTK_BOX (self->box), button);
}
static void
read_more_set_text (ReadMore *self,
const char *text)
{
gtk_label_set_label (GTK_LABEL (self->label), text);
gtk_inscription_set_text (GTK_INSCRIPTION (self->inscription), text);
}
static GtkWidget *
read_more_new (const char *text)
{
ReadMore *self = g_object_new (READ_TYPE_MORE, NULL);
read_more_set_text (self, text);
return GTK_WIDGET (self);
}
GtkWidget *
do_read_more (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
if (!window)
{
GtkWidget *readmore;
window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Read More");
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
readmore = read_more_new (
"I'd just like to interject for a moment. What you're referring to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.\n"
"\n"
"Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called \"Linux\", and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.\n"
"\n"
"There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called \"Linux\" distributions are really distributions of GNU/Linux.");
gtk_window_set_child (GTK_WINDOW (window), readmore);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
gtk_window_destroy (GTK_WINDOW (window));
return window;
}
+3 -4
View File
@@ -137,7 +137,7 @@ insert_text (GtkTextView *view)
icon_theme = gtk_icon_theme_get_for_display (gtk_widget_get_display (widget));
icon = gtk_icon_theme_lookup_icon (icon_theme,
"face-cool",
"drive-harddisk",
NULL,
32, 1,
gtk_widget_get_direction (widget),
@@ -239,8 +239,6 @@ insert_text (GtkTextView *view)
gtk_text_buffer_insert (buffer, &iter, "The buffer can have images in it: ", -1);
gtk_text_buffer_insert_paintable (buffer, &iter, GDK_PAINTABLE (icon));
gtk_text_buffer_insert_paintable (buffer, &iter, GDK_PAINTABLE (icon));
gtk_text_buffer_insert_paintable (buffer, &iter, nuclear);
gtk_text_buffer_insert (buffer, &iter, " for example.\n\n", -1);
@@ -441,11 +439,12 @@ attach_widgets (GtkTextView *text_view)
{
widget = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, NULL);
gtk_range_set_range (GTK_RANGE (widget), 0, 100);
gtk_widget_set_size_request (widget, 70, -1);
gtk_widget_set_size_request (widget, 100, -1);
}
else if (i == 3)
{
widget = gtk_entry_new ();
gtk_editable_set_width_chars (GTK_EDITABLE (widget), 10);
}
else
{
+2 -3
View File
@@ -623,7 +623,7 @@ _gdk_wayland_display_open (const char *display_name)
wl_registry_bind (display_wayland->wl_registry,
display_wayland->xdg_wm_base_id,
&xdg_wm_base_interface,
MIN (display_wayland->xdg_wm_base_version, 3));
MIN (display_wayland->xdg_wm_base_version, 4));
xdg_wm_base_add_listener (display_wayland->xdg_wm_base,
&xdg_wm_base_listener,
display_wayland);
@@ -2169,8 +2169,7 @@ gdk_wayland_display_get_setting (GdkDisplay *display,
{
if (strcmp (name, "gtk-decoration-layout") == 0)
set_decoration_layout_from_entry (display, entry, value);
else if (strcmp (name, "gtk-theme-name") == 0 ||
strcmp (name, "gtk-icon-theme-name") == 0)
else if (strcmp (name, "gtk-theme-name") == 0)
set_theme_from_entry (display, entry, value);
else
set_value_from_entry (display, entry, value);
+46 -7
View File
@@ -168,6 +168,10 @@ struct _GdkWaylandSurface
struct {
GdkToplevelLayout *layout;
int bounds_width;
int bounds_height;
gboolean has_bounds;
} toplevel;
struct {
@@ -182,6 +186,10 @@ struct _GdkWaylandSurface
int height;
GdkToplevelState state;
gboolean is_resizing;
int bounds_width;
int bounds_height;
gboolean has_bounds;
} toplevel;
struct {
@@ -1394,19 +1402,28 @@ configure_toplevel_geometry (GdkSurface *surface)
{
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
GdkDisplay *display = gdk_surface_get_display (surface);
GdkMonitor *monitor;
GdkRectangle monitor_geometry;
int bounds_width, bounds_height;
GdkToplevelSize size;
GdkToplevelLayout *layout;
GdkGeometry geometry;
GdkSurfaceHints mask;
monitor = g_list_model_get_item (gdk_display_get_monitors (display), 0);
gdk_monitor_get_geometry (monitor, &monitor_geometry);
g_object_unref (monitor);
bounds_width = monitor_geometry.width;
bounds_height = monitor_geometry.height;
if (impl->toplevel.has_bounds)
{
bounds_width = impl->toplevel.bounds_width;
bounds_height = impl->toplevel.bounds_height;
}
else
{
GdkMonitor *monitor;
GdkRectangle monitor_geometry;
monitor = g_list_model_get_item (gdk_display_get_monitors (display), 0);
gdk_monitor_get_geometry (monitor, &monitor_geometry);
bounds_width = monitor_geometry.width;
bounds_height = monitor_geometry.height;
g_object_unref (monitor);
}
gdk_toplevel_size_init (&size, bounds_width, bounds_height);
gdk_toplevel_notify_compute_size (GDK_TOPLEVEL (surface), &size);
@@ -1508,6 +1525,13 @@ gdk_wayland_surface_configure_toplevel (GdkSurface *surface)
is_resizing = impl->pending.toplevel.is_resizing;
impl->pending.toplevel.is_resizing = FALSE;
if (impl->pending.toplevel.has_bounds)
{
impl->toplevel.bounds_width = impl->pending.toplevel.bounds_width;
impl->toplevel.bounds_height = impl->pending.toplevel.bounds_height;
impl->toplevel.has_bounds = TRUE;
}
fixed_size =
new_state & (GDK_TOPLEVEL_STATE_MAXIMIZED |
GDK_TOPLEVEL_STATE_FULLSCREEN |
@@ -1847,9 +1871,24 @@ xdg_toplevel_close (void *data,
gdk_wayland_surface_handle_close (surface);
}
static void
xdg_toplevel_configure_bounds (void *data,
struct xdg_toplevel *xdg_toplevel,
int32_t width,
int32_t height)
{
GdkSurface *surface = GDK_SURFACE (data);
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
impl->pending.toplevel.bounds_width = width;
impl->pending.toplevel.bounds_height = height;
impl->pending.toplevel.has_bounds = TRUE;
}
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
xdg_toplevel_configure,
xdg_toplevel_close,
xdg_toplevel_configure_bounds,
};
static void
+13
View File
@@ -220,6 +220,19 @@ _gdk_win32_get_setting (const char *name,
return TRUE;
}
else if (strcmp ("gtk-overlay-scrolling", name) == 0)
{
DWORD val = 0;
DWORD sz = sizeof (val);
LSTATUS ret = 0;
ret = RegGetValueW (HKEY_CURRENT_USER, L"Control Panel\\Accessibility", L"DynamicScrollbars", RRF_RT_DWORD, NULL, &val, &sz);
if (ret == ERROR_SUCCESS)
{
g_value_set_boolean (value, val != 0);
return TRUE;
}
}
return FALSE;
}
+271
View File
@@ -32,6 +32,7 @@
#include "gtkatcontextprivate.h"
#include "gtkdebug.h"
#include "gtkeditable.h"
#include "gtkinscriptionprivate.h"
#include "gtklabelprivate.h"
#include "gtkentryprivate.h"
#include "gtksearchentryprivate.h"
@@ -406,6 +407,274 @@ static const GDBusInterfaceVTable label_vtable = {
NULL,
};
/* }}} */
/* {{{ GtkInscription */
static void
inscription_handle_method (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *method_name,
GVariant *parameters,
GDBusMethodInvocation *invocation,
gpointer user_data)
{
GtkATContext *self = user_data;
GtkAccessible *accessible = gtk_at_context_get_accessible (self);
GtkWidget *widget = GTK_WIDGET (accessible);
if (g_strcmp0 (method_name, "GetCaretOffset") == 0)
{
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(i)", 0));
}
else if (g_strcmp0 (method_name, "SetCaretOffset") == 0)
{
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", FALSE));
}
else if (g_strcmp0 (method_name, "GetText") == 0)
{
int start, end;
const char *text;
int len;
char *string;
g_variant_get (parameters, "(ii)", &start, &end);
text = gtk_inscription_get_text (GTK_INSCRIPTION (widget));
len = g_utf8_strlen (text, -1);
start = CLAMP (start, 0, len);
end = CLAMP (end, 0, len);
if (end <= start)
string = g_strdup ("");
else
{
const char *p, *q;
p = g_utf8_offset_to_pointer (text, start);
q = g_utf8_offset_to_pointer (text, end);
string = g_strndup (p, q - p);
}
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", string));
g_free (string);
}
else if (g_strcmp0 (method_name, "GetTextBeforeOffset") == 0)
{
PangoLayout *layout = gtk_inscription_get_layout (GTK_INSCRIPTION (widget));;
int offset;
AtspiTextBoundaryType boundary_type;
char *string;
int start, end;
g_variant_get (parameters, "(iu)", &offset, &boundary_type);
string = gtk_pango_get_text_before (layout, offset, boundary_type, &start, &end);
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(sii)", string, start, end));
g_free (string);
}
else if (g_strcmp0 (method_name, "GetTextAtOffset") == 0)
{
PangoLayout *layout = gtk_inscription_get_layout (GTK_INSCRIPTION (widget));;
int offset;
AtspiTextBoundaryType boundary_type;
char *string;
int start, end;
g_variant_get (parameters, "(iu)", &offset, &boundary_type);
string = gtk_pango_get_text_at (layout, offset, boundary_type, &start, &end);
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(sii)", string, start, end));
g_free (string);
}
else if (g_strcmp0 (method_name, "GetTextAfterOffset") == 0)
{
PangoLayout *layout = gtk_inscription_get_layout (GTK_INSCRIPTION (widget));;
int offset;
AtspiTextBoundaryType boundary_type;
char *string;
int start, end;
g_variant_get (parameters, "(iu)", &offset, &boundary_type);
string = gtk_pango_get_text_after (layout, offset, boundary_type, &start, &end);
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(sii)", string, start, end));
g_free (string);
}
else if (g_strcmp0 (method_name, "GetCharacterAtOffset") == 0)
{
int offset;
const char *text;
gunichar ch = 0;
g_variant_get (parameters, "(i)", &offset);
text = gtk_inscription_get_text (GTK_INSCRIPTION (widget));
if (0 <= offset && offset < g_utf8_strlen (text, -1))
ch = g_utf8_get_char (g_utf8_offset_to_pointer (text, offset));
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(i)", ch));
}
else if (g_strcmp0 (method_name, "GetStringAtOffset") == 0)
{
PangoLayout *layout = gtk_inscription_get_layout (GTK_INSCRIPTION (widget));;
int offset;
AtspiTextGranularity granularity;
char *string;
int start, end;
g_variant_get (parameters, "(iu)", &offset, &granularity);
string = gtk_pango_get_string_at (layout, offset, granularity, &start, &end);
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(sii)", string, start, end));
g_free (string);
}
else if (g_strcmp0 (method_name, "GetAttributes") == 0)
{
PangoLayout *layout = gtk_inscription_get_layout (GTK_INSCRIPTION (widget));;
GVariantBuilder builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE ("a{ss}"));
int offset;
int start, end;
g_variant_get (parameters, "(i)", &offset);
gtk_pango_get_run_attributes (layout, &builder, offset, &start, &end);
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(a{ss}ii)", &builder, start, end));
}
else if (g_strcmp0 (method_name, "GetAttributeValue") == 0)
{
PangoLayout *layout = gtk_inscription_get_layout (GTK_INSCRIPTION (widget));;
GVariantBuilder builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE ("a{ss}"));
int offset;
const char *name;
int start, end;
GVariant *attrs;
const char *val;
g_variant_get (parameters, "(i&s)", &offset, &name);
gtk_pango_get_run_attributes (layout, &builder, offset, &start, &end);
attrs = g_variant_builder_end (&builder);
if (!g_variant_lookup (attrs, name, "&s", &val))
val = "";
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(s)", val));
g_variant_unref (attrs);
}
else if (g_strcmp0 (method_name, "GetAttributeRun") == 0)
{
PangoLayout *layout = gtk_inscription_get_layout (GTK_INSCRIPTION (widget));;
GVariantBuilder builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE ("a{ss}"));
int offset;
gboolean include_defaults;
int start, end;
g_variant_get (parameters, "(ib)", &offset, &include_defaults);
if (include_defaults)
gtk_pango_get_default_attributes (layout, &builder);
gtk_pango_get_run_attributes (layout, &builder, offset, &start, &end);
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(a{ss}ii)", &builder, start, end));
}
else if (g_strcmp0 (method_name, "GetDefaultAttributes") == 0 ||
g_strcmp0 (method_name, "GetDefaultAttributeSet") == 0)
{
PangoLayout *layout = gtk_inscription_get_layout (GTK_INSCRIPTION (widget));;
GVariantBuilder builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE ("a{ss}"));
gtk_pango_get_default_attributes (layout, &builder);
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(a{ss})", &builder));
}
else if (g_strcmp0 (method_name, "GetNSelections") == 0)
{
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(i)", 0));
}
else if (g_strcmp0 (method_name, "GetSelection") == 0)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No selections available");
}
else if (g_strcmp0 (method_name, "AddSelection") == 0)
{
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", FALSE));
}
else if (g_strcmp0 (method_name, "RemoveSelection") == 0)
{
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", FALSE));
}
else if (g_strcmp0 (method_name, "SetSelection") == 0)
{
g_dbus_method_invocation_return_value (invocation, g_variant_new ("(b)", FALSE));
}
else if (g_strcmp0 (method_name, "GetCharacterExtents") == 0)
{
g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "");
}
else if (g_strcmp0 (method_name, "GetRangeExtents") == 0)
{
g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "");
}
else if (g_strcmp0 (method_name, "GetBoundedRanges") == 0)
{
g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "");
}
else if (g_strcmp0 (method_name, "ScrollSubstringTo") == 0)
{
g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "");
}
else if (g_strcmp0 (method_name, "ScrollSubstringToPoint") == 0)
{
g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "");
}
}
static GVariant *
inscription_get_property (GDBusConnection *connection,
const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *property_name,
GError **error,
gpointer user_data)
{
GtkATContext *self = user_data;
GtkAccessible *accessible = gtk_at_context_get_accessible (self);
GtkWidget *widget = GTK_WIDGET (accessible);
if (g_strcmp0 (property_name, "CharacterCount") == 0)
{
const char *text;
int len;
text = gtk_inscription_get_text (GTK_INSCRIPTION (widget));
len = g_utf8_strlen (text, -1);
return g_variant_new_int32 (len);
}
else if (g_strcmp0 (property_name, "CaretOffset") == 0)
{
return g_variant_new_int32 (0);
}
return NULL;
}
static const GDBusInterfaceVTable inscription_vtable = {
inscription_handle_method,
inscription_get_property,
NULL,
};
/* }}} */
/* {{{ GtkEditable */
@@ -1301,6 +1570,8 @@ gtk_atspi_get_text_vtable (GtkAccessible *accessible)
{
if (GTK_IS_LABEL (accessible))
return &label_vtable;
else if (GTK_IS_INSCRIPTION (accessible))
return &inscription_vtable;
else if (GTK_IS_EDITABLE (accessible) &&
GTK_IS_TEXT (gtk_editable_get_delegate (GTK_EDITABLE (accessible))))
return &editable_vtable;
+1
View File
@@ -155,6 +155,7 @@
#include <gtk/gtkimcontextsimple.h>
#include <gtk/gtkimmulticontext.h>
#include <gtk/gtkinfobar.h>
#include <gtk/gtkinscription.h>
#include <gtk/gtklabel.h>
#include <gtk/gtklayoutmanager.h>
#include <gtk/gtklayoutchild.h>
+78 -19
View File
@@ -158,6 +158,30 @@ struct _GtkAssistantClass
void (* cancel) (GtkAssistant *assistant);
};
#define GTK_TYPE_ASSISTANT_PAGES (gtk_assistant_pages_get_type ())
G_DECLARE_FINAL_TYPE (GtkAssistantPages, gtk_assistant_pages, GTK, ASSISTANT_PAGES, GObject)
struct _GtkAssistantPages
{
GObject parent_instance;
GtkAssistant *assistant;
};
struct _GtkAssistantPagesClass
{
GObjectClass parent_class;
};
enum {
PAGES_PROP_0,
PAGES_PROP_ITEM_TYPE,
PAGES_PROP_N_ITEMS,
PAGES_N_PROPS
};
static GParamSpec *pages_properties[PAGES_N_PROPS] = { NULL, };
static void gtk_assistant_dispose (GObject *object);
static void gtk_assistant_map (GtkWidget *widget);
static void gtk_assistant_unmap (GtkWidget *widget);
@@ -1289,8 +1313,11 @@ gtk_assistant_dispose (GObject *object)
{
GtkAssistant *assistant = GTK_ASSISTANT (object);
if (assistant->model)
g_list_model_items_changed (G_LIST_MODEL (assistant->model), 0, g_list_length (assistant->pages), 0);
if (assistant->model && g_list_length (assistant->pages))
{
g_list_model_items_changed (G_LIST_MODEL (assistant->model), 0, g_list_length (assistant->pages), 0);
g_object_notify_by_pspec (G_OBJECT (assistant->model), pages_properties[PAGES_PROP_N_ITEMS]);
}
/* We set current to NULL so that the remove code doesn't try
* to do anything funny
@@ -1733,7 +1760,10 @@ gtk_assistant_add_page (GtkAssistant *assistant,
}
if (assistant->model)
g_list_model_items_changed (assistant->model, position, 0, 1);
{
g_list_model_items_changed (assistant->model, position, 0, 1);
g_object_notify_by_pspec (G_OBJECT (assistant->model), pages_properties[PAGES_PROP_N_ITEMS]);
}
return position;
}
@@ -1759,7 +1789,10 @@ gtk_assistant_remove_page (GtkAssistant *assistant,
assistant_remove_page (assistant, page);
if (assistant->model)
g_list_model_items_changed (assistant->model, page_num, 1, 0);
{
g_list_model_items_changed (assistant->model, page_num, 1, 0);
g_object_notify_by_pspec (G_OBJECT (assistant->model), pages_properties[PAGES_PROP_N_ITEMS]);
}
}
/**
@@ -2184,20 +2217,6 @@ gtk_assistant_page_get_child (GtkAssistantPage *page)
return page->page;
}
#define GTK_TYPE_ASSISTANT_PAGES (gtk_assistant_pages_get_type ())
G_DECLARE_FINAL_TYPE (GtkAssistantPages, gtk_assistant_pages, GTK, ASSISTANT_PAGES, GObject)
struct _GtkAssistantPages
{
GObject parent_instance;
GtkAssistant *assistant;
};
struct _GtkAssistantPagesClass
{
GObjectClass parent_class;
};
static GType
gtk_assistant_pages_get_item_type (GListModel *model)
{
@@ -2231,17 +2250,57 @@ gtk_assistant_pages_list_model_init (GListModelInterface *iface)
iface->get_n_items = gtk_assistant_pages_get_n_items;
iface->get_item = gtk_assistant_pages_get_item;
}
G_DEFINE_TYPE_WITH_CODE (GtkAssistantPages, gtk_assistant_pages, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_assistant_pages_list_model_init))
static void
gtk_assistant_pages_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkAssistantPages *self = GTK_ASSISTANT_PAGES (object);
switch (prop_id)
{
case PAGES_PROP_ITEM_TYPE:
g_value_set_gtype (value, GTK_TYPE_ASSISTANT_PAGE);
break;
case PAGES_PROP_N_ITEMS:
g_value_set_uint (value, gtk_assistant_pages_get_n_items (G_LIST_MODEL (self)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_assistant_pages_init (GtkAssistantPages *pages)
{
}
static void
gtk_assistant_pages_class_init (GtkAssistantPagesClass *class)
gtk_assistant_pages_class_init (GtkAssistantPagesClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->get_property = gtk_assistant_pages_get_property;
pages_properties[PAGES_PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
GTK_TYPE_ASSISTANT_PAGE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
pages_properties[PAGES_PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, PAGES_N_PROPS, pages_properties);
}
static GtkAssistantPages *
+45 -8
View File
@@ -43,7 +43,10 @@ enum {
PROP_FILENAME,
PROP_ATTRIBUTES,
PROP_IO_PRIORITY,
PROP_ITEM_TYPE,
PROP_LOADING,
PROP_N_ITEMS,
NUM_PROPERTIES
};
@@ -149,10 +152,10 @@ gtk_bookmark_list_set_property (GObject *object,
}
static void
gtk_bookmark_list_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
gtk_bookmark_list_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkBookmarkList *self = GTK_BOOKMARK_LIST (object);
@@ -162,18 +165,26 @@ gtk_bookmark_list_get_property (GObject *object,
g_value_set_string (value, self->attributes);
break;
case PROP_IO_PRIORITY:
g_value_set_int (value, self->io_priority);
break;
case PROP_FILENAME:
g_value_set_string (value, self->filename);
break;
case PROP_IO_PRIORITY:
g_value_set_int (value, self->io_priority);
break;
case PROP_ITEM_TYPE:
g_value_set_gtype (value, G_TYPE_FILE_INFO);
break;
case PROP_LOADING:
g_value_set_boolean (value, gtk_bookmark_list_is_loading (self));
break;
case PROP_N_ITEMS:
g_value_set_uint (value, g_sequence_get_length (self->items));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -236,6 +247,18 @@ gtk_bookmark_list_class_init (GtkBookmarkListClass *class)
-G_MAXINT, G_MAXINT, G_PRIORITY_DEFAULT,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkBookmarkList:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_FILE_INFO,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkBookmarkList:loading: (attributes org.gtk.Property.get=gtk_bookmark_list_is_loading)
*
@@ -246,6 +269,18 @@ gtk_bookmark_list_class_init (GtkBookmarkListClass *class)
FALSE,
GTK_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkBookmarkList:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
}
@@ -306,6 +341,7 @@ got_file_info (GObject *source,
g_sequence_append (self->items, info);
g_list_model_items_changed (G_LIST_MODEL (self), g_sequence_get_length (self->items) - 1, 0, 1);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_free (uri);
}
@@ -331,6 +367,7 @@ gtk_bookmark_list_clear_items (GtkBookmarkList *self)
g_sequence_get_end_iter (self->items));
g_list_model_items_changed (G_LIST_MODEL (self), 0, n_items, 0);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
}
+13
View File
@@ -428,6 +428,19 @@ gtk_builder_cscope_new (void)
return g_object_new (GTK_TYPE_BUILDER_CSCOPE, NULL);
}
/**
* gtk_builder_cscope_add_callback:
* @self: a `GtkBuilderCScope`
* @callback_symbols: (scope async): The callback pointer
*
* Adds the @callback_symbol to the scope of @builder under its
* own name.
*
* This is a convenience wrapper of [method@Gtk.BuilderCSope.add_callback_symbol].
*
* Since: 4.8
*/
/**
* gtk_builder_cscope_add_callback_symbol:
* @self: a `GtkBuilderCScope`
+6 -2
View File
@@ -114,10 +114,14 @@ GDK_AVAILABLE_IN_ALL
void gtk_builder_cscope_add_callback_symbols (GtkBuilderCScope *self,
const char *first_callback_name,
GCallback first_callback_symbol,
...) G_GNUC_NULL_TERMINATED;
...) G_GNUC_NULL_TERMINATED;
#define gtk_builder_cscope_add_callback(scope, callback) \
gtk_builder_cscope_add_callback_symbol (GTK_BUILDER_CSCOPE (scope), #callback, G_CALLBACK (callback))
GDK_AVAILABLE_IN_ALL
GCallback gtk_builder_cscope_lookup_callback_symbol(GtkBuilderCScope *self,
const char *callback_name);
const char *callback_name);
G_END_DECLS
+42 -1
View File
@@ -60,8 +60,11 @@ enum {
PROP_ERROR,
PROP_FILE,
PROP_IO_PRIORITY,
PROP_ITEM_TYPE,
PROP_LOADING,
PROP_MONITORED,
PROP_N_ITEMS,
NUM_PROPERTIES
};
@@ -204,6 +207,10 @@ gtk_directory_list_get_property (GObject *object,
g_value_set_int (value, self->io_priority);
break;
case PROP_ITEM_TYPE:
g_value_set_gtype (value, G_TYPE_FILE_INFO);
break;
case PROP_LOADING:
g_value_set_boolean (value, gtk_directory_list_is_loading (self));
break;
@@ -212,6 +219,10 @@ gtk_directory_list_get_property (GObject *object,
g_value_set_boolean (value, gtk_directory_list_get_monitored (self));
break;
case PROP_N_ITEMS:
g_value_set_uint (value, g_sequence_get_length (self->items));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -312,6 +323,18 @@ gtk_directory_list_class_init (GtkDirectoryListClass *class)
-G_MAXINT, G_MAXINT, G_PRIORITY_DEFAULT,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkDirectoryList:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_FILE_INFO,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkDirectoryList:loading: (attributes org.gtk.Property.get=gtk_directory_list_is_loading)
*
@@ -332,6 +355,18 @@ gtk_directory_list_class_init (GtkDirectoryListClass *class)
TRUE,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkDirectoryList:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
}
@@ -380,6 +415,7 @@ gtk_directory_list_clear_items (GtkDirectoryList *self)
g_sequence_get_end_iter (self->items));
g_list_model_items_changed (G_LIST_MODEL (self), 0, n_items, 0);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
if (self->error)
@@ -462,7 +498,10 @@ gtk_directory_list_got_files_cb (GObject *source,
self);
if (n > 0)
g_list_model_items_changed (G_LIST_MODEL (self), g_sequence_get_length (self->items) - n, 0, n);
{
g_list_model_items_changed (G_LIST_MODEL (self), g_sequence_get_length (self->items) - n, 0, n);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
}
static void
@@ -580,6 +619,7 @@ handle_event (QueuedEvent *event)
position = g_sequence_get_length (self->items);
g_sequence_append (self->items, g_object_ref (info));
g_list_model_items_changed (G_LIST_MODEL (self), position, 0, 1);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
break;
@@ -591,6 +631,7 @@ handle_event (QueuedEvent *event)
position = g_sequence_iter_get_position (iter);
g_sequence_remove (iter);
g_list_model_items_changed (G_LIST_MODEL (self), position, 1, 0);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
break;
+63 -6
View File
@@ -43,7 +43,9 @@ enum {
PROP_0,
PROP_FILTER,
PROP_INCREMENTAL,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
PROP_PENDING,
NUM_PROPERTIES
};
@@ -206,14 +208,18 @@ gtk_filter_list_model_emit_items_changed_for_changes (GtkFilterListModel *self,
gtk_bitset_difference (changes, old);
if (!gtk_bitset_is_empty (changes))
{
guint min, max;
guint min, max, removed, added;
min = gtk_bitset_get_minimum (changes);
max = gtk_bitset_get_maximum (changes);
removed = gtk_bitset_get_size_in_range (old, min, max);
added = gtk_bitset_get_size_in_range (self->matches, min, max);
g_list_model_items_changed (G_LIST_MODEL (self),
min > 0 ? gtk_bitset_get_size_in_range (self->matches, 0, min - 1) : 0,
gtk_bitset_get_size_in_range (old, min, max),
gtk_bitset_get_size_in_range (self->matches, min, max));
removed,
added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
gtk_bitset_unref (changes);
gtk_bitset_unref (old);
@@ -286,6 +292,8 @@ gtk_filter_list_model_items_changed_cb (GListModel *model,
case GTK_FILTER_MATCH_ALL:
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
return;
case GTK_FILTER_MATCH_SOME:
@@ -316,6 +324,8 @@ gtk_filter_list_model_items_changed_cb (GListModel *model,
g_list_model_items_changed (G_LIST_MODEL (self),
position > 0 ? gtk_bitset_get_size_in_range (self->matches, 0, position - 1) : 0,
filter_removed, filter_added);
if (filter_removed != filter_added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void
@@ -364,10 +374,18 @@ gtk_filter_list_model_get_property (GObject *object,
g_value_set_boolean (value, self->incremental);
break;
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_filter_list_model_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_filter_list_model_get_n_items (G_LIST_MODEL (self)));
break;
case PROP_PENDING:
g_value_set_uint (value, gtk_filter_list_model_get_pending (self));
break;
@@ -415,7 +433,10 @@ gtk_filter_list_model_refilter (GtkFilterListModel *self,
self->strictness = new_strictness;
gtk_filter_list_model_stop_filtering (self);
if (n_before > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, n_before, 0);
{
g_list_model_items_changed (G_LIST_MODEL (self), 0, n_before, 0);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
}
break;
@@ -423,8 +444,17 @@ gtk_filter_list_model_refilter (GtkFilterListModel *self,
switch (self->strictness)
{
case GTK_FILTER_MATCH_NONE:
self->strictness = new_strictness;
g_list_model_items_changed (G_LIST_MODEL (self), 0, 0, g_list_model_get_n_items (self->model));
{
guint n_items;
self->strictness = new_strictness;
n_items = g_list_model_get_n_items (self->model);
if (n_items > 0)
{
g_list_model_items_changed (G_LIST_MODEL (self), 0, 0, n_items);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
}
break;
case GTK_FILTER_MATCH_ALL:
self->strictness = new_strictness;
@@ -460,6 +490,7 @@ gtk_filter_list_model_refilter (GtkFilterListModel *self,
g_clear_pointer (&self->matches, gtk_bitset_unref);
g_list_model_items_changed (G_LIST_MODEL (self), start, n_before - end - start, n_after - end - start);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
}
break;
@@ -571,6 +602,18 @@ gtk_filter_list_model_class_init (GtkFilterListModelClass *class)
FALSE,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkFilterListModel:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkFilterListModel:model: (attributes org.gtk.Property.get=gtk_filter_list_model_get_model org.gtk.Property.set=gtk_filter_list_model_set_model)
*
@@ -581,6 +624,18 @@ gtk_filter_list_model_class_init (GtkFilterListModelClass *class)
G_TYPE_LIST_MODEL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkFilterListModel:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkFilterListModel:pending: (attributes org.gtk.Property.get=gtk_filter_list_model_get_pending)
*
@@ -737,6 +792,8 @@ gtk_filter_list_model_set_model (GtkFilterListModel *self,
if (removed > 0 || added > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
}
+41
View File
@@ -36,7 +36,10 @@
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
NUM_PROPERTIES
};
@@ -239,6 +242,8 @@ gtk_flatten_list_model_items_changed_cb (GListModel *model,
}
g_list_model_items_changed (G_LIST_MODEL (self), real_position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void
@@ -332,10 +337,18 @@ gtk_flatten_list_model_get_property (GObject *object,
switch (prop_id)
{
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_flatten_list_model_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_flatten_list_model_get_n_items (G_LIST_MODEL (self)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -367,6 +380,8 @@ gtk_flatten_list_model_model_items_changed_cb (GListModel *model,
if (real_removed > 0 || real_added > 0)
g_list_model_items_changed (G_LIST_MODEL (self), real_position, real_removed, real_added);
if (real_removed != real_added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void
@@ -399,6 +414,18 @@ gtk_flatten_list_model_class_init (GtkFlattenListModelClass *class)
gobject_class->get_property = gtk_flatten_list_model_get_property;
gobject_class->dispose = gtk_flatten_list_model_dispose;
/**
* GtkFlattenListModel:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkFlattenListModel:model: (attributes org.gtk.Property.get=gtk_flatten_list_model_get_model org.gtk.Property.set=gtk_flatten_list_model_set_model)
*
@@ -409,6 +436,18 @@ gtk_flatten_list_model_class_init (GtkFlattenListModelClass *class)
G_TYPE_LIST_MODEL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkFlattenListModel:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
}
@@ -481,6 +520,8 @@ gtk_flatten_list_model_set_model (GtkFlattenListModel *self,
if (removed > 0 || added > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
}
+1314
View File
File diff suppressed because it is too large Load Diff
+116
View File
@@ -0,0 +1,116 @@
/*
* Copyright © 2022 Benjamin Otte
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Benjamin Otte <otte@gnome.org>
*/
#ifndef __GTK_INSCRIPTION_H__
#define __GTK_INSCRIPTION_H__
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <gtk/gtkwidget.h>
G_BEGIN_DECLS
#define GTK_TYPE_INSCRIPTION (gtk_inscription_get_type ())
/**
* GtkInscriptionOverflow:
* @GTK_INSCRIPTION_OVERFLOW_CLIP: Clip the remaining text
* @GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START: Omit characters at the start of the text
* @GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE: Omit characters at the middle of the text
* @GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END: Omit characters at the end of the text
*
* The different methods to handle text in #GtkInscription when it doesn't
* fit the available space.
*
* Since: 4.8
*/
typedef enum {
GTK_INSCRIPTION_OVERFLOW_CLIP,
GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_START,
GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_MIDDLE,
GTK_INSCRIPTION_OVERFLOW_ELLIPSIZE_END
} GtkInscriptionOverflow;
GDK_AVAILABLE_IN_4_8
G_DECLARE_FINAL_TYPE (GtkInscription, gtk_inscription, GTK, INSCRIPTION, GtkWidget)
GDK_AVAILABLE_IN_4_8
GtkWidget * gtk_inscription_new (const char *text);
GDK_AVAILABLE_IN_4_8
const char * gtk_inscription_get_text (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_text (GtkInscription *self,
const char *text);
GDK_AVAILABLE_IN_4_8
PangoAttrList * gtk_inscription_get_attributes (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_attributes (GtkInscription *self,
PangoAttrList *attrs);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_markup (GtkInscription *self,
const char *markup);
GDK_AVAILABLE_IN_4_8
GtkInscriptionOverflow gtk_inscription_get_text_overflow (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_text_overflow (GtkInscription *self,
GtkInscriptionOverflow overflow);
GDK_AVAILABLE_IN_4_8
PangoWrapMode gtk_inscription_get_wrap_mode (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_wrap_mode (GtkInscription *self,
PangoWrapMode wrap_mode);
GDK_AVAILABLE_IN_4_8
guint gtk_inscription_get_min_chars (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_min_chars (GtkInscription *self,
guint min_chars);
GDK_AVAILABLE_IN_4_8
guint gtk_inscription_get_nat_chars (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_nat_chars (GtkInscription *self,
guint nat_chars);
GDK_AVAILABLE_IN_4_8
guint gtk_inscription_get_min_lines (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_min_lines (GtkInscription *self,
guint min_lines);
GDK_AVAILABLE_IN_4_8
guint gtk_inscription_get_nat_lines (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_nat_lines (GtkInscription *self,
guint nat_lines);
GDK_AVAILABLE_IN_4_8
float gtk_inscription_get_xalign (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_xalign (GtkInscription *self,
float xalign);
GDK_AVAILABLE_IN_4_8
float gtk_inscription_get_yalign (GtkInscription *self);
GDK_AVAILABLE_IN_4_8
void gtk_inscription_set_yalign (GtkInscription *self,
float yalign);
G_END_DECLS
#endif /* __GTK_INSCRIPTION_H__ */
+33
View File
@@ -0,0 +1,33 @@
/*
* Copyright © 2022 Benjamin Otte
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Benjamin Otte <otte@gnome.org>
*/
#ifndef __GTK_INSCRIPTION_PRIVATE_H__
#define __GTK_INSCRIPTION_PRIVATE_H__
#include <gtk/gtkinscription.h>
G_BEGIN_DECLS
PangoLayout * gtk_inscription_get_layout (GtkInscription *self);
G_END_DECLS
#endif /* __GTK_INSCRIPTION_PRIVATE_H__ */
+24 -20
View File
@@ -1363,34 +1363,20 @@ gtk_list_base_size_allocate_child (GtkListBase *self,
self_width = gtk_widget_get_width (GTK_WIDGET (self));
self_height = gtk_widget_get_height (GTK_WIDGET (self));
if (y + height + GTK_LIST_BASE_CHILD_MAX_OVERDRAW <= 0 ||
y - GTK_LIST_BASE_CHILD_MAX_OVERDRAW >= self_height ||
x + width + GTK_LIST_BASE_CHILD_MAX_OVERDRAW <= 0 ||
x - GTK_LIST_BASE_CHILD_MAX_OVERDRAW >= self_width)
{
/* child is fully outside the viewport, hide it and don't allocate it */
gtk_widget_set_child_visible (child, FALSE);
return;
}
gtk_widget_set_child_visible (child, TRUE);
if (gtk_list_base_get_orientation (GTK_LIST_BASE (self)) == GTK_ORIENTATION_VERTICAL)
{
if (_gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_LTR)
{
child_allocation.x = x;
child_allocation.y = y;
child_allocation.width = width;
child_allocation.height = height;
}
else
{
child_allocation.x = self_width - x - width;
child_allocation.y = y;
child_allocation.width = width;
child_allocation.height = height;
}
child_allocation.width = width;
child_allocation.height = height;
}
else
{
@@ -1398,18 +1384,32 @@ gtk_list_base_size_allocate_child (GtkListBase *self,
{
child_allocation.x = y;
child_allocation.y = x;
child_allocation.width = height;
child_allocation.height = width;
}
else
{
child_allocation.x = self_width - y - height;
child_allocation.y = x;
child_allocation.width = height;
child_allocation.height = width;
}
child_allocation.width = height;
child_allocation.height = width;
}
if (!gdk_rectangle_intersect (&child_allocation,
&(GdkRectangle) {
- GTK_LIST_BASE_CHILD_MAX_OVERDRAW,
- GTK_LIST_BASE_CHILD_MAX_OVERDRAW,
self_width + GTK_LIST_BASE_CHILD_MAX_OVERDRAW,
self_height + GTK_LIST_BASE_CHILD_MAX_OVERDRAW
},
NULL))
{
/* child is fully outside the viewport, hide it and don't allocate it */
gtk_widget_set_child_visible (child, FALSE);
return;
}
gtk_widget_set_child_visible (child, TRUE);
gtk_widget_size_allocate (child, &child_allocation, -1);
}
@@ -1740,8 +1740,12 @@ gtk_list_base_drag_end (GtkGestureDrag *gesture,
double offset_y,
GtkListBase *self)
{
GtkListBasePrivate *priv = gtk_list_base_get_instance_private (self);
gboolean modify, extend;
if (!priv->rubberband)
return;
gtk_list_base_drag_update (gesture, offset_x, offset_y, self);
get_selection_modifiers (GTK_GESTURE (gesture), &modify, &extend);
gtk_list_base_stop_rubberband (self, modify, extend);
+53 -1
View File
@@ -48,6 +48,16 @@ struct _GtkListListModelClass
GObjectClass parent_class;
};
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_N_ITEMS,
N_PROPS
};
static GParamSpec *properties[N_PROPS] = { NULL, };
static GType
gtk_list_list_model_get_item_type (GListModel *list)
{
@@ -109,6 +119,30 @@ G_DEFINE_TYPE_WITH_CODE (GtkListListModel, gtk_list_list_model,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_list_list_model_list_model_init))
static void
gtk_list_list_model_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkListListModel *self = GTK_LIST_LIST_MODEL (object);
switch (prop_id)
{
case PROP_ITEM_TYPE:
g_value_set_gtype (value, G_TYPE_OBJECT);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, self->n_items);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_list_list_model_dispose (GObject *object)
{
@@ -128,7 +162,20 @@ gtk_list_list_model_class_init (GtkListListModelClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->get_property = gtk_list_list_model_get_property;
object_class->dispose = gtk_list_list_model_dispose;
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPS, properties);
}
static void
@@ -231,6 +278,7 @@ gtk_list_list_model_item_added_at (GtkListListModel *self,
self->n_items += 1;
g_list_model_items_changed (G_LIST_MODEL (self), position, 0, 1);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
void
@@ -292,6 +340,7 @@ gtk_list_list_model_item_removed_at (GtkListListModel *self,
self->n_items -= 1;
g_list_model_items_changed (G_LIST_MODEL (self), position, 1, 0);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
void
@@ -310,7 +359,10 @@ gtk_list_list_model_clear (GtkListListModel *self)
self->notify = NULL;
if (n_items > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, n_items, 0);
{
g_list_model_items_changed (G_LIST_MODEL (self), 0, n_items, 0);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
}
+41
View File
@@ -60,7 +60,10 @@
enum {
PROP_0,
PROP_HAS_MAP,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
NUM_PROPERTIES
};
@@ -221,6 +224,8 @@ gtk_map_list_model_items_changed_cb (GListModel *model,
if (self->items == NULL)
{
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
return;
}
@@ -269,6 +274,8 @@ gtk_map_list_model_items_changed_cb (GListModel *model,
}
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void
@@ -305,10 +312,18 @@ gtk_map_list_model_get_property (GObject *object,
g_value_set_boolean (value, self->items != NULL);
break;
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_map_list_model_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_map_list_model_get_n_items (G_LIST_MODEL (self)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -360,6 +375,18 @@ gtk_map_list_model_class_init (GtkMapListModelClass *class)
FALSE,
GTK_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkMapListModel:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkMapListModel:model: (attributes org.gtk.Property.get=gtk_map_list_model_get_model org.gtk.Property.set=gtk_map_list_model_set_model)
*
@@ -370,6 +397,18 @@ gtk_map_list_model_class_init (GtkMapListModelClass *class)
G_TYPE_LIST_MODEL,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkMapListModel:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
}
@@ -578,6 +617,8 @@ gtk_map_list_model_set_model (GtkMapListModel *self,
if (removed > 0 || added > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
}
+65
View File
@@ -71,6 +71,16 @@ struct _GtkMultiFilterClass
GtkFilterChange removal_change;
};
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_N_ITEMS,
N_PROPS
};
static GParamSpec *properties[N_PROPS] = { NULL, };
static GType
gtk_multi_filter_get_item_type (GListModel *list)
{
@@ -139,6 +149,30 @@ gtk_multi_filter_changed_cb (GtkFilter *filter,
gtk_filter_changed (GTK_FILTER (self), change);
}
static void
gtk_multi_filter_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkMultiFilter *self = GTK_MULTI_FILTER (object);
switch (prop_id)
{
case PROP_ITEM_TYPE:
g_value_set_gtype (value, GTK_TYPE_FILTER);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_filters_get_size (&self->filters));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_multi_filter_dispose (GObject *object)
{
@@ -161,7 +195,34 @@ gtk_multi_filter_class_init (GtkMultiFilterClass *class)
{
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->get_property = gtk_multi_filter_get_property;
object_class->dispose = gtk_multi_filter_dispose;
/**
* GtkMultiFilter:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
GTK_TYPE_FILTER,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkMultiFilter:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPS, properties);
}
static void
@@ -186,6 +247,8 @@ gtk_multi_filter_append (GtkMultiFilter *self,
g_signal_connect (filter, "changed", G_CALLBACK (gtk_multi_filter_changed_cb), self);
gtk_filters_append (&self->filters, filter);
g_list_model_items_changed (G_LIST_MODEL (self), gtk_filters_get_size (&self->filters) - 1, 0, 1);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
gtk_filter_changed (GTK_FILTER (self),
GTK_MULTI_FILTER_GET_CLASS (self)->addition_change);
@@ -216,6 +279,8 @@ gtk_multi_filter_remove (GtkMultiFilter *self,
filter = gtk_filters_get (&self->filters, position);
g_signal_handlers_disconnect_by_func (filter, gtk_multi_filter_changed_cb, self);
gtk_filters_splice (&self->filters, position, 1, FALSE, NULL, 0);
g_list_model_items_changed (G_LIST_MODEL (self), position, 1, 0);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
gtk_filter_changed (GTK_FILTER (self),
GTK_MULTI_FILTER_GET_CLASS (self)->removal_change);
+38
View File
@@ -49,7 +49,9 @@ struct _GtkMultiSelectionClass
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
N_PROPS,
};
@@ -266,6 +268,8 @@ gtk_multi_selection_items_changed_cb (GListModel *model,
g_clear_pointer (&pending, g_hash_table_unref);
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void
@@ -311,10 +315,18 @@ gtk_multi_selection_get_property (GObject *object,
switch (prop_id)
{
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_multi_selection_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_multi_selection_get_n_items (G_LIST_MODEL (self)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -343,6 +355,18 @@ gtk_multi_selection_class_init (GtkMultiSelectionClass *klass)
gobject_class->set_property = gtk_multi_selection_set_property;
gobject_class->dispose = gtk_multi_selection_dispose;
/**
* GtkMultiSelection:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkMultiSelection:model: (attributes org.gtk.Property.get=gtk_multi_selection_get_model org.gtk.Property.set=gtk_multi_selection_set_model)
*
@@ -353,6 +377,18 @@ gtk_multi_selection_class_init (GtkMultiSelectionClass *klass)
G_TYPE_LIST_MODEL,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
/**
* GtkMultiSelection:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, N_PROPS, properties);
}
@@ -446,6 +482,8 @@ gtk_multi_selection_set_model (GtkMultiSelection *self,
gtk_bitset_remove_all (self->selected);
g_hash_table_remove_all (self->items);
g_list_model_items_changed (G_LIST_MODEL (self), 0, n_items_before, 0);
if (n_items_before)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
+65
View File
@@ -66,6 +66,16 @@ struct _GtkMultiSortKeys
GtkMultiSortKey keys[];
};
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_N_ITEMS,
N_PROPS
};
static GParamSpec *properties[N_PROPS] = { NULL, };
static void
gtk_multi_sort_keys_free (GtkSortKeys *keys)
{
@@ -327,6 +337,30 @@ gtk_multi_sorter_changed_cb (GtkSorter *sorter,
gtk_multi_sort_keys_new (self));
}
static void
gtk_multi_sorter_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkMultiSorter *self = GTK_MULTI_SORTER (object);
switch (prop_id)
{
case PROP_ITEM_TYPE:
g_value_set_gtype (value, GTK_TYPE_SORTER);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_sorters_get_size (&self->sorters));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_multi_sorter_dispose (GObject *object)
{
@@ -352,7 +386,34 @@ gtk_multi_sorter_class_init (GtkMultiSorterClass *class)
sorter_class->compare = gtk_multi_sorter_compare;
sorter_class->get_order = gtk_multi_sorter_get_order;
object_class->get_property = gtk_multi_sorter_get_property;
object_class->dispose = gtk_multi_sorter_dispose;
/**
* GtkMultiSorter:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
GTK_TYPE_SORTER,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkMultiSorter:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, N_PROPS, properties);
}
static void
@@ -402,6 +463,8 @@ gtk_multi_sorter_append (GtkMultiSorter *self,
g_signal_connect (sorter, "changed", G_CALLBACK (gtk_multi_sorter_changed_cb), self);
gtk_sorters_append (&self->sorters, sorter);
g_list_model_items_changed (G_LIST_MODEL (self), gtk_sorters_get_size (&self->sorters) - 1, 0, 1);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
gtk_sorter_changed_with_keys (GTK_SORTER (self),
GTK_SORTER_CHANGE_MORE_STRICT,
@@ -434,6 +497,8 @@ gtk_multi_sorter_remove (GtkMultiSorter *self,
sorter = gtk_sorters_get (&self->sorters, position);
g_signal_handlers_disconnect_by_func (sorter, gtk_multi_sorter_changed_cb, self);
gtk_sorters_splice (&self->sorters, position, 1, FALSE, NULL, 0);
g_list_model_items_changed (G_LIST_MODEL (self), position, 1, 0);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
gtk_sorter_changed_with_keys (GTK_SORTER (self),
GTK_SORTER_CHANGE_LESS_STRICT,
+57 -5
View File
@@ -48,7 +48,9 @@ struct _GtkNoSelectionClass
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
N_PROPS
};
@@ -119,6 +121,18 @@ G_DEFINE_TYPE_EXTENDED (GtkNoSelection, gtk_no_selection, G_TYPE_OBJECT, 0,
G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL,
gtk_no_selection_selection_model_init))
static void
gtk_no_selection_items_changed_cb (GListModel *model,
guint position,
guint removed,
guint added,
GtkNoSelection *self)
{
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void
gtk_no_selection_clear_model (GtkNoSelection *self)
{
@@ -126,7 +140,7 @@ gtk_no_selection_clear_model (GtkNoSelection *self)
return;
g_signal_handlers_disconnect_by_func (self->model,
g_list_model_items_changed,
gtk_no_selection_items_changed_cb,
self);
g_clear_object (&self->model);
}
@@ -162,10 +176,19 @@ gtk_no_selection_get_property (GObject *object,
switch (prop_id)
{
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_no_selection_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_no_selection_get_n_items (G_LIST_MODEL (self)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -191,6 +214,18 @@ gtk_no_selection_class_init (GtkNoSelectionClass *klass)
gobject_class->set_property = gtk_no_selection_set_property;
gobject_class->dispose = gtk_no_selection_dispose;
/**
* GtkNoSelection:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkNoSelection:model: (attributes org.gtk.property.get=gtk_no_selection_get_model org.gtk.Property.set=gtk_no_selection_set_model)
*
@@ -201,6 +236,18 @@ gtk_no_selection_class_init (GtkNoSelectionClass *klass)
G_TYPE_LIST_MODEL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
* GtkNoSelection:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, N_PROPS, properties);
}
@@ -263,7 +310,7 @@ void
gtk_no_selection_set_model (GtkNoSelection *self,
GListModel *model)
{
guint n_items_before;
guint n_items_before, n_items_after;
g_return_if_fail (GTK_IS_NO_SELECTION (self));
g_return_if_fail (model == NULL || G_IS_LIST_MODEL (model));
@@ -277,14 +324,19 @@ gtk_no_selection_set_model (GtkNoSelection *self,
if (model)
{
self->model = g_object_ref (model);
g_signal_connect_swapped (self->model, "items-changed",
G_CALLBACK (g_list_model_items_changed), self);
g_signal_connect (self->model, "items-changed",
G_CALLBACK (gtk_no_selection_items_changed_cb), self);
n_items_after = g_list_model_get_n_items (self->model);
}
else
n_items_after = 0;
g_list_model_items_changed (G_LIST_MODEL (self),
0,
n_items_before,
model ? g_list_model_get_n_items (self->model) : 0);
n_items_after);
if (n_items_before != n_items_after)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
}
+1 -1
View File
@@ -31,7 +31,7 @@
G_BEGIN_DECLS
PangoAttrList *_gtk_pango_attr_list_merge (PangoAttrList *into,
PangoAttrList *from);
PangoAttrList *from) G_GNUC_WARN_UNUSED_RESULT;
gboolean gtk_buildable_attribute_tag_start (GtkBuildable *buildable,
GtkBuilder *builder,
+22 -1
View File
@@ -39,6 +39,7 @@
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_N_ITEMS,
PROP_OBJECT,
PROP_PROPERTY,
NUM_PROPERTIES
@@ -184,6 +185,8 @@ gtk_property_lookup_list_model_notify_cb (GObject *object,
if (removed > 0 || added > 0)
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static guint
@@ -318,6 +321,10 @@ gtk_property_lookup_list_model_get_property (GObject *object,
g_value_set_gtype (value, self->item_type);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_property_lookup_list_model_get_n_items (G_LIST_MODEL (self)));
break;
case PROP_OBJECT:
g_value_set_object (value, gtk_property_lookup_list_model_get_object (self));
break;
@@ -366,13 +373,25 @@ gtk_property_lookup_list_model_class_init (GtkPropertyLookupListModelClass *klas
/**
* GtkPropertyLookupListModel:item-type:
*
* The `GType` for elements of this object
* The `GType` for elements of this object. See [method@Gio.ListModel.get_item_type].
*/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkPropertyLookupListModel:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkPropertyLookupListModel:property:
*
@@ -456,6 +475,8 @@ gtk_property_lookup_list_model_set_object (GtkPropertyLookupListModel *self,
g_assert (removed != 0 || added != 0);
g_list_model_items_changed (G_LIST_MODEL (self), 0, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
gpointer
+39
View File
@@ -34,7 +34,10 @@
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
NUM_PROPERTIES
};
@@ -127,6 +130,8 @@ selection_filter_model_items_changed (GtkSelectionFilterModel *self,
if (sel_removed > 0 || sel_added > 0)
g_list_model_items_changed (G_LIST_MODEL (self), sel_position, sel_removed, sel_added);
if (sel_removed != sel_added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void
@@ -178,10 +183,18 @@ gtk_selection_filter_model_get_property (GObject *object,
switch (prop_id)
{
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_selection_filter_model_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_selection_filter_model_get_n_items (G_LIST_MODEL (self)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -220,6 +233,18 @@ gtk_selection_filter_model_class_init (GtkSelectionFilterModelClass *class)
gobject_class->get_property = gtk_selection_filter_model_get_property;
gobject_class->dispose = gtk_selection_filter_model_dispose;
/**
* GtkSelectionFilterModel:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkSelectionFilterModel:model: (attributes org.gtk.Property.get=gtk_selection_filter_model_get_model org.gtk.Property.set=gtk_selection_filter_model_set_model)
*
@@ -230,6 +255,18 @@ gtk_selection_filter_model_class_init (GtkSelectionFilterModelClass *class)
GTK_TYPE_SELECTION_MODEL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkSelectionFilterModel:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, NUM_PROPERTIES, properties);
}
@@ -300,6 +337,8 @@ gtk_selection_filter_model_set_model (GtkSelectionFilterModel *self,
if (removed > 0 || added > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
}
+50 -4
View File
@@ -103,8 +103,10 @@ struct _GtkShortcutControllerClass
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_MNEMONICS_MODIFIERS,
PROP_MODEL,
PROP_N_ITEMS,
PROP_SCOPE,
N_PROPS
@@ -186,6 +188,18 @@ gtk_shortcut_controller_is_rooted (GtkShortcutController *self)
return gtk_widget_get_root (widget) != NULL;
}
static void
gtk_shortcut_controller_items_changed_cb (GListModel *model,
guint position,
guint removed,
guint added,
GtkShortcutController *self)
{
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void
gtk_shortcut_controller_set_property (GObject *object,
guint prop_id,
@@ -214,10 +228,10 @@ gtk_shortcut_controller_set_property (GObject *object,
self->custom_shortcuts = FALSE;
}
self->shortcuts_changed_id = g_signal_connect_swapped (self->shortcuts,
"items-changed",
G_CALLBACK (g_list_model_items_changed),
self);
self->shortcuts_changed_id = g_signal_connect (self->shortcuts,
"items-changed",
G_CALLBACK (gtk_shortcut_controller_items_changed_cb),
self);
}
break;
@@ -240,10 +254,18 @@ gtk_shortcut_controller_get_property (GObject *object,
switch (prop_id)
{
case PROP_ITEM_TYPE:
g_value_set_gtype (value, G_TYPE_OBJECT);
break;
case PROP_MNEMONICS_MODIFIERS:
g_value_set_flags (value, self->mnemonics_modifiers);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, g_list_model_get_n_items (self->shortcuts));
break;
case PROP_SCOPE:
g_value_set_enum (value, self->scope);
break;
@@ -562,6 +584,18 @@ gtk_shortcut_controller_class_init (GtkShortcutControllerClass *klass)
controller_class->set_widget = gtk_shortcut_controller_set_widget;
controller_class->unset_widget = gtk_shortcut_controller_unset_widget;
/**
* GtkShortCutController:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkShortcutController:mnemonic-modifiers: (attributes org.gtk.Property.get=gtk_shortcut_controller_get_mnemonics_modifiers org.gtk.Property.set=gtk_shortcut_controller_set_mnemonics_modifiers)
*
@@ -583,6 +617,18 @@ gtk_shortcut_controller_class_init (GtkShortcutControllerClass *klass)
G_TYPE_LIST_MODEL,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
/**
* GtkShortcutController:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkShortcutController:scope: (attributes org.gtk.Property.get=gtk_shortcut_controller_get_scope org.gtk.Property.set=gtk_shortcut_controller_set_scope)
*
+52 -13
View File
@@ -57,9 +57,11 @@ enum {
PROP_0,
PROP_AUTOSELECT,
PROP_CAN_UNSELECT,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
PROP_SELECTED,
PROP_SELECTED_ITEM,
PROP_MODEL,
N_PROPS
};
@@ -271,6 +273,8 @@ gtk_single_selection_items_changed_cb (GListModel *model,
}
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_object_thaw_notify (G_OBJECT (self));
}
@@ -337,10 +341,19 @@ gtk_single_selection_get_property (GObject *object,
case PROP_CAN_UNSELECT:
g_value_set_boolean (value, self->can_unselect);
break;
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_single_selection_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_single_selection_get_n_items (G_LIST_MODEL (self)));
break;
case PROP_SELECTED:
g_value_set_uint (value, self->selected);
break;
@@ -397,6 +410,40 @@ gtk_single_selection_class_init (GtkSingleSelectionClass *klass)
FALSE,
G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
/**
* GtkSingleSelection:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkSingleSelection:model: (attributes org.gtk.Property.get=gtk_single_selection_get_model org.gtk.Property.set=gtk_single_selection_set_model)
*
* The model being managed.
*/
properties[PROP_MODEL] =
g_param_spec_object ("model", NULL, NULL,
G_TYPE_LIST_MODEL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
/**
* GtkSingleSelection:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkSingleSelection:selected: (attributes org.gtk.Property.get=gtk_single_selection_get_selected org.gtk.Property.set=gtk_single_selection_set_selected)
*
@@ -414,18 +461,8 @@ gtk_single_selection_class_init (GtkSingleSelectionClass *klass)
*/
properties[PROP_SELECTED_ITEM] =
g_param_spec_object ("selected-item", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkSingleSelection:model: (attributes org.gtk.Property.get=gtk_single_selection_get_model org.gtk.Property.set=gtk_single_selection_set_model)
*
* The model being managed.
*/
properties[PROP_MODEL] =
g_param_spec_object ("model", NULL, NULL,
G_TYPE_LIST_MODEL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, N_PROPS, properties);
}
@@ -528,6 +565,8 @@ gtk_single_selection_set_model (GtkSingleSelection *self,
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_ITEM]);
}
g_list_model_items_changed (G_LIST_MODEL (self), 0, n_items_before, 0);
if (n_items_before)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
+48 -2
View File
@@ -38,7 +38,9 @@
enum {
PROP_0,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
PROP_OFFSET,
PROP_SIZE,
NUM_PROPERTIES
@@ -162,6 +164,8 @@ gtk_slice_list_model_items_changed_cb (GListModel *model,
n_before = CLAMP (n_before, self->offset, self->offset + self->size) - self->offset;
g_list_model_items_changed (G_LIST_MODEL (self), skip, n_before - skip, n_after - skip);
if (n_before != n_after)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
}
@@ -203,10 +207,18 @@ gtk_slice_list_model_get_property (GObject *object,
switch (prop_id)
{
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_slice_list_model_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_slice_list_model_get_n_items (G_LIST_MODEL (self)));
break;
case PROP_OFFSET:
g_value_set_uint (value, self->offset);
break;
@@ -250,6 +262,18 @@ gtk_slice_list_model_class_init (GtkSliceListModelClass *class)
gobject_class->get_property = gtk_slice_list_model_get_property;
gobject_class->dispose = gtk_slice_list_model_dispose;
/**
* GtkSliceListModel:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkSliceListModel:model: (attributes org.gtk.Property.get=gtk_slice_list_model_get_model org.gtk.Property.set=gtk_slice_list_model_set_model)
*
@@ -260,6 +284,18 @@ gtk_slice_list_model_class_init (GtkSliceListModelClass *class)
G_TYPE_LIST_MODEL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkSliceListModel:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkSliceListModel:offset: (attributes org.gtk.Property.get=gtk_slice_list_model_get_offset org.gtk.Property.set=gtk_slice_list_model_set_offset)
*
@@ -360,6 +396,8 @@ gtk_slice_list_model_set_model (GtkSliceListModel *self,
if (removed > 0 || added > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
}
@@ -409,6 +447,8 @@ gtk_slice_list_model_set_offset (GtkSliceListModel *self,
if (before > 0 || after > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, before, after);
if (before != after)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_OFFSET]);
}
@@ -458,9 +498,15 @@ gtk_slice_list_model_set_size (GtkSliceListModel *self,
after = g_list_model_get_n_items (G_LIST_MODEL (self));
if (before > after)
g_list_model_items_changed (G_LIST_MODEL (self), after, before - after, 0);
{
g_list_model_items_changed (G_LIST_MODEL (self), after, before - after, 0);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
else if (before < after)
g_list_model_items_changed (G_LIST_MODEL (self), before, 0, after - before);
{
g_list_model_items_changed (G_LIST_MODEL (self), before, 0, after - before);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
/* else nothing */
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SIZE]);
+40
View File
@@ -79,7 +79,9 @@
enum {
PROP_0,
PROP_INCREMENTAL,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
PROP_PENDING,
PROP_SORTER,
NUM_PROPERTIES
@@ -580,6 +582,8 @@ gtk_sort_list_model_items_changed_cb (GListModel *model,
{
self->n_items = self->n_items - removed + added;
g_list_model_items_changed (G_LIST_MODEL (self), position, removed, added);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
return;
}
@@ -620,6 +624,8 @@ gtk_sort_list_model_items_changed_cb (GListModel *model,
n_items = self->n_items - start - end;
g_list_model_items_changed (G_LIST_MODEL (self), start, n_items - added + removed, n_items);
if (removed != added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void
@@ -664,10 +670,18 @@ gtk_sort_list_model_get_property (GObject *object,
g_value_set_boolean (value, self->incremental);
break;
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_sort_list_model_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, gtk_sort_list_model_get_n_items (G_LIST_MODEL (self)));
break;
case PROP_PENDING:
g_value_set_uint (value, gtk_sort_list_model_get_pending (self));
break;
@@ -788,6 +802,18 @@ gtk_sort_list_model_class_init (GtkSortListModelClass *class)
FALSE,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkSortListModel:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkSortListModel:model: (attributes org.gtk.Property.get=gtk_sort_list_model_get_model org.gtk.Property.set=gtk_sort_list_model_set_model)
*
@@ -798,6 +824,18 @@ gtk_sort_list_model_class_init (GtkSortListModelClass *class)
G_TYPE_LIST_MODEL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkSortListModel:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkSortListModel:pending: (attributes org.gtk.Property.get=gtk_sort_list_model_get_pending)
*
@@ -898,6 +936,8 @@ gtk_sort_list_model_set_model (GtkSortListModel *self,
if (removed > 0 || self->n_items > 0)
g_list_model_items_changed (G_LIST_MODEL (self), 0, removed, self->n_items);
if (removed != self->n_items)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MODEL]);
}
+63 -5
View File
@@ -498,6 +498,16 @@ struct _GtkStackPagesClass
GObjectClass parent_class;
};
enum {
PAGES_PROP_0,
PAGES_PROP_ITEM_TYPE,
PAGES_PROP_N_ITEMS,
PAGES_N_PROPS
};
static GParamSpec *pages_properties[PAGES_N_PROPS] = { NULL, };
static GType
gtk_stack_pages_get_item_type (GListModel *model)
{
@@ -582,14 +592,53 @@ G_DEFINE_TYPE_WITH_CODE (GtkStackPages, gtk_stack_pages, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (G_TYPE_LIST_MODEL, gtk_stack_pages_list_model_init)
G_IMPLEMENT_INTERFACE (GTK_TYPE_SELECTION_MODEL, gtk_stack_pages_selection_model_init))
static void
gtk_stack_pages_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkStackPages *self = GTK_STACK_PAGES (object);
switch (prop_id)
{
case PAGES_PROP_ITEM_TYPE:
g_value_set_gtype (value, GTK_TYPE_STACK_PAGE);
break;
case PAGES_PROP_N_ITEMS:
g_value_set_uint (value, gtk_stack_pages_get_n_items (G_LIST_MODEL (self)));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_stack_pages_init (GtkStackPages *pages)
{
}
static void
gtk_stack_pages_class_init (GtkStackPagesClass *class)
gtk_stack_pages_class_init (GtkStackPagesClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->get_property = gtk_stack_pages_get_property;
pages_properties[PAGES_PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
GTK_TYPE_STACK_PAGE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
pages_properties[PAGES_PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (object_class, PAGES_N_PROPS, pages_properties);
}
static GtkStackPages *
@@ -680,8 +729,11 @@ gtk_stack_dispose (GObject *obj)
while ((child = gtk_widget_get_first_child (GTK_WIDGET (stack))))
stack_remove (stack, child, TRUE);
if (priv->pages)
g_list_model_items_changed (G_LIST_MODEL (priv->pages), 0, n_pages, 0);
if (priv->pages && n_pages > 0)
{
g_list_model_items_changed (G_LIST_MODEL (priv->pages), 0, n_pages, 0);
g_object_notify_by_pspec (G_OBJECT (priv->pages), pages_properties[PAGES_PROP_N_ITEMS]);
}
G_OBJECT_CLASS (gtk_stack_parent_class)->dispose (obj);
}
@@ -1535,7 +1587,10 @@ gtk_stack_add_page (GtkStack *stack,
gtk_widget_set_parent (child_info->widget, GTK_WIDGET (stack));
if (priv->pages)
g_list_model_items_changed (G_LIST_MODEL (priv->pages), g_list_length (priv->children) - 1, 0, 1);
{
g_list_model_items_changed (G_LIST_MODEL (priv->pages), g_list_length (priv->children) - 1, 0, 1);
g_object_notify_by_pspec (G_OBJECT (priv->pages), pages_properties[PAGES_PROP_N_ITEMS]);
}
g_signal_connect (child_info->widget, "notify::visible",
G_CALLBACK (stack_child_visibility_notify_cb), stack);
@@ -1616,7 +1671,10 @@ gtk_stack_remove (GtkStack *stack,
stack_remove (stack, child, FALSE);
if (priv->pages)
g_list_model_items_changed (G_LIST_MODEL (priv->pages), position, 1, 0);
{
g_list_model_items_changed (G_LIST_MODEL (priv->pages), position, 1, 0);
g_object_notify_by_pspec (G_OBJECT (priv->pages), pages_properties[PAGES_PROP_N_ITEMS]);
}
}
/**
+44 -2
View File
@@ -34,7 +34,9 @@
enum {
PROP_0,
PROP_AUTOEXPAND,
PROP_ITEM_TYPE,
PROP_MODEL,
PROP_N_ITEMS,
PROP_PASSTHROUGH,
NUM_PROPERTIES
};
@@ -432,6 +434,8 @@ gtk_tree_list_model_items_changed_cb (GListModel *model,
tree_position,
tree_removed,
tree_added);
if (tree_removed != tree_added)
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_ITEMS]);
}
static void gtk_tree_list_row_destroy (GtkTreeListRow *row);
@@ -645,10 +649,18 @@ gtk_tree_list_model_get_property (GObject *object,
g_value_set_boolean (value, self->autoexpand);
break;
case PROP_ITEM_TYPE:
g_value_set_gtype (value, gtk_tree_list_model_get_item_type (G_LIST_MODEL (self)));
break;
case PROP_MODEL:
g_value_set_object (value, self->root_node.model);
break;
case PROP_N_ITEMS:
g_value_set_uint (value, tree_node_get_n_children (&self->root_node));
break;
case PROP_PASSTHROUGH:
g_value_set_boolean (value, self->passthrough);
break;
@@ -690,6 +702,18 @@ gtk_tree_list_model_class_init (GtkTreeListModelClass *class)
FALSE,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkTreeListModel:item-type:
*
* The type of items. See [method@Gio.ListModel.get_item_type].
*
* Since: 4.8
**/
properties[PROP_ITEM_TYPE] =
g_param_spec_gtype ("item-type", NULL, NULL,
G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkTreeListModel:model: (attributes org.gtk.Property.get=gtk_tree_list_model_get_model)
*
@@ -700,6 +724,18 @@ gtk_tree_list_model_class_init (GtkTreeListModelClass *class)
G_TYPE_LIST_MODEL,
GTK_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkTreeListModel:n-items:
*
* The number of items. See [method@Gio.ListModel.get_n_items].
*
* Since: 4.8
**/
properties[PROP_N_ITEMS] =
g_param_spec_uint ("n-items", NULL, NULL,
0, G_MAXUINT, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* GtkTreeListModel:passthrough: (attributes org.gtk.Property.get=gtk_tree_list_model_get_passthrough)
*
@@ -1192,13 +1228,19 @@ gtk_tree_list_row_set_expanded (GtkTreeListRow *self,
{
n_items = gtk_tree_list_model_expand_node (list, self->node);
if (n_items > 0)
g_list_model_items_changed (G_LIST_MODEL (list), tree_node_get_position (self->node) + 1, 0, n_items);
{
g_list_model_items_changed (G_LIST_MODEL (list), tree_node_get_position (self->node) + 1, 0, n_items);
g_object_notify_by_pspec (G_OBJECT (list), properties[PROP_N_ITEMS]);
}
}
else
{
n_items = gtk_tree_list_model_collapse_node (list, self->node);
if (n_items > 0)
g_list_model_items_changed (G_LIST_MODEL (list), tree_node_get_position (self->node) + 1, n_items, 0);
{
g_list_model_items_changed (G_LIST_MODEL (list), tree_node_get_position (self->node) + 1, n_items, 0);
g_object_notify_by_pspec (G_OBJECT (list), properties[PROP_N_ITEMS]);
}
}
g_object_notify_by_pspec (G_OBJECT (self), row_properties[ROW_PROP_EXPANDED]);
+1 -1
View File
@@ -653,7 +653,7 @@ gtk_video_set_media_stream (GtkVideo *self,
}
/**
* gtk_video_get_file: (attributes org.gtk.Method.get_propert=file)
* gtk_video_get_file: (attributes org.gtk.Method.get_property=file)
* @self: a `GtkVideo`
*
* Gets the file played by @self or %NULL if not playing back
+37
View File
@@ -94,6 +94,10 @@
#include "wayland/gdksurface-wayland.h"
#endif
#ifdef GDK_WINDOWING_MACOS
#include "macos/gdkmacos.h"
#endif
#ifdef GDK_WINDOWING_BROADWAY
#include "broadway/gdkbroadway.h"
#endif
@@ -6264,6 +6268,27 @@ gtk_window_export_handle (GtkWindow *window,
}
}
#endif
#ifdef GDK_WINDOWING_MACOS
if (GDK_IS_MACOS_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
{
callback (window, NULL, user_data);
return TRUE;
}
#endif
#ifdef GDK_WINDOWING_WIN32
if (GDK_IS_WIN32_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
{
callback (window, NULL, user_data);
return TRUE;
}
#endif
#ifdef GDK_WINDOWING_BROADWAY
if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
{
callback (window, NULL, user_data);
return TRUE;
}
#endif
g_warning ("Couldn't export handle for %s surface, unsupported windowing system",
G_OBJECT_TYPE_NAME (priv->surface));
@@ -6287,6 +6312,18 @@ gtk_window_unexport_handle (GtkWindow *window)
if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
return;
#endif
#ifdef GDK_WINDOWING_MACOS
if (GDK_IS_MACOS_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
return;
#endif
#ifdef GDK_WINDOWING_WIN32
if (GDK_IS_WIN32_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
return;
#endif
#ifdef GDK_WINDOWING_BROADWAY
if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
return;
#endif
g_warning ("Couldn't unexport handle for %s surface, unsupported windowing system",
G_OBJECT_TYPE_NAME (priv->surface));
+42 -41
View File
@@ -41,6 +41,7 @@
#include "gtkflattenlistmodel.h"
#include "gtkbuiltiniconprivate.h"
#include "gtkiconview.h"
#include "gtkinscription.h"
#include "gtklabel.h"
#include "gtklistitem.h"
#include "gtkpopover.h"
@@ -835,12 +836,16 @@ match_object (GObject *object,
if (GTK_IS_LABEL (object))
return match_string (gtk_label_get_label (GTK_LABEL (object)), text);
if (GTK_IS_INSCRIPTION (object))
return match_string (gtk_inscription_get_text (GTK_INSCRIPTION (object)), text);
else if (GTK_IS_BUTTON (object))
return match_string (gtk_button_get_label (GTK_BUTTON (object)), text);
else if (GTK_IS_WINDOW (object))
return match_string (gtk_window_get_title (GTK_WINDOW (object)), text);
else if (GTK_IS_TREE_VIEW_COLUMN (object))
return match_string (gtk_tree_view_column_get_title (GTK_TREE_VIEW_COLUMN (object)), text);
else if (GTK_IS_EDITABLE (object))
return match_string (gtk_editable_get_text (GTK_EDITABLE (object)), text);
address = g_strdup_printf ("%p", object);
ret = match_string (address, text);
@@ -973,24 +978,23 @@ static void
setup_type_cb (GtkSignalListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *expander, *label;
GtkWidget *expander, *inscription;
/* expander */
expander = gtk_tree_expander_new ();
gtk_list_item_set_child (list_item, expander);
/* label */
label = gtk_label_new (NULL);
gtk_label_set_width_chars (GTK_LABEL (label), 30);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_tree_expander_set_child (GTK_TREE_EXPANDER (expander), label);
inscription = gtk_inscription_new (NULL);
gtk_inscription_set_nat_chars (GTK_INSCRIPTION (inscription), 30);
gtk_tree_expander_set_child (GTK_TREE_EXPANDER (expander), inscription);
}
static void
bind_type_cb (GtkSignalListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *expander, *label;
GtkWidget *expander, *inscription;
GtkTreeListRow *list_row;
gpointer item;
@@ -999,17 +1003,17 @@ bind_type_cb (GtkSignalListItemFactory *factory,
gtk_tree_expander_set_list_row (GTK_TREE_EXPANDER (expander), list_row);
item = gtk_tree_list_row_get_item (list_row);
expander = gtk_list_item_get_child (list_item);
label = gtk_tree_expander_get_child (GTK_TREE_EXPANDER (expander));
inscription = gtk_tree_expander_get_child (GTK_TREE_EXPANDER (expander));
gtk_label_set_label (GTK_LABEL (label), G_OBJECT_TYPE_NAME (item));
gtk_inscription_set_text (GTK_INSCRIPTION (inscription), G_OBJECT_TYPE_NAME (item));
if (GTK_IS_WIDGET (item))
{
g_signal_connect (item, "map", G_CALLBACK (widget_mapped), label);
g_signal_connect (item, "unmap", G_CALLBACK (widget_unmapped), label);
g_signal_connect (item, "map", G_CALLBACK (widget_mapped), inscription);
g_signal_connect (item, "unmap", G_CALLBACK (widget_unmapped), inscription);
if (!gtk_widget_get_mapped (item))
widget_unmapped (item, label);
g_object_set_data (G_OBJECT (label), "binding", g_object_ref (item));
widget_unmapped (item, inscription);
g_object_set_data (G_OBJECT (inscription), "binding", g_object_ref (item));
}
g_object_unref (item);
@@ -1038,26 +1042,24 @@ static void
setup_name_cb (GtkSignalListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *label;
GtkWidget *inscription;
label = gtk_label_new (NULL);
gtk_label_set_width_chars (GTK_LABEL (label), 15);
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_list_item_set_child (list_item, label);
inscription = gtk_inscription_new (NULL);
gtk_inscription_set_nat_chars (GTK_INSCRIPTION (inscription), 15);
gtk_list_item_set_child (list_item, inscription);
}
static void
bind_name_cb (GtkSignalListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *label;
GtkWidget *inscription;
gpointer item;
item = gtk_tree_list_row_get_item (gtk_list_item_get_item (list_item));
label = gtk_list_item_get_child (list_item);
inscription = gtk_list_item_get_child (list_item);
gtk_label_set_label (GTK_LABEL (label), gtk_inspector_get_object_name (item));
gtk_inscription_set_text (GTK_INSCRIPTION (inscription), gtk_inspector_get_object_name (item));
g_object_unref (item);
}
@@ -1066,52 +1068,54 @@ static void
setup_label_cb (GtkSignalListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *label;
GtkWidget *inscription;
label = gtk_label_new (NULL);
gtk_label_set_width_chars (GTK_LABEL (label), 25);
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
gtk_list_item_set_child (list_item, label);
inscription = gtk_inscription_new (NULL);
gtk_inscription_set_nat_chars (GTK_INSCRIPTION (inscription), 25);
gtk_list_item_set_child (list_item, inscription);
}
static void
bind_label_cb (GtkSignalListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *label;
GtkWidget *inscription;
gpointer item;
GBinding *binding = NULL;
item = gtk_tree_list_row_get_item (gtk_list_item_get_item (list_item));
label = gtk_list_item_get_child (list_item);
inscription = gtk_list_item_get_child (list_item);
if (GTK_IS_LABEL (item))
binding = g_object_bind_property (item, "label", label, "label", G_BINDING_SYNC_CREATE);
binding = g_object_bind_property (item, "label", inscription, "text", G_BINDING_SYNC_CREATE);
if (GTK_IS_INSCRIPTION (item))
binding = g_object_bind_property (item, "text", inscription, "text", G_BINDING_SYNC_CREATE);
else if (GTK_IS_BUTTON (item))
binding = g_object_bind_property (item, "label", label, "label", G_BINDING_SYNC_CREATE);
binding = g_object_bind_property (item, "label", inscription, "text", G_BINDING_SYNC_CREATE);
else if (GTK_IS_WINDOW (item))
binding = g_object_bind_property (item, "title", label, "label", G_BINDING_SYNC_CREATE);
binding = g_object_bind_property (item, "title", inscription, "text", G_BINDING_SYNC_CREATE);
else if (GTK_IS_TREE_VIEW_COLUMN (item))
binding = g_object_bind_property (item, "title", label, "label", G_BINDING_SYNC_CREATE);
binding = g_object_bind_property (item, "title", inscription, "text", G_BINDING_SYNC_CREATE);
else if (GTK_IS_EDITABLE (item))
binding = g_object_bind_property (item, "text", inscription, "text", G_BINDING_SYNC_CREATE);
else
gtk_label_set_label (GTK_LABEL (label), NULL);
gtk_inscription_set_text (GTK_INSCRIPTION (inscription), NULL);
g_object_unref (item);
if (binding)
g_object_set_data (G_OBJECT (label), "binding", binding);
g_object_set_data (G_OBJECT (inscription), "binding", binding);
}
static void
unbind_label_cb (GtkSignalListItemFactory *factory,
GtkListItem *list_item)
{
GtkWidget *label;
GtkWidget *inscription;
GBinding *binding;
label = gtk_list_item_get_child (list_item);
binding = g_object_steal_data (G_OBJECT (label), "binding");
inscription = gtk_list_item_get_child (list_item);
binding = g_object_steal_data (G_OBJECT (inscription), "binding");
if (binding)
g_binding_unbind (binding);
}
@@ -1132,9 +1136,6 @@ toplevel_filter_func (gpointer item,
if (!GTK_IS_WINDOW (item))
return FALSE;
if (g_str_equal (G_OBJECT_TYPE_NAME (item), "GtkInspectorWindow"))
return FALSE;
return gtk_widget_get_display (item) == display;
}
+5 -3
View File
@@ -24,7 +24,7 @@
#include <gtk/gtkdragsource.h>
#include <gtk/gtkeventcontroller.h>
#include <gtk/gtkfilechooserdialog.h>
#include <gtk/gtksignallistitemfactory.h>
#include <gtk/gtkinscription.h>
#include <gtk/gtklabel.h>
#include <gtk/gtklistbox.h>
#include <gtk/gtklistitem.h>
@@ -33,6 +33,7 @@
#include <gtk/gtkmessagedialog.h>
#include <gtk/gtkpicture.h>
#include <gtk/gtkpopover.h>
#include <gtk/gtksignallistitemfactory.h>
#include <gtk/gtksingleselection.h>
#include <gtk/gtktogglebutton.h>
#include <gtk/gtktreeexpander.h>
@@ -401,7 +402,8 @@ setup_widget_for_render_node (GtkSignalListItemFactory *factory,
gtk_box_append (GTK_BOX (box), child);
/* name */
child = gtk_label_new (NULL);
child = gtk_inscription_new (NULL);
gtk_widget_set_hexpand (child, TRUE);
gtk_box_append (GTK_BOX (box), child);
}
@@ -431,7 +433,7 @@ bind_widget_for_render_node (GtkSignalListItemFactory *factory,
/* name */
name = node_name (node);
child = gtk_widget_get_last_child (box);
gtk_label_set_label (GTK_LABEL (child), name);
gtk_inscription_set_text (GTK_INSCRIPTION (child), name);
g_free (name);
g_object_unref (paintable);
+14 -2
View File
@@ -29,6 +29,7 @@
#include "gtkadjustment.h"
#include "gtkbox.h"
#include "gtkbutton.h"
#include "gtkdropdown.h"
#include "gtkcssproviderprivate.h"
#include "gtkdebug.h"
@@ -1060,13 +1061,23 @@ update_gl_flag (GtkSwitch *sw,
}
static void
software_gl_activate (GtkSwitch *sw,
GParamSpec *pspec,
software_gl_activate (GtkSwitch *sw,
GParamSpec *pspec,
GtkInspectorVisual *vis)
{
update_gl_flag (sw, GDK_DEBUG_GL_SOFTWARE, vis);
}
static void
inspect_inspector (GtkButton *button,
GtkInspectorVisual *vis)
{
GtkWidget *inspector_window;
inspector_window = gtk_inspector_window_get (gtk_widget_get_display (GTK_WIDGET (button)));
gtk_window_present (GTK_WINDOW (inspector_window));
}
static void
gtk_inspector_visual_init (GtkInspectorVisual *vis)
{
@@ -1177,6 +1188,7 @@ gtk_inspector_visual_class_init (GtkInspectorVisualClass *klass)
gtk_widget_class_bind_template_callback (widget_class, layout_activate);
gtk_widget_class_bind_template_callback (widget_class, focus_activate);
gtk_widget_class_bind_template_callback (widget_class, software_gl_activate);
gtk_widget_class_bind_template_callback (widget_class, inspect_inspector);
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
}
+27
View File
@@ -697,6 +697,32 @@
</child>
</object>
</child>
<child>
<object class="GtkFrame" id="inspector_frame">
<property name="halign">center</property>
<child>
<object class="GtkListBox">
<property name="selection-mode">none</property>
<property name="show-separators">1</property>
<style>
<class name="rich-list"/>
</style>
<child>
<object class="GtkListBoxRow">
<child>
<object class="GtkButton">
<property name="label" translatable="yes">Inspect Inspector</property>
<property name="halign">center</property>
<property name="valign">center</property>
<signal name="clicked" handler="inspect_inspector"/>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
@@ -744,6 +770,7 @@
<widget name="visual_frame"/>
<widget name="debug_frame"/>
<widget name="misc_frame"/>
<widget name="inspector_frame"/>
</widgets>
</object>
</interface>
+8 -13
View File
@@ -679,20 +679,16 @@ gtk_inspector_window_class_init (GtkInspectorWindowClass *klass)
static GdkDisplay *
get_inspector_display (void)
{
static GdkDisplay *display = NULL;
GdkDisplay *display;
const char *name;
if (display == NULL)
{
const char *name;
name = g_getenv ("GTK_INSPECTOR_DISPLAY");
display = gdk_display_open (name);
name = g_getenv ("GTK_INSPECTOR_DISPLAY");
display = gdk_display_open (name);
if (display)
g_debug ("Using display %s for GtkInspector", name);
else
g_message ("Failed to open display %s", name);
}
if (display)
g_debug ("Using display %s for GtkInspector", name);
else
g_message ("Failed to open display %s", name);
if (!display)
{
@@ -706,7 +702,6 @@ get_inspector_display (void)
if (display)
{
const char *name;
GdkDebugFlags flags;
name = g_getenv ("GTK_INSPECTOR_RENDERER");
+2
View File
@@ -283,6 +283,7 @@ gtk_public_sources = files([
'gtkimmodule.c',
'gtkimmulticontext.c',
'gtkinfobar.c',
'gtkinscription.c',
'gtklabel.c',
'gtklayoutchild.c',
'gtklayoutmanager.c',
@@ -570,6 +571,7 @@ gtk_public_headers = files([
'gtkimmodule.h',
'gtkimmulticontext.h',
'gtkinfobar.h',
'gtkinscription.h',
'gtklabel.h',
'gtklayoutchild.h',
'gtklayoutmanager.h',
+28 -1
View File
@@ -89,6 +89,13 @@ iconview {
@include focus-ring();
@if $contrast == 'high' {
&:selected {
box-shadow: inset 0 0 0 1px $borders_color;
}
}
&:drop(active) {
box-shadow: none;
}
@@ -135,6 +142,11 @@ gridview {
outline-color: $alt_focus_border_color;
@extend %selected_items;
@if $contrast == 'high' {
box-shadow: inset 0 0 0 1px $borders_color;
}
}
box { //cells
@@ -1947,7 +1959,13 @@ popover.menu {
outline: none;
transition: none;
&:selected { background: image($menu_selected_color); }
&:selected {
background: image($menu_selected_color);
@if $contrast == 'high' {
box-shadow: inset 0 0 0 1px $borders_color;
}
}
}
}
@@ -3624,6 +3642,11 @@ separator.sidebar {
background-color: $menu_selected_color;
color: inherit;
@if $contrast == 'high' {
box-shadow: inset 0 0 0 1px $borders_color;
}
&:hover {
background-color: darken($menu_selected_color,5%);
}
@@ -4269,6 +4292,10 @@ popover.emoji-picker emoji {
&:focus,
&:hover {
background: $selected_bg_color;
@if $contrast == 'high' {
box-shadow: inset 0 0 0 1px $borders_color;
}
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ fribidi_req = '>= 0.19.7'
cairo_req = '>= 1.14.0'
gdk_pixbuf_req = '>= 2.30.0'
introspection_req = '>= 1.39.0'
wayland_proto_req = '>= 1.23'
wayland_proto_req = '>= 1.25'
wayland_req = '>= 1.20.0'
graphene_req = '>= 1.9.1'
epoxy_req = '>= 1.4'
+10
View File
@@ -226,6 +226,14 @@ testsuite/reftests/info-bar-message-types.ref.ui
testsuite/reftests/info-bar-message-types.ui
testsuite/reftests/inherit-and-initial.ref.ui
testsuite/reftests/inherit-and-initial.ui
testsuite/reftests/inscription-markup.ref.ui
testsuite/reftests/inscription-markup.ui
testsuite/reftests/inscription-overflow-multiline.ref.ui
testsuite/reftests/inscription-overflow-multiline.ui
testsuite/reftests/inscription-overflow.ref.ui
testsuite/reftests/inscription-overflow.ui
testsuite/reftests/inscription-overflow-yalign.ref.ui
testsuite/reftests/inscription-overflow-yalign.ui
testsuite/reftests/label-attribute-preference.ref.ui
testsuite/reftests/label-attribute-preference.ui
testsuite/reftests/label-background.ref.ui
@@ -242,6 +250,8 @@ testsuite/reftests/label-fonts.ref.ui
testsuite/reftests/label-fonts.ui
testsuite/reftests/label-max-width-chars-and-halign-and-infinite-width.ref.ui
testsuite/reftests/label-max-width-chars-and-halign-and-infinite-width.ui
testsuite/reftests/label-overdraw-vertical.ref.ui
testsuite/reftests/label-overdraw-vertical.ui
testsuite/reftests/label-shadows.ref.ui
testsuite/reftests/label-shadows.ui
testsuite/reftests/label-sizing.ref.ui
+494 -54
View File
@@ -34,7 +34,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+ 2.8.2\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
"POT-Creation-Date: 2022-05-16 20:28+0000\n"
"POT-Creation-Date: 2022-06-10 06:06+0000\n"
"PO-Revision-Date: 2022-02-12 11:18+0100\n"
"Last-Translator: Jordi Mas i Hernàndez <jmas@softcatala.org>\n"
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
@@ -75,7 +75,7 @@ msgstr "No es poden proporcionar continguts com a «%s»"
msgid "Cannot provide contents as %s"
msgstr "No es poden proporcionar continguts com a %s"
#: gdk/gdkdisplay.c:154 gdk/gdkglcontext.c:437
#: gdk/gdkdisplay.c:154 gdk/gdkglcontext.c:435
msgid "The current backend does not support OpenGL"
msgstr "El rerefons no és compatible OpenGL"
@@ -136,27 +136,27 @@ msgstr "Arrossega i deixa anar no és compatible des d'altres aplicacions."
msgid "No compatible formats to transfer contents."
msgstr "No hi ha cap format compatible per a transferir contingut."
#: gdk/gdkglcontext.c:334
msgid "The EGL implementation does not support any allowed APIs"
msgstr "La implementació EGL no admet cap API permesa"
#: gdk/gdkglcontext.c:394 gdk/x11/gdkglcontext-glx.c:605
msgid "No GL API allowed."
msgstr "No es permet l'API GL."
#: gdk/gdkglcontext.c:415 gdk/win32/gdkglcontext-win32-wgl.c:616
#: gdk/x11/gdkglcontext-glx.c:624
#: gdk/gdkglcontext.c:418 gdk/win32/gdkglcontext-win32-wgl.c:611
#: gdk/x11/gdkglcontext-glx.c:639
msgid "Unable to create a GL context"
msgstr "No s'ha pogut crear el context GL"
#: gdk/gdkglcontext.c:1274
#: gdk/gdkglcontext.c:1273
msgid "Anything but OpenGL ES disabled via GDK_DEBUG"
msgstr "Tot excepte OpenGL ES desactivat mitjançant GDK_DEBUG"
#: gdk/gdkglcontext.c:1283
#: gdk/gdkglcontext.c:1282
#, c-format
msgid "Application does not support %s API"
msgstr "L'aplicació no admet API de %s"
#. translators: This is about OpenGL backend names, like
#. * "Trying to use X11 GLX, but EGL is already in use"
#: gdk/gdkglcontext.c:1817
#: gdk/gdkglcontext.c:1822
#, c-format
msgid "Trying to use %s, but %s is already in use"
msgstr "S'està intentant utilitzar %s, però ja s'està utilitzant %s"
@@ -769,7 +769,7 @@ msgstr ""
msgid "No GL implementation is available"
msgstr "No hi ha cap implementació GL disponible"
#: gdk/win32/gdkglcontext-win32-wgl.c:582
#: gdk/win32/gdkglcontext-win32-wgl.c:577
msgid "No available configurations for the given pixel format"
msgstr ""
"No hi ha cap configuració disponible pel tipus de format de píxel donat"
@@ -837,16 +837,16 @@ msgstr ""
"No es pot emmagatzemar el porta-retalls. No està actiu el gestor del porta-"
"retalls."
#: gdk/x11/gdkglcontext-glx.c:780
#: gdk/x11/gdkglcontext-glx.c:755
msgid "No GLX configurations available"
msgstr "No hi ha cap configuració GLX disponible"
#: gdk/x11/gdkglcontext-glx.c:853
#: gdk/x11/gdkglcontext-glx.c:828
msgid "No GLX configuration with required features found"
msgstr ""
"No s'ha trobat cap configuració GLX amb les característiques requerides"
#: gdk/x11/gdkglcontext-glx.c:927
#: gdk/x11/gdkglcontext-glx.c:902
msgid "GLX is not supported"
msgstr "GLX no és compatible"
@@ -1008,7 +1008,7 @@ msgstr "Dades mal formades: URL"
msgid "Could not unescape string"
msgstr "No s'ha pogut escapar la cadena"
#: gtk/gtkaboutdialog.c:124
#: gtk/gtkaboutdialog.c:124 gtk/ui/gtkaboutdialog.ui:163
msgid "License"
msgstr "Llicència"
@@ -1589,6 +1589,7 @@ msgid "Other application…"
msgstr "Una altra aplicació…"
#: gtk/gtkappchooserdialog.c:205 gtk/gtkappchooserdialog.c:256
#: gtk/ui/gtkappchooserdialog.ui:4
msgid "Select Application"
msgstr "Seleccioneu una aplicació"
@@ -2032,6 +2033,7 @@ msgid "Margins from Printer…"
msgstr "Marges de la impressora…"
#: gtk/gtkcustompaperunixdialog.c:348 gtk/gtkmessagedialog.c:162
#: gtk/ui/gtkassistant.ui:40
msgid "_Close"
msgstr "_Tanca"
@@ -2156,7 +2158,9 @@ msgstr "Ja existeix un fitxer amb aquest nom"
#: gtk/gtkprintbackend.c:640 gtk/gtkprinteroptionwidget.c:722
#: gtk/gtkprintunixdialog.c:651 gtk/gtkprintunixdialog.c:807
#: gtk/gtkwindow.c:6106 gtk/inspector/css-editor.c:248
#: gtk/inspector/recorder.c:1721
#: gtk/inspector/recorder.c:1721 gtk/ui/gtkappchooserdialog.ui:45
#: gtk/ui/gtkassistant.ui:52 gtk/ui/gtkcolorchooserdialog.ui:33
#: gtk/ui/gtkfontchooserdialog.ui:24
msgid "_Cancel"
msgstr "_Cancel·la"
@@ -2171,7 +2175,7 @@ msgstr "_Obre"
msgid "_Save"
msgstr "_Desa"
#: gtk/gtkfilechoosernativequartz.c:339
#: gtk/gtkfilechoosernativequartz.c:339 gtk/ui/gtkfilechooserwidget.ui:346
msgid "Select which types of files are shown"
msgstr "Seleccioneu quins tipus de fitxers es mostren"
@@ -2245,7 +2249,7 @@ msgid "If you delete an item, it will be permanently lost."
msgstr "Si suprimiu un element, es perdrà definitivament."
#: gtk/gtkfilechooserwidget.c:1211 gtk/gtkfilechooserwidget.c:1827
#: gtk/gtklabel.c:5621 gtk/gtktext.c:6041 gtk/gtktextview.c:8914
#: gtk/gtklabel.c:5627 gtk/gtktext.c:6041 gtk/gtktextview.c:8914
msgid "_Delete"
msgstr "_Suprimeix"
@@ -2274,9 +2278,9 @@ msgid "_Add to Bookmarks"
msgstr "_Afegeix a les adreces d'interès"
#: gtk/gtkfilechooserwidget.c:1823 gtk/gtkplacessidebar.c:2310
#: gtk/gtkplacessidebar.c:3249
#: gtk/gtkplacessidebar.c:3249 gtk/ui/gtkfilechooserwidget.ui:465
msgid "_Rename"
msgstr "Canvia el _nom"
msgstr "Canvia el _nom"
#: gtk/gtkfilechooserwidget.c:1831
msgid "_Move to Trash"
@@ -2302,7 +2306,9 @@ msgstr "M_ostra la data"
msgid "Sort _Folders Before Files"
msgstr "Ordena _les carpetes abans que els fitxers"
#. this is the header for the location column in the print dialog
#: gtk/gtkfilechooserwidget.c:2256 gtk/inspector/css-node-tree.ui:135
#: gtk/ui/gtkfilechooserwidget.ui:186 gtk/ui/gtkprintunixdialog.ui:114
msgid "Location"
msgstr "Ubicació"
@@ -2325,6 +2331,7 @@ msgid "Enter location or URL"
msgstr "Introduïu una ubicació o URL"
#: gtk/gtkfilechooserwidget.c:3811 gtk/gtkfilechooserwidget.c:6635
#: gtk/ui/gtkfilechooserwidget.ui:226
msgid "Modified"
msgstr "Modificat"
@@ -2520,27 +2527,27 @@ msgstr "Variants de caràcters"
msgid "OpenGL context creation failed"
msgstr "S'ha produït un error en la creació del context OpenGL"
#: gtk/gtklabel.c:5618 gtk/gtktext.c:6029 gtk/gtktextview.c:8902
#: gtk/gtklabel.c:5624 gtk/gtktext.c:6029 gtk/gtktextview.c:8902
msgid "Cu_t"
msgstr "Re_talla"
#: gtk/gtklabel.c:5619 gtk/gtktext.c:6033 gtk/gtktextview.c:8906
#: gtk/gtklabel.c:5625 gtk/gtktext.c:6033 gtk/gtktextview.c:8906
msgid "_Copy"
msgstr "_Copia"
#: gtk/gtklabel.c:5620 gtk/gtktext.c:6037 gtk/gtktextview.c:8910
#: gtk/gtklabel.c:5626 gtk/gtktext.c:6037 gtk/gtktextview.c:8910
msgid "_Paste"
msgstr "_Enganxa"
#: gtk/gtklabel.c:5626 gtk/gtktext.c:6050 gtk/gtktextview.c:8935
#: gtk/gtklabel.c:5632 gtk/gtktext.c:6050 gtk/gtktextview.c:8935
msgid "Select _All"
msgstr "Seleccion_a-ho tot"
#: gtk/gtklabel.c:5631
#: gtk/gtklabel.c:5637
msgid "_Open Link"
msgstr "Obre l'_enllaç"
#: gtk/gtklabel.c:5635
#: gtk/gtklabel.c:5641
msgid "Copy _Link Address"
msgstr "Copia l'adreça de l'en_llaç"
@@ -2552,11 +2559,11 @@ msgstr "_Copia l'URL"
msgid "Invalid URI"
msgstr "URI no vàlid"
#: gtk/gtklockbutton.c:285
#: gtk/gtklockbutton.c:285 gtk/ui/gtklockbutton.ui:20
msgid "Lock"
msgstr "Bloca"
#: gtk/gtklockbutton.c:297
#: gtk/gtklockbutton.c:297 gtk/ui/gtklockbutton.ui:26
msgid "Unlock"
msgstr "Desbloca"
@@ -2590,7 +2597,7 @@ msgstr ""
#. * it isn't default:LTR or default:RTL it will not work
# Premi a qui va ficar "Per defecte:LTR. M'ha costat
# trobar en quin mòdul estava l'error. jm
#: gtk/gtkmain.c:775
#: gtk/gtkmain.c:786
msgid "default:LTR"
msgstr "default:LTR"
@@ -2787,7 +2794,7 @@ msgstr "No és un fitxer de configuració de pàgina vàlid"
msgid "Manage Custom Sizes…"
msgstr "Gestioneu mides personalitzades…"
#: gtk/gtkpagesetupunixdialog.c:284
#: gtk/gtkpagesetupunixdialog.c:284 gtk/ui/gtkassistant.ui:98
msgid "_Apply"
msgstr "_Aplica"
@@ -2814,7 +2821,8 @@ msgstr ""
" Superior: %s %s\n"
" Inferior: %s %s"
#: gtk/gtkpagesetupunixdialog.c:784
#: gtk/gtkpagesetupunixdialog.c:784 gtk/ui/gtkpagesetupunixdialog.ui:5
#: gtk/ui/gtkprintunixdialog.ui:709
msgid "Page Setup"
msgstr "Configuració de la pàgina"
@@ -2933,6 +2941,8 @@ msgstr "Aquest nom ja està agafat"
#: gtk/gtkplacessidebar.c:2304 gtk/inspector/actions.ui:19
#: gtk/inspector/css-node-tree.ui:35 gtk/inspector/prop-list.ui:24
#: gtk/ui/gtkfilechooserwidget.ui:168 gtk/ui/gtkfilechooserwidget.ui:440
#: gtk/ui/gtkprintunixdialog.ui:83
msgid "Name"
msgstr "Nom"
@@ -3054,7 +3064,7 @@ msgid "Unable to access location"
msgstr "No s'ha pogut accedir a la ubicació"
#. Restore from Cancel to Connect
#: gtk/gtkplacesview.c:1228
#: gtk/gtkplacesview.c:1228 gtk/ui/gtkplacesview.ui:262
msgid "Con_nect"
msgstr "C_onnecta"
@@ -3142,7 +3152,8 @@ msgstr[1] "%s / %s disponibles"
msgid "Disconnect"
msgstr "Desconnecta"
#: gtk/gtkplacesviewrow.c:471
#: gtk/gtkplacesviewrow.c:471 gtk/ui/gtkplacesviewrow.ui:53
#: gtk/ui/gtksidebarrow.ui:50
msgid "Unmount"
msgstr "Desmunta"
@@ -3158,7 +3169,8 @@ msgstr "_Recorda la contrasenya"
msgid "Select a filename"
msgstr "Seleccioneu un nom de fitxer"
#: gtk/gtkprinteroptionwidget.c:723
#: gtk/gtkprinteroptionwidget.c:723 gtk/ui/gtkappchooserdialog.ui:50
#: gtk/ui/gtkcolorchooserdialog.ui:38 gtk/ui/gtkfontchooserdialog.ui:29
msgid "_Select"
msgstr "_Selecciona"
@@ -3493,11 +3505,13 @@ msgstr "Resultats de cerca"
msgid "Search Shortcuts"
msgstr "Dreceres de cerca"
#: gtk/gtkshortcutswindow.c:968
#: gtk/gtkshortcutswindow.c:968 gtk/ui/gtkemojichooser.ui:349
#: gtk/ui/gtkfilechooserwidget.ui:297
msgid "No Results Found"
msgstr "No s'ha trobat cap resultat"
#: gtk/gtkshortcutswindow.c:974
#: gtk/gtkshortcutswindow.c:974 gtk/ui/gtkemojichooser.ui:362
#: gtk/ui/gtkfilechooserwidget.ui:310 gtk/ui/gtkplacesview.ui:230
msgid "Try a different search"
msgstr "Proveu una cerca diferent"
@@ -3804,7 +3818,7 @@ msgstr "ID d'aplicació"
msgid "Resource Path"
msgstr "Camí del recurs"
#: gtk/inspector/general.ui:268
#: gtk/inspector/general.ui:268 gtk/ui/gtkplacesview.ui:79
msgid "Prefix"
msgstr "Prefix"
@@ -3865,7 +3879,7 @@ msgid "Address"
msgstr "Adreça"
#: gtk/inspector/misc-info.ui:62 gtk/inspector/prop-list.ui:35
#: gtk/inspector/statistics.ui:46
#: gtk/inspector/statistics.ui:46 gtk/ui/gtkfilechooserwidget.ui:214
msgid "Type"
msgstr "Tipus"
@@ -4091,7 +4105,8 @@ msgstr "Camí"
msgid "Count"
msgstr "Compte"
#: gtk/inspector/resource-list.ui:82
#: gtk/inspector/resource-list.ui:82 gtk/ui/gtkfilechooserwidget.ui:202
#: gtk/ui/gtkfontchooserwidget.ui:204 gtk/ui/gtkfontchooserwidget.ui:351
msgid "Size"
msgstr "Mida"
@@ -4343,7 +4358,7 @@ msgstr "Germà següent"
msgid "Miscellaneous"
msgstr "Miscel·lània"
#: gtk/inspector/window.ui:407
#: gtk/inspector/window.ui:407 gtk/ui/gtkprintunixdialog.ui:393
msgid "Layout"
msgstr "Disposició"
@@ -4579,7 +4594,7 @@ msgstr "Amplada completa"
#: gtk/open-type-layout.h:46
msgctxt "OpenType layout"
msgid "Half Forms"
msgstr "Formes mitjanes"
msgstr "Mitges formes"
#: gtk/open-type-layout.h:47
msgctxt "OpenType layout"
@@ -4619,7 +4634,7 @@ msgstr "Formes Hojo Kanji"
#: gtk/open-type-layout.h:54
msgctxt "OpenType layout"
msgid "Half Widths"
msgstr "Amplada mitja"
msgstr "Mitges amplades"
#: gtk/open-type-layout.h:55
msgctxt "OpenType layout"
@@ -6022,6 +6037,30 @@ msgctxt "paper size"
msgid "ROC 8k"
msgstr "ROC 8k"
#: gtk/ui/gtkaboutdialog.ui:62
msgid "About"
msgstr "Quant a"
#: gtk/ui/gtkaboutdialog.ui:123
msgid "Credits"
msgstr "Crèdits"
#: gtk/ui/gtkaboutdialog.ui:206
msgid "System"
msgstr "Sistema"
#: gtk/ui/gtkappchooserdialog.ui:60
msgid "_View All Applications"
msgstr "_Visualitza totes les aplicacions"
#: gtk/ui/gtkappchooserdialog.ui:66
msgid "_Find New Applications"
msgstr "_Cerca aplicacions noves"
#: gtk/ui/gtkappchooserwidget.ui:100
msgid "No applications found."
msgstr "No s'ha trobat cap aplicació."
#: gtk/ui/gtkapplication-quartz.ui:13
msgid "Preferences"
msgstr "Preferències"
@@ -6048,6 +6087,301 @@ msgstr "Mostra-ho tot"
msgid "Quit %s"
msgstr "Surt de %s"
#: gtk/ui/gtkassistant.ui:64
msgid "_Finish"
msgstr "_Finalitza"
#: gtk/ui/gtkassistant.ui:75
msgid "_Back"
msgstr "_Enrere"
#: gtk/ui/gtkassistant.ui:86
msgid "_Next"
msgstr "_Següent"
#: gtk/ui/gtkcolorchooserdialog.ui:4
msgid "Select a Color"
msgstr "Selecciona un color"
#: gtk/ui/gtkcoloreditor.ui:43 gtk/ui/gtkcoloreditor.ui:53
msgid "Pick a color from the screen"
msgstr "Trieu un color de la pantalla"
#: gtk/ui/gtkcoloreditor.ui:80
msgid "Hexadecimal color or color name"
msgstr "Color en hexadecimal o nom del color"
#: gtk/ui/gtkcoloreditor.ui:95
msgid "Hue"
msgstr "To"
#: gtk/ui/gtkcoloreditor.ui:111
msgid "Alpha value"
msgstr "Valor alfa"
#: gtk/ui/gtkcoloreditor.ui:129
msgid "Saturation and value"
msgstr "Saturació i valor"
#: gtk/ui/gtkcoloreditor.ui:153
msgctxt "Color channel"
msgid "A"
msgstr "A"
#: gtk/ui/gtkcoloreditor.ui:189
msgctxt "Color channel"
msgid "H"
msgstr "H"
#: gtk/ui/gtkcoloreditor.ui:226
msgctxt "Color Channel"
msgid "S"
msgstr "S"
#: gtk/ui/gtkcoloreditor.ui:235
msgctxt "Color Channel"
msgid "V"
msgstr "V"
#: gtk/ui/gtkdropdown.ui:19
msgid "(None)"
msgstr "(Cap)"
#: gtk/ui/gtkdropdown.ui:68
msgid "Search…"
msgstr "Cerca…"
#: gtk/ui/gtkemojichooser.ui:69 gtk/ui/gtkemojichooser.ui:239
msgctxt "emoji category"
msgid "Smileys & People"
msgstr "Somriures i persones"
#: gtk/ui/gtkemojichooser.ui:94 gtk/ui/gtkemojichooser.ui:248
msgctxt "emoji category"
msgid "Body & Clothing"
msgstr "Cos i roba"
#: gtk/ui/gtkemojichooser.ui:119 gtk/ui/gtkemojichooser.ui:257
msgctxt "emoji category"
msgid "Animals & Nature"
msgstr "Animals i natura"
#: gtk/ui/gtkemojichooser.ui:133 gtk/ui/gtkemojichooser.ui:266
msgctxt "emoji category"
msgid "Food & Drink"
msgstr "Menjar i beure"
#: gtk/ui/gtkemojichooser.ui:147 gtk/ui/gtkemojichooser.ui:275
msgctxt "emoji category"
msgid "Travel & Places"
msgstr "Viatge i llocs"
#: gtk/ui/gtkemojichooser.ui:161 gtk/ui/gtkemojichooser.ui:284
msgctxt "emoji category"
msgid "Activities"
msgstr "Activitats"
#: gtk/ui/gtkemojichooser.ui:175 gtk/ui/gtkemojichooser.ui:293
msgctxt "emoji category"
msgid "Objects"
msgstr "Objectes"
#: gtk/ui/gtkemojichooser.ui:189 gtk/ui/gtkemojichooser.ui:302
msgctxt "emoji category"
msgid "Symbols"
msgstr "Símbols"
#: gtk/ui/gtkemojichooser.ui:203 gtk/ui/gtkemojichooser.ui:311
msgctxt "emoji category"
msgid "Flags"
msgstr "Banderes"
#: gtk/ui/gtkemojichooser.ui:230
msgctxt "emoji category"
msgid "Recent"
msgstr "Recents"
#: gtk/ui/gtkfilechooserwidget.ui:64
msgid "Create Folder"
msgstr "Crea una carpeta"
#: gtk/ui/gtkfilechooserwidget.ui:249
msgid "Remote location — only searching the current folder"
msgstr "Ubicació remota — només cercant la carpeta actual"
#: gtk/ui/gtkfilechooserwidget.ui:378
msgid "Folder Name"
msgstr "Nom de la carpeta"
#: gtk/ui/gtkfilechooserwidget.ui:404
msgid "_Create"
msgstr "_Crea"
#: gtk/ui/gtkfontchooserdialog.ui:4
msgid "Select Font"
msgstr "Selecciona el tipus de lletra"
#: gtk/ui/gtkfontchooserwidget.ui:64
msgid "Search font name"
msgstr "Cerca el nom del tipus de lletra"
#: gtk/ui/gtkfontchooserwidget.ui:79
msgid "Filter by"
msgstr "Filtra per"
#: gtk/ui/gtkfontchooserwidget.ui:89
msgid "Monospace"
msgstr "Monospace"
#: gtk/ui/gtkfontchooserwidget.ui:95
msgid "Language"
msgstr "Llengua"
#: gtk/ui/gtkfontchooserwidget.ui:188 gtk/ui/gtkfontchooserwidget.ui:324
msgid "Preview text"
msgstr "Previsualització del text"
#: gtk/ui/gtkfontchooserwidget.ui:191 gtk/ui/gtkfontchooserwidget.ui:220
msgid "horizontal"
msgstr "horitzontal"
#: gtk/ui/gtkfontchooserwidget.ui:270
msgid "No Fonts Found"
msgstr "No s'ha trobat cap tipus de lletra"
#: gtk/ui/gtkpagesetupunixdialog.ui:27
msgid "_Format for:"
msgstr "_Format per a:"
#: gtk/ui/gtkpagesetupunixdialog.ui:51 gtk/ui/gtkprintunixdialog.ui:635
msgid "_Paper size:"
msgstr "_Mida del paper:"
#: gtk/ui/gtkpagesetupunixdialog.ui:86
msgid "_Orientation:"
msgstr "_Orientació:"
#: gtk/ui/gtkpagesetupunixdialog.ui:98 gtk/ui/gtkprintunixdialog.ui:675
msgid "Portrait"
msgstr "Vertical"
#: gtk/ui/gtkpagesetupunixdialog.ui:109 gtk/ui/gtkprintunixdialog.ui:677
msgid "Reverse portrait"
msgstr "Vertical del revés"
#: gtk/ui/gtkpagesetupunixdialog.ui:121 gtk/ui/gtkprintunixdialog.ui:676
msgid "Landscape"
msgstr "Apaïsat"
#: gtk/ui/gtkpagesetupunixdialog.ui:132 gtk/ui/gtkprintunixdialog.ui:678
msgid "Reverse landscape"
msgstr "Apaïsat del revés"
#: gtk/ui/gtkplacesview.ui:28
msgid "Server Addresses"
msgstr "Adreces del servidor"
#: gtk/ui/gtkplacesview.ui:40
msgid ""
"Server addresses are made up of a protocol prefix and an address. Examples:"
msgstr ""
"Les adreces del servidor estan formades per un prefix de protocol i una "
"adreça. Exemples:"
#: gtk/ui/gtkplacesview.ui:66
msgid "Available Protocols"
msgstr "Protocols disponibles"
#. Translators: Server as any successfully connected network address
#: gtk/ui/gtkplacesview.ui:118
msgid "No recent servers found"
msgstr "No s'ha trobat cap servidor utilitzat recent"
#: gtk/ui/gtkplacesview.ui:141
msgid "Recent Servers"
msgstr "Servidors utilitzats recentment"
#: gtk/ui/gtkplacesview.ui:221
msgid "No results found"
msgstr "No s'ha trobat cap resultat"
#: gtk/ui/gtkplacesview.ui:252
msgid "Connect to _Server"
msgstr "_Connecta al servidor"
#: gtk/ui/gtkplacesview.ui:277
msgid "Enter server address…"
msgstr "Introduïu l'adreça del servidor…"
#. this is the header for the printer status column in the print dialog
#: gtk/ui/gtkprintunixdialog.ui:145
msgid "Status"
msgstr "Estat"
#: gtk/ui/gtkprintunixdialog.ui:199
msgid "Range"
msgstr "Interval"
#: gtk/ui/gtkprintunixdialog.ui:212
msgid "_All Pages"
msgstr "_Totes les pàgines"
#: gtk/ui/gtkprintunixdialog.ui:224
msgid "C_urrent Page"
msgstr "_Pàgina actual"
#: gtk/ui/gtkprintunixdialog.ui:237
msgid "Se_lection"
msgstr "_Selecció"
#: gtk/ui/gtkprintunixdialog.ui:250
msgid "Pag_es:"
msgstr "Pàgin_es:"
#: gtk/ui/gtkprintunixdialog.ui:251 gtk/ui/gtkprintunixdialog.ui:264
msgid ""
"Specify one or more page ranges,\n"
" e.g. 13, 7, 11"
msgstr ""
"Especifiqueu un o més intervals de pàgines,\n"
" per exemple 1-3, 7, 11"
#: gtk/ui/gtkprintunixdialog.ui:287
msgid "Copies"
msgstr "Còpies"
#: gtk/ui/gtkprintunixdialog.ui:302
msgid "Copie_s:"
msgstr "Còpie_s:"
#: gtk/ui/gtkprintunixdialog.ui:325
msgid "C_ollate"
msgstr "_Intercala"
#: gtk/ui/gtkprintunixdialog.ui:336
msgid "_Reverse"
msgstr "_Invers"
#: gtk/ui/gtkprintunixdialog.ui:366
msgid "General"
msgstr "General"
#: gtk/ui/gtkprintunixdialog.ui:408
msgid "T_wo-sided:"
msgstr "D_oble cara:"
#: gtk/ui/gtkprintunixdialog.ui:430
msgid "Pages per _side:"
msgstr "Pàgines per _cara:"
#: gtk/ui/gtkprintunixdialog.ui:454
msgid "Page or_dering:"
msgstr "_Ordenació de les pàgines:"
#: gtk/ui/gtkprintunixdialog.ui:477
msgid "_Only print:"
msgstr "_Només imprimeix:"
#: gtk/ui/gtkprintunixdialog.ui:493
msgid "All sheets"
msgstr "Tots els fulls"
@@ -6060,21 +6394,125 @@ msgstr "Fulls parells"
msgid "Odd sheets"
msgstr "Fulls senars"
#: gtk/ui/gtkprintunixdialog.ui:675
msgid "Portrait"
msgstr "Vertical"
#: gtk/ui/gtkprintunixdialog.ui:509
msgid "Sc_ale:"
msgstr "E_scala:"
#: gtk/ui/gtkprintunixdialog.ui:676
msgid "Landscape"
msgstr "Apaïsat"
#: gtk/ui/gtkprintunixdialog.ui:554
msgid "Paper"
msgstr "Paper"
#: gtk/ui/gtkprintunixdialog.ui:677
msgid "Reverse portrait"
msgstr "Vertical del revés"
#: gtk/ui/gtkprintunixdialog.ui:569
msgid "Paper _type:"
msgstr "_Tipus de paper:"
#: gtk/ui/gtkprintunixdialog.ui:678
msgid "Reverse landscape"
msgstr "Apaïsat del revés"
#: gtk/ui/gtkprintunixdialog.ui:591
msgid "Paper _source:"
msgstr "_Font del paper:"
#: gtk/ui/gtkprintunixdialog.ui:613
msgid "Output t_ray:"
msgstr "_Safata de sortida:"
#: gtk/ui/gtkprintunixdialog.ui:658
msgid "Or_ientation:"
msgstr "O_rientació:"
#: gtk/ui/gtkprintunixdialog.ui:732
msgid "Job Details"
msgstr "Detalls del treball"
#: gtk/ui/gtkprintunixdialog.ui:747
msgid "Pri_ority:"
msgstr "P_rioritat:"
#: gtk/ui/gtkprintunixdialog.ui:768
msgid "_Billing info:"
msgstr "_Informació de facturació:"
#: gtk/ui/gtkprintunixdialog.ui:801
msgid "Print Document"
msgstr "Imprimeix el document"
#. this is one of the choices for the print at option in the print dialog
#: gtk/ui/gtkprintunixdialog.ui:814
msgid "_Now"
msgstr "_Ara"
#. this is one of the choices for the print at option in the print dialog. It
#. also serves as the label for an entry that allows the user to enter a time.
#: gtk/ui/gtkprintunixdialog.ui:828
msgid "A_t:"
msgstr "_A:"
#. Ability to parse the am/pm format depends on actual locale. You can remove
#. the am/pm values below for your locale if they are not supported.
#: gtk/ui/gtkprintunixdialog.ui:830 gtk/ui/gtkprintunixdialog.ui:832
#: gtk/ui/gtkprintunixdialog.ui:848 gtk/ui/gtkprintunixdialog.ui:850
#, fuzzy
msgid ""
"Specify the time of print,\n"
" e.g. 1530, 235 pm, 141520, 114630 am, 4 pm"
msgstr ""
"Especifiqueu el temps d'impressió,\n"
" pp. ex. 153030, 23535 pm, 1420152020, 1130463030 am, 4 pm"
#. this is one of the choices for the print at option in the print dialog. It
#. means that the print job will not be printed until it explicitly gets
#. 'released'.
#: gtk/ui/gtkprintunixdialog.ui:862
msgid "On _hold"
msgstr "_En espera"
#: gtk/ui/gtkprintunixdialog.ui:864 gtk/ui/gtkprintunixdialog.ui:865
msgid "Hold the job until it is explicitly released"
msgstr "Mantenir el treball fins que s'alliberi explícitament"
#: gtk/ui/gtkprintunixdialog.ui:892
msgid "Add Cover Page"
msgstr "Afegeix una pàgina de portada"
#. this is the label used for the option in the print dialog that controls the
#. front cover page.
# Possiblement sigui "abans de" (josep)
#: gtk/ui/gtkprintunixdialog.ui:907
msgid "Be_fore:"
msgstr "_Abans:"
#. this is the label used for the option in the print dialog that controls the
#. back cover page.
# Possiblement "després de" (josep)
#: gtk/ui/gtkprintunixdialog.ui:928
msgid "_After:"
msgstr "_Després:"
#: gtk/ui/gtkprintunixdialog.ui:957
msgid "Job"
msgstr "Treball"
#. This will appear as a tab label in the print dialog.
#: gtk/ui/gtkprintunixdialog.ui:987
msgid "Image Quality"
msgstr "Qualitat de la imatge"
#. This will appear as a tab label in the print dialog.
#: gtk/ui/gtkprintunixdialog.ui:1016
msgid "Color"
msgstr "Color"
#. This will appear as a tab label in the print dialog. It's a typographical
#. term, as in "Binding and finishing"
#: gtk/ui/gtkprintunixdialog.ui:1045
msgid "Finishing"
msgstr "S'ha finalitzat"
#: gtk/ui/gtkprintunixdialog.ui:1074
msgid "Advanced"
msgstr "Avançat"
#: gtk/ui/gtkprintunixdialog.ui:1090
msgid "Some of the settings in the dialog conflict"
msgstr "Alguns dels ajustaments del diàleg de conflicte"
#: modules/media/gtkffmediafile.c:220
#, c-format
@@ -6993,3 +7431,5 @@ msgstr ""
"No hi ha el fitxer índex de tema a «%s».\n"
"Si realment voleu crear una memòria cau d'icones aquí, utilitzeu --ignore-theme-index.\n"
#~ msgid "The EGL implementation does not support any allowed APIs"
#~ msgstr "La implementació EGL no admet cap API permesa"
+489 -444
View File
File diff suppressed because it is too large Load Diff
+970 -792
View File
File diff suppressed because it is too large Load Diff
+529 -426
View File
File diff suppressed because it is too large Load Diff
+477 -375
View File
File diff suppressed because it is too large Load Diff
+457 -34
View File
@@ -22,8 +22,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+.master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
"POT-Creation-Date: 2022-06-04 20:27+0000\n"
"PO-Revision-Date: 2022-06-05 12:43+0300\n"
"POT-Creation-Date: 2022-06-07 06:16+0000\n"
"PO-Revision-Date: 2022-06-07 14:48+0300\n"
"Last-Translator: Aleksandr Melman <Alexmelman88@gmail.com>\n"
"Language-Team: Русский <gnome-cyr@gnome.org>\n"
"Language: ru\n"
@@ -971,7 +971,7 @@ msgstr "Некорректные данные: URL"
msgid "Could not unescape string"
msgstr "Не удалось раскрыть строку"
#: gtk/gtkaboutdialog.c:124
#: gtk/gtkaboutdialog.c:124 gtk/ui/gtkaboutdialog.ui:163
msgid "License"
msgstr "Лицензия"
@@ -1560,6 +1560,7 @@ msgid "Other application…"
msgstr "Другое приложение…"
#: gtk/gtkappchooserdialog.c:205 gtk/gtkappchooserdialog.c:256
#: gtk/ui/gtkappchooserdialog.ui:4
msgid "Select Application"
msgstr "Выбрать приложение"
@@ -2010,6 +2011,7 @@ msgid "Margins from Printer…"
msgstr "Поля из принтера…"
#: gtk/gtkcustompaperunixdialog.c:348 gtk/gtkmessagedialog.c:162
#: gtk/ui/gtkassistant.ui:40
msgid "_Close"
msgstr "_Закрыть"
@@ -2134,7 +2136,9 @@ msgstr "Файл с таким именем уже существует"
#: gtk/gtkprintbackend.c:640 gtk/gtkprinteroptionwidget.c:722
#: gtk/gtkprintunixdialog.c:651 gtk/gtkprintunixdialog.c:807
#: gtk/gtkwindow.c:6106 gtk/inspector/css-editor.c:248
#: gtk/inspector/recorder.c:1721
#: gtk/inspector/recorder.c:1721 gtk/ui/gtkappchooserdialog.ui:45
#: gtk/ui/gtkassistant.ui:52 gtk/ui/gtkcolorchooserdialog.ui:33
#: gtk/ui/gtkfontchooserdialog.ui:24
msgid "_Cancel"
msgstr "_Отмена"
@@ -2149,7 +2153,7 @@ msgstr "_Открыть"
msgid "_Save"
msgstr "_Сохранить"
#: gtk/gtkfilechoosernativequartz.c:339
#: gtk/gtkfilechoosernativequartz.c:339 gtk/ui/gtkfilechooserwidget.ui:346
msgid "Select which types of files are shown"
msgstr "Выбрать отображаемые типы файлов"
@@ -2251,7 +2255,7 @@ msgid "_Add to Bookmarks"
msgstr "_Добавить в закладки"
#: gtk/gtkfilechooserwidget.c:1823 gtk/gtkplacessidebar.c:2310
#: gtk/gtkplacessidebar.c:3249
#: gtk/gtkplacessidebar.c:3249 gtk/ui/gtkfilechooserwidget.ui:465
msgid "_Rename"
msgstr "_Переименовать"
@@ -2279,7 +2283,9 @@ msgstr "Показывать _время"
msgid "Sort _Folders Before Files"
msgstr "Сортировать _папки перед файлами"
#. this is the header for the location column in the print dialog
#: gtk/gtkfilechooserwidget.c:2256 gtk/inspector/css-node-tree.ui:135
#: gtk/ui/gtkfilechooserwidget.ui:186 gtk/ui/gtkprintunixdialog.ui:114
msgid "Location"
msgstr "Расположение"
@@ -2302,6 +2308,7 @@ msgid "Enter location or URL"
msgstr "Введите расположение или URL"
#: gtk/gtkfilechooserwidget.c:3811 gtk/gtkfilechooserwidget.c:6635
#: gtk/ui/gtkfilechooserwidget.ui:226
msgid "Modified"
msgstr "Изменён"
@@ -2529,11 +2536,11 @@ msgstr "_Копировать URL"
msgid "Invalid URI"
msgstr "Неверный URI"
#: gtk/gtklockbutton.c:285
#: gtk/gtklockbutton.c:285 gtk/ui/gtklockbutton.ui:20
msgid "Lock"
msgstr "Заблокировать"
#: gtk/gtklockbutton.c:297
#: gtk/gtklockbutton.c:297 gtk/ui/gtklockbutton.ui:26
msgid "Unlock"
msgstr "Разблокировать"
@@ -2765,7 +2772,7 @@ msgstr "Некорректный файл настройки печати"
msgid "Manage Custom Sizes…"
msgstr "Управление размерами…"
#: gtk/gtkpagesetupunixdialog.c:284
#: gtk/gtkpagesetupunixdialog.c:284 gtk/ui/gtkassistant.ui:98
msgid "_Apply"
msgstr "_Применить"
@@ -2792,7 +2799,8 @@ msgstr ""
" верхнее: %s %s\n"
" нижнее: %s %s"
#: gtk/gtkpagesetupunixdialog.c:784
#: gtk/gtkpagesetupunixdialog.c:784 gtk/ui/gtkpagesetupunixdialog.ui:5
#: gtk/ui/gtkprintunixdialog.ui:709
msgid "Page Setup"
msgstr "Параметры страницы"
@@ -2912,6 +2920,8 @@ msgstr "Это имя уже занято"
#: gtk/gtkplacessidebar.c:2304 gtk/inspector/actions.ui:19
#: gtk/inspector/css-node-tree.ui:35 gtk/inspector/prop-list.ui:24
#: gtk/ui/gtkfilechooserwidget.ui:168 gtk/ui/gtkfilechooserwidget.ui:440
#: gtk/ui/gtkprintunixdialog.ui:83
msgid "Name"
msgstr "Имя"
@@ -3032,7 +3042,7 @@ msgid "Unable to access location"
msgstr "Не удалось получить доступ к местоположению"
#. Restore from Cancel to Connect
#: gtk/gtkplacesview.c:1228
#: gtk/gtkplacesview.c:1228 gtk/ui/gtkplacesview.ui:262
msgid "Con_nect"
msgstr "_Подключиться"
@@ -3125,7 +3135,8 @@ msgstr[2] "Доступно %s из %s"
msgid "Disconnect"
msgstr "Отключиться"
#: gtk/gtkplacesviewrow.c:471
#: gtk/gtkplacesviewrow.c:471 gtk/ui/gtkplacesviewrow.ui:53
#: gtk/ui/gtksidebarrow.ui:50
msgid "Unmount"
msgstr "Размонтировать"
@@ -3141,7 +3152,8 @@ msgstr "_Запомнить пароль"
msgid "Select a filename"
msgstr "Выберите имя файла"
#: gtk/gtkprinteroptionwidget.c:723
#: gtk/gtkprinteroptionwidget.c:723 gtk/ui/gtkappchooserdialog.ui:50
#: gtk/ui/gtkcolorchooserdialog.ui:38 gtk/ui/gtkfontchooserdialog.ui:29
msgid "_Select"
msgstr "_Выбрать"
@@ -3475,11 +3487,13 @@ msgstr "Результаты поиска"
msgid "Search Shortcuts"
msgstr "Поиск ярлыков"
#: gtk/gtkshortcutswindow.c:968
#: gtk/gtkshortcutswindow.c:968 gtk/ui/gtkemojichooser.ui:349
#: gtk/ui/gtkfilechooserwidget.ui:297
msgid "No Results Found"
msgstr "Результатов не найдено"
#: gtk/gtkshortcutswindow.c:974
#: gtk/gtkshortcutswindow.c:974 gtk/ui/gtkemojichooser.ui:362
#: gtk/ui/gtkfilechooserwidget.ui:310 gtk/ui/gtkplacesview.ui:230
msgid "Try a different search"
msgstr "Попробуйте другой поисковый запрос"
@@ -3788,7 +3802,7 @@ msgstr "ID Приложения"
msgid "Resource Path"
msgstr "Путь к ресурсам"
#: gtk/inspector/general.ui:268
#: gtk/inspector/general.ui:268 gtk/ui/gtkplacesview.ui:79
msgid "Prefix"
msgstr "Префикс"
@@ -3850,7 +3864,7 @@ msgid "Address"
msgstr "Адрес"
#: gtk/inspector/misc-info.ui:62 gtk/inspector/prop-list.ui:35
#: gtk/inspector/statistics.ui:46
#: gtk/inspector/statistics.ui:46 gtk/ui/gtkfilechooserwidget.ui:214
msgid "Type"
msgstr "Тип"
@@ -4082,7 +4096,8 @@ msgstr "Путь"
msgid "Count"
msgstr "Счётчик"
#: gtk/inspector/resource-list.ui:82
#: gtk/inspector/resource-list.ui:82 gtk/ui/gtkfilechooserwidget.ui:202
#: gtk/ui/gtkfontchooserwidget.ui:204 gtk/ui/gtkfontchooserwidget.ui:351
msgid "Size"
msgstr "Размер"
@@ -4334,7 +4349,7 @@ msgstr "Следующий объект того же уровня"
msgid "Miscellaneous"
msgstr "Дополнительно"
#: gtk/inspector/window.ui:407
#: gtk/inspector/window.ui:407 gtk/ui/gtkprintunixdialog.ui:393
msgid "Layout"
msgstr "Размещение"
@@ -6012,6 +6027,30 @@ msgctxt "paper size"
msgid "ROC 8k"
msgstr "ROC 8k"
#: gtk/ui/gtkaboutdialog.ui:62
msgid "About"
msgstr "О программе"
#: gtk/ui/gtkaboutdialog.ui:123
msgid "Credits"
msgstr "Благодарности"
#: gtk/ui/gtkaboutdialog.ui:206
msgid "System"
msgstr "Система"
#: gtk/ui/gtkappchooserdialog.ui:60
msgid "_View All Applications"
msgstr "_Просмотреть все приложения"
#: gtk/ui/gtkappchooserdialog.ui:66
msgid "_Find New Applications"
msgstr "_Найти новые приложения"
#: gtk/ui/gtkappchooserwidget.ui:100
msgid "No applications found."
msgstr "Приложений не найдено."
#: gtk/ui/gtkapplication-quartz.ui:13
msgid "Preferences"
msgstr "Параметры"
@@ -6038,6 +6077,299 @@ msgstr "Показать все"
msgid "Quit %s"
msgstr "Завершить %s"
#: gtk/ui/gtkassistant.ui:64
msgid "_Finish"
msgstr "_Закончить"
#: gtk/ui/gtkassistant.ui:75
msgid "_Back"
msgstr "_Назад"
#: gtk/ui/gtkassistant.ui:86
msgid "_Next"
msgstr "_Далее"
#: gtk/ui/gtkcolorchooserdialog.ui:4
msgid "Select a Color"
msgstr "Выберите цвет"
#: gtk/ui/gtkcoloreditor.ui:43 gtk/ui/gtkcoloreditor.ui:53
msgid "Pick a color from the screen"
msgstr "Выберите цвет на экране"
#: gtk/ui/gtkcoloreditor.ui:80
msgid "Hexadecimal color or color name"
msgstr "Шестнадцатеричный цвет или название цвета"
#: gtk/ui/gtkcoloreditor.ui:95
msgid "Hue"
msgstr "Тон"
#: gtk/ui/gtkcoloreditor.ui:111
msgid "Alpha value"
msgstr "Значение альфа-канала"
#: gtk/ui/gtkcoloreditor.ui:129
msgid "Saturation and value"
msgstr "Насыщенность и значение"
#: gtk/ui/gtkcoloreditor.ui:153
msgctxt "Color channel"
msgid "A"
msgstr "A"
#: gtk/ui/gtkcoloreditor.ui:189
msgctxt "Color channel"
msgid "H"
msgstr "Т"
#: gtk/ui/gtkcoloreditor.ui:226
msgctxt "Color Channel"
msgid "S"
msgstr "Н"
#: gtk/ui/gtkcoloreditor.ui:235
msgctxt "Color Channel"
msgid "V"
msgstr "З"
#: gtk/ui/gtkdropdown.ui:19
msgid "(None)"
msgstr "(Нет)"
#: gtk/ui/gtkdropdown.ui:68
msgid "Search…"
msgstr "Поиск…"
#: gtk/ui/gtkemojichooser.ui:69 gtk/ui/gtkemojichooser.ui:239
msgctxt "emoji category"
msgid "Smileys & People"
msgstr "Смайлики и люди"
#: gtk/ui/gtkemojichooser.ui:94 gtk/ui/gtkemojichooser.ui:248
msgctxt "emoji category"
msgid "Body & Clothing"
msgstr "Фигура и одежда"
#: gtk/ui/gtkemojichooser.ui:119 gtk/ui/gtkemojichooser.ui:257
msgctxt "emoji category"
msgid "Animals & Nature"
msgstr "Животные и природа"
#: gtk/ui/gtkemojichooser.ui:133 gtk/ui/gtkemojichooser.ui:266
msgctxt "emoji category"
msgid "Food & Drink"
msgstr "Еда и напитки"
#: gtk/ui/gtkemojichooser.ui:147 gtk/ui/gtkemojichooser.ui:275
msgctxt "emoji category"
msgid "Travel & Places"
msgstr "Путешествия и места"
#: gtk/ui/gtkemojichooser.ui:161 gtk/ui/gtkemojichooser.ui:284
msgctxt "emoji category"
msgid "Activities"
msgstr "Мероприятия"
#: gtk/ui/gtkemojichooser.ui:175 gtk/ui/gtkemojichooser.ui:293
msgctxt "emoji category"
msgid "Objects"
msgstr "Объекты"
#: gtk/ui/gtkemojichooser.ui:189 gtk/ui/gtkemojichooser.ui:302
msgctxt "emoji category"
msgid "Symbols"
msgstr "Символы"
#: gtk/ui/gtkemojichooser.ui:203 gtk/ui/gtkemojichooser.ui:311
msgctxt "emoji category"
msgid "Flags"
msgstr "Флаги"
#: gtk/ui/gtkemojichooser.ui:230
msgctxt "emoji category"
msgid "Recent"
msgstr "Недавние"
#: gtk/ui/gtkfilechooserwidget.ui:64
msgid "Create Folder"
msgstr "Создать папку"
#: gtk/ui/gtkfilechooserwidget.ui:249
msgid "Remote location — only searching the current folder"
msgstr "Удалённое местоположение — поиск только в текущей папке"
#: gtk/ui/gtkfilechooserwidget.ui:378
msgid "Folder Name"
msgstr "Имя папки"
#: gtk/ui/gtkfilechooserwidget.ui:404
msgid "_Create"
msgstr "_Создать"
#: gtk/ui/gtkfontchooserdialog.ui:4
msgid "Select Font"
msgstr "Выберите шрифт"
#: gtk/ui/gtkfontchooserwidget.ui:64
msgid "Search font name"
msgstr "Поиск имени шрифта"
#: gtk/ui/gtkfontchooserwidget.ui:79
msgid "Filter by"
msgstr "Фильтр по"
#: gtk/ui/gtkfontchooserwidget.ui:89
msgid "Monospace"
msgstr "Моноширинный"
#: gtk/ui/gtkfontchooserwidget.ui:95
msgid "Language"
msgstr "Язык"
#: gtk/ui/gtkfontchooserwidget.ui:188 gtk/ui/gtkfontchooserwidget.ui:324
msgid "Preview text"
msgstr "Предпросмотр текста"
#: gtk/ui/gtkfontchooserwidget.ui:191 gtk/ui/gtkfontchooserwidget.ui:220
msgid "horizontal"
msgstr "горизонтальный"
#: gtk/ui/gtkfontchooserwidget.ui:270
msgid "No Fonts Found"
msgstr "Шрифты не найдены"
#: gtk/ui/gtkpagesetupunixdialog.ui:27
msgid "_Format for:"
msgstr "_Формат для:"
#: gtk/ui/gtkpagesetupunixdialog.ui:51 gtk/ui/gtkprintunixdialog.ui:635
msgid "_Paper size:"
msgstr "_Размер бумаги:"
#: gtk/ui/gtkpagesetupunixdialog.ui:86
msgid "_Orientation:"
msgstr "_Ориентация:"
#: gtk/ui/gtkpagesetupunixdialog.ui:98 gtk/ui/gtkprintunixdialog.ui:675
msgid "Portrait"
msgstr "Портретное"
#: gtk/ui/gtkpagesetupunixdialog.ui:109 gtk/ui/gtkprintunixdialog.ui:677
msgid "Reverse portrait"
msgstr "Обратное портретное"
#: gtk/ui/gtkpagesetupunixdialog.ui:121 gtk/ui/gtkprintunixdialog.ui:676
msgid "Landscape"
msgstr "Ландшафтное"
#: gtk/ui/gtkpagesetupunixdialog.ui:132 gtk/ui/gtkprintunixdialog.ui:678
msgid "Reverse landscape"
msgstr "Обратное ландшафтное"
#: gtk/ui/gtkplacesview.ui:28
msgid "Server Addresses"
msgstr "Адреса серверов"
#: gtk/ui/gtkplacesview.ui:40
msgid ""
"Server addresses are made up of a protocol prefix and an address. Examples:"
msgstr "Адреса серверов состоят из префикса протокола и адреса. Примеры:"
#: gtk/ui/gtkplacesview.ui:66
msgid "Available Protocols"
msgstr "Доступные протоколы"
#. Translators: Server as any successfully connected network address
#: gtk/ui/gtkplacesview.ui:118
msgid "No recent servers found"
msgstr "Недавних серверов нет"
#: gtk/ui/gtkplacesview.ui:141
msgid "Recent Servers"
msgstr "Недавние серверы"
#: gtk/ui/gtkplacesview.ui:221
msgid "No results found"
msgstr "Результатов не найдено"
#: gtk/ui/gtkplacesview.ui:252
msgid "Connect to _Server"
msgstr "Подключиться к _серверу"
#: gtk/ui/gtkplacesview.ui:277
msgid "Enter server address…"
msgstr "Ввести адрес сервера…"
#. this is the header for the printer status column in the print dialog
#: gtk/ui/gtkprintunixdialog.ui:145
msgid "Status"
msgstr "Состояние"
#: gtk/ui/gtkprintunixdialog.ui:199
msgid "Range"
msgstr "Диапазон"
#: gtk/ui/gtkprintunixdialog.ui:212
msgid "_All Pages"
msgstr "_Все страницы"
#: gtk/ui/gtkprintunixdialog.ui:224
msgid "C_urrent Page"
msgstr "Те_кущая страница"
#: gtk/ui/gtkprintunixdialog.ui:237
msgid "Se_lection"
msgstr "Выбор"
#: gtk/ui/gtkprintunixdialog.ui:250
msgid "Pag_es:"
msgstr "Стра_ницы:"
#: gtk/ui/gtkprintunixdialog.ui:251 gtk/ui/gtkprintunixdialog.ui:264
msgid ""
"Specify one or more page ranges,\n"
" e.g. 13, 7, 11"
msgstr ""
"Укажите один или несколько диапазонов страниц,\n"
"например 1-3, 7, 11"
#: gtk/ui/gtkprintunixdialog.ui:287
msgid "Copies"
msgstr "Копии"
#: gtk/ui/gtkprintunixdialog.ui:302
msgid "Copie_s:"
msgstr "Ко_пии:"
#: gtk/ui/gtkprintunixdialog.ui:325
msgid "C_ollate"
msgstr "Сопоставить"
#: gtk/ui/gtkprintunixdialog.ui:336
msgid "_Reverse"
msgstr "_Реверс"
#: gtk/ui/gtkprintunixdialog.ui:366
msgid "General"
msgstr "Общие"
#: gtk/ui/gtkprintunixdialog.ui:408
msgid "T_wo-sided:"
msgstr "С д_вух сторон:"
#: gtk/ui/gtkprintunixdialog.ui:430
msgid "Pages per _side:"
msgstr "Страниц на _сторону:"
#: gtk/ui/gtkprintunixdialog.ui:454
msgid "Page or_dering:"
msgstr "По_рядок страниц:"
#: gtk/ui/gtkprintunixdialog.ui:477
msgid "_Only print:"
msgstr "_Только печать:"
#: gtk/ui/gtkprintunixdialog.ui:493
msgid "All sheets"
msgstr "Все листы"
@@ -6050,21 +6382,115 @@ msgstr "Четные листы"
msgid "Odd sheets"
msgstr "Нечетные листы"
#: gtk/ui/gtkprintunixdialog.ui:675
msgid "Portrait"
msgstr "Портретное"
#: gtk/ui/gtkprintunixdialog.ui:509
msgid "Sc_ale:"
msgstr "М_асштаб:"
#: gtk/ui/gtkprintunixdialog.ui:676
msgid "Landscape"
msgstr "Ландшафтное"
#: gtk/ui/gtkprintunixdialog.ui:554
msgid "Paper"
msgstr "Бумага"
#: gtk/ui/gtkprintunixdialog.ui:677
msgid "Reverse portrait"
msgstr "Обратное портретное"
#: gtk/ui/gtkprintunixdialog.ui:569
msgid "Paper _type:"
msgstr "_Тип бумаги:"
#: gtk/ui/gtkprintunixdialog.ui:678
msgid "Reverse landscape"
msgstr "Обратное ландшафтное"
#: gtk/ui/gtkprintunixdialog.ui:591
msgid "Paper _source:"
msgstr "_Источник бумаги:"
#: gtk/ui/gtkprintunixdialog.ui:613
msgid "Output t_ray:"
msgstr "Ло_ток вывода:"
#: gtk/ui/gtkprintunixdialog.ui:658
msgid "Or_ientation:"
msgstr "Ори_ентация:"
#: gtk/ui/gtkprintunixdialog.ui:732
msgid "Job Details"
msgstr "Детали задания"
#: gtk/ui/gtkprintunixdialog.ui:747
msgid "Pri_ority:"
msgstr "При_оритет:"
#: gtk/ui/gtkprintunixdialog.ui:768
msgid "_Billing info:"
msgstr "_Расположение:"
#: gtk/ui/gtkprintunixdialog.ui:801
msgid "Print Document"
msgstr "Печать документа"
#. this is one of the choices for the print at option in the print dialog
#: gtk/ui/gtkprintunixdialog.ui:814
msgid "_Now"
msgstr "_Сейчас"
#. this is one of the choices for the print at option in the print dialog. It also serves as the label for an entry that allows the user to enter a time.
#: gtk/ui/gtkprintunixdialog.ui:828
msgid "A_t:"
msgstr "_В:"
#. Ability to parse the am/pm format depends on actual locale. You can remove the am/pm values below for your locale if they are not supported.
#: gtk/ui/gtkprintunixdialog.ui:830 gtk/ui/gtkprintunixdialog.ui:832
#: gtk/ui/gtkprintunixdialog.ui:848 gtk/ui/gtkprintunixdialog.ui:850
msgid ""
"Specify the time of print,\n"
" e.g. 1530, 235 pm, 141520, 114630 am, 4 pm"
msgstr ""
"Укажите время печати,\n"
"например, 15:30, 14:35 вечера, 141520, 11∶46∶30 утра, 4 часа дня"
#. this is one of the choices for the print at option in the print dialog. It means that the print job will not be printed until it explicitly gets 'released'.
#: gtk/ui/gtkprintunixdialog.ui:862
msgid "On _hold"
msgstr "В _ожидании"
#: gtk/ui/gtkprintunixdialog.ui:864 gtk/ui/gtkprintunixdialog.ui:865
msgid "Hold the job until it is explicitly released"
msgstr "Удерживает задание до тех пор, пока оно не будет явно освобождено"
#: gtk/ui/gtkprintunixdialog.ui:892
msgid "Add Cover Page"
msgstr "Добавить титульную страницу"
#. this is the label used for the option in the print dialog that controls the front cover page.
#: gtk/ui/gtkprintunixdialog.ui:907
msgid "Be_fore:"
msgstr "Д_о:"
#. this is the label used for the option in the print dialog that controls the back cover page.
#: gtk/ui/gtkprintunixdialog.ui:928
msgid "_After:"
msgstr "_После:"
#: gtk/ui/gtkprintunixdialog.ui:957
msgid "Job"
msgstr "Задание"
#. This will appear as a tab label in the print dialog.
#: gtk/ui/gtkprintunixdialog.ui:987
msgid "Image Quality"
msgstr "Качество изображения"
#. This will appear as a tab label in the print dialog.
#: gtk/ui/gtkprintunixdialog.ui:1016
msgid "Color"
msgstr "Цвет"
#. This will appear as a tab label in the print dialog. It's a typographical term, as in "Binding and finishing"
#: gtk/ui/gtkprintunixdialog.ui:1045
msgid "Finishing"
msgstr "Отделка"
#: gtk/ui/gtkprintunixdialog.ui:1074
msgid "Advanced"
msgstr "Дополнительно"
#: gtk/ui/gtkprintunixdialog.ui:1090
msgid "Some of the settings in the dialog conflict"
msgstr "Некоторые настройки в диалоговом окне конфликтуют"
#: modules/media/gtkffmediafile.c:220
#, c-format
@@ -6979,6 +7405,3 @@ msgstr ""
"Нет индексного файла темы в «%s».\n"
"Если действительно хотите создать здесь кэш значков, используйте --ignore-"
"theme-index.\n"
#~ msgid "The EGL implementation does not support any allowed APIs"
#~ msgstr "Реализация EGL не поддерживает ни одного разрешенного API"
+516 -68
View File
@@ -19,16 +19,16 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
"POT-Creation-Date: 2022-05-15 06:30+0000\n"
"PO-Revision-Date: 2022-05-15 14:13+0300\n"
"POT-Creation-Date: 2022-06-06 22:45+0000\n"
"PO-Revision-Date: 2022-06-10 09:04+0300\n"
"Last-Translator: Emin Tufan Çetin <etcetin@gmail.com>\n"
"Language-Team: Türkçe <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"
"Language: tr\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 2.4.3\n"
"X-Generator: Poedit 3.0.1\n"
#: gdk/broadway/gdkbroadway-server.c:135
#, c-format
@@ -64,7 +64,7 @@ msgid "Cannot provide contents as %s"
msgstr "İçerikler %s olarak sağlanamıyor"
#: gdk/gdkdisplay.c:154
#: gdk/gdkglcontext.c:437
#: gdk/gdkglcontext.c:435
msgid "The current backend does not support OpenGL"
msgstr "Şimdiki arka uç OpenGLi desteklemiyor"
@@ -90,8 +90,6 @@ msgstr "Kusursuz EGL yapılandırması bulunamadı"
#: gdk/gdkdisplay.c:1625
#, c-format
#| msgid "EGL implementation is missing extension %2$s"
#| msgid_plural "EGL implementation is missing %d extensions: %s"
msgid "EGL implementation is missing extension %s"
msgid_plural "EGL implementation is missing %2$d extensions: %1$s"
msgstr[0] "EGL uygulamasında %2$d eksik uzantı: %1$s"
@@ -126,28 +124,29 @@ msgstr "Diğer uygulamalardan sürükle ve bırak desteklenmemektedir."
msgid "No compatible formats to transfer contents."
msgstr "İçerikleri aktarmak için uyumlu biçim yok."
#: gdk/gdkglcontext.c:334
msgid "The EGL implementation does not support any allowed APIs"
msgstr "EGL uygulaması herhangi bir izin verilen APIyi desteklemiyor"
#: gdk/gdkglcontext.c:394
#: gdk/x11/gdkglcontext-glx.c:605
msgid "No GL API allowed."
msgstr "İzin verilen GP API yok."
#: gdk/gdkglcontext.c:415
#: gdk/win32/gdkglcontext-win32-wgl.c:616
#: gdk/x11/gdkglcontext-glx.c:624
#: gdk/gdkglcontext.c:418
#: gdk/win32/gdkglcontext-win32-wgl.c:611
#: gdk/x11/gdkglcontext-glx.c:639
msgid "Unable to create a GL context"
msgstr "GL bağlamı oluşturulamadı"
#: gdk/gdkglcontext.c:1274
#: gdk/gdkglcontext.c:1273
msgid "Anything but OpenGL ES disabled via GDK_DEBUG"
msgstr "Herhangi biri ancak GDK_DEBUG aracılığıyla OpenGL ES devre dışı bırakılmış"
#: gdk/gdkglcontext.c:1283
#: gdk/gdkglcontext.c:1282
#, c-format
msgid "Application does not support %s API"
msgstr "Uygulama %s APIsini desteklemiyor"
#. translators: This is about OpenGL backend names, like
#. * "Trying to use X11 GLX, but EGL is already in use"
#: gdk/gdkglcontext.c:1817
#: gdk/gdkglcontext.c:1822
#, c-format
msgid "Trying to use %s, but %s is already in use"
msgstr "%s kullanılmaya çalışılıyor ancak şu anda %s kullanılıyor"
@@ -721,7 +720,7 @@ msgstr "W32 biçimli 0x%x DnD verisi, %p hedefine dönüştürülürken hata (%s
msgid "No GL implementation is available"
msgstr "Kullanılabilir GL uygulaması yok"
#: gdk/win32/gdkglcontext-win32-wgl.c:582
#: gdk/win32/gdkglcontext-win32-wgl.c:577
msgid "No available configurations for the given pixel format"
msgstr "Verilen piksel biçimi için kullanılabilir yapılandırma yok"
@@ -783,15 +782,15 @@ msgstr "Pano yöneticisi seçimi depolayamadı."
msgid "Cannot store clipboard. No clipboard manager is active."
msgstr "Pano depolanamadı. Aktif pano yöneticisi yok."
#: gdk/x11/gdkglcontext-glx.c:780
#: gdk/x11/gdkglcontext-glx.c:755
msgid "No GLX configurations available"
msgstr "Kullanılabilir GLX yapılandırması yok"
#: gdk/x11/gdkglcontext-glx.c:853
#: gdk/x11/gdkglcontext-glx.c:828
msgid "No GLX configuration with required features found"
msgstr "Gerekli özellikleri olan GLX yapılandırması bulunamadı"
#: gdk/x11/gdkglcontext-glx.c:927
#: gdk/x11/gdkglcontext-glx.c:902
msgid "GLX is not supported"
msgstr "GLX desteklenmiyor"
@@ -826,9 +825,8 @@ msgstr "Desteklenmeyen kodlama “%s”."
#: gsk/gl/gskglrenderer.c:132
#, c-format
#| msgid "The EGL implementation does not support any allowed APIs"
msgid "This GLES %d.%d implementation does not support half-float vertex data"
msgstr "GLES %d.%d uygulaması yarım kayan nokta verisini desteklemiyor"
msgstr "GLES %d.%d uyarlaması yarım kayan nokta verisini desteklemiyor"
#: gtk/a11y/gtkatspiaction.c:239
msgctxt "accessibility"
@@ -957,6 +955,7 @@ msgid "Could not unescape string"
msgstr "Dizge unescape yapılamadı"
#: gtk/gtkaboutdialog.c:124
#: gtk/ui/gtkaboutdialog.ui:163
msgid "License"
msgstr "Lisans"
@@ -1554,6 +1553,7 @@ msgstr "Diğer Uygulama…"
#: gtk/gtkappchooserdialog.c:205
#: gtk/gtkappchooserdialog.c:256
#: gtk/ui/gtkappchooserdialog.ui:4
msgid "Select Application"
msgstr "Uygulama Seç"
@@ -2010,6 +2010,7 @@ msgstr "Yazıcıdan Gelen Kenar Boşlukları…"
#: gtk/gtkcustompaperunixdialog.c:348
#: gtk/gtkmessagedialog.c:162
#: gtk/ui/gtkassistant.ui:40
msgid "_Close"
msgstr "_Kapat"
@@ -2145,6 +2146,10 @@ msgstr "Bu adda dosya zaten var"
#: gtk/gtkwindow.c:6106
#: gtk/inspector/css-editor.c:248
#: gtk/inspector/recorder.c:1721
#: gtk/ui/gtkappchooserdialog.ui:45
#: gtk/ui/gtkassistant.ui:52
#: gtk/ui/gtkcolorchooserdialog.ui:33
#: gtk/ui/gtkfontchooserdialog.ui:24
msgid "_Cancel"
msgstr "_İptal Et"
@@ -2163,6 +2168,7 @@ msgid "_Save"
msgstr "_Kaydet"
#: gtk/gtkfilechoosernativequartz.c:339
#: gtk/ui/gtkfilechooserwidget.ui:346
msgid "Select which types of files are shown"
msgstr "Hangi türdeki dosyaların gösterileceğini seç"
@@ -2236,7 +2242,7 @@ msgstr "Eğer bir öge silerseniz kalıcı olarak kaybolur."
#: gtk/gtkfilechooserwidget.c:1211
#: gtk/gtkfilechooserwidget.c:1827
#: gtk/gtklabel.c:5621
#: gtk/gtklabel.c:5627
#: gtk/gtktext.c:6041
#: gtk/gtktextview.c:8914
msgid "_Delete"
@@ -2269,6 +2275,7 @@ msgstr "Yer İmlerine _Ekle"
#: gtk/gtkfilechooserwidget.c:1823
#: gtk/gtkplacessidebar.c:2310
#: gtk/gtkplacessidebar.c:3249
#: gtk/ui/gtkfilechooserwidget.ui:465
msgid "_Rename"
msgstr "_Yeniden Adlandır"
@@ -2296,8 +2303,11 @@ msgstr "_Saati Göster"
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:2256
#: gtk/inspector/css-node-tree.ui:135
#: gtk/ui/gtkfilechooserwidget.ui:186
#: gtk/ui/gtkprintunixdialog.ui:114
msgid "Location"
msgstr "Konum"
@@ -2322,6 +2332,7 @@ msgstr "Konum ya da URL gir"
#: gtk/gtkfilechooserwidget.c:3811
#: gtk/gtkfilechooserwidget.c:6635
#: gtk/ui/gtkfilechooserwidget.ui:226
msgid "Modified"
msgstr "Değiştirilmiş"
@@ -2523,35 +2534,35 @@ msgstr "Karakter Değişkeleri"
msgid "OpenGL context creation failed"
msgstr "OpenGL içerik oluşturulması başarısız oldu"
#: gtk/gtklabel.c:5618
#: gtk/gtklabel.c:5624
#: gtk/gtktext.c:6029
#: gtk/gtktextview.c:8902
msgid "Cu_t"
msgstr "Ke_s"
#: gtk/gtklabel.c:5619
#: gtk/gtklabel.c:5625
#: gtk/gtktext.c:6033
#: gtk/gtktextview.c:8906
msgid "_Copy"
msgstr "_Kopyala"
#: gtk/gtklabel.c:5620
#: gtk/gtklabel.c:5626
#: gtk/gtktext.c:6037
#: gtk/gtktextview.c:8910
msgid "_Paste"
msgstr "_Yapıştır"
#: gtk/gtklabel.c:5626
#: gtk/gtklabel.c:5632
#: gtk/gtktext.c:6050
#: gtk/gtktextview.c:8935
msgid "Select _All"
msgstr "_Tümünü Seç"
#: gtk/gtklabel.c:5631
#: gtk/gtklabel.c:5637
msgid "_Open Link"
msgstr "Bağlantı _Aç"
#: gtk/gtklabel.c:5635
#: gtk/gtklabel.c:5641
msgid "Copy _Link Address"
msgstr "_Bağlantı Adresini Kopyala"
@@ -2564,10 +2575,12 @@ msgid "Invalid URI"
msgstr "Geçersiz URI"
#: gtk/gtklockbutton.c:285
#: gtk/ui/gtklockbutton.ui:20
msgid "Lock"
msgstr "Kilitle"
#: gtk/gtklockbutton.c:297
#: gtk/ui/gtklockbutton.ui:26
msgid "Unlock"
msgstr "Kilidi Kaldır"
@@ -2600,7 +2613,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:775
#: gtk/gtkmain.c:786
msgid "default:LTR"
msgstr "default:LTR"
@@ -2806,6 +2819,7 @@ msgid "Manage Custom Sizes…"
msgstr "Özel Boyutları Yönet…"
#: gtk/gtkpagesetupunixdialog.c:284
#: gtk/ui/gtkassistant.ui:98
msgid "_Apply"
msgstr "_Uygula"
@@ -2834,6 +2848,8 @@ msgstr ""
" Alt: %s %s"
#: gtk/gtkpagesetupunixdialog.c:784
#: gtk/ui/gtkpagesetupunixdialog.ui:5
#: gtk/ui/gtkprintunixdialog.ui:709
msgid "Page Setup"
msgstr "Sayfa Ayarı"
@@ -2958,6 +2974,9 @@ msgstr "Bu ad zaten kullanılıyor"
#: gtk/inspector/actions.ui:19
#: gtk/inspector/css-node-tree.ui:35
#: gtk/inspector/prop-list.ui:24
#: gtk/ui/gtkfilechooserwidget.ui:168
#: gtk/ui/gtkfilechooserwidget.ui:440
#: gtk/ui/gtkprintunixdialog.ui:83
msgid "Name"
msgstr "Ad"
@@ -3086,6 +3105,7 @@ msgstr "Konuma erişilemedi"
#. Restore from Cancel to Connect
#: gtk/gtkplacesview.c:1228
#: gtk/ui/gtkplacesview.ui:262
msgid "Con_nect"
msgstr "Ba_ğlan"
@@ -3175,6 +3195,8 @@ msgid "Disconnect"
msgstr "Bağlantıyı Kes"
#: gtk/gtkplacesviewrow.c:471
#: gtk/ui/gtkplacesviewrow.ui:53
#: gtk/ui/gtksidebarrow.ui:50
msgid "Unmount"
msgstr "Bağı Kaldır"
@@ -3191,6 +3213,9 @@ msgid "Select a filename"
msgstr "Dosya adı seç"
#: gtk/gtkprinteroptionwidget.c:723
#: gtk/ui/gtkappchooserdialog.ui:50
#: gtk/ui/gtkcolorchooserdialog.ui:38
#: gtk/ui/gtkfontchooserdialog.ui:29
msgid "_Select"
msgstr "_Seç"
@@ -3534,10 +3559,15 @@ msgid "Search Shortcuts"
msgstr "Arama Kısayolları"
#: gtk/gtkshortcutswindow.c:968
#: gtk/ui/gtkemojichooser.ui:349
#: gtk/ui/gtkfilechooserwidget.ui:297
msgid "No Results Found"
msgstr "Hiçbir Sonuç Bulunamadı"
#: gtk/gtkshortcutswindow.c:974
#: gtk/ui/gtkemojichooser.ui:362
#: gtk/ui/gtkfilechooserwidget.ui:310
#: gtk/ui/gtkplacesview.ui:230
msgid "Try a different search"
msgstr "Başka arama deneyin"
@@ -3851,6 +3881,7 @@ msgid "Resource Path"
msgstr "Kaynak Yolu"
#: gtk/inspector/general.ui:268
#: gtk/ui/gtkplacesview.ui:79
msgid "Prefix"
msgstr "Ön Ek"
@@ -3914,6 +3945,7 @@ msgstr "Adres"
#: gtk/inspector/misc-info.ui:62
#: gtk/inspector/prop-list.ui:35
#: gtk/inspector/statistics.ui:46
#: gtk/ui/gtkfilechooserwidget.ui:214
msgid "Type"
msgstr "Tür"
@@ -4149,6 +4181,9 @@ msgid "Count"
msgstr "Say"
#: gtk/inspector/resource-list.ui:82
#: gtk/ui/gtkfilechooserwidget.ui:202
#: gtk/ui/gtkfontchooserwidget.ui:204
#: gtk/ui/gtkfontchooserwidget.ui:351
msgid "Size"
msgstr "Boyut"
@@ -4403,6 +4438,7 @@ msgid "Miscellaneous"
msgstr "Diğer"
#: gtk/inspector/window.ui:407
#: gtk/ui/gtkprintunixdialog.ui:393
msgid "Layout"
msgstr "Düzen"
@@ -6081,6 +6117,30 @@ msgctxt "paper size"
msgid "ROC 8k"
msgstr "ROC 8k"
#: gtk/ui/gtkaboutdialog.ui:62
msgid "About"
msgstr "Hakkında"
#: gtk/ui/gtkaboutdialog.ui:123
msgid "Credits"
msgstr "Geliştirenler"
#: gtk/ui/gtkaboutdialog.ui:206
msgid "System"
msgstr "Sistem"
#: gtk/ui/gtkappchooserdialog.ui:60
msgid "_View All Applications"
msgstr "Tüm Uygulamaları _Görüntüle"
#: gtk/ui/gtkappchooserdialog.ui:66
msgid "_Find New Applications"
msgstr "Yeni Uygulamalar _Bul"
#: gtk/ui/gtkappchooserwidget.ui:100
msgid "No applications found."
msgstr "Uygulama bulunamadı."
#: gtk/ui/gtkapplication-quartz.ui:13
msgid "Preferences"
msgstr "Tercihler"
@@ -6107,6 +6167,316 @@ msgstr "Tümünü Göster"
msgid "Quit %s"
msgstr "Çık %s"
#: gtk/ui/gtkassistant.ui:64
msgid "_Finish"
msgstr "_Bitir"
#: gtk/ui/gtkassistant.ui:75
msgid "_Back"
msgstr "_Geri"
#: gtk/ui/gtkassistant.ui:86
msgid "_Next"
msgstr "_Sonraki"
#: gtk/ui/gtkcolorchooserdialog.ui:4
msgid "Select a Color"
msgstr "Renk Seç"
#: gtk/ui/gtkcoloreditor.ui:43
#: gtk/ui/gtkcoloreditor.ui:53
msgid "Pick a color from the screen"
msgstr "Ekrandan renk seç"
#: gtk/ui/gtkcoloreditor.ui:80
msgid "Hexadecimal color or color name"
msgstr "Onaltılık renk veya renk adı"
#: gtk/ui/gtkcoloreditor.ui:95
msgid "Hue"
msgstr "Ton"
#: gtk/ui/gtkcoloreditor.ui:111
msgid "Alpha value"
msgstr "Alfa değeri"
#: gtk/ui/gtkcoloreditor.ui:129
msgid "Saturation and value"
msgstr "Doygunluk ve değer"
#: gtk/ui/gtkcoloreditor.ui:153
msgctxt "Color channel"
msgid "A"
msgstr "A"
#: gtk/ui/gtkcoloreditor.ui:189
msgctxt "Color channel"
msgid "H"
msgstr "H"
#: gtk/ui/gtkcoloreditor.ui:226
msgctxt "Color Channel"
msgid "S"
msgstr "S"
#: gtk/ui/gtkcoloreditor.ui:235
msgctxt "Color Channel"
msgid "V"
msgstr "V"
#: gtk/ui/gtkdropdown.ui:19
msgid "(None)"
msgstr "(Yok)"
#: gtk/ui/gtkdropdown.ui:68
msgid "Search…"
msgstr "Arama…"
#: gtk/ui/gtkemojichooser.ui:69
#: gtk/ui/gtkemojichooser.ui:239
msgctxt "emoji category"
msgid "Smileys & People"
msgstr "Gülen Yüzler ve İnsanlar"
#: gtk/ui/gtkemojichooser.ui:94
#: gtk/ui/gtkemojichooser.ui:248
msgctxt "emoji category"
msgid "Body & Clothing"
msgstr "Vücut ve Giyim"
#: gtk/ui/gtkemojichooser.ui:119
#: gtk/ui/gtkemojichooser.ui:257
msgctxt "emoji category"
msgid "Animals & Nature"
msgstr "Hayvanlar ve Doğa"
#: gtk/ui/gtkemojichooser.ui:133
#: gtk/ui/gtkemojichooser.ui:266
msgctxt "emoji category"
msgid "Food & Drink"
msgstr "Yeme ve İçme"
#: gtk/ui/gtkemojichooser.ui:147
#: gtk/ui/gtkemojichooser.ui:275
msgctxt "emoji category"
msgid "Travel & Places"
msgstr "Seyahat ve Yerler"
#: gtk/ui/gtkemojichooser.ui:161
#: gtk/ui/gtkemojichooser.ui:284
msgctxt "emoji category"
msgid "Activities"
msgstr "Etkinlikler"
#: gtk/ui/gtkemojichooser.ui:175
#: gtk/ui/gtkemojichooser.ui:293
msgctxt "emoji category"
msgid "Objects"
msgstr "Nesneler"
#: gtk/ui/gtkemojichooser.ui:189
#: gtk/ui/gtkemojichooser.ui:302
msgctxt "emoji category"
msgid "Symbols"
msgstr "Simgeler"
#: gtk/ui/gtkemojichooser.ui:203
#: gtk/ui/gtkemojichooser.ui:311
msgctxt "emoji category"
msgid "Flags"
msgstr "Bayraklar"
#: gtk/ui/gtkemojichooser.ui:230
msgctxt "emoji category"
msgid "Recent"
msgstr "Son"
#: gtk/ui/gtkfilechooserwidget.ui:64
msgid "Create Folder"
msgstr "Klasör Oluştur"
#: gtk/ui/gtkfilechooserwidget.ui:249
msgid "Remote location — only searching the current folder"
msgstr "Uzak konum — yalnızca şimdiki klasörde aranıyor"
#: gtk/ui/gtkfilechooserwidget.ui:378
msgid "Folder Name"
msgstr "Klasör Adı"
#: gtk/ui/gtkfilechooserwidget.ui:404
msgid "_Create"
msgstr "_Oluştur"
#: gtk/ui/gtkfontchooserdialog.ui:4
msgid "Select Font"
msgstr "Yazı Tipi Seç"
#: gtk/ui/gtkfontchooserwidget.ui:64
msgid "Search font name"
msgstr "Yazı tipi adı ara"
#: gtk/ui/gtkfontchooserwidget.ui:79
msgid "Filter by"
msgstr "_Süzgeç"
#: gtk/ui/gtkfontchooserwidget.ui:89
msgid "Monospace"
msgstr "Eş aralıklı"
#: gtk/ui/gtkfontchooserwidget.ui:95
msgid "Language"
msgstr "Dil"
#: gtk/ui/gtkfontchooserwidget.ui:188
#: gtk/ui/gtkfontchooserwidget.ui:324
msgid "Preview text"
msgstr "Metni ön izle"
#: gtk/ui/gtkfontchooserwidget.ui:191
#: gtk/ui/gtkfontchooserwidget.ui:220
msgid "horizontal"
msgstr "yatay"
#: gtk/ui/gtkfontchooserwidget.ui:270
msgid "No Fonts Found"
msgstr "Yazı Tipi Bulunamadı"
#: gtk/ui/gtkpagesetupunixdialog.ui:27
msgid "_Format for:"
msgstr "_Biçimlenecek:"
#: gtk/ui/gtkpagesetupunixdialog.ui:51
#: gtk/ui/gtkprintunixdialog.ui:635
msgid "_Paper size:"
msgstr "_Kağıt boyutu:"
#: gtk/ui/gtkpagesetupunixdialog.ui:86
msgid "_Orientation:"
msgstr "_Yön:"
#: gtk/ui/gtkpagesetupunixdialog.ui:98
#: gtk/ui/gtkprintunixdialog.ui:675
msgid "Portrait"
msgstr "Dikey"
#: gtk/ui/gtkpagesetupunixdialog.ui:109
#: gtk/ui/gtkprintunixdialog.ui:677
msgid "Reverse portrait"
msgstr "Ters dikey"
#: gtk/ui/gtkpagesetupunixdialog.ui:121
#: gtk/ui/gtkprintunixdialog.ui:676
msgid "Landscape"
msgstr "Yatay"
#: gtk/ui/gtkpagesetupunixdialog.ui:132
#: gtk/ui/gtkprintunixdialog.ui:678
msgid "Reverse landscape"
msgstr "Ters yatay"
#: gtk/ui/gtkplacesview.ui:28
msgid "Server Addresses"
msgstr "Sunucu Adresleri"
#: gtk/ui/gtkplacesview.ui:40
msgid "Server addresses are made up of a protocol prefix and an address. Examples:"
msgstr "Sunucu adresleri, iletişim kuralı ön ekinden ve adresten oluşur. Örneğin:"
#: gtk/ui/gtkplacesview.ui:66
msgid "Available Protocols"
msgstr "Uygun İletişim Kuralları"
#. Translators: Server as any successfully connected network address
#: gtk/ui/gtkplacesview.ui:118
msgid "No recent servers found"
msgstr "Son kullanılan sunucu bulunamadı"
#: gtk/ui/gtkplacesview.ui:141
msgid "Recent Servers"
msgstr "Son Kullanılan Sunucular"
#: gtk/ui/gtkplacesview.ui:221
msgid "No results found"
msgstr "Sonuç bulunamadı"
#: gtk/ui/gtkplacesview.ui:252
msgid "Connect to _Server"
msgstr "_Sunucuya Bağlan"
#: gtk/ui/gtkplacesview.ui:277
msgid "Enter server address…"
msgstr "Sunucu adresi gir…"
#. this is the header for the printer status column in the print dialog
#: gtk/ui/gtkprintunixdialog.ui:145
msgid "Status"
msgstr "Durum"
#: gtk/ui/gtkprintunixdialog.ui:199
msgid "Range"
msgstr "Erim"
#: gtk/ui/gtkprintunixdialog.ui:212
msgid "_All Pages"
msgstr "_Tüm Kağıtlar"
#: gtk/ui/gtkprintunixdialog.ui:224
msgid "C_urrent Page"
msgstr "_Geçerli Sayfa"
#: gtk/ui/gtkprintunixdialog.ui:237
msgid "Se_lection"
msgstr "Se_çim"
#: gtk/ui/gtkprintunixdialog.ui:250
msgid "Pag_es:"
msgstr "Sayfa_lar:"
#: gtk/ui/gtkprintunixdialog.ui:251
#: gtk/ui/gtkprintunixdialog.ui:264
msgid ""
"Specify one or more page ranges,\n"
" e.g. 13, 7, 11"
msgstr ""
"Bir veya daha çok sayfa aralığı belirt,\n"
" örn. 1-3, 7, 11"
#: gtk/ui/gtkprintunixdialog.ui:287
msgid "Copies"
msgstr "Kopyalar"
#: gtk/ui/gtkprintunixdialog.ui:302
msgid "Copie_s:"
msgstr "Kopya_lar:"
#: gtk/ui/gtkprintunixdialog.ui:325
msgid "C_ollate"
msgstr "_Harmanla"
#: gtk/ui/gtkprintunixdialog.ui:336
msgid "_Reverse"
msgstr "_Tersine"
#: gtk/ui/gtkprintunixdialog.ui:366
msgid "General"
msgstr "Genel"
#: gtk/ui/gtkprintunixdialog.ui:408
msgid "T_wo-sided:"
msgstr "İ_ki taraflı:"
#: gtk/ui/gtkprintunixdialog.ui:430
msgid "Pages per _side:"
msgstr "Yüz başına _sayfalar:"
#: gtk/ui/gtkprintunixdialog.ui:454
msgid "Page or_dering:"
msgstr "Sayfa sı_ralaması:"
#: gtk/ui/gtkprintunixdialog.ui:477
msgid "_Only print:"
msgstr "_Yalnızca yazdır:"
#: gtk/ui/gtkprintunixdialog.ui:493
msgid "All sheets"
msgstr "Tüm kağıtlar"
@@ -6119,21 +6489,118 @@ msgstr "Çift kağıtlar"
msgid "Odd sheets"
msgstr "Tek kağıtlar"
#: gtk/ui/gtkprintunixdialog.ui:675
msgid "Portrait"
msgstr "Dikey"
#: gtk/ui/gtkprintunixdialog.ui:509
msgid "Sc_ale:"
msgstr "Ö_lçek:"
#: gtk/ui/gtkprintunixdialog.ui:676
msgid "Landscape"
msgstr "Yatay"
#: gtk/ui/gtkprintunixdialog.ui:554
msgid "Paper"
msgstr "Kağıt"
#: gtk/ui/gtkprintunixdialog.ui:677
msgid "Reverse portrait"
msgstr "Ters dikey"
#: gtk/ui/gtkprintunixdialog.ui:569
msgid "Paper _type:"
msgstr "Kağıt _türü:"
#: gtk/ui/gtkprintunixdialog.ui:678
msgid "Reverse landscape"
msgstr "Ters yatay"
#: gtk/ui/gtkprintunixdialog.ui:591
msgid "Paper _source:"
msgstr "Kağıt _kaynağı:"
#: gtk/ui/gtkprintunixdialog.ui:613
msgid "Output t_ray:"
msgstr "Çıktı t_epsisi:"
#: gtk/ui/gtkprintunixdialog.ui:658
msgid "Or_ientation:"
msgstr "_Yön:"
#: gtk/ui/gtkprintunixdialog.ui:732
msgid "Job Details"
msgstr "Görev Ayrıntıları"
#: gtk/ui/gtkprintunixdialog.ui:747
msgid "Pri_ority:"
msgstr "Ö_ncelik:"
#: gtk/ui/gtkprintunixdialog.ui:768
msgid "_Billing info:"
msgstr "_Fatura bilgileri:"
#: gtk/ui/gtkprintunixdialog.ui:801
msgid "Print Document"
msgstr "Belgeyi Yazdır"
#. this is one of the choices for the print at option in the print dialog
#: gtk/ui/gtkprintunixdialog.ui:814
msgid "_Now"
msgstr "_Şimdi"
#. this is one of the choices for the print at option in the print dialog. It also serves as the label for an entry that allows the user to enter a time.
#: gtk/ui/gtkprintunixdialog.ui:828
msgid "A_t:"
msgstr "Z_aman:"
#. Ability to parse the am/pm format depends on actual locale. You can remove the am/pm values below for your locale if they are not supported.
#: gtk/ui/gtkprintunixdialog.ui:830
#: gtk/ui/gtkprintunixdialog.ui:832
#: gtk/ui/gtkprintunixdialog.ui:848
#: gtk/ui/gtkprintunixdialog.ui:850
msgid ""
"Specify the time of print,\n"
" e.g. 1530, 235 pm, 141520, 114630 am, 4 pm"
msgstr ""
"Yazdırma zamanını belirt,\n"
" örn. 15:30, 2:35, 14:15:20, 11:46:30, 4"
#. this is one of the choices for the print at option in the print dialog. It means that the print job will not be printed until it explicitly gets 'released'.
#: gtk/ui/gtkprintunixdialog.ui:862
msgid "On _hold"
msgstr "_Beklemede"
#: gtk/ui/gtkprintunixdialog.ui:864
#: gtk/ui/gtkprintunixdialog.ui:865
msgid "Hold the job until it is explicitly released"
msgstr "Özellikle bırakılmadıkça görevi tut"
#: gtk/ui/gtkprintunixdialog.ui:892
msgid "Add Cover Page"
msgstr "Kapak Sayfası Ekle"
#. this is the label used for the option in the print dialog that controls the front cover page.
#: gtk/ui/gtkprintunixdialog.ui:907
msgid "Be_fore:"
msgstr "Ö_nce:"
#. this is the label used for the option in the print dialog that controls the back cover page.
#: gtk/ui/gtkprintunixdialog.ui:928
msgid "_After:"
msgstr "_Sonra"
#: gtk/ui/gtkprintunixdialog.ui:957
msgid "Job"
msgstr "Görev"
#. This will appear as a tab label in the print dialog.
#: gtk/ui/gtkprintunixdialog.ui:987
msgid "Image Quality"
msgstr "Görüntü Niteliği"
#. This will appear as a tab label in the print dialog.
#: gtk/ui/gtkprintunixdialog.ui:1016
msgid "Color"
msgstr "Renk"
#. This will appear as a tab label in the print dialog. It's a typographical term, as in "Binding and finishing"
#: gtk/ui/gtkprintunixdialog.ui:1045
msgid "Finishing"
msgstr "Bitiriliyor"
#: gtk/ui/gtkprintunixdialog.ui:1074
msgid "Advanced"
msgstr "Gelişmiş"
#: gtk/ui/gtkprintunixdialog.ui:1090
msgid "Some of the settings in the dialog conflict"
msgstr "Penceredeki kimi ayarlar çakışıyor"
#: modules/media/gtkffmediafile.c:220
#, c-format
@@ -6755,25 +7222,6 @@ msgstr "Akış kapatılamadı"
#: tools/gtk-builder-tool.c:36
#, c-format
#| msgid ""
#| "Usage:\n"
#| " gtk-builder-tool [COMMAND] [OPTION…] FILE\n"
#| "\n"
#| "Commands:\n"
#| " validate Validate the file\n"
#| " simplify Simplify the file\n"
#| " enumerate List all named objects\n"
#| " preview Preview the file\n"
#| "\n"
#| "Simplify Options:\n"
#| " --replace Replace the file\n"
#| " --3to4 Convert from GTK 3 to GTK 4\n"
#| "\n"
#| "Preview Options:\n"
#| " --id=ID Preview only the named object\n"
#| " --css=FILE Use style from CSS file\n"
#| "\n"
#| "Perform various tasks on GtkBuilder .ui files.\n"
msgid ""
"Usage:\n"
" gtk-builder-tool [COMMAND] [OPTION…] FILE\n"
@@ -6791,13 +7239,13 @@ msgstr ""
"Kullanım:\n"
" gtk-builder-tool [KOMUT] [SEÇENEK…] DOSYA\n"
"\n"
"GtkBuilder .ui dosyalarında türlü görevler gerçekleştir. \n"
"GtkBuilder .ui dosyalarında türlü görevler uygular.\n"
"\n"
"Komutlar:\n"
" validate Dosyayı doğrula\n"
" simplify Dosyayı yalınlaştır\n"
" simplify Dosyayı basitleştir\n"
" enumerate Tüm adlandırılan nesneleri listele\n"
" preview Dosyayı ön izle\n"
" preview Dosyayı ön izle\n"
" screenshot Dosyanın ekran görüntüsünü al\n"
"\n"
@@ -6825,7 +7273,6 @@ msgid "Use style from CSS file"
msgstr "CSS dosyasından biçem kullan"
#: tools/gtk-builder-tool-preview.c:195
#| msgid "Preview text"
msgid "Preview the file."
msgstr "Dosyayı ön izle."
@@ -6838,9 +7285,8 @@ msgid "Save as node file instead of png"
msgstr "Png yerine düğüm dosyası olarak kaydet"
#: tools/gtk-builder-tool-screenshot.c:361
#| msgid "Overwrite an existing cache, even if up to date"
msgid "Overwrite existing file"
msgstr "Var olan dosyanın üzerine yaz"
msgstr "Var olan dosyanın üstüne yaz"
#: tools/gtk-builder-tool-screenshot.c:377
msgid "Take a screenshot of the file."
@@ -6883,7 +7329,6 @@ msgid "Failed to write %s: “%s”\n"
msgstr "%s yazılamadı: “%s”\n"
#: tools/gtk-builder-tool-simplify.c:2358
#| msgid "Recent files"
msgid "Replace the file"
msgstr "Dosyayı değiştir"
@@ -7075,5 +7520,8 @@ msgstr ""
"“%s” içinde tema dizin dosyası yok.\n"
"Eğer burada gerçekten bir simge önbelleği oluşturmak istiyorsanız, --ignore-theme-indexʼi kullanın.\n"
#~ msgid "The EGL implementation does not support any allowed APIs"
#~ msgstr "EGL uygulaması herhangi bir izin verilen APIyi desteklemiyor"
#~ msgid "Failed to parse png image"
#~ msgstr "PNG resmi ayrıştırılırken hata"
+29 -20
View File
@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
"POT-Creation-Date: 2022-06-06 22:45+0000\n"
"PO-Revision-Date: 2022-06-07 09:15+0300\n"
"POT-Creation-Date: 2022-06-22 18:25+0000\n"
"PO-Revision-Date: 2022-06-22 22:03+0300\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
"Language: uk\n"
@@ -102,7 +102,8 @@ msgstr "Не вдалося ініціалізувати дисплей EGL"
#: gdk/gdkdisplay.c:1690
#, c-format
msgid "EGL version %d.%d is too old. GTK requires %d.%d"
msgstr "Версія EGL %d.%d є надто давньою. Для роботи GTK потрібна версія %d.%d"
msgstr ""
"Версія EGL %d.%d є надто давньою. Для роботи GTK потрібна версія %d.%d"
#: gdk/gdkdrop.c:130
msgid "Dragndrop from other applications is not supported."
@@ -587,7 +588,8 @@ msgstr ""
#: gdk/win32/gdkclipdrop-win32.c:731
#, c-format
msgid "Cannot claim clipboard ownership. Another process claimed it before us."
msgid ""
"Cannot claim clipboard ownership. Another process claimed it before us."
msgstr ""
"Не вдалося отримати буфер обміну у власність. Інший процес пов'язав його із "
"собою до нас."
@@ -614,7 +616,8 @@ msgstr ""
#: gdk/win32/gdkclipdrop-win32.c:810 gdk/win32/gdkclipdrop-win32.c:841
#, c-format
msgid "Cannot set clipboard data. Another process claimed clipboard ownership."
msgid ""
"Cannot set clipboard data. Another process claimed clipboard ownership."
msgstr ""
"Не вдалося встановити дані буфера обміну. Інший процес пов'язав його із "
"собою до нас."
@@ -2135,8 +2138,8 @@ msgstr "Файл з такою назвою вже існує"
#: gtk/gtkmountoperation.c:604 gtk/gtkpagesetupunixdialog.c:283
#: gtk/gtkprintbackend.c:640 gtk/gtkprinteroptionwidget.c:722
#: gtk/gtkprintunixdialog.c:651 gtk/gtkprintunixdialog.c:807
#: gtk/gtkwindow.c:6106 gtk/inspector/css-editor.c:248
#: gtk/inspector/recorder.c:1721 gtk/ui/gtkappchooserdialog.ui:45
#: gtk/gtkwindow.c:6110 gtk/inspector/css-editor.c:248
#: gtk/inspector/recorder.c:1723 gtk/ui/gtkappchooserdialog.ui:45
#: gtk/ui/gtkassistant.ui:52 gtk/ui/gtkcolorchooserdialog.ui:33
#: gtk/ui/gtkfontchooserdialog.ui:24
msgid "_Cancel"
@@ -2149,7 +2152,7 @@ msgid "_Open"
msgstr "_Відкрити"
#: gtk/gtkfilechoosernative.c:574 gtk/inspector/css-editor.c:249
#: gtk/inspector/recorder.c:1722
#: gtk/inspector/recorder.c:1724
msgid "_Save"
msgstr "З_берегти"
@@ -2622,7 +2625,7 @@ msgid "%d:%02d"
msgstr "%d:%02d"
#: gtk/gtkmessagedialog.c:158 gtk/gtkmessagedialog.c:176
#: gtk/gtkprintbackend.c:641 gtk/gtkwindow.c:6107
#: gtk/gtkprintbackend.c:641 gtk/gtkwindow.c:6111
msgid "_OK"
msgstr "_Гаразд"
@@ -3232,7 +3235,8 @@ msgstr "Помилка при створенні перегляду"
#: gtk/gtkprintoperation.c:2888
#, c-format
msgid "The most probable reason is that a temporary file could not be created."
msgid ""
"The most probable reason is that a temporary file could not be created."
msgstr "Найімовірніша причина: не вдалось створити тимчасовий файл."
#. window
@@ -3530,12 +3534,12 @@ msgctxt "volume percentage"
msgid "%d%%"
msgstr "%d%%"
#: gtk/gtkwindow.c:6094
#: gtk/gtkwindow.c:6098
#, c-format
msgid "Do you want to use GTK Inspector?"
msgstr "Бажаєте використовувати інспектор GTK?"
#: gtk/gtkwindow.c:6096
#: gtk/gtkwindow.c:6100
#, c-format
msgid ""
"GTK Inspector is an interactive debugger that lets you explore and modify "
@@ -3546,7 +3550,7 @@ msgstr ""
"редагувати внутрішні частини будь-які програми GTK. Його використання може "
"спричинити збої в програмі."
#: gtk/gtkwindow.c:6101
#: gtk/gtkwindow.c:6105
msgid "Dont show this message again"
msgstr "Не показувати це повідомлення надалі"
@@ -4041,7 +4045,7 @@ msgstr "Джерело:"
msgid "Defined At"
msgstr "Визначено в"
#: gtk/inspector/recorder.c:1692
#: gtk/inspector/recorder.c:1694
#, c-format
msgid "Saving RenderNode failed"
msgstr "Не вдалося зберегти RenderNode"
@@ -4175,15 +4179,15 @@ msgstr "Ієрархія"
msgid "Implements"
msgstr "Реалізує"
#: gtk/inspector/visual.c:603 gtk/inspector/visual.c:622
#: gtk/inspector/visual.c:604 gtk/inspector/visual.c:623
msgid "Theme is hardcoded by GTK_THEME"
msgstr "Тему пришито через GTK_THEME"
#: gtk/inspector/visual.c:853
#: gtk/inspector/visual.c:854
msgid "Backend does not support window scaling"
msgstr "Модуль не підтримує масштабування вікна"
#: gtk/inspector/visual.c:1043
#: gtk/inspector/visual.c:1044
msgid "GL rendering is disabled"
msgstr "Відтворення GL вимкнено"
@@ -4283,6 +4287,10 @@ msgstr "Емулювати сенсорну панель"
msgid "Software GL"
msgstr "Програмний GL"
#: gtk/inspector/visual.ui:714
msgid "Inspect Inspector"
msgstr "Ревізувати Інспектор"
#: gtk/inspector/window.ui:27
msgid "Select an Object"
msgstr "Вибрати об'єкт"
@@ -6218,7 +6226,6 @@ msgid "Language"
msgstr "Мова"
#: gtk/ui/gtkfontchooserwidget.ui:188 gtk/ui/gtkfontchooserwidget.ui:324
#| msgid "Pre_view"
msgid "Preview text"
msgstr "Перегляд тексту"
@@ -6265,7 +6272,8 @@ msgstr "Серверні адреси"
#: gtk/ui/gtkplacesview.ui:40
msgid ""
"Server addresses are made up of a protocol prefix and an address. Examples:"
msgstr "Серверні адреси складаються з префіксу протоколу та адреси. Наприклад:"
msgstr ""
"Серверні адреси складаються з префіксу протоколу та адреси. Наприклад:"
#: gtk/ui/gtkplacesview.ui:66
msgid "Available Protocols"
@@ -6573,7 +6581,8 @@ msgstr "Щоб надрукувати документ «%s», потрібно
#: modules/printbackends/gtkprintbackendcups.c:1490
#, c-format
msgid "Authentication is required to print this document on printer %s"
msgstr "Для друкування документа на принтері %s потрібно пройти автентифікацію"
msgstr ""
"Для друкування документа на принтері %s потрібно пройти автентифікацію"
#: modules/printbackends/gtkprintbackendcups.c:1492
msgid "Authentication is required to print this document"
+12 -15
View File
@@ -200,7 +200,7 @@ row_data_bind (RowData *data,
row_data_update_info (data, info);
gtk_label_set_label (GTK_LABEL (data->name), g_file_info_get_display_name (info));
gtk_inscription_set_text (GTK_LABEL (data->name), g_file_info_get_display_name (info));
g_object_unref (info);
}
@@ -237,10 +237,10 @@ setup_widget (GtkListItem *list_item,
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
gtk_container_add (GTK_CONTAINER (list_item), box);
child = gtk_label_new (NULL);
gtk_label_set_width_chars (GTK_LABEL (child), 5);
gtk_label_set_xalign (GTK_LABEL (child), 1.0);
g_object_bind_property (list_item, "position", child, "label", G_BINDING_SYNC_CREATE);
child = gtk_inscription_new (NULL);
gtk_inscription_set_min_chars (GTK_LABEL (child), 5);
gtk_inscription_set_xalign (GTK_LABEL (child), 1.0);
g_object_bind_property (list_item, "position", child, "text", G_BINDING_SYNC_CREATE);
gtk_container_add (GTK_CONTAINER (box), child);
data->expander = gtk_tree_expander_new ();
@@ -252,9 +252,8 @@ setup_widget (GtkListItem *list_item,
data->icon = gtk_image_new ();
gtk_container_add (GTK_CONTAINER (box), data->icon);
data->name = gtk_label_new (NULL);
gtk_label_set_max_width_chars (GTK_LABEL (data->name), 25);
gtk_label_set_ellipsize (GTK_LABEL (data->name), PANGO_ELLIPSIZE_END);
data->name = gtk_inscription_new (NULL);
gtk_inscription_set_nat_chars (GTK_LABEL (data->name), 25);
gtk_container_add (GTK_CONTAINER (box), data->name);
}
#endif
@@ -441,10 +440,8 @@ const char *ui_file =
" </object>\n"
" </child>\n"
" <child>\n"
" <object class='GtkLabel'>\n"
" <property name='halign'>start</property>\n"
" <property name='label'>start</property>\n"
" <binding name='label'>\n"
" <object class='GtkInscription'>\n"
" <binding name='text'>\n"
" <closure type='gchararray' function='get_string'>\n"
" <lookup name='item'>expander</lookup>\n"
" <constant type='gchararray'>standard::display-name</constant>"
@@ -480,9 +477,8 @@ const char *ui_file =
"<interface>\n" \
" <template class='GtkListItem'>\n" \
" <property name='child'>\n" \
" <object class='GtkLabel'>\n" \
" <property name='halign'>start</property>\n" \
" <binding name='label'>\n" \
" <object class='GtkInscription'>\n" \
" <binding name='text'>\n" \
" <closure type='gchararray' function='get_string'>\n" \
" <lookup name='item' type='GtkTreeListRow'><lookup name='item'>GtkListItem</lookup></lookup>\n" \
" <constant type='gchararray'>" attr "</constant>" \
@@ -623,6 +619,7 @@ const char *factory_ui =
" <template class='GtkListItem'>\n"
" <property name='child'>\n"
" <object class='GtkLabel'>\n"
" <property name='xalign'>0</property>\n"
" <binding name='label'>\n"
" <lookup name='title' type='GtkColumnViewColumn'>\n"
" <lookup name='item'>GtkListItem</lookup>\n"
+4
View File
@@ -298,6 +298,10 @@ G_GNUC_END_IGNORE_DEPRECATIONS
strcmp (pspec->name, "model") == 0)
check = FALSE;
if (g_type_is_a (type, GTK_TYPE_TREE_LIST_MODEL) &&
(strcmp (pspec->name, "item-type") == 0)) /* might be a treelistrow */
check = FALSE;
/* This is set in init() */
if (g_type_is_a (type, GTK_TYPE_FONT_CHOOSER_WIDGET) &&
strcmp (pspec->name, "tweak-action") == 0)
@@ -75,6 +75,9 @@ assert_items_changed_correctly (GListModel *model,
{
guint i, n_items;
//sanity check that we got all notifies
g_assert_cmpuint (g_list_model_get_n_items (compare), ==, GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (compare), "last-notified-n-items")));
//g_print ("%s => %u -%u +%u => %s\n", model_to_string (compare), position, removed, added, model_to_string (model));
g_assert_cmpint (g_list_model_get_n_items (model), ==, g_list_model_get_n_items (compare) - removed + added);
@@ -127,6 +130,21 @@ assert_items_changed_correctly (GListModel *model,
}
}
static void
assert_n_items_notified_properly (GListModel *model,
GParamSpec *pspec,
GListModel *compare)
{
g_assert_cmpuint (g_list_model_get_n_items (model), !=, GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (compare), "last-notified-n-items")));
/* These should hve been updated in items-changed, which should have been emitted first */
g_assert_cmpuint (g_list_model_get_n_items (model), ==, g_list_model_get_n_items (compare));
g_object_set_data (G_OBJECT (compare),
"last-notified-n-items",
GUINT_TO_POINTER (g_list_model_get_n_items (model)));
}
static GtkFilterListModel *
filter_list_model_new (GListModel *source,
GtkFilter *filter)
@@ -154,6 +172,16 @@ filter_list_model_new (GListModel *source,
(GClosureNotify) g_object_unref,
0);
g_object_set_data (G_OBJECT (check),
"last-notified-n-items",
GUINT_TO_POINTER (g_list_model_get_n_items (G_LIST_MODEL (check))));
g_signal_connect_data (model,
"notify::n-items",
G_CALLBACK (assert_n_items_notified_properly),
g_object_ref (check),
(GClosureNotify) g_object_unref,
0);
return model;
}
+19 -10
View File
@@ -143,6 +143,14 @@ items_changed (GListModel *model,
}
}
static void
notify_n_items (GObject *object,
GParamSpec *pspec,
GString *changes)
{
g_string_append_c (changes, '*');
}
static void
free_changes (gpointer data)
{
@@ -171,6 +179,7 @@ new_model (guint size,
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), changes_quark, changes, free_changes);
g_signal_connect (result, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (result, "notify::n-items", G_CALLBACK (notify_n_items), changes);
return result;
}
@@ -248,7 +257,7 @@ test_empty_set_filter (void)
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "1 2 3 4 5 6");
assert_changes (filter, "6-4");
assert_changes (filter, "6-4*");
g_object_unref (filter);
filter = new_model (10, NULL, NULL);
@@ -256,7 +265,7 @@ test_empty_set_filter (void)
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "");
assert_changes (filter, "0-10");
assert_changes (filter, "0-10*");
g_object_unref (filter);
filter = new_model (10, NULL, NULL);
@@ -272,7 +281,7 @@ test_empty_set_filter (void)
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "4 5 6 7 8 9 10");
assert_changes (filter, "0-3");
assert_changes (filter, "0-3*");
g_object_unref (filter);
filter = new_model (10, NULL, NULL);
@@ -280,7 +289,7 @@ test_empty_set_filter (void)
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "");
assert_changes (filter, "0-10");
assert_changes (filter, "0-10*");
g_object_unref (filter);
filter = new_model (10, NULL, NULL);
@@ -288,7 +297,7 @@ test_empty_set_filter (void)
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "3 4 5 6 7");
assert_changes (filter, "0-10+5");
assert_changes (filter, "0-10+5*");
g_object_unref (filter);
filter = new_model (10, NULL, NULL);
@@ -296,7 +305,7 @@ test_empty_set_filter (void)
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "1 2 8 9 10");
assert_changes (filter, "2-5");
assert_changes (filter, "2-5*");
g_object_unref (filter);
}
@@ -320,19 +329,19 @@ test_change_filter (void)
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "1 2 3 4 5 6");
assert_changes (filter, "3-2+3");
assert_changes (filter, "3-2+3*");
custom = GTK_FILTER (gtk_custom_filter_new (is_smaller_than, GUINT_TO_POINTER (6), NULL));
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "1 2 3 4 5");
assert_changes (filter, "-5");
assert_changes (filter, "-5*");
custom = GTK_FILTER (gtk_custom_filter_new (is_larger_than, GUINT_TO_POINTER (4), NULL));
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "5 6 7 8 9 10");
assert_changes (filter, "0-5+6");
assert_changes (filter, "0-5+6*");
custom = GTK_FILTER (gtk_custom_filter_new (is_not_near, GUINT_TO_POINTER (2), NULL));
gtk_filter_list_model_set_filter (filter, custom);
@@ -344,7 +353,7 @@ test_change_filter (void)
gtk_filter_list_model_set_filter (filter, custom);
g_object_unref (custom);
assert_model (filter, "1 7 8 9 10");
assert_changes (filter, "0-2+1");
assert_changes (filter, "0-2+1*");
g_object_unref (filter);
}
+18 -9
View File
@@ -193,6 +193,14 @@ items_changed (GListModel *model,
}
}
static void
notify_n_items (GObject *object,
GParamSpec *pspec,
GString *changes)
{
g_string_append_c (changes, '*');
}
static void
free_changes (gpointer data)
{
@@ -216,6 +224,7 @@ new_model (GListStore *store)
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), changes_quark, changes, free_changes);
g_signal_connect (result, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (result, "notify::n-items", G_CALLBACK (notify_n_items), changes);
return result;
}
@@ -271,7 +280,7 @@ test_model_add (void)
add_store (model, 8, 10, 1);
assert_model (flat, "1 2 3 4 5 6 7 8 9 10");
assert_changes (flat, "0+3, +3, 4+3, 7+3");
assert_changes (flat, "0+3*, +3*, 4+3*, 7+3*");
g_object_unref (model);
g_object_unref (flat);
@@ -293,13 +302,13 @@ test_submodel_add (void)
store[2] = add_store (model, 5, 4, 1);
store[3] = add_store (model, 8, 8, 1);
assert_model (flat, "2 3 4 8");
assert_changes (flat, "0+2, +2, +3");
assert_changes (flat, "0+2*, +2*, +3*");
insert (store[0], 0, 1);
splice (store[2], 0, 0, (guint[3]) { 5, 6, 7 }, 3);
splice (store[3], 1, 0, (guint[2]) { 9, 10 }, 2);
assert_model (flat, "1 2 3 4 5 6 7 8 9 10");
assert_changes (flat, "+0, 4+3, 8+2");
assert_changes (flat, "+0*, 4+3*, 8+2*");
g_object_unref (model);
g_object_unref (flat);
@@ -325,19 +334,19 @@ test_submodel_add2 (void)
add (store[0], 1);
assert_model (flat, "1");
assert_changes (flat, "+0");
assert_changes (flat, "+0*");
add (store[1], 3);
assert_model (flat, "1 3");
assert_changes (flat, "+1");
assert_changes (flat, "+1*");
add (store[0], 2);
assert_model (flat, "1 2 3");
assert_changes (flat, "+1");
assert_changes (flat, "+1*");
add (store[1], 4);
assert_model (flat, "1 2 3 4");
assert_changes (flat, "+3");
assert_changes (flat, "+3*");
g_object_unref (model);
g_object_unref (flat);
@@ -363,7 +372,7 @@ test_model_remove (void)
g_list_store_remove (model, 0);
g_object_unref (model);
assert_model (flat, "");
assert_changes (flat, "3-4, 3-3, 0-3");
assert_changes (flat, "3-4*, 3-3*, 0-3*");
g_object_unref (flat);
}
@@ -389,7 +398,7 @@ test_submodel_remove (void)
g_object_unref (model);
assert_model (flat, "2 3 4 8");
assert_changes (flat, "-0, 3-3, 4-2");
assert_changes (flat, "-0*, 3-3*, 4-2*");
g_object_unref (flat);
}
+11 -2
View File
@@ -164,6 +164,14 @@ items_changed (GListModel *model,
}
}
static void
notify_n_items (GObject *object,
GParamSpec *pspec,
GString *changes)
{
g_string_append_c (changes, '*');
}
static void
free_changes (gpointer data)
{
@@ -202,6 +210,7 @@ new_model (GListStore *store)
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), changes_quark, changes, free_changes);
g_signal_connect (result, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (result, "notify::n-items", G_CALLBACK (notify_n_items), changes);
return result;
}
@@ -249,11 +258,11 @@ test_set_model (void)
store = new_store (1, 5, 1);
gtk_map_list_model_set_model (map, G_LIST_MODEL (store));
assert_model (map, "2 4 6 8 10");
assert_changes (map, "0+5");
assert_changes (map, "0+5*");
gtk_map_list_model_set_model (map, NULL);
assert_model (map, "");
assert_changes (map, "0-5");
assert_changes (map, "0-5*");
g_object_unref (store);
g_object_unref (map);
+30 -20
View File
@@ -224,6 +224,14 @@ items_changed (GListModel *model,
}
}
static void
notify_n_items (GObject *object,
GParamSpec *pspec,
GString *changes)
{
g_string_append_c (changes, '*');
}
static void
selection_changed (GListModel *model,
guint position,
@@ -258,6 +266,7 @@ new_model (GListStore *store)
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), changes_quark, changes, free_changes);
g_signal_connect (result, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (result, "notify::n-items", G_CALLBACK (notify_n_items), changes);
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), selection_quark, changes, free_changes);
@@ -277,6 +286,7 @@ new_filter_model (GtkSelectionModel *model)
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), changes_quark, changes, free_changes);
g_signal_connect (result, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (result, "notify::n-items", G_CALLBACK (notify_n_items), changes);
return result;
}
@@ -331,19 +341,19 @@ test_changes (void)
g_list_store_remove (store, 3);
assert_model (selection, "1 2 3 5");
assert_changes (selection, "-3");
assert_changes (selection, "-3*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
insert (store, 3, 99);
assert_model (selection, "1 2 3 99 5");
assert_changes (selection, "+3");
assert_changes (selection, "+3*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
splice (store, 3, 2, (guint[]) { 97 }, 1);
assert_model (selection, "1 2 3 97");
assert_changes (selection, "3-2+1");
assert_changes (selection, "3-2+1*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
@@ -354,7 +364,7 @@ test_changes (void)
insert (store, 2, 22);
assert_model (selection, "1 2 22 3 97");
assert_changes (selection, "+2");
assert_changes (selection, "+2*");
assert_selection (selection, "2 3");
assert_selection_changes (selection, "");
@@ -543,74 +553,74 @@ test_selection_filter (void)
assert_selection (selection, "4");
assert_selection_changes (selection, "3:1");
assert_model (filter, "4");
assert_changes (filter, "+0");
assert_changes (filter, "+0*");
ret = gtk_selection_model_unselect_item (selection, 3);
g_assert_true (ret);
assert_selection (selection, "");
assert_selection_changes (selection, "3:1");
assert_model (filter, "");
assert_changes (filter, "-0");
assert_changes (filter, "-0*");
ret = gtk_selection_model_select_item (selection, 1, FALSE);
g_assert_true (ret);
assert_selection (selection, "2");
assert_selection_changes (selection, "1:1");
assert_model (filter, "2");
assert_changes (filter, "+0");
assert_changes (filter, "+0*");
ret = gtk_selection_model_select_item (selection, 0, FALSE);
g_assert_true (ret);
assert_selection (selection, "1 2");
assert_selection_changes (selection, "0:1");
assert_model (filter, "1 2");
assert_changes (filter, "+0");
assert_changes (filter, "+0*");
ret = gtk_selection_model_unselect_item (selection, 0);
g_assert_true (ret);
assert_selection (selection, "2");
assert_selection_changes (selection, "0:1");
assert_model (filter, "2");
assert_changes (filter, "-0");
assert_changes (filter, "-0*");
ret = gtk_selection_model_select_range (selection, 3, 2, FALSE);
g_assert_true (ret);
assert_selection (selection, "2 4 5");
assert_selection_changes (selection, "3:2");
assert_model (filter, "2 4 5");
assert_changes (filter, "1+2");
assert_changes (filter, "1+2*");
ret = gtk_selection_model_unselect_range (selection, 3, 2);
g_assert_true (ret);
assert_selection (selection, "2");
assert_selection_changes (selection, "3:2");
assert_model (filter, "2");
assert_changes (filter, "1-2");
assert_changes (filter, "1-2*");
ret = gtk_selection_model_select_all (selection);
g_assert_true (ret);
assert_selection (selection, "1 2 3 4 5");
assert_selection_changes (selection, "0:5");
assert_model (filter, "1 2 3 4 5");
assert_changes (filter, "0-1+5");
assert_changes (filter, "0-1+5*");
ret = gtk_selection_model_unselect_all (selection);
g_assert_true (ret);
assert_selection (selection, "");
assert_selection_changes (selection, "0:5");
assert_model (filter, "");
assert_changes (filter, "0-5");
assert_changes (filter, "0-5*");
ret = gtk_selection_model_select_range (selection, 1, 3, FALSE);
g_assert_true (ret);
assert_selection (selection, "2 3 4");
assert_selection_changes (selection, "1:3");
assert_model (filter, "2 3 4");
assert_changes (filter, "0+3");
assert_changes (filter, "0+3*");
insert (store, 2, 22);
assert_model (selection, "1 2 22 3 4 5");
assert_changes (selection, "+2");
assert_changes (selection, "+2*");
assert_selection (selection, "2 3 4");
assert_selection_changes (selection, "");
assert_model (filter, "2 3 4");
@@ -618,7 +628,7 @@ test_selection_filter (void)
g_list_store_remove (store, 2);
assert_model (selection, "1 2 3 4 5");
assert_changes (selection, "-2");
assert_changes (selection, "-2*");
assert_selection (selection, "2 3 4");
assert_selection_changes (selection, "");
assert_model (filter, "2 3 4");
@@ -651,17 +661,17 @@ test_set_model (void)
/* we retain the selected item across model changes */
gtk_multi_selection_set_model (GTK_MULTI_SELECTION (selection), m2);
assert_changes (selection, "0-5+3");
assert_changes (selection, "0-5+3*");
assert_selection (selection, "2 3");
assert_selection_changes (selection, "");
gtk_multi_selection_set_model (GTK_MULTI_SELECTION (selection), NULL);
assert_changes (selection, "0-3");
assert_changes (selection, "0-3*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
gtk_multi_selection_set_model (GTK_MULTI_SELECTION (selection), m2);
assert_changes (selection, "0+3");
assert_changes (selection, "0+3*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
@@ -672,7 +682,7 @@ test_set_model (void)
/* we retain no selected item across model changes */
gtk_multi_selection_set_model (GTK_MULTI_SELECTION (selection), m1);
assert_changes (selection, "0-3+5");
assert_changes (selection, "0-3+5*");
assert_selection (selection, "1 2 3");
assert_selection_changes (selection, "");
+14 -5
View File
@@ -90,6 +90,14 @@ items_changed (GListModel *model,
}
}
static void
notify_n_items (GObject *object,
GParamSpec *pspec,
GString *changes)
{
g_string_append_c (changes, '*');
}
static void
free_changes (gpointer data)
{
@@ -145,6 +153,7 @@ new_model (gboolean fill)
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), changes_quark, changes, free_changes);
g_signal_connect (result, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (result, "notify::n-items", G_CALLBACK (notify_n_items), changes);
return result;
}
@@ -185,14 +194,14 @@ test_set_object (void)
model = new_model (FALSE);
gtk_property_lookup_list_model_set_object (model, widget);
assert_model (model, "GtkLabel GtkGrid GtkBox GtkWindow");
assert_changes (model, "+0");
assert_changes (model, "+0*");
g_object_unref (model);
model = new_model (FALSE);
assert_model (model, "");
gtk_property_lookup_list_model_set_object (model, widget);
assert_model (model, "GtkLabel GtkGrid GtkBox GtkWindow");
assert_changes (model, "0+4");
assert_changes (model, "0+4*");
g_object_unref (model);
destroy_widgets ();
@@ -212,15 +221,15 @@ test_change_property (void)
assert_model (model, ""); /* make sure the model has a definite size */
gtk_property_lookup_list_model_set_object (model, widget);
assert_model (model, "GtkLabel GtkGrid GtkBox GtkWindow");
assert_changes (model, "0+4");
assert_changes (model, "0+4*");
gtk_grid_remove (GTK_GRID (parent), widget);
assert_model (model, "GtkLabel");
assert_changes (model, "1-3");
assert_changes (model, "1-3*");
gtk_box_append (GTK_BOX (grandparent), widget);
assert_model (model, "GtkLabel GtkBox GtkWindow");
assert_changes (model, "1+2");
assert_changes (model, "1+2*");
g_object_unref (model);
destroy_widgets ();
+24 -15
View File
@@ -220,6 +220,14 @@ items_changed (GListModel *model,
}
}
static void
notify_n_items (GObject *object,
GParamSpec *pspec,
GString *changes)
{
g_string_append_c (changes, '*');
}
static void
selection_changed (GListModel *model,
guint position,
@@ -265,6 +273,7 @@ new_model (GListStore *store, gboolean autoselect, gboolean can_unselect)
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), changes_quark, changes, free_changes);
g_signal_connect (result, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (result, "notify::n-items", G_CALLBACK (notify_n_items), changes);
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), selection_quark, changes, free_changes);
@@ -336,19 +345,19 @@ test_changes (void)
g_list_store_remove (store, 3);
assert_model (selection, "1 2 3 5");
assert_changes (selection, "-3");
assert_changes (selection, "-3*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
insert (store, 3, 99);
assert_model (selection, "1 2 3 99 5");
assert_changes (selection, "+3");
assert_changes (selection, "+3*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
splice (store, 3, 2, (guint[]) { 97 }, 1);
assert_model (selection, "1 2 3 97");
assert_changes (selection, "3-2+1");
assert_changes (selection, "3-2+1*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
@@ -434,31 +443,31 @@ test_autoselect (void)
add (store, 1);
assert_model (selection, "1");
assert_changes (selection, "+0");
assert_changes (selection, "+0*");
assert_selection (selection, "1");
assert_selection_changes (selection, "");
splice (store, 0, 1, (guint[]) { 7, 8, 9 }, 3);
assert_model (selection, "7 8 9");
assert_changes (selection, "0-1+3");
assert_changes (selection, "0-1+3*");
assert_selection (selection, "7");
assert_selection_changes (selection, "");
splice (store, 0, 0, (guint[]) { 5, 6 }, 2);
assert_model (selection, "5 6 7 8 9");
assert_changes (selection, "0+2");
assert_changes (selection, "0+2*");
assert_selection (selection, "7");
assert_selection_changes (selection, "");
g_list_store_remove (store, 2);
assert_model (selection, "5 6 8 9");
assert_changes (selection, "2-2+1");
assert_changes (selection, "2-2+1*");
assert_selection (selection, "8");
assert_selection_changes (selection, "");
splice (store, 2, 2, NULL, 0);
assert_model (selection, "5 6");
assert_changes (selection, "1-3+1");
assert_changes (selection, "1-3+1*");
assert_selection (selection, "6");
assert_selection_changes (selection, "");
@@ -470,13 +479,13 @@ test_autoselect (void)
g_list_store_remove (store, 0);
assert_model (selection, "2");
assert_changes (selection, "-0");
assert_changes (selection, "-0*");
assert_selection (selection, "2");
assert_selection_changes (selection, "");
g_list_store_remove (store, 0);
assert_model (selection, "");
assert_changes (selection, "-0");
assert_changes (selection, "-0*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
@@ -671,24 +680,24 @@ test_set_model (void)
/* we retain the selected item across model changes */
gtk_single_selection_set_model (GTK_SINGLE_SELECTION (selection), m2);
assert_changes (selection, "0-5+3");
assert_changes (selection, "0-5+3*");
assert_selection (selection, "1");
assert_selection_changes (selection, "");
gtk_single_selection_set_model (GTK_SINGLE_SELECTION (selection), NULL);
assert_changes (selection, "0-3");
assert_changes (selection, "0-3*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
gtk_single_selection_set_autoselect (GTK_SINGLE_SELECTION (selection), FALSE);
gtk_single_selection_set_model (GTK_SINGLE_SELECTION (selection), m2);
assert_changes (selection, "0+3");
assert_changes (selection, "0+3*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
/* we retain no selected item across model changes */
gtk_single_selection_set_model (GTK_SINGLE_SELECTION (selection), m1);
assert_changes (selection, "0-3+5");
assert_changes (selection, "0-3+5*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
@@ -697,7 +706,7 @@ test_set_model (void)
assert_selection_changes (selection, "4:1");
gtk_single_selection_set_model (GTK_SINGLE_SELECTION (selection), m2);
assert_changes (selection, "0-5+3");
assert_changes (selection, "0-5+3*");
assert_selection (selection, "");
assert_selection_changes (selection, "");
+16 -7
View File
@@ -174,6 +174,14 @@ items_changed (GListModel *model,
}
}
static void
notify_n_items (GObject *object,
GParamSpec *pspec,
GString *changes)
{
g_string_append_c (changes, '*');
}
static void
free_changes (gpointer data)
{
@@ -198,6 +206,7 @@ new_model (GListStore *store, guint offset, guint size)
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), changes_quark, changes, free_changes);
g_signal_connect (result, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (result, "notify::n-items", G_CALLBACK (notify_n_items), changes);
return result;
}
@@ -245,11 +254,11 @@ test_set_model (void)
store = new_store (1, 7, 2);
gtk_slice_list_model_set_model (slice, G_LIST_MODEL (store));
assert_model (slice, "1 3");
assert_changes (slice, "0+2");
assert_changes (slice, "0+2*");
gtk_slice_list_model_set_model (slice, NULL);
assert_model (slice, "");
assert_changes (slice, "0-2");
assert_changes (slice, "0-2*");
g_object_unref (store);
g_object_unref (slice);
@@ -272,11 +281,11 @@ test_set_slice (void)
gtk_slice_list_model_set_size (slice, 2);
assert_model (slice, "3 5");
assert_changes (slice, "-2");
assert_changes (slice, "-2*");
gtk_slice_list_model_set_size (slice, 10);
assert_model (slice, "3 5 7");
assert_changes (slice, "+2");
assert_changes (slice, "+2*");
g_object_unref (store);
g_object_unref (slice);
@@ -306,15 +315,15 @@ test_changes (void)
splice (store, 13, 6, (guint[]) { 97 }, 1);
assert_model (slice, "12 13 99 97");
assert_changes (slice, "3-2+1");
assert_changes (slice, "3-2+1*");
splice (store, 13, 1, (guint[]) { 36, 37, 38 }, 3);
assert_model (slice, "12 13 99 36 37");
assert_changes (slice, "3-1+2");
assert_changes (slice, "3-1+2*");
g_list_store_remove_all (store);
assert_model (slice, "");
assert_changes (slice, "0-5");
assert_changes (slice, "0-5*");
g_object_unref (store);
g_object_unref (slice);
+29 -1
View File
@@ -84,9 +84,12 @@ assert_items_changed_correctly (GListModel *model,
{
guint i, n_items;
//sanity check that we got all notifies
g_assert_cmpuint (g_list_model_get_n_items (compare), ==, GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (compare), "last-notified-n-items")));
//g_print ("%s => %u -%u +%u => %s\n", model_to_string (compare), position, removed, added, model_to_string (model));
g_assert_cmpint (g_list_model_get_n_items (model), ==, g_list_model_get_n_items (compare) - removed + added);
g_assert_cmpuint (g_list_model_get_n_items (model), ==, g_list_model_get_n_items (compare) - removed + added);
n_items = g_list_model_get_n_items (model);
if (position != 0 || removed != n_items)
@@ -139,6 +142,21 @@ assert_items_changed_correctly (GListModel *model,
}
}
static void
assert_n_items_notified_properly (GListModel *model,
GParamSpec *pspec,
GListModel *compare)
{
g_assert_cmpuint (g_list_model_get_n_items (model), !=, GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (compare), "last-notified-n-items")));
/* These should hve been updated in items-changed, which should have been emitted first */
g_assert_cmpuint (g_list_model_get_n_items (model), ==, g_list_model_get_n_items (compare));
g_object_set_data (G_OBJECT (compare),
"last-notified-n-items",
GUINT_TO_POINTER (g_list_model_get_n_items (model)));
}
static GtkSortListModel *
sort_list_model_new (GListModel *source,
GtkSorter *sorter)
@@ -162,6 +180,16 @@ sort_list_model_new (GListModel *source,
(GClosureNotify) g_object_unref,
0);
g_object_set_data (G_OBJECT (check),
"last-notified-n-items",
GUINT_TO_POINTER (g_list_model_get_n_items (G_LIST_MODEL (check))));
g_signal_connect_data (model,
"notify::n-items",
G_CALLBACK (assert_n_items_notified_properly),
g_object_ref (check),
(GClosureNotify) g_object_unref,
0);
return model;
}
+19 -10
View File
@@ -176,6 +176,14 @@ items_changed (GListModel *model,
}
}
static void
notify_n_items (GObject *object,
GParamSpec *pspec,
GString *changes)
{
g_string_append_c (changes, '*');
}
static void
free_changes (gpointer data)
{
@@ -228,6 +236,7 @@ new_model (gpointer model)
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(result), changes_quark, changes, free_changes);
g_signal_connect (result, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (result, "notify::n-items", G_CALLBACK (notify_n_items), changes);
return result;
}
@@ -275,11 +284,11 @@ test_set_model (void)
store = new_store ((guint[]) { 4, 8, 2, 6, 10, 0 });
gtk_sort_list_model_set_model (sort, G_LIST_MODEL (store));
assert_model (sort, "4 8 2 6 10");
assert_changes (sort, "0+5");
assert_changes (sort, "0+5*");
gtk_sort_list_model_set_model (sort, NULL);
assert_model (sort, "");
assert_changes (sort, "0-5");
assert_changes (sort, "0-5*");
g_object_unref (sort);
@@ -290,11 +299,11 @@ test_set_model (void)
gtk_sort_list_model_set_model (sort, NULL);
assert_model (sort, "");
assert_changes (sort, "0-5");
assert_changes (sort, "0-5*");
gtk_sort_list_model_set_model (sort, G_LIST_MODEL (store));
assert_model (sort, "2 4 6 8 10");
assert_changes (sort, "0+5");
assert_changes (sort, "0+5*");
g_object_unref (store);
g_object_unref (sort);
@@ -345,7 +354,7 @@ test_add_items (void)
assert_changes (sort, "");
splice (store, 4, 0, (guint[]) { 1, 2 }, 2);
assert_model (sort, "1 2 49 50 51 99 100");
assert_changes (sort, "0+2");
assert_changes (sort, "0+2*");
g_object_unref (store);
g_object_unref (sort);
@@ -356,7 +365,7 @@ test_add_items (void)
assert_changes (sort, "");
splice (store, 2, 0, (guint[]) { 49, 50, 51 }, 3);
assert_model (sort, "1 2 49 50 51 99 100");
assert_changes (sort, "2+3");
assert_changes (sort, "2+3*");
g_object_unref (store);
g_object_unref (sort);
@@ -367,7 +376,7 @@ test_add_items (void)
assert_changes (sort, "");
splice (store, 1, 0, (guint[]) { 99, 100 }, 2);
assert_model (sort, "1 2 49 50 51 99 100");
assert_changes (sort, "5+2");
assert_changes (sort, "5+2*");
g_object_unref (store);
g_object_unref (sort);
}
@@ -385,7 +394,7 @@ test_remove_items (void)
assert_changes (sort, "");
splice (store, 4, 2, NULL, 0);
assert_model (sort, "49 50 51 99 100");
assert_changes (sort, "0-2");
assert_changes (sort, "0-2*");
g_object_unref (store);
g_object_unref (sort);
@@ -396,7 +405,7 @@ test_remove_items (void)
assert_changes (sort, "");
splice (store, 2, 3, NULL, 0);
assert_model (sort, "1 2 99 100");
assert_changes (sort, "2-3");
assert_changes (sort, "2-3*");
g_object_unref (store);
g_object_unref (sort);
@@ -407,7 +416,7 @@ test_remove_items (void)
assert_changes (sort, "");
splice (store, 1, 2, NULL, 0);
assert_model (sort, "1 2 49 50 51");
assert_changes (sort, "5-2");
assert_changes (sort, "5-2*");
g_object_unref (store);
g_object_unref (sort);
}
+15 -6
View File
@@ -142,6 +142,14 @@ items_changed (GListModel *model,
}
}
static void
notify_n_items (GObject *object,
GParamSpec *pspec,
GString *changes)
{
g_string_append_c (changes, '*');
}
static void
free_changes (gpointer data)
{
@@ -174,6 +182,7 @@ new_model (guint size,
changes = g_string_new ("");
g_object_set_qdata_full (G_OBJECT(tree), changes_quark, changes, free_changes);
g_signal_connect (tree, "items-changed", G_CALLBACK (items_changed), changes);
g_signal_connect (tree, "notify::n-items", G_CALLBACK (notify_n_items), changes);
return tree;
}
@@ -193,7 +202,7 @@ test_expand (void)
g_object_unref (row);
}
assert_model (tree, "100 100 90 80 70 60 50 40 30 20 10");
assert_changes (tree, "1+10");
assert_changes (tree, "1+10*");
for (i = g_list_model_get_n_items (G_LIST_MODEL (tree)); i > 0; i--)
{
@@ -202,7 +211,7 @@ test_expand (void)
g_object_unref (row);
}
assert_model (tree, "100 100 100 99 98 97 96 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 70 70 69 68 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2 1");
assert_changes (tree, "11+10, 10+10, 9+10, 8+10, 7+10, 6+10, 5+10, 4+10, 3+10, 2+10");
assert_changes (tree, "11+10*, 10+10*, 9+10*, 8+10*, 7+10*, 6+10*, 5+10*, 4+10*, 3+10*, 2+10*");
for (i = g_list_model_get_n_items (G_LIST_MODEL (tree)); i > 0; i--)
{
@@ -229,25 +238,25 @@ test_remove_some (void)
g_assert_true (G_IS_LIST_MODEL (item));
g_list_store_remove (item, 3);
assert_model (tree, "100 100 100 99 98 96 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 70 70 69 68 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2 1");
assert_changes (tree, "-5");
assert_changes (tree, "-5*");
item = g_list_model_get_item (G_LIST_MODEL (tree), 0);
g_assert_true (G_IS_LIST_MODEL (item));
g_list_store_remove (item, 3);
assert_model (tree, "100 100 100 99 98 96 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2 1");
assert_changes (tree, "33-11");
assert_changes (tree, "33-11*");
item = g_list_model_get_item (G_LIST_MODEL (tree), 88);
g_assert_true (G_IS_LIST_MODEL (item));
g_list_store_remove (item, 9);
assert_model (tree, "100 100 100 99 98 96 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2");
assert_changes (tree, "-98");
assert_changes (tree, "-98*");
item = g_list_model_get_item (G_LIST_MODEL (tree), 0);
g_assert_true (G_IS_LIST_MODEL (item));
g_list_store_remove (item, 8);
assert_model (tree, "100 100 100 99 98 96 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11");
assert_changes (tree, "88-10");
assert_changes (tree, "88-10*");
g_object_unref (tree);
}
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="default-width">800</property>
<property name="default-height">600</property>
<child>
<object class="GtkLabel">
<property name="use-markup">1</property>
<property name="wrap">1</property>
<property name="label" translatable="yes">Text sizes: &lt;span size="xx-small"&gt;tiny &lt;/span&gt;&lt;span size="x-small"&gt;very small &lt;/span&gt;&lt;span size="small"&gt;small &lt;/span&gt;&lt;span size="medium"&gt;normal &lt;/span&gt;&lt;span size="large"&gt;large &lt;/span&gt;&lt;span size="x-large"&gt;very large &lt;/span&gt;&lt;span size="xx-large"&gt;huge&lt;/span&gt;
Text styles: &lt;span style="normal"&gt;Normal&lt;/span&gt; &lt;span style="italic"&gt;Italic&lt;/span&gt; &lt;span style="oblique"&gt;Olique&lt;/span&gt;
Text weights: &lt;span weight="thin"&gt;thin&lt;/span&gt; &lt;span weight="light"&gt;light&lt;/span&gt; &lt;span weight="normal"&gt;normal&lt;/span&gt; &lt;span weight="bold"&gt;bold&lt;/span&gt; &lt;span weight="ultraheavy"&gt;ultraheavy&lt;/span&gt;
Text &lt;span color="gray"&gt;c&lt;span color="green"&gt;o&lt;/span&gt;l&lt;span color="tomato"&gt;o&lt;/span&gt;rs&lt;/span&gt; and &lt;span background="pink"&gt;backgrounds&lt;/span&gt;
Colorful &lt;span underline="low" underline-color="blue"&gt;&lt;span underline="double" underline-color="red"&gt;under&lt;/span&gt;lines&lt;/span&gt; and &lt;span background="pink"&gt;&lt;span underline="error"&gt;mo&lt;/span&gt;&lt;span underline="error" underline-color="green"&gt;re&lt;/span&gt;&lt;/span&gt;
Colorful &lt;span strikethrough="true" strikethrough-color="magenta"&gt;strikethroughs&lt;/span&gt; and &lt;span overline="single" overline_color="green"&gt;overlines&lt;/span&gt;
Superscripts and subscripts: 𝜀&lt;span rise="-6000" size="x-small" font_desc="italic"&gt;0&lt;/span&gt; = 𝜔&lt;span rise="8000" size="smaller"&gt;𝜔&lt;span rise="14000" size="smaller"&gt;𝜔&lt;span rise="20000"&gt;.&lt;span rise="23000"&gt;.&lt;span rise="26000"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span letter_spacing="3000"&gt;Letterspacing&lt;/span&gt;
OpenType font features: &lt;span font_desc="sans regular" font_features="dlig=0"&gt;feast&lt;/span&gt; versus &lt;span font_desc="sans regular" font_features="dlig=1"&gt;feast&lt;/span&gt;
Shortcuts: &lt;tt&gt;Monospace&lt;/tt&gt; &lt;b&gt;Bold&lt;/b&gt; &lt;i&gt;Italic&lt;/i&gt; &lt;big&gt;Big&lt;/big&gt; &lt;small&gt;Small&lt;/small&gt; &lt;u&gt;Underlined&lt;/u&gt; &lt;s&gt;Strikethrough&lt;/s&gt; Super&lt;sup&gt;script&lt;/sup&gt; Sub&lt;sub&gt;script&lt;/sub&gt;
hy­phen­ation al­go­rithm is a &lt;span allow_breaks="false" style="italic"&gt;set of rules&lt;/span&gt;, espe­ci­ally one co­di­fied for im­ple­men­tation in a com­pu­ter pro­gram, that de­ci­des at which points a word can be bro­ken over two lines with a hy­phen. For ex­am­ple, a hy­phen­ation al­go­rithm might de­cide that im­peach­ment can be broken as impeach‧ment or im‧peachment but not impe‧achment.
&lt;span insert_hyphens="false"&gt;one/two three/four five/six seven/eight nine/ten&lt;/span&gt;
&lt;span line_height='1.33'&gt;Line height: This is an example of widely spaced text. It was achieved by setting the line-height factor to 1.33. You can set the line-height factor to any value between 0 and 10.
Note that the line height affects the spacing between paragraphs as well as between the wrapped lines inside a paragraph.&lt;/span&gt;
Transforms: &lt;span text_transform='uppercase'&gt;straße&lt;/span&gt; &lt;span text_transform='capitalize'&gt;up, up and away&lt;/span&gt;</property>
</object>
</child>
</object>
</interface>
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="decorated">0</property>
<property name="default-width">800</property>
<property name="default-height">600</property>
<child>
<object class="GtkInscription">
<property name="markup" translatable="yes">Text sizes: &lt;span size="xx-small"&gt;tiny &lt;/span&gt;&lt;span size="x-small"&gt;very small &lt;/span&gt;&lt;span size="small"&gt;small &lt;/span&gt;&lt;span size="medium"&gt;normal &lt;/span&gt;&lt;span size="large"&gt;large &lt;/span&gt;&lt;span size="x-large"&gt;very large &lt;/span&gt;&lt;span size="xx-large"&gt;huge&lt;/span&gt;
Text styles: &lt;span style="normal"&gt;Normal&lt;/span&gt; &lt;span style="italic"&gt;Italic&lt;/span&gt; &lt;span style="oblique"&gt;Olique&lt;/span&gt;
Text weights: &lt;span weight="thin"&gt;thin&lt;/span&gt; &lt;span weight="light"&gt;light&lt;/span&gt; &lt;span weight="normal"&gt;normal&lt;/span&gt; &lt;span weight="bold"&gt;bold&lt;/span&gt; &lt;span weight="ultraheavy"&gt;ultraheavy&lt;/span&gt;
Text &lt;span color="gray"&gt;c&lt;span color="green"&gt;o&lt;/span&gt;l&lt;span color="tomato"&gt;o&lt;/span&gt;rs&lt;/span&gt; and &lt;span background="pink"&gt;backgrounds&lt;/span&gt;
Colorful &lt;span underline="low" underline-color="blue"&gt;&lt;span underline="double" underline-color="red"&gt;under&lt;/span&gt;lines&lt;/span&gt; and &lt;span background="pink"&gt;&lt;span underline="error"&gt;mo&lt;/span&gt;&lt;span underline="error" underline-color="green"&gt;re&lt;/span&gt;&lt;/span&gt;
Colorful &lt;span strikethrough="true" strikethrough-color="magenta"&gt;strikethroughs&lt;/span&gt; and &lt;span overline="single" overline_color="green"&gt;overlines&lt;/span&gt;
Superscripts and subscripts: 𝜀&lt;span rise="-6000" size="x-small" font_desc="italic"&gt;0&lt;/span&gt; = 𝜔&lt;span rise="8000" size="smaller"&gt;𝜔&lt;span rise="14000" size="smaller"&gt;𝜔&lt;span rise="20000"&gt;.&lt;span rise="23000"&gt;.&lt;span rise="26000"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span letter_spacing="3000"&gt;Letterspacing&lt;/span&gt;
OpenType font features: &lt;span font_desc="sans regular" font_features="dlig=0"&gt;feast&lt;/span&gt; versus &lt;span font_desc="sans regular" font_features="dlig=1"&gt;feast&lt;/span&gt;
Shortcuts: &lt;tt&gt;Monospace&lt;/tt&gt; &lt;b&gt;Bold&lt;/b&gt; &lt;i&gt;Italic&lt;/i&gt; &lt;big&gt;Big&lt;/big&gt; &lt;small&gt;Small&lt;/small&gt; &lt;u&gt;Underlined&lt;/u&gt; &lt;s&gt;Strikethrough&lt;/s&gt; Super&lt;sup&gt;script&lt;/sup&gt; Sub&lt;sub&gt;script&lt;/sub&gt;
hy­phen­ation al­go­rithm is a &lt;span allow_breaks="false" style="italic"&gt;set of rules&lt;/span&gt;, espe­ci­ally one co­di­fied for im­ple­men­tation in a com­pu­ter pro­gram, that de­ci­des at which points a word can be bro­ken over two lines with a hy­phen. For ex­am­ple, a hy­phen­ation al­go­rithm might de­cide that im­peach­ment can be broken as impeach‧ment or im‧peachment but not impe‧achment.
&lt;span insert_hyphens="false"&gt;one/two three/four five/six seven/eight nine/ten&lt;/span&gt;
&lt;span line_height='1.33'&gt;Line height: This is an example of widely spaced text. It was achieved by setting the line-height factor to 1.33. You can set the line-height factor to any value between 0 and 10.
Note that the line height affects the spacing between paragraphs as well as between the wrapped lines inside a paragraph.&lt;/span&gt;
Transforms: &lt;span text_transform='uppercase'&gt;straße&lt;/span&gt; &lt;span text_transform='capitalize'&gt;up, up and away&lt;/span&gt;</property>
</object>
</child>
</object>
</interface>
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkOverlay">
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">
</property>
</object>
</child>
<child type="overlay">
<object class="GtkLabel">
<property name="label" translatable="yes">We wrap supercalifragilisticexpialidocious into 3 lines</property>
<property name="wrap">1</property>
<property name="wrap-mode">word-char</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<layout>
<property name="clip-overlay">1</property>
</layout>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">We wrap supercalifragilisticexpialidocious into 3 lines</property>
<property name="wrap">1</property>
<property name="wrap-mode">word-char</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="lines">2</property>
<property name="ellipsize">start</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">We wrap supercalifragilisticexpialidocious into 3 lines</property>
<property name="wrap">1</property>
<property name="wrap-mode">word-char</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="lines">2</property>
<property name="ellipsize">middle</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">We wrap supercalifragilisticexpialidocious into 3 lines</property>
<property name="wrap">1</property>
<property name="wrap-mode">word-char</property>
<property name="xalign">0</property>
<property name="yalign">0</property>
<property name="lines">2</property>
<property name="ellipsize">end</property>
</object>
</child>
</object>
</child>
</object>
</interface>
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">We wrap supercalifragilisticexpialidocious into 3 lines</property>
<property name="text-overflow">clip</property>
<property name="yalign">0</property>
<property name="nat-lines">2</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">We wrap supercalifragilisticexpialidocious into 3 lines</property>
<property name="text-overflow">ellipsize-start</property>
<property name="nat-lines">2</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">We wrap supercalifragilisticexpialidocious into 3 lines</property>
<property name="text-overflow">ellipsize-middle</property>
<property name="nat-lines">2</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">We wrap supercalifragilisticexpialidocious into 3 lines</property>
<property name="text-overflow">ellipsize-end</property>
<property name="nat-lines">2</property>
</object>
</child>
</object>
</child>
</object>
</interface>
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="homogeneous">1</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">THIS
HIGH</property>
<attributes>
<attribute name="line-height" value="1.25" />
</attributes>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">clip</property>
<property name="yalign">0.0</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">ellipsize-start</property>
<property name="yalign">0.0</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">ellipsize-middle</property>
<property name="yalign">0.0</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">ellipsize-end</property>
<property name="yalign">0.0</property>
</object>
</child>
</object>
</child>
</object>
</interface>
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="homogeneous">1</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">THIS
HIGH</property>
<attributes>
<attribute name="line-height" value="1.25" />
</attributes>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">clip</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">ellipsize-start</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">ellipsize-middle</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">ellipsize-end</property>
</object>
</child>
</object>
</child>
</object>
</interface>
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkOverlay">
<child>
<object class="GtkLabel" />
</child>
<child type="overlay">
<object class="GtkLabel">
<property name="label" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="ellipsize">start</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="ellipsize">middle</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="ellipsize">end</property>
</object>
</child>
</object>
</child>
</object>
</interface>
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">clip</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">ellipsize-start</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">ellipsize-middle</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</property>
<property name="text-overflow">ellipsize-end</property>
</object>
</child>
</object>
</child>
</object>
</interface>
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<property name="decorated">0</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">0.25</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">0.5</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">0.75</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">1.0</property>
</object>
</child>
</object>
</child>
</object>
</interface>
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<property name="decorated">0</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<signal name="map" handler="reftest:set_default_direction_rtl" swapped="no"/>
<signal name="destroy" handler="reftest:set_default_direction_ltr" swapped="no"/>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">0.0</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">0.25</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">0.5</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">0.75</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text">עִברִית
English</property>
<property name="min-lines">2</property>
<property name="xalign">1.0</property>
</object>
</child>
</object>
</child>
</object>
</interface>
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<property name="decorated">0</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">align
0.0</property>
<property name="wrap-mode">word</property>
<property name="wrap">1</property>
<property name="xalign">0</property>
<property name="justify">left</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">align
0.5</property>
<property name="wrap-mode">word</property>
<property name="wrap">1</property>
<property name="xalign">0.5</property>
<property name="justify">center</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">align
1.0</property>
<property name="wrap-mode">word</property>
<property name="wrap">1</property>
<property name="xalign">1</property>
<property name="justify">right</property>
</object>
</child>
</object>
</child>
</object>
</interface>
+39
View File
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<property name="default-width">200</property>
<property name="decorated">0</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">align
0.0</property>
<property name="wrap-mode">word</property>
<property name="min-lines">2</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">align
0.5</property>
<property name="wrap-mode">word</property>
<property name="min-lines">2</property>
<property name="xalign">0.5</property>
</object>
</child>
<child>
<object class="GtkInscription">
<property name="text" translatable="yes">align
1.0</property>
<property name="wrap-mode">word</property>
<property name="min-lines">2</property>
<property name="xalign">1</property>
</object>
</child>
</object>
</child>
</object>
</interface>
+12
View File
@@ -367,6 +367,18 @@ testdata = [
'image-load-from-file.css',
'image-load-from-file.ref.ui',
'image-load-from-file.ui',
'inscription-markup.ref.ui',
'inscription-markup.ui',
'inscription-overflow.ref.ui',
'inscription-overflow.ui',
'inscription-overflow-multiline.ref.ui',
'inscription-overflow-multiline.ui',
'inscription-overflow-yalign.ref.ui',
'inscription-overflow-yalign.ui',
'inscription-xalign.ref.ui',
'inscription-xalign.ui',
'inscription-xalign-rtl.ref.ui',
'inscription-xalign-rtl.ui',
'label-attribute-preference.css',
'label-attribute-preference.ref.ui',
'label-attribute-preference.ui',