Dan Williams | 10 Feb 23:38
Picon
Favicon

Re: [RFC] VPNC: port from GtkTable to GtkGrid

On Fri, 2012-02-10 at 16:16 -0500, Mathieu Trudel-Lapierre wrote:
> Hi,
> 
> For newer GTK3 versions, GtkTable is deprecated in favor of GtkGrid.
> Attached is a patch that does the change from GtkTable to GtkGrid
> (though I omitted handling the gtk2 cases...), but it does change the
> layout of the vpn password dialog somewhat.
> 
> The old version was working on the assumption that the the 2 extra
> columns in the priv->table object were giving the required spacing at
> the end of the entry boxes (or at least, that's what seems to be the
> case), but that's no longer true with GtkGrid. I'm curious what would
> be the best way (gtk_adjustment? gtk_dialog_set_size?), and the ideal
> size to give the table or pin the dialog to, if it's even worth doing.

I assume we also want to change the gtk_table_new() to gtk_grid_new()?

I may be completely wrong, but we may want to just let everything float
and set the # characters width of the entries instead.  We really only
care about having a good default number of characters visible for the
entries, but we dont' want the dialog to get too large or too small.
But we don't care about the *dialog* size at all, we care about how much
text shows in the entries.

It used to be with GtkTable we had to twiddle with various widget
properties to get the text wrapping in the info label to work too, which
I think is gone with GtkGrid.  But in the end there are two goals:

1) show a reasonable amount of text in the entries, say 30-ish
characters
(Continue reading)

Picon
Gravatar

[RFC] VPNC: port from GtkTable to GtkGrid

Hi,

For newer GTK3 versions, GtkTable is deprecated in favor of GtkGrid.
Attached is a patch that does the change from GtkTable to GtkGrid
(though I omitted handling the gtk2 cases...), but it does change the
layout of the vpn password dialog somewhat.

The old version was working on the assumption that the the 2 extra
columns in the priv->table object were giving the required spacing at
the end of the entry boxes (or at least, that's what seems to be the
case), but that's no longer true with GtkGrid. I'm curious what would
be the best way (gtk_adjustment? gtk_dialog_set_size?), and the ideal
size to give the table or pin the dialog to, if it's even worth doing.

I've also attached a screenshot of how this looks with my patch.

Mathieu Trudel-Lapierre <mathieu.tl <at> gmail.com>
Freenode: cyphermox, Jabber: mathieu.tl <at> gmail.com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93
From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre <at> canonical.com>
Subject: Port GtkTable uses to GtkGrid, since the former is now deprecated.

Index: network-manager-vpnc-0.9.2.0+git201201080319.236292c/auth-dialog/vpn-password-dialog.c
===================================================================
---
network-manager-vpnc-0.9.2.0+git201201080319.236292c.orig/auth-dialog/vpn-password-dialog.c	2012-02-10
14:41:30.000000000 -0500
(Continue reading)

Jiri Popelka | 10 Feb 16:45
Picon
Favicon

[PATCH 0/2] firewall-manager update

The first patch updates FirewallD DBus service & path & interface.
The second one adds calling of FirewallD1.zone.removeInterface method
during device deactivation.

Jiri Popelka (2):
  firewall: update FirewallD DBus service & path & interface
  firewall: add remove_from_zone()

 src/firewall-manager/nm-firewall-manager.c |   80 ++++++++++++++++++++++-----
 src/firewall-manager/nm-firewall-manager.h |   12 +++--
 src/nm-device.c                            |   10 +++-
 3 files changed, 82 insertions(+), 20 deletions(-)

--

-- 
1.7.7.6
Dan Williams | 10 Feb 01:15
Picon
Favicon

[RFC] [PATCH] core: flush timestamp cache to disk only on activate/deactivate

To suppress periodic disk wakeups, only write timestamps to disk
when a device gets activated or deactivated.  Timestamps are
still updated periodically in memory, just not flushed to disk
at that time.  Obviously if NM crashes timestamps won't be
preserved, but that shouldn't happen, right? :)
---
 src/nm-device.c                       |   10 ++++++++++
 src/nm-manager.c                      |   15 +++------------
 src/settings/nm-settings-connection.c |    8 +++++++-
 src/settings/nm-settings-connection.h |    4 +++-
 4 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/src/nm-device.c b/src/nm-device.c
index 7789054..e959148 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -58,6 +58,7 @@
 #include "nm-rfkill.h"
 #include "nm-firewall-manager.h"
 #include "nm-properties-changed-signal.h"
+#include "nm-settings-connection.h"

 static void impl_device_disconnect (NMDevice *device, DBusGMethodInvocation *context);

@@ -4146,6 +4147,15 @@ nm_device_state_changed (NMDevice *device,
 	/* Cache the activation request for the dispatcher */
 	req = priv->act_request ? g_object_ref (priv->act_request) : NULL;

+	/* Update connection timestamps; do this before possibly deactivating the
+	 * device since that will clear the activation request and thus the
(Continue reading)

Dan Winship | 9 Feb 14:51
Picon
Gravatar

use glib-mkenums, drop more code...

OK, this makes NM use glib-mkenums, with various side effects:

    - Since it requires very very recent glib-mkenums features and bug
      fixes, we have to import our own copy of glib-mkenums for now

    - Rather than adding glib-mkenums rules to the Makefiles by hand,
      I'm having us beta-test "Makefile.glib" from
      https://bugzilla.gnome.org/show_bug.cgi?id=654395

    - Since glib-mkenums sucks up everything in sight, we're now
      registering a bunch of enum types that we weren't before, which
      I assume is fine. (Note changes to libnm-util.ver and
      libnm-glib.ver.)

    - Rather than run glib-mkenums in every subdirectory of src/ that
      has enums, I just added a new src/generated/ directory with
      libnm-generated.la, and register all of the enum types for the
      whole daemon there.

    - Since Makefile.glib also makes glib-genmarshal easier, I split
      up marshallers/ and now generate libnm-glib's marshallers in
      libnm-glib/, and the daemon's marshallers in src/generated/.
      (For future reference, with Makefile.glib's genmarshal handling,
      you no longer have to maintain a .list file by hand; it scans
      all the source files to see what marshallers are needed, so you
      can just refer to _nm_marshal_VOID__OBJECT_STRING_ENUM_BANANA
      somewhere, and then run make in src/generated/, and that
      marshaller will now exist.)

(Continue reading)

Benjamin Franzke | 9 Feb 15:37
Gravatar

[PATCH 1/2] core: Report username in systemd uid_has_session

For nm_auth_uid_in_acl to be successfull its required that
nm_session_monitor_uid_has_session returns a user_name.
---
 src/nm-session-monitor-systemd.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/nm-session-monitor-systemd.c b/src/nm-session-monitor-systemd.c
index 8fe73ae..95e6c86 100644
--- a/src/nm-session-monitor-systemd.c
+++ b/src/nm-session-monitor-systemd.c
@@ -236,6 +236,9 @@ nm_session_monitor_uid_has_session (NMSessionMonitor *monitor,
                                     const char **out_user,
                                     GError **error)
 {
+	if (!nm_session_uid_to_user (uid, out_user, error))
+		return FALSE;
+
 	return sd_uid_get_sessions (uid, FALSE, NULL) > 0;
 }

--

-- 
1.7.3.4
Guido Günther | 9 Feb 13:49
Gravatar

network-manager-iodine

Hi
I've written a small network-manager VPN plugin that uses iodine to
tunnel through DNS which can be usefull in case you're behind a firewall
but DNS queries are allowed:

	https://honk.sigxcpu.org/piki/projects/network-manager-iodine/
	git clone git://honk.sigxcpu.org/git/network-manager-iodine.git

There are auth and property dialogs and we run chrooted and unprivilged
by default. I wonder if this is suitable to be moved over to
git.gnome.org alongside with the other modules.
Cheers,
 -- Guido
Aleksander Morgado | 7 Feb 13:08
Favicon

[PATCH] allow use of deprecated methods in MM

Hey,

GValueArray is deprecated since GLib 2.31.14, but we need to use it for
dbus-glib based code.

The attached patch just avoids issuing warnings when we use deprecated
methods, so that we can still compile with -Werror.

We should re-enable deprecation warnings once we merge 06-api, as we
don't use GValueArrays there.

Cheers,

--

-- 
Aleksander
From 86cec854ed07848d2d0df9341d8f20d3c4d51616 Mon Sep 17 00:00:00 2001
From: Aleksander Morgado <aleksander <at> lanedo.com>
Date: Tue, 7 Feb 2012 12:56:45 +0100
Subject: [PATCH] build: do not warn about using deprecated methods

GValueArray is deprecated since GLib 2.31.14, but we need to use it for
dbus-glib based code.

We should re-enable deprecation warnings once we switch to GDBus.
---
 m4/compiler_warnings.m4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

(Continue reading)

Jirka Klimes | 7 Feb 10:57
Picon
Favicon
Gravatar

[PATCH] libnm-glib: add StateReason property for NMDevice

The patch adds "StateReason" property to libnm-glib's NMDevice
and a getter function nm_device_get_state_reason().

Jirka
From b7c3fde18a11ff9c9eae8476842001071d8394a1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes <at> redhat.com>
Date: Tue, 7 Feb 2012 10:48:16 +0100
Subject: [PATCH] libnm-glib: add StateReason property for NMDevice
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Jiří Klimeš <jklimes <at> redhat.com>
---
 libnm-glib/nm-device.c |   93 +++++++++++++++++++++++++++++++++++++++++++++---
 libnm-glib/nm-device.h |   17 ++++++++-
 2 files changed, 104 insertions(+), 6 deletions(-)

diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c
index 2a1e58f..19fb683 100644
--- a/libnm-glib/nm-device.c
+++ b/libnm-glib/nm-device.c
@@ -18,7 +18,7 @@
  * Boston, MA 02110-1301 USA.
  *
  * Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
(Continue reading)

Thomas Bechtold | 4 Feb 21:08
Picon
Favicon
Gravatar

[PATCH] core: fix singleton handling in NULL/systemd session monitor

---
 src/nm-session-monitor-null.c    |    4 +++-
 src/nm-session-monitor-systemd.c |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/nm-session-monitor-null.c b/src/nm-session-monitor-null.c
index ec33bef..14d756f 100644
--- a/src/nm-session-monitor-null.c
+++ b/src/nm-session-monitor-null.c
@@ -84,7 +84,9 @@ nm_session_monitor_get (void)
 	if (singleton)
 		return g_object_ref (singleton);

-	return NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
+	singleton = NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
+	assert (singleton);
+	return singleton;
 }

 /*
---------------------------------------------------------------------------------------------------- */
diff --git a/src/nm-session-monitor-systemd.c b/src/nm-session-monitor-systemd.c
index ae09494..8fe73ae 100644
--- a/src/nm-session-monitor-systemd.c
+++ b/src/nm-session-monitor-systemd.c
@@ -195,7 +195,9 @@ nm_session_monitor_get (void)
 	if (singleton)
 		return g_object_ref (singleton);

-	return NM_SESSION_MONITOR (g_object_new (NM_TYPE_SESSION_MONITOR, NULL));
(Continue reading)

Thomas Bechtold | 4 Feb 10:10
Picon
Favicon
Gravatar

libnm-glib 0.9 depends on glib 2.28 now

Hi,

i tried to build NM 0.9 with glib 2.24 but got the following errors:

nm-object.c: In function 'init_async_got_properties':
nm-object.c:160: error: implicit declaration of function
'g_simple_async_result_take_error'
nm-object.c: In function 'object_created':
nm-object.c:605: error: implicit declaration of function
'g_clear_object'

'g_simple_async_result_take_error' was introduced with commit 9fd98ef9
'g_clear_object' was introduced with commit cc90f101

Was this intended?

Cheers,

Tom

Gmane