kdelibs/kdeui
Frans Englich
frans.englich at telia.com
Tue Mar 16 23:57:42 CET 2004
CVS commit by englich:
Added two items:
"Reset" -> reset()
"Administrator Mode" -> adminMode()
CCMAIL: kde-quality at mail.kde.org
M +17 -0 kstdguiitem.cpp 1.29
M +11 -2 kstdguiitem.h 1.17
--- kdelibs/kdeui/kstdguiitem.cpp #1.28:1.29
@@ -45,4 +45,6 @@ KGuiItem KStdGuiItem::guiItem ( StdItem
case Open : return open();
case Quit : return quit();
+ case AdminMode: return adminMode();
+ case Reset : return reset();
default : return KGuiItem();
};
@@ -70,4 +72,5 @@ QString KStdGuiItem::stdItem( StdItem ui
case Open : return QString::fromLatin1("open");
case Quit : return QString::fromLatin1("quit");
+ case AdminMode: return QString::fromLatin1("adminMode");
default : return QString::null;
};
@@ -128,4 +131,12 @@ KGuiItem KStdGuiItem::apply()
}
+KGuiItem KStdGuiItem::adminMode()
+{
+ return KGuiItem( i18n( "Administrator &Mode..." ), "", i18n( "Enter Administrator Mode" ),
+ i18n( "When clicking <b>Administrator Mode</b> you will be prompted "
+ "for the administrator(root) password in order to do changes "
+ "which requires root privileges." ) );
+}
+
KGuiItem KStdGuiItem::clear()
{
@@ -199,3 +210,9 @@ KGuiItem KStdGuiItem::quit()
}
+KGuiItem KStdGuiItem::reset()
+{
+ return KGuiItem( i18n( "&Reset" ), "undo",
+ i18n( "Reset configuration" ) );
+}
+
// vim: set ts=2 sts=2 sw=2 et:
--- kdelibs/kdeui/kstdguiitem.h #1.16:1.17
@@ -49,5 +49,5 @@ public:
Ok=1, Cancel, Yes, No, Discard, Save, DontSave, SaveAs,
Apply, Clear, Help, Defaults, Close, Back, Forward, Print,
- Continue, Open, Quit
+ Continue, Open, Quit, AdminMode, Reset
};
static KGuiItem guiItem ( StdItem ui_enum );
@@ -67,6 +67,14 @@ public:
static KGuiItem close();
static KGuiItem print();
+ static KGuiItem reset();
/**
- * It should be "continue", but that's a C/C++ keyword :-o
+ * Returns a KGuiItem suiting for cases where code or functionality
+ * runs under root privileges. Used in conjunction with KConfig Modules.
+ */
+ static KGuiItem adminMode();
+
+ /**
+ * Returns a "continue" item. The short name is due to "continue" being a
+ * reserved word in the C++ language.
*/
static KGuiItem cont();
More information about the kde-quality
mailing list