253 changed files with 11738 additions and 0 deletions
@ -0,0 +1,31 @@
@@ -0,0 +1,31 @@
|
||||
# Maintainer: John Jenkins twodopeshaggy@gmail.com |
||||
|
||||
pkgname=mate-menu-git |
||||
pkgver=r453.3de5f14 |
||||
pkgrel=1 |
||||
pkgdesc="Mate Menu fork of MintMenu" |
||||
arch=('any') |
||||
url="https://bitbucket.org/ubuntu-mate/mate-menu/" |
||||
license=('GPL2') |
||||
makedepends=('git') |
||||
depends=('python2' 'python2-xlib' 'mate-applets' 'python2-distutils-extra' 'python2-setuptools') |
||||
source=('git+https://bitbucket.org/ubuntu-mate/mate-menu.git') |
||||
sha256sums=('SKIP') |
||||
|
||||
pkgver() { |
||||
cd "$srcdir/mate-menu" |
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" |
||||
} |
||||
|
||||
prepare() { |
||||
cd "$srcdir/mate-menu" |
||||
sed 's/python/python2/g' -i lib/mate-menu.py |
||||
sed 's/python/python2/g' -i lib/mate-menu-config.py |
||||
} |
||||
|
||||
package() { |
||||
cd "$srcdir/mate-menu" |
||||
python2 setup.py install --root="$pkgdir/" --optimize=1 |
||||
mkdir -p $pkgdir/usr/share/licenses/$pkgname |
||||
install -m 0644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING |
||||
} |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
@@ -0,0 +1,12 @@
|
||||
3de5f1498b79814a6d973b98afc9a9b3e095c5cf not-for-merge branch 'master' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
f106406eb382f16d10be49771b14eb643230faa2 not-for-merge tag '4.8.0' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
b8c5584b4d9af61a7dfdd074a15917bc53c6c82b not-for-merge tag '4.8.1' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
0c251c20eeb82a58f8d1c2aa0ba9ccb8da00b34c not-for-merge tag '4.8.2' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
8c2ef69ca93710ca09eeba14895c2452ab9e718b not-for-merge tag '5.5.2' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
cbb1262c15aea3531fbb8796f0ca8b9e8e22caf8 not-for-merge tag '5.6.0' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
5029abacef4035615a3b080c8f1f8f0cd0356586 not-for-merge tag '5.6.1' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
1801f5708b14b5acdb9bc27d066a6d05581895be not-for-merge tag '5.6.2' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
a7a7853020f43316613706e38770f3b8595615e4 not-for-merge tag '5.6.3' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
f98350a81530d67054b998076c7fa4a7cbfaa67d not-for-merge tag '5.6.4' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
fd2c08964784dc4e0332bf313e13a71d335c87c9 not-for-merge tag '5.6.5' of https://bitbucket.org/ubuntu-mate/mate-menu |
||||
f03edc5332953775ca3b42b2951a285515e90231 not-for-merge tag '5.6.5a' of https://bitbucket.org/ubuntu-mate/mate-menu |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
[core] |
||||
repositoryformatversion = 0 |
||||
filemode = true |
||||
bare = true |
||||
[remote "origin"] |
||||
url = https://bitbucket.org/ubuntu-mate/mate-menu.git |
||||
fetch = +refs/*:refs/* |
||||
mirror = true |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository. |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh |
||||
# |
||||
# An example hook script to check the commit log message taken by |
||||
# applypatch from an e-mail message. |
||||
# |
||||
# The hook should exit with non-zero status after issuing an |
||||
# appropriate message if it wants to stop the commit. The hook is |
||||
# allowed to edit the commit message file. |
||||
# |
||||
# To enable this hook, rename this file to "applypatch-msg". |
||||
|
||||
. git-sh-setup |
||||
test -x "$GIT_DIR/hooks/commit-msg" && |
||||
exec "$GIT_DIR/hooks/commit-msg" ${1+"$@"} |
||||
: |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh |
||||
# |
||||
# An example hook script to check the commit log message. |
||||
# Called by "git commit" with one argument, the name of the file |
||||
# that has the commit message. The hook should exit with non-zero |
||||
# status after issuing an appropriate message if it wants to stop the |
||||
# commit. The hook is allowed to edit the commit message file. |
||||
# |
||||
# To enable this hook, rename this file to "commit-msg". |
||||
|
||||
# Uncomment the below to add a Signed-off-by line to the message. |
||||
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg |
||||
# hook is more suited to it. |
||||
# |
||||
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') |
||||
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |
||||
|
||||
# This example catches duplicate Signed-off-by lines. |
||||
|
||||
test "" = "$(grep '^Signed-off-by: ' "$1" | |
||||
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { |
||||
echo >&2 Duplicate Signed-off-by lines. |
||||
exit 1 |
||||
} |
@ -0,0 +1,8 @@
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh |
||||
# |
||||
# An example hook script to prepare a packed repository for use over |
||||
# dumb transports. |
||||
# |
||||
# To enable this hook, rename this file to "post-update". |
||||
|
||||
exec git update-server-info |
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh |
||||
# |
||||
# An example hook script to verify what is about to be committed |
||||
# by applypatch from an e-mail message. |
||||
# |
||||
# The hook should exit with non-zero status after issuing an |
||||
# appropriate message if it wants to stop the commit. |
||||
# |
||||
# To enable this hook, rename this file to "pre-applypatch". |
||||
|
||||
. git-sh-setup |
||||
test -x "$GIT_DIR/hooks/pre-commit" && |
||||
exec "$GIT_DIR/hooks/pre-commit" ${1+"$@"} |
||||
: |
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh |
||||
# |
||||
# An example hook script to verify what is about to be committed. |
||||
# Called by "git commit" with no arguments. The hook should |
||||
# exit with non-zero status after issuing an appropriate message if |
||||
# it wants to stop the commit. |
||||
# |
||||
# To enable this hook, rename this file to "pre-commit". |
||||
|
||||
if git rev-parse --verify HEAD >/dev/null 2>&1 |
||||
then |
||||
against=HEAD |
||||
else |
||||
# Initial commit: diff against an empty tree object |
||||
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 |
||||
fi |
||||
|
||||
# If you want to allow non-ASCII filenames set this variable to true. |
||||
allownonascii=$(git config --bool hooks.allownonascii) |
||||
|
||||
# Redirect output to stderr. |
||||
exec 1>&2 |
||||
|
||||
# Cross platform projects tend to avoid non-ASCII filenames; prevent |
||||
# them from being added to the repository. We exploit the fact that the |
||||
# printable range starts at the space character and ends with tilde. |
||||
if [ "$allownonascii" != "true" ] && |
||||
# Note that the use of brackets around a tr range is ok here, (it's |
||||
# even required, for portability to Solaris 10's /usr/bin/tr), since |
||||
# the square bracket bytes happen to fall in the designated range. |
||||
test $(git diff --cached --name-only --diff-filter=A -z $against | |
||||
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 |
||||
then |
||||
cat <<\EOF |
||||
Error: Attempt to add a non-ASCII file name. |
||||
|
||||
This can cause problems if you want to work with people on other platforms. |
||||
|
||||
To be portable it is advisable to rename the file. |
||||
|
||||
If you know what you are doing you can disable this check using: |
||||
|
||||
git config hooks.allownonascii true |
||||
EOF |
||||
exit 1 |
||||
fi |
||||
|
||||
# If there are whitespace errors, print the offending file names and fail. |
||||
exec git diff-index --check --cached $against -- |
@ -0,0 +1,53 @@
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh |
||||
|
||||
# An example hook script to verify what is about to be pushed. Called by "git |
||||
# push" after it has checked the remote status, but before anything has been |
||||
# pushed. If this script exits with a non-zero status nothing will be pushed. |
||||
# |
||||
# This hook is called with the following parameters: |
||||
# |
||||
# $1 -- Name of the remote to which the push is being done |
||||
# $2 -- URL to which the push is being done |
||||
# |
||||
# If pushing without using a named remote those arguments will be equal. |
||||
# |
||||
# Information about the commits which are being pushed is supplied as lines to |
||||
# the standard input in the form: |
||||
# |
||||
# <local ref> <local sha1> <remote ref> <remote sha1> |
||||
# |
||||
# This sample shows how to prevent push of commits where the log message starts |
||||
# with "WIP" (work in progress). |
||||
|
||||
remote="$1" |
||||
url="$2" |
||||
|
||||
z40=0000000000000000000000000000000000000000 |
||||
|
||||
while read local_ref local_sha remote_ref remote_sha |
||||
do |
||||
if [ "$local_sha" = $z40 ] |
||||
then |
||||
# Handle delete |
||||
: |
||||
else |
||||
if [ "$remote_sha" = $z40 ] |
||||
then |
||||
# New branch, examine all commits |
||||
range="$local_sha" |
||||
else |
||||
# Update to existing branch, examine new commits |
||||
range="$remote_sha..$local_sha" |
||||
fi |
||||
|
||||
# Check for WIP commit |
||||
commit=`git rev-list -n 1 --grep '^WIP' "$range"` |
||||
if [ -n "$commit" ] |
||||
then |
||||
echo >&2 "Found WIP commit in $local_ref, not pushing" |
||||
exit 1 |
||||
fi |
||||
fi |
||||
done |
||||
|
||||
exit 0 |
@ -0,0 +1,169 @@
@@ -0,0 +1,169 @@
|
||||
#!/bin/sh |
||||
# |
||||
# Copyright (c) 2006, 2008 Junio C Hamano |
||||
# |
||||
# The "pre-rebase" hook is run just before "git rebase" starts doing |
||||
# its job, and can prevent the command from running by exiting with |
||||
# non-zero status. |
||||
# |
||||
# The hook is called with the following parameters: |
||||
# |
||||
# $1 -- the upstream the series was forked from. |
||||
# $2 -- the branch being rebased (or empty when rebasing the current branch). |
||||
# |
||||
# This sample shows how to prevent topic branches that are already |
||||
# merged to 'next' branch from getting rebased, because allowing it |
||||
# would result in rebasing already published history. |
||||
|
||||
publish=next |
||||
basebranch="$1" |
||||
if test "$#" = 2 |
||||
then |
||||
topic="refs/heads/$2" |
||||
else |
||||
topic=`git symbolic-ref HEAD` || |
||||
exit 0 ;# we do not interrupt rebasing detached HEAD |
||||
fi |
||||
|
||||
case "$topic" in |
||||
refs/heads/??/*) |
||||
;; |
||||
*) |
||||
exit 0 ;# we do not interrupt others. |
||||
;; |
||||
esac |
||||
|
||||
# Now we are dealing with a topic branch being rebased |
||||
# on top of master. Is it OK to rebase it? |
||||
|
||||
# Does the topic really exist? |
||||
git show-ref -q "$topic" || { |
||||
echo >&2 "No such branch $topic" |
||||
exit 1 |
||||
} |
||||
|
||||
# Is topic fully merged to master? |
||||
not_in_master=`git rev-list --pretty=oneline ^master "$topic"` |
||||
if test -z "$not_in_master" |
||||
then |
||||
echo >&2 "$topic is fully merged to master; better remove it." |
||||
exit 1 ;# we could allow it, but there is no point. |
||||
fi |
||||
|
||||
# Is topic ever merged to next? If so you should not be rebasing it. |
||||
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` |
||||
only_next_2=`git rev-list ^master ${publish} | sort` |
||||
if test "$only_next_1" = "$only_next_2" |
||||
then |
||||
not_in_topic=`git rev-list "^$topic" master` |
||||
if test -z "$not_in_topic" |
||||
then |
||||
echo >&2 "$topic is already up-to-date with master" |
||||
exit 1 ;# we could allow it, but there is no point. |
||||
else |
||||
exit 0 |
||||
fi |
||||
else |
||||
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` |
||||
/usr/bin/perl -e ' |
||||
my $topic = $ARGV[0]; |
||||
my $msg = "* $topic has commits already merged to public branch:\n"; |
||||
my (%not_in_next) = map { |
||||
/^([0-9a-f]+) /; |
||||
($1 => 1); |
||||
} split(/\n/, $ARGV[1]); |
||||
for my $elem (map { |
||||
/^([0-9a-f]+) (.*)$/; |
||||
[$1 => $2]; |
||||
} split(/\n/, $ARGV[2])) { |
||||
if (!exists $not_in_next{$elem->[0]}) { |
||||
if ($msg) { |
||||
print STDERR $msg; |
||||
undef $msg; |
||||
} |
||||
print STDERR " $elem->[1]\n"; |
||||
} |
||||
} |
||||
' "$topic" "$not_in_next" "$not_in_master" |
||||
exit 1 |
||||
fi |
||||
|
||||
exit 0 |
||||
|
||||
################################################################ |
||||
|
||||
This sample hook safeguards topic branches that have been |
||||
published from being rewound. |
||||
|
||||
The workflow assumed here is: |
||||
|
||||
* Once a topic branch forks from "master", "master" is never |
||||
merged into it again (either directly or indirectly). |
||||
|
||||
* Once a topic branch is fully cooked and merged into "master", |
||||
it is deleted. If you need to build on top of it to correct |
||||
earlier mistakes, a new topic branch is created by forking at |
||||
the tip of the "master". This is not strictly necessary, but |
||||
it makes it easier to keep your history simple. |
||||
|
||||
* Whenever you need to test or publish your changes to topic |
||||
branches, merge them into "next" branch. |
||||
|
||||
The script, being an example, hardcodes the publish branch name |
||||
to be "next", but it is trivial to make it configurable via |
||||
$GIT_DIR/config mechanism. |
||||
|
||||
With this workflow, you would want to know: |
||||
|
||||
(1) ... if a topic branch has ever been merged to "next". Young |
||||
topic branches can have stupid mistakes you would rather |
||||
clean up before publishing, and things that have not been |
||||
merged into other branches can be easily rebased without |
||||
affecting other people. But once it is published, you would |
||||
not want to rewind it. |
||||
|
||||
(2) ... if a topic branch has been fully merged to "master". |
||||
Then you can delete it. More importantly, you should not |
||||
build on top of it -- other people may already want to |
||||
change things related to the topic as patches against your |
||||
"master", so if you need further changes, it is better to |
||||
fork the topic (perhaps with the same name) afresh from the |
||||
tip of "master". |
||||
|
||||
Let's look at this example: |
||||
|
||||
o---o---o---o---o---o---o---o---o---o "next" |
||||
/ / / / |
||||
/ a---a---b A / / |
||||
/ / / / |
||||
/ / c---c---c---c B / |
||||
/ / / \ / |
||||
/ / / b---b C \ / |
||||
/ / / / \ / |
||||
---o---o---o---o---o---o---o---o---o---o---o "master" |
||||
|
||||
|
||||
A, B and C are topic branches. |
||||
|
||||
* A has one fix since it was merged up to "next". |
||||
|
||||
* B has finished. It has been fully merged up to "master" and "next", |
||||
and is ready to be deleted. |
||||
|
||||
* C has not merged to "next" at all. |
||||
|
||||
We would want to allow C to be rebased, refuse A, and encourage |
||||
B to be deleted. |
||||
|
||||
To compute (1): |
||||
|
||||
git rev-list ^master ^topic next |
||||
git rev-list ^master next |
||||
|
||||
if these match, topic has not merged in next at all. |
||||
|
||||
To compute (2): |
||||
|
||||
git rev-list master..topic |
||||
|
||||
if this is empty, it is fully merged to "master". |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh |
||||
# |
||||
# An example hook script to prepare the commit log message. |
||||
# Called by "git commit" with the name of the file that has the |
||||
# commit message, followed by the description of the commit |
||||
# message's source. The hook's purpose is to edit the commit |
||||
# message file. If the hook fails with a non-zero status, |
||||
# the commit is aborted. |
||||
# |
||||
# To enable this hook, rename this file to "prepare-commit-msg". |
||||
|
||||
# This hook includes three examples. The first comments out the |
||||
# "Conflicts:" part of a merge commit. |
||||
# |
||||
# The second includes the output of "git diff --name-status -r" |
||||
# into the message, just before the "git status" output. It is |
||||
# commented because it doesn't cope with --amend or with squashed |
||||
# commits. |
||||
# |
||||
# The third example adds a Signed-off-by line to the message, that can |
||||
# still be edited. This is rarely a good idea. |
||||
|
||||
case "$2,$3" in |
||||
merge,) |
||||
/usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; |
||||
|
||||
# ,|template,) |
||||
# /usr/bin/perl -i.bak -pe ' |
||||
# print "\n" . `git diff --cached --name-status -r` |
||||
# if /^#/ && $first++ == 0' "$1" ;; |
||||
|
||||
*) ;; |
||||
esac |
||||
|
||||
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') |
||||
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |
@ -0,0 +1,128 @@
@@ -0,0 +1,128 @@
|
||||
#!/bin/sh |
||||
# |
||||
# An example hook script to blocks unannotated tags from entering. |
||||
# Called by "git receive-pack" with arguments: refname sha1-old sha1-new |
||||
# |
||||
# To enable this hook, rename this file to "update". |
||||
# |
||||
# Config |
||||
# ------ |
||||
# hooks.allowunannotated |
||||
# This boolean sets whether unannotated tags will be allowed into the |
||||
# repository. By default they won't be. |
||||
# hooks.allowdeletetag |
||||
# This boolean sets whether deleting tags will be allowed in the |
||||
# repository. By default they won't be. |
||||
# hooks.allowmodifytag |
||||
# This boolean sets whether a tag may be modified after creation. By default |
||||
# it won't be. |
||||
# hooks.allowdeletebranch |
||||
# This boolean sets whether deleting branches will be allowed in the |
||||
# repository. By default they won't be. |
||||
# hooks.denycreatebranch |
||||
# This boolean sets whether remotely creating branches will be denied |
||||
# in the repository. By default this is allowed. |
||||
# |
||||
|
||||
# --- Command line |
||||
refname="$1" |
||||
oldrev="$2" |
||||
newrev="$3" |
||||
|
||||
# --- Safety check |
||||
if [ -z "$GIT_DIR" ]; then |
||||
echo "Don't run this script from the command line." >&2 |
||||
echo " (if you want, you could supply GIT_DIR then run" >&2 |
||||
echo " $0 <ref> <oldrev> <newrev>)" >&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then |
||||
echo "usage: $0 <ref> <oldrev> <newrev>" >&2 |
||||
exit 1 |
||||
fi |
||||
|
||||
# --- Config |
||||
allowunannotated=$(git config --bool hooks.allowunannotated) |
||||
allowdeletebranch=$(git config --bool hooks.allowdeletebranch) |
||||
denycreatebranch=$(git config --bool hooks.denycreatebranch) |
||||
allowdeletetag=$(git config --bool hooks.allowdeletetag) |
||||
allowmodifytag=$(git config --bool hooks.allowmodifytag) |
||||
|
||||
# check for no description |
||||
projectdesc=$(sed -e '1q' "$GIT_DIR/description") |
||||
case "$projectdesc" in |
||||
"Unnamed repository"* | "") |
||||
echo "*** Project description file hasn't been set" >&2 |
||||
exit 1 |
||||
;; |
||||
esac |
||||
|
||||
# --- Check types |
||||
# if $newrev is 0000...0000, it's a commit to delete a ref. |
||||
zero="0000000000000000000000000000000000000000" |
||||
if [ "$newrev" = "$zero" ]; then |
||||
newrev_type=delete |
||||
else |
||||
newrev_type=$(git cat-file -t $newrev) |
||||
fi |
||||
|
||||
case "$refname","$newrev_type" in |
||||
refs/tags/*,commit) |
||||
# un-annotated tag |
||||
short_refname=${refname##refs/tags/} |
||||
if [ "$allowunannotated" != "true" ]; then |
||||
echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 |
||||
echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 |
||||
exit 1 |
||||
fi |
||||
;; |
||||
refs/tags/*,delete) |
||||
# delete tag |
||||
if [ "$allowdeletetag" != "true" ]; then |
||||
echo "*** Deleting a tag is not allowed in this repository" >&2 |
||||
exit 1 |
||||
fi |
||||
;; |
||||
refs/tags/*,tag) |
||||
# annotated tag |
||||
if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 |
||||
then |
||||
echo "*** Tag '$refname' already exists." >&2 |
||||
echo "*** Modifying a tag is not allowed in this repository." >&2 |
||||
exit 1 |
||||
fi |
||||
;; |
||||
refs/heads/*,commit) |
||||
# branch |
||||
if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then |
||||
echo "*** Creating a branch is not allowed in this repository" >&2 |
||||
exit 1 |
||||
fi |
||||
;; |
||||
refs/heads/*,delete) |
||||
# delete branch |
||||
if [ "$allowdeletebranch" != "true" ]; then |
||||
echo "*** Deleting a branch is not allowed in this repository" >&2 |
||||
exit 1 |
||||
fi |
||||
;; |
||||
refs/remotes/*,commit) |
||||
# tracking branch |
||||
;; |
||||
refs/remotes/*,delete) |
||||
# delete tracking branch |
||||
if [ "$allowdeletebranch" != "true" ]; then |
||||
echo "*** Deleting a tracking branch is not allowed in this repository" >&2 |
||||
exit 1 |
||||
fi |
||||
;; |
||||
*) |
||||
# Anything else (is there anything else?) |
||||
echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 |
||||
exit 1 |
||||
;; |
||||
esac |
||||
|
||||
# --- Finished |
||||
exit 0 |
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
# git ls-files --others --exclude-from=.git/info/exclude |
||||
# Lines that start with '#' are comments. |
||||
# For a project mostly in C, the following would be a good set of |
||||
# exclude patterns (uncomment them if you want to use them): |
||||
# *.[oa] |
||||
# *~ |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,23 @@
@@ -0,0 +1,23 @@
|
||||
# pack-refs with: peeled fully-peeled |
||||
3de5f1498b79814a6d973b98afc9a9b3e095c5cf refs/heads/master |
||||
f106406eb382f16d10be49771b14eb643230faa2 refs/tags/4.8.0 |
||||
^2257fe4a0558e2a2d9764438ee0105dc9a326656 |
||||
b8c5584b4d9af61a7dfdd074a15917bc53c6c82b refs/tags/4.8.1 |
||||
^91bedba29d302f902484793825c093a7c9bef068 |
||||
0c251c20eeb82a58f8d1c2aa0ba9ccb8da00b34c refs/tags/4.8.2 |
||||
^b122139c5a5c1b1b03d3200f7d3991c8f84a1069 |
||||
8c2ef69ca93710ca09eeba14895c2452ab9e718b refs/tags/5.5.2 |
||||
cbb1262c15aea3531fbb8796f0ca8b9e8e22caf8 refs/tags/5.6.0 |
||||
^2a20aa7c85eed0324eb86f8113a722a731199cd7 |
||||
5029abacef4035615a3b080c8f1f8f0cd0356586 refs/tags/5.6.1 |
||||
^b12c03e0c2fcc67a08c1e8003269c6767375cd7e |
||||
1801f5708b14b5acdb9bc27d066a6d05581895be refs/tags/5.6.2 |
||||
^4efe8d0a3d40badd40b104c20cb09c3be516d076 |
||||
a7a7853020f43316613706e38770f3b8595615e4 refs/tags/5.6.3 |
||||
^d5a2e09a518914fb286075a053187ab147ca3839 |
||||
f98350a81530d67054b998076c7fa4a7cbfaa67d refs/tags/5.6.4 |
||||
^021e3401c43386d1981e19921fc248f2870d8e7f |
||||
fd2c08964784dc4e0332bf313e13a71d335c87c9 refs/tags/5.6.5 |
||||
^76fc5b45626203cc772a9af939ac972ff0d1a1ef |
||||
f03edc5332953775ca3b42b2951a285515e90231 refs/tags/5.6.5a |
||||
^b130be3ff9ad2fa8bad0360078a683c37528c04d |
Binary file not shown.
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
# Generated by makepkg 4.2.1 |
||||
# using fakeroot version 1.20.2 |
||||
# Mon Jun 1 19:07:34 UTC 2015 |
||||
pkgname = mate-menu-git |
||||
pkgver = r453.3de5f14-1 |
||||
pkgdesc = Mate Menu fork of MintMenu |
||||
url = https://bitbucket.org/ubuntu-mate/mate-menu/ |
||||
builddate = 1433185654 |
||||
packager = Unknown Packager |
||||
size = 2785280 |
||||
arch = any |
||||
license = GPL2 |
||||
depend = python2 |
||||
depend = python2-xlib |
||||
depend = mate-applets |
||||
depend = python2-distutils-extra |
||||
depend = python2-setuptools |
||||
makedepend = git |
||||
makepkgopt = strip |
||||
makepkgopt = docs |
||||
makepkgopt = !libtool |
||||
makepkgopt = !staticlibs |
||||
makepkgopt = emptydirs |
||||
makepkgopt = zipman |
||||
makepkgopt = purge |
||||
makepkgopt = !upx |
||||
makepkgopt = !debug |
@ -0,0 +1,39 @@
@@ -0,0 +1,39 @@
|
||||
#!/bin/python2 |
||||
|
||||
# Copyright (C) 2007-2014 Clement Lefebvre <root@linuxmint.com> |
||||
# Copyright (C) 2015 Martin Wimpress <code@ubuntu-mate.org> |
||||
# |
||||
# This program is free software; you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation; either version 2 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the |
||||
# Free Software Foundation, Inc., |
||||
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
import os |
||||
import sys |
||||
|
||||
if len(sys.argv) > 1: |
||||
if (sys.argv[1] in ["help", "h", "-?", "--help", "-h", "?"]): |
||||
print "MATE Menu - Advanced MATE Menu\n" |
||||
print "options:" |
||||
print " [--]help, [-]h Display this help." |
||||
print " [--]clean, [--]clear, [--]reset Restore settings to default.\n" |
||||
elif (sys.argv[1] in ["clean", "clear", "reset", "--clean", "--clear", "--reset"]): |
||||
os.system("gsettings reset-recursively org.mate.mate-menu") |
||||
os.system("gsettings reset-recursively org.mate.mate-menu.plugins.places") |
||||
os.system("gsettings reset-recursively org.mate.mate-menu.plugins.applications") |
||||
os.system("gsettings reset-recursively org.mate.mate-menu.plugins.recent") |
||||
os.system("gsettings reset-recursively org.mate.mate-menu.plugins.system_management") |
||||
os.system("rm -rf ~/.config/mate-menu") |
||||
print "All MATE Menu settings are now restored to default" |
||||
else: |
||||
os.system("/usr/lib/mate-menu/mate-menu.py") |
@ -0,0 +1,545 @@
@@ -0,0 +1,545 @@
|
||||
#!/usr/bin/env python2 |
||||
# -*- coding: utf-8 -*- |
||||
|
||||
# Copyright (C) 2007-2014 Clement Lefebvre <root@linuxmint.com> |
||||
# Copyright (C) 2015 Martin Wimpress <code@ubuntu-mate.org> |
||||
# |
||||
# This program is free software; you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation; either version 2 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the |
||||
# Free Software Foundation, Inc., |
||||
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
import gettext |
||||
import gi |
||||
import os |
||||
import subprocess |
||||
|
||||
gi.require_version("Gtk", "2.0") |
||||
|
||||
from gi.repository import Gtk, Gdk |
||||
import mate_menu.keybinding as keybinding |
||||
|
||||
# i18n |
||||
gettext.install("mate-menu", "/usr/share/locale") |
||||
|
||||
from mate_menu.easygsettings import EasyGSettings |
||||
|
||||
class mateMenuConfig( object ): |
||||
|
||||
def __init__( self ): |
||||
|
||||
self.data_path = os.path.join('/', 'usr', 'share', 'mate-menu' ) |
||||
|
||||
# Load glade file and extract widgets |
||||
self.builder = Gtk.Builder() |
||||
|
||||
self.builder.add_from_file (os.path.join(self.data_path, "mate-menu-config.glade" )) |
||||
self.mainWindow=self.builder.get_object("mainWindow") |
||||
|
||||
#i18n |
||||
self.mainWindow.set_title(_("Menu preferences")) |
||||
self.mainWindow.set_icon_from_file("/usr/share/mate-menu/icons/mate-logo.svg") |
||||
|
||||
self.builder.get_object("startWithFavorites").set_label(_("Always start with favorites pane")) |
||||
self.builder.get_object("showButtonIcon").set_label(_("Show button icon")) |
||||
self.builder.get_object("useCustomColors").set_label(_("Use custom colors")) |
||||
self.builder.get_object("showRecentPlugin").set_label(_("Show recent documents plugin")) |
||||
self.builder.get_object("showApplicationsPlugin").set_label(_("Show applications plugin")) |
||||
self.builder.get_object("showSystemPlugin").set_label(_("Show system plugin")) |
||||
self.builder.get_object("showPlacesPlugin").set_label(_("Show places plugin")) |
||||
|
||||
self.builder.get_object("showAppComments").set_label(_("Show application comments")) |
||||
self.builder.get_object("showCategoryIcons").set_label(_("Show category icons")) |
||||
self.builder.get_object("hover").set_label(_("Hover")) |
||||
self.builder.get_object("remember_filter").set_label(_("Remember the last category or search")) |
||||
self.builder.get_object("swapGeneric").set_label(_("Swap name and generic name")) |
||||
|
||||
self.builder.get_object("label11").set_text(_("Border width:")) |
||||
self.builder.get_object("label25").set_text(_("pixels")) |
||||
|
||||
self.builder.get_object("label8").set_text(_("Opacity:")) |
||||
self.builder.get_object("label9").set_text("%") |
||||
|
||||
self.builder.get_object("buttonTextLabel").set_text(_("Button text:")) |
||||
self.builder.get_object("label1").set_text(_("Options")) |
||||
self.builder.get_object("label23").set_text(_("Applications")) |
||||
|
||||
self.builder.get_object("colorsLabel").set_text(_("Theme")) |
||||
self.builder.get_object("favLabel").set_text(_("Favorites")) |
||||
self.builder.get_object("mainbuttonLabel").set_text(_("Main button")) |
||||
self.builder.get_object("pluginsLabel").set_text(_("Plugins")) |
||||
|
||||
self.builder.get_object("backgroundColorLabel").set_text(_("Background:")) |
||||
self.builder.get_object("headingColorLabel").set_text(_("Headings:")) |
||||
self.builder.get_object("borderColorLabel").set_text(_("Borders:")) |
||||
self.builder.get_object("themeLabel").set_text(_("Theme:")) |
||||
|
||||
#self.builder.get_object("applicationsLabel").set_text(_("Applications")) |
||||
#self.builder.get_object("favoritesLabel").set_text(_("Favorites")) |
||||
self.builder.get_object("numberColumnsLabel").set_text(_("Number of columns:")) |
||||
self.builder.get_object("iconSizeLabel").set_text(_("Icon size:")) |
||||
self.builder.get_object("iconSizeLabel2").set_text(_("Icon size:")) |
||||
self.builder.get_object("placesIconSizeLabel").set_text(_("Icon size:")) |
||||
self.builder.get_object("systemIconSizeLabel").set_text(_("Icon size:")) |
||||
self.builder.get_object("hoverLabel").set_text(_("Hover delay (ms):")) |
||||
self.builder.get_object("label4").set_text(_("Button icon:")) |
||||
self.builder.get_object("label5").set_text(_("Search command:")) |
||||
|
||||
self.builder.get_object("placesLabel").set_text(_("Places")) |
||||
self.builder.get_object("allowscrollbarcheckbutton").set_label(_("Allow Scrollbar")) |
||||
self.builder.get_object("showgtkbookmarkscheckbutton").set_label(_("Show GTK Bookmarks")) |
||||
self.builder.get_object("placesHeightEntryLabel").set_text(_("Height:")) |
||||
self.builder.get_object("defaultPlacesFrameLabel").set_text(_("Toggle Default Places:")) |
||||
self.builder.get_object("computercheckbutton").set_label(_("Computer")) |
||||
self.builder.get_object("homecheckbutton").set_label(_("Home Folder")) |
||||
self.builder.get_object("networkcheckbutton").set_label(_("Network")) |
||||
self.builder.get_object("desktopcheckbutton").set_label(_("Desktop")) |
||||
self.builder.get_object("trashcheckbutton").set_label(_("Trash")) |
||||
self.builder.get_object("customPlacesFrameLabel").set_text(_("Custom Places:")) |
||||
|
||||
self.builder.get_object("systemLabel").set_text(_("System")) |
||||
self.builder.get_object("allowscrollbarcheckbutton1").set_label(_("Allow Scrollbar")) |
||||
self.builder.get_object("systemHeightEntryLabel").set_text(_("Height:")) |
||||
self.builder.get_object("defaultItemsFrameLabel").set_text(_("Toggle Default Items:")) |
||||
self.builder.get_object("packagemanagercheckbutton").set_label(_("Package Manager")) |
||||
self.builder.get_object("controlcentercheckbutton").set_label(_("Control Center")) |
||||
self.builder.get_object("terminalcheckbutton").set_label(_("Terminal")) |
||||
self.builder.get_object("lockcheckbutton").set_label(_("Lock Screen")) |
||||
self.builder.get_object("logoutcheckbutton").set_label(_("Log Out")) |
||||
self.builder.get_object("quitcheckbutton").set_label(_("Quit")) |
||||
|
||||
self.editPlaceDialogTitle = (_("Edit Place")) |
||||
self.newPlaceDialogTitle = (_("New Place")) |
||||
self.folderChooserDialogTitle = (_("Select a folder")) |
||||
|
||||
self.startWithFavorites = self.builder.get_object( "startWithFavorites" ) |
||||
self.showAppComments = self.builder.get_object( "showAppComments" ) |
||||
self.showCategoryIcons = self.builder.get_object( "showCategoryIcons" ) |
||||
self.showRecentPlugin = self.builder.get_object( "showRecentPlugin" ) |
||||
self.showApplicationsPlugin = self.builder.get_object( "showApplicationsPlugin" ) |
||||
self.showSystemPlugin = self.builder.get_object( "showSystemPlugin" ) |
||||
self.showPlacesPlugin = self.builder.get_object( "showPlacesPlugin" ) |
||||
self.swapGeneric = self.builder.get_object("swapGeneric") |
||||
self.hover = self.builder.get_object( "hover" ) |
||||
self.hoverDelay = self.builder.get_object( "hoverDelay" ) |
||||
self.rememberFilter = self.builder.get_object( "remember_filter" ) |
||||
self.iconSize = self.builder.get_object( "iconSize" ) |
||||
self.favIconSize = self.builder.get_object( "favIconSize" ) |
||||
self.placesIconSize = self.builder.get_object( "placesIconSize" ) |
||||
self.systemIconSize = self.builder.get_object( "systemIconSize" ) |
||||
self.favCols = self.builder.get_object( "numFavCols" ) |
||||
self.borderWidth = self.builder.get_object( "borderWidth" ) |
||||
self.opacity = self.builder.get_object( "opacity" ) |
||||
self.useCustomColors = self.builder.get_object( "useCustomColors" ) |
||||
self.backgroundColor = self.builder.get_object( "backgroundColor" ) |
||||
self.borderColor = self.builder.get_object( "borderColor" ) |
||||
self.headingColor = self.builder.get_object( "headingColor" ) |
||||
self.backgroundColorLabel = self.builder.get_object( "backgroundColorLabel" ) |
||||
self.borderColorLabel = self.builder.get_object( "borderColorLabel" ) |
||||
self.headingColorLabel = self.builder.get_object( "headingColorLabel" ) |
||||
self.showButtonIcon = self.builder.get_object( "showButtonIcon" ) |
||||
self.buttonText = self.builder.get_object( "buttonText" ) |
||||
self.hotkeyWidget = keybinding.KeybindingWidget(_("Keyboard shortcut:") ) |
||||
table = self.builder.get_object( "main_table" ) |
||||
table.attach(self.hotkeyWidget, 0, 2, 2, 3, Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL, 0, 0) |
||||
self.buttonIcon = self.builder.get_object( "buttonIcon" ) |
||||
self.buttonIconChooser = self.builder.get_object( "button_icon_chooser" ) |
||||
self.image_filter = Gtk.FileFilter() |
||||
self.image_filter.set_name(_("Images")) |
||||
self.image_filter.add_pattern("*.png") |
||||
self.image_filter.add_pattern("*.jpg") |
||||
self.image_filter.add_pattern("*.jpeg") |
||||
self.image_filter.add_pattern("*.bmp") |
||||
self.image_filter.add_pattern("*.ico") |
||||
self.image_filter.add_pattern("*.xpm") |
||||
self.image_filter.add_pattern("*.svg") |
||||
self.buttonIconChooser.add_filter(self.image_filter) |
||||
self.buttonIconChooser.set_filter(self.image_filter) |
||||
self.buttonIconImage = self.builder.get_object("image_button_icon") |
||||
self.searchCommand = self.builder.get_object( "search_command" ) |
||||
self.computertoggle = self.builder.get_object( "computercheckbutton" ) |
||||
self.homefoldertoggle = self.builder.get_object( "homecheckbutton" ) |
||||
self.networktoggle = self.builder.get_object( "networkcheckbutton" ) |
||||
self.desktoptoggle = self.builder.get_object( "desktopcheckbutton" ) |
||||
self.trashtoggle = self.builder.get_object( "trashcheckbutton" ) |
||||
self.customplacestree = self.builder.get_object( "customplacestree" ) |
||||
self.allowPlacesScrollbarToggle = self.builder.get_object( "allowscrollbarcheckbutton" ) |
||||
self.showgtkbookmarksToggle = self.builder.get_object( "showgtkbookmarkscheckbutton" ) |
||||
self.placesHeightButton = self.builder.get_object( "placesHeightSpinButton" ) |
||||
if (self.allowPlacesScrollbarToggle.get_active() == False): |
||||
self.placesHeightButton.set_sensitive(False) |
||||
self.allowPlacesScrollbarToggle.connect("toggled", self.togglePlacesHeightEnabled ) |
||||
self.packageManagerToggle = self.builder.get_object( "packagemanagercheckbutton" ) |
||||
self.controlCenterToggle = self.builder.get_object( "controlcentercheckbutton" ) |
||||
self.terminalToggle = self.builder.get_object( "terminalcheckbutton" ) |
||||
self.lockToggle = self.builder.get_object( "lockcheckbutton" ) |
||||
self.logoutToggle = self.builder.get_object( "logoutcheckbutton" ) |
||||
self.quitToggle = self.builder.get_object( "quitcheckbutton" ) |
||||
self.allowSystemScrollbarToggle = self.builder.get_object( "allowscrollbarcheckbutton1" ) |
||||
self.systemHeightButton = self.builder.get_object( "systemHeightSpinButton" ) |
||||
if (self.allowSystemScrollbarToggle.get_active() == False): self.systemHeightButton.set_sensitive(False) |
||||
self.allowSystemScrollbarToggle.connect("toggled", self.toggleSystemHeightEnabled ) |
||||
self.builder.get_object( "closeButton" ).connect("clicked", Gtk.main_quit ) |
||||
|
||||
|
||||
self.settings = EasyGSettings( "org.mate.mate-menu" ) |
||||
self.settingsApplications = EasyGSettings( "org.mate.mate-menu.plugins.applications" ) |
||||
self.settingsPlaces = EasyGSettings( "org.mate.mate-menu.plugins.places" ) |
||||
self.settingsSystem = EasyGSettings( "org.mate.mate-menu.plugins.system_management" ) |
||||
|
||||
self.useCustomColors.connect( "toggled", self.toggleUseCustomColors ) |
||||
|
||||
self.bindGSettingsValueToWidget( self.settings, "bool", "start-with-favorites", self.startWithFavorites, "toggled", self.startWithFavorites.set_active, self.startWithFavorites.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "bool", "show-application-comments", self.showAppComments, "toggled", self.showAppComments.set_active, self.showAppComments.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "bool", "show-category-icons", self.showCategoryIcons, "toggled", self.showCategoryIcons.set_active, self.showCategoryIcons.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "bool", "categories-mouse-over", self.hover, "toggled", self.hover.set_active, self.hover.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "bool", "swap-generic-name", self.swapGeneric, "toggled", self.swapGeneric.set_active, self.swapGeneric.get_active ) |
||||
|
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "int", "category-hover-delay", self.hoverDelay, "value-changed", self.hoverDelay.set_value, self.hoverDelay.get_value ) |
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "int", "icon-size", self.iconSize, "value-changed", self.iconSize.set_value, self.iconSize.get_value ) |
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "int", "favicon-size", self.favIconSize, "value-changed", self.favIconSize.set_value, self.favIconSize.get_value ) |
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "int", "fav-cols", self.favCols, "value-changed", self.favCols.set_value, self.favCols.get_value ) |
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "bool", "remember-filter", self.rememberFilter, "toggled", self.rememberFilter.set_active, self.rememberFilter.get_active) |
||||
|
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "int", "icon-size", self.placesIconSize, "value-changed", self.placesIconSize.set_value, self.placesIconSize.get_value ) |
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "int", "icon-size", self.systemIconSize, "value-changed", self.systemIconSize.set_value, self.systemIconSize.get_value ) |
||||
|
||||
self.bindGSettingsValueToWidget( self.settings, "int", "border-width", self.borderWidth, "value-changed", self.borderWidth.set_value, self.borderWidth.get_value_as_int ) |
||||
self.bindGSettingsValueToWidget( self.settings, "int", "opacity", self.opacity, "value-changed", self.opacity.set_value, self.opacity.get_value_as_int ) |
||||
self.bindGSettingsValueToWidget( self.settings, "bool", "use-custom-color", self.useCustomColors, "toggled", self.useCustomColors.set_active, self.useCustomColors.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settings, "color", "custom-color", self.backgroundColor, "color-set", self.backgroundColor.set_color, self.getBackgroundColor ) |
||||
self.bindGSettingsValueToWidget( self.settings, "color", "custom-heading-color", self.headingColor, "color-set", self.headingColor.set_color, self.getHeadingColor ) |
||||
self.bindGSettingsValueToWidget( self.settings, "color", "custom-border-color", self.borderColor, "color-set", self.borderColor.set_color, self.getBorderColor ) |
||||
self.bindGSettingsValueToWidget( self.settings, "bool", "hide-applet-icon", self.showButtonIcon, "toggled", self.setShowButtonIcon, self.getShowButtonIcon ) |
||||
self.bindGSettingsValueToWidget( self.settings, "string", "applet-text", self.buttonText, "changed", self.buttonText.set_text, self.buttonText.get_text ) |
||||
self.bindGSettingsValueToWidget( self.settings, "string", "hot-key", self.hotkeyWidget, "accel-edited", self.hotkeyWidget.set_val, self.hotkeyWidget.get_val ) |
||||
self.bindGSettingsValueToWidget( self.settings, "string", "applet-icon", self.buttonIconChooser, "file-set", self.setButtonIcon, self.buttonIconChooser.get_filename ) |
||||
self.bindGSettingsValueToWidget( self.settingsApplications, "string", "search-command", self.searchCommand, "changed", self.searchCommand.set_text, self.searchCommand.get_text ) |
||||
|
||||
self.getPluginsToggle() |
||||
self.showRecentPlugin.connect("toggled", self.setPluginsLayout ) |
||||
self.showApplicationsPlugin.connect("toggled", self.setPluginsLayout ) |
||||
self.showSystemPlugin.connect("toggled", self.setPluginsLayout ) |
||||
self.showPlacesPlugin.connect("toggled", self.setPluginsLayout ) |
||||
|
||||
|
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "bool", "show-computer", self.computertoggle, "toggled", self.computertoggle.set_active, self.computertoggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "bool", "show-home-folder", self.homefoldertoggle, "toggled", self.homefoldertoggle.set_active, self.homefoldertoggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "bool", "show-network", self.networktoggle, "toggled", self.networktoggle.set_active, self.networktoggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "bool", "show-desktop", self.desktoptoggle, "toggled", self.desktoptoggle.set_active, self.desktoptoggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "bool", "show-trash", self.trashtoggle, "toggled", self.trashtoggle.set_active, self.trashtoggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "int", "height", self.placesHeightButton, "value-changed", self.placesHeightButton.set_value, self.placesHeightButton.get_value_as_int ) |
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "bool", "allow-scrollbar", self.allowPlacesScrollbarToggle, "toggled", self.allowPlacesScrollbarToggle.set_active, self.allowPlacesScrollbarToggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsPlaces, "bool", "show-gtk-bookmarks", self.showgtkbookmarksToggle, "toggled", self.showgtkbookmarksToggle.set_active, self.showgtkbookmarksToggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "bool", "show-package-manager", self.packageManagerToggle, "toggled", self.packageManagerToggle.set_active, self.packageManagerToggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "bool", "show-control-center", self.controlCenterToggle, "toggled", self.controlCenterToggle.set_active, self.controlCenterToggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "bool", "show-terminal", self.terminalToggle, "toggled", self.terminalToggle.set_active, self.terminalToggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "bool", "show-lock-screen", self.lockToggle, "toggled", self.lockToggle.set_active, self.lockToggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "bool", "show-logout", self.logoutToggle, "toggled", self.logoutToggle.set_active, self.logoutToggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "bool", "show-quit", self.quitToggle, "toggled", self.quitToggle.set_active, self.quitToggle.get_active ) |
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "int", "height", self.systemHeightButton, "value-changed", self.systemHeightButton.set_value, self.systemHeightButton.get_value_as_int ) |
||||
self.bindGSettingsValueToWidget( self.settingsSystem, "bool", "allow-scrollbar", self.allowSystemScrollbarToggle, "toggled", self.allowSystemScrollbarToggle.set_active, self.allowSystemScrollbarToggle.get_active ) |
||||
|
||||
self.customplacepaths = self.settingsPlaces.get( "list-string", "custom-paths" ) |
||||
self.customplacenames = self.settingsPlaces.get( "list-string", "custom-names" ) |
||||
|
||||
self.customplacestreemodel = Gtk.ListStore( str, str) |
||||
self.cell = Gtk.CellRendererText() |
||||
|
||||
for count in range( len(self.customplacepaths) ): |
||||
self.customplacestreemodel.append( [ self.customplacenames[count], self.customplacepaths[count] ] ) |
||||
|
||||
self.customplacestreemodel.connect("row-inserted", self.updatePlacesGSettings) |
||||
self.customplacestreemodel.connect("row-deleted", self.updatePlacesGSettings) |
||||
self.customplacestreemodel.connect("rows-reordered", self.updatePlacesGSettings) |
||||
self.customplacestreemodel.connect("row-changed", self.updatePlacesGSettings) |
||||
self.customplacestree.set_model( self.customplacestreemodel ) |
||||
self.namescolumn = Gtk.TreeViewColumn( _("Name"), self.cell, text = 0 ) |
||||
self.placescolumn = Gtk.TreeViewColumn( _("Path"), self.cell, text = 1 ) |
||||
self.customplacestree.append_column( self.namescolumn ) |
||||
self.customplacestree.append_column( self.placescolumn ) |
||||
self.builder.get_object("newButton").connect("clicked", self.newPlace) |
||||
self.builder.get_object("editButton").connect("clicked", self.editPlace) |
||||
self.builder.get_object("upButton").connect("clicked", self.moveUp) |
||||
self.builder.get_object("downButton").connect("clicked", self.moveDown) |
||||
self.builder.get_object("removeButton").connect("clicked", self.removePlace) |
||||
|
||||
#Detect themes and show theme here |
||||
theme_name = self.settings.get ("string", "theme-name") |
||||
process = subprocess.Popen(['find', '/usr/share/themes', '-name', 'gtkrc'], stdout=subprocess.PIPE) |
||||
out, err = process.communicate() |
||||
themes = out.split("\n") |
||||
model = Gtk.ListStore(str, str) |
||||
self.builder.get_object("themesCombo").set_model(model) |
||||
selected_theme = model.append([_("Desktop theme"), "default"]) |
||||
for theme in themes: |
||||
if theme.startswith("/usr/share/themes") and theme.endswith("/gtk-2.0/gtkrc"): |
||||
theme = theme.replace("/usr/share/themes/", "") |
||||
theme = theme.replace("gtk-2.0", "") |
||||
theme = theme.replace("gtkrc", "") |
||||
theme = theme.replace("/", "") |
||||
theme = theme.strip() |
||||
iter = model.append([theme, theme]) |
||||
if theme == theme_name: |
||||
selected_theme = iter |
||||
self.builder.get_object("themesCombo").set_active_iter(selected_theme) |
||||
self.builder.get_object("themesCombo").connect("changed", self.set_theme) |
||||
|
||||
self.toggleUseCustomColors(self.useCustomColors) |
||||
self.mainWindow.present() |
||||
self.getBackgroundColor() |
||||
|
||||
def set_theme(self, widget): |
||||
model = widget.get_model() |
||||
iter = widget.get_active_iter() |
||||
theme_name = model.get_value(iter, 1) |
||||
self.settings.set( "string", "theme-name", theme_name) |
||||
|
||||
def getPluginsToggle(self): |
||||
array = self.settings.get ("list-string", "plugins-list") |
||||
if "recent" in array: |
||||
self.showRecentPlugin.set_active(True) |
||||
else: |
||||
self.showRecentPlugin.set_active(False) |
||||
if "applications" in array: |
||||
self.showApplicationsPlugin.set_active(True) |
||||
else: |
||||
self.showApplicationsPlugin.set_active(False) |
||||
if "system_management" in array: |
||||
self.showSystemPlugin.set_active(True) |
||||
else: |
||||
self.showSystemPlugin.set_active(False) |
||||
if "places" in array: |
||||
self.showPlacesPlugin.set_active(True) |
||||
else: |
||||
self.showPlacesPlugin.set_active(False) |
||||
|
||||
def setPluginsLayout (self, widget): |
||||
visiblePlugins = [] |
||||
if self.showPlacesPlugin.get_active(): |
||||
visiblePlugins.append("places") |
||||
if self.showSystemPlugin.get_active(): |
||||
visiblePlugins.append("system_management") |
||||
if self.showApplicationsPlugin.get_active(): |
||||
if self.showPlacesPlugin.get_active() or self.showSystemPlugin.get_active(): |
||||
visiblePlugins.append("newpane") |
||||
visiblePlugins.append("applications") |
||||
if self.showRecentPlugin.get_active(): |
||||
if self.showApplicationsPlugin.get_active() or self.showPlacesPlugin.get_active() or self.showSystemPlugin.get_active(): |
||||
visiblePlugins.append("newpane") |
||||
visiblePlugins.append("recent") |
||||
self.settings.set ("list-string", "plugins-list", visiblePlugins) |
||||
|
||||
def setShowButtonIcon( self, value ): |
||||
self.showButtonIcon.set_active(not value ) |
||||
|
||||
def setButtonIcon( self, value ): |
||||
self.buttonIconChooser.set_filename(value) |
||||
self.buttonIconImage.set_from_file(value) |
||||
|
||||
def getShowButtonIcon( self ): |
||||
return not self.showButtonIcon.get_active() |
||||
|
||||
def bindGSettingsValueToWidget( self, settings, setting_type, key, widget, changeEvent, setter, getter ): |
||||
settings.notifyAdd( key, self.callSetter, args = [ setting_type, setter ] ) |
||||
if setting_type == "color": |
||||
setter( Gdk.color_parse( settings.get( setting_type, key ) ) ) |
||||
else: |
||||
setter( settings.get( setting_type, key ) ) |
||||
widget.connect( changeEvent, lambda *args: self.callGetter( settings, setting_type, key, getter ) ) |
||||
|
||||
def callSetter( self, settings, key, args ): |
||||
if args[0] == "bool": |
||||
args[1]( settings.get_boolean(key) ) |
||||
elif args[0] == "string": |
||||
args[1]( settings.get_string(key) ) |
||||
elif args[0] == "int": |
||||
args[1]( settings.get_int(key) ) |
||||
elif args[0] == "color": |
||||
args[1]( Gdk.color_parse( settings.get_string(key) ) ) |
||||
|
||||
def callGetter( self, settings, setting_type, key, getter ): |
||||
if (setting_type == "int"): |
||||
settings.set( setting_type, key, int(getter())) |
||||
else: |
||||
settings.set( setting_type, key, getter()) |
||||
|
||||
def toggleUseCustomColors( self, widget ): |
||||
self.backgroundColor.set_sensitive( widget.get_active() ) |
||||
self.borderColor.set_sensitive( widget.get_active() ) |
||||
self.headingColor.set_sensitive( widget.get_active() ) |
||||
self.backgroundColorLabel.set_sensitive( widget.get_active() ) |
||||
self.borderColorLabel.set_sensitive( widget.get_active() ) |
||||
self.headingColorLabel.set_sensitive( widget.get_active() ) |
||||
|
||||
def getBackgroundColor( self ): |
||||
color = Gdk.Color(0,0,0) |
||||
self.backgroundColor.get_color(color) |
||||
return self.gdkColorToString( color ) |
||||
|
||||
def getBorderColor( self ): |
||||
color = Gdk.Color(0,0,0) |
||||
self.borderColor.get_color(color) |
||||
return self.gdkColorToString( color ) |
||||
|
||||
def getHeadingColor( self ): |
||||
color = Gdk.Color(0,0,0) |
||||
self.headingColor.get_color(color) |
||||
return self.gdkColorToString( color ) |
||||
|
||||
def gdkColorToString( self, gdkColor ): |
||||
return "#%.2X%.2X%.2X" % ( gdkColor.red / 256, gdkColor.green / 256, gdkColor.blue / 256 ) |
||||
|
||||
def moveUp( self, upButton ): |
||||
|
||||
treeselection = self.customplacestree.get_selection() |
||||
currentiter = (treeselection.get_selected())[1] |
||||
|
||||
if ( treeselection != None ): |
||||
|
||||
lagiter = self.customplacestreemodel.get_iter_first() |
||||
nextiter = self.customplacestreemodel.get_iter_first() |
||||
|
||||
while ( (self.customplacestreemodel.get_path(nextiter) != self.customplacestreemodel.get_path(currentiter)) & (nextiter != None)): |
||||
lagiter = nextiter |
||||
nextiter = self.customplacestreemodel.iter_next(nextiter) |
||||
|
||||
if (nextiter != None): |
||||
self.customplacestreemodel.swap(currentiter, lagiter) |
||||
|
||||
return |
||||
|
||||
def newPlace(self, newButton): |
||||
self.builder.get_object("label2").set_text(_("Name:")) |
||||
self.builder.get_object("label1").set_text(_("Path:")) |
||||
newPlaceDialog = self.builder.get_object( "editPlaceDialog" ) |
||||
folderChooserDialog = self.builder.get_object( "fileChooserDialog" ) |
||||
newPlaceDialog.set_transient_for(self.mainWindow) |
||||
newPlaceDialog.set_icon_from_file("/usr/share/mate-menu/icons/mate-logo.svg") |
||||
newPlaceDialog.set_title(self.newPlaceDialogTitle) |
||||
folderChooserDialog.set_title(self.folderChooserDialogTitle) |
||||
newPlaceDialog.set_default_response(Gtk.ResponseType.OK) |
||||
newPlaceName = self.builder.get_object( "nameEntryBox" ) |
||||
newPlacePath = self.builder.get_object( "pathEntryBox" ) |
||||
folderButton = self.builder.get_object( "folderButton" ) |
||||
def chooseFolder(folderButton): |
||||
currentPath = newPlacePath.get_text() |
||||
if (currentPath!=""): |
||||
folderChooserDialog.select_filename(currentPath) |
||||
response = folderChooserDialog.run() |
||||
folderChooserDialog.hide() |
||||
if (response == Gtk.ResponseType.OK): |
||||
newPlacePath.set_text( folderChooserDialog.get_filenames()[0] ) |
||||
folderButton.connect("clicked", chooseFolder) |
||||
|
||||
response = newPlaceDialog.run() |
||||
newPlaceDialog.hide() |
||||
if (response == Gtk.ResponseType.OK ): |
||||
name = newPlaceName.get_text() |
||||
path = newPlacePath.get_text() |
||||
if (name != "" and path !=""): |
||||
self.customplacestreemodel.append( (name, path) ) |
||||
|
||||
def editPlace(self, editButton): |
||||
self.builder.get_object("label2").set_text(_("Name:")) |
||||
self.builder.get_object("label1").set_text(_("Path:")) |
||||
editPlaceDialog = self.builder.get_object( "editPlaceDialog" ) |
||||
folderChooserDialog = self.builder.get_object( "fileChooserDialog" ) |
||||
editPlaceDialog.set_transient_for(self.mainWindow) |
||||
editPlaceDialog.set_icon_from_file("/usr/share/mate-menu/icons/mate-logo.svg") |
||||
editPlaceDialog.set_title(self.editPlaceDialogTitle) |
||||
folderChooserDialog.set_title(self.folderChooserDialogTitle) |
||||
editPlaceDialog.set_default_response(Gtk.ResponseType.OK) |
||||
editPlaceName = self.builder.get_object( "nameEntryBox" ) |
||||
editPlacePath = self.builder.get_object( "pathEntryBox" ) |
||||
folderButton = self.builder.get_object( "folderButton" ) |
||||
treeselection = self.customplacestree.get_selection() |
||||
currentiter = (treeselection.get_selected())[1] |
||||
|
||||
if (currentiter != None): |
||||
|
||||
initName = self.customplacestreemodel.get_value(currentiter, 0) |
||||
initPath = self.customplacestreemodel.get_value(currentiter, 1) |
||||
|
||||
editPlaceName.set_text(initName) |
||||
editPlacePath.set_text(initPath) |
||||
def chooseFolder(folderButton): |
||||
currentPath = editPlacePath.get_text() |
||||
if (currentPath!=""): |
||||
folderChooserDialog.select_filename(currentPath) |
||||
response = folderChooserDialog.run() |
||||
folderChooserDialog.hide() |
||||
if (response == Gtk.ResponseType.OK): |
||||
editPlacePath.set_text( folderChooserDialog.get_filenames()[0] ) |
||||
folderButton.connect("clicked", chooseFolder) |
||||
response = editPlaceDialog.run() |
||||
editPlaceDialog.hide() |
||||
if (response == Gtk.ResponseType.OK): |
||||
name = editPlaceName.get_text() |
||||
path = editPlacePath.get_text() |
||||
if (name != "" and path != ""): |
||||
self.customplacestreemodel.set_value(currentiter, 0, name) |
||||
self.customplacestreemodel.set_value(currentiter, 1, path) |
||||
|
||||
def moveDown(self, downButton): |
||||
|
||||
treeselection = self.customplacestree.get_selection() |
||||
currentiter = (treeselection.get_selected())[1] |
||||
|
||||
nextiter = self.customplacestreemodel.iter_next(currentiter) |
||||
|
||||
if (nextiter != None): |
||||
self.customplacestreemodel.swap(currentiter, nextiter) |
||||
|
||||
return |
||||
|
||||
|
||||
def removePlace(self, removeButton): |
||||
|
||||
treeselection = self.customplacestree.get_selection() |
||||
currentiter = (treeselection.get_selected())[1] |
||||
|
||||
if (currentiter != None): |
||||
self.customplacestreemodel.remove(currentiter) |
||||
|
||||
return |
||||
|
||||
def togglePlacesHeightEnabled(self, toggle): |
||||
if (toggle.get_active() == True): |
||||
self.placesHeightButton.set_sensitive(True) |
||||
else: |
||||
self.placesHeightButton.set_sensitive(False) |
||||
|
||||
def toggleSystemHeightEnabled(self, toggle): |
||||
if (toggle.get_active() == True): |
||||
self.systemHeightButton.set_sensitive(True) |
||||
else: |
||||
self.systemHeightButton.set_sensitive(False) |
||||
|
||||
def updatePlacesGSettings(self, treemodel, path, iter = None, new_order = None): |
||||
|
||||
# Do only if not partway though an append operation; Append = insert+change+change and each creates a signal |
||||
if ((iter == None) or (self.customplacestreemodel.get_value(iter, 1) != None)): |
||||
treeiter = self.customplacestreemodel.get_iter_first() |
||||
customplacenames = [ ] |
||||
customplacepaths = [ ] |
||||
while( treeiter != None ): |
||||
customplacenames = customplacenames + [ self.customplacestreemodel.get_value(treeiter, 0 ) ] |
||||
customplacepaths = customplacepaths + [ self.customplacestreemodel.get_value(treeiter, 1 ) ] |
||||
treeiter = self.customplacestreemodel.iter_next(treeiter) |
||||
self.settingsPlaces.set( "list-string", "custom-paths", customplacepaths) |
||||
self.settingsPlaces.set( "list-string", "custom-names", customplacenames) |
||||
|
||||
|
||||
window = mateMenuConfig() |
||||
Gtk.main() |
@ -0,0 +1,820 @@
@@ -0,0 +1,820 @@
|
||||
#!/usr/bin/env python2 |
||||
# -*- coding: utf-8 -*- |
||||
|
||||
# Copyright (C) 2007-2014 Clement Lefebvre <root@linuxmint.com> |
||||
# Copyright (C) 2015 Martin Wimpress <code@ubuntu-mate.org> |
||||
# |
||||
# This program is free software; you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation; either version 2 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the |
||||
# Free Software Foundation, Inc., |
||||
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. |
||||
|
||||
__VERSION__='5.6.5a' |
||||
|
||||
import ctypes |
||||
import gc |
||||
import gi |
||||
import gettext |
||||
import os |
||||
import platform |
||||
import subprocess |
||||
import sys |
||||
import traceback |
||||
|
||||
gi.require_version("Gtk", "2.0") |
||||
|
||||
from ctypes import * |
||||
from gi.repository import Gtk, GdkPixbuf, Gdk, GObject |
||||
from gi.repository import MatePanelApplet |
||||
from gi.repository import Gio |
||||
|
||||
try: |
||||
import xdg.Config |
||||
import mate_menu.keybinding as keybinding |
||||
import mate_menu.pointerMonitor as pointerMonitor |
||||
except Exception, e: |
||||
print e |
||||
sys.exit( 1 ) |
||||
|
||||
GObject.threads_init() |
||||
|
||||
gdk = CDLL("libgdk-x11-2.0.so.0") |
||||
|
||||
# Rename the process |
||||
architecture = platform.uname()[4] |
||||
if architecture in 'x86_64': |
||||
libc = CDLL('libc.so.6') |
||||
libc.prctl(15, 'mate-menu', 0, 0, 0) |
||||
else: |
||||
import dl |
||||
if os.path.exists('/lib/libc.so.6'): |
||||
libc = dl.open('/lib/libc.so.6') |
||||
libc.call('prctl', 15, 'mate-menu', 0, 0, 0) |
||||
elif os.path.exists('/lib/i386-linux-gnu/libc.so.6'): |
||||
libc = dl.open('/lib/i386-linux-gnu/libc.so.6') |
||||
libc.call('prctl', 15, 'mate-menu', 0, 0, 0) |
||||
|
||||
# i18n |
||||
gettext.install("mate-menu", "/usr/share/locale") |
||||
|
||||
NAME = _("Menu") |
||||
|
||||
xdg.Config.setWindowManager('MATE') |
||||
|
||||
from mate_menu.execute import * |
||||
|
||||
class MainWindow( object ): |
||||
"""This is the main class for the application""" |
||||
|
||||
def __init__( self, toggleButton, settings, keybinder ): |
||||
|
||||
self.settings = settings |
||||
self.keybinder = keybinder |
||||
self.data_path = os.path.join( '/', 'usr', 'share', 'mate-menu' ) |
||||
self.icon = "/usr/share/mate-menu/icons/mate-logo.svg" |
||||
|
||||
self.toggle = toggleButton |
||||
# Load UI file and extract widgets |
||||
builder = Gtk.Builder() |
||||
builder.add_from_file(os.path.join( self.data_path, "mate-menu.glade" )) |
||||
self.window = builder.get_object( "mainWindow" ) |
||||
self.paneholder = builder.get_object( "paneholder" ) |
||||
self.border = builder.get_object( "border" ) |
||||
|
||||
builder.connect_signals(self) |
||||
|
||||
self.panesToColor = [ ] |
||||
self.headingsToColor = [ ] |
||||
|
||||
self.window.connect( "key-press-event", self.onKeyPress ) |
||||
self.window.connect( "focus-in-event", self.onFocusIn ) |
||||
self.loseFocusId = self.window.connect( "focus-out-event", self.onFocusOut ) |
||||
self.loseFocusBlocked = False |
||||
|
||||
self.window.stick() |
||||
|
||||
plugindir = os.path.join( os.path.expanduser( "~" ), ".config/mate-menu/plugins" ) |
||||
sys.path.append( plugindir ) |
||||
|
||||
self.panelSettings = Gio.Settings.new("org.mate.panel") |
||||
self.panelSettings.connect( "changed::tooltips-enabled", self.toggleTooltipsEnabled ) |
||||
|
||||
self.settings.connect( "changed::plugins-list", self.RegenPlugins ) |
||||
self.settings.connect( "changed::start-with-favorites", self.toggleStartWithFavorites ) |
||||
self.settings.connect( "changed::tooltips-enabled", self.toggleTooltipsEnabled ) |
||||
self.settings.connect( "changed::use-custom-color", self.toggleUseCustomColor ) |
||||
self.settings.connect( "changed::custom-border-color", self.toggleCustomBorderColor ) |
||||
self.settings.connect( "changed::custom-heading-color", self.toggleCustomHeadingColor ) |
||||
self.settings.connect( "changed::custom-color", self.toggleCustomBackgroundColor ) |
||||
self.settings.connect( "changed::border-width", self.toggleBorderWidth ) |
||||
self.settings.connect( "changed::opacity", self.toggleOpacity ) |
||||
|
||||
self.getSetGSettingEntries() |
||||
|
||||
self.tooltips = Gtk.Tooltips() |
||||
if self.globalEnableTooltips and self.enableTooltips: |
||||
self.tooltips.enable() |
||||
else: |
||||
self.tooltips.disable() |
||||
|
||||
self.PopulatePlugins(); |
||||
self.firstTime = True; |
||||
|
||||
def on_window1_destroy (self, widget, data=None): |
||||
Gtk.main_quit() |
||||
sys.exit(0) |
||||
|
||||
def wakePlugins( self ): |
||||
# Call each plugin and let them know we're showing up |