Merge branch 'glib-2-58-backports' into 'glib-2-58'

GLib 2.58 backports of various small patches

See merge request GNOME/glib!298
This commit is contained in:
Emmanuele Bassi 2018-09-05 10:10:55 +00:00
commit 5e9c2a58b9
4 changed files with 13 additions and 18 deletions

View File

@ -260,7 +260,6 @@ got_status (GObject *source,
GNetworkMonitorPortal *nm = G_NETWORK_MONITOR_PORTAL (data);
GError *error = NULL;
GVariant *ret;
gboolean should_emit_changed = FALSE;
GVariant *status;
gboolean available;
gboolean metered;
@ -297,14 +296,12 @@ got_status (GObject *source,
{
nm->priv->available = available;
g_object_notify (G_OBJECT (nm), "network-available");
should_emit_changed = TRUE;
}
if (nm->priv->metered != metered)
{
nm->priv->metered = metered;
g_object_notify (G_OBJECT (nm), "network-metered");
should_emit_changed = TRUE;
}
if (nm->priv->connectivity != connectivity &&
@ -312,13 +309,11 @@ got_status (GObject *source,
{
nm->priv->connectivity = connectivity;
g_object_notify (G_OBJECT (nm), "connectivity");
should_emit_changed = TRUE;
}
g_object_thaw_notify (G_OBJECT (nm));
if (should_emit_changed)
g_signal_emit_by_name (nm, "network-changed", available);
g_signal_emit_by_name (nm, "network-changed", available);
}
static void

View File

@ -75,7 +75,7 @@ typedef GLocalFileMonitorClass GKqueueFileMonitorClass;
*
* To distinguish between a directory monitor and a regular file monitor, check
* whether sub_file is NULL. */
typedef struct _GKqueueFileMonitor
struct _GKqueueFileMonitor
{
GLocalFileMonitor parent_instance;
@ -85,7 +85,7 @@ typedef struct _GKqueueFileMonitor
GFileMonitor *fallback;
GFile *fbfile;
#endif
} GKqueueFileMonitor;
};
#ifdef __clang__
#pragma clang diagnostic pop

View File

@ -1485,7 +1485,7 @@ do_posix_spawn (gchar **argv,
parent_close_fds[num_parent_close_fds++] = write_null;
#ifndef HAVE_O_CLOEXEC
fcntl (read_null, F_SETFD, FD_CLOEXEC);
fcntl (write_null, F_SETFD, FD_CLOEXEC);
#endif
r = posix_spawn_file_actions_adddup2 (&file_actions, write_null, 1);
@ -1509,7 +1509,7 @@ do_posix_spawn (gchar **argv,
parent_close_fds[num_parent_close_fds++] = write_null;
#ifndef HAVE_O_CLOEXEC
fcntl (read_null, F_SETFD, FD_CLOEXEC);
fcntl (write_null, F_SETFD, FD_CLOEXEC);
#endif
r = posix_spawn_file_actions_adddup2 (&file_actions, write_null, 2);

View File

@ -1950,17 +1950,17 @@ subdir('tests')
# Install glib-gettextize executable, if a UNIX-style shell is found
if have_sh
# These should not contain " quotes around the values
gettexize_conf = configuration_data()
gettexize_conf.set('PACKAGE', 'glib')
gettexize_conf.set('VERSION', meson.project_version())
gettexize_conf.set('prefix', glib_prefix)
gettexize_conf.set('datarootdir', glib_datadir)
gettexize_conf.set('datadir', glib_datadir)
gettextize_conf = configuration_data()
gettextize_conf.set('PACKAGE', 'glib')
gettextize_conf.set('VERSION', meson.project_version())
gettextize_conf.set('prefix', glib_prefix)
gettextize_conf.set('datarootdir', glib_datadir)
gettextize_conf.set('datadir', glib_datadir)
configure_file(input : 'glib-gettextize.in',
install : true,
install_dir : 'bin',
install_dir : glib_bindir,
output : 'glib-gettextize',
configuration : gettexize_conf)
configuration : gettextize_conf)
endif
if have_m4