Fixed double click issue launching multiple apps

This commit is contained in:
Maxim Stewart 2020-05-09 00:33:16 -05:00
parent 68b22b7401
commit 253abb1643
5 changed files with 7 additions and 4 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 836 KiB

View File

@ -6,9 +6,11 @@ from datetime import datetime
# Application imports
from .mixins import CPUDrawMixin, TaskbarMixin, GridMixin
from widgets import Grid
from utils import FileHandler
class Signals(CPUDrawMixin, TaskbarMixin, GridMixin):
def __init__(self, settings):
self.settings = settings
@ -59,9 +61,10 @@ class Signals(CPUDrawMixin, TaskbarMixin, GridMixin):
self.currentPath = self.settings.returnSettings()[0]
self.copyCutArry = []
self.selectedFiles = []
self.gridClss = None
self.gridClss = Grid(self.gridObj, self.settings)
self.pasteType = 1 # copy == 1 and cut == 2
# Add filter to allow only folders to be selected
selectDirDialog.add_filter(filefilter)
selectDirDialog.set_filename(self.currentPath)

View File

@ -3,13 +3,12 @@
# Python imports
# Application imports
from widgets import Grid
class GridMixin:
# different from the grid widget class'
def setNewDirectory(self, widget, data=None):
newPath = widget.get_filename()
self.gridClss = Grid(self.gridObj, self.settings)
self.gridClss.setNewDirectory(newPath)
self.settings.saveSettings(newPath)

View File

@ -46,6 +46,7 @@ class Grid:
self.grid.set_model(self.store)
self.grid.set_pixbuf_column(0)
self.grid.set_text_column(1)
print("Grid generated...")
self.grid.connect("item-activated", self.iconDblLeftClick)
self.grid.connect("button_release_event", self.iconSingleClick, (self.grid,))
@ -102,7 +103,7 @@ class Grid:
# Wait till we have a proper index...
while len(self.store) < (start + 1):
time.sleep(.800)
time.sleep(.650)
i = start
for file in files: