+ // Set the icons.
+ websiteFavoriteIconRadioButtonPointer->setIcon(favoriteIcon);
+ customFavoriteIconRadioButtonPointer->setIcon(QIcon::fromTheme(QLatin1String("globe"), QIcon::fromTheme(QLatin1String("applications-internet"))));
+
+ // Instantiate a folder helper.
+ folderHelperPointer = new FolderHelper();
+
+ // Set the parent folder tree widget column count.
+ parentFolderTreeWidgetPointer->setColumnCount(2);
+
+ // Hide the second column.
+ parentFolderTreeWidgetPointer->hideColumn(folderHelperPointer->FOLDER_ID_COLUMN);
+
+ // Set the column header.
+ parentFolderTreeWidgetPointer->setHeaderLabel(i18nc("The folder tree widget header", "Select Parent Folder"));
+
+ // Create a bookmarks tree widget item.
+ QTreeWidgetItem *bookmarksTreeWidgetItemPointer = new QTreeWidgetItem();
+
+ // Populate the bookmarks tree widget item.
+ bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_NAME_COLUMN, i18nc("The bookmarks root tree widget name", "Bookmarks"));
+ bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme(QLatin1String("bookmarks"), QIcon::fromTheme(QLatin1String("bookmark-new"))));
+ bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_ID_COLUMN, QLatin1String("0"));
+
+ // Add the bookmarks tree widget item to the root of the tree.
+ parentFolderTreeWidgetPointer->addTopLevelItem(bookmarksTreeWidgetItemPointer);
+
+ // Select the root bookmarks folder if it is the initial parent folder.
+ if (parentFolderId == 0)
+ bookmarksTreeWidgetItemPointer->setSelected(true);
+
+ // Populate the subfolders.
+ folderHelperPointer->populateSubfolders(bookmarksTreeWidgetItemPointer, parentFolderId);
+
+ // Open all the folders.
+ parentFolderTreeWidgetPointer->expandAll();