adapting gnome applications to maemo fremantle

36
static void _f_do_barnacle_install_properties(GObjectClass *gobject_class) { GParamSpec *pspec; /* Party code attribute */ pspec = g_param_spec_uint64 (F_DO_BARNACLE_CODE, "Barnacle code.", "Barnacle code", 0, G_MAXUINT64, G_MAXUINT64 /* default value */, G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_PRIVATE); g_object_class_install_property (gobject_class, F_DO_BARNACLE_PROP_CODE, Joaquim Rocha (jrocha on IRC) [email protected] Adapting GNOME Applications to Maemo Fremantle

Upload: joaquim-rocha

Post on 12-May-2015

2.182 views

Category:

Technology


1 download

DESCRIPTION

Presentation given in Maemo Summit 2009 about Adapting GNOME Applications to Maemo Fremantle.

TRANSCRIPT

Page 1: Adapting GNOME Applications to Maemo Fremantle

static void_f_do_barnacle_install_properties(GObjectClass

*gobject_class){

GParamSpec *pspec;

/* Party code attribute */ pspec = g_param_spec_uint64 (F_DO_BARNACLE_CODE,

"Barnacle code.", "Barnacle code",

0, G_MAXUINT64,

G_MAXUINT64 /* default value */,

G_PARAM_READABLE | G_PARAM_WRITABLE |

G_PARAM_PRIVATE);

g_object_class_install_property (gobject_class,

F_DO_BARNACLE_PROP_CODE,

Joaquim Rocha (jrocha on IRC)[email protected]

Adapting GNOMEApplications toMaemo Fremantle

Page 2: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

whoami

● GTK+ && Hildon && Python developer

● Igalian since 2008

● Part of Hildon Input Methods project

Page 3: Adapting GNOME Applications to Maemo Fremantle

What porting means?

Page 4: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

What porting means

● Before Fremantle:● Make an application RUN in Maemo

● After Fremantle:● ADAPT an application to Maemo

Page 5: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

Why bothering?

● Your application gets better● Your users get happier● Your fingers too!

Page 6: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

GNOME Applications

● Coding will be easier – it is GTK+!● Lots of interesting applications waiting to be ported!● If you're a GNOME user, you may have your common

applications available to you.

Page 7: Adapting GNOME Applications to Maemo Fremantle

Root view / Sub view

Page 8: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

Root view / sub view philosophy

● Applications are stacks of windows

● The root window is the base● E.g.: List of emails

● Actions that break the usage flow, will be sub views:● E.g.: Reading an email

Page 9: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

Root View Sub View

This means: no GTKPaned!

Page 10: Adapting GNOME Applications to Maemo Fremantle

Black Chapter

Page 11: Adapting GNOME Applications to Maemo Fremantle
Page 12: Adapting GNOME Applications to Maemo Fremantle

FAIL!FAIL!

Page 13: Adapting GNOME Applications to Maemo Fremantle
Page 14: Adapting GNOME Applications to Maemo Fremantle
Page 15: Adapting GNOME Applications to Maemo Fremantle

What to do with this!?

Page 16: Adapting GNOME Applications to Maemo Fremantle

Divide and Conquer

Page 17: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

When a box is tapped,a dialog appears...

Page 18: Adapting GNOME Applications to Maemo Fremantle
Page 19: Adapting GNOME Applications to Maemo Fremantle

Use a GtkToggle button or a HildonPickerButton

Page 20: Adapting GNOME Applications to Maemo Fremantle

Replaced the GtkSpinButtons by HildonEntries and not by HildonPickerButtons because the changes are shown immediately in the image.

Assign the numeric GtkInputMode

Page 21: Adapting GNOME Applications to Maemo Fremantle

Text is the focus here, so, instead of a GtkNotebook, the style properties are in a GtkDialog launched from the text properties HildonAppMenu

Page 22: Adapting GNOME Applications to Maemo Fremantle

GtkSpinButtons are replaced by HildonPickerButtons with a TouchSelectorEntry assigned

Page 23: Adapting GNOME Applications to Maemo Fremantle

HildonAppMenu

Page 24: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

HildonAppMenu

● Really different from a GtkMenu!!

● Do not stuff it: Keep a low number of items

● Use filters to display HOW contents are shown, not WHICH contents are shown

Page 25: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

DRY: Don't Repeat Yourself

How to keep a low number of menu items?

Page 26: Adapting GNOME Applications to Maemo Fremantle

Choose the most used/important menus and sub-menus from the menu bar.

Pages can be chosen using gestures, so, no need for Next/Previous menus.

Page 27: Adapting GNOME Applications to Maemo Fremantle

The status bar and toolbar are not used in EOG for Maemo, so, no menus are needed.

The Zoom In / Zoom Out functionalities are accomplished by using the Increase / Decrease hard-keys.

Page 28: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

Following the Hildon Interface Guidelines

● HIG says: don't show menu items that are insensitive● Here's a helpful tip:

● Connect a callback to the “show” signal of each HildonAppMenu item

● The callback shows/hides the item according to its “sensitive” property

Page 29: Adapting GNOME Applications to Maemo Fremantle

EOG with no images loaded

EOG with an image loaded

Page 30: Adapting GNOME Applications to Maemo Fremantle

Migrating Preferences Dialogs

Page 31: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

Preferences Dialogs

● Dialogs with a GtkNotebook to group different kinds of preferences

● Tabs' labels define groups' names

Page 32: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

How to migrate it to Fremantle?

● Use a HildonPannableArea

● Add a GtkVBox with ALL the preferences groups and use a GtkLabel above each one, identifying it

Page 33: Adapting GNOME Applications to Maemo Fremantle
Page 34: Adapting GNOME Applications to Maemo Fremantle

Adapting GNOME Applications to Maemo Fremantle · Joaquim Rocha <[email protected]>

Where to go from here?

● Maemo 5 Developer Guide:

http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide

● Maemo 5 API Reference:

http://maemo.org/api_refs/5.0/5.0-final/hildon/

Page 35: Adapting GNOME Applications to Maemo Fremantle

Questions?

Page 36: Adapting GNOME Applications to Maemo Fremantle

Thank you!