use a 32x32 avatar in people list
This commit is contained in:
parent
e57d0a304c
commit
7222c02378
2
README
2
README
|
@ -33,7 +33,7 @@ SparklePony currently requires (in alphabetical order):
|
||||||
|
|
||||||
Installing dependencies on Fedora:
|
Installing dependencies on Fedora:
|
||||||
# yum install git gtk-sharp2 gtk-sharp2-devel mono-core notify-sharp \
|
# yum install git gtk-sharp2 gtk-sharp2-devel mono-core notify-sharp \
|
||||||
notify-sharp-devel
|
notify-sharp-devel ndesk-dbus-devel
|
||||||
|
|
||||||
You can build and install SparklePony like this:
|
You can build and install SparklePony like this:
|
||||||
$ make
|
$ make
|
||||||
|
|
BIN
data/icons/hicolor/32x32/status/avatar-default.png
Normal file
BIN
data/icons/hicolor/32x32/status/avatar-default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
|
@ -144,13 +144,6 @@ public class SparklePonyUI {
|
||||||
Directory.CreateDirectory (ConfigPath + "avatars/");
|
Directory.CreateDirectory (ConfigPath + "avatars/");
|
||||||
Console.WriteLine ("[Config] Created '" + ConfigPath + "avatars'");
|
Console.WriteLine ("[Config] Created '" + ConfigPath + "avatars'");
|
||||||
|
|
||||||
Directory.CreateDirectory (ConfigPath + "avatars/24x24/");
|
|
||||||
Console.WriteLine ("[Config] Created '" + ConfigPath +
|
|
||||||
"avatars/24x24/'");
|
|
||||||
|
|
||||||
Directory.CreateDirectory (ConfigPath + "avatars/48x48/");
|
|
||||||
Console.WriteLine ("[Config] Created '" + ConfigPath +
|
|
||||||
"avatars/48x48/'");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get all the repos in ~/SparklePony
|
// Get all the repos in ~/SparklePony
|
||||||
|
@ -626,16 +619,14 @@ public class SparklePonyWindow : Window {
|
||||||
LayoutVerticalLeft = CreateReposList ();
|
LayoutVerticalLeft = CreateReposList ();
|
||||||
LayoutVerticalLeft.BorderWidth = 12;
|
LayoutVerticalLeft.BorderWidth = 12;
|
||||||
|
|
||||||
LayoutVerticalRight = CreateDetailsView ();
|
LayoutVerticalRight = CreateDetailedView (Repositories [1]);
|
||||||
|
|
||||||
|
Label PeopleLabel = new Label ("<span font_size='large'><b>People</b></span>");
|
||||||
|
PeopleLabel.UseMarkup = true;
|
||||||
|
PeopleLabel.SetAlignment (0, 0);
|
||||||
|
|
||||||
Label PeopleLabel = new Label ("<span font_size='large'><b>People</b></span>");
|
LayoutVerticalRight.PackStart (PeopleLabel, false, false, 0);
|
||||||
PeopleLabel.UseMarkup = true;
|
LayoutVerticalRight.PackStart (CreatePeopleList (Repositories [1]), true, true, 12);
|
||||||
PeopleLabel.SetAlignment (0, 0);
|
|
||||||
|
|
||||||
LayoutVerticalRight.PackStart (PeopleLabel, false, false, 0);
|
|
||||||
|
|
||||||
LayoutVerticalRight.PackStart (CreatePeopleList (Repositories [1]), true, true, 12);
|
|
||||||
|
|
||||||
LayoutHorizontal.PackStart (LayoutVerticalLeft, false, false, 0);
|
LayoutHorizontal.PackStart (LayoutVerticalLeft, false, false, 0);
|
||||||
LayoutHorizontal.PackStart (LayoutVerticalRight, true, true, 12);
|
LayoutHorizontal.PackStart (LayoutVerticalRight, true, true, 12);
|
||||||
|
@ -713,29 +704,29 @@ public class SparklePonyWindow : Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates the detailed view
|
// Creates the detailed view
|
||||||
public VBox CreateDetailsView () {
|
public VBox CreateDetailedView (Repository Repository) {
|
||||||
|
|
||||||
Label Label1 = new Label ("Remote URL: ");
|
Label Label1 = new Label ("Remote URL: ");
|
||||||
Label1.UseMarkup = true;
|
|
||||||
Label1.SetAlignment (0, 0);
|
Label1.SetAlignment (0, 0);
|
||||||
|
|
||||||
Label Label2 = new Label ("<b>ssh://git@github.com/hbons/Dedsfdsfsal.git</b>");
|
Label Label2 = new Label ("<b>" + Repository.RemoteOriginUrl + "</b>");
|
||||||
Label2.UseMarkup = true;
|
Label2.UseMarkup = true;
|
||||||
Label2.SetAlignment (0, 0);
|
Label2.SetAlignment (0, 0);
|
||||||
|
|
||||||
Label Label5 = new Label ("Path:");
|
Label Label5 = new Label ("Path:");
|
||||||
Label5.UseMarkup = true;
|
|
||||||
Label5.SetAlignment (0, 0);
|
Label5.SetAlignment (0, 0);
|
||||||
|
|
||||||
Label Label6 = new Label ("<b>~/SparklePony/Deal</b> ");
|
Label Label6 = new Label ("<b>" + Repository.RepoPath + "</b> ");
|
||||||
Label6.UseMarkup = true;
|
Label6.UseMarkup = true;
|
||||||
Label6.SetAlignment (0, 0);
|
Label6.SetAlignment (0, 0);
|
||||||
|
|
||||||
Button NotificationsCheckButton =
|
CheckButton NotificationsCheckButton =
|
||||||
new CheckButton ("Notify me when something changes");
|
new CheckButton ("Notify me when something changes");
|
||||||
|
NotificationsCheckButton.Active = true;
|
||||||
|
|
||||||
Button ChangesCheckButton =
|
CheckButton ChangesCheckButton =
|
||||||
new CheckButton ("Synchronize my changes");
|
new CheckButton ("Synchronize my changes");
|
||||||
|
ChangesCheckButton.Active = true;
|
||||||
|
|
||||||
Table Table = new Table(7, 2, false);
|
Table Table = new Table(7, 2, false);
|
||||||
Table.RowSpacing = 6;
|
Table.RowSpacing = 6;
|
||||||
|
@ -754,10 +745,6 @@ public class SparklePonyWindow : Window {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateRepoList() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public ScrolledWindow CreateEventLog() {
|
public ScrolledWindow CreateEventLog() {
|
||||||
|
|
||||||
ListStore LogStore = new ListStore (typeof (Gdk.Pixbuf),
|
ListStore LogStore = new ListStore (typeof (Gdk.Pixbuf),
|
||||||
|
@ -844,10 +831,6 @@ public class SparklePonyWindow : Window {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateEventLog() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Creates a visual list of people working in the repo
|
// Creates a visual list of people working in the repo
|
||||||
public ScrolledWindow CreatePeopleList (Repository Repository) {
|
public ScrolledWindow CreatePeopleList (Repository Repository) {
|
||||||
|
|
||||||
|
@ -868,7 +851,6 @@ public class SparklePonyWindow : Window {
|
||||||
string [] Lines = Regex.Split (Output, "\n");
|
string [] Lines = Regex.Split (Output, "\n");
|
||||||
|
|
||||||
ListStore PeopleStore = new ListStore (typeof (Gdk.Pixbuf),
|
ListStore PeopleStore = new ListStore (typeof (Gdk.Pixbuf),
|
||||||
typeof (string),
|
|
||||||
typeof (string));
|
typeof (string));
|
||||||
|
|
||||||
TreeIter PeopleIter;
|
TreeIter PeopleIter;
|
||||||
|
@ -890,22 +872,21 @@ public class SparklePonyWindow : Window {
|
||||||
|
|
||||||
// Actually add to the list
|
// Actually add to the list
|
||||||
PeopleIter = PeopleStore.Prepend ();
|
PeopleIter = PeopleStore.Prepend ();
|
||||||
PeopleStore.SetValue (PeopleIter, 0, new Gdk.Pixbuf (SparklePonyHelpers.SparklePonyHelpers.GetAvatarFileName (UserEmail, 24)));
|
PeopleStore.SetValue (PeopleIter, 0, new Gdk.Pixbuf (SparklePonyHelpers.SparklePonyHelpers.GetAvatarFileName (UserEmail, 32)));
|
||||||
PeopleStore.SetValue (PeopleIter, 1, UserName + " ");
|
PeopleStore.SetValue (PeopleIter, 1, UserName + "\n" + UserEmail);
|
||||||
PeopleStore.SetValue (PeopleIter, 2, UserEmail + " ");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TreeView PeopleView = new TreeView (PeopleStore);
|
TreeView PeopleView = new TreeView (PeopleStore);
|
||||||
PeopleView.AppendColumn ("", new CellRendererPixbuf () , "pixbuf", 0);
|
PeopleView.AppendColumn ("", new CellRendererPixbuf () , "pixbuf", 0);
|
||||||
PeopleView.AppendColumn ("", new Gtk.CellRendererText (), "text", 1);
|
PeopleView.AppendColumn ("", new Gtk.CellRendererText (), "text", 1);
|
||||||
PeopleView.AppendColumn ("", new Gtk.CellRendererText (), "text", 2);
|
|
||||||
TreeViewColumn [] PeopleViewColumns = PeopleView.Columns;
|
TreeViewColumn [] PeopleViewColumns = PeopleView.Columns;
|
||||||
PeopleViewColumns [0].MinWidth = 32;
|
PeopleViewColumns [0].MinWidth = 48;
|
||||||
|
|
||||||
PeopleViewColumns [1].Expand = true;
|
PeopleViewColumns [1].Expand = true;
|
||||||
|
|
||||||
PeopleView.HeadersVisible = false;
|
PeopleView.HeadersVisible = false;
|
||||||
|
@ -940,8 +921,8 @@ public class SparklePonyWindow : Window {
|
||||||
|
|
||||||
namespace SparklePonyHelpers {
|
namespace SparklePonyHelpers {
|
||||||
|
|
||||||
|
// Helper that returns a user's avatar,
|
||||||
// Helper that returns a user's avatar
|
// either from a file or the web
|
||||||
class SparklePonyHelpers {
|
class SparklePonyHelpers {
|
||||||
|
|
||||||
public static string GetAvatarFileName (string Email, int Size) {
|
public static string GetAvatarFileName (string Email, int Size) {
|
||||||
|
@ -950,6 +931,11 @@ namespace SparklePonyHelpers {
|
||||||
"/.config/sparklepony/avatars/" +
|
"/.config/sparklepony/avatars/" +
|
||||||
Size + "x" + Size + "/";
|
Size + "x" + Size + "/";
|
||||||
|
|
||||||
|
if (!Directory.Exists (AvatarPath)) {
|
||||||
|
Directory.CreateDirectory (AvatarPath);
|
||||||
|
Console.WriteLine ("[Config] Created '" + AvatarPath + "'");
|
||||||
|
|
||||||
|
}
|
||||||
string AvatarFile = AvatarPath + Email;
|
string AvatarFile = AvatarPath + Email;
|
||||||
|
|
||||||
if (File.Exists (AvatarFile))
|
if (File.Exists (AvatarFile))
|
||||||
|
@ -1001,5 +987,4 @@ namespace SparklePonyHelpers {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue