Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04dbb73f5c | ||
|
|
f6e4e0d4d4 | ||
|
|
0911fadbf5 |
26 changed files with 33 additions and 2393 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,5 +1 @@
|
|||
wallpapoz-0.4.1-svn92_trunk.tar.bz2
|
||||
/wallpapoz-0.5.tar.bz2
|
||||
/wallpapoz-0.6.1.tar.bz2
|
||||
/wallpapoz-0.6.2.tar.bz2
|
||||
/wallpapoz-0.6.2-builder.tar.bz2
|
||||
wallpapoz-0.4.1-svn87_trunk.tar.bz2
|
||||
|
|
|
|||
|
|
@ -1,82 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
which xprop &>/dev/null || exit 1
|
||||
sleep 2
|
||||
|
||||
TRIAL=0
|
||||
FOUND=0
|
||||
PROGNAME=$0
|
||||
while true ; do
|
||||
if test $TRIAL -ge 6 ; then
|
||||
echo "$PROGNAME: not lauching daemon_wallpapoz"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COMMAND="xprop -root _NET_NUMBER_OF_DESKTOPS 2>/dev/null"
|
||||
RESULT=$(eval "$COMMAND")
|
||||
RESULT=${RESULT:36}
|
||||
if ( (test -z "$RESULT" ) || ! (echo "$RESULT" | grep -q "^[0-9]" ) ) ; then
|
||||
# xprop failed
|
||||
echo "daemon_wallpapoz: $COMMAND failed at startup, retrying after 3 seconds..."
|
||||
TRIAL=$((TRIAL+1))
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
|
||||
COMMAND="xprop -root _NET_DESKTOP_GEOMETRY 2>/dev/null"
|
||||
RESULT=$(eval "$COMMAND")
|
||||
RESULT=${RESULT:34}
|
||||
WIDTH=$(echo $RESULT | sed -e 's|,.*$||')
|
||||
HEIGHT=$(echo $RESULT | sed -e 's|^.*,||' | sed -e 's|^[ \t][ \t]*||')
|
||||
if ( (test -z "$WIDTH" ) || ! (echo "$WIDTH" | grep -q "^[0-9]" ) ) ; then
|
||||
# xprop failed
|
||||
echo "daemon_wallpapoz: $COMMAND failed at startup, retrying after 3 seconds..."
|
||||
TRIAL=$((TRIAL+1))
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
if ( (test -z "$HEIGHT" ) || ! (echo "$HEIGHT" | grep -q "^[0-9]" ) ) ; then
|
||||
# xprop failed
|
||||
echo "daemon_wallpapoz: $COMMAND failed at startup, retrying after 3 seconds..."
|
||||
TRIAL=$((TRIAL+1))
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
|
||||
COMMAND="xprop -root _NET_DESKTOP_VIEWPORT 2>/dev/null"
|
||||
RESULT=$(eval "$COMMAND")
|
||||
RESULT=${RESULT:34}
|
||||
WIDTH=$(echo $RESULT | sed -e 's|,.*$||')
|
||||
HEIGHT=$(echo $RESULT | sed -e 's|^.*,||' | sed -e 's|^[ \t][ \t]*||')
|
||||
if ( (test -z "$WIDTH" ) || ! (echo "$WIDTH" | grep -q "^[0-9]" ) ) ; then
|
||||
# xprop failed
|
||||
echo "daemon_wallpapoz: $COMMAND failed at startup, retrying after 3 seconds..."
|
||||
TRIAL=$((TRIAL+1))
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
if ( (test -z "$HEIGHT" ) || ! (echo "$HEIGHT" | grep -q "^[0-9]" ) ) ; then
|
||||
# xprop failed
|
||||
echo "daemon_wallpapoz: $COMMAND failed at startup, retrying after 3 seconds..."
|
||||
TRIAL=$((TRIAL+1))
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
|
||||
COMMAND="xprop -root _NET_CURRENT_DESKTOP 2>/dev/null"
|
||||
RESULT=$(eval "$COMMAND")
|
||||
RESULT=${RESULT:33}
|
||||
if ( (test -z "$RESULT" ) || ! (echo "$RESULT" | grep -q "^[0-9]" ) ) ; then
|
||||
# xprop failed
|
||||
echo "daemon_wallpapoz: $COMMAND failed at startup, retrying after 3 seconds..."
|
||||
TRIAL=$((TRIAL+1))
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
|
||||
# succeeded
|
||||
break
|
||||
done
|
||||
|
||||
exec /usr/libexec/daemon_wallpapoz "$@"
|
||||
exit 1
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (wallpapoz-0.6.2.tar.bz2) = 36ed198ba72e08f33ed92dca173f41eb7e7d307366ad42b7cfac2659511f42980351eeb4c02f155469fdf75be79fad37d77bb02118ad91f39da22dae5246860b
|
||||
dcdc89bee9b1e35e000f99f104a39774 wallpapoz-0.4.1-svn87_trunk.tar.bz2
|
||||
|
|
|
|||
|
|
@ -1,107 +0,0 @@
|
|||
--- 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,15 +0,0 @@
|
|||
--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.noselect 2010-02-08 02:51:56.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-02-08 03:57:03.000000000 +0900
|
||||
@@ -213,6 +213,12 @@
|
||||
# how many of selection do we have
|
||||
length_of_path_list = len(pathlist)
|
||||
|
||||
+ # Well, it seems that in some cases no item is selected...
|
||||
+ # (RedHat bug 555181)
|
||||
+ if (not pathlist) or (not length_of_path_list) :
|
||||
+ # simply ignore
|
||||
+ return None
|
||||
+
|
||||
# add wallpapers, paste operation
|
||||
# multiple selection are okay as long as in one workspace, parent and child node togeter are okay, these multiple selection
|
||||
if type_selection == "wallpaper" or type_selection == "paste":
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
--- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.paste_init 2010-02-08 04:32:34.000000000 +0900
|
||||
+++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz 2010-02-08 04:21:17.000000000 +0900
|
||||
@@ -94,6 +94,9 @@
|
||||
# create the pop up menu when we right click the treeview widget
|
||||
self.set_up_popup_menu()
|
||||
|
||||
+ # initially no item is pasted
|
||||
+ self.selected_iter = None
|
||||
+
|
||||
# our signal and who handle that signal
|
||||
dic = { "on_wallpapoz_window_destroy" : self.destroy,
|
||||
"on_treeview_cursor_changed" : self.treeview_selection_changed,
|
||||
@@ -903,6 +906,9 @@
|
||||
|
||||
if position_iter == None:
|
||||
return
|
||||
+ # At first self.selected_iter is None
|
||||
+ if not self.selected_iter:
|
||||
+ return
|
||||
|
||||
# check first. User can not cut all wallpapers in workspace. Every workspace must have at least one wallpaper
|
||||
temp_iter_list = []
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
--- wallpapoz-0.5/src/wallpapoz.startupwarn 2011-05-06 00:21:06.000000000 +0900
|
||||
+++ wallpapoz-0.5/src/wallpapoz 2011-05-06 15:41:58.000000000 +0900
|
||||
@@ -1296,9 +1296,14 @@
|
||||
|
||||
filename = self.store.get_value(position_iter, 1)
|
||||
|
||||
- # display image properly
|
||||
- from glib import GError as glib_GError
|
||||
- try:
|
||||
+ # display image properly, when cursor actually points to the contents of
|
||||
+ # files' list (i.e. not pointing to desktop name)
|
||||
+ if ( (type(self.store) == gtk.TreeStore) and
|
||||
+ ( parent == None ) ):
|
||||
+ self.image_widget.clear()
|
||||
+ else:
|
||||
+ from glib import GError as glib_GError
|
||||
+ try:
|
||||
anime = gtk.gdk.PixbufAnimation(filename)
|
||||
|
||||
if anime.is_static_image() :
|
||||
@@ -1318,9 +1323,9 @@
|
||||
else:
|
||||
self.image_widget.set_from_pixbuf(static_im.scale_simple(int((float(width)/height)*300),300,gtk.gdk.INTERP_BILINEAR))
|
||||
|
||||
- except IOError:
|
||||
+ except IOError:
|
||||
self.image_widget.clear()
|
||||
- except glib_GError, (msg):
|
||||
+ except glib_GError, (msg):
|
||||
print msg
|
||||
self.image_widget.clear()
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
--- wallpapoz-0.6.1/src/wallpapoz.anime 2011-12-30 14:53:04.000000000 +0900
|
||||
+++ wallpapoz-0.6.1/src/wallpapoz 2011-12-30 15:02:40.000000000 +0900
|
||||
@@ -1228,15 +1228,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,18 +0,0 @@
|
|||
--- wallpapoz-0.6.1/src/wallpapoz.deletefirst 2011-12-30 15:35:31.000000000 +0900
|
||||
+++ wallpapoz-0.6.1/src/wallpapoz 2011-12-30 15:38:56.000000000 +0900
|
||||
@@ -1062,13 +1062,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:
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
--- wallpapoz-0.6.1/src/wallpapoz.deletelastone 2011-12-30 15:20:41.000000000 +0900
|
||||
+++ wallpapoz-0.6.1/src/wallpapoz 2011-12-30 15:29:05.000000000 +0900
|
||||
@@ -832,6 +832,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
|
||||
|
||||
@@ -898,8 +908,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
|
||||
|
||||
@@ -975,6 +993,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:
|
||||
|
||||
@@ -985,6 +1008,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
|
||||
@@ -1201,6 +1227,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
|
||||
@@ -1216,8 +1258,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,84 +0,0 @@
|
|||
--- wallpapoz-0.6.1/src/wallpapoz.dircheck 2011-07-24 00:54:43.000000000 +0900
|
||||
+++ wallpapoz-0.6.1/src/wallpapoz 2011-12-30 14:28:16.000000000 +0900
|
||||
@@ -536,6 +536,9 @@
|
||||
# if recursive, we use walktree
|
||||
if recursive_widget.get_active():
|
||||
# looping with walktree method
|
||||
+ if not os.path.isdir(cur_dir):
|
||||
+ return
|
||||
+
|
||||
for (basepath, children) in self.walktree(cur_dir,False):
|
||||
for child in children:
|
||||
# get the filename
|
||||
@@ -551,7 +554,11 @@
|
||||
# if not just looping the directory with ordinary fashion
|
||||
else:
|
||||
# looping all files in this directory
|
||||
- for file in os.listdir(cur_dir):
|
||||
+ try:
|
||||
+ dlist = os.listdir(cur_dir)
|
||||
+ except OSError:
|
||||
+ return
|
||||
+ for file in dlist:
|
||||
# get the filename
|
||||
filename = os.path.join(cur_dir, file)
|
||||
# we interested in file, not directory
|
||||
@@ -573,6 +580,9 @@
|
||||
# if recursive, we use walktree
|
||||
if recursive_widget.get_active():
|
||||
# looping with walktree method
|
||||
+ if not os.path.isdir(cur_dir):
|
||||
+ return
|
||||
+
|
||||
for (basepath, children) in self.walktree(cur_dir,False):
|
||||
for child in children:
|
||||
# get the filename
|
||||
@@ -588,7 +598,11 @@
|
||||
# if not, just looping with ordinary fashion
|
||||
else:
|
||||
# looping all files in this directory
|
||||
- for file in os.listdir(cur_dir):
|
||||
+ try:
|
||||
+ ddir = os.listdir(cur_dir)
|
||||
+ except OSError:
|
||||
+ return
|
||||
+ for file in ddir:
|
||||
# get the filename
|
||||
filename = os.path.join(cur_dir, file)
|
||||
# we interested in file, not directory
|
||||
@@ -618,6 +632,9 @@
|
||||
cur_dir = filechooser_widget.get_filename()
|
||||
# if recursive, we use walktree
|
||||
if recursive_widget.get_active():
|
||||
+ if not os.path.isdir(cur_dir):
|
||||
+ return
|
||||
+
|
||||
# looping with walktree method
|
||||
for (basepath, children) in self.walktree(cur_dir,False):
|
||||
for child in children:
|
||||
@@ -634,7 +651,11 @@
|
||||
# if not recursive, just looping the directory with ordinary fashion
|
||||
else:
|
||||
# looping all files in this directory
|
||||
- for file in os.listdir(cur_dir):
|
||||
+ try:
|
||||
+ dlist = os.listdir(cur_dir)
|
||||
+ except OSError:
|
||||
+ return
|
||||
+ for file in dlist:
|
||||
# get the filename
|
||||
filename = os.path.join(cur_dir, file)
|
||||
# we interested in file, not directory
|
||||
@@ -1210,7 +1231,11 @@
|
||||
|
||||
# helping method
|
||||
def walktree (self, top = ".", depthfirst = True):
|
||||
- names = os.listdir(top)
|
||||
+ try:
|
||||
+ names = os.listdir(top)
|
||||
+ except OSError:
|
||||
+ names = []
|
||||
+ yield top, names
|
||||
if not depthfirst:
|
||||
yield top, names
|
||||
for name in names:
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
--- wallpapoz-0.6.1/share/wallpapoz/lib/wallpapoz_system.py.kill_multi 2011-12-30 14:49:25.000000000 +0900
|
||||
+++ wallpapoz-0.6.1/share/wallpapoz/lib/wallpapoz_system.py 2011-12-30 14:49:25.000000000 +0900
|
||||
@@ -180,3 +180,17 @@
|
||||
print "os.execvp failed, exiting..."
|
||||
sys.exit(1)
|
||||
|
||||
+ def prevent_multiple_start(self):
|
||||
+ cpid = os.getpid()
|
||||
+ cid = os.getuid()
|
||||
+
|
||||
+ wallpapoz_cmd = "pgrep -U %i -f daemon_wallpapoz" %cid
|
||||
+ python_cmd = "pgrep -U %i -f python" %cid
|
||||
+
|
||||
+ wallpapoz_id_list = os.popen(wallpapoz_cmd).read().splitlines()
|
||||
+ python_id_list = os.popen(python_cmd).read().splitlines()
|
||||
+
|
||||
+ for id_list in wallpapoz_id_list:
|
||||
+ if ( id_list in python_id_list ) and ( int(id_list) != cpid) :
|
||||
+ os.kill(int(id_list), signal.SIGTERM)
|
||||
+
|
||||
--- wallpapoz-0.6.1/src/daemon_wallpapoz.kill_multi 2011-12-30 14:49:25.000000000 +0900
|
||||
+++ wallpapoz-0.6.1/src/daemon_wallpapoz 2011-12-30 14:52:08.000000000 +0900
|
||||
@@ -99,6 +99,9 @@
|
||||
# by calling external program
|
||||
wallpapoz_system = WallpapozSystem()
|
||||
|
||||
+ # Kill other daemon_wallpapoz if running
|
||||
+ wallpapoz_system.prevent_multiple_start()
|
||||
+
|
||||
# type of window manager (gnome or xfce)
|
||||
window_manager = wallpapoz_system.window_manager
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
--- wallpapoz-0.6.1/src/wallpapoz.nonutf8 2011-12-30 15:13:57.000000000 +0900
|
||||
+++ wallpapoz-0.6.1/src/wallpapoz 2011-12-30 15:19:28.000000000 +0900
|
||||
@@ -542,6 +542,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
|
||||
@@ -586,6 +589,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
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
--- wallpapoz-0.6.1/src/wallpapoz.workspace_num_incr 2012-01-18 10:05:16.361577377 +0900
|
||||
+++ wallpapoz-0.6.1/src/wallpapoz 2012-01-18 10:09:45.651470988 +0900
|
||||
@@ -722,12 +722,17 @@
|
||||
# make the wallpaper list
|
||||
wallpapoz_system = WallpapozSystem()
|
||||
workspace_num = wallpapoz_system.get_total_workspaces()
|
||||
+ ii = 0
|
||||
for i in range(workspace_num):
|
||||
- parent = self.store.append(None, [i+1, worklist[i].pop(0), True])
|
||||
+ if (ii >= len(worklist)):
|
||||
+ ii = 0
|
||||
+ tmplist = list(worklist[ii])
|
||||
+ parent = self.store.append(None, [i+1, tmplist.pop(0), True])
|
||||
j = 1
|
||||
- for wallpaper in worklist[i]:
|
||||
+ for wallpaper in tmplist:
|
||||
self.store.append(parent, [j, wallpaper, False])
|
||||
j = j + 1
|
||||
+ ii = ii + 1
|
||||
|
||||
# enable rename workspace menu
|
||||
self.main_window.get_widget("rename_workspace").set_sensitive(True)
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
--- wallpapoz-0.6.1/share/wallpapoz/lib/wallpapoz_system.py.respawn 2011-10-16 23:40:03.000000000 +0900
|
||||
+++ wallpapoz-0.6.1/share/wallpapoz/lib/wallpapoz_system.py 2011-12-30 16:07:01.000000000 +0900
|
||||
@@ -25,15 +25,27 @@
|
||||
# achieve goal by calling external program
|
||||
|
||||
import os
|
||||
+import sys
|
||||
import string
|
||||
|
||||
class WallpapozSystem:
|
||||
|
||||
+ # Define static variable to save the initial value of
|
||||
+ # workspaces
|
||||
+ static_finding_total_workspaces_called_p = False
|
||||
+ static_total_workspaces = 0
|
||||
+
|
||||
def __init__(self):
|
||||
self.finding_screen_resolution()
|
||||
self.finding_total_workspaces()
|
||||
self.finding_desktop_environment()
|
||||
|
||||
+ # 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
|
||||
|
||||
@@ -69,6 +81,11 @@
|
||||
def finding_total_workspaces(self):
|
||||
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 how many rows and columns of workspaces
|
||||
def finding_row_and_column(self):
|
||||
self.row_workspaces = self.geometry_height / self.screen_height
|
||||
@@ -117,3 +134,11 @@
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
+
|
||||
+ def respawn_system(self):
|
||||
+ new_argv = []
|
||||
+ new_argv.extend(sys.argv)
|
||||
+ os.execvp('daemon_wallpapoz', new_argv)
|
||||
+ print "os.execvp failed, exiting..."
|
||||
+ sys.exit(1)
|
||||
+
|
||||
--- wallpapoz-0.6.1/src/daemon_wallpapoz.respawn 2011-07-24 00:54:43.000000000 +0900
|
||||
+++ wallpapoz-0.6.1/src/daemon_wallpapoz 2011-12-30 16:06:07.000000000 +0900
|
||||
@@ -145,11 +145,16 @@
|
||||
if wallpapozxml.get_type() == "workspace":
|
||||
while True:
|
||||
# don't get rush
|
||||
- time.sleep(1)
|
||||
+ # sleep a bit more
|
||||
+ time.sleep(2)
|
||||
|
||||
# what workspace we are in now?
|
||||
cur_desk = wallpapoz_system.current_desktop()
|
||||
|
||||
+ if cur_desk >= wallpapoz_system.get_total_workspaces():
|
||||
+ # ignore
|
||||
+ continue
|
||||
+
|
||||
# requirement for changing wallpaper
|
||||
# 1. we change workspace
|
||||
# 2. index of wallpaper list change
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
--- a/share/wallpapoz/lib/wallpapoz_system.py
|
||||
+++ b/share/wallpapoz/lib/wallpapoz_system.py
|
||||
@@ -117,6 +117,8 @@ class WallpapozSystem:
|
||||
self.window_manager = 'XFCE4'
|
||||
elif wm_name=='Marco':
|
||||
self.window_manager = 'MATE'
|
||||
+ elif wm_name=='Mutter (Muffin)':
|
||||
+ self.window_manager = 'CINNAMON'
|
||||
else:
|
||||
try:
|
||||
output = os.popen("gnome-session --version")
|
||||
@@ -166,6 +168,9 @@ class WallpapozSystem:
|
||||
elif self.window_manager == "MATE":
|
||||
os.system('gsettings set org.mate.background picture-filename ' + '"' + wallpaper + '"')
|
||||
os.system('gsettings set org.mate.background picture-options ' + self.wallpaper_style)
|
||||
+ elif self.window_manager == "CINNAMON":
|
||||
+ os.system("gsettings set org.cinnamon.desktop.background picture-uri 'file://" + wallpaper + "'")
|
||||
+ os.system("gsettings set org.cinnamon.desktop.background picture-options " + self.wallpaper_style)
|
||||
elif self.window_manager == "XFCE4":
|
||||
os.system("xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s " +
|
||||
'"' + wallpaper + '"')
|
||||
@@ -183,6 +188,8 @@ class WallpapozSystem:
|
||||
return os.popen("gsettings get org.gnome.desktop.background picture-uri").read()[8:-2]
|
||||
elif self.window_manager == "MATE":
|
||||
return os.popen("gsettings get org.mate.background picture-filename").read()[:-1]
|
||||
+ elif self.window_manager == "CINNAMON":
|
||||
+ return os.popen("gsettings get org.cinnamon.desktop.background picture-uri").read()[8:-2]
|
||||
elif self.window_manager == "XFCE4":
|
||||
return os.popen("xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path").read()[:-1]
|
||||
else:
|
||||
--- a/src/daemon_wallpapoz
|
||||
+++ b/src/daemon_wallpapoz
|
||||
@@ -112,6 +112,7 @@ if __name__ == "__main__":
|
||||
available_style['Gnome'] = { '3' : 'zoom', '2' : 'scaled', '1' : 'stretched',
|
||||
'0' : 'centered', '4' : 'wallpaper' }
|
||||
available_style['MATE'] = available_style['Gnome']
|
||||
+ available_style['CINNAMON'] = available_style['Gnome']
|
||||
available_style['Gnome3'] = available_style['Gnome']
|
||||
available_style['XFCE4'] = { '3' : '5', '2' : '4', '1' : '3', '0' : '1',
|
||||
'4' : '2' }
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
--- wallpapoz-0.6.2/share/wallpapoz/lib/wallpapoz_system.py.LXDE 2013-01-19 21:34:04.000000000 +0900
|
||||
+++ wallpapoz-0.6.2/share/wallpapoz/lib/wallpapoz_system.py 2013-01-19 22:10:23.000000000 +0900
|
||||
@@ -105,6 +105,14 @@
|
||||
wm_name = raw_wm_name[29:raw_wm_name.rfind('"')]
|
||||
# default is Gnome3.
|
||||
self.window_manager = 'Gnome3'
|
||||
+ if wm_name == 'Openbox':
|
||||
+ try:
|
||||
+ env = os.environ['XDG_CURRENT_DESKTOP']
|
||||
+ if env == 'LXDE':
|
||||
+ self.window_manager = 'LXDE'
|
||||
+ return
|
||||
+ except:
|
||||
+ pass
|
||||
if wm_name=='Xfwm4':
|
||||
self.window_manager = 'XFCE4'
|
||||
else:
|
||||
@@ -158,6 +166,9 @@
|
||||
'"' + wallpaper + '"')
|
||||
os.system("xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-style -s " +
|
||||
self.wallpaper_style)
|
||||
+ elif self.window_manager == "LXDE":
|
||||
+ os.system("pcmanfm -w " + '"' + wallpaper + '"')
|
||||
+ os.system("pcmanfm --wallpaper-mode=" + self.wallpaper_style)
|
||||
|
||||
## class method to find current desktop wallpaper
|
||||
def finding_current_wallpaper(self):
|
||||
@@ -167,6 +178,8 @@
|
||||
return os.popen("gsettings get org.gnome.desktop.background picture-uri").read()[8:-2]
|
||||
elif self.window_manager == "XFCE4":
|
||||
return os.popen("xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path").read()[:-1]
|
||||
+ else:
|
||||
+ return ""
|
||||
|
||||
## class method to detect that we have changed workspace or not
|
||||
def has_changed(self, previous_desktop, cur_desk):
|
||||
--- wallpapoz-0.6.2/src/daemon_wallpapoz.LXDE 2013-01-19 21:34:04.000000000 +0900
|
||||
+++ wallpapoz-0.6.2/src/daemon_wallpapoz 2013-01-19 22:15:01.000000000 +0900
|
||||
@@ -114,6 +114,8 @@
|
||||
available_style['Gnome3'] = available_style['Gnome']
|
||||
available_style['XFCE4'] = { '3' : '5', '2' : '4', '1' : '3', '0' : '1',
|
||||
'4' : '2' }
|
||||
+ available_style['LXDE'] = {'0': 'center', '1' : 'stretch', '2' : 'fit',
|
||||
+ '3': 'fit', '4': 'tile'}
|
||||
style = available_style[window_manager][wallpapozxml.style()]
|
||||
wallpapoz_system.set_style(style)
|
||||
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
--- a/share/wallpapoz/lib/wallpapoz_system.py
|
||||
+++ b/share/wallpapoz/lib/wallpapoz_system.py
|
||||
@@ -115,6 +115,8 @@ class WallpapozSystem:
|
||||
pass
|
||||
if wm_name=='Xfwm4':
|
||||
self.window_manager = 'XFCE4'
|
||||
+ elif wm_name=='Marco':
|
||||
+ self.window_manager = 'MATE'
|
||||
else:
|
||||
try:
|
||||
output = os.popen("gnome-session --version")
|
||||
@@ -161,6 +163,9 @@ class WallpapozSystem:
|
||||
elif self.window_manager == "Gnome3":
|
||||
os.system("gsettings set org.gnome.desktop.background picture-uri 'file://" + wallpaper + "'")
|
||||
os.system("gsettings set org.gnome.desktop.background picture-options " + self.wallpaper_style)
|
||||
+ elif self.window_manager == "MATE":
|
||||
+ os.system('gsettings set org.mate.background picture-filename ' + '"' + wallpaper + '"')
|
||||
+ os.system('gsettings set org.mate.background picture-options ' + self.wallpaper_style)
|
||||
elif self.window_manager == "XFCE4":
|
||||
os.system("xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s " +
|
||||
'"' + wallpaper + '"')
|
||||
@@ -176,6 +181,8 @@ class WallpapozSystem:
|
||||
return os.popen("gconftool-2 -g /desktop/gnome/background/picture_filename").read()[:-1]
|
||||
elif self.window_manager == "Gnome3":
|
||||
return os.popen("gsettings get org.gnome.desktop.background picture-uri").read()[8:-2]
|
||||
+ elif self.window_manager == "MATE":
|
||||
+ return os.popen("gsettings get org.mate.background picture-filename").read()[:-1]
|
||||
elif self.window_manager == "XFCE4":
|
||||
return os.popen("xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path").read()[:-1]
|
||||
else:
|
||||
--- a/src/daemon_wallpapoz
|
||||
+++ b/src/daemon_wallpapoz
|
||||
@@ -111,6 +111,7 @@ if __name__ == "__main__":
|
||||
available_style = {}
|
||||
available_style['Gnome'] = { '3' : 'zoom', '2' : 'scaled', '1' : 'stretched',
|
||||
'0' : 'centered', '4' : 'wallpaper' }
|
||||
+ available_style['MATE'] = available_style['Gnome']
|
||||
available_style['Gnome3'] = available_style['Gnome']
|
||||
available_style['XFCE4'] = { '3' : '5', '2' : '4', '1' : '3', '0' : '1',
|
||||
'4' : '2' }
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
diff -ruN wallpapoz-0.6.2.orig/setup.py wallpapoz-0.6.2/setup.py
|
||||
--- wallpapoz-0.6.2.orig/setup.py 2013-01-14 15:56:24.058172106 -0500
|
||||
+++ wallpapoz-0.6.2/setup.py 2013-01-14 15:57:08.902128603 -0500
|
||||
@@ -123,7 +123,7 @@
|
||||
print " !!! Python Glade ............. ", _("Not found")
|
||||
required_found = False
|
||||
try:
|
||||
- import Image
|
||||
+ from PIL import Image
|
||||
print " Python Imaging Library ....... OK"
|
||||
except ImportError:
|
||||
print " !!! Python Imaging Library ... ", _("Not found")
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz wallpapoz-0.6.2/src/wallpapoz
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz 2013-01-14 15:56:24.058172106 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz 2013-01-14 16:00:16.960947005 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz.anime wallpapoz-0.6.2/src/wallpapoz.anime
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz.anime 2013-01-14 15:56:24.058172106 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz.anime 2013-01-14 15:58:53.632027371 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz.deletefirst wallpapoz-0.6.2/src/wallpapoz.deletefirst
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz.deletefirst 2013-01-14 15:56:24.058172106 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz.deletefirst 2013-01-14 15:59:32.240990119 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz.deletelastone wallpapoz-0.6.2/src/wallpapoz.deletelastone
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz.deletelastone 2013-01-14 15:56:24.058172106 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz.deletelastone 2013-01-14 15:59:20.417001528 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz.dircheck wallpapoz-0.6.2/src/wallpapoz.dircheck
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz.dircheck 2013-01-14 15:56:24.057172107 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz.dircheck 2013-01-14 15:57:32.238106009 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz.noitem wallpapoz-0.6.2/src/wallpapoz.noitem
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz.noitem 2013-01-14 15:56:24.057172107 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz.noitem 2013-01-14 15:57:47.354091394 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz.nonutf8 wallpapoz-0.6.2/src/wallpapoz.nonutf8
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz.nonutf8 2013-01-14 15:56:24.058172106 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz.nonutf8 2013-01-14 15:59:04.928016478 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz.patch_init wallpapoz-0.6.2/src/wallpapoz.patch_init
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz.patch_init 2013-01-14 15:56:24.057172107 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz.patch_init 2013-01-14 15:58:33.808046499 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz.workspace_img wallpapoz-0.6.2/src/wallpapoz.workspace_img
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz.workspace_img 2013-01-14 15:56:24.058172106 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz.workspace_img 2013-01-14 15:59:54.968968202 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
diff -ruN wallpapoz-0.6.2.orig/src/wallpapoz.workspace_num_incr wallpapoz-0.6.2/src/wallpapoz.workspace_num_incr
|
||||
--- wallpapoz-0.6.2.orig/src/wallpapoz.workspace_num_incr 2013-01-14 15:56:24.058172106 -0500
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz.workspace_num_incr 2013-01-14 16:00:08.673954992 -0500
|
||||
@@ -35,7 +35,7 @@
|
||||
import sys
|
||||
import stat
|
||||
import gettext
|
||||
-import Image
|
||||
+from PIL import Image
|
||||
|
||||
try:
|
||||
import gnome
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
--- wallpapoz-0.6.2/share/wallpapoz/lib/wallpapoz_system.py.kill_nox 2012-03-06 11:59:53.171834985 +0900
|
||||
+++ wallpapoz-0.6.2/share/wallpapoz/lib/wallpapoz_system.py 2012-03-06 14:02:32.087891881 +0900
|
||||
@@ -24,9 +24,11 @@
|
||||
## wallpapoz_system.py -- finds current desktop and changes wallpaper
|
||||
# achieve goal by calling external program
|
||||
|
||||
+import subprocess
|
||||
import os
|
||||
import sys
|
||||
import string
|
||||
+import signal
|
||||
|
||||
class WallpapozSystem:
|
||||
|
||||
@@ -46,12 +48,48 @@
|
||||
print "daemon_wallpapoz: respawning daemon_wallpapoz."
|
||||
self.respawn_system()
|
||||
|
||||
+ 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()
|
||||
+
|
||||
+ kill_daemon = False
|
||||
+
|
||||
+ 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 (cmd.find('xprop') >= 0) and (pstdout.find('not') >= 0):
|
||||
+ kill_daemon = True
|
||||
+
|
||||
+ if kill_daemon:
|
||||
+ ## No X resource available, kill daemon_wallpapoz
|
||||
+ print "daemon_wallpapoz: X resource seems no longer available."
|
||||
+ print "daemon_wallpapoz: killing daemon_wallpapoz."
|
||||
+ sys.exit(1)
|
||||
+
|
||||
+ return pstdout
|
||||
+
|
||||
def set_style(self, style):
|
||||
self.wallpaper_style = style
|
||||
|
||||
## class method to find monitor resolution
|
||||
def finding_screen_resolution(self):
|
||||
- raw_resolution = os.popen('xwininfo -root').read()
|
||||
+ 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')
|
||||
@@ -61,9 +99,9 @@
|
||||
|
||||
## class method to find which desktop environment user uses
|
||||
def finding_desktop_environment(self):
|
||||
- raw_window_id = os.popen('xprop -root _NET_SUPPORTING_WM_CHECK').read()
|
||||
+ raw_window_id = self.exec_cmd_under_X('xprop -root _NET_SUPPORTING_WM_CHECK')
|
||||
window_id = raw_window_id[46:raw_window_id.find("\n")]
|
||||
- raw_wm_name = os.popen('xprop -id ' + window_id + ' 8s _NET_WM_NAME').read()
|
||||
+ raw_wm_name = self.exec_cmd_under_X('xprop -id ' + window_id + ' 8s _NET_WM_NAME')
|
||||
wm_name = raw_wm_name[29:raw_wm_name.rfind('"')]
|
||||
# default is Gnome3.
|
||||
self.window_manager = 'Gnome3'
|
||||
@@ -80,7 +118,7 @@
|
||||
|
||||
## class method to find amount of workspaces in user desktop
|
||||
def finding_total_workspaces(self):
|
||||
- self.total_workspaces = int(os.popen("xprop -root _NET_NUMBER_OF_DESKTOPS").read()[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:
|
||||
@@ -98,7 +136,7 @@
|
||||
|
||||
## class method to know what workspace we are in now
|
||||
def current_desktop(self):
|
||||
- raw_workspace = os.popen('xprop -root _NET_CURRENT_DESKTOP').read()
|
||||
+ raw_workspace = self.exec_cmd_under_X('xprop -root _NET_CURRENT_DESKTOP')
|
||||
workspace = int(raw_workspace[33] + raw_workspace[34])
|
||||
return workspace
|
||||
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
--- wallpapoz-0.6.2/src/wallpapoz.py3.01 2019-11-25 15:36:39.502763400 +0900
|
||||
+++ wallpapoz-0.6.2/src/wallpapoz 2019-11-28 13:16:27.404156561 +0900
|
||||
@@ -220,7 +220,7 @@
|
||||
def get_selected_iter_of_treeview(self, type_selection):
|
||||
|
||||
# treeselection give 2-tuple.... ( model, path )
|
||||
- pathlist = self.treeselection.get_selected_rows()[1]
|
||||
+ model, pathlist = self.treeselection.get_selected_rows()
|
||||
|
||||
# how many of selection do we have
|
||||
length_of_path_list = len(pathlist)
|
||||
@@ -883,7 +883,14 @@
|
||||
for copy_iter in copy_iter_list:
|
||||
|
||||
# get the parent and child number
|
||||
- copy_iter_parent_number, copy_iter_child_number = self.store.get_path(copy_iter)
|
||||
+ if type(self.store) == gtk.TreeStore:
|
||||
+ copy_iter_parent_number, copy_iter_child_number = self.store.get_path(copy_iter)
|
||||
+ elif type(self.store) == gtk.ListStore:
|
||||
+ # "desktop" type xml, workaround
|
||||
+ copy_iter_child_number = self.store.get_path(copy_iter)[0]
|
||||
+ copy_iter_parent_number = 0
|
||||
+ else:
|
||||
+ raise
|
||||
|
||||
# we are in new workspace
|
||||
if copy_iter_parent_number != parent_number_index:
|
||||
@@ -931,7 +938,11 @@
|
||||
# it is not in the same block but still in the same workspace
|
||||
else:
|
||||
|
||||
- lowest_iter_list.append(
|
||||
+ if type(self.store) == gtk.ListStore:
|
||||
+ lowest_iter_list.append(
|
||||
+ self.store.get_iter(iter_workspace_index+1))
|
||||
+ else:
|
||||
+ lowest_iter_list.append(
|
||||
self.store.get_iter( (copy_iter_parent_number, iter_workspace_index+1) ) )
|
||||
|
||||
done_workspace = True
|
||||
@@ -943,8 +954,13 @@
|
||||
# a wallpaper from a workspace, if only one wallpaper existed.
|
||||
# Need further investigation, however anyway workaround...
|
||||
new_iter = []
|
||||
+ if type(self.store) == gtk.ListStore:
|
||||
+ parent_number_index = 0
|
||||
try:
|
||||
- new_iter = self.store.get_iter((parent_number_index, iter_workspace_index + 1))
|
||||
+ if type(self.store) == gtk.ListStore:
|
||||
+ new_iter = self.store.get_iter(iter_workspace_index + 1)
|
||||
+ else:
|
||||
+ new_iter = self.store.get_iter((parent_number_index, iter_workspace_index + 1))
|
||||
except ValueError:
|
||||
pass
|
||||
if new_iter:
|
||||
@@ -970,8 +986,8 @@
|
||||
if self.store.get_path(single_iter)[0] != parent_number:
|
||||
temp_iter_list = []
|
||||
parent_number = self.store.get_path(single_iter)[0]
|
||||
- temp_iter_list.append(single_iter)
|
||||
- prev_iter = single_iter
|
||||
+ temp_iter_list.append(single_iter)
|
||||
+ prev_iter = single_iter
|
||||
|
||||
# do the remaining job
|
||||
if self.store.iter_n_children( self.store.iter_parent(prev_iter) ) == len(temp_iter_list) and self.work_on_tree == "cut":
|
||||
@@ -986,11 +1002,17 @@
|
||||
# if type(self.store) == gtk.TreeStore:
|
||||
parent = self.store.iter_parent(position_iter)
|
||||
new_index = self.store.get_value(position_iter, 0) + 1
|
||||
- # if it is child node
|
||||
- if parent != None:
|
||||
+
|
||||
+ # if it is child node in "workspace" xml or "desktop" type xml
|
||||
+ if (type(self.store) == gtk.ListStore) or (parent != None):
|
||||
for single_iter in self.selected_iter:
|
||||
node_value = self.store.get_value(single_iter, 1)
|
||||
- position_iter = self.store.insert_after(parent, position_iter, [new_index, node_value, False])
|
||||
+ if type(self.store) == gtk.ListStore:
|
||||
+ # desktop type
|
||||
+ position_iter = self.store.insert_after(position_iter, [new_index, node_value, False])
|
||||
+ else:
|
||||
+ # child node in workspace xml
|
||||
+ position_iter = self.store.insert_after(parent, position_iter, [new_index, node_value, False])
|
||||
new_index = new_index + 1
|
||||
|
||||
# after inserting new row, we must sort out the index number after it
|
||||
@@ -1108,6 +1130,7 @@
|
||||
self.order_treeiter_from_lowest_iter(lowest_iter)
|
||||
|
||||
# select something after deleting treenodes
|
||||
+ self.treeselection.unselect_all()
|
||||
self.treeselection.select_path(0)
|
||||
|
||||
# create configuration file ( we call this method when we click save button )
|
||||
@@ -1274,6 +1297,18 @@
|
||||
# Nothing left
|
||||
return
|
||||
|
||||
+ if type(self.store) == gtk.ListStore:
|
||||
+ #self.builder.get_object("rename_workspace").set_sensitive(False)
|
||||
+ #self.rename_workspace_menu.set_sensitive(False)
|
||||
+ self.builder.get_object("change_wallpaper").set_sensitive(True)
|
||||
+ self.change_wallpaper_menu.set_sensitive(True)
|
||||
+ self.builder.get_object("cut").set_sensitive(True)
|
||||
+ self.cut_menu.set_sensitive(True)
|
||||
+ self.builder.get_object("copy").set_sensitive(True)
|
||||
+ self.copy_menu.set_sensitive(True)
|
||||
+ self.builder.get_object("delete_wallpapers").set_sensitive(True)
|
||||
+ self.delete_wallpapers_menu.set_sensitive(True)
|
||||
+
|
||||
if type(self.store) == gtk.TreeStore:
|
||||
parent = self.store.iter_parent(position_iter)
|
||||
# parent node, enable: rename_workspace
|
||||
|
|
@ -1,786 +0,0 @@
|
|||
diff -urp wallpapoz-0.6.2.py2/setup.py wallpapoz-0.6.2.py3/setup.py
|
||||
--- wallpapoz-0.6.2.py2/setup.py 2019-09-02 14:04:36.124389528 +0900
|
||||
+++ wallpapoz-0.6.2.py3/setup.py 2019-09-02 14:50:57.162142691 +0900
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python2
|
||||
+#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#=============================================================================
|
||||
@@ -62,7 +62,7 @@ Options:
|
||||
""")
|
||||
|
||||
def info():
|
||||
- print usage_info
|
||||
+ print (usage_info)
|
||||
sys.exit(1)
|
||||
|
||||
def install(src, dst):
|
||||
@@ -73,9 +73,9 @@ def install(src, dst):
|
||||
if not os.path.isdir(os.path.dirname(dst)):
|
||||
os.makedirs(os.path.dirname(dst))
|
||||
shutil.copy2(src, dst)
|
||||
- print _("Installed"), dst
|
||||
+ print (_("Installed"), dst)
|
||||
except:
|
||||
- print _("Error while installing"), dst
|
||||
+ print (_("Error while installing"), dst)
|
||||
|
||||
def uninstall(path):
|
||||
try:
|
||||
@@ -86,71 +86,75 @@ def uninstall(path):
|
||||
shutil.rmtree(path)
|
||||
else:
|
||||
return
|
||||
- print _("Removed"), path
|
||||
+ print (_("Removed"), path)
|
||||
except:
|
||||
- print _("Error while removing"), path
|
||||
+ print (_("Error while removing"), path)
|
||||
|
||||
def check_dependencies():
|
||||
required_found = True
|
||||
recommended_found = True
|
||||
- print _("Checking dependencies...")
|
||||
+ print (_("Checking dependencies..."))
|
||||
print
|
||||
- print _("Required dependencies:")
|
||||
+ print (_("Required dependencies:"))
|
||||
print
|
||||
# Should also check the PyGTK version. To do that we have to load the
|
||||
# gtk module though, which normally can't be done while using `sudo`.
|
||||
try:
|
||||
- import pygtk
|
||||
- print " PyGTK ........................ OK"
|
||||
+ #import pygtk
|
||||
+ import gi
|
||||
+ gi.require_version("Gtk", "3.0")
|
||||
+ from gi.repository import Gtk
|
||||
+ print (" PyGTK ........................ OK")
|
||||
except ImportError:
|
||||
- print " !!! PyGTK .................... ", _("Not found")
|
||||
+ print (" !!! PyGTK .................... ", _("Not found"))
|
||||
required_found = False
|
||||
try:
|
||||
# shutdown the warnings
|
||||
import warnings
|
||||
warnings.simplefilter("ignore", Warning)
|
||||
- import gtk.glade
|
||||
- print " Python Glade ................. OK"
|
||||
- except ImportError:
|
||||
- print " !!! Python Glade ............. ", _("Not found")
|
||||
+ #import gtk.glade
|
||||
+ Gtk.Builder()
|
||||
+ print (" Python Glade ................. OK")
|
||||
+ except (ImportError, AttributeError):
|
||||
+ print (" !!! Python Glade ............. ", _("Not found"))
|
||||
required_found = False
|
||||
except RuntimeError:
|
||||
# so we can check dependency when there is no DISPLAY
|
||||
warnings.simplefilter("default", Warning)
|
||||
if not os.environ.get("DISPLAY"):
|
||||
- print " Python Glade ................. SKIP"
|
||||
+ print (" Python Glade ................. SKIP")
|
||||
else:
|
||||
- print " !!! Python Glade ............. ", _("Not found")
|
||||
- required_found = False
|
||||
+ print (" !!! Python Glade ............. ", _("Not found"))
|
||||
+ #required_found = False
|
||||
try:
|
||||
from PIL import Image
|
||||
- print " Python Imaging Library ....... OK"
|
||||
+ print (" Python Imaging Library ....... OK")
|
||||
except ImportError:
|
||||
- print " !!! Python Imaging Library ... ", _("Not found")
|
||||
+ print (" !!! Python Imaging Library ... ", _("Not found"))
|
||||
required_found = False
|
||||
try:
|
||||
import gnome
|
||||
- print " Gnome Python ................. OK"
|
||||
+ print (" Gnome Python ................. OK")
|
||||
except ImportError:
|
||||
- print " !!! Gnome Python ............. ", _("Not found")
|
||||
+ print (" !!! Gnome Python ............. ", _("Not found"))
|
||||
recommended_found = False
|
||||
out = os.popen('which xwininfo').readlines
|
||||
if out == []:
|
||||
- print " Xwininfo tool ................ ", _("Not found")
|
||||
+ print (" Xwininfo tool ................ ", _("Not found"))
|
||||
required_found = False
|
||||
else:
|
||||
- print " Xwininfo tool ................ OK"
|
||||
+ print (" Xwininfo tool ................ OK")
|
||||
|
||||
if not required_found:
|
||||
print
|
||||
- print _("Could not find all required dependencies!")
|
||||
- print _("Please install them and try again.")
|
||||
+ print (_("Could not find all required dependencies!"))
|
||||
+ print (_("Please install them and try again."))
|
||||
print
|
||||
sys.exit(1)
|
||||
if not recommended_found:
|
||||
print
|
||||
- print _("Gnome Python is not found. Wallpapoz still could be used and it has been installed.")
|
||||
- print _("But it means you can not access help documentation in your native language if it is available.")
|
||||
+ print (_("Gnome Python is not found. Wallpapoz still could be used and it has been installed."))
|
||||
+ print (_("But it means you can not access help documentation in your native language if it is available."))
|
||||
print
|
||||
|
||||
install_dir = "/usr/local/"
|
||||
@@ -166,12 +170,12 @@ for opt, value in opts:
|
||||
if opt == "--installdir":
|
||||
install_dir = value
|
||||
if not os.path.isdir(install_dir):
|
||||
- print _("\n*** Error:"), install_dir, _("does not exist.\n" )
|
||||
+ print (_("\n*** Error:"), install_dir, _("does not exist.\n" ))
|
||||
info()
|
||||
|
||||
if args == ["install"]:
|
||||
check_dependencies()
|
||||
- print _("Installing Wallpapoz in"), install_dir, "...\n"
|
||||
+ print (_("Installing Wallpapoz in"), install_dir, "...\n")
|
||||
install("src/wallpapoz", "bin/wallpapoz")
|
||||
install("src/daemon_wallpapoz", "bin/daemon_wallpapoz")
|
||||
install("src/launcher_wallpapoz.sh", "bin/launcher_wallpapoz.sh")
|
||||
@@ -193,7 +197,7 @@ if args == ["install"]:
|
||||
"share/gnome/help/wallpapoz/" + lang + "/legal.xml")
|
||||
|
||||
elif args == ["uninstall"]:
|
||||
- print _("Uninstalling Wallpapoz from"), install_dir, "...\n"
|
||||
+ print (_("Uninstalling Wallpapoz from"), install_dir, "...\n")
|
||||
uninstall("bin/wallpapoz")
|
||||
uninstall("bin/daemon_wallpapoz")
|
||||
uninstall("bin/launcher_wallpapoz.sh")
|
||||
@@ -211,11 +215,11 @@ elif args == ["uninstall"]:
|
||||
uninstall("share/gnome/help/wallpapoz/" + lang + "/wallpapoz.xml")
|
||||
uninstall("share/gnome/help/wallpapoz/" + lang + "/legal.xml")
|
||||
print
|
||||
- print _("""
|
||||
+ print (_("""
|
||||
There might still be files in ~/.wallpapoz/ left on your system.
|
||||
Please remove that directory manually if you do not plan to
|
||||
install Wallpapoz again later.
|
||||
-""")
|
||||
+"""))
|
||||
|
||||
else:
|
||||
info()
|
||||
diff -urp wallpapoz-0.6.2.py2/share/wallpapoz/lib/wallpapoz_system.py wallpapoz-0.6.2.py3/share/wallpapoz/lib/wallpapoz_system.py
|
||||
--- wallpapoz-0.6.2.py2/share/wallpapoz/lib/wallpapoz_system.py 2019-09-02 14:04:36.105389275 +0900
|
||||
+++ wallpapoz-0.6.2.py3/share/wallpapoz/lib/wallpapoz_system.py 2019-09-01 21:08:35.000000000 +0900
|
||||
@@ -44,8 +44,8 @@ class WallpapozSystem:
|
||||
|
||||
# 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."
|
||||
+ print ("daemon_wallpapoz: the number of total workspaces changed during initialization process.")
|
||||
+ print ("daemon_wallpapoz: respawning daemon_wallpapoz.")
|
||||
self.respawn_system()
|
||||
|
||||
def exec_cmd_under_X(self, cmd):
|
||||
@@ -57,32 +57,35 @@ class WallpapozSystem:
|
||||
shell = True
|
||||
)
|
||||
except OSError:
|
||||
- print "daemon_wallpapoz: fork failed for %s, exiting." %cmd
|
||||
+ print ("daemon_wallpapoz: fork failed for %s, exiting." %cmd)
|
||||
sys.exit(1)
|
||||
|
||||
pstdout = p.stdout.read()
|
||||
pstderr = p.stderr.read()
|
||||
ret = p.wait()
|
||||
+ # FIXME
|
||||
+ pstdout_str = pstdout.decode('utf-8')
|
||||
|
||||
kill_daemon = False
|
||||
|
||||
if (ret != 0) and (ret & 0xFF):
|
||||
- print "daemon_wallpapoz: %s returned status %i." %(cmd, ret)
|
||||
- print "daemon_wallpapoz: error message: %s" %pstderr
|
||||
+ 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):
|
||||
+ if (cmd.find('xprop') >= 0) and (pstdout_str.find('no such atom') >= 0):
|
||||
kill_daemon = True
|
||||
- if (cmd.find('xprop') >= 0) and (pstdout.find('not') >= 0):
|
||||
+ if (cmd.find('xprop') >= 0) and (pstdout_str.find('not') >= 0):
|
||||
kill_daemon = True
|
||||
|
||||
if kill_daemon:
|
||||
## No X resource available, kill daemon_wallpapoz
|
||||
- print "daemon_wallpapoz: X resource seems no longer available."
|
||||
- print "daemon_wallpapoz: killing daemon_wallpapoz."
|
||||
+ print ("daemon_wallpapoz: X resource seems no longer available.")
|
||||
+ print ("daemon_wallpapoz: killing daemon_wallpapoz.")
|
||||
sys.exit(1)
|
||||
|
||||
- return pstdout
|
||||
+ #FIXME
|
||||
+ return pstdout_str
|
||||
|
||||
def set_style(self, style):
|
||||
self.wallpaper_style = style
|
||||
@@ -209,7 +212,7 @@ class WallpapozSystem:
|
||||
new_argv = []
|
||||
new_argv.extend(sys.argv)
|
||||
os.execvp('daemon_wallpapoz', new_argv)
|
||||
- print "os.execvp failed, exiting..."
|
||||
+ print ("os.execvp failed, exiting...")
|
||||
sys.exit(1)
|
||||
|
||||
def prevent_multiple_start(self):
|
||||
diff -urp wallpapoz-0.6.2.py2/share/wallpapoz/lib/xml_processing.py wallpapoz-0.6.2.py3/share/wallpapoz/lib/xml_processing.py
|
||||
--- wallpapoz-0.6.2.py2/share/wallpapoz/lib/xml_processing.py 2012-02-20 03:57:12.000000000 +0900
|
||||
+++ wallpapoz-0.6.2.py3/share/wallpapoz/lib/xml_processing.py 2019-09-01 21:23:33.000000000 +0900
|
||||
@@ -28,7 +28,9 @@ import xml
|
||||
import os
|
||||
import sys
|
||||
import gettext
|
||||
-import gtk
|
||||
+import gi
|
||||
+gi.require_version("Gtk", "3.0")
|
||||
+from gi.repository import Gtk, GObject
|
||||
from wallpapoz_system import WallpapozSystem
|
||||
|
||||
# i18n
|
||||
@@ -36,8 +38,8 @@ APP = "wallpapoz"
|
||||
DIR = "../../locale"
|
||||
gettext.bindtextdomain(APP, DIR)
|
||||
gettext.textdomain(APP)
|
||||
-gtk.glade.bindtextdomain(APP, DIR)
|
||||
-gtk.glade.textdomain(APP)
|
||||
+#gtk.glade.bindtextdomain(APP, DIR)
|
||||
+#gtk.glade.textdomain(APP)
|
||||
_ = gettext.gettext
|
||||
|
||||
## XMLProcessing -- class for processing wallpapoz xml file
|
||||
@@ -64,7 +66,7 @@ class XMLProcessing:
|
||||
# if wallpapoz run for the first time ( no configuration file )
|
||||
# we make default list, for every workspace, we give one wallpaper that is our current wallpaper
|
||||
if not os.path.exists(self.config_file):
|
||||
- print _("No configuration file. Use default configuration.")
|
||||
+ print (_("No configuration file. Use default configuration."))
|
||||
home = os.environ['HOME']
|
||||
if not os.path.exists(home + '/.wallpapoz'):
|
||||
os.makedirs(home + '/.wallpapoz')
|
||||
@@ -75,7 +77,7 @@ class XMLProcessing:
|
||||
try:
|
||||
self.xmldoc = minidom.parse(self.config_file)
|
||||
except xml.parsers.expat.ExpatError:
|
||||
- print _("The configuration file is corrupted. Remove it then create a new one again with Wallpapoz!")
|
||||
+ print (_("The configuration file is corrupted. Remove it then create a new one again with Wallpapoz!"))
|
||||
sys.exit()
|
||||
|
||||
# wallpapoz node
|
||||
@@ -101,7 +103,7 @@ class XMLProcessing:
|
||||
try:
|
||||
self.xmldoc = minidom.parse(self.config_file)
|
||||
except xml.parsers.expat.ExpatError:
|
||||
- print _("The configuration file is corrupted. Remove it then create a new one again with Wallpapoz!")
|
||||
+ print (_("The configuration file is corrupted. Remove it then create a new one again with Wallpapoz!"))
|
||||
sys.exit()
|
||||
|
||||
# wallpapoz node
|
||||
@@ -287,7 +289,7 @@ class XMLProcessing:
|
||||
# save the xml file
|
||||
def save(self):
|
||||
xml_file = open(self.config_file, "w")
|
||||
- xml_file.write( self.xmldoc.toxml("utf-8") )
|
||||
+ xml_file.write( self.xmldoc.toxml("utf-8").decode("utf-8") )
|
||||
|
||||
# fill list with default value
|
||||
def default_fill_list(self, type):
|
||||
@@ -406,4 +408,4 @@ class XMLProcessing:
|
||||
|
||||
# create it
|
||||
xml_file = open(self.config_file, "w")
|
||||
- xml_file.write( newdoc.toxml("utf-8") )
|
||||
+ xml_file.write( newdoc.toxml("utf-8").decode("utf-8") )
|
||||
diff -urp wallpapoz-0.6.2.py2/src/daemon_wallpapoz wallpapoz-0.6.2.py3/src/daemon_wallpapoz
|
||||
--- wallpapoz-0.6.2.py2/src/daemon_wallpapoz 2019-09-02 14:04:36.168390114 +0900
|
||||
+++ wallpapoz-0.6.2.py3/src/daemon_wallpapoz 2019-09-01 20:59:43.000000000 +0900
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python2
|
||||
+#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#================================================
|
||||
@@ -33,7 +33,7 @@ import array
|
||||
import time
|
||||
import threading
|
||||
import random
|
||||
-import gtk.glade
|
||||
+#import gtk.glade
|
||||
import string
|
||||
|
||||
# so we can call from anywhere
|
||||
@@ -133,7 +133,7 @@ if __name__ == "__main__":
|
||||
total_workspaces = wallpapoz_system.get_total_workspaces()
|
||||
|
||||
# create the index for wallpaper list thread
|
||||
- number.fromlist( range( total_workspaces ) )
|
||||
+ number.fromlist( list(range( total_workspaces ) ) )
|
||||
|
||||
# previous workspace
|
||||
previous_desktop = -1
|
||||
diff -urp wallpapoz-0.6.2.py2/src/wallpapoz wallpapoz-0.6.2.py3/src/wallpapoz
|
||||
--- wallpapoz-0.6.2.py2/src/wallpapoz 2019-09-02 14:04:36.159389994 +0900
|
||||
+++ wallpapoz-0.6.2.py3/src/wallpapoz 2019-09-02 14:13:50.533772653 +0900
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python2
|
||||
+#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#=============================================================================
|
||||
@@ -27,10 +27,10 @@
|
||||
## wallpapoz.py -- the gui tool for creating configuration file and
|
||||
# calling daemon program
|
||||
|
||||
-import pygtk
|
||||
-pygtk.require('2.0')
|
||||
-import gtk.glade
|
||||
-import gobject
|
||||
+import gi
|
||||
+gi.require_version("Gtk", "3.0")
|
||||
+from gi.repository import Gtk as gtk, GObject as gobject, Gdk as gdk
|
||||
+from gi.repository import GdkPixbuf
|
||||
import os
|
||||
import sys
|
||||
import stat
|
||||
@@ -55,8 +55,8 @@ APP = "wallpapoz"
|
||||
DIR = "../share/locale"
|
||||
gettext.bindtextdomain(APP, DIR)
|
||||
gettext.textdomain(APP)
|
||||
-gtk.glade.bindtextdomain(APP, DIR)
|
||||
-gtk.glade.textdomain(APP)
|
||||
+#gtk.glade.bindtextdomain(APP, DIR)
|
||||
+#gtk.glade.textdomain(APP)
|
||||
_ = gettext.gettext
|
||||
|
||||
# main class for the gui. This gui will contruct the configuration file that will be used by daemon
|
||||
@@ -69,25 +69,32 @@ class Wallpapoz:
|
||||
# the contructor
|
||||
def __init__(self):
|
||||
# wallpapoz glade file
|
||||
- self.wallpapoz_glade_file = "../share/wallpapoz/glade/wallpapoz.glade"
|
||||
+ #self.wallpapoz_glade_file = "../share/wallpapoz/glade/wallpapoz.glade"
|
||||
+ self.wallpapoz_builder_file = "../share/wallpapoz/glade/wallpapoz-builder-wallpapoz_window.glade"
|
||||
|
||||
# call the xmlprocessing class to read it later on method related to treeview
|
||||
self.wallpapozxml = XMLProcessing()
|
||||
|
||||
# Load the glade
|
||||
- self.main_window = gtk.glade.XML(self.wallpapoz_glade_file, "wallpapoz_window", APP)
|
||||
+ self.builder = gtk.Builder()
|
||||
+ self.builder.set_translation_domain(APP)
|
||||
+ self.builder.add_from_file(self.wallpapoz_builder_file)
|
||||
+ #self.main_window = gtk.glade.XML(self.wallpapoz_glade_file, "wallpapoz_window", APP)
|
||||
+ self.main_window = self.builder.get_object("wallpapoz_window")
|
||||
|
||||
# window widget
|
||||
- self.main_window_widget = self.main_window.get_widget("wallpapoz_window")
|
||||
+ self.main_window_widget = self.builder.get_object("wallpapoz_window")
|
||||
|
||||
# treeview widget
|
||||
- self.treeview_widget = self.main_window.get_widget("treeview")
|
||||
+ self.treeview_widget = self.builder.get_object("treeview")
|
||||
+ # FIXME set here
|
||||
+ self.treeselection = self.treeview_widget.get_selection()
|
||||
|
||||
# image widget
|
||||
- self.image_widget = self.main_window.get_widget("wallpaper_image")
|
||||
+ self.image_widget = self.builder.get_object("wallpaper_image")
|
||||
|
||||
# image filename widget
|
||||
- self.wallpaper_filename = self.main_window.get_widget("wallpaper_name_label")
|
||||
+ self.wallpaper_filename = self.builder.get_object("wallpaper_name_label")
|
||||
|
||||
# create the pop up menu when we right click the treeview widget
|
||||
self.set_up_popup_menu()
|
||||
@@ -121,7 +128,7 @@ class Wallpapoz:
|
||||
"on_move_up_activate" : self.move_up_node,
|
||||
"on_move_down_activate" : self.move_down_node,
|
||||
"on_treeview_button_press_event" : self.right_click_menu }
|
||||
- self.main_window.signal_autoconnect(dic)
|
||||
+ self.builder.connect_signals(dic)
|
||||
|
||||
# show treeview
|
||||
self.load_treeview()
|
||||
@@ -132,16 +139,16 @@ class Wallpapoz:
|
||||
# set up popup menu when we right click the treeview widget
|
||||
def set_up_popup_menu(self):
|
||||
self.popup_menu = gtk.Menu()
|
||||
- add_wallpapers_files_menu = gtk.MenuItem(_("Add Wallpapers (Files)"))
|
||||
- add_wallpapers_directory_menu = gtk.MenuItem(_("Add Wallpapers (Directory)"))
|
||||
- self.cut_menu = gtk.MenuItem(_("Cut"))
|
||||
- self.copy_menu = gtk.MenuItem(_("Copy"))
|
||||
- paste_menu = gtk.MenuItem(_("Paste"))
|
||||
- self.rename_workspace_menu = gtk.MenuItem(_("Rename Workspace"))
|
||||
- self.change_wallpaper_menu = gtk.MenuItem(_("Change Wallpaper"))
|
||||
- self.delete_wallpapers_menu = gtk.MenuItem(_("Delete Wallpapers"))
|
||||
- move_up_menu = gtk.MenuItem(_("Move Up"))
|
||||
- move_down_menu = gtk.MenuItem(_("Move Down"))
|
||||
+ add_wallpapers_files_menu = gtk.MenuItem(label=_("Add Wallpapers (Files)"))
|
||||
+ add_wallpapers_directory_menu = gtk.MenuItem(label=_("Add Wallpapers (Directory)"))
|
||||
+ self.cut_menu = gtk.MenuItem(label=_("Cut"))
|
||||
+ self.copy_menu = gtk.MenuItem(label=_("Copy"))
|
||||
+ paste_menu = gtk.MenuItem(label=_("Paste"))
|
||||
+ self.rename_workspace_menu = gtk.MenuItem(label=_("Rename Workspace"))
|
||||
+ self.change_wallpaper_menu = gtk.MenuItem(label=_("Change Wallpaper"))
|
||||
+ self.delete_wallpapers_menu = gtk.MenuItem(label=_("Delete Wallpapers"))
|
||||
+ move_up_menu = gtk.MenuItem(label=_("Move Up"))
|
||||
+ move_down_menu = gtk.MenuItem(label=_("Move Down"))
|
||||
add_wallpapers_files_menu.connect("activate", self.add_wallpapers_files)
|
||||
add_wallpapers_directory_menu.connect("activate", self.add_wallpapers_directory)
|
||||
self.cut_menu.connect("activate", self.cut_treenode)
|
||||
@@ -175,8 +182,8 @@ class Wallpapoz:
|
||||
|
||||
# popup menu when user right-click the treeview widget
|
||||
def right_click_menu(self, widget, event):
|
||||
- if event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
|
||||
- self.popup_menu.popup(None, None, None, event.button, event.time)
|
||||
+ if event.type == gdk.EventType.BUTTON_PRESS and event.button == 3:
|
||||
+ self.popup_menu.popup(None, None, None, None, event.button, event.time)
|
||||
|
||||
def restart_daemon(self, widget):
|
||||
self.stop_daemon(None)
|
||||
@@ -201,8 +208,12 @@ class Wallpapoz:
|
||||
|
||||
# when user click about menu item, show about dialog
|
||||
def display_about(self, widget):
|
||||
- about_dialog = gtk.glade.XML(self.wallpapoz_glade_file, "wallpapoz_about_dialog", APP)
|
||||
- aboutdlg_widget = about_dialog.get_widget("wallpapoz_about_dialog")
|
||||
+ #about_dialog = gtk.glade.XML(self.wallpapoz_glade_file, "wallpapoz_about_dialog", APP)
|
||||
+ self.about_dialog_builder_file = "../share/wallpapoz/glade/wallpapoz-builder-wallpapoz_about_dialog.glade"
|
||||
+ self.about_dialog_builder = gtk.Builder()
|
||||
+ self.about_dialog_builder.set_translation_domain(APP)
|
||||
+ self.about_dialog_builder.add_from_file(self.about_dialog_builder_file)
|
||||
+ aboutdlg_widget = self.about_dialog_builder.get_object("wallpapoz_about_dialog")
|
||||
aboutdlg_widget.connect('response', lambda w, e: aboutdlg_widget.destroy())
|
||||
|
||||
# get the selection iter
|
||||
@@ -326,15 +337,17 @@ class Wallpapoz:
|
||||
dialog_title = _("Choose Wallpapers")
|
||||
|
||||
# our filechooser dialog
|
||||
- filechooser_dialog = gtk.FileChooserDialog(dialog_title, self.main_window_widget, gtk.FILE_CHOOSER_ACTION_OPEN)
|
||||
+ filechooser_dialog = gtk.FileChooserDialog(dialog_title, self.main_window_widget, gtk.FileChooserAction.OPEN)
|
||||
|
||||
# our button
|
||||
- cancel_button = filechooser_dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
|
||||
+ cancel_button = filechooser_dialog.add_button(gtk.STOCK_CANCEL, gtk.ResponseType.CANCEL)
|
||||
if type_of_ok_button == "change":
|
||||
- ok_button = filechooser_dialog.add_button(_("Change"), gtk.RESPONSE_OK)
|
||||
+ ok_button = filechooser_dialog.add_button(_("Change"), gtk.ResponseType.OK)
|
||||
elif type_of_ok_button == "add":
|
||||
- ok_button = filechooser_dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
|
||||
- gtk.Tooltips().set_tip(ok_button, _("Add wallpapers"))
|
||||
+ ok_button = filechooser_dialog.add_button(gtk.STOCK_OK, gtk.ResponseType.OK)
|
||||
+ # FIXME
|
||||
+ #gtk.Tooltips().set_tip(ok_button, _("Add wallpapers"))
|
||||
+ ok_button.set_tooltip_text(_("Add wallpapers"))
|
||||
|
||||
# cancel will quit the filechooser dialog
|
||||
cancel_button.connect("clicked", lambda w: filechooser_dialog.destroy())
|
||||
@@ -379,7 +392,7 @@ class Wallpapoz:
|
||||
filechooser_dialog.set_select_multiple(True)
|
||||
|
||||
# if user choose the file, add his choice to treeview
|
||||
- if filechooser_dialog.run() == gtk.RESPONSE_OK:
|
||||
+ if filechooser_dialog.run() == gtk.ResponseType.OK:
|
||||
# get the list of filename that we choose to add
|
||||
filenames = filechooser_dialog.get_filenames()
|
||||
|
||||
@@ -436,15 +449,21 @@ class Wallpapoz:
|
||||
|
||||
# show up the preferences dialog
|
||||
def preferences_option(self, widget):
|
||||
- self.preferences_dialog = gtk.glade.XML(self.wallpapoz_glade_file, "preferences_dialog", APP)
|
||||
- preferences_dialog_widget = self.preferences_dialog.get_widget("preferences_dialog")
|
||||
+ #self.preferences_dialog = gtk.glade.XML(self.wallpapoz_glade_file, "preferences_dialog", APP)
|
||||
+ self.preferences_dialog_builder_file = "../share/wallpapoz/glade/wallpapoz-builder-preferences_dialog.glade"
|
||||
+ self.preferences_dialog_builder = gtk.Builder()
|
||||
+ self.preferences_dialog_builder.set_translation_domain(APP)
|
||||
+ self.preferences_dialog_builder.add_from_file(self.preferences_dialog_builder_file)
|
||||
+ # FIXME
|
||||
+ self.preferences_dialog = self.preferences_dialog_builder
|
||||
+ preferences_dialog_widget = self.preferences_dialog.get_object("preferences_dialog")
|
||||
|
||||
# input widgets
|
||||
- time_changed_widget = self.preferences_dialog.get_widget("preferences_dialog_spin_button_time")
|
||||
- random_order_widget = self.preferences_dialog.get_widget("preferences_dialog_show_wallpaper_random_order")
|
||||
- changing_workspace_widget = self.preferences_dialog.get_widget("preferences_dialog_change_wallpaper_changing_workspace")
|
||||
- style_widget = self.preferences_dialog.get_widget("preferences_dialog_style_combobox")
|
||||
- size_widget = self.preferences_dialog.get_widget("preferences_dialog_size_combobox")
|
||||
+ time_changed_widget = self.preferences_dialog.get_object("preferences_dialog_spin_button_time")
|
||||
+ random_order_widget = self.preferences_dialog.get_object("preferences_dialog_show_wallpaper_random_order")
|
||||
+ changing_workspace_widget = self.preferences_dialog.get_object("preferences_dialog_change_wallpaper_changing_workspace")
|
||||
+ style_widget = self.preferences_dialog.get_object("preferences_dialog_style_combobox")
|
||||
+ size_widget = self.preferences_dialog.get_object("preferences_dialog_size_combobox")
|
||||
|
||||
# load value from xml file
|
||||
time_changed_widget.set_value(float(self.wallpapozxml.delay()))
|
||||
@@ -458,19 +477,19 @@ class Wallpapoz:
|
||||
changing_workspace_widget.set_active(self.wallpapozxml.change_wallpaper_when_changing_workspace())
|
||||
|
||||
# button
|
||||
- cancel_button = self.preferences_dialog.get_widget("preferences_cancel_button")
|
||||
+ cancel_button = self.preferences_dialog.get_object("preferences_cancel_button")
|
||||
cancel_button.connect("clicked", lambda w: preferences_dialog_widget.destroy())
|
||||
|
||||
- ok_button = self.preferences_dialog.get_widget("preferences_ok_button")
|
||||
+ ok_button = self.preferences_dialog.get_object("preferences_ok_button")
|
||||
ok_button.connect("clicked", self.ok_preferences_dialog)
|
||||
|
||||
def ok_preferences_dialog(self, widget):
|
||||
- time_changed_widget = self.preferences_dialog.get_widget("preferences_dialog_spin_button_time")
|
||||
- random_order_widget = self.preferences_dialog.get_widget("preferences_dialog_show_wallpaper_random_order")
|
||||
- changing_workspace_widget = self.preferences_dialog.get_widget("preferences_dialog_change_wallpaper_changing_workspace")
|
||||
- style_widget = self.preferences_dialog.get_widget("preferences_dialog_style_combobox")
|
||||
- size_widget = self.preferences_dialog.get_widget("preferences_dialog_size_combobox")
|
||||
- preferences_dialog_widget = self.preferences_dialog.get_widget("preferences_dialog")
|
||||
+ time_changed_widget = self.preferences_dialog.get_object("preferences_dialog_spin_button_time")
|
||||
+ random_order_widget = self.preferences_dialog.get_object("preferences_dialog_show_wallpaper_random_order")
|
||||
+ changing_workspace_widget = self.preferences_dialog.get_object("preferences_dialog_change_wallpaper_changing_workspace")
|
||||
+ style_widget = self.preferences_dialog.get_object("preferences_dialog_style_combobox")
|
||||
+ size_widget = self.preferences_dialog.get_object("preferences_dialog_size_combobox")
|
||||
+ preferences_dialog_widget = self.preferences_dialog.get_object("preferences_dialog")
|
||||
|
||||
# user change option for changing_workspace
|
||||
if changing_workspace_widget.get_active():
|
||||
@@ -508,10 +527,17 @@ class Wallpapoz:
|
||||
if iter == None:
|
||||
return
|
||||
|
||||
- choose_directory_dialog = gtk.glade.XML(self.wallpapoz_glade_file, "add_wallpapers_directory_dialog", APP)
|
||||
- choose_directory_dialog_widget = choose_directory_dialog.get_widget("add_wallpapers_directory_dialog")
|
||||
- filechooser_widget = choose_directory_dialog.get_widget("filechooserwidget")
|
||||
- recursive_widget = choose_directory_dialog.get_widget("recursive_checkbutton")
|
||||
+ #choose_directory_dialog = gtk.glade.XML(self.wallpapoz_glade_file, "add_wallpapers_directory_dialog", APP)
|
||||
+ self.choose_directory_dialog_file = "../share/wallpapoz/glade/wallpapoz-builder-add_wallpapers_directory_dialog.glade"
|
||||
+ self.choose_directory_dialog_builder = gtk.Builder()
|
||||
+ self.choose_directory_dialog_builder.set_translation_domain(APP)
|
||||
+ self.choose_directory_dialog_builder.add_from_file(self.choose_directory_dialog_file)
|
||||
+ # FIXME
|
||||
+ choose_directory_dialog = self.choose_directory_dialog_builder
|
||||
+
|
||||
+ choose_directory_dialog_widget = choose_directory_dialog.get_object("add_wallpapers_directory_dialog")
|
||||
+ filechooser_widget = choose_directory_dialog.get_object("filechooserwidget")
|
||||
+ recursive_widget = choose_directory_dialog.get_object("recursive_checkbutton")
|
||||
|
||||
# set it to last directory
|
||||
if self.last_directory == None:
|
||||
@@ -528,7 +554,7 @@ class Wallpapoz:
|
||||
|
||||
dic = { "on_cancel_add_wallpapers_directory_button_clicked" : (self.cancel_button_add_wallpapers_directory, choose_directory_dialog_widget),
|
||||
"on_add_wallpapers_directory_button_clicked" : (self.ok_button_add_wallpapers_directory, filechooser_widget, recursive_widget, choose_directory_dialog_widget, iter) }
|
||||
- choose_directory_dialog.signal_autoconnect(dic)
|
||||
+ choose_directory_dialog.connect_signals(dic)
|
||||
|
||||
# ok, if we choose the directory ( accept filechooser, recursive checkbutton, iter pointing treenode ), function add_wallpapers_directory call this function
|
||||
def ok_button_add_wallpapers_directory(self, widget, filechooser_widget, recursive_widget, choose_directory_dialog_widget, iter):
|
||||
@@ -735,7 +761,7 @@ class Wallpapoz:
|
||||
ii = ii + 1
|
||||
|
||||
# enable rename workspace menu
|
||||
- self.main_window.get_widget("rename_workspace").set_sensitive(True)
|
||||
+ self.builder.get_object("rename_workspace").set_sensitive(True)
|
||||
|
||||
# name of our left column
|
||||
left_tvcolumn_name = _("Workspace")
|
||||
@@ -746,12 +772,12 @@ class Wallpapoz:
|
||||
self.store = gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING, gobject.TYPE_BOOLEAN)
|
||||
|
||||
# disable cut, copy, paste, rename menu item
|
||||
- self.main_window.get_widget("cut").set_sensitive(False)
|
||||
- self.main_window.get_widget("copy").set_sensitive(False)
|
||||
- self.main_window.get_widget("paste").set_sensitive(False)
|
||||
+ self.builder.get_object("cut").set_sensitive(False)
|
||||
+ self.builder.get_object("copy").set_sensitive(False)
|
||||
+ self.builder.get_object("paste").set_sensitive(False)
|
||||
|
||||
# enable change wallpaper menu item
|
||||
- self.main_window.get_widget("change_wallpaper").set_sensitive(True)
|
||||
+ self.builder.get_object("change_wallpaper").set_sensitive(True)
|
||||
|
||||
# make the wallpaper list
|
||||
for i in range(len(worklist)):
|
||||
@@ -786,7 +812,7 @@ class Wallpapoz:
|
||||
|
||||
# set mode to multiple selection
|
||||
self.treeselection = self.treeview_widget.get_selection()
|
||||
- self.treeselection.set_mode(gtk.SELECTION_MULTIPLE)
|
||||
+ self.treeselection.set_mode(gtk.SelectionMode.MULTIPLE)
|
||||
self.treeselection.select_path(0)
|
||||
|
||||
# show image for liststore
|
||||
@@ -814,7 +840,7 @@ class Wallpapoz:
|
||||
# status, copy or cut
|
||||
self.work_on_tree = "copy"
|
||||
# enable the paste menu item
|
||||
- self.main_window.get_widget("paste").set_sensitive(True)
|
||||
+ self.builder.get_object("paste").set_sensitive(True)
|
||||
|
||||
# we call this method when we click cut menu action
|
||||
def cut_treenode(self, widget):
|
||||
@@ -829,7 +855,7 @@ class Wallpapoz:
|
||||
# status, copy or cut
|
||||
self.work_on_tree = "cut"
|
||||
# enable the paste menu item
|
||||
- self.main_window.get_widget("paste").set_sensitive(True)
|
||||
+ self.builder.get_object("paste").set_sensitive(True)
|
||||
|
||||
# helper function for reordering node after cut&paste, returning list of all lowest not selected iter from the related workspace
|
||||
def reordering_node_after_cut_and_paste(self, copy_iter_list):
|
||||
@@ -942,10 +968,10 @@ class Wallpapoz:
|
||||
parent_number = self.store.get_path(self.selected_iter[0])[0]
|
||||
for single_iter in self.selected_iter:
|
||||
if self.store.get_path(single_iter)[0] != parent_number:
|
||||
- temp_iter_list = []
|
||||
- parent_number = self.store.get_path(single_iter)[0]
|
||||
- temp_iter_list.append(single_iter)
|
||||
- prev_iter = single_iter
|
||||
+ temp_iter_list = []
|
||||
+ parent_number = self.store.get_path(single_iter)[0]
|
||||
+ temp_iter_list.append(single_iter)
|
||||
+ prev_iter = single_iter
|
||||
|
||||
# do the remaining job
|
||||
if self.store.iter_n_children( self.store.iter_parent(prev_iter) ) == len(temp_iter_list) and self.work_on_tree == "cut":
|
||||
@@ -990,7 +1016,7 @@ class Wallpapoz:
|
||||
# make sure the status is reset
|
||||
self.work_on_tree = None
|
||||
# disable the paste menu item
|
||||
- self.main_window.get_widget("paste").set_sensitive(False)
|
||||
+ self.builder.get_object("paste").set_sensitive(False)
|
||||
|
||||
self.cut_and_reordering_treeiter()
|
||||
|
||||
@@ -1001,7 +1027,7 @@ class Wallpapoz:
|
||||
# workaround for the case that trying to remove a wallpaper from
|
||||
# the workspace where only one wallpaper exists
|
||||
if not lowest_iter_list:
|
||||
- return
|
||||
+ return
|
||||
|
||||
# iterate to cut ( really!!! ) the iter from selected iter list
|
||||
for single_iter in self.selected_iter:
|
||||
@@ -1212,7 +1238,7 @@ class Wallpapoz:
|
||||
# make the chooser dialog
|
||||
filechooser_dialog = self.make_chooser_dialog("change")
|
||||
# if user okay with his choice, then change the value
|
||||
- if filechooser_dialog.run() == gtk.RESPONSE_OK:
|
||||
+ if filechooser_dialog.run() == gtk.ResponseType.OK:
|
||||
# we interested in image file
|
||||
if self.is_image_file(filechooser_dialog.get_filename()):
|
||||
self.store.set_value(iter, 1, filechooser_dialog.get_filename())
|
||||
@@ -1235,15 +1261,15 @@ class Wallpapoz:
|
||||
|
||||
if not position_iter:
|
||||
# Nothing is selected, unfortunately this can happen
|
||||
- self.main_window.get_widget("rename_workspace").set_sensitive(False)
|
||||
+ self.builder.get_object("rename_workspace").set_sensitive(False)
|
||||
self.rename_workspace_menu.set_sensitive(False)
|
||||
- self.main_window.get_widget("change_wallpaper").set_sensitive(False)
|
||||
+ self.builder.get_object("change_wallpaper").set_sensitive(False)
|
||||
self.change_wallpaper_menu.set_sensitive(False)
|
||||
- self.main_window.get_widget("cut").set_sensitive(False)
|
||||
+ self.builder.get_object("cut").set_sensitive(False)
|
||||
self.cut_menu.set_sensitive(False)
|
||||
- self.main_window.get_widget("copy").set_sensitive(False)
|
||||
+ self.builder.get_object("copy").set_sensitive(False)
|
||||
self.copy_menu.set_sensitive(False)
|
||||
- self.main_window.get_widget("delete_wallpapers").set_sensitive(False)
|
||||
+ self.builder.get_object("delete_wallpapers").set_sensitive(False)
|
||||
self.delete_wallpapers_menu.set_sensitive(False)
|
||||
# Nothing left
|
||||
return
|
||||
@@ -1255,13 +1281,13 @@ class Wallpapoz:
|
||||
|
||||
# child node
|
||||
if parent != None:
|
||||
- self.main_window.get_widget("rename_workspace").set_sensitive(False)
|
||||
+ self.builder.get_object("rename_workspace").set_sensitive(False)
|
||||
self.rename_workspace_menu.set_sensitive(False)
|
||||
- self.main_window.get_widget("change_wallpaper").set_sensitive(True)
|
||||
+ self.builder.get_object("change_wallpaper").set_sensitive(True)
|
||||
self.change_wallpaper_menu.set_sensitive(True)
|
||||
- self.main_window.get_widget("cut").set_sensitive(True)
|
||||
+ self.builder.get_object("cut").set_sensitive(True)
|
||||
self.cut_menu.set_sensitive(True)
|
||||
- self.main_window.get_widget("copy").set_sensitive(True)
|
||||
+ self.builder.get_object("copy").set_sensitive(True)
|
||||
self.copy_menu.set_sensitive(True)
|
||||
|
||||
# See create_configuration_file
|
||||
@@ -1272,23 +1298,23 @@ class Wallpapoz:
|
||||
# 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.builder.get_object("delete_wallpapers").set_sensitive(True)
|
||||
self.delete_wallpapers_menu.set_sensitive(True)
|
||||
else:
|
||||
- self.main_window.get_widget("delete_wallpapers").set_sensitive(False)
|
||||
+ self.builder.get_object("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)
|
||||
+ self.builder.get_object("rename_workspace").set_sensitive(True)
|
||||
self.rename_workspace_menu.set_sensitive(True)
|
||||
- self.main_window.get_widget("change_wallpaper").set_sensitive(False)
|
||||
+ self.builder.get_object("change_wallpaper").set_sensitive(False)
|
||||
self.change_wallpaper_menu.set_sensitive(False)
|
||||
- self.main_window.get_widget("cut").set_sensitive(False)
|
||||
+ self.builder.get_object("cut").set_sensitive(False)
|
||||
self.cut_menu.set_sensitive(False)
|
||||
- self.main_window.get_widget("copy").set_sensitive(False)
|
||||
+ self.builder.get_object("copy").set_sensitive(False)
|
||||
self.copy_menu.set_sensitive(False)
|
||||
- self.main_window.get_widget("delete_wallpapers").set_sensitive(False)
|
||||
+ self.builder.get_object("delete_wallpapers").set_sensitive(False)
|
||||
self.delete_wallpapers_menu.set_sensitive(False)
|
||||
|
||||
filename = self.store.get_value(position_iter, 1)
|
||||
@@ -1297,19 +1323,19 @@ class Wallpapoz:
|
||||
# files' list (i.e. not pointing to desktop name)
|
||||
if ( (type(self.store) == gtk.TreeStore) and
|
||||
( parent == None ) ):
|
||||
- self.image_widget.clear()
|
||||
+ self.image_widget.clear()
|
||||
else:
|
||||
- from glib import GError as glib_GError
|
||||
+ from gi.repository.GLib import GError as glib_GError
|
||||
try:
|
||||
- anime = gtk.gdk.PixbufAnimation(filename)
|
||||
+ anime = GdkPixbuf.PixbufAnimation.new_from_file(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)))
|
||||
+ self.image_widget.set_from_pixbuf(GdkPixbuf.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))
|
||||
+ self.image_widget.set_from_pixbuf(GdkPixbuf.Pixbuf.new_from_file_at_size(filename, int(float(im.size[1])/im.size[0] * 300), 300))
|
||||
|
||||
else:
|
||||
width = anime.get_width()
|
||||
@@ -1322,8 +1348,8 @@ class Wallpapoz:
|
||||
|
||||
except IOError:
|
||||
self.image_widget.clear()
|
||||
- except glib_GError, (msg):
|
||||
- print msg
|
||||
+ except glib_GError as msg:
|
||||
+ print (msg)
|
||||
self.image_widget.clear()
|
||||
|
||||
# display image filename
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
--- wallpapoz-0.6.2/share/wallpapoz/lib/wallpapoz_system.py.default 2012-09-18 12:31:45.855406125 +0900
|
||||
+++ wallpapoz-0.6.2/share/wallpapoz/lib/wallpapoz_system.py 2012-09-18 12:37:03.387072341 +0900
|
||||
@@ -108,6 +108,7 @@
|
||||
if wm_name=='Xfwm4':
|
||||
self.window_manager = 'XFCE4'
|
||||
else:
|
||||
+ try:
|
||||
output = os.popen("gnome-session --version")
|
||||
result = output.readlines()
|
||||
version = result[0].split()[1].split('.')[0]
|
||||
@@ -115,6 +116,9 @@
|
||||
self.window_manager = 'Gnome'
|
||||
elif version == '3':
|
||||
self.window_manager = 'Gnome3'
|
||||
+ except:
|
||||
+ # If something went wrong, just ignore
|
||||
+ pass
|
||||
|
||||
## class method to find amount of workspaces in user desktop
|
||||
def finding_total_workspaces(self):
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=wallpapoz-autostart
|
||||
Comment=Wallpapoz Autostarter
|
||||
Exec=daemon_wallpapoz
|
||||
Terminal=false
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
set -x
|
||||
set -e
|
||||
|
||||
ORIG_XML=./share/wallpapoz/glade/wallpapoz.glade
|
||||
NEWTOPDIR=wallpapoz-0.6.2-builder
|
||||
DIR_XML=$(dirname $ORIG_XML)
|
||||
BASE_XML=$(basename $ORIG_XML)
|
||||
|
||||
mkdir -p $NEWTOPDIR/$DIR_XML || true
|
||||
|
||||
cat ./src/wallpapoz | sed -n -e '\@gtk.glade.XML@s|^.*"\(.*\)".*$|\1|p' | while read item
|
||||
do
|
||||
SPLIT_ORIG_XML=${DIR_XML}/wallpapoz-old-${item}.glade
|
||||
NEW_BUILDER_XML=${DIR_XML}/wallpapoz-builder-${item}.glade
|
||||
|
||||
> $NEWTOPDIR/$SPLIT_ORIG_XML
|
||||
head -n 5 $ORIG_XML >> $NEWTOPDIR/$SPLIT_ORIG_XML
|
||||
cat $ORIG_XML | sed -n -e "\@^<widget class.*"${item}"@,\@^</widget>\$@p" >> $NEWTOPDIR/$SPLIT_ORIG_XML
|
||||
echo >> $NEWTOPDIR/$SPLIT_ORIG_XML
|
||||
tail -n -1 $ORIG_XML >> $NEWTOPDIR/$SPLIT_ORIG_XML
|
||||
|
||||
gtk-builder-convert $NEWTOPDIR/$SPLIT_ORIG_XML $NEWTOPDIR/$NEW_BUILDER_XML
|
||||
sed -i $NEWTOPDIR/$NEW_BUILDER_XML \
|
||||
-e "\@has_resize_grip@d" \
|
||||
-e "\@has_separator@d"
|
||||
done
|
||||
455
wallpapoz.spec
455
wallpapoz.spec
|
|
@ -1,127 +1,42 @@
|
|||
# For svn version: do
|
||||
# $ svn checkout http://opensvn.csie.org/wallpapoz/trunk wallpapoz-%%{mainver}%%{?svnver:-svn%%svnver}
|
||||
# $ svn checkout http://opensvn.csie.org/wallpapoz/trunk wallpapoz-%%{mainver}
|
||||
# $ tar -cjf %%{name}-%%{mainver}%%{?svnver:-svn%%svnver}.tar.bz2 %%{name}-%%{mainver}/
|
||||
|
||||
%define srcurl http://wallpapoz.akbarhome.com/
|
||||
%define icondir %{_datadir}/icons/hicolor/128x128/apps
|
||||
|
||||
%define mainver 0.6.2
|
||||
%define mainver 0.4.1
|
||||
%undefine betaver
|
||||
%define baserelease 20
|
||||
%define svnver svn87_trunk
|
||||
%define fedorarel 5
|
||||
|
||||
%define rel %{?betaver:0.}%{baserelease}%{?betaver:.%betaver}
|
||||
%define rel %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver}
|
||||
|
||||
Name: wallpapoz
|
||||
Version: %{mainver}
|
||||
Release: %{rel}%{?dist}
|
||||
Summary: Gnome Multi Backgrounds and Wallpapers Configuration Tool
|
||||
|
||||
# GPL-2.0-or-later README
|
||||
# GFDL-1.1-or-later share/gnome/help/wallpapoz/C/legal.xml
|
||||
# SPDX confirmed
|
||||
License: GPL-2.0-or-later AND GFDL-1.1-or-later
|
||||
|
||||
URL: http://vajrasky.wordpress.com/wallpapoz/
|
||||
Source0: https://github.com/downloads/vajrasky/wallpapoz/%{name}-%{mainver}%{?betaver:%betaver}.tar.bz2
|
||||
Source11: wallpapoz-autostart.desktop
|
||||
# Install daemon_wallpapoz wrapper script, which may
|
||||
# fix 584980, 597687?
|
||||
# and 711541
|
||||
Source12: daemon_wallpapoz-wrapper
|
||||
#
|
||||
# Glade XML converted to GTK builder script
|
||||
# Source21: wallpapoz-0.6.2-builder.tar.bz2
|
||||
# Source21 is generated by the following script.
|
||||
# Note that the following script uses "gtk-builder-convert" in gtk2-devel
|
||||
# Now "gtk-builder-convert" is imported to python3, so don't use Source21
|
||||
Source22: wallpapoz-glade-builder-convert.sh
|
||||
#
|
||||
# Misc fixes for daemon_wallpapoz under compiz working,
|
||||
# containing fix for bug 531342, 542244, bug 567437, bug 573642
|
||||
Patch0: wallpapoz-0.6.1-workspace-num-respawn.patch
|
||||
# Check if selected item is really a directory when adding directory
|
||||
# bug 549219
|
||||
Patch2: wallpapoz-0.6.1-dircheck.patch
|
||||
# Avoid backtrace in case no item is selected yet (bug 555181)
|
||||
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, 569135, 571827
|
||||
# (and bug 566594)
|
||||
# (and bug 711541)
|
||||
Patch5: wallpapoz-0.6.2-kill-daemon-without-x.patch
|
||||
# Kill other daemon_wallpapoz if running
|
||||
Patch6: wallpapoz-0.6.1-kill-multiple-daemon.patch
|
||||
# Make wallpapoz gui handle animated image file
|
||||
# bug 602921
|
||||
Patch7: wallpapoz-0.6.1-animated-image.patch
|
||||
# Non-utf8 directory can return NoneType with filechooser_widget.get_filename
|
||||
# bug 603351
|
||||
Patch8: wallpapoz-0.6.1-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.6.1-delete-one-wallpaper.patch
|
||||
# Fix backtrace when deleting first element in desktop (not workspace) mode
|
||||
# bug 597959
|
||||
Patch10: wallpapoz-0.6.1-delete-first-in-desktop-mode.patch
|
||||
# Port to gsettings
|
||||
#Patch11: wallpapoz-0.5-gsettings.patch
|
||||
# At startup, wallpapoz will try to show workspace name as "images"
|
||||
Patch12: wallpapoz-0.5-startup-warn-about-workspace-name.patch
|
||||
# Fix backtrace when switching from desktop style XML to workspace style one
|
||||
# with workspace number increased
|
||||
# bug 708769
|
||||
Patch13: wallpapoz-0.6.1-switch-from-wallpaper-to-desktop-with-workspace-increase.patch
|
||||
# Return to set default WM to GNOME3 when proper WM is not found
|
||||
# (bug 857587)
|
||||
Patch14: wallpapoz-0.6.2-wm-return-to-default.patch
|
||||
# Don't import Image directory and import PIL instead for
|
||||
# F-19 Pillow conversion
|
||||
# (bug 895217)
|
||||
Patch15: wallpapoz-0.6.2-import-PIL-for-Image.patch
|
||||
# Support LXDE
|
||||
Patch16: wallpapoz-0.6.2-LXDE.patch
|
||||
# Support MATE
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1029554#c31
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1029554#c38
|
||||
Patch17: wallpapoz-0.6.2-MATE.patch
|
||||
# Support CINNAMON
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1029554#c44
|
||||
Patch18: wallpapoz-0.6.2-CINNAMON.patch
|
||||
# Switch to python3
|
||||
Patch31: wallpapoz-0.6.2-python3.patch
|
||||
# bug 1773214 and etc, various fixes for "desktop" type xml
|
||||
Patch32: wallpapoz-0.6.2-python3-desktop-type.patch
|
||||
Group: User Interface/Desktops
|
||||
License: GPLv2+
|
||||
URL: %{srcurl}
|
||||
Source0: %{srcurl}files/%{name}-%{mainver}%{?svnver:-%svnver}%{?betaver:%betaver}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: gettext
|
||||
BuildRequires: gobject-introspection
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-imaging
|
||||
BuildRequires: gtk3
|
||||
BuildRequires: python3-gobject
|
||||
BuildRequires: /usr/bin/gtk-builder-convert
|
||||
#BuildRequires: gnome-python2
|
||||
# See bug 456122
|
||||
%if 0%{?fedora} >= 10
|
||||
#BuildRequires: gnome-python2-gnome
|
||||
%endif
|
||||
# Because wallpapoz uses gconftool-2 or so
|
||||
Requires: GConf2
|
||||
Requires: gtk3
|
||||
Requires: gobject-introspection
|
||||
Requires: python3-gobject
|
||||
Requires: python3-imaging
|
||||
#Requires: gnome-python2-gnome
|
||||
Requires: xprop xwininfo
|
||||
Requires: /usr/bin/kill
|
||||
Requires: /usr/bin/pgrep
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: pygtk2-libglade
|
||||
BuildRequires: python-imaging
|
||||
BuildRequires: gnome-python2
|
||||
Requires: pygtk2-libglade
|
||||
Requires: python-imaging
|
||||
Requires: gnome-python2
|
||||
Requires: xorg-x11-utils
|
||||
Requires: %{_bindir}/kill
|
||||
Requires: %{_bindir}/pgrep
|
||||
|
||||
%description
|
||||
This tool enables your Gnome desktop to have different
|
||||
|
|
@ -129,349 +44,41 @@ wallpapers for different workspaces or virtual desktops.
|
|||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}%{?svnver:-%svnver}
|
||||
%patch -P0 -p1 -b .respawn
|
||||
%patch -P2 -p1 -b .dircheck
|
||||
%patch -P3 -p1 -b .noitem
|
||||
%patch -P4 -p1 -b .patch_init
|
||||
%patch -P5 -p1 -b .kill_nox
|
||||
%patch -P6 -p1 -b .kill_multi
|
||||
%patch -P7 -p1 -b .anime
|
||||
%patch -P8 -p1 -b .nonutf8
|
||||
%patch -P9 -p1 -b .deletelastone
|
||||
%patch -P10 -p1 -b .deletefirst
|
||||
%patch -P12 -p1 -b .workspace_img
|
||||
%patch -P13 -p1 -b .workspace_num_incr
|
||||
%patch -P14 -p1 -b .default
|
||||
%patch -P15 -p1 -b .pil
|
||||
%patch -P16 -p1 -b .LXDE
|
||||
%patch -P17 -p1 -b .MATE
|
||||
%patch -P18 -p1 -b .CINNAMON
|
||||
|
||||
grep -rl --null '/usr/bin/env python$' . | \
|
||||
xargs --null sed -i -e 's|/usr/bin/env python|/usr/bin/python2|'
|
||||
|
||||
%patch -P31 -p1 -b .py3
|
||||
%patch -P32 -p1 -b .py3.desktop
|
||||
|
||||
# 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
|
||||
sed -i.cs -e '/DOC_ISO_CODES/s|"ru"|"ru","cs"|' setup.py
|
||||
|
||||
%build
|
||||
bash %{SOURCE22}
|
||||
find . -type f -print0 | xargs -0 chmod 0644
|
||||
grep -rl --null '#!/usr/bin' . | xargs -0 chmod 0755
|
||||
|
||||
%install
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
%{__mkdir_p} $RPM_BUILD_ROOT%{_prefix}
|
||||
|
||||
export PATH=$(pwd)/TMPBINDIR:$PATH
|
||||
%{__python3} setup.py install --installdir=$RPM_BUILD_ROOT%{_prefix}
|
||||
%{__python} setup.py install --installdir=$RPM_BUILD_ROOT%{_prefix}
|
||||
|
||||
%{__sed} -i -e 's|%{name}\.png|%{name}|' \
|
||||
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
|
||||
desktop-file-install \
|
||||
--vendor fedora \
|
||||
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
|
||||
--delete-original \
|
||||
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
|
||||
|
||||
# Install desktop application autostart stuff
|
||||
%{__mkdir_p} ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart
|
||||
desktop-file-install \
|
||||
--dir ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart \
|
||||
%{SOURCE11}
|
||||
|
||||
# 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
|
||||
# And as we use out custom wrapper script, the following
|
||||
# is not needed
|
||||
rm -f ${RPM_BUILD_ROOT}%{_bindir}/launcher_wallpapoz.sh
|
||||
|
||||
# Manually install the following
|
||||
install -cpm 0644 \
|
||||
wallpapoz-*/share/wallpapoz/glade/*builder*glade \
|
||||
%{buildroot}%{_datadir}/%{name}/glade/
|
||||
|
||||
%{find_lang} %{name}
|
||||
|
||||
%clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -f %{name}.lang
|
||||
%license COPYING
|
||||
%doc README
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/daemon_wallpapoz
|
||||
%{_libexecdir}/daemon_wallpapoz
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING README
|
||||
%{_bindir}/*%{name}
|
||||
|
||||
%{_sysconfdir}/xdg/autostart/wallpapoz-autostart.desktop
|
||||
|
||||
%dir %{_datadir}/%{name}/
|
||||
%{_datadir}/%{name}/glade/
|
||||
%{_datadir}/%{name}/lib/
|
||||
%{_datadir}/%{name}/
|
||||
%{_datadir}/gnome/help/%{name}/
|
||||
|
||||
%{_datadir}/pixmaps/%{name}.png
|
||||
%{_datadir}/applications/*%{name}.desktop
|
||||
%{_datadir}/applications/fedora-%{name}.desktop
|
||||
|
||||
%changelog
|
||||
* Sat Nov 08 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-20
|
||||
- Add dep for gobject-introspection explicitly
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Tue Nov 21 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-15
|
||||
- Clean up release number and some spec file stuff
|
||||
- SPDX migration
|
||||
|
||||
* Sat Jul 22 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-14.3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-13.3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-13.2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-13.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Fri Nov 5 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-13
|
||||
- Use python3-ported gtk-builder-convert in build time instead of
|
||||
glade files generated preliminarily
|
||||
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-12.3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-12.2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Tue Jul 28 2020 Adam Jackson <ajax@redhat.com> - 0.6.2-12.1
|
||||
- Require xprop xwininfo, not xorg-x11-utils
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-11.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Nov 28 2019 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-11
|
||||
- bug 1773214 and etc, various fixes for "desktop" type xml
|
||||
|
||||
* Mon Sep 2 2019 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-10
|
||||
- Switch to python3
|
||||
|
||||
* Sun Sep 1 2019 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-8.1
|
||||
- Escape white spaces in wallpaper name properly
|
||||
|
||||
* Fri Aug 23 2019 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-9
|
||||
- F-31+: Drop gnome-python2-gnome dependency for now
|
||||
|
||||
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-8.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Mon Feb 4 2019 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-8
|
||||
- Use python2 explicitly
|
||||
|
||||
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-7.9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-7.8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Feb 28 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.6.2-7.7
|
||||
- Update Python 2 dependency declarations to new packaging standards
|
||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-7.6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-7.5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-7.4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.2-7.3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-7.2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-7.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Thu Dec 12 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-7
|
||||
- Support CINNAMON (bug 1029554, leigh scott)
|
||||
|
||||
* Wed Nov 27 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-6
|
||||
- Support MATE (bug 1029554, leigh scott, Wolfgang Ulbrich)
|
||||
|
||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-5.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Sat Feb 9 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-5
|
||||
- F-19: kill vendorization of desktop file (fpc#247)
|
||||
|
||||
* Sat Jan 19 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-4
|
||||
- Support LXDE
|
||||
|
||||
* Tue Jan 15 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.6.2-3
|
||||
- Don't import Image directly and import PIL instead for
|
||||
F-19 Pillow conversion
|
||||
Patch from Stephen Gallagher <sgallagh@redhat.com>
|
||||
(bug 895217)
|
||||
|
||||
* Tue Sep 18 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.6.2-2
|
||||
- Return to set default WM to GNOME3 when proper WM is not found
|
||||
(bug 857587)
|
||||
|
||||
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Tue Mar 6 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.6.2-1
|
||||
- 0.6.2
|
||||
|
||||
* Wed Jan 18 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.6.1-2
|
||||
- Fix error on Patch13 which causes unneeded entry to show up
|
||||
in wallpapoz GUI
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-1.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Fri Dec 30 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.6.1-1
|
||||
- Update to 0.6.1
|
||||
|
||||
* Fri Dec 30 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.5-10
|
||||
- Forgot to apply patch13...
|
||||
|
||||
* Mon Nov 28 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.5-9
|
||||
- More strict check on daemon_wallpapoz startup for xprop
|
||||
(bug 711541)
|
||||
|
||||
* Wed Jun 1 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.5-8
|
||||
- Fix crash witching from desktop style XML to workspace style one
|
||||
with workspace number increased (bug 708769)
|
||||
|
||||
* Mon May 9 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.5-6.1
|
||||
- F-14: kill gsettings patch explicitly: F-14 gsettings crashes
|
||||
every time key is not found
|
||||
|
||||
* Fri May 6 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.5-6
|
||||
- Fix crash on wallpapoz with desktop style xml which was introduced
|
||||
in -5 (bug 702538)
|
||||
|
||||
* Fri May 5 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.5-5
|
||||
- And more fix for gsettings key name change
|
||||
- Kill warnings on startup when wallpapoz tries to show workspace name
|
||||
as "images"
|
||||
|
||||
* Sat Apr 16 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.5-4
|
||||
- Modify for gsettings key name change
|
||||
|
||||
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Thu Dec 7 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.5-3
|
||||
- Port to gsettings
|
||||
|
||||
* Thu Nov 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)
|
||||
|
||||
* Tue Feb 9 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-15.svn92_trunk
|
||||
- Change the way to fix backtrace with no X resource issue
|
||||
|
||||
* Mon Feb 8 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-14.svn92_trunk
|
||||
- Check if the selected item is really a directory on directory
|
||||
chooser dialog (bug 549219)
|
||||
- Avoid backtrace in case no item is selected yet (bug 555181)
|
||||
- Avoid backtrace when trying to paste when no item is copyed yet
|
||||
|
||||
* Thu Feb 4 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-12.svn92_trunk
|
||||
- Some fixes for daemon_wallpapoz under compiz
|
||||
(bug 531342, 542244)
|
||||
- Kill daemon_wallpapoz when X resource is no longer avaiable
|
||||
(bug 531343, 538533, 541434, 556377)
|
||||
|
||||
* Wed Sep 23 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-11.svn92_trunk
|
||||
- Explicitly add R: GConf2 (as wallpapoz really needs this)
|
||||
|
||||
* Sun Aug 30 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-10.svn92_trunk
|
||||
- Update to rev 92
|
||||
- Install desktop application autostart stuff on F-12+
|
||||
|
||||
* Sat Jul 25 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-9.svn87_trunk
|
||||
- F-12: Mass rebuild
|
||||
|
||||
* Tue Feb 24 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp>
|
||||
- F-11: Mass rebuild
|
||||
|
||||
* Wed Jan 21 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-8.svn87_trunk
|
||||
- Always once kill daemon_wallpapoz process if it exists before start
|
||||
|
||||
* Mon Dec 01 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com>
|
||||
- F-11: Rebuild for Python 2.6
|
||||
|
||||
* Wed Aug 27 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-7.svn87_trunk
|
||||
- F-10+: Add (Build)Requires: gnome-python2-gnome (bug 456122, 460022)
|
||||
|
||||
* Thu Apr 3 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.4.1-5.svn87_trunk
|
||||
- Also install cs documents manually
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue