Merge lp:~jeremywootten/pantheon-files/dropbox-plugin-reformat-for-loki into lp:~elementary-apps/pantheon-files/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
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
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-07-29 14:31:30 +0000
+++ CMakeLists.txt 2016-06-24 12:31:45 +0000
@@ -18,7 +18,7 @@
18 marlincore18 marlincore
19 )19 )
20set(CFLAGS20set(CFLAGS
21 ${DROPBOX_CFLAGS} ${DROPBOX_CFLAGS_OTHER} 21 ${DROPBOX_CFLAGS} ${DROPBOX_CFLAGS_OTHER}
22)22)
23include_directories(${CMAKE_BINARY_DIR})23include_directories(${CMAKE_BINARY_DIR})
24include_directories(${CMAKE_SOURCE_DIR}/libcore/)24include_directories(${CMAKE_SOURCE_DIR}/libcore/)
@@ -29,3 +29,4 @@
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)
30target_link_libraries(marlin-dropbox marlincore marlinwidgets ${DROPBOX_LIBRARIES})30target_link_libraries(marlin-dropbox marlincore marlinwidgets ${DROPBOX_LIBRARIES})
31install(TARGETS marlin-dropbox DESTINATION lib/pantheon-files/plugins/)31install(TARGETS marlin-dropbox DESTINATION lib/pantheon-files/plugins/)
32
3233
=== modified file 'async-io-coroutine.h'
--- async-io-coroutine.h 2011-10-05 04:35:08 +0000
+++ async-io-coroutine.h 2016-06-24 12:31:45 +0000
@@ -31,33 +31,33 @@
31#define CRBEGIN(pos) switch (pos) { case 0:31#define CRBEGIN(pos) switch (pos) { case 0:
32#define CREND } return FALSE32#define CREND } return FALSE
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)
34#define CRHALT return FALSE 34#define CRHALT return FALSE
3535
36#define CRREADLINE(pos, chan, where) \36#define CRREADLINE(pos, chan, where) \
37 while (1) { \37 while (1) { \
38 gchar *__line; \38 gchar *__line; \
39 gsize __line_length, __newline_pos; \39 gsize __line_length, __newline_pos; \
40 GIOStatus __iostat; \40 GIOStatus __iostat; \
41 \41 \
42 __iostat = g_io_channel_read_line(chan, &__line, \42 __iostat = g_io_channel_read_line(chan, &__line, \
43 &__line_length, \43 &__line_length, \
44 &__newline_pos, NULL); \44 &__newline_pos, NULL); \
45 if (__iostat == G_IO_STATUS_AGAIN) { \45 if (__iostat == G_IO_STATUS_AGAIN) { \
46 CRYIELD(pos); \46 CRYIELD(pos); \
47 } \47 } \
48 else if (__iostat == G_IO_STATUS_NORMAL) { \48 else if (__iostat == G_IO_STATUS_NORMAL) { \
49 *(__line + __newline_pos) = '\0'; \49 *(__line + __newline_pos) = '\0'; \
50 where = __line; \50 where = __line; \
51 break; \51 break; \
52 } \52 } \
53 else if (__iostat == G_IO_STATUS_EOF || \53 else if (__iostat == G_IO_STATUS_EOF || \
54 __iostat == G_IO_STATUS_ERROR) { \54 __iostat == G_IO_STATUS_ERROR) { \
55 CRHALT; \55 CRHALT; \
56 } \56 } \
57 else { \57 else { \
58 g_assert_not_reached(); \58 g_assert_not_reached(); \
59 CRHALT; \59 CRHALT; \
60 } \60 } \
61 }61 }
6262
63G_END_DECLS63G_END_DECLS
6464
=== modified file 'cmake/ParseArguments.cmake'
--- cmake/ParseArguments.cmake 2011-10-04 09:11:24 +0000
+++ cmake/ParseArguments.cmake 2016-06-24 12:31:45 +0000
@@ -1,6 +1,6 @@
1##1##
2# This is a helper Macro to parse optional arguments in Macros/Functions2# This is a helper Macro to parse optional arguments in Macros/Functions
3# It has been taken from the public CMake wiki. 3# It has been taken from the public CMake wiki.
4# See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and4# See http://www.cmake.org/Wiki/CMakeMacroParseArguments for documentation and
5# licensing.5# licensing.
6##6##
@@ -26,9 +26,9 @@
26 set(loption_names ${option_names})26 set(loption_names ${option_names})
27 list(FIND loption_names "${arg}" is_option)27 list(FIND loption_names "${arg}" is_option)
28 if(is_option GREATER -1)28 if(is_option GREATER -1)
29 set(${prefix}_${arg} TRUE)29 set(${prefix}_${arg} TRUE)
30 else(is_option GREATER -1)30 else(is_option GREATER -1)
31 set(current_arg_list ${current_arg_list} ${arg})31 set(current_arg_list ${current_arg_list} ${arg})
32 endif(is_option GREATER -1)32 endif(is_option GREATER -1)
33 endif(is_arg_name GREATER -1)33 endif(is_arg_name GREATER -1)
34 endforeach(arg)34 endforeach(arg)
3535
=== modified file 'cmake/README'
--- cmake/README 2011-10-04 09:11:24 +0000
+++ cmake/README 2016-06-24 12:31:45 +0000
@@ -2,7 +2,7 @@
22
3This is a set of CMake modules: Translations, GSettings, and Vala modules.3This is a set of CMake modules: Translations, GSettings, and Vala modules.
44
5For all the Vala related modules see README.Vala.rst: 5For all the Vala related modules see README.Vala.rst:
6 - ParseArguments.cmake6 - ParseArguments.cmake
7 - ValaPrecompile.cmake7 - ValaPrecompile.cmake
8 - ValaVersion.cmake8 - ValaVersion.cmake
99
=== modified file 'config.h.cmake'
--- config.h.cmake 2011-10-04 09:11:24 +0000
+++ config.h.cmake 2016-06-24 12:31:45 +0000
@@ -6,3 +6,4 @@
6#cmakedefine VERSION "@VERSION@"6#cmakedefine VERSION "@VERSION@"
77
8#endif8#endif
9
910
=== modified file 'debian/copyright'
--- debian/copyright 2013-05-17 19:09:51 +0000
+++ debian/copyright 2016-06-24 12:31:45 +0000
@@ -2,11 +2,11 @@
2Thu, 06 Oct 2011 09:17:32 +02002Thu, 06 Oct 2011 09:17:32 +0200
33
4Upstream Authors:4Upstream Authors:
5 ammonkey <am.monkeyd@gmail.com>5 ammonkey <am.monkeyd@gmail.com>
66
7Copyright:7Copyright:
8 © 2008, Evenflow, Inc.8 © 2008, Evenflow, Inc.
9 © 2011 Marlin Devs9 © 2011 Marlin Devs
1010
11License: GPL-311License: GPL-3
12 Marlin - The sexiest fish in the large sea of file-browsers.12 Marlin - The sexiest fish in the large sea of file-browsers.
1313
=== modified file 'debian/rules'
--- debian/rules 2011-10-06 07:22:51 +0000
+++ debian/rules 2016-06-24 12:31:45 +0000
@@ -10,7 +10,7 @@
10#export DH_VERBOSE=110#export DH_VERBOSE=1
1111
12%:12%:
13 dh $@ 13 dh $@
1414
15override_dh_builddeb:15override_dh_builddeb:
16 dh_builddeb -- -Zxz16 dh_builddeb -- -Zxz
1717
=== modified file 'dropbox-client-util.c'
--- dropbox-client-util.c 2011-10-05 04:35:08 +0000
+++ dropbox-client-util.c 2016-06-24 12:31:45 +0000
@@ -58,27 +58,27 @@
58 gchar **argval;58 gchar **argval;
59 guint len;59 guint len;
60 gboolean retval;60 gboolean retval;
61 61
62 argval = g_strsplit(line, "\t", 0);62 argval = g_strsplit(line, "\t", 0);
63 len = g_strv_length(argval);63 len = g_strv_length(argval);
6464
65 /* debug("parsed: (%d) %s", len, line); */65 /* debug("parsed: (%d) %s", len, line); */
66 66
67 if (len > 1) {67 if (len > 1) {
68 int i;68 int i;
69 gchar **vals;69 gchar **vals;
70 70
71 vals = g_new(gchar *, len);71 vals = g_new(gchar *, len);
72 vals[len - 1] = NULL;72 vals[len - 1] = NULL;
73 73
74 for (i = 1; argval[i] != NULL; i++) {74 for (i = 1; argval[i] != NULL; i++) {
75 vals[i-1] = dropbox_client_util_desanitize(argval[i]);75 vals[i-1] = dropbox_client_util_desanitize(argval[i]);
76 76
77 }77 }
78 78
79 g_hash_table_insert(return_table,79 g_hash_table_insert(return_table,
80 dropbox_client_util_desanitize(argval[0]),80 dropbox_client_util_desanitize(argval[0]),
81 vals);81 vals);
82 retval = TRUE;82 retval = TRUE;
83 }83 }
84 else {84 else {
8585
=== modified file 'dropbox-client.c'
--- dropbox-client.c 2011-10-05 04:35:08 +0000
+++ dropbox-client.c 2016-06-24 12:31:45 +0000
@@ -30,7 +30,7 @@
30static void30static void
31hook_on_connect(DropboxClient *dc) {31hook_on_connect(DropboxClient *dc) {
32 dc->hook_connect_called = TRUE;32 dc->hook_connect_called = TRUE;
33 33
34 if (dc->command_connect_called) {34 if (dc->command_connect_called) {
35 debug("client connection");35 debug("client connection");
36 g_hook_list_invoke(&(dc->onconnect_hooklist), FALSE);36 g_hook_list_invoke(&(dc->onconnect_hooklist), FALSE);
@@ -42,7 +42,7 @@
42static void42static void
43command_on_connect(DropboxClient *dc) {43command_on_connect(DropboxClient *dc) {
44 dc->command_connect_called = TRUE;44 dc->command_connect_called = TRUE;
45 45
46 if (dc->hook_connect_called) {46 if (dc->hook_connect_called) {
47 debug("client connection");47 debug("client connection");
48 g_hook_list_invoke(&(dc->onconnect_hooklist), FALSE);48 g_hook_list_invoke(&(dc->onconnect_hooklist), FALSE);
@@ -54,7 +54,7 @@
54static void54static void
55command_on_disconnect(DropboxClient *dc) {55command_on_disconnect(DropboxClient *dc) {
56 dc->command_disconnect_called = TRUE;56 dc->command_disconnect_called = TRUE;
57 57
58 if (dc->hook_disconnect_called) {58 if (dc->hook_disconnect_called) {
59 debug("client disconnect");59 debug("client disconnect");
60 g_hook_list_invoke(&(dc->ondisconnect_hooklist), FALSE);60 g_hook_list_invoke(&(dc->ondisconnect_hooklist), FALSE);
@@ -69,7 +69,7 @@
69static void69static void
70hook_on_disconnect(DropboxClient *dc) {70hook_on_disconnect(DropboxClient *dc) {
71 dc->hook_disconnect_called = TRUE;71 dc->hook_disconnect_called = TRUE;
72 72
73 if (dc->command_disconnect_called) {73 if (dc->command_disconnect_called) {
74 debug("client disconnect");74 debug("client disconnect");
75 g_hook_list_invoke(&(dc->ondisconnect_hooklist), FALSE);75 g_hook_list_invoke(&(dc->ondisconnect_hooklist), FALSE);
@@ -84,7 +84,7 @@
84gboolean84gboolean
85dropbox_client_is_connected(DropboxClient *dc) {85dropbox_client_is_connected(DropboxClient *dc) {
86 return (dropbox_command_client_is_connected(&(dc->dcc)) &&86 return (dropbox_command_client_is_connected(&(dc->dcc)) &&
87 marlin_dropbox_hooks_is_connected(&(dc->hookserv)));87 marlin_dropbox_hooks_is_connected(&(dc->hookserv)));
88}88}
8989
90void90void
@@ -108,60 +108,60 @@
108 dc->hook_disconnect_called = dc->command_disconnect_called = FALSE;108 dc->hook_disconnect_called = dc->command_disconnect_called = FALSE;
109 dc->hook_connect_called = dc->command_connect_called = FALSE;109 dc->hook_connect_called = dc->command_connect_called = FALSE;
110110
111 marlin_dropbox_hooks_add_on_connect_hook(&(dc->hookserv), 111 marlin_dropbox_hooks_add_on_connect_hook(&(dc->hookserv),
112 (DropboxHookClientConnectHook)112 (DropboxHookClientConnectHook)
113 hook_on_connect, dc);113 hook_on_connect, dc);
114 114
115 dropbox_command_client_add_on_connect_hook(&(dc->dcc),115 dropbox_command_client_add_on_connect_hook(&(dc->dcc),
116 (DropboxCommandClientConnectHook)116 (DropboxCommandClientConnectHook)
117 command_on_connect, dc);117 command_on_connect, dc);
118 118
119 marlin_dropbox_hooks_add_on_disconnect_hook(&(dc->hookserv), 119 marlin_dropbox_hooks_add_on_disconnect_hook(&(dc->hookserv),
120 (DropboxHookClientConnectHook)120 (DropboxHookClientConnectHook)
121 hook_on_disconnect, dc);121 hook_on_disconnect, dc);
122 122
123 dropbox_command_client_add_on_disconnect_hook(&(dc->dcc),123 dropbox_command_client_add_on_disconnect_hook(&(dc->dcc),
124 (DropboxCommandClientConnectHook)124 (DropboxCommandClientConnectHook)
125 command_on_disconnect, dc);125 command_on_disconnect, dc);
126}126}
127127
128/* not thread safe */128/* not thread safe */
129void129void
130dropbox_client_add_on_disconnect_hook(DropboxClient *dc,130dropbox_client_add_on_disconnect_hook(DropboxClient *dc,
131 DropboxClientConnectHook dhcch,131 DropboxClientConnectHook dhcch,
132 gpointer ud) {132 gpointer ud) {
133 GHook *newhook;133 GHook *newhook;
134 134
135 newhook = g_hook_alloc(&(dc->ondisconnect_hooklist));135 newhook = g_hook_alloc(&(dc->ondisconnect_hooklist));
136 newhook->func = dhcch;136 newhook->func = dhcch;
137 newhook->data = ud;137 newhook->data = ud;
138 138
139 g_hook_append(&(dc->ondisconnect_hooklist), newhook);139 g_hook_append(&(dc->ondisconnect_hooklist), newhook);
140}140}
141141
142/* not thread safe */142/* not thread safe */
143void143void
144dropbox_client_add_on_connect_hook(DropboxClient *dc,144dropbox_client_add_on_connect_hook(DropboxClient *dc,
145 DropboxClientConnectHook dhcch,145 DropboxClientConnectHook dhcch,
146 gpointer ud) {146 gpointer ud) {
147 GHook *newhook;147 GHook *newhook;
148 148
149 newhook = g_hook_alloc(&(dc->onconnect_hooklist));149 newhook = g_hook_alloc(&(dc->onconnect_hooklist));
150 newhook->func = dhcch;150 newhook->func = dhcch;
151 newhook->data = ud;151 newhook->data = ud;
152 152
153 g_hook_append(&(dc->onconnect_hooklist), newhook);153 g_hook_append(&(dc->onconnect_hooklist), newhook);
154}154}
155155
156/* not thread safe */156/* not thread safe */
157void157void
158dropbox_client_add_connection_attempt_hook(DropboxClient *dc,158dropbox_client_add_connection_attempt_hook(DropboxClient *dc,
159 DropboxClientConnectionAttemptHook dhcch,159 DropboxClientConnectionAttemptHook dhcch,
160 gpointer ud) {160 gpointer ud) {
161 debug("shouldn't be here...");161 debug("shouldn't be here...");
162162
163 dropbox_command_client_add_connection_attempt_hook(&(dc->dcc),163 dropbox_command_client_add_connection_attempt_hook(&(dc->dcc),
164 dhcch, ud);164 dhcch, ud);
165}165}
166166
167/* should only be called once on initialization */167/* should only be called once on initialization */
168168
=== modified file 'dropbox-client.h'
--- dropbox-client.h 2011-10-05 04:35:08 +0000
+++ dropbox-client.h 2016-06-24 12:31:45 +0000
@@ -58,18 +58,18 @@
5858
59void59void
60dropbox_client_add_on_connect_hook(DropboxClient *dc,60dropbox_client_add_on_connect_hook(DropboxClient *dc,
61 DropboxClientConnectHook dhcch,61 DropboxClientConnectHook dhcch,
62 gpointer ud);62 gpointer ud);
6363
64void64void
65dropbox_client_add_on_disconnect_hook(DropboxClient *dc,65dropbox_client_add_on_disconnect_hook(DropboxClient *dc,
66 DropboxClientConnectHook dhcch,66 DropboxClientConnectHook dhcch,
67 gpointer ud);67 gpointer ud);
6868
69void69void
70dropbox_client_add_connection_attempt_hook(DropboxClient *dc,70dropbox_client_add_connection_attempt_hook(DropboxClient *dc,
71 DropboxClientConnectionAttemptHook dhcch,71 DropboxClientConnectionAttemptHook dhcch,
72 gpointer ud);72 gpointer ud);
7373
74G_END_DECLS74G_END_DECLS
7575
7676
=== modified file 'dropbox-command-client.c'
--- dropbox-command-client.c 2011-10-06 01:09:50 +0000
+++ dropbox-command-client.c 2016-06-24 12:31:45 +0000
@@ -162,7 +162,7 @@
162162
163static GList *my_g_hash_table_get_keys(GHashTable *ght) {163static GList *my_g_hash_table_get_keys(GHashTable *ght) {
164 GList *list = NULL;164 GList *list = NULL;
165 g_hash_table_foreach(ght, (GHFunc) 165 g_hash_table_foreach(ght, (GHFunc)
166 my_g_hash_table_get_keys_helper, &list);166 my_g_hash_table_get_keys_helper, &list);
167 return list;167 return list;
168}168}
@@ -187,31 +187,31 @@
187 g_assert(command_name != NULL);187 g_assert(command_name != NULL);
188188
189189
190#define WRITE_OR_DIE_SANI(s,l) { \190#define WRITE_OR_DIE_SANI(s,l) { \
191 gchar *sani_s; \191 gchar *sani_s; \
192 sani_s = dropbox_client_util_sanitize(s); \192 sani_s = dropbox_client_util_sanitize(s); \
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, \
194 &tmp_error); \194 &tmp_error); \
195 g_free(sani_s); \195 g_free(sani_s); \
196 if (iostat == G_IO_STATUS_ERROR || \196 if (iostat == G_IO_STATUS_ERROR || \
197 iostat == G_IO_STATUS_AGAIN) { \197 iostat == G_IO_STATUS_AGAIN) { \
198 if (tmp_error != NULL) { \198 if (tmp_error != NULL) { \
199 g_propagate_error(err, tmp_error); \199 g_propagate_error(err, tmp_error); \
200 } \200 } \
201 return NULL; \201 return NULL; \
202 } \202 } \
203}203}
204204
205#define WRITE_OR_DIE(s,l) { \205#define WRITE_OR_DIE(s,l) { \
206 iostat = g_io_channel_write_chars(chan, s,l, &bytes_trans, \206 iostat = g_io_channel_write_chars(chan, s,l, &bytes_trans, \
207 &tmp_error); \207 &tmp_error); \
208 if (iostat == G_IO_STATUS_ERROR || \208 if (iostat == G_IO_STATUS_ERROR || \
209 iostat == G_IO_STATUS_AGAIN) { \209 iostat == G_IO_STATUS_AGAIN) { \
210 if (tmp_error != NULL) { \210 if (tmp_error != NULL) { \
211 g_propagate_error(err, tmp_error); \211 g_propagate_error(err, tmp_error); \
212 } \212 } \
213 return NULL; \213 return NULL; \
214 } \214 } \
215}215}
216216
217 /* send command to server */217 /* send command to server */
@@ -281,7 +281,7 @@
281281
282/* if the response was okay */282/* if the response was okay */
283if (strncmp(line, "ok\n", 3) == 0) {283if (strncmp(line, "ok\n", 3) == 0) {
284 GHashTable *return_table = 284 GHashTable *return_table =
285 g_hash_table_new_full((GHashFunc) g_str_hash,285 g_hash_table_new_full((GHashFunc) g_str_hash,
286 (GEqualFunc) g_str_equal,286 (GEqualFunc) g_str_equal,
287 (GDestroyNotify) g_free,287 (GDestroyNotify) g_free,
@@ -502,7 +502,7 @@
502 }502 }
503503
504 iostat = g_io_channel_read_chars(chan, fake_buf,504 iostat = g_io_channel_read_chars(chan, fake_buf,
505 sizeof(fake_buf), 505 sizeof(fake_buf),
506 &bytes_read, &tmp_error);506 &bytes_read, &tmp_error);
507507
508 ret = g_io_channel_set_flags(chan, flags, NULL);508 ret = g_io_channel_set_flags(chan, flags, NULL);
@@ -539,7 +539,7 @@
539 finish_general_command(dgcr);539 finish_general_command(dgcr);
540 }540 }
541 break;541 break;
542 default: 542 default:
543 g_assert_not_reached();543 g_assert_not_reached();
544 break;544 break;
545 }545 }
@@ -613,13 +613,13 @@
613 }613 }
614614
615 if (connect(sock, (struct sockaddr *) &addr, addr_len) < 0) {615 if (connect(sock, (struct sockaddr *) &addr, addr_len) < 0) {
616 /* debug("couldn't connect to command server after 1 second"); */616 /* debug("couldn't connect to command server after 1 second"); */
617 break;617 break;
618 }618 }
619 }619 }
620 /* errno != EINPROGRESS */620 /* errno != EINPROGRESS */
621 else {621 else {
622 /* debug("bad connection"); */622 /* debug("bad connection"); */
623 break;623 break;
624 }624 }
625 }625 }
@@ -656,10 +656,10 @@
656 g_io_channel_set_close_on_unref(chan, TRUE);656 g_io_channel_set_close_on_unref(chan, TRUE);
657 g_io_channel_set_line_term(chan, "\n", -1);657 g_io_channel_set_line_term(chan, "\n", -1);
658658
659#define SET_CONNECTED_STATE(s) { \659#define SET_CONNECTED_STATE(s) { \
660 g_mutex_lock(dcc->command_connected_mutex); \660 g_mutex_lock(dcc->command_connected_mutex); \
661 dcc->command_connected = s; \661 dcc->command_connected = s; \
662 g_mutex_unlock(dcc->command_connected_mutex); \662 g_mutex_unlock(dcc->command_connected_mutex); \
663}663}
664664
665 SET_CONNECTED_STATE(TRUE);665 SET_CONNECTED_STATE(TRUE);
@@ -703,7 +703,7 @@
703 do_general_command(chan, (DropboxGeneralCommand *) dc, &gerr);703 do_general_command(chan, (DropboxGeneralCommand *) dc, &gerr);
704 }704 }
705 break;705 break;
706 default: 706 default:
707 g_assert_not_reached();707 g_assert_not_reached();
708 break;708 break;
709 }709 }
@@ -711,7 +711,7 @@
711 debug("done.");711 debug("done.");
712712
713 if (gerr != NULL) {713 if (gerr != NULL) {
714 // debug("COMMAND ERROR*****************************");714 // debug("COMMAND ERROR*****************************");
715 /* mark this request as never to be completed */715 /* mark this request as never to be completed */
716 end_request(dc);716 end_request(dc);
717717
@@ -831,7 +831,7 @@
831}831}
832832
833/* thread safe */833/* thread safe */
834void dropbox_command_client_send_simple_command(DropboxCommandClient *dcc, 834void dropbox_command_client_send_simple_command(DropboxCommandClient *dcc,
835 const char *command) {835 const char *command) {
836 DropboxGeneralCommand *dgc;836 DropboxGeneralCommand *dgc;
837837
@@ -849,7 +849,7 @@
849/* thread safe */849/* thread safe */
850/* this is the C API, there is another send_command_to_db850/* this is the C API, there is another send_command_to_db
851 that is more the actual over the wire command */851 that is more the actual over the wire command */
852void dropbox_command_client_send_command(DropboxCommandClient *dcc, 852void dropbox_command_client_send_command(DropboxCommandClient *dcc,
853 MarlinDropboxCommandResponseHandler h,853 MarlinDropboxCommandResponseHandler h,
854 gpointer ud,854 gpointer ud,
855 const char *command, ...) {855 const char *command, ...) {
856856
=== modified file 'dropbox-command-client.h'
--- dropbox-command-client.h 2011-11-06 17:39:41 +0000
+++ dropbox-command-client.h 2016-06-24 12:31:45 +0000
@@ -67,7 +67,7 @@
67typedef struct {67typedef struct {
68 GMutex *command_connected_mutex;68 GMutex *command_connected_mutex;
69 gboolean command_connected;69 gboolean command_connected;
70 GAsyncQueue *command_queue; 70 GAsyncQueue *command_queue;
71 GList *ca_hooklist;71 GList *ca_hooklist;
72 GHookList onconnect_hooklist;72 GHookList onconnect_hooklist;
73 GHookList ondisconnect_hooklist;73 GHookList ondisconnect_hooklist;
@@ -87,26 +87,26 @@
87dropbox_command_client_start(DropboxCommandClient *dcc);87dropbox_command_client_start(DropboxCommandClient *dcc);
8888
89void dropbox_command_client_send_simple_command(DropboxCommandClient *dcc,89void dropbox_command_client_send_simple_command(DropboxCommandClient *dcc,
90 const char *command);90 const char *command);
9191
92void dropbox_command_client_send_command(DropboxCommandClient *dcc, 92void dropbox_command_client_send_command(DropboxCommandClient *dcc,
93 MarlinDropboxCommandResponseHandler h,93 MarlinDropboxCommandResponseHandler h,
94 gpointer ud,94 gpointer ud,
95 const char *command, ...);95 const char *command, ...);
96void96void
97dropbox_command_client_add_on_connect_hook(DropboxCommandClient *dcc,97dropbox_command_client_add_on_connect_hook(DropboxCommandClient *dcc,
98 DropboxCommandClientConnectHook dhcch,98 DropboxCommandClientConnectHook dhcch,
99 gpointer ud);99 gpointer ud);
100100
101void101void
102dropbox_command_client_add_on_disconnect_hook(DropboxCommandClient *dcc,102dropbox_command_client_add_on_disconnect_hook(DropboxCommandClient *dcc,
103 DropboxCommandClientConnectHook dhcch,103 DropboxCommandClientConnectHook dhcch,
104 gpointer ud);104 gpointer ud);
105105
106void106void
107dropbox_command_client_add_connection_attempt_hook(DropboxCommandClient *dcc,107dropbox_command_client_add_connection_attempt_hook(DropboxCommandClient *dcc,
108 DropboxCommandClientConnectionAttemptHook dhcch,108 DropboxCommandClientConnectionAttemptHook dhcch,
109 gpointer ud);109 gpointer ud);
110110
111G_END_DECLS111G_END_DECLS
112112
113113
=== modified file 'dropbox-hooks.c'
--- dropbox-hooks.c 2011-10-05 04:35:08 +0000
+++ dropbox-hooks.c 2016-06-24 12:31:45 +0000
@@ -242,7 +242,7 @@
242 hookserv->hhsi.line = 0;242 hookserv->hhsi.line = 0;
243 hookserv->hhsi.command_args = NULL;243 hookserv->hhsi.command_args = NULL;
244 hookserv->hhsi.command_name = NULL;244 hookserv->hhsi.command_name = NULL;
245 hookserv->event_source = 245 hookserv->event_source =
246 g_io_add_watch_full(hookserv->chan, G_PRIORITY_DEFAULT,246 g_io_add_watch_full(hookserv->chan, G_PRIORITY_DEFAULT,
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,
248 (GIOFunc) handle_hook_server_input, hookserv,248 (GIOFunc) handle_hook_server_input, hookserv,
249249
=== modified file 'plugin.c'
--- plugin.c 2012-02-16 00:46:15 +0000
+++ plugin.c 2016-06-24 12:31:45 +0000
@@ -1,16 +1,16 @@
1/*1/*
2 * Copyright (C) 2011 ammonkey <am.monkeyd@gmail.com>2 * Copyright (C) 2011 ammonkey <am.monkeyd@gmail.com>
3 * 3 *
4 * Marlin is free software: you can redistribute it and/or modify it4 * Marlin is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation, either version 3 of the License, or6 * Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.7 * (at your option) any later version.
8 * 8 *
9 * Marlin is distributed in the hope that it will be useful, but9 * Marlin is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.12 * See the GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License along14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */16 */
@@ -401,8 +401,8 @@
401 return FALSE;401 return FALSE;
402}402}
403403
404static void 404static void
405marlin_dropbox_real_directory_loaded (MarlinPluginsBase *base, void *user_data) 405marlin_dropbox_real_directory_loaded (MarlinPluginsBase *base, void *user_data)
406{406{
407 /*GOFFile *file;407 /*GOFFile *file;
408408
@@ -414,8 +414,8 @@
414414
415}415}
416416
417static void 417static void
418marlin_dropbox_update_file_info (MarlinPluginsBase *base, GOFFile *file) 418marlin_dropbox_update_file_info (MarlinPluginsBase *base, GOFFile *file)
419{419{
420 MarlinDropbox *cvs = MARLIN_DROPBOX (base);420 MarlinDropbox *cvs = MARLIN_DROPBOX (base);
421421
@@ -438,7 +438,7 @@
438 stored_filename == NULL) {438 stored_filename == NULL) {
439439
440 if (stored_filename != NULL && cmp != 0) {440 if (stored_filename != NULL && cmp != 0) {
441 /* this happens when the filename changes name on a file obj 441 /* this happens when the filename changes name on a file obj
442 but changed_cb isn't called */442 but changed_cb isn't called */
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);
444 g_hash_table_remove(cvs->obj2filename, file);444 g_hash_table_remove(cvs->obj2filename, file);
@@ -567,8 +567,8 @@
567}567}
568568
569static void569static void
570marlin_dropbox_parse_menu(gchar **options,570marlin_dropbox_parse_menu(gchar **options,
571 GtkWidget *menu,571 GtkWidget *menu,
572 MarlinPluginsBase *base,572 MarlinPluginsBase *base,
573 GOFFile *file)573 GOFFile *file)
574{574{
@@ -601,7 +601,7 @@
601 cb_data->cvs = cvs;601 cb_data->cvs = cvs;
602 cb_data->verb = g_strdup (verb);602 cb_data->verb = g_strdup (verb);
603 cb_data->file = file;603 cb_data->file = file;
604 604
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);
606606
607 /* Deprecated ? */607 /* Deprecated ? */
@@ -663,8 +663,8 @@
663 g_async_queue_unref(reply_queue);663 g_async_queue_unref(reply_queue);
664}664}
665665
666static void 666static void
667marlin_dropbox_context_menu (MarlinPluginsBase *base, GtkWidget *menu, GList *files) 667marlin_dropbox_context_menu (MarlinPluginsBase *base, GtkWidget *menu, GList *files)
668{668{
669 MarlinDropbox *cvs = MARLIN_DROPBOX (base);669 MarlinDropbox *cvs = MARLIN_DROPBOX (base);
670 GOFFile *file;670 GOFFile *file;
@@ -728,7 +728,7 @@
728 GHashTable *context_options_response = g_async_queue_timed_pop(reply_queue, &gtv);728 GHashTable *context_options_response = g_async_queue_timed_pop(reply_queue, &gtv);
729 g_async_queue_unref(reply_queue);729 g_async_queue_unref(reply_queue);
730730
731 if (!context_options_response) 731 if (!context_options_response)
732 return;732 return;
733733
734 /*734 /*
@@ -757,7 +757,7 @@
757757
758}758}
759759
760static void 760static void
761marlin_dropbox_class_init (MarlinDropboxClass *klass) {761marlin_dropbox_class_init (MarlinDropboxClass *klass) {
762 MarlinPluginsBaseClass *object_class = MARLIN_PLUGINS_BASE_CLASS (klass);762 MarlinPluginsBaseClass *object_class = MARLIN_PLUGINS_BASE_CLASS (klass);
763 //g_type_class_add_private (klass, sizeof (MarlinDropboxPrivate));763 //g_type_class_add_private (klass, sizeof (MarlinDropboxPrivate));
@@ -769,7 +769,7 @@
769}769}
770770
771771
772static void 772static void
773marlin_dropbox_init (MarlinDropbox *cvs) {773marlin_dropbox_init (MarlinDropbox *cvs) {
774 //self->priv = MARLIN_DROPBOX_GET_PRIVATE (self);774 //self->priv = MARLIN_DROPBOX_GET_PRIVATE (self);
775 //self->priv = g_new0 (MarlinDropboxPrivate, 1);775 //self->priv = g_new0 (MarlinDropboxPrivate, 1);
@@ -808,7 +808,7 @@
808}808}
809809
810810
811static void 811static void
812marlin_dropbox_finalize (MarlinPluginsBase* obj) {812marlin_dropbox_finalize (MarlinPluginsBase* obj) {
813 MarlinDropbox * self = MARLIN_DROPBOX (obj);813 MarlinDropbox * self = MARLIN_DROPBOX (obj);
814814
815815
=== modified file 'plugin.h'
--- plugin.h 2011-11-06 17:39:41 +0000
+++ plugin.h 2016-06-24 12:31:45 +0000
@@ -1,16 +1,16 @@
1/*1/*
2 * Copyright (C) 2011 ammonkey <am.monkeyd@gmail.com>2 * Copyright (C) 2011 ammonkey <am.monkeyd@gmail.com>
3 * 3 *
4 * Marlin is free software: you can redistribute it and/or modify it4 * Marlin is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation, either version 3 of the License, or6 * Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.7 * (at your option) any later version.
8 * 8 *
9 * Marlin is distributed in the hope that it will be useful, but9 * Marlin is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.12 * See the GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License along14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */16 */
@@ -40,8 +40,8 @@
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)))
4141
42struct _MarlinDropbox {42struct _MarlinDropbox {
43 MarlinPluginsBase parent_instance;43 MarlinPluginsBase parent_instance;
44 //MarlinDropboxPrivate * priv;44 //MarlinDropboxPrivate * priv;
4545
46 GHashTable *filename2obj;46 GHashTable *filename2obj;
47 GHashTable *obj2filename;47 GHashTable *obj2filename;
@@ -53,11 +53,11 @@
53};53};
5454
55struct _MarlinDropboxClass {55struct _MarlinDropboxClass {
56 MarlinPluginsBaseClass parent_class;56 MarlinPluginsBaseClass parent_class;
57};57};
5858
59struct _MarlinDropboxPrivate {59struct _MarlinDropboxPrivate {
60 /*MarlinTrashMonitor* trash_monitor;*/60 /*MarlinTrashMonitor* trash_monitor;*/
61};61};
6262
63GType marlin_dropbox_get_type (void) G_GNUC_CONST;63GType marlin_dropbox_get_type (void) G_GNUC_CONST;

Subscribers

People subscribed via source and target branches