Merge lp:~attente/unity-control-center/1430971 into lp:unity-control-center

Proposed by William Hua on 2015-03-12
Status: Merged
Approved by: Sebastien Bacher on 2015-03-13
Approved revision: no longer in the source branch.
Merged at revision: 12810
Proposed branch: lp:~attente/unity-control-center/1430971
Merge into: lp:unity-control-center
Diff against target: 81 lines (+23/-13)
2 files modified
debian/control (+1/-2)
panels/region/gnome-region-panel-input.c (+22/-11)
To merge this branch: bzr merge lp:~attente/unity-control-center/1430971
Reviewer Review Type Date Requested Status
Sebastien Bacher 2015-03-12 Approve on 2015-03-13
Review via email: mp+252831@code.launchpad.net

Commit message

Remove fcitx-data from Recommends and check if the required file, config.desc, is available at runtime. Trying to dist-upgrade currently pulls in the fcitx-bin which is higher priority than ibus.

Description of the change

Remove fcitx-data from Recommends and check if the required file, config.desc, is available at runtime. Trying to dist-upgrade currently pulls in the fcitx-bin which is higher priority than ibus.

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

thanks

review: Approve
12810. By William Hua on 2015-03-13

Remove fcitx-data from Recommends and check if the required file, config.desc, is available at runtime. Trying to dist-upgrade currently pulls in the fcitx-bin which is higher priority than ibus. Fixes: #1430971
Approved by: Sebastien Bacher

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2015-02-12 14:09:23 +0000
3+++ debian/control 2015-03-12 22:02:03 +0000
4@@ -68,7 +68,6 @@
5 accountsservice,
6 apg,
7 desktop-file-utils,
8- fcitx-data,
9 gkbd-capplet (>= 3.5.90),
10 gnome-desktop3-data,
11 adwaita-icon-theme,
12@@ -109,7 +108,7 @@
13 gnome-user-guide | ubuntu-docs,
14 gstreamer0.10-pulseaudio,
15 libcanberra-gtk-module,
16- x11-xserver-utils
17+ x11-xserver-utils,
18 Provides: unity-control-center-datetime,
19 gnome-control-center-unity,
20 Description: utilities to configure the GNOME desktop
21
22=== modified file 'panels/region/gnome-region-panel-input.c'
23--- panels/region/gnome-region-panel-input.c 2014-09-17 15:29:58 +0000
24+++ panels/region/gnome-region-panel-input.c 2015-03-12 22:02:03 +0000
25@@ -120,6 +120,7 @@
26 struct _FcitxShareStateConfig
27 {
28 FcitxGenericConfig config;
29+ gboolean config_valid;
30 gint share_state;
31 };
32
33@@ -1733,6 +1734,9 @@
34 static void
35 save_fcitx_config (void)
36 {
37+ if (!fcitx_config.config_valid)
38+ return;
39+
40 FILE *file = FcitxXDGGetFileUserWithPrefix (NULL, "config", "w", NULL);
41 FcitxConfigSaveConfigFileFp (file, &fcitx_config.config, get_fcitx_config_desc ());
42
43@@ -1745,20 +1749,27 @@
44 static void
45 load_fcitx_config (void)
46 {
47- static gboolean loaded = FALSE;
48+ static gboolean attempted = FALSE;
49
50- if (loaded)
51+ if (attempted)
52 return;
53
54- FILE *file = FcitxXDGGetFileUserWithPrefix (NULL, "config", "r", NULL);
55- FcitxConfigFile *config_file = FcitxConfigParseConfigFileFp (file, get_fcitx_config_desc ());
56- FcitxShareStateConfigConfigBind (&fcitx_config, config_file, get_fcitx_config_desc ());
57- FcitxConfigBindSync (&fcitx_config.config);
58-
59- if (file)
60- fclose (file);
61-
62- loaded = TRUE;
63+ FcitxConfigFileDesc *config_file_desc = get_fcitx_config_desc ();
64+
65+ if (config_file_desc)
66+ {
67+ FILE *file = FcitxXDGGetFileUserWithPrefix (NULL, "config", "r", NULL);
68+
69+ FcitxConfigFile *config_file = FcitxConfigParseConfigFileFp (file, config_file_desc);
70+ FcitxShareStateConfigConfigBind (&fcitx_config, config_file, config_file_desc);
71+ FcitxConfigBindSync (&fcitx_config.config);
72+ fcitx_config.config_valid = TRUE;
73+
74+ if (file)
75+ fclose (file);
76+ }
77+
78+ attempted = TRUE;
79 }
80
81 static void

Subscribers

People subscribed via source and target branches