...
 
Commits (75)
===============
Version 3.31.91
===============
Changes since last release:
• Fix three-finger-swipe gesture in keyboard shortcuts.
• Respect sort-directories-first gsetting in project-tree.
• Icons for the newcomers initiative have updated.
• Loading of custom gtksourceview style schemes has been restored.
• gnome-builder -e will now open a new editor window.
• Plugins can now add delay in "settling" the buffer before saving.
• The git plugin will settle for updated line changes before the buffer
can be saved. This fixes an issue with trim-spaces plugin not trimming
all of the expected lines.
• Builder's flatpak-based fusermount wrapper was simplified. This could
use testing with regards to rofiles and flatpak-builder.
• Various search workflow improvements.
• The VCS file monitor now contains a sequence number that can be used to
optimize some additional work such as installing a project. Builder will
no longer install the project before each project Run unless a file within
the project tree has changed. Projects that rely on external files will
need to press "Build" before "Run" if only external files have changed.
• Improvements to guessing language syntax when a buffer is created.
• Add an experimental podman runtime provider. This is not enabled by
default and we do not recommend enabling it at this time.
• Updated translations.
Thanks to the many contributors that provided patches during this cycle!
===============
Version 3.31.90
===============
......
......@@ -82,6 +82,14 @@
<translation type="gettext">gnome-builder</translation>
<releases>
<release version="3.31.91" date="2019-02-18">
<description>
<p>
This release contains a number of bug fixes and performance improvements.
</p>
</description>
</release>
<release version="3.31.90" date="2019-02-06">
<description>
<p>
......
......@@ -3,7 +3,7 @@
<key name="show-icons" type="b">
<default>true</default>
<summary>Show Icons</summary>
<description>If enabled, the project tree will display icons next to each item.</description>
<description>This setting is deprecated and no longer in use.</description>
</key>
<key name="show-ignored-files" type="b">
<default>false</default>
......
......@@ -6,6 +6,10 @@ import sys
_resources = {}
_aliases = {}
_ignore = (
'org.gnome.Builder.svg',
'org.gnome.Builder-symbolic.svg',
)
def addResource(directory, name):
if directory not in _resources:
......@@ -42,6 +46,8 @@ for dirname in ('actions', 'mimetypes'):
# We need larger versions for apps
for dirname in ('apps',):
for name in sort(os.listdir(os.path.join('scalable', dirname))):
if name in _ignore:
continue
for size in (16, 32, 48, 128, 256, 512):
outdir = '%dx%d/%s' % (size, size, dirname)
path = os.path.join('scalable', dirname, name)
......
......@@ -14,8 +14,8 @@
viewBox="0 0 80.000001 54"
id="svg6660"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="two-finger-swipe-left.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="gesture-two-finger-swipe-left.svg"
inkscape:export-filename="/home/aday/Scratch/two-finger-swipe-left.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
......@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-26.486277"
inkscape:cy="27.97415"
inkscape:cx="47.816886"
inkscape:cy="30.773396"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
......@@ -53,7 +53,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
......@@ -96,12 +96,12 @@
ry="4.1854858"
rx="3.999995" />
<rect
rx="3.999995"
rx="3.9999847"
ry="4.1854858"
y="460"
y="452.31021"
x="-261"
height="36.000011"
width="7.99999"
height="43.689785"
width="7.9999695"
id="rect6623"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<rect
......@@ -138,8 +138,8 @@
sodipodi:rx="7.4999938"
sodipodi:ry="7.5000024"
sodipodi:start="3.4953343"
sodipodi:end="1.8407347"
d="m -273.03562,448.40192 a 7.4999938,7.5000024 0 0 1 9.43617,-4.50737 7.4999938,7.5000024 0 0 1 4.76917,9.30661 7.4999938,7.5000024 0 0 1 -9.16976,5.02725"
sodipodi:end="6.0213859"
d="m -273.03562,448.40192 a 7.4999938,7.5000024 0 0 1 7.38028,-4.894 7.4999938,7.5000024 0 0 1 6.89978,5.55094"
sodipodi:open="true" />
<path
d="m -268.10552,458.34925 a 7.4999938,7.5000024 0 0 1 -9.38146,4.80209 7.4999938,7.5000024 0 0 1 -4.92078,-9.31976 7.4999938,7.5000024 0 0 1 9.25653,-5.03869"
......@@ -167,6 +167,18 @@
height="4.99999"
x="283"
y="-458" />
<path
sodipodi:open="true"
d="m -258.66038,449.14725 a 7.4999938,7.5000024 0 0 1 8.17716,3.07767 7.4999938,7.5000024 0 0 1 -0.28587,8.73249 7.4999938,7.5000024 0 0 1 -8.36094,2.53626 7.4999938,7.5000024 0 0 1 -5.0892,-7.10198"
sodipodi:end="3.1415927"
sodipodi:start="4.4505896"
sodipodi:ry="7.5000024"
sodipodi:rx="7.4999938"
sodipodi:cy="456.39169"
sodipodi:cx="-256.71924"
sodipodi:type="arc"
id="path828"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
</g>
</g>
</g>
......
......@@ -14,8 +14,8 @@
viewBox="0 0 80.000008 55.000024"
id="svg6535"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="two-finger-swipe-right.svg">
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="gesture-two-finger-swipe-right.svg">
<defs
id="defs6537" />
<sodipodi:namedview
......@@ -25,9 +25,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="-59.169932"
inkscape:cy="48.63391"
inkscape:zoom="1"
inkscape:cx="16.303253"
inkscape:cy="36.239139"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
......@@ -50,7 +50,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
......@@ -95,10 +95,10 @@
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect6519"
width="7.99999"
height="36.000011"
width="8"
height="43.689793"
x="-297"
y="380"
y="372.31021"
ry="4.1854858"
rx="3.999995" />
<rect
......@@ -134,8 +134,8 @@
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;enable-background:accumulate" />
<path
sodipodi:open="true"
d="m -309.03562,368.40192 a 7.4999938,7.5000024 0 0 1 9.43617,-4.50737 7.4999938,7.5000024 0 0 1 4.76917,9.30661 7.4999938,7.5000024 0 0 1 -9.16976,5.02725"
sodipodi:end="1.8407347"
d="m -309.03562,368.40192 a 7.4999938,7.5000024 0 0 1 7.26612,-4.89838 7.4999938,7.5000024 0 0 1 6.95145,5.33555"
sodipodi:end="5.9909207"
sodipodi:start="3.4953343"
sodipodi:ry="7.5000024"
sodipodi:rx="7.4999938"
......@@ -156,13 +156,24 @@
sodipodi:start="0.31864739"
sodipodi:end="4.9929531"
d="m -304.10552,378.34925 a 7.4999938,7.5000024 0 0 1 -9.38146,4.80209 7.4999938,7.5000024 0 0 1 -4.92078,-9.31976 7.4999938,7.5000024 0 0 1 9.25653,-5.03869" />
<rect
y="368"
x="-295"
height="4.99999"
width="41.999992"
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m -290.75738,368 h 37.7574 v 5 h -32.71926 z"
id="rect6533"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
id="path828"
sodipodi:type="arc"
sodipodi:cx="-293.16116"
sodipodi:cy="376.30331"
sodipodi:rx="7.4999938"
sodipodi:ry="7.5000024"
sodipodi:start="4.4978732"
sodipodi:end="2.8797933"
d="m -294.75772,368.97521 a 7.4999938,7.5000024 0 0 1 8.89857,5.61625 7.4999938,7.5000024 0 0 1 -5.47529,8.98599 7.4999938,7.5000024 0 0 1 -9.07116,-5.33299"
sodipodi:open="true" />
</g>
</g>
</g>
......
gnome-builder (3.31.91-1) experimental; urgency=medium
* New upstream development release
-- Jeremy Bicha <jbicha@debian.org> Mon, 18 Feb 2019 22:25:22 -0500
gnome-builder (3.31.90-1) experimental; urgency=medium
* New upstream development release
......
project('gnome-builder', 'c',
license: 'GPL3+',
version: '3.31.90',
version: '3.31.91',
meson_version: '>= 0.48.0',
default_options: [ 'c_std=gnu11',
'cpp_std=c++11',
......@@ -253,7 +253,8 @@ message('Linker supports --version-script: @0@'.format(ld_supports_version_scrip
# Commonly used deps
libdazzle_dep = dependency('libdazzle-1.0', version: '>= 3.31.90')
libgio_dep = dependency('gio-2.0', version: '>= 2.59.2')
libglib_dep = dependency('glib-2.0', version: '>= 2.59.0')
libgio_dep = dependency('gio-2.0', version: '>= 2.59.0')
libgiounix_dep = dependency('gio-unix-2.0')
libgtk_dep = dependency('gtk+-3.0', version: '>= 3.22.26')
libgtksource_dep = dependency('gtksourceview-4', version: '>= 4.0.0')
......
......@@ -57,6 +57,7 @@ option('plugin_newcomers', type: 'boolean')
option('plugin_notification', type: 'boolean')
option('plugin_npm', type: 'boolean')
option('plugin_phpize', type: 'boolean')
option('plugin_podman', type: 'boolean', value: false)
option('plugin_python_pack', type: 'boolean')
option('plugin_qemu', type: 'boolean')
option('plugin_quick_highlight', type: 'boolean')
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -18,23 +18,24 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#include "config.h"
#include <errno.h>
#include <libide-threading.h>
#include <stdlib.h>
#include <unistd.h>
static gint exit_code;
#include <glib.h>
#include <sys/prctl.h>
#include <signal.h>
static gboolean
parse_fd (const gchar *str,
gint *fd)
{
gint64 v = g_ascii_strtoll (str, NULL, 10);
gint64 v;
*fd = -1;
if (str == NULL)
return FALSE;
v = g_ascii_strtoll (str, NULL, 10);
if (v < 0 || v > G_MAXINT)
return FALSE;
......@@ -47,82 +48,56 @@ parse_fd (const gchar *str,
}
static void
wait_cb (IdeSubprocess *subprocess,
GAsyncResult *result,
GMainLoop *main_loop)
{
g_autoptr(GError) error = NULL;
g_assert (IDE_IS_SUBPROCESS (subprocess));
g_assert (G_IS_ASYNC_RESULT (result));
if (!ide_subprocess_wait_finish (subprocess, result, &error))
g_error ("Subprocess wait failed: %s", error->message);
if (ide_subprocess_get_if_signaled (subprocess))
kill (getpid (), ide_subprocess_get_term_sig (subprocess));
else
exit (ide_subprocess_get_exit_status (subprocess));
g_main_loop_quit (main_loop);
}
static void
log_func (const gchar *log_domain,
GLogLevelFlags log_level,
const gchar *message,
gpointer user_data)
child_setup_func (gpointer data)
{
if (log_level & G_LOG_FLAG_FATAL)
g_printerr ("%s\n", message);
prctl (PR_SET_PDEATHSIG, SIGKILL);
}
int
main (int argc,
char *argv[])
gint
main (gint argc,
gchar *argv[])
{
g_autoptr(IdeSubprocessLauncher) launcher = NULL;
g_autoptr(GDBusConnection) bus = NULL;
g_autoptr(IdeSubprocess) subprocess = NULL;
g_autoptr(GMainLoop) main_loop = NULL;
g_autoptr(GError) error = NULL;
const gchar *env;
gint fd = -1;
g_log_set_default_handler (log_func, NULL);
main_loop = g_main_loop_new (NULL, FALSE);
if (!(bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error)))
g_error ("Failed to connect to session bus: %s", error->message);
launcher = ide_subprocess_launcher_new (0);
ide_subprocess_launcher_push_argv (launcher, "fusermount");
g_autoptr(GPtrArray) new_argv = NULL;
g_autofree gchar *path = NULL;
g_autofree gchar *env_param = NULL;
g_autofree gchar *fwd_param = NULL;
const gchar *fuse_commfd_env;
gint fuse_commfd = -1;
gint exit_status;
fuse_commfd_env = g_getenv ("_FUSE_COMMFD");
if (!parse_fd (fuse_commfd_env, &fuse_commfd))
return EXIT_FAILURE;
env_param = g_strdup_printf ("--env=_FUSE_COMMFD=%s", fuse_commfd_env);
fwd_param = g_strdup_printf ("--forward-fd=%d", fuse_commfd);
if (!(path = g_find_program_in_path ("flatpak-spawn")))
return EXIT_FAILURE;
new_argv = g_ptr_array_new ();
g_ptr_array_add (new_argv, path);
g_ptr_array_add (new_argv, (gchar *)"--clear-env");
g_ptr_array_add (new_argv, (gchar *)"--watch-bus");
g_ptr_array_add (new_argv, (gchar *)"--host");
g_ptr_array_add (new_argv, env_param);
g_ptr_array_add (new_argv, fwd_param);
g_ptr_array_add (new_argv, (gchar *)"fusermount");
for (guint i = 1; i < argc; i++)
ide_subprocess_launcher_push_argv (launcher, argv[i]);
ide_subprocess_launcher_set_cwd (launcher, g_get_current_dir ());
ide_subprocess_launcher_set_run_on_host (launcher, TRUE);
ide_subprocess_launcher_take_stdin_fd (launcher, dup (STDIN_FILENO));
ide_subprocess_launcher_take_stdout_fd (launcher, dup (STDOUT_FILENO));
ide_subprocess_launcher_take_stderr_fd (launcher, dup (STDERR_FILENO));
if ((env = g_getenv ("_FUSE_COMMFD")) && parse_fd (env, &fd) && fd > 2)
{
ide_subprocess_launcher_setenv (launcher, "_FUSE_COMMFD", env, TRUE);
ide_subprocess_launcher_take_fd (launcher, fd, fd);
}
if (!(subprocess = ide_subprocess_launcher_spawn (launcher, NULL, &error)))
g_error ("ERROR: %s", error->message);
ide_subprocess_wait_async (subprocess,
NULL,
(GAsyncReadyCallback)wait_cb,
main_loop);
g_main_loop_run (main_loop);
return exit_code;
g_ptr_array_add (new_argv, argv[i]);
g_ptr_array_add (new_argv, NULL);
g_spawn_sync (NULL,
(gchar **)new_argv->pdata,
NULL,
(G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_CHILD_INHERITS_STDIN),
child_setup_func,
NULL,
NULL,
NULL,
&exit_status,
NULL);
return exit_status;
}
......@@ -22,6 +22,7 @@
#include "config.h"
#include <libide-threading.h>
#include <libpeas/peas.h>
#include "ide-buffer.h"
......@@ -48,9 +49,33 @@
G_DEFINE_INTERFACE (IdeBufferAddin, ide_buffer_addin, G_TYPE_OBJECT)
static void
ide_buffer_addin_real_settle_async (IdeBufferAddin *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
g_autoptr(IdeTask) task = NULL;
task = ide_task_new (self, cancellable, callback, user_data);
ide_task_set_source_tag (task, ide_buffer_addin_real_settle_async);
ide_task_set_priority (task, G_PRIORITY_HIGH);
ide_task_return_boolean (task, TRUE);
}
static gboolean
ide_buffer_addin_real_settle_finish (IdeBufferAddin *self,
GAsyncResult *result,
GError **error)
{
return ide_task_propagate_boolean (IDE_TASK (result), error);
}
static void
ide_buffer_addin_default_init (IdeBufferAddinInterface *iface)
{
iface->settle_async = ide_buffer_addin_real_settle_async;
iface->settle_finish = ide_buffer_addin_real_settle_finish;
}
/**
......@@ -409,3 +434,28 @@ _ide_buffer_addin_style_scheme_changed_cb (IdeExtensionSetAdapter *set,
ide_buffer_addin_style_scheme_changed (IDE_BUFFER_ADDIN (exten), IDE_BUFFER (user_data));
}
void
ide_buffer_addin_settle_async (IdeBufferAddin *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
g_return_if_fail (IDE_IS_MAIN_THREAD ());
g_return_if_fail (IDE_IS_BUFFER_ADDIN (self));
g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
IDE_BUFFER_ADDIN_GET_IFACE (self)->settle_async (self, cancellable, callback, user_data);
}
gboolean
ide_buffer_addin_settle_finish (IdeBufferAddin *self,
GAsyncResult *result,
GError **error)
{
g_return_val_if_fail (IDE_IS_MAIN_THREAD (), FALSE);
g_return_val_if_fail (IDE_IS_BUFFER_ADDIN (self), FALSE);
g_return_val_if_fail (G_IS_ASYNC_RESULT (result), FALSE);
return IDE_BUFFER_ADDIN_GET_IFACE (self)->settle_finish (self, result, error);
}
......@@ -39,58 +39,74 @@ struct _IdeBufferAddinInterface
{
GTypeInterface parent_iface;
void (*load) (IdeBufferAddin *self,
IdeBuffer *buffer);
void (*unload) (IdeBufferAddin *self,
IdeBuffer *buffer);
void (*file_loaded) (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
void (*save_file) (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
void (*file_saved) (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
void (*language_set) (IdeBufferAddin *self,
IdeBuffer *buffer,
const gchar *language_id);
void (*change_settled) (IdeBufferAddin *self,
IdeBuffer *buffer);
void (*style_scheme_changed) (IdeBufferAddin *self,
IdeBuffer *buffer);
void (*load) (IdeBufferAddin *self,
IdeBuffer *buffer);
void (*unload) (IdeBufferAddin *self,
IdeBuffer *buffer);
void (*file_loaded) (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
void (*save_file) (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
void (*file_saved) (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
void (*language_set) (IdeBufferAddin *self,
IdeBuffer *buffer,
const gchar *language_id);
void (*change_settled) (IdeBufferAddin *self,
IdeBuffer *buffer);
void (*style_scheme_changed) (IdeBufferAddin *self,
IdeBuffer *buffer);
void (*settle_async) (IdeBufferAddin *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean (*settle_finish) (IdeBufferAddin *self,
GAsyncResult *result,
GError **error);
};
IDE_AVAILABLE_IN_3_32
void ide_buffer_addin_load (IdeBufferAddin *self,
IdeBuffer *buffer);
void ide_buffer_addin_load (IdeBufferAddin *self,
IdeBuffer *buffer);
IDE_AVAILABLE_IN_3_32
void ide_buffer_addin_unload (IdeBufferAddin *self,
IdeBuffer *buffer);
void ide_buffer_addin_unload (IdeBufferAddin *self,
IdeBuffer *buffer);
IDE_AVAILABLE_IN_3_32
void ide_buffer_addin_file_loaded (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
void ide_buffer_addin_file_loaded (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
IDE_AVAILABLE_IN_3_32
void ide_buffer_addin_save_file (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
void ide_buffer_addin_save_file (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
IDE_AVAILABLE_IN_3_32
void ide_buffer_addin_file_saved (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
void ide_buffer_addin_file_saved (IdeBufferAddin *self,
IdeBuffer *buffer,
GFile *file);
IDE_AVAILABLE_IN_3_32
void ide_buffer_addin_language_set (IdeBufferAddin *self,
IdeBuffer *buffer,
const gchar *language_id);
void ide_buffer_addin_language_set (IdeBufferAddin *self,
IdeBuffer *buffer,
const gchar *language_id);
IDE_AVAILABLE_IN_3_32
void ide_buffer_addin_change_settled (IdeBufferAddin *self,
IdeBuffer *buffer);
void ide_buffer_addin_change_settled (IdeBufferAddin *self,
IdeBuffer *buffer);
IDE_AVAILABLE_IN_3_32
void ide_buffer_addin_style_scheme_changed (IdeBufferAddin *self,
IdeBuffer *buffer);
void ide_buffer_addin_style_scheme_changed (IdeBufferAddin *self,
IdeBuffer *buffer);
IDE_AVAILABLE_IN_3_32
IdeBufferAddin *ide_buffer_addin_find_by_module_name (IdeBuffer *buffer,
const gchar *module_name);
void ide_buffer_addin_settle_async (IdeBufferAddin *self,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
IDE_AVAILABLE_IN_3_32
gboolean ide_buffer_addin_settle_finish (IdeBufferAddin *self,
GAsyncResult *result,
GError **error);
IDE_AVAILABLE_IN_3_32
IdeBufferAddin *ide_buffer_addin_find_by_module_name (IdeBuffer *buffer,
const gchar *module_name);
G_END_DECLS
This diff is collapsed.
......@@ -172,7 +172,5 @@ void ide_buffer_set_highlight_diagnostics (IdeBuffer
IDE_AVAILABLE_IN_3_32
void ide_buffer_set_style_scheme_name (IdeBuffer *self,
const gchar *style_scheme_name);
IDE_AVAILABLE_IN_3_32
void ide_buffer_trim_trailing_whitespace (IdeBuffer *self);
G_END_DECLS
......@@ -469,6 +469,9 @@ ide_diagnostics_group_diagnose (IdeDiagnosticsGroup *group,
group->needs_diagnose = FALSE;
group->has_diagnostics = FALSE;
if (group->contents == NULL)
group->contents = g_bytes_new ("", 0);
ide_extension_set_adapter_foreach (group->adapter,
ide_diagnostics_group_diagnose_foreach,
self);
......
......@@ -593,6 +593,7 @@ ide_editor_page_clear_search (IdeEditorPage *self,
ide_editor_search_set_search_text (self->search, NULL);
ide_editor_search_set_visible (self->search, FALSE);
gtk_revealer_set_reveal_child (self->search_revealer, FALSE);
}
static void
......
......@@ -200,6 +200,25 @@ ide_build_manager_stop_timer (IdeBuildManager *self)
IDE_EXIT;
}
static void
ide_build_manager_reset_info (IdeBuildManager *self)
{
g_assert (IDE_IS_BUILD_MANAGER (self));
g_clear_pointer (&self->last_build_time, g_date_time_unref);
self->last_build_time = g_date_time_new_now_local ();
self->diagnostic_count = 0;
self->warning_count = 0;
self->error_count = 0;
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_ERROR_COUNT]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_HAS_DIAGNOSTICS]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_LAST_BUILD_TIME]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_RUNNING_TIME]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_WARNING_COUNT]);
}
static void
ide_build_manager_handle_diagnostic (IdeBuildManager *self,
IdeDiagnostic *diagnostic,
......@@ -1500,6 +1519,8 @@ ide_build_manager_build_async (IdeBuildManager *self,
self->error_count = 0;
}
ide_build_manager_reset_info (self);
/*
* If we are performing a real build (not just something like configure),
* then we want to ensure we save all the buffers. We don't want to do this
......@@ -1524,12 +1545,6 @@ ide_build_manager_build_async (IdeBuildManager *self,
ide_build_manager_build_targets_cb,
g_steal_pointer (&task));
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_ERROR_COUNT]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_HAS_DIAGNOSTICS]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_LAST_BUILD_TIME]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_RUNNING_TIME]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_WARNING_COUNT]);
IDE_EXIT;
}
......@@ -1628,19 +1643,13 @@ ide_build_manager_clean_async (IdeBuildManager *self,
IDE_EXIT;
}
self->diagnostic_count = 0;
self->error_count = 0;
self->warning_count = 0;
ide_build_manager_reset_info (self);
ide_pipeline_clean_async (self->pipeline,
phase,
cancellable,
ide_build_manager_clean_cb,
g_steal_pointer (&task));
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_ERROR_COUNT]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_HAS_DIAGNOSTICS]);
g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_WARNING_COUNT]);
phase,
cancellable,
ide_build_manager_clean_cb,
g_steal_pointer (&task));
IDE_EXIT;
}
......@@ -1747,12 +1756,14 @@ ide_build_manager_rebuild_async (IdeBuildManager *self,
IDE_EXIT;
}
ide_build_manager_reset_info (self);
ide_pipeline_rebuild_async (self->pipeline,
phase,
targets,
cancellable,
ide_build_manager_rebuild_cb,
g_steal_pointer (&task));
phase,
targets,
cancellable,
ide_build_manager_rebuild_cb,
g_steal_pointer (&task));
IDE_EXIT;
}
......
......@@ -3945,12 +3945,12 @@ ide_pipeline_ref_toolchain (IdePipeline *self)
}
void
_ide_pipeline_check_toolchain (IdePipeline *self,
IdeDeviceInfo *info)
_ide_pipeline_check_toolchain (IdePipeline *self,
IdeDeviceInfo *info)
{
g_autoptr(IdeToolchain) toolchain = NULL;
g_autoptr(IdeTriplet) toolchain_triplet = NULL;
IdeContext *context;
g_autoptr(IdeContext) context = NULL;
IdeRuntime *runtime;
IdeTriplet *device_triplet;
IdeToolchainManager *manager;
......@@ -3960,7 +3960,10 @@ _ide_pipeline_check_toolchain (IdePipeline *self,
g_return_if_fail (IDE_IS_PIPELINE (self));
g_return_if_fail (IDE_IS_DEVICE_INFO (info));
context = ide_object_get_context (IDE_OBJECT (self));
if (ide_object_in_destruction (IDE_OBJECT (self)))
IDE_EXIT;
context = ide_object_ref_context (IDE_OBJECT (self));
g_return_if_fail (IDE_IS_CONTEXT (context));
manager = ide_toolchain_manager_from_context (context);
......
......@@ -24,6 +24,7 @@
#include <glib/gi18n.h>
#include <libide-threading.h>
#include <libide-vcs.h>
#include <libpeas/peas.h>
#include <libpeas/peas-autocleanups.h>
......@@ -50,6 +51,12 @@ struct _IdeRunManager
const IdeRunHandlerInfo *handler;
GList *handlers;
/* Keep track of last change sequence from the file monitor
* so that we can maybe skip past install phase and make
* secondary execution time faster.
*/
guint64 last_change_seq;
guint busy : 1;
};
......@@ -629,16 +636,20 @@ static void
ide_run_manager_do_install_before_run (IdeRunManager *self,
IdeTask *task)
{
g_autoptr(IdeContext) context = NULL;
IdeBuildManager *build_manager;
IdeContext *context;
IdeVcsMonitor *monitor;
guint64 sequence = 0;
IDE_ENTRY;
g_assert (IDE_IS_MAIN_THREAD ());
g_assert (IDE_IS_RUN_MANAGER (self));
g_assert (IDE_IS_TASK (task));
context = ide_object_get_context (IDE_OBJECT (self));
context = ide_object_ref_context (IDE_OBJECT (self));
build_manager = ide_build_manager_from_context (context);
monitor = ide_vcs_monitor_from_context (context);
/*
* First we need to make sure the target is up to date and installed
......@@ -654,12 +665,32 @@ ide_run_manager_do_install_before_run (IdeRunManager *self,
self,
G_CONNECT_SWAPPED);
if (monitor != NULL)
sequence = ide_vcs_monitor_get_sequence (monitor);
/*
* If we detect that nothing has changed in the project directory since the
* last time we ran, we can avoid installing the project. This will not help
* in situations where external resources have changed outside of builders
* control, but users can simply force a Build in that case.
*/
if (self->build_target != NULL && sequence == self->last_change_seq)
{
g_debug ("Skipping install phase as no files appear to have changed");
ide_run_manager_update_action_enabled (self);
ide_task_set_task_data (task, g_object_ref (self->build_target), g_object_unref);
do_run_async (self, task);
IDE_EXIT;
}
self->last_change_seq = sequence;
ide_build_manager_build_async (build_manager,
IDE_PIPELINE_PHASE_INSTALL,
NULL,
ide_task_get_cancellable (task),
ide_run_manager_install_cb,
g_object_ref (task));
IDE_PIPELINE_PHASE_INSTALL,
NULL,
ide_task_get_cancellable (task),
ide_run_manager_install_cb,
g_object_ref (task));
ide_run_manager_update_action_enabled (self);
......@@ -679,6 +710,7 @@ ide_run_manager_run_async (IdeRunManager *self,
IDE_ENTRY;
g_return_if_fail (IDE_IS_MAIN_THREAD ());
g_return_if_fail (IDE_IS_RUN_MANAGER (self));
g_return_if_fail (!build_target || IDE_IS_BUILD_TARGET (build_target));
g_return_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable));
......@@ -693,6 +725,9 @@ ide_run_manager_run_async (IdeRunManager *self,
ide_task_set_source_tag (task, ide_run_manager_run_async);
ide_task_set_priority (task, G_PRIORITY_LOW);
if (ide_task_return_error_if_cancelled (task))
IDE_EXIT;
if (ide_run_manager_check_busy (self, &error))
{
ide_task_return_error (task, g_steal_pointer (&error));
......
......@@ -60,7 +60,7 @@
</child>
<child>
<object class="GtkLabel" id="uri_entry_help">
<property name="label" translatable="yes">Enter the repository of the project you would like to clone. The URL should look similar to "https://gitlab.gnome.org/GNOME/gnome-builder.git".</property>
<property name="label" translatable="yes">Enter the repository of the project you would like to clone. The URL should look similar to “https://gitlab.gnome.org/GNOME/gnome-builder.git”.</property>
<property name="margin-top">3</property>
<property name="width-chars">40</property>
<property name="max-width-chars">60</property>
......
......@@ -18,6 +18,9 @@
</child>
<child>
<object class="GtkImage" id="image">
<style>
<class name="lowres-icon"/>
</style>
</object>
</child>
<child>
......
......@@ -139,9 +139,18 @@ ide_application_startup (GApplication *app)
if (IS_UI_PROCESS (self))
{
g_autofree gchar *style_path = NULL;
GtkSourceStyleSchemeManager *styles;
/* Setup access to private icons dir */
gtk_icon_theme_prepend_search_path (gtk_icon_theme_get_default (), PACKAGE_ICONDIR);
/* Add custom style locations for gtksourceview schemes */
styles = gtk_source_style_scheme_manager_get_default ();
style_path = g_build_filename (g_get_home_dir (), ".local", "share", "gtksourceview-4", "styles", NULL);
gtk_source_style_scheme_manager_append_search_path (styles, style_path);
gtk_source_style_scheme_manager_append_search_path (styles, PACKAGE_DATADIR"/gtksourceview-4/styles/");
/* Load color settings (Night Light, Dark Mode, etc) */
_ide_application_init_color (self);
}
......
......@@ -37,7 +37,7 @@ struct _IdeConfigViewAddinInterface
void (*load) (IdeConfigViewAddin *self,
DzlPreferences *preferences,
IdeConfig *configuration);
IdeConfig *configuration);
};
IDE_AVAILABLE_IN_3_32
......
......@@ -439,16 +439,22 @@
<property name="title" translatable="yes" context="shortcut window">Touchpad gestures</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">true</property>
<!-- work around no access to three-finger-swipe -->
<property name="shortcut-type">gesture-two-finger-swipe-right</property>
<property name="title" translatable="yes" context="shortcut window">Switch to the next document</property>
<property name="visible">true</property>
<property name="icon">swipe_right</property>
<property name="title" translatable="yes" context="shortcut window">Move page to the right</property>
<property name="subtitle" translatable="yes" context="shortcut window">Three finger swipe right</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">true</property>
<!-- work around no access to three-finger-swipe -->
<property name="shortcut-type">gesture-two-finger-swipe-left</property>
<property name="title" translatable="yes" context="shortcut window">Switch to the previous document</property>
<property name="visible">true</property>
<property name="icon">swipe_left</property>
<property name="title" translatable="yes" context="shortcut window">Move page to the left</property>
<property name="subtitle" translatable="yes" context="shortcut window">Three finger swipe left</property>
</object>
</child>
</object>
......@@ -544,4 +550,10 @@
</object>
</child>
</template>
<object class="GThemedIcon" id="swipe_right">
<property name="name">gesture-three-finger-swipe-right-symbolic</property>
</object>
<object class="GThemedIcon" id="swipe_left">
<property name="name">gesture-three-finger-swipe-left-symbolic</property>
</object>
</interface>
......@@ -336,8 +336,9 @@ ide_workbench_constructed (GObject *object)
G_OBJECT_CLASS (ide_workbench_parent_class)->constructed (object);
self->vcs_monitor = g_object_new (IDE_TYPE_VCS_MONITOR, NULL);
ide_object_append (IDE_OBJECT (self->context), IDE_OBJECT (self->vcs_monitor));
self->vcs_monitor = g_object_new (IDE_TYPE_VCS_MONITOR,
"parent", self->context,
NULL);
self->addins = peas_extension_set_new (peas_engine_get_default (),
IDE_TYPE_WORKBENCH_ADDIN,
......
......@@ -41,7 +41,7 @@ typedef struct
{
IdeHighlightEngine *engine;
IdeLspClient *client;
IdeLspClient *client;
IdeHighlightIndex *index;
DzlSignalGroup *buffer_signals;
......@@ -51,8 +51,8 @@ typedef struct
guint dirty : 1;
} IdeLspHighlighterPrivate;
static void highlighter_iface_init (IdeHighlighterInterface *iface);
static void ide_lsp_highlighter_queue_update (IdeLspHighlighter *self);
static void highlighter_iface_init (IdeHighlighterInterface *iface);
static void ide_lsp_highlighter_queue_update (IdeLspHighlighter *self);
G_DEFINE_TYPE_WITH_CODE (IdeLspHighlighter, ide_lsp_highlighter, IDE_TYPE_OBJECT,
G_ADD_PRIVATE (IdeLspHighlighter)
......@@ -68,7 +68,7 @@ static GParamSpec *properties [N_PROPS];
static void
ide_lsp_highlighter_set_index (IdeLspHighlighter *self,
IdeHighlightIndex *index)
IdeHighlightIndex *index)
{
IdeLspHighlighterPrivate *priv = ide_lsp_highlighter_get_instance_private (self);
......@@ -93,8 +93,8 @@ ide_lsp_highlighter_set_index (IdeLspHighlighter *self,
static void
ide_lsp_highlighter_document_symbol_cb (GObject *object,
GAsyncResult *result,
gpointer user_data)
GAsyncResult *result,
gpointer user_data)
{
IdeLspClient *client = (IdeLspClient *)object;
g_autoptr(IdeLspHighlighter) self = user_data;
......@@ -254,7 +254,7 @@ ide_lsp_highlighter_queue_update (IdeLspHighlighter *self)
static void
ide_lsp_highlighter_buffer_line_flags_changed (IdeLspHighlighter *self,
IdeBuffer *buffer)
IdeBuffer *buffer)
{
g_assert (IDE_IS_LSP_HIGHLIGHTER (self));
g_assert (IDE_IS_BUFFER (buffer));
......@@ -281,9 +281,9 @@ ide_lsp_highlighter_dispose (GObject *object)
static void
ide_lsp_highlighter_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
IdeLspHighlighter *self = IDE_LSP_HIGHLIGHTER (object);
......@@ -300,9 +300,9 @@ ide_lsp_highlighter_get_property (GObject *object,
static void
ide_lsp_highlighter_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
IdeLspHighlighter *self = IDE_LSP_HIGHLIGHTER (object);
......@@ -375,7 +375,7 @@ ide_lsp_highlighter_get_client (IdeLspHighlighter *self)
void
ide_lsp_highlighter_set_client (IdeLspHighlighter *self,
IdeLspClient *client)
IdeLspClient *client)
{
IdeLspHighlighterPrivate *priv = ide_lsp_highlighter_get_instance_private (self);
......@@ -420,10 +420,10 @@ select_next_word (GtkTextIter *begin,
static void
ide_lsp_highlighter_update (IdeHighlighter *highlighter,
IdeHighlightCallback callback,
const GtkTextIter *range_begin,
const GtkTextIter *range_end,
GtkTextIter *location)
IdeHighlightCallback callback,
const GtkTextIter *range_begin,
const GtkTextIter *range_end,
GtkTextIter *location)
{
IdeLspHighlighter *self = (IdeLspHighlighter *)highlighter;
IdeLspHighlighterPrivate *priv = ide_lsp_highlighter_get_instance_private (self);
......@@ -484,7 +484,7 @@ completed:
static void
ide_lsp_highlighter_set_engine (IdeHighlighter *highlighter,
IdeHighlightEngine *engine)
IdeHighlightEngine *engine)
{
IdeLspHighlighter *self = (IdeLspHighlighter *)highlighter;
IdeLspHighlighterPrivate *priv = ide_lsp_highlighter_get_instance_private (self);
......
......@@ -1071,3 +1071,39 @@ ide_subprocess_launcher_append_path (IdeSubprocessLauncher *self,