Merge lp://staging/~xnox/ubuntu/raring/liferea/messaging-menu into lp://staging/~xnox/ubuntu/raring/liferea/original

Proposed by Dimitri John Ledkov
Status: Needs review
Proposed branch: lp://staging/~xnox/ubuntu/raring/liferea/messaging-menu
Merge into: lp://staging/~xnox/ubuntu/raring/liferea/original
Diff against target: 1218 lines (+895/-101)
14 files modified
.pc/applied-patches (+1/-0)
.pc/port-to-messaging-menu.patch/configure.ac (+181/-0)
.pc/port-to-messaging-menu.patch/src/Makefile.am (+90/-0)
.pc/port-to-messaging-menu.patch/src/ui/Makefile.am (+37/-0)
.pc/port-to-messaging-menu.patch/src/ui/ui_indicator.c (+236/-0)
configure.ac (+15/-15)
debian/changelog (+6/-0)
debian/control (+1/-2)
debian/patches/port-to-messaging-menu.patch (+289/-0)
debian/patches/series (+1/-0)
debian/rules (+1/-1)
src/Makefile.am (+2/-2)
src/ui/Makefile.am (+1/-1)
src/ui/ui_indicator.c (+34/-80)
To merge this branch: bzr merge lp://staging/~xnox/ubuntu/raring/liferea/messaging-menu
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Needs Fixing
Dimitri John Ledkov Pending
Review via email: mp+155161@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Seems to work, but have no idea if this is roughly correct or not.
Also package branches are out of date, hence this crazy merge-proposal, if it looks ok I'll just upload it into raring.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
3. By Dimitri John Ledkov

use correct sprintf

Revision history for this message
Lars Karlitski (larsu) wrote :

It is roughly correct, but only very roughly ;)

You don't get a callback when the user clicks the application name any more. Instead, the app is launched again through its desktop file. This means that all applications that support the messaging menu must be single instance (which liferea is). Thus, on_indicator_server_clicked can be removed.

I recommend against hooking on_indicator_clicked up to the detailed signals only to pass the node as user data (if you're doing it like that, you would also need to disconnect the signals in the handler). Instead, hook the function up once, and lookup the node through its id in on_indicator_clicked.

The arguments to on_indicator_clicked are wrong, they should be

  static void
  on_indicator_clicked (MessagingMenuApp *mmapp, const gchar *source_id, gpointer user_data)

What did you intend to do here:

  messaging_menu_app_remove_source (indicator_priv->server, (char *)(indicator));

Casting the MessagingMenuApp pointer to a string?! You probably want 'source_id' in there.

review: Needs Fixing
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

> It is roughly correct, but only very roughly ;)
>
> You don't get a callback when the user clicks the application name any more.
> Instead, the app is launched again through its desktop file. This means that
> all applications that support the messaging menu must be single instance
> (which liferea is). Thus, on_indicator_server_clicked can be removed.
>

Dead code -> gone! thanks.

> I recommend against hooking on_indicator_clicked up to the detailed signals
> only to pass the node as user data (if you're doing it like that, you would
> also need to disconnect the signals in the handler). Instead, hook the
> function up once, and lookup the node through its id in on_indicator_clicked.
>

I see, makes sense. Will switch to using one handler to rule them all.

> The arguments to on_indicator_clicked are wrong, they should be
>
> static void
> on_indicator_clicked (MessagingMenuApp *mmapp, const gchar *source_id,
> gpointer user_data)
>

Missing const added.

> What did you intend to do here:
>
> messaging_menu_app_remove_source (indicator_priv->server, (char
> *)(indicator));
>
> Casting the MessagingMenuApp pointer to a string?! You probably want
> 'source_id' in there.

I can see how the terminology is confusing. So there is indicator_priv which has a GPtrArray of node->id's. Confusingly that GPtrArray is called "indicators" and the pointers to node->id's are "indicator", thus it actually is casting 'source_id' from a gpointer to char.

Does messaging menu "rate-limit" at the moment? Cause that indicator_priv is mostly to keep track of how many source_ids are displayed (no more than 6 at the moment)

Unmerged revisions

3. By Dimitri John Ledkov

use correct sprintf

2. By Dimitri John Ledkov

Port to messaging-menu. (LP: #1040259)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: