Merge lp:~charlesk/libindicate/lp-1023576 into lp:libindicate/12.10

Proposed by Charles Kerr
Status: Merged
Approved by: Charles Kerr
Approved revision: 463
Merged at revision: 461
Proposed branch: lp:~charlesk/libindicate/lp-1023576
Merge into: lp:libindicate/12.10
Diff against target: 99 lines (+22/-5)
5 files modified
libindicate/listener.c (+1/-1)
libindicate/server.c (+3/-3)
tests/test-indicator-display-half-client.c (+0/-1)
tests/test-indicator-display-half-server.c (+9/-0)
tests/test-indicator-display-server.c (+9/-0)
To merge this branch: bzr merge lp:~charlesk/libindicate/lp-1023576
Reviewer Review Type Date Requested Status
Lars Karlitski (community) Approve
Review via email: mp+123091@code.launchpad.net

Commit message

Fix a minor error, and a separate minor warning, reported by seb. (LP #1023576)

Description of the change

This is a minor fix, and low priority now that libmessaging-menu is here.

However the string <--> object path bug is an easy fix, and we already have some libindicate leak fixes that can be backported for LTS, so there's no harm in fixing this too.

To post a comment you must log in.
Revision history for this message
Lars Karlitski (larsu) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libindicate/listener.c'
2--- libindicate/listener.c 2012-07-24 23:10:02 +0000
3+++ libindicate/listener.c 2012-09-06 14:20:15 +0000
4@@ -1245,7 +1245,7 @@
5 * @displayed: Whether it's being displayed or hidden
6 *
7 * This function tells the client whether we're showing this indicator
8- * to the user. This doesn't mean that it's necissarilly visible right
9+ * to the user. This doesn't mean that it's necessarily visible right
10 * now, but more that there is a way for the user to get to this item
11 * individually.
12 */
13
14=== modified file 'libindicate/server.c'
15--- libindicate/server.c 2012-07-20 14:56:00 +0000
16+++ libindicate/server.c 2012-09-06 14:20:15 +0000
17@@ -836,13 +836,13 @@
18 g_value_init(&strvalue, G_TYPE_STRING);
19 g_object_get_property(G_OBJECT(priv->dbusmenu), DBUSMENU_SERVER_PROP_DBUS_OBJECT, &strvalue);
20 if (g_value_get_string(&strvalue) != NULL) {
21- retvariant = g_variant_new_string(g_value_get_string(&strvalue));
22+ retvariant = g_variant_new_object_path(g_value_get_string(&strvalue));
23 } else {
24- retvariant = g_variant_new_string("/");
25+ retvariant = g_variant_new_object_path("/");
26 }
27 g_value_unset(&strvalue);
28 } else {
29- retvariant = g_variant_new_string("/");
30+ retvariant = g_variant_new_object_path("/");
31 }
32
33 } else if (g_strcmp0(property, "icontheme") == 0) {
34
35=== modified file 'tests/test-indicator-display-half-client.c'
36--- tests/test-indicator-display-half-client.c 2009-09-03 22:01:41 +0000
37+++ tests/test-indicator-display-half-client.c 2012-09-06 14:20:15 +0000
38@@ -1,7 +1,6 @@
39
40 #include <glib.h>
41 #include "libindicate/indicator.h"
42-#include "libindicate/server.h"
43 #include "libindicate/interests.h"
44
45 #define MAX_INDICATOR_COUNT 100
46
47=== modified file 'tests/test-indicator-display-half-server.c'
48--- tests/test-indicator-display-half-server.c 2009-09-03 22:01:41 +0000
49+++ tests/test-indicator-display-half-server.c 2012-09-06 14:20:15 +0000
50@@ -29,6 +29,14 @@
51 }
52
53 static void
54+server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data)
55+{
56+ g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type);
57+ indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_DISPLAY);
58+ return;
59+}
60+
61+static void
62 server_removed (void)
63 {
64 g_debug("Server went away, exiting.");
65@@ -44,6 +52,7 @@
66 IndicateListener * listener = indicate_listener_ref_default();
67
68 g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added), NULL);
69+ g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL);
70 g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_CALLBACK(server_removed), NULL);
71
72 g_timeout_add_seconds(2, failed_cb, NULL);
73
74=== modified file 'tests/test-indicator-display-server.c'
75--- tests/test-indicator-display-server.c 2009-09-03 21:25:30 +0000
76+++ tests/test-indicator-display-server.c 2012-09-06 14:20:15 +0000
77@@ -22,6 +22,14 @@
78 }
79
80 static void
81+server_added (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data)
82+{
83+ g_debug("Indicator Server Added: %s %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server), type);
84+ indicate_listener_server_show_interest(listener, server, INDICATE_INTEREST_INDICATOR_DISPLAY);
85+ return;
86+}
87+
88+static void
89 server_removed (void)
90 {
91 g_debug("Server went away, exiting.");
92@@ -37,6 +45,7 @@
93 IndicateListener * listener = indicate_listener_ref_default();
94
95 g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added), NULL);
96+ g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_CALLBACK(server_added), NULL);
97 g_signal_connect(listener, INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_CALLBACK(server_removed), NULL);
98
99 g_timeout_add_seconds(2, failed_cb, NULL);

Subscribers

People subscribed via source and target branches