Merge lp:~jeremywootten/pantheon-files/dropbox-plugin-reformat-for-loki into lp:~elementary-apps/pantheon-files/pantheon-files-plugin-dropbox
- dropbox-plugin-reformat-for-loki
- Merge into pantheon-files-plugin-dropbox
Proposed by
Jeremy Wootten
Status: | Merged |
---|---|
Approved by: | Zisu Andrei |
Approved revision: | 24 |
Merged at revision: | 23 |
Proposed branch: | lp:~jeremywootten/pantheon-files/dropbox-plugin-reformat-for-loki |
Merge into: | lp:~elementary-apps/pantheon-files/pantheon-files-plugin-dropbox |
Diff against target: |
760 lines (+155/-153) 15 files modified
CMakeLists.txt (+2/-1) async-io-coroutine.h (+26/-26) cmake/ParseArguments.cmake (+3/-3) cmake/README (+1/-1) config.h.cmake (+1/-0) debian/copyright (+3/-3) debian/rules (+2/-2) dropbox-client-util.c (+8/-8) dropbox-client.c (+29/-29) dropbox-client.h (+6/-6) dropbox-command-client.c (+37/-37) dropbox-command-client.h (+12/-12) dropbox-hooks.c (+1/-1) plugin.c (+17/-17) plugin.h (+7/-7) |
To merge this branch: | bzr merge lp:~jeremywootten/pantheon-files/dropbox-plugin-reformat-for-loki |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zisu Andrei (community) | Approve | ||
Review via email: mp+298093@code.launchpad.net |
Commit message
Whitespace fixes for dropbox plugin
Description of the change
This branch just makes format changes:
1) Tabs are replaced by spaces
2) Trailing spaces are removed.
This is to prepare for updating the code for Loki.
To post a comment you must log in.
- 24. By Jeremy Wootten
-
Align continuation line endings
Revision history for this message
Zisu Andrei (matzipan) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2012-07-29 14:31:30 +0000 | |||
3 | +++ CMakeLists.txt 2016-06-24 12:31:45 +0000 | |||
4 | @@ -18,7 +18,7 @@ | |||
5 | 18 | marlincore | 18 | marlincore |
6 | 19 | ) | 19 | ) |
7 | 20 | set(CFLAGS | 20 | set(CFLAGS |
9 | 21 | ${DROPBOX_CFLAGS} ${DROPBOX_CFLAGS_OTHER} | 21 | ${DROPBOX_CFLAGS} ${DROPBOX_CFLAGS_OTHER} |
10 | 22 | ) | 22 | ) |
11 | 23 | include_directories(${CMAKE_BINARY_DIR}) | 23 | include_directories(${CMAKE_BINARY_DIR}) |
12 | 24 | include_directories(${CMAKE_SOURCE_DIR}/libcore/) | 24 | include_directories(${CMAKE_SOURCE_DIR}/libcore/) |
13 | @@ -29,3 +29,4 @@ | |||
14 | 29 | plugin.c dropbox-client-util.c dropbox-command-client.c dropbox-client.c dropbox-hooks.c) | 29 | plugin.c dropbox-client-util.c dropbox-command-client.c dropbox-client.c dropbox-hooks.c) |
15 | 30 | target_link_libraries(marlin-dropbox marlincore marlinwidgets ${DROPBOX_LIBRARIES}) | 30 | target_link_libraries(marlin-dropbox marlincore marlinwidgets ${DROPBOX_LIBRARIES}) |
16 | 31 | install(TARGETS marlin-dropbox DESTINATION lib/pantheon-files/plugins/) | 31 | install(TARGETS marlin-dropbox DESTINATION lib/pantheon-files/plugins/) |
17 | 32 | |||
18 | 32 | 33 | ||
19 | === modified file 'async-io-coroutine.h' | |||
20 | --- async-io-coroutine.h 2011-10-05 04:35:08 +0000 | |||
21 | +++ async-io-coroutine.h 2016-06-24 12:31:45 +0000 | |||
22 | @@ -31,33 +31,33 @@ | |||
23 | 31 | #define CRBEGIN(pos) switch (pos) { case 0: | 31 | #define CRBEGIN(pos) switch (pos) { case 0: |
24 | 32 | #define CREND } return FALSE | 32 | #define CREND } return FALSE |
25 | 33 | #define CRYIELD(pos) do { pos = __LINE__; return TRUE; case __LINE__:;} while (0) | 33 | #define CRYIELD(pos) do { pos = __LINE__; return TRUE; case __LINE__:;} while (0) |
27 | 34 | #define CRHALT return FALSE | 34 | #define CRHALT return FALSE |
28 | 35 | 35 | ||
54 | 36 | #define CRREADLINE(pos, chan, where) \ | 36 | #define CRREADLINE(pos, chan, where) \ |
55 | 37 | while (1) { \ | 37 | while (1) { \ |
56 | 38 | gchar *__line; \ | 38 | gchar *__line; \ |
57 | 39 | gsize __line_length, __newline_pos; \ | 39 | gsize __line_length, __newline_pos; \ |
58 | 40 | GIOStatus __iostat; \ | 40 | GIOStatus __iostat; \ |
59 | 41 | \ | 41 | \ |
60 | 42 | __iostat = g_io_channel_read_line(chan, &__line, \ | 42 | __iostat = g_io_channel_read_line(chan, &__line, \ |
61 | 43 | &__line_length, \ | 43 | &__line_length, \ |
62 | 44 | &__newline_pos, NULL); \ | 44 | &__newline_pos, NULL); \ |
63 | 45 | if (__iostat == G_IO_STATUS_AGAIN) { \ | 45 | if (__iostat == G_IO_STATUS_AGAIN) { \ |
64 | 46 | CRYIELD(pos); \ | 46 | CRYIELD(pos); \ |
65 | 47 | } \ | 47 | } \ |
66 | 48 | else if (__iostat == G_IO_STATUS_NORMAL) { \ | 48 | else if (__iostat == G_IO_STATUS_NORMAL) { \ |
67 | 49 | *(__line + __newline_pos) = '\0'; \ | 49 | *(__line + __newline_pos) = '\0'; \ |
68 | 50 | where = __line; \ | 50 | where = __line; \ |
69 | 51 | break; \ | 51 | break; \ |
70 | 52 | } \ | 52 | } \ |
71 | 53 | else if (__iostat == G_IO_STATUS_EOF || \ | 53 | else if (__iostat == G_IO_STATUS_EOF || \ |
72 | 54 | __iostat == G_IO_STATUS_ERROR) { \ | 54 | __iostat == G_IO_STATUS_ERROR) { \ |
73 | 55 | CRHALT; \ | 55 | CRHALT; \ |
74 | 56 | } \ | 56 | } \ |
75 | 57 | else { \ | 57 | else { \ |
76 | 58 | g_assert_not_reached(); \ | 58 | g_assert_not_reached(); \ |
77 | 59 | CRHALT; \ | 59 | CRHALT; \ |
78 | 60 | } \ | 60 | } \ |
79 | 61 | } | 61 | } |
80 | 62 | 62 | ||
81 | 63 | G_END_DECLS | 63 | G_END_DECLS |
82 | 64 | 64 | ||
83 | === modified file 'cmake/ParseArguments.cmake' | |||
84 | --- cmake/ParseArguments.cmake 2011-10-04 09:11:24 +0000 | |||
85 | +++ cmake/ParseArguments.cmake 2016-06-24 12:31:45 +0000 | |||
86 | @@ -1,6 +1,6 @@ | |||
87 | 1 | ## | 1 | ## |
88 | 2 | # This is a helper Macro to parse optional arguments in Macros/Functions | 2 | # This is a helper Macro to parse optional arguments in Macros/Functions |
90 | 3 | # It has been taken from the public CMake wiki. | 3 | # It has been taken from the public CMake wiki. |
91 | 4 | # See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and | 4 | # See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and |
92 | 5 | # licensing. | 5 | # licensing. |
93 | 6 | ## | 6 | ## |
94 | @@ -26,9 +26,9 @@ | |||
95 | 26 | set(loption_names ${option_names}) | 26 | set(loption_names ${option_names}) |
96 | 27 | list(FIND loption_names "${arg}" is_option) | 27 | list(FIND loption_names "${arg}" is_option) |
97 | 28 | if(is_option GREATER -1) | 28 | if(is_option GREATER -1) |
99 | 29 | set(${prefix}_${arg} TRUE) | 29 | set(${prefix}_${arg} TRUE) |
100 | 30 | else(is_option GREATER -1) | 30 | else(is_option GREATER -1) |
102 | 31 | set(current_arg_list ${current_arg_list} ${arg}) | 31 | set(current_arg_list ${current_arg_list} ${arg}) |
103 | 32 | endif(is_option GREATER -1) | 32 | endif(is_option GREATER -1) |
104 | 33 | endif(is_arg_name GREATER -1) | 33 | endif(is_arg_name GREATER -1) |
105 | 34 | endforeach(arg) | 34 | endforeach(arg) |
106 | 35 | 35 | ||
107 | === modified file 'cmake/README' | |||
108 | --- cmake/README 2011-10-04 09:11:24 +0000 | |||
109 | +++ cmake/README 2016-06-24 12:31:45 +0000 | |||
110 | @@ -2,7 +2,7 @@ | |||
111 | 2 | 2 | ||
112 | 3 | This is a set of CMake modules: Translations, GSettings, and Vala modules. | 3 | This is a set of CMake modules: Translations, GSettings, and Vala modules. |
113 | 4 | 4 | ||
115 | 5 | For all the Vala related modules see README.Vala.rst: | 5 | For all the Vala related modules see README.Vala.rst: |
116 | 6 | - ParseArguments.cmake | 6 | - ParseArguments.cmake |
117 | 7 | - ValaPrecompile.cmake | 7 | - ValaPrecompile.cmake |
118 | 8 | - ValaVersion.cmake | 8 | - ValaVersion.cmake |
119 | 9 | 9 | ||
120 | === modified file 'config.h.cmake' | |||
121 | --- config.h.cmake 2011-10-04 09:11:24 +0000 | |||
122 | +++ config.h.cmake 2016-06-24 12:31:45 +0000 | |||
123 | @@ -6,3 +6,4 @@ | |||
124 | 6 | #cmakedefine VERSION "@VERSION@" | 6 | #cmakedefine VERSION "@VERSION@" |
125 | 7 | 7 | ||
126 | 8 | #endif | 8 | #endif |
127 | 9 | |||
128 | 9 | 10 | ||
129 | === modified file 'debian/copyright' | |||
130 | --- debian/copyright 2013-05-17 19:09:51 +0000 | |||
131 | +++ debian/copyright 2016-06-24 12:31:45 +0000 | |||
132 | @@ -2,11 +2,11 @@ | |||
133 | 2 | Thu, 06 Oct 2011 09:17:32 +0200 | 2 | Thu, 06 Oct 2011 09:17:32 +0200 |
134 | 3 | 3 | ||
135 | 4 | Upstream Authors: | 4 | Upstream Authors: |
137 | 5 | ammonkey <am.monkeyd@gmail.com> | 5 | ammonkey <am.monkeyd@gmail.com> |
138 | 6 | 6 | ||
139 | 7 | Copyright: | 7 | Copyright: |
142 | 8 | © 2008, Evenflow, Inc. | 8 | © 2008, Evenflow, Inc. |
143 | 9 | © 2011 Marlin Devs | 9 | © 2011 Marlin Devs |
144 | 10 | 10 | ||
145 | 11 | License: GPL-3 | 11 | License: GPL-3 |
146 | 12 | Marlin - The sexiest fish in the large sea of file-browsers. | 12 | Marlin - The sexiest fish in the large sea of file-browsers. |
147 | 13 | 13 | ||
148 | === modified file 'debian/rules' | |||
149 | --- debian/rules 2011-10-06 07:22:51 +0000 | |||
150 | +++ debian/rules 2016-06-24 12:31:45 +0000 | |||
151 | @@ -10,7 +10,7 @@ | |||
152 | 10 | #export DH_VERBOSE=1 | 10 | #export DH_VERBOSE=1 |
153 | 11 | 11 | ||
154 | 12 | %: | 12 | %: |
156 | 13 | dh $@ | 13 | dh $@ |
157 | 14 | 14 | ||
158 | 15 | override_dh_builddeb: | 15 | override_dh_builddeb: |
160 | 16 | dh_builddeb -- -Zxz | 16 | dh_builddeb -- -Zxz |
161 | 17 | 17 | ||
162 | === modified file 'dropbox-client-util.c' | |||
163 | --- dropbox-client-util.c 2011-10-05 04:35:08 +0000 | |||
164 | +++ dropbox-client-util.c 2016-06-24 12:31:45 +0000 | |||
165 | @@ -58,27 +58,27 @@ | |||
166 | 58 | gchar **argval; | 58 | gchar **argval; |
167 | 59 | guint len; | 59 | guint len; |
168 | 60 | gboolean retval; | 60 | gboolean retval; |
170 | 61 | 61 | ||
171 | 62 | argval = g_strsplit(line, "\t", 0); | 62 | argval = g_strsplit(line, "\t", 0); |
172 | 63 | len = g_strv_length(argval); | 63 | len = g_strv_length(argval); |
173 | 64 | 64 | ||
174 | 65 | /* debug("parsed: (%d) %s", len, line); */ | 65 | /* debug("parsed: (%d) %s", len, line); */ |
176 | 66 | 66 | ||
177 | 67 | if (len > 1) { | 67 | if (len > 1) { |
178 | 68 | int i; | 68 | int i; |
179 | 69 | gchar **vals; | 69 | gchar **vals; |
181 | 70 | 70 | ||
182 | 71 | vals = g_new(gchar *, len); | 71 | vals = g_new(gchar *, len); |
183 | 72 | vals[len - 1] = NULL; | 72 | vals[len - 1] = NULL; |
185 | 73 | 73 | ||
186 | 74 | for (i = 1; argval[i] != NULL; i++) { | 74 | for (i = 1; argval[i] != NULL; i++) { |
187 | 75 | vals[i-1] = dropbox_client_util_desanitize(argval[i]); | 75 | vals[i-1] = dropbox_client_util_desanitize(argval[i]); |
189 | 76 | 76 | ||
190 | 77 | } | 77 | } |
192 | 78 | 78 | ||
193 | 79 | g_hash_table_insert(return_table, | 79 | g_hash_table_insert(return_table, |
196 | 80 | dropbox_client_util_desanitize(argval[0]), | 80 | dropbox_client_util_desanitize(argval[0]), |
197 | 81 | vals); | 81 | vals); |
198 | 82 | retval = TRUE; | 82 | retval = TRUE; |
199 | 83 | } | 83 | } |
200 | 84 | else { | 84 | else { |
201 | 85 | 85 | ||
202 | === modified file 'dropbox-client.c' | |||
203 | --- dropbox-client.c 2011-10-05 04:35:08 +0000 | |||
204 | +++ dropbox-client.c 2016-06-24 12:31:45 +0000 | |||
205 | @@ -30,7 +30,7 @@ | |||
206 | 30 | static void | 30 | static void |
207 | 31 | hook_on_connect(DropboxClient *dc) { | 31 | hook_on_connect(DropboxClient *dc) { |
208 | 32 | dc->hook_connect_called = TRUE; | 32 | dc->hook_connect_called = TRUE; |
210 | 33 | 33 | ||
211 | 34 | if (dc->command_connect_called) { | 34 | if (dc->command_connect_called) { |
212 | 35 | debug("client connection"); | 35 | debug("client connection"); |
213 | 36 | g_hook_list_invoke(&(dc->onconnect_hooklist), FALSE); | 36 | g_hook_list_invoke(&(dc->onconnect_hooklist), FALSE); |
214 | @@ -42,7 +42,7 @@ | |||
215 | 42 | static void | 42 | static void |
216 | 43 | command_on_connect(DropboxClient *dc) { | 43 | command_on_connect(DropboxClient *dc) { |
217 | 44 | dc->command_connect_called = TRUE; | 44 | dc->command_connect_called = TRUE; |
219 | 45 | 45 | ||
220 | 46 | if (dc->hook_connect_called) { | 46 | if (dc->hook_connect_called) { |
221 | 47 | debug("client connection"); | 47 | debug("client connection"); |
222 | 48 | g_hook_list_invoke(&(dc->onconnect_hooklist), FALSE); | 48 | g_hook_list_invoke(&(dc->onconnect_hooklist), FALSE); |
223 | @@ -54,7 +54,7 @@ | |||
224 | 54 | static void | 54 | static void |
225 | 55 | command_on_disconnect(DropboxClient *dc) { | 55 | command_on_disconnect(DropboxClient *dc) { |
226 | 56 | dc->command_disconnect_called = TRUE; | 56 | dc->command_disconnect_called = TRUE; |
228 | 57 | 57 | ||
229 | 58 | if (dc->hook_disconnect_called) { | 58 | if (dc->hook_disconnect_called) { |
230 | 59 | debug("client disconnect"); | 59 | debug("client disconnect"); |
231 | 60 | g_hook_list_invoke(&(dc->ondisconnect_hooklist), FALSE); | 60 | g_hook_list_invoke(&(dc->ondisconnect_hooklist), FALSE); |
232 | @@ -69,7 +69,7 @@ | |||
233 | 69 | static void | 69 | static void |
234 | 70 | hook_on_disconnect(DropboxClient *dc) { | 70 | hook_on_disconnect(DropboxClient *dc) { |
235 | 71 | dc->hook_disconnect_called = TRUE; | 71 | dc->hook_disconnect_called = TRUE; |
237 | 72 | 72 | ||
238 | 73 | if (dc->command_disconnect_called) { | 73 | if (dc->command_disconnect_called) { |
239 | 74 | debug("client disconnect"); | 74 | debug("client disconnect"); |
240 | 75 | g_hook_list_invoke(&(dc->ondisconnect_hooklist), FALSE); | 75 | g_hook_list_invoke(&(dc->ondisconnect_hooklist), FALSE); |
241 | @@ -84,7 +84,7 @@ | |||
242 | 84 | gboolean | 84 | gboolean |
243 | 85 | dropbox_client_is_connected(DropboxClient *dc) { | 85 | dropbox_client_is_connected(DropboxClient *dc) { |
244 | 86 | return (dropbox_command_client_is_connected(&(dc->dcc)) && | 86 | return (dropbox_command_client_is_connected(&(dc->dcc)) && |
246 | 87 | marlin_dropbox_hooks_is_connected(&(dc->hookserv))); | 87 | marlin_dropbox_hooks_is_connected(&(dc->hookserv))); |
247 | 88 | } | 88 | } |
248 | 89 | 89 | ||
249 | 90 | void | 90 | void |
250 | @@ -108,60 +108,60 @@ | |||
251 | 108 | dc->hook_disconnect_called = dc->command_disconnect_called = FALSE; | 108 | dc->hook_disconnect_called = dc->command_disconnect_called = FALSE; |
252 | 109 | dc->hook_connect_called = dc->command_connect_called = FALSE; | 109 | dc->hook_connect_called = dc->command_connect_called = FALSE; |
253 | 110 | 110 | ||
258 | 111 | marlin_dropbox_hooks_add_on_connect_hook(&(dc->hookserv), | 111 | marlin_dropbox_hooks_add_on_connect_hook(&(dc->hookserv), |
259 | 112 | (DropboxHookClientConnectHook) | 112 | (DropboxHookClientConnectHook) |
260 | 113 | hook_on_connect, dc); | 113 | hook_on_connect, dc); |
261 | 114 | 114 | ||
262 | 115 | dropbox_command_client_add_on_connect_hook(&(dc->dcc), | 115 | dropbox_command_client_add_on_connect_hook(&(dc->dcc), |
270 | 116 | (DropboxCommandClientConnectHook) | 116 | (DropboxCommandClientConnectHook) |
271 | 117 | command_on_connect, dc); | 117 | command_on_connect, dc); |
272 | 118 | 118 | ||
273 | 119 | marlin_dropbox_hooks_add_on_disconnect_hook(&(dc->hookserv), | 119 | marlin_dropbox_hooks_add_on_disconnect_hook(&(dc->hookserv), |
274 | 120 | (DropboxHookClientConnectHook) | 120 | (DropboxHookClientConnectHook) |
275 | 121 | hook_on_disconnect, dc); | 121 | hook_on_disconnect, dc); |
276 | 122 | 122 | ||
277 | 123 | dropbox_command_client_add_on_disconnect_hook(&(dc->dcc), | 123 | dropbox_command_client_add_on_disconnect_hook(&(dc->dcc), |
280 | 124 | (DropboxCommandClientConnectHook) | 124 | (DropboxCommandClientConnectHook) |
281 | 125 | command_on_disconnect, dc); | 125 | command_on_disconnect, dc); |
282 | 126 | } | 126 | } |
283 | 127 | 127 | ||
284 | 128 | /* not thread safe */ | 128 | /* not thread safe */ |
285 | 129 | void | 129 | void |
286 | 130 | dropbox_client_add_on_disconnect_hook(DropboxClient *dc, | 130 | dropbox_client_add_on_disconnect_hook(DropboxClient *dc, |
289 | 131 | DropboxClientConnectHook dhcch, | 131 | DropboxClientConnectHook dhcch, |
290 | 132 | gpointer ud) { | 132 | gpointer ud) { |
291 | 133 | GHook *newhook; | 133 | GHook *newhook; |
293 | 134 | 134 | ||
294 | 135 | newhook = g_hook_alloc(&(dc->ondisconnect_hooklist)); | 135 | newhook = g_hook_alloc(&(dc->ondisconnect_hooklist)); |
295 | 136 | newhook->func = dhcch; | 136 | newhook->func = dhcch; |
296 | 137 | newhook->data = ud; | 137 | newhook->data = ud; |
298 | 138 | 138 | ||
299 | 139 | g_hook_append(&(dc->ondisconnect_hooklist), newhook); | 139 | g_hook_append(&(dc->ondisconnect_hooklist), newhook); |
300 | 140 | } | 140 | } |
301 | 141 | 141 | ||
302 | 142 | /* not thread safe */ | 142 | /* not thread safe */ |
303 | 143 | void | 143 | void |
304 | 144 | dropbox_client_add_on_connect_hook(DropboxClient *dc, | 144 | dropbox_client_add_on_connect_hook(DropboxClient *dc, |
307 | 145 | DropboxClientConnectHook dhcch, | 145 | DropboxClientConnectHook dhcch, |
308 | 146 | gpointer ud) { | 146 | gpointer ud) { |
309 | 147 | GHook *newhook; | 147 | GHook *newhook; |
311 | 148 | 148 | ||
312 | 149 | newhook = g_hook_alloc(&(dc->onconnect_hooklist)); | 149 | newhook = g_hook_alloc(&(dc->onconnect_hooklist)); |
313 | 150 | newhook->func = dhcch; | 150 | newhook->func = dhcch; |
314 | 151 | newhook->data = ud; | 151 | newhook->data = ud; |
316 | 152 | 152 | ||
317 | 153 | g_hook_append(&(dc->onconnect_hooklist), newhook); | 153 | g_hook_append(&(dc->onconnect_hooklist), newhook); |
318 | 154 | } | 154 | } |
319 | 155 | 155 | ||
320 | 156 | /* not thread safe */ | 156 | /* not thread safe */ |
321 | 157 | void | 157 | void |
322 | 158 | dropbox_client_add_connection_attempt_hook(DropboxClient *dc, | 158 | dropbox_client_add_connection_attempt_hook(DropboxClient *dc, |
325 | 159 | DropboxClientConnectionAttemptHook dhcch, | 159 | DropboxClientConnectionAttemptHook dhcch, |
326 | 160 | gpointer ud) { | 160 | gpointer ud) { |
327 | 161 | debug("shouldn't be here..."); | 161 | debug("shouldn't be here..."); |
328 | 162 | 162 | ||
329 | 163 | dropbox_command_client_add_connection_attempt_hook(&(dc->dcc), | 163 | dropbox_command_client_add_connection_attempt_hook(&(dc->dcc), |
331 | 164 | dhcch, ud); | 164 | dhcch, ud); |
332 | 165 | } | 165 | } |
333 | 166 | 166 | ||
334 | 167 | /* should only be called once on initialization */ | 167 | /* should only be called once on initialization */ |
335 | 168 | 168 | ||
336 | === modified file 'dropbox-client.h' | |||
337 | --- dropbox-client.h 2011-10-05 04:35:08 +0000 | |||
338 | +++ dropbox-client.h 2016-06-24 12:31:45 +0000 | |||
339 | @@ -58,18 +58,18 @@ | |||
340 | 58 | 58 | ||
341 | 59 | void | 59 | void |
342 | 60 | dropbox_client_add_on_connect_hook(DropboxClient *dc, | 60 | dropbox_client_add_on_connect_hook(DropboxClient *dc, |
345 | 61 | DropboxClientConnectHook dhcch, | 61 | DropboxClientConnectHook dhcch, |
346 | 62 | gpointer ud); | 62 | gpointer ud); |
347 | 63 | 63 | ||
348 | 64 | void | 64 | void |
349 | 65 | dropbox_client_add_on_disconnect_hook(DropboxClient *dc, | 65 | dropbox_client_add_on_disconnect_hook(DropboxClient *dc, |
352 | 66 | DropboxClientConnectHook dhcch, | 66 | DropboxClientConnectHook dhcch, |
353 | 67 | gpointer ud); | 67 | gpointer ud); |
354 | 68 | 68 | ||
355 | 69 | void | 69 | void |
356 | 70 | dropbox_client_add_connection_attempt_hook(DropboxClient *dc, | 70 | dropbox_client_add_connection_attempt_hook(DropboxClient *dc, |
359 | 71 | DropboxClientConnectionAttemptHook dhcch, | 71 | DropboxClientConnectionAttemptHook dhcch, |
360 | 72 | gpointer ud); | 72 | gpointer ud); |
361 | 73 | 73 | ||
362 | 74 | G_END_DECLS | 74 | G_END_DECLS |
363 | 75 | 75 | ||
364 | 76 | 76 | ||
365 | === modified file 'dropbox-command-client.c' | |||
366 | --- dropbox-command-client.c 2011-10-06 01:09:50 +0000 | |||
367 | +++ dropbox-command-client.c 2016-06-24 12:31:45 +0000 | |||
368 | @@ -162,7 +162,7 @@ | |||
369 | 162 | 162 | ||
370 | 163 | static GList *my_g_hash_table_get_keys(GHashTable *ght) { | 163 | static GList *my_g_hash_table_get_keys(GHashTable *ght) { |
371 | 164 | GList *list = NULL; | 164 | GList *list = NULL; |
373 | 165 | g_hash_table_foreach(ght, (GHFunc) | 165 | g_hash_table_foreach(ght, (GHFunc) |
374 | 166 | my_g_hash_table_get_keys_helper, &list); | 166 | my_g_hash_table_get_keys_helper, &list); |
375 | 167 | return list; | 167 | return list; |
376 | 168 | } | 168 | } |
377 | @@ -187,31 +187,31 @@ | |||
378 | 187 | g_assert(command_name != NULL); | 187 | g_assert(command_name != NULL); |
379 | 188 | 188 | ||
380 | 189 | 189 | ||
394 | 190 | #define WRITE_OR_DIE_SANI(s,l) { \ | 190 | #define WRITE_OR_DIE_SANI(s,l) { \ |
395 | 191 | gchar *sani_s; \ | 191 | gchar *sani_s; \ |
396 | 192 | sani_s = dropbox_client_util_sanitize(s); \ | 192 | sani_s = dropbox_client_util_sanitize(s); \ |
397 | 193 | iostat = g_io_channel_write_chars(chan, sani_s,l, &bytes_trans, \ | 193 | iostat = g_io_channel_write_chars(chan, sani_s,l, &bytes_trans, \ |
398 | 194 | &tmp_error); \ | 194 | &tmp_error); \ |
399 | 195 | g_free(sani_s); \ | 195 | g_free(sani_s); \ |
400 | 196 | if (iostat == G_IO_STATUS_ERROR || \ | 196 | if (iostat == G_IO_STATUS_ERROR || \ |
401 | 197 | iostat == G_IO_STATUS_AGAIN) { \ | 197 | iostat == G_IO_STATUS_AGAIN) { \ |
402 | 198 | if (tmp_error != NULL) { \ | 198 | if (tmp_error != NULL) { \ |
403 | 199 | g_propagate_error(err, tmp_error); \ | 199 | g_propagate_error(err, tmp_error); \ |
404 | 200 | } \ | 200 | } \ |
405 | 201 | return NULL; \ | 201 | return NULL; \ |
406 | 202 | } \ | 202 | } \ |
407 | 203 | } | 203 | } |
408 | 204 | 204 | ||
419 | 205 | #define WRITE_OR_DIE(s,l) { \ | 205 | #define WRITE_OR_DIE(s,l) { \ |
420 | 206 | iostat = g_io_channel_write_chars(chan, s,l, &bytes_trans, \ | 206 | iostat = g_io_channel_write_chars(chan, s,l, &bytes_trans, \ |
421 | 207 | &tmp_error); \ | 207 | &tmp_error); \ |
422 | 208 | if (iostat == G_IO_STATUS_ERROR || \ | 208 | if (iostat == G_IO_STATUS_ERROR || \ |
423 | 209 | iostat == G_IO_STATUS_AGAIN) { \ | 209 | iostat == G_IO_STATUS_AGAIN) { \ |
424 | 210 | if (tmp_error != NULL) { \ | 210 | if (tmp_error != NULL) { \ |
425 | 211 | g_propagate_error(err, tmp_error); \ | 211 | g_propagate_error(err, tmp_error); \ |
426 | 212 | } \ | 212 | } \ |
427 | 213 | return NULL; \ | 213 | return NULL; \ |
428 | 214 | } \ | 214 | } \ |
429 | 215 | } | 215 | } |
430 | 216 | 216 | ||
431 | 217 | /* send command to server */ | 217 | /* send command to server */ |
432 | @@ -281,7 +281,7 @@ | |||
433 | 281 | 281 | ||
434 | 282 | /* if the response was okay */ | 282 | /* if the response was okay */ |
435 | 283 | if (strncmp(line, "ok\n", 3) == 0) { | 283 | if (strncmp(line, "ok\n", 3) == 0) { |
437 | 284 | GHashTable *return_table = | 284 | GHashTable *return_table = |
438 | 285 | g_hash_table_new_full((GHashFunc) g_str_hash, | 285 | g_hash_table_new_full((GHashFunc) g_str_hash, |
439 | 286 | (GEqualFunc) g_str_equal, | 286 | (GEqualFunc) g_str_equal, |
440 | 287 | (GDestroyNotify) g_free, | 287 | (GDestroyNotify) g_free, |
441 | @@ -502,7 +502,7 @@ | |||
442 | 502 | } | 502 | } |
443 | 503 | 503 | ||
444 | 504 | iostat = g_io_channel_read_chars(chan, fake_buf, | 504 | iostat = g_io_channel_read_chars(chan, fake_buf, |
446 | 505 | sizeof(fake_buf), | 505 | sizeof(fake_buf), |
447 | 506 | &bytes_read, &tmp_error); | 506 | &bytes_read, &tmp_error); |
448 | 507 | 507 | ||
449 | 508 | ret = g_io_channel_set_flags(chan, flags, NULL); | 508 | ret = g_io_channel_set_flags(chan, flags, NULL); |
450 | @@ -539,7 +539,7 @@ | |||
451 | 539 | finish_general_command(dgcr); | 539 | finish_general_command(dgcr); |
452 | 540 | } | 540 | } |
453 | 541 | break; | 541 | break; |
455 | 542 | default: | 542 | default: |
456 | 543 | g_assert_not_reached(); | 543 | g_assert_not_reached(); |
457 | 544 | break; | 544 | break; |
458 | 545 | } | 545 | } |
459 | @@ -613,13 +613,13 @@ | |||
460 | 613 | } | 613 | } |
461 | 614 | 614 | ||
462 | 615 | if (connect(sock, (struct sockaddr *) &addr, addr_len) < 0) { | 615 | if (connect(sock, (struct sockaddr *) &addr, addr_len) < 0) { |
464 | 616 | /* debug("couldn't connect to command server after 1 second"); */ | 616 | /* debug("couldn't connect to command server after 1 second"); */ |
465 | 617 | break; | 617 | break; |
466 | 618 | } | 618 | } |
467 | 619 | } | 619 | } |
468 | 620 | /* errno != EINPROGRESS */ | 620 | /* errno != EINPROGRESS */ |
469 | 621 | else { | 621 | else { |
471 | 622 | /* debug("bad connection"); */ | 622 | /* debug("bad connection"); */ |
472 | 623 | break; | 623 | break; |
473 | 624 | } | 624 | } |
474 | 625 | } | 625 | } |
475 | @@ -656,10 +656,10 @@ | |||
476 | 656 | g_io_channel_set_close_on_unref(chan, TRUE); | 656 | g_io_channel_set_close_on_unref(chan, TRUE); |
477 | 657 | g_io_channel_set_line_term(chan, "\n", -1); | 657 | g_io_channel_set_line_term(chan, "\n", -1); |
478 | 658 | 658 | ||
483 | 659 | #define SET_CONNECTED_STATE(s) { \ | 659 | #define SET_CONNECTED_STATE(s) { \ |
484 | 660 | g_mutex_lock(dcc->command_connected_mutex); \ | 660 | g_mutex_lock(dcc->command_connected_mutex); \ |
485 | 661 | dcc->command_connected = s; \ | 661 | dcc->command_connected = s; \ |
486 | 662 | g_mutex_unlock(dcc->command_connected_mutex); \ | 662 | g_mutex_unlock(dcc->command_connected_mutex); \ |
487 | 663 | } | 663 | } |
488 | 664 | 664 | ||
489 | 665 | SET_CONNECTED_STATE(TRUE); | 665 | SET_CONNECTED_STATE(TRUE); |
490 | @@ -703,7 +703,7 @@ | |||
491 | 703 | do_general_command(chan, (DropboxGeneralCommand *) dc, &gerr); | 703 | do_general_command(chan, (DropboxGeneralCommand *) dc, &gerr); |
492 | 704 | } | 704 | } |
493 | 705 | break; | 705 | break; |
495 | 706 | default: | 706 | default: |
496 | 707 | g_assert_not_reached(); | 707 | g_assert_not_reached(); |
497 | 708 | break; | 708 | break; |
498 | 709 | } | 709 | } |
499 | @@ -711,7 +711,7 @@ | |||
500 | 711 | debug("done."); | 711 | debug("done."); |
501 | 712 | 712 | ||
502 | 713 | if (gerr != NULL) { | 713 | if (gerr != NULL) { |
504 | 714 | // debug("COMMAND ERROR*****************************"); | 714 | // debug("COMMAND ERROR*****************************"); |
505 | 715 | /* mark this request as never to be completed */ | 715 | /* mark this request as never to be completed */ |
506 | 716 | end_request(dc); | 716 | end_request(dc); |
507 | 717 | 717 | ||
508 | @@ -831,7 +831,7 @@ | |||
509 | 831 | } | 831 | } |
510 | 832 | 832 | ||
511 | 833 | /* thread safe */ | 833 | /* thread safe */ |
513 | 834 | void dropbox_command_client_send_simple_command(DropboxCommandClient *dcc, | 834 | void dropbox_command_client_send_simple_command(DropboxCommandClient *dcc, |
514 | 835 | const char *command) { | 835 | const char *command) { |
515 | 836 | DropboxGeneralCommand *dgc; | 836 | DropboxGeneralCommand *dgc; |
516 | 837 | 837 | ||
517 | @@ -849,7 +849,7 @@ | |||
518 | 849 | /* thread safe */ | 849 | /* thread safe */ |
519 | 850 | /* this is the C API, there is another send_command_to_db | 850 | /* this is the C API, there is another send_command_to_db |
520 | 851 | that is more the actual over the wire command */ | 851 | that is more the actual over the wire command */ |
522 | 852 | void dropbox_command_client_send_command(DropboxCommandClient *dcc, | 852 | void dropbox_command_client_send_command(DropboxCommandClient *dcc, |
523 | 853 | MarlinDropboxCommandResponseHandler h, | 853 | MarlinDropboxCommandResponseHandler h, |
524 | 854 | gpointer ud, | 854 | gpointer ud, |
525 | 855 | const char *command, ...) { | 855 | const char *command, ...) { |
526 | 856 | 856 | ||
527 | === modified file 'dropbox-command-client.h' | |||
528 | --- dropbox-command-client.h 2011-11-06 17:39:41 +0000 | |||
529 | +++ dropbox-command-client.h 2016-06-24 12:31:45 +0000 | |||
530 | @@ -67,7 +67,7 @@ | |||
531 | 67 | typedef struct { | 67 | typedef struct { |
532 | 68 | GMutex *command_connected_mutex; | 68 | GMutex *command_connected_mutex; |
533 | 69 | gboolean command_connected; | 69 | gboolean command_connected; |
535 | 70 | GAsyncQueue *command_queue; | 70 | GAsyncQueue *command_queue; |
536 | 71 | GList *ca_hooklist; | 71 | GList *ca_hooklist; |
537 | 72 | GHookList onconnect_hooklist; | 72 | GHookList onconnect_hooklist; |
538 | 73 | GHookList ondisconnect_hooklist; | 73 | GHookList ondisconnect_hooklist; |
539 | @@ -87,26 +87,26 @@ | |||
540 | 87 | dropbox_command_client_start(DropboxCommandClient *dcc); | 87 | dropbox_command_client_start(DropboxCommandClient *dcc); |
541 | 88 | 88 | ||
542 | 89 | void dropbox_command_client_send_simple_command(DropboxCommandClient *dcc, | 89 | void dropbox_command_client_send_simple_command(DropboxCommandClient *dcc, |
544 | 90 | const char *command); | 90 | const char *command); |
545 | 91 | 91 | ||
550 | 92 | void dropbox_command_client_send_command(DropboxCommandClient *dcc, | 92 | void dropbox_command_client_send_command(DropboxCommandClient *dcc, |
551 | 93 | MarlinDropboxCommandResponseHandler h, | 93 | MarlinDropboxCommandResponseHandler h, |
552 | 94 | gpointer ud, | 94 | gpointer ud, |
553 | 95 | const char *command, ...); | 95 | const char *command, ...); |
554 | 96 | void | 96 | void |
555 | 97 | dropbox_command_client_add_on_connect_hook(DropboxCommandClient *dcc, | 97 | dropbox_command_client_add_on_connect_hook(DropboxCommandClient *dcc, |
558 | 98 | DropboxCommandClientConnectHook dhcch, | 98 | DropboxCommandClientConnectHook dhcch, |
559 | 99 | gpointer ud); | 99 | gpointer ud); |
560 | 100 | 100 | ||
561 | 101 | void | 101 | void |
562 | 102 | dropbox_command_client_add_on_disconnect_hook(DropboxCommandClient *dcc, | 102 | dropbox_command_client_add_on_disconnect_hook(DropboxCommandClient *dcc, |
565 | 103 | DropboxCommandClientConnectHook dhcch, | 103 | DropboxCommandClientConnectHook dhcch, |
566 | 104 | gpointer ud); | 104 | gpointer ud); |
567 | 105 | 105 | ||
568 | 106 | void | 106 | void |
569 | 107 | dropbox_command_client_add_connection_attempt_hook(DropboxCommandClient *dcc, | 107 | dropbox_command_client_add_connection_attempt_hook(DropboxCommandClient *dcc, |
572 | 108 | DropboxCommandClientConnectionAttemptHook dhcch, | 108 | DropboxCommandClientConnectionAttemptHook dhcch, |
573 | 109 | gpointer ud); | 109 | gpointer ud); |
574 | 110 | 110 | ||
575 | 111 | G_END_DECLS | 111 | G_END_DECLS |
576 | 112 | 112 | ||
577 | 113 | 113 | ||
578 | === modified file 'dropbox-hooks.c' | |||
579 | --- dropbox-hooks.c 2011-10-05 04:35:08 +0000 | |||
580 | +++ dropbox-hooks.c 2016-06-24 12:31:45 +0000 | |||
581 | @@ -242,7 +242,7 @@ | |||
582 | 242 | hookserv->hhsi.line = 0; | 242 | hookserv->hhsi.line = 0; |
583 | 243 | hookserv->hhsi.command_args = NULL; | 243 | hookserv->hhsi.command_args = NULL; |
584 | 244 | hookserv->hhsi.command_name = NULL; | 244 | hookserv->hhsi.command_name = NULL; |
586 | 245 | hookserv->event_source = | 245 | hookserv->event_source = |
587 | 246 | g_io_add_watch_full(hookserv->chan, G_PRIORITY_DEFAULT, | 246 | g_io_add_watch_full(hookserv->chan, G_PRIORITY_DEFAULT, |
588 | 247 | G_IO_IN | G_IO_PRI | G_IO_ERR | G_IO_HUP | G_IO_NVAL, | 247 | G_IO_IN | G_IO_PRI | G_IO_ERR | G_IO_HUP | G_IO_NVAL, |
589 | 248 | (GIOFunc) handle_hook_server_input, hookserv, | 248 | (GIOFunc) handle_hook_server_input, hookserv, |
590 | 249 | 249 | ||
591 | === modified file 'plugin.c' | |||
592 | --- plugin.c 2012-02-16 00:46:15 +0000 | |||
593 | +++ plugin.c 2016-06-24 12:31:45 +0000 | |||
594 | @@ -1,16 +1,16 @@ | |||
595 | 1 | /* | 1 | /* |
596 | 2 | * Copyright (C) 2011 ammonkey <am.monkeyd@gmail.com> | 2 | * Copyright (C) 2011 ammonkey <am.monkeyd@gmail.com> |
598 | 3 | * | 3 | * |
599 | 4 | * Marlin is free software: you can redistribute it and/or modify it | 4 | * Marlin is free software: you can redistribute it and/or modify it |
600 | 5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
601 | 6 | * Free Software Foundation, either version 3 of the License, or | 6 | * Free Software Foundation, either version 3 of the License, or |
602 | 7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
604 | 8 | * | 8 | * |
605 | 9 | * Marlin is distributed in the hope that it will be useful, but | 9 | * Marlin is distributed in the hope that it will be useful, but |
606 | 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
607 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
608 | 12 | * See the GNU General Public License for more details. | 12 | * See the GNU General Public License for more details. |
610 | 13 | * | 13 | * |
611 | 14 | * You should have received a copy of the GNU General Public License along | 14 | * You should have received a copy of the GNU General Public License along |
612 | 15 | * with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
613 | 16 | */ | 16 | */ |
614 | @@ -401,8 +401,8 @@ | |||
615 | 401 | return FALSE; | 401 | return FALSE; |
616 | 402 | } | 402 | } |
617 | 403 | 403 | ||
620 | 404 | static void | 404 | static void |
621 | 405 | marlin_dropbox_real_directory_loaded (MarlinPluginsBase *base, void *user_data) | 405 | marlin_dropbox_real_directory_loaded (MarlinPluginsBase *base, void *user_data) |
622 | 406 | { | 406 | { |
623 | 407 | /*GOFFile *file; | 407 | /*GOFFile *file; |
624 | 408 | 408 | ||
625 | @@ -414,8 +414,8 @@ | |||
626 | 414 | 414 | ||
627 | 415 | } | 415 | } |
628 | 416 | 416 | ||
631 | 417 | static void | 417 | static void |
632 | 418 | marlin_dropbox_update_file_info (MarlinPluginsBase *base, GOFFile *file) | 418 | marlin_dropbox_update_file_info (MarlinPluginsBase *base, GOFFile *file) |
633 | 419 | { | 419 | { |
634 | 420 | MarlinDropbox *cvs = MARLIN_DROPBOX (base); | 420 | MarlinDropbox *cvs = MARLIN_DROPBOX (base); |
635 | 421 | 421 | ||
636 | @@ -438,7 +438,7 @@ | |||
637 | 438 | stored_filename == NULL) { | 438 | stored_filename == NULL) { |
638 | 439 | 439 | ||
639 | 440 | if (stored_filename != NULL && cmp != 0) { | 440 | if (stored_filename != NULL && cmp != 0) { |
641 | 441 | /* this happens when the filename changes name on a file obj | 441 | /* this happens when the filename changes name on a file obj |
642 | 442 | but changed_cb isn't called */ | 442 | but changed_cb isn't called */ |
643 | 443 | g_object_weak_unref(G_OBJECT(file), (GWeakNotify) when_file_dies, cvs); | 443 | g_object_weak_unref(G_OBJECT(file), (GWeakNotify) when_file_dies, cvs); |
644 | 444 | g_hash_table_remove(cvs->obj2filename, file); | 444 | g_hash_table_remove(cvs->obj2filename, file); |
645 | @@ -567,8 +567,8 @@ | |||
646 | 567 | } | 567 | } |
647 | 568 | 568 | ||
648 | 569 | static void | 569 | static void |
651 | 570 | marlin_dropbox_parse_menu(gchar **options, | 570 | marlin_dropbox_parse_menu(gchar **options, |
652 | 571 | GtkWidget *menu, | 571 | GtkWidget *menu, |
653 | 572 | MarlinPluginsBase *base, | 572 | MarlinPluginsBase *base, |
654 | 573 | GOFFile *file) | 573 | GOFFile *file) |
655 | 574 | { | 574 | { |
656 | @@ -601,7 +601,7 @@ | |||
657 | 601 | cb_data->cvs = cvs; | 601 | cb_data->cvs = cvs; |
658 | 602 | cb_data->verb = g_strdup (verb); | 602 | cb_data->verb = g_strdup (verb); |
659 | 603 | cb_data->file = file; | 603 | cb_data->file = file; |
661 | 604 | 604 | ||
662 | 605 | g_object_weak_ref (G_OBJECT (menu), (GWeakNotify) free_menu_cb_data, cb_data); | 605 | g_object_weak_ref (G_OBJECT (menu), (GWeakNotify) free_menu_cb_data, cb_data); |
663 | 606 | 606 | ||
664 | 607 | /* Deprecated ? */ | 607 | /* Deprecated ? */ |
665 | @@ -663,8 +663,8 @@ | |||
666 | 663 | g_async_queue_unref(reply_queue); | 663 | g_async_queue_unref(reply_queue); |
667 | 664 | } | 664 | } |
668 | 665 | 665 | ||
671 | 666 | static void | 666 | static void |
672 | 667 | marlin_dropbox_context_menu (MarlinPluginsBase *base, GtkWidget *menu, GList *files) | 667 | marlin_dropbox_context_menu (MarlinPluginsBase *base, GtkWidget *menu, GList *files) |
673 | 668 | { | 668 | { |
674 | 669 | MarlinDropbox *cvs = MARLIN_DROPBOX (base); | 669 | MarlinDropbox *cvs = MARLIN_DROPBOX (base); |
675 | 670 | GOFFile *file; | 670 | GOFFile *file; |
676 | @@ -728,7 +728,7 @@ | |||
677 | 728 | GHashTable *context_options_response = g_async_queue_timed_pop(reply_queue, >v); | 728 | GHashTable *context_options_response = g_async_queue_timed_pop(reply_queue, >v); |
678 | 729 | g_async_queue_unref(reply_queue); | 729 | g_async_queue_unref(reply_queue); |
679 | 730 | 730 | ||
681 | 731 | if (!context_options_response) | 731 | if (!context_options_response) |
682 | 732 | return; | 732 | return; |
683 | 733 | 733 | ||
684 | 734 | /* | 734 | /* |
685 | @@ -757,7 +757,7 @@ | |||
686 | 757 | 757 | ||
687 | 758 | } | 758 | } |
688 | 759 | 759 | ||
690 | 760 | static void | 760 | static void |
691 | 761 | marlin_dropbox_class_init (MarlinDropboxClass *klass) { | 761 | marlin_dropbox_class_init (MarlinDropboxClass *klass) { |
692 | 762 | MarlinPluginsBaseClass *object_class = MARLIN_PLUGINS_BASE_CLASS (klass); | 762 | MarlinPluginsBaseClass *object_class = MARLIN_PLUGINS_BASE_CLASS (klass); |
693 | 763 | //g_type_class_add_private (klass, sizeof (MarlinDropboxPrivate)); | 763 | //g_type_class_add_private (klass, sizeof (MarlinDropboxPrivate)); |
694 | @@ -769,7 +769,7 @@ | |||
695 | 769 | } | 769 | } |
696 | 770 | 770 | ||
697 | 771 | 771 | ||
699 | 772 | static void | 772 | static void |
700 | 773 | marlin_dropbox_init (MarlinDropbox *cvs) { | 773 | marlin_dropbox_init (MarlinDropbox *cvs) { |
701 | 774 | //self->priv = MARLIN_DROPBOX_GET_PRIVATE (self); | 774 | //self->priv = MARLIN_DROPBOX_GET_PRIVATE (self); |
702 | 775 | //self->priv = g_new0 (MarlinDropboxPrivate, 1); | 775 | //self->priv = g_new0 (MarlinDropboxPrivate, 1); |
703 | @@ -808,7 +808,7 @@ | |||
704 | 808 | } | 808 | } |
705 | 809 | 809 | ||
706 | 810 | 810 | ||
708 | 811 | static void | 811 | static void |
709 | 812 | marlin_dropbox_finalize (MarlinPluginsBase* obj) { | 812 | marlin_dropbox_finalize (MarlinPluginsBase* obj) { |
710 | 813 | MarlinDropbox * self = MARLIN_DROPBOX (obj); | 813 | MarlinDropbox * self = MARLIN_DROPBOX (obj); |
711 | 814 | 814 | ||
712 | 815 | 815 | ||
713 | === modified file 'plugin.h' | |||
714 | --- plugin.h 2011-11-06 17:39:41 +0000 | |||
715 | +++ plugin.h 2016-06-24 12:31:45 +0000 | |||
716 | @@ -1,16 +1,16 @@ | |||
717 | 1 | /* | 1 | /* |
718 | 2 | * Copyright (C) 2011 ammonkey <am.monkeyd@gmail.com> | 2 | * Copyright (C) 2011 ammonkey <am.monkeyd@gmail.com> |
720 | 3 | * | 3 | * |
721 | 4 | * Marlin is free software: you can redistribute it and/or modify it | 4 | * Marlin is free software: you can redistribute it and/or modify it |
722 | 5 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
723 | 6 | * Free Software Foundation, either version 3 of the License, or | 6 | * Free Software Foundation, either version 3 of the License, or |
724 | 7 | * (at your option) any later version. | 7 | * (at your option) any later version. |
726 | 8 | * | 8 | * |
727 | 9 | * Marlin is distributed in the hope that it will be useful, but | 9 | * Marlin is distributed in the hope that it will be useful, but |
728 | 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
729 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
730 | 12 | * See the GNU General Public License for more details. | 12 | * See the GNU General Public License for more details. |
732 | 13 | * | 13 | * |
733 | 14 | * You should have received a copy of the GNU General Public License along | 14 | * You should have received a copy of the GNU General Public License along |
734 | 15 | * with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
735 | 16 | */ | 16 | */ |
736 | @@ -40,8 +40,8 @@ | |||
737 | 40 | #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) | 40 | #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) |
738 | 41 | 41 | ||
739 | 42 | struct _MarlinDropbox { | 42 | struct _MarlinDropbox { |
742 | 43 | MarlinPluginsBase parent_instance; | 43 | MarlinPluginsBase parent_instance; |
743 | 44 | //MarlinDropboxPrivate * priv; | 44 | //MarlinDropboxPrivate * priv; |
744 | 45 | 45 | ||
745 | 46 | GHashTable *filename2obj; | 46 | GHashTable *filename2obj; |
746 | 47 | GHashTable *obj2filename; | 47 | GHashTable *obj2filename; |
747 | @@ -53,11 +53,11 @@ | |||
748 | 53 | }; | 53 | }; |
749 | 54 | 54 | ||
750 | 55 | struct _MarlinDropboxClass { | 55 | struct _MarlinDropboxClass { |
752 | 56 | MarlinPluginsBaseClass parent_class; | 56 | MarlinPluginsBaseClass parent_class; |
753 | 57 | }; | 57 | }; |
754 | 58 | 58 | ||
755 | 59 | struct _MarlinDropboxPrivate { | 59 | struct _MarlinDropboxPrivate { |
757 | 60 | /*MarlinTrashMonitor* trash_monitor;*/ | 60 | /*MarlinTrashMonitor* trash_monitor;*/ |
758 | 61 | }; | 61 | }; |
759 | 62 | 62 | ||
760 | 63 | GType marlin_dropbox_get_type (void) G_GNUC_CONST; | 63 | GType marlin_dropbox_get_type (void) G_GNUC_CONST; |