Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: src/ibusconfig.c

Issue 2860022: Add api to ibus for retreiving unused config values. (Closed) Base URL: ssh://gitrw.chromium.org/ibus.git
Patch Set: Code review changes Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ibusconfig.h ('k') | src/ibusconfigservice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* vim:set et sts=4: */ 1 /* vim:set et sts=4: */
2 /* ibus - The Input Bus 2 /* ibus - The Input Bus
3 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> 3 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
4 * Copyright (C) 2008-2010 Red Hat, Inc. 4 * Copyright (C) 2008-2010 Red Hat, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 gboolean retval; 294 gboolean retval;
295 295
296 retval = ibus_proxy_call ((IBusProxy *) config, 296 retval = ibus_proxy_call ((IBusProxy *) config,
297 "Unset", 297 "Unset",
298 G_TYPE_STRING, &section, 298 G_TYPE_STRING, &section,
299 G_TYPE_STRING, &name, 299 G_TYPE_STRING, &name,
300 G_TYPE_INVALID); 300 G_TYPE_INVALID);
301 g_assert (retval); 301 g_assert (retval);
302 return TRUE; 302 return TRUE;
303 } 303 }
304
305 gboolean
306 ibus_config_get_unused (IBusConfig *config,
307 GValue *unread,
308 GValue *unwritten)
309 {
310 g_assert (IBUS_IS_CONFIG (config));
311 g_assert (unread != NULL);
312 g_assert (unwritten != NULL);
313
314 IBusMessage *reply;
315 IBusError *error;
316 gboolean retval;
317
318 reply = ibus_proxy_call_with_reply_and_block ((IBusProxy *) config,
319 "GetUnused",
320 -1,
321 &error,
322 G_TYPE_INVALID);
323 if (reply == NULL) {
324 g_warning ("%s: %s", error->name, error->message);
325 ibus_error_free (error);
326 return FALSE;
327 }
328
329 if ((error = ibus_error_new_from_message (reply)) != NULL) {
330 g_warning ("%s: %s", error->name, error->message);
331 ibus_error_free (error);
332 ibus_message_unref (reply);
333 return FALSE;
334 }
335
336 retval = ibus_message_get_args (reply,
337 &error,
338 G_TYPE_VALUE, unread,
339 G_TYPE_VALUE, unwritten,
340 G_TYPE_INVALID);
341 ibus_message_unref (reply);
342 if (!retval) {
343 g_warning ("%s: %s", error->name, error->message);
344 return FALSE;
345 }
346
347 return TRUE;
348 }
OLDNEW
« no previous file with comments | « src/ibusconfig.h ('k') | src/ibusconfigservice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698