[gnote] Change addin categories to constants
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Change addin categories to constants
- Date: Mon, 18 Oct 2010 19:09:43 +0000 (UTC)
commit 564a3b4e284981a23e654383c3d8d7984d01e5d8
Author: Aurimas Ä?ernius <aurisc4 gmail com>
Date: Sat Oct 16 21:02:16 2010 +0300
Change addin categories to constants
Change category method for DynamicModule to return int.
Define constants for addin categories and make addins use them.
src/abstractaddin.hpp | 6 ++++++
src/addins/backlinks/backlinksnoteaddin.cpp | 4 ++--
src/addins/backlinks/backlinksnoteaddin.hpp | 2 +-
src/addins/bugzilla/bugzillanoteaddin.cpp | 4 ++--
src/addins/bugzilla/bugzillanoteaddin.hpp | 2 +-
src/addins/exporttohtml/exporttohtmlnoteaddin.cpp | 4 ++--
src/addins/exporttohtml/exporttohtmlnoteaddin.hpp | 2 +-
src/addins/fixedwidth/fixedwidthnoteaddin.cpp | 4 ++--
src/addins/fixedwidth/fixedwidthnoteaddin.hpp | 2 +-
.../inserttimestamp/inserttimestampnoteaddin.cpp | 4 ++--
.../inserttimestamp/inserttimestampnoteaddin.hpp | 2 +-
.../noteoftheday/noteofthedayapplicationaddin.cpp | 4 ++--
.../noteoftheday/noteofthedayapplicationaddin.hpp | 2 +-
src/addins/printnotes/printnotesnoteaddin.cpp | 4 ++--
src/addins/printnotes/printnotesnoteaddin.hpp | 2 +-
.../stickynoteimport/stickynoteimportnoteaddin.cpp | 4 ++--
.../stickynoteimport/stickynoteimportnoteaddin.hpp | 2 +-
src/addins/tomboyimport/tomboyimportaddin.cpp | 4 ++--
src/addins/tomboyimport/tomboyimportaddin.hpp | 2 +-
src/addins/underline/underlinenoteaddin.cpp | 4 ++--
src/addins/underline/underlinenoteaddin.hpp | 2 +-
src/sharp/dynamicmodule.hpp | 2 +-
22 files changed, 37 insertions(+), 31 deletions(-)
---
diff --git a/src/abstractaddin.hpp b/src/abstractaddin.hpp
index 16909fa..9007581 100644
--- a/src/abstractaddin.hpp
+++ b/src/abstractaddin.hpp
@@ -29,6 +29,12 @@
namespace gnote {
+enum {
+ ADDIN_CATEGORY_TOOLS,
+ ADDIN_CATEGORY_FORMATTING,
+ ADDIN_CATEGORY_DESKTOP_INTEGRATION
+};
+
class AbstractAddin
: public sharp::IInterface
, public sigc::trackable
diff --git a/src/addins/backlinks/backlinksnoteaddin.cpp b/src/addins/backlinks/backlinksnoteaddin.cpp
index d61fd34..abd5b2b 100644
--- a/src/addins/backlinks/backlinksnoteaddin.cpp
+++ b/src/addins/backlinks/backlinksnoteaddin.cpp
@@ -49,9 +49,9 @@ const char * BacklinksModule::authors() const
{
return _("Hubert Figuiere and Tomboy Project");
}
-const char * BacklinksModule::category() const
+int BacklinksModule::category() const
{
- return "Tools";
+ return gnote::ADDIN_CATEGORY_TOOLS;
}
const char * BacklinksModule::version() const
{
diff --git a/src/addins/backlinks/backlinksnoteaddin.hpp b/src/addins/backlinks/backlinksnoteaddin.hpp
index d2fbeb4..9d7fed7 100644
--- a/src/addins/backlinks/backlinksnoteaddin.hpp
+++ b/src/addins/backlinks/backlinksnoteaddin.hpp
@@ -40,7 +40,7 @@ public:
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/addins/bugzilla/bugzillanoteaddin.cpp b/src/addins/bugzilla/bugzillanoteaddin.cpp
index 620a9c8..bf21faf 100644
--- a/src/addins/bugzilla/bugzillanoteaddin.cpp
+++ b/src/addins/bugzilla/bugzillanoteaddin.cpp
@@ -64,9 +64,9 @@ namespace bugzilla {
{
return _("Hubert Figuiere and the Tomboy Project");
}
- const char * BugzillaModule::category() const
+ int BugzillaModule::category() const
{
- return "Desktop Integration";
+ return gnote::ADDIN_CATEGORY_DESKTOP_INTEGRATION;
}
const char * BugzillaModule::version() const
{
diff --git a/src/addins/bugzilla/bugzillanoteaddin.hpp b/src/addins/bugzilla/bugzillanoteaddin.hpp
index 226f2c5..8e97148 100644
--- a/src/addins/bugzilla/bugzillanoteaddin.hpp
+++ b/src/addins/bugzilla/bugzillanoteaddin.hpp
@@ -39,7 +39,7 @@ public:
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp b/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp
index 8ba0155..e717cf0 100644
--- a/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp
+++ b/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp
@@ -70,9 +70,9 @@ const char * ExportToHtmlModule::authors() const
{
return _("Hubert Figuiere and the Tomboy Project");
}
-const char * ExportToHtmlModule::category() const
+int ExportToHtmlModule::category() const
{
- return "Tools";
+ return gnote::ADDIN_CATEGORY_TOOLS;
}
const char * ExportToHtmlModule::version() const
{
diff --git a/src/addins/exporttohtml/exporttohtmlnoteaddin.hpp b/src/addins/exporttohtml/exporttohtmlnoteaddin.hpp
index c5c69a4..380a71a 100644
--- a/src/addins/exporttohtml/exporttohtmlnoteaddin.hpp
+++ b/src/addins/exporttohtml/exporttohtmlnoteaddin.hpp
@@ -45,7 +45,7 @@ public:
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/addins/fixedwidth/fixedwidthnoteaddin.cpp b/src/addins/fixedwidth/fixedwidthnoteaddin.cpp
index 57b9824..cc3e67d 100644
--- a/src/addins/fixedwidth/fixedwidthnoteaddin.cpp
+++ b/src/addins/fixedwidth/fixedwidthnoteaddin.cpp
@@ -55,9 +55,9 @@ namespace fixedwidth {
{
return "";
}
- const char * FixedWidthModule::category() const
+ int FixedWidthModule::category() const
{
- return "Formatting";
+ return gnote::ADDIN_CATEGORY_FORMATTING;
}
const char * FixedWidthModule::version() const
{
diff --git a/src/addins/fixedwidth/fixedwidthnoteaddin.hpp b/src/addins/fixedwidth/fixedwidthnoteaddin.hpp
index 6d583bf..056f981 100644
--- a/src/addins/fixedwidth/fixedwidthnoteaddin.hpp
+++ b/src/addins/fixedwidth/fixedwidthnoteaddin.hpp
@@ -46,7 +46,7 @@ namespace fixedwidth {
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/addins/inserttimestamp/inserttimestampnoteaddin.cpp b/src/addins/inserttimestamp/inserttimestampnoteaddin.cpp
index 49e01dd..bfa8412 100644
--- a/src/addins/inserttimestamp/inserttimestampnoteaddin.cpp
+++ b/src/addins/inserttimestamp/inserttimestampnoteaddin.cpp
@@ -53,9 +53,9 @@ namespace inserttimestamp {
{
return _("Hubert Figuiere and Tomboy Project");
}
- const char * InsertTimeStampModule::category() const
+ int InsertTimeStampModule::category() const
{
- return "Tools";
+ return gnote::ADDIN_CATEGORY_TOOLS;
}
const char * InsertTimeStampModule::version() const
{
diff --git a/src/addins/inserttimestamp/inserttimestampnoteaddin.hpp b/src/addins/inserttimestamp/inserttimestampnoteaddin.hpp
index 0aa1232..698994a 100644
--- a/src/addins/inserttimestamp/inserttimestampnoteaddin.hpp
+++ b/src/addins/inserttimestamp/inserttimestampnoteaddin.hpp
@@ -41,7 +41,7 @@ public:
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp b/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
index 01e272b..2614e41 100644
--- a/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
+++ b/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
@@ -52,9 +52,9 @@ const char * NoteOfTheDayModule::authors() const
{
return _("Debarshi Ray and the Tomboy Project");
}
-const char * NoteOfTheDayModule::category() const
+int NoteOfTheDayModule::category() const
{
- return "Tools";
+ return gnote::ADDIN_CATEGORY_TOOLS;
}
const char * NoteOfTheDayModule::version() const
{
diff --git a/src/addins/noteoftheday/noteofthedayapplicationaddin.hpp b/src/addins/noteoftheday/noteofthedayapplicationaddin.hpp
index f1ba51f..48f0f01 100644
--- a/src/addins/noteoftheday/noteofthedayapplicationaddin.hpp
+++ b/src/addins/noteoftheday/noteofthedayapplicationaddin.hpp
@@ -42,7 +42,7 @@ public:
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/addins/printnotes/printnotesnoteaddin.cpp b/src/addins/printnotes/printnotesnoteaddin.cpp
index 67bcc79..fb2dbb8 100644
--- a/src/addins/printnotes/printnotesnoteaddin.cpp
+++ b/src/addins/printnotes/printnotesnoteaddin.cpp
@@ -54,9 +54,9 @@ namespace printnotes {
{
return _("Hubert Figuiere and the Tomboy Project");
}
- const char * PrintNotesModule::category() const
+ int PrintNotesModule::category() const
{
- return "Desktop Integration";
+ return gnote::ADDIN_CATEGORY_DESKTOP_INTEGRATION;
}
const char * PrintNotesModule::version() const
{
diff --git a/src/addins/printnotes/printnotesnoteaddin.hpp b/src/addins/printnotes/printnotesnoteaddin.hpp
index 25a8072..4e1c0de 100644
--- a/src/addins/printnotes/printnotesnoteaddin.hpp
+++ b/src/addins/printnotes/printnotesnoteaddin.hpp
@@ -45,7 +45,7 @@ public:
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp b/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
index ae8d83d..4c3b136 100644
--- a/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
+++ b/src/addins/stickynoteimport/stickynoteimportnoteaddin.cpp
@@ -65,9 +65,9 @@ const char * StickyNoteImportModule::authors() const
{
return _("Hubert Figuiere and the Tomboy Project");
}
-const char * StickyNoteImportModule::category() const
+int StickyNoteImportModule::category() const
{
- return "Tools";
+ return gnote::ADDIN_CATEGORY_TOOLS;
}
const char * StickyNoteImportModule::version() const
{
diff --git a/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp b/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
index 66c8bfc..702579c 100644
--- a/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
+++ b/src/addins/stickynoteimport/stickynoteimportnoteaddin.hpp
@@ -42,7 +42,7 @@ public:
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/addins/tomboyimport/tomboyimportaddin.cpp b/src/addins/tomboyimport/tomboyimportaddin.cpp
index c03a583..d84572a 100644
--- a/src/addins/tomboyimport/tomboyimportaddin.cpp
+++ b/src/addins/tomboyimport/tomboyimportaddin.cpp
@@ -54,9 +54,9 @@ const char * TomboyImportModule::authors() const
{
return _("Hubert Figuiere");
}
-const char * TomboyImportModule::category() const
+int TomboyImportModule::category() const
{
- return "Tools";
+ return gnote::ADDIN_CATEGORY_TOOLS;
}
const char * TomboyImportModule::version() const
{
diff --git a/src/addins/tomboyimport/tomboyimportaddin.hpp b/src/addins/tomboyimport/tomboyimportaddin.hpp
index 494d909..f3b096d 100644
--- a/src/addins/tomboyimport/tomboyimportaddin.hpp
+++ b/src/addins/tomboyimport/tomboyimportaddin.hpp
@@ -40,7 +40,7 @@ public:
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/addins/underline/underlinenoteaddin.cpp b/src/addins/underline/underlinenoteaddin.cpp
index 560c4a8..7db1a1e 100644
--- a/src/addins/underline/underlinenoteaddin.cpp
+++ b/src/addins/underline/underlinenoteaddin.cpp
@@ -55,9 +55,9 @@ namespace underline {
{
return _("Hubert Figuière and the Tomboy Project");
}
- const char * UnderlineModule::category() const
+ int UnderlineModule::category() const
{
- return "Formatting";
+ return gnote::ADDIN_CATEGORY_FORMATTING;
}
const char * UnderlineModule::version() const
{
diff --git a/src/addins/underline/underlinenoteaddin.hpp b/src/addins/underline/underlinenoteaddin.hpp
index ac4a07a..6c1f0f6 100644
--- a/src/addins/underline/underlinenoteaddin.hpp
+++ b/src/addins/underline/underlinenoteaddin.hpp
@@ -42,7 +42,7 @@ namespace underline {
virtual const char * name() const;
virtual const char * description() const;
virtual const char * authors() const;
- virtual const char * category() const;
+ virtual int category() const;
virtual const char * version() const;
};
diff --git a/src/sharp/dynamicmodule.hpp b/src/sharp/dynamicmodule.hpp
index 98917a8..cd8c8d1 100644
--- a/src/sharp/dynamicmodule.hpp
+++ b/src/sharp/dynamicmodule.hpp
@@ -59,7 +59,7 @@ public:
virtual const char * name() const = 0;
virtual const char * description() const = 0;
virtual const char * authors() const = 0;
- virtual const char * category() const = 0;
+ virtual int category() const = 0;
virtual const char * version() const = 0;
virtual const char * copyright() const;
bool is_enabled() const
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]