[gedit-plugins] git: Remove use of __gtype__



commit a63ffc7619dc2a0238c47635d52ed0bdaad69225
Author: Garrett Regier <garrettregier gmail com>
Date:   Sat Feb 14 17:48:19 2015 -0800

    git: Remove use of __gtype__
    
    PyGObject will automatically convert the Python
    type into the GType.

 plugins/git/git/appactivatable.py  |    2 +-
 plugins/git/git/viewactivatable.py |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/git/git/appactivatable.py b/plugins/git/git/appactivatable.py
index 2c55175..86add41 100644
--- a/plugins/git/git/appactivatable.py
+++ b/plugins/git/git/appactivatable.py
@@ -93,7 +93,7 @@ class GitAppActivatable(GObject.Object, Gedit.AppActivatable):
 
             # TODO: this was around even when not used, on purpose?
             head = repo.get_head()
-            commit = repo.lookup(head.get_target(), Ggit.Commit.__gtype__)
+            commit = repo.lookup(head.get_target(), Ggit.Commit)
             tree = commit.get_tree()
 
             self.__git_repos[repo_uri] = repo
diff --git a/plugins/git/git/viewactivatable.py b/plugins/git/git/viewactivatable.py
index e32a163..122feda 100644
--- a/plugins/git/git/viewactivatable.py
+++ b/plugins/git/git/viewactivatable.py
@@ -129,13 +129,13 @@ class GitViewActivatable(GObject.Object, Gedit.ViewActivatable):
 
         try:
             head = repo.get_head()
-            commit = repo.lookup(head.get_target(), Ggit.Commit.__gtype__)
+            commit = repo.lookup(head.get_target(), Ggit.Commit)
             tree = commit.get_tree()
 
             relative_path = repo.get_workdir().get_relative_path(self.location)
 
             entry = tree.get_by_path(relative_path)
-            file_blob = repo.lookup(entry.get_id(), Ggit.Blob.__gtype__)
+            file_blob = repo.lookup(entry.get_id(), Ggit.Blob)
             file_contents = file_blob.get_raw_content().decode('utf-8')
             self.file_contents_list = file_contents.splitlines()
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]