]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/dialogs/EditBookmarkDialog.cpp
Focus the bookmark name when adding or editing bookmarks. https://redmine.stoutner...
[PrivacyBrowserPC.git] / src / dialogs / EditBookmarkDialog.cpp
index 6dd3f712471247b9e4bd0f33b02b723184fb3976..a0c0c773dbbcf5d1e9e727b33f6d9d00b7162122 100644 (file)
@@ -57,6 +57,7 @@ EditBookmarkDialog::EditBookmarkDialog(const int databaseId, QIcon &currentWebsi
     // Set the favorite icons.
     currentFavoriteIconRadioButtonPointer->setIcon(bookmarkStructPointer->favoriteIcon);
     currentWebsiteFavoriteIconRadioButtonPointer->setIcon(currentWebsiteFavoriteIcon);
+    customFavoriteIconRadioButtonPointer->setIcon(QIcon::fromTheme(QLatin1String("globe"), QIcon::fromTheme(QLatin1String("applications-internet"))));
 
     // Instantiate a folder helper.
     folderHelperPointer = new FolderHelper();
@@ -75,7 +76,7 @@ EditBookmarkDialog::EditBookmarkDialog(const int databaseId, QIcon &currentWebsi
 
     // 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("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.
@@ -95,10 +96,12 @@ EditBookmarkDialog::EditBookmarkDialog(const int databaseId, QIcon &currentWebsi
     bookmarkNameLineEditPointer->setText(bookmarkStructPointer->name);
     bookmarkUrlLineEditPointer->setText(bookmarkStructPointer->url);
 
-    // Scroll to the beginning of the line edits.
-    bookmarkNameLineEditPointer->setCursorPosition(0);
+    // Scroll to the beginning of the bookmark URL line edit.
     bookmarkUrlLineEditPointer->setCursorPosition(0);
 
+    // Focus the bookmark name line edit.
+    bookmarkNameLineEditPointer->setFocus();
+
     // Connect the buttons.
     connect(browseButtonPointer, SIGNAL(clicked()), this, SLOT(browse()));
     connect(dialogButtonBoxPointer, SIGNAL(accepted()), this, SLOT(save()));