# # # patch "NEWS" # from [b787547cc94d60c4861fed63c3cc66bfde0b1d5a] # to [aab129607810e79383cce3d7cf377ec9ad84a74b] # # patch "src/view/widgets/InventoryView.cpp" # from [cd313bd52774526e90d5e661775fd4cd162abf96] # to [3fbf7435d43d399508b7035e2da1f104c38712c9] # # patch "src/view/widgets/InventoryView.h" # from [a04f4968a3d59a53595de7a71e588b2c2174e8f6] # to [7e1b68a3c755fb7f16b49035605f8252e0d79200] # ============================================================ --- NEWS b787547cc94d60c4861fed63c3cc66bfde0b1d5a +++ NEWS aab129607810e79383cce3d7cf377ec9ad84a74b @@ -14,7 +14,7 @@ xxxx-xx-xx (1.0rc2) and handles multiple certs of the same type gracefully - bugfix: workspace find-as-you-type works now as expected (closes FS#42) - bugfix: guitone now tries harder to keep the current expanded directory - node even when the view needs to be rebuild completely + node even when the view needs to be rebuild completely - bugfix: disallow the rename of the workspace root item (there is an extra command for that, pivot_root, which we eventually support sometime) - bugfix: long-running background processes like f.e. netsync operations @@ -23,6 +23,8 @@ xxxx-xx-xx (1.0rc2) - bugfix: if a running thread should be aborted from within an automate command and the thread in question no longer exists, a warning is now issued + - bugfix: when a node is right-clicked in the inventory view, only the + actual default action is rendered bold, not any of the previous ones 2010-02-15 (1.0rc1) NOTE: You need monotone 0.46 or later for this version ============================================================ --- src/view/widgets/InventoryView.cpp cd313bd52774526e90d5e661775fd4cd162abf96 +++ src/view/widgets/InventoryView.cpp 3fbf7435d43d399508b7035e2da1f104c38712c9 @@ -290,9 +290,9 @@ void InventoryView::slotContextMenuReque QMenu menu(this); menu.addAction(actRefresh); - QFont activeFont; - activeFont.setBold(true); - actRefresh->setFont(activeFont); + QFont font; + font.setBold(true); + actRefresh->setFont(font); if (type == FileList) { @@ -307,6 +307,8 @@ void InventoryView::slotContextMenuReque } menu.exec(pos); + + actRefresh->setFont(QFont()); return; } @@ -409,26 +411,33 @@ void InventoryView::slotContextMenuReque // mark the default action with bold text // DefaultAction act = getDefaultAction(indexList[0]); - QFont activeFont; - activeFont.setBold(true); + QAction * defaultAction = 0; + switch (act) { case Chdir: - actChdir->setFont(activeFont); + defaultAction = actChdir; break; case FileDiff: - actFileDiff->setFont(activeFont); + defaultAction = actFileDiff; break; case Commit: - actCommit->setFont(activeFont); + defaultAction = actCommit; break; case Open: - actOpen->setFont(activeFont); + defaultAction = actOpen; break; default: break; } + if (defaultAction) + { + QFont font; + font.setBold(true); + defaultAction->setFont(font); + } + // // add the refresh action // @@ -436,6 +445,12 @@ void InventoryView::slotContextMenuReque menu.addAction(actRefresh); menu.exec(pos); + + if (defaultAction) + { + defaultAction->setFont(QFont()); + } + return; } ============================================================ --- src/view/widgets/InventoryView.h a04f4968a3d59a53595de7a71e588b2c2174e8f6 +++ src/view/widgets/InventoryView.h 7e1b68a3c755fb7f16b49035605f8252e0d79200 @@ -61,7 +61,7 @@ private: void deleteLocalPath(const QString &); private: - enum DefaultAction { None, Chdir, Open, FileDiff, Commit }; + enum DefaultAction { None = 0, Chdir, Open, FileDiff, Commit }; void setModel(QAbstractItemModel *); QSet getSelectedItems() const;