[gitg] Move PatchSet to gitg-stage
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Move PatchSet to gitg-stage
- Date: Thu, 2 Jan 2014 12:41:28 +0000 (UTC)
commit e3f3f79156b93c3383282dd74c13910c414f830a
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Wed Jan 1 14:23:07 2014 +0100
Move PatchSet to gitg-stage
libgitg/gitg-diff-view.vala | 39 ---------------------------------------
libgitg/gitg-stage.vala | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/libgitg/gitg-diff-view.vala b/libgitg/gitg-diff-view.vala
index d270083..a4cb776 100644
--- a/libgitg/gitg-diff-view.vala
+++ b/libgitg/gitg-diff-view.vala
@@ -21,45 +21,6 @@ namespace Gitg
{
public class DiffView : WebKit.WebView
{
- public class PatchSet
- {
- public enum Type
- {
- ADD = 'a',
- REMOVE = 'r'
- }
-
- public struct Patch
- {
- Type type;
- size_t old_offset;
- size_t new_offset;
- size_t length;
-
- public string to_string()
- {
- var tp = type == Type.ADD ? "add" : "remove";
- return @"$tp[old_offset: $old_offset, new_offset: $new_offset,
length: $length]";
- }
- }
-
- public string filename;
- public Patch[] patches;
-
- public string to_string()
- {
- var ps = new string[patches.length];
-
- for (var i = 0; i < patches.length; i++)
- {
- ps[i] = patches[i].to_string();
- }
-
- var p = string.joinv(", ", ps);
- return @"$filename: $p";
- }
- }
-
private class DiffViewRequestInternal : DiffViewRequest
{
public DiffViewRequestInternal(DiffView? view, WebKit.URISchemeRequest request,
Soup.URI uri)
diff --git a/libgitg/gitg-stage.vala b/libgitg/gitg-stage.vala
index 4703d21..e41b2c1 100644
--- a/libgitg/gitg-stage.vala
+++ b/libgitg/gitg-stage.vala
@@ -36,6 +36,45 @@ public errordomain StageError
NOTHING_TO_COMMIT
}
+public class PatchSet
+{
+ public enum Type
+ {
+ ADD = 'a',
+ REMOVE = 'r'
+ }
+
+ public struct Patch
+ {
+ Type type;
+ size_t old_offset;
+ size_t new_offset;
+ size_t length;
+
+ public string to_string()
+ {
+ var tp = type == Type.ADD ? "add" : "remove";
+ return @"$tp[old_offset: $old_offset, new_offset: $new_offset, length: $length]";
+ }
+ }
+
+ public string filename;
+ public Patch[] patches;
+
+ public string to_string()
+ {
+ var ps = new string[patches.length];
+
+ for (var i = 0; i < patches.length; i++)
+ {
+ ps[i] = patches[i].to_string();
+ }
+
+ var p = string.joinv(", ", ps);
+ return @"$filename: $p";
+ }
+}
+
public class Stage : Object
{
private weak Repository d_repository;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]