[rkward-cvs] rkward/rkward/settings rksettingsmoduleplugins.cpp,1.8,1.9 rksettingsmoduleplugins.h,1.3,1.4
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Fri Sep 9 13:02:59 UTC 2005
- Previous message: [rkward-cvs] rkward/rkward/plugin rkcomponentmap.cpp,NONE,1.1 rkcomponentmap.h,NONE,1.1 Makefile.am,1.3,1.4 rkpluginhandle.cpp,1.2,1.3 rkpluginhandle.h,1.2,1.3
- Next message: [rkward-cvs] rkward/rkward/plugins Makefile.am,1.9,1.10 standard_plugins.pluginmap,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/rkward/rkward/rkward/settings
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12794/rkward/settings
Modified Files:
rksettingsmoduleplugins.cpp rksettingsmoduleplugins.h
Log Message:
Changed the way plugin-handles and corresponding menu-entries are created. Added some first building blocks for component infrastructure. Some polishing still needed.
Index: rksettingsmoduleplugins.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmoduleplugins.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** rksettingsmoduleplugins.cpp 22 Apr 2005 13:56:19 -0000 1.8
--- rksettingsmoduleplugins.cpp 9 Sep 2005 13:02:57 -0000 1.9
***************
*** 32,36 ****
// static members
! QString RKSettingsModulePlugins::plugin_dir;
RKSettingsModulePlugins::PluginPrefs RKSettingsModulePlugins::interface_pref;
--- 32,36 ----
// static members
! QString RKSettingsModulePlugins::plugin_map;
RKSettingsModulePlugins::PluginPrefs RKSettingsModulePlugins::interface_pref;
***************
*** 58,64 ****
main_vbox->addStretch ();
! dir_choser = new GetFileNameWidget (this, GetFileNameWidget::ExistingDirectory, i18n ("Directory where the plugins are located"), "", plugin_dir);
! connect (dir_choser, SIGNAL (locationChanged ()), this, SLOT (pathChanged ()));
! main_vbox->addWidget (dir_choser);
}
--- 58,64 ----
main_vbox->addStretch ();
! map_choser = new GetFileNameWidget (this, GetFileNameWidget::ExistingFile, i18n (".pluginmap file"), "", plugin_map);
! connect (map_choser, SIGNAL (locationChanged ()), this, SLOT (pathChanged ()));
! main_vbox->addWidget (map_choser);
}
***************
*** 83,87 ****
void RKSettingsModulePlugins::applyChanges () {
! plugin_dir = dir_choser->getLocation ();
#if QT_VERSION < 0x030200
interface_pref = static_cast<PluginPrefs> (button_group->id (button_group->selected ()));
--- 83,87 ----
void RKSettingsModulePlugins::applyChanges () {
! plugin_map = map_choser->getLocation ();
#if QT_VERSION < 0x030200
interface_pref = static_cast<PluginPrefs> (button_group->id (button_group->selected ()));
***************
*** 98,102 ****
void RKSettingsModulePlugins::saveSettings (KConfig *config) {
config->setGroup ("Plugin Settings");
! config->writeEntry ("Plugin-Directory", plugin_dir);
config->writeEntry ("Interface Preferences", static_cast<int> (interface_pref));
}
--- 98,102 ----
void RKSettingsModulePlugins::saveSettings (KConfig *config) {
config->setGroup ("Plugin Settings");
! config->writeEntry ("Plugin-Map", plugin_map);
config->writeEntry ("Interface Preferences", static_cast<int> (interface_pref));
}
***************
*** 104,114 ****
void RKSettingsModulePlugins::loadSettings (KConfig *config) {
config->setGroup ("Plugin Settings");
! plugin_dir = config->readEntry ("Plugin-Directory", "#unknown#");
! if (plugin_dir == "#unknown#") {
! plugin_dir = KGlobal::dirs()->findResourceDir("plugins", "description.xml");
! if (plugin_dir == "") {
// try our luck with a relative path
! plugin_dir = "plugins/";
}
}
interface_pref = static_cast<PluginPrefs> (config->readNumEntry ("Interface Preferences", static_cast<int> (PreferWizard)));
--- 104,115 ----
void RKSettingsModulePlugins::loadSettings (KConfig *config) {
config->setGroup ("Plugin Settings");
! plugin_map = config->readEntry ("Plugin-Map", "#unknown#");
! if (plugin_map == "#unknown#") {
! plugin_map = KGlobal::dirs()->findResourceDir("plugins", "standard_plugins.pluginmap");
! if (plugin_map == "") {
// try our luck with a relative path
! plugin_map = "plugins";
}
+ plugin_map += "/standard_plugins.pluginmap";
}
interface_pref = static_cast<PluginPrefs> (config->readNumEntry ("Interface Preferences", static_cast<int> (PreferWizard)));
Index: rksettingsmoduleplugins.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/settings/rksettingsmoduleplugins.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rksettingsmoduleplugins.h 24 Aug 2004 15:04:57 -0000 1.3
--- rksettingsmoduleplugins.h 9 Sep 2005 13:02:57 -0000 1.4
***************
*** 46,50 ****
QString caption ();
! static QString &pluginDir () { return plugin_dir; };
static PluginPrefs getInterfacePreference () { return interface_pref; };
public slots:
--- 46,50 ----
QString caption ();
! static QString &pluginMap () { return plugin_map; };
static PluginPrefs getInterfacePreference () { return interface_pref; };
public slots:
***************
*** 52,59 ****
void buttonClicked (int);
private:
! GetFileNameWidget *dir_choser;
QButtonGroup *button_group;
! static QString plugin_dir;
static PluginPrefs interface_pref;
};
--- 52,59 ----
void buttonClicked (int);
private:
! GetFileNameWidget *map_choser;
QButtonGroup *button_group;
! static QString plugin_map;
static PluginPrefs interface_pref;
};
- Previous message: [rkward-cvs] rkward/rkward/plugin rkcomponentmap.cpp,NONE,1.1 rkcomponentmap.h,NONE,1.1 Makefile.am,1.3,1.4 rkpluginhandle.cpp,1.2,1.3 rkpluginhandle.h,1.2,1.3
- Next message: [rkward-cvs] rkward/rkward/plugins Makefile.am,1.9,1.10 standard_plugins.pluginmap,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the rkward-tracker
mailing list