1. 30 May, 2018 4 commits
  2. 29 May, 2018 29 commits
    • Michael Natterer's avatar
    • Michael Natterer's avatar
      libgimpwidgets: remove all size negotiation/allocation code from GimpFrame · 0f484ed3
      Michael Natterer authored
      Let GtkFrame handle things and simply set "spacing" and "indent" as
      left and top margins on the frame's child.
      This fixes all tests \o/
    • Michael Natterer's avatar
      app: remove all size negotiation/allocation code from GimpDockable · 23a718c1
      Michael Natterer authored
      GtkBin does just the right thing.
    • Michael Natterer's avatar
    • Ell's avatar
      app: fix linking of test-config · e75bdf3a
      Ell authored
    • Ell's avatar
      po: update POTFILES.in · 987afcd6
      Ell authored
    • Ell's avatar
      app: fix gui_wait() cleanup · 5a66d6cc
      Ell authored
    • Ell's avatar
    • Ell's avatar
      app: use gimp_wait() to wait for histogram in threshold and levels tools · fdf33085
      Ell authored
      In the threshold and levels tools, use gimp_wait() to wait for
      histogram calculation to complete before applying auto-adjustment,
      so that a message is displayed in the meantime.  Allow the
      operation to be canceled, in which case we simply abort the auto-
      adjustment, but let the histogram calculation continue.
    • Ell's avatar
      app, pdb: wait for fonts to load before dependent operations · f2134180
      Ell authored
      Use gimp_fonts_wait(), added in the previous commit, to wait for
      fonts to finish loading before operations that depend on font
      availability.  In particular, this includes font- and text-related
      PDB functions, and text-layer rendering.
    • Ell's avatar
      app: add gimp_fonts_wait() · 0a5a4fed
      Ell authored
      ... which waits for font-loading to complete, using gimp_wait() to
      show a message while waiting.
      Note that we don't currently allow the wait to be canceled, since
      it may have unpredictable effects on plug-ins, but the interface is
      such that the wait might not complete, so calling code should be
      prepared for that.
    • Ell's avatar
      app: add gimp_wait() · cec17de3
      Ell authored
      Add a GimpGui::wait() virtual function, and a corresponding
      gimp_wait() function.  The function takes an object implementing
      the GimpWaitable interface, and a printf-style message, and waits
      for the object to become ready, displaying the message as
      indication in the meantime.  The default implementation simply
      prints the message to STDERR.
      Implement the function in gui-vtable, using the busy-dialog plug-
      in added in the previous commit, to display the message in a
      dialog.  Additionally, if the object implements the GimpCancelable
      interface, provide a "cancel" button in the dialog, which, when
      pressed, causes gimp_cancelable_cancel() to be called on the
      object.  Note that the function keeps waiting on the object even
      after requesting cancelation; GimpTriviallyCancelableWaitable can
      be used to stop the wait once cancelation has been requested.
    • Ell's avatar
      plug-ins: add busy-dialog plug-in · 032e95fa
      Ell authored
      This plug-in is used internally to show an interactive dialog in a
      separate process, while the main process is blocking waiting for an
      operation to complete.  The dialog shows a custom message in a
      GimpBusyBox, and potentially a "cancel" button, allowing the
      operation to be canceled.  Communication with the main process is
      performed through a pair of file descriptors, passed to the plug-in
      as arguments.
    • Ell's avatar
      libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config · 97925de8
      Ell authored
      Pass the current icon theme directory to plug-ins through the
      config message, and add a gimp_icon_theme_dir() libgimp function
      for retrieving it.  Note that we already have a similar
      gimp_icon_get_theme_dir() PDB function, which we keep around, since
      it can be used to dynamically query for the current icon dir,
      unlike the former, and since it returns a dynamically-allocated
      string, while the rest of the config-related functions return
      statically allocated strings.
      Use the new function, instead of gimp_get_icon_theme_dir(), in
      gimp_ui_init().  This allows gimp_ui_init() to run without making
      any PDB calls.  Consequently, this allows us to start plug-ins that
      call gimp_ui_init() without entering the main loop in the main app.
      We're going to add a plug-in that displays an interactive dialog
      while the main app is blocking waiting for an operation to
      complete, and we need to be able to start the plug-in without
      entering the main loop, to avoid the possibility of arbitrary code
      being executed during the wait.
      Bump the protocol version.
    • Ell's avatar
      app: show indication during font loading in text tool and font views · dd096d3c
      Ell authored
      While fonts are loading, show a GimpBusyBox with an appropriate
      message above the text tool options, and make the options
      themselves insensitive, and in font views, such as in the fonts
      dialog (through gimp_container_editor_bind_to_async_set(), added in
      the previous commit).
    • Ell's avatar
      app: add gimp_container_editor_bind_to_async_set() · 03983f95
      Ell authored
      ... which takes a GimpAsyncSet and a message, and shows a
      GimpBusyBox with that message, instead of the container view, while
      the async set is nonempty.
      We're going to use this for font-loading indication in font views,
      such as in the fonts dialog.
    • Ell's avatar
      libgimpwidgets: add GimpBusyBox · 000fd8e6
      Ell authored
      GimpBusyBox is used to show a message indicating an operation is in
      progress.  It's basically just a spinner and a label, with some
      We're going to use it both in app/ and in a plug-in.
    • Ell's avatar
      app: disallow editing text layers while fonts are loading · d5bc5cad
      Ell authored
      We already avoid rendering text layers while fonts are loading,
      showing an appropriate message, but this will soon be replaced with
      waiting for the fonts to finish loading.
      Instead, don't allow the text tool to start at all while the fonts
      are loading (showing an appropriate tool message, and a BAD cursor
      modifier), and halt the tool when reloading fonts if it's already
    • Ell's avatar
      app: use GimpAsyncSet for keeping track of font loading · 1ac2b928
      Ell authored
      Replace the boolean fonts_loading member of Gimp with
      fonts_async_set, which is a GimpAsyncSet object.  This allows us
      to easily respond to the completion of font loading and reloading,
      as will be done in the next commits.
      Additionally, move the call to FcConfigSetCurrent(), used to
      activate the loaded font configuration, from the async thread to
      the main thread, just to be on the safe side, and avoid calling
      FcInitReinitialize() in gimp_fonts_reset() if font loading is still
      in progress, which is unsafe.
    • Ell's avatar
      app: fix indentation in core-types.h · 56bbd07a
      Ell authored
    • Ell's avatar
      app: add GimpAsyncSet · 80de7230
      Ell authored
      GimpAsyncSet represents a dynamic set of running GimpAsync objects.
      The objects are automatically removed from the set once they're
      GimpAsyncSet implements the GimpWaitable and GimpCancelable
      interfaces, allowing the entire set to be waited-on or canceled.
      Additionally, GimpAsyncSet provides an "empty" property, which
      indicates whether the set is empty or not.  This allows responding
      to the completion of all the GimpAsync objects through the set's
      "notify::empty" signal, or drive UI changes through property
    • Ell's avatar
      app: add GimpTriviallyCancelableWaitable · e24ce886
      Ell authored
      GimpTriviallyCancelableWaitable is a proxy object for another
      GimpWaitable object, implementing both the GimpWaitable interface
      and the GimpCancelable interface.  While waiting on the proxy
      simply waits on the underlying waitable, canceling the proxy
      doesn't affect the underlying waitable, even if it implements
      the GimpCancelable interface as well, but rather causes subsequent
      wait operations on the proxy to successfully complete immediately.
      This essentially causes cancelation to abort only the wait, rather
      than the underlying operation.
    • Ell's avatar
      app: add GimpUncancelableWaitable · 4cc92ebd
      Ell authored
      GimpUncancelableWaitable is a simple proxy object for another
      GimpWaitable object, implementing only the GimpWaitable interface.
      Its main purpose is to mask away the cancelability of an object
      implementing both GimpWaitable and GimpCancelable.
    • Ell's avatar
      app: implement GimpWaitable::try_wait() in GimpAsync · 46a80811
      Ell authored
    • Ell's avatar
      app: add GimpWaitable::try_wait() vfunc · e0c47673
      Ell authored
      ... which should never block, but rather return TRUE or FALSE
      immediately, depending on whether or not the waitable is ready.
    • Ell's avatar
      app: lower thread priority of independent async operations · e085fc5f
      Ell authored
      In gimp_parallel_run_async(), lower the priority of threads
      executing independent async operations.  Independent operations
      are generally potentially long-standing background tasks, which we
      don't want to bog down the rest of the program.
      This is currently only implemented on Linux and Windows.
    • Michael Natterer's avatar
      app: fix setting dock window size from GimpSessionInfo · e332ba00
      Michael Natterer authored
      In gimp_session_info_apply_geometry(), use gtk_window_resize() instead
      of gtk_window_set_default_size() which magically fixes things. Leave a
      big comment there because set_default_size() should just work.
    • Michael Natterer's avatar
      app: don't set a permanent size request on the canvas · 0ecf0818
      Michael Natterer authored
      Reset the canvas size request from gimp_display_shell_constructed() in
      gimp_display_shell_canvas_size_allocate() so the image window can be
      made smaller again. GTK+ 3.x always respects size requests.
    • Michael Natterer's avatar
      m4macros: forgot 2.0 -> 3.0 here · ce02f4ad
      Michael Natterer authored
  3. 28 May, 2018 7 commits