|
1 | 1 | import os |
2 | 2 | import sys |
3 | | -import webbrowser |
4 | 3 |
|
5 | 4 | import requests |
6 | 5 |
|
|
35 | 34 | from pyqt_openai.chat_widget.openAiChatBotWidget import OpenAIChatBotWidget |
36 | 35 | from pyqt_openai.replicate_widget.replicateWidget import ReplicateWidget |
37 | 36 | from pyqt_openai.settingsDialog import SettingsDialog |
38 | | -from pyqt_openai.util.script import get_font, restart_app, show_message_box |
| 37 | +from pyqt_openai.util.script import get_font, restart_app, show_message_box, goPayPal, goBuyMeCoffee |
39 | 38 | from pyqt_openai.doNotAskAgainDialog import DoNotAskAgainDialog |
40 | 39 | from pyqt_openai.sqlite import get_db_filename |
41 | 40 |
|
42 | 41 | from pyqt_openai.pyqt_openai_data import OPENAI_STRUCT, LLAMAINDEX_WRAPPER |
43 | | -from pyqt_openai import PAYPAL_URL, BUYMEACOFFEE_URL, INI_FILE_NAME, SHORTCUT_FULL_SCREEN, \ |
| 42 | +from pyqt_openai import INI_FILE_NAME, SHORTCUT_FULL_SCREEN, \ |
44 | 43 | APP_INITIAL_WINDOW_SIZE, APP_NAME, APP_ICON, ICON_STACKONTOP, ICON_CUSTOMIZE, ICON_FULLSCREEN, ICON_CLOSE |
45 | 44 |
|
46 | 45 | # HighDPI support |
@@ -109,10 +108,10 @@ def __setActions(self): |
109 | 108 | self.__aboutAction.triggered.connect(self.__showAboutDialog) |
110 | 109 |
|
111 | 110 | self.__paypalAction = QAction('Paypal', self) |
112 | | - self.__paypalAction.triggered.connect(self.__paypal) |
| 111 | + self.__paypalAction.triggered.connect(goPayPal) |
113 | 112 |
|
114 | 113 | self.__buyMeCoffeeAction = QAction('Buy me a coffee!', self) |
115 | | - self.__buyMeCoffeeAction.triggered.connect(self.__buyMeCoffee) |
| 114 | + self.__buyMeCoffeeAction.triggered.connect(goBuyMeCoffee) |
116 | 115 |
|
117 | 116 | # toolbar action |
118 | 117 | self.__chooseAiAction = QWidgetAction(self) |
@@ -328,12 +327,6 @@ def __showAboutDialog(self): |
328 | 327 | aboutDialog = AboutDialog() |
329 | 328 | aboutDialog.exec() |
330 | 329 |
|
331 | | - def __paypal(self): |
332 | | - webbrowser.open(PAYPAL_URL) |
333 | | - |
334 | | - def __buyMeCoffee(self): |
335 | | - webbrowser.open(BUYMEACOFFEE_URL) |
336 | | - |
337 | 330 | def __stackToggle(self, f): |
338 | 331 | if f: |
339 | 332 | self.setWindowFlags(self.windowFlags() | Qt.WindowType.WindowStaysOnTopHint) |
|
0 commit comments