mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-09-13 13:11:42 +00:00
Implement defaults for some interface methods
This commit is contained in:
parent
5c1b7f9f0a
commit
dfc12858f9
|
@ -33,7 +33,9 @@ public interface Activity : Object, UIElement
|
|||
* Method called to reload the activity.
|
||||
*
|
||||
*/
|
||||
public abstract void reload();
|
||||
public virtual void reload()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the activity is the default for the specified action.
|
||||
|
@ -44,7 +46,10 @@ public interface Activity : Object, UIElement
|
|||
* %FALSE otherwise.
|
||||
*
|
||||
*/
|
||||
public abstract bool is_default_for(string action);
|
||||
public virtual bool is_default_for(string action)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -74,7 +74,10 @@ public interface UIElement : Object
|
|||
* element is not available, it will not be shown.
|
||||
*
|
||||
*/
|
||||
public abstract bool available { get; }
|
||||
public virtual bool available
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the ui element is enabled in the current application state.
|
||||
|
@ -83,7 +86,10 @@ public interface UIElement : Object
|
|||
* element is enabled (sensitive) given the current state of the application.
|
||||
*
|
||||
*/
|
||||
public abstract bool enabled { get; }
|
||||
public virtual bool enabled
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
/**
|
||||
* Negotiate the order with another UIElement.
|
||||
|
@ -96,7 +102,10 @@ public interface UIElement : Object
|
|||
* unimportant.
|
||||
*
|
||||
*/
|
||||
public abstract int negotiate_order(UIElement other);
|
||||
public virtual int negotiate_order(UIElement other)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate the UIELement.
|
||||
|
|
Loading…
Reference in a new issue