[Pkg-bazaar-commits] ./bzr-gtk/unstable r107: Merge from trunk.

Szilveszter Farkas (Phanatic) Szilveszter.Farkas at gmail.com
Fri Apr 10 07:45:43 UTC 2009


------------------------------------------------------------
revno: 107
committer: Szilveszter Farkas (Phanatic) <Szilveszter.Farkas at gmail.com>
branch nick: bzr-gtk
timestamp: Tue 2006-10-31 22:09:50 +0100
message:
  Merge from trunk.
renamed:
  olive/gladefile.py => olive/guifiles.py
modified:
  olive-gtk
  olive/__init__.py
  olive/add.py
  olive/bookmark.py
  olive/branch.py
  olive/checkout.py
  olive/commit.py
  olive/dialog.py
  olive/info.py
  olive/menu.py
  olive/merge.py
  olive/mkdir.py
  olive/move.py
  olive/push.py
  olive/remove.py
  olive/rename.py
  olive/status.py
  olive/guifiles.py
    ------------------------------------------------------------
    revno: 93.1.10
    committer: Alexander Belchenko <bialix at ukr.net>
    branch nick: bzr-gtk.win32.bialix
    timestamp: Wed 2006-10-25 13:20:40 +0300
    message:
      - Show file kind marker with path (i.e. directory path ends with '/')
      - Show renames similar to bzr (i.e. 'old => new')
    modified:
      olive/commit.py
    ------------------------------------------------------------
    revno: 93.1.11
    committer: Alexander Belchenko <bialix at ukr.net>
    branch nick: bzr-gtk.win32.bialix
    timestamp: Wed 2006-10-25 15:49:49 +0300
    message:
      Another fix for closing gcommit dialog: when user press [x] in title mainloop also should be quit
    modified:
      olive/commit.py
    ------------------------------------------------------------
    revno: 93.1.12
    committer: Alexander Belchenko <bialix at ukr.net>
    branch nick: bzr-gtk.win32.bialix
    timestamp: Wed 2006-10-25 19:29:18 +0300
    message:
      Names XML files with GUI resources obtained via olive/guifiles.py
    renamed:
      olive/gladefile.py => olive/guifiles.py
    modified:
      olive/__init__.py
      olive/add.py
      olive/bookmark.py
      olive/branch.py
      olive/checkout.py
      olive/commit.py
      olive/dialog.py
      olive/info.py
      olive/menu.py
      olive/merge.py
      olive/mkdir.py
      olive/move.py
      olive/push.py
      olive/remove.py
      olive/rename.py
      olive/status.py
      olive/guifiles.py
    ------------------------------------------------------------
    revno: 93.1.13
    committer: Alexander Belchenko <bialix at ukr.net>
    branch nick: bzr-gtk.win32.bialix
    timestamp: Thu 2006-10-26 10:49:27 +0300
    message:
      Fix bug introduced by revid:bialix at ukr.net-20061025102040-90bcdbad341ee3fa
      
      Commit dialog should store real file name of renamed items,
      otherwise commit fails with error (File not versioned a => b)
      
      Fixed by using extra hidden column in file_store.
      Also for renamed *and* modified items show correct type of changes
      as 'renamed and modified'
    modified:
      olive/commit.py
    ------------------------------------------------------------
    revno: 93.1.14
    committer: Alexander Belchenko <bialix at ukr.net>
    branch nick: bzr-gtk.win32.bialix
    timestamp: Thu 2006-10-26 16:16:07 +0300
    message:
      olive-gtk: use olive ui factory
    modified:
      olive-gtk
    ------------------------------------------------------------
    revno: 91.1.8
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Tue 2006-10-31 15:08:12 +0100
    message:
      [merge] Alexander
    added:
      olive/guifiles.py
    modified:
      __init__.py
      olive-gtk
      olive/__init__.py
      olive/add.py
      olive/bookmark.py
      olive/branch.py
      olive/checkout.py
      olive/commit.py
      olive/dialog.py
      olive/info.py
      olive/menu.py
      olive/merge.py
      olive/mkdir.py
      olive/move.py
      olive/push.py
      olive/remove.py
      olive/rename.py
      olive/status.py
    ------------------------------------------------------------
    revno: 91.1.9
    committer: Jelmer Vernooij <jelmer at samba.org>
    branch nick: trunk
    timestamp: Tue 2006-10-31 15:11:16 +0100
    message:
      Use epydoc style (for consistency with Bazaar).
    modified:
      olive/__init__.py
      olive/commit.py
-------------- next part --------------
=== modified file 'olive-gtk'
--- a/olive-gtk	2006-10-05 13:44:08 +0000
+++ b/olive-gtk	2006-10-26 13:16:07 +0000
@@ -83,5 +83,9 @@
 from bzrlib.plugin import load_plugins
 load_plugins()
 
+import bzrlib.ui
+import olive.ui
+bzrlib.ui.ui_factory = olive.ui.GtkUIFactory()
+
 app = OliveGtk()
 gtk.main()

=== modified file 'olive/__init__.py'
--- a/olive/__init__.py	2006-10-25 08:34:09 +0000
+++ b/olive/__init__.py	2006-10-31 14:11:16 +0000
@@ -39,7 +39,7 @@
 __version__ = '0.11.0'
 
 from dialog import error_dialog, info_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 # import this classes only once
 try:
@@ -500,9 +500,9 @@
     def _add_updir_to_dirlist(self, dirlist, curdir):
         """Add .. to the top of directories list if we not in root directory
 
-        @param  dirlist:    list of directories (modified in place)
-        @param  curdir:     current directory
-        @return:            nothing
+        :param dirlist:     list of directories (modified in place)
+        :param curdir:      current directory
+        :return:            nothing
         """
         if curdir is None:
             curdir = self.path

=== modified file 'olive/add.py'
--- a/olive/add.py	2006-10-25 08:34:09 +0000
+++ b/olive/add.py	2006-10-25 16:29:18 +0000
@@ -29,7 +29,7 @@
 import bzrlib.errors as errors
 
 from dialog import error_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class OliveAdd:

=== modified file 'olive/bookmark.py'
--- a/olive/bookmark.py	2006-10-25 08:34:09 +0000
+++ b/olive/bookmark.py	2006-10-25 16:29:18 +0000
@@ -25,7 +25,7 @@
 
 from olive import OlivePreferences
 from dialog import error_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class OliveBookmark:

=== modified file 'olive/branch.py'
--- a/olive/branch.py	2006-10-25 08:34:09 +0000
+++ b/olive/branch.py	2006-10-25 16:29:18 +0000
@@ -29,7 +29,7 @@
 import bzrlib.errors as errors
 
 from dialog import error_dialog, info_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class BranchDialog:

=== modified file 'olive/checkout.py'
--- a/olive/checkout.py	2006-10-25 08:34:09 +0000
+++ b/olive/checkout.py	2006-10-25 16:29:18 +0000
@@ -31,7 +31,7 @@
 import bzrlib.osutils
 
 from dialog import error_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class OliveCheckout:

=== modified file 'olive/commit.py'
--- a/olive/commit.py	2006-10-25 09:56:13 +0000
+++ b/olive/commit.py	2006-10-31 14:11:16 +0000
@@ -26,18 +26,19 @@
 import pango
 
 import bzrlib.errors as errors
+from bzrlib import osutils
 
 from dialog import error_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class CommitDialog:
     """ Display Commit dialog and perform the needed actions. """
     def __init__(self, wt, wtpath, standalone=False):
         """ Initialize the Commit dialog.
-        @param  wt:         bzr working tree object
-        @param  wtpath:     path to working tree root
-        @param  standalone: when used in gcommit command as standalone window
+        :param  wt:         bzr working tree object
+        :param  wtpath:     path to working tree root
+        :param  standalone: when used in gcommit command as standalone window
                             this argument should be True
         """
         self.glade = gtk.glade.XML(GLADEFILENAME, 'window_commit', 'olive-gtk')
