[wallpapoz] Update to 0.6.1

Mamoru Tasaka mtasaka at fedoraproject.org
Fri Dec 30 07:20:58 UTC 2011


commit 2626ad8496290c6542e8ca9982af16e41271495a
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date:   Fri Dec 30 16:20:53 2011 +0900

    Update to 0.6.1

 .gitignore                                         |    1 +
 sources                                            |    2 +-
 wallpapoz-0.4.1-rev92-compiz-respawn.patch         |  109 --------------------
 ...-0.4.1-rev92-delete-first-in-desktop-mode.patch |   18 ---
 wallpapoz-0.4.1-rev92-dircheck.patch               |   84 ---------------
 wallpapoz-0.4.1-rev92-nonutf8-directory.patch      |   22 ----
 wallpapoz-0.5-gsettings.patch                      |   32 ------
 ...lpaper-to-desktop-with-workspace-increase.patch |   22 ----
 ...e.patch => wallpapoz-0.6.1-animated-image.patch |   14 ++--
 wallpapoz-0.6.1-delete-first-in-desktop-mode.patch |   18 +++
 wallpapoz-0.6.1-delete-one-wallpaper.patch         |  107 +++++++++++++++++++
 wallpapoz-0.6.1-dircheck.patch                     |   84 +++++++++++++++
 ... => wallpapoz-0.6.1-kill-daemon-without-x.patch |   56 +++++------
 ...h => wallpapoz-0.6.1-kill-multiple-daemon.patch |   21 ++--
 wallpapoz-0.6.1-nonutf8-directory.patch            |   22 ++++
 ...lpaper-to-desktop-with-workspace-increase.patch |   21 ++++
 wallpapoz-0.6.1-workspace-num-respawn.patch        |   74 +++++++++++++
 wallpapoz.spec                                     |   40 ++++---
 18 files changed, 393 insertions(+), 354 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a8de773..8e8ed4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 wallpapoz-0.4.1-svn92_trunk.tar.bz2
 /wallpapoz-0.5.tar.bz2
+/wallpapoz-0.6.1.tar.bz2
diff --git a/sources b/sources
index c10d97b..cd74978 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-95231129c118034b0ae49e0960e409d9  wallpapoz-0.5.tar.bz2
+e89f1988af6eb70a8bee0cb3a36bd854  wallpapoz-0.6.1.tar.bz2
diff --git a/wallpapoz-0.4.1-rev92-animated-image.patch b/wallpapoz-0.6.1-animated-image.patch
similarity index 61%
rename from wallpapoz-0.4.1-rev92-animated-image.patch
rename to wallpapoz-0.6.1-animated-image.patch
index 3fc30d0..7690274 100644
--- a/wallpapoz-0.4.1-rev92-animated-image.patch
+++ b/wallpapoz-0.6.1-animated-image.patch
@@ -1,6 +1,6 @@
---- wallpapoz-0.4.1-svn92_trunk/src/wallpapoz.anime	2010-06-12 04:26:39.000000000 +0900
-+++ wallpapoz-0.4.1-svn92_trunk/src/wallpapoz	2010-06-12 04:13:43.000000000 +0900
-@@ -1236,15 +1236,32 @@
+--- 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
@@ -9,19 +9,19 @@
 -      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(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)))
