[arch-commits] Commit in firefox/repos (3 files)
Jan de Groot
jgc at archlinux.org
Sat Jul 26 10:45:54 UTC 2008
Date: Saturday, July 26, 2008 @ 06:45:54
Author: jgc
Revision: 6656
Merged revisions 5548-6655 via svnmerge from
svn+ssh://svn.archlinux.org/home/svn-packages/firefox/trunk
........
r6655 | jgc | 2008-07-26 10:45:43 +0000 (Sat, 26 Jul 2008) | 2 lines
upgpkg: firefox 3.0.1-2
Add mime-types and shared-mime-info dependency (FS#10419), add patch to fix GNOME background color parsing (FS#10836)
........
Added:
firefox/repos/extra-x86_64/mozbug421977.patch
(from rev 6655, firefox/trunk/mozbug421977.patch)
Modified:
firefox/repos/extra-x86_64/ (properties)
firefox/repos/extra-x86_64/PKGBUILD
--------------------+
PKGBUILD | 14 +++-
mozbug421977.patch | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 168 insertions(+), 4 deletions(-)
Property changes on: firefox/repos/extra-x86_64
___________________________________________________________________
Name: svnmerge-integrated
- /firefox/trunk:1-5547
+ /firefox/trunk:1-6655
Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2008-07-26 10:45:43 UTC (rev 6655)
+++ extra-x86_64/PKGBUILD 2008-07-26 10:45:54 UTC (rev 6656)
@@ -4,11 +4,11 @@
pkgname=firefox
pkgver=3.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="Standalone web browser from mozilla.org"
arch=(i686 x86_64)
license=('MPL' 'GPL' 'LGPL')
-depends=('xulrunner>=1.9.0.1' 'startup-notification' 'desktop-file-utils')
+depends=('xulrunner>=1.9.0.1-2' 'desktop-file-utils' 'mime-types' 'shared-mime-info')
makedepends=('zip' 'pkgconfig' 'diffutils' 'libgnomeui>=2.22.1' 'python' 'xorg-server')
replaces=('firefox3')
install=firefox.install
@@ -18,19 +18,25 @@
firefox.desktop
firefox-safe.desktop
mozilla-firefox-1.0-lang.patch
- mozilla-firstrun.patch)
+ mozilla-firstrun.patch
+ mozbug421977.patch)
md5sums=('406d67174f8f74ab154a1b17d0881b27'
'8b6e5f7d0a9e3f64747a024cf8f12069'
'68cf02788491c6e846729b2f2913bf79'
'5e68cabfcf3c021806b326f664ac505e'
'bd5db57c23c72a02a489592644f18995'
- '0f935d428ae3a94c00d06d92c4142498')
+ '0f935d428ae3a94c00d06d92c4142498'
+ '7976e3ff52e01af3388dfc3a479c4955')
build() {
cd ${srcdir}/mozilla
patch -Np1 -i ${srcdir}/mozilla-firefox-1.0-lang.patch || return 1
patch -Np1 -i ${srcdir}/mozilla-firstrun.patch || return 1
+
+ # FS#10836: fixes backgroundcolor parsing with gnome
+ patch -Np0 -i ${srcdir}/mozbug421977.patch || return 1
+
cp ${srcdir}/mozconfig .mozconfig
unset CFLAGS
Copied: firefox/repos/extra-x86_64/mozbug421977.patch (from rev 6655, firefox/trunk/mozbug421977.patch)
===================================================================
--- extra-x86_64/mozbug421977.patch (rev 0)
+++ extra-x86_64/mozbug421977.patch 2008-07-26 10:45:54 UTC (rev 6656)
@@ -0,0 +1,158 @@
+Index: browser/components/shell/src/nsGNOMEShellService.cpp
+===================================================================
+RCS file: /cvsroot/mozilla/browser/components/shell/src/nsGNOMEShellService.cpp,v
+retrieving revision 1.21
+diff -d -u -p -U 8 -r1.21 nsGNOMEShellService.cpp
+--- browser/components/shell/src/nsGNOMEShellService.cpp 1 Oct 2007 18:25:26 -0000 1.21
++++ browser/components/shell/src/nsGNOMEShellService.cpp 15 Mar 2008 07:08:47 -0000
+@@ -58,16 +58,17 @@
+ #include "nsIImage.h"
+ #include "prprf.h"
+ #ifdef MOZ_WIDGET_GTK2
+ #include "nsIImageToPixbuf.h"
+ #endif
+
+ #include <glib.h>
+ #include <glib-object.h>
++#include <gdk/gdk.h>
+ #include <gdk-pixbuf/gdk-pixbuf.h>
+ #include <limits.h>
+ #include <stdlib.h>
+
+ struct ProtocolAssociation
+ {
+ const char *name;
+ PRBool essential;
+@@ -442,117 +443,56 @@ nsGNOMEShellService::SetDesktopBackgroun
+ EmptyCString());
+
+ gconf->SetString(NS_LITERAL_CSTRING(kDesktopImageKey), filePath);
+ gconf->SetBool(NS_LITERAL_CSTRING(kDesktopDrawBGKey), PR_TRUE);
+
+ return rv;
+ }
+
+-// In: pointer to two characters CC
+-// Out: parsed color number
+-static PRUint8
+-HexToNum(char ch)
+-{
+- if ('0' <= ch && '9' >= ch)
+- return ch - '0';
+-
+- if ('A' <= ch && 'F' >= ch)
+- return ch - 'A';
+-
+- if ('a' <= ch && 'f' >= ch)
+- return ch - 'a';
+-
+- return 0;
+-}
+-
+-
+-// In: 3 or 6-character RRGGBB hex string
+-// Out: component colors
+-static PRBool
+-HexToRGB(const nsCString& aColorSpec,
+- PRUint8 &aRed,
+- PRUint8 &aGreen,
+- PRUint8 &aBlue)
+-{
+- const char *buf = aColorSpec.get();
+-
+- if (aColorSpec.Length() == 6) {
+- aRed = HexToNum(buf[0]) >> 4 |
+- HexToNum(buf[1]);
+- aGreen = HexToNum(buf[2]) >> 4 |
+- HexToNum(buf[3]);
+- aBlue = HexToNum(buf[4]) >> 4 |
+- HexToNum(buf[5]);
+- return PR_TRUE;
+- }
+-
+- if (aColorSpec.Length() == 3) {
+- aRed = HexToNum(buf[0]);
+- aGreen = HexToNum(buf[1]);
+- aBlue = HexToNum(buf[2]);
+-
+- aRed |= aRed >> 4;
+- aGreen |= aGreen >> 4;
+- aBlue |= aBlue >> 4;
+-
+- return PR_TRUE;
+- }
+-
+- return PR_FALSE;
+-}
++#define COLOR_16_TO_8_BIT(_c) ((_c) >> 8)
++#define COLOR_8_TO_16_BIT(_c) ((_c) << 8)
+
+ NS_IMETHODIMP
+ nsGNOMEShellService::GetDesktopBackgroundColor(PRUint32 *aColor)
+ {
+ nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+
+ nsCAutoString background;
+ gconf->GetString(NS_LITERAL_CSTRING(kDesktopColorKey), background);
+
+ if (background.IsEmpty()) {
+ *aColor = 0;
+ return NS_OK;
+ }
+
+- // Chop off the leading '#' character
+- background.Cut(0, 1);
++ GdkColor color;
++ gboolean success = gdk_color_parse(background.get(), &color);
+
+- PRUint8 red, green, blue;
+- if (!HexToRGB(background, red, green, blue))
+- return NS_ERROR_FAILURE;
++ NS_ENSURE_TRUE(success, NS_ERROR_FAILURE);
+
+- // The result must be in RGB order with the high 8 bits zero.
+- *aColor = (red << 16 | green << 8 | blue);
++ *aColor = COLOR_16_TO_8_BIT(color.red) << 16 |
++ COLOR_16_TO_8_BIT(color.green) << 8 |
++ COLOR_16_TO_8_BIT(color.blue);
+ return NS_OK;
+ }
+
+-static void
+-ColorToHex(PRUint32 aColor, nsCString& aResult)
+-{
+- char *buf = aResult.BeginWriting(7);
+- if (!buf)
+- return;
+-
+- PRUint8 red = (aColor >> 16);
+- PRUint8 green = (aColor >> 8) & 0xff;
+- PRUint8 blue = aColor & 0xff;
+-
+- PR_snprintf(buf, 8, "#%02x%02x%02x", red, green, blue);
+-}
+-
+ NS_IMETHODIMP
+ nsGNOMEShellService::SetDesktopBackgroundColor(PRUint32 aColor)
+ {
+ nsCOMPtr<nsIGConfService> gconf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+
+- nsCString colorString;
+- ColorToHex(aColor, colorString);
++ GdkColor color;
++ color.red = COLOR_8_TO_16_BIT(aColor >> 16);
++ color.green = COLOR_8_TO_16_BIT((aColor >> 8) & 0xff);
++ color.blue = COLOR_8_TO_16_BIT(aColor & 0xff);
+
+- gconf->SetString(NS_LITERAL_CSTRING(kDesktopColorKey), colorString);
++ gchar *colorString = gdk_color_to_string(&color);
++ gconf->SetString(NS_LITERAL_CSTRING(kDesktopColorKey), nsDependentCString(colorString));
++ g_free (colorString);
+
+ return NS_OK;
+ }
+
+ NS_IMETHODIMP
+ nsGNOMEShellService::OpenApplication(PRInt32 aApplication)
+ {
+ nsCAutoString scheme;
More information about the arch-commits
mailing list