Skip to main content

a silhouette of a person's head and shoulders, used as a default avatar

Advances in the layout engine

Advances in the layout engine

I started implementing "Shape" support in my layout engine. What's so special about Shapes is the fact that the text needs to flow around them when wrapping is enabled. Shapes are used a lot e.g. to construct letterheads etc. Good Shape support is absolutely crucial for business documents.
Here is my sample document I used for testing wrap03.docx:

It shows Shape objects with "tight" wrapping and the different wrapping modes as defined in 20.4.3.7 ST_WrapText (Text Wrapping Location) of the OOXML specification:

  • both (Both Sides) Specifies that text shall wrap around both sides of the object.

  • left (Left Side Only) Specifies that text shall only wrap around the left side of the object.

  • right (Right Side Only) Specifies that text shall only wrap around the right side of the object.


I'm really happy to have this key feature in the layout engine. Just to show how difficult this is to implement take a look at what Google Docs makes out of it: wrap03.docx.

the avatar of Justine Leng

OBS Mobile: Package View

Played with Package view a little bit today. This would probably look more like what I’m heading toward:

The biggest change was adding embedded collapsible buttons.

I tried serializing Files and loading the list alphabetically sorted, like this:

<script type="text/javascript">

 // build up a javascript array from the file list
 var filelist = [
<% @files.each do |file|
 fl = file.submit if file.has_element? :submit
 fl = file.action if file.has_element? :action
 pkg = ""
 if fl.has_element?(:pkg)
 pkg = elide(ae.pkg.package, 20)
 if fl.pkg.has_attribute?(:package)
 pkg += "/ #{elide(fl.target.package, 12)}"
 end
 end
 -%>
 {"name": "<%= elide(file.name, 12) %>", "pkg": "<%= pkg %>"
<% end -%>
 ];

 // renders the file list
 function render_list(criteria) {
 console.debug("rendering list, ordered by: " + criteria);
 var list = $("#file_list");
 $(list).empty();

 var files = filelist.sort(function(a, b) {
 switch (criteria) {
 case 'name':
 return a.name > b.name;
 }
 });

 list.append("<li data-role=\"list-divider\">Files contained in this package</li>");
 $.each(files, function() {
 list.append("<a href='<%= url_for :project => @project, :package => @package, :action => :files %>/" + this.name + "'></a>");
 });
 }

 // initial render after page load
$(document).ready(function(){
 render_list("name");
});

</script>

In the mobile view, I would like to have the Files loaded as a pre-sorted list:

<% @files.each do |file| %>
 <div data-role="collapsible" data-collapsed="true">
 <h3><%= h file %> </h3>

 <ul data-role=”listview”>
 <% if @package.linkinfo %>
 <% if @expand && @expand.to_s == "1" %>
 <%= link_to '(show unmerged sources)', :project => @project, :package => @package, :action => :files, :rev => params[:rev], :expand => "0" %>
 <% else %>
 <%= link_to '(show merged sources derived from linked package)', :project => @project, :package => @package, :action => :files, :rev => params[:rev], :expand => "1" %>
 <% end %>
 <% end %>
 </ul>
</div>
<% end %>

But when I compile, I get this error:

[FATAL|# 8894] ActionView::TemplateError (You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each) on line #5 of app/mobile_views/package/_files.html.erb:
2: 
3: // build up a javascript array from the file list
4: var filelist = [
5: <% @files.each do |file|
6: fl = file.submit if file.has_element? :submit
7: fl = file.action if file.has_element? :action
8: pkg = ""

 app/mobile_views/package/_files.html.erb:5
 app/mobile_views/package/show.html.erb:21
 /server:3

[ERROR|# 8894] rescue_action: caught ActionView::TemplateError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each
[DEBUG|# 8894] ERROR: unknown; You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while e

In desktop views, Files are implemented as a table and sorted with jquery.tablesorter.js. In mobile view, Files would have to be converted to an Array. I can’t quite tell what went wrong here, or how else to do it.

a silhouette of a person's head and shoulders, used as a default avatar

A utility for merging configuration / sysconfig files – Week 11 Report

Hello,

A bit late this week’s report. But not without a reason, the last weeks i have been working hard in order to fulfill the initial goals of this project. After lot’s of coding / compiling / testing this week and of course mind storming i can now share with you very good and exciting news.

What is done this week:

-> aug_process_trees is finally done!! That means we can now proceed to the final goal that of implementing the merging functions.
->moved whole code to Augeas version 0.9. Added necessary code and fixed already existing.
->tree_get_children (fixed)
->tree_compare_children (re worked)
->tree_match_combine (added)
->tree_match_lower_level(added)
->tree_child_sort_label(fixed)
->debug_print_treeArray(added)
->debug_print_treeMatchArray(added)

What is to be done:
-> Finish Merging Functions
-> Create First Beta Packages

That is all in a few lines, as GSoC is getting closer to the end, the time available for completing the project is getting less. So I better get back to coding…

Till next week,
Christos Bountalis

the avatar of Justine Leng

Sorting elements with jQuery Mobile: controlgroup buttons vs. radio buttons

After implementing a prototype for sorting functions in Requests, I needed to refine the UI and get the sorting buttons to work correctly with jQuery Mobile. The problem was when I clicked on a button to re-order the list of requests, the action would complete properly, but the selected button would not be highlighted.

This is the ideal view I would like to have:

I re-examined the code in the prototype, and realized these sorting buttons were laid out as control group buttons as follows:

<div data-role="controlgroup" data-type="horizontal">
 <a href="#" onclick="render_list('date'); $('#request_list').listview('refresh'); return false" data-role="button" data-theme="b">Date</a>
 <a href="#" onclick="render_list('requester'); $('#request_list').listview('refresh'); return false" data-role="button">Requester</a>
 <a href="#" onclick="render_list('target'); $('#request_list').listview('refresh'); return false" data-role="button">Target</a>
 <a href="#" onclick="render_list('state'); $('#request_list').listview('refresh'); return false" data-role="button">State</a>
</div>

After some web research, I learned that control group buttons might not provide what I wanted. More than one button in a control group can be active at a time. I also looked at the demos and examples on jQuery Mobile website. For control group buttons, there doesn’t seem to be any highlighting for the selected button. There is a millisecond of color change when the button is being clicked. But after the clicking is finished, the buttons return to their default data-theme. 

One thing I could think of to make this highlighting happen for control group buttons is to dynamically change the data-theme for each selected button, but it seems to be an overkill for this tiny issue.

On the other hand, radio buttons seem to perform exactly the way I wanted. With radio buttons, the highlighting comes automatically once the button is selected (the newly selected button is added to the selector class, as the previously selected one is removed from there).

A second option to fix the button highlighting would be to change the control group buttons to radio buttons. A group of radio buttons always have at least one option selected, and that selected button is always highlighted. This would work perfectly on the Request view page, as requests would always display sorted by date.

(Check out jQuery Mobile documentation on radio buttons)

Switching the UI from control group buttons to radio buttons was easy:

<div data-role="fieldcontain">
 <fieldset data-role="controlgroup" data-type="horizontal" >
 <input type="radio" name="radio-choice-1" id="radio-choice-1" value="date" checked="checked" />
 <label for="radio-choice-1">Date</label>

 <input type="radio" name="radio-choice-1" id="radio-choice-2" value="requester" />
 <label for="radio-choice-2">Requester</label>

 <input type="radio" name="radio-choice-1" id="radio-choice-3" value="target" />
 <label for="radio-choice-3">Target</label>

 <input type="radio" name="radio-choice-1" id="radio-choice-4" value="state" />
 <label for="radio-choice-4">State</label>
 </fieldset>
</div>

But binding an onclick event to the radio buttons took a bit effort. The trick was to use “change” instead of “click.”

 // initial render after page load
$(document).ready(function(){
 render_list("date");
 $("input[type='radio']").bind("change", function(){
 var selection=$(this).val();
 //alert("Criterion changed. Selected: "+selection);
 render_list(selection); 
 $('#request_list').listview('refresh');
 })
});

Now the buttons are correctly implemented. The final Requests views look like the following:

  • – – – – – –
a silhouette of a person's head and shoulders, used as a default avatar

dhcp клиенты

В openSUSE 11.4 оказалось два dhcp-клиента: dhclient (авторства ISC из пакета dhcp-client) и dhcpcd (почему-то версии 3.2.3 авторства авторов dhcpcd из одноименного пакета). Кстати, последний наотрез отказался удаляться, объясняя это тем, что пакет с mkinitrd от него зависит.

Переключаются они между собой в файле /etc/sysconfig/network/dhcp, там есть соответствующая переменная DHCLIENT_BIN.

p.s. А все это для чего. Утром словил с dhcpcd вот это:

wlan0: offered 192.168.1.1 from 192.168.0.1 `host.local'
wlan0: got subsequent offer of 192.168.1.2, ignoring 
wlan0: checking 192.168.1.1 is available on attached networks
wlan0: ARPOP_REPLY received from 192.168.1.1 (00:12:34:56:78:9a)

И пришлось использовать dhcp-клиент, который сделал мне хорошо.

the avatar of Pascal Bleser

Countdown for openSUSE Conference 2011

Hacked up some quick artwork for a countdown image for the openSUSE Conference 2011.

If you want to use it on your blog, website, whatever, use the following links to the image:

If you don't like the artwork, patches are welcome ;)

Obviously, the number of remaining days is updated every day and, hence, that countdown is always up-to-date (it is relative to the CEST timezone though, where the event takes place).

the avatar of Justine Leng

New Features Added to Requests

I would like to share some exciting progress on the OBS Mobile Project:

  1. Request state has been added to each request;
  2. Sorting functions have been implemented for Requests;
  3. A search filter has been added to the Request page.

Now, when the user logs into the list of requests, the user will not only be able to see the state of each request, but also sort requests based on 4 criteria:

  • request date
  • requester’s name
  • target project/package
  • request state

The user can also filter requests by typing in a keyword:

These new features have been tested in my desktop browsers and on my Android device, and they seem to be working fine.

Please feel free to check out the new features as soon as they are merged to the master. Feedback and comments are always welcome & appreciated.

 

the avatar of Andreas Jaeger

Factory Progress 2011-08-05

The last few weeks have seen some a lot of package updates thus keeping our review and checkin team busy. I’d like to mention Sascha Peilicke who reviewed alone this week lots of packages. Have a look at just two numbers: In all of July we had 1001 check-ins and just from August 1st to 4th we had already 276 checkins.

The legal team has also gone through the long list of new packages and package updates during the legal reviews and reduced this week the list from over 100 packages to 12 packages now. Thanks Ciaran and Christoper for your legal review!

Policy

Detailed changes

Coolo explained the current policy on how detailed the changes entry in packages should be:

I repeat what I said before so everyone is on the same page:

Version numbers are per se no information and we want to offer users an easy, standarized way to find out what changed. But it’s not the packager’s job to collect upstream NEWS. So if the upstream project does not offer a summary, then say so in the .changes file, so also the user knows. If the upstream  project does not provide a summary but a detailed web page, then a link is fine too.

Major Package checkins

Desktops

GNOME saw another step to the stable GNOME 3.2.0 with the GNOME 3.1.4 testing release getting pushed into Factory. KDE’s new release 4.7 is now also in Factory.

So far, the new kontact 2.0 version has not been submitted for Factory and you can get it from the KDE repositories. Btw. the openSUSE KDE developers have made the sqlite backend the default for akonadi since the upstream default of mysql caused too many problems. If you’re running already kmail2 and like to switch follow Ismail’s advice to change in ~/.config/akonadi/akonadiserverrc the line Driver=QMYSQL to Driver=QSQLITE.

New packages

New packages include quassel (an irc client) clementine (an amarok competitor) shorewall (new firewall). Also amarok was updated to 2.4.3 and thunderbird got updated together with enigmail.

Mounting /usr in the initrd

Michal Marek updated mkinitrd to mount /usr in the initrd. In the past, we had to move quite a lot libraries and binaries from /usr to the root
partition to allow having /usr as separate partition that can be mounted in all supported scenarios, like via nfs. This led to changes in many places and testing that everything worked as well. With mounting from the initrd, we do not need to move binaries and libraries anymore around.

Michal calls for testers on his blog and is also going to enhance the initrd to support all cases. Right now the simple cases work but support for booting from nfs is not supported yet.

Other interesting bits

openSUSE Conference

Please register now for the conference!

the avatar of Frédéric Crozat

Map for Desktop Summit 2011

I've cooked with other people from #gnomefr channel a Google Map with the various useful addresses for Desktop Summit 2011.

It is available here, you can also get KML file or import this map in your favorite software (for Android users, I suggest using Locus Free which can download offline OpenStreetMap data and merge our map on it, no roaming data needed !).