Compare commits
103 Commits
debian/0.1
...
ubuntu/que
Author | SHA1 | Date | |
---|---|---|---|
|
044927ffea | ||
|
7fa520d58d | ||
|
f659e03595 | ||
|
f2799c888e | ||
ec26c186c1 | |||
de3d3ae380 | |||
6a42e26240 | |||
ad0110a3e8 | |||
930b286e48 | |||
1c535d4861 | |||
6b63130197 | |||
697b925f5f | |||
|
68238dec46 | ||
|
9babf34766 | ||
|
421e3610b7 | ||
|
1810f6227c | ||
|
1ef85ddeac | ||
|
b1b4bd3f7a | ||
|
d8f8822d70 | ||
|
5ec887ef0d | ||
5fd7bd3860 | |||
61dedca925 | |||
7764149c07 | |||
0d14f33743 | |||
ebb335dce1 | |||
9812c22b1a | |||
ec53f204e2 | |||
d75689e90e | |||
|
bab4903cbb | ||
9f6f42e6a7 | |||
08293ed15c | |||
e48c0003a6 | |||
0952dbc648 | |||
136e3e068c | |||
18160cc23e | |||
|
ebfe297610 | ||
|
387ff05946 | ||
|
2ac6f93def | ||
|
9fc7532777 | ||
|
5592abceb9 | ||
|
897e7df462 | ||
fc8b2b3896 | |||
8837be7937 | |||
|
c8d4ea2243 | ||
8170f60dfa | |||
3b1ab5e8da | |||
9e83aefe9c | |||
72071a4b77 | |||
28bce28f70 | |||
668bc8bd1f | |||
d6b49de89c | |||
e9ea0c2e68 | |||
3383b48a9a | |||
99b7ed308c | |||
d444f92845 | |||
40a627f197 | |||
92bf1fa4f6 | |||
782eb86e43 | |||
558646a34d | |||
935967c906 | |||
c3bf07ec49 | |||
|
a8d9e619bc | ||
|
35853fd307 | ||
8380cbbf1c | |||
43fa8317f3 | |||
be101f2745 | |||
3815f1470b | |||
fc42b81442 | |||
889231e0f9 | |||
|
4a2c021548 | ||
|
790aa10f4a | ||
|
d6d0994bf1 | ||
|
fbd147bc5d | ||
|
9bec48d149 | ||
|
1d95b6b445 | ||
|
c3e0a06a29 | ||
|
2898276908 | ||
|
2599bcd79d | ||
|
e060b25083 | ||
|
a0dc5a20f2 | ||
|
9867376134 | ||
|
a8146db941 | ||
|
f7124b5614 | ||
|
cb45aa3fc5 | ||
|
10ce545ab5 | ||
|
d9710a7872 | ||
|
8938efaa36 | ||
|
0bdea4eb9b | ||
|
7e79ecf2e0 | ||
|
6a9c671422 | ||
|
320cc89fa4 | ||
|
6cfb873a0a | ||
|
eb245c4ee8 | ||
|
1ec8b0b12d | ||
|
662e42e610 | ||
|
86a331dfe6 | ||
|
6963916e29 | ||
|
3c591a5b38 | ||
|
b5d4430e4c | ||
|
afc64165a7 | ||
|
1aee7e97db | ||
|
e15176f52c | ||
|
fd728342f1 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,3 +0,0 @@
|
|||||||
build
|
|
||||||
*.kdev4
|
|
||||||
*/translations/lxqt-session
|
|
10
AUTHORS
10
AUTHORS
@ -1,10 +0,0 @@
|
|||||||
Upstream Authors:
|
|
||||||
LXQt team: http://lxqt.org
|
|
||||||
Razor team: http://razor-qt.org
|
|
||||||
|
|
||||||
Copyright:
|
|
||||||
Copyright (c) 2010-2012 Razor team
|
|
||||||
Copyright (c) 2012-2016 LXQt team
|
|
||||||
|
|
||||||
License: LGPL-2.1+
|
|
||||||
The full text of the licenses can be found in the 'COPYING' file.
|
|
@ -1,45 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
|
|
||||||
|
|
||||||
project(lxqt-session)
|
|
||||||
|
|
||||||
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
|
|
||||||
option(WITH_LIBUDEV "Build with libudev support" ON)
|
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
set(CMAKE_AUTOUIC ON)
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
find_package(KF5WindowSystem REQUIRED)
|
|
||||||
find_package(Qt5Widgets REQUIRED QUIET)
|
|
||||||
find_package(Qt5DBus REQUIRED QUIET)
|
|
||||||
find_package(Qt5X11Extras REQUIRED QUIET)
|
|
||||||
find_package(Qt5LinguistTools REQUIRED QUIET)
|
|
||||||
|
|
||||||
find_package(lxqt REQUIRED QUIET)
|
|
||||||
find_package(XdgUserDirs REQUIRED QUIET)
|
|
||||||
|
|
||||||
include(LXQtCompilerSettings NO_POLICY_SCOPE)
|
|
||||||
include(LXQtTranslate)
|
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED QUIET)
|
|
||||||
pkg_check_modules(XCB REQUIRED xcb)
|
|
||||||
find_package(X11 REQUIRED)
|
|
||||||
|
|
||||||
add_subdirectory(lxqt-session)
|
|
||||||
add_subdirectory(lxqt-config-session)
|
|
||||||
add_subdirectory(lxqt-leave)
|
|
||||||
|
|
||||||
# building tarball with CPack -------------------------------------------------
|
|
||||||
include(InstallRequiredSystemLibraries)
|
|
||||||
set(CPACK_PACKAGE_VERSION_MAJOR ${LXQT_MAJOR_VERSION})
|
|
||||||
set(CPACK_PACKAGE_VERSION_MINOR ${LXQT_MINOR_VERSION})
|
|
||||||
set(CPACK_PACKAGE_VERSION_PATCH ${LXQT_PATCH_VERSION})
|
|
||||||
set(CPACK_GENERATOR TBZ2)
|
|
||||||
set(CPACK_SOURCE_GENERATOR TBZ2)
|
|
||||||
set(CPACK_SOURCE_IGNORE_FILES /build/;.gitignore;.*~;.git;.kdev4;temp)
|
|
||||||
include(CPack)
|
|
458
LICENSE
458
LICENSE
@ -1,458 +0,0 @@
|
|||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
Version 2.1, February 1999
|
|
||||||
|
|
||||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
[This is the first released version of the Lesser GPL. It also counts
|
|
||||||
as the successor of the GNU Library Public License, version 2, hence
|
|
||||||
the version number 2.1.]
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
Licenses are intended to guarantee your freedom to share and change
|
|
||||||
free software--to make sure the software is free for all its users.
|
|
||||||
|
|
||||||
This license, the Lesser General Public License, applies to some
|
|
||||||
specially designated software packages--typically libraries--of the
|
|
||||||
Free Software Foundation and other authors who decide to use it. You
|
|
||||||
can use it too, but we suggest you first think carefully about whether
|
|
||||||
this license or the ordinary General Public License is the better
|
|
||||||
strategy to use in any particular case, based on the explanations below.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom of use,
|
|
||||||
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 and use pieces of
|
|
||||||
it in new free programs; and that you are informed that you can do
|
|
||||||
these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
distributors to deny you these rights or to ask you to surrender these
|
|
||||||
rights. These restrictions translate to certain responsibilities for
|
|
||||||
you if you distribute copies of the library or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of the library, whether gratis
|
|
||||||
or for a fee, you must give the recipients all the rights that we gave
|
|
||||||
you. You must make sure that they, too, receive or can get the source
|
|
||||||
code. If you link other code with the library, you must provide
|
|
||||||
complete object files to the recipients, so that they can relink them
|
|
||||||
with the library after making changes to the library and recompiling
|
|
||||||
it. And you must show them these terms so they know their rights.
|
|
||||||
|
|
||||||
We protect your rights with a two-step method: (1) we copyright the
|
|
||||||
library, and (2) we offer you this license, which gives you legal
|
|
||||||
permission to copy, distribute and/or modify the library.
|
|
||||||
|
|
||||||
To protect each distributor, we want to make it very clear that
|
|
||||||
there is no warranty for the free library. Also, if the library is
|
|
||||||
modified by someone else and passed on, the recipients should know
|
|
||||||
that what they have is not the original version, so that the original
|
|
||||||
author's reputation will not be affected by problems that might be
|
|
||||||
introduced by others.
|
|
||||||
|
|
||||||
Finally, software patents pose a constant threat to the existence of
|
|
||||||
any free program. We wish to make sure that a company cannot
|
|
||||||
effectively restrict the users of a free program by obtaining a
|
|
||||||
restrictive license from a patent holder. Therefore, we insist that
|
|
||||||
any patent license obtained for a version of the library must be
|
|
||||||
consistent with the full freedom of use specified in this license.
|
|
||||||
|
|
||||||
Most GNU software, including some libraries, is covered by the
|
|
||||||
ordinary GNU General Public License. This license, the GNU Lesser
|
|
||||||
General Public License, applies to certain designated libraries, and
|
|
||||||
is quite different from the ordinary General Public License. We use
|
|
||||||
this license for certain libraries in order to permit linking those
|
|
||||||
libraries into non-free programs.
|
|
||||||
|
|
||||||
When a program is linked with a library, whether statically or using
|
|
||||||
a shared library, the combination of the two is legally speaking a
|
|
||||||
combined work, a derivative of the original library. The ordinary
|
|
||||||
General Public License therefore permits such linking only if the
|
|
||||||
entire combination fits its criteria of freedom. The Lesser General
|
|
||||||
Public License permits more lax criteria for linking other code with
|
|
||||||
the library.
|
|
||||||
|
|
||||||
We call this license the "Lesser" General Public License because it
|
|
||||||
does Less to protect the user's freedom than the ordinary General
|
|
||||||
Public License. It also provides other free software developers Less
|
|
||||||
of an advantage over competing non-free programs. These disadvantages
|
|
||||||
are the reason we use the ordinary General Public License for many
|
|
||||||
libraries. However, the Lesser license provides advantages in certain
|
|
||||||
special circumstances.
|
|
||||||
|
|
||||||
For example, on rare occasions, there may be a special need to
|
|
||||||
encourage the widest possible use of a certain library, so that it becomes
|
|
||||||
a de-facto standard. To achieve this, non-free programs must be
|
|
||||||
allowed to use the library. A more frequent case is that a free
|
|
||||||
library does the same job as widely used non-free libraries. In this
|
|
||||||
case, there is little to gain by limiting the free library to free
|
|
||||||
software only, so we use the Lesser General Public License.
|
|
||||||
|
|
||||||
In other cases, permission to use a particular library in non-free
|
|
||||||
programs enables a greater number of people to use a large body of
|
|
||||||
free software. For example, permission to use the GNU C Library in
|
|
||||||
non-free programs enables many more people to use the whole GNU
|
|
||||||
operating system, as well as its variant, the GNU/Linux operating
|
|
||||||
system.
|
|
||||||
|
|
||||||
Although the Lesser General Public License is Less protective of the
|
|
||||||
users' freedom, it does ensure that the user of a program that is
|
|
||||||
linked with the Library has the freedom and the wherewithal to run
|
|
||||||
that program using a modified version of the Library.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow. Pay close attention to the difference between a
|
|
||||||
"work based on the library" and a "work that uses the library". The
|
|
||||||
former contains code derived from the library, whereas the latter must
|
|
||||||
be combined with the library in order to run.
|
|
||||||
|
|
||||||
GNU LESSER GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License Agreement applies to any software library or other
|
|
||||||
program which contains a notice placed by the copyright holder or
|
|
||||||
other authorized party saying it may be distributed under the terms of
|
|
||||||
this Lesser General Public License (also called "this License").
|
|
||||||
Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
A "library" means a collection of software functions and/or data
|
|
||||||
prepared so as to be conveniently linked with application programs
|
|
||||||
(which use some of those functions and data) to form executables.
|
|
||||||
|
|
||||||
The "Library", below, refers to any such software library or work
|
|
||||||
which has been distributed under these terms. A "work based on the
|
|
||||||
Library" means either the Library or any derivative work under
|
|
||||||
copyright law: that is to say, a work containing the Library or a
|
|
||||||
portion of it, either verbatim or with modifications and/or translated
|
|
||||||
straightforwardly into another language. (Hereinafter, translation is
|
|
||||||
included without limitation in the term "modification".)
|
|
||||||
|
|
||||||
"Source code" for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For a library, 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 library.
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running a program using the Library is not restricted, and output from
|
|
||||||
such a program is covered only if its contents constitute a work based
|
|
||||||
on the Library (independent of the use of the Library in a tool for
|
|
||||||
writing it). Whether that is true depends on what the Library does
|
|
||||||
and what the program that uses the Library does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Library's
|
|
||||||
complete 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 distribute a copy of this License along with the
|
|
||||||
Library.
|
|
||||||
|
|
||||||
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 Library or any portion
|
|
||||||
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
|
||||||
|
|
||||||
b) You must cause the files modified to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
c) You must cause the whole of the work to be licensed at no
|
|
||||||
charge to all third parties under the terms of this License.
|
|
||||||
|
|
||||||
d) If a facility in the modified Library refers to a function or a
|
|
||||||
table of data to be supplied by an application program that uses
|
|
||||||
the facility, other than as an argument passed when the facility
|
|
||||||
is invoked, then you must make a good faith effort to ensure that,
|
|
||||||
in the event an application does not supply such function or
|
|
||||||
table, the facility still operates, and performs whatever part of
|
|
||||||
its purpose remains meaningful.
|
|
||||||
|
|
||||||
(For example, a function in a library to compute square roots has
|
|
||||||
a purpose that is entirely well-defined independent of the
|
|
||||||
application. Therefore, Subsection 2d requires that any
|
|
||||||
application-supplied function or table used by this function must
|
|
||||||
be optional: if the application does not supply it, the square
|
|
||||||
root function must still compute square roots.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Library,
|
|
||||||
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 Library, 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 Library.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Library
|
|
||||||
with the Library (or with a work based on the Library) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
|
||||||
License instead of this License to a given copy of the Library. To do
|
|
||||||
this, you must alter all the notices that refer to this License, so
|
|
||||||
that they refer to the ordinary GNU General Public License, version 2,
|
|
||||||
instead of to this License. (If a newer version than version 2 of the
|
|
||||||
ordinary GNU General Public License has appeared, then you can specify
|
|
||||||
that version instead if you wish.) Do not make any other change in
|
|
||||||
these notices.
|
|
||||||
|
|
||||||
Once this change is made in a given copy, it is irreversible for
|
|
||||||
that copy, so the ordinary GNU General Public License applies to all
|
|
||||||
subsequent copies and derivative works made from that copy.
|
|
||||||
|
|
||||||
This option is useful when you wish to copy part of the code of
|
|
||||||
the Library into a program that is not a library.
|
|
||||||
|
|
||||||
4. You may copy and distribute the Library (or a portion or
|
|
||||||
derivative of it, under Section 2) in object code or executable form
|
|
||||||
under the terms of Sections 1 and 2 above provided that you 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.
|
|
||||||
|
|
||||||
If distribution of 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 satisfies the requirement to
|
|
||||||
distribute the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
5. A program that contains no derivative of any portion of the
|
|
||||||
Library, but is designed to work with the Library by being compiled or
|
|
||||||
linked with it, is called a "work that uses the Library". Such a
|
|
||||||
work, in isolation, is not a derivative work of the Library, and
|
|
||||||
therefore falls outside the scope of this License.
|
|
||||||
|
|
||||||
However, linking a "work that uses the Library" with the Library
|
|
||||||
creates an executable that is a derivative of the Library (because it
|
|
||||||
contains portions of the Library), rather than a "work that uses the
|
|
||||||
library". The executable is therefore covered by this License.
|
|
||||||
Section 6 states terms for distribution of such executables.
|
|
||||||
|
|
||||||
When a "work that uses the Library" uses material from a header file
|
|
||||||
that is part of the Library, the object code for the work may be a
|
|
||||||
derivative work of the Library even though the source code is not.
|
|
||||||
Whether this is true is especially significant if the work can be
|
|
||||||
linked without the Library, or if the work is itself a library. The
|
|
||||||
threshold for this to be true is not precisely defined by law.
|
|
||||||
|
|
||||||
If such an object file uses only numerical parameters, data
|
|
||||||
structure layouts and accessors, and small macros and small inline
|
|
||||||
functions (ten lines or less in length), then the use of the object
|
|
||||||
file is unrestricted, regardless of whether it is legally a derivative
|
|
||||||
work. (Executables containing this object code plus portions of the
|
|
||||||
Library will still fall under Section 6.)
|
|
||||||
|
|
||||||
Otherwise, if the work is a derivative of the Library, you may
|
|
||||||
distribute the object code for the work under the terms of Section 6.
|
|
||||||
Any executables containing that work also fall under Section 6,
|
|
||||||
whether or not they are linked directly with the Library itself.
|
|
||||||
|
|
||||||
6. As an exception to the Sections above, you may also combine or
|
|
||||||
link a "work that uses the Library" with the Library to produce a
|
|
||||||
work containing portions of the Library, and distribute that work
|
|
||||||
under terms of your choice, provided that the terms permit
|
|
||||||
modification of the work for the customer's own use and reverse
|
|
||||||
engineering for debugging such modifications.
|
|
||||||
|
|
||||||
You must give prominent notice with each copy of the work that the
|
|
||||||
Library is used in it and that the Library and its use are covered by
|
|
||||||
this License. You must supply a copy of this License. If the work
|
|
||||||
during execution displays copyright notices, you must include the
|
|
||||||
copyright notice for the Library among them, as well as a reference
|
|
||||||
directing the user to the copy of this License. Also, you must do one
|
|
||||||
of these things:
|
|
||||||
|
|
||||||
a) Accompany the work with the complete corresponding
|
|
||||||
machine-readable source code for the Library including whatever
|
|
||||||
changes were used in the work (which must be distributed under
|
|
||||||
Sections 1 and 2 above); and, if the work is an executable linked
|
|
||||||
with the Library, with the complete machine-readable "work that
|
|
||||||
uses the Library", as object code and/or source code, so that the
|
|
||||||
user can modify the Library and then relink to produce a modified
|
|
||||||
executable containing the modified Library. (It is understood
|
|
||||||
that the user who changes the contents of definitions files in the
|
|
||||||
Library will not necessarily be able to recompile the application
|
|
||||||
to use the modified definitions.)
|
|
||||||
|
|
||||||
b) Use a suitable shared library mechanism for linking with the
|
|
||||||
Library. A suitable mechanism is one that (1) uses at run time a
|
|
||||||
copy of the library already present on the user's computer system,
|
|
||||||
rather than copying library functions into the executable, and (2)
|
|
||||||
will operate properly with a modified version of the library, if
|
|
||||||
the user installs one, as long as the modified version is
|
|
||||||
interface-compatible with the version that the work was made with.
|
|
||||||
|
|
||||||
c) Accompany the work with a written offer, valid for at
|
|
||||||
least three years, to give the same user the materials
|
|
||||||
specified in Subsection 6a, above, for a charge no more
|
|
||||||
than the cost of performing this distribution.
|
|
||||||
|
|
||||||
d) If distribution of the work is made by offering access to copy
|
|
||||||
from a designated place, offer equivalent access to copy the above
|
|
||||||
specified materials from the same place.
|
|
||||||
|
|
||||||
e) Verify that the user has already received a copy of these
|
|
||||||
materials or that you have already sent this user a copy.
|
|
||||||
|
|
||||||
For an executable, the required form of the "work that uses the
|
|
||||||
Library" must include any data and utility programs needed for
|
|
||||||
reproducing the executable from it. However, as a special exception,
|
|
||||||
the materials to be 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.
|
|
||||||
|
|
||||||
It may happen that this requirement contradicts the license
|
|
||||||
restrictions of other proprietary libraries that do not normally
|
|
||||||
accompany the operating system. Such a contradiction means you cannot
|
|
||||||
use both them and the Library together in an executable that you
|
|
||||||
distribute.
|
|
||||||
|
|
||||||
7. You may place library facilities that are a work based on the
|
|
||||||
Library side-by-side in a single library together with other library
|
|
||||||
facilities not covered by this License, and distribute such a combined
|
|
||||||
library, provided that the separate distribution of the work based on
|
|
||||||
the Library and of the other library facilities is otherwise
|
|
||||||
permitted, and provided that you do these two things:
|
|
||||||
|
|
||||||
a) Accompany the combined library with a copy of the same work
|
|
||||||
based on the Library, uncombined with any other library
|
|
||||||
facilities. This must be distributed under the terms of the
|
|
||||||
Sections above.
|
|
||||||
|
|
||||||
b) Give prominent notice with the combined library of the fact
|
|
||||||
that part of it is a work based on the Library, and explaining
|
|
||||||
where to find the accompanying uncombined form of the same work.
|
|
||||||
|
|
||||||
8. You may not copy, modify, sublicense, link with, or distribute
|
|
||||||
the Library except as expressly provided under this License. Any
|
|
||||||
attempt otherwise to copy, modify, sublicense, link with, or
|
|
||||||
distribute the Library 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.
|
|
||||||
|
|
||||||
9. 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 Library or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Library (or any work based on the
|
|
||||||
Library), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Library or works based on it.
|
|
||||||
|
|
||||||
10. Each time you redistribute the Library (or any work based on the
|
|
||||||
Library), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute, link with or modify the Library
|
|
||||||
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 with
|
|
||||||
this License.
|
|
||||||
|
|
||||||
11. 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 Library at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Library 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 Library.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
12. If the distribution and/or use of the Library is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Library 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.
|
|
||||||
|
|
||||||
13. The Free Software Foundation may publish revised and/or new
|
|
||||||
versions of the Lesser 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 Library
|
|
||||||
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 Library does not specify a
|
|
||||||
license version number, you may choose any version ever published by
|
|
||||||
the Free Software Foundation.
|
|
||||||
|
|
||||||
14. If you wish to incorporate parts of the Library into other free
|
|
||||||
programs whose distribution conditions are incompatible with these,
|
|
||||||
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
|
|
||||||
|
|
||||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
|
||||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
|
||||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
|
||||||
OTHER PARTIES PROVIDE THE LIBRARY "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
|
|
||||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
|
||||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. 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 LIBRARY 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
|
|
||||||
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
|
||||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
||||||
DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
467
debian/changelog
vendored
467
debian/changelog
vendored
@ -1,3 +1,470 @@
|
|||||||
|
lxqt-session (2.2.0-0ubuntu1) questing; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
- Bump build dependencies.
|
||||||
|
* Update copyright file.
|
||||||
|
* Bump Standards-Version to 4.7.2, no changes needed.
|
||||||
|
|
||||||
|
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 10 Jul 2025 12:29:39 -0500
|
||||||
|
|
||||||
|
lxqt-session (2.1.1-0ubuntu2) plucky; urgency=medium
|
||||||
|
|
||||||
|
* Update Standards-Version to 4.7.1, no changes needed.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 21 Feb 2025 16:56:44 -0600
|
||||||
|
|
||||||
|
lxqt-session (2.1.1-0ubuntu1) plucky; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 11 Jan 2025 16:58:40 -0600
|
||||||
|
|
||||||
|
lxqt-session (2.1.0-0ubuntu1) plucky; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
- Bump build dependencies.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 15 Nov 2024 15:33:14 -0600
|
||||||
|
|
||||||
|
lxqt-session (2.0.0-0ubuntu1) oracular; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Update copyright file.
|
||||||
|
* Drop autostart-ux-polish.patch, applied upstream.
|
||||||
|
* Adjust dependencies.
|
||||||
|
* Bump Standards-Version to 4.7.0, no changes necessary.
|
||||||
|
|
||||||
|
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 15 Aug 2024 16:44:52 -0500
|
||||||
|
|
||||||
|
lxqt-session (1.4.0-0ubuntu3) noble; urgency=medium
|
||||||
|
|
||||||
|
* Copy over GTK 3 settings by default (LP: #2047705).
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 29 Dec 2023 12:36:24 -0600
|
||||||
|
|
||||||
|
lxqt-session (1.4.0-0ubuntu2) noble; urgency=medium
|
||||||
|
|
||||||
|
* Add an upstream patch polishing the autostart UX.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 22 Dec 2023 16:32:05 -0600
|
||||||
|
|
||||||
|
lxqt-session (1.4.0-0ubuntu1) noble; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Bump build dependencies.
|
||||||
|
* Update copyright years.
|
||||||
|
* Wraaaaaaaaaaaaaaaaaaaaaaaaaaaap.
|
||||||
|
* Explicitly depend on dbus-bin, since dbus-update-activation-
|
||||||
|
environment is now directly called.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Sun, 12 Nov 2023 19:06:27 -0600
|
||||||
|
|
||||||
|
lxqt-session (1.3.0-0ubuntu4) mantic; urgency=medium
|
||||||
|
|
||||||
|
* d/control: Fix the comments added in -0ubuntu3 so that dpkg can
|
||||||
|
process them properly. (Hotfix for a FTBFS bug)
|
||||||
|
|
||||||
|
-- Thomas Ward <teward@ubuntu.com> Sat, 23 Sep 2023 19:37:40 -0400
|
||||||
|
|
||||||
|
lxqt-session (1.3.0-0ubuntu3) mantic; urgency=medium
|
||||||
|
|
||||||
|
* Since the LXQt handler is limited in the portals it supports, add KDE and
|
||||||
|
GTK as fallbacks. The GTK fallback needs to be removed once KDE's is
|
||||||
|
better.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 22 Sep 2023 14:22:41 -0500
|
||||||
|
|
||||||
|
lxqt-session (1.3.0-0ubuntu2) mantic; urgency=high
|
||||||
|
|
||||||
|
* Add /usr/share/xdg-desktop-portal/lxqt-portals.conf, which makes XDG
|
||||||
|
portalling happy (LP: #2036098).
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Wed, 20 Sep 2023 22:45:49 -0500
|
||||||
|
|
||||||
|
lxqt-session (1.3.0-0ubuntu1) mantic; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Bump build dependencies.
|
||||||
|
* Remove reverse-applicable patch.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 11 Aug 2023 09:51:27 -0500
|
||||||
|
|
||||||
|
lxqt-session (1.2.0-3ubuntu2) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Lubuntuify the Maintainer field.
|
||||||
|
* Restore debian/watch to its original state.
|
||||||
|
* Bumepd Standards-Version to 4.6.2, no changes necessary.
|
||||||
|
* Overhauled copyright file.
|
||||||
|
|
||||||
|
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Wed, 15 Mar 2023 12:05:32 -0500
|
||||||
|
|
||||||
|
lxqt-session (1.2.0-3ubuntu1) lunar; urgency=low
|
||||||
|
|
||||||
|
* Merge from Debian unstable. Remaining changes:
|
||||||
|
- Ensure all proper paths are added to $XDG_CONFIG_DIRS
|
||||||
|
|
||||||
|
-- Gianfranco Costamagna <locutusofborg@debian.org> Tue, 14 Mar 2023 13:30:45 +0100
|
||||||
|
|
||||||
|
lxqt-session (1.2.0-3) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Merge to unstable.
|
||||||
|
|
||||||
|
-- ChangZhuo Chen (陳昌倬) <czchen@debian.org> Fri, 23 Dec 2022 00:31:41 +0800
|
||||||
|
|
||||||
|
lxqt-session (1.2.0-2) experimental; urgency=medium
|
||||||
|
|
||||||
|
* Add patch to use libproc2.
|
||||||
|
|
||||||
|
-- ChangZhuo Chen (陳昌倬) <czchen@debian.org> Sat, 17 Dec 2022 19:10:39 +0800
|
||||||
|
|
||||||
|
lxqt-session (1.2.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Remove unnecessary patch.
|
||||||
|
* Add Rules-Requires-Root: no.
|
||||||
|
* Fix d/lintian-overrides.
|
||||||
|
* Update d/watch for GitHub.
|
||||||
|
|
||||||
|
-- ChangZhuo Chen (陳昌倬) <czchen@debian.org> Sat, 17 Dec 2022 17:28:26 +0800
|
||||||
|
|
||||||
|
lxqt-session (1.2.0-0ubuntu4) lunar; urgency=medium
|
||||||
|
|
||||||
|
* debian/patches/d1db1c791195f3c0cf148e2be8bd46c5a51ca535.patch:
|
||||||
|
- Fix build with libproc2
|
||||||
|
|
||||||
|
-- Gianfranco Costamagna <locutusofborg@debian.org> Mon, 13 Mar 2023 08:52:34 +0100
|
||||||
|
|
||||||
|
lxqt-session (1.2.0-0ubuntu3) lunar; urgency=medium
|
||||||
|
|
||||||
|
* Change build dependency libprocps-dev -> libproc2-dev.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 10 Mar 2023 18:13:07 -0800
|
||||||
|
|
||||||
|
lxqt-session (1.2.0-0ubuntu2) lunar; urgency=medium
|
||||||
|
|
||||||
|
* No-change rebuild against libprocps2-0
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Fri, 10 Mar 2023 23:09:03 +0000
|
||||||
|
|
||||||
|
lxqt-session (1.2.0-0ubuntu1) lunar; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Fix the watch file, for real this time.
|
||||||
|
* Bump Standards-version to 4.6.1, no changes needed.
|
||||||
|
* Lubuntuify the package slightly, to make debhelper happy.
|
||||||
|
* Bump build dependencies in debian/control.
|
||||||
|
* Remove reverse-applicable patch.
|
||||||
|
* Update the only Lintian override.
|
||||||
|
* Less Rs.
|
||||||
|
* Briefly update copyright.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Fri, 18 Nov 2022 18:35:56 -0600
|
||||||
|
|
||||||
|
lxqt-session (1.1.1-2) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Revert previous improper uploaded changes. Reorganize
|
||||||
|
debian/experimental changes:
|
||||||
|
* debian/upstream/signing-key.asc: update.
|
||||||
|
* debian/copyright: update for new upstream changes.
|
||||||
|
* debian/control: build-deps on libprocps-dev and qtxdg-tools.
|
||||||
|
* debian/control: update descriptions for lxqt-session-l10n package.
|
||||||
|
* Added fix-bluetooth-saving-settings.patch: from upstream. See details:
|
||||||
|
https://github.com/lxqt/lxqt-session/pull/438.
|
||||||
|
* debian/lxqt-session.install: update for upstream changes.
|
||||||
|
* debian/lxqt-session-l10n.install: install into
|
||||||
|
/usr/share/lxqt/translations/lxqt-session.
|
||||||
|
* debian/rules: set -DPULL_TRANSLATIONS=OFF.
|
||||||
|
* debian/upstream/metadata: Change Repository-Browser field to
|
||||||
|
Repository-Browse.
|
||||||
|
* debian/rules: Remove unnecessary -Wl,--as-needed.
|
||||||
|
* debian/rules: Drop --fail-missing argument to dh_missing which is now
|
||||||
|
default in debhelper 13.
|
||||||
|
* debian/watch: fix uscan error.
|
||||||
|
|
||||||
|
-- Andrew Lee (李健秋) <ajqlee@debian.org> Thu, 27 Oct 2022 13:46:17 +0800
|
||||||
|
|
||||||
|
lxqt-session (1.1.1-1) experimental; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Bump debhelper compat to 13, no changes needed.
|
||||||
|
* Bump build dependencies.
|
||||||
|
* Bump Standards-version to 4.6.1, no changes needed.
|
||||||
|
* Drop some old Breaks/Replaces.
|
||||||
|
* Run wrap-and-sort.
|
||||||
|
* Pull some useful changes from Ubuntu so we can sync.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@debian.org> Wed, 13 Jul 2022 19:57:58 -0500
|
||||||
|
|
||||||
|
lxqt-session (1.1.1-0ubuntu2) kinetic; urgency=medium
|
||||||
|
|
||||||
|
* Add upstream patch fixing some bluetooth settings.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Mon, 06 Jun 2022 16:36:17 -0500
|
||||||
|
|
||||||
|
lxqt-session (1.1.1-0ubuntu1) kinetic; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
- Add qtxdg-tools as a build dependency.
|
||||||
|
* Bump build dependencies.
|
||||||
|
* Remove old Breaks/Replaces since we're past the LTS.
|
||||||
|
* Remove the old KDM config file, it is no longer shipped upstream.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Wed, 01 Jun 2022 16:44:07 -0500
|
||||||
|
|
||||||
|
lxqt-session (1.0.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release
|
||||||
|
* Bumped Standards-Version to 4.6.0, no changes needed
|
||||||
|
* Update debian/copyright
|
||||||
|
|
||||||
|
-- S. 7 <severusseptimius7@gmail.com> Thu, 25 Nov 2021 18:19:55 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.17.1-0ubuntu1) impish; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release 0.17.1
|
||||||
|
* Update debian/control
|
||||||
|
- Bump Standards-Version to 4.5.1
|
||||||
|
- Use liblxqt0-dev 0.17.0
|
||||||
|
- Extend lxqt-session-l10n package description
|
||||||
|
* Remove etc/xdg/openbox/lxqt-rc.xml from lxqt-session.install
|
||||||
|
* Update debian/copyright
|
||||||
|
|
||||||
|
-- apt-ghetto <apt-ghetto@protonmail.com> Sat, 14 Aug 2021 10:46:02 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.16.0-1ubuntu1) hirsute; urgency=medium
|
||||||
|
|
||||||
|
* New upstream version.
|
||||||
|
* Bump debhelper-compat requirement to 12
|
||||||
|
|
||||||
|
-- Raman Sarda <theloudspeaker@disroot.org> Mon, 22 Feb 2021 01:23:18 +0530
|
||||||
|
|
||||||
|
lxqt-session (0.16.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
[ Alf Gaida ]
|
||||||
|
* Switched to gbp
|
||||||
|
* Bumped Standards-Version to 4.4.0, no changes needed
|
||||||
|
|
||||||
|
[ Andrew Lee (李健秋) ]
|
||||||
|
* New upstream release.
|
||||||
|
|
||||||
|
-- Andrew Lee (李健秋) <ajqlee@debian.org> Wed, 06 Jan 2021 18:11:54 +0800
|
||||||
|
|
||||||
|
lxqt-session (0.15.0-0ubuntu1) groovy; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
- Remove reverse-applicable forward-process-output.patch.
|
||||||
|
- Update upstream signing key.
|
||||||
|
- Update LXQt build dependencies.
|
||||||
|
* Update Standards-version to 4.5.0, no changes needed.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Thu, 04 Jun 2020 14:14:17 -0500
|
||||||
|
|
||||||
|
lxqt-session (0.14.1-2ubuntu2) focal; urgency=medium
|
||||||
|
|
||||||
|
* Updated rules to match debian unstable.
|
||||||
|
|
||||||
|
-- Raman Sarda <theloudspeaker@lubuntu.me> Sun, 16 Feb 2020 00:21:11 +0530
|
||||||
|
|
||||||
|
lxqt-session (0.14.1-2ubuntu1) focal; urgency=low
|
||||||
|
|
||||||
|
* Merge from Debian unstable. Remaining changes:
|
||||||
|
- Using debhelper-compat.
|
||||||
|
- Keeping ubuntu-side tweaks to build deps.
|
||||||
|
- Added an upstream patch.
|
||||||
|
- Added upstream metadata.
|
||||||
|
|
||||||
|
-- Raman Sarda <theloudspeaker@lubuntu.me> Wed, 12 Feb 2020 16:51:54 +0530
|
||||||
|
|
||||||
|
lxqt-session (0.14.1-2) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Fixes memory leak in lxqt-session, lxqt-session allocates memory for process
|
||||||
|
output never read (Closes: #928804)
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Sat, 11 May 2019 15:30:08 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.14.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Cherry-picking new upstream version 0.14.1.
|
||||||
|
* Bumped minimum version liblxqt0-dev (>= 0.14.1~)
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Tue, 26 Feb 2019 02:58:20 +0100
|
||||||
|
|
||||||
|
lxqt-session (0.14.1-0ubuntu1) disco; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Run wrap-and-sort.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 09 Mar 2019 13:17:55 -0600
|
||||||
|
|
||||||
|
lxqt-session (0.14.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Cherry-picking new upstream version 0.14.0.
|
||||||
|
* Bumped Standards to 4.3.0, no changes needed
|
||||||
|
* Dropped d/compat, use debhelper-compat = 12, no changes needed
|
||||||
|
* Fixed years in d/copyright
|
||||||
|
* Bumped minimum version liblxqt0-dev (>= 0.14.0~)
|
||||||
|
* Removed obsolete PULL_TRANSLATIONS= OFF from dh_auto_configure
|
||||||
|
* Added l10n-package, moved from lxqt-l10n
|
||||||
|
* Removed 01-lxqt-session-x-window-manager.patch - we automagically search
|
||||||
|
for a WM in the fixed WM list
|
||||||
|
* Added d/upstream/metadata
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Sun, 27 Jan 2019 19:26:06 +0100
|
||||||
|
|
||||||
|
lxqt-session (0.14.0-0ubuntu1) disco; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
- Bump build dependencies.
|
||||||
|
* Bump Standards-version to 4.3.0, no changes needed.
|
||||||
|
* Bump debhelper compat to 12, no changes needed.
|
||||||
|
* Add new lxqt-session-l10n package.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 26 Jan 2019 00:49:14 -0600
|
||||||
|
|
||||||
|
lxqt-session (0.13.0-3) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Fixed typo in patch description
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Sat, 07 Jul 2018 19:32:29 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.13.0-2) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Use x-window-manager as default WM (Closes: #900430)
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Sat, 16 Jun 2018 11:00:23 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.13.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Cherry-picking new upstream version 0.13.0.
|
||||||
|
* Bumped build dependency liblxqt0-dev to >= 0.13.0~
|
||||||
|
* Removed patches - applied upstream
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Thu, 24 May 2018 23:56:43 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.13.0-0ubuntu2) cosmic; urgency=medium
|
||||||
|
|
||||||
|
* Ensure all proper paths are added to $XDG_CONFIG_DIRS.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Wed, 30 May 2018 17:35:31 -0500
|
||||||
|
|
||||||
|
lxqt-session (0.13.0-0ubuntu1) cosmic; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release.
|
||||||
|
* Update Vcs-* and Maintainer to Lubuntu values.
|
||||||
|
* Update build dependencies.
|
||||||
|
* Remove patches applied upstream.
|
||||||
|
|
||||||
|
-- Simon Quigley <tsimonq2@ubuntu.com> Tue, 22 May 2018 23:51:03 -0500
|
||||||
|
|
||||||
|
lxqt-session (0.12.0-6) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Bumped compat to 11
|
||||||
|
* Bumped debhelper to >= 11~
|
||||||
|
* Bumped Standards to 4.1.4, no changes needed
|
||||||
|
* Changed VCS fields for salsa
|
||||||
|
* Changed Homepage, Source and watch to lxqt
|
||||||
|
* Bumped years in copyright
|
||||||
|
* Removed trailing whitespaces in changelog
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Sat, 28 Apr 2018 16:29:59 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.12.0-5) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Bumped Standards to 4.1.2, no changes needed
|
||||||
|
* Removed branch from VCS fields
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Thu, 14 Dec 2017 22:58:32 +0100
|
||||||
|
|
||||||
|
lxqt-session (0.12.0-4) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Transition to unstable
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Tue, 05 Dec 2017 00:29:14 +0100
|
||||||
|
|
||||||
|
lxqt-session (0.12.0-3) experimental; urgency=medium
|
||||||
|
|
||||||
|
* Added upstream pull request for moving upstream configurations
|
||||||
|
to /usr/share/lxqt (Closes: #883033)
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Fri, 01 Dec 2017 21:54:55 +0100
|
||||||
|
|
||||||
|
lxqt-session (0.12.0-2) experimental; urgency=medium
|
||||||
|
|
||||||
|
* Added upstream pull request for improved xdg handling (Closes: #883032).
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Fri, 01 Dec 2017 21:53:35 +0100
|
||||||
|
|
||||||
|
lxqt-session (0.12.0-1) experimental; urgency=medium
|
||||||
|
|
||||||
|
* Cherry-picking upstream release 0.12.0.
|
||||||
|
* Switched to experimental
|
||||||
|
* Bumped Standards to 4.1.1 - no changes needed
|
||||||
|
* Bumped liblxqt dependency to >= 0.12.0
|
||||||
|
* Breaks and Replaces lxqt-common << 0.12.0
|
||||||
|
* Added dependency to lxqt-themes | lxqt-theme instead
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Tue, 24 Oct 2017 21:17:51 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.11.1-6) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Moved lxqt-qtplugin to dependencies (Closes: #870138)
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Sun, 06 Aug 2017 00:09:36 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.11.1-5) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Fixed qps dependency to [linux-any] (Closes: #842649)
|
||||||
|
* Recommends lxqt-notificationd (Closes: #866887)
|
||||||
|
* Indirectly depend on desktop-file-utils via liblxqt (Closes: #866899)
|
||||||
|
* Remove alternative gksu, see #867236 "Unsuitable for release in buster"
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Wed, 05 Jul 2017 02:25:34 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.11.1-4) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Added pcmanfm-qt to Recommends - the session should recommend at least one
|
||||||
|
application that is able to paint/manage the desktop.
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Sun, 02 Jul 2017 16:01:48 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.11.1-3) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Bumped Standards to 4.0.0 - no changes needed
|
||||||
|
* Added to Recommends: lxqt-qtplugin and lxqt-policykit
|
||||||
|
(Closes: #866344)
|
||||||
|
* Added to Recommends: lxqt-config (Closes: #866346)
|
||||||
|
* Added to Recommends: lxqt-powermanagement (Closes: #866651)
|
||||||
|
* Added to Recommends: lxqt-sudo | gksu (Closes: #866650)
|
||||||
|
One graphical sudo should be enough on a system - we leave out
|
||||||
|
the ancient kdesudo for a reason.
|
||||||
|
* Added to Recommends: qps and qlipper (Closes: #866648)
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Fri, 30 Jun 2017 19:00:49 +0200
|
||||||
|
|
||||||
|
lxqt-session (0.11.1-2) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Recommend a screen-saver:
|
||||||
|
xscreensaver | gnome-screensaver | light-locker | i3lock | suckless-tools
|
||||||
|
(Closes: #824857)
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Mon, 02 Jan 2017 18:52:28 +0100
|
||||||
|
|
||||||
|
lxqt-session (0.11.1-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Cherry-picking upstream release 0.11.1.
|
||||||
|
* Removed some build dependencies:
|
||||||
|
-cmake
|
||||||
|
-libqt5xdg-dev
|
||||||
|
-libqt5xdgiconloader-dev
|
||||||
|
-pkg-config
|
||||||
|
-qttools5-dev
|
||||||
|
-qttools5-dev-tools
|
||||||
|
* Bumped build dependency liblxqt0-dev (>= 0.11.1)
|
||||||
|
* Bumped years in d/copyright
|
||||||
|
* Removed deleted files and BSD-License from d/copyright
|
||||||
|
|
||||||
|
-- Alf Gaida <agaida@siduction.org> Mon, 02 Jan 2017 16:41:12 +0100
|
||||||
|
|
||||||
lxqt-session (0.11.0-2) unstable; urgency=medium
|
lxqt-session (0.11.0-2) unstable; urgency=medium
|
||||||
|
|
||||||
* Cherry-picking upstream release 0.11.0
|
* Cherry-picking upstream release 0.11.0
|
||||||
|
1
debian/compat
vendored
1
debian/compat
vendored
@ -1 +0,0 @@
|
|||||||
10
|
|
72
debian/control
vendored
72
debian/control
vendored
@ -1,36 +1,53 @@
|
|||||||
Source: lxqt-session
|
Source: lxqt-session
|
||||||
Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
|
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
||||||
|
Original-Maintainer: LXQt Packaging Team <pkg-lxqt-devel@lists.alioth.debian.org>
|
||||||
Uploaders: Alf Gaida <agaida@siduction.org>,
|
Uploaders: Alf Gaida <agaida@siduction.org>,
|
||||||
ChangZhuo Chen (陳昌倬) <czchen@debian.org>,
|
ChangZhuo Chen (陳昌倬) <czchen@debian.org>,
|
||||||
Andrew Lee (李健秋) <ajqlee@debian.org>
|
Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||||
Section: x11
|
Section: x11
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Build-Depends: debhelper (>= 10),
|
Build-Depends: debhelper-compat (= 13),
|
||||||
cmake (>= 3.0.2),
|
layer-shell-qt (>= 6.0.0),
|
||||||
libkf5windowsystem-dev,
|
libkf6windowsystem-dev (>= 6.0.0),
|
||||||
liblxqt0-dev (>= 0.11.0),
|
liblayershellqtinterface-dev (>= 6.0.0),
|
||||||
libqt5svg5-dev,
|
liblxqt2-dev (>= 2.2.0),
|
||||||
libqt5x11extras5-dev,
|
libproc2-dev,
|
||||||
libqt5xdg-dev (>= 2.0.0),
|
|
||||||
libqt5xdgiconloader-dev (>= 2.0.0),
|
|
||||||
libudev-dev [linux-any],
|
libudev-dev [linux-any],
|
||||||
libx11-dev,
|
libx11-dev,
|
||||||
pkg-config,
|
qt6-svg-dev (>= 6.6.0),
|
||||||
qttools5-dev,
|
qt6-wayland-dev (>= 6.6.0),
|
||||||
qttools5-dev-tools,
|
qtxdg-tools (>= 4.2.0),
|
||||||
xdg-user-dirs
|
xdg-user-dirs
|
||||||
Standards-Version: 3.9.8
|
Standards-Version: 4.7.2
|
||||||
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/lxqt-session.git/?h=debian/sid
|
Vcs-Browser: https://git.lubuntu.me/Lubuntu/lxqt-session-packaging
|
||||||
Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/lxqt-session.git -b debian/sid
|
Vcs-Git: https://git.lubuntu.me/Lubuntu/lxqt-session-packaging.git
|
||||||
Homepage: https://github.com/lxde/lxqt-session
|
Debian-Vcs-Browser: https://salsa.debian.org/lxqt-team/lxqt-session
|
||||||
|
Debian-Vcs-Git: https://salsa.debian.org/lxqt-team/lxqt-session.git
|
||||||
|
Homepage: https://github.com/lxqt/lxqt-session
|
||||||
|
Rules-Requires-Root: no
|
||||||
|
|
||||||
Package: lxqt-session
|
Package: lxqt-session
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${misc:Depends},
|
Depends: lxqt-qtplugin,
|
||||||
${shlibs:Depends},
|
lxqt-themes | lxqt-theme,
|
||||||
lxqt-common,
|
x11-xkb-utils,
|
||||||
x11-xkb-utils
|
${misc:Depends},
|
||||||
Recommends: lxqt-session-l10n
|
${shlibs:Depends}
|
||||||
|
Recommends: dbus-bin,
|
||||||
|
lxqt-config,
|
||||||
|
lxqt-notificationd,
|
||||||
|
lxqt-policykit,
|
||||||
|
lxqt-powermanagement,
|
||||||
|
lxqt-session-l10n,
|
||||||
|
lxqt-sudo,
|
||||||
|
pcmanfm-qt,
|
||||||
|
qlipper,
|
||||||
|
qps [linux-any],
|
||||||
|
# xdg-desktop-portal-gtk should be removed soon in the future.
|
||||||
|
xdg-desktop-portal-gtk,
|
||||||
|
xdg-desktop-portal-kde,
|
||||||
|
xdg-desktop-portal-lxqt,
|
||||||
|
xscreensaver | gnome-screensaver | light-locker | i3lock | suckless-tools
|
||||||
Provides: x-session-manager
|
Provides: x-session-manager
|
||||||
Description: session manager component for LXQt
|
Description: session manager component for LXQt
|
||||||
LXQt is an advanced, easy-to-use, and fast desktop environment based on
|
LXQt is an advanced, easy-to-use, and fast desktop environment based on
|
||||||
@ -39,3 +56,16 @@ Description: session manager component for LXQt
|
|||||||
LXQt also works fine with less powerful machines.
|
LXQt also works fine with less powerful machines.
|
||||||
.
|
.
|
||||||
This package contain the session manager component.
|
This package contain the session manager component.
|
||||||
|
|
||||||
|
Package: lxqt-session-l10n
|
||||||
|
Architecture: all
|
||||||
|
Multi-Arch: foreign
|
||||||
|
Section: localization
|
||||||
|
Depends: qt6-translations-l10n, ${misc:Depends}
|
||||||
|
Description: Language package for lxqt-session
|
||||||
|
LXQt is an advanced, easy-to-use, and fast desktop environment based on
|
||||||
|
Qt technologies. It has been tailored for users who value simplicity,
|
||||||
|
speed, and an intuitive interface. Unlike most desktop environments,
|
||||||
|
LXQt also works fine with less powerful machines.
|
||||||
|
.
|
||||||
|
This package contains the l10n files needed by lxqt-session.
|
||||||
|
110
debian/copyright
vendored
110
debian/copyright
vendored
@ -1,59 +1,32 @@
|
|||||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
Upstream-Name: lxqt-session
|
Upstream-Name: lxqt-session
|
||||||
Source: https://github.com/lxde/lxqt-session
|
Source: https://github.com/lxqt/lxqt-session
|
||||||
|
|
||||||
Files: *
|
Files: *
|
||||||
Copyright: 2010-2012 Razor team
|
Copyright: 2010-2025 LXQt team
|
||||||
2012-2016 LXQt team
|
2015-2021 Palo Kisa <palo.kisa@gmail.com>
|
||||||
|
2010-2018 Petr Vanek <petr@scribus.info>
|
||||||
|
2010-2016 Paulo Lieuthier <paulolieuthier@gmail.com>
|
||||||
|
2015 Luís Pereira <luis.artur.pereira@gmail.com>
|
||||||
|
2010-2014 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||||
|
2010-2013 Razor team
|
||||||
|
2011-2012 Alec Moskvin <alecm@gmx.com>
|
||||||
|
2010-2011 Alexander Sokoloff <sokoloff.a@gmail.com>
|
||||||
|
Christopher "VdoP" Regali
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
|
|
||||||
Files: cmake/FindUDev.cmake
|
Files: lxqt-session/src/numlock.cpp
|
||||||
Copyright: 2010 Rafael Fernández López <ereslibre@kde.org>
|
Copyright: 2000-2001, Lubos Lunak <l.lunak@kde.org>
|
||||||
License: BSD-3-Clause
|
2001, Oswald Buddenhagen <ossi@kde.org>
|
||||||
|
License: MIT
|
||||||
Files: lxqt-config-session/autostartedit.*
|
Comment: Some code is taken from numlockx
|
||||||
lxqt-config-session/autostartitem.*
|
|
||||||
lxqt-config-session/autostartpage.*
|
|
||||||
lxqt-config-session/modulemodel.*
|
|
||||||
Copyright: 2011-2012 Alec Moskvin <alecm@gmx.com>
|
|
||||||
License: LGPL-2.1+
|
|
||||||
|
|
||||||
Files: lxqt-config-session/basicsettings.*
|
|
||||||
lxqt-config-session/defaultappspage.*
|
|
||||||
lxqt-config-session/environmentpage.*
|
|
||||||
lxqt-config-session/main.cpp
|
|
||||||
lxqt-config-session/sessionconfigwindow.*
|
|
||||||
Copyright: 2010-2016 LXQt team
|
|
||||||
License: LGPL-2.1+
|
|
||||||
|
|
||||||
Files: lxqt-leave/leavedialog.*
|
|
||||||
Copyright: 2010-2016 LXQt team
|
|
||||||
License: LGPL-2.1+
|
|
||||||
|
|
||||||
Files: lxqt-session/src/UdevNotifier.*
|
|
||||||
lxqt-session/src/lxqtmodman.*
|
|
||||||
lxqt-session/src/sessiondbusadaptor.h
|
|
||||||
lxqt-session/src/windowmanager.*
|
|
||||||
lxqt-session/src/wmselectdialog.*
|
|
||||||
Copyright: 2010-2016 LXQt team
|
|
||||||
License: LGPL-2.1+
|
|
||||||
|
|
||||||
Files: lxqt-session/src/sessionapplication.*
|
|
||||||
Copyright: 2014 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
|
||||||
License: LGPL-2.1+
|
|
||||||
|
|
||||||
Files: lxqt-session/src/lockscreenmanager.*
|
|
||||||
Copyright: 2016 Paulo Lieuthier <paulolieuthier@gmail.com>
|
|
||||||
License: LGPL-2.1+
|
|
||||||
|
|
||||||
Files: lxqt-session/src/log.*
|
|
||||||
Copyright: 2016 Palo Kisa <palo.kisa@gmail.com>
|
|
||||||
License: LGPL-2.1+
|
|
||||||
|
|
||||||
Files: debian/*
|
Files: debian/*
|
||||||
Copyright: 2014-2016 Alf Gaida <agaida@siduction.org>
|
Copyright: 2021-2025 Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
|
||||||
2015 Andrew Lee (李健秋) <ajqlee@debian.org>
|
2014-2019 Alf Gaida <agaida@siduction.org>
|
||||||
2015 ChangZhuo Chen (陳昌倬) <czchen@debian.org>
|
2015 Andrew Lee (李健秋) <ajqlee@debian.org>
|
||||||
|
2015 ChangZhuo Chen (陳昌倬) <czchen@debian.org>
|
||||||
|
2025 Aaron Rainbolt <arraybolt3@ubuntu.com>
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
|
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
@ -71,27 +44,22 @@ License: LGPL-2.1+
|
|||||||
Public License version 2.1 can be found in
|
Public License version 2.1 can be found in
|
||||||
"/usr/share/common-licenses/LGPL-2.1".
|
"/usr/share/common-licenses/LGPL-2.1".
|
||||||
|
|
||||||
License: BSD-3-Clause
|
License: MIT
|
||||||
Redistribution and use in source and binary forms, with or without
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
modification, are permitted provided that the following conditions
|
a copy of this software and associated documentation files (the
|
||||||
are met:
|
"Software"), to deal in the Software without restriction, including
|
||||||
1. Redistributions of source code must retain the above copyright
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
notice, this list of conditions and the following disclaimer.
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
2. Redistributions in binary form must reproduce the above copyright
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
notice, this list of conditions and the following disclaimer in the
|
the following conditions:
|
||||||
documentation and/or other materials provided with the distribution.
|
|
||||||
3. Neither the name of the University nor the names of its contributors
|
|
||||||
may be used to endorse or promote products derived from this software
|
|
||||||
without specific prior written permission.
|
|
||||||
.
|
.
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
The above copyright notice and this permission notice shall be included
|
||||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
in all copies or substantial portions of the Software.
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
.
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HOLDERS OR
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
6
debian/gbp.conf
vendored
Normal file
6
debian/gbp.conf
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
debian-branch = debian/sid
|
||||||
|
upstream-branch = upstream/latest
|
||||||
|
pristine-tar = True
|
||||||
|
compression = xz
|
||||||
|
|
2
debian/lintian-overrides
vendored
2
debian/lintian-overrides
vendored
@ -1,2 +1,2 @@
|
|||||||
# category LXQt in not yet in freedesktop specs - no bug
|
# category LXQt in not yet in freedesktop specs - no bug
|
||||||
lxqt-session: desktop-entry-invalid-category LXQt usr/share/applications/lxqt-*.desktop
|
lxqt-session: desktop-entry-invalid-category LXQt *
|
||||||
|
3
debian/lxqt-session-l10n.install
vendored
Normal file
3
debian/lxqt-session-l10n.install
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
usr/share/lxqt/translations/lxqt-config-session
|
||||||
|
usr/share/lxqt/translations/lxqt-leave
|
||||||
|
usr/share/lxqt/translations/lxqt-session
|
22
debian/lxqt-session.install
vendored
Normal file
22
debian/lxqt-session.install
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
etc/xdg/autostart/lxqt-xscreensaver-autostart.desktop
|
||||||
|
usr/bin/lxqt-config-session
|
||||||
|
usr/bin/lxqt-leave
|
||||||
|
usr/bin/lxqt-session
|
||||||
|
usr/bin/startlxqt
|
||||||
|
usr/share/applications/lxqt-config-session.desktop
|
||||||
|
usr/share/applications/lxqt-hibernate.desktop
|
||||||
|
usr/share/applications/lxqt-leave.desktop
|
||||||
|
usr/share/applications/lxqt-lockscreen.desktop
|
||||||
|
usr/share/applications/lxqt-logout.desktop
|
||||||
|
usr/share/applications/lxqt-reboot.desktop
|
||||||
|
usr/share/applications/lxqt-shutdown.desktop
|
||||||
|
usr/share/applications/lxqt-suspend.desktop
|
||||||
|
usr/share/lxqt/lxqt.conf
|
||||||
|
usr/share/lxqt/session.conf
|
||||||
|
usr/share/lxqt/waylandwindowmanagers.conf
|
||||||
|
usr/share/lxqt/windowmanagers.conf
|
||||||
|
usr/share/man/man1/lxqt-config-session.1
|
||||||
|
usr/share/man/man1/lxqt-leave.1
|
||||||
|
usr/share/man/man1/lxqt-session.1
|
||||||
|
usr/share/man/man1/startlxqt.1
|
||||||
|
usr/share/xsessions/lxqt.desktop
|
4
debian/lxqt-session.lintian-overrides
vendored
Normal file
4
debian/lxqt-session.lintian-overrides
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# This is expected
|
||||||
|
lxqt-session: desktop-entry-lacks-keywords-entry [usr/share/*/*.desktop]
|
||||||
|
lxqt-session: desktop-entry-lacks-icon-entry [usr/share/*/*.desktop]
|
||||||
|
lxqt-session: desktop-entry-invalid-category LXQt [usr/share/*/*.desktop]
|
25
debian/patches/ensure-necessary-paths-are-pulled-from.patch
vendored
Normal file
25
debian/patches/ensure-necessary-paths-are-pulled-from.patch
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
Description: startlxqt: Ensure all paths are added to $XDG_CONFIG_DIRS
|
||||||
|
If we expect to pull settings from /usr/share and /etc, let's make sure that
|
||||||
|
these are in $XDG_CONFIG_DIRS before we try to pull from them.
|
||||||
|
.
|
||||||
|
Upstream wouldn't accept this; see the pull request for details.
|
||||||
|
Author: Simon Quigley <tsimonq2@ubuntu.com>
|
||||||
|
Bug: https://github.com/lxqt/lxqt-session/pull/126
|
||||||
|
Last-Update: 2018-05-30
|
||||||
|
--- a/startlxqt.in
|
||||||
|
+++ b/startlxqt.in
|
||||||
|
@@ -26,9 +26,11 @@ export XDG_DATA_DIRS
|
||||||
|
if [ -z "$XDG_CONFIG_DIRS" ]; then
|
||||||
|
export XDG_CONFIG_DIRS="@PREDEF_XDG_CONFIG_DIRS@"
|
||||||
|
else
|
||||||
|
- if ! contains "$XDG_CONFIG_DIRS" '@LXQT_ETC_XDG_DIR@'; then
|
||||||
|
- XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:@LXQT_ETC_XDG_DIR@"
|
||||||
|
- fi
|
||||||
|
+ for directory in "/etc" "@LXQT_ETC_XDG_DIR@" "/usr/share"; do
|
||||||
|
+ if ! contains "$XDG_CONFIG_DIRS" "$directory"; then
|
||||||
|
+ XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS:$directory"
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$XDG_CACHE_HOME" ]; then
|
34
debian/patches/gtk-3-configuration-copy.patch
vendored
Normal file
34
debian/patches/gtk-3-configuration-copy.patch
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
Description: Copy over GTK 3 settings from XDG_CONFIG_DIRS
|
||||||
|
This is a workaround for GTK 3 settings not being applied by default from XDG.
|
||||||
|
Ideally, all desktop environments would do this, and it would be fixed in GTK itself.
|
||||||
|
Author: Simon Quigley <tsimonq2@ubuntu.com>
|
||||||
|
Origin: vendor
|
||||||
|
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/2047705
|
||||||
|
Forwarded: no
|
||||||
|
Last-Update: 2023-12-29
|
||||||
|
---
|
||||||
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||||
|
--- a/startlxqt.in
|
||||||
|
+++ b/startlxqt.in
|
||||||
|
@@ -32,6 +32,21 @@ else
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
+# Handle GTK 3 configuration files
|
||||||
|
+echo "$XDG_CONFIG_DIRS" | tr ':' '\n' | while read -r dir; do
|
||||||
|
+ dir_path="$dir/gtk-3.0/"
|
||||||
|
+ if [ -d "$dir_path" ]; then
|
||||||
|
+ mkdir -p "$HOME/.config/gtk-3.0"
|
||||||
|
+ for file in "$dir_path"*; do
|
||||||
|
+ if [ -f "$file" ]; then
|
||||||
|
+ target_file="$HOME/.config/gtk-3.0/$(basename "$file")"
|
||||||
|
+ if [ ! -f "$target_file" ]; then
|
||||||
|
+ cp "$file" "$target_file"
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
+ done
|
||||||
|
+ fi
|
||||||
|
+done
|
||||||
|
|
||||||
|
if [ -z "$XDG_CACHE_HOME" ]; then
|
||||||
|
export XDG_CACHE_HOME="$HOME/.cache"
|
2
debian/patches/series
vendored
Normal file
2
debian/patches/series
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
ensure-necessary-paths-are-pulled-from.patch
|
||||||
|
gtk-3-configuration-copy.patch
|
7
debian/rules
vendored
7
debian/rules
vendored
@ -4,7 +4,6 @@
|
|||||||
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
|
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
|
||||||
export LC_ALL=C.UTF-8
|
export LC_ALL=C.UTF-8
|
||||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
|
||||||
|
|
||||||
ifeq ($(DEB_HOST_ARCH_OS),linux)
|
ifeq ($(DEB_HOST_ARCH_OS),linux)
|
||||||
CMAKE_ARGS += -DWITH_LIBUDEV=ON
|
CMAKE_ARGS += -DWITH_LIBUDEV=ON
|
||||||
@ -17,7 +16,7 @@ endif
|
|||||||
|
|
||||||
override_dh_auto_configure:
|
override_dh_auto_configure:
|
||||||
dh_auto_configure -- \
|
dh_auto_configure -- \
|
||||||
-DPULL_TRANSLATIONS=OFF\
|
-DPULL_TRANSLATIONS=OFF \
|
||||||
-DUPDATE_TRANSLATIONS=OFF\
|
-DUPDATE_TRANSLATIONS=OFF \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo\
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
$(CMAKE_ARGS)
|
$(CMAKE_ARGS)
|
||||||
|
12
debian/salsa-ci.yml
vendored
Normal file
12
debian/salsa-ci.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# For more information on what jobs are run see:
|
||||||
|
# https://salsa.debian.org/salsa-ci-team/pipeline
|
||||||
|
#
|
||||||
|
# To enable the jobs, go to your repository (at salsa.debian.org)
|
||||||
|
# and click over Settings > CI/CD > Expand (in General pipelines).
|
||||||
|
# In "Custom CI config path" write debian/salsa-ci.yml and click
|
||||||
|
# in "Save Changes". The CI tests will run after the next commit.
|
||||||
|
---
|
||||||
|
include:
|
||||||
|
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
|
||||||
|
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
|
||||||
|
|
2
debian/source/lintian-overrides
vendored
Normal file
2
debian/source/lintian-overrides
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# We will not be forwarding this patch
|
||||||
|
lxqt-session source: patch-not-forwarded-upstream [debian/patches/gtk-3-configuration-copy.patch]
|
6
debian/upstream/metadata
vendored
Normal file
6
debian/upstream/metadata
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Name: lxqt-session
|
||||||
|
Bug-Database: https://github.com/lxqt/lxqt-session/issues
|
||||||
|
Bug-Submit: https://github.com/lxqt/lxqt-session/issues/new
|
||||||
|
Changelog: https://github.com/lxqt/lxqt-session/blob/master/CHANGELOG
|
||||||
|
Repository: https://github.com/lxqt/lxqt-session
|
||||||
|
Repository-Browse: https://github.com/lxqt/lxqt-session
|
96
debian/upstream/signing-key.asc
vendored
96
debian/upstream/signing-key.asc
vendored
@ -1,50 +1,52 @@
|
|||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
mQINBFXQeMMBEACif4+9pTrC6uNmRng0ZbzLh7p3cazmbnp2YFgDQDJZ7ZNmebxy
|
mQINBF6cxrwBEADfl3ydxNfLBbWGPesXty2baQgixZ3D6aCxadI2kX+aikmT8rd0
|
||||||
ngRuRhjGuDcFAL/37BwJnrBpfZFK9ljoH4Fo5Jm9cOELaTy7AIcEiV9dKMyrKF1E
|
ttDKN18cXV52Ssxnj0qhgf4hwnu/b0be6BzqSEyGM+UQR3X2CYpxrMakfW32Q18K
|
||||||
C76d8jHVuzuPbI92DkFdLZAdk+qjrrAy0x43PvUd+aaBGLcFs1ZMk7gOvElc2d95
|
X5ec0RPR2ucBq9G0r9t6FYC8FkJ4uQUU3xxrLW3z302S0Makjgzm8BV9WrFQ7oFF
|
||||||
zWWSp5anjukmGbp+EsStnWJkF6VHj56qmklfYy5ioiVBOSpXo/RsACAcIlz8C8A1
|
uJQj0BHbHYC4RyaZb2AfxY4Y92BPGTjtGekWqgw6vEXCCnvAbGYVQzvxZt3nw21/
|
||||||
d4tNMiB2uF2OrUfrL8DD6m3nBqep+AYbIQrxMl9kUQH3I33e9kH/L+SHQyE6phS8
|
1YmV4g7xhGFQPbOf9v3ejFUJeJIGzuJf5NAh7kvfCdUBAGYH0gnj0GpOve4ftnaG
|
||||||
Czq06WjV4TcJ9VWxm7hQCNLYSxhZYYr1AW45lS5+xmfBOq2qeLgvjbFxa8PPrsp6
|
sAId2CQwm3oYF4Tu7yBPTOBpkaKkNaT+UdwTyeKERuCZ9ocZWX++/YF9ItRkJ5mM
|
||||||
Bqgt8MjwUkXjU5IB7YulUBvFU2l0MJZWDBuNy0oNtCe1cU3JyIqLKjvzQQQ9eD5L
|
zoP1GluWn2atNWpRh/K97gyAGgr2fSmrAA4d1JrVbMujZAHoHAOKwJKqX9jPziPZ
|
||||||
o3Ul704TLHz0z+67Rxh05Mi4JvyFMjnooSJkNH8/7yXoBN0ZGOh1/5zMU1gK5bmP
|
BFHfhcIOzG3ZhXAuumHsd7uwfPBVt20g+G+cOjBghbSSu9EOtMkAZl1g3ybvZixu
|
||||||
6hKgis2exSZNIS74mF6/PqGgcwk3PyI4T3keUQoNPj11M2EznLHxY19QZfQ5oMed
|
Jtxa5exZWEmU7vtytEb8eq9Dj5XcGoTDbErE2RpJ/20HPzhyRKg9RN4iGS+0OiHS
|
||||||
8xOlHKjpcm8PYMB4gduNXlV7gI9h7UxuC5GuPiP2lmM6wUyHu48divxDk5UYgPEC
|
oRbDi5IEOizvQjp2bsBmfa3rsoDSOqF2pevp+u8I56I6bU1GFpxxNC5IGvgo2Q79
|
||||||
xlPI2wHCNDsuy0EruCYIvrMSZfpYCCSrmXiOORBLO5qXkauILLkJarHqjQARAQAB
|
quz0oIk5hs3eLlUdEYsLGwR6pWJaJyf36vuDsq7iLrLyvHI5irAowO4r1QARAQAB
|
||||||
tCBBbGYgR2FpZGEgPGFnYWlkYUBzaWR1Y3Rpb24ub3JnPokCOAQTAQIAIgUCVdB4
|
tCVQZWRyYW0gUG91cmFuZyA8dHN1amFuMjAwMEBnbWFpbC5jb20+iQJOBBMBCAA4
|
||||||
wwIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQQsnI069epeOT2xAAgSHf
|
FiEEGd/fOleb1QnbtXLYvnkwB60i334FAl6cxrwCGwMFCwkIBwIGFQoJCAsCBBYC
|
||||||
41103cnElGf6TokPl4J6hdRPy2CUAjmBtMfr8eajYvGDGgnmsh9AGYGURjfFVCCf
|
AwECHgECF4AACgkQvnkwB60i335f9RAAgRpn8gUa/l10UkVAnpM2Cz0MuNMwwCOq
|
||||||
Ag+8b6nF3xg03UmgsuSO8H78HGv9kKzF9aHmLt+SXq3jUX+LnIkFHErZWjFAKdJr
|
IfVnuZuPBtYYiTU5Su++/aPZe3fF5B4v61F+XjNi7qeVL2t52X3jZ/iIx9Syasb+
|
||||||
luu1j6ltxLe9PQljxZnugzMaUbW8eEPKvcriiDn3S4/DtikW/jpGA0MTY4ZWs9pZ
|
vDAIfQ5t6lKXvOptWxf6vteOg6CHbXwpGHbPjUkUS2vQwRikjBnR0SnkrMoXtgSX
|
||||||
L/6iRRH99L2X/cWO4sCgDXCTt4oK0f5OvwiuCoVOM+PYoIm31JICCKOlqamkCn7d
|
amPFqsitNrOhEJfeDfo0NzKESZuliWrCFt2v8c5q18G8cCZAvPLBlGuwRl58cDep
|
||||||
2KH3nsy0v7tXgnrnb/zr8jVGsZLzUE51AFOzb5Ec74/2SAq8X4gbTppttLXEIooq
|
3EIibMI/9MUSJbKoiHlK+LcHtG7BQTNis/e7Pe1PkRmExfhxe1lNajtOx8FO72Tq
|
||||||
nbepitW/PePkPY5gpfwHtFbl88qFnir+ABMefqRZkzeh0tsxJVLVHGP1KZykXpv7
|
B6zY6drippM9VaIc1M+zp9BRpsFu8whOmapCqlXHRgAK8xTdQRIGInQFqLWPOxSC
|
||||||
96A6Q1h7Zo9Ny7WwN5Xl02g35LVCaPyzd3A8A4315uMuP3iziq57UktKqh9d5S3t
|
f0B6N+EvQvgkyFQ1rW+u91OJBma46uKkhrwf+mDttVRncaIAkgE6e6pqm18yIPFk
|
||||||
jfK7e9UfFQZBLfxn2sNPsjdYSNUQp/PXTTk/599h359WVuUIR866T8K7N7EEon3p
|
D42rt/yHcOl+2qkcJS3gPcg5UvlCzqOwg1rKZQIk+TcPuDx3r2UghDEYZN9X6vw3
|
||||||
qLItZljQ9Nmr/yGwKi9iQgi2LtZj5KUcF1zBLzZKf95FvoqSZqBXdFSjm+eYGaCH
|
zCBufr7ygZNf4tkbnVARFWTR4GzyCseFkWgOVZL9DccAhs8NeMy1WLkUzB75adeR
|
||||||
Q2IBnhyP92lEknSK9ystUJXmY69tQKBFqJxScwaS+7a/rfLKssQjSWxqk+SX4QeW
|
3LONmEL7xOI8FuknKY4e6EcWhmstNIDgXfRe0hwO0VBdW3unoZC/K2ZM/ZuZyMdK
|
||||||
e9z9FUpo71bq0Zkc/M9aOCoEEmhg4Ob/JWy08oC5Ag0EVdB4wwEQAKZDCc/C41y0
|
TFjvYJrNewmymKge68wo0054bGZn8oz17i2AosJz7kW+ITsxmxhVcpfl4bav9Neq
|
||||||
omLFCAJybvHiFScM+jOpyGpQvceoviEhIT7h1br/pnSEMkgPQEDPWJGtKueg1/94
|
RpQwhnhK9bC5Ag0EXpzGvAEQANbeRHFbpgQVIqV9WVOVnTj4FIqrTPTPKKa02vJA
|
||||||
sXTH24uefr3Y6JdZoBtprxl4JXUoOndgq1QH1xuUsy3/9YWU8Qboy9j8a8w0oCDE
|
7tGpgFapgvjdxnMxJfV6wuwOBUUFLR7DrXlV8EVFAYc5qTIeSQXvJsWw6gQ3+f0D
|
||||||
T8Z03KHCwqzD3K+44jhmhF+0eLoaaY8ohS8ziP+DcFKVHyatmS5yCCdjVrj6PxMp
|
z13oGOhZPBIzIKnV/MZI/jhIio8kSPWAuM5hR2X9Hvw3/CLo+H+hZZ6cFYoCxrQS
|
||||||
uy/y5SXT1kmiPdVAIzQlM5DlN6o46TV+BH0pPvVYjtwf31o0FckJxy5S1v0koCNB
|
tTzcKMkdQizLLa+WNbqUSxg6I/P5k/smUDY9gKW7RtI5t/PupA3WTnsVD6CYWa3Q
|
||||||
vX2b7tTDPKzn8G18eUVhGoUTZBUCp1gg36wJ0YY4xgZ9vI/xDCeHeAkyvGtaTAoy
|
c1O/1mUgqT6nQ5N9KCPpjZQRT6D6eIMmePtS85z4PPeYMJxPsKRYWPGRxKhCSdZl
|
||||||
qP4rHoUO5KVRSDh7frSlrdbLGWHaQwOhcqoKd4qP/164wHPGkgHL1vztdOc7l1wx
|
/0wsC8aRtmwYT729e0ZgTAmUnj+rQp5hboF/ZPFjIoXR9G+0HnoY0a/nqVO4lUON
|
||||||
q3gMh2uwmJR0NRrw4WVuaIqL9lEbGBNijlmGsuqXfsMRhc/qoqgVDWvrcCtEoOwl
|
AV25GnMFGVyiHHlbH/0gboywwnzEg8BZbk+Z/61oOzBIW09sfG8fn8bsbkpL+nHf
|
||||||
TONGobW3jpCCjpa9SeGNjxuY6IVLn0lfX4hItNVY9sFA+H+yj4uBQ7zsmMUXafxt
|
Mi/Vauge6wSfw7I5AfSiwrSDNHmKVsu39koWV6JGxEeFr2MffF+CuaoJCNOr/ZII
|
||||||
Yllm0f98yGNg5lnJg4bLOYu3IkpogUKNA3qkZ+6vRtwH70/bJGp7qdx/3G4W5dMX
|
SYR5ku3Y/lMKyUH1Oas0RWzFrdRcInqYK90A0x083zP4V445MvCwbRPzQAkm9wOP
|
||||||
asd/rJjdELW+R/NVULAmK1ETSklaa3Z6vbTu8bN8gvP8pmMJ8f/U8+qzkuAqc201
|
kILLhE5FW+9/O0/9bpx4joJUDLV4d3hFZy7GSHKiZUs1QW6BV75JQKqoi+cVt+/L
|
||||||
Z4O+s7ZsQfTiz5mm7zPGIYTnppDSno/rABEBAAGJAh8EGAECAAkFAlXQeMMCGwwA
|
+o1S8CMNekjqdC2mWRosM3doo51zT/FWNzQA1QcoZP2hORJDfw66y+4wPq6o8y1W
|
||||||
CgkQQsnI069epeMt0g/+JrwLhULD6NOxaLgxboh/KZkh/7ViU4cB+QPT8JIcWxkZ
|
jR35ABEBAAGJAjYEGAEIACAWIQQZ3986V5vVCdu1cti+eTAHrSLffgUCXpzGvAIb
|
||||||
zj8uk85TUitEUzKmjp/ItCrhQE5WNNWbz/FBnAuLtaQuHhcHMA3Vu95UUCGi1vyZ
|
DAAKCRC+eTAHrSLffgbJD/4qW5YOo/BayBhaUh2L7VP7JNlECb/2xNNOFKI1NjNr
|
||||||
ZRlS3YRM6S9BOzrjG7fGQJmO/RU3g6rb0TAwGFxDHj8t4JEDTc3zASG7wV/VTn06
|
nOmgSJLzf74Uhmt5W+iVjmJBHrDceprIPkizmPrn90kIsPIMtHIDNxzUgKZHbnza
|
||||||
d8XIH9CZOw3kUuhkQ3OR/PEj1BCeCC+caC+tBjO0fgvDp8RV7NFQQ9kH8R3/xlWd
|
j1vZyAeC+JV79X1hOVpprj1TJwy65lpxXNyYnGqeIOgyFokn9fOHXv8aMQwpNuUr
|
||||||
6KMPtILE6fUft6LubWRGd1P5JBuzXivELolASajewbYtL/s87CCji3ngq0aT9raK
|
bdUJ1C75jYrvwy/NR1DczIFFYgsbkDGDtjVBjyMc5JAgvUBz37/iVPJfWP6dKVnf
|
||||||
m02wqFzNbX1iv+w2iqPQXq6pdRyxtJ8+Q8Z7zEBGJS5nkrYjsLTduZIjJHYHYH7f
|
abRnUVzHgvgK7bnab00SA1TiWvjHURGjo+5rnRtv8X/AgStc2Phjq68TMIgMn0F2
|
||||||
3/ydVjQ3z12iqHKElgaRI7RUmpNiNxVIr+TtuxzeC6G+CF++XNkUtJODvCmRaoJS
|
kjUVvfQotNqzo9madNshvUDmsGtAzKh4e0dS1ear7u3nRp4Z7fqSrTEtXKNbEPwZ
|
||||||
waYsitz8+LSv3tawZJ0iQkKc9nerQMuBD+AzIr3i4NgXiEIN513esUtnKzeyIIsL
|
wdWrWmmQLacNQBSe/FtcMzGF6xIVr4lnrL0bFjqBdQpdTC7vns3QSKk8/GFiEfpv
|
||||||
ntUcBjXKuLCj8OZrZtexjq7edWWbN57/3ikyS2Z7y0i3O30qk5jmccSaS6kA7xTY
|
kzXrDbGV7jX2OWDjNHKcmXX2+E1CsNaJgS7zOgZw5jvbvlTLJUwyYNlM1VLI2OFW
|
||||||
WCDFzbN2v2y+vGu9KYn+2HtrP2BtNa8JTh3waNeLUTpn4GV4mMrsZjOy6vhhHb91
|
Oa86l8pqli+B7rpTbsAE9Ut8qUaWjm87oUNSJbaKgqNnMaE+b/8VJaEeWHgQJwsD
|
||||||
1TKfI1gvjk7lE9xaWmcDjdI55dw3jIq8kK9SdgORGq9/S3g7KJNRjme+6GjqQfk=
|
bJSJ/O/vzlRtDjOJ1JDlMRLs7TnOFeUh5pgwyaJoidYbJEiGlMGJbI6BjwhDTBFO
|
||||||
=h7ww
|
NLJtd3SsRjc7ICtGdCvej59IvCDTjxtkhx5okF03APi1aXpHQrE18/arFD7BpoGO
|
||||||
|
sw==
|
||||||
|
=gSIv
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----
|
||||||
|
6
debian/watch
vendored
6
debian/watch
vendored
@ -1,3 +1,5 @@
|
|||||||
version=4
|
version=4
|
||||||
opts="pgpsigurlmangle=s/$/.asc/" \
|
opts="searchmode=plain, \
|
||||||
https://github.com/lxde/lxqt-session/releases .*/lxqt-session-([\d\.]+).tar.xz
|
pgpsigurlmangle=s/$/.asc/, \
|
||||||
|
uversionmangle=s/(\d+\.\d+\.\d+).*/$1/" \
|
||||||
|
https://api.github.com/repos/lxqt/@PACKAGE@/releases https:\/\/github.com\/lxqt\/@PACKAGE@\/releases\/download\/@ANY_VERSION@\/@PACKAGE@-@ANY_VERSION@.tar.xz
|
||||||
|
@ -1,97 +0,0 @@
|
|||||||
project(lxqt-config-session)
|
|
||||||
|
|
||||||
|
|
||||||
set(lxqt-sessioncfg_HDRS
|
|
||||||
sessionconfigwindow.h
|
|
||||||
basicsettings.h
|
|
||||||
modulemodel.h
|
|
||||||
autostartpage.h
|
|
||||||
autostartmodel.h
|
|
||||||
autostartitem.h
|
|
||||||
autostartedit.h
|
|
||||||
autostartutils.h
|
|
||||||
defaultappspage.h
|
|
||||||
environmentpage.h
|
|
||||||
userlocationspage.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(lxqt-sessioncfg_SRCS
|
|
||||||
main.cpp
|
|
||||||
sessionconfigwindow.cpp
|
|
||||||
basicsettings.cpp
|
|
||||||
modulemodel.cpp
|
|
||||||
autostartpage.cpp
|
|
||||||
autostartmodel.cpp
|
|
||||||
autostartitem.cpp
|
|
||||||
autostartedit.cpp
|
|
||||||
autostartutils.cpp
|
|
||||||
defaultappspage.cpp
|
|
||||||
environmentpage.cpp
|
|
||||||
userlocationspage.cpp
|
|
||||||
../lxqt-session/src/windowmanager.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(lxqt-sessioncfg_UI_FILES
|
|
||||||
basicsettings.ui
|
|
||||||
autostartpage.ui
|
|
||||||
autostartedit.ui
|
|
||||||
defaultappspage.ui
|
|
||||||
environmentpage.ui
|
|
||||||
)
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
lxqt_translate_ts(lxqt-sessioncfg_QM_FILES
|
|
||||||
UPDATE_TRANSLATIONS
|
|
||||||
${UPDATE_TRANSLATIONS}
|
|
||||||
SOURCES
|
|
||||||
${lxqt-sessioncfg_HDRS}
|
|
||||||
${lxqt-sessioncfg_SRCS}
|
|
||||||
${lxqt-sessioncfg_UI_FILES}
|
|
||||||
INSTALL_DIR
|
|
||||||
"${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
|
||||||
PULL_TRANSLATIONS
|
|
||||||
${PULL_TRANSLATIONS}
|
|
||||||
CLEAN_TRANSLATIONS
|
|
||||||
${CLEAN_TRANSLATIONS}
|
|
||||||
TRANSLATIONS_REPO
|
|
||||||
${TRANSLATIONS_REPO}
|
|
||||||
TRANSLATIONS_REFSPEC
|
|
||||||
${TRANSLATIONS_REFSPEC}
|
|
||||||
REPO_SUBDIR
|
|
||||||
"lxqt-session/${PROJECT_NAME}"
|
|
||||||
)
|
|
||||||
|
|
||||||
lxqt_app_translation_loader(lxqt-sessioncfg_QM_LOADER ${PROJECT_NAME})
|
|
||||||
lxqt_translate_desktop(lxqt-sessioncfg_DESKTOP_FILES SOURCES lxqt-config-session.desktop.in)
|
|
||||||
|
|
||||||
add_executable(lxqt-config-session
|
|
||||||
${lxqt-sessioncfg_SRCS}
|
|
||||||
${lxqt-sessioncfg_DESKTOP_FILES}
|
|
||||||
${lxqt-sessioncfg_QM_FILES}
|
|
||||||
${lxqt-sessioncfg_QM_LOADER})
|
|
||||||
|
|
||||||
target_link_libraries(lxqt-config-session
|
|
||||||
KF5::WindowSystem
|
|
||||||
Qt5::Widgets
|
|
||||||
Qt5::DBus
|
|
||||||
Qt5::X11Extras
|
|
||||||
lxqt
|
|
||||||
)
|
|
||||||
|
|
||||||
INSTALL(TARGETS
|
|
||||||
lxqt-config-session
|
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
||||||
COMPONENT Runtime
|
|
||||||
)
|
|
||||||
|
|
||||||
install(FILES
|
|
||||||
${lxqt-sessioncfg_DESKTOP_FILES}
|
|
||||||
DESTINATION
|
|
||||||
"${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
|
||||||
COMPONENT Runtime
|
|
||||||
)
|
|
||||||
install(FILES
|
|
||||||
man/lxqt-config-session.1
|
|
||||||
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
|
|
||||||
COMPONENT Runtime
|
|
||||||
)
|
|
@ -1,67 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include <QFileDialog>
|
|
||||||
|
|
||||||
#include "autostartedit.h"
|
|
||||||
#include "ui_autostartedit.h"
|
|
||||||
|
|
||||||
AutoStartEdit::AutoStartEdit(QString name, QString command, bool needTray, QWidget *parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
ui(new Ui::AutoStartEdit)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
ui->nameEdit->setFocus();
|
|
||||||
ui->nameEdit->setText(name);
|
|
||||||
ui->commandEdit->setText(command);
|
|
||||||
ui->trayCheckBox->setChecked(needTray);
|
|
||||||
connect(ui->browseButton, SIGNAL(clicked()), SLOT(browse()));
|
|
||||||
}
|
|
||||||
|
|
||||||
QString AutoStartEdit::name()
|
|
||||||
{
|
|
||||||
return ui->nameEdit->text();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString AutoStartEdit::command()
|
|
||||||
{
|
|
||||||
return ui->commandEdit->text();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AutoStartEdit::needTray()
|
|
||||||
{
|
|
||||||
return ui->trayCheckBox->isChecked();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutoStartEdit::browse()
|
|
||||||
{
|
|
||||||
QString filePath = QFileDialog::getOpenFileName(this, tr("Select Application"), "/usr/bin/");
|
|
||||||
if (!filePath.isEmpty())
|
|
||||||
ui->commandEdit->setText(filePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
AutoStartEdit::~AutoStartEdit()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
@ -1,52 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef AUTOSTARTEDIT_H
|
|
||||||
#define AUTOSTARTEDIT_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class AutoStartEdit;
|
|
||||||
}
|
|
||||||
|
|
||||||
class AutoStartEdit : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit AutoStartEdit(QString name, QString command, bool needTray, QWidget* parent = 0);
|
|
||||||
~AutoStartEdit();
|
|
||||||
QString name();
|
|
||||||
QString command();
|
|
||||||
bool needTray();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void browse();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::AutoStartEdit *ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // AUTOSTARTEDIT_H
|
|
@ -1,105 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>AutoStartEdit</class>
|
|
||||||
<widget class="QDialog" name="AutoStartEdit">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>296</width>
|
|
||||||
<height>118</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Edit</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QPushButton" name="browseButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Search...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="3">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" colspan="2">
|
|
||||||
<widget class="QLineEdit" name="nameEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Command:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="commandEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="trayCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Wait for system tray</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>nameEdit</tabstop>
|
|
||||||
<tabstop>commandEdit</tabstop>
|
|
||||||
<tabstop>trayCheckBox</tabstop>
|
|
||||||
<tabstop>buttonBox</tabstop>
|
|
||||||
<tabstop>browseButton</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>AutoStartEdit</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>254</x>
|
|
||||||
<y>96</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>102</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>AutoStartEdit</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>322</x>
|
|
||||||
<y>96</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>286</x>
|
|
||||||
<y>102</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -1,75 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include "autostartitem.h"
|
|
||||||
#include <XdgAutoStart>
|
|
||||||
#include <XdgDirs>
|
|
||||||
#include <QFileInfo>
|
|
||||||
|
|
||||||
AutostartItem::AutostartItem() :
|
|
||||||
LXQt::AutostartEntry()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
AutostartItem::AutostartItem(const XdgDesktopFile& systemFile) :
|
|
||||||
LXQt::AutostartEntry()
|
|
||||||
{
|
|
||||||
mSystemFile = systemFile;
|
|
||||||
mSystem = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutostartItem::setLocalFromFile(const XdgDesktopFile& file)
|
|
||||||
{
|
|
||||||
mLocalFile = file;
|
|
||||||
mLocalState = StateExists;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMap<QString,AutostartItem> AutostartItem::createItemMap()
|
|
||||||
{
|
|
||||||
QMap<QString,AutostartItem> items;
|
|
||||||
|
|
||||||
XdgDesktopFileList systemList = XdgAutoStart::desktopFileList(XdgDirs::autostartDirs(), false);
|
|
||||||
foreach (const XdgDesktopFile& file, systemList)
|
|
||||||
{
|
|
||||||
QString name = QFileInfo(file.fileName()).fileName();
|
|
||||||
items.insert(name, AutostartItem(file));
|
|
||||||
}
|
|
||||||
|
|
||||||
XdgDesktopFileList localList = XdgAutoStart::desktopFileList(QStringList(XdgDirs::autostartHome()), false);
|
|
||||||
foreach (const XdgDesktopFile& file, localList)
|
|
||||||
{
|
|
||||||
QString name = QFileInfo(file.fileName()).fileName();
|
|
||||||
if (items.contains(name))
|
|
||||||
{
|
|
||||||
items[name].setLocalFromFile(file);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
AutostartItem item;
|
|
||||||
item.setLocalFromFile(file);
|
|
||||||
items.insert(name, item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return items;
|
|
||||||
}
|
|
@ -1,77 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef AUTOSTARTITEM_H
|
|
||||||
#define AUTOSTARTITEM_H
|
|
||||||
|
|
||||||
#include <LXQt/AutostartEntry>
|
|
||||||
|
|
||||||
/*! \brief The AutostartItem class provides an interface for staging configuration of individual
|
|
||||||
autostart items. All changes are made in memory until commit() is called.
|
|
||||||
|
|
||||||
- "system" file refers to a read-only file in /etc/xdg/autostart (or a directory in $XDG_CONFIG_DIRS)
|
|
||||||
- "local" file refers to the file in user's ~/.config/autostart (or in $XDG_CONFIG_HOME/autostart)
|
|
||||||
|
|
||||||
When a "local" file has the same name as the "system" file, the local one overrides it. This class
|
|
||||||
tries to ensure that the "local" file is deleted if it's the same as the "system" file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class AutostartItem : public LXQt::AutostartEntry
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
//! \brief Default constructor
|
|
||||||
AutostartItem();
|
|
||||||
|
|
||||||
/*! Creates an autostart item with a "system" file
|
|
||||||
* \param systemFile
|
|
||||||
*/
|
|
||||||
AutostartItem(const XdgDesktopFile& systemFile);
|
|
||||||
|
|
||||||
//! Returns the "system" file
|
|
||||||
const XdgDesktopFile& systemfile() const { return mSystemFile; }
|
|
||||||
|
|
||||||
/*! Sets the local version that exists on disk
|
|
||||||
* \param file the desktop file, must already exist in user's autostart directory
|
|
||||||
*/
|
|
||||||
void setLocalFromFile(const XdgDesktopFile &file);
|
|
||||||
|
|
||||||
/*! Removes the "local" version of the file
|
|
||||||
* \return true if there is no "system" version left (i.e. the item was entirely deleted)
|
|
||||||
*/
|
|
||||||
bool removeLocal() { return LXQt::AutostartEntry::removeLocal(); }
|
|
||||||
|
|
||||||
//! Returns true if both the "local" and "system" versions exist
|
|
||||||
bool overrides() const { return mSystem && isLocal(); }
|
|
||||||
|
|
||||||
//! Returns true if the local version exists
|
|
||||||
bool isLocal() const { return LXQt::AutostartEntry::isLocal(); }
|
|
||||||
|
|
||||||
//! Returns true if the local file does not exist on disk
|
|
||||||
bool isTransient() const { return mLocalState == StateTransient; }
|
|
||||||
|
|
||||||
//! Creates a mapping of file name (a unique ID) to AutostartItem for the running system
|
|
||||||
static QMap<QString, AutostartItem> createItemMap();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // AUTOSTARTITEM_H
|
|
@ -1,300 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - The Lightweight Desktop Environment
|
|
||||||
* http://lxqt.org
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include <QFileInfo>
|
|
||||||
#include <XdgDirs>
|
|
||||||
#include <XdgIcon>
|
|
||||||
|
|
||||||
#include "autostartmodel.h"
|
|
||||||
#include "autostartutils.h"
|
|
||||||
|
|
||||||
AutoStartItemModel::AutoStartItemModel(QObject* parent) :
|
|
||||||
QAbstractItemModel(parent),
|
|
||||||
mItemMap(AutostartItem::createItemMap()),
|
|
||||||
mGlobalIndex(QAbstractItemModel::createIndex(0, 0)),
|
|
||||||
mLXQtIndex(QAbstractItemModel::createIndex(1, 0))
|
|
||||||
{
|
|
||||||
QMap<QString,AutostartItem>::iterator iter;
|
|
||||||
for (iter = mItemMap.begin(); iter != mItemMap.end(); ++iter)
|
|
||||||
{
|
|
||||||
if (!AutostartUtils::isLXQtModule(iter.value().file()))
|
|
||||||
{
|
|
||||||
if (showOnlyInLXQt(iter.value().file()))
|
|
||||||
mLXQtItems.append(iter.key());
|
|
||||||
else
|
|
||||||
mGlobalItems.append(iter.key());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AutoStartItemModel::~AutoStartItemModel()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* All actual file operations are perfomed here when the window is closed.
|
|
||||||
*/
|
|
||||||
bool AutoStartItemModel::writeChanges()
|
|
||||||
{
|
|
||||||
foreach (AutostartItem item, mItemMap.values())
|
|
||||||
item.commit();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMap<QString, AutostartItem> AutoStartItemModel::items()
|
|
||||||
{
|
|
||||||
QMap<QString, AutostartItem> allItems;
|
|
||||||
|
|
||||||
foreach(const QString &s, mLXQtItems)
|
|
||||||
allItems[s] = mItemMap.value(s);
|
|
||||||
|
|
||||||
foreach(const QString &s, mGlobalItems)
|
|
||||||
allItems[s] = mItemMap.value(s);
|
|
||||||
|
|
||||||
return allItems;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Creates or replaces an autostart entry
|
|
||||||
*/
|
|
||||||
bool AutoStartItemModel::setEntry(const QModelIndex& index, XdgDesktopFile entry, bool overwrite)
|
|
||||||
{
|
|
||||||
QModelIndex parent;
|
|
||||||
if (index.parent().isValid())
|
|
||||||
parent = index.parent();
|
|
||||||
else if (index.isValid())
|
|
||||||
parent = index;
|
|
||||||
else
|
|
||||||
parent = mGlobalIndex;
|
|
||||||
|
|
||||||
QString fileName = QFileInfo(entry.fileName()).fileName();
|
|
||||||
bool replacing = mItemMap.contains(fileName);
|
|
||||||
if (!overwrite && replacing)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (parent == mLXQtIndex)
|
|
||||||
entry.setValue("OnlyShowIn", "LXQt;");
|
|
||||||
|
|
||||||
mItemMap[fileName].setFile(entry);
|
|
||||||
|
|
||||||
if (replacing)
|
|
||||||
{
|
|
||||||
emit dataChanged(index, index);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
beginInsertRows(parent, 0, 0);
|
|
||||||
if (parent == mGlobalIndex)
|
|
||||||
mGlobalItems.append(fileName);
|
|
||||||
else
|
|
||||||
mLXQtItems.append(fileName);
|
|
||||||
endInsertRows();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AutoStartItemModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
|
||||||
{
|
|
||||||
if (role == Qt::CheckStateRole)
|
|
||||||
{
|
|
||||||
QString name;
|
|
||||||
if (index.parent() == mGlobalIndex)
|
|
||||||
name = mGlobalItems.value(index.row());
|
|
||||||
else
|
|
||||||
name = mLXQtItems.value(index.row());
|
|
||||||
|
|
||||||
mItemMap[name].setEnabled(value == Qt::Checked);
|
|
||||||
emit dataChanged(index, index);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* When user clicks "Delete", removes the local item. If there is a "system" item,
|
|
||||||
* it replaces it.
|
|
||||||
*/
|
|
||||||
bool AutoStartItemModel::removeRow(int row, const QModelIndex& parent)
|
|
||||||
{
|
|
||||||
if (!parent.isValid())
|
|
||||||
return false;
|
|
||||||
QString item;
|
|
||||||
|
|
||||||
if (parent == mGlobalIndex)
|
|
||||||
item = mGlobalItems[row];
|
|
||||||
else
|
|
||||||
item = mLXQtItems[row];
|
|
||||||
|
|
||||||
if (!mItemMap[item].removeLocal())
|
|
||||||
{
|
|
||||||
QModelIndex index = parent.child(row, 0);
|
|
||||||
emit dataChanged(index, index);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
beginRemoveRows(parent, row, row);
|
|
||||||
if (parent == mGlobalIndex)
|
|
||||||
mGlobalItems.removeAt(row);
|
|
||||||
else
|
|
||||||
mLXQtItems.removeAt(row);
|
|
||||||
endRemoveRows();
|
|
||||||
|
|
||||||
if (mItemMap.value(item).isEmpty())
|
|
||||||
mItemMap.remove(item);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
QModelIndex AutoStartItemModel::index(int row, int column, const QModelIndex& parent) const
|
|
||||||
{
|
|
||||||
if (!parent.isValid())
|
|
||||||
{
|
|
||||||
if (row == 0)
|
|
||||||
return mGlobalIndex;
|
|
||||||
else if (row == 1)
|
|
||||||
return mLXQtIndex;
|
|
||||||
}
|
|
||||||
else if (parent == mGlobalIndex && row < mGlobalItems.size())
|
|
||||||
return QAbstractItemModel::createIndex(row, column, (void*)&mGlobalItems[row]);
|
|
||||||
else if (parent == mLXQtIndex && row < mLXQtItems.size())
|
|
||||||
return QAbstractItemModel::createIndex(row, column, (void*)&mLXQtItems[row]);
|
|
||||||
return QModelIndex();
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant AutoStartItemModel::data(const QModelIndex& index, int role) const
|
|
||||||
{
|
|
||||||
if (!index.parent().isValid())
|
|
||||||
{
|
|
||||||
if (role == Qt::DisplayRole)
|
|
||||||
{
|
|
||||||
if (index.row() == 0)
|
|
||||||
return QString(tr("Global Autostart"));
|
|
||||||
else if (index.row() == 1)
|
|
||||||
return QString(tr("LXQt Autostart"));
|
|
||||||
}
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString name = indexToName(index);
|
|
||||||
const AutostartItem& item = mItemMap.value(name);
|
|
||||||
if (role == Qt::DisplayRole)
|
|
||||||
{
|
|
||||||
QString title = item.file().name();
|
|
||||||
if (title.isEmpty())
|
|
||||||
return name;
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
else if (role == Qt::ToolTipRole)
|
|
||||||
{
|
|
||||||
QStringList tooltip;
|
|
||||||
if (!item.isTransient())
|
|
||||||
tooltip << tr("Location: %1").arg(item.file().fileName());
|
|
||||||
if (item.overrides())
|
|
||||||
tooltip << tr("Overrides: %1").arg(item.systemfile().fileName());
|
|
||||||
return tooltip.join("\n");
|
|
||||||
}
|
|
||||||
else if (role == Qt::DecorationRole)
|
|
||||||
{
|
|
||||||
if (item.overrides())
|
|
||||||
return XdgIcon::fromTheme("dialog-warning");
|
|
||||||
else if (!item.isLocal())
|
|
||||||
return XdgIcon::fromTheme("computer");
|
|
||||||
}
|
|
||||||
else if (role == Qt::CheckStateRole)
|
|
||||||
{
|
|
||||||
return item.isEnabled() ? Qt::Checked : Qt::Unchecked;
|
|
||||||
}
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
Qt::ItemFlags AutoStartItemModel::flags(const QModelIndex& index) const
|
|
||||||
{
|
|
||||||
if (index.parent().isValid())
|
|
||||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable;
|
|
||||||
if (index.isValid())
|
|
||||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Controls which buttons are enabled/disabled based on the selecton.
|
|
||||||
*/
|
|
||||||
AutoStartItemModel::ActiveButtons AutoStartItemModel::activeButtons(const QModelIndex& selection) const
|
|
||||||
{
|
|
||||||
if (!selection.isValid() || !selection.parent().isValid())
|
|
||||||
return AddButton;
|
|
||||||
else if (!mItemMap.value(indexToName(selection)).isLocal())
|
|
||||||
return AddButton | EditButton;
|
|
||||||
else
|
|
||||||
return AddButton | EditButton | DeleteButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
QModelIndex AutoStartItemModel::parent(const QModelIndex& child) const
|
|
||||||
{
|
|
||||||
QString name = indexToName(child);
|
|
||||||
if (!name.isEmpty())
|
|
||||||
{
|
|
||||||
if (showOnlyInLXQt(mItemMap.value(name).file()))
|
|
||||||
return mLXQtIndex;
|
|
||||||
return mGlobalIndex;
|
|
||||||
}
|
|
||||||
return QModelIndex();
|
|
||||||
}
|
|
||||||
|
|
||||||
int AutoStartItemModel::columnCount(const QModelIndex& parent) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(parent);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int AutoStartItemModel::rowCount(const QModelIndex& parent) const
|
|
||||||
{
|
|
||||||
if (!parent.isValid())
|
|
||||||
return 2;
|
|
||||||
if (parent == mGlobalIndex)
|
|
||||||
return mGlobalItems.size();
|
|
||||||
if (parent == mLXQtIndex)
|
|
||||||
return mLXQtItems.size();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AutoStartItemModel::showOnlyInLXQt(const XdgDesktopFile& file)
|
|
||||||
{
|
|
||||||
return file.value("OnlyShowIn") == "LXQt;";
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Maps the index to file name
|
|
||||||
*/
|
|
||||||
QString AutoStartItemModel::indexToName(const QModelIndex& index)
|
|
||||||
{
|
|
||||||
QString* data = static_cast<QString*>(index.internalPointer());
|
|
||||||
if (data)
|
|
||||||
return *data;
|
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
XdgDesktopFile AutoStartItemModel::desktopFile(const QModelIndex& index) const
|
|
||||||
{
|
|
||||||
return mItemMap.value(indexToName(index)).file();
|
|
||||||
}
|
|
@ -1,78 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright (C) 2011 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef AUTOSTARTMODEL_H
|
|
||||||
#define AUTOSTARTMODEL_H
|
|
||||||
|
|
||||||
#include <QAbstractItemModel>
|
|
||||||
#include <XdgAutoStart>
|
|
||||||
|
|
||||||
#include "autostartitem.h"
|
|
||||||
|
|
||||||
class AutoStartItemModel : public QAbstractItemModel
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
enum ActiveButton
|
|
||||||
{
|
|
||||||
AddButton = 1,
|
|
||||||
EditButton = 2,
|
|
||||||
DeleteButton = 4
|
|
||||||
};
|
|
||||||
Q_DECLARE_FLAGS(ActiveButtons, ActiveButton)
|
|
||||||
|
|
||||||
explicit AutoStartItemModel(QObject* parent = 0);
|
|
||||||
~AutoStartItemModel();
|
|
||||||
int columnCount(const QModelIndex& parent = QModelIndex()) const;
|
|
||||||
int rowCount(const QModelIndex& parent = QModelIndex()) const;
|
|
||||||
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
|
|
||||||
Qt::ItemFlags flags(const QModelIndex& index) const;
|
|
||||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
|
|
||||||
QModelIndex parent(const QModelIndex &child) const;
|
|
||||||
bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
|
|
||||||
bool removeRow(int row, const QModelIndex& parent = QModelIndex());
|
|
||||||
bool setEntry(const QModelIndex& index, XdgDesktopFile entry, bool overwrite=false);
|
|
||||||
ActiveButtons activeButtons(const QModelIndex& selection) const;
|
|
||||||
XdgDesktopFile desktopFile(const QModelIndex& index) const;
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
bool writeChanges();
|
|
||||||
|
|
||||||
public:
|
|
||||||
QMap<QString, AutostartItem> items();
|
|
||||||
|
|
||||||
private:
|
|
||||||
QMap<QString, AutostartItem> mItemMap;
|
|
||||||
QPersistentModelIndex mGlobalIndex;
|
|
||||||
QPersistentModelIndex mLXQtIndex;
|
|
||||||
QStringList mGlobalItems;
|
|
||||||
QStringList mLXQtItems;
|
|
||||||
|
|
||||||
static QString indexToName(const QModelIndex& index);
|
|
||||||
static bool showOnlyInLXQt(const XdgDesktopFile& file);
|
|
||||||
};
|
|
||||||
|
|
||||||
Q_DECLARE_OPERATORS_FOR_FLAGS(AutoStartItemModel::ActiveButtons)
|
|
||||||
|
|
||||||
#endif // AUTOSTARTMODEL_H
|
|
@ -1,180 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include "autostartpage.h"
|
|
||||||
#include "ui_autostartpage.h"
|
|
||||||
|
|
||||||
#include "autostartedit.h"
|
|
||||||
#include "autostartutils.h"
|
|
||||||
|
|
||||||
#include <QMessageBox>
|
|
||||||
|
|
||||||
AutoStartPage::AutoStartPage(QWidget* parent) :
|
|
||||||
QWidget(parent),
|
|
||||||
ui(new Ui::AutoStartPage)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
connect(ui->addButton, SIGNAL(clicked()), SLOT(addButton_clicked()));
|
|
||||||
connect(ui->editButton, SIGNAL(clicked()), SLOT(editButton_clicked()));
|
|
||||||
connect(ui->deleteButton, SIGNAL(clicked()), SLOT(deleteButton_clicked()));
|
|
||||||
|
|
||||||
restoreSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
AutoStartPage::~AutoStartPage()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutoStartPage::restoreSettings()
|
|
||||||
{
|
|
||||||
QAbstractItemModel* oldModel = ui->autoStartView->model();
|
|
||||||
mXdgAutoStartModel = new AutoStartItemModel(ui->autoStartView);
|
|
||||||
ui->autoStartView->setModel(mXdgAutoStartModel);
|
|
||||||
delete oldModel;
|
|
||||||
ui->autoStartView->setExpanded(mXdgAutoStartModel->index(0, 0), true);
|
|
||||||
ui->autoStartView->setExpanded(mXdgAutoStartModel->index(1, 0), true);
|
|
||||||
updateButtons();
|
|
||||||
connect(mXdgAutoStartModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), SLOT(updateButtons()));
|
|
||||||
connect(ui->autoStartView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)),
|
|
||||||
SLOT(selectionChanged(QModelIndex)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutoStartPage::save()
|
|
||||||
{
|
|
||||||
bool doRestart = false;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get the previous settings
|
|
||||||
*/
|
|
||||||
QMap<QString, AutostartItem> previousItems(AutostartItem::createItemMap());
|
|
||||||
QMutableMapIterator<QString, AutostartItem> i(previousItems);
|
|
||||||
while (i.hasNext()) {
|
|
||||||
i.next();
|
|
||||||
if (AutostartUtils::isLXQtModule(i.value().file()))
|
|
||||||
i.remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Get the settings from the Ui
|
|
||||||
*/
|
|
||||||
QMap<QString, AutostartItem> currentItems = mXdgAutoStartModel->items();
|
|
||||||
QMutableMapIterator<QString, AutostartItem> j(currentItems);
|
|
||||||
|
|
||||||
while (j.hasNext()) {
|
|
||||||
j.next();
|
|
||||||
if (AutostartUtils::isLXQtModule(j.value().file()))
|
|
||||||
j.remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Compare the settings */
|
|
||||||
|
|
||||||
if (previousItems.count() != currentItems.count())
|
|
||||||
{
|
|
||||||
doRestart = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
QMap<QString, AutostartItem>::const_iterator k = currentItems.constBegin();
|
|
||||||
while (k != currentItems.constEnd())
|
|
||||||
{
|
|
||||||
if (previousItems.contains(k.key()))
|
|
||||||
{
|
|
||||||
if (k.value().file() != previousItems.value(k.key()).file())
|
|
||||||
{
|
|
||||||
doRestart = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
doRestart = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
++k;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doRestart)
|
|
||||||
emit needRestart();
|
|
||||||
|
|
||||||
mXdgAutoStartModel->writeChanges();
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutoStartPage::addButton_clicked()
|
|
||||||
{
|
|
||||||
AutoStartEdit edit(QString(), QString(), false);
|
|
||||||
bool success = false;
|
|
||||||
while (!success && edit.exec() == QDialog::Accepted)
|
|
||||||
{
|
|
||||||
QModelIndex index = ui->autoStartView->selectionModel()->currentIndex();
|
|
||||||
XdgDesktopFile file(XdgDesktopFile::ApplicationType, edit.name(), edit.command());
|
|
||||||
if (edit.needTray())
|
|
||||||
file.setValue("X-LXQt-Need-Tray", true);
|
|
||||||
if (mXdgAutoStartModel->setEntry(index, file))
|
|
||||||
success = true;
|
|
||||||
else
|
|
||||||
QMessageBox::critical(this, tr("Error"), tr("File '%1' already exists!").arg(file.fileName()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutoStartPage::editButton_clicked()
|
|
||||||
{
|
|
||||||
QModelIndex index = ui->autoStartView->selectionModel()->currentIndex();
|
|
||||||
XdgDesktopFile file = mXdgAutoStartModel->desktopFile(index);
|
|
||||||
AutoStartEdit edit(file.name(), file.value("Exec").toString(), file.contains("X-LXQt-Need-Tray"));
|
|
||||||
if (edit.exec() == QDialog::Accepted)
|
|
||||||
{
|
|
||||||
file.setLocalizedValue("Name", edit.name());
|
|
||||||
file.setValue("Exec", edit.command());
|
|
||||||
if (edit.needTray())
|
|
||||||
file.setValue("X-LXQt-Need-Tray", true);
|
|
||||||
else
|
|
||||||
file.removeEntry("X-LXQt-Need-Tray");
|
|
||||||
|
|
||||||
mXdgAutoStartModel->setEntry(index, file, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutoStartPage::deleteButton_clicked()
|
|
||||||
{
|
|
||||||
QModelIndex index = ui->autoStartView->selectionModel()->currentIndex();
|
|
||||||
mXdgAutoStartModel->removeRow(index.row(), index.parent());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutoStartPage::selectionChanged(QModelIndex curr)
|
|
||||||
{
|
|
||||||
AutoStartItemModel::ActiveButtons active = mXdgAutoStartModel->activeButtons(curr);
|
|
||||||
ui->addButton->setEnabled(active & AutoStartItemModel::AddButton);
|
|
||||||
ui->editButton->setEnabled(active & AutoStartItemModel::EditButton);
|
|
||||||
ui->deleteButton->setEnabled(active & AutoStartItemModel::DeleteButton);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AutoStartPage::updateButtons()
|
|
||||||
{
|
|
||||||
selectionChanged(ui->autoStartView->selectionModel()->currentIndex());
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef AUTOSTARTPAGE_H
|
|
||||||
#define AUTOSTARTPAGE_H
|
|
||||||
|
|
||||||
#include <QModelIndex>
|
|
||||||
#include <QWidget>
|
|
||||||
#include "autostartmodel.h"
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class AutoStartPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
class AutoStartPage : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit AutoStartPage(QWidget* parent = 0);
|
|
||||||
~AutoStartPage();
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void needRestart();
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void save();
|
|
||||||
void restoreSettings();
|
|
||||||
|
|
||||||
private:
|
|
||||||
AutoStartItemModel* mXdgAutoStartModel;
|
|
||||||
Ui::AutoStartPage* ui;
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void addButton_clicked();
|
|
||||||
void editButton_clicked();
|
|
||||||
void deleteButton_clicked();
|
|
||||||
void selectionChanged(QModelIndex curr);
|
|
||||||
void updateButtons();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // AUTOSTARTPAGE_H
|
|
@ -1,72 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>AutoStartPage</class>
|
|
||||||
<widget class="QWidget" name="AutoStartPage">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>320</width>
|
|
||||||
<height>240</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_10">
|
|
||||||
<item row="4" column="1">
|
|
||||||
<widget class="QPushButton" name="deleteButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Delete</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QPushButton" name="addButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QPushButton" name="editButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Edit</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Application Autostart</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<spacer name="verticalSpacer_1">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" rowspan="5">
|
|
||||||
<widget class="QTreeView" name="autoStartView">
|
|
||||||
<attribute name="headerVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -1,33 +0,0 @@
|
|||||||
/* This file is part of the LXQt project. <http://lxqt.org>
|
|
||||||
* Copyright (C) 2015 Luís Pereira <luis.artur.pereira@gmail.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "autostartutils.h"
|
|
||||||
#include <XdgDesktopFile>
|
|
||||||
|
|
||||||
#include <QString>
|
|
||||||
|
|
||||||
bool AutostartUtils::showOnlyInLXQt(const XdgDesktopFile &file)
|
|
||||||
{
|
|
||||||
return file.value(QLatin1String("OnlyShowIn")) == QLatin1String("LXQt;");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AutostartUtils::isLXQtModule(const XdgDesktopFile& file)
|
|
||||||
{
|
|
||||||
return file.value(QLatin1String("X-LXQt-Module"), false).toBool();
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
/* This file is part of the LXQt project. <http://lxqt.org>
|
|
||||||
* Copyright (C) 2015 Luís Pereira <luis.artur.pereira@gmail.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef AUTOSTARTUTILS_H
|
|
||||||
#define AUTOSTARTUTILS_H
|
|
||||||
|
|
||||||
class XdgDesktopFile;
|
|
||||||
|
|
||||||
class AutostartUtils
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static bool showOnlyInLXQt(const XdgDesktopFile& file);
|
|
||||||
static bool isLXQtModule(const XdgDesktopFile& file);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // AUTOSTARTUTILS_H
|
|
@ -1,157 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2012 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include "basicsettings.h"
|
|
||||||
#include "ui_basicsettings.h"
|
|
||||||
|
|
||||||
#include "../lxqt-session/src/windowmanager.h"
|
|
||||||
#include "sessionconfigwindow.h"
|
|
||||||
#include "autostartutils.h"
|
|
||||||
|
|
||||||
static const QLatin1String windowManagerKey("window_manager");
|
|
||||||
static const QLatin1String leaveConfirmationKey("leave_confirmation");
|
|
||||||
static const QLatin1String lockBeforePowerActionsKey("lock_screen_before_power_actions");
|
|
||||||
static const QLatin1String openboxValue("openbox");
|
|
||||||
|
|
||||||
BasicSettings::BasicSettings(LXQt::Settings *settings, QWidget *parent) :
|
|
||||||
QWidget(parent),
|
|
||||||
m_settings(settings),
|
|
||||||
m_moduleModel(new ModuleModel()),
|
|
||||||
ui(new Ui::BasicSettings)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
connect(ui->findWmButton, SIGNAL(clicked()), this, SLOT(findWmButton_clicked()));
|
|
||||||
connect(ui->startButton, SIGNAL(clicked()), this, SLOT(startButton_clicked()));
|
|
||||||
connect(ui->stopButton, SIGNAL(clicked()), this, SLOT(stopButton_clicked()));
|
|
||||||
restoreSettings();
|
|
||||||
|
|
||||||
ui->moduleView->setModel(m_moduleModel);
|
|
||||||
ui->moduleView->header()->setSectionResizeMode(0, QHeaderView::Stretch);
|
|
||||||
ui->moduleView->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
|
|
||||||
}
|
|
||||||
|
|
||||||
BasicSettings::~BasicSettings()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BasicSettings::restoreSettings()
|
|
||||||
{
|
|
||||||
QStringList knownWMs;
|
|
||||||
foreach (const WindowManager &wm, getWindowManagerList(true))
|
|
||||||
{
|
|
||||||
knownWMs << wm.command;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString wm = m_settings->value(windowManagerKey, openboxValue).toString();
|
|
||||||
SessionConfigWindow::handleCfgComboBox(ui->wmComboBox, knownWMs, wm);
|
|
||||||
m_moduleModel->reset();
|
|
||||||
|
|
||||||
ui->leaveConfirmationCheckBox->setChecked(m_settings->value(leaveConfirmationKey, false).toBool());
|
|
||||||
ui->lockBeforePowerActionsCheckBox->setChecked(m_settings->value(lockBeforePowerActionsKey, true).toBool());
|
|
||||||
}
|
|
||||||
|
|
||||||
void BasicSettings::save()
|
|
||||||
{
|
|
||||||
/* If the setting actually changed:
|
|
||||||
* * Save the setting
|
|
||||||
* * Emit a needsRestart signal
|
|
||||||
*/
|
|
||||||
|
|
||||||
bool doRestart = false;
|
|
||||||
const QString windowManager = ui->wmComboBox->currentText();
|
|
||||||
const bool leaveConfirmation = ui->leaveConfirmationCheckBox->isChecked();
|
|
||||||
const bool lockBeforePowerActions = ui->lockBeforePowerActionsCheckBox->isChecked();
|
|
||||||
|
|
||||||
QMap<QString, AutostartItem> previousItems(AutostartItem::createItemMap());
|
|
||||||
QMutableMapIterator<QString, AutostartItem> i(previousItems);
|
|
||||||
while (i.hasNext()) {
|
|
||||||
i.next();
|
|
||||||
if (!AutostartUtils::isLXQtModule(i.value().file()))
|
|
||||||
i.remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (windowManager != m_settings->value(windowManagerKey, openboxValue).toString())
|
|
||||||
{
|
|
||||||
m_settings->setValue(windowManagerKey, windowManager);
|
|
||||||
doRestart = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (leaveConfirmation != m_settings->value(leaveConfirmationKey, false).toBool())
|
|
||||||
{
|
|
||||||
m_settings->setValue(leaveConfirmationKey, leaveConfirmation);
|
|
||||||
doRestart = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lockBeforePowerActions != m_settings->value(lockBeforePowerActionsKey, true).toBool())
|
|
||||||
{
|
|
||||||
m_settings->setValue(lockBeforePowerActionsKey, lockBeforePowerActions);
|
|
||||||
doRestart = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMap<QString, AutostartItem> currentItems = m_moduleModel->items();
|
|
||||||
QMap<QString, AutostartItem>::const_iterator k = currentItems.constBegin();
|
|
||||||
while (k != currentItems.constEnd())
|
|
||||||
{
|
|
||||||
if (previousItems.contains(k.key()))
|
|
||||||
{
|
|
||||||
if (k.value().file() != previousItems.value(k.key()).file())
|
|
||||||
{
|
|
||||||
doRestart = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
doRestart = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
++k;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (doRestart)
|
|
||||||
emit needRestart();
|
|
||||||
|
|
||||||
m_moduleModel->writeChanges();
|
|
||||||
}
|
|
||||||
|
|
||||||
void BasicSettings::findWmButton_clicked()
|
|
||||||
{
|
|
||||||
SessionConfigWindow::updateCfgComboBox(ui->wmComboBox, tr("Select a window manager"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void BasicSettings::startButton_clicked()
|
|
||||||
{
|
|
||||||
m_moduleModel->toggleModule(ui->moduleView->selectionModel()->currentIndex(), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BasicSettings::stopButton_clicked()
|
|
||||||
{
|
|
||||||
m_moduleModel->toggleModule(ui->moduleView->selectionModel()->currentIndex(), false);
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2012 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef BASICSETTINGS_H
|
|
||||||
#define BASICSETTINGS_H
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
#include <LXQt/Settings>
|
|
||||||
|
|
||||||
#include "modulemodel.h"
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class BasicSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
class BasicSettings : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit BasicSettings(LXQt::Settings *settings, QWidget *parent = 0);
|
|
||||||
~BasicSettings();
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void needRestart();
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void restoreSettings();
|
|
||||||
void save();
|
|
||||||
|
|
||||||
private:
|
|
||||||
LXQt::Settings* m_settings;
|
|
||||||
ModuleModel* m_moduleModel;
|
|
||||||
Ui::BasicSettings* ui;
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void findWmButton_clicked();
|
|
||||||
void startButton_clicked();
|
|
||||||
void stopButton_clicked();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // BASICSETTINGS_H
|
|
@ -1,135 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>BasicSettings</class>
|
|
||||||
<widget class="QWidget" name="BasicSettings">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>322</width>
|
|
||||||
<height>380</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Basic Settings</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>Window Manager</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QComboBox" name="wmComboBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="editable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QPushButton" name="findWmButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Search...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="title">
|
|
||||||
<string>LXQt Modules</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="7" column="1">
|
|
||||||
<widget class="QPushButton" name="startButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Start</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="2">
|
|
||||||
<widget class="QPushButton" name="stopButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Stop</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" colspan="3">
|
|
||||||
<widget class="QTreeView" name="moduleView">
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="rootIsDecorated">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="headerHidden">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<attribute name="headerStretchLastSection">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
|
||||||
<property name="title">
|
|
||||||
<string>Leave Session</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="leaveConfirmationCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Ask for confirmation to leave session</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="lockBeforePowerActionsCheckBox">
|
|
||||||
<property name="text">
|
|
||||||
<string>Lock screen before suspending/hibernating</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -1,88 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2012 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include <QLineEdit>
|
|
||||||
|
|
||||||
#include "defaultappspage.h"
|
|
||||||
#include "ui_defaultappspage.h"
|
|
||||||
|
|
||||||
#include "sessionconfigwindow.h"
|
|
||||||
|
|
||||||
DefaultApps::DefaultApps(QWidget *parent) :
|
|
||||||
QWidget(parent),
|
|
||||||
ui(new Ui::DefaultAppsPage)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
connect(ui->terminalButton, SIGNAL(clicked()), this, SLOT(terminalButton_clicked()));
|
|
||||||
connect(ui->terminalComboBox->lineEdit(), SIGNAL(editingFinished()),
|
|
||||||
SLOT(terminalChanged()));
|
|
||||||
connect(ui->browserButton, SIGNAL(clicked()), this, SLOT(browserButton_clicked()));
|
|
||||||
connect(ui->browserComboBox->lineEdit(), SIGNAL(editingFinished()),
|
|
||||||
SLOT(browserChanged()));
|
|
||||||
}
|
|
||||||
|
|
||||||
DefaultApps::~DefaultApps()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void DefaultApps::updateEnvVar(const QString& var, const QString& val)
|
|
||||||
{
|
|
||||||
if (var == "BROWSER")
|
|
||||||
{
|
|
||||||
QStringList knownBrowsers;
|
|
||||||
knownBrowsers << "firefox" << "qupzilla" << "arora" << "konqueror" << "opera";
|
|
||||||
SessionConfigWindow::handleCfgComboBox(ui->browserComboBox, knownBrowsers, val);
|
|
||||||
}
|
|
||||||
else if (var == "TERM")
|
|
||||||
{
|
|
||||||
QStringList knownTerms;
|
|
||||||
knownTerms << "qterminal" << "xterm" << "konsole" << "uterm";
|
|
||||||
SessionConfigWindow::handleCfgComboBox(ui->terminalComboBox, knownTerms, val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DefaultApps::terminalButton_clicked()
|
|
||||||
{
|
|
||||||
SessionConfigWindow::updateCfgComboBox(ui->terminalComboBox, tr("Select a terminal emulator"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void DefaultApps::browserButton_clicked()
|
|
||||||
{
|
|
||||||
SessionConfigWindow::updateCfgComboBox(ui->browserComboBox, tr("Select a web browser"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void DefaultApps::terminalChanged()
|
|
||||||
{
|
|
||||||
emit defaultAppChanged("TERM", ui->terminalComboBox->lineEdit()->text());
|
|
||||||
}
|
|
||||||
|
|
||||||
void DefaultApps::browserChanged()
|
|
||||||
{
|
|
||||||
emit defaultAppChanged("BROWSER", ui->browserComboBox->lineEdit()->text());
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2012 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef DEFAULTAPPS_H
|
|
||||||
#define DEFAULTAPPS_H
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class DefaultAppsPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
class DefaultApps : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit DefaultApps(QWidget *parent = 0);
|
|
||||||
~DefaultApps();
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void defaultAppChanged(const QString&, const QString&);
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void updateEnvVar(const QString &var, const QString &val);
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::DefaultAppsPage *ui;
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void browserButton_clicked();
|
|
||||||
void terminalButton_clicked();
|
|
||||||
void browserChanged();
|
|
||||||
void terminalChanged();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // DEFAULTAPPS_H
|
|
@ -1,102 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>DefaultAppsPage</class>
|
|
||||||
<widget class="QWidget" name="DefaultAppsPage">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>340</width>
|
|
||||||
<height>135</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_8">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_1">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Default Applications</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>Terminal Emulation:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QComboBox" name="terminalComboBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="editable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QPushButton" name="terminalButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Search...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="text">
|
|
||||||
<string>Web Browser:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QComboBox" name="browserComboBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="editable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QPushButton" name="browserButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Search...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>118</width>
|
|
||||||
<height>186</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -1,150 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2012 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include "environmentpage.h"
|
|
||||||
#include "ui_environmentpage.h"
|
|
||||||
|
|
||||||
EnvironmentPage::EnvironmentPage(LXQt::Settings *settings, QWidget *parent) :
|
|
||||||
QWidget(parent),
|
|
||||||
m_settings(settings),
|
|
||||||
ui(new Ui::EnvironmentPage)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
connect(ui->addButton, SIGNAL(clicked()), SLOT(addButton_clicked()));
|
|
||||||
connect(ui->deleteButton, SIGNAL(clicked()), SLOT(deleteButton_clicked()));
|
|
||||||
connect(ui->treeWidget, SIGNAL(itemChanged(QTreeWidgetItem*,int)),
|
|
||||||
SLOT(itemChanged(QTreeWidgetItem*,int)));
|
|
||||||
|
|
||||||
/* restoreSettings() is called from SessionConfigWindow
|
|
||||||
after connections with DefaultApps have been set up */
|
|
||||||
}
|
|
||||||
|
|
||||||
EnvironmentPage::~EnvironmentPage()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EnvironmentPage::restoreSettings()
|
|
||||||
{
|
|
||||||
m_settings->beginGroup("Environment");
|
|
||||||
QString value;
|
|
||||||
ui->treeWidget->clear();
|
|
||||||
foreach (const QString& i, m_settings->childKeys())
|
|
||||||
{
|
|
||||||
value = m_settings->value(i).toString();
|
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem(ui->treeWidget, QStringList() << i << value);
|
|
||||||
item->setFlags(item->flags() | Qt::ItemIsEditable);
|
|
||||||
ui->treeWidget->addTopLevelItem(item);
|
|
||||||
emit envVarChanged(i, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_settings->value("BROWSER").isNull())
|
|
||||||
emit envVarChanged("BROWSER", "");
|
|
||||||
if (m_settings->value("TERM").isNull())
|
|
||||||
emit envVarChanged("TERM", "");
|
|
||||||
|
|
||||||
m_settings->endGroup();
|
|
||||||
}
|
|
||||||
|
|
||||||
void EnvironmentPage::save()
|
|
||||||
{
|
|
||||||
bool doRestart = false;
|
|
||||||
QMap<QString, QString> oldSettings;
|
|
||||||
|
|
||||||
m_settings->beginGroup("Environment");
|
|
||||||
|
|
||||||
/* We erase the Enviroment group and them write the Ui settings. To know if
|
|
||||||
they changed or not we need to save them to memory.
|
|
||||||
*/
|
|
||||||
foreach (const QString &key, m_settings->childKeys())
|
|
||||||
oldSettings[key] = m_settings->value(key, QString()).toString();
|
|
||||||
m_settings->remove("");
|
|
||||||
|
|
||||||
const int nItems = ui->treeWidget->topLevelItemCount();
|
|
||||||
for(int i = 0; i < nItems; ++i)
|
|
||||||
{
|
|
||||||
QTreeWidgetItem *item = ui->treeWidget->topLevelItem(i);
|
|
||||||
const QString key = item->text(0);
|
|
||||||
const QString value = item->text(1);
|
|
||||||
|
|
||||||
if (oldSettings.value(key) != value)
|
|
||||||
doRestart = true;
|
|
||||||
|
|
||||||
m_settings->setValue(item->text(0), item->text(1));
|
|
||||||
}
|
|
||||||
m_settings->endGroup();
|
|
||||||
|
|
||||||
if (oldSettings.size() != nItems)
|
|
||||||
doRestart = true;
|
|
||||||
|
|
||||||
if (doRestart)
|
|
||||||
emit needRestart();
|
|
||||||
}
|
|
||||||
|
|
||||||
void EnvironmentPage::addButton_clicked()
|
|
||||||
{
|
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem(ui->treeWidget, QStringList() << "" << "");
|
|
||||||
item->setFlags(item->flags() | Qt::ItemIsEditable);
|
|
||||||
ui->treeWidget->addTopLevelItem(item);
|
|
||||||
ui->treeWidget->setCurrentItem(item);
|
|
||||||
}
|
|
||||||
|
|
||||||
void EnvironmentPage::deleteButton_clicked()
|
|
||||||
{
|
|
||||||
foreach (QTreeWidgetItem* item, ui->treeWidget->selectedItems())
|
|
||||||
{
|
|
||||||
emit envVarChanged(item->text(0), "");
|
|
||||||
delete item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EnvironmentPage::itemChanged(QTreeWidgetItem *item, int column)
|
|
||||||
{
|
|
||||||
Q_UNUSED(column);
|
|
||||||
emit envVarChanged(item->text(0), item->text(1));
|
|
||||||
}
|
|
||||||
|
|
||||||
void EnvironmentPage::updateItem(const QString& var, const QString& val)
|
|
||||||
{
|
|
||||||
QList<QTreeWidgetItem*> itemList = ui->treeWidget->findItems(var, Qt::MatchExactly);
|
|
||||||
if (itemList.isEmpty())
|
|
||||||
{
|
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem(ui->treeWidget, QStringList() << var << val);
|
|
||||||
item->setFlags(item->flags() | Qt::ItemIsEditable);
|
|
||||||
ui->treeWidget->addTopLevelItem(item);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (QTreeWidgetItem* item, itemList)
|
|
||||||
{
|
|
||||||
if (!val.isEmpty())
|
|
||||||
item->setText(1, val);
|
|
||||||
else
|
|
||||||
delete item;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,65 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2012 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef ENVIRONMENTPAGE_H
|
|
||||||
#define ENVIRONMENTPAGE_H
|
|
||||||
|
|
||||||
#include <QTreeWidgetItem>
|
|
||||||
#include <LXQt/Settings>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class EnvironmentPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
class EnvironmentPage : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit EnvironmentPage(LXQt::Settings *settings, QWidget *parent = 0);
|
|
||||||
~EnvironmentPage();
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void needRestart();
|
|
||||||
void envVarChanged(const QString&, const QString&);
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void restoreSettings();
|
|
||||||
void save();
|
|
||||||
void updateItem(const QString &var, const QString &val);
|
|
||||||
|
|
||||||
private:
|
|
||||||
LXQt::Settings *m_settings;
|
|
||||||
Ui::EnvironmentPage *ui;
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void addButton_clicked();
|
|
||||||
void deleteButton_clicked();
|
|
||||||
void itemChanged(QTreeWidgetItem *item, int column);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // ENVIRONMENTPAGE_H
|
|
@ -1,75 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>EnvironmentPage</class>
|
|
||||||
<widget class="QWidget" name="EnvironmentPage">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>400</width>
|
|
||||||
<height>320</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_7">
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QPushButton" name="addButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Add</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QPushButton" name="deleteButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Delete</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
|
||||||
<spacer name="verticalSpacer_1">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>59</width>
|
|
||||||
<height>96</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Environment Variables (Advanced)</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" rowspan="4">
|
|
||||||
<widget class="QTreeWidget" name="treeWidget">
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Variable Name</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Value</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -1,11 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=Session Settings
|
|
||||||
GenericName=LXQt Session Settings
|
|
||||||
Comment=Configuration for LXQt sessions
|
|
||||||
Exec=lxqt-config-session
|
|
||||||
Icon=preferences-system-session-services
|
|
||||||
Categories=Settings;DesktopSettings;Qt;LXQt;
|
|
||||||
OnlyShowIn=LXQt;
|
|
||||||
|
|
||||||
#TRANSLATIONS_DIR=translations
|
|
@ -1,44 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2011 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include <LXQt/SingleApplication>
|
|
||||||
|
|
||||||
#include <XdgIcon>
|
|
||||||
#include <LXQt/Settings>
|
|
||||||
|
|
||||||
#include "sessionconfigwindow.h"
|
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
|
||||||
{
|
|
||||||
LXQt::SingleApplication a(argc, argv);
|
|
||||||
|
|
||||||
SessionConfigWindow w;
|
|
||||||
a.setActivationWindow(&w);
|
|
||||||
w.show();
|
|
||||||
|
|
||||||
return a.exec();
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
.TH lxqt-config-session "1" "2015-11-05" "LXQt 0.10.0" "LXQt Application/Environment Configuration"
|
|
||||||
.SH NAME
|
|
||||||
\fBlxqt-config-session\fR \- Application settings of \fBLXQt\fR: The Lightweight
|
|
||||||
Qt Desktop Environment
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B lxqt-config-session
|
|
||||||
.br
|
|
||||||
.SH DESCRIPTION
|
|
||||||
This application handles \fBLXQt\fR default applications settings, autostart
|
|
||||||
configuration, and environment settings.
|
|
||||||
.SH "REPORTING BUGS"
|
|
||||||
Report bugs to https://github.com/lxde/lxqt/issues
|
|
||||||
.SH "SEE ALSO"
|
|
||||||
.\" any module must refer to the session application, for module overview and initiation
|
|
||||||
\fBstartlxqt.1\fR LXQt session initialization and launch script (e.g. in \fB.xinitrc\fR)
|
|
||||||
.P
|
|
||||||
\fBlxqt-session.1\fR LXQt \fIoverview\fR and complete session environment
|
|
||||||
.P
|
|
||||||
\fBlxqt-config.1\fR LXQt settings Configuration Center interface
|
|
||||||
.P
|
|
@ -1,151 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include <QtDBus/QDBusConnection>
|
|
||||||
#include <QtDBus/QDBusReply>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <XdgIcon>
|
|
||||||
#include "modulemodel.h"
|
|
||||||
#include "autostartutils.h"
|
|
||||||
|
|
||||||
ModuleModel::ModuleModel(QObject* parent)
|
|
||||||
: QAbstractListModel(parent)
|
|
||||||
{
|
|
||||||
mInterface = new QDBusInterface("org.lxqt.session", "/LXQtSession", "",
|
|
||||||
QDBusConnection::sessionBus(), this);
|
|
||||||
connect(mInterface, SIGNAL(moduleStateChanged(QString,bool)), SLOT(updateModuleState(QString,bool)));
|
|
||||||
}
|
|
||||||
|
|
||||||
ModuleModel::~ModuleModel()
|
|
||||||
{
|
|
||||||
delete mInterface;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ModuleModel::reset()
|
|
||||||
{
|
|
||||||
mKeyList.clear();
|
|
||||||
mStateMap.clear();
|
|
||||||
mItemMap = AutostartItem::createItemMap();
|
|
||||||
|
|
||||||
QMap<QString,AutostartItem>::iterator iter;
|
|
||||||
for (iter = mItemMap.begin(); iter != mItemMap.end(); ++iter)
|
|
||||||
{
|
|
||||||
if (AutostartUtils::isLXQtModule(iter.value().file()))
|
|
||||||
mKeyList.append(iter.key());
|
|
||||||
}
|
|
||||||
|
|
||||||
QDBusReply<QVariant> reply = mInterface->call("listModules");
|
|
||||||
const QStringList moduleList = reply.value().toStringList();
|
|
||||||
foreach (const QString& moduleName, moduleList)
|
|
||||||
{
|
|
||||||
if (mItemMap.contains(moduleName))
|
|
||||||
mStateMap[moduleName] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariant ModuleModel::data(const QModelIndex& index, int role) const
|
|
||||||
{
|
|
||||||
QString name = mKeyList.at(index.row());
|
|
||||||
if (index.column() == 0)
|
|
||||||
{
|
|
||||||
switch (role)
|
|
||||||
{
|
|
||||||
case Qt::DisplayRole:
|
|
||||||
return mItemMap.value(name).file().name();
|
|
||||||
case Qt::CheckStateRole:
|
|
||||||
return mItemMap.value(name).isEnabled() ? Qt::Checked : Qt::Unchecked;
|
|
||||||
case Qt::ToolTipRole:
|
|
||||||
return mItemMap.value(name).file().value("Comment");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (index.column() == 1 && (role == Qt::DisplayRole || role == Qt::DecorationRole))
|
|
||||||
{
|
|
||||||
if (role == Qt::DisplayRole && mStateMap[name] == true)
|
|
||||||
return QString(tr("Running") + QLatin1Char(' '));
|
|
||||||
}
|
|
||||||
return QVariant();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ModuleModel::setData(const QModelIndex& index, const QVariant& value, int role)
|
|
||||||
{
|
|
||||||
if (role == Qt::CheckStateRole)
|
|
||||||
{
|
|
||||||
QString key = mKeyList.at(index.row());
|
|
||||||
mItemMap[key].setEnabled(value == Qt::Checked);
|
|
||||||
emit dataChanged(index, index);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Qt::ItemFlags ModuleModel::flags(const QModelIndex& index) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(index);
|
|
||||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsUserCheckable;
|
|
||||||
}
|
|
||||||
|
|
||||||
QMap<QString, AutostartItem> ModuleModel::items()
|
|
||||||
{
|
|
||||||
QMap<QString, AutostartItem> allItems;
|
|
||||||
|
|
||||||
foreach(const QString &s, mKeyList)
|
|
||||||
allItems[s] = mItemMap.value(s);
|
|
||||||
|
|
||||||
return allItems;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ModuleModel::rowCount(const QModelIndex& parent) const
|
|
||||||
{
|
|
||||||
Q_UNUSED(parent);
|
|
||||||
return mKeyList.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ModuleModel::writeChanges()
|
|
||||||
{
|
|
||||||
foreach (const QString& key, mKeyList)
|
|
||||||
mItemMap[key].commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ModuleModel::updateModuleState(QString moduleName, bool state)
|
|
||||||
{
|
|
||||||
if (mItemMap.contains(moduleName))
|
|
||||||
{
|
|
||||||
mStateMap[moduleName] = state;
|
|
||||||
QModelIndex i = index(mKeyList.indexOf(moduleName), 1);
|
|
||||||
emit dataChanged(i, i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ModuleModel::toggleModule(const QModelIndex &index, bool status)
|
|
||||||
{
|
|
||||||
if (!index.isValid())
|
|
||||||
return;
|
|
||||||
|
|
||||||
QList<QVariant> arg;
|
|
||||||
arg.append(mKeyList.at(index.row()));
|
|
||||||
mInterface->callWithArgumentList(QDBus::NoBlock,
|
|
||||||
status ? "startModule" : "stopModule",
|
|
||||||
arg);
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright (C) 2012 Alec Moskvin <alecm@gmx.com>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef MODULEMODEL_H
|
|
||||||
#define MODULEMODEL_H
|
|
||||||
|
|
||||||
#include <QStringListModel>
|
|
||||||
#include <QtDBus/QDBusInterface>
|
|
||||||
#include "autostartitem.h"
|
|
||||||
|
|
||||||
class ModuleModel : public QAbstractListModel
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
ModuleModel(QObject *parent = 0);
|
|
||||||
~ModuleModel();
|
|
||||||
void reset();
|
|
||||||
void writeChanges();
|
|
||||||
void toggleModule(const QModelIndex &index, bool status);
|
|
||||||
|
|
||||||
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
|
|
||||||
bool setData(const QModelIndex& index, const QVariant& value, int role);
|
|
||||||
int rowCount(const QModelIndex& parent) const;
|
|
||||||
int columnCount(const QModelIndex&) const { return 2; }
|
|
||||||
Qt::ItemFlags flags(const QModelIndex& index) const;
|
|
||||||
|
|
||||||
QMap<QString, AutostartItem> items();
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void updateModuleState(QString moduleName, bool state);
|
|
||||||
|
|
||||||
private:
|
|
||||||
QMap<QString,AutostartItem> mItemMap;
|
|
||||||
QMap<QString,bool> mStateMap;
|
|
||||||
QStringList mKeyList;
|
|
||||||
QDBusInterface* mInterface;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MODULEMODEL_H
|
|
@ -1,144 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2011 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include <QLineEdit>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QFileDialog>
|
|
||||||
|
|
||||||
#include <LXQt/Settings>
|
|
||||||
|
|
||||||
#include "sessionconfigwindow.h"
|
|
||||||
#include "../lxqt-session/src/windowmanager.h"
|
|
||||||
#include "basicsettings.h"
|
|
||||||
#include "autostartpage.h"
|
|
||||||
#include "defaultappspage.h"
|
|
||||||
#include "environmentpage.h"
|
|
||||||
#include "userlocationspage.h"
|
|
||||||
|
|
||||||
|
|
||||||
SessionConfigWindow::SessionConfigWindow() :
|
|
||||||
LXQt::ConfigDialog(tr("LXQt Session Settings"), new LXQt::Settings("session"), 0)
|
|
||||||
{
|
|
||||||
BasicSettings* basicSettings = new BasicSettings(mSettings, this);
|
|
||||||
addPage(basicSettings, tr("Basic Settings"), "preferences-desktop-display-color");
|
|
||||||
connect(basicSettings, SIGNAL(needRestart()), SLOT(setRestart()));
|
|
||||||
connect(this, SIGNAL(reset()), basicSettings, SLOT(restoreSettings()));
|
|
||||||
connect(this, SIGNAL(save()), basicSettings, SLOT(save()));
|
|
||||||
|
|
||||||
DefaultApps* defaultApps = new DefaultApps(this);
|
|
||||||
addPage(defaultApps, tr("Default Applications"), "preferences-desktop-filetype-association");
|
|
||||||
|
|
||||||
UserLocationsPage* userLocations = new UserLocationsPage(this);
|
|
||||||
addPage(userLocations, tr("User Directories"), QStringLiteral("folder"));
|
|
||||||
connect(userLocations, SIGNAL(needRestart()), SLOT(setRestart()));
|
|
||||||
connect(this, SIGNAL(reset()), userLocations, SLOT(restoreSettings()));
|
|
||||||
connect(this, SIGNAL(save()), userLocations, SLOT(save()));
|
|
||||||
|
|
||||||
AutoStartPage* autoStart = new AutoStartPage(this);
|
|
||||||
addPage(autoStart, tr("Autostart"), "preferences-desktop-launch-feedback");
|
|
||||||
connect(autoStart, SIGNAL(needRestart()), SLOT(setRestart()));
|
|
||||||
connect(this, SIGNAL(reset()), autoStart, SLOT(restoreSettings()));
|
|
||||||
connect(this, SIGNAL(save()), autoStart, SLOT(save()));
|
|
||||||
|
|
||||||
EnvironmentPage* environmentPage = new EnvironmentPage(mSettings, this);
|
|
||||||
addPage(environmentPage, tr("Environment (Advanced)"), "preferences-system-session-services");
|
|
||||||
connect(environmentPage, SIGNAL(needRestart()), SLOT(setRestart()));
|
|
||||||
connect(this, SIGNAL(reset()), environmentPage, SLOT(restoreSettings()));
|
|
||||||
connect(this, SIGNAL(save()), environmentPage, SLOT(save()));
|
|
||||||
|
|
||||||
// sync Default Apps and Environment
|
|
||||||
connect(environmentPage, SIGNAL(envVarChanged(QString,QString)),
|
|
||||||
defaultApps, SLOT(updateEnvVar(QString,QString)));
|
|
||||||
connect(defaultApps, SIGNAL(defaultAppChanged(QString,QString)),
|
|
||||||
environmentPage, SLOT(updateItem(QString,QString)));
|
|
||||||
environmentPage->restoreSettings();
|
|
||||||
connect(this, SIGNAL(reset()), SLOT(clearRestart()));
|
|
||||||
m_restart = false;
|
|
||||||
|
|
||||||
adjustSize();
|
|
||||||
}
|
|
||||||
|
|
||||||
SessionConfigWindow::~SessionConfigWindow()
|
|
||||||
{
|
|
||||||
delete mSettings;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SessionConfigWindow::closeEvent(QCloseEvent * event)
|
|
||||||
{
|
|
||||||
LXQt::ConfigDialog::closeEvent(event);
|
|
||||||
if (m_restart) {
|
|
||||||
QMessageBox::information(this, tr("Session Restart Required"),
|
|
||||||
tr("Some settings will not take effect until the next log in.")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SessionConfigWindow::handleCfgComboBox(QComboBox * cb,
|
|
||||||
const QStringList &availableValues,
|
|
||||||
const QString &value
|
|
||||||
)
|
|
||||||
{
|
|
||||||
QStringList realValues;
|
|
||||||
foreach (const QString &s, availableValues)
|
|
||||||
{
|
|
||||||
if (findProgram(s))
|
|
||||||
realValues << s;
|
|
||||||
}
|
|
||||||
cb->clear();
|
|
||||||
cb->addItems(realValues);
|
|
||||||
|
|
||||||
int ix = cb->findText(value);
|
|
||||||
if (ix == -1)
|
|
||||||
cb->lineEdit()->setText(value);
|
|
||||||
else
|
|
||||||
cb->setCurrentIndex(ix);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SessionConfigWindow::updateCfgComboBox(QComboBox * cb,
|
|
||||||
const QString &prompt
|
|
||||||
)
|
|
||||||
{
|
|
||||||
QString fname = QFileDialog::getOpenFileName(cb, prompt, "/usr/bin/");
|
|
||||||
if (fname.isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
QFileInfo fi(fname);
|
|
||||||
if (!fi.exists() || !fi.isExecutable())
|
|
||||||
return;
|
|
||||||
|
|
||||||
cb->lineEdit()->setText(fname);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SessionConfigWindow::setRestart()
|
|
||||||
{
|
|
||||||
m_restart = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SessionConfigWindow::clearRestart()
|
|
||||||
{
|
|
||||||
m_restart = false;
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2011 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef SESSIONCONFIGWINDOW_H
|
|
||||||
#define SESSIONCONFIGWINDOW_H
|
|
||||||
|
|
||||||
#include <QComboBox>
|
|
||||||
#include <LXQt/ConfigDialog>
|
|
||||||
|
|
||||||
|
|
||||||
class SessionConfigWindow : public LXQt::ConfigDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
SessionConfigWindow();
|
|
||||||
~SessionConfigWindow();
|
|
||||||
|
|
||||||
static void handleCfgComboBox(QComboBox * cb,
|
|
||||||
const QStringList &availableValues,
|
|
||||||
const QString &value
|
|
||||||
);
|
|
||||||
|
|
||||||
static void updateCfgComboBox(QComboBox * cb, const QString &prompt);
|
|
||||||
|
|
||||||
void closeEvent(QCloseEvent * event);
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void setRestart();
|
|
||||||
|
|
||||||
private:
|
|
||||||
// display restart warning
|
|
||||||
bool m_restart;
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void clearRestart();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[ar]=ضبط جلسات لكسكيوت
|
|
||||||
GenericName[ar]=إعدادات لكسكيوت للجلسات
|
|
||||||
Name[ar]=إعدادات الجلسات
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[cs]=Nastavit modul sezení LXQt
|
|
||||||
GenericName[cs]=Nastavení sezení LXQt
|
|
||||||
Name[cs]=Nastavení sezení LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[cs_CZ]=Nastavit modul sezení LXQtu
|
|
||||||
GenericName[cs_CZ]=Nastavení sezení LXQtu
|
|
||||||
Name[cs_CZ]=Nastavení sezení LXQtu
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[da]=Indstil LXQt Sessionsmodul
|
|
||||||
GenericName[da]=Indstilling af LXQt-sessioner
|
|
||||||
Name[da]=Indstilling af LXQt-sessioner
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[da_DK]=Indstilling af LXQt sessionsmodul
|
|
||||||
GenericName[da_DK]=Indstilling af LXQt Session
|
|
||||||
Name[da_DK]=Indstilling af LXQt Session
|
|
@ -1,3 +0,0 @@
|
|||||||
Name[de]=Sitzungskonfiguration
|
|
||||||
GenericName[de]=LXQt Sitzungskonfiguration
|
|
||||||
Comment[de]=Die LXQt Sitzung konfigurieren
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Name[el]=Ρυθμίσεις συνεδρίας
|
|
||||||
GenericName[el]=Ρυθμίσεις συνεδρίας του LXQt
|
|
||||||
Comment[el]=Διαμόρφωση των συνεδριών LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[eo]=Agordi modulon de seanco de LXQt
|
|
||||||
GenericName[eo]=Agordilo de seanco de LXQt
|
|
||||||
Name[eo]=Agordilo de seanco de LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[es]=Configura el módulo de sesiones de LXQt
|
|
||||||
GenericName[es]=Configuración de sesiones LXQt
|
|
||||||
Name[es]=Configuración de sesiones LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[es_VE]=Configuracion de modulo de LXQt
|
|
||||||
GenericName[es_VE]=Configuracion de sesion de LXQt
|
|
||||||
Name[es_VE]=Configuracion de sesion de LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[eu]=Konfiguratu LXQt saioaren modulua
|
|
||||||
GenericName[eu]=LXQt saioaren konfiguratzailea
|
|
||||||
Name[eu]=LXQt saioaren konfiguratzailea
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[fi]=Hallinnoi LXQt:n istuntomoduulia
|
|
||||||
GenericName[fi]=LXQtin istunnonhallinta
|
|
||||||
Name[fi]=LXQtin istunnonhallinta
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[fr_FR]=Configurer le module 'session' de LXQt
|
|
||||||
GenericName[fr_FR]=Paramétreur de session LXQt
|
|
||||||
Name[fr_FR]=Paramétreur de session LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[hu]=A LXQt munkamenetmodul beállítása
|
|
||||||
GenericName[hu]=LXQt munkamenetbeállíó
|
|
||||||
Name[hu]=LXQt munkamenetbeállíó
|
|
@ -1 +0,0 @@
|
|||||||
# Translations
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[id_ID]=Konfigurasi modul sesi LXQt
|
|
||||||
GenericName[id_ID]=Konfigurator Sesi LXQt
|
|
||||||
Name[id_ID]=Konfigurator Sesi LXQt
|
|
@ -1,3 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Name[it]=Impostazioni della sessione
|
|
||||||
Comment[it]=Configura i moduli della sessione di LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[ja]=LXQtセッションもジュールを設定
|
|
||||||
GenericName[ja]=LXQtセッションの設定
|
|
||||||
Name[ja]=LXQtセッションの設定
|
|
@ -1 +0,0 @@
|
|||||||
# Translations
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[lt]=Konfigūruoti LXQt sesijų modulį
|
|
||||||
GenericName[lt]=LXQt sesijų konfigūravimas
|
|
||||||
Name[lt]=LXQt sesijų konfigūravimas
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[nl]=Configureer LXQt sessie module
|
|
||||||
GenericName[nl]=LXQt sessie Configurator
|
|
||||||
Name[nl]=LXQt sessie Configurator
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[pl]=Ustawienia sesji LXQt
|
|
||||||
GenericName[pl]=Ustawienia sesji LXQt
|
|
||||||
Name[pl]=Ustawienia sesji LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[pl_PL]=Konfiguruj moduł sesji LXQt
|
|
||||||
GenericName[pl_PL]=Konfigurator sesji LXQt
|
|
||||||
Name[pl_PL]=Konfigurator sesji LXQt
|
|
@ -1,5 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Name[pt]=Definições da sessão
|
|
||||||
GenericName[pt]=Definições da sessão LXQt
|
|
||||||
Comment[pt]=Configuração das sessões do LXQt
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[pt_BR]=Módulo de configurador de sessão do LXQt
|
|
||||||
GenericName[pt_BR]=Configurador de sessão do LXQt
|
|
||||||
Name[pt_BR]=Configurador de sessão do LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[ro_RO]=Configurează modulul sesiune LXQt
|
|
||||||
GenericName[ro_RO]=Configurare sesiune LXQt
|
|
||||||
Name[ro_RO]=Configurare sesiune LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[ru]=Настройки для сеансов LXQt
|
|
||||||
GenericName[ru]=Настройки сеанса LXQt
|
|
||||||
Name[ru]=Настройки сеанса
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[sk]=Nastavenie relácie prostredia LXQt
|
|
||||||
GenericName[sk]=Nastavenie relácie prostredia LXQt
|
|
||||||
Name[sk]=Nastavenie relácie
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[sl]=Nastavite modul seje za LXQt
|
|
||||||
GenericName[sl]=Nastavitev seje
|
|
||||||
Name[sl]=Nastavitev seje
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[sr]=Подесите Рејзоров модул сесије
|
|
||||||
GenericName[sr]=Подешавање сесије
|
|
||||||
Name[sr]=Подешавање сесије Рејзора
|
|
@ -1,3 +0,0 @@
|
|||||||
Name[sr@ijekavian]=Подешавање сесије Рејзора
|
|
||||||
Comment[sr@ijekavian]=Подесите Рејзоров модул сесије
|
|
||||||
GenericName[sr@ijekavian]=Подешавање сесије
|
|
@ -1,3 +0,0 @@
|
|||||||
Name[sr@ijekavianlatin]=Podešavanje sesije Rejzora
|
|
||||||
Comment[sr@ijekavianlatin]=Podesite Rejzorov modul sesije
|
|
||||||
GenericName[sr@ijekavianlatin]=Podešavanje sesije
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[sr@latin]=Podesite Rejzorov modul sesije
|
|
||||||
GenericName[sr@latin]=Podešavanje sesije
|
|
||||||
Name[sr@latin]=Podešavanje sesije Rejzora
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[th_TH]=ตั้งค่ามอดูลวาระงาน LXQt
|
|
||||||
GenericName[th_TH]=ตัวตั้งค่าวาระงาน LXQt
|
|
||||||
Name[th_TH]=ตัวตั้งค่าวาระงาน LXQt
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[tr]=LXQt oturum modülünü yapılandır
|
|
||||||
GenericName[tr]=LXQt Oturum Yapılandırıcı
|
|
||||||
Name[tr]=LXQt Oturum Yapılandırıcı
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[uk]=Налаштувати модуль сеансу LXQt
|
|
||||||
GenericName[uk]=Налаштування сеансу LXQt
|
|
||||||
Name[uk]=Налаштування сеансу LXQt
|
|
@ -1 +0,0 @@
|
|||||||
# Translations
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[zh_CN]=配置 LXQt 会话模块
|
|
||||||
GenericName[zh_CN]=LXQt 会话配置
|
|
||||||
Name[zh_CN]=LXQt 会话配置
|
|
@ -1,4 +0,0 @@
|
|||||||
# Translations
|
|
||||||
Comment[zh_TW]=LXQt會話模組設定
|
|
||||||
GenericName[zh_TW]=LXQt會話設定
|
|
||||||
Name[zh_TW]=LXQt會話設定
|
|
@ -1,203 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the LXQt project. <http://lxqt.org>
|
|
||||||
* Copyright (C) 2015 Luís Pereira <luis.artur.pereira@gmail.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with this library; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "userlocationspage.h"
|
|
||||||
|
|
||||||
#include <XdgDirs>
|
|
||||||
#include <XdgIcon>
|
|
||||||
|
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QSignalMapper>
|
|
||||||
#include <QLineEdit>
|
|
||||||
#include <QToolButton>
|
|
||||||
#include <QStringList>
|
|
||||||
#include <QGridLayout>
|
|
||||||
#include <QSpacerItem>
|
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QMessageBox>
|
|
||||||
|
|
||||||
|
|
||||||
class UserLocationsPagePrivate {
|
|
||||||
public:
|
|
||||||
|
|
||||||
UserLocationsPagePrivate();
|
|
||||||
static const QStringList locationsName;
|
|
||||||
static const QStringList locationsToolTips;
|
|
||||||
|
|
||||||
QList<QString> initialLocations;
|
|
||||||
QList<QLineEdit *> locations;
|
|
||||||
QSignalMapper *signalMapper;
|
|
||||||
|
|
||||||
void getUserDirs();
|
|
||||||
void populate();
|
|
||||||
};
|
|
||||||
|
|
||||||
UserLocationsPagePrivate::UserLocationsPagePrivate()
|
|
||||||
: locations(),
|
|
||||||
signalMapper(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// This labels haveto match XdgDirs::UserDirectories
|
|
||||||
const QStringList UserLocationsPagePrivate::locationsName = QStringList() <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Desktop") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Downloads") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Templates") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Public Share") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Documents") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Music") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Pictures") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Videos");
|
|
||||||
|
|
||||||
const QStringList UserLocationsPagePrivate::locationsToolTips = QStringList() <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Contains all the files which you see on your desktop") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Default folder to save your downloaded files") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Default folder to load or save templates from or to") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Default folder to publicly share your files") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Default folder to load or save documents from or to") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Default foldet to load or save music from or to") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Default folder to load or save pictures from or to") <<
|
|
||||||
qApp->translate("UserLocationsPrivate", "Default folder to load or save videos from or to");
|
|
||||||
|
|
||||||
void UserLocationsPagePrivate::getUserDirs()
|
|
||||||
{
|
|
||||||
const int N = locationsName.count();
|
|
||||||
for(int i = 0; i < N; ++i) {
|
|
||||||
const QString userDir = XdgDirs::userDir(static_cast<XdgDirs::UserDirectory> (i));
|
|
||||||
const QDir dir(userDir);
|
|
||||||
initialLocations.append(dir.canonicalPath());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UserLocationsPagePrivate::populate()
|
|
||||||
{
|
|
||||||
const int N = initialLocations.count();
|
|
||||||
|
|
||||||
Q_ASSERT(N == locationsName.count());
|
|
||||||
|
|
||||||
for (int i = 0; i < N; ++i) {
|
|
||||||
locations.at(i)->setText(initialLocations.at(i));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
UserLocationsPage::UserLocationsPage(QWidget *parent)
|
|
||||||
: QWidget(parent),
|
|
||||||
d(new UserLocationsPagePrivate())
|
|
||||||
{
|
|
||||||
d->signalMapper = new QSignalMapper(this);
|
|
||||||
QGridLayout *gridLayout = new QGridLayout(this);
|
|
||||||
|
|
||||||
int row = 0;
|
|
||||||
|
|
||||||
QLabel *description = new QLabel(tr("Locations for Personal Files"), this);
|
|
||||||
QFont font;
|
|
||||||
font.setBold(true);
|
|
||||||
description->setFont(font);
|
|
||||||
|
|
||||||
gridLayout->addWidget(description, row++, 0, 1, -1);
|
|
||||||
|
|
||||||
for (int i = 0; i < d->locationsName.size(); ++i, ++row) {
|
|
||||||
QLabel *label = new QLabel(d->locationsName.at(i), this);
|
|
||||||
|
|
||||||
QLineEdit *edit = new QLineEdit(this);
|
|
||||||
d->locations.append(edit);
|
|
||||||
edit->setClearButtonEnabled(true);
|
|
||||||
edit->setToolTip(d->locationsToolTips.at(i));
|
|
||||||
|
|
||||||
QToolButton *button = new QToolButton(this);
|
|
||||||
button->setIcon(XdgIcon::fromTheme(QStringLiteral("folder")));
|
|
||||||
connect(button, SIGNAL(clicked()), d->signalMapper, SLOT(map()));
|
|
||||||
d->signalMapper->setMapping(button, i);
|
|
||||||
|
|
||||||
gridLayout->addWidget(label, row, 0);
|
|
||||||
gridLayout->addWidget(edit, row, 1);
|
|
||||||
gridLayout->addWidget(button, row, 2);
|
|
||||||
}
|
|
||||||
connect(d->signalMapper, SIGNAL(mapped(int)),
|
|
||||||
this, SLOT(clicked(int)));
|
|
||||||
|
|
||||||
QSpacerItem *verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Minimum,
|
|
||||||
QSizePolicy::Expanding);
|
|
||||||
gridLayout->addItem(verticalSpacer, row++, 1, 1, 1);
|
|
||||||
setLayout(gridLayout);
|
|
||||||
|
|
||||||
d->getUserDirs();
|
|
||||||
d->populate();
|
|
||||||
}
|
|
||||||
|
|
||||||
UserLocationsPage::~UserLocationsPage()
|
|
||||||
{
|
|
||||||
// It's fine to delete a null pointer. No need to check.
|
|
||||||
delete d;
|
|
||||||
d = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UserLocationsPage::restoreSettings()
|
|
||||||
{
|
|
||||||
d->populate();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UserLocationsPage::save()
|
|
||||||
{
|
|
||||||
bool restartWarn = false;
|
|
||||||
|
|
||||||
const int N = d->locations.count();
|
|
||||||
for (int i = 0; i < N; ++i) {
|
|
||||||
QString s;
|
|
||||||
const QString text = d->locations.at(i)->text();
|
|
||||||
|
|
||||||
if (text.isEmpty()) {
|
|
||||||
s = XdgDirs::userDirDefault(static_cast<XdgDirs::UserDirectory> (i));
|
|
||||||
} else {
|
|
||||||
const QDir dir(text);
|
|
||||||
s = dir.canonicalPath();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (s != d->initialLocations.at(i)) {
|
|
||||||
const bool ok = XdgDirs::setUserDir(
|
|
||||||
static_cast<XdgDirs::UserDirectory> (i), s, true);
|
|
||||||
if (!ok) {
|
|
||||||
const int ret = QMessageBox::warning(this,
|
|
||||||
tr("LXQt Session Settings - User Directories"),
|
|
||||||
tr("An error ocurred while applying the settings for the %1 location").arg(d->locationsName.at(i)),
|
|
||||||
QMessageBox::Ok);
|
|
||||||
Q_UNUSED(ret);
|
|
||||||
}
|
|
||||||
restartWarn = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (restartWarn)
|
|
||||||
emit needRestart();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UserLocationsPage::clicked(int id)
|
|
||||||
{
|
|
||||||
const QString& currentDir = d->locations.at(id)->text();
|
|
||||||
const QString dir = QFileDialog::getExistingDirectory(this,
|
|
||||||
tr("Choose Location"),
|
|
||||||
currentDir,
|
|
||||||
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
|
||||||
if (!dir.isEmpty()) {
|
|
||||||
const QDir dd(dir);
|
|
||||||
d->locations.at(id)->setText(dd.canonicalPath());
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,48 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of the LXQt project. <http://lxqt.org>
|
|
||||||
* Copyright (C) 2015 Luís Pereira <luis.artur.pereira@gmail.com>
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with this library; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef USERLOCATIONSPAGE_H
|
|
||||||
#define USERLOCATIONSPAGE_H
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
class UserLocationsPagePrivate;
|
|
||||||
|
|
||||||
class UserLocationsPage : public QWidget {
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit UserLocationsPage(QWidget *parent = 0);
|
|
||||||
~UserLocationsPage();
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
|
||||||
void needRestart();
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
|
||||||
void restoreSettings();
|
|
||||||
void save();
|
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void clicked(int id);
|
|
||||||
|
|
||||||
private:
|
|
||||||
UserLocationsPagePrivate *d;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // USERLOCATIONSPAGE_H
|
|
@ -1,79 +0,0 @@
|
|||||||
project(lxqt-leave)
|
|
||||||
|
|
||||||
set(CPP_FILES
|
|
||||||
main.cpp
|
|
||||||
leavedialog.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(H_FILES
|
|
||||||
leavedialog.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(UI_FILES
|
|
||||||
leavedialog.ui
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Translations **********************************
|
|
||||||
lxqt_translate_desktop(DESKTOP_FILES
|
|
||||||
SOURCES
|
|
||||||
resources/lxqt-leave.desktop.in
|
|
||||||
resources/lxqt-hibernate.desktop.in
|
|
||||||
resources/lxqt-lockscreen.desktop.in
|
|
||||||
resources/lxqt-logout.desktop.in
|
|
||||||
resources/lxqt-reboot.desktop.in
|
|
||||||
resources/lxqt-shutdown.desktop.in
|
|
||||||
resources/lxqt-suspend.desktop.in
|
|
||||||
)
|
|
||||||
|
|
||||||
lxqt_translate_ts(lxqt-leave_QM_FILES
|
|
||||||
UPDATE_TRANSLATIONS
|
|
||||||
${UPDATE_TRANSLATIONS}
|
|
||||||
SOURCES
|
|
||||||
${CPP_FILES}
|
|
||||||
${UI_FILES}
|
|
||||||
${H_FILES}
|
|
||||||
INSTALL_DIR
|
|
||||||
"${LXQT_TRANSLATIONS_DIR}/${PROJECT_NAME}"
|
|
||||||
PULL_TRANSLATIONS
|
|
||||||
${PULL_TRANSLATIONS}
|
|
||||||
CLEAN_TRANSLATIONS
|
|
||||||
${CLEAN_TRANSLATIONS}
|
|
||||||
TRANSLATIONS_REPO
|
|
||||||
${TRANSLATIONS_REPO}
|
|
||||||
TRANSLATIONS_REFSPEC
|
|
||||||
${TRANSLATIONS_REFSPEC}
|
|
||||||
REPO_SUBDIR
|
|
||||||
"lxqt-session/${PROJECT_NAME}"
|
|
||||||
)
|
|
||||||
|
|
||||||
lxqt_app_translation_loader(lxqt-leave_QM_LOADER ${PROJECT_NAME})
|
|
||||||
#************************************************
|
|
||||||
|
|
||||||
|
|
||||||
add_executable(lxqt-leave
|
|
||||||
${CPP_FILES}
|
|
||||||
${DESKTOP_FILES}
|
|
||||||
${lxqt-leave_QM_LOADER}
|
|
||||||
${lxqt-leave_QM_FILES}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(lxqt-leave
|
|
||||||
lxqt
|
|
||||||
)
|
|
||||||
|
|
||||||
install(TARGETS
|
|
||||||
lxqt-leave
|
|
||||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
||||||
COMPONENT Runtime
|
|
||||||
)
|
|
||||||
install(FILES
|
|
||||||
${DESKTOP_FILES} DESTINATION
|
|
||||||
"${CMAKE_INSTALL_DATAROOTDIR}/applications"
|
|
||||||
COMPONENT Runtime
|
|
||||||
)
|
|
||||||
install(FILES
|
|
||||||
resources/lxqt-leave.1
|
|
||||||
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
|
|
||||||
COMPONENT Runtime
|
|
||||||
)
|
|
@ -1,103 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2015 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Paulo Lieuthier <paulolieuthier@gmail.com>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include "leavedialog.h"
|
|
||||||
|
|
||||||
LeaveDialog::LeaveDialog(QWidget* parent)
|
|
||||||
: QDialog(parent, Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint),
|
|
||||||
ui(new Ui::LeaveDialog),
|
|
||||||
mPower(new LXQt::Power(this)),
|
|
||||||
mPowerManager(new LXQt::PowerManager(this)),
|
|
||||||
mScreensaver(new LXQt::ScreenSaver(this))
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
|
|
||||||
/* This is a special dialog. We want to make it hard to ignore.
|
|
||||||
We make it:
|
|
||||||
* Undraggable
|
|
||||||
* Frameless
|
|
||||||
* Stays on top of all other windows
|
|
||||||
* Present in all desktops
|
|
||||||
*/
|
|
||||||
setWindowFlags((Qt::CustomizeWindowHint | Qt::FramelessWindowHint |
|
|
||||||
Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint));
|
|
||||||
|
|
||||||
ui->logoutButton->setEnabled(mPower->canAction(LXQt::Power::PowerLogout));
|
|
||||||
ui->rebootButton->setEnabled(mPower->canAction(LXQt::Power::PowerReboot));
|
|
||||||
ui->shutdownButton->setEnabled(mPower->canAction(LXQt::Power::PowerShutdown));
|
|
||||||
ui->suspendButton->setEnabled(mPower->canAction(LXQt::Power::PowerSuspend));
|
|
||||||
ui->hibernateButton->setEnabled(mPower->canAction(LXQt::Power::PowerHibernate));
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Make all the buttons have equal widths
|
|
||||||
*/
|
|
||||||
QVector<QToolButton*> buttons(6);
|
|
||||||
buttons[0] = ui->logoutButton;
|
|
||||||
buttons[1] = ui->lockscreenButton;
|
|
||||||
buttons[2] = ui->suspendButton;
|
|
||||||
buttons[3] = ui->hibernateButton;
|
|
||||||
buttons[4] = ui->rebootButton;
|
|
||||||
buttons[5] = ui->shutdownButton;
|
|
||||||
|
|
||||||
int maxWidth = 0;
|
|
||||||
const int N = buttons.size();
|
|
||||||
for (int i = 0; i < N; ++i) {
|
|
||||||
// Make sure that the button size is adjusted to the text width
|
|
||||||
buttons.at(i)->adjustSize();
|
|
||||||
maxWidth = qMax(maxWidth, buttons.at(i)->width());
|
|
||||||
}
|
|
||||||
for (int i = 0; i < N; ++i)
|
|
||||||
buttons.at(i)->setMinimumWidth(maxWidth);
|
|
||||||
|
|
||||||
connect(ui->logoutButton, &QPushButton::clicked, [&] { close(); mPowerManager->logout(); });
|
|
||||||
connect(ui->rebootButton, &QPushButton::clicked, [&] { close(); mPowerManager->reboot(); });
|
|
||||||
connect(ui->shutdownButton, &QPushButton::clicked, [&] { close(); mPowerManager->shutdown(); });
|
|
||||||
connect(ui->suspendButton, &QPushButton::clicked, [&] { close(); mPowerManager->suspend(); });
|
|
||||||
connect(ui->hibernateButton, &QPushButton::clicked, [&] { close(); mPowerManager->hibernate(); });
|
|
||||||
connect(ui->cancelButton, &QPushButton::clicked, [&] { close(); });
|
|
||||||
connect(ui->lockscreenButton, &QPushButton::clicked, [&] {
|
|
||||||
close();
|
|
||||||
QEventLoop loop;
|
|
||||||
connect(mScreensaver, &LXQt::ScreenSaver::done, &loop, &QEventLoop::quit);
|
|
||||||
mScreensaver->lockScreen();
|
|
||||||
loop.exec();
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
LeaveDialog::~LeaveDialog()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LeaveDialog::resizeEvent(QResizeEvent* event)
|
|
||||||
{
|
|
||||||
QRect screen = QApplication::desktop()->screenGeometry();
|
|
||||||
move((screen.width() - this->width()) / 2,
|
|
||||||
(screen.height() - this->height()) / 2);
|
|
||||||
|
|
||||||
}
|
|
@ -1,65 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXQt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org, http://lxde.org/
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2015 LXQt team
|
|
||||||
* Authors:
|
|
||||||
* Paulo Lieuthier <paulolieuthier@gmail.com>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#ifndef LEAVEDIALOG_H
|
|
||||||
#define LEAVEDIALOG_H
|
|
||||||
|
|
||||||
#include "ui_leavedialog.h"
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <LXQt/Power>
|
|
||||||
#include <LXQt/PowerManager>
|
|
||||||
#include <LXQt/ScreenSaver>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class LeaveDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
class LeaveDialog : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit LeaveDialog(QWidget *parent = 0);
|
|
||||||
~LeaveDialog();
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void resizeEvent(QResizeEvent* event);
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::LeaveDialog *ui;
|
|
||||||
// LXQt::Power is used to know if the actions are doable, while
|
|
||||||
// LXQt::PowerManager is used to trigger the actions, while
|
|
||||||
// obeying the user option to ask or not for confirmation
|
|
||||||
LXQt::Power *mPower;
|
|
||||||
LXQt::PowerManager *mPowerManager;
|
|
||||||
LXQt::ScreenSaver *mScreensaver;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,258 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>LeaveDialog</class>
|
|
||||||
<widget class="QDialog" name="LeaveDialog">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>456</width>
|
|
||||||
<height>372</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Leave</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QWidget" name="widget_2" native="true">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>170</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="cancelButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Cancel</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="dialog-cancel">
|
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><html><head/><body><p><span style=" font-size:12pt;">What do you want the computer to do?</span></p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::AutoText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QWidget" name="buttonsWidget" native="true">
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<property name="horizontalSpacing">
|
|
||||||
<number>12</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QToolButton" name="logoutButton">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::NoContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Logout</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="system-log-out">
|
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>64</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QToolButton" name="lockscreenButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Lock screen</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="system-lock-screen">
|
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>64</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QToolButton" name="suspendButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Suspend</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="system-suspend">
|
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>64</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QToolButton" name="hibernateButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Hibernate</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="system-suspend-hibernate">
|
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>64</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QToolButton" name="shutdownButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Shutdown</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="system-shutdown">
|
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>64</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QToolButton" name="rebootButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Reboot</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset theme="system-reboot">
|
|
||||||
<normaloff>.</normaloff>.</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>64</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="Line" name="line_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
<zorder>label</zorder>
|
|
||||||
<zorder>buttonsWidget</zorder>
|
|
||||||
<zorder>widget_2</zorder>
|
|
||||||
</widget>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>cancelButton</tabstop>
|
|
||||||
<tabstop>logoutButton</tabstop>
|
|
||||||
<tabstop>lockscreenButton</tabstop>
|
|
||||||
<tabstop>shutdownButton</tabstop>
|
|
||||||
<tabstop>rebootButton</tabstop>
|
|
||||||
<tabstop>suspendButton</tabstop>
|
|
||||||
<tabstop>hibernateButton</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@ -1,111 +0,0 @@
|
|||||||
/* BEGIN_COMMON_COPYRIGHT_HEADER
|
|
||||||
* (c)LGPL2+
|
|
||||||
*
|
|
||||||
* LXDE-Qt - a lightweight, Qt based, desktop toolset
|
|
||||||
* http://razor-qt.org
|
|
||||||
*
|
|
||||||
* Copyright: 2010-2011 Razor team
|
|
||||||
* Authors:
|
|
||||||
* Petr Vanek <petr@scribus.info>
|
|
||||||
*
|
|
||||||
* This program or library is free software; you can redistribute it
|
|
||||||
* and/or modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This library is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU Lesser General
|
|
||||||
* Public License along with this library; if not, write to the
|
|
||||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
||||||
* Boston, MA 02110-1301 USA
|
|
||||||
*
|
|
||||||
* END_COMMON_COPYRIGHT_HEADER */
|
|
||||||
|
|
||||||
#include <LXQt/SingleApplication>
|
|
||||||
#include <LXQt/PowerManager>
|
|
||||||
#include <LXQt/ScreenSaver>
|
|
||||||
#include <LXQt/Translator>
|
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QCommandLineParser>
|
|
||||||
#include <QCoreApplication>
|
|
||||||
|
|
||||||
#include "leavedialog.h"
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
LXQt::SingleApplication a(argc, argv);
|
|
||||||
LXQt::Translator::translateApplication();
|
|
||||||
|
|
||||||
LXQt::PowerManager powermanager(&a);
|
|
||||||
LXQt::ScreenSaver screensaver(&a);
|
|
||||||
|
|
||||||
QCommandLineParser parser;
|
|
||||||
parser.setApplicationDescription(QStringLiteral("lxqt-leave"));
|
|
||||||
parser.addHelpOption();
|
|
||||||
parser.addVersionOption();
|
|
||||||
|
|
||||||
QCommandLineOption logoutOption(QStringLiteral("logout"), QCoreApplication::translate("main", "Logout."));
|
|
||||||
parser.addOption(logoutOption);
|
|
||||||
|
|
||||||
QCommandLineOption lockscreenOption(QStringLiteral("lockscreen"), QCoreApplication::translate("main", "Lockscreen."));
|
|
||||||
parser.addOption(lockscreenOption);
|
|
||||||
|
|
||||||
QCommandLineOption suspendOption(QStringLiteral("suspend"), QCoreApplication::translate("main", "Suspend."));
|
|
||||||
parser.addOption(suspendOption);
|
|
||||||
|
|
||||||
QCommandLineOption hibernateOption(QStringLiteral("hibernate"), QCoreApplication::translate("main", "Hibernate."));
|
|
||||||
parser.addOption(hibernateOption);
|
|
||||||
|
|
||||||
QCommandLineOption shutdownOption(QStringLiteral("shutdown"), QCoreApplication::translate("main", "Shutdown."));
|
|
||||||
parser.addOption(shutdownOption);
|
|
||||||
|
|
||||||
QCommandLineOption rebootOption(QStringLiteral("reboot"), QCoreApplication::translate("main", "Reboot."));
|
|
||||||
parser.addOption(rebootOption);
|
|
||||||
|
|
||||||
parser.process(a);
|
|
||||||
|
|
||||||
if (parser.isSet(logoutOption)) {
|
|
||||||
powermanager.logout();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parser.isSet(lockscreenOption)) {
|
|
||||||
a.connect(&screensaver, &LXQt::ScreenSaver::done, &a, &LXQt::Application::quit);
|
|
||||||
screensaver.lockScreen();
|
|
||||||
a.exec();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parser.isSet(suspendOption)) {
|
|
||||||
powermanager.suspend();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parser.isSet(hibernateOption)) {
|
|
||||||
powermanager.hibernate();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parser.isSet(shutdownOption)) {
|
|
||||||
powermanager.shutdown();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parser.isSet(rebootOption)) {
|
|
||||||
powermanager.reboot();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
LeaveDialog dialog;
|
|
||||||
a.setActivationWindow(&dialog);
|
|
||||||
dialog.setFixedSize(dialog.sizeHint());
|
|
||||||
dialog.setGeometry(QStyle::alignedRect(Qt::LeftToRight,
|
|
||||||
Qt::AlignCenter,
|
|
||||||
dialog.sizeHint(),
|
|
||||||
qApp->desktop()->screenGeometry(QCursor::pos())));
|
|
||||||
return dialog.exec();
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=Hibernate
|
|
||||||
GenericName=Hibernate
|
|
||||||
Comment=hibernate the machine
|
|
||||||
Exec=lxqt-leave --hibernate
|
|
||||||
Icon=system-suspend-hibernate
|
|
||||||
Categories=System;X-Leave;
|
|
||||||
OnlyShowIn=LXQt;
|
|
||||||
|
|
||||||
#TRANSLATIONS_DIR=../translations
|
|
@ -1,49 +0,0 @@
|
|||||||
.TH lxqt-leave 1 "2015-11-05" "LXQt 0.10.0" "LXQt Leave Session Module"
|
|
||||||
.SH NAME
|
|
||||||
\fBlxqt-leave\fR \- Dialog to easily select logout, reboot, shutdown,
|
|
||||||
suspend, hibernate, and lock screen
|
|
||||||
.SH SYNOPSIS
|
|
||||||
\fBlxqt-leave\fR [\fIargument\fR]
|
|
||||||
.SH DESCRIPTION
|
|
||||||
\fBlxqt-leave\fR is a graphical Qt tool for easily triggering leave session
|
|
||||||
actions: logout, reboot, shutdown, hibernate, and lock screen. If run with
|
|
||||||
an argument, the dialog is not shown and the action is executed directly.
|
|
||||||
.SH OPTIONS
|
|
||||||
.PP
|
|
||||||
The options which apply to the \fBlxqt-leave\fR command are:
|
|
||||||
.PP
|
|
||||||
\fB\-\-logout\fR
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\fB\-\-lockscreen\fR
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\fB\-\-suspend\fR
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\fB\-\-hibernate\fR
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\fB\-\-shutdown\fR
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\fB\-\-reboot\fR
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\fB\-\-help\fR
|
|
||||||
.RE
|
|
||||||
.SH "REPORTING BUGS"
|
|
||||||
Report bugs to https://github.com/lxde/lxqt/issues
|
|
||||||
.SH "SEE ALSO"
|
|
||||||
.\" any module must refer to the session application, for module overview and initiation
|
|
||||||
\fBstartlxqt.1\fR LXQt session initialization and launch script (e.g. in \fB.xinitrc\fR)
|
|
||||||
.P
|
|
||||||
\fBlxqt-session.1\fR LXQt \fIoverview\fR and complete session environment
|
|
||||||
.P
|
|
||||||
\fBlxqt-config-session.1\fR LXQt default and autostart applications settings,
|
|
||||||
plus environment settings
|
|
||||||
.P
|
|
||||||
\fBlxqt-config.1\fR LXQt settings Configuration Center interface
|
|
||||||
.P
|
|
||||||
.SH AUTHOR
|
|
||||||
This manual page was created by \fBPaulo Lieuthier\fR \fI<paulolieuthier@gmail.com>\fR for the \fBLXQt\fR project.
|
|
@ -1,11 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Type=Application
|
|
||||||
Name=Leave
|
|
||||||
GenericName=Leave
|
|
||||||
Comment=Leave dialog
|
|
||||||
Exec=lxqt-leave
|
|
||||||
Icon=system-shutdown
|
|
||||||
Categories=System;X-Leave;
|
|
||||||
OnlyShowIn=LXQt;
|
|
||||||
|
|
||||||
#TRANSLATIONS_DIR=../translations
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user