Bug 11976 - viewing sms conversations in portrait mode without horizontal scrolling (patch)
: viewing sms conversations in portrait mode without horizontal scrolling (patch)
Status: NEW
Product: Maemo 5 Community SSU
general
: unspecified
: N900 Maemo
: Unspecified enhancement with 17 votes (vote)
: ---
Assigned To: unassigned
: general
:
: patch
:
:
  Show dependency tree
 
Reported: 2011-02-23 11:13 UTC by bugs.maemo.org@falkensweb.com
Modified: 2012-12-08 14:37 UTC (History)
7 users (show)

See Also:


Attachments
Modified CSS for SMS converstation (3.24 KB, text/css)
2011-02-25 10:39 UTC, Debjit
Details
Modified CSS for Chat converstation (1.84 KB, text/css)
2011-02-25 10:40 UTC, Debjit
Details
Patch against /usr/share/rtcom-messaging-ui/html (2.43 KB, patch)
2011-02-26 15:28 UTC, Andrew Flegg
Details
"Appendable" files, semantically equivalent to the patches (419 bytes, application/x-gzip)
2011-04-12 15:08 UTC, Thomas Perl
Details


Note

You need to log in before you can comment on or make changes to this bug.


Comment 1 Mohammad Abu-Garbeyyeh 2011-02-23 11:16:06 UTC
Thanks for doing these mods, however, including these modified CSS files might
be illegal.

The only way they can be accepted is a .diff file between the original file and
the modified file that's applied in postinst and removed in prerm.
Comment 2 Mohammad Abu-Garbeyyeh 2011-02-23 11:20:24 UTC
Sorry, I missed the second post, I'll have a look at it.
Comment 3 Andrew Flegg maemo.org 2011-02-23 11:26:17 UTC
Suggested technical approach:

* Package named "<name of package containing CSS files originally>-portrait"
* Package includes the patch and depends on patch tools.
* In postinst:
** uses dpkg-divert to move the original to "<blah>.orig"
** uses patch to merge the package patch and "<blah>.orig" to give "<blah>"
* In prerm:
** Removes the diversion (putting the original file back in its original place)
Comment 4 Debjit 2011-02-23 11:32:48 UTC
The patches I attached in the post 950 are not clean. They contain a lot of
commented code which have to be removed. I do not have the original files which
were on my device and had to download them from another website, so I am not
attaching the final patches.
Comment 5 Andrew Flegg maemo.org 2011-02-24 22:58:08 UTC
(In reply to comment #4)
> The patches I attached in the post 950 are not clean. They contain a lot of
> commented code which have to be removed. I do not have the original files which
> were on my device and had to download them from another website, so I am not
> attaching the final patches.

If you can attach the ideal versions to this issue, someone with an unmodified
device (i.e. me) can generate clean patches to attach to the issue and someone
else (anyone) can develop the "patching"/"portrait support" package.
Comment 6 Debjit 2011-02-25 10:39:39 UTC
Created an attachment (id=3302) [details]
Modified CSS for SMS converstation
Comment 7 Debjit 2011-02-25 10:40:42 UTC
Created an attachment (id=3303) [details]
Modified CSS for Chat converstation
Comment 8 Andrew Flegg maemo.org 2011-02-26 15:28:39 UTC
Created an attachment (id=3311) [details]
Patch against /usr/share/rtcom-messaging-ui/html

Patch against /usr/share/rtcom-messaging-ui/html which can be applied with:

  cd /usr/share/rtcom-messaging-ui/html
  patch -p1 <portrait.patch

All that needs doing is the packaging as outlined above.
Comment 9 pwtownsend 2011-02-26 15:35:48 UTC
With this update is there any prospect of showing a "bubble" conversation
option as well similar to that shown in this post?

http://talk.maemo.org/showpost.php?p=955088&postcount=791
Comment 10 Aki 2011-03-01 14:33:04 UTC
*** This bug has been confirmed by popular vote. ***
Comment 11 Thomas Perl 2011-04-12 14:28:16 UTC
AFAICT, the "patch" utility is only available in the SDK repository (deb
http://repository.maemo.org/ fremantle/sdk free non-free). One option would be
to copy it into the CSSU repository, another would be to use something like
http://code.google.com/p/python-patch/ but that adds a dependency on Python.
Comment 12 Andrew Flegg maemo.org 2011-04-12 14:30:28 UTC
(In reply to comment #11)
> AFAICT, the "patch" utility is only available in the SDK repository (deb
> http://repository.maemo.org/ fremantle/sdk free non-free). One option would be
> to copy it into the CSSU repository, another would be to use something like
> http://code.google.com/p/python-patch/ but that adds a dependency on Python.

The "right" way is to put a copy of `patch' in either Extras or the CSSU
repository (in a non-user/ section). Shouldn't be too hard, since it should
only require the existing source tarball to be uploaded to the CSSU
autobuilder(?)
Comment 13 Thomas Perl 2011-04-12 15:08:03 UTC
Created an attachment (id=3346) [details]
"Appendable" files, semantically equivalent to the patches

(In reply to comment #12)
> The "right" way is to put a copy of `patch' in either Extras or the CSSU
> repository (in a non-user/ section). Shouldn't be too hard, since it should
> only require the existing source tarball to be uploaded to the CSSU
> autobuilder(?)

Attached you will find the changes rewritten into CSS so that the data only
needs to be appended to the files, no need for the patch utility. Another idea
would be to place these changes somewhere in separate files and only append CSS
@import statements to the files that we want to modify.
Comment 14 Thomas Perl 2011-04-12 15:37:29 UTC
(In reply to comment #13)
> Attached you will find the changes rewritten into CSS so that the data only
> needs to be appended to the files, no need for the patch utility. Another idea
> would be to place these changes somewhere in separate files and only append CSS
> @import statements to the files that we want to modify.

As discussed with jaffa on IRC (#maemo-ssu), here's the current proposal on how
to deploy this:

Package name: rtcom-messaging-ui-portrait

Installs customized parts of .css files into:

 /usr/share/rtcom-messaging-ui-portrait/html/

The files have the same name as their equivalents that need to be modified
(e.g. MessagingWidgetsSMSConversation.css), but only contain the additions
made.

The postinst script will basically need to do the following (pseudocode):

for each $css_file in /usr/share/rtcom-messaging-ui/html/:
   $x = "@include url(../../rtcom-messaging-ui-portrait/html/$css_file);"
   if $css_file does not contain $x:
      append $x to the end of $css_file

The postrm script does the same, but it removes the line from the css file if
the css file contains it. The checking and removing can be done using "grep"
and "grep -v", the adding can be done using echo and redirection (>>).

We probably also need to use dpkg-divert, so that upgrades to
rtcom-messaging-ui don't remove that part (although we could just skip that
step and assume that rtcom-messaging-ui won't be upgraded any time soon, and/or
release a new version of the portrait mode package if it really happens ;).
Comment 15 Pali Rohár 2011-05-01 01:25:23 UTC
(In reply to comment #11)
> AFAICT, the "patch" utility is only available in the SDK repository (deb
> http://repository.maemo.org/ fremantle/sdk free non-free). One option would be
> to copy it into the CSSU repository, another would be to use something like
> http://code.google.com/p/python-patch/ but that adds a dependency on Python.

What about adding build dependency on original package which has all CSS files
and patch these files in build process (copy from /usr/... to build dir and
apply patch on them)? In dsc package will be only patch (so no problem) and in
builded deb package will be patched CSS files, which can be replaced by
dpkg-divert in postinst script.
Comment 16 Pali Rohár 2012-12-08 14:37:13 UTC
Git repository with patched CSS files are here:
https://gitorious.org/community-ssu/rtcom-messaging-ui-portrait