Пример #1
0
    def refresh(self):
        self.clear()
        self.add(get_all_categories(), self.current)
        if not self.is_current_valid():
            from mtmenu import apps_list

            apps_list.refresh(None)
Пример #2
0
    def __init__(self):
        Gtk.HBox.__init__(self)

        self.set_size_request(ITEM_SIZE * 6, ITEM_SIZE * 2)

        vbox1 = Gtk.VBox()
        self.pack_start(vbox1, False, False, 20)

        vbox2 = Gtk.VBox()
        self.pack_start(vbox2, False, False, 20)

        index = 0

        for category in get_all_categories():
            color = get_color_by_type(category)
            box = Gtk.HBox()

            if index <= 5:
                vbox1.pack_start(box, False, False, 0)

            else:
                vbox2.pack_start(box, False, False, 0)

            cbox = Gtk.EventBox()
            cbox.set_size_request(15, 15)
            cbox.modify_bg(Gtk.StateType.NORMAL, color)
            box.pack_start(cbox, False, False, 8)

            label = Gtk.Label(get_category_name(category))
            label.modify_font(Pango.FontDescription("8"))
            box.pack_start(label, False, False, 0)

            index += 1

        self.show_all()
Пример #3
0
    def __init__(self, *args, **kwargs):
        super(PositionFilterForm, self).__init__(*args, **kwargs)

        # Populate position type choices dynamically.
        types = utils.get_all_position_types()
        self.fields['position_type'].choices = [('', 'All Positions')] + [(k, k) for k in types]

        categories = utils.get_all_categories()
        self.fields['team'].choices = [('', 'All Categories')] + [(k, k) for k in categories]
Пример #4
0
 def refresh(self):
     self.clear()
     self.add(get_all_categories(), self.current)
     if not self.is_current_valid():
         from mtmenu import apps_list
         apps_list.refresh(None)
Пример #5
0
from ui.mainwindow import MainWindow
main_window = MainWindow()

# APPSLIST
from mtmenu.ui.appslist import AppsList
from utils import get_all_applications
apps_list = AppsList(get_all_applications())

# TOPBAR
from ui.topbar import TopBar
top_bar = TopBar()

# CATEGORIES LIST
from ui.categorylist import CategoryList
from utils import get_all_categories
categories_list = CategoryList(get_all_categories())

# PROXY
from proxy import Proxy
proxy = Proxy()

# BACKGROUND
from ui.backgroundimage import BackgroundImage
background_image = BackgroundImage(filename='images/wallpaper.png')

# PROJECTORS CHECKER
from projectors_interface import ActivityChecker
activity_checker = ActivityChecker()

# COVERWINDOW
from ui.coverwindow import CoverWindow
Пример #6
0
from ui.mainwindow import MainWindow
main_window = MainWindow()

# APPSLIST
from mtmenu.ui.appslist import AppsList
from utils import get_all_applications
apps_list = AppsList(get_all_applications())

# TOPBAR
from ui.topbar import TopBar
top_bar = TopBar()

# CATEGORIES LIST
from ui.categorylist import CategoryList
from utils import get_all_categories
categories_list = CategoryList(get_all_categories())

# PROXY
from proxy import Proxy
proxy = Proxy()

# BACKGROUND
from ui.backgroundimage import BackgroundImage
background_image = BackgroundImage(filename = 'images/wallpaper.png')

# PROJECTORS CHECKER
from projectors_interface import ActivityChecker 
activity_checker = ActivityChecker()


# COVERWINDOW