Skip to content

Commit 0729811

Browse files
committed
Opens and shows a message the first time the console is call (Issues: #184 #209)
1 parent e364bf8 commit 0729811

File tree

11 files changed

+40
-0
lines changed

11 files changed

+40
-0
lines changed

commands/deviot_show_console.py

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from sublime_plugin import WindowCommand
2+
from ..libraries.messages import Messages
23

34
class DeviotShowConsoleCommand(WindowCommand):
45
"""
@@ -8,4 +9,10 @@ class DeviotShowConsoleCommand(WindowCommand):
89
"""
910

1011
def run(self):
12+
output_view = self.window.find_output_panel('deviot')
13+
if(not output_view):
14+
messages = Messages()
15+
messages.create_panel()
16+
messages.first_message()
17+
1118
self.window.run_command("show_panel", {"panel": "output.deviot"})

languages/de.lang

+3
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ msgstr "Verarbeiten"
330330
msgid "unknown"
331331
msgstr "Unknown"
332332

333+
msgid "deviot_info"
334+
msgstr "\nYou will see more information after build your project or upload your firmware.\n\n- Check the wiki to know more about Deviot https://goo.gl/PKju55\n- If this plugin has been helpful for you, consider to make a donation https://goo.gl/7K4BXh"
335+
333336
# Libraries
334337

335338
msgid "deviot_library{0}"

languages/en.lang

+3
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ msgstr "Processing"
330330
msgid "unknown"
331331
msgstr "Unknown"
332332

333+
msgid "deviot_info"
334+
msgstr "\nYou will see more information after build your project or upload your firmware.\n\n- Check the wiki to know more about Deviot https://goo.gl/PKju55\n- If this plugin has been helpful for you, consider to make a donation https://goo.gl/7K4BXh"
335+
333336
# Libraries
334337

335338
msgid "deviot_library{0}"

languages/es.lang

+3
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ msgstr "Procesando"
330330
msgid "unknown"
331331
msgstr "Desconocido"
332332

333+
msgid "deviot_info"
334+
msgstr "\nPodrás ver más información después de compilar tu proyecto o subir tu firmware.\n\n- Aprende más sobre Deviot en la Wiki https://goo.gl/PKju55\n- Si este plugin te ha sido útil, considera hacer una donación https://goo.gl/7K4BXh"
335+
333336
# Librerías
334337

335338
msgid "deviot_library{0}"

languages/fr.lang

+3
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ msgstr "En traitement"
330330
msgid "unknown"
331331
msgstr "Unknown"
332332

333+
msgid "deviot_info"
334+
msgstr "\nYou will see more information after build your project or upload your firmware.\n\n- Check the wiki to know more about Deviot https://goo.gl/PKju55\n- If this plugin has been helpful for you, consider to make a donation https://goo.gl/7K4BXh"
335+
333336
# Libraries
334337

335338
msgid "deviot_library{0}"

languages/it.lang

+3
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ msgstr "In lavorazione"
330330
msgid "unknown"
331331
msgstr "Unknown"
332332

333+
msgid "deviot_info"
334+
msgstr "\nYou will see more information after build your project or upload your firmware.\n\n- Check the wiki to know more about Deviot https://goo.gl/PKju55\n- If this plugin has been helpful for you, consider to make a donation https://goo.gl/7K4BXh"
335+
333336
# Libraries
334337

335338
msgid "deviot_library{0}"

languages/ko.lang

+3
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ msgstr "가공"
330330
msgid "unknown"
331331
msgstr "Unknown"
332332

333+
msgid "deviot_info"
334+
msgstr "\nYou will see more information after build your project or upload your firmware.\n\n- Check the wiki to know more about Deviot https://goo.gl/PKju55\n- If this plugin has been helpful for you, consider to make a donation https://goo.gl/7K4BXh"
335+
333336
# Libraries
334337

335338
msgid "deviot_library{0}"

languages/pl.lang

+3
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ msgstr "Processing"
327327
msgid "unknown"
328328
msgstr "Unknown"
329329

330+
msgid "deviot_info"
331+
msgstr "\nYou will see more information after build your project or upload your firmware.\n\n- Check the wiki to know more about Deviot https://goo.gl/PKju55\n- If this plugin has been helpful for you, consider to make a donation https://goo.gl/7K4BXh"
332+
330333
# Libraries
331334

332335
msgid "deviot_library{0}"

languages/pt_br.lang

+3
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ msgstr "Em Processamento"
331331
msgid "unknown"
332332
msgstr "Desconhecido"
333333

334+
msgid "deviot_info"
335+
msgstr "\nVocê vai ver mais informação depois de compilar o seu projeto ou ao carregar um firmware.\n\n- Visite a wiki para saber mais sobre Deviot https://goo.gl/PKju55\n- Se esse plugin tem sido de ajuda para você, considere fazer uma doação https://goo.gl/7K4BXh"
336+
334337
# Libraries
335338

336339
msgid "deviot_library{0}"

languages/zh.lang

+3
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ msgstr "处理"
330330
msgid "unknown"
331331
msgstr "Unknown"
332332

333+
msgid "deviot_info"
334+
msgstr "\nYou will see more information after build your project or upload your firmware.\n\n- Check the wiki to know more about Deviot https://goo.gl/PKju55\n- If this plugin has been helpful for you, consider to make a donation https://goo.gl/7K4BXh"
335+
333336
# 库
334337

335338
msgid "deviot_library{0}"

libraries/messages.py

+6
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ def send_to_file(self, text):
190190
to_option = 'eof' if automatic_scroll else None
191191
self.output_view.run_command('move_to', {'extend': False, 'to': to_option})
192192

193+
def first_message(self):
194+
from . import __version__ as version
195+
196+
self.print('_deviot_{0}', version)
197+
self.print('deviot_info')
198+
193199
def recover_panel(self, name):
194200
"""
195201
Recover the message window object

0 commit comments

Comments
 (0)