mirror of
https://github.com/KDE/konsole.git
synced 2026-05-03 20:26:45 -04:00
Add support for reading the profiles' menu index (favorites) from the profile file.
This patch doesn't write the index, only reads. CCBUG: 18530 svn path=/trunk/KDE/kdebase/apps/konsole/; revision=959584
This commit is contained in:
@@ -80,6 +80,7 @@ const Profile::PropertyInfo Profile::DefaultPropertyNames[] =
|
||||
, { TabBarPosition , "TabBarPosition" , GENERAL_GROUP , QVariant::Int }
|
||||
, { StartInCurrentSessionDir , "StartInCurrentSessionDir" , GENERAL_GROUP , QVariant::Bool }
|
||||
, { ShowNewAndCloseTabButtons, "ShowNewAndCloseTabButtons" , GENERAL_GROUP , QVariant::Bool }
|
||||
, { MenuIndex, "MenuIndex" , GENERAL_GROUP , QVariant::String }
|
||||
|
||||
// Appearance
|
||||
, { Font , "Font" , APPEARANCE_GROUP , QVariant::Font }
|
||||
@@ -155,6 +156,7 @@ FallbackProfile::FallbackProfile()
|
||||
setProperty(ShowMenuBar,true);
|
||||
setProperty(StartInCurrentSessionDir,true);
|
||||
setProperty(ShowNewAndCloseTabButtons,false);
|
||||
setProperty(MenuIndex,"0");
|
||||
|
||||
setProperty(KeyBindings,"default");
|
||||
setProperty(ColorScheme,"DarkPastels");
|
||||
@@ -276,6 +278,14 @@ void Profile::registerProperty(const PropertyInfo& info)
|
||||
_infoByProperty.insert(info.property,info);
|
||||
}
|
||||
|
||||
int Profile::menuIndexAsInt() const
|
||||
{
|
||||
bool ok;
|
||||
int index = menuIndex().toInt(&ok, 10);
|
||||
if (ok) return index;
|
||||
return 0;
|
||||
}
|
||||
|
||||
QString KDE4ProfileWriter::getPath(const Profile::Ptr info)
|
||||
{
|
||||
QString newPath;
|
||||
|
||||
Reference in New Issue
Block a user