VPN import and export committed

2005-06-16 Thread David Zeuthen
Hey,

I just committed a bunch of code for handling the import, and also now
export, of VPN data. There's some churn in the API's so you need to
build and install both NetworkManager and NetworkManager-vpnc in that
order (and install the latter before building the latter). You also want
to run /usr/bin/update-desktop-database as root after installing
NetworkManager-vpnc.

This is because that NetworkManager-vpnc now install a desktop-file to
associate with the MIME-type application/x-cisco-vpn-settings which
means that if someone sends you a .pcf file as an attachment you should
get the option "Open in VPN Connection Manager (vpnc)" which launches
nm-vpn-properties and steps you into the edit VPN details in the import
wizard. I've tested this in Evolution at least [1]. This should work in
Nautilus too, with e.g. double-clicking.

However, for this to work shared-mime-info needs a little patch, details
are here

 https://bugs.freedesktop.org/show_bug.cgi?id=3560

For people using Fedora, I'm going to build this patch into
shared-mime-info so it's available tomorrow in Rawhide. Oh, to be super
elite, we'll need an icon too; I'm going to file a bug against
gnome-icon-theme for gnome-mime-application-x-cisco-vpn-settings.png.

As mentioned I've also added an export option; we'll also export our
routes (since I believe that is an integral part of the VPN connection
settings) as the key X-NM-Routes. It would be great if someone could
test that files generated by our tool works in the Cisco tools (both
with or without the X-NM-Routes). Either way, I think Export is an
useful feature since it enables sysadmins to easily generate the .pcf
files.

David

[1] : though Evolution got a really annoying bug where it uses the
MIME-type embedded in the mail message instead of locally sniffing. This
means that the .pcf files Bryan sent me shows up as fonts :-/

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] more stetic, broken up, 1/2

2005-06-16 Thread Bryan Clark
On Thu, 2005-06-16 at 21:30 -0400, Robert Love wrote:
> Let's break these up into two patches, since I think some of these
> changes are not contentious whatsoever.
> 
> This patch:
> 
> - Renames "Other Wireless Networks..." to "Connect to Other
>   Wireless Network..."
> - Renames "Create new Wireless Network..." to "Create New
>   Wireless Network..."

These changes look fine to me.

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] more stetic, broken up, 2/2

2005-06-16 Thread Bryan Clark
Hi ~

On Thu, 2005-06-16 at 21:32 -0400, Robert Love wrote:
> Meanwhile, this patch includes the following changes:
> 
> - Don't center the "Wireless Networks" menu item.
> - Actually make the "Wireless Networks" menu item inactive.
>   I realize this was done deliberately (with the nasty signal
>   hack), but the thing /is/ insensitive, unselectable, and a
>   label, not a menu item.  The greyed-out look is in.
> - Use gtk_menu_new_with_label(), not the previous complications.

So that was definitely done purposefully, here's why. :-)  We didn't use
a disabled menu item because those are reserved for items that will
_eventually_ become enabled.  In your menus the items are either
enabled, disabled with a possibility of becoming enabled, or not there
at all.  Since the 'Wireless Networks' item never actually becomes
enabled we opted to leave it normal.  Opposite is the 'Wired Network'
menu which does become enabled when you have a wired connection, and
thus we felt a disabled item was perfect for that.  To make the Wireless
Network item stand out as "something you won't be clicking on", we
centered it. The centering also gives a header style look to it that I
think works.

I didn't pay attention to what was done to make that magic happen in the
code, but I definitely think it's better to not make it a disabled menu
item.  The non-greyed-out look is retro these days and soon will be
mainstream, at which point we'll be too cool for it and leave it.

> - Consolidate a few seemingly related functions, all called from
>   the same place once, into one.

That sounds cool to me...

>   - Draw a horizontal separator above the "Wireless Networks"
> label.

The line I think is a little excessive to add it.  It makes the whole
menu look very boxy, especially without the other label change.

Cheers,
~ Bryan

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[patch] more stetic, broken up, 2/2

2005-06-16 Thread Robert Love
On Thu, 2005-06-16 at 21:30 -0400, Robert Love wrote:

> Let's break these up into two patches, since I think some of these
> changes are not contentious whatsoever.

Meanwhile, this patch includes the following changes:

- Don't center the "Wireless Networks" menu item.
- Actually make the "Wireless Networks" menu item inactive.
  I realize this was done deliberately (with the nasty signal
  hack), but the thing /is/ insensitive, unselectable, and a
  label, not a menu item.  The greyed-out look is in.
- Use gtk_menu_new_with_label(), not the previous complications.
- Consolidate a few seemingly related functions, all called from
  the same place once, into one.
- Draw a horizontal separator above the "Wireless Networks"
  label.
- Misc. cleanup: net patch change is -36 lines!

If needed, we can spur debate, bring in experts, vote, draw straws, or
consult the tea leaves on this one.  I think it is the right way to go.

Best,

Robert Love

Index: gnome/applet/applet.c
===
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.c,v
retrieving revision 1.12
diff -u -u -r1.12 applet.c
--- gnome/applet/applet.c   12 Jun 2005 14:35:58 -  1.12
+++ gnome/applet/applet.c   16 Jun 2005 20:12:00 -
@@ -1298,16 +1298,17 @@
 
case DEVICE_TYPE_WIRELESS_ETHERNET:
{
-   NMWirelessMenuItem *item = wireless_menu_item_new ();
-   GtkMenuItem *gtk_item = wireless_menu_item_get_item 
(item);
-wireless_menu_item_update (item, device, n_devices);
-
-   g_object_set_data (G_OBJECT (gtk_item), "device", 
g_strdup (network_device_get_nm_path (device)));
-   g_object_set_data (G_OBJECT (gtk_item), "nm-item-data", 
item);
-   g_signal_connect(G_OBJECT (gtk_item), "activate", 
G_CALLBACK (nmwa_menu_item_activate), applet);
+   NMWirelessMenuItem *item = wireless_menu_item_new 
(device, n_devices);
 
-   gtk_menu_shell_append (GTK_MENU_SHELL (menu), 
GTK_WIDGET (gtk_item));
-   gtk_widget_show (GTK_WIDGET (gtk_item));
+   g_object_set_data (G_OBJECT (item->menu_item), 
"device", g_strdup (network_device_get_nm_path (device)));
+   g_object_set_data (G_OBJECT (item->menu_item), 
"nm-item-data", item);
+   g_signal_connect (G_OBJECT (item->menu_item), 
"activate", G_CALLBACK (nmwa_menu_item_activate), applet);
+
+   gtk_menu_shell_append (GTK_MENU_SHELL (menu), 
GTK_WIDGET (item->separator));
+   gtk_widget_show (GTK_WIDGET (item->separator));
+
+   gtk_menu_shell_append (GTK_MENU_SHELL (menu), 
GTK_WIDGET (item->menu_item));
+   gtk_widget_show (GTK_WIDGET (item->menu_item));
break;
}
 
Index: gnome/applet/menu-items.c
===
RCS file: /cvs/gnome/NetworkManager/gnome/applet/menu-items.c,v
retrieving revision 1.2
diff -u -u -r1.2 menu-items.c
--- gnome/applet/menu-items.c   6 May 2005 02:58:05 -   1.2
+++ gnome/applet/menu-items.c   16 Jun 2005 20:12:00 -
@@ -101,76 +101,34 @@
gtk_widget_set_sensitive (GTK_WIDGET (item->check_item), 
network_device_get_link (dev));
 }
 
-
-/
- *   Wireless menu item
- /
-
-struct NMWirelessMenuItem
-{
-   GtkMenuItem *menu_item;
-   GtkLabel*label;
-};
-
-
-static gboolean label_expose (GtkWidget *widget)
+NMWirelessMenuItem *wireless_menu_item_new (NetworkDevice *dev, const gint 
n_devices)
 {
-   /* Bad hack to make the label draw normally, instead of insensitive. */
-   widget->state = GTK_STATE_NORMAL;
-  
-   return FALSE;
-}
-
-NMWirelessMenuItem *wireless_menu_item_new (void)
-{
-   NMWirelessMenuItem  *item = g_malloc0 (sizeof (NMWirelessMenuItem));
-
-   g_return_val_if_fail (item != NULL, NULL);
-
-   item->menu_item = GTK_MENU_ITEM (gtk_menu_item_new ());
-
-   /* Make sure it looks slightly different if the label determines the 
width of the widget */
-   item->label = GTK_LABEL (gtk_label_new (NULL));
-   gtk_misc_set_padding (GTK_MISC (item->label), 6, 0);
-   g_signal_connect (G_OBJECT (item->label), "expose-event", G_CALLBACK 
(label_expose), NULL);
-
-   gtk_container_add (GTK_CONTAINER (item->menu_item), GTK_WIDGET 
(item->label));
-   gtk_widget_show (GTK_WIDGET (item->label));
-
-   gtk_widget_set_sensitive (GTK_WIDGET (item->menu_item), FALSE);
-
-   return item;
-}
-
-GtkMenuItem *wireless_menu_item_get_item (NMWirelessMen

[patch] more stetic, broken up, 1/2

2005-06-16 Thread Robert Love
On Thu, 2005-06-16 at 16:22 -0400, Robert Love wrote:


> Some of this might be a bit more contentious, but it is all in the name
> of the illusive "stetic":

Let's break these up into two patches, since I think some of these
changes are not contentious whatsoever.

This patch:

- Renames "Other Wireless Networks..." to "Connect to Other
  Wireless Network..."
- Renames "Create new Wireless Network..." to "Create New
  Wireless Network..."

Please, por favor, apply.

Robert Love

Index: gnome/applet/applet.c
===
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.c,v
retrieving revision 1.12
diff -u -u -r1.12 applet.c
--- gnome/applet/applet.c   12 Jun 2005 14:35:58 -  1.12
+++ gnome/applet/applet.c   16 Jun 2005 20:12:00 -
@@ -1329,7 +1330,7 @@
   GtkWidget *label;
 
   menu_item = gtk_menu_item_new ();
-  label = gtk_label_new (_("Other Wireless Networks..."));
+  label = gtk_label_new (_("Connect to Other Wireless Network..."));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_container_add (GTK_CONTAINER (menu_item), label);
   gtk_widget_show_all (menu_item);
@@ -1350,7 +1351,7 @@
   GtkWidget *label;
 
   menu_item = gtk_menu_item_new ();
-  label = gtk_label_new (_("Create new Wireless Network..."));
+  label = gtk_label_new (_("Create New Wireless Network..."));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_container_add (GTK_CONTAINER (menu_item), label);
   gtk_widget_show_all (menu_item);
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] making the applet stetic.

2005-06-16 Thread Dan Williams
On Thu, 2005-06-16 at 16:34 -0400, Robert Love wrote:
> On Thu, 2005-06-16 at 14:49 -0400, Dan Williams wrote:
> 
> > Applied, thanks.  Brian also suggested making the progress bars not as
> > tall, so I've made them (ascent / 2).
> 
> Thanks, Dan.
> 
> Well, I would take a bullet (or at least some sort of blunt flying
> projectile) for my neighbor Brian, but I think that "ascent/2" is too
> small.  Personally.  It is a personal thing.  Nothing against Brian, but
> half is too small.
> 
> If "ascent" is too big, another option is to pass "-1" and have the
> widget scaled to the size of the other widgets.  That might be a bit
> smaller, depending on your font, but not as big as "ascent".
> 
> A patch doing this is attached.
> 
> If not, the comment needs to be adjusted. ;-)

Applied, thanks.

Dan

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


NetworkManager for CS2C and RedFlag Chinese OSVs

2005-06-16 Thread Ahmed, Suhail








Hi All,

 

I would like to contribute towards enabling
NetworkManager on CS2C & RedFlag Chinese OSVs. 

Any short-cuts in getting the dbus/hal functional
for these OSVs?

 

Thanks,

~Suhail






___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] update cvsignore files

2005-06-16 Thread Robert Love
On Thu, 2005-06-16 at 17:34 -0400, Dan Williams wrote:

> Go ahead and commit this one...

Thanks.

I committed this and the POTFILES patch.

Robert Love


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] more stetic!

2005-06-16 Thread Bastien Nocera
On Thu, 2005-06-16 at 17:10 -0400, Peter Jones wrote:
> On Thu, 2005-06-16 at 16:22 -0400, Robert Love wrote:
> > Some more stuff from this kernel-hacker-turned-UI-ninja.
> > 
> > Some of this might be a bit more contentious, but it is all in the name
> > of the illusive "stetic":
> > 
> > - Rename "Other Wireless Networks..." to "Connect to Other
> >   Wireless Network..."
> > - Rename "Create new Wireless Network..." to "Create New
> >   Wireless Network..."
> 
> Why not remove the ellipses, since they don't serve any purpose?

As Robert said, ellipsis are not for "stetic" values. The three dots
mean that another dialog is going to be opened. See your favourite app's
"Save" (which doesn't open a dialogue) vs. "Save As..." (which does open
one).

---
Bastien Nocera <[EMAIL PROTECTED]> 


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] update cvsignore files

2005-06-16 Thread Dan Williams
On Thu, 2005-06-16 at 16:35 -0400, Robert Love wrote:
> Small patch to update the cvsignore files to match generated junk,
> ridding diffs of the dreaded and dangerous "?" lines.

Go ahead and commit this one...

Dan

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[patch] another trivial patch.

2005-06-16 Thread Robert Love
On Thu, 2005-06-16 at 16:51 -0400, Robert Love wrote:

> There are not a lot of commits, at all, outside of Dan.  And there isn't
> a policy in CONTRIBUTING so, until I am told otherwise, no commits from
> me.  I totally respect the one-guy-owns-the-tree view, if that is how NM
> is run.  If not, though, I'd be happy to commit whatever my quota is.

Another trivial one.  Remove stray gtkcell* junk from po/POTFILES.in.

Robert Love

Index: po/POTFILES.in
===
RCS file: /cvs/gnome/NetworkManager/po/POTFILES.in,v
retrieving revision 1.13
diff -u -u -r1.13 POTFILES.in
--- po/POTFILES.in  12 Jun 2005 14:35:58 -  1.13
+++ po/POTFILES.in  16 Jun 2005 21:19:25 -
@@ -5,8 +5,6 @@
 gnome/applet/applet-dbus.c
 gnome/applet/applet.c
 gnome/applet/eggtrayicon.c
-gnome/applet/gtkcellrendererprogress.c
-gnome/applet/gtkcellview.c
 gnome/applet/menu-items.c
 gnome/applet/other-network-dialog.c
 gnome/applet/passphrase-dialog.c
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] more stetic!

2005-06-16 Thread Robert Love
On Thu, 2005-06-16 at 17:10 -0400, Peter Jones wrote:
> On Thu, 2005-06-16 at 16:22 -0400, Robert Love wrote:
> > Some more stuff from this kernel-hacker-turned-UI-ninja.
> > 
> > Some of this might be a bit more contentious, but it is all in the name
> > of the illusive "stetic":
> > 
> > - Rename "Other Wireless Networks..." to "Connect to Other
> >   Wireless Network..."
> > - Rename "Create new Wireless Network..." to "Create New
> >   Wireless Network..."
> 
> Why not remove the ellipses, since they don't serve any purpose?

Unlike all of the other options, they is no immediate action.  They
create a dialog box.  Also, they don't actually "Create a new network"
or whatever, they begin the process thereof.

The HIG might have something to say on this.

Robert Love


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] more stetic!

2005-06-16 Thread Peter Jones
On Thu, 2005-06-16 at 16:22 -0400, Robert Love wrote:
> Some more stuff from this kernel-hacker-turned-UI-ninja.
> 
> Some of this might be a bit more contentious, but it is all in the name
> of the illusive "stetic":
> 
>   - Rename "Other Wireless Networks..." to "Connect to Other
> Wireless Network..."
>   - Rename "Create new Wireless Network..." to "Create New
> Wireless Network..."

Why not remove the ellipses, since they don't serve any purpose?

-- 
Peter

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] update cvsignore files

2005-06-16 Thread Robert Love
On Thu, 2005-06-16 at 21:48 +0100, Bastien Nocera wrote:

> Not that I like butting in, but committing .cvsignore files isn't really
> something that you need to ask permission for, really.

Yah.

There are not a lot of commits, at all, outside of Dan.  And there isn't
a policy in CONTRIBUTING so, until I am told otherwise, no commits from
me.  I totally respect the one-guy-owns-the-tree view, if that is how NM
is run.  If not, though, I'd be happy to commit whatever my quota is.

Robert Love


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] update cvsignore files

2005-06-16 Thread Bastien Nocera
On Thu, 2005-06-16 at 16:35 -0400, Robert Love wrote:
> Small patch to update the cvsignore files to match generated junk,
> ridding diffs of the dreaded and dangerous "?" lines.
> 
> Please, apply.

Not that I like butting in, but committing .cvsignore files isn't really
something that you need to ask permission for, really.

---
Bastien Nocera <[EMAIL PROTECTED]> 


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[patch] update cvsignore files

2005-06-16 Thread Robert Love
Small patch to update the cvsignore files to match generated junk,
ridding diffs of the dreaded and dangerous "?" lines.

Please, apply.

Robert Love


 gnome/vpn-properties/.cvsignore |3 +++
 vpn-daemons/vpnc/.cvsignore |5 +
 vpn-daemons/vpnc/auth-dialog/.cvsignore |1 +
 vpn-daemons/vpnc/po/.cvsignore  |1 +
 vpn-daemons/vpnc/properties/.cvsignore  |1 +
 vpn-daemons/vpnc/src/.cvsignore |1 +
 6 files changed, 12 insertions(+)

Index: gnome/vpn-properties/.cvsignore
===
RCS file: gnome/vpn-properties/.cvsignore
diff -N gnome/vpn-properties/.cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -
+++ gnome/vpn-properties/.cvsignore 16 Jun 2005 20:29:18 -
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+nm-vpn-properties
Index: vpn-daemons/vpnc/.cvsignore
===
RCS file: /cvs/gnome/NetworkManager/vpn-daemons/vpnc/.cvsignore,v
retrieving revision 1.1
diff -u -u -r1.1 .cvsignore
--- vpn-daemons/vpnc/.cvsignore 15 Apr 2005 15:43:42 -  1.1
+++ vpn-daemons/vpnc/.cvsignore 16 Jun 2005 20:29:18 -
@@ -2,3 +2,8 @@
 Makefile.in
 nm-vpnc-service
 nm-vpnc-service-vpnc-helper
+aclocal.m4
+autom4te.cache
+config.h.in
+configure
+mkinstalldirs
Index: vpn-daemons/vpnc/auth-dialog/.cvsignore
===
RCS file: vpn-daemons/vpnc/auth-dialog/.cvsignore
diff -N vpn-daemons/vpnc/auth-dialog/.cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -
+++ vpn-daemons/vpnc/auth-dialog/.cvsignore 16 Jun 2005 20:29:18 -
@@ -0,0 +1 @@
+Makefile.in
Index: vpn-daemons/vpnc/po/.cvsignore
===
RCS file: vpn-daemons/vpnc/po/.cvsignore
diff -N vpn-daemons/vpnc/po/.cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -
+++ vpn-daemons/vpnc/po/.cvsignore  16 Jun 2005 20:29:18 -
@@ -0,0 +1 @@
+Makefile.in.in
Index: vpn-daemons/vpnc/properties/.cvsignore
===
RCS file: vpn-daemons/vpnc/properties/.cvsignore
diff -N vpn-daemons/vpnc/properties/.cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -
+++ vpn-daemons/vpnc/properties/.cvsignore  16 Jun 2005 20:29:18 -
@@ -0,0 +1 @@
+Makefile.in
Index: vpn-daemons/vpnc/src/.cvsignore
===
RCS file: vpn-daemons/vpnc/src/.cvsignore
diff -N vpn-daemons/vpnc/src/.cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -
+++ vpn-daemons/vpnc/src/.cvsignore 16 Jun 2005 20:29:18 -
@@ -0,0 +1 @@
+Makefile.in

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] making the applet stetic.

2005-06-16 Thread Robert Love
On Thu, 2005-06-16 at 14:49 -0400, Dan Williams wrote:

> Applied, thanks.  Brian also suggested making the progress bars not as
> tall, so I've made them (ascent / 2).

Thanks, Dan.

Well, I would take a bullet (or at least some sort of blunt flying
projectile) for my neighbor Brian, but I think that "ascent/2" is too
small.  Personally.  It is a personal thing.  Nothing against Brian, but
half is too small.

If "ascent" is too big, another option is to pass "-1" and have the
widget scaled to the size of the other widgets.  That might be a bit
smaller, depending on your font, but not as big as "ascent".

A patch doing this is attached.

If not, the comment needs to be adjusted. ;-)

Robert Love


 menu-items.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: gnome/applet/menu-items.c
===
RCS file: /cvs/gnome/NetworkManager/gnome/applet/menu-items.c,v
retrieving revision 1.3
diff -u -u -r1.3 menu-items.c
--- gnome/applet/menu-items.c   16 Jun 2005 18:47:56 -  1.3
+++ gnome/applet/menu-items.c   16 Jun 2005 20:29:18 -
@@ -216,8 +216,8 @@
ascent = pango_font_metrics_get_ascent (metrics) * 1.5 / PANGO_SCALE;
pango_font_metrics_unref (metrics);
 
-   /* size our progress bar to be five ascents long, one high */
-   gtk_widget_set_size_request (item->progress, ascent * 5, ascent / 2);
+   /* size our progress bar to be five ascents long */
+   gtk_widget_set_size_request (item->progress, ascent * 5, -1);
 
gtk_box_pack_end (GTK_BOX (hbox), item->progress, FALSE, TRUE, 0);
 
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[patch] more stetic!

2005-06-16 Thread Robert Love
Some more stuff from this kernel-hacker-turned-UI-ninja.

Some of this might be a bit more contentious, but it is all in the name
of the illusive "stetic":

- Rename "Other Wireless Networks..." to "Connect to Other
  Wireless Network..."
- Rename "Create new Wireless Network..." to "Create New
  Wireless Network..."
- Don't center the "Wireless Networks" menu item.
- Actually make the "Wireless Networks" menu item inactive.
  I realize this was done deliberately (with the nasty signal
  hack), but the thing /is/ insensitive, unselectable, and a
  label, not a menu item.  The greyed-out look is in.
- Use gtk_menu_new_with_label(), not the previous complications.
- Consolidate a few seemingly related functions, all called from
  the same place once, into one.
- Misc. cleanup: net patch change is -36 lines!

Compare:

http://rlove.org/log/2005061601.html

All my love,

Robert Love


 applet.c |   23 +-
 menu-items.c |   72 ---
 menu-items.h |9 +--
 3 files changed, 34 insertions(+), 70 deletions(-)

Index: gnome/applet/applet.c
===
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.c,v
retrieving revision 1.12
diff -u -u -r1.12 applet.c
--- gnome/applet/applet.c   12 Jun 2005 14:35:58 -  1.12
+++ gnome/applet/applet.c   16 Jun 2005 20:12:00 -
@@ -1298,16 +1298,17 @@
 
case DEVICE_TYPE_WIRELESS_ETHERNET:
{
-   NMWirelessMenuItem *item = wireless_menu_item_new ();
-   GtkMenuItem *gtk_item = wireless_menu_item_get_item 
(item);
-wireless_menu_item_update (item, device, n_devices);
-
-   g_object_set_data (G_OBJECT (gtk_item), "device", 
g_strdup (network_device_get_nm_path (device)));
-   g_object_set_data (G_OBJECT (gtk_item), "nm-item-data", 
item);
-   g_signal_connect(G_OBJECT (gtk_item), "activate", 
G_CALLBACK (nmwa_menu_item_activate), applet);
+   NMWirelessMenuItem *item = wireless_menu_item_new 
(device, n_devices);
 
-   gtk_menu_shell_append (GTK_MENU_SHELL (menu), 
GTK_WIDGET (gtk_item));
-   gtk_widget_show (GTK_WIDGET (gtk_item));
+   g_object_set_data (G_OBJECT (item->menu_item), 
"device", g_strdup (network_device_get_nm_path (device)));
+   g_object_set_data (G_OBJECT (item->menu_item), 
"nm-item-data", item);
+   g_signal_connect (G_OBJECT (item->menu_item), 
"activate", G_CALLBACK (nmwa_menu_item_activate), applet);
+
+   gtk_menu_shell_append (GTK_MENU_SHELL (menu), 
GTK_WIDGET (item->separator));
+   gtk_widget_show (GTK_WIDGET (item->separator));
+
+   gtk_menu_shell_append (GTK_MENU_SHELL (menu), 
GTK_WIDGET (item->menu_item));
+   gtk_widget_show (GTK_WIDGET (item->menu_item));
break;
}
 
