diff --git a/activity_browser/app/ui/main.py b/activity_browser/app/ui/main.py
index 6d7af2168..99ad30e5a 100644
--- a/activity_browser/app/ui/main.py
+++ b/activity_browser/app/ui/main.py
@@ -58,6 +58,7 @@ def __init__(self):
self.vertical_container.addLayout(self.main_horizontal_box)
self.main_widget = QtWidgets.QWidget()
+ self.main_widget.icon = qicons.main_window
self.main_widget.name = "&Main Window"
self.main_widget.setLayout(self.vertical_container)
@@ -71,6 +72,7 @@ def __init__(self):
working_layout.addWidget(self.log)
self.debug_widget = QtWidgets.QWidget()
+ self.debug_widget.icon = qicons.debug
self.debug_widget.name = "&Debug Window"
self.debug_widget.setLayout(working_layout)
diff --git a/activity_browser/app/ui/menu_bar.py b/activity_browser/app/ui/menu_bar.py
index 170aab831..a7e040f8b 100644
--- a/activity_browser/app/ui/menu_bar.py
+++ b/activity_browser/app/ui/menu_bar.py
@@ -2,11 +2,9 @@
import json
import brightway2 as bw
-import requests
from PyQt5 import QtCore, QtWidgets, QtGui
from .icons import qicons
-from .utils import abt1
from ..signals import signals
from .widgets import BiosphereUpdater
from .wizards.settings_wizard import SettingsWizard
@@ -22,6 +20,7 @@ def __init__(self, window):
self.menubar.addMenu(self.setup_file_menu())
# self.menubar.addMenu(self.setup_tools_menu())
# self.menubar.addMenu(self.setup_extensions_menu())
+ self.menubar.addMenu(self.setup_view_menu())
self.menubar.addMenu(self.setup_windows_menu())
self.menubar.addMenu(self.setup_help_menu())
window.setMenuBar(self.menubar)
@@ -37,50 +36,41 @@ def connect_signals(self):
def setup_file_menu(self):
menu = QtWidgets.QMenu('&File', self.window)
menu.addAction(
+ qicons.import_db,
'&Import database...',
signals.import_database.emit
)
menu.addAction(self.update_biosphere_action)
menu.addAction(
+ qicons.settings,
'&Settings...',
self.open_settings_wizard
)
return menu
- # # TOOLS
- # def setup_tools_menu(self):
- # menu = QtWidgets.QMenu('&Tools', self.window)
- # menu.addAction(
- # '&Graph Explorer',
- # lambda x="Graph Explorer": signals.show_tab.emit(x)
- # )
- # # menu.addAction(
- # # '&Show/hide history',
- # # lambda x="Project History": signals.show_or_hide_tab.emit(x)
- # # )
- #
- # # self.graph_navigator = QtWidgets.QMenu('&Windows', self.window)
- # # self.update_windows_menu()
- # return menu
-
- # WINDOWS
- def setup_windows_menu(self):
- self.windows_menu = QtWidgets.QMenu('&Windows', self.window)
-
- self.show_hide_menu = QtWidgets.QMenu('&Show/hide...', self.window)
- self.show_hide_menu.addAction(
- '&Project History',
- lambda x="Project History": signals.toggle_show_or_hide_tab.emit(x)
- )
- self.show_hide_menu.addAction(
+ # VIEW
+ def setup_view_menu(self):
+ view_menu = QtWidgets.QMenu('&View', self.window)
+ view_menu.addAction(
+ qicons.graph_explorer,
'&Graph Explorer',
lambda x="Graph Explorer": signals.toggle_show_or_hide_tab.emit(x)
)
- self.show_hide_menu.addAction(
+ view_menu.addAction(
+ qicons.history,
+ '&Activity History',
+ lambda x="History": signals.toggle_show_or_hide_tab.emit(x)
+ )
+ view_menu.addAction(
+ qicons.welcome,
'&Welcome screen',
lambda x="Welcome": signals.toggle_show_or_hide_tab.emit(x)
)
- # self.windows_menu.addMenu(self.show_hide_menu)
+ return view_menu
+
+ # WINDOWS
+ def setup_windows_menu(self):
+ self.windows_menu = QtWidgets.QMenu('&Windows', self.window)
self.update_windows_menu()
return self.windows_menu
@@ -89,34 +79,28 @@ def update_windows_menu(self):
for index in range(self.window.stacked.count()): # iterate over widgets in QStackedWidget
widget = self.window.stacked.widget(index)
self.windows_menu.addAction(
+ widget.icon,
widget.name,
lambda widget=widget: self.window.stacked.setCurrentWidget(widget),
)
- self.windows_menu.addMenu(self.show_hide_menu)
# HELP
def setup_help_menu(self):
- bug_icon = qicons.debug
help_menu = QtWidgets.QMenu('&Help', self.window)
help_menu.addAction(
self.window.icon,
'&About Activity Browser',
self.about)
-
help_menu.addAction(
'&About Qt',
lambda: QtWidgets.QMessageBox.aboutQt(self.window)
)
help_menu.addAction(
- bug_icon,
- '&Report Bug on github',
+ qicons.issue,
+ '&Report an idea/issue on GitHub',
self.raise_issue_github
)
- help_menu.addAction(
- bug_icon,
- '&Report Bug',
- self.raise_issue_from_app
- )
+
return help_menu
def about(self):
@@ -148,37 +132,6 @@ def raise_issue_github(self):
url = QtCore.QUrl('https://github.com/LCA-ActivityBrowser/activity-browser/issues/new')
QtGui.QDesktopServices.openUrl(url)
- def raise_issue_api(self, content):
- abt2 = 'C5F02AZ12E56E6D46Z811D'
- auth = (
- 'ActivityBrowser',
- ''.join(reversed(abt1 + ''.join(reversed(abt2.lower())))).replace('z', '')
- )
- data = {
- 'title': 'New issue reported from app',
- 'body': content
- }
-
- url = 'https://api.github.com/repos/LCA-ActivityBrowser/activity-browser/issues'
- response = requests.post(url, data=json.dumps(data), auth=auth)
- if response.status_code != 201:
- print(response)
- print(response.text)
-
- def raise_issue_from_app(self):
- text, _ = QtWidgets.QInputDialog.getMultiLineText(
- None,
- 'Report new bug',
- ('Please describe the buggy behaviour. View existing issues on ' +
- 'github.'+
- '
If you have a github account, please consider raising the issue directly on github.'
- ),
- )
- if text:
- content = text + '\n\nLog Output:\n```\n{}```'.format(self.window.log.toPlainText())
- self.raise_issue_api(content)
- print(content)
-
def open_settings_wizard(self):
self.settings_wizard = SettingsWizard()
diff --git a/activity_browser/app/ui/panels/left.py b/activity_browser/app/ui/panels/left.py
index 5039c4b58..cc8478f18 100644
--- a/activity_browser/app/ui/panels/left.py
+++ b/activity_browser/app/ui/panels/left.py
@@ -12,10 +12,10 @@ def __init__(self, *args):
self.tabs = {
"Project": ProjectTab(self),
"Impact Categories": MethodsTab(self),
- "Project History": HistoryTab(self),
+ "History": HistoryTab(self),
}
for tab_name, tab in self.tabs.items():
self.addTab(tab, tab_name)
# tabs hidden at start
- self.hide_tab("Project History")
+ self.hide_tab("History")
diff --git a/activity_browser/app/ui/tables/activity.py b/activity_browser/app/ui/tables/activity.py
index f81e2fa5f..6dcd8c0ce 100644
--- a/activity_browser/app/ui/tables/activity.py
+++ b/activity_browser/app/ui/tables/activity.py
@@ -311,7 +311,7 @@ def _resize(self) -> None:
def contextMenuEvent(self, a0) -> None:
menu = QtWidgets.QMenu()
- menu.addAction(qicons.left, "Open activity/activities", self.open_activities)
+ menu.addAction(qicons.right, "Open activities", self.open_activities)
menu.addAction(self.delete_exchange_action)
menu.addAction(self.remove_formula_action)
menu.exec(a0.globalPos())
@@ -386,5 +386,5 @@ def _resize(self) -> None:
def contextMenuEvent(self, a0) -> None:
menu = QtWidgets.QMenu()
- menu.addAction(qicons.left, "Open activity/activities", self.open_activities)
+ menu.addAction(qicons.right, "Open activities", self.open_activities)
menu.exec(a0.globalPos())
diff --git a/activity_browser/app/ui/tables/inventory.py b/activity_browser/app/ui/tables/inventory.py
index 91815eeba..2f62bc2ba 100644
--- a/activity_browser/app/ui/tables/inventory.py
+++ b/activity_browser/app/ui/tables/inventory.py
@@ -53,7 +53,7 @@ def contextMenuEvent(self, a0) -> None:
lambda: signals.delete_database.emit(self.selected_db_name)
)
menu.addAction(
- qicons.duplicate, "Copy database",
+ qicons.duplicate_database, "Copy database",
lambda: signals.copy_database.emit(self.selected_db_name)
)
menu.addAction(
@@ -156,7 +156,7 @@ def contextMenuEvent(self, event) -> None:
"""
menu = QtWidgets.QMenu()
menu.addAction(
- qicons.left, "Open activity",
+ qicons.right, "Open activity",
lambda: self.open_activity_tab(self.currentIndex())
)
menu.addAction(
@@ -167,7 +167,7 @@ def contextMenuEvent(self, event) -> None:
menu.addAction(self.duplicate_activity_action)
menu.addAction(self.delete_activity_action)
menu.addAction(
- qicons.add_db, "Duplicate to other database",
+ qicons.duplicate_to_other_database, "Duplicate to other database",
lambda: signals.show_duplicate_to_db_interface.emit(self.get_key(self.currentIndex()))
)
menu.exec(event.globalPos())
diff --git a/activity_browser/app/ui/tables/parameters.py b/activity_browser/app/ui/tables/parameters.py
index 6bb28bb04..451888a87 100644
--- a/activity_browser/app/ui/tables/parameters.py
+++ b/activity_browser/app/ui/tables/parameters.py
@@ -484,7 +484,7 @@ def contextMenuEvent(self, event: QContextMenuEvent):
"""
menu = QMenu(self)
menu.addAction(
- qicons.add, "Open activity/activities", self.open_activity_tab
+ qicons.add, "Open activities", self.open_activity_tab
)
menu.addAction(self.rename_action)
menu.addAction(self.delete_action)
diff --git a/activity_browser/app/ui/tabs/project_manager.py b/activity_browser/app/ui/tabs/project_manager.py
index a6e1df105..5c50b0a61 100644
--- a/activity_browser/app/ui/tabs/project_manager.py
+++ b/activity_browser/app/ui/tabs/project_manager.py
@@ -153,10 +153,10 @@ def __init__(self, parent):
# Buttons
self.add_default_data_button = QtWidgets.QPushButton(
- qicons.add_db, "Add Default Data (Biosphere flows, LCIA methods)"
+ qicons.import_db, "Add Default Data (Biosphere flows, LCIA methods)"
)
self.new_database_button = QtWidgets.QPushButton(qicons.add, "New")
- self.import_database_button = QtWidgets.QPushButton(qicons.add_db, "Import")
+ self.import_database_button = QtWidgets.QPushButton(qicons.import_db, "Import")
# Header widget
self.header_layout.addWidget(self.add_default_data_button)
diff --git a/activity_browser/app/ui/widgets/activity.py b/activity_browser/app/ui/widgets/activity.py
index ffaf60675..0f643acb5 100644
--- a/activity_browser/app/ui/widgets/activity.py
+++ b/activity_browser/app/ui/widgets/activity.py
@@ -149,7 +149,7 @@ def populate_database_combo(self):
available_target_dbs.remove(current_db)
for db_name in available_target_dbs:
- self.database_combo.addItem(qicons.duplicate, db_name)
+ self.database_combo.addItem(qicons.duplicate_activity, db_name)
self.database_combo.blockSignals(False)
def duplicate_confirm_dialog(self, target_db):
diff --git a/activity_browser/icons/main/debug.png b/activity_browser/icons/main/debug.png
deleted file mode 100644
index 346325a81..000000000
Binary files a/activity_browser/icons/main/debug.png and /dev/null differ
diff --git a/activity_browser/icons/main/duplicate_activity.png b/activity_browser/icons/main/duplicate_activity.png
new file mode 100644
index 000000000..e86d0cd62
Binary files /dev/null and b/activity_browser/icons/main/duplicate_activity.png differ
diff --git a/activity_browser/icons/main/duplicate_database.png b/activity_browser/icons/main/duplicate_database.png
new file mode 100644
index 000000000..75cb4f533
Binary files /dev/null and b/activity_browser/icons/main/duplicate_database.png differ
diff --git a/activity_browser/icons/main/home.png b/activity_browser/icons/main/home.png
new file mode 100644
index 000000000..4ab729bb6
Binary files /dev/null and b/activity_browser/icons/main/home.png differ
diff --git a/activity_browser/icons/main/idea.png b/activity_browser/icons/main/idea.png
new file mode 100644
index 000000000..92fa124eb
Binary files /dev/null and b/activity_browser/icons/main/idea.png differ
diff --git a/activity_browser/icons/main/import_database.png b/activity_browser/icons/main/import_database.png
new file mode 100644
index 000000000..379cdb311
Binary files /dev/null and b/activity_browser/icons/main/import_database.png differ
diff --git a/activity_browser/icons/main/ladybird.png b/activity_browser/icons/main/ladybird.png
new file mode 100644
index 000000000..633666064
Binary files /dev/null and b/activity_browser/icons/main/ladybird.png differ
diff --git a/activity_browser/icons/main/settings.png b/activity_browser/icons/main/settings.png
index 7c1366b9a..c9a939b3f 100644
Binary files a/activity_browser/icons/main/settings.png and b/activity_browser/icons/main/settings.png differ
diff --git a/activity_browser/icons/main/welcome.png b/activity_browser/icons/main/welcome.png
new file mode 100644
index 000000000..33dae5ae1
Binary files /dev/null and b/activity_browser/icons/main/welcome.png differ