Better TimeZone entry in System Settings (#1254)

* Better timezone labels in System TimeZone

Replace with GtkEntry with auto-complete

Also removed async task as now loading is fast

Address Thog's comments

self-nit: Remove string alias

Address AcK's comments

* Improve parsing
* Optimize and fix string matching

Address jD's comments

* Also, make abbreviations searchable
* Optimize EntryCompletion's MatchFunc

* nit: Result.IsFailure()

* Fix potential crash on opening Settings window w/o FW installed
This commit is contained in:
mageven 2020-07-21 09:44:42 +05:30 committed by GitHub
parent 21dfa4974a
commit 4aa47a66c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 190 additions and 68 deletions

View file

@ -7,6 +7,11 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkEntryCompletion" id="_systemTimeZoneCompletion">
<property name="inline-completion">True</property>
<property name="inline-selection">True</property>
<property name="minimum-key-length">0</property>
</object>
<object class="GtkAdjustment" id="_systemTimeDaySpinAdjustment">
<property name="lower">1</property>
<property name="upper">31</property>
@ -1224,11 +1229,12 @@
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="_systemTimeZoneSelect">
<object class="GtkEntry" id="_systemTimeZoneEntry">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">Change System TimeZone</property>
<property name="margin_left">5</property>
<property name="completion">_systemTimeZoneCompletion</property>
</object>
<packing>
<property name="expand">False</property>