mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-06 08:25:15 -04:00
Support handling events by monitoring an events folder for changes
This commit is contained in:
parent
d78d67adf6
commit
e7c683528d
7 changed files with 152 additions and 23 deletions
|
@ -17,6 +17,8 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import os
|
||||
|
||||
from onionshare import strings
|
||||
from onionshare.onion import Onion
|
||||
|
||||
|
@ -44,6 +46,12 @@ class GuiCommon:
|
|||
# Start the Onion
|
||||
self.onion = Onion(common)
|
||||
|
||||
# Directory to watch for events
|
||||
self.events_dir = os.path.join(self.common.build_data_dir(), "events")
|
||||
if not os.path.exists(self.events_dir):
|
||||
os.makedirs(self.events_dir, 0o700, True)
|
||||
self.events_filename = os.path.join(self.events_dir, "events")
|
||||
|
||||
self.css = {
|
||||
# OnionShareGui styles
|
||||
"tab_widget_new_tab_button": """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue