add service icons to the autocomplete list
This commit is contained in:
parent
79b3a2c5bf
commit
058f544282
|
@ -52,19 +52,33 @@ namespace SparkleShare {
|
|||
|
||||
RemoteUrlCombo = new ComboBoxEntry ();
|
||||
|
||||
ListStore Defaults = new ListStore (typeof (string));
|
||||
ListStore Defaults = new ListStore (typeof (string),
|
||||
typeof (Gdk.Pixbuf));
|
||||
|
||||
|
||||
|
||||
Defaults.AppendValues ("ssh://git@github.com/");
|
||||
Defaults.AppendValues ("ssh://git@git.gnome.org/");
|
||||
Defaults.AppendValues ("ssh://git@fedorahosted.org/");
|
||||
Defaults.AppendValues ("ssh://git@gitorious.org/");
|
||||
|
||||
RemoteUrlCombo.Entry.Completion = new EntryCompletion ();
|
||||
|
||||
CellRendererPixbuf CellRendererPixbuf = new CellRendererPixbuf ();
|
||||
RemoteUrlCombo.Entry.Completion.Model = Defaults;
|
||||
RemoteUrlCombo.Entry.Completion.PackStart (CellRendererPixbuf, false);
|
||||
RemoteUrlCombo.Entry.Completion.AddAttribute (CellRendererPixbuf, "pixbuf", 1);
|
||||
RemoteUrlCombo.Entry.Completion.InlineCompletion = true;
|
||||
RemoteUrlCombo.Entry.Completion.PopupCompletion = true;;
|
||||
RemoteUrlCombo.Entry.Completion.TextColumn = 0;
|
||||
|
||||
Defaults.AppendValues ("ssh://git@github.com/",
|
||||
SparkleHelpers.GetIcon ("github", 16));
|
||||
Defaults.AppendValues ("ssh://git@git.gnome.org/",
|
||||
SparkleHelpers.GetIcon ("gnome", 16));
|
||||
Defaults.AppendValues ("ssh://git@fedorahosted.org/",
|
||||
SparkleHelpers.GetIcon ("fedorahosted", 16));
|
||||
Defaults.AppendValues ("ssh://git@gitorious.org/",
|
||||
null);
|
||||
|
||||
Label RemoteUrlExample = new Label (_("These usually look something like this:\n ") +
|
||||
_("‘sparkle://sparkleshare.org/SparkleShare’."));
|
||||
_("‘git://git@gnome.org/project’."));
|
||||
|
||||
RemoteUrlExample.UseMarkup = true;
|
||||
RemoteUrlExample.SetAlignment (0, 0);
|
||||
|
|
|
@ -91,7 +91,10 @@ namespace SparkleShare {
|
|||
|
||||
// Looks up an icon from the system's theme
|
||||
public static Gdk.Pixbuf GetIcon (string Name, int Size) {
|
||||
SparkleTheme.AppendSearchPath (SparklePaths.SparkleInstallPath);
|
||||
|
||||
SparkleTheme.AppendSearchPath
|
||||
(CombineMore (SparklePaths.SparkleInstallPath, "icons"));
|
||||
|
||||
return SparkleTheme.LoadIcon (Name, Size,
|
||||
IconLookupFlags.GenericFallback);
|
||||
}
|
||||
|
|
BIN
data/icons/hicolor/16x16/places/fedorahosted.png
Normal file
BIN
data/icons/hicolor/16x16/places/fedorahosted.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 747 B |
BIN
data/icons/hicolor/16x16/places/github.png
Normal file
BIN
data/icons/hicolor/16x16/places/github.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 440 B |
BIN
data/icons/hicolor/16x16/places/gnome.png
Normal file
BIN
data/icons/hicolor/16x16/places/gnome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 650 B |
Loading…
Reference in a new issue