aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-04-06 22:26:24 -0500
committerTed Gould <ted@gould.cx>2010-04-06 22:26:24 -0500
commit9449b85d675c8dffbbff932197413924bda088e5 (patch)
tree6beb5b81d69e7356ab466abfdab07e84f0fc05c0
parent56a250cf8262579d749a71bde854da390fcc29e2 (diff)
parente822834a58b32ebf9ecc85a2e2dc159d416ec3ed (diff)
downloadayatana-indicator-session-9449b85d675c8dffbbff932197413924bda088e5.tar.gz
ayatana-indicator-session-9449b85d675c8dffbbff932197413924bda088e5.tar.bz2
ayatana-indicator-session-9449b85d675c8dffbbff932197413924bda088e5.zip
* Upstream Merge
* Changing 'Sleep' to 'Suspend' (LP: #547102) * Fixing translations helper text (LP: #547131) * Passing correct object to callback (LP: #543393) * Ignoring malformed message (LP: #548620)
-rw-r--r--debian/changelog10
-rw-r--r--src/dialog.c6
-rw-r--r--src/gtk-logout-helper.c2
-rw-r--r--src/session-service.c4
-rw-r--r--src/users-service-dbus.c15
5 files changed, 31 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 8a2fead..60da672 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+indicator-session (0.2.7-0ubuntu1~ppa2) UNRELEASED; urgency=low
+
+ * Upstream Merge
+ * Changing 'Sleep' to 'Suspend' (LP: #547102)
+ * Fixing translations helper text (LP: #547131)
+ * Passing correct object to callback (LP: #543393)
+ * Ignoring malformed message (LP: #548620)
+
+ -- Ted Gould <ted@ubuntu.com> Tue, 06 Apr 2010 22:24:06 -0500
+
indicator-session (0.2.7-0ubuntu1~ppa1) lucid; urgency=low
* Upstream release 0.2.7
diff --git a/src/dialog.c b/src/dialog.c
index fba8013..51b1682 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -174,7 +174,7 @@ logout_dialog_new (LogoutDialogType type)
"icon-name", icon_strings[type],
"modal", TRUE,
"resizable", FALSE,
- "title", _(title_strings[type]),
+ "title", g_dpgettext2 (NULL, "title", title_strings[type]),
"window-position", GTK_WIN_POS_CENTER_ALWAYS,
/* Message Dialog */
"buttons", GTK_BUTTONS_NONE,
@@ -197,9 +197,9 @@ logout_dialog_new (LogoutDialogType type)
const gchar * button_text;
if (allowed) {
- button_text = _(button_strings[type]);
+ button_text = g_dpgettext2 (NULL, "button", button_strings[type]);
} else {
- button_text = _(button_auth_strings[type]);
+ button_text = g_dpgettext2 (NULL, "button auth", button_auth_strings[type]);
}
if (restart_required) {
diff --git a/src/gtk-logout-helper.c b/src/gtk-logout-helper.c
index 64fba14..b8923c6 100644
--- a/src/gtk-logout-helper.c
+++ b/src/gtk-logout-helper.c
@@ -68,7 +68,7 @@ consolekit_fallback (LogoutDialogType action)
g_object_unref(proxy);
if (error != NULL) {
- g_error("Unable to signal ConsoleKit: %s", error->message);
+ g_error("Unable to signal ConsoleKit");
g_error_free(error);
}
diff --git a/src/session-service.c b/src/session-service.c
index c1c2e57..c522748 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -545,7 +545,7 @@ rebuild_items (DbusmenuMenuitem *root,
dbusmenu_menuitem_property_set (guest_mi, USER_ITEM_PROP_NAME, _("Guest Session"));
dbusmenu_menuitem_property_set_bool (guest_mi, USER_ITEM_PROP_LOGGED_IN, FALSE);
dbusmenu_menuitem_child_append (root, guest_mi);
- g_signal_connect (G_OBJECT (guest_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_guest_session), NULL);
+ g_signal_connect (G_OBJECT (guest_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK (activate_guest_session), service);
users_service_dbus_set_guest_item(service, guest_mi);
}
@@ -637,7 +637,7 @@ rebuild_items (DbusmenuMenuitem *root,
if (can_suspend && allow_suspend) {
suspend_mi = dbusmenu_menuitem_new();
- dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Sleep"));
+ dbusmenu_menuitem_property_set(suspend_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Suspend"));
dbusmenu_menuitem_child_append(root, suspend_mi);
g_signal_connect(G_OBJECT(suspend_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(machine_sleep), "Suspend");
}
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index 86007c3..58490de 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -550,6 +550,7 @@ static void
add_sessions_for_user (UsersServiceDbus *self,
UserData *user)
{
+ g_return_if_fail(IS_USERS_SERVICE_DBUS(self));
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
GError *error;
GPtrArray *sessions;
@@ -582,6 +583,7 @@ seat_proxy_session_added (DBusGProxy *seat_proxy,
const gchar *session_id,
UsersServiceDbus *service)
{
+ g_return_if_fail(IS_USERS_SERVICE_DBUS(service));
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service);
uid_t uid;
gboolean res;
@@ -627,6 +629,7 @@ seat_proxy_session_removed (DBusGProxy *seat_proxy,
const gchar *session_id,
UsersServiceDbus *service)
{
+ g_return_if_fail(IS_USERS_SERVICE_DBUS(service));
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service);
UserData *user;
gchar *username;
@@ -671,6 +674,7 @@ seat_proxy_session_removed (DBusGProxy *seat_proxy,
static void
sync_users (UsersServiceDbus *self)
{
+ g_return_if_fail(IS_USERS_SERVICE_DBUS(self));
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
if (g_hash_table_size (priv->users) > 0)
@@ -770,6 +774,7 @@ static gboolean
session_is_login_window (UsersServiceDbus *self,
const char *ssid)
{
+ g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE);
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
DBusGProxy *proxy = NULL;
GError *error = NULL;
@@ -805,6 +810,7 @@ session_is_login_window (UsersServiceDbus *self,
static char *
get_login_session (UsersServiceDbus *self)
{
+ g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), NULL);
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
gboolean can_activate;
GError *error = NULL;
@@ -871,6 +877,7 @@ activate_user_session (UsersServiceDbus *self,
const char *seat,
const char *ssid)
{
+ g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE);
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
DBusMessage *message = NULL;
DBusMessage *reply = NULL;
@@ -1057,6 +1064,8 @@ user_updated (DBusGProxy *proxy,
gint
users_service_dbus_get_user_count (UsersServiceDbus *self)
{
+ g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), 0);
+
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
return priv->count;
@@ -1065,6 +1074,8 @@ users_service_dbus_get_user_count (UsersServiceDbus *self)
GList *
users_service_dbus_get_user_list (UsersServiceDbus *self)
{
+ g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), NULL);
+
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
return g_hash_table_get_values (priv->users);
@@ -1074,6 +1085,7 @@ users_service_dbus_get_user_list (UsersServiceDbus *self)
gboolean
users_service_dbus_activate_guest_session (UsersServiceDbus *self)
{
+ g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE);
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
return org_gnome_DisplayManager_LocalDisplayFactory_switch_to_user(priv->gdm_local_proxy, "guest", NULL, NULL);
}
@@ -1083,6 +1095,7 @@ gboolean
users_service_dbus_activate_user_session (UsersServiceDbus *self,
UserData *user)
{
+ g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE);
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
return org_gnome_DisplayManager_LocalDisplayFactory_switch_to_user(priv->gdm_local_proxy, user->user_name, NULL, NULL);
}
@@ -1090,6 +1103,7 @@ users_service_dbus_activate_user_session (UsersServiceDbus *self,
gboolean
users_service_dbus_can_activate_session (UsersServiceDbus *self)
{
+ g_return_val_if_fail(IS_USERS_SERVICE_DBUS(self), FALSE);
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
gboolean can_activate = FALSE;
GError *error = NULL;
@@ -1124,6 +1138,7 @@ users_service_dbus_can_activate_session (UsersServiceDbus *self)
void
users_service_dbus_set_guest_item (UsersServiceDbus * self, DbusmenuMenuitem * mi)
{
+ g_return_if_fail(IS_USERS_SERVICE_DBUS(self));
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
priv->guest_item = mi;