linux note: Fix default avatar image
This commit is contained in:
parent
b244cfc7b2
commit
a32a8870ee
|
@ -15,6 +15,7 @@
|
||||||
// along with this program. If not, see (http://www.gnu.org/licenses/).
|
// along with this program. If not, see (http://www.gnu.org/licenses/).
|
||||||
|
|
||||||
|
|
||||||
|
using System.IO;
|
||||||
using Gtk;
|
using Gtk;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
@ -64,14 +65,17 @@ namespace SparkleShare {
|
||||||
Controller.UpdateTitleEvent += delegate (string title) {
|
Controller.UpdateTitleEvent += delegate (string title) {
|
||||||
Application.Invoke (delegate { Title = title; });
|
Application.Invoke (delegate { Title = title; });
|
||||||
};
|
};
|
||||||
|
|
||||||
CreateNote ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void CreateNote ()
|
private void CreateNote ()
|
||||||
{
|
{
|
||||||
var user_image = new Image (Controller.AvatarFilePath);
|
Image user_image;
|
||||||
|
|
||||||
|
if (File.Exists (Controller.AvatarFilePath))
|
||||||
|
user_image = new Image (Controller.AvatarFilePath);
|
||||||
|
else
|
||||||
|
user_image = UserInterfaceHelpers.GetImage ("user-icon-default.png");
|
||||||
|
|
||||||
/* TODO: Style the entry neatly, multiple lines, and add placeholder text
|
/* TODO: Style the entry neatly, multiple lines, and add placeholder text
|
||||||
string balloon_image_path = new string [] { UserInterface.AssetsPath, "pixmaps", "text-balloon.png" }.Combine ();
|
string balloon_image_path = new string [] { UserInterface.AssetsPath, "pixmaps", "text-balloon.png" }.Combine ();
|
||||||
|
|
Loading…
Reference in a new issue