@@ -1329,7 +1330,7 @@
   GtkWidget *label;
 
   menu_item = gtk_menu_item_new ();
-  label = gtk_label_new (_("Other Wireless Networks..."));
+  label = gtk_label_new (_("Connect to Other Wireless Network..."));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_container_add (GTK_CONTAINER (menu_item), label);
   gtk_widget_show_all (menu_item);
@@ -1350,7 +1351,7 @@
   GtkWidget *label;
 
   menu_item = gtk_menu_item_new ();
-  label = gtk_label_new (_("Create new Wireless Network..."));
+  label = gtk_label_new (_("Create New Wireless Network..."));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_container_add (GTK_CONTAINER (menu_item), label);
   gtk_widget_show_all (menu_item);
Index: gnome/applet/menu-items.c
===
RCS file: /cvs/gnome/NetworkManager/gnome/applet/menu-items.c,v
retrieving revision 1.2
diff -u -u -r1.2 menu-items.c
--- gnome/applet/menu-items.c   6 May 2005 02:58:05 -   1.2
+++ gnome/applet/menu-items.c   16 Jun 2005 20:12:00 -
@@ -101,76 +101,34 @@
gtk_widget_set_sensitive (GTK_WIDGET (item->check_item), 
network_device_get_link (dev));
 }
 
-
-/
- *   Wireless menu item
- /
-
-struct NMWirelessMenuItem
-{
-   GtkMenuItem *menu_item;
-   GtkLabel*label;
-};
-
-
-static gboolean label_expose (GtkWidget *widget)
+NMWirelessMenuItem *wireless_menu_item_new (NetworkDevice *dev, const gint 
n_devices)
 {
-   /* Bad hack to make the label draw normally, instead of insensitive. */
-   widget->state = GTK_STATE_NORMAL;
-  
-   return 

FC4 NetworkManager

2005-06-16 Thread Bill Moss
The article at http://www.ces.clemson.edu/linux/nm.shtml has been 
updated for the 6-15-2005 release of NetworkManager which is compatible 
with FC4. It includes a discussion of vpnc configuration.


--
Bill Moss
Professor, Mathematical Sciences
Clemson University

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


NetworkManager-vpnc package for Fedora Rawhide

2005-06-16 Thread David Zeuthen
Hey,

Here's a first attempt at packaging NetworkManager-vpnc for Fedora
Rawhide. You'll need the NetworkManager-0.4-30.cvs20050615 that Dan
uploaded yesterday as well as vpnc-0.3.3-1 from Fedora Extras. I hope I
got the Requires: right to require this :-). Download RPM and SRPM here

 http://people.redhat.com/davidz/nm-vpnc/

Patches to the spec-file, comments, etc. welcome. I'll probably submit
the package to Fedora Extras soon but I'd thought I'd get some feedback
here first.

David


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] making the applet stetic.

