rpms/thunderbird/FC-3 firefox-1.0-gtk-system-colors.patch, NONE, 1.1 firefox-1.0-remote-intern-atoms.patch, NONE, 1.1 thunderbird.spec, 1.19, 1.20

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Mar 24 15:24:21 UTC 2005


Update of /cvs/dist/rpms/thunderbird/FC-3
In directory cvs.devel.redhat.com:/tmp/cvs-serv6424

Modified Files:
	thunderbird.spec 
Added Files:
	firefox-1.0-gtk-system-colors.patch 
	firefox-1.0-remote-intern-atoms.patch 
Log Message:
* Thu Mar 24 2005 Christopher Aillon <caillon at redhat.com> 1.0.2-1.3.2
- Add patch to request the correct system color from gtk
- Add patch to reduce round trips to the X-server during remote control


firefox-1.0-gtk-system-colors.patch:
 nsLookAndFeel.cpp |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

--- NEW FILE firefox-1.0-gtk-system-colors.patch ---
Index: widget/src/gtk2/nsLookAndFeel.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/gtk2/nsLookAndFeel.cpp,v
retrieving revision 1.20
diff -d -u -p -r1.20 nsLookAndFeel.cpp
--- widget/src/gtk2/nsLookAndFeel.cpp	17 Dec 2004 05:39:19 -0000	1.20
+++ widget/src/gtk2/nsLookAndFeel.cpp	22 Feb 2005 20:13:35 -0000
@@ -78,17 +78,16 @@ nsLookAndFeel::~nsLookAndFeel()
 nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor& aColor)
 {
     nsresult res = NS_OK;
-    aColor = 0; // default color black
 
     switch (aID) {
         // These colors don't seem to be used for anything anymore in Mozilla
         // (except here at least TextSelectBackground and TextSelectForeground)
         // The CSS2 colors below are used.
     case eColor_WindowBackground:
-        aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]);
+        aColor = GDK_COLOR_TO_NS_RGB(mStyle->base[GTK_STATE_NORMAL]);
         break;
     case eColor_WindowForeground:
-        aColor = GDK_COLOR_TO_NS_RGB(mStyle->fg[GTK_STATE_NORMAL]);
+        aColor = GDK_COLOR_TO_NS_RGB(mStyle->text[GTK_STATE_NORMAL]);
         break;
     case eColor_WidgetBackground:
         aColor = GDK_COLOR_TO_NS_RGB(mStyle->bg[GTK_STATE_NORMAL]);

firefox-1.0-remote-intern-atoms.patch:
 gtk/nsGtkMozRemoteHelper.cpp    |   45 +++++++++++++++++++++++++---------------
 gtk2/nsGtkMozRemoteHelper.cpp   |   45 +++++++++++++++++++++++++---------------
 xremoteclient/XRemoteClient.cpp |   34 +++++++++++++++++++++++-------
 3 files changed, 84 insertions(+), 40 deletions(-)

--- NEW FILE firefox-1.0-remote-intern-atoms.patch ---
? widget/src/gtk/dependentLibs.h
? widget/src/gtk2/dependentLibs.h
? widget/src/xremoteclient/dependentLibs.h
Index: widget/src/gtk/nsGtkMozRemoteHelper.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/gtk/nsGtkMozRemoteHelper.cpp,v
retrieving revision 1.35
diff -d -u -p -r1.35 nsGtkMozRemoteHelper.cpp
--- widget/src/gtk/nsGtkMozRemoteHelper.cpp	18 Apr 2004 22:00:16 -0000	1.35
+++ widget/src/gtk/nsGtkMozRemoteHelper.cpp	16 Feb 2005 05:10:05 -0000
@@ -62,6 +62,20 @@ Atom nsGtkMozRemoteHelper::sMozUserAtom 
 Atom nsGtkMozRemoteHelper::sMozProfileAtom  = 0;
 Atom nsGtkMozRemoteHelper::sMozProgramAtom  = 0;
 
+#define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0]))
+
+// Minimize the roundtrips to the X-server
+static char *XAtomNames[] = {
+  MOZILLA_VERSION_PROP,
+  MOZILLA_LOCK_PROP,
+  MOZILLA_COMMAND_PROP,
+  MOZILLA_RESPONSE_PROP,
+  MOZILLA_USER_PROP,
+  MOZILLA_PROFILE_PROP,
+  MOZILLA_PROGRAM_PROP
+};
+static Atom XAtoms[ARRAY_LENGTH(XAtomNames)];
+
 // XXX get this dynamically
 static const char sRemoteVersion[]   = "5.0";
 
@@ -200,23 +214,22 @@ nsGtkMozRemoteHelper::HandlePropertyChan
 void
 nsGtkMozRemoteHelper::EnsureAtoms(void)
 {
- // init our atoms if we need to
-  if (!sMozVersionAtom)
-    sMozVersionAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_VERSION_PROP, False);
-  if (!sMozLockAtom)
-    sMozLockAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_LOCK_PROP, False);
-  if (!sMozCommandAtom)
-    sMozCommandAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_COMMAND_PROP, False);
-  if (!sMozResponseAtom)
-    sMozResponseAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_RESPONSE_PROP,
-				   False);
-  if (!sMozUserAtom)
-    sMozUserAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_USER_PROP, False);
-  if (!sMozProfileAtom)
-    sMozProfileAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_PROFILE_PROP, False);
-  if (!sMozProgramAtom)
-    sMozProgramAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_PROGRAM_PROP, False);
+  // init our atoms if we need to
+  static PRBool initialized;
+  if (!initialized) {
+    XInternAtoms(GDK_DISPLAY(), XAtomNames, ARRAY_LENGTH(XAtomNames), False, XAtoms);
 
+    int i = 0;
+    sMozVersionAtom  = XAtoms[i++];
+    sMozLockAtom     = XAtoms[i++];
+    sMozCommandAtom  = XAtoms[i++];
+    sMozResponseAtom = XAtoms[i++];
+    sMozUserAtom     = XAtoms[i++];
+    sMozProfileAtom  = XAtoms[i++];
+    sMozProgramAtom  = XAtoms[i++];
+
+    initialized = PR_TRUE;
+  }
 }
 
 
Index: widget/src/gtk2/nsGtkMozRemoteHelper.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/gtk2/nsGtkMozRemoteHelper.cpp,v
retrieving revision 1.5
diff -d -u -p -r1.5 nsGtkMozRemoteHelper.cpp
--- widget/src/gtk2/nsGtkMozRemoteHelper.cpp	18 Apr 2004 22:00:17 -0000	1.5
+++ widget/src/gtk2/nsGtkMozRemoteHelper.cpp	16 Feb 2005 05:10:06 -0000
@@ -65,6 +65,20 @@ Atom nsGtkMozRemoteHelper::sMozUserAtom 
 Atom nsGtkMozRemoteHelper::sMozProfileAtom  = 0;
 Atom nsGtkMozRemoteHelper::sMozProgramAtom  = 0;
 
+#define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0]))
+
+// Minimize the roundtrips to the X-server
+static char *XAtomNames[] = {
+  MOZILLA_VERSION_PROP,
+  MOZILLA_LOCK_PROP,
+  MOZILLA_COMMAND_PROP,
+  MOZILLA_RESPONSE_PROP,
+  MOZILLA_USER_PROP,
+  MOZILLA_PROFILE_PROP,
+  MOZILLA_PROGRAM_PROP
+};
+static Atom XAtoms[ARRAY_LENGTH(XAtomNames)];
+
 // XXX get this dynamically
 static const char sRemoteVersion[]   = "5.0";
 
@@ -203,23 +217,22 @@ nsGtkMozRemoteHelper::HandlePropertyChan
 void
 nsGtkMozRemoteHelper::EnsureAtoms(void)
 {
- // init our atoms if we need to
-  if (!sMozVersionAtom)
-    sMozVersionAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_VERSION_PROP, False);
-  if (!sMozLockAtom)
-    sMozLockAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_LOCK_PROP, False);
-  if (!sMozCommandAtom)
-    sMozCommandAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_COMMAND_PROP, False);
-  if (!sMozResponseAtom)
-    sMozResponseAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_RESPONSE_PROP,
-				   False);
-  if (!sMozUserAtom)
-    sMozUserAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_USER_PROP, False);
-  if (!sMozProfileAtom)
-    sMozProfileAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_PROFILE_PROP, False);
-  if (!sMozProgramAtom)
-    sMozProgramAtom = XInternAtom(GDK_DISPLAY(), MOZILLA_PROGRAM_PROP, False);
+  // init our atoms if we need to
+  static PRBool initialized;
+  if (!initialized) {
+    XInternAtoms(GDK_DISPLAY(), XAtomNames, ARRAY_LENGTH(XAtomNames), False, XAtoms);
 
+    int i = 0;
+    sMozVersionAtom  = XAtoms[i++];
+    sMozLockAtom     = XAtoms[i++];
+    sMozCommandAtom  = XAtoms[i++];
+    sMozResponseAtom = XAtoms[i++];
+    sMozUserAtom     = XAtoms[i++];
+    sMozProfileAtom  = XAtoms[i++];
+    sMozProgramAtom  = XAtoms[i++];
+
+    initialized = PR_TRUE;
+  }
 }
 
 
Index: widget/src/xremoteclient/XRemoteClient.cpp
===================================================================
RCS file: /cvsroot/mozilla/widget/src/xremoteclient/XRemoteClient.cpp,v
retrieving revision 1.15
diff -d -u -p -r1.15 XRemoteClient.cpp
--- widget/src/xremoteclient/XRemoteClient.cpp	18 Apr 2004 22:00:39 -0000	1.15
+++ widget/src/xremoteclient/XRemoteClient.cpp	16 Feb 2005 05:10:06 -0000
@@ -64,6 +64,8 @@
 #define MOZILLA_PROFILE_PROP   "_MOZILLA_PROFILE"
 #define MOZILLA_PROGRAM_PROP   "_MOZILLA_PROGRAM"
 
+#define ARRAY_LENGTH(array_) (sizeof(array_)/sizeof(array_[0]))
+
 static PRLogModuleInfo *sRemoteLm = NULL;
 
 XRemoteClient::XRemoteClient()
@@ -93,6 +95,19 @@ XRemoteClient::~XRemoteClient()
 NS_IMPL_ISUPPORTS1(XRemoteClient, nsIXRemoteClient)
 #endif
 
+// Minimize the roundtrips to the X-server
+static char *XAtomNames[] = {
+  MOZILLA_VERSION_PROP,
+  MOZILLA_LOCK_PROP,
+  MOZILLA_COMMAND_PROP,
+  MOZILLA_RESPONSE_PROP,
+  "WM_STATE",
+  MOZILLA_USER_PROP,
+  MOZILLA_PROFILE_PROP,
+  MOZILLA_PROGRAM_PROP
+};
+static Atom XAtoms[ARRAY_LENGTH(XAtomNames)];
+
 NS_IMETHODIMP
 XRemoteClient::Init (void)
 {
@@ -106,14 +121,17 @@ XRemoteClient::Init (void)
     return NS_ERROR_FAILURE;
 
   // get our atoms
-  mMozVersionAtom  = XInternAtom(mDisplay, MOZILLA_VERSION_PROP, False);
-  mMozLockAtom     = XInternAtom(mDisplay, MOZILLA_LOCK_PROP, False);
-  mMozCommandAtom  = XInternAtom(mDisplay, MOZILLA_COMMAND_PROP, False);
-  mMozResponseAtom = XInternAtom(mDisplay, MOZILLA_RESPONSE_PROP, False);
-  mMozWMStateAtom  = XInternAtom(mDisplay, "WM_STATE", False);
-  mMozUserAtom     = XInternAtom(mDisplay, MOZILLA_USER_PROP, False);
-  mMozProfileAtom  = XInternAtom(mDisplay, MOZILLA_PROFILE_PROP, False);
-  mMozProgramAtom  = XInternAtom(mDisplay, MOZILLA_PROGRAM_PROP, False);
+  XInternAtoms(mDisplay, XAtomNames, ARRAY_LENGTH(XAtomNames), False, XAtoms);
+
+  int i = 0;
+  mMozVersionAtom  = XAtoms[i++];
+  mMozLockAtom     = XAtoms[i++];
+  mMozCommandAtom  = XAtoms[i++];
+  mMozResponseAtom = XAtoms[i++];
+  mMozWMStateAtom  = XAtoms[i++];
+  mMozUserAtom     = XAtoms[i++];
+  mMozProfileAtom  = XAtoms[i++];
+  mMozProgramAtom  = XAtoms[i++];
 
   mInitialized = PR_TRUE;
 


Index: thunderbird.spec
===================================================================
RCS file: /cvs/dist/rpms/thunderbird/FC-3/thunderbird.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- thunderbird.spec	23 Mar 2005 16:36:43 -0000	1.19
+++ thunderbird.spec	24 Mar 2005 15:24:19 -0000	1.20
@@ -8,7 +8,7 @@
 Summary:	Mozilla Thunderbird mail/newsgroup client
 Name:		thunderbird
 Version:	1.0.2
-Release:	1.3.1
+Release:	1.3.2
 Epoch:		0
 URL:		http://www.mozilla.org/projects/thunderbird/
 License:	MPL
@@ -57,6 +57,8 @@
 Patch106:       thunderbird-1.0-useragent.patch
 Patch107:       firefox-1.0-execshield-nspr.patch
 Patch108:       firefox-1.0-execshield-xpcom.patch
+Patch109:       firefox-1.0-gtk-system-colors.patch
+Patch110:       firefox-1.0-remote-intern-atoms.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	libpng-devel, libjpeg-devel, gtk2-devel
@@ -112,6 +114,8 @@
 %patch106 -p0
 %patch107 -p0
 %patch108 -p0
+%patch109 -p0
+%patch110 -p0
 
 #===============================================================================
 
@@ -185,6 +189,10 @@
 #===============================================================================
 
 %changelog
+* Thu Mar 24 2005 Christopher Aillon <caillon at redhat.com> 1.0.2-1.3.2
+- Add patch to request the correct system color from gtk
+- Add patch to reduce round trips to the X-server during remote control
+
 * Wed Mar 23 2005 Christopher Aillon <caillon at redhat.com> 1.0.2-1.3.1
 - Thunderbird 1.0.2
 - Enable pango rendering




More information about the fedora-cvs-commits mailing list