diff --git a/hydrus/client/ClientConstants.py b/hydrus/client/ClientConstants.py index c91ea5ed..e916cf0b 100644 --- a/hydrus/client/ClientConstants.py +++ b/hydrus/client/ClientConstants.py @@ -579,11 +579,6 @@ class GlobalPixmaps( object ): self.paste = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'paste.png' ) ) self.eight_chan = QG.QPixmap( os.path.join( HC.STATIC_DIR, '8chan.png' ) ) - self.twitter = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'twitter.png' ) ) - self.tumblr = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'tumblr.png' ) ) - self.discord = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'discord.png' ) ) - self.patreon = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'patreon.png' ) ) - self.github = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'github.png' ) ) self.first = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'first.png' ) ) self.previous = QG.QPixmap( os.path.join( HC.STATIC_DIR, 'previous.png' ) ) @@ -594,6 +589,37 @@ class GlobalPixmaps( object ): global_pixmaps = GlobalPixmaps.instance +class GlobalIcons( object ): + + my_instance = None + + def __init__( self ): + + self._Initialise() + + + @staticmethod + def instance() -> 'GlobalIcons': + + if GlobalIcons.my_instance is None: + + GlobalIcons.my_instance = GlobalIcons() + + + return GlobalIcons.my_instance + + + def _Initialise( self ): + + self.github = QG.QIcon( os.path.join( HC.STATIC_DIR, 'github.svg' ) ) + self.twitter = QG.QIcon( os.path.join( HC.STATIC_DIR, 'twitter.svg' ) ) + self.tumblr = QG.QIcon( os.path.join( HC.STATIC_DIR, 'tumblr.svg' ) ) + self.discord = QG.QIcon( os.path.join( HC.STATIC_DIR, 'discord.svg' ) ) + self.patreon = QG.QIcon( os.path.join( HC.STATIC_DIR, 'patreon.svg' ) ) + + +global_icons = GlobalIcons.instance + DEFAULT_LOCAL_TAG_SERVICE_KEY = b'local tags' DEFAULT_LOCAL_DOWNLOADER_TAG_SERVICE_KEY = b'downloader tags' diff --git a/hydrus/client/gui/ClientGUI.py b/hydrus/client/gui/ClientGUI.py index d9002395..2e51cf27 100644 --- a/hydrus/client/gui/ClientGUI.py +++ b/hydrus/client/gui/ClientGUI.py @@ -3213,15 +3213,15 @@ class FrameGUI( CAC.ApplicationCommandProcessorMixin, ClientGUITopLevelWindows.M links = ClientGUIMenus.GenerateMenu( menu ) site = ClientGUIMenus.AppendMenuBitmapItem( links, 'site', 'Open hydrus\'s website, which is a mirror of the local help.', CC.global_pixmaps().file_repository, ClientPaths.LaunchURLInWebBrowser, 'https://hydrusnetwork.github.io/hydrus/' ) - site = ClientGUIMenus.AppendMenuBitmapItem( links, 'github repository', 'Open the hydrus github repository.', CC.global_pixmaps().github, ClientPaths.LaunchURLInWebBrowser, 'https://github.com/hydrusnetwork/hydrus' ) - site = ClientGUIMenus.AppendMenuBitmapItem( links, 'latest build', 'Open the latest build on the hydrus github repository.', CC.global_pixmaps().github, ClientPaths.LaunchURLInWebBrowser, 'https://github.com/hydrusnetwork/hydrus/releases/latest' ) - site = ClientGUIMenus.AppendMenuBitmapItem( links, 'issue tracker', 'Open the github issue tracker, which is run by users.', CC.global_pixmaps().github, ClientPaths.LaunchURLInWebBrowser, 'https://github.com/hydrusnetwork/hydrus/issues' ) + site = ClientGUIMenus.AppendMenuIconItem( links, 'github repository', 'Open the hydrus github repository.', CC.global_icons().github, ClientPaths.LaunchURLInWebBrowser, 'https://github.com/hydrusnetwork/hydrus' ) + site = ClientGUIMenus.AppendMenuIconItem( links, 'latest build', 'Open the latest build on the hydrus github repository.', CC.global_icons().github, ClientPaths.LaunchURLInWebBrowser, 'https://github.com/hydrusnetwork/hydrus/releases/latest' ) + site = ClientGUIMenus.AppendMenuIconItem( links, 'issue tracker', 'Open the github issue tracker, which is run by users.', CC.global_icons().github, ClientPaths.LaunchURLInWebBrowser, 'https://github.com/hydrusnetwork/hydrus/issues' ) site = ClientGUIMenus.AppendMenuBitmapItem( links, '8chan.moe /t/ (Hydrus Network General)', 'Open the 8chan.moe /t/ board, where a Hydrus Network General should exist with release posts and other status updates.', CC.global_pixmaps().eight_chan, ClientPaths.LaunchURLInWebBrowser, 'https://8chan.moe/t/catalog.html' ) site = ClientGUIMenus.AppendMenuItem( links, 'Endchan board bunker', 'Open hydrus dev\'s Endchan board, the bunker for the case when 8chan.moe is unavailable. Try .org if .net is unavailable.', ClientPaths.LaunchURLInWebBrowser, 'https://endchan.net/hydrus/index.html' ) - site = ClientGUIMenus.AppendMenuBitmapItem( links, 'twitter', 'Open hydrus dev\'s twitter, where he makes general progress updates and emergency notifications.', CC.global_pixmaps().twitter, ClientPaths.LaunchURLInWebBrowser, 'https://twitter.com/hydrusnetwork' ) - site = ClientGUIMenus.AppendMenuBitmapItem( links, 'tumblr', 'Open hydrus dev\'s tumblr, where he makes release posts and other status updates.', CC.global_pixmaps().tumblr, ClientPaths.LaunchURLInWebBrowser, 'https://hydrus.tumblr.com/' ) - site = ClientGUIMenus.AppendMenuBitmapItem( links, 'discord', 'Open a discord channel where many hydrus users congregate. Hydrus dev visits regularly.', CC.global_pixmaps().discord, ClientPaths.LaunchURLInWebBrowser, 'https://discord.gg/wPHPCUZ' ) - site = ClientGUIMenus.AppendMenuBitmapItem( links, 'patreon', 'Open hydrus dev\'s patreon, which lets you support development.', CC.global_pixmaps().patreon, ClientPaths.LaunchURLInWebBrowser, 'https://www.patreon.com/hydrus_dev' ) + site = ClientGUIMenus.AppendMenuIconItem( links, 'twitter', 'Open hydrus dev\'s twitter, where he makes general progress updates and emergency notifications.', CC.global_icons().twitter, ClientPaths.LaunchURLInWebBrowser, 'https://twitter.com/hydrusnetwork' ) + site = ClientGUIMenus.AppendMenuIconItem( links, 'tumblr', 'Open hydrus dev\'s tumblr, where he makes release posts and other status updates.', CC.global_icons().tumblr, ClientPaths.LaunchURLInWebBrowser, 'https://hydrus.tumblr.com/' ) + site = ClientGUIMenus.AppendMenuIconItem( links, 'discord', 'Open a discord channel where many hydrus users congregate. Hydrus dev visits regularly.', CC.global_icons().discord, ClientPaths.LaunchURLInWebBrowser, 'https://discord.gg/wPHPCUZ' ) + site = ClientGUIMenus.AppendMenuIconItem( links, 'patreon', 'Open hydrus dev\'s patreon, which lets you support development.', CC.global_icons().patreon, ClientPaths.LaunchURLInWebBrowser, 'https://www.patreon.com/hydrus_dev' ) ClientGUIMenus.AppendMenu( menu, links, 'links' ) diff --git a/static/discord.png b/static/discord.png deleted file mode 100644 index 0efee2a4..00000000 Binary files a/static/discord.png and /dev/null differ diff --git a/static/discord.svg b/static/discord.svg new file mode 100644 index 00000000..ef25142a --- /dev/null +++ b/static/discord.svg @@ -0,0 +1 @@ +Discord \ No newline at end of file diff --git a/static/github.png b/static/github.png deleted file mode 100644 index ccfb47fd..00000000 Binary files a/static/github.png and /dev/null differ diff --git a/static/github.svg b/static/github.svg new file mode 100644 index 00000000..81920ca3 --- /dev/null +++ b/static/github.svg @@ -0,0 +1 @@ +GitHub \ No newline at end of file diff --git a/static/patreon.png b/static/patreon.png deleted file mode 100644 index 5520b309..00000000 Binary files a/static/patreon.png and /dev/null differ diff --git a/static/patreon.svg b/static/patreon.svg new file mode 100644 index 00000000..6a264e3d --- /dev/null +++ b/static/patreon.svg @@ -0,0 +1 @@ +Patreon \ No newline at end of file diff --git a/static/tumblr.png b/static/tumblr.png deleted file mode 100755 index 88ad3f97..00000000 Binary files a/static/tumblr.png and /dev/null differ diff --git a/static/tumblr.svg b/static/tumblr.svg new file mode 100644 index 00000000..9fe5ab54 --- /dev/null +++ b/static/tumblr.svg @@ -0,0 +1 @@ +Tumblr \ No newline at end of file diff --git a/static/twitter.png b/static/twitter.png deleted file mode 100755 index f92b5c5e..00000000 Binary files a/static/twitter.png and /dev/null differ diff --git a/static/twitter.svg b/static/twitter.svg new file mode 100644 index 00000000..c67d1c24 --- /dev/null +++ b/static/twitter.svg @@ -0,0 +1 @@ +Twitter \ No newline at end of file