Commit 3709eb0c authored by Davisson Henrique Paulino's avatar Davisson Henrique Paulino
Browse files

checking if it has dbus

parent c0885666
...@@ -23,9 +23,11 @@ ...@@ -23,9 +23,11 @@
set -e set -e
# Enable the extension # Enable the extension
# if it is already enable will not crash
gnome-shell-extension-tool -e le-inep-bar@c3sl.ufpr.br || true gnome-shell-extension-tool -e le-inep-bar@c3sl.ufpr.br || true
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Extensions.ReloadExtension 'le-inep-bar@c3sl.ufpr.br' || true if [ -z "$NO_DBUS" ];then
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Extensions.ReloadExtension 'le-inep-bar@c3sl.ufpr.br'
fi
echo "Installation finished. Reset your system and enable the extension for it to work." echo "Installation finished. Reset your system and enable the extension for it to work."
#DEBHELPER# #DEBHELPER#
......
...@@ -36,7 +36,7 @@ function getSchool() { ...@@ -36,7 +36,7 @@ function getSchool() {
inep = GLib.spawn_command_line_sync(getInep)[1].toString(); inep = GLib.spawn_command_line_sync(getInep)[1].toString();
// Removes unnecessary spaces // Removes unnecessary spaces
inep = inep.trim(); inep = inep.trim();
// Gets the school name if it's configured // Gets the school name if it's configured
if (inep!='') { if (inep!='') {
color = 'white'; // Change text color color = 'white'; // Change text color
var getZone = 'grep -w '+inep+' /etc/le-proinfodata/le.zone'; var getZone = 'grep -w '+inep+' /etc/le-proinfodata/le.zone';
...@@ -86,7 +86,7 @@ function init() { ...@@ -86,7 +86,7 @@ function init() {
xInfo=global.get_pointer()[0]; xInfo=global.get_pointer()[0];
// Grants the infobox is drawn inside the screen // Grants the infobox is drawn inside the screen
var screen = Main.layoutManager.primaryMonitor; var screen = Main.layoutManager.primaryMonitor;
if (xInfo+infoBox.width>screen.width) if (xInfo+infoBox.width>screen.width)
xInfo -= xInfo+infoBox.width - screen.width; xInfo -= xInfo+infoBox.width - screen.width;
infoBox.set_position(xInfo, Main.panel._rightBox.height); infoBox.set_position(xInfo, Main.panel._rightBox.height);
infoBox.show(); infoBox.show();
...@@ -97,7 +97,7 @@ function init() { ...@@ -97,7 +97,7 @@ function init() {
}); });
button.connect('button-press-event', function(){ button.connect('button-press-event', function(){
GLib.spawn_command_line_async('/usr/local/bin/dialog_inep.sh --reconfigure'); GLib.spawn_command_line_async('/usr/lib/le-proinfodata/dialog_inep.sh --reconfigure');
infoBox.hide(); infoBox.hide();
}); });
...@@ -112,7 +112,7 @@ function disable() { ...@@ -112,7 +112,7 @@ function disable() {
Main.panel._rightBox.remove_child(button); Main.panel._rightBox.remove_child(button);
} }
// Sets up DBus interface to refresh the name after configuration // Sets up DBus interface to refresh the name after configuration
const DBusInterface = '<node>'+ const DBusInterface = '<node>'+
' <interface name="br.ufpr.c3sl.inepbar">'+ ' <interface name="br.ufpr.c3sl.inepbar">'+
' <method name="refresh">'+ ' <method name="refresh">'+
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment