<commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-


# Example from http://robertour.com/category/kivy/page/2/

from kivy.app import App
from kivy.lang import Builder
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.behaviors import ButtonBehavior
from kivy.uix.tabbedpanel import TabbedPanel, TabbedPanelItem
from kivy.uix.image import Image
from kivy.uix.label import Label
from kivy.properties import NumericProperty, ObjectProperty, StringProperty
from kivy.clock import Clock

import datetime
from threading import Timer
import time

import verboseclock
import smarthome
import doorcam
import calllist
import weather
import fhem_connect
from popup_settings import SettingsPopup
from popup_networkinfo import NetworkInfoPopup
from fhem_connect import FhemConnect
from wifi_state import WifiState
from display_ctrl import DisplayControl

from dash_listen import DashListener


Builder.load_string("""

#:import FadeTransition kivy.uix.screenmanager.FadeTransition
#:import ButtonBehavior kivy.uix.behaviors  
#:import Image kivy.uix.image
#:include smarthome.kv
#:include weather.kv

<WifiState>:
    source: root.img
    #pos: (20,60)
    size: (30,30)
    size_hint: (None, None)

<ImageButton>:
    source: root.img
    pos_hint: {'center_x': .5, 'center_y': .5}
    size: (30,30)
    size_hint: (None, None)


<HomeCtrl>:
    _screen_manager: _screen_manager
    settings_button: boxlayout_mainbuttons.settings_button
    wifistate: boxlayout_mainbuttons.wifistate
    boxlayout_mainbuttons: boxlayout_mainbuttons
    orientation: 'horizontal'

    BoxLayout:
        id: boxlayout_mainbuttons
        name: 'boxlayout_mainbuttons'
        simpleclock: simpleclock
        settings_button: settings_button
        wifistate: wifistate
        orientation: 'vertical'
        size_hint: .1, 1
        spacing: 40 #spacing between children

#        canvas:
#            Color:
#                rgba: 1,0,0,.5
#            Line:
#                rectangle: self.x+1, self.y+1, self.width-1, self.height-1

        ImageButton:
            id: settings_button
            img: 'gfx/settings.png'
            #on_press:
            #    _screen_manager.current = 'smarthome'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
#            canvas:
#                Color:
#                    rgba: 1,0,0,.5
#                Line:
#                    rectangle: self.x+1, self.y+1, self.width-1, self.height-1

        ImageButton:
            img: 'gfx/home.png'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
            on_press:
                _screen_manager.current = 'smarthome'
        ImageButton:
            img: 'gfx/view.png'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
            on_press:
                _screen_manager.current = 'doorcam'
                #doorcam.on_get_focus()
        ImageButton:
            img: 'gfx/weather.png'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
            on_press:
                _screen_manager.current = 'weather'
        ImageButton:
            img: 'gfx/phone.png'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
            on_press:
                _screen_manager.current = 'calllist'

        Label:
        Label:
        WifiState:
            id: wifistate
            size_hint_x: 1.0 # use complete width of parent for the touch-area

        SimpleClock:
            id: simpleclock
            size_hint_x: 1.0 # use complete width of parent for the touch-area
#            canvas:
#                Color:
#                    rgba: 0,1,0,.5
#                Line:
#                    rectangle: self.x+1, self.y+1, self.width-1, self.height-1


    ScreenManager:
        id: _screen_manager
        screen_calllist: screen_calllist
        screen_smarthome: screen_smarthome
        screen_weather: screen_weather
        size_hint: .9, 1
        pos_hint: {'right': 1}
        transition: FadeTransition()

        Screen:
            name: 'smarthome'
            id: screen_smarthome
            smarthome_tabbed_panel: smarthome_tabbed_panel<commit_msg>Remove empty Labels<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-


# Example from http://robertour.com/category/kivy/page/2/

from kivy.app import App
from kivy.lang import Builder
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.behaviors import ButtonBehavior
from kivy.uix.tabbedpanel import TabbedPanel, TabbedPanelItem
from kivy.uix.image import Image
from kivy.uix.label import Label
from kivy.properties import NumericProperty, ObjectProperty, StringProperty
from kivy.clock import Clock

import datetime
from threading import Timer
import time

import verboseclock
import smarthome
import doorcam
import calllist
import weather
import fhem_connect
from popup_settings import SettingsPopup
from popup_networkinfo import NetworkInfoPopup
from fhem_connect import FhemConnect
from wifi_state import WifiState
from display_ctrl import DisplayControl

from dash_listen import DashListener


Builder.load_string("""

#:import FadeTransition kivy.uix.screenmanager.FadeTransition
#:import ButtonBehavior kivy.uix.behaviors  
#:import Image kivy.uix.image
#:include smarthome.kv
#:include weather.kv

<WifiState>:
    source: root.img
    #pos: (20,60)
    size: (30,30)
    size_hint: (None, None)

<ImageButton>:
    source: root.img
    pos_hint: {'center_x': .5, 'center_y': .5}
    size: (30,30)
    size_hint: (None, None)


<HomeCtrl>:
    _screen_manager: _screen_manager
    settings_button: boxlayout_mainbuttons.settings_button
    wifistate: boxlayout_mainbuttons.wifistate
    boxlayout_mainbuttons: boxlayout_mainbuttons
    orientation: 'horizontal'

    BoxLayout:
        id: boxlayout_mainbuttons
        name: 'boxlayout_mainbuttons'
        simpleclock: simpleclock
        settings_button: settings_button
        wifistate: wifistate
        orientation: 'vertical'
        size_hint: .1, 1
        spacing: 40 #spacing between children

#        canvas:
#            Color:
#                rgba: 1,0,0,.5
#            Line:
#                rectangle: self.x+1, self.y+1, self.width-1, self.height-1

        ImageButton:
            id: settings_button
            img: 'gfx/settings.png'
            #on_press:
            #    _screen_manager.current = 'smarthome'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
#            canvas:
#                Color:
#                    rgba: 1,0,0,.5
#                Line:
#                    rectangle: self.x+1, self.y+1, self.width-1, self.height-1

        ImageButton:
            img: 'gfx/home.png'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
            on_press:
                _screen_manager.current = 'smarthome'
        ImageButton:
            img: 'gfx/view.png'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
            on_press:
                _screen_manager.current = 'doorcam'
                #doorcam.on_get_focus()
        ImageButton:
            img: 'gfx/weather.png'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
            on_press:
                _screen_manager.current = 'weather'
        ImageButton:
            img: 'gfx/phone.png'
            size_hint_x: 1.0 # use complete width of parent for the touch-area
            on_press:
                _screen_manager.current = 'calllist'

        WifiState:
            id: wifistate
            size_hint_x: 1.0 # use complete width of parent for the touch-area

        SimpleClock:
            id: simpleclock
            size_hint_x: 1.0 # use complete width of parent for the touch-area
#            canvas:
#                Color:
#                    rgba: 0,1,0,.5
#                Line:
#                    rectangle: self.x+1, self.y+1, self.width-1, self.height-1


    ScreenManager:
        id: _screen_manager
        screen_calllist: screen_calllist
        screen_smarthome: screen_smarthome
        screen_weather: screen_weather
        size_hint: .9, 1
        pos_hint: {'right': 1}
        transition: FadeTransition()

        Screen:
            name: 'smarthome'
            id: screen_smarthome
            smarthome_tabbed_panel: smarthome_tabbed_panel
{'fraction_non_alphanumeric': 0.07904761904761905, 'fraction_numerical': 0.014523809523809524, 'mean_word_length': 2.1882352941176473, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7283142', 'n_tokens_mistral': 2628, 'n_tokens_neox': 2509, 'n_words': 645}