Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FUSS
fuss-software
Commits
55fa255e
Commit
55fa255e
authored
May 05, 2020
by
Elena Grandi
Browse files
Removed fuss-app-indicator: no longer used and no longer works.
parent
0e398571
Changes
12
Hide whitespace changes
Inline
Side-by-side
debian/changelog
View file @
55fa255e
fuss-software (10.0.5) UNRELEASED; urgency=medium
* Removed fuss-app-indicator: no longer used and no longer works.
-- Elena Grandi <valhalla@debian.org> Tue, 05 May 2020 10:51:54 +0200
fuss-software (10.0.4) unstable; urgency=medium
* Install musescore instead of musescore3
...
...
debian/fuss-children.install
View file @
55fa255e
desktop
-
files
/
fuss
-
children
-
indicator
.
desktop
etc
/
xdg
/
autostart
/
menus
/
fuss
-
children
.
menu
etc
/
xdg
/
menus
/
icons
/
fuss
-
indicator
-
children
.
png
usr
/
share
/
icons
/
debian/fuss-desktop.install
View file @
55fa255e
...
...
@@ -2,5 +2,4 @@ customizations/xfce4/* /etc/xdg/xfce4
customizations
/
21
-
lightdm
-
locale
-
fix
etc
/
X11
/
Xsession
.
d
customizations
/
99_
buttons_crazyness
usr
/
share
/
gconf
/
defaults
customizations
/
red_prompt
.
bash
etc
/
bash_completion
.
d
fuss
-
app
-
indicator
usr
/
bin
/
desktop
-
files
/
chromium
.
desktop
usr
/
local
/
share
/
applications
debian/fuss-education.install
View file @
55fa255e
desktop
-
files
/
fuss
-
education
-
indicator
.
desktop
etc
/
xdg
/
autostart
/
menus
/
fuss
-
education
.
menu
etc
/
xdg
/
menus
/
icons
/
fuss
-
indicator
-
education
.
png
usr
/
share
/
icons
/
debian/fuss-kids.install
View file @
55fa255e
desktop
-
files
/
fuss
-
kids
-
indicator
.
desktop
etc
/
xdg
/
autostart
/
menus
/
fuss
-
kids
.
menu
etc
/
xdg
/
menus
/
icons
/
fuss
-
indicator
-
kids
.
png
usr
/
share
/
icons
/
desktop-files/fuss-children-indicator.desktop
deleted
100644 → 0
View file @
0e398571
[Desktop Entry]
Name=Fuss Children Indicator
Comment=Indicator applet to show Fuss Children apps
GenericName=FussChildren Indicator
Categories=GNOME;Utility;
Exec=fuss-app-indicator children
Icon=gnome-main-menu
Type=Application
desktop-files/fuss-education-indicator.desktop
deleted
100644 → 0
View file @
0e398571
[Desktop Entry]
Name=Fuss Education Indicator
Comment=Indicator applet to show Fuss Education apps
GenericName=FussEducation Indicator
Categories=GNOME;Utility;
Exec=fuss-app-indicator education
Icon=gnome-main-menu
Type=Application
desktop-files/fuss-kids-indicator.desktop
deleted
100644 → 0
View file @
0e398571
[Desktop Entry]
Name=Fuss Kids Indicator
Comment=Indicator applet to show Fuss Kids apps
GenericName=FussKids Indicator
Categories=GNOME;Utility;
Exec=fuss-app-indicator kids
Icon=gnome-main-menu
Type=Application
fuss-app-indicator
deleted
100755 → 0
View file @
0e398571
#!/usr/bin/env python
#
# File: fuss-app-indicator
#
# Copyright (C) 2012-2016 Christopher R. Gabriel <cgabriel@truelite.it>
#
# Based on
# ClassicMenu Indicator - an indicator applet for Unity, that
# provides the main menu of Gnome2/Gnome Classic.
#
# Copyright (C) 2011 Florian Diesch <devel@florian-diesch.de>
#
# Homepage: http://www.florian-diesch.de/software/classicmenu-indicator/
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
import
sys
import
os.path
import
gmenu
import
gtk
,
glib
,
gobject
import
appindicator
import
re
import
textwrap
import
subprocess
from
xdg
import
IconTheme
as
xdgicon
import
webbrowser
__version__
=
"8.0"
APP_NAME
=
'Fuss App Indicator'
APP_VERSION
=
__version__
re_command
=
re
.
compile
(
'%[UFuf]'
)
cmd_terminal
=
'gnome-terminal -e'
include_nodisplay
=
False
resources
=
(
(
"https://campus.fuss.bz.it/"
,
"Campus (Chamilo)"
),
(
"https://moodle.fuss.bz.it/"
,
"LMS (Moodle)"
),
(
"https://cloud.fuss.bz.it"
,
"Cloud (FUSS Cloud)"
),
(
"https://docs.fuss.bz.it/"
,
"Docs (Pydio)"
),
(
"https://share.fuss.bz.it/"
,
"Share (ownCloud)"
),
(
"https://poll.fuss.bz.it/"
,
"Sondaggi (LimeSurvey)"
),
)
FUSS_CLIENT_CONF
=
"/etc/fuss-client/server.conf"
class
FussAppIndicator
(
object
):
def
__init__
(
self
,
menu_name
):
self
.
indicator
=
appindicator
.
Indicator
(
'fuss-app-indicator-%s'
%
menu_name
,
'fuss-indicator-%s'
%
menu_name
,
appindicator
.
CATEGORY_SYSTEM_SERVICES
)
self
.
icon_size
=
22
self
.
update_requested
=
False
self
.
indicator
.
set_status
(
appindicator
.
STATUS_ACTIVE
)
self
.
server_url
=
self
.
discover_server
()
self
.
trees
=
[]
tree
=
self
.
create_tree
(
'fuss-%s.menu'
%
menu_name
)
self
.
trees
.
append
(
tree
)
self
.
indicator
.
set_menu
(
self
.
create_menu
())
def
discover_server
(
self
):
if
os
.
path
.
isfile
(
FUSS_CLIENT_CONF
):
from
ConfigParser
import
ConfigParser
c
=
ConfigParser
()
c
.
read
(
FUSS_CLIENT_CONF
)
if
c
.
has_option
(
"Server"
,
"address"
):
url
=
c
.
get
(
"Server"
,
"address"
)
return
"http://%s/webpasswd"
%
url
return
None
def
run
(
self
):
try
:
gtk
.
main
()
except
KeyboardInterrupt
:
pass
def
create_menu_item
(
self
,
entry
):
icon
=
entry
.
get_icon
()
name
=
entry
.
get_name
()
menu_item
=
gtk
.
ImageMenuItem
(
name
)
default_theme
=
gtk
.
icon_theme_get_default
()
if
(
icon
):
menu_item
=
gtk
.
ImageMenuItem
(
name
)
try
:
if
default_theme
.
lookup_icon
(
icon
,
self
.
icon_size
,
gtk
.
ICON_LOOKUP_USE_BUILTIN
):
pixbuf
=
default_theme
.
load_icon
(
icon
,
self
.
icon_size
,
gtk
.
ICON_LOOKUP_USE_BUILTIN
)
if
pixbuf
.
get_height
()
>
self
.
icon_size
:
scale
=
pixbuf
.
get_height
()
/
float
(
self
.
icon_size
)
width
=
int
(
pixbuf
.
get_width
()
*
scale
)
pixbuf
.
scale_simple
(
width
,
self
.
icon_size
,
gtk
.
gdk
.
INTERP_BILINEAR
)
img
=
gtk
.
image_new_from_pixbuf
(
pixbuf
)
else
:
icon_path
=
xdgicon
.
getIconPath
(
icon
)
if
icon_path
:
pixbuf
=
gtk
.
gdk
.
pixbuf_new_from_file_at_size
(
icon_path
,
self
.
icon_size
,
self
.
icon_size
)
img
=
gtk
.
image_new_from_pixbuf
(
pixbuf
)
else
:
img
=
gtk
.
Image
()
img
.
set_from_icon_name
(
icon
,
self
.
icon_size
)
except
glib
.
GError
:
img
=
gtk
.
Image
()
img
.
set_from_icon_name
(
''
,
self
.
icon_size
)
menu_item
.
set_image
(
img
)
menu_item
.
set_always_show_image
(
True
)
else
:
menu_item
=
gtk
.
MenuItem
(
name
)
if
entry
.
get_type
()
==
gmenu
.
TYPE_ENTRY
:
menu_item
.
connect
(
'activate'
,
self
.
on_menuitem_activate
,
entry
)
menu_item
.
show
()
return
menu_item
def
process_entry
(
self
,
menu
,
entry
):
menu
.
append
(
self
.
create_menu_item
(
entry
))
def
process_directory
(
self
,
menu
,
dir
):
if
dir
:
for
item
in
dir
.
get_contents
():
type
=
item
.
get_type
()
if
type
==
gmenu
.
TYPE_ENTRY
:
self
.
process_entry
(
menu
,
item
)
elif
type
==
gmenu
.
TYPE_DIRECTORY
:
new_menu
=
gtk
.
Menu
()
menu_item
=
self
.
create_menu_item
(
item
)
menu_item
.
set_submenu
(
new_menu
)
menu
.
append
(
menu_item
)
menu_item
.
show
()
self
.
process_directory
(
new_menu
,
item
)
elif
type
==
gmenu
.
TYPE_ALIAS
:
aliased
=
item
.
get_item
()
if
aliased
.
get_type
()
==
gmenu
.
TYPE_ENTRY
:
self
.
process_entry
(
menu
,
aliased
)
elif
type
==
gmenu
.
TYPE_SEPARATOR
:
menu_item
=
gtk
.
SeparatorMenuItem
()
menu
.
append
(
menu_item
)
menu_item
.
show
()
elif
type
in
[
gmenu
.
TYPE_HEADER
]:
pass
else
:
print
>>
sys
.
stderr
,
'Unsupported item type: %s'
%
type
def
add_to_menu
(
self
,
menu
,
tree
):
root
=
tree
.
get_root_directory
()
self
.
process_directory
(
menu
,
root
)
def
open_url
(
self
,
obj
,
url
):
webbrowser
.
open
(
url
)
def
on_menuitem_change_password
(
self
,
menuitem
):
webbrowser
.
open
(
self
.
server_url
)
def
create_menu
(
self
):
menu
=
gtk
.
Menu
()
for
t
in
self
.
trees
:
if
t
:
self
.
add_to_menu
(
menu
,
t
)
menu_item
=
gtk
.
SeparatorMenuItem
()
menu
.
append
(
menu_item
)
menu_item
=
gtk
.
MenuItem
(
'%s'
%
APP_NAME
)
menu
.
append
(
menu_item
)
submenu
=
gtk
.
Menu
()
menu_item
.
set_submenu
(
submenu
)
# password
if
self
.
server_url
:
menu_item
=
gtk
.
SeparatorMenuItem
()
menu
.
append
(
menu_item
)
menu_item
=
gtk
.
MenuItem
(
"Cambia Password"
)
menu_item
.
connect
(
'activate'
,
self
.
on_menuitem_change_password
)
menu
.
append
(
menu_item
)
menu_item
=
gtk
.
SeparatorMenuItem
()
menu
.
append
(
menu_item
)
resource_menu_item
=
gtk
.
MenuItem
(
'Risorse'
)
menu
.
append
(
resource_menu_item
)
resource_menu
=
gtk
.
Menu
()
resource_menu_item
.
set_submenu
(
resource_menu
)
for
r
in
resources
:
r_item
=
gtk
.
MenuItem
(
r
[
1
])
resource_menu
.
append
(
r_item
)
r_item
.
connect
(
'activate'
,
self
.
open_url
,
r
[
0
])
menu_item
=
gtk
.
ImageMenuItem
(
gtk
.
STOCK_ABOUT
)
menu_item
.
connect
(
'activate'
,
self
.
on_menuitem_about_activate
)
submenu
.
append
(
menu_item
)
menu
.
show_all
()
return
menu
;
def
create_tree
(
self
,
name
):
flags
=
gmenu
.
FLAGS_NONE
if
include_nodisplay
:
flags
=
flags
|
gmenu
.
FLAGS_INCLUDE_NODISPLAY
tree
=
gmenu
.
lookup_tree
(
name
,
flags
)
if
tree
.
get_root_directory
():
tree
.
add_monitor
(
self
.
on_menu_file_changed
)
return
tree
else
:
return
None
def
update_menu
(
self
):
self
.
update_requested
=
False
self
.
indicator
.
set_menu
(
self
.
create_menu
())
return
False
# Don't run again
#####################
## Signal-Behandlung
#####################
def
on_menuitem_activate
(
self
,
menuitem
,
entry
):
command
=
entry
.
get_exec
()
if
command
:
# refs #277 #278
# workaround for some .desktop files where %i and %c don't
# get properly substituted.
command
=
command
.
replace
(
'%i'
,
''
)
command
=
command
.
replace
(
'-caption %c'
,
''
)
command
=
re_command
.
sub
(
''
,
command
)
if
entry
.
get_launch_in_terminal
():
command
=
'%s %s'
%
(
cmd_terminal
,
command
)
subprocess
.
Popen
(
command
,
shell
=
True
)
def
on_menu_file_changed
(
self
,
tree
):
if
not
self
.
update_requested
:
self
.
update_requested
=
True
gobject
.
timeout_add
(
5000
,
self
.
update_menu
)
def
on_menuitem_about_activate
(
self
,
menuitem
):
dlg
=
gtk
.
AboutDialog
()
dlg
.
set_name
(
APP_NAME
)
dlg
.
set_version
(
APP_VERSION
)
dlg
.
set_website
(
'http://www.fuss.bz.it'
)
dlg
.
set_authors
([
'Christopher R. Gabriel <cgabriel@fuss.bz.it>'
])
dlg
.
set_copyright
(
'Copyright (c) 2012-2016 The Fuss Project'
)
dlg
.
set_license
(
textwrap
.
dedent
(
"""
Copyright (c) 2012-2016 The Fuss Project <info@fuss.bz.it>
Homepage: http://www.fuss.bz.it/
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 3 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, see <http://www.gnu.org/licenses/>.
"""
))
dlg
.
run
()
dlg
.
destroy
()
def
main
():
indicator
=
FussAppIndicator
(
sys
.
argv
[
1
])
indicator
.
run
()
if
__name__
==
'__main__'
:
main
()
icons/fuss-indicator-children.png
deleted
100644 → 0
View file @
0e398571
944 Bytes
icons/fuss-indicator-education.png
deleted
100644 → 0
View file @
0e398571
943 Bytes
icons/fuss-indicator-kids.png
deleted
100644 → 0
View file @
0e398571
996 Bytes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment