Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

hasStrings Linux #21388

Merged
merged 2 commits into from
Oct 6, 2020
Merged

hasStrings Linux #21388

merged 2 commits into from
Oct 6, 2020

Conversation

justinmc
Copy link
Contributor

Description

Implements the hasStrings method for the Linux platform.

Related Issues

Main issue: flutter/flutter#60145

hasStrings iOS: #19859
hasStrings Android: #20393
hasStrings Mac: #20531

hasStrings framework: flutter/flutter#61774

Tests

I added no tests. Please let me know what the requirements are for testing on Linux if this does in fact need tests!

@justinmc justinmc self-assigned this Sep 24, 2020
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

FlMethodCall* method_call) {
GtkClipboard* clipboard =
gtk_clipboard_get_default(gdk_display_get_default());
gtk_clipboard_request_text(clipboard, clipboard_text_has_strings_cb,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robert-ancell Is there a reason to use the *_request_* APIs over the *_wait_* APIs? Otherwise this could all just be a call to gtk_clipboard_wait_is_text_available ()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm merging this PR, but feel free to reply if anyone thinks this doesn't seem right and I'm happy to take a look at changing this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The *_wait_* methods would block and cause no other Flutter method calls etc to be handled. So the implemented method is correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good to know, thanks for following up @robert-ancell !

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

It always amazes me how much boilerplate we need to essentially fetch a single bit...

@justinmc justinmc merged commit 9a7b556 into flutter:master Oct 6, 2020
@justinmc justinmc deleted the has-strings-linux branch October 6, 2020 23:29
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 7, 2020
liyuqian added a commit to liyuqian/flutter that referenced this pull request Oct 7, 2020
flutter/engine@7e6191d...9a7b556

2020-10-06 [email protected] hasStrings Linux (flutter/engine#21388)
2020-10-06 [email protected] add api_conform_test to analyze step. remove build script. (flutter/engine#21633)
2020-10-06 [email protected] Roll Fuchsia Mac SDK from 8q-OCkyhO... to xM2vYLfIT... (flutter/engine#21635)
2020-10-06 [email protected] Roll Skia from 33b42e12ab71 to 107114dd1d6e (5 revisions) (flutter/engine#21634)
2020-10-06 [email protected] Roll Fuchsia Linux SDK from HeAkKHbFY... to kr1tNtZvZ... (flutter/engine#21630)
2020-10-06 [email protected] running web tests only on DEPS and web directories (flutter/engine#21613)
2020-10-06 [email protected] Roll Skia from c3bdd1c597dc to 33b42e12ab71 (6 revisions) (flutter/engine#21628)
2020-10-06 [email protected] Use the gpu config for shell_unittests to declare SHELL_ENABLE_{GL,VULKAN} (flutter/engine#21603)
2020-10-06 [email protected] [linux] Allow engine flags via environment vars (flutter/engine#21497)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 7, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 8, 2020
gspencergoog pushed a commit to gspencergoog/engine that referenced this pull request Oct 20, 2020
hasStrings method for clipboard status, Linux
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants