Merge lp:~laney/indicator-applet/invert-new-style-indicators into lp:indicator-applet/13.10

Proposed by Iain Lane
Status: Merged
Approved by: Lars Karlitski
Approved revision: 414
Merged at revision: 415
Proposed branch: lp:~laney/indicator-applet/invert-new-style-indicators
Merge into: lp:indicator-applet/13.10
Diff against target: 70 lines (+13/-12)
1 file modified
src/applet-main.c (+13/-12)
To merge this branch: bzr merge lp:~laney/indicator-applet/invert-new-style-indicators
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
Alberts Muktupāvels Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+177258@code.launchpad.net

Commit message

Only prioritise and invert new-style indicators

Description of the change

Only the new-style indicators need to be inverted without changes to the logic in place_in_menu_cb. The diff over r409 is probably better to look at than this.

I also copied the static order table from u-p-s to refresh it.

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
Charles Kerr (charlesk) wrote :

Why are older indicators that have already been supplanted (libdatetime.so, libsession.so, libpower.so) added back in by this patch?

414. By Iain Lane

Remove new-style indicators from static order list.

Revision history for this message
Iain Lane (laney) wrote :

On Sat, Jul 27, 2013 at 08:29:29PM -0000, Charles Kerr wrote:
> Why are older indicators that have already been supplanted (libdatetime.so, libsession.so, libpower.so) added back in by this patch?

I just copied the list from unity-panel-service.

Let me remove them.

,----
| Pushed up to revision 414.
`----

There we go.

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

I submitted almost identical change almost 10 days ago - https://code.launchpad.net/~albertsmuktupavels/indicator-applet/indicator-applet/+merge/175760

I will delete my branch when this will be approved.

Revision history for this message
Iain Lane (laney) wrote :

On Sun, Jul 28, 2013 at 04:44:23PM -0000, Alberts Muktupāvels wrote:
> I submitted almost identical change almost 10 days ago - https://code.launchpad.net/~albertsmuktupavels/indicator-applet/indicator-applet/+merge/175760
>
> I will delete my branch when this will be approved.

Oops sorry, I didn't see that :(

Thanks for your work on -applet :-)

--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Why it takes so long to approve changes? Currently indicators are in wrong positions because of my mistake. :(

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

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/applet-main.c'
2--- src/applet-main.c 2013-07-17 18:29:16 +0000
3+++ src/applet-main.c 2013-07-28 14:33:27 +0000
4@@ -40,7 +40,7 @@
5 {"libsyncindicator.so", NULL}, /* indicator-sync */
6 {"libapplication.so", "gsd-keyboard-xkb"}, /* keyboard layout selector */
7 {"libmessaging.so", NULL}, /* indicator-messages */
8- {"libapplication.so", "bluetooth-manager"}, /* bluetooth manager */
9+ {"libbluetooth.so", NULL}, /* indicator-bluetooth */
10 {"libnetwork.so", NULL}, /* indicator-network */
11 {"libnetworkmenu.so", NULL}, /* indicator-network */
12 {"libapplication.so", "nm-applet"}, /* network manager */
13@@ -151,7 +151,7 @@
14 for (i = 0; indicator_order[i][0] != NULL; i++) {
15 if (g_strcmp0(name, indicator_order[i][0]) == 0 &&
16 g_strcmp0(hint, indicator_order[i][1]) == 0) {
17- return 1000 - i;
18+ return i;
19 }
20 }
21
22@@ -191,8 +191,8 @@
23 }
24
25 /* The objects don't match yet, keep looking */
26- if (objposition > position->objposition) {
27- position->menupos--;
28+ if (objposition < position->objposition) {
29+ position->menupos++;
30 return;
31 }
32
33@@ -200,13 +200,13 @@
34 IndicatorObjectEntry * entry = (IndicatorObjectEntry *)g_object_get_data(G_OBJECT(widget), MENU_DATA_INDICATOR_ENTRY);
35 gint entryposition = indicator_object_get_location(io, entry);
36
37+ if (entryposition > position->entryposition) {
38+ position->found = TRUE;
39+ return;
40+ }
41+
42 if (entryposition < position->entryposition) {
43- position->found = TRUE;
44- return;
45- }
46-
47- if (entryposition > position->entryposition) {
48- position->menupos--;
49+ position->menupos++;
50 return;
51 }
52
53@@ -232,6 +232,7 @@
54 if (entry->name_hint != NULL) {
55 const gchar *name = (const gchar *)g_object_get_data(G_OBJECT(io), IO_DATA_NAME);
56 gint entry_position = name2order(name, entry->name_hint);
57+ g_debug ("Placing %s (%s): %d", name, entry->name_hint, entry_position);
58
59 /* If we don't find the entry, fall back to the indicator object's position */
60 if (entry_position > -1)
61@@ -616,8 +617,8 @@
62 g_object_set_data_full(o, IO_DATA_MENUITEM_LOOKUP, g_hash_table_new (g_direct_hash, g_direct_equal), (GDestroyNotify)g_hash_table_destroy);
63 g_object_set_data_full(o, IO_DATA_NAME, g_strdup(name), g_free);
64
65- int pos = indicator_object_get_position(o);
66- if (pos < 0) {
67+ int pos = 5000 - indicator_object_get_position(object);
68+ if (pos > 5000) {
69 pos = name2order(name, NULL);
70 }
71

Subscribers

People subscribed via source and target branches