gedit 3.14 for OS X (preview)

If you’re reading this through planet GNOME, you’ll probably remember Ignacio talking about gedit 3 for windows. The windows port has always been difficult to maintain, especially due to gedit and its dependencies being a fast moving target, as well as the harsh build environment. Having seen his awesome work on such a difficult platform, I felt pretty bad about the general state of the OS X port of gedit.

The last released version for OS X was gedit 3.4, which is already pretty old by now. Even though developing on OS X (it being Unix/BSD based) is easier than Windows (for gedit), there is still a lot of work involved in getting an application like gedit to build. Things have definitely improved over the years though, GtkApplication has great support for OS X and things like the global menu and handling NSApp events are more integrated than they were before (we used the excellent GtkosxApplication from gtk-mac-integration though, so things were not all bad).

I spent most of the time on two things, the build environment and OS X integration.

Build environment

We are still using jhbuild as before, but have automated all of the previously manual steps (such as installing and configuring jhbuild). There is a single entry point (osx/build/build) which is basically a wrapper around jhbuild (and some more). The build script downloads and installs jhbuild (if needed), configures it with the right environment for gedit, bootstraps and finally builds gedit. All of the individual phases are commands which can be invoked by build separately if needed. Importantly, whereas before we would use a jhbuild already setup by the user, we now install and configure jhbuild entirely in-tree and independently of existing jhbuild installations. This makes the entire build more reliable, independent and reproducible. We now also distribute our complete jhbuild moduleset in-tree so that we no longer rely on a possibly moving external moduleset source. This too improves build reproducibility by fixing all dependencies to specific versions. To make updating and maintaining the moduleset easier, we now have a tool which:

  1. Takes the gtk-osx stable modulesets.
  2. Applies our own specific overrides and additional modules from a separate overrides file. For modules that already exist, a diff is shown and the user is asked whether or not to update the module from the overrides file. This makes it easy to spot whether a given override is now out of date, or needs to be updated (for example with additional patches).
  3. For all GNOME modules, checks if there are newer versions available (stable or unstable), and asks whether or not to update modules that are out of date.
  4. Merges all modules into two moduleset files (bootstrap.modules and gedit.modules). Only dependencies required for gedit are included and the resulting files are written to disk.
  5. Downloads and copies all required patches for each required module in-tree so building does not rely on external sources.

If we are satisfied with the end modulesets, we copy the new ones in-tree and commit them (including the patches), so we have a single self-contained build setup (see modulesets/).

All it takes now is to run

osx/build/build all

and the all of gedit and its dependencies are built from a pristine checkout, without any user intervention. Of course, this being OS X, there are always possibilities for things to go wrong, so you might still need some jhbuild juju to get it working on your system. If you try and run into problems, please report them back. Running the build script without any commands should give you an overview of available commands.

Similar to the build script, we’ve now also unified the creation of the final app bundle and dmg. The entry point for this is osx/bundle/bundle and works in a similar way as the build script. The bundle script creates the final bundle using gtk-mac-bundler, which gets automatically installed when needed, and obtains the required files from the standard build in-tree build directory (i.e. you’ll have to run build first).

OS X Integration

Although GtkApplication takes care of most of the OS X integration these days (the most important being the global menu), there were still quite some little issues left to fix. Some of these were in gtk+ (like the menu not showing [1], DND issues [2], font anti-aliasing issues [3] and support for the openFiles Apple event [4]), of which some have been already fixed upstream (others are pending). We’ve also pushed support for native 10.7 fullscreen windows into gtk+ [5] and enabled this in gedit (see screenshot). Others we had fixed inside gedit itself. For example, we now use native file open/save dialogs to better integrate with the file system, have better support for multiple workspaces, improved support for keeping the application running without windows, making enchant (for the spell checker) relocatable and have an Apple Spell backend, and other small improvements.

Besides all of these, you of course also get all the “normal” improvements that have gone into gedit, gtk+ etc. over the years! I think that all in all this will be the best release for OS X yet, but let it not be me to be the judge of that.

gedit 3.13.91 on OS X

We are doing our best to release gedit 3.14 for OS X at the same time as it will be released for linux, which is in a little bit less than a month. You can download and try out gedit 3.13.91 now at:

ftp://ftp.gnome.org/pub/GNOME/binaries/mac/gedit/beta/Gedit-3.13.91-dbg-1.dmg

It would be really great to have people owning a mac try this out and report bugs back to us so we can fix them (hopefully) in time for the final release. Note that Gedit 3.14 will require OS X 10.7+, we no longer support OS X 10.6.

[1] [Bug 735122] GtkApplication: fix global menubar on Mac OS
[2] [Bug 658722] Drag and Drop sometimes stops working
[3] [Bug 735316] Default font antialiasing results in wrong behavior on OS X
[4] [Bug 722476] GtkApplication mac os tracker
[5] [Bug 735283] gdkwindow-quartz: Support native fullscreen mode

This entry was posted in gedit. Bookmark the permalink.

11 Responses to gedit 3.14 for OS X (preview)

  1. Bastien says:

    Good stuff!

    And Adwaita in GTK+ means it doesn’t like horrible without a theming engine :)

  2. Ole says:

    Cool! I will try it on my Mavericks machine.

  3. Stefan says:

    Great! But is there any chance for support for retina resolutions? Right now it looks out of place on my MacBook Pro.

  4. Gorenge says:

    What a tragedy that you no longer support 10.6. There are many developers who still use 10.6 because it is the last version that supports Power PC code via Rosetta. I find the decision to drop 10.6 is very short sighted.

    Sublime 2 has no problems on 10.6.

  5. Aaron says:

    Fired up the beta, and it looks great. Good job. Only 2 issues so far:-

    * right click context menus don’t seem to work. You can get them to appear, but mouse over highlighting and clicking on the menu items does not work
    * how/where do I add additional plugins (like the terminal plugin)?

    I would have raised a bug for the first point, but I’m unsure of what component it would fall under? Anyway, great work so far, look forward to the final release!

    • Jesse van den Kieboom says:

      Hey Aaron, thanks for trying it out. The context menu issue is known, it’s a problem at the gtk+/gdk level and I haven’t yet looked into it. It’s one of the remaining issues (together with scrolling sensitivity and focus) that would be nice to be solved, but are not at the gedit level. The second issue works basically the same as on other platforms, you can install plugins locally in ~/.local/share/gedit/plugins. The terminal plugin isn’t there because the terminal widget that we use (vte) only works on linux.

      • Jesse van den Kieboom says:

        So I actually tried to compile vte on OS X, and after a few patches I can manage to make it work. I don’t know how stable it is, but at least the gedit plugin seems to be working. I’ll include it in the next release, thanks!

  6. Gertwin says:

    Thanks for this new version, it looks good.
    I found a few issues, what is the right place to report them?

    – Full screen mode works as expected but the keyboard shortcut (F11) does not work.
    ctrl+cmd+F is used for full screen mode on osx.

    – The gtk file-open dialog is used by the add color scheme button.

    – Quit gedit with an unsaved file, when asked to save changes before closing, the option save saves the file but leaves gedit open.

  7. Pingback: Club Silencio » 3.14 almost there

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>