Fixed double click issue launching multiple apps
This commit is contained in:
parent
68b22b7401
commit
253abb1643
Binary file not shown.
BIN
images/pic1.png
BIN
images/pic1.png
Binary file not shown.
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 836 KiB |
@ -6,9 +6,11 @@ from datetime import datetime
|
|||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
from .mixins import CPUDrawMixin, TaskbarMixin, GridMixin
|
from .mixins import CPUDrawMixin, TaskbarMixin, GridMixin
|
||||||
|
from widgets import Grid
|
||||||
from utils import FileHandler
|
from utils import FileHandler
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Signals(CPUDrawMixin, TaskbarMixin, GridMixin):
|
class Signals(CPUDrawMixin, TaskbarMixin, GridMixin):
|
||||||
def __init__(self, settings):
|
def __init__(self, settings):
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
@ -59,9 +61,10 @@ class Signals(CPUDrawMixin, TaskbarMixin, GridMixin):
|
|||||||
self.currentPath = self.settings.returnSettings()[0]
|
self.currentPath = self.settings.returnSettings()[0]
|
||||||
self.copyCutArry = []
|
self.copyCutArry = []
|
||||||
self.selectedFiles = []
|
self.selectedFiles = []
|
||||||
self.gridClss = None
|
self.gridClss = Grid(self.gridObj, self.settings)
|
||||||
self.pasteType = 1 # copy == 1 and cut == 2
|
self.pasteType = 1 # copy == 1 and cut == 2
|
||||||
|
|
||||||
|
|
||||||
# Add filter to allow only folders to be selected
|
# Add filter to allow only folders to be selected
|
||||||
selectDirDialog.add_filter(filefilter)
|
selectDirDialog.add_filter(filefilter)
|
||||||
selectDirDialog.set_filename(self.currentPath)
|
selectDirDialog.set_filename(self.currentPath)
|
||||||
|
@ -3,13 +3,12 @@
|
|||||||
# Python imports
|
# Python imports
|
||||||
|
|
||||||
# Application imports
|
# Application imports
|
||||||
from widgets import Grid
|
|
||||||
|
|
||||||
|
|
||||||
class GridMixin:
|
class GridMixin:
|
||||||
|
# different from the grid widget class'
|
||||||
def setNewDirectory(self, widget, data=None):
|
def setNewDirectory(self, widget, data=None):
|
||||||
newPath = widget.get_filename()
|
newPath = widget.get_filename()
|
||||||
self.gridClss = Grid(self.gridObj, self.settings)
|
|
||||||
self.gridClss.setNewDirectory(newPath)
|
self.gridClss.setNewDirectory(newPath)
|
||||||
self.settings.saveSettings(newPath)
|
self.settings.saveSettings(newPath)
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ class Grid:
|
|||||||
self.grid.set_model(self.store)
|
self.grid.set_model(self.store)
|
||||||
self.grid.set_pixbuf_column(0)
|
self.grid.set_pixbuf_column(0)
|
||||||
self.grid.set_text_column(1)
|
self.grid.set_text_column(1)
|
||||||
|
print("Grid generated...")
|
||||||
self.grid.connect("item-activated", self.iconDblLeftClick)
|
self.grid.connect("item-activated", self.iconDblLeftClick)
|
||||||
self.grid.connect("button_release_event", self.iconSingleClick, (self.grid,))
|
self.grid.connect("button_release_event", self.iconSingleClick, (self.grid,))
|
||||||
|
|
||||||
@ -102,7 +103,7 @@ class Grid:
|
|||||||
|
|
||||||
# Wait till we have a proper index...
|
# Wait till we have a proper index...
|
||||||
while len(self.store) < (start + 1):
|
while len(self.store) < (start + 1):
|
||||||
time.sleep(.800)
|
time.sleep(.650)
|
||||||
|
|
||||||
i = start
|
i = start
|
||||||
for file in files:
|
for file in files:
|
||||||
|
Loading…
Reference in New Issue
Block a user