[gitg/wip/sindhus/interactive-rebase] Add rebase commit editor window



commit ef27a4a66a727256ef26e531c1044d4bb1f938f6
Author: Sindhu S <sindhus live in>
Date:   Wed Sep 11 17:43:56 2013 +0530

    Add rebase commit editor window

 gitg/Makefile.am                           |    1 +
 gitg/gitg-application.vala                 |   14 +++++++++++++
 gitg/gitg-rebase-commit-editor-window.vala |   30 ++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/gitg/Makefile.am b/gitg/Makefile.am
index 7eb6633..b582b37 100644
--- a/gitg/Makefile.am
+++ b/gitg/Makefile.am
@@ -45,6 +45,7 @@ VALASOURCES =                                                 \
        gitg-rebase-list-box.vala                               \
        gitg-rebase-parser.vala                                 \
        gitg-rebase-window.vala                                 \
+       gitg-rebase-commit-editor-window.vala   \
        gitg-application.vala                                   \
        gitg-plugins-engine.vala                                \
        gitg-ui-elements.vala                                   \
diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala
index 1371317..a154a74 100644
--- a/gitg/gitg-application.vala
+++ b/gitg/gitg-application.vala
@@ -42,6 +42,7 @@ public class Application : Gtk.Application
                public static bool quit = false;
                public static string activity;
                public static string rebase;
+               public static string rebase_commit_editor;
                public static bool no_wd = false;
 
                public static ApplicationCommandLine command_line;
@@ -67,6 +68,8 @@ public class Application : Gtk.Application
                        {"rebase", '\0', 0, OptionArg.STRING,
                         ref rebase, N_("Start gitg in rebase mode"), null},
 
+                       {"rebase-commit-editor", '\0', 0, OptionArg.STRING,
+                        ref rebase_commit_editor, N_("Rebase commit message editor"), null},
                        {null}
                };
        }
@@ -77,6 +80,7 @@ public class Application : Gtk.Application
        {
                Options.activity = "";
                Options.rebase = "";
+               Options.rebase_commit_editor = "";
        }
 
        private static void show_version_and_quit()
@@ -172,6 +176,16 @@ public class Application : Gtk.Application
                        return 0;
                }
 
+               if (Options.rebase_commit_editor != "")
+               {
+
+                       var rebase_commit_editor_window = new RebaseCommitEditorWindow();
+//                     rebase_window.load_rebase_todo(Options.rebase);
+                       rebase_commit_editor_window.show_all();
+                       Gtk.main();
+                       return 0;
+               }
+
                if (!cmd.get_is_remote())
                {
                        Options.command_line = cmd;
diff --git a/gitg/gitg-rebase-commit-editor-window.vala b/gitg/gitg-rebase-commit-editor-window.vala
new file mode 100644
index 0000000..f6d1d2f
--- /dev/null
+++ b/gitg/gitg-rebase-commit-editor-window.vala
@@ -0,0 +1,30 @@
+/*
+ * This file is part of gitg
+ *
+ * Copyright (C) 2013 - Sindhu S
+ *
+ * gitg is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * gitg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with gitg. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+namespace Gitg
+{
+       public class RebaseCommitEditorWindow : Gtk.Window
+       {
+               public RebaseCommitEditorWindow()
+               {
+                       this.title = "Rebase Commit Editor";
+               }
+       }
+
+}
\ No newline at end of file


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