aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app-indicator.c32
-rw-r--r--src/generate-id.c2
2 files changed, 14 insertions, 20 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index 2e98b48..0fc577d 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -611,6 +611,8 @@ app_indicator_init (AppIndicator *self)
priv->sec_activate_target = NULL;
priv->sec_activate_enabled = FALSE;
+ self->priv = priv;
+
/* Start getting the session bus */
g_object_ref(self); /* ref for the bus creation callback */
g_bus_get(G_BUS_TYPE_SESSION, NULL, bus_creation, self);
@@ -618,8 +620,6 @@ app_indicator_init (AppIndicator *self)
g_signal_connect(G_OBJECT(gtk_icon_theme_get_default()),
"changed", G_CALLBACK(theme_changed_cb), self);
- self->priv = priv;
-
return;
}
@@ -1886,20 +1886,14 @@ app_indicator_set_attention_icon_full (AppIndicator *self, const gchar *icon_nam
gboolean changed = FALSE;
if (g_strcmp0 (self->priv->attention_icon_name, icon_name) != 0) {
- if (self->priv->attention_icon_name) {
- g_free (self->priv->attention_icon_name);
- }
-
- self->priv->attention_icon_name = g_strdup(icon_name);
+ g_free (self->priv->attention_icon_name);
+ self->priv->attention_icon_name = g_strdup (icon_name);
changed = TRUE;
}
if (g_strcmp0(self->priv->att_accessible_desc, icon_desc) != 0) {
- if (self->priv->att_accessible_desc) {
- g_free (self->priv->att_accessible_desc);
- }
-
- self->priv->att_accessible_desc = g_strdup(icon_name);
+ g_free (self->priv->att_accessible_desc);
+ self->priv->att_accessible_desc = g_strdup (icon_desc);
changed = TRUE;
}
@@ -1910,12 +1904,12 @@ app_indicator_set_attention_icon_full (AppIndicator *self, const gchar *icon_nam
GError * error = NULL;
g_dbus_connection_emit_signal(self->priv->connection,
- NULL,
- self->priv->path,
- NOTIFICATION_ITEM_DBUS_IFACE,
- "NewAttentionIcon",
- NULL,
- &error);
+ NULL,
+ self->priv->path,
+ NOTIFICATION_ITEM_DBUS_IFACE,
+ "NewAttentionIcon",
+ NULL,
+ &error);
if (error != NULL) {
g_warning("Unable to send signal for NewAttentionIcon: %s", error->message);
@@ -2485,7 +2479,7 @@ shorty_activated_cb (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data)
g_return_if_fail(priv->shorties != NULL);
- indicator_desktop_shortcuts_nick_exec(priv->shorties, nick);
+ indicator_desktop_shortcuts_nick_exec_with_context(priv->shorties, nick, NULL);
return;
}
diff --git a/src/generate-id.c b/src/generate-id.c
index 6389678..6208997 100644
--- a/src/generate-id.c
+++ b/src/generate-id.c
@@ -65,5 +65,5 @@ _generate_id (const AppIndicatorCategory catenum, const gchar * id)
}
}
- return (((((category * 256) + first) * 256) + second) * 256) + third;
+ return (((((category << 8) + first) << 8) + second) << 8) + third;
}