-
-
Notifications
You must be signed in to change notification settings - Fork 455
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
186 changed files
with
3,616 additions
and
2,646 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
resources_header = \ | ||
'''<RCC> | ||
<qresource prefix="/">''' | ||
|
||
resources_footer = \ | ||
''' </qresource> | ||
</RCC>''' | ||
|
||
header_header = \ | ||
'''#include <QPixmap> | ||
#include "common/Singleton.hpp" | ||
namespace chatterino { | ||
class Resources2 : public Singleton { | ||
public: | ||
Resources2(); | ||
''' | ||
|
||
header_footer = \ | ||
'''}; | ||
} // namespace chatterino''' | ||
|
||
source_header = \ | ||
'''#include "ResourcesAutogen.hpp" | ||
namespace chatterino { | ||
Resources2::Resources2() | ||
{ | ||
''' | ||
|
||
source_footer = \ | ||
'''} | ||
} // namespace chatterino''' |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#!/usr/bin/env python3 | ||
from pathlib import Path | ||
|
||
from _generate_resources import * | ||
|
||
ignored_files = ['qt.conf', 'resources.qrc', 'resources_autogenerated.qrc', 'windows.rc', | ||
'generate_resources.py', '_generate_resources.py'] | ||
ignored_directories = ['__pycache__'] | ||
|
||
def isNotIgnored(file): | ||
return str(file) not in ignored_files | ||
|
||
all_files = list(filter(isNotIgnored, \ | ||
filter(Path.is_file, Path('.').glob('**/*')))) | ||
image_files = list(filter(isNotIgnored, \ | ||
filter(Path.is_file, Path('.').glob('**/*.png')))) | ||
|
||
with open('./resources_autogenerated.qrc', 'w') as out: | ||
out.write(resources_header) | ||
for file in all_files: | ||
out.write(f" <file>{str(file)}</file>\n") | ||
out.write(resources_footer) | ||
|
||
with open('../src/autogenerated/ResourcesAutogen.cpp', 'w') as out: | ||
out.write(source_header) | ||
for file in sorted(image_files): | ||
var_name = str(file.with_suffix("")).replace("/",".") | ||
out.write(f' this->{var_name}') | ||
out.write(f' = QPixmap(":/{file}");\n') | ||
out.write(source_footer) | ||
|
||
def writeHeader(out, name, element, indent): | ||
if isinstance(element, dict): | ||
if name != "": | ||
out.write(f"{indent}struct {{\n") | ||
for (key, value) in element.items(): | ||
writeHeader(out, key, value, indent + ' ') | ||
if name != "": | ||
out.write(f"{indent}}} {name};\n"); | ||
else: | ||
out.write(f"{indent}QPixmap {element};\n") | ||
|
||
with open('../src/autogenerated/ResourcesAutogen.hpp', 'w') as out: | ||
out.write(header_header) | ||
|
||
elements = {} | ||
for file in sorted(image_files): | ||
elements_ref = elements | ||
directories = str(file).split('/')[:-1] | ||
filename = file.stem | ||
for directory in directories: | ||
if directory not in elements_ref: | ||
if directory not in ignored_directories: | ||
elements_ref[directory] = {} | ||
elements_ref = elements_ref[directory] | ||
elements_ref[filename] = filename | ||
|
||
writeHeader(out, "", elements, '') | ||
|
||
out.write(header_footer) | ||
|
File renamed without changes
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,5 @@ | ||
<RCC> | ||
<qresource prefix="/"> | ||
<file>images/AppearanceEditorPart_16x.png</file> | ||
<file>images/BrowserLink_16x.png</file> | ||
<file>images/cheer1.png</file> | ||
<file>images/cheer100.png</file> | ||
<file>images/cheer1000.png</file> | ||
<file>images/cheer10000.png</file> | ||
<file>images/cheer100000.png</file> | ||
<file>images/cheer5000.png</file> | ||
<file>images/verified.png</file> | ||
<file>images/CopyLongTextToClipboard_16x.png</file> | ||
<file>images/CustomActionEditor_16x.png</file> | ||
<file>images/Emoji_Color_1F60A_19.png</file> | ||
<file>images/Filter_16x.png</file> | ||
<file>images/format_Bold_16xLG.png</file> | ||
<file>images/Message_16xLG.png</file> | ||
<file>images/settings.png</file> | ||
<file>images/tool_moreCollapser_off16.png</file> | ||
<file>images/twitchprime_bg.png</file> | ||
<file>qss/settings.qss</file> | ||
<file>images/admin_bg.png</file> | ||
<file>images/broadcaster_bg.png</file> | ||
<file>images/globalmod_bg.png</file> | ||
<file>images/moderator_bg.png</file> | ||
<file>images/staff_bg.png</file> | ||
<file>images/turbo_bg.png</file> | ||
<file>emojidata.txt</file> | ||
<file>images/button_ban.png</file> | ||
<file>images/button_timeout.png</file> | ||
<file>images/StatusAnnotations_Blocked_16xLG_color.png</file> | ||
<file>images/UserProfile_22x.png</file> | ||
<file>images/VSO_Link_blue_16x.png</file> | ||
<file>sounds/ping2.wav</file> | ||
<file>images/subscriber.png</file> | ||
<file>images/collapse.png</file> | ||
<file>images/emote.svg</file> | ||
<file>images/notifications.svg</file> | ||
<file>images/behave.svg</file> | ||
<file>images/theme.svg</file> | ||
<file>images/accounts.svg</file> | ||
<file>images/chatterino2.icns</file> | ||
<file>images/icon.png</file> | ||
<file>images/commands.svg</file> | ||
<file>images/aboutlogo.png</file> | ||
<file>images/about.svg</file> | ||
<file>images/moderatormode_disabled.png</file> | ||
<file>images/moderatormode_enabled.png</file> | ||
<file>images/split/splitdown.png</file> | ||
<file>images/split/splitleft.png</file> | ||
<file>images/split/splitright.png</file> | ||
<file>images/split/splitup.png</file> | ||
<file>images/split/splitmove.png</file> | ||
<file>licenses/boost_boost.txt</file> | ||
<file>licenses/fmt_bsd2.txt</file> | ||
<file>licenses/libcommuni_BSD3.txt</file> | ||
<file>licenses/openssl.txt</file> | ||
<file>licenses/pajlada_settings.txt</file> | ||
<file>licenses/pajlada_signals.txt</file> | ||
<file>licenses/qt_lgpl-3.0.txt</file> | ||
<file>licenses/rapidjson.txt</file> | ||
<file>licenses/websocketpp.txt</file> | ||
<file>emoji.json</file> | ||
<file>images/buttons/ban.png</file> | ||
<file>images/buttons/mod.png</file> | ||
<file>images/buttons/unban.png</file> | ||
<file>images/buttons/unmod.png</file> | ||
<file>images/emote_dark.svg</file> | ||
<file>tlds.txt</file> | ||
<file>images/menu_black.png</file> | ||
<file>images/menu_white.png</file> | ||
<file>contributors.txt</file> | ||
<file>avatars/fourtf.png</file> | ||
<file>avatars/pajlada.png</file> | ||
<file>images/download_update.png</file> | ||
<file>images/download_update_error.png</file> | ||
<file>images/pajaDank.png</file> | ||
</qresource> | ||
<qresource prefix="/qt/etc"> | ||
<file>qt.conf</file> | ||
</qresource> | ||
<qresource prefix="/qt/etc"> | ||
<file>qt.conf</file> | ||
</qresource> | ||
</RCC> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<RCC> | ||
<qresource prefix="/"> <file>pajaDank.png</file> | ||
<file>icon.png</file> | ||
<file>emojidata.txt</file> | ||
<file>contributors.txt</file> | ||
<file>error.png</file> | ||
<file>emoji.json</file> | ||
<file>icon.ico</file> | ||
<file>tlds.txt</file> | ||
<file>chatterino2.icns</file> | ||
<file>qss/settings.qss</file> | ||
<file>__pycache__/_generate_resources.cpython-36.pyc</file> | ||
<file>licenses/fmt_bsd2.txt</file> | ||
<file>licenses/openssl.txt</file> | ||
<file>licenses/pajlada_settings.txt</file> | ||
<file>licenses/qt_lgpl-3.0.txt</file> | ||
<file>licenses/pajlada_signals.txt</file> | ||
<file>licenses/rapidjson.txt</file> | ||
<file>licenses/websocketpp.txt</file> | ||
<file>licenses/boost_boost.txt</file> | ||
<file>licenses/libcommuni_BSD3.txt</file> | ||
<file>settings/aboutlogo.png</file> | ||
<file>settings/behave.svg</file> | ||
<file>settings/accounts.svg</file> | ||
<file>settings/about.svg</file> | ||
<file>settings/notifications.svg</file> | ||
<file>settings/commands.svg</file> | ||
<file>settings/theme.svg</file> | ||
<file>split/up.png</file> | ||
<file>split/left.png</file> | ||
<file>split/move.png</file> | ||
<file>split/right.png</file> | ||
<file>split/down.png</file> | ||
<file>buttons/unban.png</file> | ||
<file>buttons/menuDark.png</file> | ||
<file>buttons/mod.png</file> | ||
<file>buttons/emote.svg</file> | ||
<file>buttons/modModeEnabled2.png</file> | ||
<file>buttons/ban.png</file> | ||
<file>buttons/unmod.png</file> | ||
<file>buttons/emoteDark.svg</file> | ||
<file>buttons/updateError.png</file> | ||
<file>buttons/modModeDisabled.png</file> | ||
<file>buttons/modModeDisabled2.png</file> | ||
<file>buttons/modModeEnabled.png</file> | ||
<file>buttons/menuLight.png</file> | ||
<file>buttons/update.png</file> | ||
<file>buttons/timeout.png</file> | ||
<file>buttons/banRed.png</file> | ||
<file>sounds/ping2.wav</file> | ||
<file>twitch/prime.png</file> | ||
<file>twitch/verified.png</file> | ||
<file>twitch/admin.png</file> | ||
<file>twitch/subscriber.png</file> | ||
<file>twitch/turbo.png</file> | ||
<file>twitch/moderator.png</file> | ||
<file>twitch/globalmod.png</file> | ||
<file>twitch/cheer1.png</file> | ||
<file>twitch/broadcaster.png</file> | ||
<file>twitch/staff.png</file> | ||
<file>avatars/fourtf.png</file> | ||
<file>avatars/pajlada.png</file> | ||
</qresource> | ||
</RCC> |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.