Merge lp:~docky-core/docky/gkeyfile into lp:docky

Proposed by Rico Tzschichholz
Status: Merged
Merged at revision: 1842
Proposed branch: lp:~docky-core/docky/gkeyfile
Merge into: lp:docky
Diff against target: 179 lines (+30/-28)
5 files modified
Docky/Docky.csproj (+4/-3)
Docky/Docky/ConfigurationWindow.cs (+21/-16)
Docky/Makefile.am (+1/-1)
Docky/gtk-gui/gui.stetic (+2/-6)
configure.ac (+2/-2)
To merge this branch: bzr merge lp:~docky-core/docky/gkeyfile
Reviewer Review Type Date Requested Status
Robert Dyer (community) Approve
Review via email: mp+163439@code.launchpad.net

Description of the change

Debian is going to remove gnome-desktop-2.0 and therefore we should just switch to use gkeyfile instead.

To post a comment you must log in.
Revision history for this message
Robert Dyer (psybers) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Docky/Docky.csproj'
2--- Docky/Docky.csproj 2011-12-22 15:47:35 +0000
3+++ Docky/Docky.csproj 2013-05-12 20:20:34 +0000
4@@ -114,9 +114,6 @@
5 <Package>gtk-sharp-2.0</Package>
6 </Reference>
7 <Reference Include="Mono.Posix" />
8- <Reference Include="gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
9- <Package>gnome-desktop-sharp-2.0</Package>
10- </Reference>
11 <Reference Include="gio-sharp, Version=2.14.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
12 <Package>gio-sharp-2.0</Package>
13 </Reference>
14@@ -133,6 +130,10 @@
15 <Private>False</Private>
16 <Package>mono-addins</Package>
17 </Reference>
18+ <Reference Include="gkeyfile-sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e886e4e52ee77480">
19+ <Private>False</Private>
20+ <Package>gkeyfile-sharp</Package>
21+ </Reference>
22 </ItemGroup>
23 <ItemGroup>
24 <ProjectReference Include="..\Docky.Services\Docky.Services.csproj">
25
26=== modified file 'Docky/Docky/ConfigurationWindow.cs'
27--- Docky/Docky/ConfigurationWindow.cs 2011-03-14 17:56:02 +0000
28+++ Docky/Docky/ConfigurationWindow.cs 2013-05-12 20:20:34 +0000
29@@ -2,6 +2,7 @@
30 // Copyright (C) 2009 Jason Smith, Robert Dyer
31 // Copyright (C) 2010 Chris Szikszoy
32 // Copyright (C) 2011 Robert Dyer
33+// Copyright (C) 2013 Rico Tzschichholz
34 //
35 // This program is free software: you can redistribute it and/or modify
36 // it under the terms of the GNU General Public License as published by
37@@ -27,8 +28,8 @@
38 using Cairo;
39 using Gdk;
40 using GLib;
41-using Gnome;
42 using Gtk;
43+using KeyFile;
44 using Mono.Unix;
45
46 using Docky.Interface;
47@@ -508,34 +509,34 @@
48 }
49
50 const string AutoStartKey = "Hidden";
51- DesktopItem autostart_item;
52+ const string DesktopGroup = "Desktop Entry";
53+ GKeyFile autostart_keyfile;
54 bool AutoStart
55 {
56 get {
57- if (autostart_item == null) {
58+ if (autostart_keyfile == null) {
59
60 GLib.File autostart_file = DockServices.Paths.AutoStartFile;
61
62 try {
63- autostart_item = DesktopItem.NewFromFile (autostart_file.Path, DesktopItemLoadFlags.NoTranslations);
64- if (autostart_item.AttrExists (AutoStartKey))
65- return !String.Equals (autostart_item.GetString (AutoStartKey), "true", StringComparison.OrdinalIgnoreCase);
66+ autostart_keyfile = new GKeyFile (autostart_file.Path, KeyFile.Flags.None);
67+ if (autostart_keyfile.HasKey (DesktopGroup, AutoStartKey))
68+ return !String.Equals (autostart_keyfile.GetString (DesktopGroup, AutoStartKey), "true", StringComparison.OrdinalIgnoreCase);
69
70 } catch (GLib.GException loadException) {
71- Log<ConfigurationWindow>.Info ("Unable to load existing autostart file: {0}", loadException.Message);
72+ Log<ConfigurationWindow>.Info ("Unable to load existing autostart file: {0}", loadException.Message);
73 Log<SystemService>.Error ("Could not open autostart file {0}", autostart_file.Path);
74
75 GLib.File desktop_file = DesktopFile;
76
77 if (desktop_file.Exists) {
78 Log<ConfigurationWindow>.Info ("Writing new autostart file to {0}", autostart_file.Path);
79- autostart_item = DesktopItem.NewFromFile (desktop_file.Path, DesktopItemLoadFlags.NoTranslations);
80+ autostart_keyfile = new GKeyFile (desktop_file.Path, KeyFile.Flags.None);
81 try {
82 if (!autostart_file.Parent.Exists)
83- autostart_file.Parent.MakeDirectoryWithParents (null);
84+ autostart_file.Parent.MakeDirectoryWithParents (null);
85
86- autostart_item.Save (autostart_file.StringUri (), true);
87- autostart_item.Location = autostart_file.StringUri ();
88+ autostart_keyfile.Save (autostart_file.Path);
89 return true;
90
91 } catch (Exception e) {
92@@ -545,16 +546,20 @@
93 return false;
94 }
95 }
96- if (autostart_item.AttrExists (AutoStartKey))
97- return !String.Equals (autostart_item.GetString (AutoStartKey), "true", StringComparison.OrdinalIgnoreCase);
98+ if (autostart_keyfile.HasKey (DesktopGroup, AutoStartKey))
99+ return !String.Equals (autostart_keyfile.GetString (DesktopGroup, AutoStartKey), "true", StringComparison.OrdinalIgnoreCase);
100 else
101 return true;
102 }
103 set {
104- if (autostart_item != null) {
105- autostart_item.SetBoolean (AutoStartKey, !value);
106+ if (autostart_keyfile != null) {
107+ autostart_keyfile.SetBoolean (DesktopGroup, AutoStartKey, !value);
108 try {
109- autostart_item.Save (null, true);
110+ GLib.File autostart_file = DockServices.Paths.AutoStartFile;
111+ if (!autostart_file.Parent.Exists)
112+ autostart_file.Parent.MakeDirectoryWithParents (null);
113+
114+ autostart_keyfile.Save (autostart_file.Path);
115 } catch (Exception e) {
116 Log<SystemService>.Error ("Failed to update autostart file: {0}", e.Message);
117 }
118
119=== modified file 'Docky/Makefile.am'
120--- Docky/Makefile.am 2010-12-01 21:43:00 +0000
121+++ Docky/Makefile.am 2013-05-12 20:20:34 +0000
122@@ -69,7 +69,7 @@
123 $(GIO_SHARP_LIBS) \
124 $(GLIB_SHARP_20_LIBS) \
125 $(GTK_SHARP_20_LIBS) \
126- $(GNOME_DESKTOP_SHARP_20_LIBS) \
127+ $(GKEYFILE_SHARP_LIBS) \
128 $(WNCK_SHARP_10_LIBS) \
129 $(LIBRSVG_SHARP_LIBS) \
130 $(NOTIFY_SHARP_LIBS) \
131
132=== modified file 'Docky/gtk-gui/gui.stetic'
133--- Docky/gtk-gui/gui.stetic 2011-12-22 15:47:35 +0000
134+++ Docky/gtk-gui/gui.stetic 2013-05-12 20:20:34 +0000
135@@ -5,12 +5,8 @@
136 <target-gtk-version>2.12</target-gtk-version>
137 </configuration>
138 <import>
139+ <widget-library name="notify-sharp, Version=0.4.0.0, Culture=neutral, PublicKeyToken=2df29c54e245917a" />
140 <widget-library name="wnck-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
141- <widget-library name="gnomedesktop-sharp, Version=2.20.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
142- <widget-library name="../../Docky.Services/bin/Debug/Docky.Services.dll" />
143- <widget-library name="../../Docky.Items/bin/Debug/Docky.Items.dll" />
144- <widget-library name="../../Docky.DBus/bin/Debug/Docky.DBus.dll" />
145- <widget-library name="../../Docky.Widgets/bin/Debug/Docky.Widgets.dll" />
146 <widget-library name="../bin/Debug/Docky.exe" internal="true" />
147 </import>
148 <widget class="Gtk.Bin" id="Docky.Interface.DockPreferences" design-size="500 356">
149@@ -309,7 +305,7 @@
150 </widget>
151 </child>
152 </widget>
153- <widget class="Gtk.Window" id="Docky.ConfigurationWindow" design-size="380 390">
154+ <widget class="Gtk.Window" id="Docky.ConfigurationWindow" design-size="398 390">
155 <property name="MemberName" />
156 <property name="Title" translatable="yes">Docky Settings</property>
157 <property name="Icon">stock:gtk-preferences Menu</property>
158
159=== modified file 'configure.ac'
160--- configure.ac 2013-05-02 11:41:59 +0000
161+++ configure.ac 2013-05-12 20:20:34 +0000
162@@ -82,7 +82,7 @@
163 done
164 AC_SUBST([GIO_SHARP_ASSEMBLIES])
165
166-PKG_CHECK_MODULES([GNOME_DESKTOP_SHARP_20], [gnome-desktop-sharp-2.0])
167+PKG_CHECK_MODULES([GKEYFILE_SHARP], [gkeyfile-sharp])
168 PKG_CHECK_MODULES([GNOME_KEYRING_SHARP], [gnome-keyring-sharp-1.0])
169 PKG_CHECK_MODULES([GTK_SHARP_20], [gtk-sharp-2.0])
170 PKG_CHECK_MODULES([LIBRSVG_SHARP], [rsvg2-sharp-2.0])
171@@ -103,7 +103,7 @@
172 AC_SUBST([GCONF_SHARP_20_LIBS])
173 AC_SUBST([GLIB_SHARP_20_LIBS])
174 AC_SUBST([GIO_SHARP_LIBS])
175-AC_SUBST([GNOME_DESKTOP_SHARP_20_LIBS])
176+AC_SUBST([GKEYFILE_SHARP_LIBS])
177 AC_SUBST([GNOME_KEYRING_SHARP_LIBS])
178 AC_SUBST([GTK_SHARP_20_LIBS])
179 AC_SUBST([LIBRSVG_SHARP_LIBS])

Subscribers

People subscribed via source and target branches

to status/vote changes: