Compare commits
26
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48ea80d391 | ||
|
|
b138e218bb | ||
|
|
829440f546 | ||
|
|
14859b4009 | ||
|
|
3a596054ad | ||
|
|
65191d83b4 | ||
|
|
8499b0e254 | ||
|
|
f166ca501f | ||
|
|
a36331522f | ||
|
|
25e43a5d08 | ||
|
|
ad914441a2 | ||
|
|
200d337769 | ||
|
|
e56f1a976e | ||
|
|
6a66cd4fa6 | ||
|
|
55c493389a | ||
|
|
06f1303834 | ||
|
|
3d5687ae3c | ||
|
|
cdd3fba593 | ||
|
|
f11c101878 | ||
|
|
7c412ca7d9 | ||
|
|
e3a6e8f82c | ||
|
|
ce10ad64c4 | ||
|
|
5b43d4733c | ||
|
|
3671d5a299 | ||
|
|
a024d9f005 | ||
|
|
d94a3500f6 |
+29
@@ -0,0 +1,29 @@
|
|||||||
|
ABOUT-NLS
|
||||||
|
Makefile
|
||||||
|
Makefile.in
|
||||||
|
Makefile.in.in
|
||||||
|
aclocal.m4
|
||||||
|
autom4te.cache/
|
||||||
|
config/
|
||||||
|
configure
|
||||||
|
config.log
|
||||||
|
config.status
|
||||||
|
data/*.json
|
||||||
|
m4/
|
||||||
|
po/*.header
|
||||||
|
po/*.sed
|
||||||
|
po/*.sin
|
||||||
|
po/Makevars.template
|
||||||
|
po/POTFILES
|
||||||
|
po/Rules-quot
|
||||||
|
po/gnome-shell-extensions.pot
|
||||||
|
po/stamp-it
|
||||||
|
staging/
|
||||||
|
zip-files/
|
||||||
|
|
||||||
|
*~
|
||||||
|
*.gmo
|
||||||
|
metadata.json
|
||||||
|
*.desktop
|
||||||
|
*.gschema.valid
|
||||||
|
*.session
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
stages:
|
||||||
|
- commit_check
|
||||||
|
- source_check
|
||||||
|
- build
|
||||||
|
|
||||||
|
variables:
|
||||||
|
LINT_LOG: "eslint-report.txt"
|
||||||
|
|
||||||
|
.only_default: &only_default
|
||||||
|
only:
|
||||||
|
- branches
|
||||||
|
- tags
|
||||||
|
- merge_requests
|
||||||
|
|
||||||
|
check_commit_log:
|
||||||
|
image: registry.gitlab.gnome.org/gnome/gjs:fedora.static-analysis
|
||||||
|
stage: commit_check
|
||||||
|
script:
|
||||||
|
- ./.gitlab-ci/check-commit-log.sh
|
||||||
|
only:
|
||||||
|
- merge_requests
|
||||||
|
|
||||||
|
eslint:
|
||||||
|
image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v1
|
||||||
|
stage: source_check
|
||||||
|
script:
|
||||||
|
- eslint -o $LINT_LOG --no-color || { cat $LINT_LOG; false; }
|
||||||
|
<<: *only_default
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- ${LINT_LOG}
|
||||||
|
when: on_failure
|
||||||
|
|
||||||
|
build-shell-extensions:
|
||||||
|
image: registry.gitlab.gnome.org/gnome/gnome-shell/extension-ci:v1
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- meson _build .
|
||||||
|
- ninja -C _build test install
|
||||||
|
<<: *only_default
|
||||||
Executable
+31
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -z "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then
|
||||||
|
echo Cannot review non-merge request
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git fetch $CI_MERGE_REQUEST_PROJECT_URL.git $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
||||||
|
|
||||||
|
branch_point=$(git merge-base HEAD FETCH_HEAD)
|
||||||
|
|
||||||
|
commits=$(git log --format='format:%H' $branch_point..$CI_COMMIT_SHA)
|
||||||
|
|
||||||
|
if [ -z "$commits" ]; then
|
||||||
|
echo Commit range empty
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
function commit_message_has_url() {
|
||||||
|
commit=$1
|
||||||
|
commit_message=$(git show -s --format='format:%b' $commit)
|
||||||
|
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
for commit in $commits; do
|
||||||
|
if ! commit_message_has_url $commit; then
|
||||||
|
echo "Missing merge request or issue URL on commit $(echo $commit | cut -c -8)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "data/gnome-shell-sass"]
|
||||||
|
path = data/gnome-shell-sass
|
||||||
|
url = https://gitlab.gnome.org/GNOME/gnome-shell-sass.git
|
||||||
@@ -1,3 +1,33 @@
|
|||||||
|
3.33.3
|
||||||
|
======
|
||||||
|
* Misc. bug fixes [Florian, Marco; !67, !68]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner, Marco Trevisan (Treviño)
|
||||||
|
|
||||||
|
3.33.2
|
||||||
|
======
|
||||||
|
* Misc. bug fixes and cleanups [Florian; !66]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner
|
||||||
|
|
||||||
|
3.33.1
|
||||||
|
======
|
||||||
|
* Misc. bug fixes [Florian; !64]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner
|
||||||
|
|
||||||
|
3.32.1
|
||||||
|
======
|
||||||
|
* Fix windowsNavigator extension after ES6 port [Florian; #143]
|
||||||
|
* screenshot-window-sizer: Add phone screenshot sizes [Adrien; !65]
|
||||||
|
* Misc. bug fixes and cleanups [Fabian; !62]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Florian Müllner, Adrien Plazas, Fabian P. Schmidt
|
||||||
|
|
||||||
3.32.0
|
3.32.0
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ Bugs should be reported to the GNOME [bug tracking system][bug-tracker].
|
|||||||
|
|
||||||
## Extensions
|
## Extensions
|
||||||
|
|
||||||
|
* alternate-tab (**OBSOLETE**)
|
||||||
|
|
||||||
|
Lets you use classic Alt+Tab (window-based instead of app-based) in GNOME Shell.
|
||||||
|
This extension is obsolete since GNOME 3.30, see [this blogpost][alternatetab-post]
|
||||||
|
for further details.
|
||||||
|
|
||||||
* apps-menu
|
* apps-menu
|
||||||
|
|
||||||
Lets you reach an application using gnome 2.x style menu on the panel.
|
Lets you reach an application using gnome 2.x style menu on the panel.
|
||||||
@@ -74,3 +80,4 @@ file for details.
|
|||||||
[shell-page]: https://wiki.gnome.org/Projects/GnomeShell
|
[shell-page]: https://wiki.gnome.org/Projects/GnomeShell
|
||||||
[bug-tracker]: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues
|
[bug-tracker]: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues
|
||||||
[license]: COPYING
|
[license]: COPYING
|
||||||
|
[alternatetab-post]: https://blogs.gnome.org/fmuellner/2018/10/11/the-future-of-alternatetab-and-why-you-need-not-worry/
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ $variant: 'light';
|
|||||||
&.lock-screen,
|
&.lock-screen,
|
||||||
&.unlock-screen,
|
&.unlock-screen,
|
||||||
&.login-screen {
|
&.login-screen {
|
||||||
background-color: transparentize($_bubble_bg_color, 0.5);
|
background-color: transparentize($bg_color, 0.5);
|
||||||
background-gradient-start: transparentize($_bubble_bg_color, 0.5);
|
background-gradient-start: transparentize($bg_color, 0.5);
|
||||||
background-gradient-end: transparentize($_bubble_bg_color, 0.5);
|
background-gradient-end: transparentize($bg_color, 0.5);
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
.panel-button { color: $osd_fg_color; }
|
.panel-button { color: $osd_fg_color; }
|
||||||
}
|
}
|
||||||
|
|||||||
Submodule
+1
Submodule data/gnome-shell-sass added at c5df33dda7
@@ -1,339 +0,0 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
|
||||||
General Public License applies to most of the Free Software
|
|
||||||
Foundation's software and to any other program whose authors commit to
|
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
this service if you wish), that you receive source code or can get it
|
|
||||||
if you want it, that you can change the software or use pieces of it
|
|
||||||
in new free programs; and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if you
|
|
||||||
distribute copies of the software, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
|
||||||
you have. You must make sure that they, too, receive or can get the
|
|
||||||
source code. And you must show them these terms so they know their
|
|
||||||
rights.
|
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
|
||||||
distribute and/or modify the software.
|
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
software. If the software is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original, so
|
|
||||||
that any problems introduced by others will not reflect on the original
|
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
|
||||||
program will individually obtain patent licenses, in effect making the
|
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The "Program", below,
|
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
|
||||||
source code as you receive it, in any medium, provided that you
|
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
|
||||||
of it, thus forming a work based on the Program, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
|
||||||
whole or in part contains or is derived from the Program or any
|
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
|
||||||
when run, you must cause it, when started running for such
|
|
||||||
interactive use in the most ordinary way, to print or display an
|
|
||||||
announcement including an appropriate copyright notice and a
|
|
||||||
notice that there is no warranty (or else, saying that you provide
|
|
||||||
a warranty) and that users may redistribute the program under
|
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Program,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
|
||||||
under Section 2) in object code or executable form under the terms of
|
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
|
||||||
source code, which must be distributed under the terms of Sections
|
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
|
||||||
years, to give any third party, for a charge no more than your
|
|
||||||
cost of physically performing source distribution, a complete
|
|
||||||
machine-readable copy of the corresponding source code, to be
|
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
|
||||||
to distribute corresponding source code. (This alternative is
|
|
||||||
allowed only for noncommercial distribution and only if you
|
|
||||||
received the program in object code or executable form with such
|
|
||||||
an offer, in accord with Subsection b above.)
|
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For an executable work, complete source
|
|
||||||
code means all the source code for all modules it contains, plus any
|
|
||||||
associated interface definition files, plus the scripts used to
|
|
||||||
control compilation and installation of the executable. However, as a
|
|
||||||
special exception, the source code distributed need not include
|
|
||||||
anything that is normally distributed (in either source or binary
|
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
|
||||||
operating system on which the executable runs, unless that component
|
|
||||||
itself accompanies the executable.
|
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
|
||||||
access to copy from a designated place, then offering equivalent
|
|
||||||
access to copy the source code from the same place counts as
|
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
|
||||||
except as expressly provided under this License. Any attempt
|
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
|
||||||
void, and will automatically terminate your rights under this License.
|
|
||||||
However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such
|
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Program or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Program (or any work based on the
|
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
|
||||||
Program), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
|
||||||
these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
this License.
|
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Program at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Program by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system, which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
|
||||||
specifies a version number of this License which applies to it and "any
|
|
||||||
later version", you have the option of following the terms and conditions
|
|
||||||
either of that version or of any later version published by the Free
|
|
||||||
Software Foundation. If the Program does not specify a version number of
|
|
||||||
this License, you may choose any version ever published by the Free Software
|
|
||||||
Foundation.
|
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
|
||||||
programs whose distribution conditions are different, write to the author
|
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
|
||||||
when it starts in an interactive mode:
|
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) year name of author
|
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, the commands you use may
|
|
||||||
be called something other than `show w' and `show c'; they could even be
|
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1989
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
This General Public License does not permit incorporating your program into
|
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
|
||||||
consider it more useful to permit linking proprietary applications with the
|
|
||||||
library. If this is what you want to do, use the GNU Library General
|
|
||||||
Public License instead of this License.
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# GNOME Shell Sass
|
|
||||||
GNOME Shell Sass is a project intended to allow the sharing of the
|
|
||||||
theme sources in sass between gnome-shell and other projects like
|
|
||||||
gnome-shell-extensions.
|
|
||||||
|
|
||||||
Any changes should be done in the [GNOME Shell subtree][shell-subtree]
|
|
||||||
and not the stand-alone [gnome-shell-sass repository][sass-repo]. They
|
|
||||||
will then be synchronized periodically before releases.
|
|
||||||
|
|
||||||
## License
|
|
||||||
GNOME Shell Sass is distributed under the terms of the GNU General Public
|
|
||||||
License, version 2 or later. See the [COPYING][license] file for details.
|
|
||||||
|
|
||||||
[shell-subtree]: https://gitlab.gnome.org/GNOME/gnome-shell/tree/master/data/theme/gnome-shell-sass
|
|
||||||
[sass-repo]: https://gitlab.gnome.org/GNOME/gnome-shell-sass
|
|
||||||
[license]: COPYING
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
// When color definition differs for dark and light variant,
|
|
||||||
// it gets @if ed depending on $variant
|
|
||||||
|
|
||||||
|
|
||||||
$base_color: if($variant == 'light', #ffffff, lighten(desaturate(#241f31, 20%), 2%));
|
|
||||||
$bg_color: if($variant == 'light', #f6f5f4, desaturate(#3d3846, 10%));
|
|
||||||
$fg_color: if($variant == 'light', #2e3436, #eeeeec);
|
|
||||||
|
|
||||||
$selected_fg_color: #ffffff;
|
|
||||||
$selected_bg_color: if($variant == 'light', #3584e4, darken(#3584e4, 20%));
|
|
||||||
$selected_borders_color: if($variant== 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 30%));
|
|
||||||
$borders_color: if($variant == 'light', darken($bg_color, 18%), darken($bg_color, 10%));
|
|
||||||
$borders_edge: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93));
|
|
||||||
$link_color: if($variant == 'light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 20%));
|
|
||||||
$link_visited_color: if($variant == 'light', darken($selected_bg_color, 20%), lighten($selected_bg_color, 10%));
|
|
||||||
$top_hilight: $borders_edge;
|
|
||||||
|
|
||||||
$warning_color: #f57900;
|
|
||||||
$error_color: #cc0000;
|
|
||||||
$success_color: if($variant == 'light', #33d17a, darken(#33d17a, 10%));
|
|
||||||
$destructive_color: if($variant == 'light', #e01b24, darken(#e01b24, 10%));
|
|
||||||
|
|
||||||
$osd_fg_color: #eeeeec;
|
|
||||||
$osd_bg_color: #2e3436;
|
|
||||||
$osd_borders_color: transparentize(black, 0.3);
|
|
||||||
$osd_outer_borders_color: transparentize(white, 0.9);
|
|
||||||
|
|
||||||
$tooltip_borders_color: $osd_outer_borders_color;
|
|
||||||
|
|
||||||
//insensitive state derived colors
|
|
||||||
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);
|
|
||||||
$insensitive_bg_color: mix($bg_color, $base_color, 60%);
|
|
||||||
$insensitive_borders_color: $borders_color;
|
|
||||||
|
|
||||||
//colors for the backdrop state, derived from the main colors.
|
|
||||||
$backdrop_base_color: if($variant =='light', darken($base_color,1%), lighten($base_color,1%));
|
|
||||||
$backdrop_bg_color: $bg_color;
|
|
||||||
$backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 80%);
|
|
||||||
$backdrop_insensitive_color: if($variant =='light', darken($backdrop_bg_color,15%), lighten($backdrop_bg_color,15%));
|
|
||||||
$backdrop_borders_color: mix($borders_color, $bg_color, 90%);
|
|
||||||
$backdrop_dark_fill: mix($backdrop_borders_color,$backdrop_bg_color, 35%);
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,221 +0,0 @@
|
|||||||
// Drawing mixins
|
|
||||||
|
|
||||||
// generic drawing of more complex things
|
|
||||||
|
|
||||||
@function _widget_edge($c:$borders_edge) {
|
|
||||||
// outer highlight "used" on most widgets
|
|
||||||
@return 0 1px $c;
|
|
||||||
}
|
|
||||||
|
|
||||||
// provide font size in rem, with px fallback
|
|
||||||
@mixin fontsize($size: 24, $base: 16) {
|
|
||||||
font-size: round($size) + pt;
|
|
||||||
//font-size: ($size / $base) * 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin _shadows($shadow1, $shadow2:none, $shadow3:none, $shadow4:none) {
|
|
||||||
//
|
|
||||||
// Helper function to stack up to 4 box-shadows;
|
|
||||||
//
|
|
||||||
@if $shadow4!=none { box-shadow: $shadow1, $shadow2, $shadow3, $shadow4; }
|
|
||||||
@else if $shadow3!=none { box-shadow: $shadow1, $shadow2, $shadow3; }
|
|
||||||
@else if $shadow2!=none { box-shadow: $shadow1, $shadow2; }
|
|
||||||
@else { box-shadow: $shadow1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
// entries
|
|
||||||
|
|
||||||
@mixin entry($t, $fc:$selected_bg_color, $edge: $borders_edge) {
|
|
||||||
//
|
|
||||||
// Entries drawing function
|
|
||||||
//
|
|
||||||
// $t: entry type
|
|
||||||
// $fc: focus color
|
|
||||||
// $edge: set to none to not draw the bottom edge or specify a color to not
|
|
||||||
// use the default one
|
|
||||||
//
|
|
||||||
// possible $t values:
|
|
||||||
// normal, focus, insensitive
|
|
||||||
//
|
|
||||||
$_inner_shadows: inset 0 2px 4px transparentize(black, 0.6);
|
|
||||||
|
|
||||||
@if $t==normal {
|
|
||||||
background-color: $base_color;
|
|
||||||
border-color: $borders_color;
|
|
||||||
@include _shadows($_inner_shadows);
|
|
||||||
|
|
||||||
}
|
|
||||||
@if $t==focus {
|
|
||||||
@include _shadows($_inner_shadows);
|
|
||||||
border-color: if($fc==$selected_bg_color,
|
|
||||||
$selected_borders_color,
|
|
||||||
darken($fc,35%));
|
|
||||||
}
|
|
||||||
@if $t==hover { }
|
|
||||||
@if $t==insensitive {
|
|
||||||
color: $insensitive_fg_color;
|
|
||||||
border-color: $insensitive_bg_color;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// buttons
|
|
||||||
|
|
||||||
@function _border_color ($c) { @return darken($c,25%); } // colored buttons want
|
|
||||||
// the border form the
|
|
||||||
// base color
|
|
||||||
|
|
||||||
@function _text_shadow_color ($tc:$fg_color, $bg:$bg_color) {
|
|
||||||
//
|
|
||||||
// calculate the color of text shadows
|
|
||||||
//
|
|
||||||
// $tc is the text color
|
|
||||||
// $bg is the background color
|
|
||||||
//
|
|
||||||
$_lbg: lightness($bg)/100%;
|
|
||||||
@if lightness($tc)<50% { @return transparentize(white,1-$_lbg/($_lbg*1.3)); }
|
|
||||||
@else { @return transparentize(black,$_lbg*0.8); }
|
|
||||||
}
|
|
||||||
|
|
||||||
@function _button_hilight_color($c) {
|
|
||||||
//
|
|
||||||
// calculate the right top hilight color for buttons
|
|
||||||
//
|
|
||||||
// $c: base color;
|
|
||||||
//
|
|
||||||
@if lightness($c)>90% { @return white; }
|
|
||||||
@else if lightness($c)>80% { @return transparentize(white, 0.3); }
|
|
||||||
@else if lightness($c)>50% { @return transparentize(white, 0.5); }
|
|
||||||
@else if lightness($c)>40% { @return transparentize(white, 0.7); }
|
|
||||||
@else { @return transparentize(white, 0.9); }
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin _button_text_shadow ($tc:$fg_color, $bg:$bg_color) {
|
|
||||||
//
|
|
||||||
// helper function for the text emboss effect
|
|
||||||
//
|
|
||||||
// $tc is the optional text color, not the shadow color
|
|
||||||
//
|
|
||||||
// TODO: this functions needs a way to deal with special cases
|
|
||||||
//
|
|
||||||
|
|
||||||
$_shadow: _text_shadow_color($tc, $bg);
|
|
||||||
|
|
||||||
@if lightness($tc)<50% {
|
|
||||||
text-shadow: 0 1px $_shadow;
|
|
||||||
icon-shadow: 0 1px $_shadow;
|
|
||||||
}
|
|
||||||
@else {
|
|
||||||
text-shadow: 0 -1px $_shadow;
|
|
||||||
icon-shadow: 0 -1px $_shadow;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@mixin button($t, $c:$osd_bg_color, $tc:$fg_color, $edge: $borders_edge) {
|
|
||||||
//
|
|
||||||
// Button drawing function
|
|
||||||
//
|
|
||||||
// $t: button type,
|
|
||||||
// $c: base button color for colored* types
|
|
||||||
// $tc: optional text color for colored* types
|
|
||||||
// $edge: set to none to not draw the bottom edge or specify a color to not
|
|
||||||
// use the default one
|
|
||||||
//
|
|
||||||
// possible $t values:
|
|
||||||
// normal, hover, active, insensitive, insensitive-active,
|
|
||||||
// backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active,
|
|
||||||
// osd, osd-hover, osd-active, osd-insensitive, osd-backdrop, undecorated
|
|
||||||
//
|
|
||||||
|
|
||||||
$_hilight_color: _button_hilight_color($c);
|
|
||||||
$_button_edge: if($edge == none, none, _widget_edge($edge));
|
|
||||||
$_blank_edge: if($edge == none, none, _widget_edge(transparentize($edge,1)));
|
|
||||||
|
|
||||||
|
|
||||||
@if $t==normal {
|
|
||||||
//
|
|
||||||
// normal button
|
|
||||||
//
|
|
||||||
$_bg: if($c!=$osd_bg_color, transparentize($c, 0.5),
|
|
||||||
$osd_bg_color);
|
|
||||||
|
|
||||||
color: $osd_fg_color;
|
|
||||||
background-color: $_bg;
|
|
||||||
border-color: $osd_borders_color;
|
|
||||||
box-shadow: inset 0 1px lighten($osd_bg_color,10%);
|
|
||||||
text-shadow: 0 1px black;
|
|
||||||
icon-shadow: 0 1px black;
|
|
||||||
}
|
|
||||||
@if $t==focus {
|
|
||||||
//
|
|
||||||
// focused button
|
|
||||||
//
|
|
||||||
$_bg: if($c!=$osd_bg_color, transparentize($c, 0.3),
|
|
||||||
lighten($osd_bg_color,3%));
|
|
||||||
|
|
||||||
color: $osd_fg_color;
|
|
||||||
text-shadow: 0 1px black;
|
|
||||||
icon-shadow: 0 1px black;
|
|
||||||
box-shadow: inset 0px 0px 0px 1px $selected_bg_color;
|
|
||||||
}
|
|
||||||
|
|
||||||
@else if $t==hover {
|
|
||||||
//
|
|
||||||
// active osd button
|
|
||||||
//
|
|
||||||
$_bg: if($c!=$osd_bg_color, transparentize($c, 0.3),
|
|
||||||
lighten($osd_bg_color,3%));
|
|
||||||
|
|
||||||
color: white;
|
|
||||||
border-color: $osd_borders_color;
|
|
||||||
background-color: $_bg;
|
|
||||||
box-shadow: inset 0 1px lighten($osd_bg_color,20%);
|
|
||||||
text-shadow: 0 1px black;
|
|
||||||
icon-shadow: 0 1px black;
|
|
||||||
|
|
||||||
}
|
|
||||||
@else if $t==active {
|
|
||||||
//
|
|
||||||
// active osd button
|
|
||||||
//
|
|
||||||
$_bg: if($c!=$bg_color, $c, $osd_borders_color);
|
|
||||||
|
|
||||||
color: white;
|
|
||||||
border-color: $osd_borders_color;
|
|
||||||
background-color: $selected_bg_color;
|
|
||||||
// This should be none, but it's creating some issues with borders, so to
|
|
||||||
// workaround it for now, use inset wich goes through a different code path.
|
|
||||||
// see https://bugzilla.gnome.org/show_bug.cgi?id=752934
|
|
||||||
box-shadow: inset 0 0 black;
|
|
||||||
text-shadow: none;
|
|
||||||
icon-shadow: none;
|
|
||||||
}
|
|
||||||
@else if $t==insensitive {
|
|
||||||
//
|
|
||||||
// insensitive osd button
|
|
||||||
//
|
|
||||||
$_bg: transparentize(mix($insensitive_fg_color,$osd_bg_color,20%),0.3);
|
|
||||||
|
|
||||||
color: $insensitive_fg_color;
|
|
||||||
border-color: $osd_borders_color;
|
|
||||||
background-color: $_bg;
|
|
||||||
box-shadow: none;
|
|
||||||
text-shadow: none;
|
|
||||||
icon-shadow: none;
|
|
||||||
}
|
|
||||||
@else if $t==undecorated {
|
|
||||||
//
|
|
||||||
// reset
|
|
||||||
//
|
|
||||||
border-color: transparent;
|
|
||||||
background-color: transparent;
|
|
||||||
background-image: none;
|
|
||||||
|
|
||||||
@include _shadows(inset 0 1px transparentize(white,1),
|
|
||||||
$_blank_edge);
|
|
||||||
|
|
||||||
text-shadow: none;
|
|
||||||
icon-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
// When color definition differs for dark and light variant,
|
|
||||||
// it gets @if ed depending on $variant
|
|
||||||
|
|
||||||
|
|
||||||
$base_color: #222;
|
|
||||||
$bg_color: #000;
|
|
||||||
$fg_color: #fff;
|
|
||||||
|
|
||||||
$selected_fg_color: #ffffff;
|
|
||||||
$selected_bg_color: darken(#4a90d9,20%);
|
|
||||||
$selected_borders_color: darken($selected_bg_color, 20%);
|
|
||||||
$borders_color: darken($bg_color,12%);
|
|
||||||
$borders_edge: transparentize($fg_color, 0.9);
|
|
||||||
$link_color: lighten($selected_bg_color,20%);
|
|
||||||
$link_visited_color: lighten($selected_bg_color,10%);
|
|
||||||
$top_hilight: $borders_edge;
|
|
||||||
|
|
||||||
$warning_color: #f57900;
|
|
||||||
$error_color: #cc0000;
|
|
||||||
$success_color: darken(#73d216,10%);
|
|
||||||
$destructive_color: darken(#ef2929,10%);
|
|
||||||
|
|
||||||
$osd_fg_color: #eeeeec;
|
|
||||||
$osd_bg_color: #2e3436;
|
|
||||||
$osd_borders_color: transparentize(black, 0.3);
|
|
||||||
$osd_outer_borders_color: transparentize(white, 0.9);
|
|
||||||
|
|
||||||
$tooltip_borders_color: $osd_outer_borders_color;
|
|
||||||
|
|
||||||
//insensitive state derived colors
|
|
||||||
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);
|
|
||||||
$insensitive_bg_color: mix($bg_color, $base_color, 60%);
|
|
||||||
$insensitive_borders_color: $borders_color;
|
|
||||||
|
|
||||||
//colors for the backdrop state, derived from the main colors.
|
|
||||||
$backdrop_base_color: lighten($base_color,1%);
|
|
||||||
$backdrop_bg_color: $bg_color;
|
|
||||||
$backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 80%);
|
|
||||||
$backdrop_insensitive_color: lighten($backdrop_bg_color,15%);
|
|
||||||
$backdrop_borders_color: mix($borders_color, $bg_color, 90%);
|
|
||||||
$backdrop_dark_fill: mix($backdrop_borders_color,$backdrop_bg_color, 35%);
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
|
||||||
xmlns:foaf="http://xmlns.com/foaf/0.1/"
|
|
||||||
xmlns:gnome="http://api.gnome.org/doap-extensions#"
|
|
||||||
xmlns="http://usefulinc.com/ns/doap#">
|
|
||||||
|
|
||||||
<name xml:lang="en">GNOME Shell Sass</name>
|
|
||||||
<shortdesc xml:lang="en">Sass sources of GNOME Shell</shortdesc>
|
|
||||||
<description>GNOME Shell Sass is a project intended to allow the sharing of the
|
|
||||||
sass theme sources between gnome-shell and other projects like gnome-shell-extensions.</description>
|
|
||||||
|
|
||||||
<category rdf:resource="http://api.gnome.org/doap-extensions#core" />
|
|
||||||
<programming-language>sass</programming-language>
|
|
||||||
<programming-language>css</programming-language>
|
|
||||||
|
|
||||||
<maintainer>
|
|
||||||
<foaf:Person>
|
|
||||||
<foaf:name>Carlos Soriano</foaf:name>
|
|
||||||
<foaf:mbox rdf:resource="mailto:csoriano@gnome.org" />
|
|
||||||
<gnome:userid>csoriano</gnome:userid>
|
|
||||||
</foaf:Person>
|
|
||||||
</maintainer>
|
|
||||||
<maintainer>
|
|
||||||
<foaf:Person>
|
|
||||||
<foaf:name>Florian Müllner</foaf:name>
|
|
||||||
<foaf:mbox rdf:resource="mailto:fmuellner@gnome.org" />
|
|
||||||
<gnome:userid>fmuellner</gnome:userid>
|
|
||||||
</foaf:Person>
|
|
||||||
</maintainer>
|
|
||||||
<maintainer>
|
|
||||||
<foaf:Person>
|
|
||||||
<foaf:name>Jakub Steiner</foaf:name>
|
|
||||||
<foaf:mbox rdf:resource="mailto:jimmac@gmail.com" />
|
|
||||||
<gnome:userid>jimmac</gnome:userid>
|
|
||||||
</foaf:Person>
|
|
||||||
</maintainer>
|
|
||||||
</Project>
|
|
||||||
@@ -25,11 +25,12 @@ const NAVIGATION_REGION_OVERSHOOT = 50;
|
|||||||
Gio._promisify(Gio._LocalFilePrototype, 'query_info_async', 'query_info_finish');
|
Gio._promisify(Gio._LocalFilePrototype, 'query_info_async', 'query_info_finish');
|
||||||
Gio._promisify(Gio._LocalFilePrototype, 'set_attributes_async', 'set_attributes_finish');
|
Gio._promisify(Gio._LocalFilePrototype, 'set_attributes_async', 'set_attributes_finish');
|
||||||
|
|
||||||
|
var ActivitiesMenuItem = GObject.registerClass(
|
||||||
class ActivitiesMenuItem extends PopupMenu.PopupBaseMenuItem {
|
class ActivitiesMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||||
constructor(button) {
|
_init(button) {
|
||||||
super();
|
super._init();
|
||||||
this._button = button;
|
this._button = button;
|
||||||
this.actor.add_child(new St.Label({ text: _('Activities Overview') }));
|
this.add_child(new St.Label({ text: _('Activities Overview') }));
|
||||||
}
|
}
|
||||||
|
|
||||||
activate(event) {
|
activate(event) {
|
||||||
@@ -37,35 +38,36 @@ class ActivitiesMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
Main.overview.toggle();
|
Main.overview.toggle();
|
||||||
super.activate(event);
|
super.activate(event);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
|
var ApplicationMenuItem = GObject.registerClass(
|
||||||
class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem {
|
class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||||
constructor(button, app) {
|
_init(button, app) {
|
||||||
super();
|
super._init();
|
||||||
this._app = app;
|
this._app = app;
|
||||||
this._button = button;
|
this._button = button;
|
||||||
|
|
||||||
this._iconBin = new St.Bin();
|
this._iconBin = new St.Bin();
|
||||||
this.actor.add_child(this._iconBin);
|
this.add_child(this._iconBin);
|
||||||
|
|
||||||
let appLabel = new St.Label({
|
let appLabel = new St.Label({
|
||||||
text: app.get_name(),
|
text: app.get_name(),
|
||||||
y_expand: true,
|
y_expand: true,
|
||||||
y_align: Clutter.ActorAlign.CENTER
|
y_align: Clutter.ActorAlign.CENTER
|
||||||
});
|
});
|
||||||
this.actor.add_child(appLabel);
|
this.add_child(appLabel);
|
||||||
this.actor.label_actor = appLabel;
|
this.label_actor = appLabel;
|
||||||
|
|
||||||
let textureCache = St.TextureCache.get_default();
|
let textureCache = St.TextureCache.get_default();
|
||||||
let iconThemeChangedId = textureCache.connect('icon-theme-changed',
|
let iconThemeChangedId = textureCache.connect('icon-theme-changed',
|
||||||
this._updateIcon.bind(this));
|
this._updateIcon.bind(this));
|
||||||
this.actor.connect('destroy', () => {
|
this.connect('destroy', () => {
|
||||||
textureCache.disconnect(iconThemeChangedId);
|
textureCache.disconnect(iconThemeChangedId);
|
||||||
});
|
});
|
||||||
this._updateIcon();
|
this._updateIcon();
|
||||||
|
|
||||||
this.actor._delegate = this;
|
this._delegate = this;
|
||||||
let draggable = DND.makeDraggable(this.actor);
|
let draggable = DND.makeDraggable(this);
|
||||||
|
|
||||||
let maybeStartDrag = draggable._maybeStartDrag;
|
let maybeStartDrag = draggable._maybeStartDrag;
|
||||||
draggable._maybeStartDrag = (event) => {
|
draggable._maybeStartDrag = (event) => {
|
||||||
@@ -103,11 +105,12 @@ class ApplicationMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
_updateIcon() {
|
_updateIcon() {
|
||||||
this._iconBin.set_child(this.getDragActor());
|
this._iconBin.set_child(this.getDragActor());
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
|
var CategoryMenuItem = GObject.registerClass(
|
||||||
class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
|
class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||||
constructor(button, category) {
|
_init(button, category) {
|
||||||
super();
|
super._init();
|
||||||
this._category = category;
|
this._category = category;
|
||||||
this._button = button;
|
this._button = button;
|
||||||
|
|
||||||
@@ -120,8 +123,9 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
else
|
else
|
||||||
name = _('Favorites');
|
name = _('Favorites');
|
||||||
|
|
||||||
this.actor.add_child(new St.Label({ text: name }));
|
this.add_child(new St.Label({ text: name }));
|
||||||
this.actor.connect('motion-event', this._onMotionEvent.bind(this));
|
this.connect('motion-event', this._onMotionEvent.bind(this));
|
||||||
|
this.connect('notify::active', this._onActiveChanged.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
activate(event) {
|
activate(event) {
|
||||||
@@ -131,7 +135,7 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_isNavigatingSubmenu([x, y]) {
|
_isNavigatingSubmenu([x, y]) {
|
||||||
let [posX, posY] = this.actor.get_transformed_position();
|
let [posX, posY] = this.get_transformed_position();
|
||||||
|
|
||||||
if (this._oldX == -1) {
|
if (this._oldX == -1) {
|
||||||
this._oldX = x;
|
this._oldX = x;
|
||||||
@@ -146,11 +150,11 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
this._oldY = y;
|
this._oldY = y;
|
||||||
|
|
||||||
// If it lies outside the x-coordinates then it is definitely outside.
|
// If it lies outside the x-coordinates then it is definitely outside.
|
||||||
if (posX > x || posX + this.actor.width < x)
|
if (posX > x || posX + this.width < x)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If it lies inside the menu item then it is definitely inside.
|
// If it lies inside the menu item then it is definitely inside.
|
||||||
if (posY <= y && posY + this.actor.height >= y)
|
if (posY <= y && posY + this.height >= y)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// We want the keep-up triangle only if the movement is more
|
// We want the keep-up triangle only if the movement is more
|
||||||
@@ -171,17 +175,17 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
// only check for triangle ABC.
|
// only check for triangle ABC.
|
||||||
if (posY > y) {
|
if (posY > y) {
|
||||||
let offset = posY - y;
|
let offset = posY - y;
|
||||||
y = posY + this.actor.height + offset;
|
y = posY + this.height + offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure that A is (0, 0).
|
// Ensure that A is (0, 0).
|
||||||
x -= posX;
|
x -= posX;
|
||||||
y -= posY + this.actor.height;
|
y -= posY + this.height;
|
||||||
|
|
||||||
// Check which side of line AB the point P lies on by taking the
|
// Check which side of line AB the point P lies on by taking the
|
||||||
// cross-product of AB and AP. See:
|
// cross-product of AB and AP. See:
|
||||||
// http://stackoverflow.com/questions/3461453/determine-which-side-of-a-line-a-point-lies
|
// http://stackoverflow.com/questions/3461453/determine-which-side-of-a-line-a-point-lies
|
||||||
if (((this.actor.width * y) - (NAVIGATION_REGION_OVERSHOOT * x)) <= 0)
|
if (((this.width * y) - (NAVIGATION_REGION_OVERSHOOT * x)) <= 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -191,16 +195,16 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
if (!Clutter.get_pointer_grab()) {
|
if (!Clutter.get_pointer_grab()) {
|
||||||
this._oldX = -1;
|
this._oldX = -1;
|
||||||
this._oldY = -1;
|
this._oldY = -1;
|
||||||
Clutter.grab_pointer(this.actor);
|
Clutter.grab_pointer(this);
|
||||||
}
|
}
|
||||||
this.actor.hover = true;
|
this.hover = true;
|
||||||
|
|
||||||
if (this._isNavigatingSubmenu(event.get_coords()))
|
if (this._isNavigatingSubmenu(event.get_coords()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
this._oldX = -1;
|
this._oldX = -1;
|
||||||
this._oldY = -1;
|
this._oldY = -1;
|
||||||
this.actor.hover = false;
|
this.hover = false;
|
||||||
Clutter.ungrab_pointer();
|
Clutter.ungrab_pointer();
|
||||||
|
|
||||||
let source = event.get_source();
|
let source = event.get_source();
|
||||||
@@ -210,14 +214,14 @@ class CategoryMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
setActive(active, params) {
|
_onActiveChanged() {
|
||||||
if (active) {
|
if (!this.active)
|
||||||
this._button.selectCategory(this._category);
|
return;
|
||||||
this._button.scrollToCatButton(this);
|
|
||||||
}
|
this._button.selectCategory(this._category);
|
||||||
super.setActive(active, params);
|
this._button.scrollToCatButton(this);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
class ApplicationsMenu extends PopupMenu.PopupMenu {
|
class ApplicationsMenu extends PopupMenu.PopupMenu {
|
||||||
constructor(sourceActor, arrowAlignment, arrowSide, button) {
|
constructor(sourceActor, arrowAlignment, arrowSide, button) {
|
||||||
@@ -262,7 +266,7 @@ class DesktopTarget {
|
|||||||
|
|
||||||
this._windowAddedId =
|
this._windowAddedId =
|
||||||
global.window_group.connect('actor-added',
|
global.window_group.connect('actor-added',
|
||||||
this._onWindowAdded.bind(this));
|
this._onWindowAdded.bind(this));
|
||||||
|
|
||||||
global.get_window_actors().forEach(a => {
|
global.get_window_actors().forEach(a => {
|
||||||
this._onWindowAdded(a.get_parent(), a);
|
this._onWindowAdded(a.get_parent(), a);
|
||||||
@@ -322,8 +326,8 @@ class DesktopTarget {
|
|||||||
|
|
||||||
// Hack: force nautilus to reload file info
|
// Hack: force nautilus to reload file info
|
||||||
info = new Gio.FileInfo();
|
info = new Gio.FileInfo();
|
||||||
info.set_attribute_uint64(Gio.FILE_ATTRIBUTE_TIME_ACCESS,
|
info.set_attribute_uint64(
|
||||||
GLib.get_real_time());
|
Gio.FILE_ATTRIBUTE_TIME_ACCESS, GLib.get_real_time());
|
||||||
try {
|
try {
|
||||||
await file.set_attributes_async(info, queryFlags, ioPriority, null);
|
await file.set_attributes_async(info, queryFlags, ioPriority, null);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -411,7 +415,7 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
this.remove_accessible_state (Atk.StateType.CHECKED);
|
this.remove_accessible_state (Atk.StateType.CHECKED);
|
||||||
});
|
});
|
||||||
Main.layoutManager.connect('startup-complete',
|
Main.layoutManager.connect('startup-complete',
|
||||||
this._setKeybinding.bind(this));
|
this._setKeybinding.bind(this));
|
||||||
this._setKeybinding();
|
this._setKeybinding();
|
||||||
|
|
||||||
this._desktopTarget = new DesktopTarget();
|
this._desktopTarget = new DesktopTarget();
|
||||||
@@ -426,14 +430,14 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
|
|
||||||
this._tree = new GMenu.Tree({ menu_basename: 'applications.menu' });
|
this._tree = new GMenu.Tree({ menu_basename: 'applications.menu' });
|
||||||
this._treeChangedId = this._tree.connect('changed',
|
this._treeChangedId = this._tree.connect('changed',
|
||||||
this._onTreeChanged.bind(this));
|
this._onTreeChanged.bind(this));
|
||||||
|
|
||||||
this._applicationsButtons = new Map();
|
this._applicationsButtons = new Map();
|
||||||
this.reloadFlag = false;
|
this.reloadFlag = false;
|
||||||
this._createLayout();
|
this._createLayout();
|
||||||
this._display();
|
this._display();
|
||||||
this._installedChangedId = appSys.connect('installed-changed',
|
this._installedChangedId = appSys.connect('installed-changed',
|
||||||
this._onTreeChanged.bind(this));
|
this._onTreeChanged.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onTreeChanged() {
|
_onTreeChanged() {
|
||||||
@@ -465,12 +469,11 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
this._tree.disconnect(this._treeChangedId);
|
this._tree.disconnect(this._treeChangedId);
|
||||||
this._tree = null;
|
this._tree = null;
|
||||||
|
|
||||||
let handler = Main.sessionMode.hasOverview ?
|
|
||||||
Main.overview.toggle.bind(Main.overview) : null;
|
|
||||||
Main.wm.setCustomKeybindingHandler('panel-main-menu',
|
Main.wm.setCustomKeybindingHandler('panel-main-menu',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
|
||||||
Shell.ActionMode.OVERVIEW,
|
Main.sessionMode.hasOverview
|
||||||
handler);
|
? Main.overview.toggle.bind(Main.overview)
|
||||||
|
: null);
|
||||||
|
|
||||||
this._desktopTarget.destroy();
|
this._desktopTarget.destroy();
|
||||||
}
|
}
|
||||||
@@ -522,9 +525,8 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
|
|
||||||
_setKeybinding() {
|
_setKeybinding() {
|
||||||
Main.wm.setCustomKeybindingHandler('panel-main-menu',
|
Main.wm.setCustomKeybindingHandler('panel-main-menu',
|
||||||
Shell.ActionMode.NORMAL |
|
Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW,
|
||||||
Shell.ActionMode.OVERVIEW,
|
() => this.menu.toggle());
|
||||||
() => this.menu.toggle());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_redisplay() {
|
_redisplay() {
|
||||||
@@ -565,7 +567,7 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
let appsScrollBoxAlloc = this.applicationsScrollBox.get_allocation_box();
|
let appsScrollBoxAlloc = this.applicationsScrollBox.get_allocation_box();
|
||||||
let currentScrollValue = appsScrollBoxAdj.get_value();
|
let currentScrollValue = appsScrollBoxAdj.get_value();
|
||||||
let boxHeight = appsScrollBoxAlloc.y2 - appsScrollBoxAlloc.y1;
|
let boxHeight = appsScrollBoxAlloc.y2 - appsScrollBoxAlloc.y1;
|
||||||
let buttonAlloc = button.actor.get_allocation_box();
|
let buttonAlloc = button.get_allocation_box();
|
||||||
let newScrollValue = currentScrollValue;
|
let newScrollValue = currentScrollValue;
|
||||||
if (currentScrollValue > buttonAlloc.y1 - 10)
|
if (currentScrollValue > buttonAlloc.y1 - 10)
|
||||||
newScrollValue = buttonAlloc.y1 - 10;
|
newScrollValue = buttonAlloc.y1 - 10;
|
||||||
@@ -580,7 +582,7 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
let catsScrollBoxAlloc = this.categoriesScrollBox.get_allocation_box();
|
let catsScrollBoxAlloc = this.categoriesScrollBox.get_allocation_box();
|
||||||
let currentScrollValue = catsScrollBoxAdj.get_value();
|
let currentScrollValue = catsScrollBoxAdj.get_value();
|
||||||
let boxHeight = catsScrollBoxAlloc.y2 - catsScrollBoxAlloc.y1;
|
let boxHeight = catsScrollBoxAlloc.y2 - catsScrollBoxAlloc.y1;
|
||||||
let buttonAlloc = button.actor.get_allocation_box();
|
let buttonAlloc = button.get_allocation_box();
|
||||||
let newScrollValue = currentScrollValue;
|
let newScrollValue = currentScrollValue;
|
||||||
if (currentScrollValue > buttonAlloc.y1 - 10)
|
if (currentScrollValue > buttonAlloc.y1 - 10)
|
||||||
newScrollValue = buttonAlloc.y1 - 10;
|
newScrollValue = buttonAlloc.y1 - 10;
|
||||||
@@ -627,7 +629,7 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
});
|
});
|
||||||
|
|
||||||
let activities = new ActivitiesMenuItem(this);
|
let activities = new ActivitiesMenuItem(this);
|
||||||
this.leftBox.add(activities.actor, {
|
this.leftBox.add(activities, {
|
||||||
expand: false,
|
expand: false,
|
||||||
x_fill: true,
|
x_fill: true,
|
||||||
y_fill: false,
|
y_fill: false,
|
||||||
@@ -663,7 +665,7 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
this._tree.load_sync();
|
this._tree.load_sync();
|
||||||
let root = this._tree.get_root_directory();
|
let root = this._tree.get_root_directory();
|
||||||
let categoryMenuItem = new CategoryMenuItem(this, null);
|
let categoryMenuItem = new CategoryMenuItem(this, null);
|
||||||
this.categoriesBox.add_actor(categoryMenuItem.actor);
|
this.categoriesBox.add_actor(categoryMenuItem);
|
||||||
let iter = root.iter();
|
let iter = root.iter();
|
||||||
let nextType;
|
let nextType;
|
||||||
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
|
while ((nextType = iter.next()) != GMenu.TreeItemType.INVALID) {
|
||||||
@@ -679,7 +681,7 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
this._loadCategory(categoryId, dir);
|
this._loadCategory(categoryId, dir);
|
||||||
if (this.applicationsByCategory[categoryId].length > 0) {
|
if (this.applicationsByCategory[categoryId].length > 0) {
|
||||||
let categoryMenuItem = new CategoryMenuItem(this, dir);
|
let categoryMenuItem = new CategoryMenuItem(this, dir);
|
||||||
this.categoriesBox.add_actor(categoryMenuItem.actor);
|
this.categoriesBox.add_actor(categoryMenuItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -720,8 +722,8 @@ class ApplicationsButton extends PanelMenu.Button {
|
|||||||
item.setDragEnabled(this._desktopTarget.hasDesktop);
|
item.setDragEnabled(this._desktopTarget.hasDesktop);
|
||||||
this._applicationsButtons.set(app, item);
|
this._applicationsButtons.set(app, item);
|
||||||
}
|
}
|
||||||
if (!item.actor.get_parent())
|
if (!item.get_parent())
|
||||||
this.applicationsBox.add_actor(item.actor);
|
this.applicationsBox.add_actor(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class WindowMover {
|
|||||||
|
|
||||||
this._appsChangedId =
|
this._appsChangedId =
|
||||||
this._appSystem.connect('installed-changed',
|
this._appSystem.connect('installed-changed',
|
||||||
this._updateAppData.bind(this));
|
this._updateAppData.bind(this));
|
||||||
|
|
||||||
this._settings.connect('changed', this._updateAppConfigs.bind(this));
|
this._settings.connect('changed', this._updateAppConfigs.bind(this));
|
||||||
this._updateAppConfigs();
|
this._updateAppConfigs();
|
||||||
@@ -50,7 +50,7 @@ class WindowMover {
|
|||||||
addedApps.forEach(app => {
|
addedApps.forEach(app => {
|
||||||
let data = {
|
let data = {
|
||||||
windowsChangedId: app.connect('windows-changed',
|
windowsChangedId: app.connect('windows-changed',
|
||||||
this._appWindowsChanged.bind(this)),
|
this._appWindowsChanged.bind(this)),
|
||||||
moveWindowsId: 0,
|
moveWindowsId: 0,
|
||||||
windows: app.get_windows()
|
windows: app.get_windows()
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -233,8 +233,8 @@ const Widget = GObject.registerClass({
|
|||||||
});
|
});
|
||||||
let { APPINFO, ICON, DISPLAY_NAME, WORKSPACE, ADJUSTMENT } = Columns;
|
let { APPINFO, ICON, DISPLAY_NAME, WORKSPACE, ADJUSTMENT } = Columns;
|
||||||
this._store.set(iter,
|
this._store.set(iter,
|
||||||
[APPINFO, ICON, DISPLAY_NAME, WORKSPACE, ADJUSTMENT],
|
[APPINFO, ICON, DISPLAY_NAME, WORKSPACE, ADJUSTMENT],
|
||||||
[appInfo, icon, displayName, workspace, adj]);
|
[appInfo, icon, displayName, workspace, adj]);
|
||||||
}
|
}
|
||||||
|
|
||||||
_checkId(id) {
|
_checkId(id) {
|
||||||
|
|||||||
@@ -12,29 +12,32 @@ const ShellMountOperation = imports.ui.shellMountOperation;
|
|||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
|
|
||||||
|
var MountMenuItem = GObject.registerClass(
|
||||||
class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
|
class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||||
constructor(mount) {
|
_init(mount) {
|
||||||
super();
|
super._init();
|
||||||
|
|
||||||
this.label = new St.Label({ text: mount.get_name() });
|
this.label = new St.Label({ text: mount.get_name() });
|
||||||
this.actor.add(this.label, { expand: true });
|
this.add(this.label, { expand: true });
|
||||||
this.actor.label_actor = this.label;
|
this.label_actor = this.label;
|
||||||
|
|
||||||
this.mount = mount;
|
this.mount = mount;
|
||||||
|
|
||||||
|
this.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
let ejectIcon = new St.Icon({
|
let ejectIcon = new St.Icon({
|
||||||
icon_name: 'media-eject-symbolic',
|
icon_name: 'media-eject-symbolic',
|
||||||
style_class: 'popup-menu-icon'
|
style_class: 'popup-menu-icon'
|
||||||
});
|
});
|
||||||
let ejectButton = new St.Button({ child: ejectIcon });
|
let ejectButton = new St.Button({ child: ejectIcon });
|
||||||
ejectButton.connect('clicked', this._eject.bind(this));
|
ejectButton.connect('clicked', this._eject.bind(this));
|
||||||
this.actor.add(ejectButton);
|
this.add(ejectButton);
|
||||||
|
|
||||||
this._changedId = mount.connect('changed', this._syncVisibility.bind(this));
|
this._changedId = mount.connect('changed', this._syncVisibility.bind(this));
|
||||||
this._syncVisibility();
|
this._syncVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
_onDestroy() {
|
||||||
if (this._changedId) {
|
if (this._changedId) {
|
||||||
this.mount.disconnect(this._changedId);
|
this.mount.disconnect(this._changedId);
|
||||||
this._changedId = 0;
|
this._changedId = 0;
|
||||||
@@ -61,7 +64,7 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_syncVisibility() {
|
_syncVisibility() {
|
||||||
this.actor.visible = this._isInteresting();
|
this.visible = this._isInteresting();
|
||||||
}
|
}
|
||||||
|
|
||||||
_eject() {
|
_eject() {
|
||||||
@@ -73,10 +76,10 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
|
|
||||||
if (this.mount.can_eject())
|
if (this.mount.can_eject())
|
||||||
this.mount.eject_with_operation(...unmountArgs,
|
this.mount.eject_with_operation(...unmountArgs,
|
||||||
this._ejectFinish.bind(this));
|
this._ejectFinish.bind(this));
|
||||||
else
|
else
|
||||||
this.mount.unmount_with_operation(...unmountArgs,
|
this.mount.unmount_with_operation(...unmountArgs,
|
||||||
this._unmountFinish.bind(this));
|
this._unmountFinish.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
_unmountFinish(mount, result) {
|
_unmountFinish(mount, result) {
|
||||||
@@ -102,13 +105,13 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
activate(event) {
|
activate(event) {
|
||||||
|
let uri = this.mount.get_root().get_uri();
|
||||||
let context = global.create_app_launch_context(event.get_time(), -1);
|
let context = global.create_app_launch_context(event.get_time(), -1);
|
||||||
Gio.AppInfo.launch_default_for_uri(this.mount.get_root().get_uri(),
|
Gio.AppInfo.launch_default_for_uri(uri, context);
|
||||||
context);
|
|
||||||
|
|
||||||
super.activate(event);
|
super.activate(event);
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
let DriveMenu = GObject.registerClass(
|
let DriveMenu = GObject.registerClass(
|
||||||
class DriveMenu extends PanelMenu.Button {
|
class DriveMenu extends PanelMenu.Button {
|
||||||
|
|||||||
@@ -203,9 +203,10 @@ class NaturalLayoutStrategy extends Workspace.LayoutStrategy {
|
|||||||
|
|
||||||
// Work out scaling by getting the most top-left and most bottom-right window coords.
|
// Work out scaling by getting the most top-left and most bottom-right window coords.
|
||||||
let scale;
|
let scale;
|
||||||
scale = Math.min(areaRect.width / bounds.width,
|
scale = Math.min(
|
||||||
areaRect.height / bounds.height,
|
areaRect.width / bounds.width,
|
||||||
1.0);
|
areaRect.height / bounds.height,
|
||||||
|
1.0);
|
||||||
|
|
||||||
// Make bounding rect fill the screen size for later steps
|
// Make bounding rect fill the screen size for later steps
|
||||||
bounds.x = bounds.x - (areaRect.width - bounds.width * scale) / 2;
|
bounds.x = bounds.x - (areaRect.width - bounds.width * scale) / 2;
|
||||||
|
|||||||
@@ -17,19 +17,20 @@ const PlaceDisplay = Me.imports.placeDisplay;
|
|||||||
|
|
||||||
const PLACE_ICON_SIZE = 16;
|
const PLACE_ICON_SIZE = 16;
|
||||||
|
|
||||||
|
var PlaceMenuItem = GObject.registerClass(
|
||||||
class PlaceMenuItem extends PopupMenu.PopupBaseMenuItem {
|
class PlaceMenuItem extends PopupMenu.PopupBaseMenuItem {
|
||||||
constructor(info) {
|
_init(info) {
|
||||||
super();
|
super._init();
|
||||||
this._info = info;
|
this._info = info;
|
||||||
|
|
||||||
this._icon = new St.Icon({
|
this._icon = new St.Icon({
|
||||||
gicon: info.icon,
|
gicon: info.icon,
|
||||||
icon_size: PLACE_ICON_SIZE
|
icon_size: PLACE_ICON_SIZE
|
||||||
});
|
});
|
||||||
this.actor.add_child(this._icon);
|
this.add_child(this._icon);
|
||||||
|
|
||||||
this._label = new St.Label({ text: info.name, x_expand: true });
|
this._label = new St.Label({ text: info.name, x_expand: true });
|
||||||
this.actor.add_child(this._label);
|
this.add_child(this._label);
|
||||||
|
|
||||||
if (info.isRemovable()) {
|
if (info.isRemovable()) {
|
||||||
this._ejectIcon = new St.Icon({
|
this._ejectIcon = new St.Icon({
|
||||||
@@ -38,11 +39,11 @@ class PlaceMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
});
|
});
|
||||||
this._ejectButton = new St.Button({ child: this._ejectIcon });
|
this._ejectButton = new St.Button({ child: this._ejectIcon });
|
||||||
this._ejectButton.connect('clicked', info.eject.bind(info));
|
this._ejectButton.connect('clicked', info.eject.bind(info));
|
||||||
this.actor.add_child(this._ejectButton);
|
this.add_child(this._ejectButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._changedId = info.connect('changed',
|
this._changedId = info.connect('changed',
|
||||||
this._propertiesChanged.bind(this));
|
this._propertiesChanged.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
@@ -64,7 +65,7 @@ class PlaceMenuItem extends PopupMenu.PopupBaseMenuItem {
|
|||||||
this._icon.gicon = info.icon;
|
this._icon.gicon = info.icon;
|
||||||
this._label.text = info.name;
|
this._label.text = info.name;
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
const SECTIONS = [
|
const SECTIONS = [
|
||||||
'special',
|
'special',
|
||||||
|
|||||||
@@ -71,18 +71,21 @@ class PlaceInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getIcon() {
|
getIcon() {
|
||||||
this.file.query_info_async('standard::symbolic-icon', 0, 0, null,
|
this.file.query_info_async('standard::symbolic-icon',
|
||||||
(file, result) => {
|
Gio.FileQueryInfoFlags.NONE,
|
||||||
try {
|
0,
|
||||||
let info = file.query_info_finish(result);
|
null,
|
||||||
this.icon = info.get_symbolic_icon();
|
(file, result) => {
|
||||||
this.emit('changed');
|
try {
|
||||||
} catch (e) {
|
let info = file.query_info_finish(result);
|
||||||
if (e instanceof Gio.IOErrorEnum)
|
this.icon = info.get_symbolic_icon();
|
||||||
return;
|
this.emit('changed');
|
||||||
throw e;
|
} catch (e) {
|
||||||
}
|
if (e instanceof Gio.IOErrorEnum)
|
||||||
});
|
return;
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// return a generic icon for this kind for now, until we have the
|
// return a generic icon for this kind for now, until we have the
|
||||||
// icon from the query info above
|
// icon from the query info above
|
||||||
@@ -152,7 +155,7 @@ class RootInfo extends PlaceInfo {
|
|||||||
|
|
||||||
this._proxy = obj;
|
this._proxy = obj;
|
||||||
this._proxy.connect('g-properties-changed',
|
this._proxy.connect('g-properties-changed',
|
||||||
this._propertiesChanged.bind(this));
|
this._propertiesChanged.bind(this));
|
||||||
this._propertiesChanged(obj);
|
this._propertiesChanged(obj);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -203,10 +206,10 @@ class PlaceDeviceInfo extends PlaceInfo {
|
|||||||
|
|
||||||
if (this._mount.can_eject())
|
if (this._mount.can_eject())
|
||||||
this._mount.eject_with_operation(...unmountArgs,
|
this._mount.eject_with_operation(...unmountArgs,
|
||||||
this._ejectFinish.bind(this));
|
this._ejectFinish.bind(this));
|
||||||
else
|
else
|
||||||
this._mount.unmount_with_operation(...unmountArgs,
|
this._mount.unmount_with_operation(...unmountArgs,
|
||||||
this._unmountFinish.bind(this));
|
this._unmountFinish.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
_ejectFinish(mount, result) {
|
_ejectFinish(mount, result) {
|
||||||
@@ -275,9 +278,8 @@ var PlacesManager = class {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: BACKGROUND_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: BACKGROUND_SCHEMA });
|
||||||
this._showDesktopIconsChangedId =
|
this._showDesktopIconsChangedId = this._settings.connect(
|
||||||
this._settings.connect('changed::show-desktop-icons',
|
'changed::show-desktop-icons', this._updateSpecials.bind(this));
|
||||||
this._updateSpecials.bind(this));
|
|
||||||
this._updateSpecials();
|
this._updateSpecials();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -350,9 +352,10 @@ var PlacesManager = class {
|
|||||||
|
|
||||||
let homePath = GLib.get_home_dir();
|
let homePath = GLib.get_home_dir();
|
||||||
|
|
||||||
this._places.special.push(new PlaceInfo('special',
|
this._places.special.push(new PlaceInfo(
|
||||||
Gio.File.new_for_path(homePath),
|
'special',
|
||||||
_('Home')));
|
Gio.File.new_for_path(homePath),
|
||||||
|
_('Home')));
|
||||||
|
|
||||||
let specials = [];
|
let specials = [];
|
||||||
let dirs = DEFAULT_DIRECTORIES.slice();
|
let dirs = DEFAULT_DIRECTORIES.slice();
|
||||||
@@ -394,10 +397,11 @@ var PlacesManager = class {
|
|||||||
|
|
||||||
/* Add standard places */
|
/* Add standard places */
|
||||||
this._places.devices.push(new RootInfo());
|
this._places.devices.push(new RootInfo());
|
||||||
this._places.network.push(new PlaceInfo('network',
|
this._places.network.push(new PlaceInfo(
|
||||||
Gio.File.new_for_uri('network:///'),
|
'network',
|
||||||
_('Browse Network'),
|
Gio.File.new_for_uri('network:///'),
|
||||||
'network-workgroup-symbolic'));
|
_('Browse Network'),
|
||||||
|
'network-workgroup-symbolic'));
|
||||||
|
|
||||||
/* first go through all connected drives */
|
/* first go through all connected drives */
|
||||||
let drives = this._volumeMonitor.get_connected_drives();
|
let drives = this._volumeMonitor.get_connected_drives();
|
||||||
|
|||||||
@@ -47,8 +47,9 @@ function flashMessage(message) {
|
|||||||
text.opacity = 255;
|
text.opacity = 255;
|
||||||
|
|
||||||
let monitor = Main.layoutManager.primaryMonitor;
|
let monitor = Main.layoutManager.primaryMonitor;
|
||||||
text.set_position(monitor.x + Math.floor(monitor.width / 2 - text.width / 2),
|
text.set_position(
|
||||||
monitor.y + Math.floor(monitor.height / 2 - text.height / 2));
|
monitor.x + Math.floor(monitor.width / 2 - text.width / 2),
|
||||||
|
monitor.y + Math.floor(monitor.height / 2 - text.height / 2));
|
||||||
|
|
||||||
Tweener.addTween(text, {
|
Tweener.addTween(text, {
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
@@ -63,7 +64,9 @@ let SIZES = [
|
|||||||
[800, 450],
|
[800, 450],
|
||||||
[1024, 576],
|
[1024, 576],
|
||||||
[1200, 675],
|
[1200, 675],
|
||||||
[1600, 900]
|
[1600, 900],
|
||||||
|
[360, 654], // Phone portrait maximized
|
||||||
|
[720, 360] // Phone landscape fullscreen
|
||||||
];
|
];
|
||||||
|
|
||||||
function cycleScreenshotSizes(display, window, binding) {
|
function cycleScreenshotSizes(display, window, binding) {
|
||||||
@@ -135,17 +138,18 @@ function cycleScreenshotSizes(display, window, binding) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function enable() {
|
function enable() {
|
||||||
Main.wm.addKeybinding('cycle-screenshot-sizes',
|
Main.wm.addKeybinding(
|
||||||
ExtensionUtils.getSettings(),
|
'cycle-screenshot-sizes',
|
||||||
Meta.KeyBindingFlags.PER_WINDOW,
|
ExtensionUtils.getSettings(),
|
||||||
Shell.ActionMode.NORMAL,
|
Meta.KeyBindingFlags.PER_WINDOW,
|
||||||
cycleScreenshotSizes);
|
Shell.ActionMode.NORMAL,
|
||||||
Main.wm.addKeybinding('cycle-screenshot-sizes-backward',
|
cycleScreenshotSizes);
|
||||||
ExtensionUtils.getSettings(),
|
Main.wm.addKeybinding(
|
||||||
Meta.KeyBindingFlags.PER_WINDOW |
|
'cycle-screenshot-sizes-backward',
|
||||||
Meta.KeyBindingFlags.IS_REVERSED,
|
ExtensionUtils.getSettings(),
|
||||||
Shell.ActionMode.NORMAL,
|
Meta.KeyBindingFlags.PER_WINDOW | Meta.KeyBindingFlags.IS_REVERSED,
|
||||||
cycleScreenshotSizes);
|
Shell.ActionMode.NORMAL,
|
||||||
|
cycleScreenshotSizes);
|
||||||
}
|
}
|
||||||
|
|
||||||
function disable() {
|
function disable() {
|
||||||
|
|||||||
+111
-132
@@ -72,9 +72,8 @@ class WindowContextMenu extends PopupMenu.PopupMenu {
|
|||||||
});
|
});
|
||||||
this.addMenuItem(this._minimizeItem);
|
this.addMenuItem(this._minimizeItem);
|
||||||
|
|
||||||
this._notifyMinimizedId =
|
this._notifyMinimizedId = this._metaWindow.connect(
|
||||||
this._metaWindow.connect('notify::minimized',
|
'notify::minimized', this._updateMinimizeItem.bind(this));
|
||||||
this._updateMinimizeItem.bind(this));
|
|
||||||
this._updateMinimizeItem();
|
this._updateMinimizeItem();
|
||||||
|
|
||||||
this._maximizeItem = new PopupMenu.PopupMenuItem('');
|
this._maximizeItem = new PopupMenu.PopupMenuItem('');
|
||||||
@@ -86,12 +85,12 @@ class WindowContextMenu extends PopupMenu.PopupMenu {
|
|||||||
});
|
});
|
||||||
this.addMenuItem(this._maximizeItem);
|
this.addMenuItem(this._maximizeItem);
|
||||||
|
|
||||||
this._notifyMaximizedHId =
|
this._notifyMaximizedHId = this._metaWindow.connect(
|
||||||
this._metaWindow.connect('notify::maximized-horizontally',
|
'notify::maximized-horizontally',
|
||||||
this._updateMaximizeItem.bind(this));
|
this._updateMaximizeItem.bind(this));
|
||||||
this._notifyMaximizedVId =
|
this._notifyMaximizedVId = this._metaWindow.connect(
|
||||||
this._metaWindow.connect('notify::maximized-vertically',
|
'notify::maximized-vertically',
|
||||||
this._updateMaximizeItem.bind(this));
|
this._updateMaximizeItem.bind(this));
|
||||||
this._updateMaximizeItem();
|
this._updateMaximizeItem();
|
||||||
|
|
||||||
this._closeItem = new PopupMenu.PopupMenuItem(_('Close'));
|
this._closeItem = new PopupMenu.PopupMenuItem(_('Close'));
|
||||||
@@ -146,25 +145,20 @@ class WindowTitle {
|
|||||||
this.actor.add(this.label_actor);
|
this.actor.add(this.label_actor);
|
||||||
|
|
||||||
this._textureCache = St.TextureCache.get_default();
|
this._textureCache = St.TextureCache.get_default();
|
||||||
this._iconThemeChangedId =
|
this._iconThemeChangedId = this._textureCache.connect(
|
||||||
this._textureCache.connect('icon-theme-changed',
|
'icon-theme-changed', this._updateIcon.bind(this));
|
||||||
this._updateIcon.bind(this));
|
this._notifyWmClass = this._metaWindow.connect_after(
|
||||||
this._notifyWmClass =
|
'notify::wm-class', this._updateIcon.bind(this));
|
||||||
this._metaWindow.connect_after('notify::wm-class',
|
this._notifyAppId = this._metaWindow.connect_after(
|
||||||
this._updateIcon.bind(this));
|
'notify::gtk-application-id', this._updateIcon.bind(this));
|
||||||
this._notifyAppId =
|
|
||||||
this._metaWindow.connect_after('notify::gtk-application-id',
|
|
||||||
this._updateIcon.bind(this));
|
|
||||||
this._updateIcon();
|
this._updateIcon();
|
||||||
|
|
||||||
this.actor.connect('destroy', this._onDestroy.bind(this));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
|
|
||||||
this._notifyTitleId =
|
this._notifyTitleId = this._metaWindow.connect(
|
||||||
this._metaWindow.connect('notify::title',
|
'notify::title', this._updateTitle.bind(this));
|
||||||
this._updateTitle.bind(this));
|
this._notifyMinimizedId = this._metaWindow.connect(
|
||||||
this._notifyMinimizedId =
|
'notify::minimized', this._minimizedChanged.bind(this));
|
||||||
this._metaWindow.connect('notify::minimized',
|
|
||||||
this._minimizedChanged.bind(this));
|
|
||||||
this._minimizedChanged();
|
this._minimizedChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -222,24 +216,23 @@ class BaseButton {
|
|||||||
this.actor._delegate = this;
|
this.actor._delegate = this;
|
||||||
|
|
||||||
this.actor.connect('allocation-changed',
|
this.actor.connect('allocation-changed',
|
||||||
this._updateIconGeometry.bind(this));
|
this._updateIconGeometry.bind(this));
|
||||||
this.actor.connect('clicked', this._onClicked.bind(this));
|
this.actor.connect('clicked', this._onClicked.bind(this));
|
||||||
this.actor.connect('destroy', this._onDestroy.bind(this));
|
this.actor.connect('destroy', this._onDestroy.bind(this));
|
||||||
this.actor.connect('popup-menu', this._onPopupMenu.bind(this));
|
this.actor.connect('popup-menu', this._onPopupMenu.bind(this));
|
||||||
|
|
||||||
this._contextMenuManager = new PopupMenu.PopupMenuManager(this);
|
this._contextMenuManager = new PopupMenu.PopupMenuManager(this.actor);
|
||||||
|
|
||||||
this._switchWorkspaceId =
|
this._switchWorkspaceId = global.window_manager.connect(
|
||||||
global.window_manager.connect('switch-workspace',
|
'switch-workspace', this._updateVisibility.bind(this));
|
||||||
this._updateVisibility.bind(this));
|
|
||||||
|
|
||||||
if (this._perMonitor) {
|
if (this._perMonitor) {
|
||||||
this._windowEnteredMonitorId =
|
this._windowEnteredMonitorId = global.display.connect(
|
||||||
global.display.connect('window-entered-monitor',
|
'window-entered-monitor',
|
||||||
this._windowEnteredOrLeftMonitor.bind(this));
|
this._windowEnteredOrLeftMonitor.bind(this));
|
||||||
this._windowLeftMonitorId =
|
this._windowLeftMonitorId = global.display.connect(
|
||||||
global.display.connect('window-left-monitor',
|
'window-left-monitor',
|
||||||
this._windowEnteredOrLeftMonitor.bind(this));
|
this._windowEnteredOrLeftMonitor.bind(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,13 +332,11 @@ class WindowButton extends BaseButton {
|
|||||||
this._contextMenuManager.addMenu(this._contextMenu);
|
this._contextMenuManager.addMenu(this._contextMenu);
|
||||||
Main.uiGroup.add_actor(this._contextMenu.actor);
|
Main.uiGroup.add_actor(this._contextMenu.actor);
|
||||||
|
|
||||||
this._workspaceChangedId =
|
this._workspaceChangedId = this.metaWindow.connect(
|
||||||
this.metaWindow.connect('workspace-changed',
|
'workspace-changed', this._updateVisibility.bind(this));
|
||||||
this._updateVisibility.bind(this));
|
|
||||||
|
|
||||||
this._notifyFocusId =
|
this._notifyFocusId = global.display.connect(
|
||||||
global.display.connect('notify::focus-window',
|
'notify::focus-window', this._updateStyle.bind(this));
|
||||||
this._updateStyle.bind(this));
|
|
||||||
this._updateStyle();
|
this._updateStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,7 +481,7 @@ class AppButton extends BaseButton {
|
|||||||
this._multiWindowTitle.add(label);
|
this._multiWindowTitle.add(label);
|
||||||
this._multiWindowTitle.label_actor = label;
|
this._multiWindowTitle.label_actor = label;
|
||||||
|
|
||||||
this._menuManager = new PopupMenu.PopupMenuManager(this);
|
this._menuManager = new PopupMenu.PopupMenuManager(this.actor);
|
||||||
this._menu = new PopupMenu.PopupMenu(this.actor, 0.5, St.Side.BOTTOM);
|
this._menu = new PopupMenu.PopupMenu(this.actor, 0.5, St.Side.BOTTOM);
|
||||||
this._menu.connect('open-state-changed', _onMenuStateChanged);
|
this._menu.connect('open-state-changed', _onMenuStateChanged);
|
||||||
this._menu.actor.hide();
|
this._menu.actor.hide();
|
||||||
@@ -509,15 +500,13 @@ class AppButton extends BaseButton {
|
|||||||
this._icon.child = app.create_icon_texture(ICON_TEXTURE_SIZE);
|
this._icon.child = app.create_icon_texture(ICON_TEXTURE_SIZE);
|
||||||
});
|
});
|
||||||
|
|
||||||
this._windowsChangedId =
|
this._windowsChangedId = this.app.connect(
|
||||||
this.app.connect('windows-changed',
|
'windows-changed', this._windowsChanged.bind(this));
|
||||||
this._windowsChanged.bind(this));
|
|
||||||
this._windowsChanged();
|
this._windowsChanged();
|
||||||
|
|
||||||
this._windowTracker = Shell.WindowTracker.get_default();
|
this._windowTracker = Shell.WindowTracker.get_default();
|
||||||
this._notifyFocusId =
|
this._notifyFocusId = this._windowTracker.connect(
|
||||||
this._windowTracker.connect('notify::focus-app',
|
'notify::focus-app', this._updateStyle.bind(this));
|
||||||
this._updateStyle.bind(this));
|
|
||||||
this._updateStyle();
|
this._updateStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -565,8 +554,8 @@ class AppButton extends BaseButton {
|
|||||||
this._windowTitle = new WindowTitle(this.metaWindow);
|
this._windowTitle = new WindowTitle(this.metaWindow);
|
||||||
this._singleWindowTitle.child = this._windowTitle.actor;
|
this._singleWindowTitle.child = this._windowTitle.actor;
|
||||||
this._windowContextMenu = new WindowContextMenu(this.actor, this.metaWindow);
|
this._windowContextMenu = new WindowContextMenu(this.actor, this.metaWindow);
|
||||||
this._windowContextMenu.connect('open-state-changed',
|
this._windowContextMenu.connect(
|
||||||
_onMenuStateChanged);
|
'open-state-changed', _onMenuStateChanged);
|
||||||
Main.uiGroup.add_actor(this._windowContextMenu.actor);
|
Main.uiGroup.add_actor(this._windowContextMenu.actor);
|
||||||
this._windowContextMenu.actor.hide();
|
this._windowContextMenu.actor.hide();
|
||||||
this._contextMenuManager.addMenu(this._windowContextMenu);
|
this._contextMenuManager.addMenu(this._windowContextMenu);
|
||||||
@@ -671,19 +660,19 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
|
|
||||||
this.workspacesItems = [];
|
this.workspacesItems = [];
|
||||||
|
|
||||||
this._workspaceManagerSignals = [];
|
this._workspaceManagerSignals = [
|
||||||
this._workspaceManagerSignals.push(workspaceManager.connect('notify::n-workspaces',
|
workspaceManager.connect('notify::n-workspaces',
|
||||||
this._updateMenu.bind(this)));
|
this._updateMenu.bind(this)),
|
||||||
this._workspaceManagerSignals.push(workspaceManager.connect_after('workspace-switched',
|
workspaceManager.connect_after('workspace-switched',
|
||||||
this._updateIndicator.bind(this)));
|
this._updateIndicator.bind(this))
|
||||||
|
];
|
||||||
|
|
||||||
this.connect('scroll-event', this._onScrollEvent.bind(this));
|
this.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
this._updateMenu();
|
this._updateMenu();
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.wm.preferences' });
|
this._settings = new Gio.Settings({ schema_id: 'org.gnome.desktop.wm.preferences' });
|
||||||
this._settingsChangedId =
|
this._settingsChangedId = this._settings.connect(
|
||||||
this._settings.connect('changed::workspace-names',
|
'changed::workspace-names', this._updateMenu.bind(this));
|
||||||
this._updateMenu.bind(this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
@@ -812,15 +801,15 @@ class WindowList {
|
|||||||
indicatorsBox.add(this._workspaceIndicator.container, { expand: false, y_fill: true });
|
indicatorsBox.add(this._workspaceIndicator.container, { expand: false, y_fill: true });
|
||||||
|
|
||||||
this._mutterSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
|
this._mutterSettings = new Gio.Settings({ schema_id: 'org.gnome.mutter' });
|
||||||
this._workspacesOnlyOnPrimaryChangedId =
|
this._workspacesOnlyOnPrimaryChangedId = this._mutterSettings.connect(
|
||||||
this._mutterSettings.connect('changed::workspaces-only-on-primary',
|
'changed::workspaces-only-on-primary',
|
||||||
this._updateWorkspaceIndicatorVisibility.bind(this));
|
this._updateWorkspaceIndicatorVisibility.bind(this));
|
||||||
this._dynamicWorkspacesChangedId =
|
this._dynamicWorkspacesChangedId = this._mutterSettings.connect(
|
||||||
this._mutterSettings.connect('changed::dynamic-workspaces',
|
'changed::dynamic-workspaces',
|
||||||
this._updateWorkspaceIndicatorVisibility.bind(this));
|
this._updateWorkspaceIndicatorVisibility.bind(this));
|
||||||
this._updateWorkspaceIndicatorVisibility();
|
this._updateWorkspaceIndicatorVisibility();
|
||||||
|
|
||||||
this._menuManager = new PopupMenu.PopupMenuManager(this);
|
this._menuManager = new PopupMenu.PopupMenuManager(this.actor);
|
||||||
this._menuManager.addMenu(this._workspaceIndicator.menu);
|
this._menuManager.addMenu(this._workspaceIndicator.menu);
|
||||||
|
|
||||||
Main.layoutManager.addChrome(this.actor, {
|
Main.layoutManager.addChrome(this.actor, {
|
||||||
@@ -835,59 +824,54 @@ class WindowList {
|
|||||||
this._updatePosition();
|
this._updatePosition();
|
||||||
|
|
||||||
this._appSystem = Shell.AppSystem.get_default();
|
this._appSystem = Shell.AppSystem.get_default();
|
||||||
this._appStateChangedId =
|
this._appStateChangedId = this._appSystem.connect(
|
||||||
this._appSystem.connect('app-state-changed',
|
'app-state-changed', this._onAppStateChanged.bind(this));
|
||||||
this._onAppStateChanged.bind(this));
|
|
||||||
|
|
||||||
this._keyboardVisiblechangedId =
|
this._keyboardVisiblechangedId = Main.layoutManager.connect(
|
||||||
Main.layoutManager.connect('keyboard-visible-changed',
|
'keyboard-visible-changed',
|
||||||
(o, state) => {
|
(o, state) => {
|
||||||
Main.layoutManager.keyboardBox.visible = state;
|
Main.layoutManager.keyboardBox.visible = state;
|
||||||
let keyboardBox = Main.layoutManager.keyboardBox;
|
let keyboardBox = Main.layoutManager.keyboardBox;
|
||||||
keyboardBox.visible = state;
|
keyboardBox.visible = state;
|
||||||
if (state)
|
if (state) {
|
||||||
Main.uiGroup.set_child_above_sibling(this.actor, keyboardBox);
|
Main.uiGroup.set_child_above_sibling(
|
||||||
else
|
this.actor, keyboardBox);
|
||||||
Main.uiGroup.set_child_above_sibling(this.actor,
|
} else {
|
||||||
Main.layoutManager.panelBox);
|
Main.uiGroup.set_child_above_sibling(
|
||||||
this._updateKeyboardAnchor();
|
this.actor, Main.layoutManager.panelBox);
|
||||||
});
|
}
|
||||||
|
this._updateKeyboardAnchor();
|
||||||
|
});
|
||||||
|
|
||||||
let workspaceManager = global.workspace_manager;
|
let workspaceManager = global.workspace_manager;
|
||||||
|
|
||||||
this._workspaceSignals = new Map();
|
this._workspaceSignals = new Map();
|
||||||
this._nWorkspacesChangedId =
|
this._nWorkspacesChangedId = workspaceManager.connect(
|
||||||
workspaceManager.connect('notify::n-workspaces',
|
'notify::n-workspaces', this._onWorkspacesChanged.bind(this));
|
||||||
this._onWorkspacesChanged.bind(this));
|
|
||||||
this._onWorkspacesChanged();
|
this._onWorkspacesChanged();
|
||||||
|
|
||||||
this._switchWorkspaceId =
|
this._switchWorkspaceId = global.window_manager.connect(
|
||||||
global.window_manager.connect('switch-workspace',
|
'switch-workspace', this._checkGrouping.bind(this));
|
||||||
this._checkGrouping.bind(this));
|
|
||||||
|
|
||||||
this._overviewShowingId =
|
this._overviewShowingId = Main.overview.connect('showing', () => {
|
||||||
Main.overview.connect('showing', () => {
|
this.actor.hide();
|
||||||
this.actor.hide();
|
this._updateKeyboardAnchor();
|
||||||
this._updateKeyboardAnchor();
|
});
|
||||||
});
|
|
||||||
|
|
||||||
this._overviewHidingId =
|
this._overviewHidingId = Main.overview.connect('hiding', () => {
|
||||||
Main.overview.connect('hiding', () => {
|
this.actor.visible = !Main.layoutManager.primaryMonitor.inFullscreen;
|
||||||
this.actor.visible = !Main.layoutManager.primaryMonitor.inFullscreen;
|
this._updateKeyboardAnchor();
|
||||||
this._updateKeyboardAnchor();
|
});
|
||||||
});
|
|
||||||
|
|
||||||
this._fullscreenChangedId =
|
this._fullscreenChangedId =
|
||||||
global.display.connect('in-fullscreen-changed', () => {
|
global.display.connect('in-fullscreen-changed', () => {
|
||||||
this._updateKeyboardAnchor();
|
this._updateKeyboardAnchor();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._dragBeginId =
|
this._dragBeginId = Main.xdndHandler.connect('drag-begin',
|
||||||
Main.xdndHandler.connect('drag-begin',
|
this._onDragBegin.bind(this));
|
||||||
this._onDragBegin.bind(this));
|
this._dragEndId = Main.xdndHandler.connect('drag-end',
|
||||||
this._dragEndId =
|
this._onDragEnd.bind(this));
|
||||||
Main.xdndHandler.connect('drag-end',
|
|
||||||
this._onDragEnd.bind(this));
|
|
||||||
this._dragMonitor = {
|
this._dragMonitor = {
|
||||||
dragMotion: this._onDragMotion.bind(this)
|
dragMotion: this._onDragMotion.bind(this)
|
||||||
};
|
};
|
||||||
@@ -896,9 +880,8 @@ class WindowList {
|
|||||||
this._dndWindow = null;
|
this._dndWindow = null;
|
||||||
|
|
||||||
this._settings = ExtensionUtils.getSettings();
|
this._settings = ExtensionUtils.getSettings();
|
||||||
this._groupingModeChangedId =
|
this._groupingModeChangedId = this._settings.connect(
|
||||||
this._settings.connect('changed::grouping-mode',
|
'changed::grouping-mode', this._groupingModeChanged.bind(this));
|
||||||
this._groupingModeChanged.bind(this));
|
|
||||||
this._grouped = undefined;
|
this._grouped = undefined;
|
||||||
this._groupingModeChanged();
|
this._groupingModeChanged();
|
||||||
}
|
}
|
||||||
@@ -922,8 +905,9 @@ class WindowList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_updatePosition() {
|
_updatePosition() {
|
||||||
this.actor.set_position(this._monitor.x,
|
this.actor.set_position(
|
||||||
this._monitor.y + this._monitor.height - this.actor.height);
|
this._monitor.x,
|
||||||
|
this._monitor.y + this._monitor.height - this.actor.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateWorkspaceIndicatorVisibility() {
|
_updateWorkspaceIndicatorVisibility() {
|
||||||
@@ -933,7 +917,7 @@ class WindowList {
|
|||||||
let workspacesOnMonitor = this._monitor == Main.layoutManager.primaryMonitor ||
|
let workspacesOnMonitor = this._monitor == Main.layoutManager.primaryMonitor ||
|
||||||
!this._mutterSettings.get_boolean('workspaces-only-on-primary');
|
!this._mutterSettings.get_boolean('workspaces-only-on-primary');
|
||||||
|
|
||||||
this._workspaceIndicator.actor.visible = hasWorkspaces && workspacesOnMonitor;
|
this._workspaceIndicator.visible = hasWorkspaces && workspacesOnMonitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
_getPreferredUngroupedWindowListWidth() {
|
_getPreferredUngroupedWindowListWidth() {
|
||||||
@@ -956,7 +940,7 @@ class WindowList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_getMaxWindowListWidth() {
|
_getMaxWindowListWidth() {
|
||||||
let indicatorsBox = this._workspaceIndicator.actor.get_parent();
|
let indicatorsBox = this._workspaceIndicator.get_parent();
|
||||||
return this.actor.width - indicatorsBox.get_preferred_width(-1)[1];
|
return this.actor.width - indicatorsBox.get_preferred_width(-1)[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1009,8 +993,8 @@ class WindowList {
|
|||||||
if (!Main.keyboard.actor)
|
if (!Main.keyboard.actor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let anchorY = Main.overview.visible ? 0 : this.actor.height;
|
let translationY = Main.overview.visible ? 0 : this.actor.height;
|
||||||
Main.keyboard.actor.anchor_y = anchorY;
|
Main.keyboard.actor.translation_y = -translationY;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onAppStateChanged(appSys, app) {
|
_onAppStateChanged(appSys, app) {
|
||||||
@@ -1026,9 +1010,9 @@ class WindowList {
|
|||||||
_addApp(app) {
|
_addApp(app) {
|
||||||
let button = new AppButton(app, this._perMonitor, this._monitor.index);
|
let button = new AppButton(app, this._perMonitor, this._monitor.index);
|
||||||
this._windowList.layout_manager.pack(button.actor,
|
this._windowList.layout_manager.pack(button.actor,
|
||||||
true, true, true,
|
true, true, true,
|
||||||
Clutter.BoxAlignment.START,
|
Clutter.BoxAlignment.START,
|
||||||
Clutter.BoxAlignment.START);
|
Clutter.BoxAlignment.START);
|
||||||
}
|
}
|
||||||
|
|
||||||
_removeApp(app) {
|
_removeApp(app) {
|
||||||
@@ -1054,9 +1038,9 @@ class WindowList {
|
|||||||
|
|
||||||
let button = new WindowButton(win, this._perMonitor, this._monitor.index);
|
let button = new WindowButton(win, this._perMonitor, this._monitor.index);
|
||||||
this._windowList.layout_manager.pack(button.actor,
|
this._windowList.layout_manager.pack(button.actor,
|
||||||
true, true, true,
|
true, true, true,
|
||||||
Clutter.BoxAlignment.START,
|
Clutter.BoxAlignment.START,
|
||||||
Clutter.BoxAlignment.START);
|
Clutter.BoxAlignment.START);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onWindowRemoved(ws, win) {
|
_onWindowRemoved(ws, win) {
|
||||||
@@ -1085,12 +1069,10 @@ class WindowList {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
let signals = { windowAddedId: 0, windowRemovedId: 0 };
|
let signals = { windowAddedId: 0, windowRemovedId: 0 };
|
||||||
signals._windowAddedId =
|
signals._windowAddedId = workspace.connect_after(
|
||||||
workspace.connect_after('window-added',
|
'window-added', this._onWindowAdded.bind(this));
|
||||||
this._onWindowAdded.bind(this));
|
signals._windowRemovedId = workspace.connect(
|
||||||
signals._windowRemovedId =
|
'window-removed', this._onWindowRemoved.bind(this));
|
||||||
workspace.connect('window-removed',
|
|
||||||
this._onWindowRemoved.bind(this));
|
|
||||||
this._workspaceSignals.set(workspace, signals);
|
this._workspaceSignals.set(workspace, signals);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1138,8 +1120,7 @@ class WindowList {
|
|||||||
|
|
||||||
this._dndWindow = hoveredWindow;
|
this._dndWindow = hoveredWindow;
|
||||||
this._dndTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
|
this._dndTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
|
||||||
DND_ACTIVATE_TIMEOUT,
|
DND_ACTIVATE_TIMEOUT, this._activateWindow.bind(this));
|
||||||
this._activateWindow.bind(this));
|
|
||||||
|
|
||||||
return DND.DragMotionResult.CONTINUE;
|
return DND.DragMotionResult.CONTINUE;
|
||||||
}
|
}
|
||||||
@@ -1213,13 +1194,11 @@ class Extension {
|
|||||||
this._windowLists = [];
|
this._windowLists = [];
|
||||||
|
|
||||||
this._settings = ExtensionUtils.getSettings();
|
this._settings = ExtensionUtils.getSettings();
|
||||||
this._showOnAllMonitorsChangedId =
|
this._showOnAllMonitorsChangedId = this._settings.connect(
|
||||||
this._settings.connect('changed::show-on-all-monitors',
|
'changed::show-on-all-monitors', this._buildWindowLists.bind(this));
|
||||||
this._buildWindowLists.bind(this));
|
|
||||||
|
|
||||||
this._monitorsChangedId =
|
this._monitorsChangedId = Main.layoutManager.connect(
|
||||||
Main.layoutManager.connect('monitors-changed',
|
'monitors-changed', this._buildWindowLists.bind(this));
|
||||||
this._buildWindowLists.bind(this));
|
|
||||||
|
|
||||||
this._buildWindowLists();
|
this._buildWindowLists();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,50 +1,65 @@
|
|||||||
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||||
/* exported enable disable */
|
/* exported init */
|
||||||
const { Clutter, St } = imports.gi;
|
const { Clutter, St } = imports.gi;
|
||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Workspace = imports.ui.workspace;
|
const Workspace = imports.ui.workspace;
|
||||||
const WorkspacesView = imports.ui.workspacesView;
|
const WorkspacesView = imports.ui.workspacesView;
|
||||||
|
|
||||||
function injectToFunction(parent, name, func) {
|
var MyWindowOverlay = class extends Workspace.WindowOverlay {
|
||||||
let origin = parent[name];
|
constructor(windowClone, parentActor) {
|
||||||
parent[name] = function() {
|
super(windowClone, parentActor);
|
||||||
let ret;
|
|
||||||
ret = origin.apply(this, arguments);
|
|
||||||
if (ret === undefined)
|
|
||||||
ret = func.apply(this, arguments);
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
return origin;
|
|
||||||
}
|
|
||||||
|
|
||||||
let winInjections, workspaceInjections, workViewInjections, createdActors, connectedSignals;
|
this._id = null;
|
||||||
|
this._text = new St.Label({
|
||||||
|
style_class: 'extension-windowsNavigator-window-tooltip',
|
||||||
|
visible: false
|
||||||
|
});
|
||||||
|
parentActor.add_actor(this._text);
|
||||||
|
}
|
||||||
|
|
||||||
function resetState() {
|
showTooltip() {
|
||||||
winInjections = {};
|
|
||||||
workspaceInjections = {};
|
|
||||||
workViewInjections = {};
|
|
||||||
createdActors = [];
|
|
||||||
connectedSignals = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
function enable() {
|
|
||||||
resetState();
|
|
||||||
|
|
||||||
Workspace.WindowOverlay.prototype.showTooltip = function() {
|
|
||||||
this._text.raise_top();
|
this._text.raise_top();
|
||||||
this._text.show();
|
this._text.show();
|
||||||
this._text.text = (this._windowClone.slotId + 1).toString();
|
this._text.text = (this._windowClone.slotId + 1).toString();
|
||||||
};
|
}
|
||||||
winInjections['showTooltip'] = undefined;
|
|
||||||
|
|
||||||
Workspace.WindowOverlay.prototype.hideTooltip = function() {
|
hideTooltip() {
|
||||||
if (this._text && this._text.visible)
|
if (this._text && this._text.visible)
|
||||||
this._text.hide();
|
this._text.hide();
|
||||||
};
|
}
|
||||||
winInjections['hideTooltip'] = undefined;
|
|
||||||
|
|
||||||
Workspace.Workspace.prototype.showTooltip = function() {
|
relayout(animate) {
|
||||||
|
super.relayout(animate);
|
||||||
|
|
||||||
|
let [cloneX, cloneY, cloneWidth_, cloneHeight_] = this._windowClone.slot;
|
||||||
|
|
||||||
|
let textX = cloneX - 2;
|
||||||
|
let textY = cloneY - 2;
|
||||||
|
this._text.set_position(Math.floor(textX) + 5, Math.floor(textY) + 5);
|
||||||
|
this._text.raise_top();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var MyWorkspace = class extends Workspace.Workspace {
|
||||||
|
constructor(metaWorkspace, monitorIndex) {
|
||||||
|
super(metaWorkspace, monitorIndex);
|
||||||
|
|
||||||
|
if (metaWorkspace && metaWorkspace.index() < 9) {
|
||||||
|
this._tip = new St.Label({
|
||||||
|
style_class: 'extension-windowsNavigator-window-tooltip',
|
||||||
|
visible: false
|
||||||
|
});
|
||||||
|
this.actor.add_actor(this._tip);
|
||||||
|
|
||||||
|
this.actor.connect('notify::scale-x', () => {
|
||||||
|
this._tip.set_scale(1 / this.actor.scale_x, 1 / this.actor.scale_x);
|
||||||
|
});
|
||||||
|
} else
|
||||||
|
this._tip = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
showTooltip() {
|
||||||
if (this._tip == null || this._actualGeometry == null)
|
if (this._tip == null || this._actualGeometry == null)
|
||||||
return;
|
return;
|
||||||
this._tip.text = (this.metaWorkspace.index() + 1).toString();
|
this._tip.text = (this.metaWorkspace.index() + 1).toString();
|
||||||
@@ -64,61 +79,74 @@ function enable() {
|
|||||||
this._tip.y = area.y;
|
this._tip.y = area.y;
|
||||||
this._tip.show();
|
this._tip.show();
|
||||||
this._tip.raise_top();
|
this._tip.raise_top();
|
||||||
};
|
}
|
||||||
workspaceInjections['showTooltip'] = undefined;
|
|
||||||
|
|
||||||
Workspace.Workspace.prototype.hideTooltip = function() {
|
hideTooltip() {
|
||||||
if (this._tip == null)
|
if (this._tip == null)
|
||||||
return;
|
return;
|
||||||
if (!this._tip.get_parent())
|
if (!this._tip.get_parent())
|
||||||
return;
|
return;
|
||||||
this._tip.hide();
|
this._tip.hide();
|
||||||
};
|
}
|
||||||
workspaceInjections['hideTooltip'] = undefined;
|
|
||||||
|
|
||||||
Workspace.Workspace.prototype.getWindowWithTooltip = function(id) {
|
getWindowWithTooltip(id) {
|
||||||
for (let i = 0; i < this._windows.length; i++) {
|
for (let i = 0; i < this._windows.length; i++) {
|
||||||
if ((this._windows[i].slotId + 1) == id)
|
if ((this._windows[i].slotId + 1) == id)
|
||||||
return this._windows[i].metaWindow;
|
return this._windows[i].metaWindow;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
}
|
||||||
workspaceInjections['getWindowWithTooltip'] = undefined;
|
|
||||||
|
|
||||||
Workspace.Workspace.prototype.showWindowsTooltips = function() {
|
showWindowsTooltips() {
|
||||||
for (let i in this._windowOverlays) {
|
for (let i in this._windowOverlays) {
|
||||||
if (this._windowOverlays[i] != null)
|
if (this._windowOverlays[i] != null)
|
||||||
this._windowOverlays[i].showTooltip();
|
this._windowOverlays[i].showTooltip();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
workspaceInjections['showWindowsTooltips'] = undefined;
|
|
||||||
|
|
||||||
Workspace.Workspace.prototype.hideWindowsTooltips = function() {
|
hideWindowsTooltips() {
|
||||||
for (let i in this._windowOverlays) {
|
for (let i in this._windowOverlays) {
|
||||||
if (this._windowOverlays[i] != null)
|
if (this._windowOverlays[i] != null)
|
||||||
this._windowOverlays[i].hideTooltip();
|
this._windowOverlays[i].hideTooltip();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
workspaceInjections['hideWindowsTooltips'] = undefined;
|
};
|
||||||
|
|
||||||
WorkspacesView.WorkspacesView.prototype._hideTooltips = function() {
|
var MyWorkspacesView = class extends WorkspacesView.WorkspacesView {
|
||||||
|
constructor(width, height, x, y, workspaces) {
|
||||||
|
super(width, height, x, y, workspaces);
|
||||||
|
|
||||||
|
this._pickWorkspace = false;
|
||||||
|
this._pickWindow = false;
|
||||||
|
this._keyPressEventId =
|
||||||
|
global.stage.connect('key-press-event', this._onKeyPress.bind(this));
|
||||||
|
this._keyReleaseEventId =
|
||||||
|
global.stage.connect('key-release-event', this._onKeyRelease.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
_onDestroy() {
|
||||||
|
super._onDestroy();
|
||||||
|
|
||||||
|
global.stage.disconnect(this._keyPressEventId);
|
||||||
|
global.stage.disconnect(this._keyReleaseEventId);
|
||||||
|
}
|
||||||
|
|
||||||
|
_hideTooltips() {
|
||||||
if (global.stage.get_key_focus() == global.stage)
|
if (global.stage.get_key_focus() == global.stage)
|
||||||
global.stage.set_key_focus(this._prevFocusActor);
|
global.stage.set_key_focus(this._prevFocusActor);
|
||||||
this._pickWindow = false;
|
this._pickWindow = false;
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
this._workspaces[i].hideWindowsTooltips();
|
this._workspaces[i].hideWindowsTooltips();
|
||||||
};
|
}
|
||||||
workViewInjections['_hideTooltips'] = undefined;
|
|
||||||
|
|
||||||
WorkspacesView.WorkspacesView.prototype._hideWorkspacesTooltips = function() {
|
_hideWorkspacesTooltips() {
|
||||||
global.stage.set_key_focus(this._prevFocusActor);
|
global.stage.set_key_focus(this._prevFocusActor);
|
||||||
this._pickWorkspace = false;
|
this._pickWorkspace = false;
|
||||||
for (let i = 0; i < this._workspaces.length; i++)
|
for (let i = 0; i < this._workspaces.length; i++)
|
||||||
this._workspaces[i].hideTooltip();
|
this._workspaces[i].hideTooltip();
|
||||||
};
|
}
|
||||||
workViewInjections['_hideWorkspacesTooltips'] = undefined;
|
|
||||||
|
|
||||||
WorkspacesView.WorkspacesView.prototype._onKeyRelease = function(s, o) {
|
_onKeyRelease(s, o) {
|
||||||
if (this._pickWindow &&
|
if (this._pickWindow &&
|
||||||
(o.get_key_symbol() == Clutter.KEY_Alt_L ||
|
(o.get_key_symbol() == Clutter.KEY_Alt_L ||
|
||||||
o.get_key_symbol() == Clutter.KEY_Alt_R))
|
o.get_key_symbol() == Clutter.KEY_Alt_R))
|
||||||
@@ -127,11 +155,11 @@ function enable() {
|
|||||||
(o.get_key_symbol() == Clutter.KEY_Control_L ||
|
(o.get_key_symbol() == Clutter.KEY_Control_L ||
|
||||||
o.get_key_symbol() == Clutter.KEY_Control_R))
|
o.get_key_symbol() == Clutter.KEY_Control_R))
|
||||||
this._hideWorkspacesTooltips();
|
this._hideWorkspacesTooltips();
|
||||||
};
|
}
|
||||||
workViewInjections['_onKeyRelease'] = undefined;
|
|
||||||
|
|
||||||
WorkspacesView.WorkspacesView.prototype._onKeyPress = function(s, o) {
|
_onKeyPress(s, o) {
|
||||||
if (Main.overview.viewSelector._activePage != Main.overview.viewSelector._workspacesPage)
|
let viewSelector = Main.overview.viewSelector;
|
||||||
|
if (viewSelector._activePage != viewSelector._workspacesPage)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
let workspaceManager = global.workspace_manager;
|
let workspaceManager = global.workspace_manager;
|
||||||
@@ -208,81 +236,29 @@ function enable() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
}
|
||||||
workViewInjections['_onKeyPress'] = undefined;
|
};
|
||||||
|
|
||||||
winInjections['_init'] = injectToFunction(Workspace.WindowOverlay.prototype, '_init', function(windowClone, parentActor) {
|
class Extension {
|
||||||
this._id = null;
|
constructor() {
|
||||||
createdActors.push(this._text = new St.Label({ style_class: 'extension-windowsNavigator-window-tooltip' }));
|
this._origWindowOverlay = Workspace.WindowOverlay;
|
||||||
this._text.hide();
|
this._origWorkspace = Workspace.Workspace;
|
||||||
parentActor.add_actor(this._text);
|
this._origWorkspacesView = WorkspacesView.WorkspacesView;
|
||||||
});
|
}
|
||||||
|
|
||||||
winInjections['relayout'] = injectToFunction(Workspace.WindowOverlay.prototype, 'relayout', function(_animate) {
|
enable() {
|
||||||
let [cloneX, cloneY, cloneWidth_, cloneHeight_] = this._windowClone.slot;
|
Workspace.WindowOverlay = MyWindowOverlay;
|
||||||
|
Workspace.Workspace = MyWorkspace;
|
||||||
|
WorkspacesView.WorkspacesView = MyWorkspacesView;
|
||||||
|
}
|
||||||
|
|
||||||
let textX = cloneX - 2;
|
disable() {
|
||||||
let textY = cloneY - 2;
|
Workspace.WindowOverlay = this._origWindowOverlay;
|
||||||
this._text.set_position(Math.floor(textX) + 5, Math.floor(textY) + 5);
|
Workspace.Workspace = this._origWorkspace;
|
||||||
this._text.raise_top();
|
WorkspacesView.WorkspacesView = this._origWorkspacesView;
|
||||||
});
|
}
|
||||||
|
|
||||||
workspaceInjections['_init'] = injectToFunction(Workspace.Workspace.prototype, '_init', function(metaWorkspace) {
|
|
||||||
if (metaWorkspace && metaWorkspace.index() < 9) {
|
|
||||||
createdActors.push(this._tip = new St.Label({
|
|
||||||
style_class: 'extension-windowsNavigator-window-tooltip',
|
|
||||||
visible: false
|
|
||||||
}));
|
|
||||||
|
|
||||||
this.actor.add_actor(this._tip);
|
|
||||||
let signalId = this.actor.connect('notify::scale-x', () => {
|
|
||||||
this._tip.set_scale(1 / this.actor.scale_x, 1 / this.actor.scale_x);
|
|
||||||
});
|
|
||||||
connectedSignals.push({ obj: this.actor, id: signalId });
|
|
||||||
} else
|
|
||||||
this._tip = null;
|
|
||||||
});
|
|
||||||
|
|
||||||
workViewInjections['_init'] = injectToFunction(WorkspacesView.WorkspacesView.prototype, '_init', function(_width, _height, _x, _y, _workspaces) {
|
|
||||||
this._pickWorkspace = false;
|
|
||||||
this._pickWindow = false;
|
|
||||||
this._keyPressEventId =
|
|
||||||
global.stage.connect('key-press-event', this._onKeyPress.bind(this));
|
|
||||||
this._keyReleaseEventId =
|
|
||||||
global.stage.connect('key-release-event', this._onKeyRelease.bind(this));
|
|
||||||
connectedSignals.push({ obj: global.stage, id: this._keyPressEventId });
|
|
||||||
connectedSignals.push({ obj: global.stage, id: this._keyReleaseEventId });
|
|
||||||
});
|
|
||||||
|
|
||||||
workViewInjections['_onDestroy'] = injectToFunction(WorkspacesView.WorkspacesView.prototype, '_onDestroy', function() {
|
|
||||||
global.stage.disconnect(this._keyPressEventId);
|
|
||||||
global.stage.disconnect(this._keyReleaseEventId);
|
|
||||||
connectedSignals = [];
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeInjection(object, injection, name) {
|
function init() {
|
||||||
if (injection[name] === undefined)
|
return new Extension();
|
||||||
delete object[name];
|
|
||||||
else
|
|
||||||
object[name] = injection[name];
|
|
||||||
}
|
|
||||||
|
|
||||||
function disable() {
|
|
||||||
let i;
|
|
||||||
|
|
||||||
for (i in workspaceInjections)
|
|
||||||
removeInjection(Workspace.Workspace.prototype, workspaceInjections, i);
|
|
||||||
for (i in winInjections)
|
|
||||||
removeInjection(Workspace.WindowOverlay.prototype, winInjections, i);
|
|
||||||
for (i in workViewInjections)
|
|
||||||
removeInjection(WorkspacesView.WorkspacesView.prototype, workViewInjections, i);
|
|
||||||
|
|
||||||
for (i of connectedSignals)
|
|
||||||
i.obj.disconnect(i.id);
|
|
||||||
|
|
||||||
for (i of createdActors)
|
|
||||||
i.destroy();
|
|
||||||
|
|
||||||
resetState();
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,13 +34,14 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
this._workspaceSection = new PopupMenu.PopupMenuSection();
|
this._workspaceSection = new PopupMenu.PopupMenuSection();
|
||||||
this.menu.addMenuItem(this._workspaceSection);
|
this.menu.addMenuItem(this._workspaceSection);
|
||||||
|
|
||||||
this._workspaceManagerSignals = [];
|
this._workspaceManagerSignals = [
|
||||||
this._workspaceManagerSignals.push(workspaceManager.connect_after('workspace-added',
|
workspaceManager.connect_after('workspace-added',
|
||||||
this._createWorkspacesSection.bind(this)));
|
this._createWorkspacesSection.bind(this)),
|
||||||
this._workspaceManagerSignals.push(workspaceManager.connect_after('workspace-removed',
|
workspaceManager.connect_after('workspace-removed',
|
||||||
this._createWorkspacesSection.bind(this)));
|
this._createWorkspacesSection.bind(this)),
|
||||||
this._workspaceManagerSignals.push(workspaceManager.connect_after('workspace-switched',
|
workspaceManager.connect_after('workspace-switched',
|
||||||
this._updateIndicator.bind(this)));
|
this._updateIndicator.bind(this))
|
||||||
|
];
|
||||||
|
|
||||||
this.connect('scroll-event', this._onScrollEvent.bind(this));
|
this.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||||
this._createWorkspacesSection();
|
this._createWorkspacesSection();
|
||||||
@@ -49,9 +50,9 @@ class WorkspaceIndicator extends PanelMenu.Button {
|
|||||||
this.statusLabel.add_style_class_name('panel-workspace-indicator');
|
this.statusLabel.add_style_class_name('panel-workspace-indicator');
|
||||||
|
|
||||||
this._settings = new Gio.Settings({ schema_id: WORKSPACE_SCHEMA });
|
this._settings = new Gio.Settings({ schema_id: WORKSPACE_SCHEMA });
|
||||||
this._settingsChangedId =
|
this._settingsChangedId = this._settings.connect(
|
||||||
this._settings.connect(`changed::${WORKSPACE_KEY}`,
|
`changed::${WORKSPACE_KEY}`,
|
||||||
this._createWorkspacesSection.bind(this));
|
this._createWorkspacesSection.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDestroy() {
|
_onDestroy() {
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"rules": {
|
|
||||||
"indent": [
|
|
||||||
"error",
|
|
||||||
4,
|
|
||||||
{
|
|
||||||
"ignoredNodes": [
|
|
||||||
"CallExpression > ArrowFunctionExpression",
|
|
||||||
"CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child"
|
|
||||||
],
|
|
||||||
"CallExpression": { "arguments": "first" },
|
|
||||||
"MemberExpression": "off"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
SEP=`printf '\t'`
|
|
||||||
OUTPUT=/dev/stderr
|
|
||||||
CWD=`pwd`
|
|
||||||
SRCDIR=`dirname $0`
|
|
||||||
|
|
||||||
run_lint() {
|
|
||||||
eslint -f unix "$@" .
|
|
||||||
}
|
|
||||||
|
|
||||||
parse_opts() {
|
|
||||||
tmp=`getopt -l output: o: "$@"`
|
|
||||||
[ $? -ne 0 ] && exit 1
|
|
||||||
|
|
||||||
eval set -- $tmp
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
case $1 in
|
|
||||||
--output|-o)
|
|
||||||
OUTPUT=`realpath $2`; shift 2; continue ;;
|
|
||||||
--)
|
|
||||||
shift; break ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# delete lines that don't start with '/',
|
|
||||||
# replace the first space with tab, sort
|
|
||||||
process_for_join() {
|
|
||||||
sed -E "/\//!d; s|(\S+)\s|\1$SEP|" | sort -k 1b,1
|
|
||||||
}
|
|
||||||
|
|
||||||
# re-replace tab with space
|
|
||||||
process_post_join() {
|
|
||||||
sed -E "s|$SEP| |"
|
|
||||||
}
|
|
||||||
|
|
||||||
create_report() {
|
|
||||||
tmp1=`mktemp --tmpdir lint-XXXX`
|
|
||||||
run_lint | process_for_join > $tmp1
|
|
||||||
|
|
||||||
tmp2=`mktemp --tmpdir lint-XXXX`
|
|
||||||
run_lint -c lint/eslintrc-legacy.json | process_for_join > $tmp2
|
|
||||||
|
|
||||||
join -t"$SEP" -o '0,1.2' $tmp1 $tmp2 | process_post_join
|
|
||||||
rm $tmp1 $tmp2
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
parse_opts "$@"
|
|
||||||
|
|
||||||
cd $SRCDIR/..
|
|
||||||
|
|
||||||
create_report | tee $OUTPUT | grep -q .
|
|
||||||
rv=$(( $? == 0 ))
|
|
||||||
|
|
||||||
cd $CWD
|
|
||||||
|
|
||||||
[ $rv -eq 0 -a -f $OUTPUT ] && rm $OUTPUT
|
|
||||||
|
|
||||||
exit $rv
|
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
project('gnome-shell-extensions',
|
project('gnome-shell-extensions',
|
||||||
version: '3.32.0',
|
version: '3.33.3',
|
||||||
meson_version: '>= 0.44.0',
|
meson_version: '>= 0.44.0',
|
||||||
license: 'GPL2+'
|
license: 'GPL2+'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user