[gitg] Make icon and widget properties default to null
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Make icon and widget properties default to null
- Date: Sun, 20 Jul 2014 13:48:44 +0000 (UTC)
commit 30ff01cae034d8baa64ad20f1e94f7d500b8489a
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Sun Jul 20 16:30:09 2014 +0300
Make icon and widget properties default to null
gitg/gitg-ref-action-delete.vala | 10 ----------
gitg/gitg-ref-action-rename.vala | 10 ----------
libgitg-ext/gitg-ext-ui-element.vala | 10 ++++++++--
3 files changed, 8 insertions(+), 22 deletions(-)
---
diff --git a/gitg/gitg-ref-action-delete.vala b/gitg/gitg-ref-action-delete.vala
index 6f08323..e0bd2e7 100644
--- a/gitg/gitg-ref-action-delete.vala
+++ b/gitg/gitg-ref-action-delete.vala
@@ -62,16 +62,6 @@ class RefActionDelete : GitgExt.UIElement, GitgExt.Action, GitgExt.RefAction, Ob
}
}
- public Gtk.Widget? widget
- {
- owned get { return null; }
- }
-
- public string? icon
- {
- owned get { return null; }
- }
-
public void activate()
{
var query = new GitgExt.UserQuery();
diff --git a/gitg/gitg-ref-action-rename.vala b/gitg/gitg-ref-action-rename.vala
index 475bf04..2bf6c4d 100644
--- a/gitg/gitg-ref-action-rename.vala
+++ b/gitg/gitg-ref-action-rename.vala
@@ -62,16 +62,6 @@ class RefActionRename : GitgExt.UIElement, GitgExt.Action, GitgExt.RefAction, Ob
}
}
- public Gtk.Widget? widget
- {
- owned get { return null; }
- }
-
- public string? icon
- {
- owned get { return null; }
- }
-
public void activate()
{
action_interface.edit_ref_name(reference, on_ref_name_editing_done);
diff --git a/libgitg-ext/gitg-ext-ui-element.vala b/libgitg-ext/gitg-ext-ui-element.vala
index ab2c806..d189cfb 100644
--- a/libgitg-ext/gitg-ext-ui-element.vala
+++ b/libgitg-ext/gitg-ext-ui-element.vala
@@ -64,7 +64,10 @@ public interface UIElement : Object
* If provided, the icon will be used in navigation toolbars
* so that users can switch to the ui element.
*/
- public abstract string? icon { owned get; }
+ public virtual string? icon
+ {
+ owned get { return null; }
+ }
/**
* The ui element widget.
@@ -72,7 +75,10 @@ public interface UIElement : Object
* This widget will be embedded in the gitg UI when
* the element is activated.
*/
- public abstract Gtk.Widget? widget { owned get; }
+ public virtual Gtk.Widget? widget
+ {
+ owned get { return null; }
+ }
/**
* Check whether the ui element is available in the current application state.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]