Merge lp:~raof/do-plugins/fix-firefox-icon into lp:do-plugins

Proposed by Chris Halse Rogers
Status: Merged
Merged at revision: 716
Proposed branch: lp:~raof/do-plugins/fix-firefox-icon
Merge into: lp:do-plugins
Diff against target: 168 lines (+72/-14)
6 files modified
Firefox/Firefox.mdp (+13/-11)
Firefox/Makefile.am (+2/-0)
Firefox/src/BrowseBookmarkItem.cs (+1/-1)
Firefox/src/BrowseHistoryItem.cs (+1/-1)
Firefox/src/FirefoxHelpers.cs (+54/-0)
Firefox/src/PlacesItemSource.cs (+1/-1)
To merge this branch: bzr merge lp:~raof/do-plugins/fix-firefox-icon
Reviewer Review Type Date Requested Status
Do Plugins Team Pending
Review via email: mp+18809@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Chris Halse Rogers (raof) wrote :

Wander through a list of possible firefox icons to try and grab one that actually exists.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Firefox/Firefox.mdp'
--- Firefox/Firefox.mdp 2009-06-29 08:47:41 +0000
+++ Firefox/Firefox.mdp 2010-02-07 22:08:13 +0000
@@ -1,27 +1,28 @@
1<Project name="Firefox" fileversion="2.0" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">1<Project name="Firefox" fileversion="2.0" DefaultNamespace="Firefox" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
2 <Configurations active="Debug">2 <Configurations active="Debug">
3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
4 <Output directory="bin/Debug" assembly="Firefox" />4 <Output directory="bin/Debug" assembly="Firefox" />
5 <Build debugmode="True" target="Library" />5 <Build debugmode="True" target="Library" />
6 <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />6 <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
8 </Configuration>8 </Configuration>
9 <Configuration name="Release" ctype="DotNetProjectConfiguration">9 <Configuration name="Release" ctype="DotNetProjectConfiguration">
10 <Output directory="bin/Release" assembly="Firefox" />10 <Output directory="bin/Release" assembly="Firefox" />
11 <Build debugmode="False" target="Library" />11 <Build debugmode="False" target="Library" />
12 <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />12 <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
14 </Configuration>14 </Configuration>
15 </Configurations>15 </Configurations>
16 <Contents>16 <Contents>
17 <File name="." subtype="Directory" buildaction="Compile" />17 <File subtype="Directory" buildaction="Compile" name="." />
18 <File name="src" subtype="Directory" buildaction="Compile" />18 <File subtype="Directory" buildaction="Compile" name="src" />
19 <File name="Resources/Firefox.addin.xml" subtype="Code" buildaction="EmbedAsResource" />19 <File subtype="Code" buildaction="EmbedAsResource" name="Resources/Firefox.addin.xml" />
20 <File name="src/PlacesItemSource.cs" subtype="Code" buildaction="Compile" />20 <File subtype="Code" buildaction="Compile" name="src/PlacesItemSource.cs" />
21 <File name="src/BrowseBookmarkItem.cs" subtype="Code" buildaction="Compile" />21 <File subtype="Code" buildaction="Compile" name="src/BrowseBookmarkItem.cs" />
22 <File name="src/BrowseHistoryItem.cs" subtype="Code" buildaction="Compile" />22 <File subtype="Code" buildaction="Compile" name="src/BrowseHistoryItem.cs" />
23 <File name="src/FolderItem.cs" subtype="Code" buildaction="Compile" />23 <File subtype="Code" buildaction="Compile" name="src/FolderItem.cs" />
24 <File name="src/PlaceItem.cs" subtype="Code" buildaction="Compile" />24 <File subtype="Code" buildaction="Compile" name="src/PlaceItem.cs" />
25 <File subtype="Code" buildaction="Compile" name="src/FirefoxHelpers.cs" />
25 </Contents>26 </Contents>
26 <References>27 <References>
27 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />28 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
@@ -34,5 +35,6 @@
34 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.9.0.0, Culture=neutral" />35 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.9.0.0, Culture=neutral" />
35 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.9.0.0, Culture=neutral" />36 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform.Linux, Version=0.9.0.0, Culture=neutral" />
36 <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.9.0.0, Culture=neutral" />37 <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.9.0.0, Culture=neutral" />
38 <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
37 </References>39 </References>
38</Project>40</Project>
39\ No newline at end of file41\ No newline at end of file
4042
=== modified file 'Firefox/Makefile.am'
--- Firefox/Makefile.am 2009-06-22 04:05:16 +0000
+++ Firefox/Makefile.am 2010-02-07 22:08:14 +0000
@@ -5,6 +5,7 @@
5FILES = \5FILES = \
6 src/BrowseBookmarkItem.cs \6 src/BrowseBookmarkItem.cs \
7 src/BrowseHistoryItem.cs \7 src/BrowseHistoryItem.cs \
8 src/FirefoxHelpers.cs \
8 src/FolderItem.cs \9 src/FolderItem.cs \
9 src/PlaceItem.cs \10 src/PlaceItem.cs \
10 src/PlacesItemSource.cs11 src/PlacesItemSource.cs
@@ -17,5 +18,6 @@
17 System.Core \18 System.Core \
18 System.Data \19 System.Data \
19 Mono.Data.SqliteClient \20 Mono.Data.SqliteClient \
21 $(GTK_SHARP_20_LIBS) \
20 $(DO_PLATFORM_LIBS) \22 $(DO_PLATFORM_LIBS) \
21 $(DO_UNIVERSE_LIBS)23 $(DO_UNIVERSE_LIBS)
2224
=== modified file 'Firefox/src/BrowseBookmarkItem.cs'
--- Firefox/src/BrowseBookmarkItem.cs 2009-06-22 04:05:16 +0000
+++ Firefox/src/BrowseBookmarkItem.cs 2010-02-07 22:08:13 +0000
@@ -35,7 +35,7 @@
35 }35 }
36 36
37 public override string Icon {37 public override string Icon {
38 get { return "firefox-3.0"; } 38 get { return FirefoxHelpers.IconName; }
39 }39 }
40 }40 }
41}41}
4242
=== modified file 'Firefox/src/BrowseHistoryItem.cs'
--- Firefox/src/BrowseHistoryItem.cs 2009-06-22 04:05:16 +0000
+++ Firefox/src/BrowseHistoryItem.cs 2010-02-07 22:08:13 +0000
@@ -37,7 +37,7 @@
37 }37 }
38 38
39 public override string Icon {39 public override string Icon {
40 get { return "firefox-3.0"; }40 get { return FirefoxHelpers.IconName; }
41 }41 }
42 }42 }
43}43}
4444
=== added file 'Firefox/src/FirefoxHelpers.cs'
--- Firefox/src/FirefoxHelpers.cs 1970-01-01 00:00:00 +0000
+++ Firefox/src/FirefoxHelpers.cs 2010-02-07 22:08:13 +0000
@@ -0,0 +1,54 @@
1// FirefoxHelpers.cs
2// GNOME Do is the legal property of its developers, whose names are too
3// numerous to list here. Please refer to the COPYRIGHT file distributed with
4// this source distribution.
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19using System;
20using Gtk;
21
22namespace Firefox
23{
24 public static class FirefoxHelpers
25 {
26 public static string IconName {get; private set;}
27
28 static FirefoxHelpers ()
29 {
30 // List a whole bunch of possible names for the firefox icon.
31 string[] iconNames = new string [] {
32 "firefox",
33 "iceweasel",
34 "firefox-4.0",
35 "firefox-3.9",
36 "firefox-3.8",
37 "firefox-3.7",
38 "firefox-3.6",
39 "firefox-3.5",
40 "firefox-3.0",
41 };
42
43 // Start with "firefox". If we can't find an icon in the theme,
44 // at least "firefox" makes our intent clear.
45 IconName = "firefox";
46 foreach (string iconName in iconNames) {
47 if (IconTheme.Default.HasIcon (iconName)) {
48 IconName = iconName;
49 break;
50 }
51 }
52 }
53 }
54}
055
=== modified file 'Firefox/src/PlacesItemSource.cs'
--- Firefox/src/PlacesItemSource.cs 2009-09-05 02:06:59 +0000
+++ Firefox/src/PlacesItemSource.cs 2010-02-07 22:08:13 +0000
@@ -74,7 +74,7 @@
74 }74 }
7575
76 public override string Icon {76 public override string Icon {
77 get { return "firefox-3.0"; }77 get { return FirefoxHelpers.IconName; }
78 }78 }
7979
80 public override IEnumerable<Item> Items {80 public override IEnumerable<Item> Items {

Subscribers

People subscribed via source and target branches