Merge lp:~alexlauni/indicator-messages/fix-0-count-lp1071640 into lp:indicator-messages/13.04

Proposed by Alex Launi
Status: Rejected
Rejected by: Charles Kerr
Proposed branch: lp:~alexlauni/indicator-messages/fix-0-count-lp1071640
Merge into: lp:indicator-messages/13.04
Diff against target: 37 lines (+5/-5)
2 files modified
libmessaging-menu/messaging-menu.c (+2/-2)
src/im-source-menu-item.c (+3/-3)
To merge this branch: bzr merge lp:~alexlauni/indicator-messages/fix-0-count-lp1071640
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Disapprove
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+131577@code.launchpad.net

Description of the change

Adjusts messaging menu behavior to allow for sources with a 0 count

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Lars Karlitski (larsu) wrote :

Ah sorry, I misunderstood you when you first described this bug to me. We can't change the behavior of messaging_menu_append_source: there are already many applications that depend on it inserting a source with a time.

I fixed this in a separate branch which clears the time when a source is set (even when that source is 0).

Thanks anyway :)

review: Disapprove

Unmerged revisions

327. By Alex Launi

Don't default to using time for sources.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libmessaging-menu/messaging-menu.c'
2--- libmessaging-menu/messaging-menu.c 2012-10-24 08:12:41 +0000
3+++ libmessaging-menu/messaging-menu.c 2012-10-26 10:46:42 +0000
4@@ -708,8 +708,8 @@
5 GIcon *icon,
6 const gchar *label)
7 {
8- messaging_menu_app_insert_source_with_time (app, position, id, icon, label,
9- g_get_real_time ());
10+ messaging_menu_app_insert_source_action (app, position, id, icon, label,
11+ g_variant_new ("(uxsb)", 0, 0, "", FALSE));
12 }
13
14 /**
15
16=== modified file 'src/im-source-menu-item.c'
17--- src/im-source-menu-item.c 2012-09-03 13:45:33 +0000
18+++ src/im-source-menu-item.c 2012-10-26 10:46:42 +0000
19@@ -150,15 +150,15 @@
20
21 g_variant_get (state, "(ux&sb)", &count, &time, &str, NULL);
22
23- if (count != 0)
24- ido_detail_label_set_count (IDO_DETAIL_LABEL (priv->detail), count);
25- else if (time != 0)
26+ if (time != 0)
27 {
28 im_source_menu_item_set_detail_time (self, time);
29 priv->timer_id = g_timeout_add_seconds (59, im_source_menu_item_update_time, self);
30 }
31 else if (str != NULL && *str)
32 ido_detail_label_set_text (IDO_DETAIL_LABEL (priv->detail), str);
33+ else
34+ ido_detail_label_set_count (IDO_DETAIL_LABEL (priv->detail), count);
35
36 return TRUE;
37 }

Subscribers

People subscribed via source and target branches