[gitg/wip/submodules] Show dummy item when there are no dirty submodules
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/submodules] Show dummy item when there are no dirty submodules
- Date: Sun, 14 Dec 2014 11:09:14 +0000 (UTC)
commit c35c4ea7873f2bfccdf8c88b2e8aa4094ca51b9e
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Sun Dec 14 12:08:26 2014 +0100
Show dummy item when there are no dirty submodules
gitg/commit/gitg-commit.vala | 23 ++++++++++++++++-------
1 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/gitg/commit/gitg-commit.vala b/gitg/commit/gitg-commit.vala
index 07ffd82..de1e314 100644
--- a/gitg/commit/gitg-commit.vala
+++ b/gitg/commit/gitg-commit.vala
@@ -812,13 +812,22 @@ namespace GitgCommit
if (hassub)
{
model.begin_header(_("Submodule"), (uint)Sidebar.Item.Type.SUBMODULE);
- current_submodules = append_items(model,
- dirty,
- Sidebar.Item.Type.SUBMODULE,
- selected_paths,
- (item) => {
- on_unstaged_activated(new
Gitg.StageStatusItem[] {item.item});
- });
+
+ if (dirty.length == 0)
+ {
+ model.append_dummy(_("No dirty submodules"));
+ }
+ else
+ {
+ current_submodules = append_items(model,
+ dirty,
+ Sidebar.Item.Type.SUBMODULE,
+ selected_paths,
+ (item) => {
+
on_unstaged_activated(new Gitg.StageStatusItem[] {item.item});
+ });
+ }
+
model.end_header();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]