Commit Graph

140 Commits

Author SHA1 Message Date
Carsten Haitzler 921f5208e7 xkb config - fix segv on close advanced mode dialog
didnt remove the lists with del callbacks that accessed the cfdata
struct to set lisrts to null on del before cfdata was freed...
callback hell. yay.

@fix
2022-01-21 16:10:38 +00:00
Carsten Haitzler 7d694d6eea xkb settings - fix typo copy & paste for advanced add ctrl opts
this fixes T8947

@fix
2021-07-08 17:51:02 +01:00
Carsten Haitzler a8fb845242 e module and gad icons - fix some icons missed thay were hiding 2021-04-17 13:53:26 +01:00
Alastair Poole 2ee80c2335 xkbswitch: Alternative lookup path.
Fedora.
2021-03-26 10:20:30 +00:00
Alastair Poole c1a8ae187e modules. Small text fixes for modules, module.desktop 2020-07-19 12:34:47 +01:00
Carsten Haitzler 0b1c4100ef e gadgets - as per email to e-devbel - it's easier to fix old so rm new
new gadget infra--
2020-07-07 23:34:27 +01:00
Carsten Haitzler fdd472879b xkb - make basic variant null now and handle in wl too the same as x
now russian works for me. :)

fixes T7979

@fix
2019-08-09 09:50:33 +01:00
Carsten Haitzler 7c4e58a2fc xkb - module - fix use after free - duplicate layout info instead
instead of referring to what migh tbe deleted under us - make a dup of
it to tsatore locally. fixes segv on kbd layout change

@fix
2019-08-09 00:39:19 +01:00
Stephen 'Okra' Houston b90d8024fa XKBswitch gadget: Make sure to update the wayland keymap index.
Fixes T6321
2019-01-16 13:26:27 -05:00
Michael Bouchaud (yoz) 64b9f1e58b xkbswitch: Change layout keyboard on double left-click
Summary:
We move the creation of the popup to a timer to let double left click
event occur. This timer is set to the current double click time value.

@fix T354

Reviewers: zmike, devilhorns

Reviewed By: zmike

Subscribers: cedric

Tags: #enlightenment-git

Maniphest Tasks: T354

Differential Revision: https://phab.enlightenment.org/D7568
2019-01-10 11:36:22 +01:00
Carsten Haitzler e4339f4819 bryce - improve usability from code and user by having std right menu
now right click on any gagdte in bryce and they ALL have a menu that
allows removal of the gagdte bar or the gadget as well as access to
gadget settings AND the ability for gadgets to extendthis menu like
lunhcer does per icon. now it's standard behavior everywhere which is
much easier to use and discover. it also removes code from every
gadget to do their own "button 3" handling as its handled centrally
making the code in gadgets simpler.

this is part of my effort to improve usability (mostly discoverability
and accessibility of settings/features).

also  long press left mouse gets u gadget right click menu

this has to move many modules/gadgets actions to mouse up instead of
mouse down so the bryce has a chance to trap the events first and set
hold flags. but now long press for 0.5 sec and bryce menu come sup
(with left mouse .. so touch friendly).

in addition move context menu hanbdling to e_gadget instead of in
bryce and in e_gadget. a context callback is called so different
systems can still do different things. this should probably change to
always pop up a mnenu and simple call populate callbacks for site
owner specific content.

all in all it makes the new gagdtes more consistent, easier to use
(without a right mouse button), doesn't need special action bindings
etc. etc.
2018-10-11 16:25:10 +01:00
Ross Vandegrift 629f7d41c8 clean up .desktop files and misc typos
Summary:
Drop deprecated Encoding key from desktop files

The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded.  See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html

Fix various typos and misspellings

lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries.  This change fixes the ones it identified in 0.22.1.

Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5585
2018-01-04 09:57:52 -05:00
Mike Blumenkrantz 5f75193054 always set gadget ids when creating new non-demo gadgets
ensure gadgets aren't pruned on edit end
2017-09-01 13:40:12 -04:00
Mike Blumenkrantz b5e75eb264 formatting
lot of mixed spaces/tabs here made the code unreadable
2017-08-29 15:32:18 -04:00
Stephen 'Okra' Houston ad46d041a8 Gadgets: Don't set gadgets to expand. 2017-08-23 09:55:59 -05:00
Marcel Hollerbach 29901d67b2 meson: use file instead of doing the relative path by hand
a reason for doing that is that you can just pack together targets into
a array and pass them to our helper, and the helper will just handle
them, so even module with eldbus codegen etc is now supported.

This also means that we are just passing the src object directly into
the shared_module call, which means the user of our helper can just pack
everything he needs into the src var and the helper does not need to
know about it.
2017-08-08 18:38:37 +02:00
Carsten Haitzler 69290dd7f4 e module build - make build files far more generic and far smaller
now mdoule build files that fllow one pattern (the most common by far)
all JUSt list their souce files and nothing else. this really cuts
down on build size/complexity.

there are other patterns too (no icons at all) that i'll do next, then
we're down into "weird" land where i'll have to think of some more
interesting ways to deal with this.
2017-07-29 08:55:36 +09:00
Carsten Haitzler 84bf48b3ed module build - clean up and fix meson install of pretty much all modules
so we';re missing installing desktop files. edj icon files, wizard
data files in the wrong place, and much more. this also cleans up the
module meson build of pretty much all modules and make their build
files cimple and consistent so it's far easier to re-use things from
one module to the next. we should aim for simplicity, consistency
between as much as possible so we can refactor and turn into maybe
functions later. imho that starts with consistency though. until i can
see all the common patterns clearly, i don't want to write functions
yet. it's easier to see if all the files are consistently using the
same vars and formatting etc. etc. etc.

but either way the installation needs fixing so it installs all files
in the right places with the right permissions etc. etc. etc.

this doesn't fix all module build files bt all the ones i found that
were broken installs and they use what i think is a cleaner/simpler
template, BUT there is far too much copy & pastage here... far too
much.i need to find a cleaner way to automate this.
2017-07-27 14:29:30 +09:00
Mike Blumenkrantz e8dc71cd48 meson. 2017-07-20 17:18:33 -04:00
Mike Blumenkrantz b7e8e886e9 do not generate module.desktop files
the purpose of this is to allow variable substitutions, but no desktop
files do this so it's a waste of build time for no reason
2017-07-14 18:40:50 -04:00
Stephen 'Okra' Houston 9e7b78ffab Gadgets: Make sure to avoid conflicts with functions and globals. 2017-07-12 16:03:06 -05:00
Stephen 'Okra' Houston 202bf770f4 Gadgets: Follow gadget theme naming conventions. 2017-07-06 12:20:53 -05:00
Stephen 'Okra' Houston 7ff0e585ac Gadgets: Remove the word "Gadget" from the name of gadgets. 2017-06-08 15:27:24 -05:00
Mike Blumenkrantz 556bc10121 remove unnecessary comparison when applying new keyboard layout in gadget 2017-05-25 15:03:28 -04:00
Stephen 'Okra' Houston 9d0bcd9ce2 Gadgets: Send proper theme strings, and set aspect/size correctly. 2017-05-12 15:38:45 -05:00
Stephen 'Okra' Houston 20f94cec74 Bryce/Gadgets: Add backlight, xkbswitch, and mixer gadgets. This should round out the core gadget ports.
All three of these gadgets are ports of the existing modules of the same name and are contained within those directories.  Once the move from shelves -> bryce and gadcon->gadgets is complete, backlight and mixer will likely need to go into the sysinfo gadget.
2017-05-11 17:13:15 -05:00
Stephen 'Okra' Houston 43ebf4a011 Xkbswitch: Use E_Dialog (which uses elm) instead of elm_win directly to make use of built in extra features. 2017-04-17 14:08:03 -05:00
Mike Blumenkrantz 20dfb3c0df use show instead of bring_in for xkbswitch layout add dialog 2017-03-17 13:16:59 -04:00
Stephen 'Okra' Houston d85617cda7 xkbswitch: Remove e_widgets from the add dialog and replacing them with elm
This greatly improves the speed and sizing problems with the add layout dialog.
2017-03-15 16:44:47 -05:00
Al Poole 955a21d5ef E keyboard settings - use the same icon as the keyboard settings dialog
Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4716
2017-03-13 12:33:38 -04:00
Mike Blumenkrantz 4fc6fcf1e3 don't set minw for keyboard layout dialog
somehow this causes the dialog to size crazily for a couple seconds
before growing to its final size
2017-03-10 15:55:42 -05:00
Mike Blumenkrantz 0266601a29 remove del callbacks for xkbswitch list config objects
==10821== Invalid write of size 8
==10821==    at 0x28168A4B: _list_del (e_mod_config.c:455)
==10821==    by 0x78F6C78: _eo_evas_object_cb (evas_callbacks.c:192)
==10821==    by 0xE597F3A: _event_callback_call (eo_base_class.c:1422)
==10821==    by 0xE598161: _efl_object_event_callback_legacy_call (eo_base_class.c:1491)
==10821==    by 0xE59BC8F: efl_event_callback_legacy_call (efl_object.eo.c:146)
==10821==    by 0x7932A4D: _efl_canvas_object_efl_object_event_callback_legacy_call (evas_object_main.c:1012)
==10821==    by 0xE59BC8F: efl_event_callback_legacy_call (efl_object.eo.c:146)
==10821==    by 0x78F7537: evas_object_event_callback_call (evas_callbacks.c:364)
==10821==    by 0x7932C9B: _efl_canvas_object_efl_object_destructor (evas_object_main.c:1042)
==10821==    by 0xE599F2A: efl_destructor (efl_object.eo.c:58)
==10821==    by 0x5033E3F: _elm_interface_atspi_accessible_efl_object_destructor (elm_interface_atspi_accessible.c:609)
==10821==    by 0xE599F2A: efl_destructor (efl_object.eo.c:58)
==10821==    by 0x511E8DB: _elm_widget_efl_object_destructor (elm_widget.c:5866)
==10821==    by 0xE599F2A: efl_destructor (efl_object.eo.c:58)
==10821==    by 0xE58D31E: _efl_del_internal (eo_private.h:248)
==10821==    by 0xE58D6E5: _efl_unref_internal (eo_private.h:323)
==10821==    by 0xE58F9CA: _efl_object_call_end (eo.c:620)
==10821==    by 0xE599203: efl_del (efl_object.eo.c:18)
==10821==    by 0x7932565: evas_object_del (evas_object_main.c:902)
==10821==    by 0x510EC99: _elm_widget_efl_canvas_group_group_del (elm_widget.c:461)
==10821==    by 0x7948FE8: efl_canvas_group_del (efl_canvas_group.eo.c:36)
==10821==    by 0x505ACC0: _elm_layout_efl_canvas_group_group_del (elm_layout.c:813)
==10821==    by 0x7948FE8: efl_canvas_group_del (efl_canvas_group.eo.c:36)
==10821==    by 0x7946ED7: evas_object_smart_del (evas_object_smart.c:1076)
==10821==    by 0x7933114: _efl_canvas_object_efl_object_destructor (evas_object_main.c:1095)
==10821==    by 0xE599F2A: efl_destructor (efl_object.eo.c:58)
==10821==    by 0x5033E3F: _elm_interface_atspi_accessible_efl_object_destructor (elm_interface_atspi_accessible.c:609)
==10821==    by 0xE599F2A: efl_destructor (efl_object.eo.c:58)
==10821==    by 0x511E8DB: _elm_widget_efl_object_destructor (elm_widget.c:5866)
==10821==    by 0xE599F2A: efl_destructor (efl_object.eo.c:58)
==10821==    by 0xE58D31E: _efl_del_internal (eo_private.h:248)
==10821==    by 0xE58D6E5: _efl_unref_internal (eo_private.h:323)
==10821==    by 0xE58F9CA: _efl_object_call_end (eo.c:620)
==10821==    by 0xE599203: efl_del (efl_object.eo.c:18)
==10821==    by 0x7932565: evas_object_del (evas_object_main.c:902)
==10821==    by 0x510EC99: _elm_widget_efl_canvas_group_group_del (elm_widget.c:461)
==10821==    by 0x7948FE8: efl_canvas_group_del (efl_canvas_group.eo.c:36)
==10821==    by 0x4F4D549: _elm_box_efl_canvas_group_group_del (elm_box.c:412)
==10821==    by 0x7948FE8: efl_canvas_group_del (efl_canvas_group.eo.c:36)
==10821==    by 0x7946ED7: evas_object_smart_del (evas_object_smart.c:1076)
==10821==    by 0x7933114: _efl_canvas_object_efl_object_destructor (evas_object_main.c:1095)
==10821==    by 0xE599F2A: efl_destructor (efl_object.eo.c:58)
==10821==    by 0x5033E3F: _elm_interface_atspi_accessible_efl_object_destructor (elm_interface_atspi_accessible.c:609)
==10821==    by 0xE599F2A: efl_destructor (efl_object.eo.c:58)
==10821==    by 0x511E8DB: _elm_widget_efl_object_destructor (elm_widget.c:5866)
==10821==    by 0xE599F2A: efl_destructor (efl_object.eo.c:58)
==10821==    by 0xE58D31E: _efl_del_internal (eo_private.h:248)
==10821==    by 0xE58D6E5: _efl_unref_internal (eo_private.h:323)
==10821==    by 0xE58F9CA: _efl_object_call_end (eo.c:620)
==10821==    by 0xE599203: efl_del (efl_object.eo.c:18)
==10821==  Address 0x2c731708 is 184 bytes inside a block of size 456 free'd
==10821==    at 0x4C2ED4A: free (vg_replace_malloc.c:530)
==10821==    by 0x28165F69: _free_data (e_mod_config.c:249)
==10821==    by 0x49D92E: _e_config_dialog_free (e_config_dialog.c:156)
==10821==    by 0x546D2F: e_object_free (e_object.c:119)
==10821==    by 0x546F4B: e_object_unref (e_object.c:152)
==10821==    by 0x546B5E: e_object_del (e_object.c:60)
==10821==    by 0x49E233: _e_config_dialog_cb_dialog_del (e_config_dialog.c:333)
==10821==    by 0x546B34: e_object_del (e_object.c:58)
==10821==    by 0x4AA23C: _e_dialog_cb_key_down (e_dialog.c:357)
==10821==    by 0x78F6CB4: _eo_evas_object_cb (evas_callbacks.c:199)
==10821==    by 0xE597F3A: _event_callback_call (eo_base_class.c:1422)
==10821==    by 0xE598161: _efl_object_event_callback_legacy_call (eo_base_class.c:1491)
==10821==    by 0xE59BC8F: efl_event_callback_legacy_call (efl_object.eo.c:146)
==10821==    by 0x7932A4D: _efl_canvas_object_efl_object_event_callback_legacy_call (evas_object_main.c:1012)
==10821==    by 0xE59BC8F: efl_event_callback_legacy_call (efl_object.eo.c:146)
==10821==    by 0x78F7537: evas_object_event_callback_call (evas_callbacks.c:364)
==10821==    by 0x7906AD8: _canvas_event_feed_key_down_internal (evas_events.c:3112)
==10821==    by 0x7909281: _evas_canvas_event_key_cb (evas_events.c:3960)
==10821==    by 0xE597E57: _event_callback_call (eo_base_class.c:1399)
==10821==    by 0xE598161: _efl_object_event_callback_legacy_call (eo_base_class.c:1491)
==10821==    by 0xE59BC8F: efl_event_callback_legacy_call (efl_object.eo.c:146)
==10821==    by 0x65FDE63: _direct_key_updown_cb (ecore_evas.c:4664)
==10821==    by 0x65FDFC9: _ecore_evas_input_direct_cb (ecore_evas.c:4692)
==10821==    by 0x6813D6E: _ecore_event_evas_key (ecore_input_evas.c:429)
==10821==    by 0x6814A8D: ecore_event_evas_key_down (ecore_input_evas.c:707)
==10821==    by 0xDBD7AF6: _ecore_call_handler_cb (ecore_private.h:317)
==10821==    by 0xDBD8A85: _ecore_event_call (ecore_events.c:518)
==10821==    by 0xDBE1AEF: _ecore_main_loop_iterate_internal (ecore_main.c:2380)
==10821==    by 0xDBDF89D: ecore_main_loop_begin (ecore_main.c:1290)
==10821==    by 0x441BB4: main (e_main.c:1093)
==10821==  Block was alloc'd at
==10821==    at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
==10821==    by 0x28165773: _create_data (e_mod_config.c:182)
==10821==    by 0x49DBBC: _e_config_dialog_go (e_config_dialog.c:204)
==10821==    by 0x49D4E9: e_config_dialog_new (e_config_dialog.c:80)
==10821==    by 0x28165625: _xkb_cfg_dialog (e_mod_config.c:141)
==10821==    by 0x49EACF: e_configure_registry_call (e_configure.c:72)
==10821==    by 0x314400C3: _e_mod_run_cb (e_mod_main.c:165)
==10821==    by 0x53DA23: _e_menu_active_call (e_menu.c:2045)
==10821==    by 0x53F7CC: _e_menu_cb_mouse_up (e_menu.c:2778)
==10821==    by 0xDBD7AF6: _ecore_call_handler_cb (ecore_private.h:317)
==10821==    by 0xDBD8A85: _ecore_event_call (ecore_events.c:518)
==10821==    by 0xDBE1AEF: _ecore_main_loop_iterate_internal (ecore_main.c:2380)
==10821==    by 0xDBDF89D: ecore_main_loop_begin (ecore_main.c:1290)
==10821==    by 0x441BB4: main (e_main.c:1093)
2017-02-10 17:24:13 -05:00
Mike Blumenkrantz 97f1c83712 simplify xkbswitch rule parsing, ensure resource freeing
ref 0fd251c437

CID 1368345
2017-02-10 17:24:13 -05:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Mike Blumenkrantz 0fd251c437 free string pointer in xkbswitch parsing
CID 1368345
2017-02-03 15:13:45 -05:00
Carsten Haitzler 4b31fe5050 xkb module - fix possible use of uninitialized var 2016-12-28 19:55:24 +09:00
Chris Michael 72a2758b5a fix comparison between signed and unsigned int expressions in
xkbswitch module

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-15 10:19:57 -05:00
Chris Michael a11492784d fix formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-15 10:19:21 -05:00
Chris Michael 3a714c6e04 add missing EINA_UNUSED for unused function parameters
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-15 10:17:19 -05:00
Michaël Bouchaud (yoz) 15c0d46050 xkbswitch: rewrite the config panel to improve the gui design 2016-12-11 21:25:17 +01:00
Marcel Hollerbach 1aea5ab079 e_xkb: reconfig when we have set a new set of layouts
When in the config dialog a new set of layouts is created, this set has
to be told to the displayserver. Like at the startup of e, so calling
e_xkb_reconfig().

fix T3072
2016-05-12 21:02:40 +02:00
Mike Blumenkrantz 5d300bcb46 fix usage of e_object_unref in xkbswitch when managing new kbd dialog
probably harmless?
2016-05-11 15:40:09 -04:00
Shuhrat Dehkanov 79e1928427 xkbswitch: establish parent/child relationship
Summary:
There is an edge case that results in SIGFAULT in Enlightenment when
"Keyboard Settings" dialog is closed prior to "Add New Configuration"
dialog and "OK" button is pressed in the latter one.
This makes sure that closing the dialogs follows the parent/child logic.

