diff options
Diffstat (limited to 'kmenuedit')
-rw-r--r-- | kmenuedit/basictab.cpp | 26 | ||||
-rw-r--r-- | kmenuedit/menufile.cpp | 24 | ||||
-rw-r--r-- | kmenuedit/menufile.h | 4 | ||||
-rw-r--r-- | kmenuedit/menuinfo.cpp | 6 | ||||
-rw-r--r-- | kmenuedit/treeview.cpp | 54 | ||||
-rw-r--r-- | kmenuedit/treeview.h | 10 |
6 files changed, 62 insertions, 62 deletions
diff --git a/kmenuedit/basictab.cpp b/kmenuedit/basictab.cpp index a5cd9ac64..1ab175c17 100644 --- a/kmenuedit/basictab.cpp +++ b/kmenuedit/basictab.cpp @@ -53,7 +53,7 @@ BasicTab::BasicTab( TQWidget *parent, const char *name ) _menuFolderInfo = 0; _menuEntryInfo = 0; - TQGridLayout *tqlayout = new TQGridLayout(this, 6, 2, + TQGridLayout *layout = new TQGridLayout(this, 6, 2, KDialog::marginHint(), KDialog::spacingHint()); @@ -75,7 +75,7 @@ BasicTab::BasicTab( TQWidget *parent, const char *name ) _execEdit = new KURLRequester(general_group); _execEdit->lineEdit()->setAcceptDrops(false); TQWhatsThis::add(_execEdit,i18n( - "Following the command, you can have several place holders which will be tqreplaced " + "Following the command, you can have several place holders which will be replaced " "with the actual values when the actual program is run:\n" "%f - a single file name\n" "%F - a list of files; use for applications that can open several local files at once\n" @@ -129,8 +129,8 @@ BasicTab::BasicTab( TQWidget *parent, const char *name ) connect(_iconButton, TQT_SIGNAL(iconChanged(TQString)), TQT_SLOT(slotChanged())); grid->addMultiCellWidget(_iconButton, 0, 1, 2, 2); - // add the general group to the main tqlayout - tqlayout->addMultiCellWidget(general_group, 0, 0, 0, 1); + // add the general group to the main layout + layout->addMultiCellWidget(general_group, 0, 0, 0, 1); // path group _path_group = new TQGroupBox(this); @@ -151,7 +151,7 @@ BasicTab::BasicTab( TQWidget *parent, const char *name ) connect(_pathEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged())); vbox->addWidget(hbox); - tqlayout->addMultiCellWidget(_path_group, 1, 1, 0, 1); + layout->addMultiCellWidget(_path_group, 1, 1, 0, 1); // terminal group _term_group = new TQGroupBox(this); @@ -172,7 +172,7 @@ BasicTab::BasicTab( TQWidget *parent, const char *name ) connect(_termOptEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged())); vbox->addWidget(hbox); - tqlayout->addMultiCellWidget(_term_group, 2, 2, 0, 1); + layout->addMultiCellWidget(_term_group, 2, 2, 0, 1); _termOptEdit->setEnabled(false); @@ -195,18 +195,18 @@ BasicTab::BasicTab( TQWidget *parent, const char *name ) connect(_uidEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotChanged())); vbox->addWidget(hbox); - tqlayout->addMultiCellWidget(_uid_group, 3, 3, 0, 1); + layout->addMultiCellWidget(_uid_group, 3, 3, 0, 1); _uidEdit->setEnabled(false); - tqlayout->setRowStretch(0, 2); + layout->setRowStretch(0, 2); // key binding group general_group_keybind = new TQGroupBox(this); - tqlayout->addMultiCellWidget( general_group_keybind, 4, 4, 0, 1 ); + layout->addMultiCellWidget( general_group_keybind, 4, 4, 0, 1 ); // dummy widget in order to make it look a bit better - tqlayout->addWidget( new TQWidget(this), 5, 0 ); - tqlayout->setRowStretch( 5, 4 ); + layout->addWidget( new TQWidget(this), 5, 0 ); + layout->setRowStretch( 5, 4 ); TQGridLayout *grid_keybind = new TQGridLayout(general_group_keybind, 3, 1, KDialog::marginHint(), KDialog::spacingHint()); @@ -468,8 +468,8 @@ void BasicTab::slotCapturedShortcut(const KShortcut& cut) if (signalsBlocked()) return; - if( KKeyChooser::checkGlobalShortcutsConflict( cut, true, tqtopLevelWidget()) - || KKeyChooser::checkStandardShortcutsConflict( cut, true, tqtopLevelWidget())) + if( KKeyChooser::checkGlobalShortcutsConflict( cut, true, topLevelWidget()) + || KKeyChooser::checkStandardShortcutsConflict( cut, true, topLevelWidget())) return; if ( KHotKeys::present() ) diff --git a/kmenuedit/menufile.cpp b/kmenuedit/menufile.cpp index 90cf7b7c7..d1582c23b 100644 --- a/kmenuedit/menufile.cpp +++ b/kmenuedit/menufile.cpp @@ -297,7 +297,7 @@ void MenuFile::addEntry(const TQString &menuName, const TQString &menuId) includeNode.appendChild(fileNode); } -void MenuFile::setLayout(const TQString &menuName, const TQStringList &tqlayout) +void MenuFile::setLayout(const TQString &menuName, const TQStringList &layout) { m_bDirty = true; @@ -305,47 +305,47 @@ void MenuFile::setLayout(const TQString &menuName, const TQStringList &tqlayout) purgeLayout(elem); - TQDomElement tqlayoutNode = m_doc.createElement(MF_LAYOUT); - elem.appendChild(tqlayoutNode); + TQDomElement layoutNode = m_doc.createElement(MF_LAYOUT); + elem.appendChild(layoutNode); - for(TQStringList::ConstIterator it = tqlayout.begin(); - it != tqlayout.end(); ++it) + for(TQStringList::ConstIterator it = layout.begin(); + it != layout.end(); ++it) { TQString li = *it; if (li == ":S") { - tqlayoutNode.appendChild(m_doc.createElement(MF_SEPARATOR)); + layoutNode.appendChild(m_doc.createElement(MF_SEPARATOR)); } else if (li == ":M") { TQDomElement mergeNode = m_doc.createElement(MF_MERGE); mergeNode.setAttribute("type", "menus"); - tqlayoutNode.appendChild(mergeNode); + layoutNode.appendChild(mergeNode); } else if (li == ":F") { TQDomElement mergeNode = m_doc.createElement(MF_MERGE); mergeNode.setAttribute("type", "files"); - tqlayoutNode.appendChild(mergeNode); + layoutNode.appendChild(mergeNode); } else if (li == ":A") { TQDomElement mergeNode = m_doc.createElement(MF_MERGE); mergeNode.setAttribute("type", "all"); - tqlayoutNode.appendChild(mergeNode); + layoutNode.appendChild(mergeNode); } else if (li.endsWith("/")) { li.truncate(li.length()-1); TQDomElement menuNode = m_doc.createElement(MF_MENUNAME); menuNode.appendChild(m_doc.createTextNode(li)); - tqlayoutNode.appendChild(menuNode); + layoutNode.appendChild(menuNode); } else { TQDomElement fileNode = m_doc.createElement(MF_FILENAME); fileNode.appendChild(m_doc.createTextNode(li)); - tqlayoutNode.appendChild(fileNode); + layoutNode.appendChild(fileNode); } } } @@ -468,7 +468,7 @@ TQString MenuFile::uniqueMenuName(const TQString &menuName, const TQString &newM for(int n = 1; ++n; ) { - if (findMenu(elem, result, false).isNull() && !excludeList.tqcontains(result)) + if (findMenu(elem, result, false).isNull() && !excludeList.contains(result)) return result; result.truncate(trunc); diff --git a/kmenuedit/menufile.h b/kmenuedit/menufile.h index 60c1b454b..c216d486c 100644 --- a/kmenuedit/menufile.h +++ b/kmenuedit/menufile.h @@ -72,7 +72,7 @@ public: bool performAllActions(); /** - * Returns whether the stack tqcontains any actions + * Returns whether the stack contains any actions */ bool dirty(); @@ -83,7 +83,7 @@ public: void moveMenu(const TQString &oldMenu, const TQString &newMenu); void removeMenu(const TQString &menuName); - void setLayout(const TQString &menuName, const TQStringList &tqlayout); + void setLayout(const TQString &menuName, const TQStringList &layout); /** * Returns a unique menu-name for a new menu under @p menuName diff --git a/kmenuedit/menuinfo.cpp b/kmenuedit/menuinfo.cpp index 95cd64182..affb0bcba 100644 --- a/kmenuedit/menuinfo.cpp +++ b/kmenuedit/menuinfo.cpp @@ -489,14 +489,14 @@ bool MenuEntryInfo::isShortcutAvailable(const KShortcut &_shortcut) { s_allShortcuts = new TQStringList(KHotKeys::allShortCuts()); } - available = !s_allShortcuts->tqcontains(shortcutKey); + available = !s_allShortcuts->contains(shortcutKey); if (available && s_newShortcuts) { - available = !s_newShortcuts->tqcontains(shortcutKey); + available = !s_newShortcuts->contains(shortcutKey); } if (!available && s_freeShortcuts) { - available = s_freeShortcuts->tqcontains(shortcutKey); + available = s_freeShortcuts->contains(shortcutKey); } return available; } diff --git a/kmenuedit/treeview.cpp b/kmenuedit/treeview.cpp index 5fcbcb80d..693ba568c 100644 --- a/kmenuedit/treeview.cpp +++ b/kmenuedit/treeview.cpp @@ -62,11 +62,11 @@ #define COPY_SEPARATOR 'S' TreeItem::TreeItem(TQListViewItem *parent, TQListViewItem *after, const TQString& menuId, bool __init) - :TQListViewItem(parent, after), _hidden(false), _init(__init), _tqlayoutDirty(false), _menuId(menuId), + :TQListViewItem(parent, after), _hidden(false), _init(__init), _layoutDirty(false), _menuId(menuId), m_folderInfo(0), m_entryInfo(0) {} TreeItem::TreeItem(TQListView *parent, TQListViewItem *after, const TQString& menuId, bool __init) - : TQListViewItem(parent, after), _hidden(false), _init(__init), _tqlayoutDirty(false), _menuId(menuId), + : TQListViewItem(parent, after), _hidden(false), _init(__init), _layoutDirty(false), _menuId(menuId), m_folderInfo(0), m_entryInfo(0) {} void TreeItem::setName(const TQString &name) @@ -149,7 +149,7 @@ static TQPixmap appIcon(const TQString &iconName) TreeView::TreeView( bool controlCenter, KActionCollection *ac, TQWidget *parent, const char *name ) : KListView(parent, name), m_ac(ac), m_rmb(0), m_clipboard(0), m_clipboardFolderInfo(0), m_clipboardEntryInfo(0), - m_controlCenter(controlCenter), m_tqlayoutDirty(false) + m_controlCenter(controlCenter), m_layoutDirty(false) { setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); setAllColumnsShowFocus(true); @@ -273,7 +273,7 @@ void TreeView::readMenuFolderInfo(MenuFolderInfo *folderInfo, KServiceGroup::Ptr folderInfo->comment = folder->comment(); // Item names may contain ampersands. To avoid them being converted - // to accelerators, tqreplace them with two ampersands. + // to accelerators, replace them with two ampersands. folderInfo->hidden = folder->noDisplay(); folderInfo->directoryFile = folder->directoryEntryPath(); folderInfo->icon = folder->icon(); @@ -611,7 +611,7 @@ TQStringList TreeView::fileList(const TQString& rPath) TQStringList files = dir.entryList(); for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) { // does not work?! - //if (filelist.tqcontains(*it)) continue; + //if (filelist.contains(*it)) continue; if (relativePath.isEmpty()) { filelist.remove(*it); // hack @@ -649,7 +649,7 @@ TQStringList TreeView::dirList(const TQString& rPath) for (TQStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it) { if ((*it) == "." || (*it) == "..") continue; // does not work?! - // if (dirlist.tqcontains(*it)) continue; + // if (dirlist.contains(*it)) continue; if (relativePath.isEmpty()) { dirlist.remove(*it); //hack @@ -715,7 +715,7 @@ static TQString createDirectoryFile(const TQString &file, TQStringList *excludeL else result = base + TQString("-%1.directory").arg(i); - if (!excludeList->tqcontains(result)) + if (!excludeList->contains(result)) { if (locate("xdgdata-dirs", result).isEmpty()) break; @@ -997,7 +997,7 @@ void TreeView::newsubmenu() if (!ok) return; TQString file = caption; - file.tqreplace('/', '-'); + file.replace('/', '-'); file = createDirectoryFile(file, &m_newDirectoryList); // Create @@ -1069,7 +1069,7 @@ void TreeView::newitem() TQString menuId; TQString file = caption; - file.tqreplace('/', '-'); + file.replace('/', '-'); file = createDesktopFile(file, &menuId, &m_newMenuIds); // Create @@ -1470,7 +1470,7 @@ static TQStringList extractLayout(TreeItem *item) { bool firstFolder = true; bool firstEntry = true; - TQStringList tqlayout; + TQStringList layout; for(;item; item = static_cast<TreeItem*>(item->nextSibling())) { if (item->isDirectory()) @@ -1478,41 +1478,41 @@ static TQStringList extractLayout(TreeItem *item) if (firstFolder) { firstFolder = false; - tqlayout << ":M"; // Add new folders here... + layout << ":M"; // Add new folders here... } - tqlayout << (item->folderInfo()->id); + layout << (item->folderInfo()->id); } else if (item->isEntry()) { if (firstEntry) { firstEntry = false; - tqlayout << ":F"; // Add new entries here... + layout << ":F"; // Add new entries here... } - tqlayout << (item->entryInfo()->menuId()); + layout << (item->entryInfo()->menuId()); } else { - tqlayout << ":S"; + layout << ":S"; } } - return tqlayout; + return layout; } -TQStringList TreeItem::tqlayout() +TQStringList TreeItem::layout() { - TQStringList tqlayout = extractLayout(static_cast<TreeItem*>(firstChild())); - _tqlayoutDirty = false; - return tqlayout; + TQStringList layout = extractLayout(static_cast<TreeItem*>(firstChild())); + _layoutDirty = false; + return layout; } void TreeView::saveLayout() { - if (m_tqlayoutDirty) + if (m_layoutDirty) { - TQStringList tqlayout = extractLayout(static_cast<TreeItem*>(firstChild())); - m_menuFile->setLayout(m_rootFolder->fullId, tqlayout); - m_tqlayoutDirty = false; + TQStringList layout = extractLayout(static_cast<TreeItem*>(firstChild())); + m_menuFile->setLayout(m_rootFolder->fullId, layout); + m_layoutDirty = false; } TQPtrList<TQListViewItem> lst; @@ -1521,7 +1521,7 @@ void TreeView::saveLayout() TreeItem *item = static_cast<TreeItem*>(it.current()); if ( item->isLayoutDirty() ) { - m_menuFile->setLayout(item->folderInfo()->fullId, item->tqlayout()); + m_menuFile->setLayout(item->folderInfo()->fullId, item->layout()); } ++it; } @@ -1554,7 +1554,7 @@ void TreeView::setLayoutDirty(TreeItem *parentItem) if (parentItem) parentItem->setLayoutDirty(); else - m_tqlayoutDirty = true; + m_layoutDirty = true; } bool TreeView::isLayoutDirty() @@ -1571,7 +1571,7 @@ bool TreeView::isLayoutDirty() bool TreeView::dirty() { - return m_tqlayoutDirty || m_rootFolder->hasDirt() || m_menuFile->dirty() || isLayoutDirty(); + return m_layoutDirty || m_rootFolder->hasDirt() || m_menuFile->dirty() || isLayoutDirty(); } void TreeView::findServiceShortcut(const KShortcut&cut, KService::Ptr &service) diff --git a/kmenuedit/treeview.h b/kmenuedit/treeview.h index b64d7da57..ebb5c6d14 100644 --- a/kmenuedit/treeview.h +++ b/kmenuedit/treeview.h @@ -62,9 +62,9 @@ public: bool isHidden() const { return _hidden; } void setHidden(bool b); - bool isLayoutDirty() { return _tqlayoutDirty; } - void setLayoutDirty() { _tqlayoutDirty = true; } - TQStringList tqlayout(); + bool isLayoutDirty() { return _layoutDirty; } + void setLayoutDirty() { _layoutDirty = true; } + TQStringList layout(); virtual void setOpen(bool o); void load(); @@ -77,7 +77,7 @@ private: bool _hidden : 1; bool _init : 1; - bool _tqlayoutDirty : 1; + bool _layoutDirty : 1; TQString _menuId; TQString _name; TQString _directoryPath; @@ -172,7 +172,7 @@ private: TQStringList m_newDirectoryList; bool m_detailedMenuEntries; bool m_detailedEntriesNamesFirst; - bool m_tqlayoutDirty; + bool m_layoutDirty; }; |