[gnote] Updated replace title addin to new addin support



commit 3258d75cfcc2b4fb714499bd5622367a8c91a6cb
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Sun Apr 14 16:45:20 2013 +0300

    Updated replace title addin to new addin support

 src/addins/replacetitle/Makefile.am               |  8 ++++++
 src/addins/replacetitle/replacetitle.desktop.in   |  9 +++++++
 src/addins/replacetitle/replacetitlenoteaddin.cpp | 32 +----------------------
 src/addins/replacetitle/replacetitlenoteaddin.hpp |  8 +-----
 4 files changed, 19 insertions(+), 38 deletions(-)
---
diff --git a/src/addins/replacetitle/Makefile.am b/src/addins/replacetitle/Makefile.am
index fbbaf95..299cb92 100644
--- a/src/addins/replacetitle/Makefile.am
+++ b/src/addins/replacetitle/Makefile.am
@@ -1,11 +1,19 @@
 
 include $(builddir)/../addins.mk
 
+ INTLTOOL_DESKTOP_RULE@
+
+desktop_in_files = replacetitle.desktop.in
+desktop_files    = $(desktop_in_files:.desktop.in=.desktop)
+
 addinsdir = $(ADDINSDIR)
 addins_LTLIBRARIES = replacetitle.la
+addins_DATA = $(desktop_files)
 
 replacetitle_la_SOURCES = \
        replacetitlenoteaddin.cpp \
        replacetitlenoteaddin.hpp
 
 
+EXTRA_DIST = $(desktop_in_files)
+DISTCLEANFILES = $(desktop_files)
diff --git a/src/addins/replacetitle/replacetitle.desktop.in b/src/addins/replacetitle/replacetitle.desktop.in
new file mode 100644
index 0000000..5ad93c7
--- /dev/null
+++ b/src/addins/replacetitle/replacetitle.desktop.in
@@ -0,0 +1,9 @@
+[AddinInfo]
+Id=ReplaceTitleAddin
+_Name=Replace title
+_Description=Replace title with selection.
+_Authors=Pierre-Yves Luyten
+Category=Tools
+Version=0.2
+DefaultEnabled=true
+Module=replacetitle
diff --git a/src/addins/replacetitle/replacetitlenoteaddin.cpp 
b/src/addins/replacetitle/replacetitlenoteaddin.cpp
index e941eed..35dc374 100644
--- a/src/addins/replacetitle/replacetitlenoteaddin.cpp
+++ b/src/addins/replacetitle/replacetitlenoteaddin.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2012 Aurimas Cernius
+ * Copyright (C) 2011-2013 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -33,36 +33,6 @@ ReplaceTitleModule::ReplaceTitleModule()
   ADD_INTERFACE_IMPL(ReplaceTitleNoteAddin);
 }
 
-const char * ReplaceTitleModule::id() const
-{
-  return "ReplaceTitleAddin";
-}
-
-const char * ReplaceTitleModule::name() const
-{
-  return _("Replace title");
-}
-
-const char * ReplaceTitleModule::description() const
-{
-  return _("Replace title with selection.");
-}
-
-
-const char * ReplaceTitleModule::authors() const
-{
-  return _("Pierre-Yves Luyten");
-}
-
-int ReplaceTitleModule::category() const
-{
-  return gnote::ADDIN_CATEGORY_TOOLS;
-}
-
-const char * ReplaceTitleModule::version() const
-{
-  return "0.1";
-}
 
 void ReplaceTitleNoteAddin::initialize()
 {
diff --git a/src/addins/replacetitle/replacetitlenoteaddin.hpp 
b/src/addins/replacetitle/replacetitlenoteaddin.hpp
index 8bfb5d8..38b5c5d 100644
--- a/src/addins/replacetitle/replacetitlenoteaddin.hpp
+++ b/src/addins/replacetitle/replacetitlenoteaddin.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2012 Aurimas Cernius
+ * Copyright (C) 2011-2013 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -34,12 +34,6 @@ class ReplaceTitleModule
 {
 public:
   ReplaceTitleModule();
-  virtual const char * id() const;
-  virtual const char * name() const;
-  virtual const char * description() const;
-  virtual const char * authors() const;
-  virtual int          category() const;
-  virtual const char * version() const;
 };
   
 DECLARE_MODULE(ReplaceTitleModule);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]