diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d5ce8f..61c0877 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,9 @@ -PROJECT (LAviewPluginProtocolExample C) +PROJECT (LAviewPluginObjectExample C) CMAKE_MINIMUM_REQUIRED (VERSION 2.8) -SET (PROJECT_LOWERCASE_NAME "laview-plugin-protocol-example") -SET (PROJECT_DESCRIPTION "LAview Plugin Protocol Example.") +SET (PROJECT_LOWERCASE_NAME "laview-plugin-object-example") +SET (PROJECT_DESCRIPTION "LAview Plugin Protocol Object Example.") SET (MAJOR 0) SET (MINOR 0) diff --git a/README b/README index 5163cd7..2f56796 100644 --- a/README +++ b/README @@ -1 +1 @@ -LAview protocol plugin sample. +LAview protocol object plugin sample. diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index 1f06cec..b8840bf 100644 --- a/config/CMakeLists.txt +++ b/config/CMakeLists.txt @@ -1,5 +1,5 @@ CONFIGURE_FILE ("${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h") -SET (GSchemaFile "ws.backbone.laview.plugins.protocol-example") +SET (GSchemaFile "ws.backbone.laview.plugins.object-example") INCLUDE (GSchemaCommonRules) diff --git a/config/ws.backbone.laview.plugins.protocol-example.gschema.xml b/config/ws.backbone.laview.plugins.object-example.gschema.xml similarity index 79% rename from config/ws.backbone.laview.plugins.protocol-example.gschema.xml rename to config/ws.backbone.laview.plugins.object-example.gschema.xml index 98239f5..1112c0e 100644 --- a/config/ws.backbone.laview.plugins.protocol-example.gschema.xml +++ b/config/ws.backbone.laview.plugins.object-example.gschema.xml @@ -1,5 +1,5 @@ - + "Hello, earthlings" diff --git a/cpack/CMakeLists.txt b/cpack/CMakeLists.txt index ab3aecd..1a594e8 100644 --- a/cpack/CMakeLists.txt +++ b/cpack/CMakeLists.txt @@ -4,7 +4,7 @@ SET (DEBIAN_SECTION "TeX") SET (REDHAT_DEPENDENCIES "laview-core-0 >= 0.0.0") SET (REDHAT_SECTION "Applications/Publishing") SET (LICENSE "LGPLv3+") -SET (WIN32_UNINSTALL_NAME "LAvPlPEx") # <= 8 symbols for the name -SET (CPACK_NSIS_MENU_LINKS "https://git.backbone.ws/laview/protocol-example" - "Homepage for LAview/Protocol-Example") +SET (WIN32_UNINSTALL_NAME "LAvPlOEx") # <= 8 symbols for the name +SET (CPACK_NSIS_MENU_LINKS "https://git.backbone.ws/laview/object-example" + "Homepage for LAview/Object-Example") INCLUDE (CPackCommonRules) diff --git a/po/de/CMakeLists.txt b/po/de/CMakeLists.txt deleted file mode 100644 index 0b6020c..0000000 --- a/po/de/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -INCLUDE (GettextLangRules) diff --git a/po/de/laview-plugin-protocol-example.po b/po/de/laview-plugin-protocol-example.po deleted file mode 100644 index 172842d..0000000 --- a/po/de/laview-plugin-protocol-example.po +++ /dev/null @@ -1,50 +0,0 @@ -# German translations for laview-plugin-protocol-example package. -# Copyright (C) 2015 THE laview-plugin-protocol-example'S COPYRIGHT HOLDER -# This file is distributed under the same license as the laview-plugin-protocol-example package. -# , 2015. -# -msgid "" -msgstr "" -"Project-Id-Version: laview-plugin-protocol-example\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-09 15:51+0300\n" -"PO-Revision-Date: 2015-11-09 15:51+0300\n" -"Last-Translator: \n" -"Language-Team: German\n" -"Language: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ASCII\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:1 -msgid "\"Hello, earthlings\"" -msgstr "" - -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:2 -msgid "A greeting" -msgstr "" - -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:3 -msgid "Greeting of the invading martians" -msgstr "" - -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:4 -msgid "Bottles of beer" -msgstr "" - -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:5 -msgid "Number of bottles of beer on the wall" -msgstr "" - -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:6 -msgid "Is the light switched on?" -msgstr "" - -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:7 -msgid "State of an imaginary light switch." -msgstr "" - -#: src/main.vala:32 -msgid "Protocol Example" -msgstr "" diff --git a/po/laview-plugin-protocol-example.pot b/po/laview-plugin-object-example.pot similarity index 59% rename from po/laview-plugin-protocol-example.pot rename to po/laview-plugin-object-example.pot index 663872b..d6093ab 100644 --- a/po/laview-plugin-protocol-example.pot +++ b/po/laview-plugin-object-example.pot @@ -1,12 +1,12 @@ # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the laview-plugin-protocol-example package. +# This file is distributed under the same license as the laview-plugin-object-example package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: laview-plugin-protocol-example\n" +"Project-Id-Version: laview-plugin-object-example\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-11-14 08:16+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" @@ -17,34 +17,34 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:1 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:1 msgid "\"Hello, earthlings\"" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:2 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:2 msgid "A greeting" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:3 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:3 msgid "Greeting of the invading martians" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:4 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:4 msgid "Bottles of beer" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:5 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:5 msgid "Number of bottles of beer on the wall" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:6 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:6 msgid "Is the light switched on?" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:7 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:7 msgid "State of an imaginary light switch." msgstr "" #: src/main.vala:32 -msgid "Protocol Example" +msgid "Protocol Object Example" msgstr "" diff --git a/po/ru/laview-plugin-protocol-example.po b/po/ru/laview-plugin-object-example.po similarity index 52% rename from po/ru/laview-plugin-protocol-example.po rename to po/ru/laview-plugin-object-example.po index 242efad..9559b7f 100644 --- a/po/ru/laview-plugin-protocol-example.po +++ b/po/ru/laview-plugin-object-example.po @@ -1,11 +1,11 @@ -# Russian translations for laview-plugin-protocol-example package. -# Copyright (C) 2015 THE laview-plugin-protocol-example'S COPYRIGHT HOLDER -# This file is distributed under the same license as the laview-plugin-protocol-example package. +# Russian translations for laview-plugin-object-example package. +# Copyright (C) 2015 THE laview-plugin-object-example'S COPYRIGHT HOLDER +# This file is distributed under the same license as the laview-plugin-object-example package. # , 2015. # msgid "" msgstr "" -"Project-Id-Version: laview-plugin-protocol-example\n" +"Project-Id-Version: laview-plugin-object-example\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-11-09 15:51+0300\n" "PO-Revision-Date: 2015-11-09 15:51+0300\n" @@ -18,34 +18,34 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:1 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:1 msgid "\"Hello, earthlings\"" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:2 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:2 msgid "A greeting" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:3 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:3 msgid "Greeting of the invading martians" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:4 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:4 msgid "Bottles of beer" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:5 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:5 msgid "Number of bottles of beer on the wall" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:6 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:6 msgid "Is the light switched on?" msgstr "" -#: config/ws.backbone.laview.plugins.protocol-example.gschema.xml.h:7 +#: config/ws.backbone.laview.plugins.object-example.gschema.xml.h:7 msgid "State of an imaginary light switch." msgstr "" #: src/main.vala:32 -msgid "Protocol Example" -msgstr "Пример протокола" +msgid "Protocol Object Example" +msgstr "Пример объекта протокола" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 90a2f69..acd5d14 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -SET (PluginName laview-plugin-protocol-example-${MAJOR}) +SET (PluginName laview-plugin-object-example-${MAJOR}) FILE (GLOB_RECURSE PluginSources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.vala) SET (PluginPackages gtk+-3.0 gee-0.8 gobject-plugin-iface-0 laview-core-iface-0 laview-core-0) SET (PluginPkgModules gtk+-3.0 gee-0.8 gobject-plugin-0 laview-core-0) @@ -8,5 +8,5 @@ SET (PluginInstall ON) SET (PluginExtraSources ${CMAKE_CURRENT_BINARY_DIR}/library_constructor.c) SET (LC_RELATIVE_PREFIX "../../../..") CONFIGURE_FILE ( "${CMAKE_SOURCE_DIR}/cmake/backbone/templates/library_constructor.c.in" "${PluginExtraSources}") -SET (PluginInstallPrefix "laview-core-0/protocol-plugins") +SET (PluginInstallPrefix "laview-core-0/object-plugins") INCLUDE (ValaPluginCommonRules) diff --git a/src/main.vala b/src/main.vala index 602019a..358f578 100644 --- a/src/main.vala +++ b/src/main.vala @@ -5,34 +5,41 @@ extern const string GETTEXT_PACKAGE; /** * Plugin of type A1. */ -public class PluginProtocolExample : PluginProtocol { +public class PluginProtocolObjectExample : PluginProtocolObject { /** - * Constructs a new ``PluginProtocolExample``. + * Constructs a new ``PluginProtocolObjectExample``. */ construct { - stdout.puts ("PluginProtocolExample init () called\n"); + stdout.puts ("PluginProtocolObjectExample init () called\n"); } /** * Destroys the ``PluginProtocolExample``. */ - ~PluginProtocolExample () { - stdout.puts ("PluginProtocolExample deinit () called\n"); + ~PluginProtocolObjectExample () { + stdout.puts ("PluginProtocolObjectExample deinit () called\n"); } /** - * Any abstract method realization for PluginProtocol. + * Gets a name of the plugin. + */ + public override string get_name () { + return "ProtObjEx"; + } + + /** + * Gets readable name of the plugin. */ public override string get_readable_name () { - stdout.puts ("PluginProtocolExample.get_readable_name () called\n"); - stdout.puts ("Call IHostCore.any_host_method () from PluginProtocolExample:\n "); + stdout.puts ("PluginProtocolObjectExample.get_readable_name () called\n"); + stdout.puts ("Call IHostCore.any_host_method () from PluginProtocolObjectExample:\n "); (host as IHostCore).any_host_method (); - return _("Protocol Example"); + return _("Protocol Object Example"); } } [ModuleInit] Type plugin_init (GLib.TypeModule type_module) { - return typeof (PluginProtocolExample); + return typeof (PluginProtocolObjectExample); } diff --git a/ui/glade/laview-plugin-protocol-example.glade b/ui/glade/laview-plugin-object-example.glade similarity index 100% rename from ui/glade/laview-plugin-protocol-example.glade rename to ui/glade/laview-plugin-object-example.glade