++          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))
++          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))
+-        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()
diff --git a/wallpapoz-0.6.1-delete-first-in-desktop-mode.patch b/wallpapoz-0.6.1-delete-first-in-desktop-mode.patch
new file mode 100644
index 0000000..7c348ee
--- /dev/null
+++ b/wallpapoz-0.6.1-delete-first-in-desktop-mode.patch
@@ -0,0 +1,18 @@
+--- 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:
diff --git a/wallpapoz-0.6.1-delete-one-wallpaper.patch b/wallpapoz-0.6.1-delete-one-wallpaper.patch
new file mode 100644
index 0000000..ef2ffe3
--- /dev/null
+++ b/wallpapoz-0.6.1-delete-one-wallpaper.patch
@@ -0,0 +1,107 @@
+--- 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)
diff --git a/wallpapoz-0.6.1-dircheck.patch b/wallpapoz-0.6.1-dircheck.patch
new file mode 100644
index 0000000..e9c53db
--- /dev/null
+++ b/wallpapoz-0.6.1-dircheck.patch
@@ -0,0 +1,84 @@
+--- 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:
diff --git a/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch b/wallpapoz-0.6.1-kill-daemon-without-x.patch
similarity index 53%
rename from wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch
rename to wallpapoz-0.6.1-kill-daemon-without-x.patch
index 728aeea..8b6bb90 100644
--- a/wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch
+++ b/wallpapoz-0.6.1-kill-daemon-without-x.patch
@@ -1,5 +1,5 @@
---- wallpapoz-0.5/share/wallpapoz/lib/wallpapoz_system.py.kill_nox	2011-11-28 18:16:13.959482838 +0900
-+++ wallpapoz-0.5/share/wallpapoz/lib/wallpapoz_system.py	2011-11-28 18:19:02.545376745 +0900
+--- wallpapoz-0.6.1/share/wallpapoz/lib/wallpapoz_system.py.kill_nox	2011-12-30 16:07:43.000000000 +0900
++++ wallpapoz-0.6.1/share/wallpapoz/lib/wallpapoz_system.py	2011-12-30 16:08:55.000000000 +0900
 @@ -24,9 +24,11 @@
  ## wallpapoz_system.py -- finds current desktop and changes wallpaper
  # achieve goal by calling external program
@@ -12,7 +12,7 @@
  
  class WallpapozSystem:
  
-@@ -59,12 +61,48 @@
+@@ -46,12 +48,48 @@
        print "daemon_wallpapoz: respawning daemon_wallpapoz."
        self.respawn_system()
  
@@ -62,39 +62,33 @@
      start_width = raw_resolution.find('Width')
      end_width = raw_resolution.find('\n',start_width)
      start_height = raw_resolution.find('Height')
-@@ -77,7 +115,7 @@
-     if self.beryl:
-       self.total_workspaces = self.row_workspaces * self.column_workspaces
-     else:
--      self.total_workspaces = int(os.popen("xprop -root _NET_NUMBER_OF_DESKTOPS").read()[36:38])
-+      self.total_workspaces = int(self.exec_cmd_under_X("xprop -root _NET_NUMBER_OF_DESKTOPS")[36:38])
+@@ -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('"')]
+     if wm_name=='Xfwm4':
+       self.window_manager = 'XFCE4'
+@@ -79,7 +117,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:
-@@ -86,7 +124,7 @@
+@@ -97,7 +135,7 @@
  
-   ## class method to find if user use beryl in his system or not
-   def check_beryl(self):
--    raw_geometry = os.popen('xprop -root _NET_DESKTOP_GEOMETRY').read()
-+    raw_geometry = self.exec_cmd_under_X('xprop -root _NET_DESKTOP_GEOMETRY')
-     # output of xprop -root _NET_DESKTOP_GEOMETRY is '_NET_DESKTOP_GEOMETRY(CARDINAL) = 1024, 768\n'
-     # and we just need the '1024, 768' part
-     raw_geometry = raw_geometry[34:raw_geometry.find('\n')]
-@@ -117,7 +155,7 @@
    ## class method to know what workspace we are in now
    def current_desktop(self):
-     if self.beryl:
--      raw_viewport = os.popen('xprop -root _NET_DESKTOP_VIEWPORT').read()
-+      raw_viewport = self.exec_cmd_under_X('xprop -root _NET_DESKTOP_VIEWPORT')
-       # output of xprop -root _NET_DESKTOP_VIEWPORT is '_NET_DESKTOP_VIEWPORT(CARDINAL) = 1024, 768\n'
-       # and we just need the '1024, 768' part
-       raw_viewport = raw_viewport[34:raw_viewport.find('\n')]
-@@ -126,7 +164,7 @@
-       y_pos = int(viewport[1]) / self.screen_height
-       workspace = x_pos + self.column_workspaces * y_pos
-     else:
--      raw_workspace = os.popen('xprop -root _NET_CURRENT_DESKTOP').read()
-+      raw_workspace = self.exec_cmd_under_X('xprop -root _NET_CURRENT_DESKTOP')
-       workspace = int(raw_workspace[33] + raw_workspace[34])
+-    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
  
