Compare commits
12 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd7f276836 | ||
|
|
d1a9d47ac9 | ||
|
|
4ed3e9e03f | ||
|
|
76855515a0 | ||
|
|
85a5191494 | ||
|
|
2b251f6486 | ||
|
|
9fbd8c0a5b | ||
|
|
1207375c54 | ||
|
|
bd6e0fec7a | ||
|
|
7538ede0e9 | ||
|
|
3c26273600 | ||
|
|
953813536d |
12 changed files with 427 additions and 95 deletions
1
.cvsignore → .gitignore
vendored
1
.cvsignore → .gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
wallpapoz-0.4.1-svn92_trunk.tar.bz2
|
||||
/wallpapoz-0.5.tar.bz2
|
||||
21
Makefile
21
Makefile
|
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: wallpapoz
|
||||
# $Id: Makefile,v 1.1 2006/10/17 17:17:06 mtasaka Exp $
|
||||
NAME := wallpapoz
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
||||
29
daemon_wallpapoz-wrapper
Normal file
29
daemon_wallpapoz-wrapper
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
|
||||
which xprop &>/dev/null || exit 1
|
||||
sleep 2
|
||||
|
||||
TRIAL=0
|
||||
PROGNAME=$0
|
||||
while true ; do
|
||||
RESULT=$(xprop -root _NET_DESKTOP_GEOMETRY 2>/dev/null)
|
||||
RESULT=${RESULT:34}
|
||||
WIDTH=$(echo $RESULT | sed -e 's|,.*$||')
|
||||
HEIGHT=$(echo $RESULT | sed -e 's|^.*,||' | sed -e 's|^[ \t][ \t]*||')
|
||||
if [[ ( -z $WIDTH ) || ( -z $WIDTH ) ]] ; then
|
||||
# xprop failed
|
||||
TRIAL=$((TRIAL+1))
|
||||
echo "$PROGNAME: xprop returned unexpected result for $TRIAL times"
|
||||
if test $TRIAL -ge 4 ; then
|
||||
echo "$PROGNAME: not lauching daemon_wallpapoz"
|
||||
exit 1
|
||||
fi
|
||||
sleep 3
|
||||
else
|
||||
# xprop succeeded
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
exec /usr/libexec/daemon_wallpapoz "$@"
|
||||
exit 1
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
5a993e9618690681805124f78c141170 wallpapoz-0.4.1-svn92_trunk.tar.bz2
|
||||
95231129c118034b0ae49e0960e409d9 wallpapoz-0.5.tar.bz2
|
||||
|
|
|
|||
40
wallpapoz-0.4.1-rev92-animated-image.patch
Normal file
40
wallpapoz-0.4.1-rev92-animated-image.patch
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.anime 2010-06-12 04:26:39.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-06-12 04:13:43.000000000 +0900
|
||||
@@ -1236,15 +1236,32 @@
|
||||
filename = self.store.get_value(position_iter, 1)
|
||||
|
||||
# display image properly
|
||||
+ from glib import GError as glib_GError
|
||||
try:
|
||||
- im = Image.open(filename)
|
||||
- # keep image proportions
|
||||
- if im.size[0] > im.size[1]:
|
||||
- self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, 400, int((float(im.size[1])/im.size[0]) * 400)))
|
||||
+ anime = gtk.gdk.PixbufAnimation(filename)
|
||||
+
|
||||
+ if anime.is_static_image() :
|
||||
+ im = Image.open(filename)
|
||||
+ # keep image proportions
|
||||
+ if im.size[0] > im.size[1]:
|
||||
+ self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, 400, int((float(im.size[1])/im.size[0]) * 400)))
|
||||
+ else:
|
||||
+ self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, int(float(im.size[1])/im.size[0] * 300), 300))
|
||||
+
|
||||
else:
|
||||
- self.image_widget.set_from_pixbuf(gtk.gdk.pixbuf_new_from_file_at_size(filename, int(float(im.size[1])/im.size[0] * 300), 300))
|
||||
+ width = anime.get_width()
|
||||
+ height = anime.get_height()
|
||||
+ static_im = anime.get_static_image()
|
||||
+ if width > height:
|
||||
+ self.image_widget.set_from_pixbuf(static_im.scale_simple(400, int((float(height)/width)*400),gtk.gdk.INTERP_BILINEAR))
|
||||
+ else:
|
||||
+ self.image_widget.set_from_pixbuf(static_im.scale_simple(int((float(width)/height)*300),300,gtk.gdk.INTERP_BILINEAR))
|
||||
+
|
||||
except IOError:
|
||||
self.image_widget.clear()
|
||||
+ except glib_GError, (msg):
|
||||
+ print msg
|
||||
+ self.image_widget.clear()
|
||||
|
||||
# display image filename
|
||||
self.wallpaper_filename.set_markup("<b>" + os.path.basename(filename) + "</b>")
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.compiz 2009-08-30 01:22:07.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-02-10 01:25:43.000000000 +0900
|
||||
@@ -25,6 +25,7 @@
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-18 00:40:58.000000000 +0900
|
||||
@@ -25,18 +25,40 @@
|
||||
# achieve goal by calling external program
|
||||
|
||||
import os
|
||||
|
|
@ -8,19 +8,70 @@
|
|||
import string
|
||||
|
||||
class WallpapozSystem:
|
||||
@@ -73,6 +74,11 @@
|
||||
if self.geometry_height!=self.screen_height:
|
||||
|
||||
+ # Define static variable to save the initial value of self.beryl
|
||||
+ static_check_beryl_called_p = False
|
||||
+ static_beryl = False
|
||||
+
|
||||
+ # Also for total_workspaces
|
||||
+ static_finding_total_workspaces_called_p = False
|
||||
+ static_total_workspaces = 0
|
||||
+
|
||||
def __init__(self):
|
||||
self.wallpaper_style = 'scaled'
|
||||
self.finding_screen_resolution()
|
||||
+
|
||||
+ # Save the first result of self.beryl, and respawn daemon
|
||||
+ # if self.beryl value changed.
|
||||
self.check_beryl()
|
||||
+ if not WallpapozSystem.static_check_beryl_called_p :
|
||||
+ WallpapozSystem.static_check_beryl_called_p = True
|
||||
+ WallpapozSystem.static_beryl = self.beryl
|
||||
+
|
||||
if self.beryl:
|
||||
self.finding_row_and_column()
|
||||
self.finding_total_workspaces()
|
||||
|
||||
+ # Check if total_workspaces changed only here
|
||||
+ if WallpapozSystem.static_total_workspaces != self.total_workspaces:
|
||||
+ print "daemon_wallpapoz: the number of total workspaces changed during initialization process."
|
||||
+ print "daemon_wallpapoz: respawning daemon_wallpapoz."
|
||||
+ self.respawn_system()
|
||||
+
|
||||
def set_style(self, style):
|
||||
self.wallpaper_style = style
|
||||
|
||||
@@ -57,6 +79,11 @@
|
||||
else:
|
||||
self.total_workspaces = int(os.popen("xprop -root _NET_NUMBER_OF_DESKTOPS").read()[36:38])
|
||||
|
||||
+ # Save this total_workspaces value
|
||||
+ if not WallpapozSystem.static_finding_total_workspaces_called_p:
|
||||
+ WallpapozSystem.static_finding_total_workspaces_called = True
|
||||
+ WallpapozSystem.static_total_workspaces = self.total_workspaces
|
||||
+
|
||||
## class method to find if user use beryl in his system or not
|
||||
def check_beryl(self):
|
||||
raw_geometry = os.popen('xprop -root _NET_DESKTOP_GEOMETRY').read()
|
||||
@@ -69,10 +96,15 @@
|
||||
self.beryl = False
|
||||
if self.geometry_width!=self.screen_width:
|
||||
self.beryl = True
|
||||
- return
|
||||
- if self.geometry_height!=self.screen_height:
|
||||
+ elif self.geometry_height!=self.screen_height:
|
||||
self.beryl = True
|
||||
|
||||
+ def beryl_status(self, update = False):
|
||||
+ if update:
|
||||
+ self.check_beryl()
|
||||
+ return self.beryl
|
||||
+ # respawn daemon if self.beryl value changed
|
||||
+ if WallpapozSystem.static_check_beryl_called_p:
|
||||
+ if WallpapozSystem.static_beryl != self.beryl:
|
||||
+ print "Compiz status changed, respawning daemon_wallpapoz."
|
||||
+ self.respawn_system()
|
||||
+
|
||||
## class method to find how many rows and columns of workspaces
|
||||
def finding_row_and_column(self):
|
||||
self.row_workspaces = self.geometry_height / self.screen_height
|
||||
@@ -113,3 +119,11 @@
|
||||
@@ -113,3 +145,11 @@
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
|
@ -31,35 +82,20 @@
|
|||
+ os.execvp('daemon_wallpapoz', new_argv)
|
||||
+ print "os.execvp failed, exiting..."
|
||||
+ sys.exit(1)
|
||||
+ return
|
||||
--- wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz.compiz 2009-08-30 01:22:07.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz 2010-02-10 01:30:29.000000000 +0900
|
||||
@@ -107,6 +107,9 @@
|
||||
delay = 60 * float(wallpapozxml.delay())
|
||||
randomvar = int(wallpapozxml.is_random())
|
||||
|
||||
+ # get current compiz status
|
||||
+ previous_beryl_status = wallpapoz_system.beryl_status()
|
||||
+
|
||||
# how many workspace we use
|
||||
if conf_type == "workspace":
|
||||
# cleansing
|
||||
@@ -134,11 +137,25 @@
|
||||
--- wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz.compiz 2009-08-30 01:22:07.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz 2010-03-18 00:25:42.000000000 +0900
|
||||
@@ -134,11 +134,20 @@
|
||||
if wallpapozxml.get_type() == "workspace":
|
||||
while True:
|
||||
# don't get rush
|
||||
- time.sleep(1)
|
||||
+ # sleep a bit more
|
||||
+ # sleep a bit more
|
||||
+ time.sleep(2)
|
||||
+
|
||||
+ # check if compiz is working every loop
|
||||
+ cur_beryl_status = wallpapoz_system.beryl_status(update = True)
|
||||
+ if previous_beryl_status != cur_beryl_status:
|
||||
+ # compiz status changed, respawn daemon_wallpapoz
|
||||
+ print "Compiz status changed, respawning daemon_wallpapoz."
|
||||
+ wallpapoz_system.respawn_system()
|
||||
+
|
||||
+ previous_beryl_status = cur_beryl_status
|
||||
+ # check if compiz is working every loop (and
|
||||
+ # if compiz status changed, respawn daemon)
|
||||
+ wallpapoz_system.check_beryl()
|
||||
|
||||
# what workspace we are in now?
|
||||
cur_desk = wallpapoz_system.current_desktop()
|
||||
|
|
|
|||
18
wallpapoz-0.4.1-rev92-delete-first-in-desktop-mode.patch
Normal file
18
wallpapoz-0.4.1-rev92-delete-first-in-desktop-mode.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.deletefirst 2010-06-15 01:45:58.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-06-15 02:09:59.000000000 +0900
|
||||
@@ -1070,13 +1070,13 @@
|
||||
lowest_iter = self.store.get_iter((path_iter-1,))
|
||||
else:
|
||||
index_temp = 0
|
||||
+ before_path_iter = 0
|
||||
for single_iter in self.selected_iter[1:]:
|
||||
path_iter = self.store.get_path(single_iter)[0]
|
||||
if path_iter == (index_temp + 1):
|
||||
index_temp = index_temp + 1
|
||||
before_path_iter = path_iter
|
||||
- else:
|
||||
- lowest_iter = self.store.get_iter((before_path_iter+1,))
|
||||
+ lowest_iter = self.store.get_iter((before_path_iter+1,))
|
||||
|
||||
# remove the iter
|
||||
for single_iter in self.selected_iter:
|
||||
107
wallpapoz-0.4.1-rev92-delete-one-wallpaper.patch
Normal file
107
wallpapoz-0.4.1-rev92-delete-one-wallpaper.patch
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.deleteone 2010-06-13 03:08:43.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-06-13 17:33:06.000000000 +0900
|
||||
@@ -833,6 +833,16 @@
|
||||
# list to put our lowest iter in every related workspace
|
||||
lowest_iter_list = []
|
||||
|
||||
+ # FIXME
|
||||
+ # FIXME
|
||||
+ # Currently copy_iter_list can be NoneType, e.g. when
|
||||
+ # - Select one wallpaper in a workspace
|
||||
+ # - and delete it
|
||||
+ # - next choose "Edit -> "Delete Wallpaperz""
|
||||
+ # Well, bugish, however anyway workaround...
|
||||
+ if not copy_iter_list:
|
||||
+ return lowest_iter_list
|
||||
+
|
||||
# indication we have done with this workspace
|
||||
done_workspace = True
|
||||
|
||||
@@ -899,8 +909,16 @@
|
||||
# do the remaining job, get the lowest iter from last workspace if we have not done withlast workspace
|
||||
if not done_workspace:
|
||||
|
||||
- lowest_iter_list.append(
|
||||
- self.store.get_iter( (parent_number_index, iter_workspace_index+1) ) )
|
||||
+ # Umm... the original code raises ValueError if trying to delete
|
||||
+ # a wallpaper from a workspace, if only one wallpaper existed.
|
||||
+ # Need further investigation, however anyway workaround...
|
||||
+ new_iter = []
|
||||
+ try:
|
||||
+ new_iter = self.store.get_iter((parent_number_index, iter_workspace_index + 1))
|
||||
+ except ValueError:
|
||||
+ pass
|
||||
+ if new_iter:
|
||||
+ lowest_iter_list.append(new_iter)
|
||||
|
||||
return lowest_iter_list
|
||||
|
||||
@@ -983,6 +1001,11 @@
|
||||
def cut_and_reordering_treeiter(self):
|
||||
lowest_iter_list = self.reordering_node_after_cut_and_paste( self.selected_iter )
|
||||
|
||||
+ # workaround for the case that trying to remove a wallpaper from
|
||||
+ # the workspace where only one wallpaper exists
|
||||
+ if not lowest_iter_list:
|
||||
+ return
|
||||
+
|
||||
# iterate to cut ( really!!! ) the iter from selected iter list
|
||||
for single_iter in self.selected_iter:
|
||||
|
||||
@@ -993,6 +1016,9 @@
|
||||
for single_iter in lowest_iter_list:
|
||||
self.order_treeiter_from_lowest_iter(single_iter)
|
||||
|
||||
+ # Finally update selection view
|
||||
+ self.treeview_selection_changed(None)
|
||||
+
|
||||
# order treeiter in one workspace or in list mode from lowest iter ( more efficient )
|
||||
def order_treeiter_from_lowest_iter(self, single_iter):
|
||||
# get the path
|
||||
@@ -1209,6 +1235,22 @@
|
||||
# it display another image, and disable/enable some menu
|
||||
def treeview_selection_changed(self, widget):
|
||||
position_iter = self.get_selected_iter_of_treeview("anything")
|
||||
+
|
||||
+ if not position_iter:
|
||||
+ # Nothing is selected, unfortunately this can happen
|
||||
+ self.main_window.get_widget("rename_workspace").set_sensitive(False)
|
||||
+ self.rename_workspace_menu.set_sensitive(False)
|
||||
+ self.main_window.get_widget("change_wallpaper").set_sensitive(False)
|
||||
+ self.change_wallpaper_menu.set_sensitive(False)
|
||||
+ self.main_window.get_widget("cut").set_sensitive(False)
|
||||
+ self.cut_menu.set_sensitive(False)
|
||||
+ self.main_window.get_widget("copy").set_sensitive(False)
|
||||
+ self.copy_menu.set_sensitive(False)
|
||||
+ self.main_window.get_widget("delete_wallpapers").set_sensitive(False)
|
||||
+ self.delete_wallpapers_menu.set_sensitive(False)
|
||||
+ # Nothing left
|
||||
+ return
|
||||
+
|
||||
if type(self.store) == gtk.TreeStore:
|
||||
parent = self.store.iter_parent(position_iter)
|
||||
# parent node, enable: rename_workspace
|
||||
@@ -1224,8 +1266,21 @@
|
||||
self.cut_menu.set_sensitive(True)
|
||||
self.main_window.get_widget("copy").set_sensitive(True)
|
||||
self.copy_menu.set_sensitive(True)
|
||||
- self.main_window.get_widget("delete_wallpapers").set_sensitive(True)
|
||||
- self.delete_wallpapers_menu.set_sensitive(True)
|
||||
+
|
||||
+ # See create_configuration_file
|
||||
+ # Check if there are at least 2 wallpapers
|
||||
+ childiter = self.store.iter_children(parent)
|
||||
+ childiter = self.store.iter_next(childiter)
|
||||
+
|
||||
+ # Only show "Delete wallpapers" menu if there are at least 2 wallpapers
|
||||
+ # in a workspace
|
||||
+ if childiter:
|
||||
+ self.main_window.get_widget("delete_wallpapers").set_sensitive(True)
|
||||
+ self.delete_wallpapers_menu.set_sensitive(True)
|
||||
+ else:
|
||||
+ self.main_window.get_widget("delete_wallpapers").set_sensitive(False)
|
||||
+ self.delete_wallpapers_menu.set_sensitive(False)
|
||||
+
|
||||
# parent node
|
||||
else:
|
||||
self.main_window.get_widget("rename_workspace").set_sensitive(True)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_nox 2010-02-09 03:05:24.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-02-09 03:07:00.000000000 +0900
|
||||
--- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_nox 2010-03-18 00:52:45.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-18 01:00:30.000000000 +0900
|
||||
@@ -24,9 +24,11 @@
|
||||
## wallpapoz_system.py -- finds current desktop and changes wallpaper
|
||||
# achieve goal by calling external program
|
||||
|
|
@ -12,29 +12,41 @@
|
|||
|
||||
class WallpapozSystem:
|
||||
|
||||
@@ -38,12 +40,34 @@
|
||||
self.finding_row_and_column()
|
||||
self.finding_total_workspaces()
|
||||
@@ -59,12 +61,46 @@
|
||||
print "daemon_wallpapoz: respawning daemon_wallpapoz."
|
||||
self.respawn_system()
|
||||
|
||||
+ def exec_cmd(self, cmd):
|
||||
+ p = subprocess.Popen(
|
||||
+ cmd,
|
||||
+ stdout = subprocess.PIPE,
|
||||
+ stderr = subprocess.PIPE,
|
||||
+ shell = True
|
||||
+ )
|
||||
+ def exec_cmd_under_X(self, cmd):
|
||||
+ try:
|
||||
+ p = subprocess.Popen(
|
||||
+ cmd,
|
||||
+ stdout = subprocess.PIPE,
|
||||
+ stderr = subprocess.PIPE,
|
||||
+ shell = True
|
||||
+ )
|
||||
+ except OSError:
|
||||
+ print "daemon_wallpapoz: fork failed for %s, exiting." %cmd
|
||||
+ sys.exit(1)
|
||||
+
|
||||
+ pstdout = p.stdout.read()
|
||||
+ pstderr = p.stderr.read()
|
||||
+ ret = p.wait()
|
||||
+
|
||||
+ if ( ret != 0 ) and ( ret & 0xFF ):
|
||||
+ err_str = 'unable to open display'
|
||||
+ kill_daemon = False
|
||||
+
|
||||
+ if pstderr.find(err_str) >= 0:
|
||||
+ if (ret != 0) and (ret & 0xFF):
|
||||
+ print "daemon_wallpapoz: %s returned status %i." %(cmd, ret)
|
||||
+ print "daemon_wallpapoz: error message: %s" %pstderr
|
||||
+ kill_daemon = True
|
||||
+
|
||||
+ if (cmd.find('xprop') >= 0) and (pstdout.find('no such atom') >= 0):
|
||||
+ kill_daemon = True
|
||||
+
|
||||
+ if kill_daemon:
|
||||
+ ## No X resource available, kill daemon_wallpapoz
|
||||
+ cpid = os.getpid()
|
||||
+ os.kill (cpid, signal.SIGTERM)
|
||||
+ print "daemon_wallpapoz: X resource seems no longer available."
|
||||
+ print "daemon_wallpapoz: killing daemon_wallpapoz."
|
||||
+ sys.exit(1)
|
||||
+
|
||||
+ return pstdout
|
||||
+
|
||||
|
|
@ -44,39 +56,43 @@
|
|||
## class method to find monitor resolution
|
||||
def finding_screen_resolution(self):
|
||||
- raw_resolution = os.popen('xwininfo -root').read()
|
||||
+ raw_resolution = self.exec_cmd('xwininfo -root')
|
||||
+ raw_resolution = self.exec_cmd_under_X('xwininfo -root')
|
||||
start_width = raw_resolution.find('Width')
|
||||
end_width = raw_resolution.find('\n',start_width)
|
||||
start_height = raw_resolution.find('Height')
|
||||
@@ -56,11 +80,11 @@
|
||||
@@ -77,7 +113,7 @@
|
||||
if self.beryl:
|
||||
self.total_workspaces = self.row_workspaces * self.column_workspaces
|
||||
else:
|
||||
- self.total_workspaces = int(os.popen("xprop -root _NET_NUMBER_OF_DESKTOPS").read()[36:38])
|
||||
+ self.total_workspaces = int(self.exec_cmd("xprop -root _NET_NUMBER_OF_DESKTOPS")[36:38])
|
||||
+ self.total_workspaces = int(self.exec_cmd_under_X("xprop -root _NET_NUMBER_OF_DESKTOPS")[36:38])
|
||||
|
||||
# Save this total_workspaces value
|
||||
if not WallpapozSystem.static_finding_total_workspaces_called_p:
|
||||
@@ -86,7 +122,7 @@
|
||||
|
||||
## class method to find if user use beryl in his system or not
|
||||
def check_beryl(self):
|
||||
- raw_geometry = os.popen('xprop -root _NET_DESKTOP_GEOMETRY').read()
|
||||
+ raw_geometry = self.exec_cmd('xprop -root _NET_DESKTOP_GEOMETRY')
|
||||
+ raw_geometry = self.exec_cmd_under_X('xprop -root _NET_DESKTOP_GEOMETRY')
|
||||
# output of xprop -root _NET_DESKTOP_GEOMETRY is '_NET_DESKTOP_GEOMETRY(CARDINAL) = 1024, 768\n'
|
||||
# and we just need the '1024, 768' part
|
||||
raw_geometry = raw_geometry[34:raw_geometry.find('\n')]
|
||||
@@ -90,7 +114,7 @@
|
||||
@@ -117,7 +153,7 @@
|
||||
## class method to know what workspace we are in now
|
||||
def current_desktop(self):
|
||||
if self.beryl:
|
||||
- raw_viewport = os.popen('xprop -root _NET_DESKTOP_VIEWPORT').read()
|
||||
+ raw_viewport = self.exec_cmd('xprop -root _NET_DESKTOP_VIEWPORT')
|
||||
+ raw_viewport = self.exec_cmd_under_X('xprop -root _NET_DESKTOP_VIEWPORT')
|
||||
# output of xprop -root _NET_DESKTOP_VIEWPORT is '_NET_DESKTOP_VIEWPORT(CARDINAL) = 1024, 768\n'
|
||||
# and we just need the '1024, 768' part
|
||||
raw_viewport = raw_viewport[34:raw_viewport.find('\n')]
|
||||
@@ -99,7 +123,7 @@
|
||||
@@ -126,7 +162,7 @@
|
||||
y_pos = int(viewport[1]) / self.screen_height
|
||||
workspace = x_pos + self.column_workspaces * y_pos
|
||||
else:
|
||||
- raw_workspace = os.popen('xprop -root _NET_CURRENT_DESKTOP').read()
|
||||
+ raw_workspace = self.exec_cmd('xprop -root _NET_CURRENT_DESKTOP')
|
||||
+ raw_workspace = self.exec_cmd_under_X('xprop -root _NET_CURRENT_DESKTOP')
|
||||
workspace = int(raw_workspace[33] + raw_workspace[34])
|
||||
return workspace
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
--- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_multi 2010-02-09 03:12:50.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-02-09 03:13:01.000000000 +0900
|
||||
@@ -150,3 +150,18 @@
|
||||
--- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_multi 2010-03-18 01:01:50.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py 2010-03-18 01:03:38.000000000 +0900
|
||||
@@ -189,3 +189,17 @@
|
||||
print "os.execvp failed, exiting..."
|
||||
sys.exit(1)
|
||||
return
|
||||
+
|
||||
|
||||
+ def prevent_multiple_start(self):
|
||||
+ cpid = os.getpid()
|
||||
+ cid = os.getuid()
|
||||
|
|
@ -19,8 +18,8 @@
|
|||
+ if ( id_list in python_id_list ) and ( int(id_list) != cpid) :
|
||||
+ os.kill(int(id_list), signal.SIGTERM)
|
||||
+
|
||||
--- wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz.kill_multi 2010-02-09 03:12:50.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz 2010-02-09 03:13:01.000000000 +0900
|
||||
--- wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz.kill_multi 2010-03-18 01:01:50.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz 2010-03-18 01:01:50.000000000 +0900
|
||||
@@ -98,6 +98,10 @@
|
||||
# create the system class ( to change wallpaper and read current desktop )
|
||||
# by calling external program
|
||||
|
|
|
|||
22
wallpapoz-0.4.1-rev92-nonutf8-directory.patch
Normal file
22
wallpapoz-0.4.1-rev92-nonutf8-directory.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.nonutf8 2010-06-13 01:21:08.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-06-13 01:39:08.000000000 +0900
|
||||
@@ -543,6 +543,9 @@
|
||||
num_of_child = self.store.iter_n_children(iter)
|
||||
# what is the directory?
|
||||
cur_dir = filechooser_widget.get_filename()
|
||||
+ # get_filename can return NoneType (for non-UTF8 directory)
|
||||
+ if not cur_dir:
|
||||
+ return
|
||||
# if recursive, we use walktree
|
||||
if recursive_widget.get_active():
|
||||
# looping with walktree method
|
||||
@@ -587,6 +590,9 @@
|
||||
new_index = self.store.get_value(next_iter, 0) + 1
|
||||
# what is the directory?
|
||||
cur_dir = filechooser_widget.get_filename()
|
||||
+ # get_filename can return NoneType (for non-UTF8 directory)
|
||||
+ if not cur_dir:
|
||||
+ return
|
||||
# if recursive, we use walktree
|
||||
if recursive_widget.get_active():
|
||||
# looping with walktree method
|
||||
105
wallpapoz.spec
105
wallpapoz.spec
|
|
@ -5,10 +5,10 @@
|
|||
%define srcurl http://wallpapoz.akbarhome.com/
|
||||
%define icondir %{_datadir}/icons/hicolor/128x128/apps
|
||||
|
||||
%define mainver 0.4.1
|
||||
%define mainver 0.5
|
||||
%undefine betaver
|
||||
%define svnver svn92_trunk
|
||||
%define fedorarel 16
|
||||
#%%define svnver svn92_trunk
|
||||
%define fedorarel 2
|
||||
|
||||
%define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver}
|
||||
|
||||
|
|
@ -24,8 +24,11 @@ Source0: %{srcurl}files/%{name}-%{mainver}%{?svnver:-%svnver}%{?betaver:%
|
|||
%if 0%{?fedora} >= 12
|
||||
Source11: wallpapoz-autostart.desktop
|
||||
%endif
|
||||
# Install daemon_wallpapoz wrapper script, which may
|
||||
# fix 584980, 597687?
|
||||
Source12: daemon_wallpapoz-wrapper
|
||||
# Misc fixes for daemon_wallpapoz under compiz working,
|
||||
# containing fix for bug 531342, 542244
|
||||
# containing fix for bug 531342, 542244, bug 567437, bug 573642
|
||||
Patch0: wallpapoz-0.4.1-rev92-compiz-respawn.patch
|
||||
# Check if selected item is really a directory when adding directory
|
||||
# bug 549219
|
||||
|
|
@ -35,11 +38,26 @@ Patch3: wallpapoz-0.4.1-rev92-noitem_selected.patch
|
|||
# Intialization for pasting selected items
|
||||
Patch4: wallpapoz-0.4.1-rev92-paste-initialization.patch
|
||||
# Kill daemon_wallpapoz when X resource is no longer available
|
||||
# bug 531343, 538533, 541434, 556377
|
||||
# bug 531343, 538533, 541434, 556377, 569135, 571827
|
||||
# (and bug 566594)
|
||||
Patch5: wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch
|
||||
# Kill other daemon_wallpapoz if running
|
||||
Patch6: wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
# Make wallpapoz gui handle animated image file
|
||||
# bug 602921
|
||||
Patch7: wallpapoz-0.4.1-rev92-animated-image.patch
|
||||
# Non-utf8 directory can return NoneType with filechooser_widget.get_filename
|
||||
# bug 603351
|
||||
Patch8: wallpapoz-0.4.1-rev92-nonutf8-directory.patch
|
||||
# Don't remove a wallpaper from a workspace if there is only one
|
||||
# wallpaper left.
|
||||
# bug 567136
|
||||
# Also some fixes about gtk menu sensitive issue (after doing some movement
|
||||
# for wallpapers)
|
||||
Patch9: wallpapoz-0.4.1-rev92-delete-one-wallpaper.patch
|
||||
# Fix backtrace when deleting first element in desktop (not workspace) mode
|
||||
# bug 597959
|
||||
Patch10: wallpapoz-0.4.1-rev92-delete-first-in-desktop-mode.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
|
|
@ -53,13 +71,11 @@ BuildRequires: gnome-python2
|
|||
%if 0%{?fedora} >= 10
|
||||
BuildRequires: gnome-python2-gnome
|
||||
%endif
|
||||
# Because wallpapoz uses gconftool-2 or so
|
||||
Requires: GConf2
|
||||
Requires: pygtk2-libglade
|
||||
Requires: python-imaging
|
||||
Requires: gnome-python2
|
||||
%if 0%{?fedora} >= 10
|
||||
Requires: gnome-python2-gnome
|
||||
%endif
|
||||
Requires: xorg-x11-utils
|
||||
Requires: %{_bindir}/kill
|
||||
Requires: %{_bindir}/pgrep
|
||||
|
|
@ -76,6 +92,23 @@ wallpapers for different workspaces or virtual desktops.
|
|||
%patch4 -p1 -b .patch_init
|
||||
%patch5 -p1 -b .kill_nox
|
||||
%patch6 -p1 -b .kill_multi
|
||||
%patch7 -p1 -b .anime
|
||||
%patch8 -p1 -b .nonutf8
|
||||
%patch9 -p1 -b .deletelastone
|
||||
%patch10 -p1 -b .deletefirst
|
||||
|
||||
# Umm... permission fix
|
||||
find . -type f -print0 | xargs -0 chmod 0644
|
||||
grep -rl --null '#!/usr/bin' . | xargs -0 chmod 0755
|
||||
|
||||
# For setup
|
||||
mkdir TMPBINDIR
|
||||
pushd TMPBINDIR
|
||||
ln -sf /bin/true xwininfo
|
||||
popd
|
||||
|
||||
# Install C gnome help documents (bug 651522)
|
||||
ln -sf c share/gnome/help/wallpapoz/C
|
||||
|
||||
%build
|
||||
|
||||
|
|
@ -83,6 +116,7 @@ wallpapers for different workspaces or virtual desktops.
|
|||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_prefix}
|
||||
|
||||
export PATH=$(pwd)/TMPBINDIR:$PATH
|
||||
%{__python} setup.py install --installdir=$RPM_BUILD_ROOT%{_prefix}
|
||||
|
||||
%{__sed} -i -e 's|%{name}\.png|%{name}|' \
|
||||
|
|
@ -95,12 +129,19 @@ desktop-file-install \
|
|||
|
||||
# Install desktop application autostart stuff
|
||||
%if 0%{?fedora} >= 12
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart
|
||||
%{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart
|
||||
desktop-file-install \
|
||||
--dir ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart \
|
||||
%{SOURCE11}
|
||||
%endif
|
||||
|
||||
# Install daemon_wallpapoz wrapper script
|
||||
pushd ${RPM_BUILD_ROOT}
|
||||
%{__mkdir_p} ./%{_libexecdir}
|
||||
%{__mv} ./%{_bindir}/daemon_wallpapoz ./%{_libexecdir}
|
||||
%{__install} -cp -m 0755 %{SOURCE12} ./%{_bindir}/daemon_wallpapoz
|
||||
popd
|
||||
|
||||
%{find_lang} %{name}
|
||||
|
||||
%clean
|
||||
|
|
@ -110,6 +151,7 @@ desktop-file-install \
|
|||
%defattr(-,root,root,-)
|
||||
%doc COPYING README
|
||||
%{_bindir}/*%{name}
|
||||
%{_libexecdir}/daemon_wallpapoz
|
||||
|
||||
%if 0%{?fedora} >= 12
|
||||
%{_sysconfdir}/xdg/autostart/wallpapoz-autostart.desktop
|
||||
|
|
@ -122,6 +164,49 @@ desktop-file-install \
|
|||
%{_datadir}/applications/fedora-%{name}.desktop
|
||||
|
||||
%changelog
|
||||
* Thu Dec 11 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.5-2
|
||||
- Install C gnome help documents correctly (bug 651522)
|
||||
|
||||
* Thu Oct 7 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.5-1
|
||||
- Update to 0.5
|
||||
|
||||
* Fri Jul 23 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp>
|
||||
- F-14: rebuild against python 2.7
|
||||
|
||||
* Tue Jun 15 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-24.svn92_trunk
|
||||
- Fix backtrace when deleting first element in desktop (not workspace) mode
|
||||
(bug 597959)
|
||||
- Install daemon_wallpapoz wrapper script to check if xprop really works before
|
||||
launching daemon (may fix 584980, 597687??)
|
||||
|
||||
* Sun Jun 13 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-23.svn92_trunk
|
||||
- Don't remove a wallpaper from workspace when only one wallpaper is left
|
||||
(bug 567136)
|
||||
- Also some fixes for gtk menu sensitive issue (after some movement for
|
||||
wallpapers)
|
||||
|
||||
* Sun Jun 13 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-22.svn92_trunk
|
||||
- Make wallpapoz gui ignore non-utf8 directory correctly
|
||||
(filechooser_widget.get_filename can return NoneType, bug 603351)
|
||||
|
||||
* Sat Jun 12 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-21.svn92_trunk
|
||||
- Make wallpapoz gui handle animated image file (bug 602921)
|
||||
|
||||
* Thu Mar 18 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-20.svn92_trunk
|
||||
- Handle another potentially race condition under compiz (may fix 573642)
|
||||
|
||||
* Wed Mar 10 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-19.svn92_trunk
|
||||
- Kill daemon_wallpapoz in more cases (may fix bug 571827)
|
||||
|
||||
* Mon Mar 1 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-18.svn92_trunk
|
||||
- -compiz-respawn.patch: simplify
|
||||
- Handle more cases where X is no longer available (bug 569135)
|
||||
- Handle fork() failure (bug 566594)
|
||||
|
||||
* Fri Feb 26 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-17.svn92_trunk
|
||||
- Another try for race condition on checking compiz status
|
||||
(bug 567437)
|
||||
|
||||
* Wed Feb 10 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-16.svn92_trunk
|
||||
- Don't update compiz status to fix race (bug 562943)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue