Merge lp:~darkxst/gnome-control-center/vanilla3.8 into lp:~ubuntu-desktop/gnome-control-center/ubuntu
- vanilla3.8
- Merge into ubuntu
Proposed by
Tim Lunn
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 642 | ||||
Proposed branch: | lp:~darkxst/gnome-control-center/vanilla3.8 | ||||
Merge into: | lp:~ubuntu-desktop/gnome-control-center/ubuntu | ||||
Diff against target: |
10741 lines (+782/-7168) 75 files modified
debian/changelog (+54/-1) debian/control (+33/-13) debian/control.in (+20/-11) debian/gnome-control-center-data.install (+0/-5) debian/gnome-control-center.install (+1/-2) debian/libgnome-control-center1.symbols (+6/-0) debian/patches/0001-online-accounts-use-the-async-function-to-get-all-th.patch (+0/-86) debian/patches/0001-rfkill-glib-Don-t-use-g_assert_not_reached-in-type_t.patch (+0/-27) debian/patches/02_new_goa.patch (+46/-0) debian/patches/05_run_update_manager.patch (+0/-13) debian/patches/06_handle_passwd_with_ldap.patch (+0/-19) debian/patches/11_power-configure_lid_action.patch (+0/-149) debian/patches/12_add_never_turn_screen_off.patch (+0/-29) debian/patches/51_unity_options_in_display_panel.patch (+0/-592) debian/patches/52_region_language.patch (+0/-652) debian/patches/53_use_ubuntu_help.patch (+0/-282) debian/patches/54_enable_alt_tap_in_shortcut.patch (+0/-58) debian/patches/55_user_accounts_hide_controls.patch (+0/-148) debian/patches/56_use_ubuntu_info_branding.patch (+0/-26) debian/patches/58_hide_gdm_notifications.patch (+0/-17) debian/patches/58_ubuntu_icon_views_redesign.patch (+0/-70) debian/patches/59_install_gcm_components_on_demand.patch (+0/-231) debian/patches/60_ubuntu_nav_bar.patch (+0/-406) debian/patches/61_workaround_online_account.patch (+0/-16) debian/patches/64_restore_terminal_keyboard_shortcut.patch (+0/-13) debian/patches/90_force_fallback.patch (+0/-22) debian/patches/91_unity_no_printing_panel.patch (+0/-12) debian/patches/92_ubuntu_system_proxy.patch (+0/-217) debian/patches/97_unity_power_ui.patch (+0/-160) debian/patches/98_default_sound_theme.patch (+0/-16) debian/patches/99_add_lock-on-suspend.patch (+0/-77) debian/patches/accounts_fix_unsetting_icon.patch (+0/-16) debian/patches/classic_use_sound_indicator.patch (+0/-10) debian/patches/deal_with_null_ssid.patch (+0/-33) debian/patches/dont_download_local_image.patch (+0/-28) debian/patches/gcc_not_in_unity.patch (+33/-74) debian/patches/git-add-21_9_display.patch (+0/-18) debian/patches/git-background-lock-screen.patch (+0/-854) debian/patches/git-background-remove-unused-widget.patch (+0/-116) debian/patches/git-fix-background-panel-crash.patch (+0/-65) debian/patches/git-rename-bluetooth-panel.patch (+0/-94) debian/patches/git-sound-fix-port-handling.patch (+0/-24) debian/patches/git_add_printer_crash.patch (+0/-45) debian/patches/git_drop_ibus_engine_whitelist.patch (+0/-245) debian/patches/git_fix_libbackground_linking.patch (+24/-0) debian/patches/git_hide_unavailable_layout_settings_btn.patch (+0/-27) debian/patches/git_iconview_columns.patch (+0/-16) debian/patches/git_keyboard_grp_xkb_option.patch (+0/-83) debian/patches/git_keyboard_update_input_switch.patch (+0/-22) debian/patches/git_move_rr_labeler.patch (+0/-801) debian/patches/git_new_goa_build.patch (+0/-61) debian/patches/git_no_glxinfo.patch (+0/-151) debian/patches/git_power_gsd_proxies.patch (+0/-19) debian/patches/git_region_update_input_switch.patch (+0/-54) debian/patches/git_rename_natural_scrolling.patch (+0/-26) debian/patches/git_restore_mouse_speed.patch (+0/-32) debian/patches/git_set_a11y_wm_theme.patch (+0/-60) debian/patches/git_shell_use_view_style_class.patch (+0/-32) debian/patches/git_show_per_window_input_settings.patch (+0/-306) debian/patches/more-power-suspend-options.patch (+0/-32) debian/patches/rename_screenshot_media_keys.patch (+0/-26) debian/patches/revert_git_dont_hide_zoom.patch (+78/-0) debian/patches/revert_git_drop_library.patch (+0/-165) debian/patches/sanitize_ssid_convert_utf8.patch (+0/-78) debian/patches/series (+8/-50) debian/patches/ubuntu-gnome-version.patch (+103/-0) debian/patches/ubuntu_external_panels.patch (+372/-0) debian/patches/ubuntu_update_lock_and_power_settings.patch (+0/-45) debian/patches/ubuntu_update_translations_template.patch (+0/-26) debian/patches/unity_background_is_appareance.patch (+0/-15) debian/patches/unity_no_zoom_controls.patch (+0/-27) debian/patches/zz_add_fallback_panels_dir.patch (+0/-18) debian/rules (+4/-2) debian/searchingthedashlegalnotice.html (+0/-1) debian/source/include-binaries (+0/-1) |
||||
To merge this branch: | bzr merge lp:~darkxst/gnome-control-center/vanilla3.8 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Desktop | Pending | ||
Review via email: mp+205876@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 634. By Tim Lunn
-
remove remaining ubuntu-isms
- 635. By Tim Lunn
-
Rebase on current gnome-control-
center in utopic - 636. By Tim Lunn
-
remaining minor fixes from merge
- 637. By Tim Lunn
-
clean up changelog
- 638. By Tim Lunn
-
Merge logo changes
* debian/patches/ ubuntu- gnome-version. patch: Merge build-time versioned
logo from unity-control-center (LP: #1299912)
* debian/rules: generate logo
* debian/control.in: build-depend on ubuntu font and valac, also add
build-dep on libkrb5-dev to fix FTBS on utopic - 639. By Tim Lunn
-
rebase patch
- 640. By Tim Lunn
-
debian/control.in: Add build-depends on libnm-glib-vpn-dev (>= 0.9.8),
libmm-glib-dev and libsmbclient-dev, remove a few duplicated build-deps - 641. By Tim Lunn
-
missing comma
- 642. By Tim Lunn
-
Add bug ref (LP: #1316383)
- 643. By Tim Lunn
-
* debian/
patches/ 56_use_ ubuntu_ info_branding. patch:
- Keep using this branding patch for now - 644. By Tim Lunn
-
missing patch
- 645. By Tim Lunn
-
fix up branding to use gresources
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed file 'debian/UbuntuLogo.png' | |||
2 | 0 | Binary files debian/UbuntuLogo.png 2013-06-17 13:33:37 +0000 and debian/UbuntuLogo.png 1970-01-01 00:00:00 +0000 differ | 0 | Binary files debian/UbuntuLogo.png 2013-06-17 13:33:37 +0000 and debian/UbuntuLogo.png 1970-01-01 00:00:00 +0000 differ |
3 | === added file 'debian/UbuntuLogoBlank.png' | |||
4 | 1 | Binary files debian/UbuntuLogoBlank.png 1970-01-01 00:00:00 +0000 and debian/UbuntuLogoBlank.png 2014-05-06 09:05:46 +0000 differ | 1 | Binary files debian/UbuntuLogoBlank.png 1970-01-01 00:00:00 +0000 and debian/UbuntuLogoBlank.png 2014-05-06 09:05:46 +0000 differ |
5 | === modified file 'debian/changelog' | |||
6 | --- debian/changelog 2014-04-10 15:24:53 +0000 | |||
7 | +++ debian/changelog 2014-05-06 09:05:46 +0000 | |||
8 | @@ -1,3 +1,57 @@ | |||
9 | 1 | gnome-control-center (1:3.8.6-0ubuntu1~utopic2) utopic; urgency=medium | ||
10 | 2 | |||
11 | 3 | [ Robert Ancell ] | ||
12 | 4 | * New upstream release (LP: #1316383) | ||
13 | 5 | * Drop all Unity customizations | ||
14 | 6 | * debian/control: | ||
15 | 7 | - Build-depend on valac, libgirepository1.0-dev | ||
16 | 8 | - Use standards-version 3.9.4 | ||
17 | 9 | * debian/gnome-control-center.sh: | ||
18 | 10 | * debian/patches/02_new_goa.patch: | ||
19 | 11 | - Build against newer libgoa | ||
20 | 12 | * debian/patches/git_iconview_columns.patch: | ||
21 | 13 | - Set the number of columns, that seems needed with new GTK versions | ||
22 | 14 | |||
23 | 15 | [ Tim Lunn ] | ||
24 | 16 | * debian/control.in: Add build-depends on libnm-glib-vpn-dev (>= 0.9.8), | ||
25 | 17 | libmm-glib-dev and libsmbclient-dev, remove a few duplicated build-deps | ||
26 | 18 | * debian/patches: drop all Ubuntu specific patches | ||
27 | 19 | * debian/patches/52_region_language.patch: | ||
28 | 20 | - Adapt region panel to use Ubuntu style regions and UTF-8 | ||
29 | 21 | * debian/patches/56_use_ubuntu_info_branding.patch: | ||
30 | 22 | - Keep using this branding patch for now | ||
31 | 23 | * debian/patches/64_restore_terminal_keyboard_shortcut.patch: | ||
32 | 24 | - Bring back terminal shortcut | ||
33 | 25 | * debian/patches/92_ubuntu_system_proxy.patch: | ||
34 | 26 | - Add system proxy support | ||
35 | 27 | * debian/patches/99_add_lock-on-suspend.patch: | ||
36 | 28 | - Add option to lock on suspend | ||
37 | 29 | * debian/patches/git_rename_natural_scrolling.patch: | ||
38 | 30 | - change potentially offensive string | ||
39 | 31 | * debian/patches/git-background-*.patch: | ||
40 | 32 | - Allow setting a different background for the GNOME Shell lock | ||
41 | 33 | screen (LP: #1219188) | ||
42 | 34 | * debian/patches/revert_git_dont_hide_zoom.patch: | ||
43 | 35 | - Bring back zoom settings | ||
44 | 36 | * debian/patches/ubuntu-external-panels.patch: | ||
45 | 37 | - Reimplement support for external panels | ||
46 | 38 | * debian/libgnome-control-center1.symbols: | ||
47 | 39 | - Add new symbols from external panel patch | ||
48 | 40 | * debian/patches/git_keyboard_grp_xkb_option.patch: | ||
49 | 41 | - Dropped, included in new version | ||
50 | 42 | |||
51 | 43 | -- Robert Ancell <robert.ancell@canonical.com> Wed, 04 Dec 2013 11:03:26 +1300 | ||
52 | 44 | |||
53 | 45 | gnome-control-center (1:3.6.3-0ubuntu57) utopic; urgency=medium | ||
54 | 46 | |||
55 | 47 | * debian/patches/ubuntu-gnome-version.patch: Merge build-time versioned | ||
56 | 48 | logo from unity-control-center (LP: #1299912) | ||
57 | 49 | * debian/rules: generate logo | ||
58 | 50 | * debian/control.in: build-depend on ubuntu font and valac, also add | ||
59 | 51 | build-dep on libkrb5-dev to fix FTBS on utopic | ||
60 | 52 | |||
61 | 53 | -- Tim Lunn <tim@feathertop.org> Mon, 05 May 2014 08:37:17 +1000 | ||
62 | 54 | |||
63 | 1 | gnome-control-center (1:3.6.3-0ubuntu56) trusty; urgency=medium | 55 | gnome-control-center (1:3.6.3-0ubuntu56) trusty; urgency=medium |
64 | 2 | 56 | ||
65 | 3 | * debian/patches/git_keyboard_grp_xkb_option.patch: | 57 | * debian/patches/git_keyboard_grp_xkb_option.patch: |
66 | @@ -68,7 +122,6 @@ | |||
67 | 68 | 122 | ||
68 | 69 | -- Iain Lane <iain.lane@canonical.com> Fri, 06 Dec 2013 12:43:49 +0000 | 123 | -- Iain Lane <iain.lane@canonical.com> Fri, 06 Dec 2013 12:43:49 +0000 |
69 | 70 | 124 | ||
70 | 71 | |||
71 | 72 | gnome-control-center (1:3.6.3-0ubuntu48) trusty; urgency=low | 125 | gnome-control-center (1:3.6.3-0ubuntu48) trusty; urgency=low |
72 | 73 | 126 | ||
73 | 74 | * debian/patches/git_iconview_columns.patch: | 127 | * debian/patches/git_iconview_columns.patch: |
74 | 75 | 128 | ||
75 | === modified file 'debian/control' | |||
76 | --- debian/control 2013-10-31 00:54:13 +0000 | |||
77 | +++ debian/control 2014-05-06 09:05:46 +0000 | |||
78 | @@ -7,14 +7,15 @@ | |||
79 | 7 | Priority: optional | 7 | Priority: optional |
80 | 8 | Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com> | 8 | Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com> |
81 | 9 | XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> | 9 | XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> |
84 | 10 | Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>, Jeremy Bicha <jbicha@ubuntu.com> | 10 | Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> |
85 | 11 | Standards-Version: 3.9.3 | 11 | Standards-Version: 3.9.4 |
86 | 12 | Build-Depends: autotools-dev, | 12 | Build-Depends: autotools-dev, |
87 | 13 | cdbs (>= 0.4.41), | 13 | cdbs (>= 0.4.41), |
88 | 14 | debhelper (>= 9), | 14 | debhelper (>= 9), |
89 | 15 | desktop-file-utils, | 15 | desktop-file-utils, |
90 | 16 | dh-autoreconf, | 16 | dh-autoreconf, |
91 | 17 | gtk-doc-tools, | 17 | gtk-doc-tools, |
92 | 18 | libgirepository1.0-dev (>= 0.9.7), | ||
93 | 18 | gnome-common, | 19 | gnome-common, |
94 | 19 | gnome-pkg-tools (>= 0.10), | 20 | gnome-pkg-tools (>= 0.10), |
95 | 20 | gnome-settings-daemon-dev (>= 3.8.4), | 21 | gnome-settings-daemon-dev (>= 3.8.4), |
96 | @@ -23,42 +24,50 @@ | |||
97 | 23 | intltool (>= 0.37.1), | 24 | intltool (>= 0.37.1), |
98 | 24 | libcanberra-gtk3-dev, | 25 | libcanberra-gtk3-dev, |
99 | 25 | libcheese-gtk-dev (>= 2.91.91.1), | 26 | libcheese-gtk-dev (>= 2.91.91.1), |
101 | 26 | libcolord-dev, | 27 | libcolord-dev (>= 0.1.29), |
102 | 28 | libcolord-gtk-dev (>= 0.1.24), | ||
103 | 27 | libcups2-dev, | 29 | libcups2-dev, |
104 | 28 | libdbus-1-dev (>= 0.32), | 30 | libdbus-1-dev (>= 0.32), |
105 | 29 | libdbus-glib-1-dev (>= 0.32), | 31 | libdbus-glib-1-dev (>= 0.32), |
106 | 30 | libgdk-pixbuf2.0-dev (>= 2.23.0), | 32 | libgdk-pixbuf2.0-dev (>= 2.23.0), |
108 | 31 | libglib2.0-dev (>= 2.31.2), | 33 | libglib2.0-dev (>= 2.35.1), |
109 | 32 | libgnome-bluetooth-dev (>= 3.3.4), | 34 | libgnome-bluetooth-dev (>= 3.3.4), |
111 | 33 | libgnome-desktop-3-dev (>= 3.5.91), | 35 | libgnome-desktop-3-dev (>= 3.7.5), |
112 | 34 | libgnome-menu-3-dev, | 36 | libgnome-menu-3-dev, |
113 | 35 | libgnomekbd-dev, | 37 | libgnomekbd-dev, |
115 | 36 | libgoa-1.0-dev (>= 3.5.90), | 38 | libgoa-1.0-dev (>= 3.10.0), |
116 | 39 | libaccountsservice-dev (>= 0.6.30), | ||
117 | 37 | libgstreamer-plugins-base0.10-dev, | 40 | libgstreamer-plugins-base0.10-dev, |
119 | 38 | libgtk-3-dev (>= 3.5.13), | 41 | libgtk-3-dev (>= 3.7.7), |
120 | 39 | libgtop2-dev, | 42 | libgtop2-dev, |
121 | 40 | libibus-1.0-dev (>= 1.5.0), | 43 | libibus-1.0-dev (>= 1.5.0), |
125 | 41 | libnm-glib-dev (>= 0.9) [linux-any], | 44 | libkrb5-dev, |
126 | 42 | libnm-gtk-dev (>= 0.9) [linux-any], | 45 | libnm-glib-dev (>= 0.9.8) [linux-any], |
127 | 43 | libnm-util-dev (>= 0.9) [linux-any], | 46 | libnm-glib-vpn-dev (>= 0.9.8) [linux-any], |
128 | 47 | libnm-gtk-dev (>= 0.9.7.995) [linux-any], | ||
129 | 48 | libnm-util-dev (>= 0.9.8) [linux-any], | ||
130 | 49 | libmm-glib-dev [linux-any], | ||
131 | 44 | libnotify-dev (>= 0.7.3), | 50 | libnotify-dev (>= 0.7.3), |
132 | 45 | libpolkit-gobject-1-dev (>= 0.103), | 51 | libpolkit-gobject-1-dev (>= 0.103), |
133 | 46 | libpulse-dev (>= 1:2.0), | 52 | libpulse-dev (>= 1:2.0), |
134 | 47 | libpwquality-dev, | 53 | libpwquality-dev, |
135 | 54 | libsmbclient-dev, | ||
136 | 48 | # libsocialweb-client-dev, | 55 | # libsocialweb-client-dev, |
137 | 49 | libupower-glib-dev (>= 0.9.1), | 56 | libupower-glib-dev (>= 0.9.1), |
138 | 50 | libsystemd-login-dev, | 57 | libsystemd-login-dev, |
140 | 51 | libwacom-dev (>= 0.6), | 58 | libwacom-dev (>= 0.7), |
141 | 52 | libx11-dev, | 59 | libx11-dev, |
142 | 53 | libxft-dev (>= 2.1.2), | 60 | libxft-dev (>= 2.1.2), |
143 | 54 | libxkbfile-dev, | 61 | libxkbfile-dev, |
144 | 55 | libxklavier-dev (>= 5.1), | 62 | libxklavier-dev (>= 5.1), |
145 | 56 | libxml2-dev, | 63 | libxml2-dev, |
146 | 57 | locales, | 64 | locales, |
148 | 58 | network-manager-dev (>= 0.9) [linux-any], | 65 | network-manager-dev (>= 0.9.8) [linux-any], |
149 | 59 | shared-mime-info, | 66 | shared-mime-info, |
150 | 67 | ttf-ubuntu-font-family, | ||
151 | 60 | libwebkitgtk-3.0-dev, | 68 | libwebkitgtk-3.0-dev, |
152 | 61 | libgl1-mesa-dev, | 69 | libgl1-mesa-dev, |
153 | 70 | valac (>= 0.20.0), | ||
154 | 62 | Vcs-Bzr: http://code.launchpad.net/~ubuntu-desktop/gnome-control-center/ubuntu | 71 | Vcs-Bzr: http://code.launchpad.net/~ubuntu-desktop/gnome-control-center/ubuntu |
155 | 63 | 72 | ||
156 | 64 | Package: gnome-control-center | 73 | Package: gnome-control-center |
157 | @@ -86,7 +95,8 @@ | |||
158 | 86 | mousetweaks, | 95 | mousetweaks, |
159 | 87 | policykit-1-gnome, | 96 | policykit-1-gnome, |
160 | 88 | libcanberra-pulse, | 97 | libcanberra-pulse, |
162 | 89 | system-config-printer-gnome | 98 | system-config-printer-gnome, |
163 | 99 | gnome-control-center-shared-data | ||
164 | 90 | Replaces: gnome-bluetooth (<< 3.4.0) | 100 | Replaces: gnome-bluetooth (<< 3.4.0) |
165 | 91 | Breaks: gnome-power-manager (<< 3.0), | 101 | Breaks: gnome-power-manager (<< 3.0), |
166 | 92 | gnome-session (<< 3.0), | 102 | gnome-session (<< 3.0), |
167 | @@ -137,6 +147,16 @@ | |||
168 | 137 | This package contains data files (icons, pixmaps, locales files) needed by | 147 | This package contains data files (icons, pixmaps, locales files) needed by |
169 | 138 | the configuration applets in the gnome-control-center package. | 148 | the configuration applets in the gnome-control-center package. |
170 | 139 | 149 | ||
171 | 150 | Package: gnome-control-center-shared-data | ||
172 | 151 | Architecture: all | ||
173 | 152 | Section: gnome | ||
174 | 153 | Depends: ${misc:Depends} | ||
175 | 154 | Replaces: gnome-control-center-data (<< 1:3.6.3-0ubuntu54) | ||
176 | 155 | Conflicts: gnome-control-center-data (<< 1:3.6.3-0ubuntu54) | ||
177 | 156 | Description: configuration applets for GNOME - shared data | ||
178 | 157 | This package contains datas that are used by gnome-control-center and the | ||
179 | 158 | new unity-control-center | ||
180 | 159 | |||
181 | 140 | Package: libgnome-control-center-dev | 160 | Package: libgnome-control-center-dev |
182 | 141 | Architecture: any | 161 | Architecture: any |
183 | 142 | Section: libdevel | 162 | Section: libdevel |
184 | 143 | 163 | ||
185 | === modified file 'debian/control.in' | |||
186 | --- debian/control.in 2014-03-21 11:25:33 +0000 | |||
187 | +++ debian/control.in 2014-05-06 09:05:46 +0000 | |||
188 | @@ -4,13 +4,14 @@ | |||
189 | 4 | Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com> | 4 | Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com> |
190 | 5 | XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> | 5 | XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org> |
191 | 6 | Uploaders: @GNOME_TEAM@ | 6 | Uploaders: @GNOME_TEAM@ |
193 | 7 | Standards-Version: 3.9.3 | 7 | Standards-Version: 3.9.4 |
194 | 8 | Build-Depends: autotools-dev, | 8 | Build-Depends: autotools-dev, |
195 | 9 | cdbs (>= 0.4.41), | 9 | cdbs (>= 0.4.41), |
196 | 10 | debhelper (>= 9), | 10 | debhelper (>= 9), |
197 | 11 | desktop-file-utils, | 11 | desktop-file-utils, |
198 | 12 | dh-autoreconf, | 12 | dh-autoreconf, |
199 | 13 | gtk-doc-tools, | 13 | gtk-doc-tools, |
200 | 14 | libgirepository1.0-dev (>= 0.9.7), | ||
201 | 14 | gnome-common, | 15 | gnome-common, |
202 | 15 | gnome-pkg-tools (>= 0.10), | 16 | gnome-pkg-tools (>= 0.10), |
203 | 16 | gnome-settings-daemon-dev (>= 3.8.4), | 17 | gnome-settings-daemon-dev (>= 3.8.4), |
204 | @@ -19,42 +20,50 @@ | |||
205 | 19 | intltool (>= 0.37.1), | 20 | intltool (>= 0.37.1), |
206 | 20 | libcanberra-gtk3-dev, | 21 | libcanberra-gtk3-dev, |
207 | 21 | libcheese-gtk-dev (>= 2.91.91.1), | 22 | libcheese-gtk-dev (>= 2.91.91.1), |
209 | 22 | libcolord-dev, | 23 | libcolord-dev (>= 0.1.29), |
210 | 24 | libcolord-gtk-dev (>= 0.1.24), | ||
211 | 23 | libcups2-dev, | 25 | libcups2-dev, |
212 | 24 | libdbus-1-dev (>= 0.32), | 26 | libdbus-1-dev (>= 0.32), |
213 | 25 | libdbus-glib-1-dev (>= 0.32), | 27 | libdbus-glib-1-dev (>= 0.32), |
214 | 26 | libgdk-pixbuf2.0-dev (>= 2.23.0), | 28 | libgdk-pixbuf2.0-dev (>= 2.23.0), |
216 | 27 | libglib2.0-dev (>= 2.31.2), | 29 | libglib2.0-dev (>= 2.35.1), |
217 | 28 | libgnome-bluetooth-dev (>= 3.3.4), | 30 | libgnome-bluetooth-dev (>= 3.3.4), |
219 | 29 | libgnome-desktop-3-dev (>= 3.5.91), | 31 | libgnome-desktop-3-dev (>= 3.7.5), |
220 | 30 | libgnome-menu-3-dev, | 32 | libgnome-menu-3-dev, |
221 | 31 | libgnomekbd-dev, | 33 | libgnomekbd-dev, |
223 | 32 | libgoa-1.0-dev (>= 3.5.90), | 34 | libgoa-1.0-dev (>= 3.10.0), |
224 | 35 | libaccountsservice-dev (>= 0.6.30), | ||
225 | 33 | libgstreamer-plugins-base0.10-dev, | 36 | libgstreamer-plugins-base0.10-dev, |
227 | 34 | libgtk-3-dev (>= 3.5.13), | 37 | libgtk-3-dev (>= 3.7.7), |
228 | 35 | libgtop2-dev, | 38 | libgtop2-dev, |
229 | 36 | libibus-1.0-dev (>= 1.5.0), | 39 | libibus-1.0-dev (>= 1.5.0), |
233 | 37 | libnm-glib-dev (>= 0.9) [linux-any], | 40 | libkrb5-dev, |
234 | 38 | libnm-gtk-dev (>= 0.9) [linux-any], | 41 | libnm-glib-dev (>= 0.9.8) [linux-any], |
235 | 39 | libnm-util-dev (>= 0.9) [linux-any], | 42 | libnm-glib-vpn-dev (>= 0.9.8) [linux-any], |
236 | 43 | libnm-gtk-dev (>= 0.9.7.995) [linux-any], | ||
237 | 44 | libnm-util-dev (>= 0.9.8) [linux-any], | ||
238 | 45 | libmm-glib-dev [linux-any], | ||
239 | 40 | libnotify-dev (>= 0.7.3), | 46 | libnotify-dev (>= 0.7.3), |
240 | 41 | libpolkit-gobject-1-dev (>= 0.103), | 47 | libpolkit-gobject-1-dev (>= 0.103), |
241 | 42 | libpulse-dev (>= 1:2.0), | 48 | libpulse-dev (>= 1:2.0), |
242 | 43 | libpwquality-dev, | 49 | libpwquality-dev, |
243 | 50 | libsmbclient-dev, | ||
244 | 44 | # libsocialweb-client-dev, | 51 | # libsocialweb-client-dev, |
245 | 45 | libupower-glib-dev (>= 0.9.1), | 52 | libupower-glib-dev (>= 0.9.1), |
246 | 46 | libsystemd-login-dev, | 53 | libsystemd-login-dev, |
248 | 47 | libwacom-dev (>= 0.6), | 54 | libwacom-dev (>= 0.7), |
249 | 48 | libx11-dev, | 55 | libx11-dev, |
250 | 49 | libxft-dev (>= 2.1.2), | 56 | libxft-dev (>= 2.1.2), |
251 | 50 | libxkbfile-dev, | 57 | libxkbfile-dev, |
252 | 51 | libxklavier-dev (>= 5.1), | 58 | libxklavier-dev (>= 5.1), |
253 | 52 | libxml2-dev, | 59 | libxml2-dev, |
254 | 53 | locales, | 60 | locales, |
256 | 54 | network-manager-dev (>= 0.9) [linux-any], | 61 | network-manager-dev (>= 0.9.8) [linux-any], |
257 | 55 | shared-mime-info, | 62 | shared-mime-info, |
258 | 63 | ttf-ubuntu-font-family, | ||
259 | 56 | libwebkitgtk-3.0-dev, | 64 | libwebkitgtk-3.0-dev, |
260 | 57 | libgl1-mesa-dev, | 65 | libgl1-mesa-dev, |
261 | 66 | valac (>= 0.20.0), | ||
262 | 58 | Vcs-Bzr: http://code.launchpad.net/~ubuntu-desktop/gnome-control-center/ubuntu | 67 | Vcs-Bzr: http://code.launchpad.net/~ubuntu-desktop/gnome-control-center/ubuntu |
263 | 59 | 68 | ||
264 | 60 | Package: gnome-control-center | 69 | Package: gnome-control-center |
265 | 61 | 70 | ||
266 | === modified file 'debian/gnome-control-center-data.install' | |||
267 | --- debian/gnome-control-center-data.install 2014-03-21 11:25:33 +0000 | |||
268 | +++ debian/gnome-control-center-data.install 2014-05-06 09:05:46 +0000 | |||
269 | @@ -1,12 +1,7 @@ | |||
270 | 1 | etc/xdg/autostart | ||
271 | 2 | etc/xdg/menus | ||
272 | 3 | debian/searchingthedashlegalnotice.html /usr/share/gnome-control-center | ||
273 | 4 | usr/share/gnome-control-center | 1 | usr/share/gnome-control-center |
274 | 5 | usr/share/sounds | 2 | usr/share/sounds |
275 | 6 | usr/share/desktop-directories | ||
276 | 7 | usr/share/locale | 3 | usr/share/locale |
277 | 8 | usr/share/icons | 4 | usr/share/icons |
278 | 9 | usr/share/polkit-1 | 5 | usr/share/polkit-1 |
279 | 10 | #debian/gnome-control-center.pkla /var/lib/polkit-1/localauthority/10-vendor.d/ | 6 | #debian/gnome-control-center.pkla /var/lib/polkit-1/localauthority/10-vendor.d/ |
280 | 11 | debian/source_gnome-control-center.py /usr/share/apport/package-hooks | 7 | debian/source_gnome-control-center.py /usr/share/apport/package-hooks |
281 | 12 | debian/UbuntuLogo.png /usr/share/gnome-control-center/ui | ||
282 | 13 | 8 | ||
283 | === modified file 'debian/gnome-control-center.install' | |||
284 | --- debian/gnome-control-center.install 2013-07-08 17:05:39 +0000 | |||
285 | +++ debian/gnome-control-center.install 2014-05-06 09:05:46 +0000 | |||
286 | @@ -1,4 +1,3 @@ | |||
289 | 1 | usr/bin | 1 | usr/bin/gnome-control-center |
288 | 2 | usr/lib/*/control-center-1/panels/*.so | ||
290 | 3 | usr/share/applications | 2 | usr/share/applications |
291 | 4 | usr/share/man | 3 | usr/share/man |
292 | 5 | 4 | ||
293 | === modified file 'debian/libgnome-control-center1.symbols' | |||
294 | --- debian/libgnome-control-center1.symbols 2014-02-26 18:20:56 +0000 | |||
295 | +++ debian/libgnome-control-center1.symbols 2014-05-06 09:05:46 +0000 | |||
296 | @@ -1,17 +1,23 @@ | |||
297 | 1 | libgnome-control-center.so.1 libgnome-control-center1 #MINVER# | 1 | libgnome-control-center.so.1 libgnome-control-center1 #MINVER# |
298 | 2 | * Build-Depends-Package: libgnome-control-center-dev | 2 | * Build-Depends-Package: libgnome-control-center-dev |
299 | 3 | cc_editable_entry_get_editable@Base 1:3.1.3 | 3 | cc_editable_entry_get_editable@Base 1:3.1.3 |
300 | 4 | cc_editable_entry_get_ellipsize@Base 1:3.8.6 | ||
301 | 5 | cc_editable_entry_get_max_width_chars@Base 1:3.8.6 | ||
302 | 4 | cc_editable_entry_get_scale@Base 1:3.1.3 | 6 | cc_editable_entry_get_scale@Base 1:3.1.3 |
303 | 5 | cc_editable_entry_get_selectable@Base 1:3.1.4 | 7 | cc_editable_entry_get_selectable@Base 1:3.1.4 |
304 | 6 | cc_editable_entry_get_text@Base 1:3.1.3 | 8 | cc_editable_entry_get_text@Base 1:3.1.3 |
305 | 7 | cc_editable_entry_get_type@Base 1:3.1.3 | 9 | cc_editable_entry_get_type@Base 1:3.1.3 |
306 | 8 | cc_editable_entry_get_weight@Base 1:3.1.3 | 10 | cc_editable_entry_get_weight@Base 1:3.1.3 |
307 | 11 | cc_editable_entry_get_width_chars@Base 1:3.8.6 | ||
308 | 9 | cc_editable_entry_new@Base 1:3.1.3 | 12 | cc_editable_entry_new@Base 1:3.1.3 |
309 | 10 | cc_editable_entry_set_editable@Base 1:3.1.3 | 13 | cc_editable_entry_set_editable@Base 1:3.1.3 |
310 | 14 | cc_editable_entry_set_ellipsize@Base 1:3.8.6 | ||
311 | 15 | cc_editable_entry_set_max_width_chars@Base 1:3.8.6 | ||
312 | 11 | cc_editable_entry_set_scale@Base 1:3.1.3 | 16 | cc_editable_entry_set_scale@Base 1:3.1.3 |
313 | 12 | cc_editable_entry_set_selectable@Base 1:3.1.4 | 17 | cc_editable_entry_set_selectable@Base 1:3.1.4 |
314 | 13 | cc_editable_entry_set_text@Base 1:3.1.3 | 18 | cc_editable_entry_set_text@Base 1:3.1.3 |
315 | 14 | cc_editable_entry_set_weight@Base 1:3.1.3 | 19 | cc_editable_entry_set_weight@Base 1:3.1.3 |
316 | 20 | cc_editable_entry_set_width_chars@Base 1:3.8.6 | ||
317 | 15 | cc_panel_get_help_uri@Base 1:3.5.2 | 21 | cc_panel_get_help_uri@Base 1:3.5.2 |
318 | 16 | cc_panel_get_permission@Base 1:3.1.3 | 22 | cc_panel_get_permission@Base 1:3.1.3 |
319 | 17 | cc_panel_get_shell@Base 1:2.91.2 | 23 | cc_panel_get_shell@Base 1:2.91.2 |
320 | 18 | 24 | ||
321 | === removed file 'debian/patches/0001-online-accounts-use-the-async-function-to-get-all-th.patch' | |||
322 | --- debian/patches/0001-online-accounts-use-the-async-function-to-get-all-th.patch 2013-12-06 14:51:08 +0000 | |||
323 | +++ debian/patches/0001-online-accounts-use-the-async-function-to-get-all-th.patch 1970-01-01 00:00:00 +0000 | |||
324 | @@ -1,86 +0,0 @@ | |||
325 | 1 | From 82e6777cb1a32edb9c85b85c0c3768f9ca62c4c2 Mon Sep 17 00:00:00 2001 | ||
326 | 2 | From: Marco Barisione <marco.barisione@collabora.co.uk> | ||
327 | 3 | Date: Wed, 21 Aug 2013 11:48:25 +0100 | ||
328 | 4 | Subject: [PATCH] online-accounts: use the async function to get all the | ||
329 | 5 | providers | ||
330 | 6 | |||
331 | 7 | https://bugzilla.gnome.org/show_bug.cgi?id=706148 | ||
332 | 8 | --- | ||
333 | 9 | panels/online-accounts/cc-online-accounts-panel.c | 49 ++++++++++++++++++----- | ||
334 | 10 | 1 file changed, 40 insertions(+), 9 deletions(-) | ||
335 | 11 | |||
336 | 12 | Index: b/panels/online-accounts/cc-online-accounts-panel.c | ||
337 | 13 | =================================================================== | ||
338 | 14 | --- a/panels/online-accounts/cc-online-accounts-panel.c | ||
339 | 15 | +++ b/panels/online-accounts/cc-online-accounts-panel.c | ||
340 | 16 | @@ -596,9 +596,17 @@ | ||
341 | 17 | |||
342 | 18 | /* ---------------------------------------------------------------------------------------------------- */ | ||
343 | 19 | |||
344 | 20 | +typedef struct | ||
345 | 21 | +{ | ||
346 | 22 | + GoaPanel *panel; | ||
347 | 23 | +} AddAccountData; | ||
348 | 24 | + | ||
349 | 25 | static void | ||
350 | 26 | -add_account (GoaPanel *panel) | ||
351 | 27 | +get_all_providers_cb (GObject *source, | ||
352 | 28 | + GAsyncResult *res, | ||
353 | 29 | + gpointer user_data) | ||
354 | 30 | { | ||
355 | 31 | + AddAccountData *data = user_data; | ||
356 | 32 | GtkWindow *parent; | ||
357 | 33 | GtkWidget *dialog; | ||
358 | 34 | gint response; | ||
359 | 35 | @@ -609,12 +617,15 @@ | ||
360 | 36 | |||
361 | 37 | providers = NULL; | ||
362 | 38 | |||
363 | 39 | - parent = GTK_WINDOW (cc_shell_get_toplevel (cc_panel_get_shell (CC_PANEL (panel)))); | ||
364 | 40 | + providers = NULL; | ||
365 | 41 | + if (!goa_provider_get_all_finish (&providers, res, NULL)) | ||
366 | 42 | + goto out; | ||
367 | 43 | + | ||
368 | 44 | + parent = GTK_WINDOW (cc_shell_get_toplevel (cc_panel_get_shell (CC_PANEL (data->panel)))); | ||
369 | 45 | |||
370 | 46 | - dialog = goa_panel_add_account_dialog_new (panel->client); | ||
371 | 47 | + dialog = goa_panel_add_account_dialog_new (data->panel->client); | ||
372 | 48 | gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); | ||
373 | 49 | |||
374 | 50 | - providers = goa_provider_get_all (); | ||
375 | 51 | for (l = providers; l != NULL; l = l->next) | ||
376 | 52 | { | ||
377 | 53 | GoaProvider *provider; | ||
378 | 54 | @@ -643,11 +654,11 @@ | ||
379 | 55 | { | ||
380 | 56 | GtkTreeIter iter; | ||
381 | 57 | /* navigate to newly created object */ | ||
382 | 58 | - if (goa_panel_accounts_model_get_iter_for_object (panel->accounts_model, | ||
383 | 59 | + if (goa_panel_accounts_model_get_iter_for_object (data->panel->accounts_model, | ||
384 | 60 | object, | ||
385 | 61 | &iter)) | ||
386 | 62 | { | ||
387 | 63 | - gtk_tree_selection_select_iter (gtk_tree_view_get_selection (GTK_TREE_VIEW (panel->accounts_treeview)), | ||
388 | 64 | + gtk_tree_selection_select_iter (gtk_tree_view_get_selection (GTK_TREE_VIEW (data->panel->accounts_treeview)), | ||
389 | 65 | &iter); | ||
390 | 66 | } | ||
391 | 67 | g_object_unref (object); | ||
392 | 68 | @@ -675,6 +686,18 @@ | ||
393 | 69 | out: | ||
394 | 70 | g_list_foreach (providers, (GFunc) g_object_unref, NULL); | ||
395 | 71 | g_list_free (providers); | ||
396 | 72 | + g_clear_object (&data->panel); | ||
397 | 73 | + g_slice_free (AddAccountData, data); | ||
398 | 74 | +} | ||
399 | 75 | + | ||
400 | 76 | +static void | ||
401 | 77 | +add_account (GoaPanel *panel) | ||
402 | 78 | +{ | ||
403 | 79 | + AddAccountData *data; | ||
404 | 80 | + | ||
405 | 81 | + data = g_slice_new0 (AddAccountData); | ||
406 | 82 | + data->panel = g_object_ref_sink (panel); | ||
407 | 83 | + goa_provider_get_all (get_all_providers_cb, data); | ||
408 | 84 | } | ||
409 | 85 | |||
410 | 86 | /* ---------------------------------------------------------------------------------------------------- */ | ||
411 | 87 | 0 | ||
412 | === removed file 'debian/patches/0001-rfkill-glib-Don-t-use-g_assert_not_reached-in-type_t.patch' | |||
413 | --- debian/patches/0001-rfkill-glib-Don-t-use-g_assert_not_reached-in-type_t.patch 2013-10-23 17:02:34 +0000 | |||
414 | +++ debian/patches/0001-rfkill-glib-Don-t-use-g_assert_not_reached-in-type_t.patch 1970-01-01 00:00:00 +0000 | |||
415 | @@ -1,27 +0,0 @@ | |||
416 | 1 | From 90f49a4d5dd646b8fce10f61a9231db4973a907b Mon Sep 17 00:00:00 2001 | ||
417 | 2 | From: Adel Gadllah <adel.gadllah@gmail.com> | ||
418 | 3 | Date: Thu, 16 May 2013 15:41:17 +0200 | ||
419 | 4 | Subject: [PATCH] rfkill-glib: Don't use g_assert_not_reached in type_to_string | ||
420 | 5 | |||
421 | 6 | New kernel versions can add new RFKILL types, we should now crash here, | ||
422 | 7 | just say that we don't know what the switch is. | ||
423 | 8 | --- | ||
424 | 9 | panels/network/rfkill-glib.c | 2 +- | ||
425 | 10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
426 | 11 | |||
427 | 12 | diff --git a/panels/network/rfkill-glib.c b/panels/network/rfkill-glib.c | ||
428 | 13 | index e27ca40..7c9ee3c 100644 | ||
429 | 14 | --- a/panels/network/rfkill-glib.c | ||
430 | 15 | +++ b/panels/network/rfkill-glib.c | ||
431 | 16 | @@ -80,7 +80,7 @@ type_to_string (unsigned int type) | ||
432 | 17 | case RFKILL_TYPE_WWAN: | ||
433 | 18 | return "WWAN"; | ||
434 | 19 | default: | ||
435 | 20 | - g_assert_not_reached (); | ||
436 | 21 | + return "UNKNOWN"; | ||
437 | 22 | } | ||
438 | 23 | } | ||
439 | 24 | |||
440 | 25 | -- | ||
441 | 26 | 1.8.3.2 | ||
442 | 27 | |||
443 | 28 | 0 | ||
444 | === added file 'debian/patches/02_new_goa.patch' | |||
445 | --- debian/patches/02_new_goa.patch 1970-01-01 00:00:00 +0000 | |||
446 | +++ debian/patches/02_new_goa.patch 2014-05-06 09:05:46 +0000 | |||
447 | @@ -0,0 +1,46 @@ | |||
448 | 1 | Index: gnome-control-center-3.8.6/panels/online-accounts/cc-online-accounts-panel.c | ||
449 | 2 | =================================================================== | ||
450 | 3 | --- gnome-control-center-3.8.6.orig/panels/online-accounts/cc-online-accounts-panel.c 2013-12-12 14:00:10.759923318 +1300 | ||
451 | 4 | +++ gnome-control-center-3.8.6/panels/online-accounts/cc-online-accounts-panel.c 2013-12-12 14:00:10.755923318 +1300 | ||
452 | 5 | @@ -617,8 +617,11 @@ | ||
453 | 6 | /* ---------------------------------------------------------------------------------------------------- */ | ||
454 | 7 | |||
455 | 8 | static void | ||
456 | 9 | -add_account (CcGoaPanel *panel) | ||
457 | 10 | +get_all_providers_cb (GObject *source, | ||
458 | 11 | + GAsyncResult *res, | ||
459 | 12 | + gpointer user_data) | ||
460 | 13 | { | ||
461 | 14 | + CcGoaPanel *panel = CC_GOA_PANEL (user_data); | ||
462 | 15 | GtkWindow *parent; | ||
463 | 16 | GtkWidget *dialog; | ||
464 | 17 | gint response; | ||
465 | 18 | @@ -629,12 +632,14 @@ | ||
466 | 19 | |||
467 | 20 | providers = NULL; | ||
468 | 21 | |||
469 | 22 | + if (!goa_provider_get_all_finish (&providers, res, NULL)) | ||
470 | 23 | + goto out; | ||
471 | 24 | + | ||
472 | 25 | parent = GTK_WINDOW (cc_shell_get_toplevel (cc_panel_get_shell (CC_PANEL (panel)))); | ||
473 | 26 | |||
474 | 27 | dialog = goa_panel_add_account_dialog_new (panel->client); | ||
475 | 28 | gtk_window_set_transient_for (GTK_WINDOW (dialog), parent); | ||
476 | 29 | |||
477 | 30 | - providers = goa_provider_get_all (); | ||
478 | 31 | for (l = providers; l != NULL; l = l->next) | ||
479 | 32 | { | ||
480 | 33 | GoaProvider *provider; | ||
481 | 34 | @@ -697,6 +703,12 @@ | ||
482 | 35 | g_list_free (providers); | ||
483 | 36 | } | ||
484 | 37 | |||
485 | 38 | +static void | ||
486 | 39 | +add_account (CcGoaPanel *panel) | ||
487 | 40 | +{ | ||
488 | 41 | + goa_provider_get_all (get_all_providers_cb, panel); | ||
489 | 42 | +} | ||
490 | 43 | + | ||
491 | 44 | /* ---------------------------------------------------------------------------------------------------- */ | ||
492 | 45 | |||
493 | 46 | static void | ||
494 | 0 | 47 | ||
495 | === removed file 'debian/patches/05_run_update_manager.patch' | |||
496 | --- debian/patches/05_run_update_manager.patch 2013-07-05 13:31:20 +0000 | |||
497 | +++ debian/patches/05_run_update_manager.patch 1970-01-01 00:00:00 +0000 | |||
498 | @@ -1,13 +0,0 @@ | |||
499 | 1 | Index: b/panels/info/cc-info-panel.c | ||
500 | 2 | =================================================================== | ||
501 | 3 | --- a/panels/info/cc-info-panel.c | ||
502 | 4 | +++ b/panels/info/cc-info-panel.c | ||
503 | 5 | @@ -1900,7 +1900,7 @@ | ||
504 | 6 | { | ||
505 | 7 | GError *error; | ||
506 | 8 | error = NULL; | ||
507 | 9 | - g_spawn_command_line_async ("gpk-update-viewer", &error); | ||
508 | 10 | + g_spawn_command_line_async ("update-manager", &error); | ||
509 | 11 | if (error != NULL) | ||
510 | 12 | { | ||
511 | 13 | g_warning ("unable to launch Software Updates: %s", error->message); | ||
512 | 14 | 0 | ||
513 | === removed file 'debian/patches/06_handle_passwd_with_ldap.patch' | |||
514 | --- debian/patches/06_handle_passwd_with_ldap.patch 2013-07-05 13:31:20 +0000 | |||
515 | +++ debian/patches/06_handle_passwd_with_ldap.patch 1970-01-01 00:00:00 +0000 | |||
516 | @@ -1,19 +0,0 @@ | |||
517 | 1 | Description: Handle the case where passwd re-asks for the current password when it was entered incorrectly (when using LDAP) | ||
518 | 2 | Based on a patch from Ryan Tandy | ||
519 | 3 | Author: Chris Coulson <chris.coulson@canonical.com> | ||
520 | 4 | Bug-Ubuntu: https:/launchpad.net/bugs/607357 | ||
521 | 5 | Forwarded: no | ||
522 | 6 | |||
523 | 7 | Index: b/panels/user-accounts/run-passwd.c | ||
524 | 8 | =================================================================== | ||
525 | 9 | --- a/panels/user-accounts/run-passwd.c | ||
526 | 10 | +++ b/panels/user-accounts/run-passwd.c | ||
527 | 11 | @@ -408,7 +408,7 @@ | ||
528 | 12 | |||
529 | 13 | if (is_string_complete (str->str, "assword: ", "failure", "wrong", "error", NULL)) { | ||
530 | 14 | |||
531 | 15 | - if (strstr (str->str, "assword: ") != NULL) { | ||
532 | 16 | + if (strstr (str->str, "assword: ") != NULL && strstr (str->str, "incorrect") == NULL) { | ||
533 | 17 | /* Authentication successful */ | ||
534 | 18 | |||
535 | 19 | passwd_handler->backend_state = PASSWD_STATE_NEW; | ||
536 | 20 | 0 | ||
537 | === removed file 'debian/patches/11_power-configure_lid_action.patch' | |||
538 | --- debian/patches/11_power-configure_lid_action.patch 2013-09-09 14:28:59 +0000 | |||
539 | +++ debian/patches/11_power-configure_lid_action.patch 1970-01-01 00:00:00 +0000 | |||
540 | @@ -1,149 +0,0 @@ | |||
541 | 1 | Subject: [PATCH] power: Add configuration for lid action | ||
542 | 2 | Bug: https://bugzilla.gnome.org/show_bug.cgi?id=659045 | ||
543 | 3 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/792636 | ||
544 | 4 | --- a/panels/power/cc-power-panel.c | ||
545 | 5 | +++ b/panels/power/cc-power-panel.c | ||
546 | 6 | @@ -932,6 +932,7 @@ | ||
547 | 7 | set_ac_battery_ui_mode (CcPowerPanel *self) | ||
548 | 8 | { | ||
549 | 9 | gboolean has_batteries = FALSE; | ||
550 | 10 | + gboolean has_lid = FALSE; | ||
551 | 11 | gboolean ret; | ||
552 | 12 | GError *error = NULL; | ||
553 | 13 | GPtrArray *devices; | ||
554 | 14 | @@ -964,7 +965,13 @@ | ||
555 | 15 | } | ||
556 | 16 | } | ||
557 | 17 | g_ptr_array_unref (devices); | ||
558 | 18 | + | ||
559 | 19 | + has_lid = up_client_get_lid_is_present (self->priv->up_client); | ||
560 | 20 | + | ||
561 | 21 | out: | ||
562 | 22 | + gtk_widget_set_visible (WID (priv->builder, "combobox_lid_ac"), has_lid); | ||
563 | 23 | + gtk_widget_set_visible (WID (priv->builder, "label_lid_action"), has_lid); | ||
564 | 24 | + gtk_widget_set_visible (WID (priv->builder, "combobox_lid_battery"), has_batteries && has_lid); | ||
565 | 25 | gtk_widget_set_visible (WID (priv->builder, "label_header_battery"), has_batteries); | ||
566 | 26 | gtk_widget_set_visible (WID (priv->builder, "label_header_ac"), has_batteries); | ||
567 | 27 | gtk_widget_set_visible (WID (priv->builder, "combobox_sleep_battery"), has_batteries); | ||
568 | 28 | @@ -1080,6 +1087,26 @@ | ||
569 | 29 | G_CALLBACK (activate_link_cb), | ||
570 | 30 | self); | ||
571 | 31 | |||
572 | 32 | + value = g_settings_get_enum (self->priv->gsd_settings, "lid-close-ac-action"); | ||
573 | 33 | + widget = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, | ||
574 | 34 | + "combobox_lid_ac")); | ||
575 | 35 | + disable_unavailable_combo_items (self, GTK_COMBO_BOX (widget)); | ||
576 | 36 | + set_value_for_combo (GTK_COMBO_BOX (widget), value); | ||
577 | 37 | + g_object_set_data (G_OBJECT(widget), "_gsettings_key", "lid-close-ac-action"); | ||
578 | 38 | + g_signal_connect (widget, "changed", | ||
579 | 39 | + G_CALLBACK (combo_enum_changed_cb), | ||
580 | 40 | + self); | ||
581 | 41 | + | ||
582 | 42 | + value = g_settings_get_enum (self->priv->gsd_settings, "lid-close-battery-action"); | ||
583 | 43 | + widget = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, | ||
584 | 44 | + "combobox_lid_battery")); | ||
585 | 45 | + disable_unavailable_combo_items (self, GTK_COMBO_BOX (widget)); | ||
586 | 46 | + set_value_for_combo (GTK_COMBO_BOX (widget), value); | ||
587 | 47 | + g_object_set_data (G_OBJECT(widget), "_gsettings_key", "lid-close-battery-action"); | ||
588 | 48 | + g_signal_connect (widget, "changed", | ||
589 | 49 | + G_CALLBACK (combo_enum_changed_cb), | ||
590 | 50 | + self); | ||
591 | 51 | + | ||
592 | 52 | widget = WID (self->priv->builder, "vbox_power"); | ||
593 | 53 | gtk_widget_reparent (widget, (GtkWidget *) self); | ||
594 | 54 | } | ||
595 | 55 | --- a/panels/power/power.ui | ||
596 | 56 | +++ b/panels/power/power.ui | ||
597 | 57 | @@ -53,6 +53,28 @@ | ||
598 | 58 | </row> | ||
599 | 59 | </data> | ||
600 | 60 | </object> | ||
601 | 61 | + <object class="GtkListStore" id="liststore_lid"> | ||
602 | 62 | + <columns> | ||
603 | 63 | + <!-- column-name name --> | ||
604 | 64 | + <column type="gchararray"/> | ||
605 | 65 | + <!-- column-name value --> | ||
606 | 66 | + <column type="gint"/> | ||
607 | 67 | + <!-- column-name sensitive --> | ||
608 | 68 | + <column type="gboolean"/> | ||
609 | 69 | + </columns> | ||
610 | 70 | + <data> | ||
611 | 71 | + <row> | ||
612 | 72 | + <col id="0" translatable="yes">Suspend</col> | ||
613 | 73 | + <col id="1">1</col> | ||
614 | 74 | + <col id="2">True</col> | ||
615 | 75 | + </row> | ||
616 | 76 | + <row> | ||
617 | 77 | + <col id="0" translatable="yes">Do nothing</col> | ||
618 | 78 | + <col id="1">5</col> | ||
619 | 79 | + <col id="2">True</col> | ||
620 | 80 | + </row> | ||
621 | 81 | + </data> | ||
622 | 82 | + </object> | ||
623 | 83 | <object class="GtkWindow" id="window_power"> | ||
624 | 84 | <property name="can_focus">False</property> | ||
625 | 85 | <property name="resizable">False</property> | ||
626 | 86 | @@ -172,6 +194,50 @@ | ||
627 | 87 | <property name="top_attach">2</property> | ||
628 | 88 | </packing> | ||
629 | 89 | </child> | ||
630 | 90 | + <child> | ||
631 | 91 | + <object class="GtkLabel" id="label_lid_action"> | ||
632 | 92 | + <property name="visible">True</property> | ||
633 | 93 | + <property name="can_focus">False</property> | ||
634 | 94 | + <property name="halign">end</property> | ||
635 | 95 | + <property name="label" translatable="yes">When the lid is closed</property> | ||
636 | 96 | + </object> | ||
637 | 97 | + <packing> | ||
638 | 98 | + <property name="left_attach">0</property> | ||
639 | 99 | + <property name="top_attach">3</property> | ||
640 | 100 | + </packing> | ||
641 | 101 | + </child> | ||
642 | 102 | + <child> | ||
643 | 103 | + <object class="GtkComboBox" id="combobox_lid_battery"> | ||
644 | 104 | + <property name="visible">True</property> | ||
645 | 105 | + <property name="can_focus">False</property> | ||
646 | 106 | + <property name="model">liststore_lid</property> | ||
647 | 107 | + <property name="hexpand">True</property> | ||
648 | 108 | + <accessibility> | ||
649 | 109 | + <relation type="labelled-by" target="label_header_battery"/> | ||
650 | 110 | + <relation type="labelled-by" target="label_lid_action"/> | ||
651 | 111 | + </accessibility> | ||
652 | 112 | + </object> | ||
653 | 113 | + <packing> | ||
654 | 114 | + <property name="left_attach">1</property> | ||
655 | 115 | + <property name="top_attach">3</property> | ||
656 | 116 | + </packing> | ||
657 | 117 | + </child> | ||
658 | 118 | + <child> | ||
659 | 119 | + <object class="GtkComboBox" id="combobox_lid_ac"> | ||
660 | 120 | + <property name="visible">True</property> | ||
661 | 121 | + <property name="can_focus">False</property> | ||
662 | 122 | + <property name="model">liststore_lid</property> | ||
663 | 123 | + <property name="hexpand">True</property> | ||
664 | 124 | + <accessibility> | ||
665 | 125 | + <relation type="labelled-by" target="label_header_ac"/> | ||
666 | 126 | + <relation type="labelled-by" target="label_lid_action"/> | ||
667 | 127 | + </accessibility> | ||
668 | 128 | + </object> | ||
669 | 129 | + <packing> | ||
670 | 130 | + <property name="left_attach">2</property> | ||
671 | 131 | + <property name="top_attach">3</property> | ||
672 | 132 | + </packing> | ||
673 | 133 | + </child> | ||
674 | 134 | </object> | ||
675 | 135 | <packing> | ||
676 | 136 | <property name="expand">False</property> | ||
677 | 137 | @@ -352,9 +418,12 @@ | ||
678 | 138 | </object> | ||
679 | 139 | <object class="GtkSizeGroup" id="sizegroup_combos"> | ||
680 | 140 | <widgets> | ||
681 | 141 | + <widget name="combobox_lid_battery"/> | ||
682 | 142 | + <widget name="combobox_lid_ac"/> | ||
683 | 143 | <widget name="combobox_critical"/> | ||
684 | 144 | <widget name="combobox_sleep_battery"/> | ||
685 | 145 | <widget name="combobox_sleep_ac"/> | ||
686 | 146 | + <widget name="combobox_sleep_ac"/> | ||
687 | 147 | </widgets> | ||
688 | 148 | </object> | ||
689 | 149 | </interface> | ||
690 | 150 | 0 | ||
691 | === removed file 'debian/patches/12_add_never_turn_screen_off.patch' | |||
692 | --- debian/patches/12_add_never_turn_screen_off.patch 2013-07-05 13:31:20 +0000 | |||
693 | +++ debian/patches/12_add_never_turn_screen_off.patch 1970-01-01 00:00:00 +0000 | |||
694 | @@ -1,29 +0,0 @@ | |||
695 | 1 | Index: b/panels/screen/cc-screen-panel.c | ||
696 | 2 | =================================================================== | ||
697 | 3 | --- a/panels/screen/cc-screen-panel.c | ||
698 | 4 | +++ b/panels/screen/cc-screen-panel.c | ||
699 | 5 | @@ -402,8 +402,7 @@ | ||
700 | 6 | gtk_tree_model_get (model, &iter, | ||
701 | 7 | 1, &value_tmp, | ||
702 | 8 | -1); | ||
703 | 9 | - if (value == value_tmp || | ||
704 | 10 | - (value_tmp > value_prev && value < value_tmp)) | ||
705 | 11 | + if (value == value_tmp) | ||
706 | 12 | { | ||
707 | 13 | gtk_combo_box_set_active_iter (combo_box, &iter); | ||
708 | 14 | return; | ||
709 | 15 | Index: b/panels/screen/screen.ui | ||
710 | 16 | =================================================================== | ||
711 | 17 | --- a/panels/screen/screen.ui | ||
712 | 18 | +++ b/panels/screen/screen.ui | ||
713 | 19 | @@ -84,6 +84,10 @@ | ||
714 | 20 | <col id="0" translatable="yes">1 hour</col> | ||
715 | 21 | <col id="1">3600</col> | ||
716 | 22 | </row> | ||
717 | 23 | + <row> | ||
718 | 24 | + <col id="0" translatable="yes">Never</col> | ||
719 | 25 | + <col id="1">0</col> | ||
720 | 26 | + </row> | ||
721 | 27 | </data> | ||
722 | 28 | </object> | ||
723 | 29 | <object class="GtkWindow" id="window1"> | ||
724 | 30 | 0 | ||
725 | === removed file 'debian/patches/51_unity_options_in_display_panel.patch' | |||
726 | --- debian/patches/51_unity_options_in_display_panel.patch 2013-07-05 13:31:20 +0000 | |||
727 | +++ debian/patches/51_unity_options_in_display_panel.patch 1970-01-01 00:00:00 +0000 | |||
728 | @@ -1,592 +0,0 @@ | |||
729 | 1 | Index: gnome-control-center-3.4.2/panels/display/cc-display-panel.c | ||
730 | 2 | =================================================================== | ||
731 | 3 | --- gnome-control-center-3.4.2.orig/panels/display/cc-display-panel.c 2012-05-15 12:18:30.000000000 +0200 | ||
732 | 4 | +++ gnome-control-center-3.4.2/panels/display/cc-display-panel.c 2012-07-23 10:26:57.281976435 +0200 | ||
733 | 5 | @@ -54,6 +54,13 @@ | ||
734 | 6 | #define MINIMUM_WIDTH 675 | ||
735 | 7 | #define MINIMUM_HEIGHT 530 | ||
736 | 8 | |||
737 | 9 | +#define UNITY_GSETTINGS_SCHEMA "org.compiz.unityshell" | ||
738 | 10 | +#define UNITY_GSETTINGS_PATH "/org/compiz/profiles/unity/plugins/unityshell/" | ||
739 | 11 | +#define UNITY_LAUNCHER_ALL_MONITORS_KEY "num-launchers" | ||
740 | 12 | +#define UNITY_STICKY_EDGE_KEY "launcher-capture-mouse" | ||
741 | 13 | +#define UNITY2D_GSETTINGS_MAIN "com.canonical.Unity2d" | ||
742 | 14 | +#define UNITY2D_GSETTINGS_LAUNCHER "com.canonical.Unity2d.Launcher" | ||
743 | 15 | + | ||
744 | 16 | enum { | ||
745 | 17 | TEXT_COL, | ||
746 | 18 | WIDTH_COL, | ||
747 | 19 | @@ -72,6 +79,9 @@ | ||
748 | 20 | GnomeRROutputInfo *current_output; | ||
749 | 21 | |||
750 | 22 | GSettings *clock_settings; | ||
751 | 23 | + GSettings *unity_settings; | ||
752 | 24 | + GSettings *unity2d_settings_main; | ||
753 | 25 | + GSettings *unity2d_settings_launcher; | ||
754 | 26 | GtkBuilder *builder; | ||
755 | 27 | guint focus_id; | ||
756 | 28 | |||
757 | 29 | @@ -119,6 +129,8 @@ | ||
758 | 30 | guint n_properties, | ||
759 | 31 | GObjectConstructParam *properties); | ||
760 | 32 | static void on_screen_changed (GnomeRRScreen *scr, gpointer data); | ||
761 | 33 | +static void refresh_unity_launcher_placement (CcDisplayPanel *self); | ||
762 | 34 | +static gboolean unity_launcher_on_all_monitors (GSettings *settings); | ||
763 | 35 | |||
764 | 36 | static void | ||
765 | 37 | cc_display_panel_get_property (GObject *object, | ||
766 | 38 | @@ -168,6 +180,13 @@ | ||
767 | 39 | if (self->priv->clock_settings != NULL) | ||
768 | 40 | g_object_unref (self->priv->clock_settings); | ||
769 | 41 | |||
770 | 42 | + if (self->priv->unity2d_settings_main != NULL) | ||
771 | 43 | + g_object_unref (self->priv->unity2d_settings_main); | ||
772 | 44 | + if (self->priv->unity2d_settings_launcher != NULL) | ||
773 | 45 | + g_object_unref (self->priv->unity2d_settings_launcher); | ||
774 | 46 | + if (self->priv->unity_settings != NULL) | ||
775 | 47 | + g_object_unref (self->priv->unity_settings); | ||
776 | 48 | + | ||
777 | 49 | shell = cc_panel_get_shell (CC_PANEL (self)); | ||
778 | 50 | if (shell != NULL) | ||
779 | 51 | { | ||
780 | 52 | @@ -223,6 +242,12 @@ | ||
781 | 53 | } | ||
782 | 54 | |||
783 | 55 | static gboolean | ||
784 | 56 | +is_unity_session (void) | ||
785 | 57 | +{ | ||
786 | 58 | + return (g_strcmp0 (g_getenv("XDG_CURRENT_DESKTOP"), "Unity") == 0); | ||
787 | 59 | +} | ||
788 | 60 | + | ||
789 | 61 | +static gboolean | ||
790 | 62 | should_show_resolution (gint output_width, | ||
791 | 63 | gint output_height, | ||
792 | 64 | gint width, | ||
793 | 65 | @@ -262,6 +287,9 @@ | ||
794 | 66 | gnome_rr_labeler_show (self->priv->labeler); | ||
795 | 67 | |||
796 | 68 | select_current_output_from_dialog_position (self); | ||
797 | 69 | + | ||
798 | 70 | + if (is_unity_session ()) | ||
799 | 71 | + refresh_unity_launcher_placement (self); | ||
800 | 72 | } | ||
801 | 73 | |||
802 | 74 | static void | ||
803 | 75 | @@ -599,6 +627,10 @@ | ||
804 | 76 | gtk_widget_set_sensitive (self->priv->clone_checkbox, mirror_is_supported); | ||
805 | 77 | gtk_widget_set_sensitive (self->priv->clone_label, mirror_is_supported); | ||
806 | 78 | |||
807 | 79 | + /* set inactive the launcher placement choice */ | ||
808 | 80 | + gtk_widget_set_sensitive (WID ("launcher_placement_combo"), !mirror_is_active); | ||
809 | 81 | + gtk_widget_set_sensitive (WID ("stickyedge_switch"), !mirror_is_active); | ||
810 | 82 | + | ||
811 | 83 | g_signal_handlers_unblock_by_func (self->priv->clone_checkbox, G_CALLBACK (on_clone_changed), self); | ||
812 | 84 | } | ||
813 | 85 | |||
814 | 86 | @@ -838,6 +870,7 @@ | ||
815 | 87 | rebuild_on_off_radios (self); | ||
816 | 88 | rebuild_resolution_combo (self); | ||
817 | 89 | rebuild_rotation_combo (self); | ||
818 | 90 | + refresh_unity_launcher_placement (self); | ||
819 | 91 | |||
820 | 92 | self->priv->ignore_gui_changes = FALSE; | ||
821 | 93 | } | ||
822 | 94 | @@ -1722,6 +1755,10 @@ | ||
823 | 95 | outputs = gnome_rr_config_get_outputs (self->priv->current_configuration); | ||
824 | 96 | for (i = 0; outputs[i] != NULL; ++i) | ||
825 | 97 | gnome_rr_output_info_set_primary (outputs[i], outputs[i] == output); | ||
826 | 98 | + | ||
827 | 99 | + gtk_widget_queue_draw (WID ("self->priv->area")); | ||
828 | 100 | + /* refresh the combobox */ | ||
829 | 101 | + refresh_unity_launcher_placement (self); | ||
830 | 102 | } | ||
831 | 103 | |||
832 | 104 | static void | ||
833 | 105 | @@ -2073,7 +2110,30 @@ | ||
834 | 106 | g_object_unref (layout); | ||
835 | 107 | cairo_restore (cr); | ||
836 | 108 | |||
837 | 109 | - if (gnome_rr_output_info_get_primary (output)) | ||
838 | 110 | + /* Only display a launcher on all or primary monitor */ | ||
839 | 111 | + if (is_unity_session ()) | ||
840 | 112 | + { | ||
841 | 113 | + if (gnome_rr_output_info_is_active (output) && (unity_launcher_on_all_monitors (self->priv->unity_settings) || gnome_rr_output_info_get_primary (output))) | ||
842 | 114 | + { | ||
843 | 115 | + cairo_rectangle (cr, x, y, 10, h * scale + 0.5); | ||
844 | 116 | + cairo_set_source_rgb (cr, 0, 0, 0); | ||
845 | 117 | + foo_scroll_area_add_input_from_fill (FOO_SCROLL_AREA (self->priv->area), | ||
846 | 118 | + cr, | ||
847 | 119 | + (FooScrollAreaEventFunc) on_top_bar_event, | ||
848 | 120 | + self); | ||
849 | 121 | + cairo_fill (cr); | ||
850 | 122 | + | ||
851 | 123 | + cairo_set_source_rgb (cr, 0.25, 0.25, 0.25); | ||
852 | 124 | + cairo_rectangle (cr, x + 1, y + 6, 8, 8); | ||
853 | 125 | + cairo_rectangle (cr, x + 1, y + 16, 8, 8); | ||
854 | 126 | + cairo_rectangle (cr, x + 1, y + 26, 8, 8); | ||
855 | 127 | + cairo_rectangle (cr, x + 1, y + 36, 8, 8); | ||
856 | 128 | + cairo_rectangle (cr, x + 1, y + h * scale + 0.5 - 10, 8, 8); | ||
857 | 129 | + cairo_fill (cr); | ||
858 | 130 | + } | ||
859 | 131 | + } | ||
860 | 132 | + | ||
861 | 133 | + if (gnome_rr_output_info_get_primary (output) && !is_unity_session ()) | ||
862 | 134 | { | ||
863 | 135 | const char *clock_format; | ||
864 | 136 | char *text; | ||
865 | 137 | @@ -2556,6 +2616,233 @@ | ||
866 | 138 | } | ||
867 | 139 | |||
868 | 140 | static void | ||
869 | 141 | +stickyedge_widget_refresh (GtkSwitch *switcher, GSettings *settings) | ||
870 | 142 | +{ | ||
871 | 143 | + gboolean stickyedge_enabled = g_settings_get_boolean (settings, UNITY_STICKY_EDGE_KEY); | ||
872 | 144 | + | ||
873 | 145 | + gtk_switch_set_active (switcher, stickyedge_enabled); | ||
874 | 146 | +} | ||
875 | 147 | + | ||
876 | 148 | +static void | ||
877 | 149 | +ext_stickyedge_changed_callback (GSettings* settings, | ||
878 | 150 | + guint key, | ||
879 | 151 | + gpointer user_data) | ||
880 | 152 | +{ | ||
881 | 153 | + stickyedge_widget_refresh (GTK_SWITCH (user_data), settings); | ||
882 | 154 | +} | ||
883 | 155 | + | ||
884 | 156 | +static void | ||
885 | 157 | +on_stickyedge_changed (GtkSwitch *switcher, GParamSpec *pspec, gpointer user_data) | ||
886 | 158 | +{ | ||
887 | 159 | + CcDisplayPanel *self = CC_DISPLAY_PANEL (user_data); | ||
888 | 160 | + gboolean enabled = gtk_switch_get_active (GTK_SWITCH (switcher)); | ||
889 | 161 | + | ||
890 | 162 | + /* 3d */ | ||
891 | 163 | + g_settings_set_boolean (self->priv->unity_settings, UNITY_STICKY_EDGE_KEY, enabled); | ||
892 | 164 | + /* 2d */ | ||
893 | 165 | + if (self->priv->unity2d_settings_main) | ||
894 | 166 | + g_settings_set_boolean (self->priv->unity2d_settings_main, "sticky-edges", enabled); | ||
895 | 167 | +} | ||
896 | 168 | + | ||
897 | 169 | +static gboolean | ||
898 | 170 | +unity_launcher_on_all_monitors (GSettings *settings) | ||
899 | 171 | +{ | ||
900 | 172 | + gint value = g_settings_get_int (settings, UNITY_LAUNCHER_ALL_MONITORS_KEY); | ||
901 | 173 | + return (value == 0); | ||
902 | 174 | +} | ||
903 | 175 | + | ||
904 | 176 | +static GdkPixbuf* | ||
905 | 177 | +get_monitor_pixbuf (CcDisplayPanel *self, GnomeRROutputInfo *output) | ||
906 | 178 | +{ | ||
907 | 179 | + GdkRGBA color; | ||
908 | 180 | + cairo_surface_t *cairo_surface; | ||
909 | 181 | + cairo_t *cr; | ||
910 | 182 | + int monitor_width = 30; | ||
911 | 183 | + int monitor_height = 15; | ||
912 | 184 | + | ||
913 | 185 | + gnome_rr_labeler_get_rgba_for_output (self->priv->labeler, output, &color); | ||
914 | 186 | + | ||
915 | 187 | + cairo_surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24, monitor_width, monitor_height); | ||
916 | 188 | + cr = cairo_create (cairo_surface); | ||
917 | 189 | + cairo_surface_destroy (cairo_surface); | ||
918 | 190 | + cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); | ||
919 | 191 | + cairo_paint (cr); | ||
920 | 192 | + | ||
921 | 193 | + cairo_set_operator (cr, CAIRO_OPERATOR_OVER); | ||
922 | 194 | + cairo_set_source_rgb (cr, color.red, color.green, color.blue); | ||
923 | 195 | + cairo_rectangle (cr, 0.5, 0.5, monitor_width - 1, monitor_height - 1); | ||
924 | 196 | + cairo_fill (cr); | ||
925 | 197 | + | ||
926 | 198 | + cairo_set_line_width (cr, 1); | ||
927 | 199 | + cairo_set_source_rgba (cr, 0, 0, 0, 1.0); | ||
928 | 200 | + cairo_rectangle (cr, 0.5, 0.5, monitor_width - 1, monitor_height - 1); | ||
929 | 201 | + cairo_stroke (cr); | ||
930 | 202 | + | ||
931 | 203 | + return gdk_pixbuf_get_from_surface (cairo_get_target (cr), 0, 0, monitor_width, monitor_height); | ||
932 | 204 | +} | ||
933 | 205 | + | ||
934 | 206 | +static void | ||
935 | 207 | +refresh_unity_launcher_placement (CcDisplayPanel *self) | ||
936 | 208 | +{ | ||
937 | 209 | + GtkWidget *launcher_placement_combo = WID ("launcher_placement_combo"); | ||
938 | 210 | + GtkListStore *liststore; | ||
939 | 211 | + GtkTreeIter iter; | ||
940 | 212 | + GList *connected_outputs = NULL; | ||
941 | 213 | + GList *list; | ||
942 | 214 | + gboolean launcher_on_all_monitors = unity_launcher_on_all_monitors (self->priv->unity_settings); | ||
943 | 215 | + gint index_of_primary_screen = 0; | ||
944 | 216 | + gint i; | ||
945 | 217 | + | ||
946 | 218 | + liststore = (GtkListStore *) gtk_builder_get_object (self->priv->builder, "available_launcher_placement_store"); | ||
947 | 219 | + gtk_list_store_clear (liststore); | ||
948 | 220 | + | ||
949 | 221 | + connected_outputs = list_connected_outputs (self, NULL, NULL); | ||
950 | 222 | + for (list = connected_outputs, i = 0; list != NULL; list = list->next) | ||
951 | 223 | + { | ||
952 | 224 | + char *monitor_name; | ||
953 | 225 | + GdkPixbuf *monitor_pixbuf; | ||
954 | 226 | + GnomeRROutputInfo *output = list->data; | ||
955 | 227 | + | ||
956 | 228 | + if (!gnome_rr_output_info_is_active (output)) | ||
957 | 229 | + continue; | ||
958 | 230 | + | ||
959 | 231 | + gtk_list_store_append (liststore, &iter); | ||
960 | 232 | + monitor_name = g_strdup (gnome_rr_output_info_get_display_name (output)); | ||
961 | 233 | + monitor_pixbuf = get_monitor_pixbuf (self, output); | ||
962 | 234 | + | ||
963 | 235 | + gtk_list_store_set (liststore, &iter, 0, monitor_pixbuf, 1, monitor_name, -1); | ||
964 | 236 | + | ||
965 | 237 | + /* select it if primary and only one launcher */ | ||
966 | 238 | + if (gnome_rr_output_info_get_primary (output) && (!launcher_on_all_monitors)) | ||
967 | 239 | + index_of_primary_screen = i; | ||
968 | 240 | + i++; | ||
969 | 241 | + | ||
970 | 242 | + g_object_unref (monitor_pixbuf); | ||
971 | 243 | + g_free (monitor_name); | ||
972 | 244 | + } | ||
973 | 245 | + | ||
974 | 246 | + // FIXME: check autosort? | ||
975 | 247 | + gtk_list_store_append (liststore, &iter); | ||
976 | 248 | + gtk_list_store_set (liststore, &iter, 0, NULL, 1, _("All displays"), -1); | ||
977 | 249 | + | ||
978 | 250 | + if (launcher_on_all_monitors) | ||
979 | 251 | + index_of_primary_screen = i; | ||
980 | 252 | + | ||
981 | 253 | + gtk_combo_box_set_active (GTK_COMBO_BOX (launcher_placement_combo), index_of_primary_screen); | ||
982 | 254 | +} | ||
983 | 255 | + | ||
984 | 256 | +static gboolean | ||
985 | 257 | +switcher_set_to_launcher_on_all_monitors (CcDisplayPanel *self) | ||
986 | 258 | +{ | ||
987 | 259 | + GtkComboBox *combo = GTK_COMBO_BOX (WID ("launcher_placement_combo")); | ||
988 | 260 | + gint active = gtk_combo_box_get_active (combo); | ||
989 | 261 | + gint number_items = gtk_tree_model_iter_n_children (gtk_combo_box_get_model (combo), | ||
990 | 262 | + NULL); | ||
991 | 263 | + return (active == number_items - 1); | ||
992 | 264 | +} | ||
993 | 265 | + | ||
994 | 266 | +static void | ||
995 | 267 | +ext_launcher_placement_changed_callback (GSettings* settings, | ||
996 | 268 | + guint key, | ||
997 | 269 | + gpointer user_data) | ||
998 | 270 | +{ | ||
999 | 271 | + // add some crazyness as 2d/3d are not using the same keys | ||
1000 | 272 | + CcDisplayPanel *self = CC_DISPLAY_PANEL (user_data); | ||
1001 | 273 | + gint launcher_unity_value = 0; | ||
1002 | 274 | + | ||
1003 | 275 | + // two options support: all monitors (0)i or just primary desktop (hence set to 1, not any other number) | ||
1004 | 276 | + if (! switcher_set_to_launcher_on_all_monitors (self)) | ||
1005 | 277 | + launcher_unity_value = 1; | ||
1006 | 278 | + | ||
1007 | 279 | + if (g_settings_get_int (settings, UNITY_LAUNCHER_ALL_MONITORS_KEY) != launcher_unity_value) | ||
1008 | 280 | + refresh_unity_launcher_placement (self); | ||
1009 | 281 | +} | ||
1010 | 282 | + | ||
1011 | 283 | +static void | ||
1012 | 284 | +on_launcher_placement_combo_changed (GtkComboBox *combo, CcDisplayPanel *self) | ||
1013 | 285 | +{ | ||
1014 | 286 | + gint active = gtk_combo_box_get_active (combo); | ||
1015 | 287 | + gint i; | ||
1016 | 288 | + gint index_on_combo = 0; | ||
1017 | 289 | + | ||
1018 | 290 | + if (active < 0) | ||
1019 | 291 | + return; | ||
1020 | 292 | + gint value = 0; | ||
1021 | 293 | + gboolean on_all_monitors = switcher_set_to_launcher_on_all_monitors (self); | ||
1022 | 294 | + | ||
1023 | 295 | + if (!on_all_monitors) { | ||
1024 | 296 | + value = 1; | ||
1025 | 297 | + // set the primary output if needed | ||
1026 | 298 | + GnomeRROutputInfo **outputs = gnome_rr_config_get_outputs (self->priv->current_configuration); | ||
1027 | 299 | + | ||
1028 | 300 | + for (i = 0; outputs[i] != NULL; ++i) | ||
1029 | 301 | + { | ||
1030 | 302 | + GnomeRROutputInfo *output = outputs[i]; | ||
1031 | 303 | + if (!gnome_rr_output_info_is_active (output)) | ||
1032 | 304 | + continue; | ||
1033 | 305 | + | ||
1034 | 306 | + if ((active == index_on_combo) && !gnome_rr_output_info_get_primary (output)) | ||
1035 | 307 | + { | ||
1036 | 308 | + set_primary_output (self, output); | ||
1037 | 309 | + break; | ||
1038 | 310 | + } | ||
1039 | 311 | + index_on_combo++; | ||
1040 | 312 | + } | ||
1041 | 313 | + } | ||
1042 | 314 | + | ||
1043 | 315 | + /* 3d */ | ||
1044 | 316 | + if (self->priv->unity_settings) | ||
1045 | 317 | + g_settings_set_int (self->priv->unity_settings, UNITY_LAUNCHER_ALL_MONITORS_KEY, value); | ||
1046 | 318 | + /* 2d */ | ||
1047 | 319 | + if (self->priv->unity2d_settings_launcher) | ||
1048 | 320 | + g_settings_set_boolean (self->priv->unity2d_settings_launcher, "only-one-launcher", !on_all_monitors); | ||
1049 | 321 | +} | ||
1050 | 322 | + | ||
1051 | 323 | +static void | ||
1052 | 324 | +setup_unity_settings (CcDisplayPanel *self) | ||
1053 | 325 | +{ | ||
1054 | 326 | + const gchar * const *schemas; | ||
1055 | 327 | + | ||
1056 | 328 | + /* Only use the unity-2d schema if it's installed */ | ||
1057 | 329 | + schemas = g_settings_list_schemas (); | ||
1058 | 330 | + while (*schemas != NULL) | ||
1059 | 331 | + { | ||
1060 | 332 | + if (g_strcmp0 (*schemas, UNITY2D_GSETTINGS_LAUNCHER) == 0) | ||
1061 | 333 | + { | ||
1062 | 334 | + self->priv->unity2d_settings_main = g_settings_new (UNITY2D_GSETTINGS_MAIN); | ||
1063 | 335 | + self->priv->unity2d_settings_launcher = g_settings_new (UNITY2D_GSETTINGS_LAUNCHER); | ||
1064 | 336 | + break; | ||
1065 | 337 | + } | ||
1066 | 338 | + schemas++; | ||
1067 | 339 | + } | ||
1068 | 340 | + schemas = g_settings_list_relocatable_schemas (); | ||
1069 | 341 | + while (*schemas != NULL) | ||
1070 | 342 | + { | ||
1071 | 343 | + if (g_strcmp0 (*schemas, UNITY_GSETTINGS_SCHEMA) == 0) | ||
1072 | 344 | + { | ||
1073 | 345 | + self->priv->unity_settings = g_settings_new_with_path (UNITY_GSETTINGS_SCHEMA, UNITY_GSETTINGS_PATH); | ||
1074 | 346 | + break; | ||
1075 | 347 | + } | ||
1076 | 348 | + schemas++; | ||
1077 | 349 | + } | ||
1078 | 350 | + | ||
1079 | 351 | + if (!self->priv->unity_settings) | ||
1080 | 352 | + return; | ||
1081 | 353 | + | ||
1082 | 354 | + GtkWidget *sticky_edge_switch = WID ("stickyedge_switch"); | ||
1083 | 355 | + g_signal_connect (sticky_edge_switch, "notify::active", | ||
1084 | 356 | + G_CALLBACK (on_stickyedge_changed), self); | ||
1085 | 357 | + g_signal_connect (self->priv->unity_settings, "changed::" UNITY_STICKY_EDGE_KEY, | ||
1086 | 358 | + G_CALLBACK (ext_stickyedge_changed_callback), sticky_edge_switch); | ||
1087 | 359 | + stickyedge_widget_refresh (GTK_SWITCH (sticky_edge_switch), self->priv->unity_settings); | ||
1088 | 360 | + | ||
1089 | 361 | + g_signal_connect (G_OBJECT (WID ("launcher_placement_combo")), "changed", | ||
1090 | 362 | + G_CALLBACK (on_launcher_placement_combo_changed), self); | ||
1091 | 363 | + g_signal_connect (self->priv->unity_settings, "changed::" UNITY_LAUNCHER_ALL_MONITORS_KEY, | ||
1092 | 364 | + G_CALLBACK (ext_launcher_placement_changed_callback), self); | ||
1093 | 365 | +} | ||
1094 | 366 | + | ||
1095 | 367 | +static void | ||
1096 | 368 | cc_display_panel_init (CcDisplayPanel *self) | ||
1097 | 369 | { | ||
1098 | 370 | } | ||
1099 | 371 | @@ -2572,7 +2859,7 @@ | ||
1100 | 372 | CcDisplayPanel *self; | ||
1101 | 373 | CcShell *shell; | ||
1102 | 374 | GtkWidget *toplevel; | ||
1103 | 375 | - gchar *objects[] = {"display-panel", NULL}; | ||
1104 | 376 | + gchar *objects[] = {"display-panel", "available_launcher_placement_store", NULL}; | ||
1105 | 377 | |||
1106 | 378 | obj = G_OBJECT_CLASS (cc_display_panel_parent_class)->constructor (gtype, n_properties, properties); | ||
1107 | 379 | self = CC_DISPLAY_PANEL (obj); | ||
1108 | 380 | @@ -2661,6 +2948,18 @@ | ||
1109 | 381 | g_signal_connect_swapped (WID ("apply_button"), | ||
1110 | 382 | "clicked", G_CALLBACK (apply), self); | ||
1111 | 383 | |||
1112 | 384 | + /* Unity settings */ | ||
1113 | 385 | + if (is_unity_session ()) | ||
1114 | 386 | + setup_unity_settings (self); | ||
1115 | 387 | + else | ||
1116 | 388 | + { | ||
1117 | 389 | + gtk_widget_hide (WID ("unity_launcher_placement_sep")); | ||
1118 | 390 | + gtk_widget_hide (WID ("launcher_placement_label")); | ||
1119 | 391 | + gtk_widget_hide (WID ("sticky_edge_label")); | ||
1120 | 392 | + gtk_widget_hide (WID ("launcher_placement_combo")); | ||
1121 | 393 | + gtk_widget_hide (WID ("stickyedge_switch")); | ||
1122 | 394 | + } | ||
1123 | 395 | + | ||
1124 | 396 | gtk_widget_show (self->priv->panel); | ||
1125 | 397 | gtk_container_add (GTK_CONTAINER (self), self->priv->panel); | ||
1126 | 398 | |||
1127 | 399 | @@ -2675,4 +2974,3 @@ | ||
1128 | 400 | CC_TYPE_DISPLAY_PANEL, | ||
1129 | 401 | "display", 0); | ||
1130 | 402 | } | ||
1131 | 403 | - | ||
1132 | 404 | Index: gnome-control-center-3.4.2/panels/display/display-capplet.ui | ||
1133 | 405 | =================================================================== | ||
1134 | 406 | --- gnome-control-center-3.4.2.orig/panels/display/display-capplet.ui 2012-03-05 15:04:55.000000000 +0100 | ||
1135 | 407 | +++ gnome-control-center-3.4.2/panels/display/display-capplet.ui 2012-07-23 10:26:45.805976846 +0200 | ||
1136 | 408 | @@ -1,6 +1,14 @@ | ||
1137 | 409 | <?xml version="1.0"?> | ||
1138 | 410 | <interface> | ||
1139 | 411 | <requires lib="gtk+" version="2.16"/> | ||
1140 | 412 | + <object class="GtkListStore" id="available_launcher_placement_store"> | ||
1141 | 413 | + <columns> | ||
1142 | 414 | + <!-- column-name MONITOR_PREVIEW --> | ||
1143 | 415 | + <column type="GdkPixbuf"/> | ||
1144 | 416 | + <!-- column-name LAUNCHER_PLACEMENT_NAME --> | ||
1145 | 417 | + <column type="gchararray"/> | ||
1146 | 418 | + </columns> | ||
1147 | 419 | + </object> | ||
1148 | 420 | <!-- interface-naming-policy toplevel-contextual --> | ||
1149 | 421 | <object class="GtkWindow" id="window1"> | ||
1150 | 422 | <child> | ||
1151 | 423 | @@ -96,56 +104,89 @@ | ||
1152 | 424 | <child> | ||
1153 | 425 | <object class="GtkTable" id="table1"> | ||
1154 | 426 | <property name="visible">True</property> | ||
1155 | 427 | - <property name="n_rows">3</property> | ||
1156 | 428 | + <property name="n_rows">5</property> | ||
1157 | 429 | <property name="n_columns">2</property> | ||
1158 | 430 | <property name="column_spacing">12</property> | ||
1159 | 431 | <property name="row_spacing">6</property> | ||
1160 | 432 | <child> | ||
1161 | 433 | - <object class="GtkAlignment" id="alignment4"> | ||
1162 | 434 | + <object class="GtkLabel" id="label2"> | ||
1163 | 435 | + <property name="visible">True</property> | ||
1164 | 436 | + <property name="xalign">1</property> | ||
1165 | 437 | + <property name="label" translatable="yes">_Resolution</property> | ||
1166 | 438 | + <property name="use_underline">True</property> | ||
1167 | 439 | + <property name="mnemonic_widget">resolution_combo</property> | ||
1168 | 440 | + <style> | ||
1169 | 441 | + <class name="dim-label"/> | ||
1170 | 442 | + </style> | ||
1171 | 443 | + </object> | ||
1172 | 444 | + <packing> | ||
1173 | 445 | + <property name="x_options">GTK_FILL</property> | ||
1174 | 446 | + <property name="y_options"></property> | ||
1175 | 447 | + </packing> | ||
1176 | 448 | + </child> | ||
1177 | 449 | + <child> | ||
1178 | 450 | + <object class="GtkLabel" id="label5"> | ||
1179 | 451 | + <property name="visible">True</property> | ||
1180 | 452 | + <property name="xalign">1</property> | ||
1181 | 453 | + <property name="label" translatable="yes">R_otation</property> | ||
1182 | 454 | + <property name="mnemonic_widget">rotation_combo</property> | ||
1183 | 455 | + <property name="use_underline">True</property> | ||
1184 | 456 | + <style> | ||
1185 | 457 | + <class name="dim-label"/> | ||
1186 | 458 | + </style> | ||
1187 | 459 | + </object> | ||
1188 | 460 | + <packing> | ||
1189 | 461 | + <property name="top_attach">1</property> | ||
1190 | 462 | + <property name="bottom_attach">2</property> | ||
1191 | 463 | + <property name="x_options">GTK_FILL</property> | ||
1192 | 464 | + <property name="y_options"></property> | ||
1193 | 465 | + </packing> | ||
1194 | 466 | + </child> | ||
1195 | 467 | + <child> | ||
1196 | 468 | + <object class="GtkSeparator" id="unity_launcher_placement_sep"> | ||
1197 | 469 | <property name="visible">True</property> | ||
1198 | 470 | - <child> | ||
1199 | 471 | - <placeholder/> | ||
1200 | 472 | - </child> | ||
1201 | 473 | </object> | ||
1202 | 474 | <packing> | ||
1203 | 475 | - <property name="left_attach">1</property> | ||
1204 | 476 | - <property name="right_attach">2</property> | ||
1205 | 477 | <property name="top_attach">2</property> | ||
1206 | 478 | <property name="bottom_attach">3</property> | ||
1207 | 479 | - <property name="x_options"></property> | ||
1208 | 480 | + <property name="left_attach">0</property> | ||
1209 | 481 | + <property name="right_attach">2</property> | ||
1210 | 482 | + <property name="x_options">GTK_FILL</property> | ||
1211 | 483 | <property name="y_options"></property> | ||
1212 | 484 | </packing> | ||
1213 | 485 | </child> | ||
1214 | 486 | <child> | ||
1215 | 487 | - <object class="GtkLabel" id="label2"> | ||
1216 | 488 | + <object class="GtkLabel" id="launcher_placement_label"> | ||
1217 | 489 | <property name="visible">True</property> | ||
1218 | 490 | <property name="xalign">1</property> | ||
1219 | 491 | - <property name="label" translatable="yes">_Resolution</property> | ||
1220 | 492 | + <property name="label" translatable="yes">L_auncher placement</property> | ||
1221 | 493 | + <property name="mnemonic_widget">launcher_placement_combo</property> | ||
1222 | 494 | <property name="use_underline">True</property> | ||
1223 | 495 | - <property name="mnemonic_widget">resolution_combo</property> | ||
1224 | 496 | <style> | ||
1225 | 497 | <class name="dim-label"/> | ||
1226 | 498 | </style> | ||
1227 | 499 | </object> | ||
1228 | 500 | <packing> | ||
1229 | 501 | + <property name="top_attach">3</property> | ||
1230 | 502 | + <property name="bottom_attach">4</property> | ||
1231 | 503 | <property name="x_options">GTK_FILL</property> | ||
1232 | 504 | <property name="y_options"></property> | ||
1233 | 505 | </packing> | ||
1234 | 506 | </child> | ||
1235 | 507 | <child> | ||
1236 | 508 | - <object class="GtkLabel" id="label5"> | ||
1237 | 509 | + <object class="GtkLabel" id="sticky_edge_label"> | ||
1238 | 510 | <property name="visible">True</property> | ||
1239 | 511 | <property name="xalign">1</property> | ||
1240 | 512 | - <property name="label" translatable="yes">R_otation</property> | ||
1241 | 513 | - <property name="mnemonic_widget">rotation_combo</property> | ||
1242 | 514 | + <property name="label" translatable="yes">S_ticky edges</property> | ||
1243 | 515 | + <property name="mnemonic_widget">stickyedge_switch</property> | ||
1244 | 516 | <property name="use_underline">True</property> | ||
1245 | 517 | <style> | ||
1246 | 518 | <class name="dim-label"/> | ||
1247 | 519 | </style> | ||
1248 | 520 | </object> | ||
1249 | 521 | <packing> | ||
1250 | 522 | - <property name="top_attach">1</property> | ||
1251 | 523 | - <property name="bottom_attach">2</property> | ||
1252 | 524 | + <property name="top_attach">4</property> | ||
1253 | 525 | + <property name="bottom_attach">5</property> | ||
1254 | 526 | <property name="x_options">GTK_FILL</property> | ||
1255 | 527 | <property name="y_options"></property> | ||
1256 | 528 | </packing> | ||
1257 | 529 | @@ -179,6 +220,63 @@ | ||
1258 | 530 | </packing> | ||
1259 | 531 | </child> | ||
1260 | 532 | <child> | ||
1261 | 533 | + <object class="GtkComboBox" id="launcher_placement_combo"> | ||
1262 | 534 | + <property name="visible">True</property> | ||
1263 | 535 | + <property name="can_focus">False</property> | ||
1264 | 536 | + <property name="model">available_launcher_placement_store</property> | ||
1265 | 537 | + <property name="id_column">1</property> | ||
1266 | 538 | + <child> | ||
1267 | 539 | + <object class="GtkCellRendererPixbuf" id="monitor_preview_renderer"/> | ||
1268 | 540 | + <attributes> | ||
1269 | 541 | + <attribute name="pixbuf">0</attribute> | ||
1270 | 542 | + </attributes> | ||
1271 | 543 | + </child> | ||
1272 | 544 | + <child> | ||
1273 | 545 | + <object class="GtkCellRendererText" id="launcher_placement_name_renderer"/> | ||
1274 | 546 | + <attributes> | ||
1275 | 547 | + <attribute name="text">1</attribute> | ||
1276 | 548 | + </attributes> | ||
1277 | 549 | + </child> | ||
1278 | 550 | + </object> | ||
1279 | 551 | + <packing> | ||
1280 | 552 | + <property name="left_attach">1</property> | ||
1281 | 553 | + <property name="right_attach">2</property> | ||
1282 | 554 | + <property name="top_attach">3</property> | ||
1283 | 555 | + <property name="bottom_attach">4</property> | ||
1284 | 556 | + <property name="y_options"></property> | ||
1285 | 557 | + </packing> | ||
1286 | 558 | + </child> | ||
1287 | 559 | + <child> | ||
1288 | 560 | + <object class="GtkHBox" id="hbox4"> | ||
1289 | 561 | + <property name="visible">True</property> | ||
1290 | 562 | + <property name="spacing">12</property> | ||
1291 | 563 | + <child> | ||
1292 | 564 | + <object class="GtkSwitch" id="stickyedge_switch"> | ||
1293 | 565 | + <property name="visible">True</property> | ||
1294 | 566 | + <property name="can_focus">True</property> | ||
1295 | 567 | + <property name="receives_default">False</property> | ||
1296 | 568 | + <property name="active">True</property> | ||
1297 | 569 | + </object> | ||
1298 | 570 | + <packing> | ||
1299 | 571 | + <property name="expand">False</property> | ||
1300 | 572 | + <property name="fill">False</property> | ||
1301 | 573 | + <property name="pack_type">end</property> | ||
1302 | 574 | + <property name="position">1</property> | ||
1303 | 575 | + </packing> | ||
1304 | 576 | + </child> | ||
1305 | 577 | + </object> | ||
1306 | 578 | + <packing> | ||
1307 | 579 | + <property name="left_attach">1</property> | ||
1308 | 580 | + <property name="right_attach">2</property> | ||
1309 | 581 | + <property name="top_attach">4</property> | ||
1310 | 582 | + <property name="bottom_attach">5</property> | ||
1311 | 583 | + <property name="y_options"></property> | ||
1312 | 584 | + <property name="expand">False</property> | ||
1313 | 585 | + <property name="fill">False</property> | ||
1314 | 586 | + <property name="position">0</property> | ||
1315 | 587 | + </packing> | ||
1316 | 588 | + </child> | ||
1317 | 589 | + <child> | ||
1318 | 590 | <placeholder/> | ||
1319 | 591 | </child> | ||
1320 | 592 | </object> | ||
1321 | 593 | 0 | ||
1322 | === added file 'debian/patches/52_region_language.patch' | |||
1323 | --- debian/patches/52_region_language.patch 1970-01-01 00:00:00 +0000 | |||
1324 | +++ debian/patches/52_region_language.patch 2014-05-06 09:05:46 +0000 | |||
1325 | @@ -0,0 +1,586 @@ | |||
1326 | 1 | Description: Adapts the region capplet and the language chooser in the user accounts capplet | ||
1327 | 2 | Forwarded: https://bugzilla.gnome.org/695939, https://bugzilla.gnome.org/695940 | ||
1328 | 3 | Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com> | ||
1329 | 4 | Last-Update: 2013-03-21 | ||
1330 | 5 | |||
1331 | 6 | Some background that explains the need for this patch: | ||
1332 | 7 | |||
1333 | 8 | * Ubuntu isn't shipped with all languages installed and all locales generated. | ||
1334 | 9 | Instead the users install the needed language pack(s), and the corresponding | ||
1335 | 10 | locales are generated. | ||
1336 | 11 | |||
1337 | 12 | * The code in accountsservice for handling languages has been extended via Ubuntu | ||
1338 | 13 | specific patches. That code is shared by multiple packages. Currently those | ||
1339 | 14 | packages are: | ||
1340 | 15 | - gnome-control-center | ||
1341 | 16 | - language-selector (Xubuntu and Lubuntu will keep using the language-selector | ||
1342 | 17 | UI for now) | ||
1343 | 18 | - lightdm (for the language chooser in lightdm-gtk-greeter) | ||
1344 | 19 | |||
1345 | 20 | With this patch applied, the g-c-c region capplet and the language chooser in the | ||
1346 | 21 | user accounts capplet behave approximately the same way as language-selector. No | ||
1347 | 22 | migration code needed when standard Ubuntu drops the language-selector UI. | ||
1348 | 23 | |||
1349 | 24 | Compared with how the region capplet in g-c-c works out of the box, this patch | ||
1350 | 25 | results in: | ||
1351 | 26 | |||
1352 | 27 | * Languages are dealt with using 'll' and 'll_CC' language codes instead of | ||
1353 | 28 | complete locale names. | ||
1354 | 29 | |||
1355 | 30 | * Selected language is stored in both LANGUAGE and LANG. | ||
1356 | 31 | |||
1357 | 32 | * Only one language list that shows the translations belonging to the installed | ||
1358 | 33 | language packs (not a 'short' and a 'long' list). | ||
1359 | 34 | |||
1360 | 35 | * User level settings of language and regional formats are stored as | ||
1361 | 36 | accountsservice properties and in ~/.pam_environment. | ||
1362 | 37 | |||
1363 | 38 | * All the formats related locale categories set, not just a subset. | ||
1364 | 39 | |||
1365 | 40 | The following changes now live in gnome-desktop3 | ||
1366 | 41 | |||
1367 | 42 | * Translation @variants, e.g. ca@valencia, are displayed properly. | ||
1368 | 43 | |||
1369 | 44 | * Locales stored with codeset '.UTF-8' instead of '.utf8'. | ||
1370 | 45 | |||
1371 | 46 | * The 'common_name' field taken into account when parsing the iso-codes XML files | ||
1372 | 47 | for language names. | ||
1373 | 48 | |||
1374 | 49 | From 785b001bbc1d9cca74745ea6dfb75d60f3b5b7a9 Mon Sep 17 00:00:00 2001 | ||
1375 | 50 | From: Tim Lunn <tim@feathertop.org> | ||
1376 | 51 | Date: Fri, 12 Apr 2013 08:55:40 +1000 | ||
1377 | 52 | Subject: [PATCH] Ubuntu changes required for proper region support. | ||
1378 | 53 | |||
1379 | 54 | --- | ||
1380 | 55 | panels/common/cc-common-language.c | 110 +++++++++++++++++++++++++++--- | ||
1381 | 56 | panels/common/cc-common-language.h | 3 + | ||
1382 | 57 | panels/common/cc-language-chooser.c | 5 +- | ||
1383 | 58 | panels/region/cc-format-chooser.c | 2 + | ||
1384 | 59 | panels/region/cc-input-chooser.c | 4 +- | ||
1385 | 60 | panels/region/cc-region-panel.c | 127 ++++++++++++++++++++++++++--------- | ||
1386 | 61 | panels/user-accounts/um-user-panel.c | 11 ++- | ||
1387 | 62 | 7 files changed, 216 insertions(+), 46 deletions(-) | ||
1388 | 63 | |||
1389 | 64 | --- a/panels/common/cc-common-language.c | ||
1390 | 65 | +++ b/panels/common/cc-common-language.c | ||
1391 | 66 | @@ -321,6 +321,67 @@ | ||
1392 | 67 | return language; | ||
1393 | 68 | } | ||
1394 | 69 | |||
1395 | 70 | +gchar * | ||
1396 | 71 | +cc_common_language_get_property (const gchar *prop_name) | ||
1397 | 72 | +{ | ||
1398 | 73 | + GDBusConnection *bus; | ||
1399 | 74 | + gchar *user_path; | ||
1400 | 75 | + GError *error = NULL; | ||
1401 | 76 | + GVariant *properties; | ||
1402 | 77 | + GVariantIter *iter; | ||
1403 | 78 | + gchar *key; | ||
1404 | 79 | + GVariant *value; | ||
1405 | 80 | + gchar *ret = NULL; | ||
1406 | 81 | + | ||
1407 | 82 | + if (g_strcmp0 (prop_name, "Language") != 0 && g_strcmp0 (prop_name, "FormatsLocale") != 0) { | ||
1408 | 83 | + g_warning ("Invalid argument: '%s'", prop_name); | ||
1409 | 84 | + return ret; | ||
1410 | 85 | + } | ||
1411 | 86 | + | ||
1412 | 87 | + bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); | ||
1413 | 88 | + user_path = g_strdup_printf ("/org/freedesktop/Accounts/User%i", getuid ()); | ||
1414 | 89 | + | ||
1415 | 90 | + properties = g_dbus_connection_call_sync (bus, | ||
1416 | 91 | + "org.freedesktop.Accounts", | ||
1417 | 92 | + user_path, | ||
1418 | 93 | + "org.freedesktop.DBus.Properties", | ||
1419 | 94 | + "GetAll", | ||
1420 | 95 | + g_variant_new ("(s)", "org.freedesktop.Accounts.User"), | ||
1421 | 96 | + G_VARIANT_TYPE ("(a{sv})"), | ||
1422 | 97 | + G_DBUS_CALL_FLAGS_NONE, | ||
1423 | 98 | + -1, | ||
1424 | 99 | + NULL, | ||
1425 | 100 | + &error); | ||
1426 | 101 | + if (!properties) { | ||
1427 | 102 | + g_warning ("Error calling GetAll() when retrieving properties for %s: %s", user_path, error->message); | ||
1428 | 103 | + g_error_free (error); | ||
1429 | 104 | + /* g_hash_table_lookup() is not NULL-safe, so don't return NULL */ | ||
1430 | 105 | + if (g_strcmp0 (prop_name, "Language") == 0) | ||
1431 | 106 | + ret = g_strdup ("en"); | ||
1432 | 107 | + else | ||
1433 | 108 | + ret = g_strdup ("en_US.UTF-8"); | ||
1434 | 109 | + goto out; | ||
1435 | 110 | + } | ||
1436 | 111 | + | ||
1437 | 112 | + g_variant_get (properties, "(a{sv})", &iter); | ||
1438 | 113 | + while (g_variant_iter_loop (iter, "{&sv}", &key, &value)) { | ||
1439 | 114 | + if (g_strcmp0 (key, prop_name) == 0) { | ||
1440 | 115 | + g_variant_get (value, "s", &ret); | ||
1441 | 116 | + break; | ||
1442 | 117 | + } | ||
1443 | 118 | + } | ||
1444 | 119 | + | ||
1445 | 120 | + g_variant_unref (properties); | ||
1446 | 121 | + g_variant_iter_free (iter); | ||
1447 | 122 | + | ||
1448 | 123 | +out: | ||
1449 | 124 | + g_object_unref (bus); | ||
1450 | 125 | + g_free (user_path); | ||
1451 | 126 | + | ||
1452 | 127 | + return ret; | ||
1453 | 128 | +} | ||
1454 | 129 | + | ||
1455 | 130 | + | ||
1456 | 131 | typedef struct { | ||
1457 | 132 | GtkListStore *store; | ||
1458 | 133 | gboolean user_lang; | ||
1459 | 134 | @@ -428,7 +489,7 @@ | ||
1460 | 135 | char *lang; | ||
1461 | 136 | gboolean found; | ||
1462 | 137 | |||
1463 | 138 | - lang = cc_common_language_get_current_language (); | ||
1464 | 139 | + lang = cc_common_language_get_property ("Language"); | ||
1465 | 140 | g_debug ("Trying to select lang '%s' in treeview", lang); | ||
1466 | 141 | model = gtk_tree_view_get_model (treeview); | ||
1467 | 142 | found = FALSE; | ||
1468 | 143 | @@ -513,6 +574,7 @@ | ||
1469 | 144 | return lang; | ||
1470 | 145 | } | ||
1471 | 146 | |||
1472 | 147 | +/* | ||
1473 | 148 | static void | ||
1474 | 149 | add_other_users_language (GHashTable *ht) | ||
1475 | 150 | { | ||
1476 | 151 | @@ -573,6 +635,7 @@ | ||
1477 | 152 | |||
1478 | 153 | g_object_unref (proxy); | ||
1479 | 154 | } | ||
1480 | 155 | +*/ | ||
1481 | 156 | |||
1482 | 157 | static void | ||
1483 | 158 | insert_language (GHashTable *ht, | ||
1484 | 159 | @@ -596,10 +659,10 @@ | ||
1485 | 160 | |||
1486 | 161 | g_debug ("We have translations for %s", lang); | ||
1487 | 162 | |||
1488 | 163 | - if (g_str_has_suffix (lang, ".utf8")) | ||
1489 | 164 | + if (g_str_has_suffix (lang, ".UTF-8")) | ||
1490 | 165 | key = g_strdup (lang); | ||
1491 | 166 | else | ||
1492 | 167 | - key = g_strdup_printf ("%s.utf8", lang); | ||
1493 | 168 | + key = g_strdup_printf ("%s.UTF-8", lang); | ||
1494 | 169 | |||
1495 | 170 | label_own_lang = gnome_get_language_from_locale (key, key); | ||
1496 | 171 | label_current_lang = gnome_get_language_from_locale (key, NULL); | ||
1497 | 172 | @@ -625,9 +688,18 @@ | ||
1498 | 173 | cc_common_language_get_initial_languages (void) | ||
1499 | 174 | { | ||
1500 | 175 | GHashTable *ht; | ||
1501 | 176 | + gchar **langs; | ||
1502 | 177 | + gint i; | ||
1503 | 178 | |||
1504 | 179 | ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); | ||
1505 | 180 | |||
1506 | 181 | + langs = gnome_get_all_locales (); | ||
1507 | 182 | + for (i = 0; langs[i]; i++) { | ||
1508 | 183 | + char *language = strtok (langs[i], "."); | ||
1509 | 184 | + insert_language (ht, language); | ||
1510 | 185 | + } | ||
1511 | 186 | + g_strfreev (langs); | ||
1512 | 187 | +/* | ||
1513 | 188 | insert_language (ht, "en_US"); | ||
1514 | 189 | insert_language (ht, "en_GB"); | ||
1515 | 190 | insert_language (ht, "de_DE"); | ||
1516 | 191 | @@ -637,7 +709,7 @@ | ||
1517 | 192 | insert_language (ht, "ja_JP"); | ||
1518 | 193 | insert_language (ht, "ru_RU"); | ||
1519 | 194 | insert_language (ht, "ar_EG"); | ||
1520 | 195 | - | ||
1521 | 196 | +*/ | ||
1522 | 197 | return ht; | ||
1523 | 198 | } | ||
1524 | 199 | |||
1525 | 200 | @@ -651,10 +723,10 @@ | ||
1526 | 201 | ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); | ||
1527 | 202 | |||
1528 | 203 | /* Add the languages used by other users on the system */ | ||
1529 | 204 | - add_other_users_language (ht); | ||
1530 | 205 | + // add_other_users_language (ht); | ||
1531 | 206 | |||
1532 | 207 | /* Add current locale */ | ||
1533 | 208 | - name = cc_common_language_get_current_language (); | ||
1534 | 209 | + name = cc_common_language_get_property ("Language"); | ||
1535 | 210 | if (g_hash_table_lookup (ht, name) == NULL) { | ||
1536 | 211 | language = gnome_get_language_from_locale (name, NULL); | ||
1537 | 212 | g_hash_table_insert (ht, name, language); | ||
1538 | 213 | @@ -703,6 +775,28 @@ | ||
1539 | 214 | return ht; | ||
1540 | 215 | } | ||
1541 | 216 | |||
1542 | 217 | +void | ||
1543 | 218 | +cc_common_language_get_locale (const gchar *language, gchar **locale){ | ||
1544 | 219 | + gchar *command; | ||
1545 | 220 | + GError *error = NULL; | ||
1546 | 221 | + /* Get locale that corresponds to the language */ | ||
1547 | 222 | + command = g_strconcat ("/usr/share/language-tools/language2locale ", language, NULL); | ||
1548 | 223 | + if (!g_spawn_command_line_sync (command, locale, NULL, NULL, &error)) { | ||
1549 | 224 | + g_warning ("Couldn't get LANG locale: %s", error->message); | ||
1550 | 225 | + g_error_free (error); | ||
1551 | 226 | + g_free (command); | ||
1552 | 227 | + | ||
1553 | 228 | + return; | ||
1554 | 229 | + } | ||
1555 | 230 | + | ||
1556 | 231 | + g_free (command); | ||
1557 | 232 | + g_strchomp (*locale); | ||
1558 | 233 | + if (strlen (*locale) == 0) { | ||
1559 | 234 | + g_warning ("Couldn't get LANG locale -- Copying interrupted"); | ||
1560 | 235 | + return; | ||
1561 | 236 | + } | ||
1562 | 237 | + | ||
1563 | 238 | +} | ||
1564 | 239 | static void | ||
1565 | 240 | foreach_user_lang_cb (gpointer key, | ||
1566 | 241 | gpointer value, | ||
1567 | 242 | @@ -734,7 +828,7 @@ | ||
1568 | 243 | user_langs = cc_common_language_get_initial_languages (); | ||
1569 | 244 | |||
1570 | 245 | /* Add the current locale first */ | ||
1571 | 246 | - name = cc_common_language_get_current_language (); | ||
1572 | 247 | + name = cc_common_language_get_property ("Language"); | ||
1573 | 248 | display = g_hash_table_lookup (user_langs, name); | ||
1574 | 249 | if (!display) { | ||
1575 | 250 | insert_language (user_langs, name); | ||
1576 | 251 | @@ -750,8 +844,8 @@ | ||
1577 | 252 | g_hash_table_foreach (user_langs, (GHFunc) foreach_user_lang_cb, store); | ||
1578 | 253 | |||
1579 | 254 | /* And now the "Other…" selection */ | ||
1580 | 255 | - gtk_list_store_append (store, &iter); | ||
1581 | 256 | - gtk_list_store_set (store, &iter, LOCALE_COL, NULL, DISPLAY_LOCALE_COL, _("Other…"), -1); | ||
1582 | 257 | + //gtk_list_store_append (store, &iter); | ||
1583 | 258 | + //gtk_list_store_set (store, &iter, LOCALE_COL, NULL, DISPLAY_LOCALE_COL, _("Other…"), -1); | ||
1584 | 259 | |||
1585 | 260 | g_hash_table_destroy (user_langs); | ||
1586 | 261 | } | ||
1587 | 262 | --- a/panels/common/cc-common-language.h | ||
1588 | 263 | +++ b/panels/common/cc-common-language.h | ||
1589 | 264 | @@ -45,6 +45,7 @@ | ||
1590 | 265 | GHashTable *user_langs); | ||
1591 | 266 | gboolean cc_common_language_has_font (const gchar *locale); | ||
1592 | 267 | gchar *cc_common_language_get_current_language (void); | ||
1593 | 268 | +gchar *cc_common_language_get_property (const gchar *prop_name); | ||
1594 | 269 | |||
1595 | 270 | GHashTable *cc_common_language_get_initial_languages (void); | ||
1596 | 271 | GHashTable *cc_common_language_get_user_languages (void); | ||
1597 | 272 | @@ -57,6 +58,8 @@ | ||
1598 | 273 | |||
1599 | 274 | void cc_common_language_add_user_languages (GtkTreeModel *model); | ||
1600 | 275 | |||
1601 | 276 | +void cc_common_language_get_locale (const gchar *language, gchar **locale); | ||
1602 | 277 | + | ||
1603 | 278 | G_END_DECLS | ||
1604 | 279 | |||
1605 | 280 | #endif | ||
1606 | 281 | --- a/panels/common/cc-language-chooser.c | ||
1607 | 282 | +++ b/panels/common/cc-language-chooser.c | ||
1608 | 283 | @@ -1,5 +1,4 @@ | ||
1609 | 284 | -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- | ||
1610 | 285 | - * | ||
1611 | 286 | +/* | ||
1612 | 287 | * Copyright (C) 2013 Red Hat, Inc | ||
1613 | 288 | * | ||
1614 | 289 | * This program is free software; you can redistribute it and/or modify | ||
1615 | 290 | @@ -79,7 +78,9 @@ | ||
1616 | 291 | egg_list_box_refilter (EGG_LIST_BOX (priv->language_list)); | ||
1617 | 292 | } | ||
1618 | 293 | } else { | ||
1619 | 294 | + | ||
1620 | 295 | gtk_widget_set_opacity (check, 0.0); | ||
1621 | 296 | + | ||
1622 | 297 | } | ||
1623 | 298 | } | ||
1624 | 299 | g_list_free (children); | ||
1625 | 300 | --- a/panels/region/cc-format-chooser.c | ||
1626 | 301 | +++ b/panels/region/cc-format-chooser.c | ||
1627 | 302 | @@ -170,7 +170,9 @@ | ||
1628 | 303 | |||
1629 | 304 | } else { | ||
1630 | 305 | /* mark as unselected */ | ||
1631 | 306 | + | ||
1632 | 307 | gtk_widget_set_opacity (check, 0.0); | ||
1633 | 308 | + | ||
1634 | 309 | } | ||
1635 | 310 | } | ||
1636 | 311 | g_list_free (children); | ||
1637 | 312 | --- a/panels/region/cc-input-chooser.c | ||
1638 | 313 | +++ b/panels/region/cc-input-chooser.c | ||
1639 | 314 | @@ -909,7 +909,7 @@ | ||
1640 | 315 | lang_code != NULL && | ||
1641 | 316 | country_code != NULL) | ||
1642 | 317 | { | ||
1643 | 318 | - gchar *locale = g_strdup_printf ("%s_%s.utf8", lang_code, country_code); | ||
1644 | 319 | + gchar *locale = g_strdup_printf ("%s_%s.UTF-8", lang_code, country_code); | ||
1645 | 320 | |||
1646 | 321 | info = g_hash_table_lookup (priv->locales, locale); | ||
1647 | 322 | if (info) | ||
1648 | 323 | @@ -1034,7 +1034,7 @@ | ||
1649 | 324 | if (!gnome_parse_locale (*locale, &lang_code, &country_code, NULL, NULL)) | ||
1650 | 325 | continue; | ||
1651 | 326 | |||
1652 | 327 | - simple_locale = g_strdup_printf ("%s_%s.utf8", lang_code, country_code); | ||
1653 | 328 | + simple_locale = g_strdup_printf ("%s_%s.UTF-8", lang_code, country_code); | ||
1654 | 329 | if (g_hash_table_contains (priv->locales, simple_locale)) | ||
1655 | 330 | { | ||
1656 | 331 | g_free (simple_locale); | ||
1657 | 332 | --- a/panels/region/cc-region-panel.c | ||
1658 | 333 | +++ b/panels/region/cc-region-panel.c | ||
1659 | 334 | @@ -404,14 +404,55 @@ | ||
1660 | 335 | } | ||
1661 | 336 | |||
1662 | 337 | static void | ||
1663 | 338 | +set_formats_locale (const gchar *formats_locale) | ||
1664 | 339 | +{ | ||
1665 | 340 | + GDBusProxy *proxy; | ||
1666 | 341 | + GError *error = NULL; | ||
1667 | 342 | + gchar *user_path; | ||
1668 | 343 | + GVariant *ret; | ||
1669 | 344 | + | ||
1670 | 345 | + user_path = g_strdup_printf ("/org/freedesktop/Accounts/User%i", getuid ()); | ||
1671 | 346 | + proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, | ||
1672 | 347 | + G_DBUS_PROXY_FLAGS_NONE, | ||
1673 | 348 | + NULL, | ||
1674 | 349 | + "org.freedesktop.Accounts", | ||
1675 | 350 | + user_path, | ||
1676 | 351 | + "org.freedesktop.Accounts.User", | ||
1677 | 352 | + NULL, | ||
1678 | 353 | + &error); | ||
1679 | 354 | + if (!proxy) { | ||
1680 | 355 | + g_warning ("Couldn't get accountsservice proxy for %s: %s", user_path, error->message); | ||
1681 | 356 | + g_error_free (error); | ||
1682 | 357 | + g_free (user_path); | ||
1683 | 358 | + return; | ||
1684 | 359 | + } | ||
1685 | 360 | + | ||
1686 | 361 | + ret = g_dbus_proxy_call_sync (proxy, | ||
1687 | 362 | + "SetFormatsLocale", | ||
1688 | 363 | + g_variant_new ("(s)", formats_locale), | ||
1689 | 364 | + G_DBUS_CALL_FLAGS_NONE, | ||
1690 | 365 | + -1, | ||
1691 | 366 | + NULL, | ||
1692 | 367 | + &error); | ||
1693 | 368 | + if (!ret) { | ||
1694 | 369 | + g_warning ("Couldn't set FormatsLocale: %s", error->message); | ||
1695 | 370 | + g_error_free (error); | ||
1696 | 371 | + } else | ||
1697 | 372 | + g_variant_unref (ret); | ||
1698 | 373 | + | ||
1699 | 374 | + g_object_unref (proxy); | ||
1700 | 375 | + g_free (user_path); | ||
1701 | 376 | +} | ||
1702 | 377 | + | ||
1703 | 378 | +static void | ||
1704 | 379 | update_region (CcRegionPanel *self, | ||
1705 | 380 | const gchar *region) | ||
1706 | 381 | { | ||
1707 | 382 | - CcRegionPanelPrivate *priv = self->priv; | ||
1708 | 383 | + CcRegionPanelPrivate *priv = self->priv; | ||
1709 | 384 | |||
1710 | 385 | if (g_strcmp0 (region, priv->region) == 0) | ||
1711 | 386 | return; | ||
1712 | 387 | - | ||
1713 | 388 | + set_formats_locale(region); | ||
1714 | 389 | g_settings_set_string (priv->locale_settings, KEY_REGION, region); | ||
1715 | 390 | maybe_notify (self, LC_TIME, region); | ||
1716 | 391 | } | ||
1717 | 392 | @@ -545,7 +586,7 @@ | ||
1718 | 393 | CcRegionPanelPrivate *priv = self->priv; | ||
1719 | 394 | |||
1720 | 395 | g_free (priv->region); | ||
1721 | 396 | - priv->region = g_settings_get_string (priv->locale_settings, KEY_REGION); | ||
1722 | 397 | + priv->region = cc_common_language_get_property ("FormatsLocale"); | ||
1723 | 398 | update_region_label (self); | ||
1724 | 399 | } | ||
1725 | 400 | |||
1726 | 401 | @@ -576,14 +617,16 @@ | ||
1727 | 402 | { | ||
1728 | 403 | CcRegionPanelPrivate *priv = self->priv; | ||
1729 | 404 | const gchar *language; | ||
1730 | 405 | - | ||
1731 | 406 | - if (act_user_is_loaded (priv->user)) | ||
1732 | 407 | + const gchar *locale; | ||
1733 | 408 | + if (act_user_is_loaded (priv->user)){ | ||
1734 | 409 | language = act_user_get_language (priv->user); | ||
1735 | 410 | + cc_common_language_get_locale (language, &locale); | ||
1736 | 411 | + } | ||
1737 | 412 | else | ||
1738 | 413 | - language = "en_US.utf-8"; | ||
1739 | 414 | + locale = "en_US.UTF-8"; | ||
1740 | 415 | |||
1741 | 416 | g_free (priv->language); | ||
1742 | 417 | - priv->language = g_strdup (language); | ||
1743 | 418 | + priv->language = g_strdup (locale); | ||
1744 | 419 | update_language_label (self); | ||
1745 | 420 | } | ||
1746 | 421 | |||
1747 | 422 | @@ -1428,6 +1471,16 @@ | ||
1748 | 423 | update_buttons (self); | ||
1749 | 424 | } | ||
1750 | 425 | |||
1751 | 426 | +static gchar * | ||
1752 | 427 | +strip_quotes (const gchar *str) | ||
1753 | 428 | +{ | ||
1754 | 429 | + if ((g_str_has_prefix (str, "\"") && g_str_has_suffix (str, "\"")) | ||
1755 | 430 | + || (g_str_has_prefix (str, "'") && g_str_has_suffix (str, "'"))) | ||
1756 | 431 | + return g_strndup (str + 1, strlen (str) - 2); | ||
1757 | 432 | + else | ||
1758 | 433 | + return g_strdup (str); | ||
1759 | 434 | +} | ||
1760 | 435 | + | ||
1761 | 436 | static void | ||
1762 | 437 | on_localed_properties_changed (GDBusProxy *proxy, | ||
1763 | 438 | GVariant *changed_properties, | ||
1764 | 439 | @@ -1442,34 +1495,49 @@ | ||
1765 | 440 | const gchar **strv; | ||
1766 | 441 | gsize len; | ||
1767 | 442 | gint i; | ||
1768 | 443 | - const gchar *lang, *messages, *time; | ||
1769 | 444 | + gchar *lang, *language, *messages, *time; | ||
1770 | 445 | |||
1771 | 446 | strv = g_variant_get_strv (v, &len); | ||
1772 | 447 | |||
1773 | 448 | - lang = messages = time = NULL; | ||
1774 | 449 | + lang = language = messages = time = NULL; | ||
1775 | 450 | for (i = 0; strv[i]; i++) { | ||
1776 | 451 | if (g_str_has_prefix (strv[i], "LANG=")) { | ||
1777 | 452 | - lang = strv[i] + strlen ("LANG="); | ||
1778 | 453 | + lang = strip_quotes (strv[i] + strlen ("LANG=")); | ||
1779 | 454 | + } else if (g_str_has_prefix (strv[i], "LANGUAGE=")) { | ||
1780 | 455 | + gchar *tmp = strip_quotes (strv[i] + strlen ("LANGUAGE=")); | ||
1781 | 456 | + gchar **tokens = g_strsplit (tmp, ":", 2); | ||
1782 | 457 | + language = g_strdup (tokens[0]); | ||
1783 | 458 | + g_free (tmp); | ||
1784 | 459 | + g_strfreev (tokens); | ||
1785 | 460 | } else if (g_str_has_prefix (strv[i], "LC_MESSAGES=")) { | ||
1786 | 461 | - messages = strv[i] + strlen ("LC_MESSAGES="); | ||
1787 | 462 | + messages = strip_quotes (strv[i] + strlen ("LC_MESSAGES=")); | ||
1788 | 463 | } else if (g_str_has_prefix (strv[i], "LC_TIME=")) { | ||
1789 | 464 | - time = strv[i] + strlen ("LC_TIME="); | ||
1790 | 465 | + time = strip_quotes (strv[i] + strlen ("LC_TIME=")); | ||
1791 | 466 | } | ||
1792 | 467 | } | ||
1793 | 468 | + g_free (strv); | ||
1794 | 469 | + | ||
1795 | 470 | if (!lang) { | ||
1796 | 471 | - lang = ""; | ||
1797 | 472 | + lang = g_strdup ("en_US.UTF-8"); | ||
1798 | 473 | } | ||
1799 | 474 | - if (!messages) { | ||
1800 | 475 | - messages = lang; | ||
1801 | 476 | + if (!language) { | ||
1802 | 477 | + if (messages) | ||
1803 | 478 | + language = g_strdup (messages); | ||
1804 | 479 | + else | ||
1805 | 480 | + language = g_strdup (lang); | ||
1806 | 481 | } | ||
1807 | 482 | if (!time) { | ||
1808 | 483 | - time = lang; | ||
1809 | 484 | + time = g_strdup (lang); | ||
1810 | 485 | } | ||
1811 | 486 | g_free (priv->system_language); | ||
1812 | 487 | - priv->system_language = g_strdup (messages); | ||
1813 | 488 | + priv->system_language = g_strdup (language); | ||
1814 | 489 | g_free (priv->system_region); | ||
1815 | 490 | priv->system_region = g_strdup (time); | ||
1816 | 491 | g_variant_unref (v); | ||
1817 | 492 | + g_free (lang); | ||
1818 | 493 | + g_free (language); | ||
1819 | 494 | + g_free (messages); | ||
1820 | 495 | + g_free (time); | ||
1821 | 496 | |||
1822 | 497 | update_language_label (self); | ||
1823 | 498 | } | ||
1824 | 499 | @@ -1539,29 +1607,28 @@ | ||
1825 | 500 | CcRegionPanelPrivate *priv = self->priv; | ||
1826 | 501 | GVariantBuilder *b; | ||
1827 | 502 | gchar *s; | ||
1828 | 503 | + gchar *lang; | ||
1829 | 504 | + gint i; | ||
1830 | 505 | + | ||
1831 | 506 | + cc_common_language_get_locale (priv->system_language, &lang); | ||
1832 | 507 | |||
1833 | 508 | b = g_variant_builder_new (G_VARIANT_TYPE ("as")); | ||
1834 | 509 | - s = g_strconcat ("LANG=", priv->system_language, NULL); | ||
1835 | 510 | + s = g_strconcat ("LANG=", lang, NULL); | ||
1836 | 511 | g_variant_builder_add (b, "s", s); | ||
1837 | 512 | g_free (s); | ||
1838 | 513 | |||
1839 | 514 | - if (g_strcmp0 (priv->system_language, priv->system_region) != 0) { | ||
1840 | 515 | - s = g_strconcat ("LC_TIME=", priv->system_region, NULL); | ||
1841 | 516 | - g_variant_builder_add (b, "s", s); | ||
1842 | 517 | - g_free (s); | ||
1843 | 518 | - s = g_strconcat ("LC_NUMERIC=", priv->system_region, NULL); | ||
1844 | 519 | - g_variant_builder_add (b, "s", s); | ||
1845 | 520 | - g_free (s); | ||
1846 | 521 | - s = g_strconcat ("LC_MONETARY=", priv->system_region, NULL); | ||
1847 | 522 | - g_variant_builder_add (b, "s", s); | ||
1848 | 523 | - g_free (s); | ||
1849 | 524 | - s = g_strconcat ("LC_MEASUREMENT=", priv->system_region, NULL); | ||
1850 | 525 | - g_variant_builder_add (b, "s", s); | ||
1851 | 526 | - g_free (s); | ||
1852 | 527 | - s = g_strconcat ("LC_PAPER=", priv->system_region, NULL); | ||
1853 | 528 | + s = g_strconcat ("LANGUAGE=", priv->system_language, NULL); | ||
1854 | 529 | + g_variant_builder_add (b, "s", s); | ||
1855 | 530 | + g_free (s); | ||
1856 | 531 | + const gchar *format_categories[] = { "LC_NUMERIC", "LC_TIME", | ||
1857 | 532 | + "LC_MONETARY", "LC_PAPER", "LC_IDENTIFICATION", "LC_NAME", | ||
1858 | 533 | + "LC_ADDRESS", "LC_TELEPHONE", "LC_MEASUREMENT", NULL }; | ||
1859 | 534 | + for (i = 0; format_categories[i] != NULL; i++) { | ||
1860 | 535 | + s = g_strconcat (format_categories[i], "=", priv->system_region, NULL); | ||
1861 | 536 | g_variant_builder_add (b, "s", s); | ||
1862 | 537 | g_free (s); | ||
1863 | 538 | } | ||
1864 | 539 | + | ||
1865 | 540 | g_dbus_proxy_call (priv->localed, | ||
1866 | 541 | "SetLocale", | ||
1867 | 542 | g_variant_new ("(asb)", b, TRUE), | ||
1868 | 543 | --- a/panels/user-accounts/um-user-panel.c | ||
1869 | 544 | +++ b/panels/user-accounts/um-user-panel.c | ||
1870 | 545 | @@ -697,8 +697,9 @@ | ||
1871 | 546 | cc_common_language_add_user_languages (model); | ||
1872 | 547 | |||
1873 | 548 | lang = g_strdup (act_user_get_language (user)); | ||
1874 | 549 | + cc_common_language_get_locale (lang, &lang); | ||
1875 | 550 | if (!lang) | ||
1876 | 551 | - lang = cc_common_language_get_current_language (); | ||
1877 | 552 | + lang = cc_common_language_get_property ("Language"); | ||
1878 | 553 | if (cc_common_language_get_iter_for_language (model, lang, &iter)) | ||
1879 | 554 | um_editable_combo_set_active_iter (UM_EDITABLE_COMBO (widget), &iter); | ||
1880 | 555 | g_free (lang); | ||
1881 | 556 | @@ -824,8 +825,9 @@ | ||
1882 | 557 | } | ||
1883 | 558 | else { | ||
1884 | 559 | lang = g_strdup (act_user_get_language (user)); | ||
1885 | 560 | + cc_common_language_get_locale (lang, &lang); | ||
1886 | 561 | if (!lang) { | ||
1887 | 562 | - lang = cc_common_language_get_current_language (); | ||
1888 | 563 | + lang = cc_common_language_get_property ("Language"); | ||
1889 | 564 | } | ||
1890 | 565 | } | ||
1891 | 566 | cc_common_language_get_iter_for_language (model, lang, &iter); | ||
1892 | 567 | @@ -845,6 +847,7 @@ | ||
1893 | 568 | GtkTreeModel *model; | ||
1894 | 569 | GtkTreeIter iter; | ||
1895 | 570 | gchar *lang; | ||
1896 | 571 | + gchar *locale; | ||
1897 | 572 | ActUser *user; | ||
1898 | 573 | |||
1899 | 574 | if (!um_editable_combo_get_active_iter (combo, &iter)) | ||
1900 | 575 | @@ -855,8 +858,10 @@ | ||
1901 | 576 | model = um_editable_combo_get_model (combo); | ||
1902 | 577 | |||
1903 | 578 | gtk_tree_model_get (model, &iter, 0, &lang, -1); | ||
1904 | 579 | + cc_common_language_get_locale(act_user_get_language (user),&locale); | ||
1905 | 580 | + | ||
1906 | 581 | if (lang) { | ||
1907 | 582 | - if (g_strcmp0 (lang, act_user_get_language (user)) != 0) { | ||
1908 | 583 | + if (g_strcmp0 (lang, locale) != 0) { | ||
1909 | 584 | act_user_set_language (user, lang); | ||
1910 | 585 | } | ||
1911 | 586 | g_free (lang); | ||
1912 | 0 | 587 | ||
1913 | === removed file 'debian/patches/52_region_language.patch' | |||
1914 | --- debian/patches/52_region_language.patch 2013-07-05 22:08:12 +0000 | |||
1915 | +++ debian/patches/52_region_language.patch 1970-01-01 00:00:00 +0000 | |||
1916 | @@ -1,652 +0,0 @@ | |||
1917 | 1 | Description: Adapts the region capplet and the language chooser in the user accounts capplet | ||
1918 | 2 | Forwarded: https://bugzilla.gnome.org/695939, https://bugzilla.gnome.org/695940 | ||
1919 | 3 | Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com> | ||
1920 | 4 | Last-Update: 2013-03-21 | ||
1921 | 5 | |||
1922 | 6 | Some background that explains the need for this patch: | ||
1923 | 7 | |||
1924 | 8 | * Ubuntu isn't shipped with all languages installed and all locales generated. | ||
1925 | 9 | Instead the users install the needed language pack(s), and the corresponding | ||
1926 | 10 | locales are generated. | ||
1927 | 11 | |||
1928 | 12 | * The code in accountsservice for handling languages has been extended via Ubuntu | ||
1929 | 13 | specific patches. That code is shared by multiple packages. Currently those | ||
1930 | 14 | packages are: | ||
1931 | 15 | - gnome-control-center | ||
1932 | 16 | - language-selector (Xubuntu and Lubuntu will keep using the language-selector | ||
1933 | 17 | UI for now) | ||
1934 | 18 | - lightdm (for the language chooser in lightdm-gtk-greeter) | ||
1935 | 19 | |||
1936 | 20 | With this patch applied, the g-c-c region capplet and the language chooser in the | ||
1937 | 21 | user accounts capplet behave approximately the same way as language-selector. No | ||
1938 | 22 | migration code needed when standard Ubuntu drops the language-selector UI. | ||
1939 | 23 | |||
1940 | 24 | Compared with how the region capplet in g-c-c works out of the box, this patch | ||
1941 | 25 | results in: | ||
1942 | 26 | |||
1943 | 27 | * Languages are dealt with using 'll' and 'll_CC' language codes instead of | ||
1944 | 28 | complete locale names. | ||
1945 | 29 | |||
1946 | 30 | * Selected language is stored in both LANGUAGE and LANG. | ||
1947 | 31 | |||
1948 | 32 | * Only one language list that shows the translations belonging to the installed | ||
1949 | 33 | language packs (not a 'short' and a 'long' list). | ||
1950 | 34 | |||
1951 | 35 | * User level settings of language and regional formats are stored as | ||
1952 | 36 | accountsservice properties and in ~/.pam_environment. | ||
1953 | 37 | |||
1954 | 38 | * All the formats related locale categories set, not just a subset. | ||
1955 | 39 | |||
1956 | 40 | * Translation @variants, e.g. ca@valencia, are displayed properly. | ||
1957 | 41 | |||
1958 | 42 | * Locales stored with codeset '.UTF-8' instead of '.utf8'. | ||
1959 | 43 | |||
1960 | 44 | * The 'common_name' field taken into account when parsing the iso-codes XML files | ||
1961 | 45 | for language names. | ||
1962 | 46 | |||
1963 | 47 | Index: gnome-control-center-3.6.3/panels/common/cc-common-language.c | ||
1964 | 48 | =================================================================== | ||
1965 | 49 | --- gnome-control-center-3.6.3.orig/panels/common/cc-common-language.c 2013-03-15 17:20:48.939849976 +0100 | ||
1966 | 50 | +++ gnome-control-center-3.6.3/panels/common/cc-common-language.c 2013-03-21 14:22:09.358586554 +0100 | ||
1967 | 51 | @@ -326,6 +326,66 @@ | ||
1968 | 52 | return language; | ||
1969 | 53 | } | ||
1970 | 54 | |||
1971 | 55 | +gchar * | ||
1972 | 56 | +cc_common_language_get_property (const gchar *prop_name) | ||
1973 | 57 | +{ | ||
1974 | 58 | + GDBusConnection *bus; | ||
1975 | 59 | + gchar *user_path; | ||
1976 | 60 | + GError *error = NULL; | ||
1977 | 61 | + GVariant *properties; | ||
1978 | 62 | + GVariantIter *iter; | ||
1979 | 63 | + gchar *key; | ||
1980 | 64 | + GVariant *value; | ||
1981 | 65 | + gchar *ret = NULL; | ||
1982 | 66 | + | ||
1983 | 67 | + if (g_strcmp0 (prop_name, "Language") != 0 && g_strcmp0 (prop_name, "FormatsLocale") != 0) { | ||
1984 | 68 | + g_warning ("Invalid argument: '%s'", prop_name); | ||
1985 | 69 | + return ret; | ||
1986 | 70 | + } | ||
1987 | 71 | + | ||
1988 | 72 | + bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); | ||
1989 | 73 | + user_path = g_strdup_printf ("/org/freedesktop/Accounts/User%i", getuid ()); | ||
1990 | 74 | + | ||
1991 | 75 | + properties = g_dbus_connection_call_sync (bus, | ||
1992 | 76 | + "org.freedesktop.Accounts", | ||
1993 | 77 | + user_path, | ||
1994 | 78 | + "org.freedesktop.DBus.Properties", | ||
1995 | 79 | + "GetAll", | ||
1996 | 80 | + g_variant_new ("(s)", "org.freedesktop.Accounts.User"), | ||
1997 | 81 | + G_VARIANT_TYPE ("(a{sv})"), | ||
1998 | 82 | + G_DBUS_CALL_FLAGS_NONE, | ||
1999 | 83 | + -1, | ||
2000 | 84 | + NULL, | ||
2001 | 85 | + &error); | ||
2002 | 86 | + if (!properties) { | ||
2003 | 87 | + g_warning ("Error calling GetAll() when retrieving properties for %s: %s", user_path, error->message); | ||
2004 | 88 | + g_error_free (error); | ||
2005 | 89 | + /* g_hash_table_lookup() is not NULL-safe, so don't return NULL */ | ||
2006 | 90 | + if (g_strcmp0 (prop_name, "Language") == 0) | ||
2007 | 91 | + ret = g_strdup ("en"); | ||
2008 | 92 | + else | ||
2009 | 93 | + ret = g_strdup ("en_US.UTF-8"); | ||
2010 | 94 | + goto out; | ||
2011 | 95 | + } | ||
2012 | 96 | + | ||
2013 | 97 | + g_variant_get (properties, "(a{sv})", &iter); | ||
2014 | 98 | + while (g_variant_iter_loop (iter, "{&sv}", &key, &value)) { | ||
2015 | 99 | + if (g_strcmp0 (key, prop_name) == 0) { | ||
2016 | 100 | + g_variant_get (value, "s", &ret); | ||
2017 | 101 | + break; | ||
2018 | 102 | + } | ||
2019 | 103 | + } | ||
2020 | 104 | + | ||
2021 | 105 | + g_variant_unref (properties); | ||
2022 | 106 | + g_variant_iter_free (iter); | ||
2023 | 107 | + | ||
2024 | 108 | +out: | ||
2025 | 109 | + g_object_unref (bus); | ||
2026 | 110 | + g_free (user_path); | ||
2027 | 111 | + | ||
2028 | 112 | + return ret; | ||
2029 | 113 | +} | ||
2030 | 114 | + | ||
2031 | 115 | static void | ||
2032 | 116 | languages_foreach_cb (gpointer key, | ||
2033 | 117 | gpointer value, | ||
2034 | 118 | @@ -407,7 +467,7 @@ | ||
2035 | 119 | char *lang; | ||
2036 | 120 | gboolean found; | ||
2037 | 121 | |||
2038 | 122 | - lang = cc_common_language_get_current_language (); | ||
2039 | 123 | + lang = cc_common_language_get_property ("Language"); | ||
2040 | 124 | g_debug ("Trying to select lang '%s' in treeview", lang); | ||
2041 | 125 | model = gtk_tree_view_get_model (treeview); | ||
2042 | 126 | found = FALSE; | ||
2043 | 127 | @@ -440,6 +500,7 @@ | ||
2044 | 128 | g_warning ("Could not find current language '%s' in the treeview", lang); | ||
2045 | 129 | } | ||
2046 | 130 | |||
2047 | 131 | +/* | ||
2048 | 132 | static void | ||
2049 | 133 | add_other_users_language (GHashTable *ht) | ||
2050 | 134 | { | ||
2051 | 135 | @@ -519,6 +580,7 @@ | ||
2052 | 136 | |||
2053 | 137 | g_object_unref (proxy); | ||
2054 | 138 | } | ||
2055 | 139 | +*/ | ||
2056 | 140 | |||
2057 | 141 | GHashTable * | ||
2058 | 142 | cc_common_language_get_initial_languages (void) | ||
2059 | 143 | @@ -530,6 +592,7 @@ | ||
2060 | 144 | ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); | ||
2061 | 145 | |||
2062 | 146 | /* Add some common languages first */ | ||
2063 | 147 | +/* | ||
2064 | 148 | g_hash_table_insert (ht, g_strdup ("en_US.utf8"), g_strdup (_("English"))); | ||
2065 | 149 | if (gdm_language_has_translations ("en_GB")) | ||
2066 | 150 | g_hash_table_insert (ht, g_strdup ("en_GB.utf8"), g_strdup (_("British English"))); | ||
2067 | 151 | @@ -550,12 +613,29 @@ | ||
2068 | 152 | if (gdm_language_has_translations ("ar") || | ||
2069 | 153 | gdm_language_has_translations ("ar_EG")) | ||
2070 | 154 | g_hash_table_insert (ht, g_strdup ("ar_EG.utf8"), g_strdup (_("Arabic"))); | ||
2071 | 155 | - | ||
2072 | 156 | +*/ | ||
2073 | 157 | /* Add the languages used by other users on the system */ | ||
2074 | 158 | - add_other_users_language (ht); | ||
2075 | 159 | +// add_other_users_language (ht); | ||
2076 | 160 | + | ||
2077 | 161 | + /* Add installed languages */ | ||
2078 | 162 | + gchar *avail_languages; | ||
2079 | 163 | + GError *error = NULL; | ||
2080 | 164 | + if (g_spawn_command_line_sync ("/usr/share/language-tools/language-options", | ||
2081 | 165 | + &avail_languages, NULL, NULL, &error)) { | ||
2082 | 166 | + name = strtok (avail_languages, "\n"); | ||
2083 | 167 | + while (name != NULL) { | ||
2084 | 168 | + language = gdm_get_language_from_name (name, NULL); | ||
2085 | 169 | + g_hash_table_insert (ht, g_strdup (name), language); | ||
2086 | 170 | + name = strtok (NULL, "\n"); | ||
2087 | 171 | + } | ||
2088 | 172 | + g_free (avail_languages); | ||
2089 | 173 | + } else { | ||
2090 | 174 | + g_warning ("Couldn't get available languages: %s", error->message); | ||
2091 | 175 | + g_error_free (error); | ||
2092 | 176 | + } | ||
2093 | 177 | |||
2094 | 178 | - /* Add current locale */ | ||
2095 | 179 | - name = cc_common_language_get_current_language (); | ||
2096 | 180 | + /* Add current language */ | ||
2097 | 181 | + name = cc_common_language_get_property ("Language"); | ||
2098 | 182 | if (g_hash_table_lookup (ht, name) == NULL) { | ||
2099 | 183 | language = gdm_get_language_from_name (name, NULL); | ||
2100 | 184 | g_hash_table_insert (ht, name, language); | ||
2101 | 185 | Index: gnome-control-center-3.6.3/panels/common/cc-common-language.h | ||
2102 | 186 | =================================================================== | ||
2103 | 187 | --- gnome-control-center-3.6.3.orig/panels/common/cc-common-language.h 2013-03-15 17:20:48.939849976 +0100 | ||
2104 | 188 | +++ gnome-control-center-3.6.3/panels/common/cc-common-language.h 2013-03-15 17:20:48.903849975 +0100 | ||
2105 | 189 | @@ -45,6 +45,7 @@ | ||
2106 | 190 | GHashTable *user_langs); | ||
2107 | 191 | gboolean cc_common_language_has_font (const gchar *locale); | ||
2108 | 192 | gchar *cc_common_language_get_current_language (void); | ||
2109 | 193 | +gchar *cc_common_language_get_property (const gchar *prop_name); | ||
2110 | 194 | |||
2111 | 195 | GHashTable *cc_common_language_get_initial_languages (void); | ||
2112 | 196 | GHashTable *cc_common_language_get_initial_regions (const gchar *lang); | ||
2113 | 197 | Index: gnome-control-center-3.6.3/panels/common/cc-language-chooser.c | ||
2114 | 198 | =================================================================== | ||
2115 | 199 | --- gnome-control-center-3.6.3.orig/panels/common/cc-language-chooser.c 2013-03-15 17:20:48.939849976 +0100 | ||
2116 | 200 | +++ gnome-control-center-3.6.3/panels/common/cc-language-chooser.c 2013-03-15 17:20:48.919849976 +0100 | ||
2117 | 201 | @@ -105,8 +105,8 @@ | ||
2118 | 202 | |||
2119 | 203 | user_langs = cc_common_language_get_initial_languages (); | ||
2120 | 204 | |||
2121 | 205 | - /* Add the current locale first */ | ||
2122 | 206 | - name = cc_common_language_get_current_language (); | ||
2123 | 207 | + /* Add the current language first */ | ||
2124 | 208 | + name = cc_common_language_get_property ("Language"); | ||
2125 | 209 | display = g_hash_table_lookup (user_langs, name); | ||
2126 | 210 | |||
2127 | 211 | gtk_list_store_append (store, &iter); | ||
2128 | 212 | @@ -118,8 +118,8 @@ | ||
2129 | 213 | g_hash_table_foreach (user_langs, (GHFunc) languages_foreach_cb, store); | ||
2130 | 214 | |||
2131 | 215 | /* And now the "Other..." selection */ | ||
2132 | 216 | - gtk_list_store_append (store, &iter); | ||
2133 | 217 | - gtk_list_store_set (store, &iter, LOCALE_COL, NULL, DISPLAY_LOCALE_COL, _("Other..."), -1); | ||
2134 | 218 | +// gtk_list_store_append (store, &iter); | ||
2135 | 219 | +// gtk_list_store_set (store, &iter, LOCALE_COL, NULL, DISPLAY_LOCALE_COL, _("Other..."), -1); | ||
2136 | 220 | |||
2137 | 221 | g_hash_table_destroy (user_langs); | ||
2138 | 222 | } | ||
2139 | 223 | Index: gnome-control-center-3.6.3/panels/common/gdm-languages.c | ||
2140 | 224 | =================================================================== | ||
2141 | 225 | --- gnome-control-center-3.6.3.orig/panels/common/gdm-languages.c 2013-03-15 17:20:48.939849976 +0100 | ||
2142 | 226 | +++ gnome-control-center-3.6.3/panels/common/gdm-languages.c 2013-03-15 17:20:48.923849976 +0100 | ||
2143 | 227 | @@ -224,6 +224,7 @@ | ||
2144 | 228 | const char *codeset, | ||
2145 | 229 | const char *modifier) | ||
2146 | 230 | { | ||
2147 | 231 | + const char *adj_codeset; | ||
2148 | 232 | char *name; | ||
2149 | 233 | |||
2150 | 234 | g_assert (language[0] != 0); | ||
2151 | 235 | @@ -231,12 +232,17 @@ | ||
2152 | 236 | g_assert (codeset == NULL || codeset[0] != 0); | ||
2153 | 237 | g_assert (modifier == NULL || modifier[0] != 0); | ||
2154 | 238 | |||
2155 | 239 | + if (g_strcmp0 (codeset, "utf8") == 0) { | ||
2156 | 240 | + adj_codeset = "UTF-8"; | ||
2157 | 241 | + } else | ||
2158 | 242 | + adj_codeset = codeset; | ||
2159 | 243 | + | ||
2160 | 244 | name = g_strdup_printf ("%s%s%s%s%s%s%s", | ||
2161 | 245 | language, | ||
2162 | 246 | territory != NULL? "_" : "", | ||
2163 | 247 | territory != NULL? territory : "", | ||
2164 | 248 | codeset != NULL? "." : "", | ||
2165 | 249 | - codeset != NULL? codeset : "", | ||
2166 | 250 | + codeset != NULL? adj_codeset : "", | ||
2167 | 251 | modifier != NULL? "@" : "", | ||
2168 | 252 | modifier != NULL? modifier : ""); | ||
2169 | 253 | |||
2170 | 254 | @@ -854,6 +860,7 @@ | ||
2171 | 255 | const char *ccode_longT; | ||
2172 | 256 | const char *ccode; | ||
2173 | 257 | const char *ccode_id; | ||
2174 | 258 | + const char *lang_common_name; | ||
2175 | 259 | const char *lang_name; | ||
2176 | 260 | |||
2177 | 261 | if (! (g_str_equal (element_name, "iso_639_entry") || g_str_equal (element_name, "iso_639_3_entry")) | ||
2178 | 262 | @@ -865,6 +872,7 @@ | ||
2179 | 263 | ccode_longB = NULL; | ||
2180 | 264 | ccode_longT = NULL; | ||
2181 | 265 | ccode_id = NULL; | ||
2182 | 266 | + lang_common_name = NULL; | ||
2183 | 267 | lang_name = NULL; | ||
2184 | 268 | |||
2185 | 269 | while (*attr_names && *attr_values) { | ||
2186 | 270 | @@ -901,6 +909,11 @@ | ||
2187 | 271 | } | ||
2188 | 272 | ccode_id = *attr_values; | ||
2189 | 273 | } | ||
2190 | 274 | + } else if (g_str_equal (*attr_names, "common_name")) { | ||
2191 | 275 | + /* skip if empty */ | ||
2192 | 276 | + if (**attr_values) { | ||
2193 | 277 | + lang_common_name = *attr_values; | ||
2194 | 278 | + } | ||
2195 | 279 | } else if (g_str_equal (*attr_names, "name")) { | ||
2196 | 280 | lang_name = *attr_values; | ||
2197 | 281 | } | ||
2198 | 282 | @@ -909,6 +922,10 @@ | ||
2199 | 283 | ++attr_values; | ||
2200 | 284 | } | ||
2201 | 285 | |||
2202 | 286 | + if (lang_common_name != NULL) { | ||
2203 | 287 | + lang_name = lang_common_name; | ||
2204 | 288 | + } | ||
2205 | 289 | + | ||
2206 | 290 | if (lang_name == NULL) { | ||
2207 | 291 | return; | ||
2208 | 292 | } | ||
2209 | 293 | @@ -1131,6 +1148,7 @@ | ||
2210 | 294 | char *langinfo_codeset; | ||
2211 | 295 | char *translated_language; | ||
2212 | 296 | char *translated_territory; | ||
2213 | 297 | + char *modifier; | ||
2214 | 298 | gboolean is_utf8 = TRUE; | ||
2215 | 299 | |||
2216 | 300 | g_return_val_if_fail (name != NULL, NULL); | ||
2217 | 301 | @@ -1153,12 +1171,13 @@ | ||
2218 | 302 | language_code = NULL; | ||
2219 | 303 | territory_code = NULL; | ||
2220 | 304 | codeset_code = NULL; | ||
2221 | 305 | + modifier = NULL; | ||
2222 | 306 | |||
2223 | 307 | gdm_parse_language_name (name, | ||
2224 | 308 | &language_code, | ||
2225 | 309 | &territory_code, | ||
2226 | 310 | &codeset_code, | ||
2227 | 311 | - NULL); | ||
2228 | 312 | + &modifier); | ||
2229 | 313 | |||
2230 | 314 | if (language_code == NULL) { | ||
2231 | 315 | goto out; | ||
2232 | 316 | @@ -1184,7 +1203,7 @@ | ||
2233 | 317 | translated_territory); | ||
2234 | 318 | } | ||
2235 | 319 | |||
2236 | 320 | - language_name_get_codeset_details (name, &langinfo_codeset, &is_utf8); | ||
2237 | 321 | +// language_name_get_codeset_details (name, &langinfo_codeset, &is_utf8); | ||
2238 | 322 | |||
2239 | 323 | if (codeset_code == NULL && langinfo_codeset != NULL) { | ||
2240 | 324 | codeset_code = g_strdup (langinfo_codeset); | ||
2241 | 325 | @@ -1196,6 +1215,10 @@ | ||
2242 | 326 | codeset_code); | ||
2243 | 327 | } | ||
2244 | 328 | |||
2245 | 329 | + if (modifier != NULL) { | ||
2246 | 330 | + g_string_append_printf (full_language, " - %s", modifier); | ||
2247 | 331 | + } | ||
2248 | 332 | + | ||
2249 | 333 | out: | ||
2250 | 334 | g_free (language_code); | ||
2251 | 335 | g_free (territory_code); | ||
2252 | 336 | @@ -1203,6 +1226,7 @@ | ||
2253 | 337 | g_free (langinfo_codeset); | ||
2254 | 338 | g_free (translated_language); | ||
2255 | 339 | g_free (translated_territory); | ||
2256 | 340 | + g_free (modifier); | ||
2257 | 341 | |||
2258 | 342 | if (full_language->len == 0) { | ||
2259 | 343 | g_string_free (full_language, TRUE); | ||
2260 | 344 | Index: gnome-control-center-3.6.3/panels/region/gnome-region-panel-formats.c | ||
2261 | 345 | =================================================================== | ||
2262 | 346 | --- gnome-control-center-3.6.3.orig/panels/region/gnome-region-panel-formats.c 2013-03-15 17:20:48.939849976 +0100 | ||
2263 | 347 | +++ gnome-control-center-3.6.3/panels/region/gnome-region-panel-formats.c 2013-03-15 17:20:48.927849976 +0100 | ||
2264 | 348 | @@ -31,6 +31,7 @@ | ||
2265 | 349 | #include "cc-language-chooser.h" | ||
2266 | 350 | #include "gdm-languages.h" | ||
2267 | 351 | #include "gnome-region-panel-formats.h" | ||
2268 | 352 | +#include "gnome-region-panel-system.h" | ||
2269 | 353 | |||
2270 | 354 | static void | ||
2271 | 355 | display_date (GtkLabel *label, GDateTime *dt, const gchar *format) | ||
2272 | 356 | @@ -149,6 +150,46 @@ | ||
2273 | 357 | g_free (active_id); | ||
2274 | 358 | } | ||
2275 | 359 | |||
2276 | 360 | +static void | ||
2277 | 361 | +set_formats_locale (const gchar *formats_locale) | ||
2278 | 362 | +{ | ||
2279 | 363 | + GDBusProxy *proxy; | ||
2280 | 364 | + GError *error = NULL; | ||
2281 | 365 | + gchar *user_path; | ||
2282 | 366 | + GVariant *ret; | ||
2283 | 367 | + | ||
2284 | 368 | + user_path = g_strdup_printf ("/org/freedesktop/Accounts/User%i", getuid ()); | ||
2285 | 369 | + proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, | ||
2286 | 370 | + G_DBUS_PROXY_FLAGS_NONE, | ||
2287 | 371 | + NULL, | ||
2288 | 372 | + "org.freedesktop.Accounts", | ||
2289 | 373 | + user_path, | ||
2290 | 374 | + "org.freedesktop.Accounts.User", | ||
2291 | 375 | + NULL, | ||
2292 | 376 | + &error); | ||
2293 | 377 | + if (!proxy) { | ||
2294 | 378 | + g_warning ("Couldn't get accountsservice proxy for %s: %s", user_path, error->message); | ||
2295 | 379 | + g_error_free (error); | ||
2296 | 380 | + g_free (user_path); | ||
2297 | 381 | + return; | ||
2298 | 382 | + } | ||
2299 | 383 | + | ||
2300 | 384 | + ret = g_dbus_proxy_call_sync (proxy, | ||
2301 | 385 | + "SetFormatsLocale", | ||
2302 | 386 | + g_variant_new ("(s)", formats_locale), | ||
2303 | 387 | + G_DBUS_CALL_FLAGS_NONE, | ||
2304 | 388 | + -1, | ||
2305 | 389 | + NULL, | ||
2306 | 390 | + &error); | ||
2307 | 391 | + if (!ret) { | ||
2308 | 392 | + g_warning ("Couldn't set FormatsLocale: %s", error->message); | ||
2309 | 393 | + g_error_free (error); | ||
2310 | 394 | + } else | ||
2311 | 395 | + g_variant_unref (ret); | ||
2312 | 396 | + | ||
2313 | 397 | + g_object_unref (proxy); | ||
2314 | 398 | + g_free (user_path); | ||
2315 | 399 | +} | ||
2316 | 400 | |||
2317 | 401 | static void | ||
2318 | 402 | update_settings_cb (GtkTreeSelection *selection, gpointer user_data) | ||
2319 | 403 | @@ -159,7 +200,6 @@ | ||
2320 | 404 | gchar *active_id; | ||
2321 | 405 | GtkWidget *treeview; | ||
2322 | 406 | GSettings *locale_settings; | ||
2323 | 407 | - gchar *current_setting; | ||
2324 | 408 | |||
2325 | 409 | if (!gtk_tree_selection_get_selected (selection, &model, &iter)) { | ||
2326 | 410 | return; | ||
2327 | 411 | @@ -169,13 +209,10 @@ | ||
2328 | 412 | treeview = GTK_WIDGET (gtk_builder_get_object (builder, "region_selector")); | ||
2329 | 413 | |||
2330 | 414 | locale_settings = g_object_get_data (G_OBJECT (treeview), "settings"); | ||
2331 | 415 | - current_setting = g_settings_get_string (locale_settings, "region"); | ||
2332 | 416 | |||
2333 | 417 | - if (g_strcmp0 (active_id, current_setting) != 0) { | ||
2334 | 418 | - g_settings_set_string (locale_settings, "region", active_id); | ||
2335 | 419 | - } | ||
2336 | 420 | + set_formats_locale (active_id); | ||
2337 | 421 | + locale_settings_changed (locale_settings, NULL, builder); | ||
2338 | 422 | |||
2339 | 423 | - g_free (current_setting); | ||
2340 | 424 | g_free (active_id); | ||
2341 | 425 | } | ||
2342 | 426 | |||
2343 | 427 | @@ -184,7 +221,7 @@ | ||
2344 | 428 | { | ||
2345 | 429 | gchar *current_setting; | ||
2346 | 430 | |||
2347 | 431 | - current_setting = g_settings_get_string (locale_settings, "region"); | ||
2348 | 432 | + current_setting = cc_common_language_get_property ("FormatsLocale"); | ||
2349 | 433 | select_region (treeview, current_setting); | ||
2350 | 434 | g_free (current_setting); | ||
2351 | 435 | } | ||
2352 | 436 | @@ -213,7 +250,6 @@ | ||
2353 | 437 | populate_regions (GtkBuilder *builder, const gchar *current_lang) | ||
2354 | 438 | { | ||
2355 | 439 | gchar *current_region; | ||
2356 | 440 | - GSettings *locale_settings; | ||
2357 | 441 | GHashTable *ht; | ||
2358 | 442 | GHashTableIter htiter; | ||
2359 | 443 | GtkTreeModel *model; | ||
2360 | 444 | @@ -228,11 +264,10 @@ | ||
2361 | 445 | g_signal_handlers_block_by_func (selection, update_settings_cb, builder); | ||
2362 | 446 | |||
2363 | 447 | model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview)); | ||
2364 | 448 | - locale_settings = g_object_get_data (G_OBJECT (treeview), "settings"); | ||
2365 | 449 | |||
2366 | 450 | ht = cc_common_language_get_initial_regions (current_lang); | ||
2367 | 451 | |||
2368 | 452 | - current_region = g_settings_get_string (locale_settings, "region"); | ||
2369 | 453 | + current_region = cc_common_language_get_property ("FormatsLocale"); | ||
2370 | 454 | if (!current_region || !current_region[0]) { | ||
2371 | 455 | current_region = g_strdup (current_lang); | ||
2372 | 456 | } | ||
2373 | 457 | Index: gnome-control-center-3.6.3/panels/region/gnome-region-panel-system.c | ||
2374 | 458 | =================================================================== | ||
2375 | 459 | --- gnome-control-center-3.6.3.orig/panels/region/gnome-region-panel-system.c 2013-03-15 17:20:48.939849976 +0100 | ||
2376 | 460 | +++ gnome-control-center-3.6.3/panels/region/gnome-region-panel-system.c 2013-03-15 17:48:09.379904608 +0100 | ||
2377 | 461 | @@ -88,7 +88,7 @@ | ||
2378 | 462 | gtk_widget_set_sensitive (button, TRUE); | ||
2379 | 463 | } | ||
2380 | 464 | |||
2381 | 465 | -static void | ||
2382 | 466 | +void | ||
2383 | 467 | locale_settings_changed (GSettings *settings, | ||
2384 | 468 | const gchar *key, | ||
2385 | 469 | GtkBuilder *dialog) | ||
2386 | 470 | @@ -96,7 +96,7 @@ | ||
2387 | 471 | GtkWidget *label; | ||
2388 | 472 | gchar *region, *display_region; | ||
2389 | 473 | |||
2390 | 474 | - region = g_settings_get_string (locale_settings, "region"); | ||
2391 | 475 | + region = cc_common_language_get_property ("FormatsLocale"); | ||
2392 | 476 | if (!region || !region[0]) { | ||
2393 | 477 | label = WID ("user_display_language"); | ||
2394 | 478 | region = g_strdup ((gchar*)g_object_get_data (G_OBJECT (label), "language")); | ||
2395 | 479 | @@ -216,6 +216,16 @@ | ||
2396 | 480 | } | ||
2397 | 481 | } | ||
2398 | 482 | |||
2399 | 483 | +static gchar * | ||
2400 | 484 | +strip_quotes (const gchar *str) | ||
2401 | 485 | +{ | ||
2402 | 486 | + if ((g_str_has_prefix (str, "\"") && g_str_has_suffix (str, "\"")) | ||
2403 | 487 | + || (g_str_has_prefix (str, "'") && g_str_has_suffix (str, "'"))) | ||
2404 | 488 | + return g_strndup (str + 1, strlen (str) - 2); | ||
2405 | 489 | + else | ||
2406 | 490 | + return g_strdup (str); | ||
2407 | 491 | +} | ||
2408 | 492 | + | ||
2409 | 493 | static void | ||
2410 | 494 | on_localed_properties_changed (GDBusProxy *proxy, | ||
2411 | 495 | GVariant *changed_properties, | ||
2412 | 496 | @@ -244,33 +254,43 @@ | ||
2413 | 497 | const gchar **strv; | ||
2414 | 498 | gsize len; | ||
2415 | 499 | gint i; | ||
2416 | 500 | - const gchar *lang, *messages, *time; | ||
2417 | 501 | + gchar *lang, *language, *messages, *time; | ||
2418 | 502 | gchar *name; | ||
2419 | 503 | GtkWidget *label; | ||
2420 | 504 | |||
2421 | 505 | strv = g_variant_get_strv (v, &len); | ||
2422 | 506 | |||
2423 | 507 | - lang = messages = time = NULL; | ||
2424 | 508 | + lang = language = messages = time = NULL; | ||
2425 | 509 | for (i = 0; strv[i]; i++) { | ||
2426 | 510 | if (g_str_has_prefix (strv[i], "LANG=")) { | ||
2427 | 511 | - lang = strv[i] + strlen ("LANG="); | ||
2428 | 512 | + lang = strip_quotes (strv[i] + strlen ("LANG=")); | ||
2429 | 513 | + } | ||
2430 | 514 | + else if (g_str_has_prefix (strv[i], "LANGUAGE=")) { | ||
2431 | 515 | + gchar *tmp = strip_quotes (strv[i] + strlen ("LANGUAGE=")); | ||
2432 | 516 | + gchar **tokens = g_strsplit (tmp, ":", 2); | ||
2433 | 517 | + language = g_strdup (tokens[0]); | ||
2434 | 518 | + g_free (tmp); | ||
2435 | 519 | + g_strfreev (tokens); | ||
2436 | 520 | } | ||
2437 | 521 | else if (g_str_has_prefix (strv[i], "LC_MESSAGES=")) { | ||
2438 | 522 | - messages = strv[i] + strlen ("LC_MESSAGES="); | ||
2439 | 523 | + messages = strip_quotes (strv[i] + strlen ("LC_MESSAGES=")); | ||
2440 | 524 | } | ||
2441 | 525 | else if (g_str_has_prefix (strv[i], "LC_TIME=")) { | ||
2442 | 526 | - time = strv[i] + strlen ("LC_TIME="); | ||
2443 | 527 | + time = strip_quotes (strv[i] + strlen ("LC_TIME=")); | ||
2444 | 528 | } | ||
2445 | 529 | } | ||
2446 | 530 | - if (!messages) { | ||
2447 | 531 | - messages = lang; | ||
2448 | 532 | + if (!language) { | ||
2449 | 533 | + if (messages) | ||
2450 | 534 | + language = g_strdup (messages); | ||
2451 | 535 | + else | ||
2452 | 536 | + language = g_strdup (lang); | ||
2453 | 537 | } | ||
2454 | 538 | if (!time) { | ||
2455 | 539 | - time = lang; | ||
2456 | 540 | + time = g_strdup (lang); | ||
2457 | 541 | } | ||
2458 | 542 | |||
2459 | 543 | - if (messages) { | ||
2460 | 544 | - name = gdm_get_language_from_name (messages, NULL); | ||
2461 | 545 | + if (language) { | ||
2462 | 546 | + name = gdm_get_language_from_name (language, NULL); | ||
2463 | 547 | label = WID ("system_display_language"); | ||
2464 | 548 | gtk_label_set_text (GTK_LABEL (label), name); | ||
2465 | 549 | g_free (name); | ||
2466 | 550 | @@ -285,6 +305,10 @@ | ||
2467 | 551 | g_object_set_data_full (G_OBJECT (label), "region", g_strdup (time), g_free); | ||
2468 | 552 | } | ||
2469 | 553 | g_variant_unref (v); | ||
2470 | 554 | + g_free (lang); | ||
2471 | 555 | + g_free (language); | ||
2472 | 556 | + g_free (messages); | ||
2473 | 557 | + g_free (time); | ||
2474 | 558 | } | ||
2475 | 559 | |||
2476 | 560 | label = WID ("system_input_source"); | ||
2477 | 561 | @@ -350,27 +374,44 @@ | ||
2478 | 562 | GtkWidget *label; | ||
2479 | 563 | GVariantBuilder *b; | ||
2480 | 564 | gchar *s; | ||
2481 | 565 | + gchar *command; | ||
2482 | 566 | + gchar *lang; | ||
2483 | 567 | + GError *error = NULL; | ||
2484 | 568 | + gint i; | ||
2485 | 569 | |||
2486 | 570 | label = WID ("user_display_language"); | ||
2487 | 571 | language = g_object_get_data (G_OBJECT (label), "language"); | ||
2488 | 572 | label = WID ("user_format"); | ||
2489 | 573 | region = g_object_get_data (G_OBJECT (label), "region"); | ||
2490 | 574 | |||
2491 | 575 | + /* Get locale that corresponds to the language */ | ||
2492 | 576 | + command = g_strconcat ("/usr/share/language-tools/language2locale ", language, NULL); | ||
2493 | 577 | + if (!g_spawn_command_line_sync (command, &lang, NULL, NULL, &error)) { | ||
2494 | 578 | + g_warning ("Couldn't get LANG locale: %s", error->message); | ||
2495 | 579 | + g_error_free (error); | ||
2496 | 580 | + g_free (command); | ||
2497 | 581 | + return; | ||
2498 | 582 | + } | ||
2499 | 583 | + g_free (command); | ||
2500 | 584 | + g_strchomp (lang); | ||
2501 | 585 | + if (strlen (lang) == 0) { | ||
2502 | 586 | + g_warning ("Couldn't get LANG locale -- Copying interrupted"); | ||
2503 | 587 | + return; | ||
2504 | 588 | + } | ||
2505 | 589 | + | ||
2506 | 590 | b = g_variant_builder_new (G_VARIANT_TYPE ("as")); | ||
2507 | 591 | - s = g_strconcat ("LANG=", language, NULL); | ||
2508 | 592 | + s = g_strconcat ("LANG=", lang, NULL); | ||
2509 | 593 | g_variant_builder_add (b, "s", s); | ||
2510 | 594 | + g_free (lang); | ||
2511 | 595 | g_free (s); | ||
2512 | 596 | - if (g_strcmp0 (language, region) != 0) { | ||
2513 | 597 | - s = g_strconcat ("LC_TIME=", region, NULL); | ||
2514 | 598 | - g_variant_builder_add (b, "s", s); | ||
2515 | 599 | - g_free (s); | ||
2516 | 600 | - s = g_strconcat ("LC_NUMERIC=", region, NULL); | ||
2517 | 601 | - g_variant_builder_add (b, "s", s); | ||
2518 | 602 | - g_free (s); | ||
2519 | 603 | - s = g_strconcat ("LC_MONETARY=", region, NULL); | ||
2520 | 604 | - g_variant_builder_add (b, "s", s); | ||
2521 | 605 | - g_free (s); | ||
2522 | 606 | - s = g_strconcat ("LC_MEASUREMENT=", region, NULL); | ||
2523 | 607 | + s = g_strconcat ("LANGUAGE=", language, NULL); | ||
2524 | 608 | + g_variant_builder_add (b, "s", s); | ||
2525 | 609 | + g_free (s); | ||
2526 | 610 | + const gchar *format_categories[] = { "LC_NUMERIC", "LC_TIME", | ||
2527 | 611 | + "LC_MONETARY", "LC_PAPER", "LC_IDENTIFICATION", "LC_NAME", | ||
2528 | 612 | + "LC_ADDRESS", "LC_TELEPHONE", "LC_MEASUREMENT", NULL }; | ||
2529 | 613 | + for (i = 0; format_categories[i] != NULL; i++) { | ||
2530 | 614 | + s = g_strconcat (format_categories[i], "=", region, NULL); | ||
2531 | 615 | g_variant_builder_add (b, "s", s); | ||
2532 | 616 | g_free (s); | ||
2533 | 617 | } | ||
2534 | 618 | @@ -525,7 +566,7 @@ | ||
2535 | 619 | g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_object_unref, input_sources_settings); | ||
2536 | 620 | |||
2537 | 621 | /* Display user settings */ | ||
2538 | 622 | - language = cc_common_language_get_current_language (); | ||
2539 | 623 | + language = cc_common_language_get_property ("Language"); | ||
2540 | 624 | system_update_language (dialog, language); | ||
2541 | 625 | g_free (language); | ||
2542 | 626 | |||
2543 | 627 | Index: gnome-control-center-3.6.3/panels/region/gnome-region-panel-system.h | ||
2544 | 628 | =================================================================== | ||
2545 | 629 | --- gnome-control-center-3.6.3.orig/panels/region/gnome-region-panel-system.h 2013-03-15 17:20:48.939849976 +0100 | ||
2546 | 630 | +++ gnome-control-center-3.6.3/panels/region/gnome-region-panel-system.h 2013-03-15 17:20:48.927849976 +0100 | ||
2547 | 631 | @@ -27,5 +27,8 @@ | ||
2548 | 632 | void setup_system (GtkBuilder *builder); | ||
2549 | 633 | void system_update_language (GtkBuilder *builder, | ||
2550 | 634 | const gchar *language); | ||
2551 | 635 | +void locale_settings_changed (GSettings *settings, | ||
2552 | 636 | + const gchar *key, | ||
2553 | 637 | + GtkBuilder *dialog); | ||
2554 | 638 | |||
2555 | 639 | #endif | ||
2556 | 640 | Index: gnome-control-center-3.6.3/panels/region/gnome-region-panel.ui | ||
2557 | 641 | =================================================================== | ||
2558 | 642 | --- gnome-control-center-3.6.3.orig/panels/region/gnome-region-panel.ui 2013-03-15 17:20:48.939849976 +0100 | ||
2559 | 643 | +++ gnome-control-center-3.6.3/panels/region/gnome-region-panel.ui 2013-03-15 17:20:48.931849976 +0100 | ||
2560 | 644 | @@ -192,7 +192,7 @@ | ||
2561 | 645 | </child> | ||
2562 | 646 | <child> | ||
2563 | 647 | <object class="GtkToolbar" id="language-toolbar"> | ||
2564 | 648 | - <property name="visible">True</property> | ||
2565 | 649 | + <property name="visible">False</property> | ||
2566 | 650 | <property name="can_focus">False</property> | ||
2567 | 651 | <property name="toolbar_style">icons</property> | ||
2568 | 652 | <property name="show_arrow">False</property> | ||
2569 | 653 | 0 | ||
2570 | === removed file 'debian/patches/53_use_ubuntu_help.patch' | |||
2571 | --- debian/patches/53_use_ubuntu_help.patch 2013-07-05 13:31:20 +0000 | |||
2572 | +++ debian/patches/53_use_ubuntu_help.patch 1970-01-01 00:00:00 +0000 | |||
2573 | @@ -1,282 +0,0 @@ | |||
2574 | 1 | Description: Use pre-installed Ubuntu Desktop Guide instead of GNOME help when | ||
2575 | 2 | running Unity | ||
2576 | 3 | Forwarded: not-needed | ||
2577 | 4 | Author: Jeremy Bicha <jbicha@ubuntu.com> | ||
2578 | 5 | Index: gnome-control-center-3.6.2/panels/bluetooth/cc-bluetooth-panel.c | ||
2579 | 6 | =================================================================== | ||
2580 | 7 | --- gnome-control-center-3.6.2.orig/panels/bluetooth/cc-bluetooth-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2581 | 8 | +++ gnome-control-center-3.6.2/panels/bluetooth/cc-bluetooth-panel.c 2012-11-02 19:29:57.639315414 -0400 | ||
2582 | 9 | @@ -72,7 +72,10 @@ | ||
2583 | 10 | static const char * | ||
2584 | 11 | cc_bluetooth_panel_get_help_uri (CcPanel *panel) | ||
2585 | 12 | { | ||
2586 | 13 | - return "help:gnome-help/bluetooth"; | ||
2587 | 14 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2588 | 15 | + return "help:ubuntu-help/bluetooth"; | ||
2589 | 16 | + else | ||
2590 | 17 | + return "help:gnome-help/bluetooth"; | ||
2591 | 18 | } | ||
2592 | 19 | |||
2593 | 20 | static void | ||
2594 | 21 | Index: gnome-control-center-3.6.2/panels/color/cc-color-panel.c | ||
2595 | 22 | =================================================================== | ||
2596 | 23 | --- gnome-control-center-3.6.2.orig/panels/color/cc-color-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2597 | 24 | +++ gnome-control-center-3.6.2/panels/color/cc-color-panel.c 2012-11-02 19:30:52.679313112 -0400 | ||
2598 | 25 | @@ -2285,7 +2285,10 @@ | ||
2599 | 26 | static const char * | ||
2600 | 27 | cc_color_panel_get_help_uri (CcPanel *panel) | ||
2601 | 28 | { | ||
2602 | 29 | - return "help:gnome-help/color"; | ||
2603 | 30 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2604 | 31 | + return "help:ubuntu-help/color"; | ||
2605 | 32 | + else | ||
2606 | 33 | + return "help:gnome-help/color"; | ||
2607 | 34 | } | ||
2608 | 35 | |||
2609 | 36 | static void | ||
2610 | 37 | @@ -2567,6 +2570,12 @@ | ||
2611 | 38 | g_signal_connect (widget, "realize", | ||
2612 | 39 | G_CALLBACK (gcm_prefs_window_realize_cb), | ||
2613 | 40 | prefs); | ||
2614 | 41 | + | ||
2615 | 42 | + widget = WID (priv->builder, "linkbutton_help"); | ||
2616 | 43 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2617 | 44 | + g_object_set (G_OBJECT (widget), | ||
2618 | 45 | + "uri", "help:ubuntu-help/color-whyimportant", | ||
2619 | 46 | + NULL); | ||
2620 | 47 | } | ||
2621 | 48 | |||
2622 | 49 | void | ||
2623 | 50 | Index: gnome-control-center-3.6.2/panels/datetime/cc-datetime-panel.c | ||
2624 | 51 | =================================================================== | ||
2625 | 52 | --- gnome-control-center-3.6.2.orig/panels/datetime/cc-datetime-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2626 | 53 | +++ gnome-control-center-3.6.2/panels/datetime/cc-datetime-panel.c 2012-11-02 19:29:57.639315414 -0400 | ||
2627 | 54 | @@ -178,7 +178,10 @@ | ||
2628 | 55 | static const char * | ||
2629 | 56 | cc_date_time_panel_get_help_uri (CcPanel *panel) | ||
2630 | 57 | { | ||
2631 | 58 | - return "help:gnome-help/clock"; | ||
2632 | 59 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2633 | 60 | + return "help:ubuntu-help/clock"; | ||
2634 | 61 | + else | ||
2635 | 62 | + return "help:gnome-help/clock"; | ||
2636 | 63 | } | ||
2637 | 64 | |||
2638 | 65 | static void | ||
2639 | 66 | Index: gnome-control-center-3.6.2/panels/display/cc-display-panel.c | ||
2640 | 67 | =================================================================== | ||
2641 | 68 | --- gnome-control-center-3.6.2.orig/panels/display/cc-display-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2642 | 69 | +++ gnome-control-center-3.6.2/panels/display/cc-display-panel.c 2012-11-02 19:29:57.643315414 -0400 | ||
2643 | 70 | @@ -205,7 +205,10 @@ | ||
2644 | 71 | static const char * | ||
2645 | 72 | cc_display_panel_get_help_uri (CcPanel *panel) | ||
2646 | 73 | { | ||
2647 | 74 | - return "help:gnome-help/prefs-display"; | ||
2648 | 75 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2649 | 76 | + return "help:ubuntu-help/prefs-display"; | ||
2650 | 77 | + else | ||
2651 | 78 | + return "help:gnome-help/prefs-display"; | ||
2652 | 79 | } | ||
2653 | 80 | |||
2654 | 81 | static void | ||
2655 | 82 | Index: gnome-control-center-3.6.2/panels/mouse/cc-mouse-panel.c | ||
2656 | 83 | =================================================================== | ||
2657 | 84 | --- gnome-control-center-3.6.2.orig/panels/mouse/cc-mouse-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2658 | 85 | +++ gnome-control-center-3.6.2/panels/mouse/cc-mouse-panel.c 2012-11-02 19:29:57.643315414 -0400 | ||
2659 | 86 | @@ -107,7 +107,10 @@ | ||
2660 | 87 | static const char * | ||
2661 | 88 | cc_mouse_panel_get_help_uri (CcPanel *panel) | ||
2662 | 89 | { | ||
2663 | 90 | - return "help:gnome-help/mouse"; | ||
2664 | 91 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2665 | 92 | + return "help:ubuntu-help/mouse"; | ||
2666 | 93 | + else | ||
2667 | 94 | + return "help:gnome-help/mouse"; | ||
2668 | 95 | } | ||
2669 | 96 | |||
2670 | 97 | static void | ||
2671 | 98 | Index: gnome-control-center-3.6.2/panels/network/cc-network-panel.c | ||
2672 | 99 | =================================================================== | ||
2673 | 100 | --- gnome-control-center-3.6.2.orig/panels/network/cc-network-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2674 | 101 | +++ gnome-control-center-3.6.2/panels/network/cc-network-panel.c 2012-11-02 19:29:57.643315414 -0400 | ||
2675 | 102 | @@ -232,7 +232,10 @@ | ||
2676 | 103 | static const char * | ||
2677 | 104 | cc_network_panel_get_help_uri (CcPanel *panel) | ||
2678 | 105 | { | ||
2679 | 106 | - return "help:gnome-help/net"; | ||
2680 | 107 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2681 | 108 | + return "help:ubuntu-help/net"; | ||
2682 | 109 | + else | ||
2683 | 110 | + return "help:gnome-help/net"; | ||
2684 | 111 | } | ||
2685 | 112 | |||
2686 | 113 | static void | ||
2687 | 114 | Index: gnome-control-center-3.6.2/panels/online-accounts/cc-online-accounts-panel.c | ||
2688 | 115 | =================================================================== | ||
2689 | 116 | --- gnome-control-center-3.6.2.orig/panels/online-accounts/cc-online-accounts-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2690 | 117 | +++ gnome-control-center-3.6.2/panels/online-accounts/cc-online-accounts-panel.c 2012-11-02 19:29:57.643315414 -0400 | ||
2691 | 118 | @@ -256,7 +256,10 @@ | ||
2692 | 119 | static const char * | ||
2693 | 120 | goa_panel_get_help_uri (CcPanel *panel) | ||
2694 | 121 | { | ||
2695 | 122 | - return "help:gnome-help/accounts"; | ||
2696 | 123 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2697 | 124 | + return "help:ubuntu-help/accounts"; | ||
2698 | 125 | + else | ||
2699 | 126 | + return "help:gnome-help/accounts"; | ||
2700 | 127 | } | ||
2701 | 128 | |||
2702 | 129 | static void | ||
2703 | 130 | Index: gnome-control-center-3.6.2/panels/power/cc-power-panel.c | ||
2704 | 131 | =================================================================== | ||
2705 | 132 | --- gnome-control-center-3.6.2.orig/panels/power/cc-power-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2706 | 133 | +++ gnome-control-center-3.6.2/panels/power/cc-power-panel.c 2012-11-02 19:29:57.647315413 -0400 | ||
2707 | 134 | @@ -124,7 +124,10 @@ | ||
2708 | 135 | static const char * | ||
2709 | 136 | cc_power_panel_get_help_uri (CcPanel *panel) | ||
2710 | 137 | { | ||
2711 | 138 | - return "help:gnome-help/power"; | ||
2712 | 139 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2713 | 140 | + return "help:ubuntu-help/power"; | ||
2714 | 141 | + else | ||
2715 | 142 | + return "help:gnome-help/power"; | ||
2716 | 143 | } | ||
2717 | 144 | |||
2718 | 145 | static void | ||
2719 | 146 | Index: gnome-control-center-3.6.2/panels/printers/cc-printers-panel.c | ||
2720 | 147 | =================================================================== | ||
2721 | 148 | --- gnome-control-center-3.6.2.orig/panels/printers/cc-printers-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2722 | 149 | +++ gnome-control-center-3.6.2/panels/printers/cc-printers-panel.c 2012-11-02 19:29:57.647315413 -0400 | ||
2723 | 150 | @@ -251,7 +251,10 @@ | ||
2724 | 151 | static const char * | ||
2725 | 152 | cc_printers_panel_get_help_uri (CcPanel *panel) | ||
2726 | 153 | { | ||
2727 | 154 | - return "help:gnome-help/printing"; | ||
2728 | 155 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2729 | 156 | + return "help:ubuntu-help/printing"; | ||
2730 | 157 | + else | ||
2731 | 158 | + return "help:gnome-help/printing"; | ||
2732 | 159 | } | ||
2733 | 160 | |||
2734 | 161 | static void | ||
2735 | 162 | Index: gnome-control-center-3.6.2/panels/screen/cc-screen-panel.c | ||
2736 | 163 | =================================================================== | ||
2737 | 164 | --- gnome-control-center-3.6.2.orig/panels/screen/cc-screen-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2738 | 165 | +++ gnome-control-center-3.6.2/panels/screen/cc-screen-panel.c 2012-11-02 19:29:57.647315413 -0400 | ||
2739 | 166 | @@ -146,7 +146,10 @@ | ||
2740 | 167 | static const char * | ||
2741 | 168 | cc_screen_panel_get_help_uri (CcPanel *panel) | ||
2742 | 169 | { | ||
2743 | 170 | - return "help:gnome-help/prefs-display"; | ||
2744 | 171 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2745 | 172 | + return "help:ubuntu-help/prefs-display"; | ||
2746 | 173 | + else | ||
2747 | 174 | + return "help:gnome-help/prefs-display"; | ||
2748 | 175 | } | ||
2749 | 176 | |||
2750 | 177 | static void | ||
2751 | 178 | Index: gnome-control-center-3.6.2/panels/sound/cc-sound-panel.c | ||
2752 | 179 | =================================================================== | ||
2753 | 180 | --- gnome-control-center-3.6.2.orig/panels/sound/cc-sound-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2754 | 181 | +++ gnome-control-center-3.6.2/panels/sound/cc-sound-panel.c 2012-11-02 19:29:57.647315413 -0400 | ||
2755 | 182 | @@ -70,7 +70,10 @@ | ||
2756 | 183 | static const char * | ||
2757 | 184 | cc_sound_panel_get_help_uri (CcPanel *panel) | ||
2758 | 185 | { | ||
2759 | 186 | - return "help:gnome-help/media#sound"; | ||
2760 | 187 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2761 | 188 | + return "help:ubuntu-help/media#sound"; | ||
2762 | 189 | + else | ||
2763 | 190 | + return "help:gnome-help/media#sound"; | ||
2764 | 191 | } | ||
2765 | 192 | |||
2766 | 193 | static void | ||
2767 | 194 | Index: gnome-control-center-3.6.2/panels/universal-access/cc-ua-panel.c | ||
2768 | 195 | =================================================================== | ||
2769 | 196 | --- gnome-control-center-3.6.2.orig/panels/universal-access/cc-ua-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2770 | 197 | +++ gnome-control-center-3.6.2/panels/universal-access/cc-ua-panel.c 2012-11-02 19:29:57.651315413 -0400 | ||
2771 | 198 | @@ -159,7 +159,10 @@ | ||
2772 | 199 | static const char * | ||
2773 | 200 | cc_ua_panel_get_help_uri (CcPanel *panel) | ||
2774 | 201 | { | ||
2775 | 202 | - return "help:gnome-help/a11y"; | ||
2776 | 203 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2777 | 204 | + return "help:ubuntu-help/a11y"; | ||
2778 | 205 | + else | ||
2779 | 206 | + return "help:gnome-help/a11y"; | ||
2780 | 207 | } | ||
2781 | 208 | |||
2782 | 209 | static void | ||
2783 | 210 | Index: gnome-control-center-3.6.2/panels/user-accounts/um-password-dialog.c | ||
2784 | 211 | =================================================================== | ||
2785 | 212 | --- gnome-control-center-3.6.2.orig/panels/user-accounts/um-password-dialog.c 2012-11-02 19:29:55.031315523 -0400 | ||
2786 | 213 | +++ gnome-control-center-3.6.2/panels/user-accounts/um-password-dialog.c 2012-11-02 19:29:57.651315413 -0400 | ||
2787 | 214 | @@ -523,9 +523,14 @@ | ||
2788 | 215 | |||
2789 | 216 | widget = (GtkWidget *) gtk_builder_get_object (builder, "password-normal-strength-hints-label"); | ||
2790 | 217 | old_label = gtk_label_get_label (GTK_LABEL (widget)); | ||
2791 | 218 | - label = g_strdup_printf ("<a href=\"%s\">%s</a>", | ||
2792 | 219 | - "help:gnome-help/user-goodpassword", | ||
2793 | 220 | - old_label); | ||
2794 | 221 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2795 | 222 | + label = g_strdup_printf ("<a href=\"%s\">%s</a>", | ||
2796 | 223 | + "help:ubuntu-help/user-goodpassword", | ||
2797 | 224 | + old_label); | ||
2798 | 225 | + else | ||
2799 | 226 | + label = g_strdup_printf ("<a href=\"%s\">%s</a>", | ||
2800 | 227 | + "help:gnome-help/user-goodpassword", | ||
2801 | 228 | + old_label); | ||
2802 | 229 | gtk_label_set_markup (GTK_LABEL (widget), label); | ||
2803 | 230 | g_free (label); | ||
2804 | 231 | |||
2805 | 232 | Index: gnome-control-center-3.6.2/panels/user-accounts/um-user-panel.c | ||
2806 | 233 | =================================================================== | ||
2807 | 234 | --- gnome-control-center-3.6.2.orig/panels/user-accounts/um-user-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2808 | 235 | +++ gnome-control-center-3.6.2/panels/user-accounts/um-user-panel.c 2012-11-02 19:29:57.651315413 -0400 | ||
2809 | 236 | @@ -1372,7 +1372,10 @@ | ||
2810 | 237 | static const char * | ||
2811 | 238 | um_user_panel_get_help_uri (CcPanel *panel) | ||
2812 | 239 | { | ||
2813 | 240 | - return "help:gnome-help/user-accounts"; | ||
2814 | 241 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2815 | 242 | + return "help:ubuntu-help/user-accounts"; | ||
2816 | 243 | + else | ||
2817 | 244 | + return "help:gnome-help/user-accounts"; | ||
2818 | 245 | } | ||
2819 | 246 | |||
2820 | 247 | static void | ||
2821 | 248 | Index: gnome-control-center-3.6.2/panels/wacom/cc-wacom-panel.c | ||
2822 | 249 | =================================================================== | ||
2823 | 250 | --- gnome-control-center-3.6.2.orig/panels/wacom/cc-wacom-panel.c 2012-11-02 19:29:55.031315523 -0400 | ||
2824 | 251 | +++ gnome-control-center-3.6.2/panels/wacom/cc-wacom-panel.c 2012-11-02 19:29:57.651315413 -0400 | ||
2825 | 252 | @@ -123,7 +123,10 @@ | ||
2826 | 253 | static const char * | ||
2827 | 254 | cc_wacom_panel_get_help_uri (CcPanel *panel) | ||
2828 | 255 | { | ||
2829 | 256 | - return "help:gnome-help/wacom"; | ||
2830 | 257 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2831 | 258 | + return "help:ubuntu-help/wacom"; | ||
2832 | 259 | + else | ||
2833 | 260 | + return "help:gnome-help/wacom"; | ||
2834 | 261 | } | ||
2835 | 262 | |||
2836 | 263 | static void | ||
2837 | 264 | Index: gnome-control-center-3.6.2/shell/control-center.c | ||
2838 | 265 | =================================================================== | ||
2839 | 266 | --- gnome-control-center-3.6.2.orig/shell/control-center.c 2012-11-02 19:29:55.031315523 -0400 | ||
2840 | 267 | +++ gnome-control-center-3.6.2/shell/control-center.c 2012-11-02 19:30:16.431314628 -0400 | ||
2841 | 268 | @@ -175,8 +175,12 @@ | ||
2842 | 269 | |||
2843 | 270 | if (panel) | ||
2844 | 271 | uri = cc_panel_get_help_uri (panel); | ||
2845 | 272 | - | ||
2846 | 273 | - gtk_show_uri (gtk_widget_get_screen (window), | ||
2847 | 274 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
2848 | 275 | + gtk_show_uri (gtk_widget_get_screen (window), | ||
2849 | 276 | + uri ? uri : "help:ubuntu-help/prefs", | ||
2850 | 277 | + GDK_CURRENT_TIME, NULL); | ||
2851 | 278 | + else | ||
2852 | 279 | + gtk_show_uri (gtk_widget_get_screen (window), | ||
2853 | 280 | uri ? uri : "help:gnome-help/prefs", | ||
2854 | 281 | GDK_CURRENT_TIME, NULL); | ||
2855 | 282 | } | ||
2856 | 283 | 0 | ||
2857 | === removed file 'debian/patches/54_enable_alt_tap_in_shortcut.patch' | |||
2858 | --- debian/patches/54_enable_alt_tap_in_shortcut.patch 2013-07-05 22:08:12 +0000 | |||
2859 | +++ debian/patches/54_enable_alt_tap_in_shortcut.patch 1970-01-01 00:00:00 +0000 | |||
2860 | @@ -1,58 +0,0 @@ | |||
2861 | 1 | Index: gnome-control-center-3.6.3/panels/keyboard/keyboard-shortcuts.c | ||
2862 | 2 | =================================================================== | ||
2863 | 3 | --- gnome-control-center-3.6.3.orig/panels/keyboard/keyboard-shortcuts.c 2012-11-21 18:09:33.690816155 +0100 | ||
2864 | 4 | +++ gnome-control-center-3.6.3/panels/keyboard/keyboard-shortcuts.c 2012-11-21 18:09:34.222816183 +0100 | ||
2865 | 5 | @@ -1716,7 +1716,7 @@ | ||
2866 | 6 | gtk_tree_view_append_column (treeview, column); | ||
2867 | 7 | |||
2868 | 8 | renderer = (GtkCellRenderer *) g_object_new (GTK_TYPE_CELL_RENDERER_ACCEL, | ||
2869 | 9 | - "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_OTHER, | ||
2870 | 10 | + "accel-mode", GTK_CELL_RENDERER_ACCEL_MODE_MODIFIER_TAP, | ||
2871 | 11 | NULL); | ||
2872 | 12 | |||
2873 | 13 | g_signal_connect (treeview, "button_press_event", | ||
2874 | 14 | Index: gnome-control-center-3.6.3/panels/keyboard/cc-keyboard-item.c | ||
2875 | 15 | =================================================================== | ||
2876 | 16 | --- gnome-control-center-3.6.3.orig/panels/keyboard/cc-keyboard-item.c 2012-05-24 16:20:10.000000000 +0200 | ||
2877 | 17 | +++ gnome-control-center-3.6.3/panels/keyboard/cc-keyboard-item.c 2012-11-21 18:09:34.222816183 +0100 | ||
2878 | 18 | @@ -143,14 +143,25 @@ | ||
2879 | 19 | const char *value, | ||
2880 | 20 | gboolean set_backend) | ||
2881 | 21 | { | ||
2882 | 22 | + /* don't reassign <Alt_L> or <Alt> key in the callback to the binding itself (as it's invalid for the cell renderer) */ | ||
2883 | 23 | + if ((g_strcmp0 (value, "<Alt_L>") == 0) || (g_strcmp0 (value, "<Alt>") == 0)) | ||
2884 | 24 | + return; | ||
2885 | 25 | + | ||
2886 | 26 | g_free (item->binding); | ||
2887 | 27 | item->binding = g_strdup (value); | ||
2888 | 28 | binding_from_string (item->binding, &item->keyval, &item->keycode, &item->mask); | ||
2889 | 29 | |||
2890 | 30 | + const char *key; | ||
2891 | 31 | + char *cheated_modifier = NULL; | ||
2892 | 32 | + if (g_strcmp0 (item->binding, "Alt_L") == 0) | ||
2893 | 33 | + cheated_modifier = g_strdup_printf ("<%s>", item->binding); | ||
2894 | 34 | + | ||
2895 | 35 | if (set_backend == FALSE) | ||
2896 | 36 | return; | ||
2897 | 37 | |||
2898 | 38 | - settings_set_binding (item->settings, item->key, item->binding); | ||
2899 | 39 | + settings_set_binding (item->settings, item->key, cheated_modifier ? cheated_modifier: item->binding); | ||
2900 | 40 | + | ||
2901 | 41 | + g_free (cheated_modifier); | ||
2902 | 42 | } | ||
2903 | 43 | |||
2904 | 44 | const char * | ||
2905 | 45 | @@ -441,6 +452,13 @@ | ||
2906 | 46 | item->settings = g_settings_new (item->schema); | ||
2907 | 47 | item->binding = settings_get_binding (item->settings, item->key); | ||
2908 | 48 | item->editable = g_settings_is_writable (item->settings, item->key); | ||
2909 | 49 | + | ||
2910 | 50 | + if ((g_strcmp0 (item->binding, "<Alt>") == 0) || (g_strcmp0 (item->binding, "<Alt_L>") == 0)) | ||
2911 | 51 | + { | ||
2912 | 52 | + g_free (item->binding); | ||
2913 | 53 | + item->binding = g_strdup ("Alt_L"); | ||
2914 | 54 | + } | ||
2915 | 55 | + | ||
2916 | 56 | binding_from_string (item->binding, &item->keyval, &item->keycode, &item->mask); | ||
2917 | 57 | |||
2918 | 58 | signal_name = g_strdup_printf ("changed::%s", item->key); | ||
2919 | 59 | 0 | ||
2920 | === removed file 'debian/patches/55_user_accounts_hide_controls.patch' | |||
2921 | --- debian/patches/55_user_accounts_hide_controls.patch 2013-07-05 13:31:20 +0000 | |||
2922 | +++ debian/patches/55_user_accounts_hide_controls.patch 1970-01-01 00:00:00 +0000 | |||
2923 | @@ -1,148 +0,0 @@ | |||
2924 | 1 | Index: gnome-control-center-3.6.3/panels/user-accounts/um-password-dialog.c | ||
2925 | 2 | =================================================================== | ||
2926 | 3 | --- gnome-control-center-3.6.3.orig/panels/user-accounts/um-password-dialog.c 2013-01-22 15:11:55.971943861 -0500 | ||
2927 | 4 | +++ gnome-control-center-3.6.3/panels/user-accounts/um-password-dialog.c 2013-01-22 15:11:55.959943861 -0500 | ||
2928 | 5 | @@ -52,6 +52,7 @@ | ||
2929 | 6 | GtkWidget *ok_button; | ||
2930 | 7 | |||
2931 | 8 | UmUser *user; | ||
2932 | 9 | + gboolean using_ecryptfs; | ||
2933 | 10 | |||
2934 | 11 | GtkWidget *old_password_label; | ||
2935 | 12 | GtkWidget *old_password_entry; | ||
2936 | 13 | @@ -471,6 +472,38 @@ | ||
2937 | 14 | } | ||
2938 | 15 | } | ||
2939 | 16 | |||
2940 | 17 | +int _is_gdm_running = -1; | ||
2941 | 18 | +gboolean | ||
2942 | 19 | +is_gdm_running (void) | ||
2943 | 20 | +{ | ||
2944 | 21 | + if (_is_gdm_running == -1) { | ||
2945 | 22 | + GDBusProxy *proxy; | ||
2946 | 23 | + gchar *owner_name; | ||
2947 | 24 | + | ||
2948 | 25 | + proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, | ||
2949 | 26 | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | | ||
2950 | 27 | + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS | | ||
2951 | 28 | + G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, | ||
2952 | 29 | + NULL, | ||
2953 | 30 | + "org.gnome.DisplayManager", | ||
2954 | 31 | + "/org/gnome/DisplayManager/Manager", | ||
2955 | 32 | + "org.gnome.DisplayManager.Manager", | ||
2956 | 33 | + NULL, NULL); | ||
2957 | 34 | + | ||
2958 | 35 | + if (proxy == NULL) | ||
2959 | 36 | + return FALSE; | ||
2960 | 37 | + | ||
2961 | 38 | + owner_name = g_dbus_proxy_get_name_owner (proxy); | ||
2962 | 39 | + | ||
2963 | 40 | + g_object_unref (proxy); | ||
2964 | 41 | + g_free (owner_name); | ||
2965 | 42 | + | ||
2966 | 43 | + _is_gdm_running = (owner_name != NULL) ? 1 : 0; | ||
2967 | 44 | + } | ||
2968 | 45 | + | ||
2969 | 46 | + return _is_gdm_running; | ||
2970 | 47 | +} | ||
2971 | 48 | + | ||
2972 | 49 | UmPasswordDialog * | ||
2973 | 50 | um_password_dialog_new (void) | ||
2974 | 51 | { | ||
2975 | 52 | @@ -591,6 +624,13 @@ | ||
2976 | 53 | G_CALLBACK (entry_size_changed), widget); | ||
2977 | 54 | um->normal_hint_label = widget; | ||
2978 | 55 | |||
2979 | 56 | + if (!is_gdm_running ()) { | ||
2980 | 57 | + widget = (GtkWidget *) gtk_builder_get_object (builder, "password-normal-hint-label"); | ||
2981 | 58 | + gtk_widget_hide (widget); | ||
2982 | 59 | + gtk_widget_hide (um->normal_hint_entry); | ||
2983 | 60 | + gtk_widget_hide (um->normal_hint_label); | ||
2984 | 61 | + } | ||
2985 | 62 | + | ||
2986 | 63 | um->strength_indicator = (GtkWidget *) gtk_builder_get_object (builder, "strength-indicator"); | ||
2987 | 64 | |||
2988 | 65 | um->strength_indicator_label = (GtkWidget *) gtk_builder_get_object (builder, "strength-indicator-label"); | ||
2989 | 66 | @@ -625,6 +665,12 @@ | ||
2990 | 67 | |||
2991 | 68 | gtk_tree_model_get (model, iter, 1, &mode, -1); | ||
2992 | 69 | |||
2993 | 70 | + if (mode == 1 && !is_gdm_running ()) | ||
2994 | 71 | + return FALSE; | ||
2995 | 72 | + | ||
2996 | 73 | + if (mode == 2 && um->using_ecryptfs) | ||
2997 | 74 | + return FALSE; | ||
2998 | 75 | + | ||
2999 | 76 | if (mode == 3 && locked) | ||
3000 | 77 | return FALSE; | ||
3001 | 78 | |||
3002 | 79 | @@ -651,6 +697,8 @@ | ||
3003 | 80 | if (user) { | ||
3004 | 81 | um->user = g_object_ref (user); | ||
3005 | 82 | |||
3006 | 83 | + um->using_ecryptfs = is_using_ecryptfs (um_user_get_user_name (user)); | ||
3007 | 84 | + | ||
3008 | 85 | pixbuf = um_user_render_icon (user, FALSE, 48); | ||
3009 | 86 | gtk_image_set_from_pixbuf (GTK_IMAGE (um->user_icon), pixbuf); | ||
3010 | 87 | g_object_unref (pixbuf); | ||
3011 | 88 | Index: gnome-control-center-3.6.3/panels/user-accounts/um-user-panel.c | ||
3012 | 89 | =================================================================== | ||
3013 | 90 | --- gnome-control-center-3.6.3.orig/panels/user-accounts/um-user-panel.c 2013-01-22 15:11:55.971943861 -0500 | ||
3014 | 91 | +++ gnome-control-center-3.6.3/panels/user-accounts/um-user-panel.c 2013-01-22 15:12:18.031943282 -0500 | ||
3015 | 92 | @@ -629,7 +629,10 @@ | ||
3016 | 93 | /* Autologin: show when local account */ | ||
3017 | 94 | widget = get_widget (d, "autologin-switch"); | ||
3018 | 95 | label = get_widget (d, "autologin-label"); | ||
3019 | 96 | - show = um_user_is_local_account (user); | ||
3020 | 97 | + /* Don't show autologin option if ecryptfs is in use, because it won't | ||
3021 | 98 | + work if user turns it on. */ | ||
3022 | 99 | + show = um_user_is_local_account (user) && | ||
3023 | 100 | + !is_using_ecryptfs (um_user_get_user_name (user)); | ||
3024 | 101 | gtk_widget_set_visible (widget, show); | ||
3025 | 102 | gtk_widget_set_visible (label, show); | ||
3026 | 103 | } | ||
3027 | 104 | Index: gnome-control-center-3.6.3/panels/user-accounts/um-utils.c | ||
3028 | 105 | =================================================================== | ||
3029 | 106 | --- gnome-control-center-3.6.3.orig/panels/user-accounts/um-utils.c 2013-01-22 15:11:55.971943861 -0500 | ||
3030 | 107 | +++ gnome-control-center-3.6.3/panels/user-accounts/um-utils.c 2013-01-22 15:11:55.963943861 -0500 | ||
3031 | 108 | @@ -746,3 +746,27 @@ | ||
3032 | 109 | g_string_free (item3, TRUE); | ||
3033 | 110 | g_string_free (item4, TRUE); | ||
3034 | 111 | } | ||
3035 | 112 | + | ||
3036 | 113 | +gboolean | ||
3037 | 114 | +is_using_ecryptfs (const gchar *name) | ||
3038 | 115 | +{ | ||
3039 | 116 | + gboolean using_ecryptfs = FALSE; | ||
3040 | 117 | + int status; | ||
3041 | 118 | + gchar *prog; | ||
3042 | 119 | + gchar *cmd; | ||
3043 | 120 | + | ||
3044 | 121 | + prog = g_find_program_in_path ("ecryptfs-verify"); | ||
3045 | 122 | + if (prog != NULL) { | ||
3046 | 123 | + gchar *cmd = g_strdup_printf("'%s' -h -u '%s'", prog, name); | ||
3047 | 124 | + | ||
3048 | 125 | + if (g_spawn_command_line_sync (cmd, NULL, NULL, &status, NULL)) { | ||
3049 | 126 | + if (status == 0) | ||
3050 | 127 | + using_ecryptfs = TRUE; | ||
3051 | 128 | + } | ||
3052 | 129 | + | ||
3053 | 130 | + g_free (prog); | ||
3054 | 131 | + g_free (cmd); | ||
3055 | 132 | + } | ||
3056 | 133 | + | ||
3057 | 134 | + return using_ecryptfs; | ||
3058 | 135 | +} | ||
3059 | 136 | Index: gnome-control-center-3.6.3/panels/user-accounts/um-utils.h | ||
3060 | 137 | =================================================================== | ||
3061 | 138 | --- gnome-control-center-3.6.3.orig/panels/user-accounts/um-utils.h 2013-01-22 15:11:55.971943861 -0500 | ||
3062 | 139 | +++ gnome-control-center-3.6.3/panels/user-accounts/um-utils.h 2013-01-22 15:11:55.963943861 -0500 | ||
3063 | 140 | @@ -65,6 +65,8 @@ | ||
3064 | 141 | void generate_username_choices (const gchar *name, | ||
3065 | 142 | GtkListStore *store); | ||
3066 | 143 | |||
3067 | 144 | +gboolean is_using_ecryptfs (const gchar *name); | ||
3068 | 145 | + | ||
3069 | 146 | G_END_DECLS | ||
3070 | 147 | |||
3071 | 148 | #endif | ||
3072 | 149 | 0 | ||
3073 | === added file 'debian/patches/56_use_ubuntu_info_branding.patch' | |||
3074 | --- debian/patches/56_use_ubuntu_info_branding.patch 1970-01-01 00:00:00 +0000 | |||
3075 | +++ debian/patches/56_use_ubuntu_info_branding.patch 2014-05-06 09:05:46 +0000 | |||
3076 | @@ -0,0 +1,31 @@ | |||
3077 | 1 | --- a/panels/info/cc-info-panel.c | ||
3078 | 2 | +++ b/panels/info/cc-info-panel.c | ||
3079 | 3 | @@ -1561,6 +1561,8 @@ | ||
3080 | 4 | g_free (text); | ||
3081 | 5 | } | ||
3082 | 6 | |||
3083 | 7 | + gtk_widget_hide (WID ("version_label")); | ||
3084 | 8 | + | ||
3085 | 9 | glibtop_get_mem (&mem); | ||
3086 | 10 | text = g_format_size_full (mem.total, G_FORMAT_SIZE_IEC_UNITS); | ||
3087 | 11 | widget = WID ("memory_label"); | ||
3088 | 12 | --- a/panels/info/info.ui | ||
3089 | 13 | +++ b/panels/info/info.ui | ||
3090 | 14 | @@ -243,7 +243,7 @@ | ||
3091 | 15 | <object class="GtkImage" id="system_image"> | ||
3092 | 16 | <property name="visible">True</property> | ||
3093 | 17 | <property name="can_focus">False</property> | ||
3094 | 18 | - <property name="pixbuf">GnomeLogoVerticalMedium.svg</property> | ||
3095 | 19 | + <property name="pixbuf">UbuntuLogo.png</property> | ||
3096 | 20 | </object> | ||
3097 | 21 | <packing> | ||
3098 | 22 | <property name="expand">False</property> | ||
3099 | 23 | --- a/panels/info/info.gresource.xml | ||
3100 | 24 | +++ b/panels/info/info.gresource.xml | ||
3101 | 25 | @@ -3,5 +3,6 @@ | ||
3102 | 26 | <gresource prefix="/org/gnome/control-center/info"> | ||
3103 | 27 | <file preprocess="xml-stripblanks">info.ui</file> | ||
3104 | 28 | <file>GnomeLogoVerticalMedium.svg</file> | ||
3105 | 29 | + <file>UbuntuLogo.png</file> | ||
3106 | 30 | </gresource> | ||
3107 | 31 | </gresources> | ||
3108 | 0 | 32 | ||
3109 | === removed file 'debian/patches/56_use_ubuntu_info_branding.patch' | |||
3110 | --- debian/patches/56_use_ubuntu_info_branding.patch 2013-07-05 13:31:20 +0000 | |||
3111 | +++ debian/patches/56_use_ubuntu_info_branding.patch 1970-01-01 00:00:00 +0000 | |||
3112 | @@ -1,26 +0,0 @@ | |||
3113 | 1 | Index: b/panels/info/cc-info-panel.c | ||
3114 | 2 | =================================================================== | ||
3115 | 3 | --- a/panels/info/cc-info-panel.c | ||
3116 | 4 | +++ b/panels/info/cc-info-panel.c | ||
3117 | 5 | @@ -1706,6 +1706,8 @@ | ||
3118 | 6 | g_free (text); | ||
3119 | 7 | } | ||
3120 | 8 | |||
3121 | 9 | + gtk_widget_hide (WID ("version_label")); | ||
3122 | 10 | + | ||
3123 | 11 | glibtop_get_mem (&mem); | ||
3124 | 12 | text = g_format_size_full (mem.total, G_FORMAT_SIZE_IEC_UNITS); | ||
3125 | 13 | widget = WID ("memory_label"); | ||
3126 | 14 | Index: b/panels/info/info.ui | ||
3127 | 15 | =================================================================== | ||
3128 | 16 | --- a/panels/info/info.ui | ||
3129 | 17 | +++ b/panels/info/info.ui | ||
3130 | 18 | @@ -242,7 +242,7 @@ | ||
3131 | 19 | <object class="GtkImage" id="system_image"> | ||
3132 | 20 | <property name="visible">True</property> | ||
3133 | 21 | <property name="can_focus">False</property> | ||
3134 | 22 | - <property name="pixbuf">GnomeLogoVerticalMedium.svg</property> | ||
3135 | 23 | + <property name="pixbuf">UbuntuLogo.png</property> | ||
3136 | 24 | </object> | ||
3137 | 25 | <packing> | ||
3138 | 26 | <property name="expand">False</property> | ||
3139 | 27 | 0 | ||
3140 | === removed file 'debian/patches/58_hide_gdm_notifications.patch' | |||
3141 | --- debian/patches/58_hide_gdm_notifications.patch 2013-07-05 13:31:20 +0000 | |||
3142 | +++ debian/patches/58_hide_gdm_notifications.patch 1970-01-01 00:00:00 +0000 | |||
3143 | @@ -1,17 +0,0 @@ | |||
3144 | 1 | Description: Hide "Show notifications when locked" settings when running | ||
3145 | 2 | Unity. You currently need GNOME Shell running on GDM for that to work. | ||
3146 | 3 | Forwarded: not-needed | ||
3147 | 4 | Author: Jeremy Bicha <jbicha@ubuntu.com> | ||
3148 | 5 | Index: gnome-control-center-3.6.2/panels/screen/cc-screen-panel.c | ||
3149 | 6 | =================================================================== | ||
3150 | 7 | --- gnome-control-center-3.6.2.orig/panels/screen/cc-screen-panel.c 2012-11-03 19:10:00.926617924 -0400 | ||
3151 | 8 | +++ gnome-control-center-3.6.2/panels/screen/cc-screen-panel.c 2012-11-03 19:17:14.902599774 -0400 | ||
3152 | 9 | @@ -545,6 +545,8 @@ | ||
3153 | 10 | "show-notifications", | ||
3154 | 11 | widget, "active", | ||
3155 | 12 | G_SETTINGS_BIND_DEFAULT); | ||
3156 | 13 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
3157 | 14 | + gtk_widget_hide (widget); | ||
3158 | 15 | |||
3159 | 16 | update_lock_screen_sensitivity (self); | ||
3160 | 17 | |||
3161 | 18 | 0 | ||
3162 | === removed file 'debian/patches/58_ubuntu_icon_views_redesign.patch' | |||
3163 | --- debian/patches/58_ubuntu_icon_views_redesign.patch 2013-07-05 13:31:20 +0000 | |||
3164 | +++ debian/patches/58_ubuntu_icon_views_redesign.patch 1970-01-01 00:00:00 +0000 | |||
3165 | @@ -1,70 +0,0 @@ | |||
3166 | 1 | Index: gnome-control-center-3.6.3/shell/gnome-control-center.c | ||
3167 | 2 | =================================================================== | ||
3168 | 3 | --- gnome-control-center-3.6.3.orig/shell/gnome-control-center.c 2012-11-24 10:39:18.476282140 -0500 | ||
3169 | 4 | +++ gnome-control-center-3.6.3/shell/gnome-control-center.c 2012-11-24 10:52:26.776249171 -0500 | ||
3170 | 5 | @@ -50,7 +50,8 @@ | ||
3171 | 6 | * for the user than resizing vertically | ||
3172 | 7 | * Both sizes are defined in https://live.gnome.org/Design/SystemSettings/ */ | ||
3173 | 8 | #define FIXED_WIDTH 740 | ||
3174 | 9 | -#define FIXED_HEIGHT 636 | ||
3175 | 10 | +#define UNITY_FIXED_WIDTH 850 | ||
3176 | 11 | +#define FIXED_HEIGHT 650 | ||
3177 | 12 | #define SMALL_SCREEN_FIXED_HEIGHT 400 | ||
3178 | 13 | |||
3179 | 14 | #define MIN_ICON_VIEW_HEIGHT 300 | ||
3180 | 15 | @@ -910,8 +911,12 @@ | ||
3181 | 16 | gtk_widget_show (W (priv->builder, "search-entry")); | ||
3182 | 17 | gtk_widget_hide (W (priv->builder, "lock-button")); | ||
3183 | 18 | |||
3184 | 19 | - gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->main_vbox), | ||
3185 | 20 | - FIXED_WIDTH, NULL, &nat_height); | ||
3186 | 21 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
3187 | 22 | + gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->main_vbox), | ||
3188 | 23 | + UNITY_FIXED_WIDTH, NULL, &nat_height); | ||
3189 | 24 | + else | ||
3190 | 25 | + gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->main_vbox), | ||
3191 | 26 | + FIXED_WIDTH, NULL, &nat_height); | ||
3192 | 27 | gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (priv->scrolled_window), | ||
3193 | 28 | priv->small_screen == SMALL_SCREEN_TRUE ? SMALL_SCREEN_FIXED_HEIGHT : nat_height); | ||
3194 | 29 | } | ||
3195 | 30 | @@ -921,12 +926,22 @@ | ||
3196 | 31 | gtk_widget_hide (W (priv->builder, "search-entry")); | ||
3197 | 32 | /* set the scrolled window small so that it doesn't force | ||
3198 | 33 | the window to be larger than this panel */ | ||
3199 | 34 | - gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->window), | ||
3200 | 35 | - FIXED_WIDTH, NULL, &nat_height); | ||
3201 | 36 | - gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (priv->scrolled_window), MIN_ICON_VIEW_HEIGHT); | ||
3202 | 37 | - gtk_window_resize (GTK_WINDOW (priv->window), | ||
3203 | 38 | - FIXED_WIDTH, | ||
3204 | 39 | - nat_height); | ||
3205 | 40 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) { | ||
3206 | 41 | + gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->window), | ||
3207 | 42 | + UNITY_FIXED_WIDTH, NULL, &nat_height); | ||
3208 | 43 | + gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (priv->scrolled_window), MIN_ICON_VIEW_HEIGHT); | ||
3209 | 44 | + gtk_window_resize (GTK_WINDOW (priv->window), | ||
3210 | 45 | + UNITY_FIXED_WIDTH, | ||
3211 | 46 | + nat_height); | ||
3212 | 47 | + } | ||
3213 | 48 | + else { | ||
3214 | 49 | + gtk_widget_get_preferred_height_for_width (GTK_WIDGET (priv->window), | ||
3215 | 50 | + FIXED_WIDTH, NULL, &nat_height); | ||
3216 | 51 | + gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (priv->scrolled_window), MIN_ICON_VIEW_HEIGHT); | ||
3217 | 52 | + gtk_window_resize (GTK_WINDOW (priv->window), | ||
3218 | 53 | + FIXED_WIDTH, | ||
3219 | 54 | + nat_height); | ||
3220 | 55 | + } | ||
3221 | 56 | } | ||
3222 | 57 | } | ||
3223 | 58 | |||
3224 | 59 | @@ -1373,7 +1388,10 @@ | ||
3225 | 60 | /* Main scrolled window */ | ||
3226 | 61 | priv->scrolled_window = W (priv->builder, "scrolledwindow1"); | ||
3227 | 62 | |||
3228 | 63 | - gtk_widget_set_size_request (priv->scrolled_window, FIXED_WIDTH, -1); | ||
3229 | 64 | + if (!g_strcmp0(g_getenv("XDG_CURRENT_DESKTOP"), "Unity")) | ||
3230 | 65 | + gtk_widget_set_size_request (priv->scrolled_window, UNITY_FIXED_WIDTH, -1); | ||
3231 | 66 | + else | ||
3232 | 67 | + gtk_widget_set_size_request (priv->scrolled_window, FIXED_WIDTH, -1); | ||
3233 | 68 | priv->main_vbox = W (priv->builder, "main-vbox"); | ||
3234 | 69 | g_signal_connect (priv->notebook, "notify::page", | ||
3235 | 70 | G_CALLBACK (notebook_page_notify_cb), priv); | ||
3236 | 71 | 0 | ||
3237 | === removed file 'debian/patches/59_install_gcm_components_on_demand.patch' | |||
3238 | --- debian/patches/59_install_gcm_components_on_demand.patch 2013-07-05 13:31:20 +0000 | |||
3239 | +++ debian/patches/59_install_gcm_components_on_demand.patch 1970-01-01 00:00:00 +0000 | |||
3240 | @@ -1,231 +0,0 @@ | |||
3241 | 1 | Index: b/panels/color/cc-color-panel.c | ||
3242 | 2 | =================================================================== | ||
3243 | 3 | --- a/panels/color/cc-color-panel.c | ||
3244 | 4 | +++ b/panels/color/cc-color-panel.c | ||
3245 | 5 | @@ -25,6 +25,7 @@ | ||
3246 | 6 | #include <colord.h> | ||
3247 | 7 | #include <gtk/gtk.h> | ||
3248 | 8 | #include <gdk/gdkx.h> | ||
3249 | 9 | +#include <gio/gio.h> | ||
3250 | 10 | |||
3251 | 11 | #include "cc-color-panel.h" | ||
3252 | 12 | |||
3253 | 13 | @@ -260,32 +261,148 @@ | ||
3254 | 14 | } | ||
3255 | 15 | |||
3256 | 16 | static void | ||
3257 | 17 | -gcm_prefs_calibrate_cb (GtkWidget *widget, CcColorPanel *prefs) | ||
3258 | 18 | +gcm_packagekit_finished_cb (GObject *source, GAsyncResult *res, gpointer user_data) | ||
3259 | 19 | +{ | ||
3260 | 20 | + GPtrArray *argv = (GPtrArray *)user_data; | ||
3261 | 21 | + GVariant *reply; | ||
3262 | 22 | + GError *error = NULL; | ||
3263 | 23 | + gboolean ret; | ||
3264 | 24 | + | ||
3265 | 25 | + reply = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), res, &error); | ||
3266 | 26 | + g_variant_unref (reply); | ||
3267 | 27 | + | ||
3268 | 28 | + if (error != NULL) | ||
3269 | 29 | + { | ||
3270 | 30 | + g_warning ("failed to install required component: %s", error->message); | ||
3271 | 31 | + g_ptr_array_unref (argv); | ||
3272 | 32 | + g_error_free (error); | ||
3273 | 33 | + return; | ||
3274 | 34 | + } | ||
3275 | 35 | + | ||
3276 | 36 | + ret = g_spawn_async (NULL, (gchar**) argv->pdata, NULL, 0, | ||
3277 | 37 | + NULL, NULL, NULL, &error); | ||
3278 | 38 | + g_ptr_array_unref (argv); | ||
3279 | 39 | + if (!ret) | ||
3280 | 40 | + { | ||
3281 | 41 | + g_warning ("failed to run command: %s", error->message); | ||
3282 | 42 | + g_error_free (error); | ||
3283 | 43 | + } | ||
3284 | 44 | +} | ||
3285 | 45 | + | ||
3286 | 46 | +struct gcm_packagekit_closure_data | ||
3287 | 47 | +{ | ||
3288 | 48 | + GPtrArray *argv; | ||
3289 | 49 | + guint xid; | ||
3290 | 50 | +}; | ||
3291 | 51 | + | ||
3292 | 52 | +static void | ||
3293 | 53 | +gcm_packagekit_proxy_ready_cb (GObject *source, GAsyncResult *res, gpointer user_data) | ||
3294 | 54 | +{ | ||
3295 | 55 | + struct gcm_packagekit_closure_data *data = | ||
3296 | 56 | + (struct gcm_packagekit_closure_data *)user_data; | ||
3297 | 57 | + GDBusProxy *session_installer; | ||
3298 | 58 | + GVariantBuilder *builder; | ||
3299 | 59 | + GError *error = NULL; | ||
3300 | 60 | + | ||
3301 | 61 | + session_installer = g_dbus_proxy_new_for_bus_finish (res, &error); | ||
3302 | 62 | + if (error != NULL) | ||
3303 | 63 | + { | ||
3304 | 64 | + g_warning ("failed to connect to PackageKit interface: %s", | ||
3305 | 65 | + error->message); | ||
3306 | 66 | + g_ptr_array_unref (data->argv); | ||
3307 | 67 | + g_free (data); | ||
3308 | 68 | + g_error_free (error); | ||
3309 | 69 | + return; | ||
3310 | 70 | + } | ||
3311 | 71 | + | ||
3312 | 72 | + builder = g_variant_builder_new (G_VARIANT_TYPE ("as")); | ||
3313 | 73 | + g_variant_builder_add (builder, "s", | ||
3314 | 74 | + g_ptr_array_index (data->argv, 0)); | ||
3315 | 75 | + g_dbus_proxy_call (session_installer, | ||
3316 | 76 | + "InstallProvideFiles", | ||
3317 | 77 | + g_variant_new ("(uass)", | ||
3318 | 78 | + data->xid, | ||
3319 | 79 | + builder, | ||
3320 | 80 | + "hide-finished" | ||
3321 | 81 | + ), | ||
3322 | 82 | + G_DBUS_CALL_FLAGS_NONE, | ||
3323 | 83 | + -1, | ||
3324 | 84 | + NULL, | ||
3325 | 85 | + &gcm_packagekit_finished_cb, | ||
3326 | 86 | + data->argv); | ||
3327 | 87 | + | ||
3328 | 88 | + g_free (data); | ||
3329 | 89 | + g_variant_builder_unref (builder); | ||
3330 | 90 | +} | ||
3331 | 91 | + | ||
3332 | 92 | +static void | ||
3333 | 93 | +gcm_prefs_install_component (guint xid, GPtrArray *argv) | ||
3334 | 94 | +{ | ||
3335 | 95 | + struct gcm_packagekit_closure_data *data; | ||
3336 | 96 | + data = g_malloc (sizeof (*data)); | ||
3337 | 97 | + data->argv = argv; | ||
3338 | 98 | + data->xid = xid; | ||
3339 | 99 | + g_ptr_array_ref (data->argv); | ||
3340 | 100 | + | ||
3341 | 101 | + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, | ||
3342 | 102 | + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | | ||
3343 | 103 | + G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, | ||
3344 | 104 | + NULL, | ||
3345 | 105 | + "org.freedesktop.PackageKit", | ||
3346 | 106 | + "/org/freedesktop/PackageKit", | ||
3347 | 107 | + "org.freedesktop.PackageKit.Modify", | ||
3348 | 108 | + NULL, | ||
3349 | 109 | + &gcm_packagekit_proxy_ready_cb, | ||
3350 | 110 | + data); | ||
3351 | 111 | +} | ||
3352 | 112 | + | ||
3353 | 113 | +static void | ||
3354 | 114 | +gcm_prefs_run_maybe_install (guint xid, gchar *filename, GPtrArray *argv) | ||
3355 | 115 | { | ||
3356 | 116 | gboolean ret; | ||
3357 | 117 | GError *error = NULL; | ||
3358 | 118 | + | ||
3359 | 119 | + ret = g_spawn_async (NULL, (gchar**) argv->pdata, NULL, 0, | ||
3360 | 120 | + NULL, NULL, NULL, &error); | ||
3361 | 121 | + if (!ret) | ||
3362 | 122 | + { | ||
3363 | 123 | + if ((error->domain == g_spawn_error_quark ()) && | ||
3364 | 124 | + (error->code == G_SPAWN_ERROR_NOENT)) | ||
3365 | 125 | + { | ||
3366 | 126 | + gcm_prefs_install_component (xid, argv); | ||
3367 | 127 | + } | ||
3368 | 128 | + else | ||
3369 | 129 | + { | ||
3370 | 130 | + g_warning ("failed to run command: %s", error->message); | ||
3371 | 131 | + } | ||
3372 | 132 | + g_error_free (error); | ||
3373 | 133 | + } | ||
3374 | 134 | +} | ||
3375 | 135 | + | ||
3376 | 136 | +static void | ||
3377 | 137 | +gcm_prefs_calibrate_cb (GtkWidget *widget, CcColorPanel *prefs) | ||
3378 | 138 | +{ | ||
3379 | 139 | guint xid; | ||
3380 | 140 | GPtrArray *argv; | ||
3381 | 141 | + gchar *calibrater_filename; | ||
3382 | 142 | CcColorPanelPrivate *priv = prefs->priv; | ||
3383 | 143 | |||
3384 | 144 | /* get xid */ | ||
3385 | 145 | xid = gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (priv->main_window))); | ||
3386 | 146 | |||
3387 | 147 | + calibrater_filename = g_build_filename (BINDIR, "gcm-calibrate", NULL); | ||
3388 | 148 | + | ||
3389 | 149 | /* run with modal set */ | ||
3390 | 150 | argv = g_ptr_array_new_with_free_func (g_free); | ||
3391 | 151 | - g_ptr_array_add (argv, g_build_filename (BINDIR, "gcm-calibrate", NULL)); | ||
3392 | 152 | + g_ptr_array_add (argv, calibrater_filename); | ||
3393 | 153 | g_ptr_array_add (argv, g_strdup ("--device")); | ||
3394 | 154 | g_ptr_array_add (argv, g_strdup (cd_device_get_id (priv->current_device))); | ||
3395 | 155 | g_ptr_array_add (argv, g_strdup ("--parent-window")); | ||
3396 | 156 | g_ptr_array_add (argv, g_strdup_printf ("%i", xid)); | ||
3397 | 157 | g_ptr_array_add (argv, NULL); | ||
3398 | 158 | - ret = g_spawn_async (NULL, (gchar**) argv->pdata, NULL, 0, | ||
3399 | 159 | - NULL, NULL, NULL, &error); | ||
3400 | 160 | - if (!ret) | ||
3401 | 161 | - { | ||
3402 | 162 | - g_warning ("failed to run calibrate: %s", error->message); | ||
3403 | 163 | - g_error_free (error); | ||
3404 | 164 | - } | ||
3405 | 165 | + | ||
3406 | 166 | + gcm_prefs_run_maybe_install (xid, calibrater_filename, argv); | ||
3407 | 167 | + | ||
3408 | 168 | g_ptr_array_unref (argv); | ||
3409 | 169 | } | ||
3410 | 170 | |||
3411 | 171 | @@ -656,10 +773,9 @@ | ||
3412 | 172 | GtkTreeModel *model; | ||
3413 | 173 | GtkTreeSelection *selection; | ||
3414 | 174 | gchar *options = NULL; | ||
3415 | 175 | + gchar *viewer_filename; | ||
3416 | 176 | GPtrArray *argv = NULL; | ||
3417 | 177 | guint xid; | ||
3418 | 178 | - gboolean ret; | ||
3419 | 179 | - GError *error = NULL; | ||
3420 | 180 | CcColorPanelPrivate *priv = prefs->priv; | ||
3421 | 181 | |||
3422 | 182 | /* get the selected row */ | ||
3423 | 183 | @@ -677,21 +793,17 @@ | ||
3424 | 184 | /* get xid */ | ||
3425 | 185 | xid = gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET (priv->main_window))); | ||
3426 | 186 | |||
3427 | 187 | + viewer_filename = g_build_filename (BINDIR, "gcm-viewer", NULL); | ||
3428 | 188 | /* open up gcm-viewer as a info pane */ | ||
3429 | 189 | argv = g_ptr_array_new_with_free_func (g_free); | ||
3430 | 190 | - g_ptr_array_add (argv, g_build_filename (BINDIR, "gcm-viewer", NULL)); | ||
3431 | 191 | + g_ptr_array_add (argv, viewer_filename); | ||
3432 | 192 | g_ptr_array_add (argv, g_strdup ("--profile")); | ||
3433 | 193 | g_ptr_array_add (argv, g_strdup (cd_profile_get_id (profile))); | ||
3434 | 194 | g_ptr_array_add (argv, g_strdup ("--parent-window")); | ||
3435 | 195 | g_ptr_array_add (argv, g_strdup_printf ("%i", xid)); | ||
3436 | 196 | g_ptr_array_add (argv, NULL); | ||
3437 | 197 | - ret = g_spawn_async (NULL, (gchar**) argv->pdata, NULL, 0, | ||
3438 | 198 | - NULL, NULL, NULL, &error); | ||
3439 | 199 | - if (!ret) | ||
3440 | 200 | - { | ||
3441 | 201 | - g_warning ("failed to run calibrate: %s", error->message); | ||
3442 | 202 | - g_error_free (error); | ||
3443 | 203 | - } | ||
3444 | 204 | + | ||
3445 | 205 | + gcm_prefs_run_maybe_install (xid, viewer_filename, argv); | ||
3446 | 206 | |||
3447 | 207 | g_ptr_array_unref (argv); | ||
3448 | 208 | g_free (options); | ||
3449 | 209 | @@ -995,7 +1107,6 @@ | ||
3450 | 210 | { | ||
3451 | 211 | GtkWidget *widget; | ||
3452 | 212 | CdDeviceRelation relation; | ||
3453 | 213 | - gchar *s; | ||
3454 | 214 | CcColorPanelPrivate *priv = prefs->priv; | ||
3455 | 215 | |||
3456 | 216 | /* get profile */ | ||
3457 | 217 | @@ -1026,13 +1137,7 @@ | ||
3458 | 218 | /* allow getting profile info */ | ||
3459 | 219 | widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, | ||
3460 | 220 | "toolbutton_profile_view")); | ||
3461 | 221 | - if ((s = g_find_program_in_path ("gcm-viewer"))) | ||
3462 | 222 | - { | ||
3463 | 223 | - gtk_widget_set_sensitive (widget, TRUE); | ||
3464 | 224 | - g_free (s); | ||
3465 | 225 | - } | ||
3466 | 226 | - else | ||
3467 | 227 | - gtk_widget_set_sensitive (widget, FALSE); | ||
3468 | 228 | + gtk_widget_set_sensitive (widget, TRUE); | ||
3469 | 229 | |||
3470 | 230 | /* hide device specific stuff */ | ||
3471 | 231 | widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, | ||
3472 | 232 | 0 | ||
3473 | === removed file 'debian/patches/60_ubuntu_nav_bar.patch' | |||
3474 | --- debian/patches/60_ubuntu_nav_bar.patch 2013-07-05 13:31:20 +0000 | |||
3475 | +++ debian/patches/60_ubuntu_nav_bar.patch 1970-01-01 00:00:00 +0000 | |||
3476 | @@ -1,406 +0,0 @@ | |||
3477 | 1 | # Description: set a navigation bar in the g-c-c shell | ||
3478 | 2 | # UbuntuSpecific: yes | ||
3479 | 3 | # | ||
3480 | 4 | === modified file 'shell/Makefile.am' | ||
3481 | 5 | Index: gnome-control-center-3.6.3/shell/Makefile.am | ||
3482 | 6 | =================================================================== | ||
3483 | 7 | --- gnome-control-center-3.6.3.orig/shell/Makefile.am 2012-10-01 11:39:00.000000000 +0200 | ||
3484 | 8 | +++ gnome-control-center-3.6.3/shell/Makefile.am 2012-11-22 10:20:59.485282338 +0100 | ||
3485 | 9 | @@ -26,6 +26,8 @@ | ||
3486 | 10 | cc-shell-item-view.h \ | ||
3487 | 11 | cc-shell-model.c \ | ||
3488 | 12 | cc-shell-model.h \ | ||
3489 | 13 | + cc-shell-nav-bar.c \ | ||
3490 | 14 | + cc-shell-nav-bar.h \ | ||
3491 | 15 | cc-editable-entry.c \ | ||
3492 | 16 | cc-editable-entry.h \ | ||
3493 | 17 | cc-panel.c \ | ||
3494 | 18 | Index: gnome-control-center-3.6.3/shell/cc-shell-marshal.list | ||
3495 | 19 | =================================================================== | ||
3496 | 20 | --- gnome-control-center-3.6.3.orig/shell/cc-shell-marshal.list 2011-11-07 18:22:02.000000000 +0100 | ||
3497 | 21 | +++ gnome-control-center-3.6.3/shell/cc-shell-marshal.list 2012-11-22 10:20:56.873282212 +0100 | ||
3498 | 22 | @@ -1 +1,2 @@ | ||
3499 | 23 | VOID:STRING,STRING,STRING | ||
3500 | 24 | +VOID:VOID | ||
3501 | 25 | Index: gnome-control-center-3.6.3/shell/cc-shell-nav-bar.c | ||
3502 | 26 | =================================================================== | ||
3503 | 27 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
3504 | 28 | +++ gnome-control-center-3.6.3/shell/cc-shell-nav-bar.c 2012-11-22 10:20:56.873282212 +0100 | ||
3505 | 29 | @@ -0,0 +1,150 @@ | ||
3506 | 30 | +/* | ||
3507 | 31 | + * Copyright 2012 Canonical | ||
3508 | 32 | + * | ||
3509 | 33 | + * The Control Center is free software; you can redistribute it and/or modify | ||
3510 | 34 | + * it under the terms of the GNU General Public License as published by the | ||
3511 | 35 | + * Free Software Foundation; either version 2 of the License, or (at your | ||
3512 | 36 | + * option) any later version. | ||
3513 | 37 | + * | ||
3514 | 38 | + * The Control Center is distributed in the hope that it will be useful, but | ||
3515 | 39 | + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
3516 | 40 | + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
3517 | 41 | + * for more details. | ||
3518 | 42 | + * | ||
3519 | 43 | + * You should have received a copy of the GNU General Public License along | ||
3520 | 44 | + * with the Control Center; if not, write to the Free Software Foundation, | ||
3521 | 45 | + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
3522 | 46 | + * | ||
3523 | 47 | + * Author: Aurélien Gâteau <aurelien.gateau@canonical.com> | ||
3524 | 48 | + */ | ||
3525 | 49 | + | ||
3526 | 50 | +#include "cc-shell-nav-bar.h" | ||
3527 | 51 | +#include "cc-shell-marshal.h" | ||
3528 | 52 | + | ||
3529 | 53 | +#include <glib/gi18n.h> | ||
3530 | 54 | + | ||
3531 | 55 | +G_DEFINE_TYPE (CcShellNavBar, cc_shell_nav_bar, GTK_TYPE_BOX) | ||
3532 | 56 | + | ||
3533 | 57 | +#define SHELL_NAV_BAR_PRIVATE(o) \ | ||
3534 | 58 | + (G_TYPE_INSTANCE_GET_PRIVATE ((o), CC_TYPE_SHELL_NAV_BAR, CcShellNavBarPrivate)) | ||
3535 | 59 | + | ||
3536 | 60 | +struct _CcShellNavBarPrivate | ||
3537 | 61 | +{ | ||
3538 | 62 | + GtkWidget *home_button; | ||
3539 | 63 | + GtkWidget *detail_button; | ||
3540 | 64 | +}; | ||
3541 | 65 | + | ||
3542 | 66 | +enum | ||
3543 | 67 | +{ | ||
3544 | 68 | + HOME_CLICKED, | ||
3545 | 69 | + LAST_SIGNAL | ||
3546 | 70 | +}; | ||
3547 | 71 | + | ||
3548 | 72 | +static guint signals[LAST_SIGNAL] = {0,}; | ||
3549 | 73 | + | ||
3550 | 74 | +static void | ||
3551 | 75 | +cc_shell_nav_bar_get_property (GObject *object, | ||
3552 | 76 | + guint property_id, | ||
3553 | 77 | + GValue *value, | ||
3554 | 78 | + GParamSpec *pspec) | ||
3555 | 79 | +{ | ||
3556 | 80 | + switch (property_id) | ||
3557 | 81 | + { | ||
3558 | 82 | + default: | ||
3559 | 83 | + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); | ||
3560 | 84 | + } | ||
3561 | 85 | +} | ||
3562 | 86 | + | ||
3563 | 87 | +static void | ||
3564 | 88 | +cc_shell_nav_bar_set_property (GObject *object, | ||
3565 | 89 | + guint property_id, | ||
3566 | 90 | + const GValue *value, | ||
3567 | 91 | + GParamSpec *pspec) | ||
3568 | 92 | +{ | ||
3569 | 93 | + switch (property_id) | ||
3570 | 94 | + { | ||
3571 | 95 | + default: | ||
3572 | 96 | + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); | ||
3573 | 97 | + } | ||
3574 | 98 | +} | ||
3575 | 99 | + | ||
3576 | 100 | +static void | ||
3577 | 101 | +cc_shell_nav_bar_dispose (GObject *object) | ||
3578 | 102 | +{ | ||
3579 | 103 | + G_OBJECT_CLASS (cc_shell_nav_bar_parent_class)->dispose (object); | ||
3580 | 104 | +} | ||
3581 | 105 | + | ||
3582 | 106 | +static void | ||
3583 | 107 | +cc_shell_nav_bar_finalize (GObject *object) | ||
3584 | 108 | +{ | ||
3585 | 109 | + G_OBJECT_CLASS (cc_shell_nav_bar_parent_class)->finalize (object); | ||
3586 | 110 | +} | ||
3587 | 111 | + | ||
3588 | 112 | +static void | ||
3589 | 113 | +home_button_clicked_cb (GtkButton *button, | ||
3590 | 114 | + CcShellNavBar *bar) | ||
3591 | 115 | +{ | ||
3592 | 116 | + g_signal_emit (bar, signals[HOME_CLICKED], 0); | ||
3593 | 117 | +} | ||
3594 | 118 | + | ||
3595 | 119 | +static void | ||
3596 | 120 | +cc_shell_nav_bar_class_init (CcShellNavBarClass *klass) | ||
3597 | 121 | +{ | ||
3598 | 122 | + GObjectClass *object_class = G_OBJECT_CLASS (klass); | ||
3599 | 123 | + | ||
3600 | 124 | + g_type_class_add_private (klass, sizeof (CcShellNavBarPrivate)); | ||
3601 | 125 | + | ||
3602 | 126 | + object_class->get_property = cc_shell_nav_bar_get_property; | ||
3603 | 127 | + object_class->set_property = cc_shell_nav_bar_set_property; | ||
3604 | 128 | + object_class->dispose = cc_shell_nav_bar_dispose; | ||
3605 | 129 | + object_class->finalize = cc_shell_nav_bar_finalize; | ||
3606 | 130 | + | ||
3607 | 131 | + signals[HOME_CLICKED] = g_signal_new ("home-clicked", | ||
3608 | 132 | + CC_TYPE_SHELL_NAV_BAR, | ||
3609 | 133 | + G_SIGNAL_RUN_FIRST, | ||
3610 | 134 | + 0, | ||
3611 | 135 | + NULL, | ||
3612 | 136 | + NULL, | ||
3613 | 137 | + cc_shell_marshal_VOID__VOID, | ||
3614 | 138 | + G_TYPE_NONE, | ||
3615 | 139 | + 0); | ||
3616 | 140 | +} | ||
3617 | 141 | + | ||
3618 | 142 | +static void | ||
3619 | 143 | +cc_shell_nav_bar_init (CcShellNavBar *self) | ||
3620 | 144 | +{ | ||
3621 | 145 | + self->priv = SHELL_NAV_BAR_PRIVATE (self); | ||
3622 | 146 | + self->priv->home_button = gtk_button_new_with_mnemonic (_("_All Settings")); | ||
3623 | 147 | + self->priv->detail_button = gtk_button_new(); | ||
3624 | 148 | + | ||
3625 | 149 | + gtk_box_pack_start (GTK_BOX(self), self->priv->home_button, FALSE, FALSE, 0); | ||
3626 | 150 | + gtk_box_pack_start (GTK_BOX(self), self->priv->detail_button, FALSE, FALSE, 0); | ||
3627 | 151 | + | ||
3628 | 152 | + gtk_widget_show (self->priv->home_button); | ||
3629 | 153 | + | ||
3630 | 154 | + g_signal_connect (self->priv->home_button, "clicked", | ||
3631 | 155 | + G_CALLBACK (home_button_clicked_cb), self); | ||
3632 | 156 | + | ||
3633 | 157 | + GtkStyleContext *context = gtk_widget_get_style_context (GTK_WIDGET(self)); | ||
3634 | 158 | + gtk_style_context_add_class (context, GTK_STYLE_CLASS_LINKED); | ||
3635 | 159 | + gtk_style_context_add_class (context, "breadcrumbs"); | ||
3636 | 160 | +} | ||
3637 | 161 | + | ||
3638 | 162 | +GtkWidget * | ||
3639 | 163 | +cc_shell_nav_bar_new (void) | ||
3640 | 164 | +{ | ||
3641 | 165 | + return g_object_new (CC_TYPE_SHELL_NAV_BAR, NULL); | ||
3642 | 166 | +} | ||
3643 | 167 | + | ||
3644 | 168 | +void | ||
3645 | 169 | +cc_shell_nav_bar_show_detail_button (CcShellNavBar *bar, const gchar *label) | ||
3646 | 170 | +{ | ||
3647 | 171 | + gtk_widget_show (bar->priv->detail_button); | ||
3648 | 172 | + gtk_button_set_label (GTK_BUTTON (bar->priv->detail_button), label); | ||
3649 | 173 | +} | ||
3650 | 174 | + | ||
3651 | 175 | +void | ||
3652 | 176 | +cc_shell_nav_bar_hide_detail_button (CcShellNavBar *bar) | ||
3653 | 177 | +{ | ||
3654 | 178 | + gtk_widget_hide (bar->priv->detail_button); | ||
3655 | 179 | +} | ||
3656 | 180 | Index: gnome-control-center-3.6.3/shell/cc-shell-nav-bar.h | ||
3657 | 181 | =================================================================== | ||
3658 | 182 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
3659 | 183 | +++ gnome-control-center-3.6.3/shell/cc-shell-nav-bar.h 2012-11-22 10:20:56.877282212 +0100 | ||
3660 | 184 | @@ -0,0 +1,76 @@ | ||
3661 | 185 | +/* | ||
3662 | 186 | + * Copyright 2012 Canonical | ||
3663 | 187 | + * | ||
3664 | 188 | + * The Control Center is free software; you can redistribute it and/or modify | ||
3665 | 189 | + * it under the terms of the GNU General Public License as published by the | ||
3666 | 190 | + * Free Software Foundation; either version 2 of the License, or (at your | ||
3667 | 191 | + * option) any later version. | ||
3668 | 192 | + * | ||
3669 | 193 | + * The Control Center is distributed in the hope that it will be useful, but | ||
3670 | 194 | + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
3671 | 195 | + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
3672 | 196 | + * for more details. | ||
3673 | 197 | + * | ||
3674 | 198 | + * You should have received a copy of the GNU General Public License along | ||
3675 | 199 | + * with the Control Center; if not, write to the Free Software Foundation, | ||
3676 | 200 | + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
3677 | 201 | + * | ||
3678 | 202 | + * Author: Aurélien Gâteau <aurelien.gateau@canonical.com> | ||
3679 | 203 | + */ | ||
3680 | 204 | + | ||
3681 | 205 | +#ifndef _CC_SHELL_NAV_BAR_H | ||
3682 | 206 | +#define _CC_SHELL_NAV_BAR_H | ||
3683 | 207 | + | ||
3684 | 208 | +#include <gtk/gtk.h> | ||
3685 | 209 | + | ||
3686 | 210 | +G_BEGIN_DECLS | ||
3687 | 211 | + | ||
3688 | 212 | +#define CC_TYPE_SHELL_NAV_BAR cc_shell_nav_bar_get_type() | ||
3689 | 213 | + | ||
3690 | 214 | +#define CC_SHELL_NAV_BAR(obj) \ | ||
3691 | 215 | + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ | ||
3692 | 216 | + CC_TYPE_SHELL_NAV_BAR, CcShellNavBar)) | ||
3693 | 217 | + | ||
3694 | 218 | +#define CC_SHELL_NAV_BAR_CLASS(klass) \ | ||
3695 | 219 | + (G_TYPE_CHECK_CLASS_CAST ((klass), \ | ||
3696 | 220 | + CC_TYPE_SHELL_NAV_BAR, CcShellNavBarClass)) | ||
3697 | 221 | + | ||
3698 | 222 | +#define CC_IS_SHELL_NAV_BAR(obj) \ | ||
3699 | 223 | + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ | ||
3700 | 224 | + CC_TYPE_SHELL_NAV_BAR)) | ||
3701 | 225 | + | ||
3702 | 226 | +#define CC_IS_SHELL_NAV_BAR_CLASS(klass) \ | ||
3703 | 227 | + (G_TYPE_CHECK_CLASS_TYPE ((klass), \ | ||
3704 | 228 | + CC_TYPE_SHELL_NAV_BAR)) | ||
3705 | 229 | + | ||
3706 | 230 | +#define CC_SHELL_NAV_BAR_GET_CLASS(obj) \ | ||
3707 | 231 | + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ | ||
3708 | 232 | + CC_TYPE_SHELL_NAV_BAR, CcShellNavBarClass)) | ||
3709 | 233 | + | ||
3710 | 234 | +typedef struct _CcShellNavBar CcShellNavBar; | ||
3711 | 235 | +typedef struct _CcShellNavBarClass CcShellNavBarClass; | ||
3712 | 236 | +typedef struct _CcShellNavBarPrivate CcShellNavBarPrivate; | ||
3713 | 237 | + | ||
3714 | 238 | +struct _CcShellNavBar | ||
3715 | 239 | +{ | ||
3716 | 240 | + GtkBox parent; | ||
3717 | 241 | + | ||
3718 | 242 | + CcShellNavBarPrivate *priv; | ||
3719 | 243 | +}; | ||
3720 | 244 | + | ||
3721 | 245 | +struct _CcShellNavBarClass | ||
3722 | 246 | +{ | ||
3723 | 247 | + GtkBoxClass parent_class; | ||
3724 | 248 | +}; | ||
3725 | 249 | + | ||
3726 | 250 | +GType cc_shell_nav_bar_get_type (void) G_GNUC_CONST; | ||
3727 | 251 | + | ||
3728 | 252 | +GtkWidget *cc_shell_nav_bar_new (void); | ||
3729 | 253 | + | ||
3730 | 254 | +void cc_shell_nav_bar_show_detail_button (CcShellNavBar *bar, const gchar *label); | ||
3731 | 255 | + | ||
3732 | 256 | +void cc_shell_nav_bar_hide_detail_button (CcShellNavBar *bar); | ||
3733 | 257 | + | ||
3734 | 258 | +G_END_DECLS | ||
3735 | 259 | + | ||
3736 | 260 | +#endif /* _CC_SHELL_NAV_BAR_H */ | ||
3737 | 261 | Index: gnome-control-center-3.6.3/shell/gnome-control-center.c | ||
3738 | 262 | =================================================================== | ||
3739 | 263 | --- gnome-control-center-3.6.3.orig/shell/gnome-control-center.c 2012-11-22 10:20:56.833282210 +0100 | ||
3740 | 264 | +++ gnome-control-center-3.6.3/shell/gnome-control-center.c 2012-11-22 10:20:59.485282338 +0100 | ||
3741 | 265 | @@ -38,6 +38,7 @@ | ||
3742 | 266 | #include "cc-shell.h" | ||
3743 | 267 | #include "cc-shell-category-view.h" | ||
3744 | 268 | #include "cc-shell-model.h" | ||
3745 | 269 | +#include "cc-shell-nav-bar.h" | ||
3746 | 270 | |||
3747 | 271 | G_DEFINE_TYPE (GnomeControlCenter, gnome_control_center, CC_TYPE_SHELL) | ||
3748 | 272 | |||
3749 | 273 | @@ -75,6 +76,7 @@ | ||
3750 | 274 | GtkWidget *search_entry; | ||
3751 | 275 | GtkWidget *lock_button; | ||
3752 | 276 | GPtrArray *custom_widgets; | ||
3753 | 277 | + GtkWidget *nav_bar; | ||
3754 | 278 | |||
3755 | 279 | GMenuTree *menu_tree; | ||
3756 | 280 | GtkListStore *store; | ||
3757 | 281 | @@ -237,6 +239,7 @@ | ||
3758 | 282 | /* switch to the new panel */ | ||
3759 | 283 | gtk_widget_show (box); | ||
3760 | 284 | notebook_select_page (priv->notebook, box); | ||
3761 | 285 | + cc_shell_nav_bar_show_detail_button (CC_SHELL_NAV_BAR(shell->priv->nav_bar), name); | ||
3762 | 286 | |||
3763 | 287 | /* set the title of the window */ | ||
3764 | 288 | icon_name = get_icon_name_from_g_icon (gicon); | ||
3765 | 289 | @@ -299,6 +302,8 @@ | ||
3766 | 290 | |||
3767 | 291 | /* clear any custom widgets */ | ||
3768 | 292 | _shell_remove_all_custom_widgets (priv); | ||
3769 | 293 | + | ||
3770 | 294 | + cc_shell_nav_bar_hide_detail_button (CC_SHELL_NAV_BAR (priv->nav_bar)); | ||
3771 | 295 | } | ||
3772 | 296 | |||
3773 | 297 | void | ||
3774 | 298 | @@ -902,11 +907,8 @@ | ||
3775 | 299 | |||
3776 | 300 | child = notebook_get_selected_page (GTK_WIDGET (notebook)); | ||
3777 | 301 | |||
3778 | 302 | - /* make sure the home button is shown on all pages except the overview page */ | ||
3779 | 303 | - | ||
3780 | 304 | if (child == priv->scrolled_window || child == priv->search_scrolled) | ||
3781 | 305 | { | ||
3782 | 306 | - gtk_widget_hide (W (priv->builder, "home-button")); | ||
3783 | 307 | gtk_widget_show (W (priv->builder, "search-entry")); | ||
3784 | 308 | gtk_widget_hide (W (priv->builder, "lock-button")); | ||
3785 | 309 | |||
3786 | 310 | @@ -917,7 +919,6 @@ | ||
3787 | 311 | } | ||
3788 | 312 | else | ||
3789 | 313 | { | ||
3790 | 314 | - gtk_widget_show (W (priv->builder, "home-button")); | ||
3791 | 315 | gtk_widget_hide (W (priv->builder, "search-entry")); | ||
3792 | 316 | /* set the scrolled window small so that it doesn't force | ||
3793 | 317 | the window to be larger than this panel */ | ||
3794 | 318 | @@ -1332,6 +1333,7 @@ | ||
3795 | 319 | GError *err = NULL; | ||
3796 | 320 | GnomeControlCenterPrivate *priv; | ||
3797 | 321 | GdkScreen *screen; | ||
3798 | 322 | + GtkWidget *widget; | ||
3799 | 323 | |||
3800 | 324 | priv = self->priv = CONTROL_CENTER_PRIVATE (self); | ||
3801 | 325 | |||
3802 | 326 | @@ -1378,8 +1380,14 @@ | ||
3803 | 327 | g_signal_connect (priv->notebook, "notify::page", | ||
3804 | 328 | G_CALLBACK (notebook_page_notify_cb), priv); | ||
3805 | 329 | |||
3806 | 330 | - g_signal_connect (gtk_builder_get_object (priv->builder, "home-button"), | ||
3807 | 331 | - "clicked", G_CALLBACK (home_button_clicked_cb), self); | ||
3808 | 332 | + priv->nav_bar = cc_shell_nav_bar_new (); | ||
3809 | 333 | + widget = W (priv->builder, "hbox1"); | ||
3810 | 334 | + gtk_box_pack_start (GTK_BOX (widget), priv->nav_bar, FALSE, FALSE, 0); | ||
3811 | 335 | + gtk_box_reorder_child (GTK_BOX (widget), priv->nav_bar, 0); | ||
3812 | 336 | + gtk_widget_show (priv->nav_bar); | ||
3813 | 337 | + | ||
3814 | 338 | + g_signal_connect (priv->nav_bar, | ||
3815 | 339 | + "home-clicked", G_CALLBACK (home_button_clicked_cb), self); | ||
3816 | 340 | |||
3817 | 341 | /* keep a list of custom widgets to unload on panel change */ | ||
3818 | 342 | priv->custom_widgets = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); | ||
3819 | 343 | Index: gnome-control-center-3.6.3/shell/shell.ui | ||
3820 | 344 | =================================================================== | ||
3821 | 345 | --- gnome-control-center-3.6.3.orig/shell/shell.ui 2012-11-14 12:42:44.000000000 +0100 | ||
3822 | 346 | +++ gnome-control-center-3.6.3/shell/shell.ui 2012-11-22 10:21:52.369284899 +0100 | ||
3823 | 347 | @@ -34,36 +34,6 @@ | ||
3824 | 348 | <object class="GtkHBox" id="hbox1"> | ||
3825 | 349 | <property name="visible">True</property> | ||
3826 | 350 | <child> | ||
3827 | 351 | - <object class="GtkAspectFrame" id="home-aspect-frame"> | ||
3828 | 352 | - <property name="visible">True</property> | ||
3829 | 353 | - <property name="can_focus">False</property> | ||
3830 | 354 | - <property name="xalign">0</property> | ||
3831 | 355 | - <property name="ratio">1</property> | ||
3832 | 356 | - <property name="shadow-type">none</property> | ||
3833 | 357 | - <property name="obey-child">False</property> | ||
3834 | 358 | - <child> | ||
3835 | 359 | - <object class="GtkButton" id="home-button"> | ||
3836 | 360 | - <property name="use_action_appearance">False</property> | ||
3837 | 361 | - <property name="can_focus">True</property> | ||
3838 | 362 | - <property name="receives_default">True</property> | ||
3839 | 363 | - <property name="no_show_all">True</property> | ||
3840 | 364 | - <property name="use_action_appearance">False</property> | ||
3841 | 365 | - <property name="image">image1</property> | ||
3842 | 366 | - <property name="use_underline">True</property> | ||
3843 | 367 | - <child internal-child="accessible"> | ||
3844 | 368 | - <object class="AtkObject" id="home-button-atkobject"> | ||
3845 | 369 | - <property name="AtkObject::accessible-name" translatable="yes">All Settings</property> | ||
3846 | 370 | - </object> | ||
3847 | 371 | - </child> | ||
3848 | 372 | - </object> | ||
3849 | 373 | - </child> | ||
3850 | 374 | - </object> | ||
3851 | 375 | - <packing> | ||
3852 | 376 | - <property name="expand">False</property> | ||
3853 | 377 | - <property name="position">0</property> | ||
3854 | 378 | - </packing> | ||
3855 | 379 | - </child> | ||
3856 | 380 | - <child> | ||
3857 | 381 | <object class="GtkAlignment" id="entry-alignment"> | ||
3858 | 382 | <property name="visible">True</property> | ||
3859 | 383 | <property name="xalign">1</property> | ||
3860 | 384 | @@ -93,7 +63,7 @@ | ||
3861 | 385 | </child> | ||
3862 | 386 | </object> | ||
3863 | 387 | <packing> | ||
3864 | 388 | - <property name="position">1</property> | ||
3865 | 389 | + <property name="position">0</property> | ||
3866 | 390 | </packing> | ||
3867 | 391 | </child> | ||
3868 | 392 | </object> | ||
3869 | 393 | @@ -172,13 +142,6 @@ | ||
3870 | 394 | <column type="gchararray"/> | ||
3871 | 395 | </columns> | ||
3872 | 396 | </object> | ||
3873 | 397 | - <object class="GtkSizeGroup" id="sizegroup"> | ||
3874 | 398 | - <property name="mode">vertical</property> | ||
3875 | 399 | - <widgets> | ||
3876 | 400 | - <widget name="home-button"/> | ||
3877 | 401 | - <widget name="entry-alignment"/> | ||
3878 | 402 | - </widgets> | ||
3879 | 403 | - </object> | ||
3880 | 404 | <object class="GtkImage" id="image1"> | ||
3881 | 405 | <property name="visible">True</property> | ||
3882 | 406 | <property name="can_focus">False</property> | ||
3883 | 407 | 0 | ||
3884 | === removed file 'debian/patches/61_workaround_online_account.patch' | |||
3885 | --- debian/patches/61_workaround_online_account.patch 2013-07-05 13:31:20 +0000 | |||
3886 | +++ debian/patches/61_workaround_online_account.patch 1970-01-01 00:00:00 +0000 | |||
3887 | @@ -1,16 +0,0 @@ | |||
3888 | 1 | # Description: Don't show goa in Unity, we use uoa there | ||
3889 | 2 | # Upstream: the change is ubuntu specific | ||
3890 | 3 | # | ||
3891 | 4 | Index: gnome-control-center-3.3.91/panels/online-accounts/gnome-online-accounts-panel.desktop.in.in | ||
3892 | 5 | =================================================================== | ||
3893 | 6 | --- gnome-control-center-3.3.91.orig/panels/online-accounts/gnome-online-accounts-panel.desktop.in.in 2012-03-05 15:04:55.000000000 +0100 | ||
3894 | 7 | +++ gnome-control-center-3.3.91/panels/online-accounts/gnome-online-accounts-panel.desktop.in.in 2012-03-06 17:52:14.907083003 +0100 | ||
3895 | 8 | @@ -7,7 +7,7 @@ | ||
3896 | 9 | Type=Application | ||
3897 | 10 | StartupNotify=true | ||
3898 | 11 | Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings; | ||
3899 | 12 | -OnlyShowIn=GNOME;Unity; | ||
3900 | 13 | +OnlyShowIn=GNOME; | ||
3901 | 14 | X-GNOME-Bugzilla-Bugzilla=GNOME | ||
3902 | 15 | X-GNOME-Bugzilla-Product=gnome-control-center | ||
3903 | 16 | X-GNOME-Bugzilla-Component=Online Accounts | ||
3904 | 17 | 0 | ||
3905 | === added file 'debian/patches/64_restore_terminal_keyboard_shortcut.patch' | |||
3906 | --- debian/patches/64_restore_terminal_keyboard_shortcut.patch 1970-01-01 00:00:00 +0000 | |||
3907 | +++ debian/patches/64_restore_terminal_keyboard_shortcut.patch 2014-05-06 09:05:46 +0000 | |||
3908 | @@ -0,0 +1,13 @@ | |||
3909 | 1 | Index: gnome-control-center-3.4.2/panels/keyboard/01-launchers.xml.in | ||
3910 | 2 | =================================================================== | ||
3911 | 3 | --- gnome-control-center-3.4.2.orig/panels/keyboard/01-launchers.xml.in 2011-08-25 11:09:31.000000000 -0400 | ||
3912 | 4 | +++ gnome-control-center-3.4.2/panels/keyboard/01-launchers.xml.in 2012-08-25 23:34:01.889092065 -0400 | ||
3913 | 5 | @@ -7,6 +7,8 @@ | ||
3914 | 6 | |||
3915 | 7 | <KeyListEntry name="email" _description="Launch email client"/> | ||
3916 | 8 | |||
3917 | 9 | + <KeyListEntry name="terminal" _description="Launch terminal"/> | ||
3918 | 10 | + | ||
3919 | 11 | <KeyListEntry name="www" _description="Launch web browser"/> | ||
3920 | 12 | |||
3921 | 13 | <KeyListEntry name="home" _description="Home folder"/> | ||
3922 | 0 | 14 | ||
3923 | === removed file 'debian/patches/64_restore_terminal_keyboard_shortcut.patch' | |||
3924 | --- debian/patches/64_restore_terminal_keyboard_shortcut.patch 2013-07-05 13:31:20 +0000 | |||
3925 | +++ debian/patches/64_restore_terminal_keyboard_shortcut.patch 1970-01-01 00:00:00 +0000 | |||
3926 | @@ -1,13 +0,0 @@ | |||
3927 | 1 | Index: gnome-control-center-3.4.2/panels/keyboard/01-launchers.xml.in | ||
3928 | 2 | =================================================================== | ||
3929 | 3 | --- gnome-control-center-3.4.2.orig/panels/keyboard/01-launchers.xml.in 2011-08-25 11:09:31.000000000 -0400 | ||
3930 | 4 | +++ gnome-control-center-3.4.2/panels/keyboard/01-launchers.xml.in 2012-08-25 23:34:01.889092065 -0400 | ||
3931 | 5 | @@ -7,6 +7,8 @@ | ||
3932 | 6 | |||
3933 | 7 | <KeyListEntry name="email" _description="Launch email client"/> | ||
3934 | 8 | |||
3935 | 9 | + <KeyListEntry name="terminal" _description="Launch terminal"/> | ||
3936 | 10 | + | ||
3937 | 11 | <KeyListEntry name="www" _description="Launch web browser"/> | ||
3938 | 12 | |||
3939 | 13 | <KeyListEntry name="home" _description="Home folder"/> | ||
3940 | 14 | 0 | ||
3941 | === removed file 'debian/patches/90_force_fallback.patch' | |||
3942 | --- debian/patches/90_force_fallback.patch 2013-07-05 13:31:20 +0000 | |||
3943 | +++ debian/patches/90_force_fallback.patch 1970-01-01 00:00:00 +0000 | |||
3944 | @@ -1,22 +0,0 @@ | |||
3945 | 1 | Index: b/panels/info/info.ui | ||
3946 | 2 | =================================================================== | ||
3947 | 3 | --- a/panels/info/info.ui | ||
3948 | 4 | +++ b/panels/info/info.ui | ||
3949 | 5 | @@ -1191,7 +1191,7 @@ | ||
3950 | 6 | </child> | ||
3951 | 7 | <child> | ||
3952 | 8 | <object class="GtkLabel" id="fallback-label"> | ||
3953 | 9 | - <property name="visible">True</property> | ||
3954 | 10 | + <property name="visible">False</property> | ||
3955 | 11 | <property name="can_focus">False</property> | ||
3956 | 12 | <property name="xalign">1</property> | ||
3957 | 13 | <property name="label" translatable="yes" comments="Hardware is not able to run GNOME 3's shell, so we might want to force running the 'Fallback' experience.">Forced _Fallback Mode</property> | ||
3958 | 14 | @@ -1240,7 +1240,7 @@ | ||
3959 | 15 | </child> | ||
3960 | 16 | <child> | ||
3961 | 17 | <object class="GtkBox" id="graphics_fallback_switch_box"> | ||
3962 | 18 | - <property name="visible">True</property> | ||
3963 | 19 | + <property name="visible">False</property> | ||
3964 | 20 | <property name="can_focus">False</property> | ||
3965 | 21 | <property name="halign">start</property> | ||
3966 | 22 | <property name="valign">center</property> | ||
3967 | 23 | 0 | ||
3968 | === removed file 'debian/patches/91_unity_no_printing_panel.patch' | |||
3969 | --- debian/patches/91_unity_no_printing_panel.patch 2013-07-05 13:31:20 +0000 | |||
3970 | +++ debian/patches/91_unity_no_printing_panel.patch 1970-01-01 00:00:00 +0000 | |||
3971 | @@ -1,12 +0,0 @@ | |||
3972 | 1 | diff -Nur gnome-control-center-3.6.3/panels/printers/gnome-printers-panel.desktop.in.in gnome-control-center-3.6.3.new/panels/printers/gnome-printers-panel.desktop.in.in | ||
3973 | 2 | --- gnome-control-center-3.6.3/panels/printers/gnome-printers-panel.desktop.in.in 2013-03-19 11:48:12.950319345 +0100 | ||
3974 | 3 | +++ gnome-control-center-3.6.3.new/panels/printers/gnome-printers-panel.desktop.in.in 2013-03-19 11:47:56.902318811 +0100 | ||
3975 | 4 | @@ -8,7 +8,7 @@ | ||
3976 | 5 | StartupNotify=true | ||
3977 | 6 | # The X-GNOME-Settings-Panel is necessary to show in the main shell UI | ||
3978 | 7 | Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel; | ||
3979 | 8 | -OnlyShowIn=GNOME;Unity; | ||
3980 | 9 | +OnlyShowIn=GNOME; | ||
3981 | 10 | X-GNOME-Settings-Panel=printers | ||
3982 | 11 | # Translators: those are keywords for the printing control-center panel | ||
3983 | 12 | _Keywords=Printer;Queue;Print;Paper;Ink;Toner; | ||
3984 | 13 | 0 | ||
3985 | === added file 'debian/patches/92_ubuntu_system_proxy.patch' | |||
3986 | --- debian/patches/92_ubuntu_system_proxy.patch 1970-01-01 00:00:00 +0000 | |||
3987 | +++ debian/patches/92_ubuntu_system_proxy.patch 2014-05-06 09:05:46 +0000 | |||
3988 | @@ -0,0 +1,213 @@ | |||
3989 | 1 | --- a/panels/network/net-proxy.c | ||
3990 | 2 | +++ b/panels/network/net-proxy.c | ||
3991 | 3 | @@ -25,8 +25,14 @@ | ||
3992 | 4 | #include <glib/gi18n.h> | ||
3993 | 5 | #include <gio/gio.h> | ||
3994 | 6 | |||
3995 | 7 | +#include <grp.h> | ||
3996 | 8 | +#include <unistd.h> | ||
3997 | 9 | +#include <gdesktop-enums.h> | ||
3998 | 10 | + | ||
3999 | 11 | #include "net-proxy.h" | ||
4000 | 12 | |||
4001 | 13 | + | ||
4002 | 14 | + | ||
4003 | 15 | #define NET_PROXY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NET_TYPE_PROXY, NetProxyPrivate)) | ||
4004 | 16 | |||
4005 | 17 | struct _NetProxyPrivate | ||
4006 | 18 | @@ -306,6 +312,148 @@ | ||
4007 | 19 | return g_variant_builder_end (&builder); | ||
4008 | 20 | } | ||
4009 | 21 | |||
4010 | 22 | + | ||
4011 | 23 | +static gboolean | ||
4012 | 24 | +ubuntu_is_in_admin_group (int id_group) | ||
4013 | 25 | +{ | ||
4014 | 26 | + gid_t groups [1024]; | ||
4015 | 27 | + int i, ngroups; | ||
4016 | 28 | + | ||
4017 | 29 | + ngroups = getgroups (1024, groups); | ||
4018 | 30 | + if (ngroups < 0) { | ||
4019 | 31 | + perror ("getgroups"); | ||
4020 | 32 | + return FALSE; | ||
4021 | 33 | + } | ||
4022 | 34 | + | ||
4023 | 35 | + for (i = 0; i < ngroups; ++i) { | ||
4024 | 36 | + if (groups[i] == id_group) | ||
4025 | 37 | + return TRUE; | ||
4026 | 38 | + } | ||
4027 | 39 | + | ||
4028 | 40 | + return FALSE; | ||
4029 | 41 | +} | ||
4030 | 42 | + | ||
4031 | 43 | +static gboolean | ||
4032 | 44 | +ubuntu_is_admin () | ||
4033 | 45 | +{ | ||
4034 | 46 | + struct group *admin_group; | ||
4035 | 47 | + | ||
4036 | 48 | + admin_group = getgrnam ("admin"); | ||
4037 | 49 | + if (admin_group != NULL && ubuntu_is_in_admin_group (admin_group->gr_gid)) | ||
4038 | 50 | + return TRUE; | ||
4039 | 51 | + | ||
4040 | 52 | + admin_group = getgrnam ("sudo"); | ||
4041 | 53 | + if (admin_group != NULL && ubuntu_is_in_admin_group (admin_group->gr_gid)) | ||
4042 | 54 | + return TRUE; | ||
4043 | 55 | + | ||
4044 | 56 | + return FALSE; | ||
4045 | 57 | +} | ||
4046 | 58 | + | ||
4047 | 59 | +static void | ||
4048 | 60 | +ubuntu_reset_system_proxy (GDBusProxy *proxy, const gchar *protocol) | ||
4049 | 61 | +{ | ||
4050 | 62 | + GVariant *result; | ||
4051 | 63 | + GError *error = NULL; | ||
4052 | 64 | + | ||
4053 | 65 | + result = g_dbus_proxy_call_sync (proxy, "set_proxy", | ||
4054 | 66 | + g_variant_new ("(ss)", protocol, ""), | ||
4055 | 67 | + G_DBUS_CALL_FLAGS_NONE, | ||
4056 | 68 | + -1, NULL, &error); | ||
4057 | 69 | + if (result) | ||
4058 | 70 | + g_variant_unref (result); | ||
4059 | 71 | + else { | ||
4060 | 72 | + g_warning ("Error while calling set_proxy for %s protocol: %s", protocol, error->message); | ||
4061 | 73 | + g_error_free (error); | ||
4062 | 74 | + } | ||
4063 | 75 | +} | ||
4064 | 76 | + | ||
4065 | 77 | +static void | ||
4066 | 78 | +ubuntu_set_proxy_for_protocol (GDBusProxy *proxy, const gchar *protocol, GSettings *settings) | ||
4067 | 79 | +{ | ||
4068 | 80 | + GVariant *result; | ||
4069 | 81 | + gchar *proxy_str, *host; | ||
4070 | 82 | + GError *error = NULL; | ||
4071 | 83 | + gint port; | ||
4072 | 84 | + | ||
4073 | 85 | + host = g_settings_get_string (settings, "host"); | ||
4074 | 86 | + port = g_settings_get_int (settings, "port"); | ||
4075 | 87 | + | ||
4076 | 88 | + if (host && *host == '\0') { | ||
4077 | 89 | + ubuntu_reset_system_proxy (proxy, protocol); | ||
4078 | 90 | + } else { | ||
4079 | 91 | + proxy_str = g_strdup_printf ("%s://%s:%i/", protocol, host, port); | ||
4080 | 92 | + | ||
4081 | 93 | + result = g_dbus_proxy_call_sync (proxy, "set_proxy", | ||
4082 | 94 | + g_variant_new ("(ss)", protocol, proxy_str), | ||
4083 | 95 | + G_DBUS_CALL_FLAGS_NONE, | ||
4084 | 96 | + -1, NULL, &error); | ||
4085 | 97 | + if (result) | ||
4086 | 98 | + g_variant_unref (result); | ||
4087 | 99 | + else { | ||
4088 | 100 | + g_warning ("Error while calling set_proxy for %s protocol: %s", protocol, error->message); | ||
4089 | 101 | + g_error_free (error); | ||
4090 | 102 | + } | ||
4091 | 103 | + g_free (proxy_str); | ||
4092 | 104 | + } | ||
4093 | 105 | + | ||
4094 | 106 | + /* Free memory */ | ||
4095 | 107 | + g_free (host); | ||
4096 | 108 | + g_object_unref (settings); | ||
4097 | 109 | +} | ||
4098 | 110 | + | ||
4099 | 111 | +static void | ||
4100 | 112 | +ubuntu_on_proxy_apply_system_settings (GtkButton *button, gpointer user_data) | ||
4101 | 113 | +{ | ||
4102 | 114 | + GDBusConnection *bus; | ||
4103 | 115 | + GDBusProxy *dbus_proxy; | ||
4104 | 116 | + GError *error; | ||
4105 | 117 | + GDesktopProxyMode proxy_mode; | ||
4106 | 118 | + NetProxy *proxy = NET_PROXY (user_data); | ||
4107 | 119 | + | ||
4108 | 120 | + error = NULL; | ||
4109 | 121 | + bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); | ||
4110 | 122 | + if (!bus) { | ||
4111 | 123 | + g_warning ("Could not retrieve system bus: %s", error->message); | ||
4112 | 124 | + g_error_free (error); | ||
4113 | 125 | + | ||
4114 | 126 | + return; | ||
4115 | 127 | + } | ||
4116 | 128 | + | ||
4117 | 129 | + dbus_proxy = g_dbus_proxy_new_sync (bus, 0, NULL, | ||
4118 | 130 | + "com.ubuntu.SystemService", | ||
4119 | 131 | + "/", | ||
4120 | 132 | + "com.ubuntu.SystemService", | ||
4121 | 133 | + NULL, | ||
4122 | 134 | + &error); | ||
4123 | 135 | + if (!dbus_proxy) { | ||
4124 | 136 | + g_warning ("Could not retrieve bus object: %s", error->message); | ||
4125 | 137 | + g_error_free (error); | ||
4126 | 138 | + | ||
4127 | 139 | + return; | ||
4128 | 140 | + } | ||
4129 | 141 | + | ||
4130 | 142 | + /* Retrieve the current settings */ | ||
4131 | 143 | + proxy_mode = g_settings_get_enum (proxy->priv->settings, "mode"); | ||
4132 | 144 | + switch (proxy_mode) { | ||
4133 | 145 | + case G_DESKTOP_PROXY_MODE_AUTO: | ||
4134 | 146 | + case G_DESKTOP_PROXY_MODE_NONE: | ||
4135 | 147 | + ubuntu_reset_system_proxy (dbus_proxy, "http"); | ||
4136 | 148 | + ubuntu_reset_system_proxy (dbus_proxy, "https"); | ||
4137 | 149 | + ubuntu_reset_system_proxy (dbus_proxy, "ftp"); | ||
4138 | 150 | + ubuntu_reset_system_proxy (dbus_proxy, "socks"); | ||
4139 | 151 | + break; | ||
4140 | 152 | + case G_DESKTOP_PROXY_MODE_MANUAL: | ||
4141 | 153 | + ubuntu_set_proxy_for_protocol (dbus_proxy, "http", g_settings_get_child (proxy->priv->settings, "http")); | ||
4142 | 154 | + ubuntu_set_proxy_for_protocol (dbus_proxy, "https", g_settings_get_child (proxy->priv->settings, "https")); | ||
4143 | 155 | + ubuntu_set_proxy_for_protocol (dbus_proxy, "ftp", g_settings_get_child (proxy->priv->settings, "ftp")); | ||
4144 | 156 | + ubuntu_set_proxy_for_protocol (dbus_proxy, "socks", g_settings_get_child (proxy->priv->settings, "socks")); | ||
4145 | 157 | + break; | ||
4146 | 158 | + } | ||
4147 | 159 | + | ||
4148 | 160 | + /* Free memory */ | ||
4149 | 161 | + g_object_unref (dbus_proxy); | ||
4150 | 162 | +} | ||
4151 | 163 | + | ||
4152 | 164 | static void | ||
4153 | 165 | net_proxy_init (NetProxy *proxy) | ||
4154 | 166 | { | ||
4155 | 167 | @@ -427,6 +575,13 @@ | ||
4156 | 168 | G_SETTINGS_BIND_DEFAULT, get_ignore_hosts, set_ignore_hosts, | ||
4157 | 169 | NULL, NULL); | ||
4158 | 170 | |||
4159 | 171 | + /* Ubuntu button for system proxy settings */ | ||
4160 | 172 | + if (ubuntu_is_admin ()) { | ||
4161 | 173 | + g_signal_connect (G_OBJECT (gtk_builder_get_object (proxy->priv->builder, "system_proxy_button")), "clicked", | ||
4162 | 174 | + G_CALLBACK (ubuntu_on_proxy_apply_system_settings), proxy); | ||
4163 | 175 | + } else | ||
4164 | 176 | + gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (proxy->priv->builder, "system_proxy_button"))); | ||
4165 | 177 | + | ||
4166 | 178 | /* hide the switch until we get some more detail in the mockup */ | ||
4167 | 179 | widget = GTK_WIDGET (gtk_builder_get_object (proxy->priv->builder, | ||
4168 | 180 | "device_proxy_off_switch")); | ||
4169 | 181 | --- a/panels/network/network-proxy.ui | ||
4170 | 182 | +++ b/panels/network/network-proxy.ui | ||
4171 | 183 | @@ -229,6 +229,21 @@ | ||
4172 | 184 | </packing> | ||
4173 | 185 | </child> | ||
4174 | 186 | <child> | ||
4175 | 187 | + <object class="GtkButton" id="system_proxy_button"> | ||
4176 | 188 | + <property name="label" translatable="yes">Apply system wide</property> | ||
4177 | 189 | + <property name="visible">True</property> | ||
4178 | 190 | + <property name="can_focus">True</property> | ||
4179 | 191 | + <property name="receives_default">True</property> | ||
4180 | 192 | + <property name="use_action_appearance">False</property> | ||
4181 | 193 | + </object> | ||
4182 | 194 | + <packing> | ||
4183 | 195 | + <property name="left_attach">0</property> | ||
4184 | 196 | + <property name="top_attach">8</property> | ||
4185 | 197 | + <property name="width">3</property> | ||
4186 | 198 | + <property name="height">1</property> | ||
4187 | 199 | + </packing> | ||
4188 | 200 | + </child> | ||
4189 | 201 | + <child> | ||
4190 | 202 | <object class="GtkLabel" id="label_proxy_warning"> | ||
4191 | 203 | <property name="visible">False</property> | ||
4192 | 204 | <property name="can_focus">False</property> | ||
4193 | 205 | @@ -239,7 +254,7 @@ | ||
4194 | 206 | </object> | ||
4195 | 207 | <packing> | ||
4196 | 208 | <property name="left_attach">0</property> | ||
4197 | 209 | - <property name="top_attach">8</property> | ||
4198 | 210 | + <property name="top_attach">9</property> | ||
4199 | 211 | <property name="width">3</property> | ||
4200 | 212 | <property name="height">1</property> | ||
4201 | 213 | </packing> | ||
4202 | 0 | 214 | ||
4203 | === removed file 'debian/patches/92_ubuntu_system_proxy.patch' | |||
4204 | --- debian/patches/92_ubuntu_system_proxy.patch 2013-07-05 13:31:20 +0000 | |||
4205 | +++ debian/patches/92_ubuntu_system_proxy.patch 1970-01-01 00:00:00 +0000 | |||
4206 | @@ -1,217 +0,0 @@ | |||
4207 | 1 | Index: gnome-control-center-3.6.3/panels/network/net-proxy.c | ||
4208 | 2 | =================================================================== | ||
4209 | 3 | --- gnome-control-center-3.6.3.orig/panels/network/net-proxy.c 2013-04-16 16:14:41.159226157 +0200 | ||
4210 | 4 | +++ gnome-control-center-3.6.3/panels/network/net-proxy.c 2013-04-16 16:14:59.847226780 +0200 | ||
4211 | 5 | @@ -25,8 +25,14 @@ | ||
4212 | 6 | #include <glib/gi18n.h> | ||
4213 | 7 | #include <gio/gio.h> | ||
4214 | 8 | |||
4215 | 9 | +#include <grp.h> | ||
4216 | 10 | +#include <unistd.h> | ||
4217 | 11 | +#include <gdesktop-enums.h> | ||
4218 | 12 | + | ||
4219 | 13 | #include "net-proxy.h" | ||
4220 | 14 | |||
4221 | 15 | + | ||
4222 | 16 | + | ||
4223 | 17 | #define NET_PROXY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NET_TYPE_PROXY, NetProxyPrivate)) | ||
4224 | 18 | |||
4225 | 19 | struct _NetProxyPrivate | ||
4226 | 20 | @@ -250,6 +256,148 @@ | ||
4227 | 21 | g_type_class_add_private (klass, sizeof (NetProxyPrivate)); | ||
4228 | 22 | } | ||
4229 | 23 | |||
4230 | 24 | + | ||
4231 | 25 | +static gboolean | ||
4232 | 26 | +ubuntu_is_in_admin_group (int id_group) | ||
4233 | 27 | +{ | ||
4234 | 28 | + gid_t groups [1024]; | ||
4235 | 29 | + int i, ngroups; | ||
4236 | 30 | + | ||
4237 | 31 | + ngroups = getgroups (1024, groups); | ||
4238 | 32 | + if (ngroups < 0) { | ||
4239 | 33 | + perror ("getgroups"); | ||
4240 | 34 | + return FALSE; | ||
4241 | 35 | + } | ||
4242 | 36 | + | ||
4243 | 37 | + for (i = 0; i < ngroups; ++i) { | ||
4244 | 38 | + if (groups[i] == id_group) | ||
4245 | 39 | + return TRUE; | ||
4246 | 40 | + } | ||
4247 | 41 | + | ||
4248 | 42 | + return FALSE; | ||
4249 | 43 | +} | ||
4250 | 44 | + | ||
4251 | 45 | +static gboolean | ||
4252 | 46 | +ubuntu_is_admin () | ||
4253 | 47 | +{ | ||
4254 | 48 | + struct group *admin_group; | ||
4255 | 49 | + | ||
4256 | 50 | + admin_group = getgrnam ("admin"); | ||
4257 | 51 | + if (admin_group != NULL && ubuntu_is_in_admin_group (admin_group->gr_gid)) | ||
4258 | 52 | + return TRUE; | ||
4259 | 53 | + | ||
4260 | 54 | + admin_group = getgrnam ("sudo"); | ||
4261 | 55 | + if (admin_group != NULL && ubuntu_is_in_admin_group (admin_group->gr_gid)) | ||
4262 | 56 | + return TRUE; | ||
4263 | 57 | + | ||
4264 | 58 | + return FALSE; | ||
4265 | 59 | +} | ||
4266 | 60 | + | ||
4267 | 61 | +static void | ||
4268 | 62 | +ubuntu_reset_system_proxy (GDBusProxy *proxy, const gchar *protocol) | ||
4269 | 63 | +{ | ||
4270 | 64 | + GVariant *result; | ||
4271 | 65 | + GError *error = NULL; | ||
4272 | 66 | + | ||
4273 | 67 | + result = g_dbus_proxy_call_sync (proxy, "set_proxy", | ||
4274 | 68 | + g_variant_new ("(ss)", protocol, ""), | ||
4275 | 69 | + G_DBUS_CALL_FLAGS_NONE, | ||
4276 | 70 | + -1, NULL, &error); | ||
4277 | 71 | + if (result) | ||
4278 | 72 | + g_variant_unref (result); | ||
4279 | 73 | + else { | ||
4280 | 74 | + g_warning ("Error while calling set_proxy for %s protocol: %s", protocol, error->message); | ||
4281 | 75 | + g_error_free (error); | ||
4282 | 76 | + } | ||
4283 | 77 | +} | ||
4284 | 78 | + | ||
4285 | 79 | +static void | ||
4286 | 80 | +ubuntu_set_proxy_for_protocol (GDBusProxy *proxy, const gchar *protocol, GSettings *settings) | ||
4287 | 81 | +{ | ||
4288 | 82 | + GVariant *result; | ||
4289 | 83 | + gchar *proxy_str, *host; | ||
4290 | 84 | + GError *error = NULL; | ||
4291 | 85 | + gint port; | ||
4292 | 86 | + | ||
4293 | 87 | + host = g_settings_get_string (settings, "host"); | ||
4294 | 88 | + port = g_settings_get_int (settings, "port"); | ||
4295 | 89 | + | ||
4296 | 90 | + if (host && *host == '\0') { | ||
4297 | 91 | + ubuntu_reset_system_proxy (proxy, protocol); | ||
4298 | 92 | + } else { | ||
4299 | 93 | + proxy_str = g_strdup_printf ("%s://%s:%i/", protocol, host, port); | ||
4300 | 94 | + | ||
4301 | 95 | + result = g_dbus_proxy_call_sync (proxy, "set_proxy", | ||
4302 | 96 | + g_variant_new ("(ss)", protocol, proxy_str), | ||
4303 | 97 | + G_DBUS_CALL_FLAGS_NONE, | ||
4304 | 98 | + -1, NULL, &error); | ||
4305 | 99 | + if (result) | ||
4306 | 100 | + g_variant_unref (result); | ||
4307 | 101 | + else { | ||
4308 | 102 | + g_warning ("Error while calling set_proxy for %s protocol: %s", protocol, error->message); | ||
4309 | 103 | + g_error_free (error); | ||
4310 | 104 | + } | ||
4311 | 105 | + g_free (proxy_str); | ||
4312 | 106 | + } | ||
4313 | 107 | + | ||
4314 | 108 | + /* Free memory */ | ||
4315 | 109 | + g_free (host); | ||
4316 | 110 | + g_object_unref (settings); | ||
4317 | 111 | +} | ||
4318 | 112 | + | ||
4319 | 113 | +static void | ||
4320 | 114 | +ubuntu_on_proxy_apply_system_settings (GtkButton *button, gpointer user_data) | ||
4321 | 115 | +{ | ||
4322 | 116 | + GDBusConnection *bus; | ||
4323 | 117 | + GDBusProxy *dbus_proxy; | ||
4324 | 118 | + GError *error; | ||
4325 | 119 | + GDesktopProxyMode proxy_mode; | ||
4326 | 120 | + NetProxy *proxy = NET_PROXY (user_data); | ||
4327 | 121 | + | ||
4328 | 122 | + error = NULL; | ||
4329 | 123 | + bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error); | ||
4330 | 124 | + if (!bus) { | ||
4331 | 125 | + g_warning ("Could not retrieve system bus: %s", error->message); | ||
4332 | 126 | + g_error_free (error); | ||
4333 | 127 | + | ||
4334 | 128 | + return; | ||
4335 | 129 | + } | ||
4336 | 130 | + | ||
4337 | 131 | + dbus_proxy = g_dbus_proxy_new_sync (bus, 0, NULL, | ||
4338 | 132 | + "com.ubuntu.SystemService", | ||
4339 | 133 | + "/", | ||
4340 | 134 | + "com.ubuntu.SystemService", | ||
4341 | 135 | + NULL, | ||
4342 | 136 | + &error); | ||
4343 | 137 | + if (!dbus_proxy) { | ||
4344 | 138 | + g_warning ("Could not retrieve bus object: %s", error->message); | ||
4345 | 139 | + g_error_free (error); | ||
4346 | 140 | + | ||
4347 | 141 | + return; | ||
4348 | 142 | + } | ||
4349 | 143 | + | ||
4350 | 144 | + /* Retrieve the current settings */ | ||
4351 | 145 | + proxy_mode = g_settings_get_enum (proxy->priv->settings, "mode"); | ||
4352 | 146 | + switch (proxy_mode) { | ||
4353 | 147 | + case G_DESKTOP_PROXY_MODE_AUTO: | ||
4354 | 148 | + case G_DESKTOP_PROXY_MODE_NONE: | ||
4355 | 149 | + ubuntu_reset_system_proxy (dbus_proxy, "http"); | ||
4356 | 150 | + ubuntu_reset_system_proxy (dbus_proxy, "https"); | ||
4357 | 151 | + ubuntu_reset_system_proxy (dbus_proxy, "ftp"); | ||
4358 | 152 | + ubuntu_reset_system_proxy (dbus_proxy, "socks"); | ||
4359 | 153 | + break; | ||
4360 | 154 | + case G_DESKTOP_PROXY_MODE_MANUAL: | ||
4361 | 155 | + ubuntu_set_proxy_for_protocol (dbus_proxy, "http", g_settings_get_child (proxy->priv->settings, "http")); | ||
4362 | 156 | + ubuntu_set_proxy_for_protocol (dbus_proxy, "https", g_settings_get_child (proxy->priv->settings, "https")); | ||
4363 | 157 | + ubuntu_set_proxy_for_protocol (dbus_proxy, "ftp", g_settings_get_child (proxy->priv->settings, "ftp")); | ||
4364 | 158 | + ubuntu_set_proxy_for_protocol (dbus_proxy, "socks", g_settings_get_child (proxy->priv->settings, "socks")); | ||
4365 | 159 | + break; | ||
4366 | 160 | + } | ||
4367 | 161 | + | ||
4368 | 162 | + /* Free memory */ | ||
4369 | 163 | + g_object_unref (dbus_proxy); | ||
4370 | 164 | +} | ||
4371 | 165 | + | ||
4372 | 166 | static void | ||
4373 | 167 | net_proxy_init (NetProxy *proxy) | ||
4374 | 168 | { | ||
4375 | 169 | @@ -369,6 +517,13 @@ | ||
4376 | 170 | "label_proxy_status")); | ||
4377 | 171 | gtk_label_set_label (GTK_LABEL (widget), ""); | ||
4378 | 172 | |||
4379 | 173 | + /* Ubuntu button for system proxy settings */ | ||
4380 | 174 | + if (ubuntu_is_admin ()) { | ||
4381 | 175 | + g_signal_connect (G_OBJECT (gtk_builder_get_object (proxy->priv->builder, "system_proxy_button")), "clicked", | ||
4382 | 176 | + G_CALLBACK (ubuntu_on_proxy_apply_system_settings), proxy); | ||
4383 | 177 | + } else | ||
4384 | 178 | + gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (proxy->priv->builder, "system_proxy_button"))); | ||
4385 | 179 | + | ||
4386 | 180 | /* hide the switch until we get some more detail in the mockup */ | ||
4387 | 181 | widget = GTK_WIDGET (gtk_builder_get_object (proxy->priv->builder, | ||
4388 | 182 | "device_proxy_off_switch")); | ||
4389 | 183 | Index: gnome-control-center-3.6.3/panels/network/network-proxy.ui | ||
4390 | 184 | =================================================================== | ||
4391 | 185 | --- gnome-control-center-3.6.3.orig/panels/network/network-proxy.ui 2013-04-16 16:14:41.159226157 +0200 | ||
4392 | 186 | +++ gnome-control-center-3.6.3/panels/network/network-proxy.ui 2013-04-16 16:14:41.155226157 +0200 | ||
4393 | 187 | @@ -280,6 +280,21 @@ | ||
4394 | 188 | </packing> | ||
4395 | 189 | </child> | ||
4396 | 190 | <child> | ||
4397 | 191 | + <object class="GtkButton" id="system_proxy_button"> | ||
4398 | 192 | + <property name="label" translatable="yes">Apply system wide</property> | ||
4399 | 193 | + <property name="visible">True</property> | ||
4400 | 194 | + <property name="can_focus">True</property> | ||
4401 | 195 | + <property name="receives_default">True</property> | ||
4402 | 196 | + <property name="use_action_appearance">False</property> | ||
4403 | 197 | + </object> | ||
4404 | 198 | + <packing> | ||
4405 | 199 | + <property name="left_attach">0</property> | ||
4406 | 200 | + <property name="top_attach">7</property> | ||
4407 | 201 | + <property name="width">3</property> | ||
4408 | 202 | + <property name="height">1</property> | ||
4409 | 203 | + </packing> | ||
4410 | 204 | + </child> | ||
4411 | 205 | + <child> | ||
4412 | 206 | <object class="GtkLabel" id="label_proxy_warning"> | ||
4413 | 207 | <property name="visible">True</property> | ||
4414 | 208 | <property name="can_focus">False</property> | ||
4415 | 209 | @@ -290,7 +305,7 @@ | ||
4416 | 210 | </object> | ||
4417 | 211 | <packing> | ||
4418 | 212 | <property name="left_attach">0</property> | ||
4419 | 213 | - <property name="top_attach">7</property> | ||
4420 | 214 | + <property name="top_attach">8</property> | ||
4421 | 215 | <property name="width">3</property> | ||
4422 | 216 | <property name="height">1</property> | ||
4423 | 217 | </packing> | ||
4424 | 218 | 0 | ||
4425 | === removed file 'debian/patches/97_unity_power_ui.patch' | |||
4426 | --- debian/patches/97_unity_power_ui.patch 2013-10-18 14:33:16 +0000 | |||
4427 | +++ debian/patches/97_unity_power_ui.patch 1970-01-01 00:00:00 +0000 | |||
4428 | @@ -1,160 +0,0 @@ | |||
4429 | 1 | Description: When indicator-power is installed, display an extra option in the power panel. | ||
4430 | 2 | Forwarded: not-needed | ||
4431 | 3 | |||
4432 | 4 | Index: b/panels/power/cc-power-panel.c | ||
4433 | 5 | =================================================================== | ||
4434 | 6 | --- a/panels/power/cc-power-panel.c | ||
4435 | 7 | +++ b/panels/power/cc-power-panel.c | ||
4436 | 8 | @@ -39,6 +39,7 @@ | ||
4437 | 9 | { | ||
4438 | 10 | GSettings *lock_settings; | ||
4439 | 11 | GSettings *gsd_settings; | ||
4440 | 12 | + GSettings *power_settings; | ||
4441 | 13 | GCancellable *cancellable; | ||
4442 | 14 | GtkBuilder *builder; | ||
4443 | 15 | GDBusProxy *proxy; | ||
4444 | 16 | @@ -89,6 +90,11 @@ | ||
4445 | 17 | g_object_unref (priv->gsd_settings); | ||
4446 | 18 | priv->gsd_settings = NULL; | ||
4447 | 19 | } | ||
4448 | 20 | + if (priv->power_settings) | ||
4449 | 21 | + { | ||
4450 | 22 | + g_object_unref (priv->power_settings); | ||
4451 | 23 | + priv->power_settings = NULL; | ||
4452 | 24 | + } | ||
4453 | 25 | if (priv->cancellable != NULL) | ||
4454 | 26 | { | ||
4455 | 27 | g_cancellable_cancel (priv->cancellable); | ||
4456 | 28 | @@ -1112,6 +1118,37 @@ | ||
4457 | 29 | |||
4458 | 30 | widget = WID (self->priv->builder, "vbox_power"); | ||
4459 | 31 | gtk_widget_reparent (widget, (GtkWidget *) self); | ||
4460 | 32 | + | ||
4461 | 33 | + /* Set up Unity-specific controls */ | ||
4462 | 34 | + /* References: | ||
4463 | 35 | + * https://wiki.ubuntu.com/Power | ||
4464 | 36 | + * https://docs.google.com/document/d/1ILTJDiDCd25Npt2AmgzF8aOnZZECxTfM0hvsbWT2BxA/edit?pli=1#heading=h.i5lg1g344bsb | ||
4465 | 37 | + */ | ||
4466 | 38 | + // First check the schema is installed | ||
4467 | 39 | + GSettingsSchemaSource *schema_source = g_settings_schema_source_ref ( | ||
4468 | 40 | + g_settings_schema_source_get_default ()); | ||
4469 | 41 | + GSettingsSchema *schema = g_settings_schema_source_lookup ( | ||
4470 | 42 | + schema_source, | ||
4471 | 43 | + "com.canonical.indicator.power", | ||
4472 | 44 | + TRUE); | ||
4473 | 45 | + g_settings_schema_source_unref (schema_source); | ||
4474 | 46 | + | ||
4475 | 47 | + if (schema) | ||
4476 | 48 | + { | ||
4477 | 49 | + widget = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, | ||
4478 | 50 | + "combobox_indicator")); | ||
4479 | 51 | + self->priv->power_settings = g_settings_new ("com.canonical.indicator.power"); | ||
4480 | 52 | + g_settings_bind (self->priv->power_settings, "icon-policy", | ||
4481 | 53 | + widget, "active-id", G_SETTINGS_BIND_DEFAULT); | ||
4482 | 54 | + g_settings_schema_unref (schema); | ||
4483 | 55 | + } | ||
4484 | 56 | + else | ||
4485 | 57 | + { | ||
4486 | 58 | + gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "separator_indicator"))); | ||
4487 | 59 | + gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "label_indicator"))); | ||
4488 | 60 | + gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "combobox_indicator"))); | ||
4489 | 61 | + } | ||
4490 | 62 | + | ||
4491 | 63 | } | ||
4492 | 64 | |||
4493 | 65 | void | ||
4494 | 66 | Index: b/panels/power/power.ui | ||
4495 | 67 | =================================================================== | ||
4496 | 68 | --- a/panels/power/power.ui | ||
4497 | 69 | +++ b/panels/power/power.ui | ||
4498 | 70 | @@ -75,6 +75,28 @@ | ||
4499 | 71 | </row> | ||
4500 | 72 | </data> | ||
4501 | 73 | </object> | ||
4502 | 74 | + <object class="GtkListStore" id="liststore_indicator"> | ||
4503 | 75 | + <columns> | ||
4504 | 76 | + <!-- column-name name --> | ||
4505 | 77 | + <column type="gchararray"/> | ||
4506 | 78 | + <!-- column-name value --> | ||
4507 | 79 | + <column type="gchararray"/> | ||
4508 | 80 | + </columns> | ||
4509 | 81 | + <data> | ||
4510 | 82 | + <row> | ||
4511 | 83 | + <col id="0" translatable="yes">When battery is present</col> | ||
4512 | 84 | + <col id="1">present</col> | ||
4513 | 85 | + </row> | ||
4514 | 86 | + <row> | ||
4515 | 87 | + <col id="0" translatable="yes">When battery is charging/in use</col> | ||
4516 | 88 | + <col id="1">charge</col> | ||
4517 | 89 | + </row> | ||
4518 | 90 | + <row> | ||
4519 | 91 | + <col id="0" translatable="yes">Never</col> | ||
4520 | 92 | + <col id="1">never</col> | ||
4521 | 93 | + </row> | ||
4522 | 94 | + </data> | ||
4523 | 95 | + </object> | ||
4524 | 96 | <object class="GtkWindow" id="window_power"> | ||
4525 | 97 | <property name="can_focus">False</property> | ||
4526 | 98 | <property name="resizable">False</property> | ||
4527 | 99 | @@ -238,6 +260,48 @@ | ||
4528 | 100 | <property name="top_attach">3</property> | ||
4529 | 101 | </packing> | ||
4530 | 102 | </child> | ||
4531 | 103 | + <child> | ||
4532 | 104 | + <object class="GtkSeparator" id="separator_indicator"> | ||
4533 | 105 | + <property name="visible">True</property> | ||
4534 | 106 | + <property name="can_focus">False</property> | ||
4535 | 107 | + </object> | ||
4536 | 108 | + <packing> | ||
4537 | 109 | + <property name="left_attach">0</property> | ||
4538 | 110 | + <property name="top_attach">4</property> | ||
4539 | 111 | + <property name="width">4</property> | ||
4540 | 112 | + <property name="height">1</property> | ||
4541 | 113 | + </packing> | ||
4542 | 114 | + </child> | ||
4543 | 115 | + <child> | ||
4544 | 116 | + <object class="GtkLabel" id="label_indicator"> | ||
4545 | 117 | + <property name="visible">True</property> | ||
4546 | 118 | + <property name="can_focus">False</property> | ||
4547 | 119 | + <property name="halign">end</property> | ||
4548 | 120 | + <property name="label" translatable="yes">Show battery status in the _menu bar</property> | ||
4549 | 121 | + <property name="use_underline">True</property> | ||
4550 | 122 | + </object> | ||
4551 | 123 | + <packing> | ||
4552 | 124 | + <property name="left_attach">0</property> | ||
4553 | 125 | + <property name="top_attach">5</property> | ||
4554 | 126 | + </packing> | ||
4555 | 127 | + </child> | ||
4556 | 128 | + <child> | ||
4557 | 129 | + <object class="GtkComboBoxText" id="combobox_indicator"> | ||
4558 | 130 | + <property name="visible">True</property> | ||
4559 | 131 | + <property name="can_focus">False</property> | ||
4560 | 132 | + <property name="model">liststore_indicator</property> | ||
4561 | 133 | + <property name="hexpand">True</property> | ||
4562 | 134 | + <accessibility> | ||
4563 | 135 | + <relation type="labelled-by" target="label_indicator"/> | ||
4564 | 136 | + </accessibility> | ||
4565 | 137 | + </object> | ||
4566 | 138 | + <packing> | ||
4567 | 139 | + <property name="left_attach">1</property> | ||
4568 | 140 | + <property name="top_attach">5</property> | ||
4569 | 141 | + <property name="width">2</property> | ||
4570 | 142 | + <property name="height">1</property> | ||
4571 | 143 | + </packing> | ||
4572 | 144 | + </child> | ||
4573 | 145 | </object> | ||
4574 | 146 | <packing> | ||
4575 | 147 | <property name="expand">False</property> | ||
4576 | 148 | Index: b/configure.ac | ||
4577 | 149 | =================================================================== | ||
4578 | 150 | --- a/configure.ac | ||
4579 | 151 | +++ b/configure.ac | ||
4580 | 152 | @@ -94,7 +94,7 @@ | ||
4581 | 153 | dnl Check that we meet the dependencies | ||
4582 | 154 | dnl ============================================== | ||
4583 | 155 | |||
4584 | 156 | -GLIB_REQUIRED_VERSION=2.31.0 | ||
4585 | 157 | +GLIB_REQUIRED_VERSION=2.31.2 | ||
4586 | 158 | GTK_REQUIRED_VERSION=3.5.13 | ||
4587 | 159 | PA_REQUIRED_VERSION=2.0 | ||
4588 | 160 | CANBERRA_REQUIRED_VERSION=0.13 | ||
4589 | 161 | 0 | ||
4590 | === removed file 'debian/patches/98_default_sound_theme.patch' | |||
4591 | --- debian/patches/98_default_sound_theme.patch 2013-07-05 13:31:20 +0000 | |||
4592 | +++ debian/patches/98_default_sound_theme.patch 1970-01-01 00:00:00 +0000 | |||
4593 | @@ -1,16 +0,0 @@ | |||
4594 | 1 | # Description: the default sound theme is "ubuntu" for us | ||
4595 | 2 | # UbuntuSpecific: yes | ||
4596 | 3 | # | ||
4597 | 4 | Index: b/panels/sound/gvc-sound-theme-chooser.c | ||
4598 | 5 | =================================================================== | ||
4599 | 6 | --- a/panels/sound/gvc-sound-theme-chooser.c | ||
4600 | 7 | +++ b/panels/sound/gvc-sound-theme-chooser.c | ||
4601 | 8 | @@ -67,7 +67,7 @@ | ||
4602 | 9 | #define DEFAULT_ALERT_ID "__default" | ||
4603 | 10 | #define CUSTOM_THEME_NAME "__custom" | ||
4604 | 11 | #define NO_SOUNDS_THEME_NAME "__no_sounds" | ||
4605 | 12 | -#define DEFAULT_THEME "freedesktop" | ||
4606 | 13 | +#define DEFAULT_THEME "ubuntu" | ||
4607 | 14 | |||
4608 | 15 | enum { | ||
4609 | 16 | THEME_DISPLAY_COL, | ||
4610 | 17 | 0 | ||
4611 | === added file 'debian/patches/99_add_lock-on-suspend.patch' | |||
4612 | --- debian/patches/99_add_lock-on-suspend.patch 1970-01-01 00:00:00 +0000 | |||
4613 | +++ debian/patches/99_add_lock-on-suspend.patch 2014-05-06 09:05:46 +0000 | |||
4614 | @@ -0,0 +1,75 @@ | |||
4615 | 1 | Description: Add a new preference to lock the screen when the system suspends. | ||
4616 | 2 | Author: Marc Deslauriers <marc.deslauriers@canonical.com> | ||
4617 | 3 | Forwarded: no, likely a Ubuntu-specific preference | ||
4618 | 4 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/938076 | ||
4619 | 5 | |||
4620 | 6 | From: Tim Lunn <tim@feathertop.org> | ||
4621 | 7 | Date: Mon, 3 Jun 2013 17:27:45 +1000 | ||
4622 | 8 | Subject: [PATCH] ubuntu lock on suspend | ||
4623 | 9 | |||
4624 | 10 | --- | ||
4625 | 11 | panels/privacy/cc-privacy-panel.c | 5 +++++ | ||
4626 | 12 | panels/privacy/privacy.ui | 31 +++++++++++++++++++++++++++++++ | ||
4627 | 13 | 2 files changed, 36 insertions(+) | ||
4628 | 14 | |||
4629 | 15 | diff --git a/panels/privacy/cc-privacy-panel.c b/panels/privacy/cc-privacy-panel.c | ||
4630 | 16 | index d92b9e4..fb1be4c 100644 | ||
4631 | 17 | --- a/panels/privacy/cc-privacy-panel.c | ||
4632 | 18 | +++ b/panels/privacy/cc-privacy-panel.c | ||
4633 | 19 | @@ -299,6 +299,11 @@ add_screen_lock (CcPrivacyPanel *self) | ||
4634 | 20 | g_settings_bind (self->priv->notification_settings, "show-in-lock-screen", | ||
4635 | 21 | w, "active", | ||
4636 | 22 | G_SETTINGS_BIND_DEFAULT); | ||
4637 | 23 | + | ||
4638 | 24 | + w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "screen_lock_suspend")); | ||
4639 | 25 | + g_settings_bind (self->priv->lock_settings, "ubuntu-lock-on-suspend", | ||
4640 | 26 | + w, "active", | ||
4641 | 27 | + G_SETTINGS_BIND_DEFAULT); | ||
4642 | 28 | } | ||
4643 | 29 | |||
4644 | 30 | static void | ||
4645 | 31 | diff --git a/panels/privacy/privacy.ui b/panels/privacy/privacy.ui | ||
4646 | 32 | index ec62b70..b5d43f4 100644 | ||
4647 | 33 | --- a/panels/privacy/privacy.ui | ||
4648 | 34 | +++ b/panels/privacy/privacy.ui | ||
4649 | 35 | @@ -612,6 +612,37 @@ | ||
4650 | 36 | <property name="height">1</property> | ||
4651 | 37 | </packing> | ||
4652 | 38 | </child> | ||
4653 | 39 | + <child> | ||
4654 | 40 | + <object class="GtkLabel" id="label8"> | ||
4655 | 41 | + <property name="visible">True</property> | ||
4656 | 42 | + <property name="can_focus">False</property> | ||
4657 | 43 | + <property name="xalign">0</property> | ||
4658 | 44 | + <property name="hexpand">True</property> | ||
4659 | 45 | + <property name="label" translatable="yes">Lock Screen on Suspend</property> | ||
4660 | 46 | + <property name="use_underline">True</property> | ||
4661 | 47 | + <property name="mnemonic_widget">screen_lock_suspend</property> | ||
4662 | 48 | + </object> | ||
4663 | 49 | + <packing> | ||
4664 | 50 | + <property name="left_attach">0</property> | ||
4665 | 51 | + <property name="top_attach">3</property> | ||
4666 | 52 | + <property name="width">1</property> | ||
4667 | 53 | + <property name="height">1</property> | ||
4668 | 54 | + </packing> | ||
4669 | 55 | + </child> | ||
4670 | 56 | + <child> | ||
4671 | 57 | + <object class="GtkSwitch" id="screen_lock_suspend"> | ||
4672 | 58 | + <property name="visible">True</property> | ||
4673 | 59 | + <property name="can_focus">True</property> | ||
4674 | 60 | + <property name="halign">end</property> | ||
4675 | 61 | + <property name="valign">center</property> | ||
4676 | 62 | + </object> | ||
4677 | 63 | + <packing> | ||
4678 | 64 | + <property name="left_attach">1</property> | ||
4679 | 65 | + <property name="top_attach">3</property> | ||
4680 | 66 | + <property name="width">1</property> | ||
4681 | 67 | + <property name="height">1</property> | ||
4682 | 68 | + </packing> | ||
4683 | 69 | + </child> | ||
4684 | 70 | </object> | ||
4685 | 71 | <packing> | ||
4686 | 72 | <property name="expand">False</property> | ||
4687 | 73 | -- | ||
4688 | 74 | 1.8.1.2 | ||
4689 | 75 | |||
4690 | 0 | 76 | ||
4691 | === removed file 'debian/patches/99_add_lock-on-suspend.patch' | |||
4692 | --- debian/patches/99_add_lock-on-suspend.patch 2013-07-05 13:31:20 +0000 | |||
4693 | +++ debian/patches/99_add_lock-on-suspend.patch 1970-01-01 00:00:00 +0000 | |||
4694 | @@ -1,77 +0,0 @@ | |||
4695 | 1 | Description: Add a new preference to lock the screen when the system suspends. | ||
4696 | 2 | Author: Marc Deslauriers <marc.deslauriers@canonical.com> | ||
4697 | 3 | Forwarded: no, likely a Ubuntu-specific preference | ||
4698 | 4 | Bug-Ubuntu: https://bugs.launchpad.net/bugs/938076 | ||
4699 | 5 | |||
4700 | 6 | Index: b/panels/screen/cc-screen-panel.c | ||
4701 | 7 | =================================================================== | ||
4702 | 8 | --- a/panels/screen/cc-screen-panel.c | ||
4703 | 9 | +++ b/panels/screen/cc-screen-panel.c | ||
4704 | 10 | @@ -540,6 +540,13 @@ | ||
4705 | 11 | |||
4706 | 12 | update_lock_screen_sensitivity (self); | ||
4707 | 13 | |||
4708 | 14 | + /* bind the screen lock suspend checkbutton */ | ||
4709 | 15 | + widget = WID ("screen_lock_suspend_checkbutton"); | ||
4710 | 16 | + g_settings_bind (self->priv->lock_settings, | ||
4711 | 17 | + "ubuntu-lock-on-suspend", | ||
4712 | 18 | + widget, "active", | ||
4713 | 19 | + G_SETTINGS_BIND_DEFAULT); | ||
4714 | 20 | + | ||
4715 | 21 | widget = WID ("screen_vbox"); | ||
4716 | 22 | gtk_widget_reparent (widget, (GtkWidget *) self); | ||
4717 | 23 | g_object_set (self, "valign", GTK_ALIGN_START, NULL); | ||
4718 | 24 | Index: b/panels/screen/screen.ui | ||
4719 | 25 | =================================================================== | ||
4720 | 26 | --- a/panels/screen/screen.ui | ||
4721 | 27 | +++ b/panels/screen/screen.ui | ||
4722 | 28 | @@ -299,6 +299,31 @@ | ||
4723 | 29 | </packing> | ||
4724 | 30 | </child> | ||
4725 | 31 | <child> | ||
4726 | 32 | + <object class="GtkHBox" id="screen_suspend_hbox"> | ||
4727 | 33 | + <property name="visible">True</property> | ||
4728 | 34 | + <property name="can_focus">False</property> | ||
4729 | 35 | + <property name="spacing">6</property> | ||
4730 | 36 | + <child> | ||
4731 | 37 | + <object class="GtkCheckButton" id="screen_lock_suspend_checkbutton"> | ||
4732 | 38 | + <property name="label" translatable="yes">Require my password when waking from suspend</property> | ||
4733 | 39 | + <property name="use_action_appearance">False</property> | ||
4734 | 40 | + <property name="visible">True</property> | ||
4735 | 41 | + <property name="can_focus">True</property> | ||
4736 | 42 | + </object> | ||
4737 | 43 | + <packing> | ||
4738 | 44 | + <property name="expand">False</property> | ||
4739 | 45 | + <property name="fill">False</property> | ||
4740 | 46 | + <property name="position">0</property> | ||
4741 | 47 | + </packing> | ||
4742 | 48 | + </child> | ||
4743 | 49 | + </object> | ||
4744 | 50 | + <packing> | ||
4745 | 51 | + <property name="expand">False</property> | ||
4746 | 52 | + <property name="fill">False</property> | ||
4747 | 53 | + <property name="position">2</property> | ||
4748 | 54 | + </packing> | ||
4749 | 55 | + </child> | ||
4750 | 56 | + <child> | ||
4751 | 57 | <object class="GtkHBox" id="hbox2"> | ||
4752 | 58 | <property name="can_focus">False</property> | ||
4753 | 59 | <property name="no_show_all">True</property> | ||
4754 | 60 | @@ -340,7 +365,7 @@ | ||
4755 | 61 | <packing> | ||
4756 | 62 | <property name="expand">True</property> | ||
4757 | 63 | <property name="fill">True</property> | ||
4758 | 64 | - <property name="position">2</property> | ||
4759 | 65 | + <property name="position">3</property> | ||
4760 | 66 | </packing> | ||
4761 | 67 | </child> | ||
4762 | 68 | <child> | ||
4763 | 69 | @@ -357,7 +382,7 @@ | ||
4764 | 70 | <packing> | ||
4765 | 71 | <property name="expand">True</property> | ||
4766 | 72 | <property name="fill">True</property> | ||
4767 | 73 | - <property name="position">3</property> | ||
4768 | 74 | + <property name="position">4</property> | ||
4769 | 75 | </packing> | ||
4770 | 76 | </child> | ||
4771 | 77 | </object> | ||
4772 | 78 | 0 | ||
4773 | === removed file 'debian/patches/accounts_fix_unsetting_icon.patch' | |||
4774 | --- debian/patches/accounts_fix_unsetting_icon.patch 2013-07-05 13:31:20 +0000 | |||
4775 | +++ debian/patches/accounts_fix_unsetting_icon.patch 1970-01-01 00:00:00 +0000 | |||
4776 | @@ -1,16 +0,0 @@ | |||
4777 | 1 | # Upstream: https://bugzilla.gnome.org/show_bug.cgi?id=673841 | ||
4778 | 2 | # Ubuntu: https://launchpad.net/bugs/978049 | ||
4779 | 3 | # | ||
4780 | 4 | Index: gnome-control-center-3.6.2/panels/user-accounts/um-user.c | ||
4781 | 5 | =================================================================== | ||
4782 | 6 | --- gnome-control-center-3.6.2.orig/panels/user-accounts/um-user.c 2012-11-01 20:44:03.426070880 -0400 | ||
4783 | 7 | +++ gnome-control-center-3.6.2/panels/user-accounts/um-user.c 2012-11-01 20:44:03.442070879 -0400 | ||
4784 | 8 | @@ -730,7 +730,7 @@ | ||
4785 | 9 | GVariant *result; | ||
4786 | 10 | GError *error = NULL; | ||
4787 | 11 | |||
4788 | 12 | - result = g_dbus_proxy_call_sync (user->proxy, "SetIconFile", g_variant_new ("(s)", icon_file), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); | ||
4789 | 13 | + result = g_dbus_proxy_call_sync (user->proxy, "SetIconFile", g_variant_new ("(s)", icon_file ? icon_file : ""), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error); | ||
4790 | 14 | if (!result) { | ||
4791 | 15 | g_warning ("SetIconFile call failed: %s", error->message); | ||
4792 | 16 | g_error_free (error); | ||
4793 | 17 | 0 | ||
4794 | === removed file 'debian/patches/classic_use_sound_indicator.patch' | |||
4795 | --- debian/patches/classic_use_sound_indicator.patch 2013-07-05 13:31:20 +0000 | |||
4796 | +++ debian/patches/classic_use_sound_indicator.patch 1970-01-01 00:00:00 +0000 | |||
4797 | @@ -1,10 +0,0 @@ | |||
4798 | 1 | Index: b/panels/sound/data/gnome-sound-applet.desktop.in | ||
4799 | 2 | =================================================================== | ||
4800 | 3 | --- a/panels/sound/data/gnome-sound-applet.desktop.in | ||
4801 | 4 | +++ b/panels/sound/data/gnome-sound-applet.desktop.in | ||
4802 | 5 | @@ -14,4 +14,4 @@ | ||
4803 | 6 | #X-GNOME-Autostart-Phase=Panel | ||
4804 | 7 | X-GNOME-Autostart-Notify=true | ||
4805 | 8 | AutostartCondition=GNOME3 if-session gnome-fallback | ||
4806 | 9 | -OnlyShowIn=GNOME;Unity; | ||
4807 | 10 | +OnlyShowIn=; | ||
4808 | 11 | 0 | ||
4809 | === removed file 'debian/patches/deal_with_null_ssid.patch' | |||
4810 | --- debian/patches/deal_with_null_ssid.patch 2012-11-01 09:53:43 +0000 | |||
4811 | +++ debian/patches/deal_with_null_ssid.patch 1970-01-01 00:00:00 +0000 | |||
4812 | @@ -1,33 +0,0 @@ | |||
4813 | 1 | From: Dan Williams <dcbw@redhat.com> | ||
4814 | 2 | Subject: Avoid crashing when SSIDs are NULL. | ||
4815 | 3 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/908670 | ||
4816 | 4 | Bug: https://bugzilla.gnome.org/show_bug.cgi?id=672922 | ||
4817 | 5 | |||
4818 | 6 | --- | ||
4819 | 7 | panels/network/cc-network-panel.c | 6 ++++++ | ||
4820 | 8 | 1 file changed, 6 insertions(+) | ||
4821 | 9 | |||
4822 | 10 | Index: gnome-control-center-3.5.2/panels/network/cc-network-panel.c | ||
4823 | 11 | =================================================================== | ||
4824 | 12 | --- gnome-control-center-3.5.2.orig/panels/network/cc-network-panel.c 2012-06-08 16:49:24.888332382 +1200 | ||
4825 | 13 | +++ gnome-control-center-3.5.2/panels/network/cc-network-panel.c 2012-06-08 17:00:13.600309923 +1200 | ||
4826 | 14 | @@ -1128,13 +1128,19 @@ | ||
4827 | 15 | if (aps != NULL) | ||
4828 | 16 | for (i = 0; i < aps->len; i++) { | ||
4829 | 17 | ap = NM_ACCESS_POINT (g_ptr_array_index (aps, i)); | ||
4830 | 18 | + | ||
4831 | 19 | + /* Hidden SSIDs don't get shown in the list */ | ||
4832 | 20 | ssid = nm_access_point_get_ssid (ap); | ||
4833 | 21 | + if (!ssid) | ||
4834 | 22 | + continue; | ||
4835 | 23 | + | ||
4836 | 24 | add_ap = TRUE; | ||
4837 | 25 | |||
4838 | 26 | /* get already added list */ | ||
4839 | 27 | for (j=0; j<aps_unique->len; j++) { | ||
4840 | 28 | ap_tmp = NM_ACCESS_POINT (g_ptr_array_index (aps_unique, j)); | ||
4841 | 29 | ssid_tmp = nm_access_point_get_ssid (ap_tmp); | ||
4842 | 30 | + g_assert (ssid_tmp); | ||
4843 | 31 | |||
4844 | 32 | /* is this the same type and data? */ | ||
4845 | 33 | if (nm_utils_same_ssid (ssid, ssid_tmp, TRUE)) { | ||
4846 | 34 | 0 | ||
4847 | === removed file 'debian/patches/dont_download_local_image.patch' | |||
4848 | --- debian/patches/dont_download_local_image.patch 2013-07-05 13:31:20 +0000 | |||
4849 | +++ debian/patches/dont_download_local_image.patch 1970-01-01 00:00:00 +0000 | |||
4850 | @@ -1,28 +0,0 @@ | |||
4851 | 1 | From 7b7f35b172e8c604aa723a3cd414088563a7d490 Mon Sep 17 00:00:00 2001 | ||
4852 | 2 | From: Ryan Lortie <desrt@desrt.ca> | ||
4853 | 3 | Date: Mon, 19 Mar 2012 12:55:31 -0400 | ||
4854 | 4 | Subject: [PATCH] background: don't 'download' image files | ||
4855 | 5 | |||
4856 | 6 | The code for downloading files from remote uris was being triggered in | ||
4857 | 7 | the case of adding a background image file via the file chooser. Don't | ||
4858 | 8 | set the 'source-url' attribute on the image in this case in order to | ||
4859 | 9 | avoid the problem. | ||
4860 | 10 | |||
4861 | 11 | https://bugzilla.gnome.org/show_bug.cgi?id=672405 | ||
4862 | 12 | --- | ||
4863 | 13 | panels/background/bg-pictures-source.c | 2 +- | ||
4864 | 14 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
4865 | 15 | |||
4866 | 16 | Index: b/panels/background/bg-pictures-source.c | ||
4867 | 17 | =================================================================== | ||
4868 | 18 | --- a/panels/background/bg-pictures-source.c | ||
4869 | 19 | +++ b/panels/background/bg-pictures-source.c | ||
4870 | 20 | @@ -335,7 +335,7 @@ | ||
4871 | 21 | "shading", G_DESKTOP_BACKGROUND_SHADING_SOLID, | ||
4872 | 22 | "placement", G_DESKTOP_BACKGROUND_STYLE_ZOOM, | ||
4873 | 23 | NULL); | ||
4874 | 24 | - if (source_uri != NULL) | ||
4875 | 25 | + if (source_uri != NULL && !g_file_is_native (file)) | ||
4876 | 26 | g_object_set (G_OBJECT (item), "source-url", source_uri, NULL); | ||
4877 | 27 | |||
4878 | 28 | g_object_set_data (G_OBJECT (file), "item", item); | ||
4879 | 29 | 0 | ||
4880 | === modified file 'debian/patches/gcc_not_in_unity.patch' | |||
4881 | --- debian/patches/gcc_not_in_unity.patch 2014-03-04 18:20:22 +0000 | |||
4882 | +++ debian/patches/gcc_not_in_unity.patch 2014-05-06 09:05:46 +0000 | |||
4883 | @@ -1,7 +1,5 @@ | |||
4888 | 1 | Index: gnome-control-center-3.6.3/panels/bluetooth/gnome-bluetooth-panel.desktop.in.in | 1 | --- a/panels/bluetooth/gnome-bluetooth-panel.desktop.in.in |
4889 | 2 | =================================================================== | 2 | +++ b/panels/bluetooth/gnome-bluetooth-panel.desktop.in.in |
4886 | 3 | --- gnome-control-center-3.6.3.orig/panels/bluetooth/gnome-bluetooth-panel.desktop.in.in 2014-03-04 19:17:38.334473755 +0100 | ||
4887 | 4 | +++ gnome-control-center-3.6.3/panels/bluetooth/gnome-bluetooth-panel.desktop.in.in 2014-03-04 19:17:38.322473754 +0100 | ||
4890 | 5 | @@ -6,7 +6,7 @@ | 3 | @@ -6,7 +6,7 @@ |
4891 | 6 | Terminal=false | 4 | Terminal=false |
4892 | 7 | Type=Application | 5 | Type=Application |
4893 | @@ -11,23 +9,19 @@ | |||
4894 | 11 | StartupNotify=true | 9 | StartupNotify=true |
4895 | 12 | X-GNOME-Bugzilla-Bugzilla=GNOME | 10 | X-GNOME-Bugzilla-Bugzilla=GNOME |
4896 | 13 | X-GNOME-Bugzilla-Product=gnome-bluetooth | 11 | X-GNOME-Bugzilla-Product=gnome-bluetooth |
4901 | 14 | Index: gnome-control-center-3.6.3/panels/color/gnome-color-panel.desktop.in.in | 12 | --- a/panels/color/gnome-color-panel.desktop.in.in |
4902 | 15 | =================================================================== | 13 | +++ b/panels/color/gnome-color-panel.desktop.in.in |
4899 | 16 | --- gnome-control-center-3.6.3.orig/panels/color/gnome-color-panel.desktop.in.in 2014-03-04 19:17:38.334473755 +0100 | ||
4900 | 17 | +++ gnome-control-center-3.6.3/panels/color/gnome-color-panel.desktop.in.in 2014-03-04 19:17:38.322473754 +0100 | ||
4903 | 18 | @@ -7,7 +7,7 @@ | 14 | @@ -7,7 +7,7 @@ |
4904 | 19 | Type=Application | 15 | Type=Application |
4905 | 20 | StartupNotify=true | 16 | StartupNotify=true |
4907 | 21 | Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;HardwareSettings | 17 | Categories=GNOME;GTK;Settings;X-GNOME-Settings-Panel;HardwareSettings; |
4908 | 22 | -OnlyShowIn=GNOME;Unity; | 18 | -OnlyShowIn=GNOME;Unity; |
4910 | 23 | +OnlyShowIn=GNOME; | 19 | +OnlyShowIn=GNOME |
4911 | 24 | X-GNOME-Bugzilla-Bugzilla=GNOME | 20 | X-GNOME-Bugzilla-Bugzilla=GNOME |
4912 | 25 | X-GNOME-Bugzilla-Product=gnome-control-center | 21 | X-GNOME-Bugzilla-Product=gnome-control-center |
4913 | 26 | X-GNOME-Bugzilla-Component=color | 22 | X-GNOME-Bugzilla-Component=color |
4918 | 27 | Index: gnome-control-center-3.6.3/panels/display/gnome-display-panel.desktop.in.in | 23 | --- a/panels/display/gnome-display-panel.desktop.in.in |
4919 | 28 | =================================================================== | 24 | +++ b/panels/display/gnome-display-panel.desktop.in.in |
4916 | 29 | --- gnome-control-center-3.6.3.orig/panels/display/gnome-display-panel.desktop.in.in 2014-03-04 19:17:38.334473755 +0100 | ||
4917 | 30 | +++ gnome-control-center-3.6.3/panels/display/gnome-display-panel.desktop.in.in 2014-03-04 19:17:38.322473754 +0100 | ||
4920 | 31 | @@ -7,7 +7,7 @@ | 25 | @@ -7,7 +7,7 @@ |
4921 | 32 | Type=Application | 26 | Type=Application |
4922 | 33 | StartupNotify=true | 27 | StartupNotify=true |
4923 | @@ -37,10 +31,8 @@ | |||
4924 | 37 | X-GNOME-Bugzilla-Bugzilla=GNOME | 31 | X-GNOME-Bugzilla-Bugzilla=GNOME |
4925 | 38 | X-GNOME-Bugzilla-Product=gnome-control-center | 32 | X-GNOME-Bugzilla-Product=gnome-control-center |
4926 | 39 | X-GNOME-Bugzilla-Component=Screen resolution | 33 | X-GNOME-Bugzilla-Component=Screen resolution |
4931 | 40 | Index: gnome-control-center-3.6.3/panels/info/gnome-info-panel.desktop.in.in | 34 | --- a/panels/info/gnome-info-panel.desktop.in.in |
4932 | 41 | =================================================================== | 35 | +++ b/panels/info/gnome-info-panel.desktop.in.in |
4929 | 42 | --- gnome-control-center-3.6.3.orig/panels/info/gnome-info-panel.desktop.in.in 2014-03-04 19:17:38.334473755 +0100 | ||
4930 | 43 | +++ gnome-control-center-3.6.3/panels/info/gnome-info-panel.desktop.in.in 2014-03-04 19:17:38.326473755 +0100 | ||
4933 | 44 | @@ -7,7 +7,7 @@ | 36 | @@ -7,7 +7,7 @@ |
4934 | 45 | Type=Application | 37 | Type=Application |
4935 | 46 | StartupNotify=true | 38 | StartupNotify=true |
4936 | @@ -50,10 +42,8 @@ | |||
4937 | 50 | X-GNOME-Bugzilla-Bugzilla=GNOME | 42 | X-GNOME-Bugzilla-Bugzilla=GNOME |
4938 | 51 | X-GNOME-Bugzilla-Product=gnome-control-center | 43 | X-GNOME-Bugzilla-Product=gnome-control-center |
4939 | 52 | X-GNOME-Bugzilla-Component=info | 44 | X-GNOME-Bugzilla-Component=info |
4944 | 53 | Index: gnome-control-center-3.6.3/panels/keyboard/gnome-keyboard-panel.desktop.in.in | 45 | --- a/panels/keyboard/gnome-keyboard-panel.desktop.in.in |
4945 | 54 | =================================================================== | 46 | +++ b/panels/keyboard/gnome-keyboard-panel.desktop.in.in |
4942 | 55 | --- gnome-control-center-3.6.3.orig/panels/keyboard/gnome-keyboard-panel.desktop.in.in 2014-03-04 19:17:38.334473755 +0100 | ||
4943 | 56 | +++ gnome-control-center-3.6.3/panels/keyboard/gnome-keyboard-panel.desktop.in.in 2014-03-04 19:17:38.326473755 +0100 | ||
4946 | 57 | @@ -7,7 +7,7 @@ | 47 | @@ -7,7 +7,7 @@ |
4947 | 58 | Type=Application | 48 | Type=Application |
4948 | 59 | StartupNotify=true | 49 | StartupNotify=true |
4949 | @@ -63,10 +53,8 @@ | |||
4950 | 63 | X-GNOME-Bugzilla-Bugzilla=GNOME | 53 | X-GNOME-Bugzilla-Bugzilla=GNOME |
4951 | 64 | X-GNOME-Bugzilla-Product=gnome-control-center | 54 | X-GNOME-Bugzilla-Product=gnome-control-center |
4952 | 65 | X-GNOME-Bugzilla-Component=keyboard | 55 | X-GNOME-Bugzilla-Component=keyboard |
4957 | 66 | Index: gnome-control-center-3.6.3/panels/mouse/gnome-mouse-panel.desktop.in.in | 56 | --- a/panels/mouse/gnome-mouse-panel.desktop.in.in |
4958 | 67 | =================================================================== | 57 | +++ b/panels/mouse/gnome-mouse-panel.desktop.in.in |
4955 | 68 | --- gnome-control-center-3.6.3.orig/panels/mouse/gnome-mouse-panel.desktop.in.in 2014-03-04 19:17:38.334473755 +0100 | ||
4956 | 69 | +++ gnome-control-center-3.6.3/panels/mouse/gnome-mouse-panel.desktop.in.in 2014-03-04 19:17:38.326473755 +0100 | ||
4959 | 70 | @@ -7,7 +7,7 @@ | 58 | @@ -7,7 +7,7 @@ |
4960 | 71 | Type=Application | 59 | Type=Application |
4961 | 72 | StartupNotify=true | 60 | StartupNotify=true |
4962 | @@ -76,10 +64,8 @@ | |||
4963 | 76 | X-GNOME-Bugzilla-Bugzilla=GNOME | 64 | X-GNOME-Bugzilla-Bugzilla=GNOME |
4964 | 77 | X-GNOME-Bugzilla-Product=gnome-control-center | 65 | X-GNOME-Bugzilla-Product=gnome-control-center |
4965 | 78 | X-GNOME-Bugzilla-Component=mouse | 66 | X-GNOME-Bugzilla-Component=mouse |
4970 | 79 | Index: gnome-control-center-3.6.3/panels/network/gnome-network-panel.desktop.in.in | 67 | --- a/panels/network/gnome-network-panel.desktop.in.in |
4971 | 80 | =================================================================== | 68 | +++ b/panels/network/gnome-network-panel.desktop.in.in |
4968 | 81 | --- gnome-control-center-3.6.3.orig/panels/network/gnome-network-panel.desktop.in.in 2014-03-04 19:17:38.334473755 +0100 | ||
4969 | 82 | +++ gnome-control-center-3.6.3/panels/network/gnome-network-panel.desktop.in.in 2014-03-04 19:17:38.326473755 +0100 | ||
4972 | 83 | @@ -7,7 +7,7 @@ | 69 | @@ -7,7 +7,7 @@ |
4973 | 84 | Type=Application | 70 | Type=Application |
4974 | 85 | StartupNotify=true | 71 | StartupNotify=true |
4975 | @@ -89,36 +75,19 @@ | |||
4976 | 89 | X-GNOME-Bugzilla-Bugzilla=GNOME | 75 | X-GNOME-Bugzilla-Bugzilla=GNOME |
4977 | 90 | X-GNOME-Bugzilla-Product=gnome-control-center | 76 | X-GNOME-Bugzilla-Product=gnome-control-center |
4978 | 91 | X-GNOME-Bugzilla-Component=network | 77 | X-GNOME-Bugzilla-Component=network |
4983 | 92 | Index: gnome-control-center-3.6.3/panels/power/gnome-power-panel.desktop.in.in | 78 | --- a/panels/power/gnome-power-panel.desktop.in.in |
4984 | 93 | =================================================================== | 79 | +++ b/panels/power/gnome-power-panel.desktop.in.in |
4981 | 94 | --- gnome-control-center-3.6.3.orig/panels/power/gnome-power-panel.desktop.in.in 2014-03-04 19:17:38.334473755 +0100 | ||
4982 | 95 | +++ gnome-control-center-3.6.3/panels/power/gnome-power-panel.desktop.in.in 2014-03-04 19:17:38.326473755 +0100 | ||
4985 | 96 | @@ -7,7 +7,7 @@ | 80 | @@ -7,7 +7,7 @@ |
4986 | 97 | Type=Application | 81 | Type=Application |
4987 | 98 | StartupNotify=true | 82 | StartupNotify=true |
4989 | 99 | Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;HardwareSettings | 83 | Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;HardwareSettings; |
4990 | 100 | -OnlyShowIn=GNOME;Unity; | 84 | -OnlyShowIn=GNOME;Unity; |
4991 | 101 | +OnlyShowIn=GNOME; | 85 | +OnlyShowIn=GNOME; |
4992 | 102 | X-GNOME-Bugzilla-Bugzilla=GNOME | 86 | X-GNOME-Bugzilla-Bugzilla=GNOME |
4993 | 103 | X-GNOME-Bugzilla-Product=gnome-control-center | 87 | X-GNOME-Bugzilla-Product=gnome-control-center |
4994 | 104 | X-GNOME-Bugzilla-Component=power | 88 | X-GNOME-Bugzilla-Component=power |
4995 | 105 | Index: gnome-control-center-3.6.3/panels/screen/gnome-screen-panel.desktop.in.in | ||
4996 | 106 | =================================================================== | ||
4997 | 107 | --- gnome-control-center-3.6.3.orig/panels/screen/gnome-screen-panel.desktop.in.in 2014-03-04 19:17:38.334473755 +0100 | ||
4998 | 108 | +++ gnome-control-center-3.6.3/panels/screen/gnome-screen-panel.desktop.in.in 2014-03-04 19:17:38.326473755 +0100 | ||
4999 | 109 | @@ -7,7 +7,7 @@ | ||
5000 | 110 | Type=Application |
The diff has been truncated for viewing.