Skip to content

Commit

Permalink
folder organization and solved bugs folder
Browse files Browse the repository at this point in the history
Heitor-Tasso committed Mar 1, 2022
1 parent 723b851 commit 8099cd8
Showing 65 changed files with 422 additions and 346 deletions.
File renamed without changes
Binary file added designer/assets/icons/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added designer/assets/icons/kivy-icon-256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added designer/assets/icons/kivy-icon-512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added designer/assets/icons/kivy-icon-64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added designer/assets/icons/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added designer/assets/icons/ouya_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions designer/components/buildozer_spec_editor.py
Original file line number Diff line number Diff line change
@@ -18,6 +18,8 @@

Builder.load_string("""
#: import theme_atlas utils.utils.theme_atlas
<SpecContentPanel>:
do_scroll_x: False
container: content
@@ -64,8 +66,8 @@
size_hint_y: None
height: '25pt'
Button:
background_normal: 'atlas://data/images/defaulttheme/action_item'
background_down: 'atlas://data/images/defaulttheme/action_item'
background_normal: theme_atlas('action_item')
background_down: theme_atlas('action_item')
text: 'GUI editor to buildozer.spec.z\\nRead more at http://buildozer.readthedocs.org'
text_size: self.size
font_size: '11pt'
4 changes: 3 additions & 1 deletion designer/components/designer_content.py
Original file line number Diff line number Diff line change
@@ -22,6 +22,8 @@

Builder.load_string("""
#: import theme_atlas utils.utils.theme_atlas
<DesignerContent>:
ui_creator: ui_creator
tree_view: tree_view
@@ -104,7 +106,7 @@
orientation: 'vertical'
width: 22
Image:
source: 'atlas://data/images/defaulttheme/close'
source: theme_atlas('close')
on_touch_down:
if self.collide_point(*args[1].pos) : root.dispatch('on_close')
4 changes: 3 additions & 1 deletion designer/components/dialogs/about.py
Original file line number Diff line number Diff line change
@@ -3,9 +3,11 @@

Builder.load_string("""
#: import icons utils.utils.icons
<AboutDialog>:
Image:
source: 'data/logo/kivy-icon-512.png'
source: icons('kivy-icon-512')
pos: root.pos
opacity: 0.2
BoxLayout:
42 changes: 19 additions & 23 deletions designer/components/dialogs/new_project.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
from functools import partial
from os.path import join
from kivy.uix.scrollview import ScrollView

from utils.utils import constants
from utils.utils import get_kd_data_dir
from utils.utils import template_images
from kivy.factory import Factory
from kivy.properties import ObjectProperty
from kivy.uix.boxlayout import BoxLayout
from kivy.lang.builder import Builder


NEW_PROJECTS = {
'FloatLayout': ('template_floatlayout_kv',
'template_floatlayout_py'),
'BoxLayout': ('template_boxlayout_kv',
'template_boxlayout_py'),
'ScreenManager': ('template_screen_manager_kv',
'template_screen_manager_py'),
'ActionBar': ('template_actionbar_kv',
'template_actionbar_py'),
'Carousel and ActionBar': ('template_actionbar_carousel_kv',
'template_actionbar_carousel_py'),
'ScreenManager and ActionBar': ('template_screen_manager_actionbar_kv',
'template_screen_manager_actionbar_py'),
'TabbedPanel': ('template_tabbed_panel_kv',
'template_tabbed_panel_py'),
'TextInput and ScrollView': ('template_textinput_scrollview_kv',
'template_textinput_scrollview_py')}

'FloatLayout': ('template_floatlayout_kv', 'template_floatlayout_py'),

'BoxLayout': ('template_boxlayout_kv', 'template_boxlayout_py'),

'ScreenManager': ('template_screen_manager_kv', 'template_screen_manager_py'),

'ActionBar': ('template_actionbar_kv', 'template_actionbar_py'),

'Carousel and ActionBar': ('template_actionbar_carousel_kv', 'template_actionbar_carousel_py'),

'ScreenManager and ActionBar': ('template_screen_manager_actionbar_kv', 'template_screen_manager_actionbar_py'),

'TabbedPanel': ('template_tabbed_panel_kv', 'template_tabbed_panel_py'),

'TextInput and ScrollView': ('template_textinput_scrollview_kv', 'template_textinput_scrollview_py')
}

Builder.load_string("""
@@ -220,10 +217,9 @@ def __init__(self, **kwargs):
def update_template_preview(self, instance):
'''Event handler for 'on_selection_change' event of adapter.
'''
name = instance.text.lower() + '.png'
name = instance.text.lower()
name = name.replace(' and ', '_')
image_source = join(get_kd_data_dir(),
constants.NEW_TEMPLATE_IMAGE_PATH, name)
image_source = template_images(name)
self.template_preview.source = image_source

def on_app_name_text(self, instance, value):
4 changes: 3 additions & 1 deletion designer/components/property_viewer.py
Original file line number Diff line number Diff line change
@@ -16,13 +16,15 @@

Builder.load_string("""
#: import theme_atlas utils.utils.theme_atlas
<PropertyOptions>:
valign: 'middle'
halign: 'left'
shorten: True
shorten_from: 'right'
Image:
source: 'atlas://data/images/defaulttheme/tree_opened'
source: theme_atlas('tree_opened')
size_hint: None, None
size: root.height, root.height
pos: root.x + root.width - root.height, root.y
6 changes: 4 additions & 2 deletions designer/components/start_page.py
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@

Builder.load_string("""
#: import theme_atlas utils.utils.theme_atlas
<DesignerButtonFit@DesignerButton>
size_hint_x: None
width: self.texture_size[0] + sp(32)
@@ -105,8 +107,8 @@
<DesignerLinkLabel>:
color: 0, 0, 1, 1
background_normal: 'atlas://data/images/defaulttheme/action_item'
background_disabled_normal: 'atlas://data/images/defaulttheme/action_item_disabled'
background_normal: theme_atlas('action_item')
background_disabled_normal: theme_atlas('action_item_disabled')
text_size: self.width, None
<RecentFilesBox>:
7 changes: 4 additions & 3 deletions designer/components/statusbar.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.label import Label
from utils.utils import icons
from kivy.uix.tabbedpanel import (
TabbedPanel, TabbedPanelContent, TabbedPanelHeader,
)
@@ -133,11 +134,11 @@ def show_message(self, message, duration=5, notification_type=None):
self.message = message
icon = ''
if notification_type == 'info':
icon = 'icons/info.png'
icon = icons('info')
elif notification_type == 'error':
icon = 'icons/error.png'
icon = icons('error')
elif notification_type == 'loading':
icon = 'icons/loading.gif'
icon = icons('loading', '.gif')

if icon:
self.img.opacity = 1
26 changes: 8 additions & 18 deletions designer/core/profile_settings.py
Original file line number Diff line number Diff line change
@@ -3,8 +3,7 @@
import shutil

from uix.confirmation_dialog import ConfirmationDialog
from utils.utils import constants
from utils.utils import get_config_dir, get_kd_data_dir
from utils.utils import get_config_dir, get_kd_data_dir, profiles_path
from kivy.config import ConfigParser
from kivy.properties import DictProperty, ObjectProperty
from kivy.uix.popup import Popup
@@ -209,12 +208,9 @@ def load_profiles(self):
'''This function loads project settings
'''
self.settings_changed = False
self.PROFILES_PATH = os.path.join(get_config_dir(),
constants.DIR_PROFILES)

self.DEFAULT_PROFILES = os.path.join(get_kd_data_dir(),
constants.DIR_PROFILES)

self.PROFILES_PATH = os.path.join(get_config_dir(), 'profiles')
self.DEFAULT_PROFILES = profiles_path()

if not os.path.exists(self.PROFILES_PATH):
shutil.copytree(self.DEFAULT_PROFILES, self.PROFILES_PATH)

@@ -236,18 +232,12 @@ def update_panel(self):
str(prof_name) + '_' + _file_path] = config_parser

for _file in sorted(self.config_parsers):
prof_name = self.config_parsers[_file].getdefault('profile',
'name',
'PROFILE')
prof_name = self.config_parsers[_file].getdefault('profile', 'name', 'PROFILE')
if not prof_name.strip():
prof_name = 'PROFILE'
self.add_json_panel(prof_name,
self.config_parsers[_file],
os.path.join(
get_kd_data_dir(),
'settings',
'build_profile.json')
)

path_sett = os.path.join(get_kd_data_dir(), 'settings', 'build_profile.json')
self.add_json_panel(prof_name, self.config_parsers[_file], path_sett)

# force to show the first profile
first_panel = self.interface.menu.buttons_layout.children[-1].uid
6 changes: 2 additions & 4 deletions designer/core/project_settings.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import os

from utils.utils import get_kd_data_dir, ignore_proj_watcher
from utils.utils import get_kd_data_dir, ignore_proj_watcher, profiles_path
from kivy.config import ConfigParser
from kivy.properties import ObjectProperty
from kivy.uix.settings import Settings


PROJ_DESIGNER = '.designer'
PROJ_CONFIG = os.path.join(PROJ_DESIGNER, 'config.ini')

PROJ_CONFIG = profiles_path('config')

class ProjectSettings(Settings):
'''Subclass of :class:`kivy.uix.settings.Settings` responsible for
13 changes: 5 additions & 8 deletions designer/core/settings.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
from multiprocessing.sharedctypes import Value
import os
import os.path
import shutil
import sys
from distutils.spawn import find_executable

from utils.utils import get_config_dir, get_kd_data_dir, get_kd_dir, constants
from uix.settings import SettingList, SettingShortcut
from utils.utils import get_config_dir, get_kd_data_dir, config_path
from kivy.config import ConfigParser
from kivy.properties import ObjectProperty
from kivy.uix.settings import Settings
from pygments import styles


# monkey backport! (https://github.com/kivy/kivy/pull/2288)
if not hasattr(ConfigParser, 'upgrade'):
from configparser import RawConfigParser as PythonConfigParser
@@ -51,12 +49,11 @@ def load_settings(self):
self.config_parser = ConfigParser(name='DesignerSettings')
except Exception:
return False

DESIGNER_CONFIG = os.path.join(get_config_dir(),
constants.DESIGNER_CONFIG_FILE_NAME)

DESIGNER_CONFIG = os.path.join(get_config_dir(), 'config.ini')

DEFAULT_CONFIG = config_path('config')

DEFAULT_CONFIG = os.path.join(get_kd_dir(),
constants.DESIGNER_CONFIG_FILE_NAME)
if not os.path.exists(DESIGNER_CONFIG):
shutil.copyfile(DEFAULT_CONFIG,
DESIGNER_CONFIG)
233 changes: 0 additions & 233 deletions designer/data/new_templates/default.spec

This file was deleted.

14 changes: 6 additions & 8 deletions designer/screens/inicial/main_inicial.py
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
from utils.utils import (
ignore_proj_watcher, get_kd_data_dir,
show_message, get_kd_dir, get_path,
utils_source_rst,
utils_source_rst, template_file,
)
from tempfile import mkdtemp
from distutils.dir_util import copy_tree
@@ -541,16 +541,14 @@ def _perform_new(self, *args):
package_version = self._new_dialog.package_version.text
templates_dir = os.path.join(get_kd_data_dir(), constants.DIR_NEW_TEMPLATE)

kv_file = NEW_PROJECTS[template][0]
py_file = NEW_PROJECTS[template][1]
kv_file = template_file(NEW_PROJECTS[template][0])
py_file = template_file(NEW_PROJECTS[template][1])

shutil.copy(os.path.join(templates_dir, py_file),
os.path.join(new_proj_dir, "main.py"))
shutil.copy(os.path.join(templates_dir, kv_file),
os.path.join(new_proj_dir, "main.kv"))
shutil.copy(py_file, os.path.join(new_proj_dir, "main.py"))
shutil.copy(kv_file, os.path.join(new_proj_dir, "main.kv"))

buildozer = io.open(os.path.join(new_proj_dir, 'buildozer.spec'), 'w', encoding='utf-8')
for line in io.open(os.path.join(templates_dir, 'default.spec'), 'r', encoding='utf-8'):
for line in io.open(template_file('default.spec'), 'r', encoding='utf-8'):
line = line.replace('$app_name', app_name)
line = line.replace('$package_name', package_name)
line = line.replace('$package_domain', package_domain)
4 changes: 3 additions & 1 deletion designer/tools/bug_reporter.py
Original file line number Diff line number Diff line change
@@ -21,10 +21,12 @@

Builder.load_string('''
#: import icons utils.utils.icons
<BugReporter>:
txt_traceback: txt_traceback
Image:
source: 'data/logo/kivy-icon-256.png'
source: icons('kivy-icon-256')
opacity: 0.2
BoxLayout:
orientation: 'vertical'
11 changes: 6 additions & 5 deletions designer/config.ini → designer/tools/profiles/config.ini
Original file line number Diff line number Diff line change
@@ -6,10 +6,10 @@ auto_save_time = 5
code_input_theme = emacs

[buildozer]
buildozer_path =
buildozer_path =

[hanga]
hanga_api_key =
hanga_api_key =

[desktop]
save_window_size = 1
@@ -18,10 +18,10 @@ exit_on_escape = 0
[internal]
window_width = 800
window_height = 600
default_profile =
default_profile =
mod_screen_scale = 1.0
mod_screen_orientation = portrait
mod_screen_device =
mod_screen_device =

[view]
actn_chk_proj_tree = True
@@ -55,4 +55,5 @@ help = [] + f1
kivy_docs = ['ctrl'] + f1
kd_docs = ['ctrl', 'shift'] + f1
kd_repo = ['ctrl'] + r
about = [] + f10
about = [] + f10

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -9,15 +9,171 @@
"section": "app",
"desc": "Application required permissions.",
"key": "android.permissions",
"items": ["ACCESS_CHECKIN_PROPERTIES", "ACCESS_COARSE_LOCATION", "ACCESS_FINE_LOCATION", "ACCESS_LOCATION_EXTRA_COMMANDS", "ACCESS_MOCK_LOCATION", "ACCESS_NETWORK_STATE", "ACCESS_SURFACE_FLINGER", "ACCESS_WIFI_STATE", "ACCOUNT_MANAGER", "ADD_VOICEMAIL", "AUTHENTICATE_ACCOUNTS", "BATTERY_STATS", "BIND_ACCESSIBILITY_SERVICE", "BIND_APPWIDGET", "BIND_CARRIER_MESSAGING_SERVICE", "BIND_DEVICE_ADMIN", "BIND_DREAM_SERVICE", "BIND_INPUT_METHOD", "BIND_NFC_SERVICE", "BIND_NOTIFICATION_LISTENER_SERVICE", "BIND_PRINT_SERVICE", "BIND_REMOTEVIEWS", "BIND_TEXT_SERVICE", "BIND_TV_INPUT", "BIND_VOICE_INTERACTION", "BIND_VPN_SERVICE", "BIND_WALLPAPER", "BLUETOOTH", "BLUETOOTH_ADMIN", "BLUETOOTH_PRIVILEGED", "BODY_SENSORS", "BRICK", "BROADCAST_PACKAGE_REMOVED", "BROADCAST_SMS", "BROADCAST_STICKY", "BROADCAST_WAP_PUSH", "CALL_PHONE", "CALL_PRIVILEGED", "CAMERA", "CAPTURE_AUDIO_OUTPUT", "CAPTURE_SECURE_VIDEO_OUTPUT", "CAPTURE_VIDEO_OUTPUT", "CHANGE_COMPONENT_ENABLED_STATE", "CHANGE_CONFIGURATION", "CHANGE_NETWORK_STATE", "CHANGE_WIFI_MULTICAST_STATE", "CHANGE_WIFI_STATE", "CLEAR_APP_CACHE", "CLEAR_APP_USER_DATA", "CONTROL_LOCATION_UPDATES", "DELETE_CACHE_FILES", "DELETE_PACKAGES", "DEVICE_POWER", "DIAGNOSTIC", "DISABLE_KEYGUARD", "DUMP", "EXPAND_STATUS_BAR", "FACTORY_TEST", "FLASHLIGHT", "FORCE_BACK", "GET_ACCOUNTS", "GET_PACKAGE_SIZE", "GET_TASKS", "GET_TOP_ACTIVITY_INFO", "GLOBAL_SEARCH", "HARDWARE_TEST", "INJECT_EVENTS", "INSTALL_LOCATION_PROVIDER", "INSTALL_PACKAGES", "INSTALL_SHORTCUT", "INTERNAL_SYSTEM_WINDOW", "INTERNET", "KILL_BACKGROUND_PROCESSES", "LOCATION_HARDWARE", "MANAGE_ACCOUNTS", "MANAGE_APP_TOKENS", "MANAGE_DOCUMENTS", "MASTER_CLEAR", "MEDIA_CONTENT_CONTROL", "MODIFY_AUDIO_SETTINGS", "MODIFY_PHONE_STATE", "MOUNT_FORMAT_FILESYSTEMS", "MOUNT_UNMOUNT_FILESYSTEMS", "NFC", "PERSISTENT_ACTIVITY", "PROCESS_OUTGOING_CALLS", "READ_CALENDAR", "READ_CALL_LOG", "READ_CONTACTS", "READ_EXTERNAL_STORAGE", "READ_FRAME_BUFFER", "READ_HISTORY_BOOKMARKS", "READ_INPUT_STATE", "READ_LOGS", "READ_PHONE_STATE", "READ_PROFILE", "READ_SMS", "READ_SOCIAL_STREAM", "READ_SYNC_SETTINGS", "READ_SYNC_STATS", "READ_USER_DICTIONARY", "READ_VOICEMAIL", "REBOOT", "RECEIVE_BOOT_COMPLETED", "RECEIVE_MMS", "RECEIVE_SMS", "RECEIVE_WAP_PUSH", "RECORD_AUDIO", "REORDER_TASKS", "RESTART_PACKAGES", "SEND_RESPOND_VIA_MESSAGE", "SEND_SMS", "SET_ACTIVITY_WATCHER", "SET_ALARM", "SET_ALWAYS_FINISH", "SET_ANIMATION_SCALE", "SET_DEBUG_APP", "SET_ORIENTATION", "SET_POINTER_SPEED", "SET_PREFERRED_APPLICATIONS", "SET_PROCESS_LIMIT", "SET_TIME", "SET_TIME_ZONE", "SET_WALLPAPER", "SET_WALLPAPER_HINTS", "SIGNAL_PERSISTENT_PROCESSES", "STATUS_BAR", "SUBSCRIBED_FEEDS_READ", "SUBSCRIBED_FEEDS_WRITE", "SYSTEM_ALERT_WINDOW", "TRANSMIT_IR", "UNINSTALL_SHORTCUT", "UPDATE_DEVICE_STATS", "USE_CREDENTIALS", "USE_SIP", "VIBRATE", "WAKE_LOCK", "WRITE_APN_SETTINGS", "WRITE_CALENDAR", "WRITE_CALL_LOG", "WRITE_CONTACTS", "WRITE_EXTERNAL_STORAGE", "WRITE_GSERVICES", "WRITE_HISTORY_BOOKMARKS", "WRITE_PROFILE", "WRITE_SECURE_SETTINGS", "WRITE_SETTINGS", "WRITE_SMS", "WRITE_SOCIAL_STREAM", "WRITE_SYNC_SETTINGS", "WRITE_USER_DICTIONARY", "WRITE_VOICEMAIL"]
"items": [
"ACCESS_CHECKIN_PROPERTIES",
"ACCESS_COARSE_LOCATION",
"ACCESS_FINE_LOCATION",
"ACCESS_LOCATION_EXTRA_COMMANDS",
"ACCESS_MOCK_LOCATION",
"ACCESS_NETWORK_STATE",
"ACCESS_SURFACE_FLINGER",
"ACCESS_WIFI_STATE",
"ACCOUNT_MANAGER",
"ADD_VOICEMAIL",
"AUTHENTICATE_ACCOUNTS",
"BATTERY_STATS",
"BIND_ACCESSIBILITY_SERVICE",
"BIND_APPWIDGET",
"BIND_CARRIER_MESSAGING_SERVICE",
"BIND_DEVICE_ADMIN",
"BIND_DREAM_SERVICE",
"BIND_INPUT_METHOD",
"BIND_NFC_SERVICE",
"BIND_NOTIFICATION_LISTENER_SERVICE",
"BIND_PRINT_SERVICE",
"BIND_REMOTEVIEWS",
"BIND_TEXT_SERVICE",
"BIND_TV_INPUT",
"BIND_VOICE_INTERACTION",
"BIND_VPN_SERVICE",
"BIND_WALLPAPER",
"BLUETOOTH",
"BLUETOOTH_ADMIN",
"BLUETOOTH_PRIVILEGED",
"BODY_SENSORS",
"BRICK",
"BROADCAST_PACKAGE_REMOVED",
"BROADCAST_SMS",
"BROADCAST_STICKY",
"BROADCAST_WAP_PUSH",
"CALL_PHONE",
"CALL_PRIVILEGED",
"CAMERA",
"CAPTURE_AUDIO_OUTPUT",
"CAPTURE_SECURE_VIDEO_OUTPUT",
"CAPTURE_VIDEO_OUTPUT",
"CHANGE_COMPONENT_ENABLED_STATE",
"CHANGE_CONFIGURATION",
"CHANGE_NETWORK_STATE",
"CHANGE_WIFI_MULTICAST_STATE",
"CHANGE_WIFI_STATE",
"CLEAR_APP_CACHE",
"CLEAR_APP_USER_DATA",
"CONTROL_LOCATION_UPDATES",
"DELETE_CACHE_FILES",
"DELETE_PACKAGES",
"DEVICE_POWER",
"DIAGNOSTIC",
"DISABLE_KEYGUARD",
"DUMP",
"EXPAND_STATUS_BAR",
"FACTORY_TEST",
"FLASHLIGHT",
"FORCE_BACK",
"GET_ACCOUNTS",
"GET_PACKAGE_SIZE",
"GET_TASKS",
"GET_TOP_ACTIVITY_INFO",
"GLOBAL_SEARCH",
"HARDWARE_TEST",
"INJECT_EVENTS",
"INSTALL_LOCATION_PROVIDER",
"INSTALL_PACKAGES",
"INSTALL_SHORTCUT",
"INTERNAL_SYSTEM_WINDOW",
"INTERNET",
"KILL_BACKGROUND_PROCESSES",
"LOCATION_HARDWARE",
"MANAGE_ACCOUNTS",
"MANAGE_APP_TOKENS",
"MANAGE_DOCUMENTS",
"MASTER_CLEAR",
"MEDIA_CONTENT_CONTROL",
"MODIFY_AUDIO_SETTINGS",
"MODIFY_PHONE_STATE",
"MOUNT_FORMAT_FILESYSTEMS",
"MOUNT_UNMOUNT_FILESYSTEMS",
"NFC",
"PERSISTENT_ACTIVITY",
"PROCESS_OUTGOING_CALLS",
"READ_CALENDAR",
"READ_CALL_LOG",
"READ_CONTACTS",
"READ_EXTERNAL_STORAGE",
"READ_FRAME_BUFFER",
"READ_HISTORY_BOOKMARKS",
"READ_INPUT_STATE",
"READ_LOGS",
"READ_PHONE_STATE",
"READ_PROFILE",
"READ_SMS",
"READ_SOCIAL_STREAM",
"READ_SYNC_SETTINGS",
"READ_SYNC_STATS",
"READ_USER_DICTIONARY",
"READ_VOICEMAIL",
"REBOOT",
"RECEIVE_BOOT_COMPLETED",
"RECEIVE_MMS",
"RECEIVE_SMS",
"RECEIVE_WAP_PUSH",
"RECORD_AUDIO",
"REORDER_TASKS",
"RESTART_PACKAGES",
"SEND_RESPOND_VIA_MESSAGE",
"SEND_SMS",
"SET_ACTIVITY_WATCHER",
"SET_ALARM",
"SET_ALWAYS_FINISH",
"SET_ANIMATION_SCALE",
"SET_DEBUG_APP",
"SET_ORIENTATION",
"SET_POINTER_SPEED",
"SET_PREFERRED_APPLICATIONS",
"SET_PROCESS_LIMIT",
"SET_TIME",
"SET_TIME_ZONE",
"SET_WALLPAPER",
"SET_WALLPAPER_HINTS",
"SIGNAL_PERSISTENT_PROCESSES",
"STATUS_BAR",
"SUBSCRIBED_FEEDS_READ",
"SUBSCRIBED_FEEDS_WRITE",
"SYSTEM_ALERT_WINDOW",
"TRANSMIT_IR",
"UNINSTALL_SHORTCUT",
"UPDATE_DEVICE_STATS",
"USE_CREDENTIALS",
"USE_SIP",
"VIBRATE",
"WAKE_LOCK",
"WRITE_APN_SETTINGS",
"WRITE_CALENDAR",
"WRITE_CALL_LOG",
"WRITE_CONTACTS",
"WRITE_EXTERNAL_STORAGE",
"WRITE_GSERVICES",
"WRITE_HISTORY_BOOKMARKS",
"WRITE_PROFILE",
"WRITE_SECURE_SETTINGS",
"WRITE_SETTINGS",
"WRITE_SMS",
"WRITE_SOCIAL_STREAM",
"WRITE_SYNC_SETTINGS",
"WRITE_USER_DICTIONARY",
"WRITE_VOICEMAIL"
]
},
{
"type": "dict",
"title": "Android Storage",
"section": "app",
"desc": "Use Android private/public storage",
"key": "android.private_storage",
"options": {"False": "Public", "True": "Private"}
"options": {
"False": "Public",
"True": "Private"
}
},
{
"type": "string",
@@ -32,7 +188,10 @@
"section": "app",
"desc": "Indicate whether the screen should stay on. Don't forget to add the WAKE_LOCK permission if you set this to True",
"key": "android.wakelock",
"options": {"False": "Disabled", "True": "Enabled"}
"options": {
"False": "Disabled",
"True": "Enabled"
}
},
{
"type": "list",
@@ -111,7 +270,7 @@
"type": "string",
"title": "OUYA Console icon",
"section": "app",
"desc": "Filename of OUYA Console icon. It must be a 732x412 png image.\nExample: %(source.dir)s/data/ouya_icon.png",
"desc": "Filename of OUYA Console icon. It must be a 732x412 png image.\nExample: %(source.dir)s/assets/icons/ouya_icon.png",
"key": "android.ouya.icon.filename"
},
{
@@ -264,4 +423,4 @@
"desc": "Copy library instead of making a libpymodules.so",
"key": "android.copy_libs"
}
]
]
Original file line number Diff line number Diff line change
@@ -28,14 +28,14 @@
"type": "string",
"title": "Presplash of the application",
"section": "app",
"desc": "Presplash image of the application.\nExample %(source.dir)s/data/logo.png",
"desc": "Presplash image of the application.\nExample %(source.dir)s/assets/icons/logo.png",
"key": "presplash.filename"
},
{
"type": "string",
"title": "Icon of the application",
"section": "app",
"desc": "Icon of the application.\nExample %(source.dir)s/data/icon.png",
"desc": "Icon of the application.\nExample %(source.dir)s/assets/icons/icon.png",
"key": "icon.filename"
},
{
@@ -48,14 +48,21 @@
"section": "app",
"desc": "Application orientation",
"key": "orientation",
"options": {"landscape": "Landscape", "portrait": "Portrait", "all": "Auto"}
"options": {
"landscape": "Landscape",
"portrait": "Portrait",
"all": "Auto"
}
},
{
"type": "bool",
"title": "Fullscreen",
"section": "app",
"desc": "Fullscreen mode",
"values": ["Disabled", "Enabled"],
"values": [
"Disabled",
"Enabled"
],
"key": "fullscreen"
},
{
@@ -76,7 +83,13 @@
"desc": "Source files to include (let empty to include all the files)",
"key": "source.include_exts",
"allow_custom": true,
"items": ["py","png","jpg","kv","atlas"]
"items": [
"py",
"png",
"jpg",
"kv",
"atlas"
]
},
{
"type": "list",
@@ -85,7 +98,11 @@
"desc": "Source files to exclude (let empty to not exclude anything)",
"key": "source.exclude_exts",
"allow_custom": true,
"items": ["rar", "zip", "spec"]
"items": [
"rar",
"zip",
"spec"
]
},
{
"type": "list",
@@ -94,7 +111,11 @@
"desc": "List of directory to exclude (let empty to not exclude anything)",
"key": "source.exclude_dirs",
"allow_custom": true,
"items": ["tests", "test", "bin"]
"items": [
"tests",
"test",
"bin"
]
},
{
"type": "list",
@@ -103,7 +124,10 @@
"desc": "List of exclusions using pattern matching",
"key": "source.exclude_patterns",
"allow_custom": true,
"items": ["license","images/*/*.jpg"]
"items": [
"license",
"images/*/*.jpg"
]
},
{
"type": "list",
@@ -112,7 +136,10 @@
"desc": "List of inclusions using pattern matching",
"key": "source.include_patterns",
"allow_custom": true,
"items": ["assets/*", "images/*.png"]
"items": [
"assets/*",
"images/*.png"
]
},
{
"type": "list",
@@ -121,7 +148,10 @@
"desc": "List of services to declare",
"key": "services",
"allow_custom": true,
"items": ["NAME:ENTRYPOINT_TO_PY", "NAME2:ENTRYPOINT2_TO_PY"]
"items": [
"NAME:ENTRYPOINT_TO_PY",
"NAME2:ENTRYPOINT2_TO_PY"
]
},
{
"type": "title",
@@ -158,7 +188,84 @@
"section": "app",
"desc": "Application requirements.",
"key": "requirements",
"items": ["apsw", "audiostream", "bidi", "boost", "c_igraph", "cherrypy", "cprotobuf", "cymunk", "django", "docutils", "ecdsa", "enum34", "evdev", "ffmpeg", "ffmpeg2", "ffpyplayer", "freetype", "gevent", "greenlet", "harfbuzz", "hostpython", "igraph", "jpeg", "kivent_core", "kivent_cymunk", "kivy", "leveldb", "libevent", "libpq", "libsodium", "libswift", "libtorrent", "libxml2", "libxslt", "libyaml", "lxml", "m2crypto", "midistream", "msgpack", "mysql_connector", "netifaces", "numpy", "opencv", "openssl", "paramiko", "pil", "plyer", "plyvel", "png", "polygon", "protobuf", "psutil", "psycopg2", "pyasn1", "pycrypto", "pygame", "pyjnius", "pylibpd", "pyopenssl", "pyparsing", "pyqrcode", "python", "pyyaml", "sdl", "setuptools", "six", "sqlalchemy", "sqlite3", "storm", "swift", "thrift", "twisted", "txws", "wokkel", "zeroconf", "zope"],
"items": [
"apsw",
"audiostream",
"bidi",
"boost",
"c_igraph",
"cherrypy",
"cprotobuf",
"cymunk",
"django",
"docutils",
"ecdsa",
"enum34",
"evdev",
"ffmpeg",
"ffmpeg2",
"ffpyplayer",
"freetype",
"gevent",
"greenlet",
"harfbuzz",
"hostpython",
"igraph",
"jpeg",
"kivent_core",
"kivent_cymunk",
"kivy",
"leveldb",
"libevent",
"libpq",
"libsodium",
"libswift",
"libtorrent",
"libxml2",
"libxslt",
"libyaml",
"lxml",
"m2crypto",
"midistream",
"msgpack",
"mysql_connector",
"netifaces",
"numpy",
"opencv",
"openssl",
"paramiko",
"pil",
"plyer",
"plyvel",
"png",
"polygon",
"protobuf",
"psutil",
"psycopg2",
"pyasn1",
"pycrypto",
"pygame",
"pyjnius",
"pylibpd",
"pyopenssl",
"pyparsing",
"pyqrcode",
"python",
"pyyaml",
"sdl",
"setuptools",
"six",
"sqlalchemy",
"sqlite3",
"storm",
"swift",
"thrift",
"twisted",
"txws",
"wokkel",
"zeroconf",
"zope"
],
"allow_custom": true
},
{
@@ -168,6 +275,40 @@
"desc": "Application garden requirements.",
"key": "garden_requirements",
"allow_custom": true,
"items": ["androidtabs", "cefpython", "collider", "datetimepicker", "ddd", "desktopvideoplayer", "filebrowser", "filechooserthumbview", "gauge", "geartick", "graph", "knob", "magnet", "mapview", "modernmenu", "moretransitions", "navigationdrawer", "pagecurl", "particlesystem", "pizza", "progressspinner", "qrcode", "recycleview", "roulette", "roulettescroll", "scrolllabel", "segment", "smaa", "stiffscroll", "texturestack", "tickline", "tickmarker", "timeline"]
"items": [
"androidtabs",
"cefpython",
"collider",
"datetimepicker",
"ddd",
"desktopvideoplayer",
"filebrowser",
"filechooserthumbview",
"gauge",
"geartick",
"graph",
"knob",
"magnet",
"mapview",
"modernmenu",
"moretransitions",
"navigationdrawer",
"pagecurl",
"particlesystem",
"pizza",
"progressspinner",
"qrcode",
"recycleview",
"roulette",
"roulettescroll",
"scrolllabel",
"segment",
"smaa",
"stiffscroll",
"texturestack",
"tickline",
"tickmarker",
"timeline"
]
}
]
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
#to your needs
ActionBar:
id: _action
size_hint: 1,0.1
size_hint: 1, 0.1
pos_hint: {'top':1}
ActionView:
use_separator: True
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from kivy.uix import actionbar

from kivy.app import App

class RootWidget(FloatLayout):
'''This is the class representing your root widget.
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
text: 'File'
mode: 'spinner'
size_hint_x: None
width: 90
width: '90dp'
ActionButton:
text: 'New'
ActionButton:
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
manager: manager
ActionBar:
id: _action
size_hint: 1,0.1
size_hint: 1, 0.1
pos_hint: {'top':1}
ActionView:
use_separator: True
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from kivy.app import App
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.properties import NumericProperty, ObjectProperty
from kivy.lang import Builder
from kivy.properties import ObjectProperty
from kivy.uix.floatlayout import FloatLayout


class RootWidget(FloatLayout):
'''This the class representing your root widget.
By default it is inherited from ScreenManager,
8 changes: 5 additions & 3 deletions designer/uix/action_items.py
Original file line number Diff line number Diff line change
@@ -16,9 +16,11 @@

Builder.load_string("""
#: import theme_atlas utils.utils.theme_atlas
<DesignerActionButton>:
info: info
background_normal: 'atlas://data/images/defaulttheme/action_bar'
background_normal: theme_atlas('action_bar')
size_hint_x: None
width: designer_action_width
canvas.before:
@@ -57,7 +59,7 @@
btn_layout: btn_layout
_label: _label
checkbox: checkbox
background_normal: 'atlas://data/images/defaulttheme/action_bar'
background_normal: theme_atlas('action_bar')
size_hint: None, None
height: '49sp'
width: designer_action_width
@@ -102,7 +104,7 @@
size_hint: 1, None
width: designer_action_width
height: '48sp'
background_normal: 'atlas://data/images/defaulttheme/action_bar'
background_normal: theme_atlas('action_bar')
text_size: (self.width - sp(24), self.size[1])
valign: 'middle'
4 changes: 3 additions & 1 deletion designer/uix/code_find.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@

Builder.load_string("""
#: import theme_atlas utils.utils.theme_atlas
<CodeInputFind>:
txt_query: txt_query
size_hint_y: None
@@ -63,7 +65,7 @@
size_hint_x: None
width: '100dp'
Image:
source: 'atlas://data/images/defaulttheme/close'
source: theme_atlas('close')
size_hint: None, None
size: designer_height, designer_height
on_touch_down: if self.collide_point(*args[1].pos): root.dispatch('on_close')
4 changes: 3 additions & 1 deletion designer/utils/toolbox_widgets.py
Original file line number Diff line number Diff line change
@@ -6,11 +6,13 @@
#: The third field represents initial widget values
#: The fourth field are extra parameters used to display the widget while dragging

from utils.utils import icons

toolbox_widgets = [
('Button', 'base', {'text': 'Button'}, {'size_hint': (None, None), 'size': ('150sp', '40sp')}),
('Carousel', 'base'),
('CheckBox', 'base', {'active': True}, {'size_hint': (None, None), 'size': ('50sp', '50sp')}),
('Image', 'base', {'source': 'data/logo/kivy-icon-64.png'}, {'size_hint': (None, None), 'size': ('64dp', '64dp')}),
('Image', 'base', {'source': icons('kivy-icon-64')}, {'size_hint': (None, None), 'size': ('64dp', '64dp')}),
('Label', 'base', {'text': 'Label'}, {'size_hint': (None, None), 'size': ('150sp', '40sp')}),
('ProgressBar', 'base', {}, {'size_hint': (None, None), 'size': ('150sp', '40sp')}),
('Screen', 'base'),
23 changes: 19 additions & 4 deletions designer/utils/utils.py
Original file line number Diff line number Diff line change
@@ -32,6 +32,24 @@ def get_path(local):
def icons(name, ext='.png'):
return get_path(f'assets/icons/{name}{ext}')

def template_images(name, ext='.png'):
return get_path(f'assets/template_images/{name}{ext}')

def template_file(name, ext=''):
return get_path(f'tools/templates/{name}{ext}')

def config_path(name='', ext='.ini'):
if name != '':
return get_path(f'tools/{name}{ext}')
else:
return get_path('tools')

def profiles_path(name='', ext='.ini'):
if name != '':
return get_path(f'tools/profiles/{name}{ext}')
else:
return get_path('tools/profiles')

def utils_source_rst(name, ext='.rst'):
return get_path(f'utils/source/{name}{ext}')

@@ -41,9 +59,6 @@ def utils_source_img(name, ext='.png'):
class constants:
DIR_NEW_TEMPLATE = 'new_templates'
NEW_PROJECT_DIR_NAME_PREFIX = 'designer_'
NEW_TEMPLATE_IMAGE_PATH = os.path.join(DIR_NEW_TEMPLATE, 'images')
DIR_PROFILES = 'profiles'
DESIGNER_CONFIG_FILE_NAME = 'config.ini'

class FakeSettingList(EventDispatcher):
'''Fake Kivy Setting to use SettingList
@@ -165,7 +180,7 @@ def get_kd_dir():
def get_kd_data_dir():
'''Return kivy designer's data path
'''
return os.path.join(get_kd_dir(), 'data')
return os.path.join(get_kd_dir(), 'tools')


def show_alert(title, msg, width=500, height=200):

0 comments on commit 8099cd8

Please sign in to comment.