more cleanup, thx Codacity
This commit is contained in:
parent
48828788fd
commit
1bff516a26
@ -297,7 +297,8 @@ class MainWindow(object):
|
||||
self.tooltipsEnable(False)
|
||||
|
||||
# A little bit hacky but works.
|
||||
def getDefaultColors(self):
|
||||
@staticmethod
|
||||
def getDefaultColors():
|
||||
widget = Gtk.EventBox()
|
||||
widget.show()
|
||||
|
||||
|
@ -4,7 +4,6 @@ import cgi
|
||||
import filecmp
|
||||
import gettext
|
||||
import os
|
||||
import string
|
||||
import subprocess
|
||||
import threading
|
||||
import urllib
|
||||
@ -19,7 +18,6 @@ from plugins.easybuttons import (ApplicationLauncher, CategoryButton,
|
||||
FavApplicationLauncher,
|
||||
MenuApplicationLauncher)
|
||||
from plugins.easygsettings import EasyGSettings
|
||||
from plugins.execute import Execute
|
||||
|
||||
# i18n
|
||||
gettext.install("mintmenu", "/usr/share/linuxmint/locale")
|
||||
@ -303,11 +301,8 @@ class pluginclass(object):
|
||||
# os.system("xdg-open apt://" + pkg_name + " &")
|
||||
self.mintMenuWin.hide()
|
||||
|
||||
def __del__(self):
|
||||
#print("Applications plugin deleted")
|
||||
return
|
||||
|
||||
def wake(self):
|
||||
@staticmethod
|
||||
def wake():
|
||||
return
|
||||
|
||||
def destroy(self):
|
||||
|
@ -27,10 +27,10 @@ class IconManager(GObject.GObject):
|
||||
self.count = 0
|
||||
|
||||
# Some apps don't put a default icon in the default theme folder, so we will search all themes
|
||||
def createTheme(d):
|
||||
theme = Gtk.IconTheme()
|
||||
theme.set_custom_theme(d)
|
||||
return theme
|
||||
# def createTheme(d):
|
||||
# theme = Gtk.IconTheme()
|
||||
# theme.set_custom_theme(d)
|
||||
# return theme
|
||||
|
||||
# This takes to much time and there are only a very few applications that use icons from different themes
|
||||
#self.themes = map( createTheme, [d for d in os.listdir("/usr/share/icons") if os.path.isdir(os.path.join("/usr/share/icons", d))])
|
||||
|
@ -70,7 +70,8 @@ class pluginclass:
|
||||
#Connect event handlers
|
||||
self.builder.get_object("ClrBtn").connect("clicked", self.clrmenu)
|
||||
|
||||
def wake(self):
|
||||
@staticmethod
|
||||
def wake():
|
||||
return
|
||||
|
||||
def destroy(self):
|
||||
@ -214,6 +215,6 @@ class pluginclass:
|
||||
self.Win.plugins["applications"].wTree.get_widget("entry1").grab_focus()
|
||||
Execute(w, self.Exec)
|
||||
|
||||
def do_plugin(self):
|
||||
@staticmethod
|
||||
def do_plugin():
|
||||
return
|
||||
# self.DoRecent()
|
||||
|
Loading…
Reference in New Issue
Block a user