2005-06-16 Thread Dan Williams
On Thu, 2005-06-16 at 13:34 -0400, Robert Love wrote:
> As we all know, being stetic is of the utmost importance:
> 
>   http://primates.ximian.com/~peter/stetic.html
> 
> The current NetworkManager applet is not as stetic as it deserves to be;
> it has potential, it dreams of a world in which it is the most beautiful
> applet ever, but it is not yet there.
> 
> The progress bars immediately jump out as low-hanging fruit.
> 
> The attached patch replaces the current gtkcellrenderprivate magic with
> Gtk Progress Bars--but not just any progress bars.  Progress bars that
> are dynamically sized based on the font size.  Beautiful, lovely, public
> progress bars.
> 
> The benefits:
> 
>   - Follows the system theme.  The current Gtkcellrender thing
> is not correctly themed.
>   - Uses a public API instead of the private in-tree gtk code.
>   - Nicer looking size.
>   - Dynamically-sized based on the current language and font
> ascent, to five ascents long and one high.  This elegant
> code is c/o Joey Shaw.
>   - Net code reduction of -1532 lines, four files.
>   - Oh, it is sooo stetic.
> 

Applied, thanks.  Brian also suggested making the progress bars not as
tall, so I've made them (ascent / 2).

Dan

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] suse initscript fix.

2005-06-16 Thread Dan Williams
On Thu, 2005-06-16 at 13:38 -0400, Robert Love wrote:
> Hi,
> 
> Attached patch fixes a small typo in the SUSE initscript and adds a
> cvsignore file to initscripts/SUSE.

Applied, thanks.

Dan

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: VPN changes has landed (Was Re: NetworkManager-list Digest, Vol 9, Issue 13)

2005-06-16 Thread David Zeuthen
On Sun, 2005-06-12 at 13:04 -0400, David Zeuthen wrote:
> For vpnc, we don't yet support setting the vpnc option "Domain" (as
> shown in /usr/sbin/vpnc --long-help) but it's very easy to add. However,
> I'm wary of adding something without testing it so you (or someone)
> would either need to send a patch and tell us it works or be willing to
> test a patch that I can write. It should be very easy to add.

I've just committed changes that adds the "Domain" option in the UI.
Please try it and and see if it works.

David


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [patch] making the applet stetic.

2005-06-16 Thread Bryan Clark
> Compare yourself.  Current applet:
> 
>   http://rlove.org/images/nm-applet-1.jpg
> 
> On the road to being stetic applet:
> 
>   http://rlove.org/images/networkmanager-progress-bar-20050615.png
> 

Nice.  I like the rearranging of the secure icon.

Peace,
~ Bryan

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[patch] suse initscript fix.

2005-06-16 Thread Robert Love
Hi,

Attached patch fixes a small typo in the SUSE initscript and adds a
cvsignore file to initscripts/SUSE.

Please, apply.

Robert Love

Index: initscript/SUSE/.cvsignore
===
RCS file: initscript/SUSE/.cvsignore
diff -N initscript/SUSE/.cvsignore
--- /dev/null   1 Jan 1970 00:00:00 -
+++ initscript/SUSE/.cvsignore  16 Jun 2005 17:37:02 -
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
Index: initscript/SUSE/networkmanager
===
RCS file: /cvs/gnome/NetworkManager/initscript/SUSE/networkmanager,v
retrieving revision 1.1
diff -u -u -r1.1 networkmanager
--- initscript/SUSE/networkmanager  15 Jun 2005 11:59:42 -  1.1
+++ initscript/SUSE/networkmanager  16 Jun 2005 17:37:02 -
@@ -1,7 +1,7 @@
 #! /bin/sh
 ### BEGIN INIT INFO
 # Provides:   NetworkManager
-# Required-Start: $network $dbus
+# Required-Start: $network dbus hal
 # Default-Start:  3 4 5
 # Default-Stop:   0 1 2 6
 # Description: NetworkManager, a network and wireless connection manager
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[Feature?] Honour the networks set up by the network startup script

2005-06-16 Thread Filip Miletic
A potentially useful feature for NetworkManager would be to read and
honour the network settings that are active prior to NM activation. This
would enable the user to set a 'fixed network' that is not touched by NM.

Namely, I've a couple of fixed network settings which get removed by NM
once it starts up. As a consequence, I must always configure the
interfaces manually when I connect to a network which does not support DHCP.

f

___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[Feature?] Default network when no other connection is detected

2005-06-16 Thread Filip Miletic
Greetings.

Is there any way to consider adding a 'default network' option for
NetworkManager? The default network settings would be applied if no
connections managed by NetworkManager can be found.

f


___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list