diff --git a/wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch b/wallpapoz-0.6.1-kill-multiple-daemon.patch
similarity index 50%
rename from wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch
rename to wallpapoz-0.6.1-kill-multiple-daemon.patch
index eaa4f7e..a602b91 100644
--- a/wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch
+++ b/wallpapoz-0.6.1-kill-multiple-daemon.patch
@@ -1,6 +1,6 @@
---- wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py.kill_multi	2010-03-18 01:01:50.000000000 +0900
-+++ wallpapoz-0.4.1-svn92_trunk/share/wallpapoz/lib/wallpapoz_system.py	2010-03-18 01:03:38.000000000 +0900
-@@ -189,3 +189,17 @@
+--- 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)
  
@@ -18,16 +18,15 @@
 +      if ( id_list in python_id_list ) and ( int(id_list) != cpid) :
 +        os.kill(int(id_list), signal.SIGTERM)
 +
---- wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz.kill_multi	2010-03-18 01:01:50.000000000 +0900
-+++ wallpapoz-0.4.1-svn92_trunk/src/daemon_wallpapoz	2010-03-18 01:01:50.000000000 +0900
-@@ -98,6 +98,10 @@
-   # create the system class ( to change wallpaper and read current desktop )
+--- 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()
 +
-   available_style = { '3' : 'zoom', '2' : 'scaled', '1' : 'stretched', 
-       '0' : 'centered', '4' : 'wallpaper' } 
-   style = available_style[wallpapozxml.style()]
+   # type of window manager (gnome or xfce)
+   window_manager = wallpapoz_system.window_manager
+ 
diff --git a/wallpapoz-0.6.1-nonutf8-directory.patch b/wallpapoz-0.6.1-nonutf8-directory.patch
new file mode 100644
index 0000000..8de1d75
--- /dev/null
+++ b/wallpapoz-0.6.1-nonutf8-directory.patch
@@ -0,0 +1,22 @@
+--- 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
diff --git a/wallpapoz-0.6.1-switch-from-wallpaper-to-desktop-with-workspace-increase.patch b/wallpapoz-0.6.1-switch-from-wallpaper-to-desktop-with-workspace-increase.patch
new file mode 100644
index 0000000..eebff92
--- /dev/null
+++ b/wallpapoz-0.6.1-switch-from-wallpaper-to-desktop-with-workspace-increase.patch
@@ -0,0 +1,21 @@
+--- wallpapoz-0.6.1/src/wallpapoz.workspace_num_incr	2011-12-30 15:45:29.000000000 +0900
++++ wallpapoz-0.6.1/src/wallpapoz	2011-12-30 15:48:47.000000000 +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]:
+           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)
diff --git a/wallpapoz-0.6.1-workspace-num-respawn.patch b/wallpapoz-0.6.1-workspace-num-respawn.patch
new file mode 100644
index 0000000..5b16c20
--- /dev/null
+++ b/wallpapoz-0.6.1-workspace-num-respawn.patch
@@ -0,0 +1,74 @@
+--- 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
diff --git a/wallpapoz.spec b/wallpapoz.spec
index eaf1cc9..b52127d 100644
--- a/wallpapoz.spec
+++ b/wallpapoz.spec
@@ -5,10 +5,10 @@
 %define         srcurl          http://wallpapoz.akbarhome.com/
 %define         icondir         %{_datadir}/icons/hicolor/128x128/apps
 
-%define         mainver         0.5
+%define         mainver         0.6.1
 %undefine         betaver
 #%%define         svnver          svn92_trunk
-%define         fedorarel      10
+%define         fedorarel      1
 
 %define         rel             %{?betaver:0.}%{fedorarel}%{?svnver:.%svnver}%{?betaver:.%betaver}
 
@@ -19,8 +19,8 @@ Summary:        Gnome Multi Backgrounds and Wallpapers Configuration Tool
 
 Group:          User Interface/Desktops
 License:        GPLv2+