@@ -75,6 +76,7 @@
 
         if self.standalone:
             dic["on_button_commit_cancel_clicked"] = self.quit
+            self.window.connect("delete_event", gtk.main_quit)
         
         # Connect the signals to the handlers
         self.glade.signal_autoconnect(dic)
@@ -107,9 +109,10 @@
             
     
     def _create_file_view(self):
-        self.file_store = gtk.ListStore(gobject.TYPE_BOOLEAN,
-                                        gobject.TYPE_STRING,
-                                        gobject.TYPE_STRING)
+        self.file_store = gtk.ListStore(gobject.TYPE_BOOLEAN,   # [0] checkbox
+                                        gobject.TYPE_STRING,    # [1] path to display
+                                        gobject.TYPE_STRING,    # [2] changes type
+                                        gobject.TYPE_STRING)    # [3] real path
         self.file_view.set_model(self.file_store)
         crt = gtk.CellRendererToggle()
         crt.set_property("activatable", True)
@@ -122,16 +125,28 @@
                                      gtk.CellRendererText(), text=2))
 
         for path, id, kind in self.delta.added:
-            self.file_store.append([ True, path, _('added') ])
+            marker = osutils.kind_marker(kind)
+            self.file_store.append([ True, path+marker, _('added'), path ])
 
         for path, id, kind in self.delta.removed:
-            self.file_store.append([ True, path, _('removed') ])
+            marker = osutils.kind_marker(kind)
+            self.file_store.append([ True, path+marker, _('removed'), path ])
 
         for oldpath, newpath, id, kind, text_modified, meta_modified in self.delta.renamed:
-            self.file_store.append([ True, oldpath, _('renamed') ])
+            marker = osutils.kind_marker(kind)
+            if text_modified or meta_modified:
+                changes = _('renamed and modified')
+            else:
+                changes = _('renamed')
+            self.file_store.append([ True,
+                                     oldpath+marker + '  =>  ' + newpath+marker,
+                                     changes,
+                                     newpath
+                                   ])
 
         for path, id, kind, text_modified, meta_modified in self.delta.modified:
-            self.file_store.append([ True, path, _('modified') ])
+            marker = osutils.kind_marker(kind)
+            self.file_store.append([ True, path+marker, _('modified'), path ])
     
     def _create_pending_merges(self):
         liststore = gtk.ListStore(gobject.TYPE_STRING,
@@ -159,7 +174,8 @@
         it = self.file_store.get_iter_first()
         while it:
             if self.file_store.get_value(it, 0):
-                ret.append(self.file_store.get_value(it, 1))
+                # get real path from hidden column 3
+                ret.append(self.file_store.get_value(it, 3))
             it = self.file_store.iter_next(it)
 
         return ret

=== modified file 'olive/dialog.py'
--- a/olive/dialog.py	2006-10-25 08:34:09 +0000
+++ b/olive/dialog.py	2006-10-25 16:29:18 +0000
@@ -27,7 +27,7 @@
 def about():
     """ Display the AboutDialog. """
     import olive
-    from gladefile import GLADEFILENAME
+    from guifiles import GLADEFILENAME
 
     # Load AboutDialog description
     dglade = gtk.glade.XML(GLADEFILENAME, 'aboutdialog')

=== renamed file 'olive/gladefile.py' => 'olive/guifiles.py'
--- a/olive/gladefile.py	2006-10-25 08:34:09 +0000
+++ b/olive/guifiles.py	2006-10-25 16:29:18 +0000
@@ -34,3 +34,21 @@
         # Fail
         print _('Glade file cannot be found.')
         sys.exit(1)
+
+# Get the cmenu.ui file name
+if sys.platform == 'win32':
+    UIFILENAME = os.path.dirname(sys.executable) + "/share/olive/cmenu.ui"
+else:
+    UIFILENAME = "/usr/share/olive/cmenu.ui"
+
+if not os.path.isfile(UIFILENAME):
+    # Load from current directory if not installed
+    dir_ = os.path.split(os.path.dirname(__file__))[0]
+    UIFILENAME = os.path.join(dir_, "cmenu.ui")
+    # Check again
+    if not os.path.isfile(UIFILENAME):
+        # Fail
+        print _('UI description file cannot be found.')
+        sys.exit(1)
+
+

=== modified file 'olive/info.py'
--- a/olive/info.py	2006-10-25 08:34:09 +0000
+++ b/olive/info.py	2006-10-25 16:29:18 +0000
@@ -26,7 +26,7 @@
 import bzrlib.errors as errors
 
 from dialog import error_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 def info(location):

=== modified file 'olive/menu.py'
--- a/olive/menu.py	2006-10-14 11:44:16 +0000
+++ b/olive/menu.py	2006-10-25 16:29:18 +0000
@@ -36,20 +36,10 @@
     """ This class is responsible for building the context menus. """
     def __init__(self, path, selected):
         # Load the UI file
-        if sys.platform == 'win32':
-            self.uifile = os.path.dirname(sys.executable) + "/share/olive/cmenu.ui"
-        else:
-            self.uifile = "/usr/share/olive/cmenu.ui"
-        
-        if not os.path.exists(self.uifile):
-            # Load from current directory if not installed
-            self.uifile = "cmenu.ui"
-            # Check again
-            if not os.path.exists(self.uifile):
-                # Fail
-                print _('UI description file cannot be found.')
-                sys.exit(1)
-        
+        from guifiles import UIFILENAME
+
+        self.uifile = UIFILENAME
+
         # Preferences handler
         self.pref = OlivePreferences()
         

=== modified file 'olive/merge.py'
--- a/olive/merge.py	2006-10-25 08:34:09 +0000
+++ b/olive/merge.py	2006-10-25 16:29:18 +0000
@@ -29,7 +29,7 @@
 import bzrlib.errors as errors
 
 from dialog import error_dialog, info_dialog, warning_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class MergeDialog:

=== modified file 'olive/mkdir.py'
--- a/olive/mkdir.py	2006-10-25 08:34:09 +0000
+++ b/olive/mkdir.py	2006-10-25 16:29:18 +0000
@@ -28,7 +28,7 @@
 import bzrlib.errors as errors
 
 from dialog import error_dialog, warning_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class OliveMkdir:

=== modified file 'olive/move.py'
--- a/olive/move.py	2006-10-25 08:34:09 +0000
+++ b/olive/move.py	2006-10-25 16:29:18 +0000
@@ -30,7 +30,7 @@
 from bzrlib.workingtree import WorkingTree
 
 from dialog import error_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class OliveMove:

=== modified file 'olive/push.py'
--- a/olive/push.py	2006-10-25 08:34:09 +0000
+++ b/olive/push.py	2006-10-25 16:29:18 +0000
@@ -27,7 +27,7 @@
 import bzrlib.errors as errors
 
 from dialog import error_dialog, info_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class OlivePush:

=== modified file 'olive/remove.py'
--- a/olive/remove.py	2006-10-25 08:34:09 +0000
+++ b/olive/remove.py	2006-10-25 16:29:18 +0000
@@ -28,7 +28,7 @@
 import bzrlib.errors as errors
 
 from dialog import error_dialog, warning_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class OliveRemove:

=== modified file 'olive/rename.py'
--- a/olive/rename.py	2006-10-25 08:34:09 +0000
+++ b/olive/rename.py	2006-10-25 16:29:18 +0000
@@ -29,7 +29,7 @@
 from bzrlib.workingtree import WorkingTree
 
 from dialog import error_dialog
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class OliveRename:

=== modified file 'olive/status.py'
--- a/olive/status.py	2006-10-25 08:34:09 +0000
+++ b/olive/status.py	2006-10-25 16:29:18 +0000
@@ -23,7 +23,7 @@
 import gtk
 import gtk.glade
 
-from gladefile import GLADEFILENAME
+from guifiles import GLADEFILENAME
 
 
 class OliveStatus:



More information about the Pkg-bazaar-commits mailing list