@fix

Test Plan:
1. Go to Settings -> All -> Input -> Keyboard and press "Add"
2. Observe that "Add New Configuration" dialog is opened
3. Select/highlight any new layout
4. Go back to "Keyboard Settings" dialog and close it
5. Press "OK" in "Keyboard Settings" dialog
6. Observe that Enlightenment sigfaults

Reviewers: zmike, raster

Subscribers: cedric, seoz

Differential Revision: https://phab.enlightenment.org/D3901
2016-04-18 12:00:20 -04:00
Marcel Hollerbach 19db5f256c e_xkb: init before e_comp_wl init
for the case e_xkb gets initialized, we need to init it before ecore_drm
is called, otherwise ecore_drm will create his own context and keymap,
which will be overriden a few moment later when e_xkb is initializied.
So by calling e_comp_wl_input_keymap_set before ecore_drm_init the
correct context and keymap is set and no useless elements are created.

The mainproblem is that the comp_type is set when the compositor is
already running, so we have to pass the type at the init to the e_xkb
to tell for which kind of compositor we are running.
2016-03-24 20:54:03 +01:00
Carsten Haitzler 0d9af6c3d6 e xkbswitch: don't free layouts that are just pointed to in instances
we free the instance layout even though tthis is never duplicated but
jhust set to point to the current_layout. don't free it as this causes
a double-free. this fixes a crash here.

@fix
2016-03-08 13:45:59 +09:00
Mike Blumenkrantz bbd4d2fbae force changed when adding or removing keyboard layouts in config
fix T3208
2016-02-26 16:45:44 -05:00
Chris Michael c692381f2e add missing EINA_UNUSED for _xkb_changed_state function
This function does not use the event parameter, so mark it as unused

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-25 14:02:48 -05:00
Marcel Hollerbach 1c7cd941d0 xkbswitch: change icon if E_EVENT_XKB_CHANGED is emitted 2016-01-18 22:14:45 +01:00
Marcel Hollerbach bd7136ade1 xkbswitch: enable module for wayland 2016-01-18 22:14:45 +01:00
Mike Blumenkrantz 4ef9d9e518 attempt to maintain currently-selected kbd layout when modifying kbd list
the previous behavior would just set up the new layouts, resulting in
the first layout in the list being applied. now it should be the case
that if the current layout has not been deleted, it will continue to
remain in effect; alternatively if the current layout has been modified,
it's now more likely to be picked up and used
2015-09-22 14:17:35 -04:00