-URL:            %{srcurl}
-Source0:        %{srcurl}files/%{name}-%{mainver}%{?svnver:-%svnver}%{?betaver:%betaver}.tar.bz2
+URL:            http://vajrasky.wordpress.com/wallpapoz/
+Source0:        https://github.com/vajrasky/wallpapoz/%{name}-%{mainver}%{?svnver:-%svnver}%{?betaver:%betaver}.tar.bz2
 %if 0%{?fedora} >= 12
 Source11:       wallpapoz-autostart.desktop
 %endif
@@ -30,10 +30,10 @@ Source11:       wallpapoz-autostart.desktop
 Source12:	daemon_wallpapoz-wrapper
 # Misc fixes for daemon_wallpapoz under compiz working,
 # containing fix for bug 531342, 542244, bug 567437, bug 573642
-Patch0:         wallpapoz-0.4.1-rev92-compiz-respawn.patch
+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.4.1-rev92-dircheck.patch
+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
@@ -42,32 +42,32 @@ Patch4:         wallpapoz-0.4.1-rev92-paste-initialization.patch
 # bug 531343, 538533, 541434, 556377, 569135, 571827
 # (and bug 566594)
 # (and bug 711541)
-Patch5:         wallpapoz-0.4.1-rev92-kill-daemon-without-x.patch
+Patch5:         wallpapoz-0.6.1-kill-daemon-without-x.patch
 # Kill other daemon_wallpapoz if running
-Patch6:         wallpapoz-0.4.1-rev92-kill-multiple-daemon.patch
+Patch6:         wallpapoz-0.6.1-kill-multiple-daemon.patch
 # Make wallpapoz gui handle animated image file
 # bug 602921
-Patch7:		wallpapoz-0.4.1-rev92-animated-image.patch
+Patch7:		wallpapoz-0.6.1-animated-image.patch
 # Non-utf8 directory can return NoneType with filechooser_widget.get_filename
 # bug 603351
-Patch8:		wallpapoz-0.4.1-rev92-nonutf8-directory.patch
+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.4.1-rev92-delete-one-wallpaper.patch
+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.4.1-rev92-delete-first-in-desktop-mode.patch
-# Port to gsettins
-Patch11:	wallpapoz-0.5-gsettings.patch
+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.5-switch-from-wallpaper-to-desktop-with-workspace-increase.patch
+Patch13:	wallpapoz-0.6.1-switch-from-wallpaper-to-desktop-with-workspace-increase.patch
 
 BuildArch:      noarch
 
@@ -96,7 +96,7 @@ wallpapers for different workspaces or virtual desktops.
 
 %prep
 %setup -q -n %{name}-%{version}%{?svnver:-%svnver}
-%patch0 -p1 -b .compiz
+%patch0 -p1 -b .respawn
 %patch2 -p1 -b .dircheck
 %patch3 -p1 -b .noitem
 %patch4 -p1 -b .patch_init
@@ -107,7 +107,7 @@ wallpapers for different workspaces or virtual desktops.
 %patch9 -p1 -b .deletelastone
 %patch10 -p1 -b .deletefirst
 %if 0%{?fedora} >= 15
-%patch11 -p1 -b .gsettings
+#%%patch11 -p1 -b .gsettings
 %endif
 %patch12 -p1 -b .workspace_img
 %patch13 -p1 -b .workspace_num_incr
@@ -156,6 +156,9 @@ pushd ${RPM_BUILD_ROOT}
 %{__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
 
 %{find_lang} %{name}
 
@@ -179,6 +182,9 @@ popd
 %{_datadir}/applications/fedora-%{name}.desktop
 
 %changelog
+* Fri Dec 30 2011 Mamoru Tasaka <mtasaka at fedoraproject.org> - 0.6.1-1
+- Update to 0.6.1
+
 * Fri Dec 30 2011 Mamoru Tasaka <mtasaka at fedoraproject.org> - 0.5-10
 - Forgot to apply patch13...
 


More information about the scm-commits mailing list