Very High Activity
I Use This!

News

Analyzed about 24 hours ago. based on code collected 1 day ago.
Posted 6 days ago
After implementing the new redesigned Shell of GNOME Control Center, it’s now time to move the panels to a bright new future. And the Keyboard panel just walked this step. After Allan give his usual show with new mockups (didn’t you see? Check it ... [More] here), . Check this out: The new Keyboard panel Working on this panel had me take a few conclusions: The new programming tools and facilities that Gtk+ and GLib landed make a huge difference in code legibility and code quality. GObject is awsome. Really. Since GObject is awsome, lets use all the functionality it gives us for free I tend to overdocument my code. And our beloved set of sequential pictures and music:   Excited? This is still unders heavy development, and we just started the reviews. You can check the current state here, or test the wip/gbsneto/new-keyboard-panel branch. As always, share your comments, ideas and suggestions! [Less]
Posted 6 days ago
After implementing the new redesigned Shell of GNOME Control Center, it’s now time to move the panels to a bright new future. And the Keyboard panel just walked this step. After Allan give his usual show with new mockups (didn’t you see? Check it ... [More] here), . Check this out: The new Keyboard panel Working on this panel had me take a few conclusions: The new programming tools and facilities that Gtk+ and GLib landed make a huge difference in code legibility and code quality. GObject is awsome. Really. Since GObject is awsome, lets use all the functionality it gives us for free I tend to overdocument my code. And our beloved set of sequential pictures and music:   Excited? This is still unders heavy development, and we just started the reviews. You can check the current state here, or test the wip/gbsneto/new-keyboard-panel branch. As always, share your comments, ideas and suggestions! [Less]
Posted 6 days ago
J's birthday - presents at breakfast; dug through the mountainous admin-queue, synched with Andras & Kendy.
Posted 6 days ago
J's birthday - presents at breakfast; dug through the mountainous admin-queue, synched with Andras & Kendy.
Posted 6 days ago
Gamepad support has now been merged into GNOME Games v3.21.4 !!! This means that you can play your favorite retro games using a gamepad!!! Which gamepads are supported?But you may wondering which gamepads are supported out of the box. The answer ... [More] is a lot of them! We use the SDL mappings format to map your gamepad to a standard gamepad (by this I mean a seventh generation/XBox-360 kind of gamepad). And we use a huge community maintained database of mappings, so your device would most likely be there. We use a slightly modified version of this database. See #94 and #95 for more details. Custom mappings?Well I just realized while writing this post that we had forgotten about this :sweat_smile:. But I have made a PR for it, so it should get merged soon. But as of now there is no GUI for it. Currently you can use Steam or the SDL test/controllermap tool to generate a custom mapping string as described here. Then you should paste in in a file in the user’s config directory. As per this PR this file is /gnome-games/gamecontrollerdb.txt ( is mostly ~/.config). Multiplayer supportMultiplayer games are quite well supported. As of now there is no GUI for reassigning gamepads to other players, but the default behaviour is quite predictable. Just plugin the gamepads in the order of the players and all will be well. The exact behaviour is this: the first player with no gamepad will be assigned the keyboard if there are N initially plugged-in gamepads, then they are assigned to the first N players and keyboard is assigned to player N + 1 when a gamepad is plugged in, it is assigned to the first player with no gamepad (it may not be the last one), it can replace the keyboard when a gamepad is plugged out, its player shouldn’t have any gamepad assigned but it shouldn’t change the player to which other gamepads are assigned Next stepsThe next steps involve adding a UI to remap the gamepads assigned too the players and then maybe a UI for remapping the controls if time permits. Happy gaming! [Less]
Posted 6 days ago
Gamepad support has now been merged into GNOME Games v3.21.4 !!! This means that you can play your favorite retro games using a gamepad!!! Which gamepads are supported?But you may wondering which gamepads are supported out of the box. The answer is ... [More] a lot of them! We use the SDL mappings format to map your gamepad to a standard gamepad (by this I mean a seventh generation/XBox-360 kind of gamepad). And we use a huge community maintained database of mappings, so your device would most likely be there. We use a slightly modified version of this database. See #94 and #95 for more details. Custom mappings?Well I just realized while writing this post that we had forgotten about this :sweat_smile:. But I have made a PR for it, so it should get merged soon. But as of now there is no GUI for it. Currently you can use Steam or the SDL test/controllermap tool to generate a custom mapping string as described here. Then you should paste in in a file in the user’s config directory. As per this PR this file is <config_dir>/gnome-games/gamecontrollerdb.txt (<config_dir> is mostly ~/.config). Multiplayer supportMultiplayer games are quite well supported. As of now there is no GUI for reassigning gamepads to other players, but the default behaviour is quite predictable. Just plugin the gamepads in the order of the players and all will be well. The exact behaviour is this: the first player with no gamepad will be assigned the keyboard if there are N initially plugged-in gamepads, then they are assigned to the first N players and keyboard is assigned to player N + 1 when a gamepad is plugged in, it is assigned to the first player with no gamepad (it may not be the last one), it can replace the keyboard when a gamepad is plugged out, its player shouldn’t have any gamepad assigned but it shouldn’t change the player to which other gamepads are assigned Next stepsThe next steps involve adding a UI to remap the gamepads assigned too the players and then maybe a UI for remapping the controls if time permits. Happy gaming! [Less]
Posted 6 days ago
My last week has been quite busy, but it all paid off in the end as I’ve managed to overcome the issue that I had with the login phase. Thankfully, I was able to take a look at how the postMessage() API is used to do the login in Firefox iOS and ... [More] implement it myself in Epiphany. To summarize it, this is how it’s done: Load the FxA iframe with the service=sync parameter in a WebKitWebView. Inject a few JavaScript lines to listen to FirefoxAccountsCommand events (sent by the FxA Server). This is done with a WebKitUserContentManager and a WebKitUserScript. In the event listener use postMessage() to send to back to WebKit the data received from the server. In the C code, register a script message handler with a callback that gets called whenever something is sent through the postMessage() channel. This is done with webkit_user_content_manager_register_script_message_handler(). In the callback you now hold the server’s response to your request. This includes all the tokens you need to retrieve the sync keys. Profit! Basically, postMessage() acts like a forwarder between JavaScript and WebKit. Cool! With this new sign in method, users can also benefit of the possibility to create new Firefox accounts. The iframe contains a “Create an account” link that shows a form by which the users will create a new account. The user will have to verify the account before he signs in. [Less]
Posted 6 days ago
My last week has been quite busy, but it all paid off in the end as I’ve managed to overcome the issue that I had with the login phase. Thankfully, I was able to take a look at how the postMessage() API is used to do the login in Firefox iOS and ... [More] implement it myself in Epiphany. To summarize it, this is how it’s done: Load the FxA iframe with the service=sync parameter in a WebKitWebView. Inject a few JavaScript lines to listen to FirefoxAccountsCommand events (sent by the FxA Server). This is done with a WebKitUserContentManager and a WebKitUserScript. In the event listener use postMessage() to send to back to WebKit the data received from the server. In the C code, register a script message handler with a callback that gets called whenever something is sent through the postMessage() channel. This is done with webkit_user_content_manager_register_script_message_handler(). In the callback you now hold the server’s response to your request. This includes all the tokens you need to retrieve the sync keys. Profit! Basically, postMessage() acts like a forwarder between JavaScript and WebKit. Cool! With this new sign in method, users can also benefit of the possibility to create new Firefox accounts. The iframe contains a “Create an account” link that shows a form by which the users will create a new account. The user will have to verify the account before he signs in. [Less]
Posted 6 days ago
gettext has seen quite some enhancements in recent years, after Daiki Ueno started maintaining it. It can now extract (and merge back) strings from diverse file formats, including many of the formats that are important for desktop applications. With ... [More] gettext 0.19.8, there is really no need  anymore to use intltool or GLib’s dated gettext glue (AM_GLIB_GNU_GETTEXT and glib-gettextize). Since intltool still sticks around in quite a few projects, I thought that I should perhaps explain some of the dos and don’ts for how to get by with plain gettext. Javier Jardon has been tirelessly fighting a battle for using upstream gettext, maybe this will help him reaching the finish line with that project. Extracting strings xgettext is the tool used to extract strings from sources into .pot files. In addition to programming languages such as C, C , Java, Scheme, etc, it recognizes the following files by their typical file extensions (and it is smart enough to disregard a .in extension): Desktop files: .desktop GSettings schemas: .gschema.xml GtkBuilder ui files: .ui Appdata files: .appdata.xml and .metainfo.xml You can just add these files to POTFILES.in, without the extra type hints that intltool requires. One important advantage of xgettext’s xml support, compared to intltool, is that you can install .in files that are valid; no more tag mutilation like <_description> required. Merging translations The trickier part is merging translations back into the various file formats. Sometimes that is not necessary, since the file has a reference to the gettext domain, and consumers know to use gettext at runtime: that is the case for GSettings schemas and GtkBuilder ui files, for example. But in other cases, the translations need to be merged back into  the original file before installing it. In these cases, the original file from which the strings are extracted often has an extra .in extension. The tool that is doing this task is msgfmt. Intltool installs autotools glue which can define make rules for many of these cases, such as @INTLTOOL_DESKTOP_RULE@. Gettext does not provide this kind of glue, but the msgfmt tool is versatile enough that you can write your own rules fairly easily, for example: %.desktop: %.desktop.in         msgfmt --desktop -d $(top_srcdir)/po \ --template $< -o $@ Extending gettext Gettext can be extended to understand new xml formats. To do so, you install .its and .loc files. The syntax for these files is explained in detail in the gettext docs. Libraries are expected to install these files for ‘their’ formats (GLib and GTK already do, and  PolicyKit will do the same soon. If you don’t want to wait for your favorite format to come with built-in its support, you can also include its files with your application; gettext will look for such files in $XDG_DATA_DIRS/gettext/its/.   [Less]
Posted 6 days ago
gettext has seen quite some enhancements in recent years, after Daiki Ueno started maintaining it. It can now extract (and merge back) strings from diverse file formats, including many of the formats that are important for desktop applications. With ... [More] gettext 0.19.8, there is really no need  anymore to use intltool or GLib’s dated gettext glue (AM_GLIB_GNU_GETTEXT and glib-gettextize). Since intltool still sticks around in quite a few projects, I thought that I should perhaps explain some of the dos and don’ts for how to get by with plain gettext. Javier Jardon has been tirelessly fighting a battle for using upstream gettext, maybe this will help him reaching the finish line with that project. Extracting strings xgettext is the tool used to extract strings from sources into .pot files. In addition to programming languages such as C, C++, Java, Scheme, etc, it recognizes the following files by their typical file extensions (and it is smart enough to disregard a .in extension): Desktop files: .desktop GSettings schemas: .gschema.xml GtkBuilder ui files: .ui Appdata files: .appdata.xml and .metainfo.xml You can just add these files to POTFILES.in, without the extra type hints that intltool requires. One important advantage of xgettext’s xml support, compared to intltool, is that you can install .in files that are valid; no more tag mutilation like required. Merging translations The trickier part is merging translations back into the various file formats. Sometimes that is not necessary, since the file has a reference to the gettext domain, and consumers know to use gettext at runtime: that is the case for GSettings schemas and GtkBuilder ui files, for example. But in other cases, the translations need to be merged back into  the original file before installing it. In these cases, the original file from which the strings are extracted often has an extra .in extension. The tool that is doing this task is msgfmt. Intltool installs autotools glue which can define make rules for many of these cases, such as @INTLTOOL_DESKTOP_RULE@. Gettext does not provide this kind of glue, but the msgfmt tool is versatile enough that you can write your own rules fairly easily, for example: %.desktop: %.desktop.in         msgfmt --desktop -d $(top_srcdir)/po \ --template $< -o $@ Extending gettext Gettext can be extended to understand new xml formats. To do so, you install .its and .loc files. The syntax for these files is explained in detail in the gettext docs. Libraries are expected to install these files for ‘their’ formats (GLib and GTK+ already do, and  PolicyKit will do the same soon. If you don’t want to wait for your favorite format to come with built-in its support, you can also include its files with your application; gettext will look for such files in $XDG_DATA_DIRS/gettext/its/.   [Less]