Przeglądaj źródła

add data setup files

tags/mservice-0.1
sonakinci41 4 miesięcy temu
rodzic
commit
6253f6b6f4
7 zmienionych plików z 77 dodań i 1 usunięć
  1. BIN
      icons/mservice.png
  2. +0
    -0
      icons/mservice.svg
  3. +5
    -1
      mservice.py
  4. +20
    -0
      mservice_data/com.milis.pkexec.mservice.policy
  5. +13
    -0
      mservice_data/mservice-pkexec
  6. +13
    -0
      mservice_data/mservice.desktop
  7. +26
    -0
      setup.py

BIN
icons/mservice.png Wyświetl plik

Przed Po
Szerokość: 32  |  Wysokość: 32  |  Rozmiar: 1.5KB

icons/simge.svg → icons/mservice.svg Wyświetl plik


MService.py → mservice.py Wyświetl plik

@@ -16,7 +16,11 @@ class MService(Gtk.Window):

self.services_black_list = ["halt","initbase","random","rc","reboot","sendsignals"]
self.icon_dir = "./icons"
self.set_icon(GdkPixbuf.Pixbuf.new_from_file("{}/simge.svg".format(self.icon_dir)))
if not os.path.exists(self.icon_dir):
self.icon_dir = "/usr/share/mservice/icons"
self.set_icon(GdkPixbuf.Pixbuf.new_from_file("/usr/share/icons/hicolor/scalable/apps/mservice.svg"))
else:
self.set_icon(GdkPixbuf.Pixbuf.new_from_file("{}/mservice.svg".format(self.icon_dir)))

self.search_widget = Gtk.SearchEntry()
self.search_widget.connect("search-changed",self.search_change)

+ 20
- 0
mservice_data/com.milis.pkexec.mservice.policy Wyświetl plik

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>

<action id="com.milis.pkexec.msercice">
<message>Run mservice as root</message>
<message xml:lang="tr">MService yönetici olarak çalıştır</message>
<icon_name>mservice</icon_name>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/mservice.py</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>

</policyconfig>

+ 13
- 0
mservice_data/mservice-pkexec Wyświetl plik

@@ -0,0 +1,13 @@
#!/bin/bash

APP_PATH="/usr/bin/mservice.py"

# Check for "socket" argument
for i in "$@"; do
if [[ "$i" == "-s="* ]] || [[ "$i" == "--socket-id="* ]]; then
pkexec "${APP_PATH}" "$@" || "${APP_PATH}" "$@"
exit $?
fi
done

pkexec "${APP_PATH}" "$@"

+ 13
- 0
mservice_data/mservice.desktop Wyświetl plik

@@ -0,0 +1,13 @@
[Desktop Entry]
Name=MService
Name[tr]=Milis Servis Arayüzü
Comment=Milis service ui
Comment[tr]=Servis İşlemleri
Exec=mservice-pkexec
Terminal=false
Type=Application
StartupNotify=true
Icon=/usr/share/icons/hicolor/scalable/apps/mservice.svg
Keywords=Service;Enable;Disable;Start;Stop
Keywords[tr]=Servis;Aktif;Pasif;Başlat;Durdur
Categories=System

+ 26
- 0
setup.py Wyświetl plik

@@ -0,0 +1,26 @@
#!/usr/bin/python3

import os
from setuptools import setup, find_packages

#os.makedirs("/usr/share/mservice/icons")

datas = [("/usr/share/applications",["mservice_data/mservice.desktop"]),
("/usr/share/icons/hicolor/32x32/apps", ["icons/mservice.png"]),
("/usr/share/icons/hicolor/scalable/apps",["icons/mservice.svg"]),
("/usr/bin",["mservice_data/mservice-pkexec"]),
("/usr/share/polkit-1/actions",["mservice_data/com.milis.pkexec.mservice.policy"]),
("/usr/share/mservice/icons",["icons/1.svg","icons/2.svg"])]


setup(
name = "mservice",
scripts = ["mservice.py"],
packages = find_packages(),
version = "0.1",
description = "Milis Service Manager GTK Frontend",
author = ["Fatih Kaya"],
author_email = "sonakinci41@gmail.com",
url = "https://mls.akdeniz.edu.tr/git/milislinux/mservice",
data_files = datas
)

Ładowanie…
Anuluj
Zapisz