diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cc7cce..2a53054 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ -PROJECT (LAviewPluginDataExample C) +PROJECT (LAviewDataExample C) CMAKE_MINIMUM_REQUIRED (VERSION 2.8) -SET (PROJECT_LOWERCASE_NAME "laview-plugin-data-example") +SET (PROJECT_LOWERCASE_NAME "laview-data-example") SET (PROJECT_DESCRIPTION "LAview Plugin Data Example.") SET (MAJOR 0) diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt index cf3b5ad..6c20f26 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.data-example") +SET (GSchemaFile "ws.backbone.laview.data-example") INCLUDE (GSchemaCommonRules) diff --git a/config/ws.backbone.laview.plugins.data-example.gschema.xml b/config/ws.backbone.laview.data-example.gschema.xml similarity index 80% rename from config/ws.backbone.laview.plugins.data-example.gschema.xml rename to config/ws.backbone.laview.data-example.gschema.xml index 0539034..5de5b0c 100644 --- a/config/ws.backbone.laview.plugins.data-example.gschema.xml +++ b/config/ws.backbone.laview.data-example.gschema.xml @@ -1,5 +1,5 @@ - + "Hello, earthlings" diff --git a/po/de/laview-data-example.po b/po/de/laview-data-example.po new file mode 100644 index 0000000..77ef5ef --- /dev/null +++ b/po/de/laview-data-example.po @@ -0,0 +1,66 @@ +# German translations for laview-data-example package. +# Copyright (C) 2015 THE laview-data-example'S COPYRIGHT HOLDER +# This file is distributed under the same license as the laview-data-example package. +# , 2015. +# +msgid "" +msgstr "" +"Project-Id-Version: laview-data-example\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-28 15:40+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.data-example.gschema.xml.h:1 +msgid "\"Hello, earthlings\"" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:2 +msgid "A greeting" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:3 +msgid "Greeting of the invading martians" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:4 +msgid "Bottles of beer" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:5 +msgid "Number of bottles of beer on the wall" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:6 +msgid "Is the light switched on?" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:7 +msgid "State of an imaginary light switch." +msgstr "" + +#: src/main.vala:41 +msgid "Data Example" +msgstr "" + +#: ui/glade/laview-data-example.glade.h:1 +msgid "Data Plugin Preferences" +msgstr "" + +#: ui/glade/laview-data-example.glade.h:2 +msgid "...settings..." +msgstr "" + +#: ui/glade/laview-data-example.glade.h:3 +msgid "...preferences..." +msgstr "" + +#: ui/glade/laview-data-example.glade.h:4 +msgid "...properties..." +msgstr "" diff --git a/po/de/laview-plugin-data-example.po b/po/de/laview-plugin-data-example.po deleted file mode 100644 index 9495730..0000000 --- a/po/de/laview-plugin-data-example.po +++ /dev/null @@ -1,50 +0,0 @@ -# German translations for laview-plugin-data-example package. -# Copyright (C) 2015 THE laview-plugin-data-example'S COPYRIGHT HOLDER -# This file is distributed under the same license as the laview-plugin-data-example package. -# , 2015. -# -msgid "" -msgstr "" -"Project-Id-Version: laview-plugin-data-example\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-14 15:16+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.data-example.gschema.xml.h:1 -msgid "\"Hello, earthlings\"" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:2 -msgid "A greeting" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:3 -msgid "Greeting of the invading martians" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:4 -msgid "Bottles of beer" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:5 -msgid "Number of bottles of beer on the wall" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:6 -msgid "Is the light switched on?" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:7 -msgid "State of an imaginary light switch." -msgstr "" - -#: src/main.vala:39 -msgid "Data Example" -msgstr "" diff --git a/po/laview-data-example.pot b/po/laview-data-example.pot new file mode 100644 index 0000000..fa55e55 --- /dev/null +++ b/po/laview-data-example.pot @@ -0,0 +1,66 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the laview-data-example package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: laview-data-example\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-28 15:41+0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:1 +msgid "\"Hello, earthlings\"" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:2 +msgid "A greeting" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:3 +msgid "Greeting of the invading martians" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:4 +msgid "Bottles of beer" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:5 +msgid "Number of bottles of beer on the wall" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:6 +msgid "Is the light switched on?" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:7 +msgid "State of an imaginary light switch." +msgstr "" + +#: src/main.vala:41 +msgid "Data Example" +msgstr "" + +#: ui/glade/laview-data-example.glade.h:1 +msgid "Data Plugin Preferences" +msgstr "" + +#: ui/glade/laview-data-example.glade.h:2 +msgid "...settings..." +msgstr "" + +#: ui/glade/laview-data-example.glade.h:3 +msgid "...preferences..." +msgstr "" + +#: ui/glade/laview-data-example.glade.h:4 +msgid "...properties..." +msgstr "" diff --git a/po/laview-plugin-data-example.pot b/po/laview-plugin-data-example.pot deleted file mode 100644 index 70daa41..0000000 --- a/po/laview-plugin-data-example.pot +++ /dev/null @@ -1,50 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the laview-plugin-data-example package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: laview-plugin-data-example\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-14 15:16+0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:1 -msgid "\"Hello, earthlings\"" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:2 -msgid "A greeting" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:3 -msgid "Greeting of the invading martians" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:4 -msgid "Bottles of beer" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:5 -msgid "Number of bottles of beer on the wall" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:6 -msgid "Is the light switched on?" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:7 -msgid "State of an imaginary light switch." -msgstr "" - -#: src/main.vala:39 -msgid "Data Example" -msgstr "" diff --git a/po/ru/laview-data-example.po b/po/ru/laview-data-example.po new file mode 100644 index 0000000..ccc0192 --- /dev/null +++ b/po/ru/laview-data-example.po @@ -0,0 +1,67 @@ +# Russian translations for laview-data-example package. +# Copyright (C) 2015 THE laview-data-example'S COPYRIGHT HOLDER +# This file is distributed under the same license as the laview-data-example package. +# , 2015. +# +msgid "" +msgstr "" +"Project-Id-Version: laview-data-example\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-28 15:40+0300\n" +"PO-Revision-Date: 2015-11-09 15:51+0300\n" +"Last-Translator: \n" +"Language-Team: Russian\n" +"Language: ru\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"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.data-example.gschema.xml.h:1 +msgid "\"Hello, earthlings\"" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:2 +msgid "A greeting" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:3 +msgid "Greeting of the invading martians" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:4 +msgid "Bottles of beer" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:5 +msgid "Number of bottles of beer on the wall" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:6 +msgid "Is the light switched on?" +msgstr "" + +#: config/ws.backbone.laview.data-example.gschema.xml.h:7 +msgid "State of an imaginary light switch." +msgstr "" + +#: src/main.vala:41 +msgid "Data Example" +msgstr "Пример данных" + +#: ui/glade/laview-data-example.glade.h:1 +msgid "Data Plugin Preferences" +msgstr "" + +#: ui/glade/laview-data-example.glade.h:2 +msgid "...settings..." +msgstr "" + +#: ui/glade/laview-data-example.glade.h:3 +msgid "...preferences..." +msgstr "" + +#: ui/glade/laview-data-example.glade.h:4 +msgid "...properties..." +msgstr "" diff --git a/po/ru/laview-plugin-data-example.po b/po/ru/laview-plugin-data-example.po deleted file mode 100644 index 0841979..0000000 --- a/po/ru/laview-plugin-data-example.po +++ /dev/null @@ -1,51 +0,0 @@ -# Russian translations for laview-plugin-data-example package. -# Copyright (C) 2015 THE laview-plugin-data-example'S COPYRIGHT HOLDER -# This file is distributed under the same license as the laview-plugin-data-example package. -# , 2015. -# -msgid "" -msgstr "" -"Project-Id-Version: laview-plugin-data-example\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-02-14 15:16+0300\n" -"PO-Revision-Date: 2015-11-09 15:51+0300\n" -"Last-Translator: \n" -"Language-Team: Russian\n" -"Language: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"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.data-example.gschema.xml.h:1 -msgid "\"Hello, earthlings\"" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:2 -msgid "A greeting" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:3 -msgid "Greeting of the invading martians" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:4 -msgid "Bottles of beer" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:5 -msgid "Number of bottles of beer on the wall" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:6 -msgid "Is the light switched on?" -msgstr "" - -#: config/ws.backbone.laview.plugins.data-example.gschema.xml.h:7 -msgid "State of an imaginary light switch." -msgstr "" - -#: src/main.vala:39 -msgid "Data Example" -msgstr "Пример данных" diff --git a/src/AppDirs.vala b/src/AppDirs.vala index 64bdfd2..132df3f 100644 --- a/src/AppDirs.vala +++ b/src/AppDirs.vala @@ -2,7 +2,7 @@ namespace Get { extern void library_path (string so_path, void *addr); } -namespace LAview.Core.Plugins.DataExample { +namespace LAview.DataExample { class AppDirs : Object { @@ -20,7 +20,7 @@ namespace LAview.Core.Plugins.DataExample { common_dir = exec_dir.get_parent (); common_dir = common_dir.get_parent().get_parent().get_parent(); ui_dir = Path.build_path (Path.DIR_SEPARATOR_S, common_dir.get_path(), - "share/laview-plugin-data-example-"+Config.VERSION_MAJOR.to_string()+"/ui"); + "share/laview-data-example-"+Config.VERSION_MAJOR.to_string()+"/ui"); stdout.printf ("Vala:so_path=%s\n", so_path.get_path()); settings_dir = Path.build_path (Path.DIR_SEPARATOR_S, common_dir.get_path(), "share/glib-2.0/schemas"); stdout.printf ("ui_dir = %s\n", ui_dir); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4d74799..724d151 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -SET (LibName laview-plugin-data-example) +SET (LibName laview-data-example) FILE (GLOB_RECURSE LibSources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.vala) SET (LibPackages gtk+-3.0 gee-0.8 gobject-plugin-iface-0 laview-core-iface-0 laview-core-0) SET (LibPkgModules gtk+-3.0 gee-0.8 gobject-plugin-0 laview-core-0) diff --git a/src/PreferencesDialog.vala b/src/PreferencesDialog.vala index bdabcfd..849b0fe 100644 --- a/src/PreferencesDialog.vala +++ b/src/PreferencesDialog.vala @@ -1,14 +1,14 @@ -namespace LAview.Core.Plugins { +namespace LAview.DataExample { using Gtk, LAview; - class DataExample.PreferencesDialog : GLib.Object { + class PreferencesDialog : GLib.Object { Dialog dialog; public bool composed { get; private set; default = false; } public PreferencesDialog (GLib.Object parent) throws Error { var builder = new Builder (); - builder.add_from_file (DataExample.AppDirs.ui_dir + "/laview-plugin-data-example.glade"); + builder.add_from_file (AppDirs.ui_dir + "/laview-data-example.glade"); builder.connect_signals (this); dialog = builder.get_object ("preferences_dialog") as Dialog; diff --git a/src/main.vala b/src/main.vala index 1744748..d1d8a39 100644 --- a/src/main.vala +++ b/src/main.vala @@ -2,29 +2,29 @@ using LAview, Core, GObject.Plugins; extern const string GETTEXT_PACKAGE; -namespace LAview.Core.Plugins { +namespace LAview.DataExample { /** * Data Plugin Example. */ - public class PluginDataExample : PluginData { + public class Plugin : LAview.Core.PluginData { - DataExample.PreferencesDialog preferences_dialog = null; + PreferencesDialog preferences_dialog = null; /** - * Constructs a new ``PluginDataExample``. + * Constructs a new ``Plugin``. */ construct { // Initialize the data object, open database connection for example. - stdout.puts ("PluginDataExample init () called\n"); - DataExample.AppDirs.init (); + stdout.puts ("DataExample.Plugin init () called\n"); + AppDirs.init (); } /** - * Destroys the ``PluginDataExample``. + * Destroys the ``Plugin``. */ - ~PluginDataExample () { + ~Plugin () { // Deinitialize the data object, close database connection for example. - stdout.puts ("PluginDataExample deinit () called\n"); + stdout.puts ("DataExample.Plugin deinit () called\n"); } /** @@ -45,7 +45,7 @@ namespace LAview.Core.Plugins { * Open Preferences. */ public override void preferences (Object parent) throws Error { - if (preferences_dialog == null) preferences_dialog = new DataExample.PreferencesDialog (parent); + if (preferences_dialog == null) preferences_dialog = new PreferencesDialog (parent); preferences_dialog.show_all (); } @@ -90,5 +90,5 @@ namespace LAview.Core.Plugins { [ModuleInit] Type plugin_init (GLib.TypeModule type_module) { - return typeof (LAview.Core.Plugins.PluginDataExample); + return typeof (LAview.DataExample.Plugin); } diff --git a/ui/glade/laview-plugin-data-example.glade b/ui/glade/laview-data-example.glade similarity index 93% rename from ui/glade/laview-plugin-data-example.glade rename to ui/glade/laview-data-example.glade index aa750d8..c910adf 100644 --- a/ui/glade/laview-plugin-data-example.glade +++ b/ui/glade/laview-data-example.glade @@ -22,7 +22,7 @@ True True True - + True @@ -38,7 +38,7 @@ True True True - + True @@ -54,7 +54,7 @@ True True True - + True