diff --git a/python/bin/gwinwrap-0-0-1-x64.deb b/python/bin/gwinwrap-0-0-1-x64.deb
index f3a0a28..1c6ad69 100644
Binary files a/python/bin/gwinwrap-0-0-1-x64.deb and b/python/bin/gwinwrap-0-0-1-x64.deb differ
diff --git a/python/src/debs/gwinwrap-0-0-1-x64/opt/GWinWrap/GWinWrap.py b/python/src/debs/gwinwrap-0-0-1-x64/opt/GWinWrap/GWinWrap.py
index 7e59ead..0fa48cb 100755
--- a/python/src/debs/gwinwrap-0-0-1-x64/opt/GWinWrap/GWinWrap.py
+++ b/python/src/debs/gwinwrap-0-0-1-x64/opt/GWinWrap/GWinWrap.py
@@ -8,7 +8,7 @@ gi.require_version('Gdk', '3.0')
from gi.repository import Gtk as gtk
from gi.repository import Gdk as gdk
from gi.repository import GObject as gobject
-from gi.repository import Gtk, GdkPixbuf
+from gi.repository import GdkPixbuf
from os import listdir
from os.path import isfile, join
@@ -28,9 +28,8 @@ class GWinWrap:
self.window = self.builder.get_object("Main")
self.builder.connect_signals(self)
self.window.connect("delete-event", gtk.main_quit)
-
- self.screen = self.window.get_screen()
- self.visual = self.screen.get_rgba_visual()
+ self.screen = self.window.get_screen()
+ self.visual = self.screen.get_rgba_visual()
if self.visual != None and self.screen.is_composited():
self.window.set_visual(self.visual)
@@ -61,7 +60,15 @@ class GWinWrap:
# foreground=\"#ffa800\"
# foreground=\"#88cc27\"
# foreground=\"#ff0000\"
- # foreground=\"#ff0000\"
+
+ # Fill list xscreensaver
+ self.xscrPth = "/usr/lib/xscreensaver/"
+ xscreenList = self.builder.get_object("XScreensaver List")
+ list = [f for f in listdir(self.xscrPth) if isfile(join(self.xscrPth, f))]
+ list.sort()
+
+ for file in list:
+ xscreenList.append((file,))
self.window.show()
@@ -205,6 +212,10 @@ class GWinWrap:
resolution = plyBckRes.get_active_text() + offset4Res.get_active_text()
self.applyType = self.stateSaver.saveToFile(self.toSavePath, resolution,
saveLoc, useXscreenSaver, self.xScreenVal)
+ if self.applyType == -1:
+ self.helpLabel.set_markup("Nothing saved...")
+ return
+
self.helpLabel.set_markup(self.savedLabel)
def applySttngs(self, widget, data=None):
@@ -229,6 +240,11 @@ class GWinWrap:
treeiter = xSvrListStore.get_iter(path[0])
self.xScreenVal = xSvrListStore.get_value(treeiter, 0)
+ def previewXscreen(self, widget, eve):
+ if eve.type == gdk.EventType.DOUBLE_BUTTON_PRESS:
+ preview = self.xscrPth + "/" + self.xScreenVal + "&"
+ os.system(preview)
+
def clearSelection(self, widget, data=None):
self.clear()
@@ -242,10 +258,13 @@ class GWinWrap:
break
imageGrid.attach(self.gridLabel, 0, 0, 1, 1)
+ self.builder.get_object("xScreenSvrList").set_sensitive(False)
+ self.builder.get_object("useXScrnList").set_active(False)
self.helpLabel.set_markup(self.defaultLabel)
self.loadProgress.set_text("")
self.loadProgress.set_fraction(0.0)
self.toSavePath = None
+ self.xScreenVal = None
self.applyType = 1 # Default to XWinWrap
def closeProgram(self, widget, data=None):
diff --git a/python/src/debs/gwinwrap-0-0-1-x64/opt/GWinWrap/resources/GWinWrap.glade b/python/src/debs/gwinwrap-0-0-1-x64/opt/GWinWrap/resources/GWinWrap.glade
index 7920fbd..8654681 100644
--- a/python/src/debs/gwinwrap-0-0-1-x64/opt/GWinWrap/resources/GWinWrap.glade
+++ b/python/src/debs/gwinwrap-0-0-1-x64/opt/GWinWrap/resources/GWinWrap.glade
@@ -12,206 +12,6 @@
-
-
- electricsheep
-
-
- atlantis
-
-
- atunnel
-
-
- blinkbox
-
-
- blocktube
-
-
- bouncingcow
-
-
- boxfit
-
-
- bsod
-
-
- bubble3d
-
-
- bumps
-
-
- cage
-
-
- carousel
-
-
- cube21
-
-
- cubenetic
-
-
- cubicgrid
-
-
- cwaves
-
-
- dangerball
-
-
- fiberlamp
-
-
- fireworkx
-
-
- flipflop
-
-
- fliptext
-
-
- flow
-
-
- flurry
-
-
- flyingtoasters
-
-
- gflux
-
-
- glcells
-
-
- gleidescope
-
-
- glknots
-
-
- glmatrix
-
-
- glschool
-
-
- glslideshow
-
-
- glsnake
-
-
- hypertorus
-
-
- hypnowheel
-
-
- interaggregate
-
-
- intermomentary
-
-
- jigglypuff
-
-
- jigsaw
-
-
- julia
-
-
- lament
-
-
- lockward
-
-
- metaballs
-
-
- moebiusgears
-
-
- molecule
-
-
- morph3d
-
-
- noof
-
-
- phosphor
-
-
- photopile
-
-
- pinion
-
-
- popsquares
-
-
- ripples
-
-
- skytentacles
-
-
- slidescreen
-
-
- stonerview
-
-
- strange
-
-
- substrate
-
-
- tangram
-
-
- whirlwindwarp
-
-
- wormhole
-
-
- xflame
-
-
- xrayswarm
-
-
- companioncube
-
-
- fuzzyflakes
-
-
- galaxy
-
-
- glplanet
-
-
- penetrate
-
-
True
@@ -449,6 +249,7 @@
True
XScreensaver List
False
+
diff --git a/python/src/versions/0.0.1/GWinWrap/utils/SaveState.py b/python/src/versions/0.0.1/GWinWrap/utils/SaveState.py
index 0eac2af..6187fde 100644
--- a/python/src/versions/0.0.1/GWinWrap/utils/SaveState.py
+++ b/python/src/versions/0.0.1/GWinWrap/utils/SaveState.py
@@ -5,29 +5,32 @@ import os
class SaveState:
def __init__(self):
self.fileWriter = None
- self.filePath = None
+ self.toSavePath = None
self.useXSvrn = None
self.xScreenVal = None
self.sveFileLoc = None
self.resolution = None
- def saveToFile(self, filePath, resolution,
- saveLoc, useXSvrn, xScreenVal):
+ def saveToFile(self, toSavePath, resolution,
+ saveLoc, useXSvrn, xScreenVal):
- self.filePath = filePath
+ self.toSavePath = toSavePath
self.useXSvrn = useXSvrn
self.xScreenVal = xScreenVal
self.resolution = resolution
userPth = os.path.expanduser('~')
# Saves to file with selected and needed settings
- if filePath:
- if filePath.lower().endswith(('.png', '.jpg', '.jpeg', '.gif')):
+ if toSavePath:
+ if toSavePath.lower().endswith(('.png', '.jpg', '.jpeg', '.gif')):
self.sveFileLoc = userPth + "/" + ".config/nitrogen/bg-saved.cfg"
else:
self.sveFileLoc = userPth + "/" + saveLoc
+ elif useXSvrn and xScreenVal:
+ self.sveFileLoc = userPth + "/" + saveLoc
else:
- self.filePath = ''
+ return -1
+
if self.sveFileLoc:
self.fileWriter = open(self.sveFileLoc, "w")
@@ -37,19 +40,22 @@ class SaveState:
applyType = 1
output = None
+ print("XScreen: " + str(self.useXSvrn))
+ print(self.fileWriter)
+
# XSCREENSAVER
if self.useXSvrn:
output = "xwinwrap -ov -g " + self.resolution + " -st -sp -b -nf -s -ni -- /usr/lib/xscreensaver/" + self.xScreenVal + " -window-id WID -root";
# GIF
- elif self.filePath.lower().endswith(('.gif')):
- output = "xwinwrap -ov -g " + self.resolution + " -st -sp -b -nf -s -ni -- gifview -a -w WID " + self.filePath;
+ elif self.toSavePath.lower().endswith(('.gif')):
+ output = "xwinwrap -ov -g " + self.resolution + " -st -sp -b -nf -s -ni -- gifview -a -w WID " + self.toSavePath;
# Standard images using nitrogen
- elif self.filePath.lower().endswith(('.png', 'jpg', '.jpeg')):
- output = "[xin_0] \n file=" + self.filePath + "\nmode=0 \nbgcolor=#000000\n[xin_1] \nfile=" + self.filePath + "\nmode=0 \nbgcolor=#000000";
+ elif self.toSavePath.lower().endswith(('.png', 'jpg', '.jpeg')):
+ output = "[xin_0] \n file=" + self.toSavePath + "\nmode=0 \nbgcolor=#000000\n[xin_1] \nfile=" + self.toSavePath + "\nmode=0 \nbgcolor=#000000";
applyType = 2;
# VIDEO
else:
- output = "xwinwrap -ov -g " + self.resolution + " -st -sp -b -nf -s -ni -- mplayer -wid WID -really-quiet -ao null -loop 0 " + self.filePath;
+ output = "xwinwrap -ov -g " + self.resolution + " -st -sp -b -nf -s -ni -- mplayer -wid WID -really-quiet -ao null -loop 0 " + self.toSavePath;
pass
if self.fileWriter: