[meego-commits] 7408: Changes to Trunk:Testing/fennec-qt

Roger WANG no_reply at build.meego.com
Thu Sep 9 05:06:52 UTC 2010


Hi,
I have made the following changes to fennec-qt in project Trunk:Testing. Please review and accept ASAP.

Thank You,
Roger WANG

[This message was auto-generated]

---

Request #7408:

  submit:   devel:browser/fennec-qt(r18) -> Trunk:Testing/fennec-qt


Message:
    None

State:   new          2010-09-08T22:06:51 wwang29
Comment: None



changes files:
--------------
--- fennec-qt.changes
+++ fennec-qt.changes
@@ -0,0 +1,7 @@
+* Thu Sep  9 03:55:30 UTC 2010 Halton Huo <halton.huo at intel.com> - 2.0a1pre0824.4
+- Remove theme cause it is now in project fennec-qt-branding-meego
+
+* Tue Sep  7 15:56:41 CST 2010 Roger Wang <roger.wang at intel.com> - 2.0a1pre0824.3
+- restore linking with MTF (BMC#6244, BMC#6385)
+- added VKB patch left behind
+

old:
----
  meego-theme.tar.gz

spec files:
-----------
--- fennec-qt.spec
+++ fennec-qt.spec
@@ -8,7 +8,7 @@
 
 Name:       fennec-qt
 Summary:    Fennec Mobile Web Browser with Qt/MeeGo Touch
-Version:    2.0a1pre0824.2
+Version:    2.0a1pre0824.4
 Release:    1
 Group:      Applications/Internet
 License:    MPLv1.1 or GPLv2+ or LGPLv2+
@@ -21,7 +21,6 @@
 Source5:    fennec
 Source6:    fennec.svg
 Source7:    home-64.png
-Source8:    meego-theme.tar.gz
 Source9:    fennec.png
 Source100:  fennec-qt.yaml
 Patch0:     fennec-qt-nsFrame-visibility-hack.patch
@@ -64,18 +63,6 @@
 %description
 Fennec is the code name of the effort to build a mobile version of Firefox.
 
-
-%package branding-meego
-Summary:    MeeGo Theme for Fennec-Qt
-License:    Restricted
-Group:      Applications/Internet
-Requires:   %{name} = %{version}-%{release}
-Provides:   fennec-qt-branding
-
-%description branding-meego
-Theme assets and UI customizations for MeeGo
-
-
 %prep
 %setup -q -n mozilla-central
 
@@ -105,6 +92,15 @@
 echo "ac_add_options --enable-cpp-exceptions" >> .mozconfig
 %endif
 
+for i in -fexceptions -fasynchronous-unwind-tables; do 
+  echo removing FLAG $i 
+  CXXFLAGS=`echo $CXXFLAGS | sed -e "s/$i//"`
+  CFLAGS=`echo $CFLAGS | sed -e "s/$i//"`
+done
+
+echo CXXFLAGS=$CXXFLAGS
+echo CFLAGS=$CXXFLAGS
+
 make -f client.mk build NSDISTMODE=copy
 
 # << build pre
@@ -129,10 +125,6 @@
 cp %{SOURCE5} %{buildroot}/usr/bin/
 chmod 755 %{buildroot}/usr/bin/fennec
 
-mkdir -p %{buildroot}/usr/lib/fennec/extensions
-
-tar xzf %{SOURCE8} -C %{buildroot}/usr/lib/fennec/extensions
-
 # << install pre
 
 # >> install post
@@ -156,13 +148,4 @@
 /usr/share/applications/fennec.desktop
 /usr/share/pixmaps/fennec.png
 /usr/bin/fennec
-%exclude /usr/lib/fennec/extensions
 # << files
-
-
-%files branding-meego
-%defattr(-,root,root,-)
-# >> files branding-meego
-/usr/lib/fennec/extensions
-# << files branding-meego
-

other changes:
--------------

++++++ fennec-qt.yaml
--- fennec-qt.yaml
+++ fennec-qt.yaml
@@ -1,12 +1,12 @@
 Name: fennec-qt
 Summary: Fennec Mobile Web Browser with Qt/MeeGo Touch
-Version: 2.0a1pre0824.1
+Version: 2.0a1pre0824.4
 Release: 1
 Group: Applications/Internet
 License: MPLv1.1 or GPLv2+ or LGPLv2+
 URL: http://www.mozilla.org/projects/fennec/
 Sources:
-    - fennec-tip-9a623cc1c5e7-0e849c208873.tar.bz2
+    - fennec-tip-f203095c85de-f662427a3796.tar.bz2
     - platform-patches.tar.gz
     - mobile-patches.tar.gz
     - mozconfig
@@ -14,7 +14,6 @@
     - fennec
     - fennec.svg
     - home-64.png
-    - meego-theme.tar.gz
     - fennec.png
 Patches:
     - fennec-qt-nsFrame-visibility-hack.patch
@@ -52,12 +51,3 @@
     - fennec
 Configure: none
 Builder: none
-SubPackages:
-    - Name: branding-meego
-      Summary: MeeGo Theme for Fennec-Qt
-      Description: Theme assets and UI customizations for MeeGo
-      Group: Applications/Internet
-      License: Restricted
-      Provides:
-          - fennec-qt-branding
-

++++++ mobile-patches.tar.gz
--- meego/add_VKB_support.diff
+++ meego/add_VKB_support.diff
+diff --git a/chrome/content/browser-ui.js b/chrome/content/browser-ui.js
+--- a/chrome/content/browser-ui.js
++++ b/chrome/content/browser-ui.js
+@@ -1567,6 +1567,10 @@
+     this._autofillContainer = document.getElementById("form-helper-autofill");
+     this._cmdPrevious = document.getElementById(this.commands.previous);
+     this._cmdNext = document.getElementById(this.commands.next);
++    
++    //hack mathod, hard code of virtual keyboard height
++    this._vkbHeight = 280;
++    this._containerHeight = this._container.getBoundingClientRect().height;
+ 
+     // Listen for form assistant messages from content
+     messageManager.addMessageListener("FormAssist:Show", this);
+@@ -1598,8 +1602,16 @@
+       maxLength: aElement.maxLength,
+       type: aElement.type,
+       isAutocomplete: aElement.isAutocomplete,
+-      list: aElement.choices
++      list: aElement.choices,
++      isValidText: aElement.isValidText
+     }
++    //resize the height of container according to vitual keyboard's close and open
++    if (this._currentElement.isValidText) {
++      this._container.setAttribute("height", this._vkbHeight);
++    } else {
++      this._container.setAttribute("height", this._containerHeight);
++    }
++
+     this._updateContainer(lastElement, this._currentElement);
+ 
+     this._zoom(Rect.fromRect(aElement.rect), Rect.fromRect(aElement.caretRect));
+diff --git a/chrome/content/forms.js b/chrome/content/forms.js
+--- a/chrome/content/forms.js
++++ b/chrome/content/forms.js
+@@ -257,6 +257,12 @@
+     return this._isNavigableElement(aElement) && this._isVisibleElement(aElement);
+   },
+ 
++  _isValidTextElement: function formHelperIsValidTextElement(aElement) {
++    if (aElement instanceof HTMLTextAreaElement || (aElement instanceof HTMLInputElement && aElement.type == "text"))
++      return this._isValidElement(aElement);
++    return false;
++  },
++
+   _isNavigableElement: function formHelperIsNavigableElement(aElement) {
+     if (aElement.disabled)
+       return false;
+@@ -398,7 +404,8 @@
+         choices: list,
+         isAutocomplete: this._isAutocomplete(this.currentElement),
+         rect: this._getRect(),
+-        caretRect: this._getCaretRect()
++        caretRect: this._getCaretRect(),
++        isValidText: this._isValidTextElement(this.currentElement)
+       },
+       hasPrevious: !!this._elements[this._currentIndex - 1],
+       hasNext: !!this._elements[this._currentIndex + 1]
--- series
+++ series
@@ -20,3 +20,4 @@
 meego/download_dlg_open.diff
 meego/turnoff_e10s_sync.diff
 meego/force_flash_opaque.diff
+meego/add_VKB_support.diff

++++++ platform-patches.tar.gz
--- meego/meego_obs_exception.diff
+++ meego/meego_obs_exception.diff
+# HG changeset patch
+# Parent a8f76c5d71ec9ee1ea46a951f893d934800886b4
+# User roger.wang at intel.com
+
+diff --git a/configure.in b/configure.in
+--- a/configure.in
++++ b/configure.in
+@@ -6509,6 +6509,8 @@
+ 
+    AC_DEFINE(MOZ_PLATFORM_MEEGO)
+    AC_SUBST(MOZ_PLATFORM_MEEGO)
++
++    CPPFLAGS="$CPPFLAGS -fno-exceptions"
+ fi
+ 
+ dnl ========================================================
--- meego/mozalloc_new_op.diff
+++ meego/mozalloc_new_op.diff
-# HG changeset patch
-# Parent b61924c5f464d7e4e6084b63826d0ae325b0df8d
-# User roger.wang at intel.com
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
-@@ -6503,6 +6503,7 @@
-    AC_DEFINE(MOZ_PLATFORM_MEEGO)
-    AC_SUBST(MOZ_PLATFORM_MEEGO)
-    X11_COMPOSITED_PLUGINS="yes"
-+   CPPFLAGS="$CPPFLAGS -fno-exceptions"
- fi
- 
- dnl ========================================================
--- meego/platform_meego.diff
+++ meego/platform_meego.diff
@@ -3,13 +3,13 @@
 # Date 1275319175 -28800
 # Branch meego
 # Node ID 8f8433b9bb04641693ba50495baae3899010cd75
-# Parent 1259cae72791bd849aaf770c3a1d0fc59b9aa49d
+# Parent b9bb27495770bc9574708943795d1a1e212a6753
 adding MOZ_PLATFORM_MEEGO
 
 diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
 --- a/config/autoconf.mk.in
 +++ b/config/autoconf.mk.in
-@@ -651,6 +651,8 @@
+@@ -649,6 +649,8 @@
  
  MOZ_ENABLE_QTNETWORK = @MOZ_ENABLE_QTNETWORK@
  
@@ -21,7 +21,7 @@
 diff --git a/configure.in b/configure.in
 --- a/configure.in
 +++ b/configure.in
-@@ -6493,6 +6493,20 @@
+@@ -6492,6 +6492,27 @@
  AC_SUBST(WGET)
  
  dnl ========================================================
@@ -31,10 +31,17 @@
 +[  --disable-meego       Disable meego platform build],
 +    MOZ_PLATFORM_MEEGO=,
 +    MOZ_PLATFORM_MEEGO=1 )
++
 +if test $MOZ_PLATFORM_MEEGO; then
++    MOZ_THUMB2=1
++    PKG_CHECK_MODULES(MOZ_MEEGOTOUCH, meegotouchcore)
++    MOZ_ENABLE_MEEGOTOUCH=1
++    AC_DEFINE(MOZ_ENABLE_MEEGOTOUCH)
++    MOZ_QT_CFLAGS="$MOZ_MEEGOTOUCH_CFLAGS $MOZ_QT_CFLAGS"
++    MOZ_QT_LIBS="$MOZ_MEEGOTOUCH_LIBS $MOZ_QT_LIBS"
++
 +   AC_DEFINE(MOZ_PLATFORM_MEEGO)
 +   AC_SUBST(MOZ_PLATFORM_MEEGO)
-+   X11_COMPOSITED_PLUGINS="yes"
 +fi
 +
 +dnl ========================================================
--- meegotouch/bmo584217_contentpicker.diff
+++ meegotouch/bmo584217_contentpicker.diff
-# HG changeset patch
-# Parent 4800e626e07560a50b34b160ce385cfffdfd2e43
-# User Stefan Hundhammer <Stefan.Hundhammer at xxx.com>
-Bug 584217  - Add Meego Touch based filepicker implementation, r?
-
-diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in
---- a/config/autoconf.mk.in
-+++ b/config/autoconf.mk.in
-@@ -639,16 +639,18 @@ HAS_OGLES = @HAS_OGLES@
- 
- MOZ_DISTRIBUTION_ID = @MOZ_DISTRIBUTION_ID@
- 
- MOZ_PLATFORM_MAEMO = @MOZ_PLATFORM_MAEMO@
- MOZ_PLATFORM_MAEMO_CFLAGS	= @MOZ_PLATFORM_MAEMO_CFLAGS@
- MOZ_PLATFORM_MAEMO_LIBS 	= @MOZ_PLATFORM_MAEMO_LIBS@
- MOZ_MAEMO_LIBLOCATION 	= @MOZ_MAEMO_LIBLOCATION@
- 
-+MOZ_ENABLE_CONTENTMANAGER = @MOZ_ENABLE_CONTENTMANAGER@
-+
- GSTREAMER_CFLAGS = @GSTREAMER_CFLAGS@
- GSTREAMER_LIBS   = @GSTREAMER_LIBS@
- 
- MOZ_ENABLE_QTNETWORK = @MOZ_ENABLE_QTNETWORK@
- 
- MOZ_ENABLE_LIBCONIC = @MOZ_ENABLE_LIBCONIC@
- LIBCONIC_CFLAGS     = @LIBCONIC_CFLAGS@
- LIBCONIC_LIBS       = @LIBCONIC_LIBS@
-diff --git a/config/system-headers b/config/system-headers
---- a/config/system-headers
-+++ b/config/system-headers
-@@ -1090,9 +1090,16 @@ proxy.h
- contentaction/contentaction.h
- #endif
- #ifdef MOZ_SYSTEM_PIXMAN
- pixman.h
- #endif
- #ifdef MOZ_ENABLE_MEEGOTOUCH
- qmsystem/qmdisplaystate.h
- #endif
-+#ifdef MOZ_ENABLE_CONTENTMANAGER
-+SelectSingleContentItemPage.h
-+SelectMultipleContentItemsPage.h
-+QtTracker/Tracker
-+QtTracker/ontologies/nie.h
-+QtTracker/ontologies/nfo.h
-+#endif
- 
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
-@@ -5309,16 +5309,17 @@ AC_SUBST(MOZ_ENABLE_GTK2)
- AC_SUBST(MOZ_ENABLE_PHOTON)
- AC_SUBST(MOZ_ENABLE_QT)
- AC_SUBST(MOZ_ENABLE_XREMOTE)
- AC_SUBST(MOZ_GTK2_CFLAGS)
- AC_SUBST(MOZ_GTK2_LIBS)
- AC_SUBST(MOZ_QT_CFLAGS)
- AC_SUBST(MOZ_QT_LIBS)
- AC_SUBST(MOZ_ENABLE_MEEGOTOUCH)
-+AC_SUBST(MOZ_ENABLE_CONTENTMANAGER)
- 
- AC_SUBST(MOC)
- 
- AC_SUBST(MOZ_DFB)
- AC_SUBST(MOZ_X11)
- 
- dnl ========================================================
- dnl =
-@@ -6950,16 +6951,29 @@ if test $MOZ_PLATFORM_MAEMO; then
- 
-    if test "$MOZ_PLATFORM_MAEMO" -gt 5; then
-      MOZ_THUMB2=1
-      PKG_CHECK_MODULES(MOZ_MEEGOTOUCH, meegotouchcore)
-      MOZ_ENABLE_MEEGOTOUCH=1
-      AC_DEFINE(MOZ_ENABLE_MEEGOTOUCH)
-      MOZ_QT_CFLAGS="$MOZ_MEEGOTOUCH_CFLAGS $MOZ_QT_CFLAGS"
-      MOZ_QT_LIBS="$MOZ_MEEGOTOUCH_LIBS $MOZ_QT_LIBS"
-+
-+     PKG_CHECK_MODULES(LIBCONTENTMANAGER, ContentManager qttracker,
-+                       _LIB_FOUND=1,
-+                       _LIB_FOUND=)
-+     if test "$_LIB_FOUND"; then
-+         MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBCONTENTMANAGER_LIBS"
-+         MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBCONTENTMANAGER_CFLAGS"
-+         MOZ_ENABLE_CONTENTMANAGER=1
-+         AC_DEFINE(MOZ_ENABLE_CONTENTMANAGER)
-+     else
-+         AC_MSG_WARN([Cannot find libcontentmanager and qttracker building for Maemo 6])
-+     fi
-+     AC_SUBST(MOZ_ENABLE_CONTENTMANAGER)
-    fi
- 
-    PKG_CHECK_MODULES(LIBLOCATION,liblocation, _LIB_FOUND=1, _LIB_FOUND=)
-    MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBLOCATION_LIBS"
-    MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBLOCATION_CFLAGS"
-    if test "$_LIB_FOUND"; then
-       MOZ_MAEMO_LIBLOCATION=1
-       AC_DEFINE(MOZ_MAEMO_LIBLOCATION)
-diff --git a/widget/src/qt/Makefile.in b/widget/src/qt/Makefile.in
---- a/widget/src/qt/Makefile.in
-+++ b/widget/src/qt/Makefile.in
-@@ -52,16 +52,20 @@ GRE_MODULE	= 1
- LIBXUL_LIBRARY	= 1
- 
- 
- MOCSRCS = \
- 		moc_mozqwidget.cpp \
- 		moc_nsAppShell.cpp \
- 		$(NULL)
- 
-+ifeq ($(MOZ_ENABLE_CONTENTMANAGER), 1)
-+MOCSRCS += moc_nsFilePicker.cpp
-+endif
-+
- CPPSRCS	= \
- 		$(MOCSRCS) \
- 		nsAppShell.cpp \
- 		nsWidgetFactory.cpp \
- 		nsWindow.cpp \
- 		nsLookAndFeel.cpp \
- 		nsToolkit.cpp \
- 		nsScreenQt.cpp \
-@@ -84,33 +88,34 @@ CPPSRCS	= \
- SHARED_LIBRARY_LIBS = ../xpwidgets/libxpwidgets_s.a
- 
- EXTRA_DSO_LDOPTS = \
- 		$(MOZ_COMPONENT_LIBS) \
- 		-lgkgfx \
- 		-lthebes \
- 		$(MOZ_JS_LIBS) \
- 		$(MOZ_QT_LIBS) \
-+		$(MOZ_PLATFORM_MAEMO_LIBS) \
- 		$(GLIB_LIBS) \
- 		$(QCMS_LIBS) \
- 		$(XEXT_LIBS) \
- 		$(NULL)
- 
- 
- EXTRA_DSO_LDOPTS += -L$(DIST)/lib $(MOZ_XLIB_LDFLAGS) $(XLIBS)
- 
- # If not primary toolkit, install in secondary path
- ifneq (qt,$(MOZ_WIDGET_TOOLKIT))
- INACTIVE_COMPONENT = 1
- endif
- 
- include $(topsrcdir)/config/rules.mk
- 
--CXXFLAGS	+= $(MOZ_QT_CFLAGS) $(GLIB_CFLAGS) $(MOZ_CAIRO_CFLAGS)
--CFLAGS		+= $(MOZ_QT_CFLAGS) $(GLIB_CFLAGS) $(MOZ_CAIRO_CFLAGS)
-+CXXFLAGS	+= $(MOZ_QT_CFLAGS) $(GLIB_CFLAGS) $(MOZ_CAIRO_CFLAGS) $(MOZ_PLATFORM_MAEMO_CFLAGS)
-+CFLAGS		+= $(MOZ_QT_CFLAGS) $(GLIB_CFLAGS) $(MOZ_CAIRO_CFLAGS) $(MOZ_PLATFORM_MAEMO_CFLAGS)
- 
- DEFINES		+= -D_IMPL_NS_WIDGET
- #DEFINES		+= -DDEBUG_WIDGETS
- 
- ifeq ($(OS_ARCH), Linux)
- DEFINES         += -D_BSD_SOURCE
- endif
- ifeq ($(OS_ARCH), SunOS) 
-diff --git a/widget/src/qt/nsFilePicker.cpp b/widget/src/qt/nsFilePicker.cpp
---- a/widget/src/qt/nsFilePicker.cpp
-+++ b/widget/src/qt/nsFilePicker.cpp
-@@ -39,42 +39,179 @@
-  * ***** END LICENSE BLOCK ***** */
- 
- #include <qfile.h>
- #include <qstringlist.h>
- #include <qapplication.h>
- #include <qgraphicsproxywidget.h>
- #include <qgraphicswidget.h>
- #include <qgraphicsscene.h>
-+#include <qgraphicsview.h>
-+#include <qtemporaryfile.h>
- 
- #include "nsFilePicker.h"
- 
- #include "nsILocalFile.h"
- #include "nsIURI.h"
- #include "nsISupportsArray.h"
- #include "nsMemory.h"
- #include "nsEnumeratorUtils.h"
- #include "nsNetUtil.h"
- #include "nsReadableUtils.h"
- #include "nsIWidget.h"
-+#include "nsDirectoryServiceDefs.h"
-+
-+#if MOZ_ENABLE_CONTENTMANAGER
-+#include <QPointer>
-+#include <MApplication>
-+#include <MApplicationWindow>
-+#include <MScene>
-+#include <MApplicationPage>
-+
-+#include <SelectSingleContentItemPage.h>
-+#include <SelectMultipleContentItemsPage.h>
-+
-+// Use Qt Tracker API to get attachment data from tracker:
-+#include <QtTracker/Tracker>
-+#include <QtTracker/ontologies/nie.h>
-+#include <QtTracker/ontologies/nfo.h>
-+
-+using namespace SopranoLive;
-+
-+typedef QStringList (*_qt_file_open_filenames_hook)
-+ (QWidget * parent, const QString &caption, const QString &dir,
-+  const QString &filter, QString *selectedFilter, QFileDialog::Options options);
-+
-+typedef QString (*_qt_file_open_filename_hook)
-+ (QWidget * parent, const QString &caption, const QString &dir,
-+  const QString &filter, QString *selectedFilter, QFileDialog::Options options);
-+
-+typedef QString (*_qt_file_existing_directory_hook)
-+ (QWidget *parent, const QString &caption, const QString &dir,
-+  QFileDialog::Options options);
-+
-+#if HAVE_VISIBILITY_ATTRIBUTE
-+#  define NSFILEPICKER_EXPORT __attribute__ ((visibility ("default")))
-+#else
-+#  define NSFILEPICKER_EXPORT
-+#endif
-+
-+// Extern variables from qfiledialog.cpp deep inside libqt
-+NSFILEPICKER_EXPORT extern _qt_file_open_filename_hook qt_filedialog_open_filename_hook;
-+NSFILEPICKER_EXPORT extern _qt_file_open_filenames_hook qt_filedialog_open_filenames_hook;
-+NSFILEPICKER_EXPORT extern _qt_file_existing_directory_hook qt_filedialog_existing_directory_hook;
-+
-+
-+static QString openFilename(QWidget *parent, const QString &caption,
-+                            const QString &dir, const QString &filter,
-+                            QString *selectedFilter,
-+                            QFileDialog::Options options)
-+{
-+    QString result;
-+
-+    if (MeegoFilePicker::pickerActive()) {
-+        qDebug() << __FUNCTION__  << ": Ignoring request to open secondary content picker";
-+        MeegoFilePicker::raiseLastPicker();
-+        return result;
-+    }
-+
-+    QPointer<MeegoFilePicker> picker = new MeegoFilePicker(parent);
-+
-+    if (picker) {
-+        picker->setMode(MeegoFilePicker::Mode_OpenFile);
-+        picker->setCaption(caption);
-+        picker->exec();
-+    }
-+
-+    if (picker) { // Need separate 'if' because picker might have been destroyed by its parent during exec()
-+        if ( picker->hasSelectedFileNames()) {
-+            result = picker->selectedFileNames().first();
-+        }
-+        delete picker;
-+    }
-+
-+    return result;
-+}
-+
-+static QString openDirectory(QWidget *parent, const QString &caption, const
-+                             QString &dir, QFileDialog::Options options)
-+{
-+    QString result;
-+
-+    if (MeegoFilePicker::pickerActive()) {
-+        qDebug() << __FUNCTION__  << ": Ignoring request to open secondary content picker";
-+        MeegoFilePicker::raiseLastPicker();
-+        return result;
-+    }
-+
-+    QPointer<MeegoFilePicker> picker = new MeegoFilePicker(parent);
-+
-+    if (picker) {
-+        picker->setMode(MeegoFilePicker::Mode_OpenDirectory);
-+        picker->setCaption(caption);
-+        picker->exec();
-+    }
-+
-+    if (picker) { // Need separate 'if' because picker might have been destroyed by its parent during exec()
-+        if ( picker->hasSelectedFileNames()) {
-+            result = picker->selectedFileNames().first();
-+        }
-+        delete picker;
-+    }
-+
-+    return result;
-+}
-+
-+static QStringList openFilenames(QWidget *parent, const QString &caption,
-+                                 const QString &dir, const QString &filter,
-+                                 QString *selectedFilter,
-+                                 QFileDialog::Options options)
-+{
-+    QStringList result;
-+
-+    if (MeegoFilePicker::pickerActive()) {
-+        qDebug() << __FUNCTION__  << ": Ignoring request to open secondary content picker";
-+        MeegoFilePicker::raiseLastPicker();
-+        return result;
-+    }
-+
-+    QPointer<MeegoFilePicker> picker = new MeegoFilePicker(parent);
-+
-+    if (picker) {
-+        picker->setMode(MeegoFilePicker::Mode_OpenFiles);
-+        picker->setCaption(caption);
-+        picker->exec();
-+    }
-+
-+    if (picker) { // Need separate 'if' because picker might have been destroyed by its parent during exec()
-+        if ( picker->hasSelectedFileNames()) {
-+            result = picker->selectedFileNames();
-+        }
-+        delete picker;
-+    }
-+
-+    return result;
-+}
-+
-+#endif // MOZ_ENABLE_CONTENTMANAGER
-+
-+//-----------------------------
- 
- /* Implementation file */
- NS_IMPL_ISUPPORTS1(nsFilePicker, nsIFilePicker)
- 
- nsFilePicker::nsFilePicker()
--    : mDialog(0),
--      mMode(nsIFilePicker::modeOpen)
-+    :  mMode(nsIFilePicker::modeOpen)
- {
-     qDebug("nsFilePicker constructor");
- }
- 
- nsFilePicker::~nsFilePicker()
- {
-     qDebug("nsFilePicker destructor");
--    delete mDialog;
- }
- 
- NS_IMETHODIMP
- nsFilePicker::Init(nsIDOMWindow *parent, const nsAString & title, PRInt16 mode)
- {
-     qDebug("nsFilePicker::Init()");
-     return nsBaseFilePicker::Init(parent, title, mode);
- }
-@@ -204,89 +341,330 @@ nsresult
- nsFilePicker::ShowNative(PRInt16 *aReturn)
- {
-     qDebug("nsFilePicker::Show()");
-     nsCAutoString directory;
-     if (mDisplayDirectory) {
-         mDisplayDirectory->GetNativePath(directory);
-     }
- 
-+    QStringList filters;
-+    PRUint32 count = mFilters.Length();
-+    for (PRUint32 i = 0; i < count; ++i) {
-+        filters.append(mFilters[i].get());
-+    }
-+
-+    #if MOZ_ENABLE_CONTENTMANAGER
-+        MWindow *parentWidget = MApplication::activeWindow();
-+    #else
-+        QGraphicsWidget *parentWidget = 0;
-+        if (mParent) {
-+            parentWidget = static_cast<QGraphicsWidget*>
-+                           (mParent->GetNativeData(NS_NATIVE_WIDGET));
-+        }
-+    #endif
-+
-+    QWidget* parentQWidget = 0;
-+    if (parentWidget && parentWidget->scene()) {
-+        if (parentWidget->scene()->views().size() > 0) {
-+            parentQWidget = parentWidget->scene()->views()[0];
-+        }
-+    }
-+
-+    QStringList files;
-+    QString selected;
-+
-     switch (mMode) {
-     case nsIFilePicker::modeOpen:
-+        selected = QFileDialog::getOpenFileName(parentQWidget, mCaption,
-+                     directory.get(), filters.join(";;"));
-+        if (selected.isNull()) {
-+            *aReturn = nsIFilePicker::returnCancel;
-+            return NS_OK;
-+        }
-         break;
-     case nsIFilePicker::modeOpenMultiple:
--        mDialog->setFileMode(QFileDialog::ExistingFiles);
-+        files = QFileDialog::getOpenFileNames(parentQWidget, mCaption,
-+                  directory.get(), filters.join(";;"));
-+        if (files.empty()) {
-+            *aReturn = nsIFilePicker::returnCancel;
-+            return NS_OK;
-+        }
-+        selected = files[0];
-         break;
-     case nsIFilePicker::modeSave:
--        mDialog->setFileMode(QFileDialog::AnyFile);
--        mDialog->setAcceptMode(QFileDialog::AcceptSave);
-+        {
-+            nsCOMPtr<nsIFile> targetFile;
-+            NS_GetSpecialDirectory(NS_UNIX_XDG_DOCUMENTS_DIR,
-+                                   getter_AddRefs(targetFile));
-+            if (!targetFile) {
-+                // failed to get the XDG directory, using $HOME for now
-+                NS_GetSpecialDirectory(NS_UNIX_HOME_DIR,
-+                                       getter_AddRefs(targetFile));
-+            }
-+
-+            if (targetFile) {
-+                  targetFile->Append(mDefault);
-+
-+                  nsString targetPath;
-+                  targetFile->GetPath(targetPath);
-+
-+                  PRBool exists = PR_FALSE;
-+                  targetFile->Exists(&exists);
-+                  if (exists) {
-+                      // file exists already create temporary filename
-+                      QTemporaryFile temp(QString::fromUtf16(targetPath.get()));
-+                      temp.open();
-+                      selected = temp.fileName();
-+                      temp.close();
-+                  } else {
-+                      selected = QString::fromUtf16(targetPath.get());
-+                  }
-+            }
-+        }
-         break;
-     case nsIFilePicker::modeGetFolder:
--        mDialog->setFileMode(QFileDialog::DirectoryOnly);
-+        selected = QFileDialog::getExistingDirectory(parentQWidget, mCaption,
-+                                                     directory.get());
-+        if (selected.isNull()) {
-+            *aReturn = nsIFilePicker::returnCancel;
-+            return NS_OK;
-+        }
-         break;
-     default:
-         break;
-     }
- 
--    mDialog->selectFile(QString::fromUtf16(mDefault.get()));
-+    if (!selected.isEmpty()) {
-+      QString path = QFile::encodeName(selected);
-+      qDebug("path is '%s'", path.toAscii().data());
-+      mFile.Assign(path.toUtf8().data());
-+    }
- 
--    mDialog->setDirectory(directory.get());
--
--    QStringList filters;
--    PRUint32 count = mFilters.Length();
--    for (PRUint32 i = 0; i < count; ++i) {
--        filters.append( mFilters[i].get() );
--    }
--    mDialog->setFilters(filters);
--
--    switch (mDialog->exec()) {
--    case QDialog::Accepted: {
--        QStringList files = mDialog->selectedFiles();
--        QString selected;
--        if (!files.isEmpty())
--        {
--            selected = files[0];
--        }
--
--        QString path = QFile::encodeName(selected);
--        qDebug("path is '%s'", path.toAscii().data());
--        mFile.Assign(path.toUtf8().data());
--        *aReturn = nsIFilePicker::returnOK;
--        if (mMode == modeSave) {
--            nsCOMPtr<nsILocalFile> file;
--            GetFile(getter_AddRefs(file));
--            if (file) {
--                PRBool exists = PR_FALSE;
--                file->Exists(&exists);
--                if (exists) {
--                    *aReturn = nsIFilePicker::returnReplace;
--                }
-+    *aReturn = nsIFilePicker::returnOK;
-+    if (mMode == modeSave) {
-+        nsCOMPtr<nsILocalFile> file;
-+        GetFile(getter_AddRefs(file));
-+        if (file) {
-+            PRBool exists = PR_FALSE;
-+            file->Exists(&exists);
-+            if (exists) {
-+                *aReturn = nsIFilePicker::returnReplace;
-             }
-         }
-     }
--        break;
--    case QDialog::Rejected: {
--        *aReturn = nsIFilePicker::returnCancel;
--    }
--        break;
--    default:
--        *aReturn = nsIFilePicker::returnCancel;
--        break;
--    }
--
- 
-     return NS_OK;
- }
- 
--void nsFilePicker::InitNative(nsIWidget *parent, const nsAString &title, PRInt16 mode)
-+void nsFilePicker::InitNative(nsIWidget *aParent, const nsAString &aTitle,
-+                              PRInt16 aMode)
- {
-     qDebug("nsFilePicker::InitNative()");
- 
--    nsAutoString str(title);
--    mDialog = new QFileDialog(0, QString::fromUtf16(str.get()));
-+    nsAutoString str(aTitle);
-+#if MOZ_ENABLE_CONTENTMANAGER
-+    qt_filedialog_open_filename_hook = &openFilename;
-+    qt_filedialog_open_filenames_hook = &openFilenames;
-+    qt_filedialog_existing_directory_hook = &openDirectory;
-+#endif
-+    mCaption = QString::fromUtf16(str.get());
- 
--    QGraphicsWidget *parentWidget = static_cast<QGraphicsWidget*>(parent->GetNativeData(NS_NATIVE_WIDGET));
--    if (parentWidget && parentWidget->scene()) {
--        parentWidget->scene()->addWidget(mDialog);
-+    mParent = aParent;
-+
-+    mMode = aMode;
-+}
-+
-+//---------------
-+
-+#if MOZ_ENABLE_CONTENTMANAGER
-+
-+MApplicationWindow *     MeegoFilePicker::sApplicationWindow = 0;
-+QList<MeegoFilePicker *> MeegoFilePicker::sActivePickerList;
-+
-+
-+MeegoFilePicker::MeegoFilePicker(QObject * aParent)
-+: QEventLoop(aParent)
-+, mPage(0)
-+, mMode(Mode_Unknown)
-+{
-+    if (!sApplicationWindow) {
-+        // The content picker creates MApplicationPage children which require a
-+        // MApplicationWindow parent to work properly (navigation bar with "back"
-+        // and "OK" buttons), but Fennec uses only an MWindow for performance
-+        // reasons; so let's create our own temporary MApplicationWindow for the
-+        // life time of the content picker's MApplicationPages.
-+
-+        MWindow * parentWindow = MApplication::activeWindow();
-+        sApplicationWindow = new MApplicationWindow(parentWindow);
-+        sApplicationWindow->show();
-     }
- 
--    mMode = mode;
-+    sActivePickerList.append(this);
- }
-+
-+MeegoFilePicker::~MeegoFilePicker()
-+{
-+    if (mPage) {
-+        delete mPage;
-+    }
-+
-+    sActivePickerList.removeAll(this);
-+
-+    if (sActivePickerList.isEmpty() && sApplicationWindow) {
-+        delete sApplicationWindow;
-+        sApplicationWindow = 0;
-+    }
-+}
-+
-+int MeegoFilePicker::exec(ProcessEventsFlags aFlags)
-+{
-+    if (!mPage) {
-+        switch(mMode)
-+        {
-+            case Mode_OpenFile:
-+                mPage = createOpenFilePage();
-+                break;
-+            case Mode_OpenFiles:
-+                mPage = createOpenFilesPage();
-+                break;
-+            case Mode_OpenDirectory:
-+                mPage = createOpenDirectoryPage();
-+                break;
-+            default:
-+                return 0;
-+        }
-+    }
-+
-+    if (mPage) {
-+        mPage->setTitle(mCaption);
-+        mPage->appear(sApplicationWindow);
-+        return QEventLoop::exec(aFlags);
-+    } else {
-+        qWarning() << "No page in" << __PRETTY_FUNCTION__;
-+        return 0;
-+    }
-+}
-+
-+MApplicationPage * MeegoFilePicker::createOpenFilePage()
-+{
-+    QStringList itemType("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject");
-+    SelectSingleContentItemPage * page = new SelectSingleContentItemPage(QString(), // text_query
-+                                                                         itemType);
-+
-+    connect(page, SIGNAL(contentItemSelected(const QString &)),
-+            this, SLOT  (contentItemSelected(const QString &)));
-+
-+    connect(page, SIGNAL(backButtonClicked()),
-+            this, SLOT  (backButtonClicked()));
-+
-+    return page;
-+}
-+
-+MApplicationPage * MeegoFilePicker::createOpenFilesPage()
-+{
-+    QStringList itemType("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject");
-+    SelectMultipleContentItemsPage * page = new SelectMultipleContentItemsPage(QString(), // text_query
-+                                                                               itemType);
-+    connect(page, SIGNAL(contentItemsSelected(const QStringList &)),
-+            this, SLOT  (contentItemsSelected(const QStringList &)));
-+
-+    connect(page, SIGNAL(backButtonClicked()),
-+            this, SLOT  (backButtonClicked()));
-+
-+    return page;
-+}
-+
-+MApplicationPage * MeegoFilePicker::createOpenDirectoryPage()
-+{
-+    QStringList itemType("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder");
-+    SelectSingleContentItemPage * page = new SelectSingleContentItemPage(QString(), // text_query
-+                                                                         itemType);
-+
-+    connect(page, SIGNAL(contentItemSelected(const QString &)),
-+            this, SLOT  (contentItemSelected(const QString &)));
-+
-+    connect(page, SIGNAL(backButtonClicked()),
-+            this, SLOT  (backButtonClicked()));
-+
-+    return page;
-+}
-+
-+void MeegoFilePicker::setMode(MeegoFilePickerMode aMode)
-+{
-+    if (mMode != aMode && mPage) { // Pathological case: Page with a different mode left over?
-+        delete mPage;              // -> get rid of it
-+        mPage = 0;
-+    }
-+
-+    mMode = aMode;
-+}
-+
-+void MeegoFilePicker::setCaption(const QString &caption)
-+{
-+    mCaption = caption;
-+}
-+
-+QStringList MeegoFilePicker::selectedFileNames() const
-+{
-+    return mSelectedFileNames;
-+}
-+
-+bool MeegoFilePicker::hasSelectedFileNames() const
-+{
-+    return !mSelectedFileNames.isEmpty();
-+}
-+
-+void MeegoFilePicker::contentItemSelected(const QString &aContentItem)
-+{
-+    qDebug() << "contentItemSelected " << aContentItem;
-+    mSelectedFileNames.clear();
-+
-+    if (aContentItem.isEmpty())
-+    {
-+        QEventLoop::exit(0);
-+        return;
-+    }
-+
-+    Live<nfo::FileDataObject> data = ::tracker()->liveNode(QUrl(aContentItem));
-+    QUrl fileUrl = data->getUrl();
-+    QFileInfo fileInfo(fileUrl.toLocalFile());
-+    if (fileInfo.isFile()) {
-+        mSelectedFileNames << fileInfo.canonicalFilePath();
-+    }
-+    qDebug() << "Selected File Names"<< mSelectedFileNames;
-+    QEventLoop::exit(0);
-+}
-+
-+void MeegoFilePicker::contentItemsSelected(const QStringList &aContentItems)
-+{
-+    qDebug() << "contentItemsSelected " << aContentItems;
-+
-+    mSelectedFileNames.clear();
-+
-+    foreach(QString contentItem, aContentItems)
-+    {
-+        Live<nfo::FileDataObject> data =
-+          ::tracker()->liveNode(QUrl(contentItem));
-+        QUrl fileUrl = data->getUrl();
-+        QFileInfo fileInfo(fileUrl.toLocalFile());
-+        if (fileInfo.isFile())
-+            mSelectedFileNames << fileInfo.canonicalFilePath();
-+    }
-+    qDebug() << "Selected File Names"<< mSelectedFileNames;
-+    QEventLoop::exit(0);
-+}
-+
-+void MeegoFilePicker::backButtonClicked()
-+{
-+    mSelectedFileNames.clear();
-+    QEventLoop::exit(0);
-+}
-+
-+void MeegoFilePicker::raiseLastPicker()
-+{
-+    if (sApplicationWindow) {
-+        sApplicationWindow->raise();
-+    }
-+}
-+
-+
-+#endif // MOZ_ENABLE_CONTENTMANAGER
-diff --git a/widget/src/qt/nsFilePicker.h b/widget/src/qt/nsFilePicker.h
---- a/widget/src/qt/nsFilePicker.h
-+++ b/widget/src/qt/nsFilePicker.h
-@@ -36,25 +36,30 @@
-  * the provisions above, a recipient may use your version of this file under
-  * the terms of any one of the MPL, the GPL or the LGPL.
-  *
-  * ***** END LICENSE BLOCK ***** */
- #ifndef NSFILEPICKER_H
- #define NSFILEPICKER_H
- 
- #include <qfiledialog.h>
-+#include <QList>
-+#include <QEventLoop>
-+
- #include "nsBaseFilePicker.h"
- #include "nsString.h"
- #include "nsIURI.h"
- #include "nsTArray.h"
- #include "nsCOMArray.h"
- 
- class nsIWidget;
- class nsILocalFile;
- class QFileDialog;
-+class MApplicationPage;
-+class MApplicationWindow;
- 
- class nsFilePicker : public nsBaseFilePicker
- {
- public:
-     nsFilePicker();
- 
-     NS_DECL_ISUPPORTS
- 
-@@ -74,23 +79,72 @@ public:
- 
- private:
-     ~nsFilePicker();
-     void InitNative(nsIWidget*, const nsAString&, short int);
- 
- protected:
-     virtual nsresult ShowNative(PRInt16 *aReturn);
- 
--    QFileDialog *mDialog;
-     nsCOMArray<nsILocalFile> mFiles;
- 
-     PRInt16   mMode;
-     PRInt16   mSelectedType;
-     nsCString mFile;
-     nsString  mTitle;
-     nsString  mDefault;
-     nsString  mDefaultExtension;
- 
-     nsTArray<nsCString> mFilters;
-     nsTArray<nsCString> mFilterNames;
-+
-+    QString mCaption;
-+    nsIWidget* mParent;
-+
- };
- 
--#endif
-+
-+#if MOZ_ENABLE_CONTENTMANAGER
-+
-+class MeegoFilePicker : public QEventLoop
-+{
-+  Q_OBJECT
-+public:
-+    enum MeegoFilePickerMode {
-+        Mode_Unknown = -1,
-+        Mode_OpenFile = 0,
-+        Mode_OpenFiles = 1,
-+        Mode_OpenDirectory = 2
-+        // No Mode_SaveFile - the content picker can't handle that
-+    };
-+
-+    MeegoFilePicker(QObject *aParent = 0);
-+    virtual ~MeegoFilePicker();
-+
-+    void setMode(MeegoFilePickerMode aMode);
-+    void setCaption(const QString &caption);
-+    QStringList selectedFileNames() const;
-+    bool hasSelectedFileNames() const;
-+
-+    int exec(ProcessEventsFlags aFlags = QEventLoop::AllEvents);
-+    static bool pickerActive() { return !sActivePickerList.isEmpty(); }
-+    static void raiseLastPicker();
-+
-+private slots:
-+    void contentItemSelected(const QString &aItem);
-+    void contentItemsSelected(const QStringList &aItems);
-+    void backButtonClicked();
-+
-+private:
-+    MApplicationPage * createOpenFilePage();
-+    MApplicationPage * createOpenFilesPage();
-+    MApplicationPage * createOpenDirectoryPage();
-+
-+    MApplicationPage * mPage;
-+    MeegoFilePickerMode mMode;
-+    QString mCaption;
-+    QStringList mSelectedFileNames;
-+    static MApplicationWindow * sApplicationWindow;
-+    static QList<MeegoFilePicker *> sActivePickerList;
-+};
-+
-+#endif // MOZ_ENABLE_CONTENTMANAGER
-+#endif // NSFILEPICKER_H
--- meegotouch/pmo176709_display_state_notifies.diff
+++ meegotouch/pmo176709_display_state_notifies.diff
-# HG changeset patch
-# Parent 6fde8c0dd33258a90cfa22887eab582bce2c4cd3
-# User Jon Hemming <jonkhemming at gmail.com>
-Bug 580588 - Notifications of screen state changes in Maemo 6 platform needs to be added.  r?
-
-diff --git a/config/system-headers b/config/system-headers
---- a/config/system-headers
-+++ b/config/system-headers
-@@ -1087,9 +1087,12 @@ event.h
- proxy.h
- #endif
- #if MOZ_PLATFORM_MAEMO==6
- contentaction/contentaction.h
- #endif
- #ifdef MOZ_SYSTEM_PIXMAN
- pixman.h
- #endif
-+#ifdef MOZ_ENABLE_MEEGOTOUCH
-+qmsystem/qmdisplaystate.h
-+#endif
- 
-diff --git a/configure.in b/configure.in
---- a/configure.in
-+++ b/configure.in
-@@ -6938,16 +6938,19 @@ if test $MOZ_PLATFORM_MAEMO; then
-    fi
-    if test $MOZ_PLATFORM_MAEMO = 6; then
-       PKG_CHECK_MODULES(LIBCONTENTACTION, contentaction-0.1, _LIB_FOUND=1, _LIB_FOUND=)
-       MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBCONTENTACTION_LIBS"
-       MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBCONTENTACTION_CFLAGS"
-       if test -z "$_LIB_FOUND"; then
-          AC_MSG_ERROR([libcontentaction is required when build for Maemo])
-       fi
-+      PKG_CHECK_MODULES(LIBQMSYSTEM, qmsystem)
-+      MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBQMSYSTEM_LIBS"
-+      MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBQMSYSTEM_CFLAGS"
-    fi
- 
-    if test "$MOZ_PLATFORM_MAEMO" -gt 5; then
-      MOZ_THUMB2=1
-      PKG_CHECK_MODULES(MOZ_MEEGOTOUCH, meegotouchcore)
-      MOZ_ENABLE_MEEGOTOUCH=1
-      AC_DEFINE(MOZ_ENABLE_MEEGOTOUCH)
-      MOZ_QT_CFLAGS="$MOZ_MEEGOTOUCH_CFLAGS $MOZ_QT_CFLAGS"
-diff --git a/js/src/config/system-headers b/js/src/config/system-headers
---- a/js/src/config/system-headers
-+++ b/js/src/config/system-headers
-@@ -1037,8 +1037,11 @@ event.h
- proxy.h
- #endif
- #if MOZ_PLATFORM_MAEMO==6
- contentaction/contentaction.h
- #endif
- #ifdef MOZ_SYSTEM_PIXMAN
- pixman.h
- #endif
-+#ifdef MOZ_ENABLE_MEEGOTOUCH
-+qmsystem/qmdisplaystate.h
-+#endif
-diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in
---- a/toolkit/xre/Makefile.in
-+++ b/toolkit/xre/Makefile.in
-@@ -104,16 +104,19 @@ CPPSRCS += nsNativeAppSupportUnix.cpp
- else
- ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
- CPPSRCS += nsNativeAppSupportQt.cpp
- CPPSRCS += nsQAppInstance.cpp
- EXPORTS += nsQAppInstance.h
- ifdef MOZ_ENABLE_MEEGOTOUCH
- MOCSRCS += moc_MozMeegoAppService.cpp
- CPPSRCS += moc_MozMeegoAppService.cpp
-+CPPSRCS += MozMeegoSignalHandler.cpp
-+MOCSRCS += moc_MozMeegoSignalHandler.cpp
-+CPPSRCS += moc_MozMeegoSignalHandler.cpp
- endif
- else
- CPPSRCS += nsNativeAppSupportDefault.cpp
- endif
- endif
- endif
- endif
- endif
-diff --git a/toolkit/xre/MozMeegoSignalHandler.cpp b/toolkit/xre/MozMeegoSignalHandler.cpp
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/MozMeegoSignalHandler.cpp
-@@ -0,0 +1,78 @@
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is Mozilla Communicator client code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 2010
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s): jonkhemming at gmail.com
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either the GNU General Public License Version 2 or later (the "GPL"), or
-+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+#include "MozMeegoSignalHandler.h"
-+
-+#include <qmsystem/qmdisplaystate.h>
-+
-+#include "nsISupportsPrimitives.h"
-+#include "nsIObserverService.h"
-+#include "nsCOMPtr.h"
-+#include "nsServiceManagerUtils.h"
-+#include "nsString.h"
-+
-+
-+MozMeegoSignalHandler::MozMeegoSignalHandler( QObject *parent )
-+        : QObject( parent )
-+{
-+}
-+
-+MozMeegoSignalHandler::~MozMeegoSignalHandler()
-+{
-+}
-+
-+void MozMeegoSignalHandler::reactToDisplayStateChange(Maemo::QmDisplayState::DisplayState aState)
-+{
-+    nsresult rv;
-+
-+    nsCOMPtr<nsIObserverService> appObserverService =
-+        do_GetService( "@mozilla.org/observer-service;1", &rv );
-+
-+    if ( NS_FAILED( rv ) )
-+        return;
-+
-+    nsCOMPtr<nsISupportsPRBool> observer_retval;
-+
-+    if (aState == Maemo::QmDisplayState::On) {
-+        appObserverService->NotifyObservers( observer_retval, "display-on", NULL);
-+    } else if (aState == Maemo::QmDisplayState::Dimmed) {
-+        appObserverService->NotifyObservers( observer_retval, "display-dimmed", NULL);
-+    } else if (aState == Maemo::QmDisplayState::Off) {
-+        appObserverService->NotifyObservers( observer_retval, "display-off", NULL);
-+    }
-+
-+}
-+
-diff --git a/toolkit/xre/MozMeegoSignalHandler.h b/toolkit/xre/MozMeegoSignalHandler.h
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/MozMeegoSignalHandler.h
-@@ -0,0 +1,66 @@
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is Mozilla Communicator client code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Netscape Communications Corporation.
-+ * Portions created by the Initial Developer are Copyright (C) 2010
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s): jonkhemming at gmail.com
-+ *
-+ * Alternatively, the contents of this file may be used under the terms of
-+ * either the GNU General Public License Version 2 or later (the "GPL"), or
-+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-+ * in which case the provisions of the GPL or the LGPL are applicable instead
-+ * of those above. If you wish to allow use of your version of this file only
-+ * under the terms of either the GPL or the LGPL, and not to allow others to
-+ * use your version of this file under the terms of the MPL, indicate your
-+ * decision by deleting the provisions above and replace them with the notice
-+ * and other provisions required by the GPL or the LGPL. If you do not delete
-+ * the provisions above, a recipient may use your version of this file under
-+ * the terms of any one of the MPL, the GPL or the LGPL.
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+#ifndef MOZMEEGOSIGNALHANDLER_H
-+#define MOZMEEGOSIGNALHANDLER_H
-+
-+#include <QObject>
-+#include <qmsystem/qmdisplaystate.h>
-+
-+/**
-+ * Class for handling different signals from Meego framework.
-+ */
-+class MozMeegoSignalHandler : public QObject
-+{
-+
-+    Q_OBJECT
-+
-+public:
-+    MozMeegoSignalHandler( QObject *parent = 0 );
-+    ~MozMeegoSignalHandler();
-+    
-+public slots:
-+    /**
-+     * Slot for handling display state changes of the device.
-+     *
-+     * @param aState enum Maemo::QmDisplayState::DisplayState
-+     *               
-+     */
-+    void reactToDisplayStateChange(Maemo::QmDisplayState::DisplayState aState);
-+};
-+
-+
-+#endif // MOZMEEGOSIGNALHANDLER_H
-diff --git a/toolkit/xre/nsNativeAppSupportQt.cpp b/toolkit/xre/nsNativeAppSupportQt.cpp
---- a/toolkit/xre/nsNativeAppSupportQt.cpp
-+++ b/toolkit/xre/nsNativeAppSupportQt.cpp
-@@ -31,16 +31,26 @@
-  * use your version of this file under the terms of the MPL, indicate your
-  * decision by deleting the provisions above and replace them with the notice
-  * and other provisions required by the GPL or the LGPL. If you do not delete
-  * the provisions above, a recipient may use your version of this file under
-  * the terms of any one of the MPL, the GPL or the LGPL.
-  *
-  * ***** END LICENSE BLOCK ***** */
- 
-+#if defined(MOZ_WIDGET_QT)
-+#if ( MOZ_PLATFORM_MAEMO == 6 )
-+#ifdef MOZ_ENABLE_MEEGOTOUCH
-+#include "MozMeegoSignalHandler.h"
-+#include <mapplication.h>
-+#include <qmsystem/qmdisplaystate.h>
-+#endif
-+#endif
-+#endif
-+
- #include <stdlib.h>
- #include "nsNativeAppSupportBase.h"
- 
- #ifdef MOZ_ENABLE_LIBCONIC
- #include <glib-object.h>
- #endif
- 
- class nsNativeAppSupportQt : public nsNativeAppSupportBase
-@@ -55,16 +65,32 @@ nsNativeAppSupportQt::Start(PRBool* aRet
- {
-   NS_ASSERTION(gAppData, "gAppData must not be null.");
- 
-   *aRetVal = PR_TRUE;
- #ifdef MOZ_ENABLE_LIBCONIC
-   g_type_init();
- #endif
- 
-+#if defined(MOZ_WIDGET_QT)
-+#if ( MOZ_PLATFORM_MAEMO == 6 )
-+#ifdef MOZ_ENABLE_MEEGOTOUCH
-+  // MozMeegoSignalHandler::reactToDisplayStateChange will react to changes of display states in the
-+  // device.
-+  MozMeegoSignalHandler *stateChangeHandler = new MozMeegoSignalHandler(MApplication::instance());
-+  Maemo::QmDisplayState *displayState = new Maemo::QmDisplayState(MApplication::instance());
-+
-+  if ( !stateChangeHandler || !displayState ) return NS_ERROR_FAILURE;
-+
-+  QObject::connect( displayState, SIGNAL( displayStateChanged(Maemo::QmDisplayState::DisplayState)),
-+                    stateChangeHandler, SLOT(reactToDisplayStateChange(Maemo::QmDisplayState::DisplayState)));
-+#endif
-+#endif
-+#endif
-+
-   return NS_OK;
- }
- 
- NS_IMETHODIMP
- nsNativeAppSupportQt::Stop(PRBool* aResult)
- {
-   NS_ENSURE_ARG(aResult);
-   *aResult = PR_TRUE;
--- series
+++ series
@@ -34,8 +34,6 @@
 e10s/pmo184502_wr.diff
 meegotouch/bmo583286_textmode_support.diff
 meegotouch/bmo583341_vkb_lose_focus.diff
-meegotouch/pmo176709_display_state_notifies.diff
-meegotouch/bmo584217_contentpicker.diff
 meegotouch/pmo184162_style_windows.diff
 meegotouch/bloody_meegotouch.diff
 meego/multiple_qtdev_ver.diff
@@ -46,4 +44,4 @@
 meego/use_fennec_promptservice.diff
 meego/force_opaque_on_transparent_flash.diff
 meego/home_btn_once_hack.diff
-meego/mozalloc_new_op.diff
+meego/meego_obs_exception.diff

++++++ deleted files:
--- meego-theme.tar.gz




More information about the MeeGo-commits mailing list