Граф коммитов

17 Коммитов

Автор SHA1 Сообщение Дата
fujiwarat 6042974152 engine: Delete gensimple.py and update autogen.sh
Will replace gensimple.py with the new one later. Also update autogen.sh
to delete distro genaration files.
2020-08-21 08:17:59 +09:00
fujiwarat 85b647a1c5 src/tests: Fix IBus test cases for gnome-desktop-testing
- dconf/config.c: Replaced dconf_client_write_fast() with
  dconf_client_write_sync() because
  dconf_client_write_fast() does not syn the data when
  ibus_config_get_values() is called immediately after
  ibus_config_set_value() is called.

- ibus-compose-locales.in returns the return value of ibus-compose

- ibus-compose: Set $NO_AT_BRIDGE to suppress a AT_SPI warning
  and call g_log_set_always_fatal() because GtkIMContextSimple
  does not support multiple compose outputs yet and the API can
  suppress a warning.

- ibus-config: Delete async watch testings which causes several errors
  with gnome-shell testing and the testing is now deprecated and
  GSettings is recommended.

- ibus-desktop-testing-runner.in: Support --output=log:stdout to
  cat the log to stdout and Use dbus-launch --exit-with-session instead of
  --sh-syntax and count PASS of test cases instead of PASS of
  gnome-desktop-testing and always run ibus exit and kill
  gnome-shell-calendar-server

- ibus-engine-switch.c: Set xkb🇯🇵:jpn if gnome-shell sets xkb🇺🇸:eng

- ibus-inputcontext.c: Use ibus_bus_get_global_engine() instead of
  ibus_bus_list_active_engines() since ibus_bus_list_active_engines()
  does not work with gnome-shell and the API is now deprecated.

- ibus-keypress.c: Set $NO_AT_BRIDGE to suppress a AT_SPI warning
2019-07-24 17:27:37 +09:00
fujiwarat a8e8b694dc data/dconf: Delete dconf dependencies
gsettings-schema-convert has not worked with python3 since GConf
has been deprecated since 2011 so we cannot disable python2
in canse GConf is enabled.
I don't wish to maintain both ibus.schemas.in and
org.freedesktop.ibus.gschema.xml.in and now decide to delete
whole the GConf builds.
gsettings is now stable and can be used instead.
ibus-dconf will be deperecated in the near future.

BUG=https://bugzilla.gnome.org/show_bug.cgi?id=759334
2018-10-03 17:01:59 +09:00
fujiwarat a186059edc conf/gconf: Fix SEGV in ibus_config_gconf_get_values
BUG=https://github.com/ibus/ibus/issues/1858
R=shawn.p.huang@gmail.com

Review URL: https://codereview.appspot.com/300810043
2016-05-26 12:22:53 +09:00
fujiwarat 845528b91b Replace code.google.com with github.com
R=Shawn.P.Huang@gmail.com

Review URL: https://codereview.appspot.com/252740043
2015-06-29 11:54:17 +09:00
Christophe Fergeau 167d1d7841 Return non-floating ref from IBusConfigGConf::get_value
Both IBusConfigDConf::get_value and IBusConfigMemconf::get_value
return a non-floating reference, so we need to be consistent in the
gconf backend and also return a non-floating reference.

BUG=http://code.google.com/p/ibus/issues/detail?id=1712

Review URL: https://codereview.appspot.com/106830043
Patch from Christophe Fergeau <cfergeau@redhat.com>.
2014-06-06 17:20:38 +09:00
Christophe Fergeau 0d153293b7 dconf: Fix GVariant refcounting in watch_func()
IBusConfigDConf::watch_func() is roughly doing:
GVariant *variant = dconf_client_read(...)
if (variant == NULL) {
    variant = g_variant_new(...);
}
ibus_config_service_value_changed(..., variant);
g_variant_unref(variant);

The problem with that is that the GVariant returned by
dconf_client_read() is non-floating while the one returned by
g_variant_new() is floating.
Since ibus_config_service_value_changed() will take ownership of
floating references, we should not unref 'variant' if it was created
through g_variant_new(), but we must call it when 'variant' is created
through dconf_client_read() or we will leak memory.

This commit fixes that by making sure we sink the reference we got
through g_variant_new().

This was sometimes causing crashes of ibus-dconf when repeatedly running
tests/ibus-config:

(ibus-dconf:24679): GLib-CRITICAL **: g_variant_unref: assertion
'value->ref_count > 0' failed

==24679== Invalid read of size 4
==24679==    at 0x572E140: g_variant_unref (gvariant-core.c:625)
==24679==    by 0x572DBB3: g_variant_release_children (gvariant-core.c:257)
==24679==    by 0x572E202: g_variant_unref (gvariant-core.c:640)
==24679==    by 0x572DBB3: g_variant_release_children (gvariant-core.c:257)
==24679==    by 0x572E202: g_variant_unref (gvariant-core.c:640)
==24679==    by 0x518CFDE: g_dbus_message_finalize (gdbusmessage.c:534)
==24679==    by 0x5459628: g_object_unref (gobject.c:3112)
==24679==    by 0x519C911: message_to_write_data_free (gdbusprivate.c:898)
==24679==    by 0x519D687: write_message_cb (gdbusprivate.c:1353)
==24679==    by 0x510F7F2: g_simple_async_result_complete (gsimpleasyncresult.c:763)
==24679==    by 0x519CEF2: write_message_continue_writing (gdbusprivate.c:1077)
==24679==    by 0x519D040: write_message_async (gdbusprivate.c:1131)
==24679==  Address 0x5d8c9c4 is 36 bytes inside a block of size 40 free'd
==24679==    at 0x4A07577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24679==    by 0x56EDF6B: g_free (gmem.c:190)
==24679==    by 0x5706B53: g_slice_free1 (gslice.c:1112)
==24679==    by 0x572E229: g_variant_unref (gvariant-core.c:643)
==24679==    by 0x40240F: _watch_func (config.c:232)
==24679==    by 0x3DEA605D8B: ffi_call_unix64 (in /usr/lib64/libffi.so.6.0.1)
==24679==    by 0x3DEA6056BB: ffi_call (in /usr/lib64/libffi.so.6.0.1)
==24679==    by 0x544EE88: g_cclosure_marshal_generic_va (gclosure.c:1541)
==24679==    by 0x544D396: _g_closure_invoke_va (gclosure.c:831)
==24679==    by 0x5468808: g_signal_emit_valist (gsignal.c:3215)
==24679==    by 0x54699DF: g_signal_emit (gsignal.c:3363)
==24679==    by 0x4C1478D: dconf_client_dispatch_change_signal (dconf-client.c:150)

BUG=http://code.google.com/p/ibus/issues/detail?id=1712

Review URL: https://codereview.appspot.com/107800044
Patch from Christophe Fergeau <cfergeau@redhat.com>.
2014-06-06 17:17:11 +09:00
Christophe Fergeau 70ddaf10ac Fix GVariantBuilder leaks
When using g_variant_builder_new(), we must call
g_variant_builder_unref() to free it:
"You should call g_variant_builder_unref() on the return value when it
is no longer needed. The memory will not be automatically freed by any
other call.

In most cases it is easier to place a GVariantBuilder directly on the
stack of the calling function and initialise it with
g_variant_builder_init()."

One of these leaks showed up in valgrind as:
==20702== 16,416 bytes in 114 blocks are definitely lost in loss record 2,114 of 2,115
==20702==    at 0x4A0645D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20702==    by 0x56EDDF2: g_malloc (gmem.c:97)
==20702==    by 0x570691C: g_slice_alloc (gslice.c:1007)
==20702==    by 0x5729743: g_variant_builder_new (gvariant.c:3169)
==20702==    by 0x40297B: ibus_config_dconf_get_values (config.c:413)
==20702==    by 0x4E44FF2: ibus_config_service_service_method_call (ibusconfigservice.c:214)
==20702==    by 0x4E33249: ibus_service_service_method_call_cb (ibusservice.c:395)
==20702==    by 0x51880D8: call_in_idle_cb (gdbusconnection.c:4875)
==20702==    by 0x56E81D7: g_idle_dispatch (gmain.c:5319)
==20702==    by 0x56E58F1: g_main_dispatch (gmain.c:3064)
==20702==    by 0x56E6667: g_main_context_dispatch (gmain.c:3663)
==20702==    by 0x56E6859: g_main_context_iterate (gmain.c:3734)

BUG=http://code.google.com/p/ibus/issues/detail?id=1712

Review URL: https://codereview.appspot.com/104850044
Patch from Christophe Fergeau <cfergeau@redhat.com>.
2014-06-06 16:56:55 +09:00
fujiwarat 1bdcf218ee Update source files with LGP 2.1 according to COPYING.
BUG=http://code.google.com/p/ibus/issues/detail?id=1424
TEST=rpmlint

Review URL: https://codereview.appspot.com/12526043
2013-08-09 13:48:17 +09:00
Daiki Ueno 69b48942e8 Simplify component xml generation using sed
BUG=none

Review URL: https://codereview.appspot.com/7445048
2013-03-10 14:55:42 +09:00
fujiwarat ae98b5a588 Fix xmllint errors.
Review URL: https://codereview.appspot.com/6842115
2012-11-30 11:43:43 +09:00
fujiwarat 6bd9e0d2d4 Fix to load the system gvdb with $DCONF_PROFILE in dconf 0.13.4
BUG=RH#844580
TEST=Manually

Review URL: https://codereview.appspot.com/6446145
2012-08-20 10:14:01 +09:00
Daiki Ueno bed48104cc conf: always build ibus-memconf for testing
BUG=none

Review URL: https://codereview.appspot.com/6457087
2012-08-08 12:33:15 +09:00
Daiki Ueno bd4e87f390 conf: cleanup GError usage
- there are missing g_error_free
- some code assume error != NULL when setting *error
- src/tests/ibus-config.c has unconditional "unset" but it checks the return value

BUG=none

Review URL: https://codereview.appspot.com/6449103
2012-08-08 12:24:12 +09:00
fujiwarat a454448111 Support dconf 0.13.4
TEST=Manually

Review URL: https://codereview.appspot.com/6426044
2012-07-19 09:57:01 +09:00
Daiki Ueno d050c5ba6c dconf: remove workaround for self-write notification.
BUG=none
TEST=manual

Review URL: https://codereview.appspot.com/5709051
2012-02-29 12:58:46 +09:00
Peng Huang 303308e397 WIP move all conf components into conf dir 2012-02-21 11:51:51 -05:00