Merge lp:~indicator-applet-developers/indicator-session/ubuntu into lp:~ubuntu-desktop/indicator-session/ubuntu

Proposed by Ted Gould
Status: Merged
Merge reported by: Ken VanDine
Merged at revision: not available
Proposed branch: lp:~indicator-applet-developers/indicator-session/ubuntu
Merge into: lp:~ubuntu-desktop/indicator-session/ubuntu
Diff against target: 143 lines (+43/-27)
5 files modified
configure.ac (+1/-1)
debian/changelog (+12/-0)
debian/patches/restore_lock_screen.patch (+0/-19)
src/dialog.c (+3/-3)
src/indicator-session.c (+27/-4)
To merge this branch: bzr merge lp:~indicator-applet-developers/indicator-session/ubuntu
Reviewer Review Type Date Requested Status
Ken VanDine Approve
Review via email: mp+22136@code.launchpad.net

Description of the change

0.2.7

To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Approved!

review: Approve
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Manually merged into lp:ubuntu/indicator-session

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2010-03-18 19:19:39 +0000
3+++ configure.ac 2010-03-25 14:52:30 +0000
4@@ -4,7 +4,7 @@
5 AC_PREREQ(2.53)
6
7 AM_CONFIG_HEADER(config.h)
8-AM_INIT_AUTOMAKE(indicator-session, 0.2.6)
9+AM_INIT_AUTOMAKE(indicator-session, 0.2.7)
10
11 AM_MAINTAINER_MODE
12
13
14=== modified file 'debian/changelog'
15--- debian/changelog 2010-03-23 17:59:37 +0000
16+++ debian/changelog 2010-03-25 14:52:30 +0000
17@@ -1,3 +1,15 @@
18+indicator-session (0.2.7-0ubuntu1~ppa1) lucid; urgency=low
19+
20+ * Upstream release 0.2.7
21+ * Adding a switch for translators if the "Switch From"
22+ translation doesn't make sense (LP: #545893)
23+ * Scale avatar icons to menu size (LP: #542505)
24+ * Fix strings to have all be "Shut Down" (LP: #545578)
25+ * Remove debian/patches/restore_lock_screen.patch added by
26+ downstream.
27+
28+ -- Ted Gould <ted@ubuntu.com> Thu, 25 Mar 2010 09:40:31 -0500
29+
30 indicator-session (0.2.6-0ubuntu2) lucid; urgency=low
31
32 * debian/control:
33
34=== removed file 'debian/patches/restore_lock_screen.patch'
35--- debian/patches/restore_lock_screen.patch 2010-03-23 17:59:37 +0000
36+++ debian/patches/restore_lock_screen.patch 1970-01-01 00:00:00 +0000
37@@ -1,19 +0,0 @@
38-=== modified file 'src/lock-helper.c'
39---- src/lock-helper.c 2010-03-18 19:19:39 +0000
40-+++ src/lock-helper.c 2010-03-23 17:47:37 +0000
41-@@ -131,11 +131,12 @@
42- return FALSE;
43- }
44-
45-- if (gconf_client == NULL) {
46-+ /* if (gconf_client == NULL) {
47- gconf_client = gconf_client_get_default();
48- }
49-
50-- return gconf_client_get_bool (gconf_client, GCONF_KEY, NULL);
51-+ return gconf_client_get_bool (gconf_client, GCONF_KEY, NULL); */
52-+ return TRUE;
53- }
54-
55- /* When the screensave go active, if we've got a mainloop
56-
57
58=== modified file 'src/dialog.c'
59--- src/dialog.c 2010-03-04 02:37:47 +0000
60+++ src/dialog.c 2010-03-25 14:52:30 +0000
61@@ -34,7 +34,7 @@
62 static const gchar * title_strings[LOGOUT_DIALOG_TYPE_CNT] = {
63 /* LOGOUT_DIALOG_LOGOUT, */ NC_("title", "Log Out"),
64 /* LOGOUT_DIALOG_RESTART, */ NC_("title", "Restart"),
65- /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("title", "Switch Off")
66+ /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("title", "Shut Down")
67 };
68
69 static const gchar * body_strings[LOGOUT_DIALOG_TYPE_CNT] = {
70@@ -46,7 +46,7 @@
71 static const gchar * button_strings[LOGOUT_DIALOG_TYPE_CNT] = {
72 /* LOGOUT_DIALOG_LOGOUT, */ NC_("button", "Log Out"),
73 /* LOGOUT_DIALOG_RESTART, */ NC_("button", "Restart"),
74- /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button", "Switch Off")
75+ /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button", "Shut Down")
76 };
77
78 /* TRANSLATORS: These strings have an ellipsis so that the user knows
79@@ -54,7 +54,7 @@
80 static const gchar * button_auth_strings[LOGOUT_DIALOG_TYPE_CNT] = {
81 /* LOGOUT_DIALOG_LOGOUT, */ NC_("button auth", "Log Out"),
82 /* LOGOUT_DIALOG_RESTART, */ NC_("button auth", "Restart..."),
83- /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button auth", "Switch Off...")
84+ /* LOGOUT_DIALOG_SHUTDOWN, */ NC_("button auth", "Shut Down...")
85 };
86
87 /* TRANSLATORS: This button appears on the logout dialog when
88
89=== modified file 'src/indicator-session.c'
90--- src/indicator-session.c 2010-03-18 19:19:39 +0000
91+++ src/indicator-session.c 2010-03-25 14:52:30 +0000
92@@ -243,12 +243,26 @@
93 const gchar * icon_name = dbusmenu_menuitem_property_get(newitem, USER_ITEM_PROP_ICON);
94 g_debug("Using user icon for '%s' from file: %s", dbusmenu_menuitem_property_get(newitem, USER_ITEM_PROP_NAME), icon_name);
95 if (icon_name != NULL && icon_name[0] != '\0') {
96- if (g_strcmp0(icon_name, USER_ITEM_ICON_DEFAULT) == 0 || !g_file_test(icon_name, G_FILE_TEST_EXISTS)) {
97+ if (g_strcmp0(icon_name, USER_ITEM_ICON_DEFAULT) != 0 && g_file_test(icon_name, G_FILE_TEST_EXISTS)) {
98+ gint width, height;
99+ gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, &height);
100+
101+ GError * error = NULL;
102+ GdkPixbuf * pixbuf = gdk_pixbuf_new_from_file_at_size(icon_name, width, height, &error);
103+
104+ if (error == NULL) {
105+ usericon = gtk_image_new_from_pixbuf(pixbuf);
106+ g_object_unref(pixbuf);
107+ } else {
108+ g_warning("Unable to load user icon '%s': %s", icon_name, error->message);
109+ g_error_free(error);
110+ }
111+ }
112+
113+ if (usericon == NULL) {
114 GIcon * gicon = g_themed_icon_new_with_default_fallbacks("stock_person-panel");
115 usericon = gtk_image_new_from_gicon(gicon, GTK_ICON_SIZE_MENU);
116 g_object_unref(gicon);
117- } else {
118- usericon = gtk_image_new_from_file(icon_name);
119 }
120 }
121 if (usericon != NULL) {
122@@ -300,11 +314,20 @@
123 GtkMenuItem * gmi = dbusmenu_gtkclient_menuitem_get(DBUSMENU_GTKCLIENT(user_data), item);
124 gchar * finalstring = NULL;
125 gboolean set_ellipsize = FALSE;
126+ gboolean no_name_in_lang = FALSE;
127+
128+ /* TRANSLATORS: Translate the '1' below into anything other than
129+ '1' if "Switch From %s..." doesn't make sense in your language.
130+ Instead, the string "Switch User..." will be used. */
131+ const gchar * translate = C_("session_menu:switchfrom", "1");
132+ if (g_strcmp0(translate, "1") != 0) {
133+ no_name_in_lang = TRUE;
134+ }
135
136 /* If there's a NULL string of some type, then we want to
137 go back to our old 'Switch User' which isn't great but
138 eh, this error condition should never happen. */
139- if (value == NULL || g_value_get_string(value) == NULL || g_value_get_string(value)[0] == '\0') {
140+ if (value == NULL || g_value_get_string(value) == NULL || g_value_get_string(value)[0] == '\0' || no_name_in_lang) {
141 finalstring = _("Switch User...");
142 set_ellipsize = FALSE;
143 }

Subscribers

People subscribed via source and target branches

to all changes: