From 058f5442823cd2c902431193b87318d05a278d67 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 22 May 2010 18:29:57 +0100 Subject: [PATCH] add service icons to the autocomplete list --- SparkleShare/SparkleDialog.cs | 28 +++++++++++++----- SparkleShare/SparkleHelpers.cs | 5 +++- .../hicolor/16x16/places/fedorahosted.png | Bin 0 -> 747 bytes data/icons/hicolor/16x16/places/github.png | Bin 0 -> 440 bytes data/icons/hicolor/16x16/places/gnome.png | Bin 0 -> 650 bytes 5 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 data/icons/hicolor/16x16/places/fedorahosted.png create mode 100644 data/icons/hicolor/16x16/places/github.png create mode 100644 data/icons/hicolor/16x16/places/gnome.png diff --git a/SparkleShare/SparkleDialog.cs b/SparkleShare/SparkleDialog.cs index 3e115e78..14855203 100644 --- a/SparkleShare/SparkleDialog.cs +++ b/SparkleShare/SparkleDialog.cs @@ -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); diff --git a/SparkleShare/SparkleHelpers.cs b/SparkleShare/SparkleHelpers.cs index a4b1a53d..47b580e9 100644 --- a/SparkleShare/SparkleHelpers.cs +++ b/SparkleShare/SparkleHelpers.cs @@ -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); } diff --git a/data/icons/hicolor/16x16/places/fedorahosted.png b/data/icons/hicolor/16x16/places/fedorahosted.png new file mode 100644 index 0000000000000000000000000000000000000000..84287bbb1f13ba5097807865434cc88bec3bea59 GIT binary patch literal 747 zcmVizbV;y-bm-DkllFA8o+SWSN_f15i+Ter~N{ z*13y!E&2@r0pV%@DFwTGs&sd`J=A%9?Ecs+J_sFlW^l?8)VCaG_+k%z!Djr8Zd|71 z)sx#yCo{a9N~3jw_0)pH>~sLG+CyHBgw7#^fixumHPRrL|Lvfl+5VnlbNMs5?3M#a zmVV*zv2FnDxwqV(Dhggdy92=B@ZD-1f)+D|bFMvD&(21=oK9_xL@8Z888C#NECKR6 zSq^v_Fl5oxnbQIMjcyjdt^K7s<9=6cqSV5M{gI}wUam*4(9`arue*i3Dlqo^O_f~I zrc_Y?$H8)T)h3;sCfwmA9B3w)1jTC$=VbG2X$LCB!+7wKhFC#0|P|rRSG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