Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5cb7e60c73 | |||
| f9194042f4 |
+8
-7
@@ -7,7 +7,6 @@ stages:
|
||||
- analysis
|
||||
- docs
|
||||
- flatpak
|
||||
- publish
|
||||
- deploy
|
||||
|
||||
.cache-paths: &cache-paths
|
||||
@@ -58,7 +57,6 @@ style-check-diff:
|
||||
- "${CI_PROJECT_DIR}/_build/report*.xml"
|
||||
- "${CI_PROJECT_DIR}/_build/report*.html"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/reftests/output/*/*.png"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/tools/output/*/*"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/gsk/compare/*/*/*.png"
|
||||
- "${CI_PROJECT_DIR}/_build/testsuite/css/output/*/*.syscap"
|
||||
- "${CI_PROJECT_DIR}/_build_hello/meson-logs"
|
||||
@@ -338,11 +336,14 @@ reference:
|
||||
paths:
|
||||
- _reference
|
||||
|
||||
publish-docs:
|
||||
stage: publish
|
||||
pages:
|
||||
stage: deploy
|
||||
needs: ['reference']
|
||||
script:
|
||||
- "curl -X POST -F token=${PAGES_TRIGGER_TOKEN} -F ref=docs-gtk-org https://gitlab.gnome.org/api/v4/projects/665/trigger/pipeline"
|
||||
- mv _reference/ public/
|
||||
- cp .gitlab-ci/pages/* public/
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
refs:
|
||||
- master
|
||||
- master
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.9 MiB |
@@ -696,37 +696,6 @@ on_range_to_changed (GtkSpinButton *to)
|
||||
gtk_spin_button_set_value (from, v2);
|
||||
}
|
||||
|
||||
static GdkContentProvider *
|
||||
on_picture_drag_prepare (GtkDragSource *source,
|
||||
double x,
|
||||
double y,
|
||||
gpointer unused)
|
||||
{
|
||||
GtkWidget *picture;
|
||||
|
||||
picture = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (source));
|
||||
|
||||
return gdk_content_provider_new_typed (GDK_TYPE_TEXTURE, gtk_picture_get_paintable (GTK_PICTURE (picture)));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
on_picture_drop (GtkDropTarget *dest,
|
||||
const GValue *value,
|
||||
double x,
|
||||
double y,
|
||||
gpointer unused)
|
||||
{
|
||||
GtkWidget *picture;
|
||||
GdkPaintable *paintable;
|
||||
|
||||
picture = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (dest));
|
||||
paintable = g_value_get_object (value);
|
||||
|
||||
gtk_picture_set_paintable (GTK_PICTURE (picture), paintable);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
info_bar_response (GtkWidget *infobar, int response_id)
|
||||
{
|
||||
@@ -1213,7 +1182,7 @@ populate_flowbox (GtkWidget *flowbox)
|
||||
GtkWidget *child;
|
||||
int i;
|
||||
const char *resources[] = {
|
||||
"sunset.jpg", "portland-rose.jpg", "beach.jpg", "nyc.jpg"
|
||||
"sunset.jpg", "snowy.jpg", "portland-rose.jpg"
|
||||
};
|
||||
|
||||
if (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (flowbox), "populated")))
|
||||
@@ -2071,8 +2040,6 @@ activate (GApplication *app)
|
||||
"on_page_combo_changed", (GCallback)on_page_combo_changed,
|
||||
"on_range_from_changed", (GCallback)on_range_from_changed,
|
||||
"on_range_to_changed", (GCallback)on_range_to_changed,
|
||||
"on_picture_drag_prepare", (GCallback)on_picture_drag_prepare,
|
||||
"on_picture_drop", (GCallback)on_picture_drop,
|
||||
"tab_close_cb", (GCallback)tab_close_cb,
|
||||
"increase_icon_size", (GCallback)increase_icon_size,
|
||||
"decrease_icon_size", (GCallback)decrease_icon_size,
|
||||
|
||||
@@ -115,8 +115,7 @@
|
||||
<gresource prefix="/org/gtk/WidgetFactory4">
|
||||
<file>gtk-logo.webm</file>
|
||||
<file>sunset.jpg</file>
|
||||
<file>snowy.jpg</file>
|
||||
<file>portland-rose.jpg</file>
|
||||
<file>nyc.jpg</file>
|
||||
<file>beach.jpg</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
|
||||
@@ -1051,9 +1051,22 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="hexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<object class="GtkFrame" id="frame1">
|
||||
<property name="valign">start</property>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="label" translatable="yes"><b>Video</b></property>
|
||||
<property name="use-markup">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkVideo">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="autoplay">1</property>
|
||||
<property name="loop">1</property>
|
||||
<property name="file">resource:///org/gtk/WidgetFactory4/gtk-logo.webm</property>
|
||||
@@ -1062,78 +1075,66 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label1">
|
||||
<property name="label" translatable="yes"><b>Text Styles</b></property>
|
||||
<property name="use-markup">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="vscrollbar-policy">automatic</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="vscrollbar-policy">automatic</property>
|
||||
<property name="propagate-natural-height">1</property>
|
||||
<property name="propagate-natural-width">1</property>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Large Title</property>
|
||||
<style><class name="large-title"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Title 1</property>
|
||||
<style><class name="title-1"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Title 2</property>
|
||||
<style><class name="title-2"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Title 3</property>
|
||||
<style><class name="title-3"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Title 4</property>
|
||||
<style><class name="title-4"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Heading</property>
|
||||
<style><class name="heading"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Body</property>
|
||||
<style><class name="body"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Caption Heading</property>
|
||||
<style><class name="caption-heading"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Caption</property>
|
||||
<style><class name="caption"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Large Title</property>
|
||||
<style><class name="large-title"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Title 1</property>
|
||||
<style><class name="title-1"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Title 2</property>
|
||||
<style><class name="title-2"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Title 3</property>
|
||||
<style><class name="title-3"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Title 4</property>
|
||||
<style><class name="title-4"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Heading</property>
|
||||
<style><class name="heading"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Body</property>
|
||||
<style><class name="body"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Caption Heading</property>
|
||||
<style><class name="caption-heading"/></style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Caption</property>
|
||||
<style><class name="caption"/></style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -1250,21 +1251,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
<property name="child">
|
||||
<object class="GtkPicture">
|
||||
<property name="file">resource:///org/gtk/WidgetFactory4/sunset.jpg</property>
|
||||
<child>
|
||||
<object class="GtkDragSource">
|
||||
<property name="actions">copy</property>
|
||||
<signal name="prepare" handler="on_picture_drag_prepare" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkDropTarget">
|
||||
<property name="actions">copy</property>
|
||||
<property name="formats">GdkTexture</property>
|
||||
<signal name="drop" handler="on_picture_drop" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkBox" id="box6">
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="tab">
|
||||
@@ -1277,21 +1265,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
<property name="child">
|
||||
<object class="GtkPicture">
|
||||
<property name="file">resource:///org/gtk/WidgetFactory4/nyc.jpg</property>
|
||||
<child>
|
||||
<object class="GtkDragSource">
|
||||
<property name="actions">copy</property>
|
||||
<signal name="prepare" handler="on_picture_drag_prepare" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkDropTarget">
|
||||
<property name="actions">copy</property>
|
||||
<property name="formats">GdkTexture</property>
|
||||
<signal name="drop" handler="on_picture_drop" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkBox" id="box7">
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="tab">
|
||||
@@ -1303,22 +1278,10 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
<property name="position">2</property>
|
||||
<property name="child">
|
||||
<object class="GtkPicture">
|
||||
<property name="file">resource:///org/gtk/WidgetFactory4/beach.jpg</property>
|
||||
<child>
|
||||
<object class="GtkDragSource">
|
||||
<property name="actions">copy</property>
|
||||
<signal name="prepare" handler="on_picture_drag_prepare" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkDropTarget">
|
||||
<property name="actions">copy</property>
|
||||
<property name="formats">GdkTexture</property>
|
||||
<signal name="drop" handler="on_picture_drop" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
<object class="GtkBox" id="box8">
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="tab">
|
||||
@@ -1336,7 +1299,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
<property name="child">
|
||||
<object class="GtkBox" id="box8">
|
||||
<object class="GtkBox" id="box9">
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</property>
|
||||
|
||||
@@ -13,7 +13,7 @@ devhelp = true
|
||||
[dependencies."GObject-2.0"]
|
||||
name = "GObject"
|
||||
description = "The base type system library"
|
||||
docs_url = "https://docs.gtk.org/gobject/"
|
||||
docs_url = "https://developer.gnome.org/gobject/stable"
|
||||
|
||||
[theme]
|
||||
name = "basic"
|
||||
|
||||
@@ -13,7 +13,7 @@ devhelp = true
|
||||
[dependencies."GObject-2.0"]
|
||||
name = "GObject"
|
||||
description = "The base type system library"
|
||||
docs_url = "https://docs.gtk.org/gobject/"
|
||||
docs_url = "https://developer.gnome.org/gobject/stable"
|
||||
|
||||
[theme]
|
||||
name = "basic"
|
||||
|
||||
@@ -14,7 +14,7 @@ search_index = true
|
||||
[dependencies."GObject-2.0"]
|
||||
name = "GObject"
|
||||
description = "The base type system library"
|
||||
docs_url = "https://docs.gtk.org/gobject/"
|
||||
docs_url = "https://developer.gnome.org/gobject/stable"
|
||||
|
||||
[dependencies."cairo-1.0"]
|
||||
name = "Cairo"
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
expand_content_md_files = [
|
||||
]
|
||||
|
||||
if get_option('gtk_doc')
|
||||
gdk4_toml = configure_file(
|
||||
input: 'gdk4.toml.in',
|
||||
output: 'gdk4.toml',
|
||||
configuration: toml_conf,
|
||||
install: true,
|
||||
install_dir: docs_dir / 'gdk4',
|
||||
)
|
||||
gdk4_toml = configure_file(input: 'gdk4.toml.in', output: 'gdk4.toml', configuration: toml_conf)
|
||||
gdk4x11_toml = configure_file(input: 'gdk4-x11.toml.in', output: 'gdk4-x11.toml', configuration: toml_conf)
|
||||
gdk4wayland_toml = configure_file(input: 'gdk4-wayland.toml.in', output: 'gdk4-wayland.toml', configuration: toml_conf)
|
||||
|
||||
if get_option('gtk_doc')
|
||||
custom_target('gdk4-doc',
|
||||
input: [ gdk4_toml, gdk_gir[0] ],
|
||||
output: 'gdk4',
|
||||
@@ -32,14 +28,6 @@ if get_option('gtk_doc')
|
||||
)
|
||||
|
||||
if x11_enabled
|
||||
gdk4x11_toml = configure_file(
|
||||
input: 'gdk4-x11.toml.in',
|
||||
output: 'gdk4-x11.toml',
|
||||
configuration: toml_conf,
|
||||
install: true,
|
||||
install_dir: docs_dir / 'gdk4-x11',
|
||||
)
|
||||
|
||||
custom_target('gdk4-x11-doc',
|
||||
input: [ gdk4x11_toml, gdk_x11_gir[0] ],
|
||||
output: 'gdk4-x11',
|
||||
@@ -64,14 +52,6 @@ if get_option('gtk_doc')
|
||||
endif
|
||||
|
||||
if wayland_enabled
|
||||
gdk4wayland_toml = configure_file(
|
||||
input: 'gdk4-wayland.toml.in',
|
||||
output: 'gdk4-wayland.toml',
|
||||
configuration: toml_conf,
|
||||
install: true,
|
||||
install_dir: docs_dir / 'gdk4-wayland',
|
||||
)
|
||||
|
||||
custom_target('gdk4-wayland-doc',
|
||||
input: [ gdk4wayland_toml, gdk_wayland_gir[0] ],
|
||||
output: 'gdk4-wayland',
|
||||
|
||||
@@ -3,14 +3,11 @@
|
||||
|
||||
// A map between namespaces and base URLs for their online documentation
|
||||
baseURLs = [
|
||||
[ 'GLib', 'https://docs.gtk.org/glib/' ],
|
||||
[ 'GObject', 'https://docs.gtk.org/gobject/' ],
|
||||
[ 'Gio', 'https://docs.gtk.org/gio/' ],
|
||||
[ 'Gdk', 'https://docs.gtk.org/gdk4/' ],
|
||||
[ 'GdkWayland', 'https://docs.gtk.org/gdk4-wayland/' ],
|
||||
[ 'GdkX11', 'https://docs.gtk.org/gdk4-x11/' ],
|
||||
[ 'Gsk', 'https://docs.gtk.org/gsk4/' ],
|
||||
[ 'Gtk', 'https://docs.gtk.org/gtk4/' ],
|
||||
[ 'Pango', 'https://docs.gtk.org/Pango/' ],
|
||||
[ 'PangoCairo', 'https://docs.gtk.org/PangoCairo/' ],
|
||||
[ 'Gdk', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4/' ],
|
||||
[ 'GdkWayland', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-wayland/' ],
|
||||
[ 'GdkX11', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-x11/' ],
|
||||
[ 'Gsk', 'https://gnome.pages.gitlab.gnome.org/gtk/gsk4/' ],
|
||||
[ 'Gtk', 'https://gnome.pages.gitlab.gnome.org/gtk/gtk4/' ],
|
||||
[ 'Pango', 'https://gnome.pages/gitlab.gnome.org/pango/pango/' ],
|
||||
[ 'PangoCairo', 'https://gnome.pages.gitlab.gnome.org/pango/pangocairo/' ],
|
||||
]
|
||||
|
||||
@@ -14,7 +14,7 @@ search_index = true
|
||||
[dependencies."GObject-2.0"]
|
||||
name = "GObject"
|
||||
description = "The base type system library"
|
||||
docs_url = "https://docs.gtk.org/gobject/"
|
||||
docs_url = "https://developer.gnome.org/gobject/stable/"
|
||||
|
||||
[dependencies."Graphene-1.0"]
|
||||
name = "Graphene"
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
if get_option('gtk_doc')
|
||||
gsk4_toml = configure_file(
|
||||
input: 'gsk4.toml.in',
|
||||
output: 'gsk4.toml',
|
||||
configuration: toml_conf,
|
||||
install: true,
|
||||
install_dir: docs_dir / 'gsk4',
|
||||
)
|
||||
gsk4_toml = configure_file(input: 'gsk4.toml.in', output: 'gsk4.toml', configuration: toml_conf)
|
||||
|
||||
if get_option('gtk_doc')
|
||||
custom_target('gsk4-doc',
|
||||
input: [ gsk4_toml, gsk_gir[0] ],
|
||||
output: 'gsk4',
|
||||
|
||||
@@ -3,14 +3,11 @@
|
||||
|
||||
// A map between namespaces and base URLs for their online documentation
|
||||
baseURLs = [
|
||||
[ 'GLib', 'https://docs.gtk.org/glib/' ],
|
||||
[ 'GObject', 'https://docs.gtk.org/gobject/' ],
|
||||
[ 'Gio', 'https://docs.gtk.org/gio/' ],
|
||||
[ 'Gdk', 'https://docs.gtk.org/gdk4/' ],
|
||||
[ 'GdkWayland', 'https://docs.gtk.org/gdk4-wayland/' ],
|
||||
[ 'GdkX11', 'https://docs.gtk.org/gdk4-x11/' ],
|
||||
[ 'Gsk', 'https://docs.gtk.org/gsk4/' ],
|
||||
[ 'Gtk', 'https://docs.gtk.org/gtk4/' ],
|
||||
[ 'Pango', 'https://docs.gtk.org/Pango/' ],
|
||||
[ 'PangoCairo', 'https://docs.gtk.org/PangoCairo/' ],
|
||||
[ 'Gdk', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4/' ],
|
||||
[ 'GdkWayland', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-wayland/' ],
|
||||
[ 'GdkX11', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-x11/' ],
|
||||
[ 'Gsk', 'https://gnome.pages.gitlab.gnome.org/gtk/gsk4/' ],
|
||||
[ 'Gtk', 'https://gnome.pages.gitlab.gnome.org/gtk/gtk4/' ],
|
||||
[ 'Pango', 'https://gnome.pages/gitlab.gnome.org/pango/pango/' ],
|
||||
[ 'PangoCairo', 'https://gnome.pages.gitlab.gnome.org/pango/pangocairo/' ],
|
||||
]
|
||||
|
||||
@@ -14,7 +14,7 @@ search_index = true
|
||||
[dependencies."GObject-2.0"]
|
||||
name = "GObject"
|
||||
description = "The base type system library"
|
||||
docs_url = "https://docs.gtk.org/gobject/"
|
||||
docs_url = "https://developer.gnome.org/gobject/stable"
|
||||
|
||||
[dependencies."Graphene-1.0"]
|
||||
name = "Graphene"
|
||||
|
||||
@@ -27,15 +27,9 @@ expand_content_md_files = [
|
||||
'visual_index.md'
|
||||
]
|
||||
|
||||
if get_option('gtk_doc')
|
||||
gtk4_toml = configure_file(
|
||||
input: 'gtk4.toml.in',
|
||||
output: 'gtk4.toml',
|
||||
configuration: toml_conf,
|
||||
install: true,
|
||||
install_dir: docs_dir / 'gtk4',
|
||||
)
|
||||
gtk4_toml = configure_file(input: 'gtk4.toml.in', output: 'gtk4.toml', configuration: toml_conf)
|
||||
|
||||
if get_option('gtk_doc')
|
||||
custom_target('gtk4-doc',
|
||||
input: [ gtk4_toml, gtk_gir[0] ],
|
||||
output: 'gtk4',
|
||||
|
||||
@@ -3,14 +3,11 @@
|
||||
|
||||
// A map between namespaces and base URLs for their online documentation
|
||||
baseURLs = [
|
||||
[ 'GLib', 'https://docs.gtk.org/glib/' ],
|
||||
[ 'GObject', 'https://docs.gtk.org/gobject/' ],
|
||||
[ 'Gio', 'https://docs.gtk.org/gio/' ],
|
||||
[ 'Gdk', 'https://docs.gtk.org/gdk4/' ],
|
||||
[ 'GdkWayland', 'https://docs.gtk.org/gdk4-wayland/' ],
|
||||
[ 'GdkX11', 'https://docs.gtk.org/gdk4-x11/' ],
|
||||
[ 'Gsk', 'https://docs.gtk.org/gsk4/' ],
|
||||
[ 'Gtk', 'https://docs.gtk.org/gtk4/' ],
|
||||
[ 'Pango', 'https://docs.gtk.org/Pango/' ],
|
||||
[ 'PangoCairo', 'https://docs.gtk.org/PangoCairo/' ],
|
||||
[ 'Gdk', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4/' ],
|
||||
[ 'GdkWayland', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-wayland/' ],
|
||||
[ 'GdkX11', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-x11/' ],
|
||||
[ 'Gsk', 'https://gnome.pages.gitlab.gnome.org/gtk/gsk4/' ],
|
||||
[ 'Gtk', 'https://gnome.pages.gitlab.gnome.org/gtk/gtk4/' ],
|
||||
[ 'Pango', 'https://gnome.pages/gitlab.gnome.org/pango/pango/' ],
|
||||
[ 'PangoCairo', 'https://gnome.pages.gitlab.gnome.org/pango/pangocairo/' ],
|
||||
]
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkdeviceprivate.h"
|
||||
#include <gdk/gdktextureprivate.h>
|
||||
#include "gdk-private.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib/gprintf.h>
|
||||
@@ -464,7 +463,7 @@ gdk_broadway_display_flush_in_idle (GdkDisplay *display)
|
||||
if (broadway_display->idle_flush_id == 0)
|
||||
{
|
||||
broadway_display->idle_flush_id = g_idle_add (flush_idle, g_object_ref (display));
|
||||
gdk_source_set_static_name_by_id (broadway_display->idle_flush_id, "[gtk] flush_idle");
|
||||
g_source_set_name_by_id (broadway_display->idle_flush_id, "[gtk] flush_idle");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,11 +57,4 @@ guint gdk_parse_debug_var (const char *variable,
|
||||
# define g_memdup2(mem,size) g_memdup((mem),(size))
|
||||
#endif
|
||||
|
||||
void gdk_source_set_static_name_by_id (guint tag,
|
||||
const char *name);
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 69, 1)
|
||||
#define g_source_set_static_name(source, name) g_source_set_name ((source), (name))
|
||||
#endif
|
||||
|
||||
#endif /* __GDK__PRIVATE_H__ */
|
||||
|
||||
@@ -414,17 +414,3 @@ gdk_find_base_dir (const char *text,
|
||||
return dir;
|
||||
}
|
||||
|
||||
void
|
||||
gdk_source_set_static_name_by_id (guint tag,
|
||||
const char *name)
|
||||
{
|
||||
GSource *source;
|
||||
|
||||
g_return_if_fail (tag > 0);
|
||||
|
||||
source = g_main_context_find_source_by_id (NULL, tag);
|
||||
if (source == NULL)
|
||||
return;
|
||||
|
||||
g_source_set_static_name (source, name);
|
||||
}
|
||||
|
||||
+8
-76
@@ -179,76 +179,6 @@ gdk_content_formats_new_for_gtype (GType type)
|
||||
return gdk_content_formats_new_take (data, 1, NULL, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_content_formats_parse:
|
||||
* @string: the string to parse
|
||||
*
|
||||
* Parses the given @string into `GdkContentFormats` and
|
||||
* returns the formats.
|
||||
*
|
||||
* Strings printed via [method@Gdk.ContentFormats.to_string]
|
||||
* can be read in again successfully using this function.
|
||||
*
|
||||
* If @string does not describe valid content formats, %NULL
|
||||
* is returned.
|
||||
*
|
||||
* Returns: (nullable): the content formats if @string is valid
|
||||
*
|
||||
* Since: 4.4
|
||||
*/
|
||||
GdkContentFormats *
|
||||
gdk_content_formats_parse (const char *string)
|
||||
{
|
||||
GdkContentFormatsBuilder *builder;
|
||||
char **split;
|
||||
gsize i;
|
||||
|
||||
g_return_val_if_fail (string != NULL, NULL);
|
||||
|
||||
split = g_strsplit_set (string, "\t\n\f\r ", -1); /* same as g_ascii_isspace() */
|
||||
builder = gdk_content_formats_builder_new ();
|
||||
|
||||
/* first the GTypes */
|
||||
for (i = 0; split[i] != NULL; i++)
|
||||
{
|
||||
GType type;
|
||||
|
||||
if (split[i][0] == 0)
|
||||
continue;
|
||||
|
||||
type = g_type_from_name (split[i]);
|
||||
if (type != 0)
|
||||
gdk_content_formats_builder_add_gtype (builder, type);
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
/* then the mime types */
|
||||
for (; split[i] != NULL; i++)
|
||||
{
|
||||
const char *mime_type;
|
||||
|
||||
if (split[i][0] == 0)
|
||||
continue;
|
||||
|
||||
mime_type = gdk_intern_mime_type (split[i]);
|
||||
if (mime_type)
|
||||
gdk_content_formats_builder_add_mime_type (builder, mime_type);
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
if (split[i] != NULL)
|
||||
{
|
||||
g_strfreev (split);
|
||||
gdk_content_formats_builder_unref (builder);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_strfreev (split);
|
||||
return gdk_content_formats_builder_free_to_formats (builder);
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_content_formats_ref:
|
||||
* @formats: a `GdkContentFormats`
|
||||
@@ -297,8 +227,10 @@ gdk_content_formats_unref (GdkContentFormats *formats)
|
||||
*
|
||||
* Prints the given @formats into a string for human consumption.
|
||||
*
|
||||
* The result of this function can later be parsed with
|
||||
* [func@Gdk.ContentFormats.parse].
|
||||
* This is meant for debugging and logging.
|
||||
*
|
||||
* The form of the representation may change at any time and is
|
||||
* not guaranteed to stay identical.
|
||||
*/
|
||||
void
|
||||
gdk_content_formats_print (GdkContentFormats *formats,
|
||||
@@ -309,18 +241,20 @@ gdk_content_formats_print (GdkContentFormats *formats,
|
||||
g_return_if_fail (formats != NULL);
|
||||
g_return_if_fail (string != NULL);
|
||||
|
||||
g_string_append (string, "{ ");
|
||||
for (i = 0; i < formats->n_gtypes; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
g_string_append (string, " ");
|
||||
g_string_append (string, ", ");
|
||||
g_string_append (string, g_type_name (formats->gtypes[i]));
|
||||
}
|
||||
for (i = 0; i < formats->n_mime_types; i++)
|
||||
{
|
||||
if (i > 0 || formats->n_gtypes > 0)
|
||||
g_string_append (string, " ");
|
||||
g_string_append (string, ", ");
|
||||
g_string_append (string, formats->mime_types[i]);
|
||||
}
|
||||
g_string_append (string, " }");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -329,8 +263,6 @@ gdk_content_formats_print (GdkContentFormats *formats,
|
||||
*
|
||||
* Prints the given @formats into a human-readable string.
|
||||
*
|
||||
* The resulting string can be parsed with [func@Gdk.ContentFormats.parse].
|
||||
*
|
||||
* This is a small wrapper around [method@Gdk.ContentFormats.print]
|
||||
* to help when debugging.
|
||||
*
|
||||
|
||||
@@ -40,8 +40,6 @@ GdkContentFormats * gdk_content_formats_new (const char
|
||||
guint n_mime_types);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkContentFormats * gdk_content_formats_new_for_gtype (GType type);
|
||||
GDK_AVAILABLE_IN_4_4
|
||||
GdkContentFormats * gdk_content_formats_parse (const char *string);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkContentFormats * gdk_content_formats_ref (GdkContentFormats *formats);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkframeclockprivate.h"
|
||||
#include "gdk.h"
|
||||
#include "gdk-private.h"
|
||||
#include "gdkprofilerprivate.h"
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
@@ -308,15 +307,12 @@ maybe_start_idle (GdkFrameClockIdle *clock_idle,
|
||||
|
||||
if (priv->flush_idle_id == 0 && RUN_FLUSH_IDLE (priv))
|
||||
{
|
||||
GSource *source;
|
||||
|
||||
priv->flush_idle_id = g_timeout_add_full (GDK_PRIORITY_EVENTS + 1,
|
||||
min_interval,
|
||||
gdk_frame_clock_flush_idle,
|
||||
g_object_ref (clock_idle),
|
||||
(GDestroyNotify) g_object_unref);
|
||||
source = g_main_context_find_source_by_id (NULL, priv->flush_idle_id);
|
||||
g_source_set_static_name (source, "[gtk] gdk_frame_clock_flush_idle");
|
||||
g_source_set_name_by_id (priv->flush_idle_id, "[gtk] gdk_frame_clock_flush_idle");
|
||||
}
|
||||
|
||||
if (!priv->in_paint_idle &&
|
||||
@@ -328,7 +324,7 @@ maybe_start_idle (GdkFrameClockIdle *clock_idle,
|
||||
gdk_frame_clock_paint_idle,
|
||||
g_object_ref (clock_idle),
|
||||
(GDestroyNotify) g_object_unref);
|
||||
gdk_source_set_static_name_by_id (priv->paint_idle_id, "[gtk] gdk_frame_clock_paint_idle");
|
||||
g_source_set_name_by_id (priv->paint_idle_id, "[gtk] gdk_frame_clock_paint_idle");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -856,8 +856,6 @@ gdk_gl_context_set_is_legacy (GdkGLContext *context,
|
||||
* is not, this function will return %FALSE.
|
||||
*
|
||||
* Returns: %TRUE if the two GL contexts are compatible.
|
||||
*
|
||||
* Since: 4.4
|
||||
*/
|
||||
gboolean
|
||||
gdk_gl_context_is_shared (GdkGLContext *self,
|
||||
|
||||
@@ -78,13 +78,6 @@ gdk_toplevel_default_show_window_menu (GdkToplevel *toplevel,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_toplevel_default_titlebar_gesture (GdkToplevel *toplevel,
|
||||
GdkTitlebarGesture gesture)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_toplevel_default_supports_edge_constraints (GdkToplevel *toplevel)
|
||||
{
|
||||
@@ -121,7 +114,6 @@ gdk_toplevel_default_init (GdkToplevelInterface *iface)
|
||||
iface->supports_edge_constraints = gdk_toplevel_default_supports_edge_constraints;
|
||||
iface->inhibit_system_shortcuts = gdk_toplevel_default_inhibit_system_shortcuts;
|
||||
iface->restore_system_shortcuts = gdk_toplevel_default_restore_system_shortcuts;
|
||||
iface->titlebar_gesture = gdk_toplevel_default_titlebar_gesture;
|
||||
|
||||
/**
|
||||
* GdkToplevel:state: (attributes org.gtk.Property.get=gdk_toplevel_get_state)
|
||||
@@ -724,13 +716,3 @@ gdk_toplevel_begin_move (GdkToplevel *toplevel,
|
||||
x, y,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gdk_toplevel_titlebar_gesture (GdkToplevel *toplevel,
|
||||
GdkTitlebarGesture gesture)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_TOPLEVEL (toplevel), FALSE);
|
||||
|
||||
return GDK_TOPLEVEL_GET_IFACE (toplevel)->titlebar_gesture (toplevel,
|
||||
gesture);
|
||||
}
|
||||
|
||||
@@ -115,13 +115,6 @@ typedef enum
|
||||
GDK_TOPLEVEL_STATE_LEFT_RESIZABLE = 1 << 15
|
||||
} GdkToplevelState;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
GDK_TITLEBAR_GESTURE_DOUBLE_CLICK = 1,
|
||||
GDK_TITLEBAR_GESTURE_RIGHT_CLICK = 2,
|
||||
GDK_TITLEBAR_GESTURE_MIDDLE_CLICK = 3
|
||||
} GdkTitlebarGesture;
|
||||
|
||||
|
||||
#define GDK_TYPE_TOPLEVEL (gdk_toplevel_get_type ())
|
||||
|
||||
@@ -203,10 +196,6 @@ void gdk_toplevel_begin_move (GdkToplevel *toplevel,
|
||||
double y,
|
||||
guint32 timestamp);
|
||||
|
||||
GDK_AVAILABLE_IN_4_4
|
||||
gboolean gdk_toplevel_titlebar_gesture (GdkToplevel *toplevel,
|
||||
GdkTitlebarGesture gesture);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_TOPLEVEL_H__ */
|
||||
|
||||
@@ -38,8 +38,6 @@ struct _GdkToplevelInterface
|
||||
double x,
|
||||
double y,
|
||||
guint32 timestamp);
|
||||
gboolean (* titlebar_gesture) (GdkToplevel *toplevel,
|
||||
GdkTitlebarGesture gesture);
|
||||
};
|
||||
|
||||
typedef enum
|
||||
|
||||
@@ -197,7 +197,7 @@ gdk_display_link_source_new (void)
|
||||
gdk_display_link_source_frame_cb,
|
||||
source);
|
||||
|
||||
g_source_set_static_name (source, "[gdk] quartz frame clock");
|
||||
g_source_set_name (source, "[gdk] quartz frame clock");
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "gdkdeviceprivate.h"
|
||||
#include "gdkintl.h"
|
||||
#include "gdk-private.h"
|
||||
|
||||
#include "gdkmacosdevice-private.h"
|
||||
#include "gdkmacoscursor-private.h"
|
||||
@@ -162,7 +161,7 @@ gdk_macos_drag_drop_done (GdkDrag *drag,
|
||||
gdk_macos_zoomback_timeout,
|
||||
zb,
|
||||
(GDestroyNotify) gdk_macos_zoomback_destroy);
|
||||
gdk_source_set_static_name_by_id (id, "[gtk] gdk_macos_zoomback_timeout");
|
||||
g_source_set_name_by_id (id, "[gtk] gdk_macos_zoomback_timeout");
|
||||
g_object_unref (drag);
|
||||
}
|
||||
|
||||
@@ -243,11 +242,9 @@ gdk_macos_drag_drop_performed (GdkDrag *drag,
|
||||
|
||||
g_assert (GDK_IS_MACOS_DRAG (self));
|
||||
|
||||
g_object_ref (self);
|
||||
drag_ungrab (self);
|
||||
g_signal_emit_by_name (drag, "dnd-finished");
|
||||
gdk_drag_drop_done (drag, TRUE);
|
||||
g_object_unref (self);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -1063,7 +1063,7 @@ _gdk_macos_event_source_new (GdkMacosDisplay *display)
|
||||
event_poll_fd.fd = -1;
|
||||
|
||||
source = g_source_new (&event_funcs, sizeof (GdkMacosEventSource));
|
||||
g_source_set_static_name (source, "GDK Quartz event source");
|
||||
g_source_set_name (source, "GDK Quartz event source");
|
||||
g_source_add_poll (source, &event_poll_fd);
|
||||
g_source_set_priority (source, GDK_PRIORITY_EVENTS);
|
||||
g_source_set_can_recurse (source, TRUE);
|
||||
|
||||
@@ -460,7 +460,6 @@ gdk_wayland_device_update_surface_cursor (GdkDevice *device)
|
||||
pointer->cursor_timeout_id == 0)
|
||||
{
|
||||
guint id;
|
||||
GSource *source;
|
||||
|
||||
gdk_wayland_pointer_stop_cursor_animation (pointer);
|
||||
|
||||
@@ -468,8 +467,7 @@ gdk_wayland_device_update_surface_cursor (GdkDevice *device)
|
||||
id = g_timeout_add (next_image_delay,
|
||||
(GSourceFunc) gdk_wayland_device_update_surface_cursor,
|
||||
device);
|
||||
source = g_main_context_find_source_by_id (NULL, id);
|
||||
g_source_set_static_name (source, "[gtk] gdk_wayland_device_update_surface_cursor");
|
||||
g_source_set_name_by_id (id, "[gtk] gdk_wayland_device_update_surface_cursor");
|
||||
pointer->cursor_timeout_id = id;
|
||||
}
|
||||
else
|
||||
@@ -2220,7 +2218,7 @@ deliver_key_event (GdkWaylandSeat *seat,
|
||||
timeout = (seat->repeat_deadline - now) / 1000L;
|
||||
|
||||
seat->repeat_timer = g_timeout_add (timeout, keyboard_repeat, seat);
|
||||
gdk_source_set_static_name_by_id (seat->repeat_timer, "[gtk] keyboard_repeat");
|
||||
g_source_set_name_by_id (seat->repeat_timer, "[gtk] keyboard_repeat");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
#define MIN_SYSTEM_BELL_DELAY_MS 20
|
||||
|
||||
#define GTK_SHELL1_VERSION 5
|
||||
#define GTK_SHELL1_VERSION 4
|
||||
#define OUTPUT_VERSION_WITH_DONE 2
|
||||
#define NO_XDG_OUTPUT_DONE_SINCE_VERSION 3
|
||||
#define XDG_ACTIVATION_VERSION 1
|
||||
|
||||
@@ -290,10 +290,8 @@ data_source_dnd_finished (void *data,
|
||||
{
|
||||
GdkDrag *drag = data;
|
||||
|
||||
g_object_ref (drag);
|
||||
g_signal_emit_by_name (drag, "dnd-finished");
|
||||
gdk_drag_drop_done (drag, TRUE);
|
||||
g_object_unref (drag);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -4190,65 +4190,6 @@ gdk_wayland_surface_show_window_menu (GdkSurface *surface,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
translate_gesture (GdkTitlebarGesture gesture,
|
||||
enum gtk_surface1_gesture *out_gesture)
|
||||
{
|
||||
switch (gesture)
|
||||
{
|
||||
case GDK_TITLEBAR_GESTURE_DOUBLE_CLICK:
|
||||
*out_gesture = GTK_SURFACE1_GESTURE_DOUBLE_CLICK;
|
||||
break;
|
||||
|
||||
case GDK_TITLEBAR_GESTURE_RIGHT_CLICK:
|
||||
*out_gesture = GTK_SURFACE1_GESTURE_RIGHT_CLICK;
|
||||
break;
|
||||
|
||||
case GDK_TITLEBAR_GESTURE_MIDDLE_CLICK:
|
||||
*out_gesture = GTK_SURFACE1_GESTURE_MIDDLE_CLICK;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_warning ("Not handling unknown titlebar gesture %u", gesture);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_wayland_surface_titlebar_gesture (GdkSurface *surface,
|
||||
GdkTitlebarGesture gesture)
|
||||
{
|
||||
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
|
||||
struct gtk_surface1 *gtk_surface = impl->display_server.gtk_surface;
|
||||
enum gtk_surface1_gesture gtk_gesture;
|
||||
GdkSeat *seat;
|
||||
struct wl_seat *wl_seat;
|
||||
uint32_t serial;
|
||||
|
||||
if (!gtk_surface)
|
||||
return FALSE;
|
||||
|
||||
if (gtk_surface1_get_version (gtk_surface) < GTK_SURFACE1_TITLEBAR_GESTURE_SINCE_VERSION)
|
||||
return FALSE;
|
||||
|
||||
if (!translate_gesture (gesture, >k_gesture))
|
||||
return FALSE;
|
||||
|
||||
seat = gdk_display_get_default_seat (surface->display);
|
||||
wl_seat = gdk_wayland_seat_get_wl_seat (seat);
|
||||
|
||||
serial = _gdk_wayland_seat_get_last_implicit_grab_serial (GDK_WAYLAND_SEAT (seat), NULL);
|
||||
|
||||
gtk_surface1_titlebar_gesture (impl->display_server.gtk_surface,
|
||||
serial,
|
||||
wl_seat,
|
||||
gtk_gesture);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_wayland_surface_supports_edge_constraints (GdkSurface *surface)
|
||||
{
|
||||
@@ -5046,13 +4987,6 @@ gdk_wayland_toplevel_show_window_menu (GdkToplevel *toplevel,
|
||||
return gdk_wayland_surface_show_window_menu (GDK_SURFACE (toplevel), event);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_wayland_toplevel_titlebar_gesture (GdkToplevel *toplevel,
|
||||
GdkTitlebarGesture gesture)
|
||||
{
|
||||
return gdk_wayland_surface_titlebar_gesture (GDK_SURFACE (toplevel), gesture);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_wayland_toplevel_supports_edge_constraints (GdkToplevel *toplevel)
|
||||
{
|
||||
@@ -5131,7 +5065,6 @@ gdk_wayland_toplevel_iface_init (GdkToplevelInterface *iface)
|
||||
iface->lower = gdk_wayland_toplevel_lower;
|
||||
iface->focus = gdk_wayland_toplevel_focus;
|
||||
iface->show_window_menu = gdk_wayland_toplevel_show_window_menu;
|
||||
iface->titlebar_gesture = gdk_wayland_toplevel_titlebar_gesture;
|
||||
iface->supports_edge_constraints = gdk_wayland_toplevel_supports_edge_constraints;
|
||||
iface->inhibit_system_shortcuts = gdk_wayland_toplevel_inhibit_system_shortcuts;
|
||||
iface->restore_system_shortcuts = gdk_wayland_toplevel_restore_system_shortcuts;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<protocol name="gtk">
|
||||
|
||||
<interface name="gtk_shell1" version="5">
|
||||
<interface name="gtk_shell1" version="4">
|
||||
<description summary="gtk specific extensions">
|
||||
gtk_shell is a protocol extension providing additional features for
|
||||
clients implementing it.
|
||||
@@ -35,7 +35,7 @@
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="gtk_surface1" version="5">
|
||||
<interface name="gtk_surface1" version="4">
|
||||
<request name="set_dbus_properties">
|
||||
<arg name="application_id" type="string" allow-null="true"/>
|
||||
<arg name="app_menu_path" type="string" allow-null="true"/>
|
||||
@@ -85,23 +85,6 @@
|
||||
|
||||
<!-- Version 4 additions -->
|
||||
<request name="release" type="destructor" since="4"/>
|
||||
|
||||
<!-- Version 5 additions -->
|
||||
<enum name="gesture" since="5">
|
||||
<entry name="double_click" value="1"/>
|
||||
<entry name="right_click" value="2"/>
|
||||
<entry name="middle_click" value="3"/>
|
||||
</enum>
|
||||
|
||||
<enum name="error" since="5">
|
||||
<entry name="invalid_gesture" value="0"/>
|
||||
</enum>
|
||||
|
||||
<request name="titlebar_gesture" since="5">
|
||||
<arg name="serial" type="uint"/>
|
||||
<arg name="seat" type="object" interface="wl_seat"/>
|
||||
<arg name="gesture" type="uint" enum="gesture"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
||||
|
||||
@@ -27,8 +27,6 @@
|
||||
#include "config.h"
|
||||
#include <string.h>
|
||||
|
||||
#include "gdk-private.h"
|
||||
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
@@ -2198,7 +2196,7 @@ gdk_win32_drag_drop_done (GdkDrag *drag,
|
||||
id = g_timeout_add_full (G_PRIORITY_DEFAULT, 17,
|
||||
gdk_drag_anim_timeout, anim,
|
||||
(GDestroyNotify) gdk_drag_anim_destroy);
|
||||
gdk_source_set_static_name_by_id (id, "[gtk] gdk_drag_anim_timeout");
|
||||
g_source_set_name_by_id (id, "[gtk] gdk_drag_anim_timeout");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
#include "gdkdisplay-win32.h"
|
||||
//#include "gdkselection-win32.h"
|
||||
#include "gdkdragprivate.h"
|
||||
#include "gdk-private.h"
|
||||
|
||||
#include <windowsx.h>
|
||||
|
||||
@@ -503,7 +502,7 @@ _gdk_events_init (GdkDisplay *display)
|
||||
#endif
|
||||
|
||||
source = g_source_new (&event_funcs, sizeof (GdkWin32EventSource));
|
||||
g_source_set_static_name (source, "GDK Win32 event source");
|
||||
g_source_set_name (source, "GDK Win32 event source");
|
||||
g_source_set_priority (source, GDK_PRIORITY_EVENTS);
|
||||
|
||||
event_source = (GdkWin32EventSource *)source;
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "gdkintl.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
#include "gdkdisplay-x11.h"
|
||||
#include "gdk-private.h"
|
||||
|
||||
#include <glib.h>
|
||||
#ifdef HAVE_DESKTOPAPPINFO
|
||||
@@ -220,7 +219,7 @@ startup_timeout (void *data)
|
||||
std->timeout_id = 0;
|
||||
else {
|
||||
std->timeout_id = g_timeout_add_seconds ((min_timeout + 500)/1000, startup_timeout, std);
|
||||
gdk_source_set_static_name_by_id (std->timeout_id, "[gtk] startup_timeout");
|
||||
g_source_set_name_by_id (std->timeout_id, "[gtk] startup_timeout");
|
||||
}
|
||||
|
||||
/* always remove this one, but we may have reinstalled another one. */
|
||||
@@ -257,7 +256,7 @@ add_startup_timeout (GdkX11Screen *screen,
|
||||
if (data->timeout_id == 0) {
|
||||
data->timeout_id = g_timeout_add_seconds (STARTUP_TIMEOUT_LENGTH_SECONDS,
|
||||
startup_timeout, data);
|
||||
gdk_source_set_static_name_by_id (data->timeout_id, "[gtk] startup_timeout");
|
||||
g_source_set_name_by_id (data->timeout_id, "[gtk] startup_timeout");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-3
@@ -46,7 +46,6 @@ in this Software without prior written authorization from The Open Group.
|
||||
#include "gdkasync.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
#include "gdkdisplay-x11.h"
|
||||
#include "gdk-private.h"
|
||||
|
||||
#include <X11/Xlibint.h>
|
||||
|
||||
@@ -172,7 +171,7 @@ send_event_handler (Display *dpy,
|
||||
{
|
||||
guint id;
|
||||
id = g_idle_add (callback_idle, state);
|
||||
gdk_source_set_static_name_by_id (id, "[gtk] callback_idle");
|
||||
g_source_set_name_by_id (id, "[gtk] callback_idle");
|
||||
}
|
||||
|
||||
DeqAsyncHandler(state->dpy, &state->async);
|
||||
@@ -708,7 +707,7 @@ roundtrip_handler (Display *dpy,
|
||||
{
|
||||
guint id;
|
||||
id = g_idle_add (roundtrip_callback_idle, state);
|
||||
gdk_source_set_static_name_by_id (id, "[gtk] roundtrip_callback_idle");
|
||||
g_source_set_name_by_id (id, "[gtk] roundtrip_callback_idle");
|
||||
}
|
||||
|
||||
DeqAsyncHandler(state->dpy, &state->async);
|
||||
|
||||
@@ -204,9 +204,6 @@ static void
|
||||
gdk_x11_display_init (GdkX11Display *self)
|
||||
{
|
||||
self->monitors = g_list_store_new (GDK_TYPE_MONITOR);
|
||||
self->program_class = g_strdup (g_get_prgname ());
|
||||
if (self->program_class && self->program_class[0])
|
||||
self->program_class[0] = g_ascii_toupper (self->program_class[0]);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -884,10 +884,8 @@ gdk_x11_drag_handle_finished (GdkDisplay *display,
|
||||
if (drag_x11->version == 5)
|
||||
drag_x11->drop_failed = xevent->xclient.data.l[1] == 0;
|
||||
|
||||
g_object_ref (drag);
|
||||
g_signal_emit_by_name (drag, "dnd-finished");
|
||||
gdk_drag_drop_done (drag, !drag_x11->drop_failed);
|
||||
g_object_unref (drag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1864,7 +1862,7 @@ gdk_x11_drag_drop_done (GdkDrag *drag,
|
||||
id = g_timeout_add_full (G_PRIORITY_DEFAULT, 17,
|
||||
gdk_drag_anim_timeout, anim,
|
||||
(GDestroyNotify) gdk_drag_anim_destroy);
|
||||
gdk_source_set_static_name_by_id (id, "[gtk] gdk_drag_anim_timeout");
|
||||
g_source_set_name_by_id (id, "[gtk] gdk_drag_anim_timeout");
|
||||
g_object_unref (drag);
|
||||
}
|
||||
|
||||
|
||||
+22
-75
@@ -30,7 +30,7 @@
|
||||
#include "gdk/gdktextureprivate.h"
|
||||
#include "gdk/gdk-private.h"
|
||||
|
||||
#include <hb-ot.h>
|
||||
#include <cairo-ft.h>
|
||||
|
||||
static inline void
|
||||
gsk_cairo_rectangle (cairo_t *cr,
|
||||
@@ -2146,7 +2146,7 @@ gsk_outset_shadow_get_extents (GskOutsetShadowNode *self,
|
||||
{
|
||||
float clip_radius;
|
||||
|
||||
clip_radius = gsk_cairo_blur_compute_pixels (self->blur_radius / 2.0);
|
||||
clip_radius = gsk_cairo_blur_compute_pixels (self->blur_radius);
|
||||
*top = MAX (0, clip_radius + self->spread - self->dy);
|
||||
*right = MAX (0, ceil (clip_radius + self->spread + self->dx));
|
||||
*bottom = MAX (0, ceil (clip_radius + self->spread + self->dy));
|
||||
@@ -3852,7 +3852,7 @@ gsk_shadow_node_diff (GskRenderNode *node1,
|
||||
return;
|
||||
}
|
||||
|
||||
clip_radius = gsk_cairo_blur_compute_pixels (shadow1->radius / 2.0);
|
||||
clip_radius = gsk_cairo_blur_compute_pixels (shadow1->radius);
|
||||
top = MAX (top, ceil (clip_radius - shadow1->dy));
|
||||
right = MAX (right, ceil (clip_radius + shadow1->dx));
|
||||
bottom = MAX (bottom, ceil (clip_radius + shadow1->dy));
|
||||
@@ -3886,7 +3886,7 @@ gsk_shadow_node_get_bounds (GskShadowNode *self,
|
||||
|
||||
for (i = 0; i < self->n_shadows; i++)
|
||||
{
|
||||
float clip_radius = gsk_cairo_blur_compute_pixels (self->shadows[i].radius / 2.0);
|
||||
float clip_radius = gsk_cairo_blur_compute_pixels (self->shadows[i].radius);
|
||||
top = MAX (top, clip_radius - self->shadows[i].dy);
|
||||
right = MAX (right, clip_radius + self->shadows[i].dx);
|
||||
bottom = MAX (bottom, clip_radius + self->shadows[i].dy);
|
||||
@@ -4377,15 +4377,6 @@ gsk_text_node_draw (GskRenderNode *node,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
/* We steal one of the bits in PangoGlyphVisAttr */
|
||||
|
||||
G_STATIC_ASSERT (sizeof (PangoGlyphVisAttr) == 4);
|
||||
|
||||
#define COLOR_GLYPH_BIT 2
|
||||
#define GLYPH_IS_COLOR(g) (((*(guint32*)&(g)->attr) & COLOR_GLYPH_BIT) != 0)
|
||||
#define GLYPH_SET_COLOR(g) (*(guint32*)(&(g)->attr) |= COLOR_GLYPH_BIT)
|
||||
#define GLYPH_CLEAR_COLOR(g) (*(guint32*)(&(g)->attr) &= ~COLOR_GLYPH_BIT)
|
||||
|
||||
static void
|
||||
gsk_text_node_diff (GskRenderNode *node1,
|
||||
GskRenderNode *node2,
|
||||
@@ -4410,8 +4401,7 @@ gsk_text_node_diff (GskRenderNode *node1,
|
||||
info1->geometry.width == info2->geometry.width &&
|
||||
info1->geometry.x_offset == info2->geometry.x_offset &&
|
||||
info1->geometry.y_offset == info2->geometry.y_offset &&
|
||||
info1->attr.is_cluster_start == info2->attr.is_cluster_start &&
|
||||
GLYPH_IS_COLOR (info1) == GLYPH_IS_COLOR (info2))
|
||||
info1->attr.is_cluster_start == info2->attr.is_cluster_start)
|
||||
continue;
|
||||
|
||||
gsk_render_node_diff_impossible (node1, node2, region);
|
||||
@@ -4425,43 +4415,20 @@ gsk_text_node_diff (GskRenderNode *node1,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
font_has_color_glyphs (PangoFont *font)
|
||||
font_has_color_glyphs (const PangoFont *font)
|
||||
{
|
||||
hb_face_t *face = hb_font_get_face (pango_font_get_hb_font (font));
|
||||
cairo_scaled_font_t *scaled_font;
|
||||
gboolean has_color = FALSE;
|
||||
|
||||
return hb_ot_color_has_layers (face) ||
|
||||
hb_ot_color_has_png (face) ||
|
||||
hb_ot_color_has_svg (face);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
glyph_has_color (PangoFont *font,
|
||||
guint glyph)
|
||||
{
|
||||
hb_font_t *hb_font = pango_font_get_hb_font (font);
|
||||
hb_face_t *face = hb_font_get_face (hb_font);
|
||||
hb_blob_t *blob;
|
||||
|
||||
if (hb_ot_color_glyph_get_layers (face, glyph, 0, NULL, NULL) > 0)
|
||||
return TRUE;
|
||||
|
||||
blob = hb_ot_color_glyph_reference_png (hb_font, glyph);
|
||||
if (blob)
|
||||
scaled_font = pango_cairo_font_get_scaled_font ((PangoCairoFont *)font);
|
||||
if (cairo_scaled_font_get_type (scaled_font) == CAIRO_FONT_TYPE_FT)
|
||||
{
|
||||
guint length = hb_blob_get_length (blob);
|
||||
hb_blob_destroy (blob);
|
||||
return length > 0;
|
||||
FT_Face ft_face = cairo_ft_scaled_font_lock_face (scaled_font);
|
||||
has_color = (FT_HAS_COLOR (ft_face) != 0);
|
||||
cairo_ft_scaled_font_unlock_face (scaled_font);
|
||||
}
|
||||
|
||||
blob = hb_ot_color_glyph_reference_svg (face, glyph);
|
||||
if (blob)
|
||||
{
|
||||
guint length = hb_blob_get_length (blob);
|
||||
hb_blob_destroy (blob);
|
||||
return length > 0;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return has_color;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4487,9 +4454,6 @@ gsk_text_node_new (PangoFont *font,
|
||||
GskTextNode *self;
|
||||
GskRenderNode *node;
|
||||
PangoRectangle ink_rect;
|
||||
PangoGlyphInfo *glyph_infos;
|
||||
gboolean has_color_glyphs;
|
||||
int n;
|
||||
|
||||
pango_glyph_string_extents (glyphs, font, &ink_rect, NULL);
|
||||
pango_extents_to_pixels (&ink_rect, NULL);
|
||||
@@ -4502,36 +4466,19 @@ gsk_text_node_new (PangoFont *font,
|
||||
node = (GskRenderNode *) self;
|
||||
|
||||
self->font = g_object_ref (font);
|
||||
self->has_color_glyphs = font_has_color_glyphs (font);
|
||||
self->color = *color;
|
||||
self->offset = *offset;
|
||||
self->has_color_glyphs = FALSE;
|
||||
self->glyphs = g_malloc_n (glyphs->num_glyphs, sizeof (PangoGlyphInfo));
|
||||
|
||||
glyph_infos = g_malloc_n (glyphs->num_glyphs, sizeof (PangoGlyphInfo));
|
||||
has_color_glyphs = font_has_color_glyphs (font);
|
||||
|
||||
n = 0;
|
||||
/* skip empty glyphs */
|
||||
self->num_glyphs = 0;
|
||||
for (int i = 0; i < glyphs->num_glyphs; i++)
|
||||
{
|
||||
/* skip empty glyphs */
|
||||
if (glyphs->glyphs[i].glyph == PANGO_GLYPH_EMPTY)
|
||||
continue;
|
||||
|
||||
glyph_infos[n] = glyphs->glyphs[i];
|
||||
GLYPH_CLEAR_COLOR (&glyph_infos[n]);
|
||||
|
||||
if (has_color_glyphs &&
|
||||
glyph_has_color (font, glyph_infos[n].glyph))
|
||||
{
|
||||
self->has_color_glyphs = TRUE;
|
||||
GLYPH_SET_COLOR (&glyph_infos[n]);
|
||||
}
|
||||
|
||||
n++;
|
||||
if (glyphs->glyphs[i].glyph != PANGO_GLYPH_EMPTY)
|
||||
self->glyphs[self->num_glyphs++] = glyphs->glyphs[i];
|
||||
}
|
||||
|
||||
self->glyphs = glyph_infos;
|
||||
self->num_glyphs = n;
|
||||
|
||||
graphene_rect_init (&node->bounds,
|
||||
offset->x + ink_rect.x - 1,
|
||||
offset->y + ink_rect.y - 1,
|
||||
@@ -4866,7 +4813,7 @@ gsk_blur_node_diff (GskRenderNode *node1,
|
||||
cairo_region_t *sub;
|
||||
int i, n, clip_radius;
|
||||
|
||||
clip_radius = ceil (gsk_cairo_blur_compute_pixels (self1->radius / 2.0));
|
||||
clip_radius = ceil (gsk_cairo_blur_compute_pixels (self1->radius));
|
||||
sub = cairo_region_create ();
|
||||
gsk_render_node_diff (self1->child, self2->child, sub);
|
||||
|
||||
@@ -4913,7 +4860,7 @@ gsk_blur_node_new (GskRenderNode *child,
|
||||
self->child = gsk_render_node_ref (child);
|
||||
self->radius = radius;
|
||||
|
||||
clip_radius = gsk_cairo_blur_compute_pixels (radius / 2.0);
|
||||
clip_radius = gsk_cairo_blur_compute_pixels (radius);
|
||||
|
||||
graphene_rect_init_from_rect (&node->bounds, &child->bounds);
|
||||
graphene_rect_inset (&self->render_node.bounds,
|
||||
|
||||
@@ -165,7 +165,8 @@ render_glyph (cairo_surface_t *surface,
|
||||
const GskNglGlyphValue *value)
|
||||
{
|
||||
cairo_t *cr;
|
||||
cairo_glyph_t glyph;
|
||||
PangoGlyphString glyph_string;
|
||||
PangoGlyphInfo glyph_info;
|
||||
|
||||
g_assert (surface != NULL);
|
||||
g_assert (scaled_font != NULL);
|
||||
@@ -174,11 +175,18 @@ render_glyph (cairo_surface_t *surface,
|
||||
cairo_set_scaled_font (cr, scaled_font);
|
||||
cairo_set_source_rgba (cr, 1, 1, 1, 1);
|
||||
|
||||
glyph.index = key->glyph;
|
||||
glyph.x = 0.25 * key->xshift - value->ink_rect.x;
|
||||
glyph.y = 0.25 * key->yshift - value->ink_rect.y;
|
||||
glyph_info.glyph = key->glyph;
|
||||
glyph_info.geometry.width = value->ink_rect.width * 1024;
|
||||
if (glyph_info.glyph & PANGO_GLYPH_UNKNOWN_FLAG)
|
||||
glyph_info.geometry.x_offset = 256 * key->xshift;
|
||||
else
|
||||
glyph_info.geometry.x_offset = 256 * key->xshift - value->ink_rect.x * 1024;
|
||||
glyph_info.geometry.y_offset = 256 * key->yshift - value->ink_rect.y * 1024;
|
||||
|
||||
cairo_show_glyphs (cr, &glyph, 1);
|
||||
glyph_string.num_glyphs = 1;
|
||||
glyph_string.glyphs = &glyph_info;
|
||||
|
||||
pango_cairo_show_glyph_string (cr, key->font, &glyph_string);
|
||||
cairo_destroy (cr);
|
||||
|
||||
cairo_surface_flush (surface);
|
||||
|
||||
+11
-19
@@ -1397,7 +1397,7 @@ gsk_ngl_render_job_visit_color_node (GskNglRenderJob *job,
|
||||
GskNglCommandBatch *batch;
|
||||
|
||||
rgba = gsk_color_node_get_color (node);
|
||||
if (RGBA_IS_CLEAR (rgba))
|
||||
if (gdk_rgba_is_clear (rgba))
|
||||
return;
|
||||
|
||||
rgba_to_half (rgba, color);
|
||||
@@ -2835,9 +2835,6 @@ compute_phase_and_pos (float value, float *pos)
|
||||
}
|
||||
}
|
||||
|
||||
#define COLOR_GLYPH_BIT 2
|
||||
#define GLYPH_IS_COLOR(g) (((*(guint32*)&(g)->attr) & COLOR_GLYPH_BIT) != 0)
|
||||
|
||||
static inline void
|
||||
gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
|
||||
const GskRenderNode *node,
|
||||
@@ -2858,9 +2855,7 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
|
||||
guint last_texture = 0;
|
||||
GskNglDrawVertex *vertices;
|
||||
guint used = 0;
|
||||
guint16 nc[4] = { FP16_MINUS_ONE, FP16_MINUS_ONE, FP16_MINUS_ONE, FP16_MINUS_ONE };
|
||||
guint16 cc[4];
|
||||
const guint16 *c;
|
||||
guint16 c[4] = { FP16_MINUS_ONE, FP16_MINUS_ONE, FP16_MINUS_ONE, FP16_MINUS_ONE };
|
||||
const PangoGlyphInfo *gi;
|
||||
guint i;
|
||||
int yshift;
|
||||
@@ -2869,11 +2864,16 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
|
||||
if (num_glyphs == 0)
|
||||
return;
|
||||
|
||||
if ((force_color || !gsk_text_node_has_color_glyphs (node)) &&
|
||||
RGBA_IS_CLEAR (color))
|
||||
return;
|
||||
/* If the font has color glyphs, we don't need to recolor anything.
|
||||
* We tell the shader by setting the color to vec4(-1).
|
||||
*/
|
||||
if (force_color || !gsk_text_node_has_color_glyphs (node))
|
||||
{
|
||||
if (gdk_rgba_is_clear (color))
|
||||
return;
|
||||
|
||||
rgba_to_half (color, cc);
|
||||
rgba_to_half (color, c);
|
||||
}
|
||||
|
||||
lookup.font = (PangoFont *)font;
|
||||
lookup.scale = (guint) (text_scale * 1024);
|
||||
@@ -2897,14 +2897,6 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job,
|
||||
|
||||
lookup.glyph = gi->glyph;
|
||||
|
||||
/* If the glyph has color, we don't need to recolor anything.
|
||||
* We tell the shader by setting the color to vec4(-1).
|
||||
*/
|
||||
if (!force_color && GLYPH_IS_COLOR (gi))
|
||||
c = nc;
|
||||
else
|
||||
c = cc;
|
||||
|
||||
cx = (float)(x_position + gi->geometry.x_offset) / PANGO_SCALE;
|
||||
lookup.xshift = compute_phase_and_pos (x + cx, &cx);
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
#include "gtkdebug.h"
|
||||
#include "gtkwindow.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
#include "a11y/atspi/atspi-accessible.h"
|
||||
#include "a11y/atspi/atspi-application.h"
|
||||
@@ -613,7 +612,7 @@ gtk_at_spi_root_queue_register (GtkAtSpiRoot *self,
|
||||
return;
|
||||
|
||||
self->register_id = g_idle_add (root_register, self);
|
||||
gdk_source_set_static_name_by_id (self->register_id, "[gtk] ATSPI root registration");
|
||||
g_source_set_name_by_id (self->register_id, "[gtk] ATSPI root registration");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,6 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include "gtk/gtkcomposetable.h"
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* This program reads a Compose file and generates files with sequences,
|
||||
* character data, and definitions for the builtin compose table of GTK.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#define MAX_SEQ_LEN 5
|
||||
#define N_INDEX_SIZE 30
|
||||
#define DATA_SIZE 16447
|
||||
#define N_CHARS 1241
|
||||
#define DATA_SIZE 16521
|
||||
#define N_CHARS 1572
|
||||
|
||||
#endif
|
||||
|
||||
Binary file not shown.
@@ -2242,23 +2242,6 @@ gtk_builder_value_from_string_type (GtkBuilder *builder,
|
||||
ret = FALSE;
|
||||
}
|
||||
}
|
||||
else if (G_VALUE_HOLDS (value, GDK_TYPE_CONTENT_FORMATS))
|
||||
{
|
||||
GdkContentFormats *formats;
|
||||
|
||||
formats = gdk_content_formats_parse (string);
|
||||
if (formats)
|
||||
g_value_take_boxed (value, formats);
|
||||
else
|
||||
{
|
||||
g_set_error (error,
|
||||
GTK_BUILDER_ERROR,
|
||||
GTK_BUILDER_ERROR_INVALID_VALUE,
|
||||
"Could not parse GdkContentFormats '%s'",
|
||||
string);
|
||||
ret = FALSE;
|
||||
}
|
||||
}
|
||||
else if (G_VALUE_HOLDS (value, GSK_TYPE_TRANSFORM))
|
||||
{
|
||||
GskTransform *transform;
|
||||
|
||||
+1
-1
@@ -791,7 +791,7 @@ gtk_real_button_activate (GtkButton *button)
|
||||
if (gtk_widget_get_realized (widget) && !priv->activate_timeout)
|
||||
{
|
||||
priv->activate_timeout = g_timeout_add (ACTIVATE_TIMEOUT, button_activate_timeout, button);
|
||||
gdk_source_set_static_name_by_id (priv->activate_timeout, "[gtk] button_activate_timeout");
|
||||
g_source_set_name_by_id (priv->activate_timeout, "[gtk] button_activate_timeout");
|
||||
|
||||
gtk_widget_add_css_class (GTK_WIDGET (button), "keyboard-activating");
|
||||
priv->button_down = TRUE;
|
||||
|
||||
@@ -420,6 +420,9 @@ gtk_check_button_focus (GtkWidget *widget,
|
||||
GtkDirectionType direction)
|
||||
{
|
||||
GtkCheckButton *self = GTK_CHECK_BUTTON (widget);
|
||||
GtkCheckButton *active_button;
|
||||
|
||||
active_button = get_group_active_button (self);
|
||||
|
||||
if (gtk_widget_is_focus (widget))
|
||||
{
|
||||
@@ -468,7 +471,9 @@ gtk_check_button_focus (GtkWidget *widget,
|
||||
if (new_focus)
|
||||
{
|
||||
gtk_widget_grab_focus (new_focus);
|
||||
gtk_widget_activate (new_focus);
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (new_focus), TRUE);
|
||||
if (active_button && active_button != (GtkCheckButton *)new_focus)
|
||||
gtk_check_button_set_active (GTK_CHECK_BUTTON (active_button), FALSE);
|
||||
}
|
||||
|
||||
g_ptr_array_free (child_array, TRUE);
|
||||
@@ -477,9 +482,6 @@ gtk_check_button_focus (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkCheckButton *active_button;
|
||||
|
||||
active_button = get_group_active_button (self);
|
||||
if (active_button && active_button != self)
|
||||
return FALSE;
|
||||
|
||||
@@ -496,10 +498,7 @@ gtk_check_button_real_activate (GtkCheckButton *self)
|
||||
if (priv->active && (priv->group_prev || priv->group_next))
|
||||
return;
|
||||
|
||||
if (priv->action_helper)
|
||||
gtk_action_helper_activate (priv->action_helper);
|
||||
else
|
||||
gtk_check_button_set_active (self, !gtk_check_button_get_active (self));
|
||||
gtk_check_button_set_active (self, !gtk_check_button_get_active (self));
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+128
-101
@@ -486,16 +486,15 @@ parser_remove_duplicates (GtkComposeParser *parser)
|
||||
GHashTableIter iter;
|
||||
gunichar *sequence;
|
||||
char *value;
|
||||
GString *output;
|
||||
|
||||
output = g_string_new ("");
|
||||
|
||||
g_hash_table_iter_init (&iter, parser->sequences);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)&sequence, (gpointer *)&value))
|
||||
{
|
||||
static guint keysyms[MAX_COMPOSE_LEN + 1];
|
||||
static guint16 keysyms[MAX_COMPOSE_LEN + 1];
|
||||
int i;
|
||||
int n_compose = 0;
|
||||
gunichar output_char;
|
||||
char buf[8] = { 0, };
|
||||
gboolean remove_sequence = FALSE;
|
||||
|
||||
if (value[0] == '\0')
|
||||
@@ -515,8 +514,8 @@ parser_remove_duplicates (GtkComposeParser *parser)
|
||||
|
||||
for (i = 0; i < MAX_COMPOSE_LEN + 1; i++)
|
||||
{
|
||||
guint codepoint = sequence[i];
|
||||
keysyms[i] = codepoint;
|
||||
gunichar codepoint = sequence[i];
|
||||
keysyms[i] = (guint16) codepoint;
|
||||
|
||||
if (codepoint == 0)
|
||||
break;
|
||||
@@ -530,9 +529,10 @@ parser_remove_duplicates (GtkComposeParser *parser)
|
||||
n_compose++;
|
||||
}
|
||||
|
||||
if (gtk_check_algorithmically (keysyms, n_compose, output))
|
||||
if (gtk_check_algorithmically (keysyms, n_compose, &output_char))
|
||||
{
|
||||
if (strcmp (value, output->str) == 0)
|
||||
g_unichar_to_utf8 (output_char, buf);
|
||||
if (strcmp (value, buf) == 0)
|
||||
remove_sequence = TRUE;
|
||||
}
|
||||
|
||||
@@ -540,8 +540,6 @@ next:
|
||||
if (remove_sequence)
|
||||
g_hash_table_iter_remove (&iter);
|
||||
}
|
||||
|
||||
g_string_free (output, TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1071,22 +1069,22 @@ gtk_compose_table_parse (const char *compose_file,
|
||||
return compose_table;
|
||||
}
|
||||
|
||||
static const char *prefix =
|
||||
"# GTK has rewritten this file to add the line:\n"
|
||||
"\n"
|
||||
"include \"%L\"\n"
|
||||
"\n"
|
||||
"# This is necessary to add your own Compose sequences\n"
|
||||
"# in addition to the builtin sequences of GTK. If this\n"
|
||||
"# is not what you want, just remove that line.\n"
|
||||
"#\n"
|
||||
"# A backup of the previous file contents has been made.\n"
|
||||
"\n"
|
||||
"\n";
|
||||
|
||||
static gboolean
|
||||
rewrite_compose_file (const char *compose_file)
|
||||
{
|
||||
static const char *prefix =
|
||||
"# GTK has rewritten this file to add the line:\n"
|
||||
"\n"
|
||||
"include \"%L\"\n"
|
||||
"\n"
|
||||
"# This is necessary to add your own Compose sequences\n"
|
||||
"# in addition to the builtin sequences of GTK. If this\n"
|
||||
"# is not what you want, just remove that line.\n"
|
||||
"#\n"
|
||||
"# A backup of the previous file contents has been made.\n"
|
||||
"\n"
|
||||
"\n";
|
||||
|
||||
char *path = NULL;
|
||||
char *content = NULL;
|
||||
gsize content_len;
|
||||
@@ -1217,7 +1215,7 @@ static int
|
||||
compare_seq (const void *key, const void *value)
|
||||
{
|
||||
int i = 0;
|
||||
const guint *keysyms = key;
|
||||
const guint16 *keysyms = key;
|
||||
const guint16 *seq = value;
|
||||
|
||||
while (keysyms[i])
|
||||
@@ -1236,7 +1234,7 @@ compare_seq (const void *key, const void *value)
|
||||
static int
|
||||
compare_seq_index (const void *key, const void *value)
|
||||
{
|
||||
const guint *keysyms = key;
|
||||
const guint16 *keysyms = key;
|
||||
const guint16 *seq = value;
|
||||
|
||||
if (keysyms[0] < seq[0])
|
||||
@@ -1262,7 +1260,7 @@ compare_seq_index (const void *key, const void *value)
|
||||
*/
|
||||
gboolean
|
||||
gtk_compose_table_check (const GtkComposeTable *table,
|
||||
const guint *compose_buffer,
|
||||
const guint16 *compose_buffer,
|
||||
int n_compose,
|
||||
gboolean *compose_finish,
|
||||
gboolean *compose_match,
|
||||
@@ -1354,47 +1352,6 @@ gtk_compose_table_check (const GtkComposeTable *table,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_compose_table_get_prefix (const GtkComposeTable *table,
|
||||
const guint *compose_buffer,
|
||||
int n_compose,
|
||||
int *prefix)
|
||||
{
|
||||
int index_stride = table->max_seq_len + 1;
|
||||
int p = 0;
|
||||
|
||||
for (int idx = 0; idx < table->n_index_size; idx++)
|
||||
{
|
||||
const guint16 *seq_index = table->data + (idx * index_stride);
|
||||
|
||||
if (seq_index[0] == compose_buffer[0])
|
||||
{
|
||||
p = 1;
|
||||
|
||||
for (int i = 1; i < table->max_seq_len; i++)
|
||||
{
|
||||
int len = i + 1;
|
||||
|
||||
for (int j = seq_index[i]; j < seq_index[i + 1]; j += len)
|
||||
{
|
||||
int k;
|
||||
|
||||
for (k = 0; k < MIN (len, n_compose) - 1; k++)
|
||||
{
|
||||
if (compose_buffer[k + 1] != table->data[j + k])
|
||||
break;
|
||||
}
|
||||
p = MAX (p, k + 1);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
*prefix = p;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_compose_table_foreach (const GtkComposeTable *table,
|
||||
GtkComposeSequenceCallback callback,
|
||||
@@ -1462,56 +1419,119 @@ gtk_compose_table_foreach (const GtkComposeTable *table,
|
||||
#define IS_DEAD_KEY(k) \
|
||||
((k) >= GDK_KEY_dead_grave && (k) <= GDK_KEY_dead_greek)
|
||||
|
||||
/* This function receives a sequence of Unicode characters and tries to
|
||||
* normalize it (NFC). We check for the case where the resulting string
|
||||
* has length 1 (single character).
|
||||
* NFC normalisation normally rearranges diacritic marks, unless these
|
||||
* belong to the same Canonical Combining Class.
|
||||
* If they belong to the same canonical combining class, we produce all
|
||||
* permutations of the diacritic marks, then attempt to normalize.
|
||||
*/
|
||||
static gboolean
|
||||
check_normalize_nfc (gunichar *combination_buffer,
|
||||
int n_compose)
|
||||
{
|
||||
gunichar *combination_buffer_temp;
|
||||
char *combination_utf8_temp = NULL;
|
||||
char *nfc_temp = NULL;
|
||||
int n_combinations;
|
||||
gunichar temp_swap;
|
||||
int i;
|
||||
|
||||
combination_buffer_temp = g_alloca (n_compose * sizeof (gunichar));
|
||||
|
||||
n_combinations = 1;
|
||||
|
||||
for (i = 1; i < n_compose; i++)
|
||||
n_combinations *= i;
|
||||
|
||||
/* Xorg reuses dead_tilde for the perispomeni diacritic mark.
|
||||
* We check if base character belongs to Greek Unicode block,
|
||||
* and if so, we replace tilde with perispomeni.
|
||||
*/
|
||||
if (combination_buffer[0] >= 0x390 && combination_buffer[0] <= 0x3FF)
|
||||
{
|
||||
for (i = 1; i < n_compose; i++ )
|
||||
if (combination_buffer[i] == 0x303)
|
||||
combination_buffer[i] = 0x342;
|
||||
}
|
||||
|
||||
memcpy (combination_buffer_temp, combination_buffer, n_compose * sizeof (gunichar) );
|
||||
|
||||
for (i = 0; i < n_combinations; i++)
|
||||
{
|
||||
g_unicode_canonical_ordering (combination_buffer_temp, n_compose);
|
||||
combination_utf8_temp = g_ucs4_to_utf8 (combination_buffer_temp, n_compose, NULL, NULL, NULL);
|
||||
nfc_temp = g_utf8_normalize (combination_utf8_temp, -1, G_NORMALIZE_NFC);
|
||||
|
||||
if (g_utf8_strlen (nfc_temp, -1) == 1)
|
||||
{
|
||||
memcpy (combination_buffer, combination_buffer_temp, n_compose * sizeof (gunichar) );
|
||||
|
||||
g_free (combination_utf8_temp);
|
||||
g_free (nfc_temp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_free (combination_utf8_temp);
|
||||
g_free (nfc_temp);
|
||||
|
||||
if (n_compose > 2)
|
||||
{
|
||||
temp_swap = combination_buffer_temp[i % (n_compose - 1) + 1];
|
||||
combination_buffer_temp[i % (n_compose - 1) + 1] = combination_buffer_temp[(i+1) % (n_compose - 1) + 1];
|
||||
combination_buffer_temp[(i+1) % (n_compose - 1) + 1] = temp_swap;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_check_algorithmically (const guint *compose_buffer,
|
||||
int n_compose,
|
||||
GString *output)
|
||||
gtk_check_algorithmically (const guint16 *compose_buffer,
|
||||
int n_compose,
|
||||
gunichar *output_char)
|
||||
|
||||
{
|
||||
int i;
|
||||
gunichar *combination_buffer;
|
||||
char *combination_utf8, *nfc;
|
||||
|
||||
g_string_set_size (output, 0);
|
||||
combination_buffer = alloca (sizeof (gunichar) * (n_compose + 1));
|
||||
|
||||
if (output_char)
|
||||
*output_char = 0;
|
||||
|
||||
for (i = 0; i < n_compose && IS_DEAD_KEY (compose_buffer[i]); i++)
|
||||
;
|
||||
|
||||
/* Can't combine if there's no base character: incomplete sequence */
|
||||
/* Allow at most 2 dead keys */
|
||||
if (i > 2)
|
||||
return FALSE;
|
||||
|
||||
/* Can't combine if there's no base character */
|
||||
if (i == n_compose)
|
||||
return TRUE;
|
||||
|
||||
if (i > 0 && i == n_compose - 1)
|
||||
{
|
||||
GString *input;
|
||||
char *nfc;
|
||||
gunichar ch;
|
||||
|
||||
ch = gdk_keyval_to_unicode (compose_buffer[i]);
|
||||
|
||||
/* We don't allow combining with non-letters */
|
||||
if (!g_unichar_isalpha (ch))
|
||||
return FALSE;
|
||||
|
||||
input = g_string_sized_new (4 * n_compose);
|
||||
|
||||
g_string_append_unichar (input, ch);
|
||||
|
||||
combination_buffer[0] = gdk_keyval_to_unicode (compose_buffer[i]);
|
||||
combination_buffer[n_compose] = 0;
|
||||
i--;
|
||||
while (i >= 0)
|
||||
{
|
||||
switch (compose_buffer[i])
|
||||
{
|
||||
#define CASE(keysym, unicode) \
|
||||
case GDK_KEY_dead_##keysym: g_string_append_unichar (input, unicode); break
|
||||
case GDK_KEY_dead_##keysym: combination_buffer[i+1] = unicode; break
|
||||
|
||||
CASE (grave, 0x0300);
|
||||
CASE (acute, 0x0301);
|
||||
CASE (circumflex, 0x0302);
|
||||
case GDK_KEY_dead_tilde:
|
||||
if (g_unichar_get_script (ch) == G_UNICODE_SCRIPT_GREEK)
|
||||
g_string_append_unichar (input, 0x342); /* combining perispomeni */
|
||||
else
|
||||
g_string_append_unichar (input, 0x303); /* combining tilde */
|
||||
break;
|
||||
CASE (tilde, 0x0303); /* Also used with perispomeni, 0x342. */
|
||||
CASE (macron, 0x0304);
|
||||
CASE (breve, 0x0306);
|
||||
CASE (abovedot, 0x0307);
|
||||
@@ -1529,7 +1549,7 @@ gtk_check_algorithmically (const guint *compose_buffer,
|
||||
CASE (horn, 0x031B); /* Legacy use for psili, 0x313 (or 0x343). */
|
||||
CASE (stroke, 0x335);
|
||||
CASE (abovecomma, 0x0313); /* Equivalent to psili */
|
||||
CASE (abovereversedcomma, 0x0314); /* Equivalent to dasia */
|
||||
CASE (abovereversedcomma, 0x0314); /* Equivalent to dasia */
|
||||
CASE (doublegrave, 0x30F);
|
||||
CASE (belowring, 0x325);
|
||||
CASE (belowmacron, 0x331);
|
||||
@@ -1557,20 +1577,27 @@ gtk_check_algorithmically (const guint *compose_buffer,
|
||||
CASE (capital_schwa, 0x1DEA);
|
||||
#undef CASE
|
||||
default:
|
||||
g_string_append_unichar (input, gdk_keyval_to_unicode (compose_buffer[i]));
|
||||
combination_buffer[i+1] = gdk_keyval_to_unicode (compose_buffer[i]);
|
||||
}
|
||||
i--;
|
||||
}
|
||||
|
||||
nfc = g_utf8_normalize (input->str, input->len, G_NORMALIZE_NFC);
|
||||
/* If the buffer normalizes to a single character, then modify the order
|
||||
* of combination_buffer accordingly, if necessary, and return TRUE.
|
||||
*/
|
||||
if (check_normalize_nfc (combination_buffer, n_compose))
|
||||
{
|
||||
combination_utf8 = g_ucs4_to_utf8 (combination_buffer, -1, NULL, NULL, NULL);
|
||||
nfc = g_utf8_normalize (combination_utf8, -1, G_NORMALIZE_NFC);
|
||||
|
||||
g_string_assign (output, nfc);
|
||||
if (output_char)
|
||||
*output_char = g_utf8_get_char (nfc);
|
||||
|
||||
g_free (nfc);
|
||||
g_free (combination_utf8);
|
||||
g_free (nfc);
|
||||
|
||||
g_string_free (input, TRUE);
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -74,20 +74,15 @@ void gtk_compose_table_foreach (const GtkComposeTable *table,
|
||||
gpointer data);
|
||||
|
||||
gboolean gtk_compose_table_check (const GtkComposeTable *table,
|
||||
const guint *compose_buffer,
|
||||
const guint16 *compose_buffer,
|
||||
int n_compose,
|
||||
gboolean *compose_finish,
|
||||
gboolean *compose_match,
|
||||
GString *output);
|
||||
|
||||
void gtk_compose_table_get_prefix (const GtkComposeTable *table,
|
||||
const guint *compose_buffer,
|
||||
int n_compose,
|
||||
int *prefix);
|
||||
|
||||
gboolean gtk_check_algorithmically (const guint *compose_buffer,
|
||||
gboolean gtk_check_algorithmically (const guint16 *compose_buffer,
|
||||
int n_compose,
|
||||
GString *output);
|
||||
gunichar *output);
|
||||
|
||||
guint32 gtk_compose_table_data_hash (const guint16 *data,
|
||||
int max_seq_len,
|
||||
|
||||
@@ -204,10 +204,6 @@ gtk_css_animated_style_set_animated_value (GtkCssAnimatedStyle *animated,
|
||||
unshare_font (animated);
|
||||
gtk_css_take_value (&style->font->letter_spacing, value);
|
||||
break;
|
||||
case GTK_CSS_PROPERTY_LINE_HEIGHT:
|
||||
unshare_font (animated);
|
||||
gtk_css_take_value (&style->font->line_height, value);
|
||||
break;
|
||||
case GTK_CSS_PROPERTY_TEXT_DECORATION_LINE:
|
||||
unshare_font_variant (animated);
|
||||
gtk_css_take_value (&style->font_variant->text_decoration_line, value);
|
||||
|
||||
@@ -542,8 +542,8 @@ gtk_css_shadow_value_get_extents (const GtkCssValue *value,
|
||||
|
||||
spread = _gtk_css_number_value_get (shadow->spread, 0);
|
||||
radius = _gtk_css_number_value_get (shadow->radius, 0);
|
||||
if (!value->is_filter)
|
||||
radius = radius / 2.0;
|
||||
if (value->is_filter)
|
||||
radius = radius * 2;
|
||||
clip_radius = gsk_cairo_blur_compute_pixels (radius);
|
||||
hoffset = _gtk_css_number_value_get (shadow->hoffset, 0);
|
||||
voffset = _gtk_css_number_value_get (shadow->voffset, 0);
|
||||
|
||||
@@ -107,12 +107,11 @@ static const int font_props[] = {
|
||||
GTK_CSS_PROPERTY_FONT_WEIGHT,
|
||||
GTK_CSS_PROPERTY_FONT_STRETCH,
|
||||
GTK_CSS_PROPERTY_LETTER_SPACING,
|
||||
GTK_CSS_PROPERTY_TEXT_SHADOW,
|
||||
GTK_CSS_PROPERTY_TEXT_SHADOW,
|
||||
GTK_CSS_PROPERTY_CARET_COLOR,
|
||||
GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR,
|
||||
GTK_CSS_PROPERTY_FONT_FEATURE_SETTINGS,
|
||||
GTK_CSS_PROPERTY_FONT_VARIATION_SETTINGS,
|
||||
GTK_CSS_PROPERTY_LINE_HEIGHT,
|
||||
};
|
||||
static const int font_variant_props[] = {
|
||||
GTK_CSS_PROPERTY_TEXT_DECORATION_LINE,
|
||||
@@ -418,9 +417,6 @@ gtk_css_static_style_set_value (GtkCssStaticStyle *sstyle,
|
||||
case GTK_CSS_PROPERTY_LETTER_SPACING:
|
||||
gtk_css_take_value (&style->font->letter_spacing, value);
|
||||
break;
|
||||
case GTK_CSS_PROPERTY_LINE_HEIGHT:
|
||||
gtk_css_take_value (&style->font->line_height, value);
|
||||
break;
|
||||
case GTK_CSS_PROPERTY_TEXT_DECORATION_LINE:
|
||||
gtk_css_take_value (&style->font_variant->text_decoration_line, value);
|
||||
break;
|
||||
|
||||
@@ -226,13 +226,3 @@ _gtk_css_ident_value_get (const GtkCssValue *value)
|
||||
return value->string;
|
||||
}
|
||||
|
||||
GtkCssValue *
|
||||
gtk_css_line_height_value_get_default (void)
|
||||
{
|
||||
static GtkCssValue *normal_line_height;
|
||||
|
||||
if (normal_line_height == NULL)
|
||||
normal_line_height = _gtk_css_ident_value_new_take ("normal");
|
||||
|
||||
return normal_line_height;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ GtkCssValue * _gtk_css_string_value_parse (GtkCssParser *par
|
||||
|
||||
const char * _gtk_css_string_value_get (const GtkCssValue *string);
|
||||
|
||||
GtkCssValue * gtk_css_line_height_value_get_default (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
@@ -117,8 +117,6 @@ gtk_css_style_get_value (GtkCssStyle *style,
|
||||
return style->font->font_stretch;
|
||||
case GTK_CSS_PROPERTY_LETTER_SPACING:
|
||||
return style->font->letter_spacing;
|
||||
case GTK_CSS_PROPERTY_LINE_HEIGHT:
|
||||
return style->font->line_height;
|
||||
case GTK_CSS_PROPERTY_TEXT_DECORATION_LINE:
|
||||
return style->font_variant->text_decoration_line;
|
||||
case GTK_CSS_PROPERTY_TEXT_DECORATION_COLOR:
|
||||
|
||||
@@ -151,7 +151,6 @@ struct _GtkCssFontValues {
|
||||
GtkCssValue *secondary_caret_color; // NULL if currentColor
|
||||
GtkCssValue *font_feature_settings;
|
||||
GtkCssValue *font_variation_settings;
|
||||
GtkCssValue *line_height;
|
||||
};
|
||||
|
||||
struct _GtkCssFontVariantValues {
|
||||
|
||||
@@ -812,25 +812,6 @@ transform_origin_parse (GtkCssStyleProperty *property,
|
||||
return _gtk_css_position_value_parse (parser);
|
||||
}
|
||||
|
||||
static GtkCssValue *
|
||||
parse_line_height (GtkCssStyleProperty *property,
|
||||
GtkCssParser *parser)
|
||||
{
|
||||
GtkCssValue *value = NULL;
|
||||
|
||||
if (gtk_css_parser_try_ident (parser, "normal"))
|
||||
value = _gtk_css_ident_value_new ("normal");
|
||||
else
|
||||
value = _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER |
|
||||
GTK_CSS_PARSE_PERCENT |
|
||||
GTK_CSS_POSITIVE_ONLY);
|
||||
|
||||
if (value == NULL)
|
||||
gtk_css_parser_error_syntax (parser, "Not a valid line-height value");
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/*** REGISTRATION ***/
|
||||
|
||||
G_STATIC_ASSERT (GTK_CSS_PROPERTY_COLOR == 0);
|
||||
@@ -1420,10 +1401,4 @@ _gtk_css_style_property_init_properties (void)
|
||||
GTK_CSS_AFFECTS_TEXT_ATTRS | GTK_CSS_AFFECTS_TEXT_SIZE,
|
||||
parse_font_variation_settings,
|
||||
gtk_css_font_variations_value_new_default ());
|
||||
gtk_css_style_property_register ("line-height",
|
||||
GTK_CSS_PROPERTY_LINE_HEIGHT,
|
||||
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
||||
GTK_CSS_AFFECTS_TEXT_SIZE,
|
||||
parse_line_height,
|
||||
_gtk_css_value_ref (gtk_css_line_height_value_get_default ()));
|
||||
}
|
||||
|
||||
@@ -275,7 +275,6 @@ enum { /*< skip >*/
|
||||
GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR,
|
||||
GTK_CSS_PROPERTY_FONT_FEATURE_SETTINGS,
|
||||
GTK_CSS_PROPERTY_FONT_VARIATION_SETTINGS,
|
||||
GTK_CSS_PROPERTY_LINE_HEIGHT,
|
||||
/* add more */
|
||||
GTK_CSS_PROPERTY_N_PROPERTIES
|
||||
};
|
||||
|
||||
+5
-16
@@ -344,7 +344,7 @@ gtk_drop_target_accept (GtkDropTarget *self,
|
||||
if (self->formats == NULL)
|
||||
return TRUE;
|
||||
|
||||
return gdk_content_formats_match_gtype (self->formats, gdk_drop_get_formats (drop)) != G_TYPE_INVALID;
|
||||
return gdk_content_formats_match (self->formats, gdk_drop_get_formats (drop));
|
||||
}
|
||||
|
||||
static GdkDragAction
|
||||
@@ -544,12 +544,6 @@ gtk_drop_target_set_property (GObject *object,
|
||||
gtk_drop_target_set_actions (self, g_value_get_flags (value));
|
||||
break;
|
||||
|
||||
case PROP_FORMATS:
|
||||
self->formats = g_value_dup_boxed (value);
|
||||
if (self->formats == NULL)
|
||||
self->formats = gdk_content_formats_new (NULL, 0);
|
||||
break;
|
||||
|
||||
case PROP_PRELOAD:
|
||||
gtk_drop_target_set_preload (self, g_value_get_boolean (value));
|
||||
break;
|
||||
@@ -667,7 +661,7 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
|
||||
P_("Formats"),
|
||||
P_("The supported formats"),
|
||||
GDK_TYPE_CONTENT_FORMATS,
|
||||
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
|
||||
GTK_PARAM_READABLE);
|
||||
|
||||
/**
|
||||
* GtkDropTarget:preload: (attributes org.gtk.Property.get=gtk_drop_target_get_preload org.gtk.Property.set=gtk_drop_target_set_preload)
|
||||
@@ -849,6 +843,7 @@ gtk_drop_target_class_init (GtkDropTargetClass *class)
|
||||
static void
|
||||
gtk_drop_target_init (GtkDropTarget *self)
|
||||
{
|
||||
self->formats = gdk_content_formats_new (NULL, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -869,19 +864,13 @@ gtk_drop_target_new (GType type,
|
||||
GdkDragAction actions)
|
||||
{
|
||||
GtkDropTarget *result;
|
||||
GdkContentFormats *formats;
|
||||
|
||||
if (type != G_TYPE_INVALID)
|
||||
formats = gdk_content_formats_new_for_gtype (type);
|
||||
else
|
||||
formats = NULL;
|
||||
|
||||
result = g_object_new (GTK_TYPE_DROP_TARGET,
|
||||
"formats", formats,
|
||||
"actions", actions,
|
||||
NULL);
|
||||
|
||||
g_clear_pointer (&formats, gdk_content_formats_unref);
|
||||
if (type != G_TYPE_INVALID)
|
||||
gtk_drop_target_set_gtypes (result, &type, 1);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1016,7 +1016,7 @@ gtk_emoji_chooser_init (GtkEmojiChooser *chooser)
|
||||
populate_recent_section (chooser);
|
||||
|
||||
chooser->populate_idle = g_idle_add (populate_emoji_chooser, chooser);
|
||||
gdk_source_set_static_name_by_id (chooser->populate_idle, "[gtk] populate_emoji_chooser");
|
||||
g_source_set_name_by_id (chooser->populate_idle, "[gtk] populate_emoji_chooser");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -1982,7 +1982,7 @@ gtk_entry_completion_changed (GtkWidget *widget,
|
||||
g_timeout_add (COMPLETION_TIMEOUT,
|
||||
gtk_entry_completion_timeout,
|
||||
completion);
|
||||
gdk_source_set_static_name_by_id (completion->completion_timeout, "[gtk] gtk_entry_completion_timeout");
|
||||
g_source_set_name_by_id (completion->completion_timeout, "[gtk] gtk_entry_completion_timeout");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -2048,7 +2048,7 @@ completion_inserted_text_callback (GtkEntryBuffer *buffer,
|
||||
g_cclosure_new_object (G_CALLBACK (check_completion_callback),
|
||||
G_OBJECT (completion)));
|
||||
g_source_attach (completion->check_completion_idle, NULL);
|
||||
g_source_set_static_name (completion->check_completion_idle, "[gtk] check_completion_callback");
|
||||
g_source_set_name (completion->check_completion_idle, "[gtk] check_completion_callback");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -102,6 +102,7 @@ void _gtk_entry_completion_connect (GtkEntryCompletion *completion,
|
||||
GtkEntry *entry);
|
||||
void _gtk_entry_completion_disconnect (GtkEntryCompletion *completion);
|
||||
|
||||
GtkIMContext * _gtk_entry_get_im_context (GtkEntry *entry);
|
||||
GtkEventController * gtk_entry_get_key_controller (GtkEntry *entry);
|
||||
GtkText *gtk_entry_get_text_widget (GtkEntry *entry);
|
||||
|
||||
|
||||
+1
-1
@@ -244,7 +244,7 @@ gtk_expander_drag_enter (GtkDropControllerMotion *motion,
|
||||
if (!expander->expanded && !expander->expand_timer)
|
||||
{
|
||||
expander->expand_timer = g_timeout_add (TIMEOUT_EXPAND, (GSourceFunc) expand_timeout, expander);
|
||||
gdk_source_set_static_name_by_id (expander->expand_timer, "[gtk] expand_timeout");
|
||||
g_source_set_name_by_id (expander->expand_timer, "[gtk] expand_timeout");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2234,7 +2234,7 @@ location_entry_changed_cb (GtkEditable *editable,
|
||||
impl->location_changed_id = g_timeout_add (LOCATION_CHANGED_TIMEOUT,
|
||||
location_changed_timeout_cb,
|
||||
impl);
|
||||
gdk_source_set_static_name_by_id (impl->location_changed_id, "[gtk] location_changed_timeout_cb");
|
||||
g_source_set_name_by_id (impl->location_changed_id, "[gtk] location_changed_timeout_cb");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3822,7 +3822,7 @@ load_setup_timer (GtkFileChooserWidget *impl)
|
||||
g_assert (impl->load_state != LOAD_PRELOAD);
|
||||
|
||||
impl->load_timeout_id = g_timeout_add (MAX_LOADING_TIME, load_timeout_cb, impl);
|
||||
gdk_source_set_static_name_by_id (impl->load_timeout_id, "[gtk] load_timeout_cb");
|
||||
g_source_set_name_by_id (impl->load_timeout_id, "[gtk] load_timeout_cb");
|
||||
impl->load_state = LOAD_PRELOAD;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "gtktreednd.h"
|
||||
#include "gtktreemodel.h"
|
||||
#include "gtkfilter.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
/*** Structure: how GtkFileSystemModel works
|
||||
*
|
||||
@@ -1096,7 +1095,7 @@ gtk_file_system_model_got_files (GObject *object, GAsyncResult *res, gpointer da
|
||||
thaw_func,
|
||||
model,
|
||||
NULL);
|
||||
gdk_source_set_static_name_by_id (model->dir_thaw_source, "[gtk] thaw_func");
|
||||
g_source_set_name_by_id (model->dir_thaw_source, "[gtk] thaw_func");
|
||||
}
|
||||
|
||||
for (walk = files; walk; walk = walk->next)
|
||||
|
||||
@@ -267,7 +267,7 @@ gtk_filter_list_model_start_filtering (GtkFilterListModel *self,
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PENDING]);
|
||||
g_assert (self->pending_cb == 0);
|
||||
self->pending_cb = g_idle_add (gtk_filter_list_model_run_filter_cb, self);
|
||||
gdk_source_set_static_name_by_id (self->pending_cb, "[gtk] gtk_filter_list_model_run_filter_cb");
|
||||
g_source_set_name_by_id (self->pending_cb, "[gtk] gtk_filter_list_model_run_filter_cb");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+34
-43
@@ -386,18 +386,15 @@ user_filter_cb (gpointer item,
|
||||
|
||||
ret = FALSE;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
langs = pango_fc_font_get_languages (PANGO_FC_FONT (font));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
if (langs)
|
||||
for (i = 0; langs[i]; i++)
|
||||
{
|
||||
if (langs[i] == self->filter_language)
|
||||
{
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (i = 0; langs[i]; i++)
|
||||
{
|
||||
if (langs[i] == self->filter_language)
|
||||
{
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (font);
|
||||
@@ -603,20 +600,17 @@ maybe_update_preview_text (GtkFontChooserWidget *self,
|
||||
alt_default = pango_language_from_string (q);
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
languages = pango_fc_font_get_languages (PANGO_FC_FONT (font));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
/* If the font supports the default language, just use it. */
|
||||
if (languages)
|
||||
for (i = 0; languages[i]; i++)
|
||||
{
|
||||
if (languages[i] == default_lang || languages[i] == alt_default)
|
||||
{
|
||||
lang = default_lang;
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
for (i = 0; languages[i]; i++)
|
||||
{
|
||||
if (languages[i] == default_lang || languages[i] == alt_default)
|
||||
{
|
||||
lang = default_lang;
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
|
||||
/* Otherwise, we make a list of representative languages */
|
||||
langs = g_hash_table_new (NULL, NULL);
|
||||
@@ -1072,31 +1066,28 @@ add_languages_from_font (GtkFontChooserWidget *self,
|
||||
PangoLanguage **langs;
|
||||
int i;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
langs = pango_fc_font_get_languages (PANGO_FC_FONT (font));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
if (langs)
|
||||
for (i = 0; langs[i]; i++)
|
||||
{
|
||||
if (!g_hash_table_contains (self->language_table, langs[i]))
|
||||
{
|
||||
g_hash_table_add (self->language_table, langs[i]);
|
||||
if (get_language_name (langs[i]))
|
||||
{
|
||||
const char *l = pango_language_to_string (langs[i]);
|
||||
gulong id = 0;
|
||||
for (i = 0; langs[i]; i++)
|
||||
{
|
||||
if (!g_hash_table_contains (self->language_table, langs[i]))
|
||||
{
|
||||
g_hash_table_add (self->language_table, langs[i]);
|
||||
if (get_language_name (langs[i]))
|
||||
{
|
||||
const char *l = pango_language_to_string (langs[i]);
|
||||
gulong id = 0;
|
||||
|
||||
/* Pre-select the default language */
|
||||
if (pango_language_matches (default_lang, l))
|
||||
id = g_signal_connect (model, "items-changed", G_CALLBACK (select_added), NULL);
|
||||
/* Pre-select the default language */
|
||||
if (pango_language_matches (default_lang, l))
|
||||
id = g_signal_connect (model, "items-changed", G_CALLBACK (select_added), NULL);
|
||||
|
||||
gtk_string_list_append (self->languages, l);
|
||||
gtk_string_list_append (self->languages, l);
|
||||
|
||||
if (id)
|
||||
g_signal_handler_disconnect (model, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (id)
|
||||
g_signal_handler_disconnect (model, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (font);
|
||||
|
||||
@@ -146,7 +146,7 @@ _gtk_gesture_click_update_timeout (GtkGestureClick *gesture)
|
||||
g_object_get (settings, "gtk-double-click-time", &double_click_time, NULL);
|
||||
|
||||
priv->double_click_timeout_id = g_timeout_add (double_click_time, _double_click_timeout_cb, gesture);
|
||||
gdk_source_set_static_name_by_id (priv->double_click_timeout_id, "[gtk] _double_click_timeout_cb");
|
||||
g_source_set_name_by_id (priv->double_click_timeout_id, "[gtk] _double_click_timeout_cb");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
||||
@@ -150,7 +150,7 @@ gtk_gesture_long_press_begin (GtkGesture *gesture,
|
||||
gtk_gesture_get_point (gesture, sequence,
|
||||
&priv->initial_x, &priv->initial_y);
|
||||
priv->timeout_id = g_timeout_add (delay, _gtk_gesture_long_press_timeout, gesture);
|
||||
gdk_source_set_static_name_by_id (priv->timeout_id, "[gtk] _gtk_gesture_long_press_timeout");
|
||||
g_source_set_name_by_id (priv->timeout_id, "[gtk] _gtk_gesture_long_press_timeout");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -95,13 +95,13 @@ _gtk_gesture_rotate_get_angle (GtkGestureRotate *rotate,
|
||||
goto out;
|
||||
|
||||
last_event = gtk_gesture_get_last_event (gesture, sequences->data);
|
||||
phase = gdk_touchpad_event_get_gesture_phase (last_event);
|
||||
|
||||
if (gdk_event_get_event_type (last_event) == GDK_TOUCHPAD_PINCH)
|
||||
if (gdk_event_get_event_type (last_event) == GDK_TOUCHPAD_PINCH &&
|
||||
(phase == GDK_TOUCHPAD_GESTURE_PHASE_BEGIN ||
|
||||
phase == GDK_TOUCHPAD_GESTURE_PHASE_UPDATE ||
|
||||
phase == GDK_TOUCHPAD_GESTURE_PHASE_END))
|
||||
{
|
||||
phase = gdk_touchpad_event_get_gesture_phase (last_event);
|
||||
if (phase == GDK_TOUCHPAD_GESTURE_PHASE_CANCEL)
|
||||
goto out;
|
||||
|
||||
*angle = priv->accum_touchpad_angle;
|
||||
}
|
||||
else
|
||||
|
||||
+1
-1
@@ -294,7 +294,7 @@ gtk_icon_helper_paintable_get_current_image (GdkPaintable *paintable)
|
||||
if (self->paintable == NULL)
|
||||
return NULL;
|
||||
|
||||
return gdk_paintable_get_current_image (self->paintable);
|
||||
return gtk_icon_helper_paintable_get_current_image (self->paintable);
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
+1
-1
@@ -1342,7 +1342,7 @@ queue_theme_changed (GtkIconTheme *self)
|
||||
theme_changed_idle__mainthread_unlocked,
|
||||
gtk_icon_theme_ref_ref (self->ref),
|
||||
(GDestroyNotify)gtk_icon_theme_ref_unref);
|
||||
gdk_source_set_static_name_by_id (self->theme_changed_idle, "[gtk] theme_changed_idle");
|
||||
g_source_set_name_by_id (self->theme_changed_idle, "[gtk] theme_changed_idle");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1831,7 +1831,7 @@ gtk_icon_view_motion (GtkEventController *controller,
|
||||
|
||||
if (icon_view->priv->scroll_timeout_id == 0) {
|
||||
icon_view->priv->scroll_timeout_id = g_timeout_add (30, rubberband_scroll_timeout, icon_view);
|
||||
gdk_source_set_static_name_by_id (icon_view->priv->scroll_timeout_id, "[gtk] rubberband_scroll_timeout");
|
||||
g_source_set_name_by_id (icon_view->priv->scroll_timeout_id, "[gtk] rubberband_scroll_timeout");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -6065,7 +6065,7 @@ gtk_icon_view_drag_motion (GtkDropTargetAsync *dest,
|
||||
if (icon_view->priv->scroll_timeout_id == 0)
|
||||
{
|
||||
icon_view->priv->scroll_timeout_id = g_timeout_add (50, drag_scroll_timeout, icon_view);
|
||||
gdk_source_set_static_name_by_id (icon_view->priv->scroll_timeout_id, "[gtk] drag_scroll_timeout");
|
||||
g_source_set_name_by_id (icon_view->priv->scroll_timeout_id, "[gtk] drag_scroll_timeout");
|
||||
}
|
||||
|
||||
if (target == GTK_TYPE_TREE_ROW_DATA)
|
||||
|
||||
+59
-77
@@ -79,7 +79,7 @@
|
||||
|
||||
struct _GtkIMContextSimplePrivate
|
||||
{
|
||||
guint *compose_buffer;
|
||||
guint16 *compose_buffer;
|
||||
int compose_buffer_len;
|
||||
GString *tentative_match;
|
||||
int tentative_match_len;
|
||||
@@ -118,7 +118,7 @@ init_builtin_table (void)
|
||||
G_LOCK_DEFINE_STATIC (global_tables);
|
||||
static GSList *global_tables;
|
||||
|
||||
static const guint gtk_compose_ignore[] = {
|
||||
static const guint16 gtk_compose_ignore[] = {
|
||||
0, /* Yes, XKB will send us key press events with NoSymbol :( */
|
||||
GDK_KEY_Overlay1_Enable,
|
||||
GDK_KEY_Overlay2_Enable,
|
||||
@@ -384,7 +384,7 @@ gtk_im_context_simple_init (GtkIMContextSimple *context_simple)
|
||||
priv = context_simple->priv = gtk_im_context_simple_get_instance_private (context_simple);
|
||||
|
||||
priv->compose_buffer_len = builtin_compose_table.max_seq_len + 1;
|
||||
priv->compose_buffer = g_new0 (guint, priv->compose_buffer_len);
|
||||
priv->compose_buffer = g_new0 (guint16, priv->compose_buffer_len);
|
||||
priv->tentative_match = g_string_new ("");
|
||||
priv->tentative_match_len = 0;
|
||||
}
|
||||
@@ -544,22 +544,18 @@ is_dead_key (guint keysym)
|
||||
return GDK_KEY_dead_grave <= keysym && keysym <= GDK_KEY_dead_greek;
|
||||
}
|
||||
|
||||
static void
|
||||
append_dead_key (GString *string,
|
||||
guint keysym)
|
||||
static gunichar
|
||||
dead_key_to_unicode (guint keysym,
|
||||
gboolean *need_space)
|
||||
{
|
||||
/* Sadly, not all the dead keysyms have spacing mark equivalents
|
||||
* in Unicode. For those that don't, we use NBSP + the non-spacing
|
||||
* mark as an approximation.
|
||||
* in Unicode. For those that don't, we use space + the non-spacing
|
||||
* mark as an approximation
|
||||
*/
|
||||
switch (keysym)
|
||||
{
|
||||
#define CASE(keysym, unicode, sp) \
|
||||
case GDK_KEY_dead_##keysym: \
|
||||
if (sp) \
|
||||
g_string_append_unichar (string, 0xA0); \
|
||||
g_string_append_unichar (string, unicode); \
|
||||
break;
|
||||
#define CASE(keysym, unicode, sp) \
|
||||
case GDK_KEY_dead_##keysym: *need_space = sp; return unicode;
|
||||
|
||||
CASE (grave, 0x60, 0);
|
||||
CASE (acute, 0xb4, 0);
|
||||
@@ -610,7 +606,8 @@ append_dead_key (GString *string,
|
||||
CASE (capital_schwa, 0x1dea, 1);
|
||||
#undef CASE
|
||||
default:
|
||||
g_string_append_unichar (string, gdk_keyval_to_unicode (keysym));
|
||||
*need_space = FALSE;
|
||||
return gdk_keyval_to_unicode (keysym);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,7 +622,7 @@ no_sequence_matches (GtkIMContextSimple *context_simple,
|
||||
guint keyval;
|
||||
|
||||
context = GTK_IM_CONTEXT (context_simple);
|
||||
|
||||
|
||||
priv->in_compose_sequence = FALSE;
|
||||
|
||||
/* No compose sequences found, check first if we have a partial
|
||||
@@ -635,12 +632,12 @@ no_sequence_matches (GtkIMContextSimple *context_simple,
|
||||
{
|
||||
int len = priv->tentative_match_len;
|
||||
int i;
|
||||
guint *compose_buffer;
|
||||
guint16 *compose_buffer;
|
||||
char *str;
|
||||
|
||||
compose_buffer = alloca (sizeof (guint) * priv->compose_buffer_len);
|
||||
compose_buffer = alloca (sizeof (guint16) * priv->compose_buffer_len);
|
||||
|
||||
memcpy (compose_buffer, priv->compose_buffer, sizeof (guint) * priv->compose_buffer_len);
|
||||
memcpy (compose_buffer, priv->compose_buffer, sizeof (guint16) * priv->compose_buffer_len);
|
||||
|
||||
str = g_strdup (priv->tentative_match->str);
|
||||
gtk_im_context_simple_commit_string (context_simple, str);
|
||||
@@ -678,6 +675,7 @@ no_sequence_matches (GtkIMContextSimple *context_simple,
|
||||
|
||||
if (n_compose > 1 && i >= n_compose - 1)
|
||||
{
|
||||
gboolean need_space;
|
||||
GString *s;
|
||||
|
||||
s = g_string_new ("");
|
||||
@@ -686,7 +684,15 @@ no_sequence_matches (GtkIMContextSimple *context_simple,
|
||||
{
|
||||
/* dead keys are never *really* dead */
|
||||
for (int j = 0; j < i; j++)
|
||||
append_dead_key (s, priv->compose_buffer[j]);
|
||||
{
|
||||
ch = dead_key_to_unicode (priv->compose_buffer[j], &need_space);
|
||||
if (ch)
|
||||
{
|
||||
if (need_space)
|
||||
g_string_append_c (s, ' ');
|
||||
g_string_append_unichar (s, ch);
|
||||
}
|
||||
}
|
||||
|
||||
ch = gdk_keyval_to_unicode (priv->compose_buffer[i]);
|
||||
if (ch != 0 && ch != ' ' && !g_unichar_iscntrl (ch))
|
||||
@@ -696,7 +702,14 @@ no_sequence_matches (GtkIMContextSimple *context_simple,
|
||||
}
|
||||
else
|
||||
{
|
||||
append_dead_key (s, priv->compose_buffer[0]);
|
||||
ch = dead_key_to_unicode (priv->compose_buffer[0], &need_space);
|
||||
if (ch)
|
||||
{
|
||||
if (need_space)
|
||||
g_string_append_c (s, ' ');
|
||||
g_string_append_unichar (s, ch);
|
||||
}
|
||||
|
||||
gtk_im_context_simple_commit_string (context_simple, s->str);
|
||||
|
||||
for (i = 1; i < n_compose; i++)
|
||||
@@ -808,6 +821,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
|
||||
int i;
|
||||
gboolean compose_finish;
|
||||
gboolean compose_match;
|
||||
gunichar output_char;
|
||||
guint keyval, state;
|
||||
|
||||
while (priv->compose_buffer[n_compose] != 0 && n_compose < priv->compose_buffer_len)
|
||||
@@ -987,22 +1001,16 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (is_escape)
|
||||
{
|
||||
if (priv->in_hex_sequence || priv->in_compose_sequence)
|
||||
{
|
||||
gtk_im_context_simple_reset (context);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (priv->in_hex_sequence)
|
||||
{
|
||||
if (hex_keyval && n_compose < 6)
|
||||
priv->compose_buffer[n_compose++] = hex_keyval;
|
||||
else if (is_escape)
|
||||
{
|
||||
gtk_im_context_simple_reset (context);
|
||||
return TRUE;
|
||||
}
|
||||
else if (!is_hex_end)
|
||||
{
|
||||
/* non-hex character in hex sequence, or sequence too long */
|
||||
@@ -1015,7 +1023,7 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
|
||||
if (n_compose + 1 == priv->compose_buffer_len)
|
||||
{
|
||||
priv->compose_buffer_len += 1;
|
||||
priv->compose_buffer = g_renew (guint, priv->compose_buffer, priv->compose_buffer_len);
|
||||
priv->compose_buffer = g_renew (guint16, priv->compose_buffer, priv->compose_buffer_len);
|
||||
}
|
||||
|
||||
priv->compose_buffer[n_compose++] = keyval;
|
||||
@@ -1063,7 +1071,6 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
|
||||
else /* Then, check for compose sequences */
|
||||
{
|
||||
gboolean success = FALSE;
|
||||
int prefix = 0;
|
||||
GString *output;
|
||||
|
||||
output = g_string_new ("");
|
||||
@@ -1102,29 +1109,18 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
|
||||
success = TRUE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
int table_prefix;
|
||||
|
||||
gtk_compose_table_get_prefix ((GtkComposeTable *)tmp_list->data,
|
||||
priv->compose_buffer, n_compose,
|
||||
&table_prefix);
|
||||
|
||||
prefix = MAX (prefix, table_prefix);
|
||||
}
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
G_UNLOCK (global_tables);
|
||||
|
||||
if (success)
|
||||
{
|
||||
g_string_free (output, TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
g_string_free (output, TRUE);
|
||||
|
||||
if (gtk_check_algorithmically (priv->compose_buffer, n_compose, output))
|
||||
if (success)
|
||||
return TRUE;
|
||||
|
||||
if (gtk_check_algorithmically (priv->compose_buffer, n_compose, &output_char))
|
||||
{
|
||||
if (!priv->in_compose_sequence)
|
||||
{
|
||||
@@ -1132,30 +1128,11 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
|
||||
g_signal_emit_by_name (context_simple, "preedit-start");
|
||||
}
|
||||
|
||||
if (output->len > 0)
|
||||
gtk_im_context_simple_commit_string (context_simple, output->str);
|
||||
if (output_char)
|
||||
gtk_im_context_simple_commit_char (context_simple, output_char);
|
||||
else
|
||||
g_signal_emit_by_name (context_simple, "preedit-changed");
|
||||
|
||||
g_string_free (output, TRUE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_string_free (output, TRUE);
|
||||
|
||||
/* If we get here, no Compose sequence matched.
|
||||
* Only beep if we were in a sequence before.
|
||||
*/
|
||||
if (prefix > 0)
|
||||
{
|
||||
for (i = prefix; i < n_compose; i++)
|
||||
priv->compose_buffer[i] = 0;
|
||||
|
||||
beep_surface (gdk_event_get_surface (event));
|
||||
|
||||
g_signal_emit_by_name (context_simple, "preedit-changed");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1218,23 +1195,28 @@ gtk_im_context_simple_get_preedit_string (GtkIMContext *context,
|
||||
if (priv->compose_buffer[i] == GDK_KEY_Multi_key)
|
||||
{
|
||||
/* We only show the Compose key visibly when it is the
|
||||
* only glyph in the preedit, or when the sequence contains
|
||||
* multiple Compose keys, or when it occurs in the
|
||||
* only glyph in the preedit, or when it occurs in the
|
||||
* middle of the sequence. Sadly, the official character,
|
||||
* U+2384, COMPOSITION SYMBOL, is bit too distracting, so
|
||||
* we use U+00B7, MIDDLE DOT.
|
||||
*/
|
||||
if (priv->compose_buffer[1] == 0 || i > 0 ||
|
||||
priv->compose_buffer[i + 1] == GDK_KEY_Multi_key)
|
||||
if (priv->compose_buffer[1] == 0 || i > 0)
|
||||
g_string_append (s, "·");
|
||||
}
|
||||
else
|
||||
{
|
||||
gunichar ch;
|
||||
gboolean need_space;
|
||||
|
||||
if (is_dead_key (priv->compose_buffer[i]))
|
||||
{
|
||||
append_dead_key (s, priv->compose_buffer[i]);
|
||||
ch = dead_key_to_unicode (priv->compose_buffer[i], &need_space);
|
||||
if (ch)
|
||||
{
|
||||
if (need_space)
|
||||
g_string_append_c (s, ' ');
|
||||
g_string_append_unichar (s, ch);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+2
-30
@@ -53,8 +53,6 @@
|
||||
#include "gtkdragicon.h"
|
||||
#include "gtkcsscolorvalueprivate.h"
|
||||
#include "gtkjoinedmenuprivate.h"
|
||||
#include "gtkcssstylepropertyprivate.h"
|
||||
#include "gtkcssnumbervalueprivate.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
@@ -843,26 +841,6 @@ gtk_label_update_layout_attributes (GtkLabel *self,
|
||||
pango_attr_list_unref (attrs);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_update_layout (GtkLabel *self)
|
||||
{
|
||||
GtkCssStyle *style;
|
||||
GtkCssStyleProperty *prop;
|
||||
float line_spacing;
|
||||
|
||||
if (self->layout == NULL)
|
||||
return;
|
||||
|
||||
style = gtk_css_node_get_style (gtk_widget_get_css_node (GTK_WIDGET (self)));
|
||||
|
||||
if (_gtk_css_value_equal (style->font->line_height, gtk_css_line_height_value_get_default ()))
|
||||
line_spacing = 0.0;
|
||||
else
|
||||
line_spacing = _gtk_css_number_value_get (style->font->line_height, 1.0);
|
||||
|
||||
pango_layout_set_line_spacing (self->layout, line_spacing);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_css_changed (GtkWidget *widget,
|
||||
GtkCssStyleChange *change)
|
||||
@@ -873,11 +851,6 @@ gtk_label_css_changed (GtkWidget *widget,
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_label_parent_class)->css_changed (widget, change);
|
||||
|
||||
if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_SIZE))
|
||||
{
|
||||
gtk_label_update_layout (self);
|
||||
}
|
||||
|
||||
if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_ATTRS))
|
||||
{
|
||||
new_attrs = gtk_css_style_get_pango_attributes (gtk_css_style_change_get_new_style (change));
|
||||
@@ -887,7 +860,7 @@ gtk_label_css_changed (GtkWidget *widget,
|
||||
else
|
||||
attrs_affected = FALSE;
|
||||
|
||||
if (change == NULL || attrs_affected || (self->select_info && self->select_info->links))
|
||||
if (change == NULL || attrs_affected || (self->select_info && self->select_info->links))
|
||||
{
|
||||
gtk_label_update_layout_attributes (self, new_attrs);
|
||||
|
||||
@@ -3214,7 +3187,7 @@ strip_ulines (const char *text,
|
||||
}
|
||||
|
||||
*q = *p;
|
||||
if (after_uline && *p != '_' && *accel_key == 0)
|
||||
if (after_uline && *accel_key == 0)
|
||||
*accel_key = g_utf8_get_char (p);
|
||||
|
||||
q++;
|
||||
@@ -4009,7 +3982,6 @@ gtk_label_ensure_layout (GtkLabel *self)
|
||||
self->layout = gtk_widget_create_pango_layout (GTK_WIDGET (self), self->text);
|
||||
|
||||
gtk_label_update_layout_attributes (self, NULL);
|
||||
gtk_label_update_layout (self);
|
||||
|
||||
switch (self->jtype)
|
||||
{
|
||||
|
||||
+5
-5
@@ -1433,14 +1433,14 @@ gtk_list_store_clear (GtkListStore *list_store)
|
||||
|
||||
/**
|
||||
* gtk_list_store_iter_is_valid:
|
||||
* @list_store: a list store
|
||||
* @iter: the iterator to check
|
||||
* @list_store: A `GtkListStore`.
|
||||
* @iter: A `GtkTreeIter`
|
||||
*
|
||||
* > This function is slow. Only use it for debugging and/or testing
|
||||
* > purposes.
|
||||
*
|
||||
* Checks if the given iter is a valid iter for this `GtkListStore`.
|
||||
*
|
||||
* This function is slow. Only use it for debugging and/or testing
|
||||
* purposes.
|
||||
*
|
||||
* Returns: %TRUE if the iter is valid, %FALSE if the iter is invalid.
|
||||
**/
|
||||
gboolean
|
||||
|
||||
+1
-1
@@ -868,7 +868,7 @@ gtk_main_sync (void)
|
||||
|
||||
store.store_loop = g_main_loop_new (NULL, TRUE);
|
||||
store.timeout_id = g_timeout_add_seconds (10, (GSourceFunc) sync_timed_out_cb, &store);
|
||||
gdk_source_set_static_name_by_id (store.timeout_id, "[gtk] gtk_main_sync clipboard store timeout");
|
||||
g_source_set_name_by_id (store.timeout_id, "[gtk] gtk_main_sync clipboard store timeout");
|
||||
|
||||
if (g_main_loop_is_running (store.store_loop))
|
||||
g_main_loop_run (store.store_loop);
|
||||
|
||||
+2
-22
@@ -34,7 +34,6 @@
|
||||
#include "gtkbuiltiniconprivate.h"
|
||||
#include "gtkgizmoprivate.h"
|
||||
#include "gtkbinlayout.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
typedef GtkBoxClass GtkMenuSectionBoxClass;
|
||||
|
||||
@@ -176,7 +175,7 @@ gtk_menu_section_box_schedule_separator_sync (GtkMenuSectionBox *box)
|
||||
box->separator_sync_idle = g_idle_add_full (G_PRIORITY_HIGH_IDLE, /* before resize... */
|
||||
gtk_menu_section_box_handle_sync_separators,
|
||||
box, NULL);
|
||||
gdk_source_set_static_name_by_id (box->separator_sync_idle, "[gtk] menu section box handle sync separators");
|
||||
g_source_set_name_by_id (box->separator_sync_idle, "[gtk] menu section box handle sync separators");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -309,25 +308,6 @@ submenu_hidden (GtkPopoverMenu *popover,
|
||||
gtk_menu_tracker_item_request_submenu_shown (item, FALSE);
|
||||
}
|
||||
|
||||
/* We're using the gizmo as an easy single child container, not as
|
||||
* a custom widget to draw some visual indicators (like markers).
|
||||
* As such its default focus functions blocks focus through the children,
|
||||
* so we need to handle it correctly here so that custom widgets inside
|
||||
* menus can be focused.
|
||||
*/
|
||||
static gboolean
|
||||
custom_widget_focus (GtkGizmo *gizmo,
|
||||
GtkDirectionType direction)
|
||||
{
|
||||
return gtk_widget_focus_child (GTK_WIDGET (gizmo), direction);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
custom_widget_grab_focus (GtkGizmo *gizmo)
|
||||
{
|
||||
return gtk_widget_grab_focus_child (GTK_WIDGET (gizmo));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_menu_section_box_insert_func (GtkMenuTrackerItem *item,
|
||||
int position,
|
||||
@@ -388,7 +368,7 @@ gtk_menu_section_box_insert_func (GtkMenuTrackerItem *item,
|
||||
{
|
||||
const char *id = gtk_menu_tracker_item_get_custom (item);
|
||||
|
||||
widget = gtk_gizmo_new ("widget", NULL, NULL, NULL, NULL, custom_widget_focus, custom_widget_grab_focus);
|
||||
widget = gtk_gizmo_new ("widget", NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
gtk_widget_set_layout_manager (widget, gtk_bin_layout_new ());
|
||||
|
||||
if (g_hash_table_lookup (box->custom_slots, id))
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
#include "gtkshortcutcontroller.h"
|
||||
#include "gtkshortcut.h"
|
||||
#include "gtkaccessibleprivate.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
/*< private >
|
||||
* GtkModelButton:
|
||||
@@ -1364,7 +1363,7 @@ start_open (GtkModelButton *button)
|
||||
return;
|
||||
|
||||
button->open_timeout = g_timeout_add (OPEN_TIMEOUT, open_submenu, button);
|
||||
gdk_source_set_static_name_by_id (button->open_timeout, "[gtk] open_submenu");
|
||||
g_source_set_name_by_id (button->open_timeout, "[gtk] open_submenu");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+4
-4
@@ -3052,7 +3052,7 @@ gtk_notebook_motion (GtkEventController *controller,
|
||||
notebook->dnd_timer = g_timeout_add (TIMEOUT_REPEAT * SCROLL_DELAY_FACTOR,
|
||||
scroll_notebook_timer,
|
||||
notebook);
|
||||
gdk_source_set_static_name_by_id (notebook->dnd_timer, "[gtk] scroll_notebook_timer");
|
||||
g_source_set_name_by_id (notebook->dnd_timer, "[gtk] scroll_notebook_timer");
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4018,7 +4018,7 @@ gtk_notebook_tab_drop_enter (GtkEventController *controller,
|
||||
notebook->switch_page = page;
|
||||
|
||||
notebook->switch_page_timer = g_timeout_add (TIMEOUT_EXPAND, gtk_notebook_switch_page_timeout, notebook);
|
||||
gdk_source_set_static_name_by_id (notebook->switch_page_timer, "[gtk] gtk_notebook_switch_page_timeout");
|
||||
g_source_set_name_by_id (notebook->switch_page_timer, "[gtk] gtk_notebook_switch_page_timeout");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4189,7 +4189,7 @@ gtk_notebook_timer (GtkNotebook *notebook)
|
||||
notebook->timer = g_timeout_add (TIMEOUT_REPEAT * SCROLL_DELAY_FACTOR,
|
||||
(GSourceFunc) gtk_notebook_timer,
|
||||
notebook);
|
||||
gdk_source_set_static_name_by_id (notebook->timer, "[gtk] gtk_notebook_timer");
|
||||
g_source_set_name_by_id (notebook->timer, "[gtk] gtk_notebook_timer");
|
||||
}
|
||||
else
|
||||
retval = TRUE;
|
||||
@@ -4206,7 +4206,7 @@ gtk_notebook_set_scroll_timer (GtkNotebook *notebook)
|
||||
notebook->timer = g_timeout_add (TIMEOUT_INITIAL,
|
||||
(GSourceFunc) gtk_notebook_timer,
|
||||
notebook);
|
||||
gdk_source_set_static_name_by_id (notebook->timer, "[gtk] gtk_notebook_timer");
|
||||
g_source_set_name_by_id (notebook->timer, "[gtk] gtk_notebook_timer");
|
||||
notebook->need_timer = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-57
@@ -715,7 +715,7 @@ gtk_popover_schedule_mnemonics_visible (GtkPopover *popover)
|
||||
|
||||
priv->mnemonics_display_timeout_id =
|
||||
g_timeout_add (MNEMONICS_DELAY, schedule_mnemonics_visible_cb, popover);
|
||||
gdk_source_set_static_name_by_id (priv->mnemonics_display_timeout_id, "[gtk] popover_schedule_mnemonics_visible_cb");
|
||||
g_source_set_name_by_id (priv->mnemonics_display_timeout_id, "[gtk] popover_schedule_mnemonics_visible_cb");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -972,59 +972,6 @@ gtk_popover_unrealize (GtkWidget *widget)
|
||||
g_clear_object (&priv->surface);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_popover_focus (GtkWidget *widget,
|
||||
GtkDirectionType direction)
|
||||
{
|
||||
if (!gtk_widget_get_visible (widget))
|
||||
return FALSE;
|
||||
|
||||
/* This code initially comes from gtkpopovermenu.c */
|
||||
if (gtk_widget_get_first_child (widget) == NULL)
|
||||
{
|
||||
/* Empty popover, so nothing to Tab through. */
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Move focus normally, but when nothing can be focused in this direction then we cycle around. */
|
||||
if (gtk_widget_focus_move (widget, direction))
|
||||
return TRUE;
|
||||
|
||||
if (gtk_popover_get_autohide (GTK_POPOVER (widget)))
|
||||
{
|
||||
GtkWidget *p = gtk_root_get_focus (gtk_widget_get_root (widget));
|
||||
|
||||
/* In the case where the popover doesn't have any focusable child (like
|
||||
* the GtkTreePopover for combo boxes) then the focus will end up out of
|
||||
* the popover, hence creating an infinite loop below. To avoid this, just
|
||||
* say we had focus and stop here.
|
||||
*/
|
||||
if (!gtk_widget_is_ancestor (p, widget) && p != widget)
|
||||
return TRUE;
|
||||
|
||||
/* Cycle around with (Shift+)Tab */
|
||||
if (direction == GTK_DIR_TAB_FORWARD || direction == GTK_DIR_TAB_BACKWARD)
|
||||
{
|
||||
for (;
|
||||
p != widget;
|
||||
p = gtk_widget_get_parent (p))
|
||||
{
|
||||
/* Unfocus everything in the popover. */
|
||||
gtk_widget_set_focus_child (p, NULL);
|
||||
}
|
||||
}
|
||||
/* Focus again from scratch */
|
||||
gtk_widget_focus_move (widget, direction);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_popover_show (GtkWidget *widget)
|
||||
{
|
||||
@@ -1787,7 +1734,6 @@ gtk_popover_class_init (GtkPopoverClass *klass)
|
||||
widget_class->unrealize = gtk_popover_unrealize;
|
||||
widget_class->map = gtk_popover_map;
|
||||
widget_class->unmap = gtk_popover_unmap;
|
||||
widget_class->focus = gtk_popover_focus;
|
||||
widget_class->show = gtk_popover_show;
|
||||
widget_class->hide = gtk_popover_hide;
|
||||
widget_class->measure = gtk_popover_measure;
|
||||
@@ -2229,8 +2175,8 @@ gtk_popover_get_position (GtkPopover *popover)
|
||||
* Sets whether @popover is modal.
|
||||
*
|
||||
* A modal popover will grab the keyboard focus on it when being
|
||||
* displayed. Focus will wrap around within the popover. Clicking
|
||||
* outside the popover area or pressing Esc will dismiss the popover.
|
||||
* displayed. Clicking outside the popover area or pressing Esc
|
||||
* will dismiss the popover.
|
||||
*
|
||||
* Called this function on an already showing popup with a new
|
||||
* autohide value different from the current one, will cause the
|
||||
|
||||
+4
-13
@@ -480,21 +480,12 @@ gtk_popover_menu_focus (GtkWidget *widget,
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
/* Cycle around with up/down arrows and (Shift+)Tab when modal */
|
||||
else if (gtk_popover_get_autohide (GTK_POPOVER (menu)))
|
||||
else if (direction == GTK_DIR_UP || direction == GTK_DIR_DOWN)
|
||||
{
|
||||
GtkWidget *p = gtk_root_get_focus (gtk_widget_get_root (widget));
|
||||
|
||||
/* In the case where the popover doesn't have any focusable child, if
|
||||
* the menu doesn't have any item for example, then the focus will end
|
||||
* up out of the popover, hence creating an infinite loop below. To
|
||||
* avoid this, just say we had focus and stop here.
|
||||
*/
|
||||
if (!gtk_widget_is_ancestor (p, widget) && p != widget)
|
||||
return TRUE;
|
||||
GtkWidget *p;
|
||||
|
||||
/* cycle around */
|
||||
for (;
|
||||
for (p = gtk_root_get_focus (gtk_widget_get_root (widget));
|
||||
p != widget;
|
||||
p = gtk_widget_get_parent (p))
|
||||
{
|
||||
@@ -502,7 +493,7 @@ gtk_popover_menu_focus (GtkWidget *widget,
|
||||
}
|
||||
if (gtk_widget_focus_move (widget, direction))
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
@@ -539,7 +539,7 @@ win32_poll_status_timeout (GtkPrintOperation *op)
|
||||
op_win32->timeout_id = g_timeout_add (STATUS_POLLING_TIME,
|
||||
(GSourceFunc)win32_poll_status_timeout,
|
||||
op);
|
||||
gdk_source_set_static_name_by_id (op_win32->timeout_id, "[gtk] win32_poll_status_timeout");
|
||||
g_source_set_name_by_id (op_win32->timeout_id, "[gtk] win32_poll_status_timeout");
|
||||
}
|
||||
g_object_unref (op);
|
||||
return FALSE;
|
||||
@@ -583,7 +583,7 @@ win32_end_run (GtkPrintOperation *op,
|
||||
op_win32->timeout_id = g_timeout_add (STATUS_POLLING_TIME,
|
||||
(GSourceFunc)win32_poll_status_timeout,
|
||||
op);
|
||||
gdk_source_set_static_name_by_id (op_win32->timeout_id, "[gtk] win32_poll_status_timeout");
|
||||
g_source_set_name_by_id (op_win32->timeout_id, "[gtk] win32_poll_status_timeout");
|
||||
}
|
||||
else
|
||||
/* Dunno what happened, pretend its finished */
|
||||
|
||||
@@ -631,7 +631,7 @@ preview_ready (GtkPrintOperationPreview *preview,
|
||||
preview_print_idle,
|
||||
pop,
|
||||
preview_print_idle_done);
|
||||
gdk_source_set_static_name_by_id (id, "[gtk] preview_print_idle");
|
||||
g_source_set_name_by_id (id, "[gtk] preview_print_idle");
|
||||
}
|
||||
|
||||
|
||||
@@ -2895,7 +2895,7 @@ print_pages (GtkPrintOperation *op,
|
||||
g_timeout_add (SHOW_PROGRESS_TIME,
|
||||
(GSourceFunc) show_progress_timeout,
|
||||
data);
|
||||
gdk_source_set_static_name_by_id (priv->show_progress_timeout_id, "[gtk] show_progress_timeout");
|
||||
g_source_set_name_by_id (priv->show_progress_timeout_id, "[gtk] show_progress_timeout");
|
||||
|
||||
data->progress = progress;
|
||||
}
|
||||
@@ -2964,7 +2964,7 @@ print_pages (GtkPrintOperation *op,
|
||||
print_pages_idle,
|
||||
data,
|
||||
print_pages_idle_done);
|
||||
gdk_source_set_static_name_by_id (priv->print_pages_idle_id, "[gtk] print_pages_idle");
|
||||
g_source_set_name_by_id (priv->print_pages_idle_id, "[gtk] print_pages_idle");
|
||||
|
||||
/* Recursive main loop to make sure we don't exit on sync operations */
|
||||
if (priv->is_sync)
|
||||
|
||||
@@ -1803,7 +1803,7 @@ schedule_idle_mark_conflicts (GtkPrintUnixDialog *dialog)
|
||||
return;
|
||||
|
||||
dialog->mark_conflicts_id = g_idle_add (mark_conflicts_callback, dialog);
|
||||
gdk_source_set_static_name_by_id (dialog->mark_conflicts_id, "[gtk] mark_conflicts_callback");
|
||||
g_source_set_name_by_id (dialog->mark_conflicts_id, "[gtk] mark_conflicts_callback");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+2
-2
@@ -2758,7 +2758,7 @@ initial_timeout (gpointer data)
|
||||
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
|
||||
|
||||
priv->timer->timeout_id = g_timeout_add (TIMEOUT_REPEAT, second_timeout, range);
|
||||
gdk_source_set_static_name_by_id (priv->timer->timeout_id, "[gtk] second_timeout");
|
||||
g_source_set_name_by_id (priv->timer->timeout_id, "[gtk] second_timeout");
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
@@ -2774,7 +2774,7 @@ gtk_range_add_step_timer (GtkRange *range,
|
||||
priv->timer = g_new (GtkRangeStepTimer, 1);
|
||||
|
||||
priv->timer->timeout_id = g_timeout_add (TIMEOUT_INITIAL, initial_timeout, range);
|
||||
gdk_source_set_static_name_by_id (priv->timer->timeout_id, "[gtk] initial_timeout");
|
||||
g_source_set_name_by_id (priv->timer->timeout_id, "[gtk] initial_timeout");
|
||||
priv->timer->step = step;
|
||||
|
||||
gtk_range_scroll (range, priv->timer->step);
|
||||
|
||||
@@ -1388,7 +1388,7 @@ gtk_recent_manager_changed (GtkRecentManager *manager)
|
||||
if (manager->priv->changed_timeout == 0)
|
||||
{
|
||||
manager->priv->changed_timeout = g_timeout_add (250, emit_manager_changed, manager);
|
||||
gdk_source_set_static_name_by_id (manager->priv->changed_timeout, "[gtk] emit_manager_changed");
|
||||
g_source_set_name_by_id (manager->priv->changed_timeout, "[gtk] emit_manager_changed");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1216,7 +1216,7 @@ check_update_scrollbar_proximity (GtkScrolledWindow *sw,
|
||||
else if (indicator_close && !on_other_scrollbar)
|
||||
{
|
||||
indicator->over_timeout_id = g_timeout_add (30, enable_over_timeout_cb, indicator);
|
||||
gdk_source_set_static_name_by_id (indicator->over_timeout_id, "[gtk] enable_over_timeout_cb");
|
||||
g_source_set_name_by_id (indicator->over_timeout_id, "[gtk] enable_over_timeout_cb");
|
||||
}
|
||||
else
|
||||
indicator_set_over (indicator, FALSE);
|
||||
@@ -1412,8 +1412,8 @@ scrolled_window_scroll (GtkScrolledWindow *scrolled_window,
|
||||
{
|
||||
priv->scroll_events_overshoot_id =
|
||||
g_timeout_add (50, start_scroll_deceleration_cb, scrolled_window);
|
||||
gdk_source_set_static_name_by_id (priv->scroll_events_overshoot_id,
|
||||
"[gtk] start_scroll_deceleration_cb");
|
||||
g_source_set_name_by_id (priv->scroll_events_overshoot_id,
|
||||
"[gtk] start_scroll_deceleration_cb");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3638,7 +3638,7 @@ indicator_set_fade (Indicator *indicator,
|
||||
if (visible && indicator->conceil_timer == 0)
|
||||
{
|
||||
indicator->conceil_timer = g_timeout_add (INDICATOR_FADE_OUT_TIME, maybe_hide_indicator, indicator);
|
||||
gdk_source_set_static_name_by_id (indicator->conceil_timer, "[gtk] maybe_hide_indicator");
|
||||
g_source_set_name_by_id (indicator->conceil_timer, "[gtk] maybe_hide_indicator");
|
||||
}
|
||||
if (!visible && indicator->conceil_timer != 0)
|
||||
{
|
||||
|
||||
@@ -126,7 +126,7 @@ gtk_search_engine_model_start (GtkSearchEngine *engine)
|
||||
return;
|
||||
|
||||
model->idle = g_idle_add (do_search, engine);
|
||||
gdk_source_set_static_name_by_id (model->idle, "[gtk] gtk_search_engine_model_start");
|
||||
g_source_set_name_by_id (model->idle, "[gtk] gtk_search_engine_model_start");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -519,7 +519,7 @@ reset_timeout (GtkSearchEntry *entry)
|
||||
entry->delayed_changed_id = g_timeout_add (DELAYED_TIMEOUT_ID,
|
||||
gtk_search_entry_changed_timeout_cb,
|
||||
entry);
|
||||
gdk_source_set_static_name_by_id (entry->delayed_changed_id, "[gtk] gtk_search_entry_changed_timeout_cb");
|
||||
g_source_set_name_by_id (entry->delayed_changed_id, "[gtk] gtk_search_entry_changed_timeout_cb");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+2
-2
@@ -906,7 +906,7 @@ start_spinning (GtkSpinButton *spin,
|
||||
spin->timer = g_timeout_add (TIMEOUT_INITIAL,
|
||||
(GSourceFunc) gtk_spin_button_timer,
|
||||
(gpointer) spin);
|
||||
gdk_source_set_static_name_by_id (spin->timer, "[gtk] gtk_spin_button_timer");
|
||||
g_source_set_name_by_id (spin->timer, "[gtk] gtk_spin_button_timer");
|
||||
}
|
||||
gtk_spin_button_real_spin (spin, click_child == spin->up_button ? step : -step);
|
||||
}
|
||||
@@ -1318,7 +1318,7 @@ gtk_spin_button_timer (GtkSpinButton *spin_button)
|
||||
spin_button->timer = g_timeout_add (TIMEOUT_REPEAT,
|
||||
(GSourceFunc) gtk_spin_button_timer,
|
||||
spin_button);
|
||||
gdk_source_set_static_name_by_id (spin_button->timer, "[gtk] gtk_spin_button_timer");
|
||||
g_source_set_name_by_id (spin_button->timer, "[gtk] gtk_spin_button_timer");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -245,7 +245,7 @@ gtk_stack_switcher_drag_enter (GtkDropControllerMotion *motion,
|
||||
guint switch_timer = g_timeout_add (TIMEOUT_EXPAND,
|
||||
gtk_stack_switcher_switch_timeout,
|
||||
button);
|
||||
gdk_source_set_static_name_by_id (switch_timer, "[gtk] gtk_stack_switcher_switch_timeout");
|
||||
g_source_set_name_by_id (switch_timer, "[gtk] gtk_stack_switcher_switch_timeout");
|
||||
g_object_set_data_full (G_OBJECT (button), "-gtk-switch-timer", GUINT_TO_POINTER (switch_timer), clear_timer);
|
||||
}
|
||||
}
|
||||
|
||||
+30
-31
@@ -3636,7 +3636,7 @@ buffer_inserted_text (GtkEntryBuffer *buffer,
|
||||
password_hint->source_id = g_timeout_add (password_hint_timeout,
|
||||
(GSourceFunc)gtk_text_remove_password_hint,
|
||||
self);
|
||||
gdk_source_set_static_name_by_id (password_hint->source_id, "[gtk] gtk_text_remove_password_hint");
|
||||
g_source_set_name_by_id (password_hint->source_id, "[gtk] gtk_text_remove_password_hint");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5049,40 +5049,39 @@ gtk_text_move_visually (GtkText *self,
|
||||
int index;
|
||||
PangoLayout *layout = gtk_text_ensure_layout (self, FALSE);
|
||||
const char *text;
|
||||
gboolean split_cursor;
|
||||
gboolean strong;
|
||||
|
||||
text = pango_layout_get_text (layout);
|
||||
|
||||
|
||||
index = g_utf8_offset_to_pointer (text, start) - text;
|
||||
|
||||
|
||||
g_object_get (gtk_widget_get_settings (GTK_WIDGET (self)),
|
||||
"gtk-split-cursor", &split_cursor,
|
||||
NULL);
|
||||
|
||||
if (split_cursor)
|
||||
strong = TRUE;
|
||||
else
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkSeat *seat;
|
||||
GdkDevice *keyboard = NULL;
|
||||
PangoDirection direction = PANGO_DIRECTION_LTR;
|
||||
|
||||
display = gtk_widget_get_display (GTK_WIDGET (self));
|
||||
seat = gdk_display_get_default_seat (display);
|
||||
if (seat)
|
||||
keyboard = gdk_seat_get_keyboard (seat);
|
||||
if (keyboard)
|
||||
direction = gdk_device_get_direction (keyboard);
|
||||
|
||||
strong = direction == priv->resolved_dir;
|
||||
}
|
||||
|
||||
while (count != 0)
|
||||
{
|
||||
int new_index, new_trailing;
|
||||
gboolean split_cursor;
|
||||
gboolean strong;
|
||||
|
||||
g_object_get (gtk_widget_get_settings (GTK_WIDGET (self)),
|
||||
"gtk-split-cursor", &split_cursor,
|
||||
NULL);
|
||||
|
||||
if (split_cursor)
|
||||
strong = TRUE;
|
||||
else
|
||||
{
|
||||
GdkDisplay *display;
|
||||
GdkSeat *seat;
|
||||
GdkDevice *keyboard = NULL;
|
||||
PangoDirection direction = PANGO_DIRECTION_LTR;
|
||||
|
||||
display = gtk_widget_get_display (GTK_WIDGET (self));
|
||||
seat = gdk_display_get_default_seat (display);
|
||||
if (seat)
|
||||
keyboard = gdk_seat_get_keyboard (seat);
|
||||
if (keyboard)
|
||||
direction = gdk_device_get_direction (keyboard);
|
||||
|
||||
strong = direction == priv->resolved_dir;
|
||||
}
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
@@ -5099,11 +5098,11 @@ gtk_text_move_visually (GtkText *self,
|
||||
index = 0;
|
||||
else if (new_index != G_MAXINT)
|
||||
index = new_index;
|
||||
|
||||
|
||||
while (new_trailing--)
|
||||
index = g_utf8_next_char (text + index) - text;
|
||||
}
|
||||
|
||||
|
||||
return g_utf8_pointer_to_offset (text, text + index);
|
||||
}
|
||||
|
||||
@@ -6286,7 +6285,7 @@ gtk_text_selection_bubble_popup_set (GtkText *self)
|
||||
|
||||
priv->selection_bubble_timeout_id =
|
||||
g_timeout_add (50, gtk_text_selection_bubble_popup_show, self);
|
||||
gdk_source_set_static_name_by_id (priv->selection_bubble_timeout_id, "[gtk] gtk_text_selection_bubble_popup_cb");
|
||||
g_source_set_name_by_id (priv->selection_bubble_timeout_id, "[gtk] gtk_text_selection_bubble_popup_cb");
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user