browser-switch
13 years agoFix a broken merge fremantle-package-3.3b1-1fremantle1
Steven Luo [Sun, 30 May 2010 11:24:53 +0000 (04:24 -0700)]
Fix a broken merge

13 years agoUpdate debian/changelog, bump version number
Steven Luo [Sun, 30 May 2010 10:23:41 +0000 (03:23 -0700)]
Update debian/changelog, bump version number

13 years agoMerge commit 'diablo-package-3.3b1-1' into fremantle-package
Steven Luo [Sun, 30 May 2010 10:19:24 +0000 (03:19 -0700)]
Merge commit 'diablo-package-3.3b1-1' into fremantle-package

13 years agoRevert "Add preliminary support for Opera Mobile"
Steven Luo [Sun, 30 May 2010 10:16:40 +0000 (03:16 -0700)]
Revert "Add preliminary support for Opera Mobile"

This reverts commit 81d2b2485ca2a490af7f4bb5d4e2995c35c12915.

13 years agoUpdate debian/changelog, bump version number diablo-package-3.3b1-1
Steven Luo [Sun, 30 May 2010 09:55:47 +0000 (02:55 -0700)]
Update debian/changelog, bump version number

13 years agoAdd command-line utility to Makefile install target
Steven Luo [Sun, 30 May 2010 09:46:46 +0000 (02:46 -0700)]
Add command-line utility to Makefile install target

13 years agoUpdate debian/rules to build command-line config utility
Steven Luo [Sun, 30 May 2010 09:43:43 +0000 (02:43 -0700)]
Update debian/rules to build command-line config utility

13 years agoMerge commit 'v3.3b1' into diablo-package
Steven Luo [Sun, 30 May 2010 09:40:58 +0000 (02:40 -0700)]
Merge commit 'v3.3b1' into diablo-package

13 years agoRemove webpages for release v3.3b1
Steven Luo [Sun, 30 May 2010 09:37:56 +0000 (02:37 -0700)]
Remove webpages for release

13 years agoRevert "Add preliminary support for Opera Mobile"
Steven Luo [Sun, 30 May 2010 09:34:54 +0000 (02:34 -0700)]
Revert "Add preliminary support for Opera Mobile"

This reverts commit 81d2b2485ca2a490af7f4bb5d4e2995c35c12915.

13 years agoConfig UI: leave other_browser_cmd unset instead of configuring an empty value
Steven Luo [Sun, 30 May 2010 09:17:11 +0000 (02:17 -0700)]
Config UI: leave other_browser_cmd unset instead of configuring an empty value

It used to be that when the user cleared the value of other_browser_cmd
in the UI, the setting would be removed from the config file instead of
writing an empty value.  Restore this behavior.

13 years agoFix check for whether a browser is installed
Steven Luo [Sun, 30 May 2010 08:54:25 +0000 (01:54 -0700)]
Fix check for whether a browser is installed

The intent was to exempt MicroB (and any other browser listed with
browser->binary = NULL) from the check, but the tests here didn't do
that.  Fix this so that default_browser = microb doesn't emit a warning.

13 years agoCommand-line utility: avoid NULL dereference when displaying string config settings
Steven Luo [Sun, 30 May 2010 08:51:42 +0000 (01:51 -0700)]
Command-line utility: avoid NULL dereference when displaying string config settings

13 years agoUpdate README and Changelog
Steven Luo [Sun, 30 May 2010 08:09:37 +0000 (01:09 -0700)]
Update README and Changelog

13 years agoFix memory leak on reconfiguration
Steven Luo [Sun, 30 May 2010 07:48:37 +0000 (00:48 -0700)]
Fix memory leak on reconfiguration

Caught by valgrind.

13 years agoDescribe MicroB slightly more verbosely in the UI
Steven Luo [Sun, 30 May 2010 07:16:32 +0000 (00:16 -0700)]
Describe MicroB slightly more verbosely in the UI

Emanuele Cassioli pointed out that users could potentially be unfamiliar
with the name "MicroB", since it's not used in normally user-visible
places.  Rename the entry "MicroB (stock browser)" to hopefully help
these users; better suggestions welcome.

13 years agoDon't use a browser as the default browser if it's not installed
Steven Luo [Sun, 30 May 2010 05:53:19 +0000 (22:53 -0700)]
Don't use a browser as the default browser if it's not installed

Add locations for the known browsers' binaries, and check to see if the
binary is installed before using a browser as the default.

13 years agoGet rid of boilerplate code in swb_config_free()
Steven Luo [Sun, 30 May 2010 05:20:24 +0000 (22:20 -0700)]
Get rid of boilerplate code in swb_config_free()

We can loop over swb_config_options[] instead of identifying every
string config option explicitly here.

13 years agoAvoid structure copies when looping through swb_config_options
Steven Luo [Sun, 30 May 2010 05:11:11 +0000 (22:11 -0700)]
Avoid structure copies when looping through swb_config_options

13 years agoRemove use_other_browser_cmd()
Steven Luo [Sun, 30 May 2010 04:37:28 +0000 (21:37 -0700)]
Remove use_other_browser_cmd()

use_other_browser_cmd() is only called from one place now, so just move
its code there and get rid of the function.

13 years agoUse an array of browser launchers instead of boilerplate code in update_default_browser()
Steven Luo [Sun, 30 May 2010 04:25:42 +0000 (21:25 -0700)]
Use an array of browser launchers instead of boilerplate code in update_default_browser()

Replace the existing set of if-elses comparing default_browser against
string constants with a loop over an array of browser launchers, which
will be (marginally) easier to maintain.

13 years agoUpdate webpage
Steven Luo [Sun, 30 May 2010 03:32:12 +0000 (20:32 -0700)]
Update webpage

13 years agoMerge branch 'diablo-package' into fremantle-package fremantle-package-3.2-2fremantle1
Steven Luo [Fri, 28 May 2010 09:19:04 +0000 (02:19 -0700)]
Merge branch 'diablo-package' into fremantle-package

13 years agoUpdate package description diablo-package-3.2-2
Steven Luo [Fri, 28 May 2010 09:18:47 +0000 (02:18 -0700)]
Update package description

13 years agoUpdate debian/changelog, bump version number
Steven Luo [Fri, 28 May 2010 08:40:48 +0000 (01:40 -0700)]
Update debian/changelog, bump version number

13 years agoMerge branch 'diablo-package' into fremantle-package
Steven Luo [Fri, 28 May 2010 08:37:55 +0000 (01:37 -0700)]
Merge branch 'diablo-package' into fremantle-package

13 years agoUpdate debian/changelog, bump version number
Steven Luo [Fri, 28 May 2010 08:35:36 +0000 (01:35 -0700)]
Update debian/changelog, bump version number

13 years agoAdd preliminary support for Opera Mobile
Steven Luo [Thu, 13 May 2010 09:19:23 +0000 (02:19 -0700)]
Add preliminary support for Opera Mobile

We do this the lazy way, using use_other_browser_cmd("opera %s").  The
Opera Labs post announcing Opera Mobile for Maemo
(http://labs.opera.com/news/2010/05/11/) says that "an extra empty tab
will get opened every time you open a link from an external
application", so I suspect we may need a different method of opening
links in an already open browser.

13 years agoAdd preliminary support for Opera Mobile
Steven Luo [Thu, 13 May 2010 09:19:23 +0000 (02:19 -0700)]
Add preliminary support for Opera Mobile

We do this the lazy way, using use_other_browser_cmd("opera %s").  The
Opera Labs post announcing Opera Mobile for Maemo
(http://labs.opera.com/news/2010/05/11/) says that "an extra empty tab
will get opened every time you open a link from an external
application", so I suspect we may need a different method of opening
links in an already open browser.

13 years agoDon't build with -mthumb on Fremantle
Steven Luo [Fri, 28 May 2010 08:21:37 +0000 (01:21 -0700)]
Don't build with -mthumb on Fremantle

Using Thumb instructions causes browser-switchboard to crash with SIGILL
on Fremantle PR1.2 devices, presumably due to some combination of kernel
and toolchain bugs, so disable the use of Thumb for now.

Thanks to Uwe Kaminski (jukey) and Fred Farber (ffarber) for providing
details on this bug.

13 years agoIntroduce command-line config utility
Steven Luo [Wed, 26 May 2010 14:52:17 +0000 (07:52 -0700)]
Introduce command-line config utility

Add a simple command-line configuration utility,
browser-switchboard-config, which can be used to query or set
browser-switchboard config settings.

The primary purpose of this tool is to allow browser vendors to provide
an option in their browsers to set themselves as the default browser,
via something like this (shell-like pseudocode):
if [ -x /usr/bin/browser-switchboard-config ]; then
if [ `browser-switchboard-config -b` = "mybrowser" ]; then
display "MyBrowser is the default browser."
else
button "Make MyBrowser the default browser" action "browser-switchboard-config -s -b mybrowser"
fi
else
display "Install Browser Switchboard to make MyBrowser the default browser"
fi
Browser vendors: setting yourself as the default browser without
prompting the user first (via package maintainer scripts, for example)
is strongly discouraged.

13 years agoIndentation fixes
Steven Luo [Wed, 26 May 2010 14:36:30 +0000 (07:36 -0700)]
Indentation fixes

13 years agoClean up configuration again
Steven Luo [Wed, 26 May 2010 11:06:30 +0000 (04:06 -0700)]
Clean up configuration again

Commit ec8b58af... ("Refactor configuration") still has too much
boilerplate code and leaves too many places that have to be modified to
add a new config option.

To fix this, add a new array of config options with name and type of
information stored, and then add an array of pointers to the elements of
struct swb_config with indices matching the list of config options to
struct swb_config.  This consolidates all the work needed to add new
config options to config.h and config.c, and allows us to replace the
boilerplate code with loops over the array of config options.

13 years agoRefactor configuration
Steven Luo [Tue, 25 May 2010 13:41:42 +0000 (06:41 -0700)]
Refactor configuration

Most of the code for loading configuration from the config file was
being duplicated between the UI and the main browser-switchboard code;
also, the forthcoming command-line configuration tool should share the
code for loading and saving configuration with the UI.  Therefore,
move code for loading and saving configuration information into
functions generic enough to be shared between the UIs and
browser-switchboard.

13 years agoAdd preliminary support for Opera Mobile
Steven Luo [Thu, 13 May 2010 09:19:23 +0000 (02:19 -0700)]
Add preliminary support for Opera Mobile

We do this the lazy way, using use_other_browser_cmd("opera %s").  The
Opera Labs post announcing Opera Mobile for Maemo
(http://labs.opera.com/news/2010/05/11/) says that "an extra empty tab
will get opened every time you open a link from an external
application", so I suspect we may need a different method of opening
links in an already open browser.

14 years agoFremantle: clear hildon-control-panel's cached image on remove
Steven Luo [Mon, 19 Apr 2010 10:32:34 +0000 (03:32 -0700)]
Fremantle: clear hildon-control-panel's cached image on remove

On Fremantle, hildon-control-panel creates a screenshot of itself, which
is displayed during startup to create the illusion of a faster startup
time (sigh).  Of course, this cache doesn't appear to be regenerated
when a control panel icon is removed
(https://bugs.maemo.org/show_bug.cgi?id=9512).  Wonderful.

Work around by removing the cached image in the postrm.

14 years agoWhitespace cleanups
Steven Luo [Mon, 8 Mar 2010 09:34:18 +0000 (01:34 -0800)]
Whitespace cleanups

14 years agoAvoid use of Fremantle codename alone, for clarity
Steven Luo [Wed, 24 Feb 2010 20:09:11 +0000 (12:09 -0800)]
Avoid use of Fremantle codename alone, for clarity

14 years agoUpdate webpage
Steven Luo [Wed, 24 Feb 2010 20:05:39 +0000 (12:05 -0800)]
Update webpage

14 years agoNote that on Fremantle, MicroB browser windows should be closed before installing
Steven Luo [Mon, 22 Feb 2010 12:13:41 +0000 (04:13 -0800)]
Note that on Fremantle, MicroB browser windows should be closed before installing

14 years agoUpdate debian/changelog, bump version number fremantle-package-3.2-1fremantle1
Steven Luo [Mon, 22 Feb 2010 11:03:11 +0000 (03:03 -0800)]
Update debian/changelog, bump version number

14 years agoAdd a postinst to kill off prestarted MicroB browser process
Steven Luo [Mon, 22 Feb 2010 10:58:41 +0000 (02:58 -0800)]
Add a postinst to kill off prestarted MicroB browser process

On Fremantle, a MicroB browser process is prestarted by default on
device startup.  This browser process takes com.nokia.osso_browser,
which means that link requests will not launch browser-switchboard
unless we kill off this browser process or restart the device.

14 years agoAdd a Fremantle-specific microb.desktop
Steven Luo [Mon, 22 Feb 2010 10:49:58 +0000 (02:49 -0800)]
Add a Fremantle-specific microb.desktop

MicroB's icon has a different name in Fremantle, so we need to modify
the .desktop file that we ship.

14 years agoBuild fremantle targets in debian/rules, clean up old unused cruft
Steven Luo [Mon, 22 Feb 2010 10:47:41 +0000 (02:47 -0800)]
Build fremantle targets in debian/rules, clean up old unused cruft

14 years agoMerge commit 'diablo-package-3.2-1' into test-branch
Steven Luo [Mon, 22 Feb 2010 10:46:28 +0000 (02:46 -0800)]
Merge commit 'diablo-package-3.2-1' into test-branch

Conflicts:

debian/changelog
debian/rules

14 years agoRevert "Initial support for launching MicroB on Fremantle"
Steven Luo [Mon, 22 Feb 2010 10:44:10 +0000 (02:44 -0800)]
Revert "Initial support for launching MicroB on Fremantle"

This reverts commit f4665fd53d5c0e352e36326efee27e6ce6edce1d.

14 years agoRevert "Remove some unnecessary #includes that crept in"
Steven Luo [Mon, 22 Feb 2010 10:44:09 +0000 (02:44 -0800)]
Revert "Remove some unnecessary #includes that crept in"

This reverts commit f6c9c1bcdb9a50cff459d69feeab1caa909f098c.

14 years agoRevert "Zap one more extraneous #include from Fremantle MicroB work"
Steven Luo [Mon, 22 Feb 2010 10:44:08 +0000 (02:44 -0800)]
Revert "Zap one more extraneous #include from Fremantle MicroB work"

This reverts commit d39042804d1ee8b5f57dd5c1af884ea4e208b30a.

14 years agoRevert "Close stdin/stdout/stderr in child processes before exec()"
Steven Luo [Mon, 22 Feb 2010 10:44:07 +0000 (02:44 -0800)]
Revert "Close stdin/stdout/stderr in child processes before exec()"

This reverts commit 17853b6cdd152a6c53a3e3e11506e3a780e4991c.

14 years agoRevert "Throw away stdout/stderr for browserds we launch too"
Steven Luo [Mon, 22 Feb 2010 10:44:06 +0000 (02:44 -0800)]
Revert "Throw away stdout/stderr for browserds we launch too"

This reverts commit 30d5e7a1400fb294e75e2199e3a4de5176e84506.

14 years agoRevert "Make sure a running browserd is detected correctly on all devices"
Steven Luo [Mon, 22 Feb 2010 10:44:05 +0000 (02:44 -0800)]
Revert "Make sure a running browserd is detected correctly on all devices"

This reverts commit aea8af77e9b8614776a3be05a4dff86ea25063f6.

14 years agoRevert "Kill MicroB browser UI processes instead of using exit_browser"
Steven Luo [Mon, 22 Feb 2010 10:44:04 +0000 (02:44 -0800)]
Revert "Kill MicroB browser UI processes instead of using exit_browser"

This reverts commit 6f2522256b931713418b8d747612255c03481e21.

14 years agoRevert "Take a different approach to detecting MicroB browser window close"
Steven Luo [Mon, 22 Feb 2010 10:44:03 +0000 (02:44 -0800)]
Revert "Take a different approach to detecting MicroB browser window close"

This reverts commit d1664d84713a1b9731e8c726cd0e69fe38eb5872.

14 years agoRevert "Install the inotify watch for lockfile creation before forking"
Steven Luo [Mon, 22 Feb 2010 10:44:01 +0000 (02:44 -0800)]
Revert "Install the inotify watch for lockfile creation before forking"

This reverts commit c3c41ba1385b47dc2a167e963478779ad5c952fe.

14 years agoRevert "Avoid a race between MicroB startup and establishing D-Bus watch for it"
Steven Luo [Mon, 22 Feb 2010 10:43:59 +0000 (02:43 -0800)]
Revert "Avoid a race between MicroB startup and establishing D-Bus watch for it"

This reverts commit 807b507a9f6cc3be8f12d68f7849da970652a9a6.

14 years agoRevert "Ensure that only one browser-switchboard is active at any time"
Steven Luo [Mon, 22 Feb 2010 10:42:30 +0000 (02:42 -0800)]
Revert "Ensure that only one browser-switchboard is active at any time"

This reverts commit ae25c6b332df1c92b1433474bbf4c8b8b857b7ff.

14 years agoUpdate debian/changelog, bump version number diablo-package-3.2-1
Steven Luo [Mon, 22 Feb 2010 10:14:35 +0000 (02:14 -0800)]
Update debian/changelog, bump version number

14 years agoEnable building with -mthumb for ARM by default
Steven Luo [Mon, 22 Feb 2010 10:06:00 +0000 (02:06 -0800)]
Enable building with -mthumb for ARM by default

The Diablo autobuilder passes an invalid DEB_BUILD_OPTIONS (options
should be space-separated, not comma-separated), and the Fremantle
autobuilder doesn't pass "thumb" in DEB_BUILD_OPTIONS at all, so the
existing code was an effective no-op.  We know we want Thumb
instructions by default, so build with -mthumb by default and offer a
"nothumb" option to turn it off.

14 years agoUpdate debian/rules for new build system
Steven Luo [Mon, 22 Feb 2010 10:05:20 +0000 (02:05 -0800)]
Update debian/rules for new build system

14 years agoMerge commit 'v3.2' into test-branch
Steven Luo [Mon, 22 Feb 2010 10:03:38 +0000 (02:03 -0800)]
Merge commit 'v3.2' into test-branch

14 years agoRestore webpages
Steven Luo [Mon, 22 Feb 2010 10:00:55 +0000 (02:00 -0800)]
Restore webpages

This reverts commit 4426a6e201e88459830f194617af1d5dd14ed3ef.

14 years agoRemove webpages for release v3.2
Steven Luo [Mon, 22 Feb 2010 09:59:05 +0000 (01:59 -0800)]
Remove webpages for release

14 years agoUpdate Changelog
Steven Luo [Mon, 22 Feb 2010 09:41:42 +0000 (01:41 -0800)]
Update Changelog

14 years agoUpdate README
Steven Luo [Mon, 22 Feb 2010 09:29:00 +0000 (01:29 -0800)]
Update README

14 years agoRevert "Make startup notification work for MicroB menu entry"
Steven Luo [Mon, 22 Feb 2010 09:13:01 +0000 (01:13 -0800)]
Revert "Make startup notification work for MicroB menu entry"

This behaves very badly if you try to use the MicroB menu entry while
MicroB is already open (a new MicroB will open after you close the
MicroB).

This reverts commit 846e68b8ffa979d30ed331c43020212ffdee2bf2.

14 years agoMake startup notification work for MicroB menu entry
Steven Luo [Mon, 22 Feb 2010 04:53:46 +0000 (20:53 -0800)]
Make startup notification work for MicroB menu entry

To have working startup notification, we have to provide a D-Bus service
with a top_application method; hildon-desktop will then use that to
launch the application instead of invoking the binary directly.  Co-opt
the org.maemo.garage.browser_switchboard name previously used for
locking for this (replacing a - with a _ to get around D-Bus naming
restrictions).

While we're at it, remove the non-standard switchboard_launch_microb
method from the com.nokia.osso_browser interface we implement, instead
providing a launch_microb method in our own interface.

14 years agoLink binaries with -Wl,--as-needed to reduce library dependencies
Steven Luo [Mon, 22 Feb 2010 06:29:32 +0000 (22:29 -0800)]
Link binaries with -Wl,--as-needed to reduce library dependencies

Using pkg-config --libs to get library link lines has the disadvantage
of bringing in many more library dependencies than actually necessary,
since that assumes that dependencies of libraries need to be specified
explicitly at link time (even when the library is itself linked against
those dependencies).  Using GNU ld's --as-needed option causes these
unnecessary dependencies to be omitted from the binary.

--as-needed needs to be specified after all the objects to be linked
into the binary and before the libraries, so some reordering of the link
command line is needed.

14 years agoFix Makefile install targets
Steven Luo [Mon, 22 Feb 2010 06:19:01 +0000 (22:19 -0800)]
Fix Makefile install targets

The overhaul of the Makefile targets broke the dependencies of the
install targets; fix this (along with a broken strip target in
config-ui/Makefile).

14 years agoFix Makefile clean targets
Steven Luo [Mon, 22 Feb 2010 05:47:28 +0000 (21:47 -0800)]
Fix Makefile clean targets

Since we have a list of objects that we build already, use that in the
clean targets instead of *.o.  This fixes the config-ui Makefile clean
target, which was potentially missing ../configfile.plugin.o.

14 years agoUpdate build system
Steven Luo [Mon, 22 Feb 2010 05:37:12 +0000 (21:37 -0800)]
Update build system

As currently set up, it takes far too much external knowledge to
generate builds for Fremantle (a set of EXTRA_CPPFLAGS as well as
EXTRA_LDFLAGS); this is because the Makefiles were originally written
when there was only one target system (Diablo).

To fix this, provide new "diablo" and "fremantle" targets that can be
used to build the appropriate browser-switchboard without further
configuration, and make the "all" target print out a help message.  For
the config UI, provide new "fremantle-hildon-app" and "fremantle-plugin"
targets, and rename the existing targets to "diablo-hildon-app" and
"diablo-plugin" to match.

14 years agoMake "Web" menu entry and /usr/bin/browser open the default browser
Steven Luo [Sun, 21 Feb 2010 05:47:48 +0000 (21:47 -0800)]
Make "Web" menu entry and /usr/bin/browser open the default browser

Currently, no matter what the default browser is set to, the "Web" menu
entry opens MicroB, and running /usr/bin/browser does the same. This is
done to make sure that there's always a way of opening MicroB regardless
of the default browser setting.

However, this behavior would seem to be less than intuitive (why does
the entry marked "Web" not open the default browser? on Diablo, why do
the Web sidebar panel and Web menu entry do completely different
things?).  Therefore, do the following:

* Make the top_application method in the D-Bus interface open the
  default browser, not MicroB, and therefore make the "Web" menu entry
  open the default browser.
* Ship a new microb.desktop file which provides a MicroB menu entry that
  launches MicroB.
* Rename the existing /usr/bin/browser script to /usr/bin/microb.
* Ship a new /usr/bin/browser script which launches the default browser.

This has one primary disadvantage: none of the standard methods of
launching a browser on Maemo can be guaranteed to bring up MicroB (with
the old behavior, invoking /usr/bin/browser was guaranteed to bring up
MicroB, just as if Browser Switchboard weren't installed).

14 years agoMake config printout go to selected log target
Steven Luo [Sun, 21 Feb 2010 03:54:54 +0000 (19:54 -0800)]
Make config printout go to selected log target

The config printout that gets displayed on startup was happening before
log_config(), so it was always going to stdout regardless of the logging
setting.  Fix this.

14 years agoAdd a new config setting for logging
Steven Luo [Sun, 21 Feb 2010 03:26:48 +0000 (19:26 -0800)]
Add a new config setting for logging

Add a new config setting:
logging = "stdout" -- log to stdout (default)
logging = "syslog" -- log to syslog
logging = "none" -- disable logging
No configuration UI is exposed, but the UI needs to be taught that this
is a legal config setting (so that it doesn't discard it).

14 years agoConvert existing code to use the new logging infrastructure
Steven Luo [Sun, 21 Feb 2010 02:39:20 +0000 (18:39 -0800)]
Convert existing code to use the new logging infrastructure

14 years agoAdd logging functions with selectable log output targets
Steven Luo [Sun, 21 Feb 2010 02:13:28 +0000 (18:13 -0800)]
Add logging functions with selectable log output targets

Currently, our "logging" consists of a mix of printf(), perror(), and
other such calls which print output to stdout/stderr.  In normal usage,
browser-switchboard will be launched by D-Bus, which results in
stdout/stderr pointing to /dev/null and debugging output being lost.

To improve this situation, introduce a new set of logging functions
log_out() and log_perror(), and a log_config() which allows choosing the
log target.  These functions log to stdout by default, but also support
syslog output (to the LOG_USER facility, with priority LOG_DEBUG) and
disabling logging entirely.

Thanks to Faheem Pervez (qwerty12) for the suggestion.

14 years agoForce the Fremantle Ovi Store bookmark to open in MicroB
Steven Luo [Sat, 20 Feb 2010 01:19:29 +0000 (17:19 -0800)]
Force the Fremantle Ovi Store bookmark to open in MicroB

The Ovi Store apparently only comes up if you visit with MicroB, so
force the link in the Ovi Store bookmark to open in MicroB.

Reported by maemo.org talk user ToJa92; additional details provided by
Faheem Pervez (qwerty12).

14 years agoUpdate debian/changelog, bump version number fremantle-package-3.1-2fremantle4
Steven Luo [Tue, 16 Feb 2010 02:58:07 +0000 (18:58 -0800)]
Update debian/changelog, bump version number

14 years agoEnsure that only one browser-switchboard is active at any time
Steven Luo [Mon, 15 Feb 2010 07:26:16 +0000 (23:26 -0800)]
Ensure that only one browser-switchboard is active at any time

When launching MicroB, during the window between the time we let go of
com.nokia.osso_browser and the time MicroB picks it up, it's possible
that some process issues a request for the interface, which causes D-Bus
to attempt to start another copy of browser-switchboard; the results are
confusing at best and (in the Fremantle case) disastrous at worst.
Prevent this by trying to acquire the name
org.maemo.garage.browser-switchboard from D-Bus on startup, in a manner
that succeeds if and only if no one else already owns the name.

This is important because the Fremantle hildon-desktop appears to
sometimes insist on having a process to own com.nokia.osso_browser at
all times; when it decides this is necessary, it picks up our release of
the name and immediately asks D-Bus to launch another
browser-switchboard, which gets in the way of our MicroB launching
procedure.

14 years agoAvoid a race between MicroB startup and establishing D-Bus watch for it
Steven Luo [Mon, 15 Feb 2010 01:58:53 +0000 (17:58 -0800)]
Avoid a race between MicroB startup and establishing D-Bus watch for it

As it stands, the establishment of the D-Bus match and filter for the
acquisition of com.nokia.osso_browser happens in parallel with MicroB
startup; as a result, it's possible that MicroB could acquire the name
before we're ready to look for the event, which results in us waiting
forever for MicroB to start (even though it's already started).  Avoid
this by establishing the watch before we fork a child process.

Possibly fixes a rare failure mode reported by Faheem Pervez (qwerty12).

14 years agoInstall the inotify watch for lockfile creation before forking
Steven Luo [Mon, 15 Feb 2010 01:28:54 +0000 (17:28 -0800)]
Install the inotify watch for lockfile creation before forking

This avoids the silliness of doing this in both the parent and child
process.

14 years agoUpdate copyright year
Steven Luo [Tue, 16 Feb 2010 02:52:07 +0000 (18:52 -0800)]
Update copyright year

14 years agoClarify control flow in inotify read loop
Steven Luo [Tue, 16 Feb 2010 02:50:01 +0000 (18:50 -0800)]
Clarify control flow in inotify read loop

Replace pointer arithmetic that makes the loop condition false with a
simple break; functionally equivalent, but much clearer.

14 years agoEnsure that only one browser-switchboard is active at any time
Steven Luo [Mon, 15 Feb 2010 07:26:16 +0000 (23:26 -0800)]
Ensure that only one browser-switchboard is active at any time

When launching MicroB, during the window between the time we let go of
com.nokia.osso_browser and the time MicroB picks it up, it's possible
that some process issues a request for the interface, which causes D-Bus
to attempt to start another copy of browser-switchboard; the results are
confusing at best and (in the Fremantle case) disastrous at worst.
Prevent this by trying to acquire the name
org.maemo.garage.browser-switchboard from D-Bus on startup, in a manner
that succeeds if and only if no one else already owns the name.

This is important because the Fremantle hildon-desktop appears to
sometimes insist on having a process to own com.nokia.osso_browser at
all times; when it decides this is necessary, it picks up our release of
the name and immediately asks D-Bus to launch another
browser-switchboard, which gets in the way of our MicroB launching
procedure.

14 years agoAvoid a race between MicroB startup and establishing D-Bus watch for it
Steven Luo [Mon, 15 Feb 2010 01:58:53 +0000 (17:58 -0800)]
Avoid a race between MicroB startup and establishing D-Bus watch for it

As it stands, the establishment of the D-Bus match and filter for the
acquisition of com.nokia.osso_browser happens in parallel with MicroB
startup; as a result, it's possible that MicroB could acquire the name
before we're ready to look for the event, which results in us waiting
forever for MicroB to start (even though it's already started).  Avoid
this by establishing the watch before we fork a child process.

Possibly fixes a rare failure mode reported by Faheem Pervez (qwerty12).

14 years agoInstall the inotify watch for lockfile creation before forking
Steven Luo [Mon, 15 Feb 2010 01:28:54 +0000 (17:28 -0800)]
Install the inotify watch for lockfile creation before forking

This avoids the silliness of doing this in both the parent and child
process.

14 years agoUpdate debian/changelog, bump version number fremantle-package-3.1-2fremantle3
Steven Luo [Sun, 14 Feb 2010 05:16:11 +0000 (21:16 -0800)]
Update debian/changelog, bump version number

14 years agoTake a different approach to detecting MicroB browser window close
Steven Luo [Sun, 14 Feb 2010 04:55:19 +0000 (20:55 -0800)]
Take a different approach to detecting MicroB browser window close

As it turns out, the Fremantle IM/SMS application also spawns a
browserd; this browserd also attempts to claim the Mozilla.MicroB or
com.nokia.microb-engine D-Bus name, which means that we cannot count on
the MicroB browserd actually having ownership of this name.

Assuming that this D-Bus name is actually needed by anything else, this
is broken by design (since only one connection can own a name on the bus
at any time, and which browserd owns the name appears to be
nondeterministic); of course, I haven't observed any actual use of this
name in my testing either.  Who comes up with this stuff?!?!!?!

In any event, take a different approach to detecting when the MicroB
browserd closes: get the browserd PID from its profile lockfile, then
ptrace() the process to learn when it closes.  There are various
complications which make this more involved than we'd like, but this
should be a foolproof method of detecting the browserd close.

14 years agoTake a different approach to detecting MicroB browser window close
Steven Luo [Sun, 14 Feb 2010 04:55:19 +0000 (20:55 -0800)]
Take a different approach to detecting MicroB browser window close

As it turns out, the Fremantle IM/SMS application also spawns a
browserd; this browserd also attempts to claim the Mozilla.MicroB or
com.nokia.microb-engine D-Bus name, which means that we cannot count on
the MicroB browserd actually having ownership of this name.

Assuming that this D-Bus name is actually needed by anything else, this
is broken by design (since only one connection can own a name on the bus
at any time, and which browserd owns the name appears to be
nondeterministic); of course, I haven't observed any actual use of this
name in my testing either.  Who comes up with this stuff?!?!!?!

In any event, take a different approach to detecting when the MicroB
browserd closes: get the browserd PID from its profile lockfile, then
ptrace() the process to learn when it closes.  There are various
complications which make this more involved than we'd like, but this
should be a foolproof method of detecting the browserd close.

14 years agoUpdate webpage
Steven Luo [Sat, 6 Feb 2010 12:52:13 +0000 (04:52 -0800)]
Update webpage

14 years agoUpdate debian/changelog, bump version number fremantle-package-3.1-2fremantle2
Steven Luo [Sat, 6 Feb 2010 11:38:41 +0000 (03:38 -0800)]
Update debian/changelog, bump version number

14 years agoAvoid two consecutive parens in webpage text
Steven Luo [Sat, 6 Feb 2010 10:58:21 +0000 (02:58 -0800)]
Avoid two consecutive parens in webpage text

14 years agoUpdate Fremantle screenshot with new 3.1 UI
Steven Luo [Sat, 6 Feb 2010 10:56:37 +0000 (02:56 -0800)]
Update Fremantle screenshot with new 3.1 UI

14 years agoUpdate webpage
Steven Luo [Sat, 6 Feb 2010 10:55:20 +0000 (02:55 -0800)]
Update webpage

14 years agoKill MicroB browser UI processes instead of using exit_browser
Steven Luo [Sat, 6 Feb 2010 10:00:38 +0000 (02:00 -0800)]
Kill MicroB browser UI processes instead of using exit_browser

Reports from users suggest that the exit_browser method call currently
being used to close the MicroB browser UI processes may not be working
reliably.  Try a kill() instead, and hope that this doesn't introduce
data loss problems ...

14 years agoMake sure a running browserd is detected correctly on all devices
Steven Luo [Fri, 5 Feb 2010 12:32:01 +0000 (04:32 -0800)]
Make sure a running browserd is detected correctly on all devices

`pidof /usr/sbin/browserd` doesn't work on at least one user's device;
`pidof browserd` works everywhere without exception, so use that
instead.

Reported by Faheem Pervez (qwerty12).

14 years agoKill MicroB browser UI processes instead of using exit_browser
Steven Luo [Sat, 6 Feb 2010 10:00:38 +0000 (02:00 -0800)]
Kill MicroB browser UI processes instead of using exit_browser

Reports from users suggest that the exit_browser method call currently
being used to close the MicroB browser UI processes may not be working
reliably.  Try a kill() instead, and hope that this doesn't introduce
data loss problems ...

14 years agoMake sure a running browserd is detected correctly on all devices
Steven Luo [Fri, 5 Feb 2010 12:32:01 +0000 (04:32 -0800)]
Make sure a running browserd is detected correctly on all devices

`pidof /usr/sbin/browserd` doesn't work on at least one user's device;
`pidof browserd` works everywhere without exception, so use that
instead.

Reported by Faheem Pervez (qwerty12).

14 years agoUpdate debian/changelog, bump version number fremantle-package-3.1-2fremantle1
Steven Luo [Fri, 5 Feb 2010 08:14:56 +0000 (00:14 -0800)]
Update debian/changelog, bump version number

14 years agoThrow away stdout/stderr for browserds we launch too
Steven Luo [Fri, 5 Feb 2010 07:37:56 +0000 (23:37 -0800)]
Throw away stdout/stderr for browserds we launch too

Commit d8d8d1ed... ("Close stdin/stdout/stderr in child processes before
exec()") didn't prevent browserd from spewing noise, because we invoke
that via system() instead of fork()/exec().  Fix that oversight.

14 years agoClose stdin/stdout/stderr in child processes before exec()
Steven Luo [Fri, 5 Feb 2010 07:06:35 +0000 (23:06 -0800)]
Close stdin/stdout/stderr in child processes before exec()

stdout/stderr output from the browser processes we exec() is noisy,
useless, and getting in the way of our debugging output.  Fix this by
throwing it away.