[network-manager-netbook: 1/17] initial branch from Master on git.gnome.org
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-netbook: 1/17] initial branch from Master on git.gnome.org
- Date: Wed, 3 Nov 2010 17:07:21 +0000 (UTC)
commit 4ac48e3ccfef7be41cf4b4824799db057ad6ed14
Author: Andrew Wafaa <awafaa opensuse org>
Date: Wed Oct 13 16:42:50 2010 +0100
initial branch from Master on git.gnome.org
AUTHORS | 1 +
COPYING | 340 +++
INSTALL | 1 +
Makefile.am | 38 +
TODO | 1 +
autogen.sh | 21 +
configure.in | 56 +
gnome-bluetooth/Makefile.am | 15 +
gnome-bluetooth/network-manager-applet.c | 319 +++
icons/22/Makefile.am | 5 +
icons/22/nm-device-wwan.png | Bin 0 -> 817 bytes
icons/32/Makefile.am | 7 +
icons/32/nm-device-wired.png | Bin 0 -> 989 bytes
icons/32/nm-no-connection.png | Bin 0 -> 1143 bytes
icons/48/Makefile.am | 10 +
icons/48/nm-device-wireless.png | Bin 0 -> 1752 bytes
icons/48/nm-stage01-connecting01.png | Bin 0 -> 276 bytes
icons/48/nm-stage01-connecting02.png | Bin 0 -> 457 bytes
icons/48/nm-stage01-connecting03.png | Bin 0 -> 707 bytes
icons/48/nm-stage01-connecting04.png | Bin 0 -> 1002 bytes
icons/Makefile.am | 37 +
icons/nm-device-wired-active.png | Bin 0 -> 847 bytes
icons/nm-device-wired-normal.png | Bin 0 -> 788 bytes
icons/nm-device-wwan-active.png | Bin 0 -> 1106 bytes
icons/nm-device-wwan-normal.png | Bin 0 -> 941 bytes
icons/nm-no-connection-active.png | Bin 0 -> 901 bytes
icons/nm-no-connection-normal.png | Bin 0 -> 773 bytes
icons/nm-progress-working-01-active.png | Bin 0 -> 791 bytes
icons/nm-progress-working-01-normal.png | Bin 0 -> 747 bytes
icons/nm-progress-working-02-active.png | Bin 0 -> 805 bytes
icons/nm-progress-working-02-normal.png | Bin 0 -> 763 bytes
icons/nm-progress-working-03-active.png | Bin 0 -> 854 bytes
icons/nm-progress-working-03-normal.png | Bin 0 -> 811 bytes
icons/nm-progress-working-04-active.png | Bin 0 -> 809 bytes
icons/nm-progress-working-04-normal.png | Bin 0 -> 744 bytes
icons/nm-progress-working-05-active.png | Bin 0 -> 816 bytes
icons/nm-progress-working-05-normal.png | Bin 0 -> 786 bytes
icons/nm-progress-working-06-active.png | Bin 0 -> 787 bytes
icons/nm-progress-working-06-normal.png | Bin 0 -> 750 bytes
icons/nm-signal-00-active.png | Bin 0 -> 323 bytes
icons/nm-signal-00-normal.png | Bin 0 -> 314 bytes
icons/nm-signal-100-active.png | Bin 0 -> 994 bytes
icons/nm-signal-100-normal.png | Bin 0 -> 979 bytes
icons/nm-signal-25-active.png | Bin 0 -> 318 bytes
icons/nm-signal-25-normal.png | Bin 0 -> 357 bytes
icons/nm-signal-50-active.png | Bin 0 -> 496 bytes
icons/nm-signal-50-normal.png | Bin 0 -> 506 bytes
icons/nm-signal-75-active.png | Bin 0 -> 717 bytes
icons/nm-signal-75-normal.png | Bin 0 -> 721 bytes
icons/toolbar-button-active.png | Bin 0 -> 3053 bytes
icons/toolbar-button-hover.png | Bin 0 -> 3035 bytes
libnm-gtk/.gitignore | 1 +
libnm-gtk/Makefile.am | 105 +
libnm-gtk/gconf-helpers.c | 2592 +++++++++++++++++++++++
libnm-gtk/gconf-helpers.h | 261 +++
libnm-gtk/gconf-upgrade.c | 1993 +++++++++++++++++
libnm-gtk/gconf-upgrade.h | 56 +
libnm-gtk/libnm-gtk-gsm-device.c | 309 +++
libnm-gtk/libnm-gtk-gsm-device.h | 70 +
libnm-gtk/nm-bt-item.c | 87 +
libnm-gtk/nm-bt-item.h | 52 +
libnm-gtk/nm-bt-provider.c | 71 +
libnm-gtk/nm-bt-provider.h | 51 +
libnm-gtk/nm-cdma-item.c | 76 +
libnm-gtk/nm-cdma-item.h | 52 +
libnm-gtk/nm-cdma-provider.c | 71 +
libnm-gtk/nm-cdma-provider.h | 51 +
libnm-gtk/nm-connection-item.c | 568 +++++
libnm-gtk/nm-connection-item.h | 82 +
libnm-gtk/nm-connection-list.c | 263 +++
libnm-gtk/nm-connection-list.h | 54 +
libnm-gtk/nm-connection-model.c | 203 ++
libnm-gtk/nm-connection-model.h | 60 +
libnm-gtk/nm-device-handler.c | 263 +++
libnm-gtk/nm-device-handler.h | 60 +
libnm-gtk/nm-device-item.c | 198 ++
libnm-gtk/nm-device-item.h | 57 +
libnm-gtk/nm-device-model.c | 266 +++
libnm-gtk/nm-device-model.h | 61 +
libnm-gtk/nm-device-provider.c | 152 ++
libnm-gtk/nm-device-provider.h | 59 +
libnm-gtk/nm-ethernet-item.c | 129 ++
libnm-gtk/nm-ethernet-item.h | 52 +
libnm-gtk/nm-ethernet-provider.c | 71 +
libnm-gtk/nm-ethernet-provider.h | 51 +
libnm-gtk/nm-gconf-connection.c | 1001 +++++++++
libnm-gtk/nm-gconf-connection.h | 79 +
libnm-gtk/nm-gconf-settings.c | 525 +++++
libnm-gtk/nm-gconf-settings.h | 64 +
libnm-gtk/nm-gsm-item.c | 76 +
libnm-gtk/nm-gsm-item.h | 52 +
libnm-gtk/nm-gsm-pin-request-item.c | 179 ++
libnm-gtk/nm-gsm-pin-request-item.h | 57 +
libnm-gtk/nm-gsm-provider.c | 335 +++
libnm-gtk/nm-gsm-provider.h | 51 +
libnm-gtk/nm-icon-cache.c | 101 +
libnm-gtk/nm-icon-cache.h | 28 +
libnm-gtk/nm-item-provider.c | 310 +++
libnm-gtk/nm-item-provider.h | 79 +
libnm-gtk/nm-list-item.c | 363 ++++
libnm-gtk/nm-list-item.h | 99 +
libnm-gtk/nm-list-model.c | 314 +++
libnm-gtk/nm-list-model.h | 67 +
libnm-gtk/nm-mobile-providers.c | 866 ++++++++
libnm-gtk/nm-mobile-providers.h | 100 +
libnm-gtk/nm-status-icon.c | 246 +++
libnm-gtk/nm-status-icon.h | 51 +
libnm-gtk/nm-status-model.c | 140 ++
libnm-gtk/nm-status-model.h | 55 +
libnm-gtk/nm-wifi-item.c | 735 +++++++
libnm-gtk/nm-wifi-item.h | 63 +
libnm-gtk/nm-wifi-provider.c | 227 ++
libnm-gtk/nm-wifi-provider.h | 51 +
libnm-gtk/test.c | 224 ++
libnm-gtk/utils.c | 874 ++++++++
libnm-gtk/utils.h | 65 +
libnm-gtk/wireless-dialog.c | 1213 +++++++++++
libnm-gtk/wireless-dialog.h | 66 +
libnm-gtk/wireless-helper.h | 33 +
libnm-gtk/wireless-security.ui | 312 +++
libnm-gtk/wireless-security/Makefile.am | 54 +
libnm-gtk/wireless-security/ca-nag-dialog.ui | 191 ++
libnm-gtk/wireless-security/dynamic-wep.ui | 85 +
libnm-gtk/wireless-security/eap-leap.ui | 102 +
libnm-gtk/wireless-security/eap-method-leap.c | 162 ++
libnm-gtk/wireless-security/eap-method-leap.h | 36 +
libnm-gtk/wireless-security/eap-method-peap.c | 336 +++
libnm-gtk/wireless-security/eap-method-peap.h | 38 +
libnm-gtk/wireless-security/eap-method-simple.c | 184 ++
libnm-gtk/wireless-security/eap-method-simple.h | 46 +
libnm-gtk/wireless-security/eap-method-tls.c | 404 ++++
libnm-gtk/wireless-security/eap-method-tls.h | 38 +
libnm-gtk/wireless-security/eap-method-ttls.c | 347 +++
libnm-gtk/wireless-security/eap-method-ttls.h | 38 +
libnm-gtk/wireless-security/eap-method.c | 474 +++++
libnm-gtk/wireless-security/eap-method.h | 110 +
libnm-gtk/wireless-security/eap-peap.ui | 188 ++
libnm-gtk/wireless-security/eap-simple.ui | 102 +
libnm-gtk/wireless-security/eap-tls.ui | 180 ++
libnm-gtk/wireless-security/eap-ttls.ui | 138 ++
libnm-gtk/wireless-security/helpers.c | 49 +
libnm-gtk/wireless-security/helpers.h | 40 +
libnm-gtk/wireless-security/leap.ui | 102 +
libnm-gtk/wireless-security/wep-key.ui | 185 ++
libnm-gtk/wireless-security/wireless-security.c | 441 ++++
libnm-gtk/wireless-security/wireless-security.h | 127 ++
libnm-gtk/wireless-security/wpa-eap.ui | 85 +
libnm-gtk/wireless-security/wpa-psk.ui | 112 +
libnm-gtk/wireless-security/ws-dynamic-wep.c | 121 ++
libnm-gtk/wireless-security/ws-dynamic-wep.h | 34 +
libnm-gtk/wireless-security/ws-leap.c | 174 ++
libnm-gtk/wireless-security/ws-leap.h | 33 +
libnm-gtk/wireless-security/ws-wep-key.c | 333 +++
libnm-gtk/wireless-security/ws-wep-key.h | 40 +
libnm-gtk/wireless-security/ws-wpa-eap.c | 116 +
libnm-gtk/wireless-security/ws-wpa-eap.h | 34 +
libnm-gtk/wireless-security/ws-wpa-psk.c | 189 ++
libnm-gtk/wireless-security/ws-wpa-psk.h | 33 +
marshallers/.gitignore | 2 +
marshallers/Makefile.am | 25 +
marshallers/nma-marshal-main.c | 2 +
marshallers/nma-marshal.list | 7 +
network-manager-netbook.css.in | 123 ++
network-manager-netbook.desktop.in | 8 +
network-manager-netbook.doap | 17 +
org.moblin.UX.Shell.Panels.network.service.in | 3 +
po/.gitignore | 2 +
po/LINGUAS | 36 +
po/POTFILES.in | 39 +
po/ar.po | 555 +++++
po/bg.po | 662 ++++++
po/cs.po | 664 ++++++
po/da.po | 664 ++++++
po/de.po | 698 ++++++
po/el.po | 672 ++++++
po/es.po | 691 ++++++
po/et.po | 504 +++++
po/eu.po | 664 ++++++
po/fi.po | 558 +++++
po/fr.po | 670 ++++++
po/gl.po | 664 ++++++
po/gu.po | 552 +++++
po/hu.po | 666 ++++++
po/id.po | 660 ++++++
po/it.po | 669 ++++++
po/ja.po | 558 +++++
po/ko.po | 554 +++++
po/lt.po | 668 ++++++
po/lv.po | 667 ++++++
po/nb.po | 2041 ++++++++++++++++++
po/nl.po | 559 +++++
po/pa.po | 687 ++++++
po/pl.po | 666 ++++++
po/pt.po | 665 ++++++
po/pt_BR.po | 688 ++++++
po/ru.po | 665 ++++++
po/sl.po | 676 ++++++
po/sv.po | 673 ++++++
po/tr.po | 557 +++++
po/uk.po | 663 ++++++
po/zh_CN.po | 683 ++++++
po/zh_HK.po | 681 ++++++
po/zh_TW.po | 682 ++++++
src/.gitignore | 1 +
src/Makefile.am | 45 +
src/gtkinfobar.c | 1249 +++++++++++
src/gtkinfobar.h | 116 +
src/main.c | 142 ++
src/nmn-applet.c | 664 ++++++
src/nmn-applet.h | 53 +
src/nmn-connection-details.c | 562 +++++
src/nmn-connection-details.h | 58 +
src/nmn-gsm-pin-request-renderer.c | 191 ++
src/nmn-gsm-pin-request-renderer.h | 45 +
src/nmn-item-renderer.c | 246 +++
src/nmn-item-renderer.h | 65 +
src/nmn-list.c | 444 ++++
src/nmn-list.h | 49 +
src/nmn-model.c | 563 +++++
src/nmn-model.h | 87 +
src/nmn-network-renderer.c | 473 +++++
src/nmn-network-renderer.h | 45 +
src/nmn-new-connection.c | 832 ++++++++
src/nmn-new-connection.h | 51 +
src/nmn-panel-client.c | 401 ++++
src/nmn-panel-client.h | 52 +
226 files changed, 53944 insertions(+), 0 deletions(-)
---
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..14e8dfb
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1 @@
+Tambet Ingo <tambet novell com>
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..623b625
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
diff --git a/INSTALL b/INSTALL
new file mode 120000
index 0000000..5bb6e7b
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1 @@
+/usr/share/automake-1.10/INSTALL
\ No newline at end of file
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..3755ab9
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,38 @@
+SUBDIRS = icons marshallers libnm-gtk src gnome-bluetooth po
+
+autostartdir = $(sysconfdir)/xdg/autostart
+autostart_in_files = network-manager-netbook.desktop.in
+autostart_DATA = network-manager-netbook.desktop
+
+%.desktop: %.desktop.in
+ $(AM_V_GEN) sed -e "s|\ libexecdir\@|$(libexecdir)|" $< > $@
+
+servicedir = $(datadir)/dbus-1/services
+service_in_files = org.moblin.UX.Shell.Panels.network.service.in
+service_DATA = org.moblin.UX.Shell.Panels.network.service
+
+%.service: %.service.in
+ $(AM_V_GEN) sed -e "s|\ libexecdir\@|$(libexecdir)|" $< > $@
+
+themedir = $(pkgdatadir)/theme
+theme_in_files = network-manager-netbook.css.in
+theme_DATA = network-manager-netbook.css
+
+%.css: %.css.in
+ $(AM_V_GEN) sed -e "s|\ pkgdatadir\@|$(pkgdatadir)|" $< > $@
+
+EXTRA_DIST = \
+ $(autostart_in_files) \
+ $(service_in_files) \
+ $(theme_in_files) \
+ intltool-extract.in \
+ intltool-merge.in \
+ intltool-update.in
+
+DISTCLEANFILES = \
+ $(autostart_DATA) \
+ $(service_DATA) \
+ $(theme_DATA) \
+ intltool-extract \
+ intltool-merge \
+ intltool-update
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644
index 0000000..e69de29
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/TODO
@@ -0,0 +1 @@
+
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..3840e4f
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+REQUIRED_AUTOMAKE_VERSION=1.7
+PKG_NAME=network-manager-netbook
+
+(test -f $srcdir/configure.in \
+ && test -f $srcdir/src/main.c) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level $PKG_NAME directory"
+ exit 1
+}
+
+(cd $srcdir;
+ autoreconf --install --symlink &&
+ intltoolize --force --copy --automake &&
+ autoreconf &&
+ ./configure --enable-maintainer-mode $@
+)
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..9545822
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,56 @@
+AC_PREREQ(2.52)
+
+AC_INIT(network-manager-netbook, 1.7, tambet novell com, network-manager-netbook)
+AM_INIT_AUTOMAKE([-Wall -Werror foreign no-dist-gzip dist-bzip2])
+AM_MAINTAINER_MODE
+
+AC_CONFIG_HEADERS(config.h)
+
+# Enable silent build when available (Automake 1.11)
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
+dnl Required programs
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+dnl translation support
+GETTEXT_PACKAGE=network-manager-netbook
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
+IT_PROG_INTLTOOL([0.35.0])
+AM_GLIB_GNU_GETTEXT
+
+NM_REQUIRED=0.7.996
+
+PKG_CHECK_MODULES(LIBNM_GTK, gtk+-2.0 gconf-2.0 gnome-keyring-1 libnm-util >= $NM_REQUIRED libnm-glib >= $NM_REQUIRED mobile-broadband-provider-info)
+
+PKG_CHECK_MODULES(NMN, dbus-glib-1 >= 0.75 gtk+-2.0 gconf-2.0 gnome-keyring-1 libnotify libnm-util >= $NM_REQUIRED libnm-glib >= $NM_REQUIRED moblin-panel nbtk-gtk-1.2)
+
+dnl Check for gnome-bluetooth
+PKG_CHECK_MODULES(GNOME_BLUETOOTH,
+ gconf-2.0
+ gnome-bluetooth-1.0 >= 2.27.6
+ libnm-util
+ libnm-glib,
+ have_gbt=yes, have_gbt=no)
+AM_CONDITIONAL(HAVE_GBT, test x"$have_gbt" = "xyes")
+
+GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
+AC_SUBST(GLIB_GENMARSHAL)
+
+AC_CONFIG_FILES([
+Makefile
+gnome-bluetooth/Makefile
+icons/Makefile
+icons/22/Makefile
+icons/32/Makefile
+icons/48/Makefile
+libnm-gtk/Makefile
+libnm-gtk/wireless-security/Makefile
+po/Makefile.in
+marshallers/Makefile
+src/Makefile
+])
+AC_OUTPUT
diff --git a/gnome-bluetooth/Makefile.am b/gnome-bluetooth/Makefile.am
new file mode 100644
index 0000000..6406ab7
--- /dev/null
+++ b/gnome-bluetooth/Makefile.am
@@ -0,0 +1,15 @@
+plugindir = $(libdir)/gnome-bluetooth/plugins
+
+if HAVE_GBT
+plugin_LTLIBRARIES = libnma.la
+
+libnma_la_CPPFLAGS = \
+ -I${top_srcdir}/libnm-gtk \
+ $(GNOME_BLUETOOTH_CFLAGS)
+
+libnma_la_SOURCES = network-manager-applet.c
+libnma_la_LDFLAGS = -module -avoid-version
+libnma_la_LIBADD = $(top_builddir)/libnm-gtk/libnm-gtk.la $(GNOME_BLUETOOTH_LIBS)
+endif
+
+EXTRA_DIST = network-manager-applet.c
diff --git a/gnome-bluetooth/network-manager-applet.c b/gnome-bluetooth/network-manager-applet.c
new file mode 100644
index 0000000..946b287
--- /dev/null
+++ b/gnome-bluetooth/network-manager-applet.c
@@ -0,0 +1,319 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ *
+ * BlueZ - Bluetooth protocol stack for Linux
+ *
+ * Copyright (C) 2009 Bastien Nocera <hadess hadess net>
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <net/ethernet.h>
+#include <netinet/ether.h>
+#include <glib/gi18n-lib.h>
+
+#include <gtk/gtk.h>
+#include <bluetooth-plugin.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-bluetooth.h>
+#include <nm-setting-ip4-config.h>
+#include <nm-utils.h>
+#include <nm-settings-interface.h>
+#include <nm-remote-settings.h>
+#include <nm-remote-settings-system.h>
+#include <gconf-helpers.h>
+
+static gboolean
+has_config_widget (const char *bdaddr, const char **uuids)
+{
+ guint i;
+
+ for (i = 0; uuids && uuids[i] != NULL; i++) {
+ if (g_str_equal (uuids[i], "NAP"))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static GByteArray *
+get_array_from_bdaddr (const char *str)
+{
+ struct ether_addr *addr;
+ GByteArray *array;
+
+ addr = ether_aton (str);
+ if (addr) {
+ array = g_byte_array_sized_new (ETH_ALEN);
+ g_byte_array_append (array, (const guint8 *) addr->ether_addr_octet, ETH_ALEN);
+ return array;
+ }
+
+ return NULL;
+}
+
+typedef struct {
+ GMainLoop *loop;
+ guint counter;
+} GetSettingsSyncInfo;
+
+static void
+connections_read (NMSettingsInterface *settings,
+ gpointer user_data)
+{
+ GetSettingsSyncInfo *info = user_data;
+
+ info->counter--;
+ if (info->counter < 1)
+ g_main_loop_quit (info->loop);
+}
+
+static gboolean
+get_settings_timed_out (gpointer user_data)
+{
+ GetSettingsSyncInfo *info = user_data;
+
+ g_warning ("Getting settings timed out");
+ g_main_loop_quit (info->loop);
+
+ return FALSE;
+}
+
+static NMSettingsInterface *user_settings = NULL;
+static NMSettingsInterface *system_settings = NULL;
+
+static gboolean
+init_settings ()
+{
+ DBusGConnection *bus;
+ GetSettingsSyncInfo info;
+ GError *err = NULL;
+ gboolean running;
+
+ bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, &err);
+ if (!bus) {
+ g_warning ("Couldn't connect to system bus: %s", err->message);
+ g_error_free (err);
+ return FALSE;
+ }
+
+ info.loop = g_main_loop_new (NULL, FALSE);
+ info.counter = 0;
+
+ user_settings = NM_SETTINGS_INTERFACE (nm_remote_settings_new (bus, NM_CONNECTION_SCOPE_USER));
+ g_object_get (user_settings, NM_REMOTE_SETTINGS_SERVICE_RUNNING, &running, NULL);
+ if (running) {
+ g_signal_connect (user_settings, "connections-read", G_CALLBACK (connections_read), &info);
+ info.counter++;
+ }
+
+ system_settings = NM_SETTINGS_INTERFACE (nm_remote_settings_system_new (bus));
+ g_object_get (system_settings, NM_REMOTE_SETTINGS_SERVICE_RUNNING, &running, NULL);
+ if (running) {
+ g_signal_connect (system_settings, "connections-read", G_CALLBACK (connections_read), &info);
+ info.counter++;
+ }
+
+ dbus_g_connection_unref (bus);
+
+ if (info.counter > 0) {
+ guint timeout_id;
+
+ /* Add a timer so that we don't wait here forever in case we never
+ get signaled that services are read */
+ timeout_id = g_timeout_add_seconds (5, get_settings_timed_out, &info);
+ g_main_loop_run (info.loop);
+ g_source_remove (timeout_id);
+ }
+
+ g_main_loop_unref (info.loop);
+
+ return TRUE;
+}
+
+static GSList *
+get_settings (void)
+{
+ GSList *list;
+
+ if (!user_settings && !system_settings && !init_settings ())
+ return NULL;
+
+ list = nm_settings_interface_list_connections (user_settings);
+ list = g_slist_concat (list, nm_settings_interface_list_connections (system_settings));
+
+ return list;
+}
+
+static NMSettingsConnectionInterface *
+get_connection_for_bdaddr (const char *bdaddr)
+{
+ NMSettingsConnectionInterface *found = NULL;
+ GSList *list, *l;
+ GByteArray *array;
+
+ array = get_array_from_bdaddr (bdaddr);
+ if (array == NULL)
+ return NULL;
+
+ list = get_settings ();
+ for (l = list; l != NULL; l = l->next) {
+ NMSettingsConnectionInterface *candidate = l->data;
+ NMSetting *setting;
+ const char *type;
+ const GByteArray *addr;
+
+ setting = nm_connection_get_setting_by_name (NM_CONNECTION (candidate), NM_SETTING_BLUETOOTH_SETTING_NAME);
+ if (setting == NULL)
+ continue;
+ type = nm_setting_bluetooth_get_connection_type (NM_SETTING_BLUETOOTH (setting));
+ if (g_strcmp0 (type, NM_SETTING_BLUETOOTH_TYPE_PANU) != 0)
+ continue;
+ addr = nm_setting_bluetooth_get_bdaddr (NM_SETTING_BLUETOOTH (setting));
+ if (addr == NULL || memcmp (addr->data, array->data, addr->len) != 0)
+ continue;
+ found = candidate;
+ break;
+ }
+
+ g_byte_array_free (array, TRUE);
+ g_slist_free (list);
+
+ return found;
+}
+
+static void
+create_connection (const char *bdaddr)
+{
+ NMConnection *connection;
+ NMSetting *setting;
+ GByteArray *mac;
+ char *id, *uuid;
+
+ mac = get_array_from_bdaddr (bdaddr);
+ if (mac == NULL)
+ return;
+
+ /* The connection */
+ connection = nm_connection_new ();
+
+ /* The connection settings */
+ setting = nm_setting_connection_new ();
+ id = g_strdup_printf ("%s %s", bdaddr, "PANU");
+ uuid = nm_utils_uuid_generate ();
+ g_object_set (G_OBJECT (setting),
+ NM_SETTING_CONNECTION_ID, id,
+ NM_SETTING_CONNECTION_UUID, uuid,
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_BLUETOOTH_SETTING_NAME,
+ NM_SETTING_CONNECTION_AUTOCONNECT, FALSE,
+ NULL);
+ g_free (id);
+ g_free (uuid);
+ nm_connection_add_setting (connection, setting);
+
+ /* The Bluetooth settings */
+ setting = nm_setting_bluetooth_new ();
+ g_object_set (G_OBJECT (setting),
+ NM_SETTING_BLUETOOTH_BDADDR, mac,
+ NM_SETTING_BLUETOOTH_TYPE, NM_SETTING_BLUETOOTH_TYPE_PANU,
+ NULL);
+ g_byte_array_free (mac, TRUE);
+ nm_connection_add_setting (connection, setting);
+
+ /* The IPv4 settings */
+ setting = nm_setting_ip4_config_new ();
+ g_object_set (G_OBJECT (setting),
+ NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO,
+ NULL);
+ nm_connection_add_setting (connection, setting);
+
+ nm_gconf_write_connection (connection, NULL, NULL);
+ g_object_unref (connection);
+}
+
+static void
+delete_cb (NMSettingsConnectionInterface *connection,
+ GError *error,
+ gpointer user_data)
+{
+ if (error)
+ g_warning ("Error deleting connection: (%d) %s", error->code, error->message);
+}
+
+static void
+delete_connection (const char *bdaddr)
+{
+ NMSettingsConnectionInterface *connection;
+
+ // FIXME: don't just delete any random PAN conenction for this
+ // bdaddr, actually delete the one this plugin created
+ connection = get_connection_for_bdaddr (bdaddr);
+ if (connection)
+ nm_settings_connection_interface_delete (connection, delete_cb, NULL);
+}
+
+static void
+button_toggled (GtkToggleButton *button, gpointer user_data)
+{
+ const char *bdaddr;
+
+ bdaddr = g_object_get_data (G_OBJECT (button), "bdaddr");
+ g_assert (bdaddr);
+
+ if (gtk_toggle_button_get_active (button) == FALSE)
+ delete_connection (bdaddr);
+ else
+ create_connection (bdaddr);
+}
+
+static GtkWidget *
+get_config_widgets (const char *bdaddr, const char **uuids)
+{
+ GtkWidget *button;
+ NMSettingsConnectionInterface *connection;
+
+ button = gtk_check_button_new_with_label (_("Access the Internet using your mobile phone"));
+ g_object_set_data_full (G_OBJECT (button),
+ "bdaddr", g_strdup (bdaddr),
+ (GDestroyNotify) g_free);
+
+ connection = get_connection_for_bdaddr (bdaddr);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), connection != NULL);
+ g_signal_connect (button, "toggled", G_CALLBACK (button_toggled), NULL);
+
+ return button;
+}
+
+static void
+device_removed (const char *bdaddr)
+{
+ g_message ("Device '%s' got removed", bdaddr);
+ delete_connection (bdaddr);
+}
+
+static GbtPluginInfo plugin_info = {
+ "network-manager-applet",
+ has_config_widget,
+ get_config_widgets,
+ device_removed
+};
+
+GBT_INIT_PLUGIN(plugin_info)
+
diff --git a/icons/22/Makefile.am b/icons/22/Makefile.am
new file mode 100644
index 0000000..b9d30b6
--- /dev/null
+++ b/icons/22/Makefile.am
@@ -0,0 +1,5 @@
+icondir=${datadir}/icons/hicolor/22x22/apps
+icon_DATA = \
+ nm-device-wwan.png
+
+EXTRA_DIST = $(icon_DATA)
diff --git a/icons/22/nm-device-wwan.png b/icons/22/nm-device-wwan.png
new file mode 100644
index 0000000..386abd5
Binary files /dev/null and b/icons/22/nm-device-wwan.png differ
diff --git a/icons/32/Makefile.am b/icons/32/Makefile.am
new file mode 100644
index 0000000..311a66b
--- /dev/null
+++ b/icons/32/Makefile.am
@@ -0,0 +1,7 @@
+icondir=${datadir}/icons/hicolor/32x32/apps
+icon_DATA = \
+ nm-device-wired.png \
+ nm-no-connection.png
+
+EXTRA_DIST = $(icon_DATA)
+
diff --git a/icons/32/nm-device-wired.png b/icons/32/nm-device-wired.png
new file mode 100644
index 0000000..3d0b468
Binary files /dev/null and b/icons/32/nm-device-wired.png differ
diff --git a/icons/32/nm-no-connection.png b/icons/32/nm-no-connection.png
new file mode 100644
index 0000000..c9114f3
Binary files /dev/null and b/icons/32/nm-no-connection.png differ
diff --git a/icons/48/Makefile.am b/icons/48/Makefile.am
new file mode 100644
index 0000000..f411012
--- /dev/null
+++ b/icons/48/Makefile.am
@@ -0,0 +1,10 @@
+icondir=${datadir}/icons/hicolor/48x48/apps
+icon_DATA = \
+ nm-device-wireless.png \
+ nm-stage01-connecting01.png \
+ nm-stage01-connecting02.png \
+ nm-stage01-connecting03.png \
+ nm-stage01-connecting04.png
+
+EXTRA_DIST = $(icon_DATA)
+
diff --git a/icons/48/nm-device-wireless.png b/icons/48/nm-device-wireless.png
new file mode 100644
index 0000000..a3e9e26
Binary files /dev/null and b/icons/48/nm-device-wireless.png differ
diff --git a/icons/48/nm-stage01-connecting01.png b/icons/48/nm-stage01-connecting01.png
new file mode 100644
index 0000000..50a10b7
Binary files /dev/null and b/icons/48/nm-stage01-connecting01.png differ
diff --git a/icons/48/nm-stage01-connecting02.png b/icons/48/nm-stage01-connecting02.png
new file mode 100644
index 0000000..39f7cc6
Binary files /dev/null and b/icons/48/nm-stage01-connecting02.png differ
diff --git a/icons/48/nm-stage01-connecting03.png b/icons/48/nm-stage01-connecting03.png
new file mode 100644
index 0000000..bf9d58e
Binary files /dev/null and b/icons/48/nm-stage01-connecting03.png differ
diff --git a/icons/48/nm-stage01-connecting04.png b/icons/48/nm-stage01-connecting04.png
new file mode 100644
index 0000000..0f8631a
Binary files /dev/null and b/icons/48/nm-stage01-connecting04.png differ
diff --git a/icons/Makefile.am b/icons/Makefile.am
new file mode 100644
index 0000000..397b32b
--- /dev/null
+++ b/icons/Makefile.am
@@ -0,0 +1,37 @@
+SUBDIRS = 22 32 48
+
+iconsdir = $(pkgdatadir)/icons
+
+icons_DATA = \
+ nm-device-wired-active.png \
+ nm-device-wired-normal.png \
+ nm-device-wwan-active.png \
+ nm-device-wwan-normal.png \
+ nm-no-connection-active.png \
+ nm-no-connection-normal.png \
+ nm-progress-working-01-active.png \
+ nm-progress-working-01-normal.png \
+ nm-progress-working-02-active.png \
+ nm-progress-working-02-normal.png \
+ nm-progress-working-03-active.png \
+ nm-progress-working-03-normal.png \
+ nm-progress-working-04-active.png \
+ nm-progress-working-04-normal.png \
+ nm-progress-working-05-active.png \
+ nm-progress-working-05-normal.png \
+ nm-progress-working-06-active.png \
+ nm-progress-working-06-normal.png \
+ nm-signal-00-active.png \
+ nm-signal-00-normal.png \
+ nm-signal-100-active.png \
+ nm-signal-100-normal.png \
+ nm-signal-25-active.png \
+ nm-signal-25-normal.png \
+ nm-signal-50-active.png \
+ nm-signal-50-normal.png \
+ nm-signal-75-active.png \
+ nm-signal-75-normal.png \
+ toolbar-button-active.png \
+ toolbar-button-hover.png
+
+EXTRA_DIST = $(icons_DATA)
diff --git a/icons/nm-device-wired-active.png b/icons/nm-device-wired-active.png
new file mode 100644
index 0000000..ba011a8
Binary files /dev/null and b/icons/nm-device-wired-active.png differ
diff --git a/icons/nm-device-wired-normal.png b/icons/nm-device-wired-normal.png
new file mode 100644
index 0000000..e041d9f
Binary files /dev/null and b/icons/nm-device-wired-normal.png differ
diff --git a/icons/nm-device-wwan-active.png b/icons/nm-device-wwan-active.png
new file mode 100644
index 0000000..67081a6
Binary files /dev/null and b/icons/nm-device-wwan-active.png differ
diff --git a/icons/nm-device-wwan-normal.png b/icons/nm-device-wwan-normal.png
new file mode 100644
index 0000000..ec0aae9
Binary files /dev/null and b/icons/nm-device-wwan-normal.png differ
diff --git a/icons/nm-no-connection-active.png b/icons/nm-no-connection-active.png
new file mode 100644
index 0000000..e1a67fd
Binary files /dev/null and b/icons/nm-no-connection-active.png differ
diff --git a/icons/nm-no-connection-normal.png b/icons/nm-no-connection-normal.png
new file mode 100644
index 0000000..15f9d3c
Binary files /dev/null and b/icons/nm-no-connection-normal.png differ
diff --git a/icons/nm-progress-working-01-active.png b/icons/nm-progress-working-01-active.png
new file mode 100644
index 0000000..498485f
Binary files /dev/null and b/icons/nm-progress-working-01-active.png differ
diff --git a/icons/nm-progress-working-01-normal.png b/icons/nm-progress-working-01-normal.png
new file mode 100644
index 0000000..fbc23f5
Binary files /dev/null and b/icons/nm-progress-working-01-normal.png differ
diff --git a/icons/nm-progress-working-02-active.png b/icons/nm-progress-working-02-active.png
new file mode 100644
index 0000000..371c9dd
Binary files /dev/null and b/icons/nm-progress-working-02-active.png differ
diff --git a/icons/nm-progress-working-02-normal.png b/icons/nm-progress-working-02-normal.png
new file mode 100644
index 0000000..01f4008
Binary files /dev/null and b/icons/nm-progress-working-02-normal.png differ
diff --git a/icons/nm-progress-working-03-active.png b/icons/nm-progress-working-03-active.png
new file mode 100644
index 0000000..faaac54
Binary files /dev/null and b/icons/nm-progress-working-03-active.png differ
diff --git a/icons/nm-progress-working-03-normal.png b/icons/nm-progress-working-03-normal.png
new file mode 100644
index 0000000..013fae9
Binary files /dev/null and b/icons/nm-progress-working-03-normal.png differ
diff --git a/icons/nm-progress-working-04-active.png b/icons/nm-progress-working-04-active.png
new file mode 100644
index 0000000..1252c61
Binary files /dev/null and b/icons/nm-progress-working-04-active.png differ
diff --git a/icons/nm-progress-working-04-normal.png b/icons/nm-progress-working-04-normal.png
new file mode 100644
index 0000000..d7f5546
Binary files /dev/null and b/icons/nm-progress-working-04-normal.png differ
diff --git a/icons/nm-progress-working-05-active.png b/icons/nm-progress-working-05-active.png
new file mode 100644
index 0000000..8c94a02
Binary files /dev/null and b/icons/nm-progress-working-05-active.png differ
diff --git a/icons/nm-progress-working-05-normal.png b/icons/nm-progress-working-05-normal.png
new file mode 100644
index 0000000..f606642
Binary files /dev/null and b/icons/nm-progress-working-05-normal.png differ
diff --git a/icons/nm-progress-working-06-active.png b/icons/nm-progress-working-06-active.png
new file mode 100644
index 0000000..a337742
Binary files /dev/null and b/icons/nm-progress-working-06-active.png differ
diff --git a/icons/nm-progress-working-06-normal.png b/icons/nm-progress-working-06-normal.png
new file mode 100644
index 0000000..fbf7531
Binary files /dev/null and b/icons/nm-progress-working-06-normal.png differ
diff --git a/icons/nm-signal-00-active.png b/icons/nm-signal-00-active.png
new file mode 100644
index 0000000..dd15795
Binary files /dev/null and b/icons/nm-signal-00-active.png differ
diff --git a/icons/nm-signal-00-normal.png b/icons/nm-signal-00-normal.png
new file mode 100644
index 0000000..df86d88
Binary files /dev/null and b/icons/nm-signal-00-normal.png differ
diff --git a/icons/nm-signal-100-active.png b/icons/nm-signal-100-active.png
new file mode 100644
index 0000000..d1cc793
Binary files /dev/null and b/icons/nm-signal-100-active.png differ
diff --git a/icons/nm-signal-100-normal.png b/icons/nm-signal-100-normal.png
new file mode 100644
index 0000000..06b9812
Binary files /dev/null and b/icons/nm-signal-100-normal.png differ
diff --git a/icons/nm-signal-25-active.png b/icons/nm-signal-25-active.png
new file mode 100644
index 0000000..5f62fff
Binary files /dev/null and b/icons/nm-signal-25-active.png differ
diff --git a/icons/nm-signal-25-normal.png b/icons/nm-signal-25-normal.png
new file mode 100644
index 0000000..4b54d31
Binary files /dev/null and b/icons/nm-signal-25-normal.png differ
diff --git a/icons/nm-signal-50-active.png b/icons/nm-signal-50-active.png
new file mode 100644
index 0000000..794d148
Binary files /dev/null and b/icons/nm-signal-50-active.png differ
diff --git a/icons/nm-signal-50-normal.png b/icons/nm-signal-50-normal.png
new file mode 100644
index 0000000..5c07daa
Binary files /dev/null and b/icons/nm-signal-50-normal.png differ
diff --git a/icons/nm-signal-75-active.png b/icons/nm-signal-75-active.png
new file mode 100644
index 0000000..0eb9a85
Binary files /dev/null and b/icons/nm-signal-75-active.png differ
diff --git a/icons/nm-signal-75-normal.png b/icons/nm-signal-75-normal.png
new file mode 100644
index 0000000..ddc237b
Binary files /dev/null and b/icons/nm-signal-75-normal.png differ
diff --git a/icons/toolbar-button-active.png b/icons/toolbar-button-active.png
new file mode 100644
index 0000000..be2db8c
Binary files /dev/null and b/icons/toolbar-button-active.png differ
diff --git a/icons/toolbar-button-hover.png b/icons/toolbar-button-hover.png
new file mode 100644
index 0000000..dfdf73b
Binary files /dev/null and b/icons/toolbar-button-hover.png differ
diff --git a/libnm-gtk/.gitignore b/libnm-gtk/.gitignore
new file mode 100644
index 0000000..9d0f16a
--- /dev/null
+++ b/libnm-gtk/.gitignore
@@ -0,0 +1 @@
+libnm-gtk-test
diff --git a/libnm-gtk/Makefile.am b/libnm-gtk/Makefile.am
new file mode 100644
index 0000000..873366d
--- /dev/null
+++ b/libnm-gtk/Makefile.am
@@ -0,0 +1,105 @@
+SUBDIRS = wireless-security
+
+NULL=
+
+noinst_LTLIBRARIES = libnm-gtk.la
+
+libnm_gtk_la_CPPFLAGS = \
+ -DUIDIR=\""$(uidir)"\" \
+ -DICONDIR=\""$(pkgdatadir)/icons"\" \
+ $(LIBNM_GTK_CFLAGS) \
+ -I${top_builddir}/marshallers \
+ -I${top_srcdir}/libnm-gtk/wireless-security \
+ $(NULL)
+
+libnm_gtk_la_LIBADD = \
+ $(LIBNM_GTK_LIBS) \
+ ${top_builddir}/marshallers/libmarshallers.la \
+ ${top_builddir}/libnm-gtk/wireless-security/libwireless-security.la \
+ $(NULL)
+
+# libnmincludedir = $(includedir)/libnm-gtk
+
+noinst_HEADERS = \
+ nm-bt-item.h \
+ nm-bt-provider.h \
+ nm-cdma-item.h \
+ nm-cdma-provider.h \
+ nm-connection-item.h \
+ nm-connection-list.h \
+ nm-connection-model.h \
+ nm-device-handler.h \
+ nm-device-item.h \
+ nm-device-model.h \
+ nm-device-provider.h \
+ nm-ethernet-item.h \
+ nm-ethernet-provider.h \
+ nm-gconf-connection.h \
+ nm-gconf-settings.h \
+ nm-gsm-item.h \
+ nm-gsm-pin-request-item.h \
+ nm-gsm-provider.h \
+ nm-item-provider.h \
+ nm-list-item.h \
+ nm-list-model.h \
+ nm-mobile-providers.h \
+ nm-status-icon.h \
+ nm-status-model.h \
+ nm-wifi-item.h \
+ nm-wifi-provider.h \
+ $(NULL)
+
+libnm_gtk_la_SOURCES = \
+ gconf-helpers.c \
+ gconf-helpers.h \
+ gconf-upgrade.c \
+ gconf-upgrade.h \
+ libnm-gtk-gsm-device.c \
+ libnm-gtk-gsm-device.h \
+ nm-bt-item.c \
+ nm-bt-provider.c \
+ nm-cdma-item.c \
+ nm-cdma-provider.c \
+ nm-connection-item.c \
+ nm-connection-list.c \
+ nm-connection-model.c \
+ nm-device-handler.c \
+ nm-device-item.c \
+ nm-device-model.c \
+ nm-device-provider.c \
+ nm-ethernet-item.c \
+ nm-ethernet-provider.c \
+ nm-gconf-connection.c \
+ nm-gconf-settings.c \
+ nm-gsm-item.c \
+ nm-gsm-pin-request-item.c \
+ nm-gsm-provider.c \
+ nm-icon-cache.c \
+ nm-icon-cache.h \
+ nm-item-provider.c \
+ nm-list-item.c \
+ nm-list-model.c \
+ nm-mobile-providers.c \
+ nm-status-icon.c \
+ nm-status-model.c \
+ nm-wifi-item.c \
+ nm-wifi-provider.c \
+ utils.c \
+ utils.h \
+ wireless-dialog.c \
+ wireless-dialog.h \
+ wireless-helper.h \
+ $(NULL)
+
+noinst_PROGRAMS = libnm-gtk-test
+
+libnm_gtk_test_SOURCES = test.c
+libnm_gtk_test_CFLAGS = $(LIBNM_GTK_CFLAGS)
+libnm_gtk_test_LDADD = libnm-gtk.la $(LIBNM_GTK_LIBS)
+
+uidir = $(datadir)/network-manager-netbook
+ui_DATA = wireless-security.ui
+
+EXTRA_DIST = \
+ $(ui_DATA) \
+ $(NULL)
diff --git a/libnm-gtk/gconf-helpers.c b/libnm-gtk/gconf-helpers.c
new file mode 100644
index 0000000..2d1d0b0
--- /dev/null
+++ b/libnm-gtk/gconf-helpers.c
@@ -0,0 +1,2592 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2005 - 2009 Red Hat, Inc.
+ */
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <net/ethernet.h>
+#include <netinet/ether.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include <gconf/gconf.h>
+#include <gconf/gconf-client.h>
+#include <glib.h>
+#include <gnome-keyring.h>
+#include <dbus/dbus-glib.h>
+
+#include <nm-setting-bluetooth.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-wired.h>
+#include <nm-setting-wireless.h>
+#include <nm-setting-wireless-security.h>
+#include <nm-setting-8021x.h>
+#include <nm-setting-vpn.h>
+#include <nm-setting-ip4-config.h>
+#include <nm-utils.h>
+#include <nm-settings-interface.h>
+
+#include "gconf-helpers.h"
+#include "gconf-upgrade.h"
+#include "utils.h"
+
+#define APPLET_PREFS_PATH "/apps/nm-applet"
+
+#define DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH))
+#define DBUS_TYPE_G_ARRAY_OF_STRING (dbus_g_type_get_collection ("GPtrArray", G_TYPE_STRING))
+#define DBUS_TYPE_G_ARRAY_OF_UINT (dbus_g_type_get_collection ("GArray", G_TYPE_UINT))
+#define DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_UCHAR_ARRAY))
+#define DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_ARRAY_OF_UINT))
+#define DBUS_TYPE_G_MAP_OF_VARIANT (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
+#define DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, DBUS_TYPE_G_MAP_OF_VARIANT))
+#define DBUS_TYPE_G_MAP_OF_STRING (dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_STRING))
+#define DBUS_TYPE_G_LIST_OF_STRING (dbus_g_type_get_collection ("GSList", G_TYPE_STRING))
+#define DBUS_TYPE_G_IP6_ADDRESS (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, G_TYPE_INVALID))
+#define DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_IP6_ADDRESS))
+#define DBUS_TYPE_G_IP6_ROUTE (dbus_g_type_get_struct ("GValueArray", DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, DBUS_TYPE_G_UCHAR_ARRAY, G_TYPE_UINT, G_TYPE_INVALID))
+#define DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE (dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_IP6_ROUTE))
+
+const char *applet_8021x_cert_keys[] = {
+ "ca-cert",
+ "client-cert",
+ "private-key",
+ "phase2-ca-cert",
+ "phase2-client-cert",
+ "phase2-private-key",
+ NULL
+};
+
+const char *vpn_ignore_keys[] = {
+ "user-name",
+ NULL
+};
+
+static PreKeyringCallback pre_keyring_cb = NULL;
+static gpointer pre_keyring_user_data = NULL;
+
+/* Sets a function to be called before each keyring access */
+void
+nm_gconf_set_pre_keyring_callback (PreKeyringCallback func, gpointer user_data)
+{
+ pre_keyring_cb = func;
+ pre_keyring_user_data = user_data;
+}
+
+void
+pre_keyring_callback (void)
+{
+ GnomeKeyringInfo *info = NULL;
+
+ if (!pre_keyring_cb)
+ return;
+
+ /* Call the pre keyring callback if the keyring is locked or if there
+ * was an error talking to the keyring.
+ */
+ if (gnome_keyring_get_info_sync (NULL, &info) == GNOME_KEYRING_RESULT_OK) {
+ if (gnome_keyring_info_get_is_locked (info))
+ (*pre_keyring_cb) (pre_keyring_user_data);
+ gnome_keyring_info_free (info);
+ } else
+ (*pre_keyring_cb) (pre_keyring_user_data);
+}
+
+
+gboolean
+nm_gconf_get_int_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ int *value)
+{
+ char * gc_key;
+ GConfValue * gc_value;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if ((gc_value = gconf_client_get (client, gc_key, NULL)))
+ {
+ if (gc_value->type == GCONF_VALUE_INT)
+ {
+ *value = gconf_value_get_int (gc_value);
+ success = TRUE;
+ }
+ gconf_value_free (gc_value);
+ }
+ g_free (gc_key);
+
+ return success;
+}
+
+
+gboolean
+nm_gconf_get_float_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ gfloat *value)
+{
+ char * gc_key;
+ GConfValue * gc_value;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if ((gc_value = gconf_client_get (client, gc_key, NULL)))
+ {
+ if (gc_value->type == GCONF_VALUE_FLOAT)
+ {
+ *value = gconf_value_get_float (gc_value);
+ success = TRUE;
+ }
+ gconf_value_free (gc_value);
+ }
+ g_free (gc_key);
+
+ return success;
+}
+
+
+gboolean
+nm_gconf_get_string_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ char **value)
+{
+ char * gc_key;
+ GConfValue * gc_value;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+ g_return_val_if_fail (*value == NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if ((gc_value = gconf_client_get (client, gc_key, NULL)))
+ {
+ if (gc_value->type == GCONF_VALUE_STRING)
+ {
+ *value = g_strdup (gconf_value_get_string (gc_value));
+ success = TRUE;
+ }
+ gconf_value_free (gc_value);
+ }
+ g_free (gc_key);
+
+ return success;
+}
+
+
+gboolean
+nm_gconf_get_bool_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ gboolean *value)
+{
+ char * gc_key;
+ GConfValue * gc_value;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if ((gc_value = gconf_client_get (client, gc_key, NULL)))
+ {
+ if (gc_value->type == GCONF_VALUE_BOOL)
+ {
+ *value = gconf_value_get_bool (gc_value);
+ success = TRUE;
+ }
+ else if (gc_value->type == GCONF_VALUE_STRING && !*gconf_value_get_string (gc_value))
+ {
+ /* This is a kludge to deal with VPN connections migrated from NM 0.6 */
+ *value = TRUE;
+ success = TRUE;
+ }
+
+ gconf_value_free (gc_value);
+ }
+ g_free (gc_key);
+
+ return success;
+}
+
+gboolean
+nm_gconf_get_stringlist_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GSList **value)
+{
+ char *gc_key;
+ GConfValue *gc_value;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!(gc_value = gconf_client_get (client, gc_key, NULL)))
+ goto out;
+
+ if (gc_value->type == GCONF_VALUE_LIST
+ && gconf_value_get_list_type (gc_value) == GCONF_VALUE_STRING)
+ {
+ GSList *elt;
+
+ for (elt = gconf_value_get_list (gc_value); elt != NULL; elt = g_slist_next (elt))
+ {
+ const char *string = gconf_value_get_string ((GConfValue *) elt->data);
+
+ *value = g_slist_append (*value, g_strdup (string));
+ }
+
+ success = TRUE;
+ }
+
+out:
+ if (gc_value)
+ gconf_value_free (gc_value);
+ g_free (gc_key);
+ return success;
+}
+
+typedef struct {
+ const char *setting_name;
+ const char *key_name;
+} MacAddressKey;
+
+static MacAddressKey mac_keys[] = {
+ { NM_SETTING_BLUETOOTH_SETTING_NAME, NM_SETTING_BLUETOOTH_BDADDR },
+ { NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_MAC_ADDRESS },
+ { NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_MAC_ADDRESS },
+ { NULL, NULL }
+};
+
+static gboolean
+nm_gconf_get_mac_address_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GByteArray **value)
+{
+ char *gc_key;
+ GConfValue *gc_value;
+ gboolean success = FALSE;
+ MacAddressKey *tmp = &mac_keys[0];
+ gboolean found = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ /* Match against know setting/key combos that can be MAC addresses */
+ while (tmp->setting_name) {
+ if (!strcmp (tmp->setting_name, setting) && !strcmp (tmp->key_name, key)) {
+ found = TRUE;
+ break;
+ }
+ tmp++;
+ }
+ if (!found)
+ return FALSE;
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!(gc_value = gconf_client_get (client, gc_key, NULL)))
+ goto out;
+
+ if (gc_value && (gc_value->type == GCONF_VALUE_STRING)) {
+ const char *str;
+ struct ether_addr *addr;
+
+ str = gconf_value_get_string (gc_value);
+ addr = ether_aton (str);
+ if (addr) {
+ *value = g_byte_array_sized_new (ETH_ALEN);
+ g_byte_array_append (*value, (const guint8 *) addr->ether_addr_octet, ETH_ALEN);
+ success = TRUE;
+ }
+ }
+
+out:
+ if (gc_value)
+ gconf_value_free (gc_value);
+ g_free (gc_key);
+ return success;
+}
+
+gboolean
+nm_gconf_get_bytearray_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GByteArray **value)
+{
+ char *gc_key;
+ GConfValue *gc_value;
+ GByteArray *array;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!(gc_value = gconf_client_get (client, gc_key, NULL)))
+ goto out;
+
+ if (gc_value->type == GCONF_VALUE_LIST
+ && gconf_value_get_list_type (gc_value) == GCONF_VALUE_INT)
+ {
+ GSList *elt;
+
+ array = g_byte_array_new ();
+ for (elt = gconf_value_get_list (gc_value); elt != NULL; elt = g_slist_next (elt))
+ {
+ int i = gconf_value_get_int ((GConfValue *) elt->data);
+ unsigned char val = (unsigned char) (i & 0xFF);
+
+ if (i < 0 || i > 255) {
+ g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
+ "value %d out-of-range for a byte value", i);
+ g_byte_array_free (array, TRUE);
+ goto out;
+ }
+
+ g_byte_array_append (array, (const unsigned char *) &val, sizeof (val));
+ }
+
+ *value = array;
+ success = TRUE;
+ }
+
+out:
+ if (gc_value)
+ gconf_value_free (gc_value);
+ g_free (gc_key);
+ return success;
+}
+
+gboolean
+nm_gconf_get_uint_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GArray **value)
+{
+ char *gc_key;
+ GConfValue *gc_value;
+ GArray *array;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!(gc_value = gconf_client_get (client, gc_key, NULL)))
+ goto out;
+
+ if (gc_value->type == GCONF_VALUE_LIST
+ && gconf_value_get_list_type (gc_value) == GCONF_VALUE_INT)
+ {
+ GSList *elt;
+
+ array = g_array_new (FALSE, FALSE, sizeof (gint));
+ for (elt = gconf_value_get_list (gc_value); elt != NULL; elt = g_slist_next (elt))
+ {
+ int i = gconf_value_get_int ((GConfValue *) elt->data);
+ g_array_append_val (array, i);
+ }
+
+ *value = array;
+ success = TRUE;
+ }
+
+out:
+ if (gc_value)
+ gconf_value_free (gc_value);
+ g_free (gc_key);
+ return success;
+}
+
+#if UNUSED
+static void
+property_value_destroy (gpointer data)
+{
+ GValue *value = (GValue *) data;
+
+ g_value_unset (value);
+ g_slice_free (GValue, data);
+}
+
+
+static void
+add_property (GHashTable *properties, const char *key, GConfValue *gconf_value)
+{
+ GValue *value = NULL;
+
+ if (!gconf_value)
+ return;
+
+ switch (gconf_value->type) {
+ case GCONF_VALUE_STRING:
+ value = g_slice_new0 (GValue);
+ g_value_init (value, G_TYPE_STRING);
+ g_value_set_string (value, gconf_value_get_string (gconf_value));
+ break;
+ case GCONF_VALUE_INT:
+ value = g_slice_new0 (GValue);
+ g_value_init (value, G_TYPE_INT);
+ g_value_set_int (value, gconf_value_get_int (gconf_value));
+ break;
+ case GCONF_VALUE_BOOL:
+ value = g_slice_new0 (GValue);
+ g_value_init (value, G_TYPE_BOOLEAN);
+ g_value_set_boolean (value, gconf_value_get_bool (gconf_value));
+ break;
+ default:
+ break;
+ }
+
+ if (value)
+ g_hash_table_insert (properties, gconf_unescape_key (key, -1), value);
+}
+
+gboolean
+nm_gconf_get_valuehash_helper (GConfClient *client,
+ const char *path,
+ const char *setting,
+ GHashTable **value)
+{
+ char *gc_key;
+ GSList *gconf_entries;
+ GSList *iter;
+ int prefix_len;
+
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s", path, setting);
+ prefix_len = strlen (gc_key);
+ gconf_entries = gconf_client_all_entries (client, gc_key, NULL);
+ g_free (gc_key);
+
+ if (!gconf_entries)
+ return FALSE;
+
+ *value = g_hash_table_new_full (g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ property_value_destroy);
+
+ for (iter = gconf_entries; iter; iter = iter->next) {
+ GConfEntry *entry = (GConfEntry *) iter->data;
+
+ gc_key = (char *) gconf_entry_get_key (entry);
+ gc_key += prefix_len + 1; /* get rid of the full path */
+
+ add_property (*value, gc_key, gconf_entry_get_value (entry));
+ gconf_entry_unref (entry);
+ }
+
+ g_slist_free (gconf_entries);
+ return TRUE;
+}
+#endif
+
+gboolean
+nm_gconf_get_stringhash_helper (GConfClient *client,
+ const char *path,
+ const char *setting,
+ GHashTable **value)
+{
+ char *gc_key;
+ GSList *gconf_entries;
+ GSList *iter;
+ int prefix_len;
+
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s", path, setting);
+ prefix_len = strlen (gc_key);
+ gconf_entries = gconf_client_all_entries (client, gc_key, NULL);
+ g_free (gc_key);
+
+ if (!gconf_entries)
+ return FALSE;
+
+ *value = g_hash_table_new_full (g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) g_free);
+
+ for (iter = gconf_entries; iter; iter = iter->next) {
+ GConfEntry *entry = (GConfEntry *) iter->data;
+
+ gc_key = (char *) gconf_entry_get_key (entry);
+ gc_key += prefix_len + 1; /* get rid of the full path */
+
+ if ( !strcmp (setting, NM_SETTING_VPN_SETTING_NAME)
+ && (!strcmp (gc_key, NM_SETTING_VPN_SERVICE_TYPE) || !strcmp (gc_key, NM_SETTING_NAME))) {
+ /* Ignore; these handled elsewhere since they are not part of the
+ * vpn service specific data
+ */
+ } else {
+ GConfValue *gc_val = gconf_entry_get_value (entry);
+
+ if (gc_val) {
+ const char *gc_str = gconf_value_get_string (gc_val);
+
+ if (gc_str && strlen (gc_str))
+ g_hash_table_insert (*value, gconf_unescape_key (gc_key, -1), g_strdup (gc_str));
+ }
+ }
+ gconf_entry_unref (entry);
+ }
+
+ g_slist_free (gconf_entries);
+ return TRUE;
+}
+
+gboolean
+nm_gconf_get_ip4_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ guint32 tuple_len,
+ GPtrArray **value)
+{
+ char *gc_key;
+ GConfValue *gc_value = NULL;
+ GPtrArray *array;
+ gboolean success = FALSE;
+ GSList *values, *iter;
+ GArray *tuple = NULL;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+ g_return_val_if_fail (tuple_len > 0, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!(gc_value = gconf_client_get (client, gc_key, NULL)))
+ goto out;
+
+ if ( (gc_value->type != GCONF_VALUE_LIST)
+ || (gconf_value_get_list_type (gc_value) != GCONF_VALUE_INT))
+ goto out;
+
+ values = gconf_value_get_list (gc_value);
+ if (g_slist_length (values) % tuple_len != 0) {
+ g_warning ("%s: %s format invalid; # elements not divisible by %d",
+ __func__, gc_key, tuple_len);
+ goto out;
+ }
+
+ array = g_ptr_array_sized_new (1);
+ for (iter = values; iter; iter = g_slist_next (iter)) {
+ int i = gconf_value_get_int ((GConfValue *) iter->data);
+
+ if (tuple == NULL)
+ tuple = g_array_sized_new (FALSE, TRUE, sizeof (guint32), tuple_len);
+
+ g_array_append_val (tuple, i);
+
+ /* Got all members; add to the array */
+ if (tuple->len == tuple_len) {
+ g_ptr_array_add (array, tuple);
+ tuple = NULL;
+ }
+ }
+
+ *value = array;
+ success = TRUE;
+
+out:
+ if (gc_value)
+ gconf_value_free (gc_value);
+ g_free (gc_key);
+ return success;
+}
+
+gboolean
+nm_gconf_get_ip6dns_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray **value)
+{
+ char *gc_key;
+ GConfValue *gc_value = NULL;
+ GPtrArray *array;
+ gboolean success = FALSE;
+ GSList *values, *iter;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!(gc_value = gconf_client_get (client, gc_key, NULL)))
+ goto out;
+
+ if ( (gc_value->type != GCONF_VALUE_LIST)
+ || (gconf_value_get_list_type (gc_value) != GCONF_VALUE_STRING))
+ goto out;
+
+ values = gconf_value_get_list (gc_value);
+ array = g_ptr_array_sized_new (1);
+ for (iter = values; iter; iter = g_slist_next (iter)) {
+ const char *straddr = gconf_value_get_string ((GConfValue *) iter->data);
+ struct in6_addr rawaddr;
+ GByteArray *ba;
+
+ if (inet_pton (AF_INET6, straddr, &rawaddr) <= 0) {
+ g_warning ("%s: %s contained bad address: %s",
+ __func__, gc_key, straddr);
+ continue;
+ }
+
+ ba = g_byte_array_new ();
+ g_byte_array_append (ba, (guchar *)&rawaddr, sizeof (rawaddr));
+
+ g_ptr_array_add (array, ba);
+ }
+
+ *value = array;
+ success = TRUE;
+
+out:
+ if (gc_value)
+ gconf_value_free (gc_value);
+ g_free (gc_key);
+ return success;
+}
+
+gboolean
+nm_gconf_get_ip6addr_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray **value)
+{
+ char *gc_key;
+ GConfValue *gc_value = NULL;
+ GPtrArray *array;
+ gboolean success = FALSE;
+ GSList *values, *iter;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!(gc_value = gconf_client_get (client, gc_key, NULL)))
+ goto out;
+
+ if ( (gc_value->type != GCONF_VALUE_LIST)
+ || (gconf_value_get_list_type (gc_value) != GCONF_VALUE_STRING))
+ goto out;
+
+ values = gconf_value_get_list (gc_value);
+ array = g_ptr_array_sized_new (1);
+ for (iter = values; iter; iter = g_slist_next (iter)) {
+ const char *addr_prefix = gconf_value_get_string ((GConfValue *) iter->data);
+ char *addr, *p;
+ guint prefix;
+ struct in6_addr rawaddr;
+ GValueArray *valarr;
+ GValue element = {0, };
+ GByteArray *ba;
+
+ addr = g_strdup (addr_prefix);
+ p = strchr (addr, '/');
+ if (!p) {
+ g_warning ("%s: %s contained bad address/prefix: %s",
+ __func__, gc_key, addr_prefix);
+ g_free (addr);
+ continue;
+ }
+ *p++ = '\0';
+ prefix = strtoul (p, NULL, 10);
+
+ if (inet_pton (AF_INET6, addr, &rawaddr) <= 0 && prefix > 128) {
+ g_warning ("%s: %s contained bad address: %s",
+ __func__, gc_key, addr_prefix);
+ g_free (addr);
+ continue;
+ }
+ g_free (addr);
+
+ valarr = g_value_array_new (2);
+
+ g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY);
+ ba = g_byte_array_new ();
+ g_byte_array_append (ba, (guint8 *) &rawaddr, 16);
+ g_value_take_boxed (&element, ba);
+ g_value_array_append (valarr, &element);
+ g_value_unset (&element);
+
+ g_value_init (&element, G_TYPE_UINT);
+ g_value_set_uint (&element, prefix);
+ g_value_array_append (valarr, &element);
+ g_value_unset (&element);
+
+ g_ptr_array_add (array, valarr);
+ }
+
+ *value = array;
+ success = TRUE;
+
+out:
+ if (gc_value)
+ gconf_value_free (gc_value);
+ g_free (gc_key);
+ return success;
+}
+
+gboolean
+nm_gconf_get_ip6route_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray **value)
+{
+ char *gc_key;
+ GConfValue *gc_value = NULL;
+ GPtrArray *array;
+ gboolean success = FALSE;
+ GSList *values, *iter;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!(gc_value = gconf_client_get (client, gc_key, NULL)))
+ goto out;
+
+ if ( (gc_value->type != GCONF_VALUE_LIST)
+ || (gconf_value_get_list_type (gc_value) != GCONF_VALUE_STRING))
+ goto out;
+
+ values = gconf_value_get_list (gc_value);
+ array = g_ptr_array_sized_new (1);
+ for (iter = values; iter; iter = g_slist_next (iter)) {
+ const char *route_str = gconf_value_get_string ((GConfValue *) iter->data);
+ char **parts, *addr, *p;
+ guint prefix, metric;
+ struct in6_addr rawaddr;
+ GValueArray *valarr;
+ GValue element = {0, };
+ GByteArray *dest, *next_hop;
+
+ parts = g_strsplit (route_str, ",", -1);
+ if (g_strv_length (parts) != 3) {
+ g_warning ("%s: %s contained bad route: %s",
+ __func__, gc_key, route_str);
+ g_strfreev (parts);
+ continue;
+ }
+
+ addr = parts[0];
+ p = strchr (addr, '/');
+ if (!p) {
+ g_warning ("%s: %s contained bad address/prefix: %s",
+ __func__, gc_key, addr);
+ g_strfreev (parts);
+ continue;
+ }
+ *p++ = '\0';
+ prefix = strtoul (p, NULL, 10);
+
+ if (inet_pton (AF_INET6, addr, &rawaddr) <= 0 && prefix > 128) {
+ g_warning ("%s: %s contained bad address: %s",
+ __func__, gc_key, addr);
+ g_strfreev (parts);
+ continue;
+ }
+ dest = g_byte_array_new ();
+ g_byte_array_append (dest, (guint8 *) &rawaddr, 16);
+
+ if (inet_pton (AF_INET6, parts[1], &rawaddr) <= 0 && prefix > 128) {
+ g_warning ("%s: %s contained bad address: %s",
+ __func__, gc_key, addr);
+ g_byte_array_free (dest, TRUE);
+ g_strfreev (parts);
+ continue;
+ }
+ next_hop = g_byte_array_new ();
+ g_byte_array_append (next_hop, (guint8 *) &rawaddr, 16);
+
+ metric = strtoul (parts[2], NULL, 10);
+
+ valarr = g_value_array_new (4);
+
+ g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY);
+ g_value_take_boxed (&element, dest);
+ g_value_array_append (valarr, &element);
+ g_value_unset (&element);
+
+ g_value_init (&element, G_TYPE_UINT);
+ g_value_set_uint (&element, prefix);
+ g_value_array_append (valarr, &element);
+ g_value_unset (&element);
+
+ g_value_init (&element, DBUS_TYPE_G_UCHAR_ARRAY);
+ g_value_take_boxed (&element, next_hop);
+ g_value_array_append (valarr, &element);
+ g_value_unset (&element);
+
+ g_value_init (&element, G_TYPE_UINT);
+ g_value_set_uint (&element, metric);
+ g_value_array_append (valarr, &element);
+ g_value_unset (&element);
+
+ g_ptr_array_add (array, valarr);
+ g_strfreev (parts);
+ }
+
+ *value = array;
+ success = TRUE;
+
+out:
+ if (gc_value)
+ gconf_value_free (gc_value);
+ g_free (gc_key);
+ return success;
+}
+
+gboolean
+nm_gconf_set_int_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ int value)
+{
+ char * gc_key;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+ gconf_client_set_int (client, gc_key, value, NULL);
+ g_free (gc_key);
+ return TRUE;
+}
+
+gboolean
+nm_gconf_set_float_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ gfloat value)
+{
+ char * gc_key;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+ gconf_client_set_float (client, gc_key, value, NULL);
+ g_free (gc_key);
+ return TRUE;
+}
+
+gboolean
+nm_gconf_set_string_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ const char *value)
+{
+ char * gc_key;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ if (value)
+ gconf_client_set_string (client, gc_key, value, NULL);
+ else
+ gconf_client_unset (client, gc_key, NULL);
+
+ g_free (gc_key);
+ return TRUE;
+}
+
+gboolean
+nm_gconf_set_bool_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ gboolean value)
+{
+ char * gc_key;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+ gconf_client_set_bool (client, gc_key, value, NULL);
+ g_free (gc_key);
+ return TRUE;
+}
+
+gboolean
+nm_gconf_set_stringlist_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GSList *value)
+{
+ char *gc_key;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ gconf_client_set_list (client, gc_key, GCONF_VALUE_STRING, value, NULL);
+ g_free (gc_key);
+ return TRUE;
+}
+
+static gboolean
+nm_gconf_set_mac_address_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GByteArray *value)
+{
+ char *gc_key;
+ MacAddressKey *tmp = &mac_keys[0];
+ gboolean found = FALSE;
+ char *str;
+
+ g_return_val_if_fail (path != NULL, FALSE);
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ /* Match against know setting/key combos that can be MAC addresses */
+ while (tmp->setting_name) {
+ if (!strcmp (tmp->setting_name, setting) && !strcmp (tmp->key_name, key)) {
+ found = TRUE;
+ break;
+ }
+ tmp++;
+ }
+ if (!found || !value)
+ return FALSE;
+
+ g_return_val_if_fail (value->len == ETH_ALEN, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X",
+ value->data[0], value->data[1], value->data[2],
+ value->data[3], value->data[4], value->data[5]);
+ gconf_client_set_string (client, gc_key, str, NULL);
+ g_free (str);
+
+ g_free (gc_key);
+ return TRUE;
+}
+
+gboolean
+nm_gconf_set_bytearray_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GByteArray *value)
+{
+ char *gc_key;
+ int i;
+ GSList *list = NULL;
+
+ g_return_val_if_fail (path != NULL, FALSE);
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ if (!value)
+ return TRUE;
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ for (i = 0; i < value->len; i++)
+ list = g_slist_append(list, GINT_TO_POINTER ((int) value->data[i]));
+
+ gconf_client_set_list (client, gc_key, GCONF_VALUE_INT, list, NULL);
+
+ g_slist_free (list);
+ g_free (gc_key);
+ return TRUE;
+}
+
+gboolean
+nm_gconf_set_uint_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GArray *value)
+{
+ char *gc_key;
+ int i;
+ GSList *list = NULL;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ if (!value)
+ return TRUE;
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ for (i = 0; i < value->len; i++)
+ list = g_slist_append (list, GUINT_TO_POINTER (g_array_index (value, guint, i)));
+
+ gconf_client_set_list (client, gc_key, GCONF_VALUE_INT, list, NULL);
+
+ g_slist_free (list);
+ g_free (gc_key);
+ return TRUE;
+}
+
+typedef struct {
+ GConfClient *client;
+ char *path;
+} WritePropertiesInfo;
+
+#if UNUSED
+static void
+write_properties_valuehash (gpointer key, gpointer val, gpointer user_data)
+{
+ GValue *value = (GValue *) val;
+ WritePropertiesInfo *info = (WritePropertiesInfo *) user_data;
+ char *esc_key;
+ char *full_key;
+
+ esc_key = gconf_escape_key ((char *) key, -1);
+ full_key = g_strconcat (info->path, "/", esc_key, NULL);
+ g_free (esc_key);
+
+ if (G_VALUE_HOLDS_STRING (value))
+ gconf_client_set_string (info->client, full_key, g_value_get_string (value), NULL);
+ else if (G_VALUE_HOLDS_INT (value))
+ gconf_client_set_int (info->client, full_key, g_value_get_int (value), NULL);
+ else if (G_VALUE_HOLDS_BOOLEAN (value))
+ gconf_client_set_bool (info->client, full_key, g_value_get_boolean (value), NULL);
+ else
+ g_warning ("Don't know how to write '%s' to gconf", G_VALUE_TYPE_NAME (value));
+
+ g_free (full_key);
+}
+
+gboolean
+nm_gconf_set_valuehash_helper (GConfClient *client,
+ const char *path,
+ const char *setting,
+ GHashTable *value)
+{
+ char *gc_key;
+ WritePropertiesInfo info;
+
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s", path, setting);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ info.client = client;
+ info.path = gc_key;
+
+ g_hash_table_foreach (value, write_properties_valuehash, &info);
+
+ g_free (gc_key);
+ return TRUE;
+}
+#endif
+
+static void
+write_properties_stringhash (gpointer key, gpointer value, gpointer user_data)
+{
+ WritePropertiesInfo *info = (WritePropertiesInfo *) user_data;
+ char *esc_key;
+ char *full_key;
+ const char *str_value = (const char *) value;
+
+ if (!str_value || !strlen (str_value))
+ return;
+
+ esc_key = gconf_escape_key ((char *) key, -1);
+ full_key = g_strconcat (info->path, "/", esc_key, NULL);
+ gconf_client_set_string (info->client, full_key, (char *) str_value, NULL);
+ g_free (esc_key);
+ g_free (full_key);
+}
+
+typedef struct {
+ const char *key;
+ gboolean found;
+} FindKeyInfo;
+
+static void
+find_gconf_key (gpointer key, gpointer value, gpointer user_data)
+{
+ FindKeyInfo *info = (FindKeyInfo *) user_data;
+
+ if (!info->found && !strcmp ((char *) key, info->key))
+ info->found = TRUE;
+}
+
+gboolean
+nm_gconf_set_stringhash_helper (GConfClient *client,
+ const char *path,
+ const char *setting,
+ GHashTable *value)
+{
+ char *gc_key;
+ GSList *existing, *iter;
+ WritePropertiesInfo info;
+
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (value != NULL, FALSE);
+
+ gc_key = g_strdup_printf ("%s/%s", path, setting);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ /* Delete GConf entries that are not in the hash table to be written */
+ existing = gconf_client_all_entries (client, gc_key, NULL);
+ for (iter = existing; iter; iter = g_slist_next (iter)) {
+ GConfEntry *entry = (GConfEntry *) iter->data;
+ char *basename = g_path_get_basename (entry->key);
+ FindKeyInfo fk_info = { basename, FALSE };
+
+ g_hash_table_foreach (value, find_gconf_key, &fk_info);
+ /* Be sure to never delete "special" VPN keys */
+ if ( (fk_info.found == FALSE)
+ && strcmp ((char *) basename, NM_SETTING_VPN_SERVICE_TYPE)
+ && strcmp ((char *) basename, NM_SETTING_VPN_USER_NAME))
+ gconf_client_unset (client, entry->key, NULL);
+ gconf_entry_unref (entry);
+ g_free (basename);
+ }
+ g_slist_free (existing);
+
+ /* Now update entries and write new ones */
+ info.client = client;
+ info.path = gc_key;
+ g_hash_table_foreach (value, write_properties_stringhash, &info);
+
+ g_free (gc_key);
+ return TRUE;
+}
+
+gboolean
+nm_gconf_set_ip4_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ guint32 tuple_len,
+ GPtrArray *value)
+{
+ char *gc_key;
+ int i;
+ GSList *list = NULL;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+ g_return_val_if_fail (tuple_len > 0, FALSE);
+
+ if (!value)
+ return TRUE;
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ for (i = 0; i < value->len; i++) {
+ GArray *tuple = g_ptr_array_index (value, i);
+ int j;
+
+ if (tuple->len != tuple_len) {
+ g_warning ("%s: invalid IPv4 address/route structure!", __func__);
+ goto out;
+ }
+
+ for (j = 0; j < tuple_len; j++)
+ list = g_slist_append (list, GUINT_TO_POINTER (g_array_index (tuple, guint32, j)));
+ }
+
+ gconf_client_set_list (client, gc_key, GCONF_VALUE_INT, list, NULL);
+ success = TRUE;
+
+out:
+ g_slist_free (list);
+ g_free (gc_key);
+ return success;
+}
+
+gboolean
+nm_gconf_set_ip6dns_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray *value)
+{
+ char *gc_key;
+ int i;
+ GSList *list = NULL, *l;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ if (!value)
+ return TRUE;
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ for (i = 0; i < value->len; i++) {
+ GByteArray *ba = g_ptr_array_index (value, i);
+ char addr[INET6_ADDRSTRLEN];
+
+ if (!inet_ntop (AF_INET6, ba->data, addr, sizeof (addr))) {
+ g_warning ("%s: invalid IPv6 DNS server address!", __func__);
+ goto out;
+ }
+
+ list = g_slist_append (list, g_strdup (addr));
+ }
+
+ gconf_client_set_list (client, gc_key, GCONF_VALUE_STRING, list, NULL);
+ success = TRUE;
+
+out:
+ for (l = list; l; l = l->next)
+ g_free (l->data);
+ g_slist_free (list);
+ g_free (gc_key);
+ return success;
+}
+
+gboolean
+nm_gconf_set_ip6addr_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray *value)
+{
+ char *gc_key;
+ int i;
+ GSList *list = NULL, *l;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ if (!value)
+ return TRUE;
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ for (i = 0; i < value->len; i++) {
+ GValueArray *elements = (GValueArray *) g_ptr_array_index (value, i);
+ GValue *tmp;
+ GByteArray *ba;
+ guint prefix;
+ char addr[INET6_ADDRSTRLEN];
+
+ if ( (elements->n_values != 2)
+ || (G_VALUE_TYPE (g_value_array_get_nth (elements, 0)) != DBUS_TYPE_G_UCHAR_ARRAY)
+ || (G_VALUE_TYPE (g_value_array_get_nth (elements, 1)) != G_TYPE_UINT)) {
+ g_warning ("%s: invalid IPv6 address!", __func__);
+ goto out;
+ }
+
+ tmp = g_value_array_get_nth (elements, 0);
+ ba = g_value_get_boxed (tmp);
+ tmp = g_value_array_get_nth (elements, 1);
+ prefix = g_value_get_uint (tmp);
+ if (prefix > 128) {
+ g_warning ("%s: invalid IPv6 address prefix %u", __func__, prefix);
+ goto out;
+ }
+
+ if (!inet_ntop (AF_INET6, ba->data, addr, sizeof (addr))) {
+ g_warning ("%s: invalid IPv6 address!", __func__);
+ goto out;
+ }
+
+ list = g_slist_append (list, g_strdup_printf ("%s/%u", addr, prefix));
+ }
+
+ gconf_client_set_list (client, gc_key, GCONF_VALUE_STRING, list, NULL);
+ success = TRUE;
+
+out:
+ for (l = list; l; l = l->next)
+ g_free (l->data);
+ g_slist_free (list);
+ g_free (gc_key);
+ return success;
+}
+
+gboolean
+nm_gconf_set_ip6route_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray *value)
+{
+ char *gc_key;
+ int i;
+ GSList *list = NULL, *l;
+ gboolean success = FALSE;
+
+ g_return_val_if_fail (key != NULL, FALSE);
+ g_return_val_if_fail (setting != NULL, FALSE);
+
+ if (!value)
+ return TRUE;
+
+ gc_key = g_strdup_printf ("%s/%s/%s", path, setting, key);
+ if (!gc_key) {
+ g_warning ("Not enough memory to create gconf path");
+ return FALSE;
+ }
+
+ for (i = 0; i < value->len; i++) {
+ GValueArray *elements = (GValueArray *) g_ptr_array_index (value, i);
+ GValue *tmp;
+ GByteArray *ba;
+ guint prefix, metric;
+ char dest[INET6_ADDRSTRLEN], next_hop[INET6_ADDRSTRLEN];
+
+ if ( (elements->n_values != 4)
+ || (G_VALUE_TYPE (g_value_array_get_nth (elements, 0)) != DBUS_TYPE_G_UCHAR_ARRAY)
+ || (G_VALUE_TYPE (g_value_array_get_nth (elements, 1)) != G_TYPE_UINT)
+ || (G_VALUE_TYPE (g_value_array_get_nth (elements, 2)) != DBUS_TYPE_G_UCHAR_ARRAY)
+ || (G_VALUE_TYPE (g_value_array_get_nth (elements, 3)) != G_TYPE_UINT))
+ {
+ g_warning ("%s: invalid IPv6 route!", __func__);
+ goto out;
+ }
+
+ tmp = g_value_array_get_nth (elements, 0);
+ ba = g_value_get_boxed (tmp);
+ if (!inet_ntop (AF_INET6, ba->data, dest, sizeof (dest))) {
+ g_warning ("%s: invalid IPv6 dest address!", __func__);
+ goto out;
+ }
+ tmp = g_value_array_get_nth (elements, 1);
+ prefix = g_value_get_uint (tmp);
+ if (prefix > 128) {
+ g_warning ("%s: invalid IPv6 dest prefix %u", __func__, prefix);
+ goto out;
+ }
+ tmp = g_value_array_get_nth (elements, 2);
+ ba = g_value_get_boxed (tmp);
+ if (!inet_ntop (AF_INET6, ba->data, next_hop, sizeof (next_hop))) {
+ g_warning ("%s: invalid IPv6 next_hop address!", __func__);
+ goto out;
+ }
+ tmp = g_value_array_get_nth (elements, 3);
+ metric = g_value_get_uint (tmp);
+
+ list = g_slist_append (list,
+ g_strdup_printf ("%s/%u,%s,%u", dest, prefix,
+ next_hop, metric));
+ }
+
+ gconf_client_set_list (client, gc_key, GCONF_VALUE_STRING, list, NULL);
+ success = TRUE;
+
+out:
+ for (l = list; l; l = l->next)
+ g_free (l->data);
+ g_slist_free (list);
+ g_free (gc_key);
+ return success;
+}
+
+GSList *
+nm_gconf_get_all_connections (GConfClient *client)
+{
+ GSList *connections;
+ guint32 stamp = 0;
+ GError *error = NULL;
+
+ stamp = (guint32) gconf_client_get_int (client, APPLET_PREFS_STAMP, &error);
+ if (error) {
+ g_error_free (error);
+ stamp = 0;
+ }
+
+ nm_gconf_migrate_0_7_connection_uuid (client);
+ nm_gconf_migrate_0_7_keyring_items (client);
+ nm_gconf_migrate_0_7_wireless_security (client);
+ nm_gconf_migrate_0_7_netmask_to_prefix (client);
+ nm_gconf_migrate_0_7_ip4_method (client);
+ nm_gconf_migrate_0_7_ignore_dhcp_dns (client);
+ nm_gconf_migrate_0_7_vpn_routes (client);
+ nm_gconf_migrate_0_7_vpn_properties (client);
+ nm_gconf_migrate_0_7_openvpn_properties (client);
+
+ if (stamp < 1) {
+ nm_gconf_migrate_0_7_vpn_never_default (client);
+ nm_gconf_migrate_0_7_autoconnect_default (client);
+ }
+
+ nm_gconf_migrate_0_7_ca_cert_ignore (client);
+ nm_gconf_migrate_0_7_certs (client);
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ if (!connections) {
+ nm_gconf_migrate_0_6_connections (client);
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ }
+
+ /* Update the applet GConf stamp */
+ if (stamp != APPLET_CURRENT_STAMP)
+ gconf_client_set_int (client, APPLET_PREFS_STAMP, APPLET_CURRENT_STAMP, NULL);
+
+ return connections;
+}
+
+static gboolean
+string_in_list (const char *str, const char **valid_strings)
+{
+ int i;
+
+ for (i = 0; valid_strings[i]; i++)
+ if (strcmp (str, valid_strings[i]) == 0)
+ break;
+
+ return valid_strings[i] != NULL;
+}
+
+static void
+free_one_addr (gpointer data)
+{
+ g_array_free ((GArray *) data, TRUE);
+}
+
+static void
+free_one_bytearray (gpointer data)
+{
+ g_byte_array_free (data, TRUE);
+}
+
+static void
+free_one_struct (gpointer data)
+{
+ g_value_array_free (data);
+}
+
+typedef struct ReadFromGConfInfo {
+ NMConnection *connection;
+ GConfClient *client;
+ const char *dir;
+ guint32 dir_len;
+} ReadFromGConfInfo;
+
+#define FILE_TAG "file://"
+
+static void
+read_one_setting_value_from_gconf (NMSetting *setting,
+ const char *key,
+ const GValue *value,
+ GParamFlags flags,
+ gpointer user_data)
+{
+ ReadFromGConfInfo *info = (ReadFromGConfInfo *) user_data;
+ const char *setting_name;
+ GType type = G_VALUE_TYPE (value);
+
+ /* The 'name' key is ignored when reading, because it's pulled from the
+ * gconf directory name instead.
+ */
+ if (!strcmp (key, NM_SETTING_NAME))
+ return;
+
+ /* Secrets don't get stored in GConf */
+ if ( (flags & NM_SETTING_PARAM_SECRET)
+ && !(NM_IS_SETTING_802_1X (setting) && string_in_list (key, applet_8021x_cert_keys)))
+ return;
+
+ /* Don't read the NMSettingConnection object's 'read-only' property */
+ if ( NM_IS_SETTING_CONNECTION (setting)
+ && !strcmp (key, NM_SETTING_CONNECTION_READ_ONLY))
+ return;
+
+ setting_name = nm_setting_get_name (setting);
+
+ /* Some keys (like certs) aren't read directly from GConf but are handled
+ * separately.
+ */
+ /* Some VPN keys are ignored */
+ if (NM_IS_SETTING_VPN (setting)) {
+ if (string_in_list (key, vpn_ignore_keys))
+ return;
+ }
+
+ if ( NM_IS_SETTING_802_1X (setting)
+ && string_in_list (key, applet_8021x_cert_keys)
+ && (type == DBUS_TYPE_G_UCHAR_ARRAY)) {
+ char *str_val = NULL;
+
+ /* Certificate/key paths are stored as paths in GConf, but we need to
+ * take that path and use the special functions to set them on the
+ * setting.
+ */
+ if (nm_gconf_get_string_helper (info->client, info->dir, key, setting_name, &str_val)) {
+ GByteArray *ba_val;
+
+ ba_val = g_byte_array_sized_new (strlen (FILE_TAG) + strlen (str_val) + 1);
+ g_byte_array_append (ba_val, (const guint8 *) FILE_TAG, strlen (FILE_TAG));
+ g_byte_array_append (ba_val, (const guint8 *) str_val, strlen (str_val) + 1); /* +1 for the trailing NULL */
+ g_object_set (setting, key, ba_val, NULL);
+ g_byte_array_free (ba_val, TRUE);
+ g_free (str_val);
+ }
+ } else if (type == G_TYPE_STRING) {
+ char *str_val = NULL;
+
+ if (nm_gconf_get_string_helper (info->client, info->dir, key, setting_name, &str_val)) {
+ g_object_set (setting, key, str_val, NULL);
+ g_free (str_val);
+ }
+ } else if (type == G_TYPE_UINT) {
+ int int_val = 0;
+
+ if (nm_gconf_get_int_helper (info->client, info->dir, key, setting_name, &int_val)) {
+ if (int_val < 0)
+ g_warning ("Casting negative value (%i) to uint", int_val);
+
+ g_object_set (setting, key, int_val, NULL);
+ }
+ } else if (type == G_TYPE_INT) {
+ int int_val;
+
+ if (nm_gconf_get_int_helper (info->client, info->dir, key, setting_name, &int_val))
+ g_object_set (setting, key, int_val, NULL);
+ } else if (type == G_TYPE_UINT64) {
+ char *tmp_str = NULL;
+
+ /* GConf doesn't do 64-bit values, so use strings instead */
+ if (nm_gconf_get_string_helper (info->client, info->dir, key, setting_name, &tmp_str) && tmp_str) {
+ guint64 uint_val = g_ascii_strtoull (tmp_str, NULL, 10);
+
+ if (!(uint_val == G_MAXUINT64 && errno == ERANGE))
+ g_object_set (setting, key, uint_val, NULL);
+ g_free (tmp_str);
+ }
+ } else if (type == G_TYPE_BOOLEAN) {
+ gboolean bool_val;
+
+ if (nm_gconf_get_bool_helper (info->client, info->dir, key, setting_name, &bool_val))
+ g_object_set (setting, key, bool_val, NULL);
+ } else if (type == G_TYPE_CHAR) {
+ int int_val = 0;
+
+ if (nm_gconf_get_int_helper (info->client, info->dir, key, setting_name, &int_val)) {
+ if (int_val < G_MININT8 || int_val > G_MAXINT8)
+ g_warning ("Casting value (%i) to char", int_val);
+
+ g_object_set (setting, key, int_val, NULL);
+ }
+ } else if (type == DBUS_TYPE_G_UCHAR_ARRAY) {
+ GByteArray *ba_val = NULL;
+ gboolean success = FALSE;
+
+ success = nm_gconf_get_mac_address_helper (info->client, info->dir, key, setting_name, &ba_val);
+ if (!success)
+ success = nm_gconf_get_bytearray_helper (info->client, info->dir, key, setting_name, &ba_val);
+
+ if (success) {
+ g_object_set (setting, key, ba_val, NULL);
+ g_byte_array_free (ba_val, TRUE);
+ }
+ } else if (type == DBUS_TYPE_G_LIST_OF_STRING) {
+ GSList *sa_val = NULL;
+
+ if (nm_gconf_get_stringlist_helper (info->client, info->dir, key, setting_name, &sa_val)) {
+ g_object_set (setting, key, sa_val, NULL);
+ g_slist_foreach (sa_val, (GFunc) g_free, NULL);
+ g_slist_free (sa_val);
+ }
+#if UNUSED
+ } else if (type == DBUS_TYPE_G_MAP_OF_VARIANT) {
+ GHashTable *vh_val = NULL;
+
+ if (nm_gconf_get_valuehash_helper (info->client, info->dir, setting_name, &vh_val)) {
+ g_object_set (setting, key, vh_val, NULL);
+ g_hash_table_destroy (vh_val);
+ }
+#endif
+ } else if (type == DBUS_TYPE_G_MAP_OF_STRING) {
+ GHashTable *sh_val = NULL;
+
+ if (nm_gconf_get_stringhash_helper (info->client, info->dir, setting_name, &sh_val)) {
+ g_object_set (setting, key, sh_val, NULL);
+ g_hash_table_destroy (sh_val);
+ }
+ } else if (type == DBUS_TYPE_G_UINT_ARRAY) {
+ GArray *a_val = NULL;
+
+ if (nm_gconf_get_uint_array_helper (info->client, info->dir, key, setting_name, &a_val)) {
+ g_object_set (setting, key, a_val, NULL);
+ g_array_free (a_val, TRUE);
+ }
+ } else if (type == DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT) {
+ GPtrArray *pa_val = NULL;
+ guint32 tuple_len = 0;
+
+ if (!strcmp (key, NM_SETTING_IP4_CONFIG_ADDRESSES))
+ tuple_len = 3;
+ else if (!strcmp (key, NM_SETTING_IP4_CONFIG_ROUTES))
+ tuple_len = 4;
+
+ if (nm_gconf_get_ip4_helper (info->client, info->dir, key, setting_name, tuple_len, &pa_val)) {
+ g_object_set (setting, key, pa_val, NULL);
+ g_ptr_array_foreach (pa_val, (GFunc) free_one_addr, NULL);
+ g_ptr_array_free (pa_val, TRUE);
+ }
+ } else if (type == DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR) {
+ GPtrArray *pa_val = NULL;
+
+ if (nm_gconf_get_ip6dns_array_helper (info->client, info->dir, key, setting_name, &pa_val)) {
+ g_object_set (setting, key, pa_val, NULL);
+ g_ptr_array_foreach (pa_val, (GFunc) free_one_bytearray, NULL);
+ g_ptr_array_free (pa_val, TRUE);
+ }
+ } else if (type == DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS) {
+ GPtrArray *pa_val = NULL;
+
+ if (nm_gconf_get_ip6addr_array_helper (info->client, info->dir, key, setting_name, &pa_val)) {
+ g_object_set (setting, key, pa_val, NULL);
+ g_ptr_array_foreach (pa_val, (GFunc) free_one_struct, NULL);
+ g_ptr_array_free (pa_val, TRUE);
+ }
+ } else if (type == DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE) {
+ GPtrArray *pa_val = NULL;
+
+ if (nm_gconf_get_ip6route_array_helper (info->client, info->dir, key, setting_name, &pa_val)) {
+ g_object_set (setting, key, pa_val, NULL);
+ g_ptr_array_foreach (pa_val, (GFunc) free_one_struct, NULL);
+ g_ptr_array_free (pa_val, TRUE);
+ }
+ } else {
+ g_warning ("Unhandled setting property type (read): '%s/%s' : '%s'",
+ setting_name, key, G_VALUE_TYPE_NAME (value));
+ }
+}
+
+static void
+read_one_setting (gpointer data, gpointer user_data)
+{
+ char *name;
+ ReadFromGConfInfo *info = (ReadFromGConfInfo *) user_data;
+ NMSetting *setting;
+
+ /* Setting name is the gconf directory name. Since "data" here contains
+ full gconf path plus separator ('/'), omit that. */
+ name = (char *) data + info->dir_len + 1;
+ setting = nm_connection_create_setting (name);
+ if (setting) {
+ nm_setting_enumerate_values (setting,
+ read_one_setting_value_from_gconf,
+ info);
+ nm_connection_add_setting (info->connection, setting);
+ }
+
+ g_free (data);
+}
+
+NMConnection *
+nm_gconf_read_connection (GConfClient *client,
+ const char *dir)
+{
+ ReadFromGConfInfo info;
+ GSList *list;
+ GError *err = NULL;
+
+ list = gconf_client_all_dirs (client, dir, &err);
+ if (err) {
+ g_warning ("Error while reading connection: %s", err->message);
+ g_error_free (err);
+ return NULL;
+ }
+
+ if (!list) {
+ g_warning ("Invalid connection (empty)");
+ return NULL;
+ }
+
+ info.connection = nm_connection_new ();
+ info.client = client;
+ info.dir = dir;
+ info.dir_len = strlen (dir);
+
+ g_slist_foreach (list, read_one_setting, &info);
+ g_slist_free (list);
+
+ return info.connection;
+}
+
+
+void
+nm_gconf_add_keyring_item (const char *connection_uuid,
+ const char *connection_name,
+ const char *setting_name,
+ const char *setting_key,
+ const char *secret)
+{
+ GnomeKeyringResult ret;
+ char *display_name = NULL;
+ GnomeKeyringAttributeList *attrs = NULL;
+ guint32 id = 0;
+
+ g_return_if_fail (connection_uuid != NULL);
+ g_return_if_fail (setting_name != NULL);
+ g_return_if_fail (setting_key != NULL);
+ g_return_if_fail (secret != NULL);
+
+ display_name = g_strdup_printf ("Network secret for %s/%s/%s",
+ connection_name,
+ setting_name,
+ setting_key);
+
+ attrs = gnome_keyring_attribute_list_new ();
+ gnome_keyring_attribute_list_append_string (attrs,
+ KEYRING_UUID_TAG,
+ connection_uuid);
+ gnome_keyring_attribute_list_append_string (attrs,
+ KEYRING_SN_TAG,
+ setting_name);
+ gnome_keyring_attribute_list_append_string (attrs,
+ KEYRING_SK_TAG,
+ setting_key);
+
+ pre_keyring_callback ();
+
+ ret = gnome_keyring_item_create_sync (NULL,
+ GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ display_name,
+ attrs,
+ secret,
+ TRUE,
+ &id);
+
+ gnome_keyring_attribute_list_free (attrs);
+ g_free (display_name);
+}
+
+typedef struct CopyOneSettingValueInfo {
+ NMConnection *connection;
+ GConfClient *client;
+ const char *dir;
+ const char *connection_uuid;
+ const char *connection_name;
+} CopyOneSettingValueInfo;
+
+static void
+write_one_secret_to_keyring (NMSetting *setting,
+ const char *key,
+ const GValue *value,
+ GParamFlags flags,
+ gpointer user_data)
+{
+ CopyOneSettingValueInfo *info = (CopyOneSettingValueInfo *) user_data;
+ GType type = G_VALUE_TYPE (value);
+ const char *secret;
+ const char *setting_name;
+
+ /* non-secrets and private key paths don't get stored in the keyring */
+ if ( !(flags & NM_SETTING_PARAM_SECRET)
+ || (NM_IS_SETTING_802_1X (setting) && string_in_list (key, applet_8021x_cert_keys)))
+ return;
+
+ setting_name = nm_setting_get_name (setting);
+
+ /* VPN secrets are handled by the VPN plugins */
+ if ( (type == DBUS_TYPE_G_MAP_OF_STRING)
+ && NM_IS_SETTING_VPN (setting)
+ && !strcmp (key, NM_SETTING_VPN_SECRETS))
+ return;
+
+ if (type != G_TYPE_STRING) {
+ g_warning ("Unhandled setting secret type (write) '%s/%s' : '%s'",
+ setting_name, key, g_type_name (type));
+ return;
+ }
+
+ secret = g_value_get_string (value);
+ if (secret && strlen (secret)) {
+ nm_gconf_add_keyring_item (info->connection_uuid,
+ info->connection_name,
+ setting_name,
+ key,
+ secret);
+ }
+}
+
+static gboolean
+write_secret_file (const char *path,
+ const char *data,
+ gsize len,
+ GError **error)
+{
+ char *tmppath;
+ int fd = -1, written;
+ gboolean success = FALSE;
+
+ tmppath = g_malloc0 (strlen (path) + 10);
+ if (!tmppath) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR, 0,
+ "Could not allocate memory for temporary file for '%s'",
+ path);
+ return FALSE;
+ }
+
+ memcpy (tmppath, path, strlen (path));
+ strcat (tmppath, ".XXXXXX");
+
+ errno = 0;
+ fd = mkstemp (tmppath);
+ if (fd < 0) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR, 0,
+ "Could not create temporary file for '%s': %d",
+ path, errno);
+ goto out;
+ }
+
+ /* Only readable by root */
+ errno = 0;
+ if (fchmod (fd, S_IRUSR | S_IWUSR)) {
+ close (fd);
+ unlink (tmppath);
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR, 0,
+ "Could not set permissions for temporary file '%s': %d",
+ path, errno);
+ goto out;
+ }
+
+ errno = 0;
+ written = write (fd, data, len);
+ if (written != len) {
+ close (fd);
+ unlink (tmppath);
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR, 0,
+ "Could not write temporary file for '%s': %d",
+ path, errno);
+ goto out;
+ }
+ close (fd);
+
+ /* Try to rename */
+ errno = 0;
+ if (rename (tmppath, path)) {
+ unlink (tmppath);
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR, 0,
+ "Could not rename temporary file to '%s': %d",
+ path, errno);
+ goto out;
+ }
+ success = TRUE;
+
+out:
+ return success;
+}
+
+typedef NMSetting8021xCKScheme (*SchemeFunc) (NMSetting8021x *setting);
+typedef const char * (*PathFunc) (NMSetting8021x *setting);
+typedef const GByteArray * (*BlobFunc) (NMSetting8021x *setting);
+typedef NMSetting8021xCKFormat (*FormatFunc) (NMSetting8021x *setting);
+typedef const char * (*PasswordFunc)(NMSetting8021x *setting);
+
+typedef struct ObjectType {
+ const char *setting_key;
+ gboolean p12_type;
+ SchemeFunc scheme_func;
+ PathFunc path_func;
+ BlobFunc blob_func;
+ FormatFunc format_func;
+ PasswordFunc password_func;
+ const char *privkey_password_key;
+ const char *suffix;
+} ObjectType;
+
+static const ObjectType ca_type = {
+ NM_SETTING_802_1X_CA_CERT,
+ FALSE,
+ nm_setting_802_1x_get_ca_cert_scheme,
+ nm_setting_802_1x_get_ca_cert_path,
+ nm_setting_802_1x_get_ca_cert_blob,
+ NULL,
+ NULL,
+ NULL,
+ "ca-cert.der"
+};
+
+static const ObjectType phase2_ca_type = {
+ NM_SETTING_802_1X_PHASE2_CA_CERT,
+ FALSE,
+ nm_setting_802_1x_get_phase2_ca_cert_scheme,
+ nm_setting_802_1x_get_phase2_ca_cert_path,
+ nm_setting_802_1x_get_phase2_ca_cert_blob,
+ NULL,
+ NULL,
+ NULL,
+ "inner-ca-cert.der"
+};
+
+static const ObjectType client_type = {
+ NM_SETTING_802_1X_CLIENT_CERT,
+ FALSE,
+ nm_setting_802_1x_get_client_cert_scheme,
+ nm_setting_802_1x_get_client_cert_path,
+ nm_setting_802_1x_get_client_cert_blob,
+ NULL,
+ NULL,
+ NULL,
+ "client-cert.der"
+};
+
+static const ObjectType phase2_client_type = {
+ NM_SETTING_802_1X_PHASE2_CLIENT_CERT,
+ FALSE,
+ nm_setting_802_1x_get_phase2_client_cert_scheme,
+ nm_setting_802_1x_get_phase2_client_cert_path,
+ nm_setting_802_1x_get_phase2_client_cert_blob,
+ NULL,
+ NULL,
+ NULL,
+ "inner-client-cert.der"
+};
+
+static const ObjectType pk_type = {
+ NM_SETTING_802_1X_PRIVATE_KEY,
+ FALSE,
+ nm_setting_802_1x_get_private_key_scheme,
+ nm_setting_802_1x_get_private_key_path,
+ nm_setting_802_1x_get_private_key_blob,
+ nm_setting_802_1x_get_private_key_format,
+ nm_setting_802_1x_get_private_key_password,
+ NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD,
+ "private-key.pem"
+};
+
+static const ObjectType phase2_pk_type = {
+ NM_SETTING_802_1X_PHASE2_PRIVATE_KEY,
+ FALSE,
+ nm_setting_802_1x_get_phase2_private_key_scheme,
+ nm_setting_802_1x_get_phase2_private_key_path,
+ nm_setting_802_1x_get_phase2_private_key_blob,
+ nm_setting_802_1x_get_phase2_private_key_format,
+ nm_setting_802_1x_get_phase2_private_key_password,
+ NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD,
+ "inner-private-key.pem"
+};
+
+static const ObjectType p12_type = {
+ NM_SETTING_802_1X_PRIVATE_KEY,
+ TRUE,
+ nm_setting_802_1x_get_private_key_scheme,
+ nm_setting_802_1x_get_private_key_path,
+ nm_setting_802_1x_get_private_key_blob,
+ nm_setting_802_1x_get_private_key_format,
+ nm_setting_802_1x_get_private_key_password,
+ NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD,
+ "private-key.p12"
+};
+
+static const ObjectType phase2_p12_type = {
+ NM_SETTING_802_1X_PHASE2_PRIVATE_KEY,
+ TRUE,
+ nm_setting_802_1x_get_phase2_private_key_scheme,
+ nm_setting_802_1x_get_phase2_private_key_path,
+ nm_setting_802_1x_get_phase2_private_key_blob,
+ nm_setting_802_1x_get_phase2_private_key_format,
+ nm_setting_802_1x_get_phase2_private_key_password,
+ NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD,
+ "inner-private-key.p12"
+};
+
+static char *
+generate_cert_path (const char *id, const char *suffix)
+{
+ return g_strdup_printf ("%s/.ssh/%s-%s", g_get_home_dir (), id, suffix);
+}
+
+static gboolean
+write_object (GConfClient *client,
+ const char *dir,
+ const char *id,
+ NMSetting8021x *s_8021x,
+ const GByteArray *override_data,
+ const ObjectType *objtype,
+ GError **error)
+{
+ NMSetting8021xCKScheme scheme;
+ const char *path = NULL;
+ const GByteArray *blob = NULL;
+ const char *setting_name = nm_setting_get_name (NM_SETTING (s_8021x));
+
+ g_return_val_if_fail (objtype != NULL, FALSE);
+
+ if (override_data) {
+ /* if given explicit data to save, always use that instead of asking
+ * the setting what to do.
+ */
+ blob = override_data;
+ } else {
+ scheme = (*(objtype->scheme_func))(s_8021x);
+ switch (scheme) {
+ case NM_SETTING_802_1X_CK_SCHEME_BLOB:
+ blob = (*(objtype->blob_func))(s_8021x);
+ break;
+ case NM_SETTING_802_1X_CK_SCHEME_PATH:
+ path = (*(objtype->path_func))(s_8021x);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /* If certificate/private key wasn't sent, the connection may no longer be
+ * 802.1x and thus we clear out the paths and certs.
+ */
+ if (!path && !blob) {
+ char *standard_file;
+ int ignored;
+
+ /* Since no cert/private key is now being used, delete any standard file
+ * that was created for this connection, but leave other files alone.
+ * Thus, for example, ~/.ssh/My Company Network-ca-cert.der will be
+ * deleted, but /etc/pki/tls/cert.pem would not.
+ */
+ standard_file = generate_cert_path (id, objtype->suffix);
+ if (g_file_test (standard_file, G_FILE_TEST_EXISTS))
+ ignored = unlink (standard_file);
+ g_free (standard_file);
+
+ /* Delete the key from GConf */
+ nm_gconf_set_string_helper (client, dir, objtype->setting_key, setting_name, NULL);
+ return TRUE;
+ }
+
+ /* If the object path was specified, prefer that over any raw cert data that
+ * may have been sent.
+ */
+ if (path) {
+ nm_gconf_set_string_helper (client, dir, objtype->setting_key, setting_name, path);
+ return TRUE;
+ }
+
+ /* If it's raw certificate data, write the cert data out to the standard file */
+ if (blob) {
+ gboolean success;
+ char *new_file;
+ GError *write_error = NULL;
+
+ new_file = generate_cert_path (id, objtype->suffix);
+ if (!new_file) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR, 0,
+ "Could not create file path for %s / %s",
+ setting_name, objtype->setting_key);
+ return FALSE;
+ }
+
+ /* Write the raw certificate data out to the standard file so that we
+ * can use paths from now on instead of pushing around the certificate
+ * data itself.
+ */
+ success = write_secret_file (new_file, (const char *) blob->data, blob->len, &write_error);
+ if (success) {
+ nm_gconf_set_string_helper (client, dir, objtype->setting_key, setting_name, new_file);
+ return TRUE;
+ } else {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR, 0,
+ "Could not write certificate/key for %s / %s: %s",
+ setting_name, objtype->setting_key,
+ (write_error && write_error->message) ? write_error->message : "(unknown)");
+ g_clear_error (&write_error);
+ }
+ g_free (new_file);
+ }
+
+ return FALSE;
+}
+
+static gboolean
+write_one_certificate (GConfClient *client,
+ const char *dir,
+ const char *key,
+ NMSetting8021x *s_8021x,
+ NMConnection *connection,
+ GError **error)
+{
+ const char *id;
+ NMSettingConnection *s_con;
+ const ObjectType *cert_objects[] = {
+ &ca_type,
+ &phase2_ca_type,
+ &client_type,
+ &phase2_client_type,
+ &pk_type,
+ &phase2_pk_type,
+ &p12_type,
+ &phase2_p12_type,
+ NULL
+ };
+ const ObjectType **obj = &cert_objects[0];
+ gboolean handled = FALSE, success = FALSE;
+
+ s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ g_assert (s_con);
+ id = nm_setting_connection_get_id (s_con);
+ g_assert (id);
+
+ while (*obj && !handled) {
+ const GByteArray *blob = NULL;
+ GByteArray *enc_key = NULL;
+
+ if (strcmp (key, (*obj)->setting_key)) {
+ obj++;
+ continue;
+ }
+
+ /* Check for pkcs#12 format private keys; if the current ObjectType
+ * structure isn't for a pkcs#12 key but the key actually is
+ * pkcs#12, keep going to get the right pkcs#12 ObjectType.
+ */
+ if ( (*obj)->format_func
+ && ((*obj)->format_func (s_8021x) == NM_SETTING_802_1X_CK_FORMAT_PKCS12)
+ && !(*obj)->p12_type) {
+ obj++;
+ continue;
+ }
+
+ if ((*obj)->scheme_func (s_8021x) == NM_SETTING_802_1X_CK_SCHEME_BLOB)
+ blob = (*obj)->blob_func (s_8021x);
+
+ /* Only do the private key re-encrypt dance if we got the raw key data, which
+ * by definition will be unencrypted. If we're given a direct path to the
+ * private key file, it'll be encrypted, so we don't need to re-encrypt.
+ */
+ if (blob && !(*obj)->p12_type) {
+ const char *password;
+ char *generated_pw;
+
+ /* If the private key is an unencrypted blob, re-encrypt it with a
+ * random password since we don't store unencrypted private keys on disk.
+ */
+ password = (*obj)->password_func (s_8021x);
+
+ /* Encrypt the unencrypted private key */
+ enc_key = nm_utils_rsa_key_encrypt (blob, password, &generated_pw, error);
+ if (!enc_key)
+ goto out;
+
+ /* Save any generated private key back into the 802.1x setting so
+ * it'll get stored when secrets are written to the keyring.
+ */
+ if (generated_pw) {
+ g_object_set (G_OBJECT (s_8021x), (*obj)->privkey_password_key, generated_pw, NULL);
+ memset (generated_pw, 0, strlen (generated_pw));
+ g_free (generated_pw);
+ }
+ }
+
+ success = write_object (client, dir, id, s_8021x, enc_key ? enc_key : blob, *obj, error);
+ if (enc_key)
+ g_byte_array_free (enc_key, TRUE);
+
+ handled = TRUE;
+ }
+
+ if (!handled) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR, 0,
+ "Unhandled certificate/private-key item '%s'",
+ key);
+ }
+
+out:
+ return success;
+}
+
+static void
+copy_one_setting_value_to_gconf (NMSetting *setting,
+ const char *key,
+ const GValue *value,
+ GParamFlags flags,
+ gpointer user_data)
+{
+ CopyOneSettingValueInfo *info = (CopyOneSettingValueInfo *) user_data;
+ const char *setting_name;
+ GType type = G_VALUE_TYPE (value);
+ GParamSpec *pspec;
+
+ /* Some VPN keys are ignored */
+ if (NM_IS_SETTING_VPN (setting)) {
+ if (string_in_list (key, vpn_ignore_keys))
+ return;
+ }
+
+ /* Secrets don't get stored in GConf; but the 802.1x private keys,
+ * which are marked secret for backwards compat, do get stored in
+ * GConf because as of NM 0.8, they are just paths and not the decrypted
+ * private key blobs.
+ */
+ if ( (flags & NM_SETTING_PARAM_SECRET)
+ && !(NM_IS_SETTING_802_1X (setting) && string_in_list (key, applet_8021x_cert_keys)))
+ return;
+
+ /* Don't write the NMSettingConnection object's 'read-only' property */
+ if ( NM_IS_SETTING_CONNECTION (setting)
+ && !strcmp (key, NM_SETTING_CONNECTION_READ_ONLY))
+ return;
+
+ setting_name = nm_setting_get_name (setting);
+
+ /* If the value is the default value, remove the item from GConf */
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (setting), key);
+ if (pspec) {
+ if (g_param_value_defaults (pspec, (GValue *) value)) {
+ char *path;
+
+ path = g_strdup_printf ("%s/%s/%s", info->dir, setting_name, key);
+ if (path)
+ gconf_client_unset (info->client, path, NULL);
+ g_free (path);
+ return;
+ }
+ }
+
+ if ( NM_IS_SETTING_802_1X (setting)
+ && string_in_list (key, applet_8021x_cert_keys)
+ && (type == DBUS_TYPE_G_UCHAR_ARRAY)) {
+ GError *error = NULL;
+
+ if (!write_one_certificate (info->client,
+ info->dir,
+ key,
+ NM_SETTING_802_1X (setting),
+ info->connection,
+ &error)) {
+ g_warning ("%s: error saving certificate/private key '%s': (%d) %s",
+ __func__,
+ key,
+ error ? error->code : -1,
+ error && error->message ? error->message : "(unknown)");
+ }
+ } else if (type == G_TYPE_STRING) {
+ nm_gconf_set_string_helper (info->client, info->dir, key, setting_name, g_value_get_string (value));
+ } else if (type == G_TYPE_UINT) {
+ nm_gconf_set_int_helper (info->client, info->dir,
+ key, setting_name,
+ g_value_get_uint (value));
+ } else if (type == G_TYPE_INT) {
+ nm_gconf_set_int_helper (info->client, info->dir,
+ key, setting_name,
+ g_value_get_int (value));
+ } else if (type == G_TYPE_UINT64) {
+ char *numstr;
+
+ /* GConf doesn't do 64-bit values, so use strings instead */
+ numstr = g_strdup_printf ("%" G_GUINT64_FORMAT, g_value_get_uint64 (value));
+ nm_gconf_set_string_helper (info->client, info->dir,
+ key, setting_name, numstr);
+ g_free (numstr);
+ } else if (type == G_TYPE_BOOLEAN) {
+ nm_gconf_set_bool_helper (info->client, info->dir,
+ key, setting_name,
+ g_value_get_boolean (value));
+ } else if (type == G_TYPE_CHAR) {
+ nm_gconf_set_int_helper (info->client, info->dir,
+ key, setting_name,
+ g_value_get_char (value));
+ } else if (type == DBUS_TYPE_G_UCHAR_ARRAY) {
+ GByteArray *ba_val = (GByteArray *) g_value_get_boxed (value);
+
+ if (!nm_gconf_set_mac_address_helper (info->client, info->dir, key, setting_name, ba_val))
+ nm_gconf_set_bytearray_helper (info->client, info->dir, key, setting_name, ba_val);
+ } else if (type == DBUS_TYPE_G_LIST_OF_STRING) {
+ nm_gconf_set_stringlist_helper (info->client, info->dir,
+ key, setting_name,
+ (GSList *) g_value_get_boxed (value));
+#if UNUSED
+ } else if (type == DBUS_TYPE_G_MAP_OF_VARIANT) {
+ nm_gconf_set_valuehash_helper (info->client, info->dir,
+ setting_name,
+ (GHashTable *) g_value_get_boxed (value));
+#endif
+ } else if (type == DBUS_TYPE_G_MAP_OF_STRING) {
+ nm_gconf_set_stringhash_helper (info->client, info->dir,
+ setting_name,
+ (GHashTable *) g_value_get_boxed (value));
+ } else if (type == DBUS_TYPE_G_UINT_ARRAY) {
+ nm_gconf_set_uint_array_helper (info->client, info->dir,
+ key, setting_name,
+ (GArray *) g_value_get_boxed (value));
+ } else if (type == DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT) {
+ guint32 tuple_len = 0;
+
+ if (!strcmp (key, NM_SETTING_IP4_CONFIG_ADDRESSES))
+ tuple_len = 3;
+ else if (!strcmp (key, NM_SETTING_IP4_CONFIG_ROUTES))
+ tuple_len = 4;
+
+ nm_gconf_set_ip4_helper (info->client, info->dir,
+ key, setting_name, tuple_len,
+ (GPtrArray *) g_value_get_boxed (value));
+ } else if (type == DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UCHAR) {
+ nm_gconf_set_ip6dns_array_helper (info->client, info->dir,
+ key, setting_name,
+ (GPtrArray *) g_value_get_boxed (value));
+ } else if (type == DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS) {
+ nm_gconf_set_ip6addr_array_helper (info->client, info->dir,
+ key, setting_name,
+ (GPtrArray *) g_value_get_boxed (value));
+ } else if (type == DBUS_TYPE_G_ARRAY_OF_IP6_ROUTE) {
+ nm_gconf_set_ip6route_array_helper (info->client, info->dir,
+ key, setting_name,
+ (GPtrArray *) g_value_get_boxed (value));
+ } else
+ g_warning ("Unhandled setting property type (write) '%s/%s' : '%s'",
+ setting_name, key, g_type_name (type));
+}
+
+static void
+remove_leftovers (CopyOneSettingValueInfo *info)
+{
+ GSList *dirs;
+ GSList *iter;
+ size_t prefix_len;
+
+ prefix_len = strlen (info->dir) + 1;
+
+ dirs = gconf_client_all_dirs (info->client, info->dir, NULL);
+ for (iter = dirs; iter; iter = iter->next) {
+ char *key = (char *) iter->data;
+ NMSetting *setting;
+
+ setting = nm_connection_get_setting_by_name (info->connection, key + prefix_len);
+ if (!setting)
+ gconf_client_recursive_unset (info->client, key, 0, NULL);
+
+ g_free (key);
+ }
+
+ g_slist_free (dirs);
+}
+
+static void
+write_connection_internal (NMConnection *connection,
+ GConfClient *client,
+ const char *dir)
+{
+ NMSettingConnection *s_con;
+ CopyOneSettingValueInfo info;
+ gboolean ignore;
+
+ g_return_if_fail (NM_IS_CONNECTION (connection));
+ g_return_if_fail (client != NULL);
+ g_return_if_fail (dir != NULL);
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ if (!s_con)
+ return;
+
+ info.connection = connection;
+ info.client = client;
+ info.dir = dir;
+ info.connection_uuid = nm_setting_connection_get_uuid (s_con);
+ info.connection_name = nm_setting_connection_get_id (s_con);
+ nm_connection_for_each_setting_value (connection,
+ copy_one_setting_value_to_gconf,
+ &info);
+ remove_leftovers (&info);
+
+ /* write secrets */
+ nm_connection_for_each_setting_value (connection,
+ write_one_secret_to_keyring,
+ &info);
+
+ /* Update ignore CA cert status */
+ ignore = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (connection), IGNORE_CA_CERT_TAG));
+ nm_gconf_set_ignore_ca_cert (info.connection_uuid, FALSE, ignore);
+
+ ignore = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (connection), IGNORE_PHASE2_CA_CERT_TAG));
+ nm_gconf_set_ignore_ca_cert (info.connection_uuid, TRUE, ignore);
+}
+
+void
+nm_gconf_write_connection (NMConnection *connection,
+ GConfClient *client,
+ const char *dir)
+{
+ GConfClient *my_client;
+ char *my_dir;
+
+ g_return_if_fail (NM_IS_CONNECTION (connection));
+
+ my_client = client ? g_object_ref (client) : gconf_client_get_default ();
+
+ if (dir)
+ my_dir = g_strdup (dir);
+ else {
+ int i = 0;
+
+ /* Find free GConf directory */
+ while (i++ < G_MAXUINT32) {
+ char buf[255];
+
+ snprintf (&buf[0], 255, GCONF_PATH_CONNECTIONS"/%d", i);
+ if (!gconf_client_dir_exists (my_client, buf, NULL)) {
+ my_dir = g_strdup (buf);
+ break;
+ }
+ }
+ }
+
+ write_connection_internal (connection, my_client, my_dir);
+ gconf_client_suggest_sync (my_client, NULL);
+ g_object_unref (my_client);
+ g_free (my_dir);
+}
+
+static char *
+get_ignore_path (const char *uuid, gboolean phase2)
+{
+ return g_strdup_printf (APPLET_PREFS_PATH "/%s/%s",
+ phase2 ? "ignore-phase2-ca-cert" : "ignore-ca-cert",
+ uuid);
+}
+
+gboolean
+nm_gconf_get_ignore_ca_cert (const char *uuid, gboolean phase2)
+{
+ GConfClient *client;
+ char *key = NULL;
+ gboolean ignore = FALSE;
+
+ g_return_val_if_fail (uuid != NULL, FALSE);
+
+ client = gconf_client_get_default ();
+
+ key = get_ignore_path (uuid, phase2);
+ ignore = gconf_client_get_bool (client, key, NULL);
+ g_free (key);
+
+ g_object_unref (client);
+ return ignore;
+}
+
+void
+nm_gconf_set_ignore_ca_cert (const char *uuid, gboolean phase2, gboolean ignore)
+{
+ GConfClient *client;
+ char *key = NULL;
+
+ g_return_if_fail (uuid != NULL);
+
+ client = gconf_client_get_default ();
+
+ key = get_ignore_path (uuid, phase2);
+ if (ignore)
+ gconf_client_set_bool (client, key, ignore, NULL);
+ else
+ gconf_client_unset (client, key, NULL);
+ g_free (key);
+
+ g_object_unref (client);
+}
+
diff --git a/libnm-gtk/gconf-helpers.h b/libnm-gtk/gconf-helpers.h
new file mode 100644
index 0000000..87889f9
--- /dev/null
+++ b/libnm-gtk/gconf-helpers.h
@@ -0,0 +1,261 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2005 Red Hat, Inc.
+ */
+
+#ifndef GCONF_HELPERS_H
+#define GCONF_HELPERS_H
+
+#include <gconf/gconf-client.h>
+#include <glib.h>
+#include <nm-connection.h>
+
+#include "nm-gconf-connection.h"
+
+#define GCONF_PATH_CONNECTIONS "/system/networking/connections"
+
+/* The stamp is a mechanism for determining which applet version last
+ * updated GConf for various GConf update tasks in newer applet versions.
+ */
+#define APPLET_CURRENT_STAMP 1
+#define APPLET_PREFS_STAMP "/apps/nm-applet/stamp"
+
+#define IGNORE_CA_CERT_TAG "ignore-ca-cert"
+#define IGNORE_PHASE2_CA_CERT_TAG "ignore-phase2-ca-cert"
+
+#define KEYRING_UUID_TAG "connection-uuid"
+#define KEYRING_SN_TAG "setting-name"
+#define KEYRING_SK_TAG "setting-key"
+
+gboolean
+nm_gconf_get_int_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ int *value);
+
+gboolean
+nm_gconf_get_float_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ gfloat *value);
+
+gboolean
+nm_gconf_get_string_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ char **value);
+
+gboolean
+nm_gconf_get_bool_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ gboolean *value);
+
+gboolean
+nm_gconf_get_stringlist_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GSList **value);
+
+gboolean
+nm_gconf_get_bytearray_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GByteArray **value);
+
+gboolean
+nm_gconf_get_uint_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GArray **value);
+
+
+#if UNUSED
+gboolean
+nm_gconf_get_valuehash_helper (GConfClient *client,
+ const char *path,
+ const char *setting,
+ GHashTable **value);
+#endif
+
+gboolean
+nm_gconf_get_stringhash_helper (GConfClient *client,
+ const char *path,
+ const char *setting,
+ GHashTable **value);
+
+gboolean
+nm_gconf_get_ip4_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ guint32 tuple_len,
+ GPtrArray **value);
+
+gboolean
+nm_gconf_get_ip6dns_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray **value);
+
+gboolean
+nm_gconf_get_ip6addr_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray **value);
+
+gboolean
+nm_gconf_get_ip6route_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray **value);
+
+/* Setters */
+
+gboolean
+nm_gconf_set_int_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ int value);
+
+gboolean
+nm_gconf_set_float_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ gfloat value);
+
+gboolean
+nm_gconf_set_string_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ const char *value);
+
+gboolean
+nm_gconf_set_bool_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ gboolean value);
+
+gboolean
+nm_gconf_set_stringlist_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GSList *value);
+
+gboolean
+nm_gconf_set_bytearray_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GByteArray *value);
+
+gboolean
+nm_gconf_set_uint_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GArray *value);
+
+#if UNUSED
+gboolean
+nm_gconf_set_valuehash_helper (GConfClient *client,
+ const char *path,
+ const char *setting,
+ GHashTable *value);
+#endif
+
+gboolean
+nm_gconf_set_stringhash_helper (GConfClient *client,
+ const char *path,
+ const char *setting,
+ GHashTable *value);
+
+gboolean
+nm_gconf_set_ip4_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ guint32 tuple_len,
+ GPtrArray *value);
+
+gboolean
+nm_gconf_set_ip6dns_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray *value);
+
+gboolean
+nm_gconf_set_ip6addr_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray *value);
+
+gboolean
+nm_gconf_set_ip6route_array_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *setting,
+ GPtrArray *value);
+
+GSList *
+nm_gconf_get_all_connections (GConfClient *client);
+
+NMConnection *
+nm_gconf_read_connection (GConfClient *client,
+ const char *dir);
+
+void
+nm_gconf_write_connection (NMConnection *connection,
+ GConfClient *client,
+ const char *dir);
+
+void
+nm_gconf_add_keyring_item (const char *connection_uuid,
+ const char *connection_name,
+ const char *setting_name,
+ const char *setting_key,
+ const char *secret);
+
+typedef void (*PreKeyringCallback) (gpointer user_data);
+void nm_gconf_set_pre_keyring_callback (PreKeyringCallback func, gpointer user_data);
+void pre_keyring_callback (void);
+
+gboolean nm_gconf_get_ignore_ca_cert (const char *uuid, gboolean phase2);
+void nm_gconf_set_ignore_ca_cert (const char *uuid, gboolean phase2, gboolean ignore);
+
+#endif /* GCONF_HELPERS_H */
+
diff --git a/libnm-gtk/gconf-upgrade.c b/libnm-gtk/gconf-upgrade.c
new file mode 100644
index 0000000..0651a37
--- /dev/null
+++ b/libnm-gtk/gconf-upgrade.c
@@ -0,0 +1,1993 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2005 - 2008 Red Hat, Inc.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+#include "wireless-helper.h"
+#include <stdlib.h>
+#include <netinet/in.h>
+#include <errno.h>
+#include <arpa/inet.h>
+
+#include <gnome-keyring.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-wireless.h>
+#include <nm-setting-wireless-security.h>
+#include <nm-setting-8021x.h>
+#include <nm-setting-vpn.h>
+#include <nm-setting-ip4-config.h>
+#include <nm-utils.h>
+
+#include "gconf-upgrade.h"
+#include "gconf-helpers.h"
+
+#include "nm-connection.h"
+
+/* NM 0.6 compat defines */
+
+#define NM_AUTH_TYPE_WPA_PSK_AUTO 0x00000000
+#define NM_AUTH_TYPE_NONE 0x00000001
+#define NM_AUTH_TYPE_WEP40 0x00000002
+#define NM_AUTH_TYPE_WPA_PSK_TKIP 0x00000004
+#define NM_AUTH_TYPE_WPA_PSK_CCMP 0x00000008
+#define NM_AUTH_TYPE_WEP104 0x00000010
+#define NM_AUTH_TYPE_WPA_EAP 0x00000020
+#define NM_AUTH_TYPE_LEAP 0x00000040
+
+#define NM_EAP_METHOD_MD5 0x00000001
+#define NM_EAP_METHOD_MSCHAP 0x00000002
+#define NM_EAP_METHOD_OTP 0x00000004
+#define NM_EAP_METHOD_GTC 0x00000008
+#define NM_EAP_METHOD_PEAP 0x00000010
+#define NM_EAP_METHOD_TLS 0x00000020
+#define NM_EAP_METHOD_TTLS 0x00000040
+
+#define NM_PHASE2_AUTH_NONE 0x00000000
+#define NM_PHASE2_AUTH_PAP 0x00010000
+#define NM_PHASE2_AUTH_MSCHAP 0x00020000
+#define NM_PHASE2_AUTH_MSCHAPV2 0x00030000
+#define NM_PHASE2_AUTH_GTC 0x00040000
+
+#define NMA_CA_CERT_IGNORE_TAG "nma-ca-cert-ignore"
+#define NMA_PHASE2_CA_CERT_IGNORE_TAG "nma-phase2-ca-cert-ignore"
+#define NMA_PRIVATE_KEY_PASSWORD_TAG "nma-private-key-password"
+#define NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG "nma-phase2-private-key-password"
+#define NMA_PATH_CA_CERT_TAG "nma-path-ca-cert"
+#define NMA_PATH_PHASE2_CA_CERT_TAG "nma-path-phase2-ca-cert"
+#define NMA_PATH_CLIENT_CERT_TAG "nma-path-client-cert"
+#define NMA_PATH_PHASE2_CLIENT_CERT_TAG "nma-path-phase2-client-cert"
+#define NMA_PATH_PRIVATE_KEY_TAG "nma-path-private-key"
+#define NMA_PATH_PHASE2_PRIVATE_KEY_TAG "nma-path-phase2-private-key"
+
+
+struct flagnames {
+ const char * const name;
+ guint value;
+};
+
+/* Reads an enum value stored as an integer and returns the
+ * corresponding string from @names.
+ */
+static gboolean
+get_enum_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *network,
+ const struct flagnames *names,
+ char **value)
+{
+ int ival, i;
+
+ if (!nm_gconf_get_int_helper (client, path, key, network, &ival)) {
+ g_warning ("Missing key '%s' on NM 0.6 connection %s", key, network);
+ return FALSE;
+ }
+
+ for (i = 0; names[i].name; i++) {
+ if (names[i].value == ival) {
+ *value = g_strdup (names[i].name);
+ return TRUE;
+ }
+ }
+
+ g_warning ("Bad value '%d' for key '%s' on NM 0.6 connection %s", ival, key, network);
+ return FALSE;
+}
+
+/* Reads a bitfield value stored as an integer and returns a list of
+ * names from @names corresponding to the bits that are set.
+ */
+static gboolean
+get_bitfield_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *network,
+ const struct flagnames *names,
+ GSList **value)
+{
+ int ival, i;
+
+ if (!nm_gconf_get_int_helper (client, path, key, network, &ival)) {
+ g_warning ("Missing key '%s' on NM 0.6 connection %s", key, network);
+ return FALSE;
+ }
+
+ *value = NULL;
+ for (i = 0; names[i].name; i++) {
+ if (names[i].value & ival) {
+ *value = g_slist_prepend (*value, g_strdup (names[i].name));
+ ival = ival & ~names[i].value;
+ }
+ }
+
+ if (ival) {
+ nm_utils_slist_free (*value, g_free);
+ g_warning ("Bad value '%d' for key '%s' on NM 0.6 connection %s", ival, key, network);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean
+get_mandatory_string_helper (GConfClient *client,
+ const char *path,
+ const char *key,
+ const char *network,
+ char **value)
+{
+ if (!nm_gconf_get_string_helper (client, path, key, network, value)) {
+ g_warning ("Missing key '%s' on NM 0.6 connection %s", key, network);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static char *
+get_06_keyring_secret (const char *network, const char *attr_name)
+{
+ GnomeKeyringResult result;
+ GList *found_list = NULL;
+ char *secret = NULL;
+
+ /* Get the PSK out of the keyring */
+ result = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ attr_name ? attr_name : "essid",
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ network,
+ NULL);
+ if ((result == GNOME_KEYRING_RESULT_OK) && (g_list_length (found_list) > 0)) {
+ GnomeKeyringFound *found = (GnomeKeyringFound *) found_list->data;
+
+ secret = g_strdup (found->secret);
+ gnome_keyring_found_list_free (found_list);
+ }
+ return secret;
+}
+
+static void
+clear_06_keyring_secret (char *secret)
+{
+ if (secret) {
+ memset (secret, 0, strlen (secret));
+ g_free (secret);
+ }
+}
+
+static const struct flagnames wep_auth_algorithms[] = {
+ { "open", IW_AUTH_ALG_OPEN_SYSTEM },
+ { "shared", IW_AUTH_ALG_SHARED_KEY },
+ { NULL, 0 }
+};
+
+static NMSettingWirelessSecurity *
+nm_gconf_read_0_6_wep_settings (GConfClient *client,
+ const char *path,
+ const char *network,
+ const char *uuid,
+ const char *id)
+{
+ NMSettingWirelessSecurity *s_wireless_sec;
+ char *auth_alg, *secret = NULL;
+
+ if (!get_enum_helper (client, path, "wep_auth_algorithm", network, wep_auth_algorithms, &auth_alg))
+ return NULL;
+
+ s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_setting_wireless_security_new ());
+ g_object_set (s_wireless_sec,
+ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "none",
+ NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, 0,
+ NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, auth_alg,
+ NULL);
+ g_free (auth_alg);
+
+ secret = get_06_keyring_secret (network, NULL);
+ if (secret) {
+ nm_gconf_add_keyring_item (uuid, id,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ NM_SETTING_WIRELESS_SECURITY_WEP_KEY0,
+ secret);
+ clear_06_keyring_secret (secret);
+ }
+
+ return s_wireless_sec;
+}
+
+static const struct flagnames wpa_versions[] = {
+ { "wpa", IW_AUTH_WPA_VERSION_WPA },
+ { "rsn", IW_AUTH_WPA_VERSION_WPA2 },
+ { NULL, 0 }
+};
+
+static NMSettingWirelessSecurity *
+nm_gconf_read_0_6_wpa_settings (GConfClient *client,
+ const char *path,
+ const char *network,
+ const char *uuid,
+ const char *id)
+{
+ NMSettingWirelessSecurity *s_wireless_sec = NULL;
+ char *secret = NULL;
+
+ s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_setting_wireless_security_new ());
+ g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-psk", NULL);
+ nm_setting_wireless_security_add_proto (s_wireless_sec, "wpa");
+ nm_setting_wireless_security_add_proto (s_wireless_sec, "rsn");
+
+ secret = get_06_keyring_secret (network, NULL);
+ if (secret) {
+ nm_gconf_add_keyring_item (uuid, id,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ NM_SETTING_WIRELESS_SECURITY_PSK,
+ secret);
+ clear_06_keyring_secret (secret);
+ }
+
+ return s_wireless_sec;
+}
+
+static const struct flagnames eap_methods[] = {
+ { "md5", NM_EAP_METHOD_MD5 },
+ { "mschap", NM_EAP_METHOD_MSCHAP },
+ { "otp", NM_EAP_METHOD_OTP },
+ { "gtc", NM_EAP_METHOD_GTC },
+ { "peap", NM_EAP_METHOD_PEAP },
+ { "tls", NM_EAP_METHOD_TLS },
+ { "ttls", NM_EAP_METHOD_TTLS },
+ { NULL, 0 }
+};
+
+static const struct flagnames eap_key_types[] = {
+ { "wep40", IW_AUTH_CIPHER_WEP40 },
+ { "wep104", IW_AUTH_CIPHER_WEP104 },
+ { "tkip", IW_AUTH_CIPHER_TKIP },
+ { "ccmp", IW_AUTH_CIPHER_CCMP },
+ { NULL, 0 }
+};
+
+static const struct flagnames eap_phase2_types[] = {
+ { "none", NM_PHASE2_AUTH_NONE },
+ { "pap", NM_PHASE2_AUTH_PAP },
+ { "mschap", NM_PHASE2_AUTH_MSCHAP },
+ { "mschapv2", NM_PHASE2_AUTH_MSCHAPV2 },
+ { "gtc", NM_PHASE2_AUTH_GTC },
+ { NULL, 0 }
+};
+
+static NMSettingWirelessSecurity *
+nm_gconf_read_0_6_eap_settings (GConfClient *client,
+ const char *path,
+ const char *network,
+ const char *uuid,
+ const char *id,
+ NMSetting8021x **s_8021x)
+{
+ NMSettingWirelessSecurity *wsec = NULL;
+ GSList *eaps = NULL, *ciphers = NULL, *iter;
+ char *phase2 = NULL, *identity = NULL, *anon_identity = NULL, *secret = NULL;
+ const char *eap = NULL;
+ gboolean wep_ciphers = FALSE, wpa_ciphers = FALSE;
+
+ if (!get_bitfield_helper (client, path, "wpa_eap_eap_method", network, eap_methods, &eaps))
+ goto out;
+ /* Default to TTLS */
+ eap = (eaps && eaps->data) ? (const char *) eaps->data : "ttls";
+
+ if (!get_enum_helper (client, path, "wpa_eap_phase2_type", network, eap_phase2_types, &phase2))
+ goto out;
+ /* Default to MSCHAPv2 */
+ phase2 = phase2 ? phase2 : g_strdup ("mschapv2");
+
+ if (!get_bitfield_helper (client, path, "wpa_eap_key_type", network, eap_key_types, &ciphers))
+ goto out;
+ for (iter = ciphers; iter; iter = g_slist_next (iter)) {
+ if ( !strcmp ((const char *) iter->data, "wep104")
+ || !strcmp ((const char *) iter->data, "wep40"))
+ wep_ciphers = TRUE;
+ if ( !strcmp ((const char *) iter->data, "ccmp")
+ || !strcmp ((const char *) iter->data, "tkip"))
+ wpa_ciphers = TRUE;
+ }
+
+ if (!get_mandatory_string_helper (client, path, "wpa_eap_identity", network, &identity))
+ goto out;
+ nm_gconf_get_string_helper (client, path, "wpa_eap_anon_identity", network, &anon_identity);
+
+ wsec = NM_SETTING_WIRELESS_SECURITY (nm_setting_wireless_security_new ());
+ *s_8021x = NM_SETTING_802_1X (nm_setting_802_1x_new ());
+
+ /* Dynamic WEP or WPA? */
+ if (wep_ciphers && !wpa_ciphers)
+ g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "ieee8021x", NULL);
+ else {
+ g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-eap", NULL);
+ nm_setting_wireless_security_add_proto (wsec, "wpa");
+ nm_setting_wireless_security_add_proto (wsec, "rsn");
+ }
+
+ g_object_set (*s_8021x,
+ NM_SETTING_802_1X_IDENTITY, identity,
+ NM_SETTING_802_1X_ANONYMOUS_IDENTITY, anon_identity,
+ NULL);
+ nm_setting_802_1x_add_eap_method (*s_8021x, eap);
+
+ secret = get_06_keyring_secret (network, NULL);
+ if (secret) {
+ nm_gconf_add_keyring_item (uuid, id,
+ NM_SETTING_802_1X_SETTING_NAME,
+ NM_SETTING_802_1X_PASSWORD,
+ secret);
+ clear_06_keyring_secret (secret);
+ }
+
+ /* Add phase2 if the eap method uses inner auth */
+ if (!strcmp (eap, "ttls") || !strcmp (eap, "peap")) {
+ /* If the method is actually unsupported in NM 0.7, default to mschapv2 */
+ if ( strcmp (phase2, "pap")
+ && strcmp (phase2, "mschap")
+ && strcmp (phase2, "mschapv2")) {
+ g_free (phase2);
+ phase2 = g_strdup ("mschapv2");
+ }
+ g_object_set (*s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, phase2, NULL);
+
+ secret = get_06_keyring_secret (network, "private-key-passwd");
+ if (secret) {
+ nm_gconf_add_keyring_item (uuid, id,
+ NM_SETTING_802_1X_SETTING_NAME,
+ NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD,
+ secret);
+ clear_06_keyring_secret (secret);
+ }
+ } else if (!strcmp (eap, "tls")) {
+ secret = get_06_keyring_secret (network, "private-key-passwd");
+ if (secret) {
+ nm_gconf_add_keyring_item (uuid, id,
+ NM_SETTING_802_1X_SETTING_NAME,
+ NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD,
+ secret);
+ clear_06_keyring_secret (secret);
+ }
+ }
+
+out:
+ nm_utils_slist_free (eaps, g_free);
+ nm_utils_slist_free (ciphers, g_free);
+ g_free (phase2);
+ g_free (identity);
+ g_free (anon_identity);
+ return wsec;
+}
+
+static NMSettingWirelessSecurity *
+nm_gconf_read_0_6_leap_settings (GConfClient *client,
+ const char *path,
+ const char *network,
+ const char *uuid,
+ const char *id,
+ NMSetting8021x **s_8021x)
+{
+ NMSettingWirelessSecurity *s_wireless_sec = NULL;
+ char *username = NULL, *key_mgmt = NULL, *secret = NULL;
+
+ if (!get_mandatory_string_helper (client, path, "leap_key_mgmt", network, &key_mgmt))
+ goto out;
+ if (!get_mandatory_string_helper (client, path, "leap_username", network, &username))
+ goto out;
+
+ s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_setting_wireless_security_new ());
+
+ secret = get_06_keyring_secret (network, NULL);
+
+ if (!strcmp (key_mgmt, "WPA-EAP")) {
+ g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-eap", NULL);
+
+ *s_8021x = NM_SETTING_802_1X (nm_setting_802_1x_new ());
+ nm_setting_802_1x_add_eap_method (*s_8021x, "leap");
+ g_object_set (*s_8021x, NM_SETTING_802_1X_IDENTITY, username, NULL);
+
+ if (secret) {
+ nm_gconf_add_keyring_item (uuid, id,
+ NM_SETTING_802_1X_SETTING_NAME,
+ NM_SETTING_802_1X_PASSWORD,
+ secret);
+ }
+ } else {
+ /* Traditional LEAP */
+ g_object_set (s_wireless_sec,
+ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "ieee8021x",
+ NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, "leap",
+ NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME, username,
+ NULL);
+
+ if (secret) {
+ nm_gconf_add_keyring_item (uuid, id,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD,
+ secret);
+ }
+ }
+ clear_06_keyring_secret (secret);
+
+out:
+ g_free (username);
+ g_free (key_mgmt);
+ return s_wireless_sec;
+}
+
+static NMConnection *
+nm_gconf_read_0_6_wireless_connection (GConfClient *client,
+ const char *dir)
+{
+ NMConnection *connection;
+ NMSettingConnection *s_con;
+ NMSettingWireless *s_wireless;
+ NMSettingWirelessSecurity *s_wireless_sec;
+ NMSetting8021x *s_8021x = NULL;
+ GByteArray *ssid;
+ char *path, *network, *essid = NULL;
+ char *uuid, *id;
+ int timestamp, we_cipher;
+ GSList *iter;
+ GSList *bssids = NULL;
+ char *private_key_path = NULL, *client_cert_path = NULL, *ca_cert_path = NULL;
+
+ path = g_path_get_dirname (dir);
+ network = g_path_get_basename (dir);
+
+ if (!get_mandatory_string_helper (client, path, "essid", network, &essid)) {
+ g_free (path);
+ g_free (network);
+ return NULL;
+ }
+
+ if (!nm_gconf_get_int_helper (client, path, "timestamp", network, ×tamp))
+ timestamp = 0;
+ if (!nm_gconf_get_stringlist_helper (client, path, "bssids", network, &bssids))
+ bssids = NULL;
+ if (!nm_gconf_get_int_helper (client, path, "we_cipher", network, &we_cipher))
+ we_cipher = NM_AUTH_TYPE_NONE;
+
+ s_con = (NMSettingConnection *)nm_setting_connection_new ();
+ g_object_set (s_con,
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
+ NM_SETTING_CONNECTION_AUTOCONNECT, (gboolean) (timestamp != 0),
+ NM_SETTING_CONNECTION_TIMESTAMP, timestamp >= 0 ? (guint64) timestamp : 0,
+ NULL);
+
+ id = g_strdup_printf ("Auto %s", essid);
+ g_object_set (s_con, NM_SETTING_CONNECTION_ID, id, NULL);
+
+ uuid = nm_utils_uuid_generate ();
+ g_object_set (s_con, NM_SETTING_CONNECTION_UUID, uuid, NULL);
+
+ s_wireless = (NMSettingWireless *)nm_setting_wireless_new ();
+
+ ssid = g_byte_array_new ();
+ g_byte_array_append (ssid, (unsigned char *)essid, strlen (essid));
+ g_free (essid);
+ g_object_set (s_wireless,
+ NM_SETTING_WIRELESS_SSID, ssid,
+ NM_SETTING_WIRELESS_MODE, "infrastructure",
+ NULL);
+ g_byte_array_free (ssid, TRUE);
+
+ for (iter = bssids; iter; iter = iter->next)
+ nm_setting_wireless_add_seen_bssid (s_wireless, (char *) iter->data);
+ nm_utils_slist_free (bssids, g_free);
+
+ if (we_cipher != NM_AUTH_TYPE_NONE) {
+ g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL);
+
+ switch (we_cipher) {
+ case NM_AUTH_TYPE_WEP40:
+ case NM_AUTH_TYPE_WEP104:
+ s_wireless_sec = nm_gconf_read_0_6_wep_settings (client, path, network, uuid, id);
+ break;
+ case NM_AUTH_TYPE_WPA_PSK_AUTO:
+ case NM_AUTH_TYPE_WPA_PSK_TKIP:
+ case NM_AUTH_TYPE_WPA_PSK_CCMP:
+ s_wireless_sec = nm_gconf_read_0_6_wpa_settings (client, path, network, uuid, id);
+ break;
+ case NM_AUTH_TYPE_WPA_EAP:
+ s_wireless_sec = nm_gconf_read_0_6_eap_settings (client, path, network, uuid, id, &s_8021x);
+ break;
+ case NM_AUTH_TYPE_LEAP:
+ s_wireless_sec = nm_gconf_read_0_6_leap_settings (client, path, network, uuid, id, &s_8021x);
+ break;
+ default:
+ g_warning ("Unknown NM 0.6 auth type %d on connection %s", we_cipher, dir);
+ s_wireless_sec = NULL;
+ break;
+ }
+
+ if (!s_wireless_sec) {
+ g_object_unref (s_con);
+ g_object_unref (s_wireless);
+ g_free (path);
+ g_free (network);
+ return NULL;
+ }
+ } else
+ s_wireless_sec = NULL;
+
+ connection = nm_connection_new ();
+ nm_connection_add_setting (connection, (NMSetting *)s_con);
+ nm_connection_add_setting (connection, (NMSetting *)s_wireless);
+ if (s_wireless_sec)
+ nm_connection_add_setting (connection, (NMSetting *)s_wireless_sec);
+ if (s_8021x)
+ nm_connection_add_setting (connection, (NMSetting *)s_8021x);
+
+ /* Would be better in nm_gconf_read_0_6_eap_settings, except that
+ * the connection object doesn't exist at that point. Hrmph.
+ */
+ if (nm_gconf_get_string_helper (client, path, "wpa_eap_private_key_file", network, &private_key_path))
+ g_object_set_data_full (G_OBJECT (connection), NMA_PATH_PRIVATE_KEY_TAG, private_key_path, g_free);
+ if (nm_gconf_get_string_helper (client, path, "wpa_eap_client_cert_file", network, &client_cert_path))
+ g_object_set_data_full (G_OBJECT (connection), NMA_PATH_CLIENT_CERT_TAG, client_cert_path, g_free);
+ if (nm_gconf_get_string_helper (client, path, "wpa_eap_ca_cert_file", network, &ca_cert_path))
+ g_object_set_data_full (G_OBJECT (connection), NMA_PATH_CA_CERT_TAG, ca_cert_path, g_free);
+
+ g_free (path);
+ g_free (network);
+ g_free (uuid);
+ g_free (id);
+
+ return connection;
+}
+
+static void
+keyring_secret_save_cb (GnomeKeyringResult result, guint32 val, gpointer user_data)
+{
+ /* Ignore */
+}
+
+static void
+vpn_helpers_save_secret (const char *vpn_uuid,
+ const char *vpn_name,
+ const char *secret_name,
+ const char *secret,
+ const char *vpn_service_name)
+{
+ char *display_name;
+ GnomeKeyringAttributeList *attrs = NULL;
+
+ display_name = g_strdup_printf ("VPN %s secret for %s/%s/" NM_SETTING_VPN_SETTING_NAME,
+ secret_name, vpn_name, vpn_service_name);
+
+ attrs = gnome_keyring_attribute_list_new ();
+ gnome_keyring_attribute_list_append_string (attrs,
+ KEYRING_UUID_TAG,
+ vpn_uuid);
+ gnome_keyring_attribute_list_append_string (attrs,
+ KEYRING_SN_TAG,
+ NM_SETTING_VPN_SETTING_NAME);
+ gnome_keyring_attribute_list_append_string (attrs,
+ KEYRING_SK_TAG,
+ secret_name);
+
+ gnome_keyring_item_create (NULL, GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ display_name, attrs, secret, TRUE,
+ keyring_secret_save_cb, NULL, NULL);
+ gnome_keyring_attribute_list_free (attrs);
+ g_free (display_name);
+}
+
+
+#define NM_VPNC_SERVICE "org.freedesktop.NetworkManager.vpnc"
+#define VPNC_USER_PASSWORD "password"
+#define VPNC_GROUP_PASSWORD "group-password"
+#define VPNC_OLD_USER_PASSWORD "password"
+#define VPNC_OLD_GROUP_PASSWORD "group_password"
+
+static void
+nm_gconf_0_6_vpnc_settings (NMSettingVPN *s_vpn,
+ GSList *vpn_data,
+ const char *uuid,
+ const char *id)
+{
+ GSList *iter;
+ GList *found_list;
+ GnomeKeyringResult result;
+
+ for (iter = vpn_data; iter && iter->next; iter = iter->next->next) {
+ const char *key = iter->data;
+ const char *value = iter->next->data;
+
+ if (*value) {
+ /* A string value */
+ nm_setting_vpn_add_data_item (s_vpn, key, value);
+ } else {
+ /* A boolean; 0.6 treated key-without-value as "true" */
+ nm_setting_vpn_add_data_item (s_vpn, key, "yes");
+ }
+ }
+
+ /* Try to convert secrets */
+ result = gnome_keyring_find_network_password_sync (g_get_user_name (), /* user */
+ NULL, /* domain */
+ id, /* server */
+ NULL, /* object */
+ NM_VPNC_SERVICE, /* protocol */
+ NULL, /* authtype */
+ 0, /* port */
+ &found_list);
+ if ((result == GNOME_KEYRING_RESULT_OK) && g_list_length (found_list)) {
+ GnomeKeyringNetworkPasswordData *data1 = found_list->data;
+ GnomeKeyringNetworkPasswordData *data2 = NULL;
+ const char *password = NULL, *group_password = NULL;
+
+ if (g_list_next (found_list))
+ data2 = g_list_next (found_list)->data;
+
+ if (!strcmp (data1->object, VPNC_OLD_GROUP_PASSWORD))
+ group_password = data1->password;
+ else if (!strcmp (data1->object, VPNC_OLD_USER_PASSWORD))
+ password = data1->password;
+
+ if (data2) {
+ if (!strcmp (data2->object, VPNC_OLD_GROUP_PASSWORD))
+ group_password = data2->password;
+ else if (!strcmp (data2->object, VPNC_OLD_USER_PASSWORD))
+ password = data2->password;
+ }
+
+ if (password)
+ vpn_helpers_save_secret (uuid, id, VPNC_USER_PASSWORD, password, NM_VPNC_SERVICE);
+ if (group_password)
+ vpn_helpers_save_secret (uuid, id, VPNC_GROUP_PASSWORD, group_password, NM_VPNC_SERVICE);
+
+ gnome_keyring_network_password_list_free (found_list);
+ }
+}
+
+static void
+nm_gconf_0_6_openvpn_settings (NMSettingVPN *s_vpn, GSList *vpn_data)
+{
+ GSList *iter;
+
+ for (iter = vpn_data; iter && iter->next; iter = iter->next->next) {
+ const char *key = iter->data;
+ const char *value = iter->next->data;
+
+ if (!strcmp (key, "connection-type")) {
+ if (!strcmp (value, "x509"))
+ nm_setting_vpn_add_data_item (s_vpn, key, "tls");
+ else if (!strcmp (value, "shared-key"))
+ nm_setting_vpn_add_data_item (s_vpn, key, "static-key");
+ else if (!strcmp (value, "password"))
+ nm_setting_vpn_add_data_item (s_vpn, key, "password");
+ } else if (!strcmp (key, "comp-lzo")) {
+ nm_setting_vpn_add_data_item (s_vpn, key, "yes");
+ } else if (!strcmp (key, "dev")) {
+ if (!strcmp (value, "tap"))
+ nm_setting_vpn_add_data_item (s_vpn, "tap-dev", "yes");
+ } else if (!strcmp (key, "proto")) {
+ if (!strcmp (value, "tcp"))
+ nm_setting_vpn_add_data_item (s_vpn, "proto-tcp", "yes");
+ } else
+ nm_setting_vpn_add_data_item (s_vpn, key, value);
+ }
+}
+
+static void
+add_routes (NMSettingIP4Config *s_ip4, GSList *str_routes)
+{
+ GSList *iter;
+
+ for (iter = str_routes; iter; iter = g_slist_next (iter)) {
+ struct in_addr tmp;
+ char *p, *str_route;
+ long int prefix = 32;
+
+ str_route = g_strdup (iter->data);
+ p = strchr (str_route, '/');
+ if (!p || !(*(p + 1))) {
+ g_warning ("Ignoring invalid route '%s'", str_route);
+ goto next;
+ }
+
+ errno = 0;
+ prefix = strtol (p + 1, NULL, 10);
+ if (errno || prefix <= 0 || prefix > 32) {
+ g_warning ("Ignoring invalid route '%s'", str_route);
+ goto next;
+ }
+
+ /* don't pass the prefix to inet_pton() */
+ *p = '\0';
+ if (inet_pton (AF_INET, str_route, &tmp) > 0) {
+ NMIP4Route *route;
+
+ route = nm_ip4_route_new ();
+ nm_ip4_route_set_dest (route, tmp.s_addr);
+ nm_ip4_route_set_prefix (route, (guint32) prefix);
+
+ nm_setting_ip4_config_add_route (s_ip4, route);
+ nm_ip4_route_unref (route);
+ } else
+ g_warning ("Ignoring invalid route '%s'", str_route);
+
+next:
+ g_free (str_route);
+ }
+}
+
+static NMConnection *
+nm_gconf_read_0_6_vpn_connection (GConfClient *client,
+ const char *dir)
+{
+ NMConnection *connection;
+ NMSettingConnection *s_con;
+ NMSettingVPN *s_vpn;
+ NMSettingIP4Config *s_ip4 = NULL;
+ char *path, *network, *id = NULL, *uuid = NULL, *service_name = NULL;
+ GSList *str_routes = NULL, *vpn_data = NULL;
+
+ path = g_path_get_dirname (dir);
+ network = g_path_get_basename (dir);
+
+ if (!get_mandatory_string_helper (client, path, "name", network, &id)) {
+ g_free (path);
+ g_free (network);
+ return NULL;
+ }
+ if (!get_mandatory_string_helper (client, path, "service_name", network, &service_name)) {
+ g_free (id);
+ g_free (path);
+ g_free (network);
+ return NULL;
+ }
+
+ if (!nm_gconf_get_stringlist_helper (client, path, "routes", network, &str_routes))
+ str_routes = NULL;
+ if (!nm_gconf_get_stringlist_helper (client, path, "vpn_data", network, &vpn_data))
+ vpn_data = NULL;
+
+ s_con = (NMSettingConnection *)nm_setting_connection_new ();
+ g_object_set (s_con,
+ NM_SETTING_CONNECTION_ID, id,
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_VPN_SETTING_NAME,
+ NULL);
+
+ uuid = nm_utils_uuid_generate ();
+ g_object_set (s_con, NM_SETTING_CONNECTION_UUID, uuid, NULL);
+
+ s_vpn = (NMSettingVPN *)nm_setting_vpn_new ();
+ g_object_set (s_vpn, NM_SETTING_VPN_SERVICE_TYPE, service_name, NULL);
+
+ if (!strcmp (service_name, NM_VPNC_SERVICE))
+ nm_gconf_0_6_vpnc_settings (s_vpn, vpn_data, uuid, id);
+ else if (!strcmp (service_name, "org.freedesktop.NetworkManager.openvpn"))
+ nm_gconf_0_6_openvpn_settings (s_vpn, vpn_data);
+ else
+ g_warning ("unmatched service name %s\n", service_name);
+
+ nm_utils_slist_free (vpn_data, g_free);
+ g_free (path);
+ g_free (network);
+ g_free (service_name);
+
+ if (str_routes) {
+ s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ());
+ g_object_set (s_ip4, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
+ add_routes (s_ip4, str_routes);
+ }
+
+ connection = nm_connection_new ();
+ nm_connection_add_setting (connection, NM_SETTING (s_con));
+ nm_connection_add_setting (connection, NM_SETTING (s_vpn));
+ if (s_ip4)
+ nm_connection_add_setting (connection, NM_SETTING (s_ip4));
+
+ g_free (id);
+ g_free (uuid);
+
+ return connection;
+}
+
+static void
+nm_gconf_write_0_6_connection (NMConnection *connection, GConfClient *client, int n)
+{
+ char *dir;
+
+ dir = g_strdup_printf ("%s/%d", GCONF_PATH_CONNECTIONS, n);
+ nm_gconf_write_connection (connection, client, dir);
+ g_free (dir);
+}
+
+#define GCONF_PATH_0_6_WIRELESS_NETWORKS "/system/networking/wireless/networks"
+#define GCONF_PATH_0_6_VPN_CONNECTIONS "/system/networking/vpn_connections"
+
+void
+nm_gconf_migrate_0_6_connections (GConfClient *client)
+{
+ GSList *connections, *iter;
+ NMConnection *conn;
+ int n;
+
+ n = 1;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_0_6_WIRELESS_NETWORKS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ conn = nm_gconf_read_0_6_wireless_connection (client, iter->data);
+ if (conn) {
+ nm_gconf_write_0_6_connection (conn, client, n++);
+ g_object_unref (conn);
+ }
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_0_6_VPN_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ conn = nm_gconf_read_0_6_vpn_connection (client, iter->data);
+ if (conn) {
+ nm_gconf_write_0_6_connection (conn, client, n++);
+ g_object_unref (conn);
+ }
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+static void
+unset_one_setting_property (GConfClient *client,
+ const char *dir,
+ const char *setting,
+ const char *key)
+{
+ GConfValue *val;
+ char *path;
+
+ path = g_strdup_printf ("%s/%s/%s", dir, setting, key);
+ val = gconf_client_get_without_default (client, path, NULL);
+ if (val) {
+ if (val->type != GCONF_VALUE_INVALID)
+ gconf_client_unset (client, path, NULL);
+ gconf_value_free (val);
+ }
+ g_free (path);
+}
+
+static void
+copy_stringlist_to_8021x (GConfClient *client, const char *dir, const char *key)
+{
+ GSList *sa_val = NULL;
+
+ if (!nm_gconf_get_stringlist_helper (client, dir, key, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, &sa_val))
+ return;
+
+ if (!nm_gconf_set_stringlist_helper (client, dir, key, NM_SETTING_802_1X_SETTING_NAME, sa_val))
+ g_warning ("Could not convert string list value '%s' from wireless-security to 8021x setting", key);
+
+ g_slist_foreach (sa_val, (GFunc) g_free, NULL);
+ g_slist_free (sa_val);
+
+ unset_one_setting_property (client, dir, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, key);
+}
+
+static void
+copy_string_to_8021x (GConfClient *client, const char *dir, const char *key)
+{
+ char *val = NULL;
+
+ if (!nm_gconf_get_string_helper (client, dir, key, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, &val))
+ return;
+
+ if (!nm_gconf_set_string_helper (client, dir, key, NM_SETTING_802_1X_SETTING_NAME, val))
+ g_warning ("Could not convert string value '%s' from wireless-security to 8021x setting", key);
+
+ g_free (val);
+
+ unset_one_setting_property (client, dir, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, key);
+}
+
+static void
+copy_bool_to_8021x (GConfClient *client, const char *dir, const char *key)
+{
+ gboolean val;
+
+ if (!nm_gconf_get_bool_helper (client, dir, key, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, &val))
+ return;
+
+ if (val && !nm_gconf_set_bool_helper (client, dir, key, NM_SETTING_802_1X_SETTING_NAME, val))
+ g_warning ("Could not convert string value '%s' from wireless-security to 8021x setting", key);
+
+ unset_one_setting_property (client, dir, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, key);
+}
+
+static gboolean
+try_convert_leap (GConfClient *client, const char *dir, const char *uuid)
+{
+ char *val = NULL;
+ GnomeKeyringResult ret;
+ GList *found_list = NULL;
+ GnomeKeyringFound *found;
+
+ if (nm_gconf_get_string_helper (client, dir,
+ NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ &val)) {
+ /* Alredy converted */
+ g_free (val);
+ return TRUE;
+ }
+
+ if (!nm_gconf_get_string_helper (client, dir,
+ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ &val))
+ return FALSE;
+
+ if (strcmp (val, "ieee8021x")) {
+ g_free (val);
+ return FALSE;
+ }
+ g_free (val);
+ val = NULL;
+
+ if (!nm_gconf_get_string_helper (client, dir,
+ NM_SETTING_WIRELESS_SECURITY_AUTH_ALG,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ &val))
+ return FALSE;
+
+ if (strcmp (val, "leap")) {
+ g_free (val);
+ return FALSE;
+ }
+ g_free (val);
+ val = NULL;
+
+ /* Copy leap username */
+ if (!nm_gconf_get_string_helper (client, dir,
+ "identity",
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ &val))
+ return FALSE;
+
+ if (!nm_gconf_set_string_helper (client, dir,
+ NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ val))
+ g_warning ("Could not convert leap-username.");
+
+ g_free (val);
+ val = NULL;
+
+ unset_one_setting_property (client, dir, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ NM_SETTING_802_1X_IDENTITY);
+
+ if (!nm_gconf_get_string_helper (client, dir,
+ "id",
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &val))
+ goto done;
+
+ /* Copy the LEAP password */
+ ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ KEYRING_UUID_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ uuid,
+ KEYRING_SN_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ KEYRING_SK_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ "password",
+ NULL);
+ if ((ret != GNOME_KEYRING_RESULT_OK) || (g_list_length (found_list) == 0))
+ goto done;
+
+ found = (GnomeKeyringFound *) found_list->data;
+ nm_gconf_add_keyring_item (uuid,
+ val,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD,
+ found->secret);
+ gnome_keyring_item_delete_sync (found->keyring, found->item_id);
+
+done:
+ g_free (val);
+ gnome_keyring_found_list_free (found_list);
+ return TRUE;
+}
+
+static void
+copy_keyring_to_8021x (GConfClient *client,
+ const char *dir,
+ const char *uuid,
+ const char *key)
+{
+ char *name = NULL;
+ GnomeKeyringResult ret;
+ GList *found_list = NULL;
+ GnomeKeyringFound *found;
+
+ if (!nm_gconf_get_string_helper (client, dir,
+ "id",
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &name))
+ return;
+
+ /* Copy the LEAP password */
+ ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ KEYRING_UUID_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ uuid,
+ KEYRING_SN_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ KEYRING_SK_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ key,
+ NULL);
+ if ((ret != GNOME_KEYRING_RESULT_OK) || (g_list_length (found_list) == 0))
+ goto done;
+
+ found = (GnomeKeyringFound *) found_list->data;
+ nm_gconf_add_keyring_item (uuid, name, NM_SETTING_802_1X_SETTING_NAME, key, found->secret);
+
+ gnome_keyring_item_delete_sync (found->keyring, found->item_id);
+
+done:
+ g_free (name);
+ gnome_keyring_found_list_free (found_list);
+}
+
+void
+nm_gconf_migrate_0_7_wireless_security (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ char *key_mgmt = NULL;
+ GSList *eap = NULL;
+ char *uuid = NULL;
+
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ &key_mgmt))
+ goto next;
+
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &uuid))
+ goto next;
+
+ /* Only convert 802.1x-based connections */
+ if (strcmp (key_mgmt, "ieee8021x") && strcmp (key_mgmt, "wpa-eap")) {
+ g_free (key_mgmt);
+ goto next;
+ }
+ g_free (key_mgmt);
+
+ /* Leap gets converted differently */
+ if (try_convert_leap (client, iter->data, uuid))
+ goto next;
+
+ /* Otherwise straight 802.1x */
+ if (nm_gconf_get_stringlist_helper (client, iter->data,
+ NM_SETTING_802_1X_EAP,
+ NM_SETTING_802_1X_SETTING_NAME,
+ &eap)) {
+ /* Already converted */
+ g_slist_foreach (eap, (GFunc) g_free, NULL);
+ g_slist_free (eap);
+ goto next;
+ }
+
+ copy_stringlist_to_8021x (client, iter->data, NM_SETTING_802_1X_EAP);
+ copy_string_to_8021x (client, iter->data, NM_SETTING_802_1X_IDENTITY);
+ copy_string_to_8021x (client, iter->data, NM_SETTING_802_1X_ANONYMOUS_IDENTITY);
+ copy_string_to_8021x (client, iter->data, NM_SETTING_802_1X_CA_PATH);
+ copy_string_to_8021x (client, iter->data, NM_SETTING_802_1X_PHASE1_PEAPVER);
+ copy_string_to_8021x (client, iter->data, NM_SETTING_802_1X_PHASE1_PEAPLABEL);
+ copy_string_to_8021x (client, iter->data, NM_SETTING_802_1X_PHASE1_FAST_PROVISIONING);
+ copy_string_to_8021x (client, iter->data, NM_SETTING_802_1X_PHASE2_AUTH);
+ copy_string_to_8021x (client, iter->data, NM_SETTING_802_1X_PHASE2_AUTHEAP);
+ copy_string_to_8021x (client, iter->data, NM_SETTING_802_1X_PHASE2_CA_PATH);
+ copy_string_to_8021x (client, iter->data, NMA_PATH_CA_CERT_TAG);
+ copy_string_to_8021x (client, iter->data, NMA_PATH_CLIENT_CERT_TAG);
+ copy_string_to_8021x (client, iter->data, NMA_PATH_PRIVATE_KEY_TAG);
+ copy_string_to_8021x (client, iter->data, NMA_PATH_PHASE2_CA_CERT_TAG);
+ copy_string_to_8021x (client, iter->data, NMA_PATH_PHASE2_CLIENT_CERT_TAG);
+ copy_string_to_8021x (client, iter->data, NMA_PATH_PHASE2_PRIVATE_KEY_TAG);
+
+ copy_bool_to_8021x (client, iter->data, NMA_CA_CERT_IGNORE_TAG);
+ copy_bool_to_8021x (client, iter->data, NMA_PHASE2_CA_CERT_IGNORE_TAG);
+
+ copy_keyring_to_8021x (client, iter->data, uuid, NM_SETTING_802_1X_PASSWORD);
+ copy_keyring_to_8021x (client, iter->data, uuid, NM_SETTING_802_1X_PIN);
+ copy_keyring_to_8021x (client, iter->data, uuid, NM_SETTING_802_1X_PSK);
+ copy_keyring_to_8021x (client, iter->data, uuid, NMA_PRIVATE_KEY_PASSWORD_TAG);
+ copy_keyring_to_8021x (client, iter->data, uuid, NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG);
+
+next:
+ g_free (uuid);
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+void
+nm_gconf_migrate_0_7_netmask_to_prefix (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ char *id = g_path_get_basename ((const char *) iter->data);
+ GArray *array, *new;
+ int i;
+ gboolean need_update = FALSE;
+
+ if (!nm_gconf_get_uint_array_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_ADDRESSES,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ &array))
+ goto next;
+
+ new = g_array_sized_new (FALSE, TRUE, sizeof (guint32), array->len);
+ for (i = 0; i < array->len; i+=3) {
+ guint32 addr, netmask, prefix, gateway;
+
+ addr = g_array_index (array, guint32, i);
+ g_array_append_val (new, addr);
+
+ /* get the second element of the 3-number IP address tuple */
+ netmask = g_array_index (array, guint32, i + 1);
+ if (netmask > 32) {
+ /* convert it */
+ prefix = nm_utils_ip4_netmask_to_prefix (netmask);
+ g_array_append_val (new, prefix);
+ need_update = TRUE;
+ } else {
+ /* Probably already a prefix */
+ g_array_append_val (new, netmask);
+ }
+
+ gateway = g_array_index (array, guint32, i + 2);
+ g_array_append_val (new, gateway);
+ }
+
+ /* Update GConf */
+ if (need_update) {
+ nm_gconf_set_uint_array_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_ADDRESSES,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ new);
+ }
+ g_array_free (array, TRUE);
+ g_array_free (new, TRUE);
+
+next:
+ g_free (id);
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+void
+nm_gconf_migrate_0_7_ip4_method (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ char *id = g_path_get_basename ((const char *) iter->data);
+ char *method = NULL;
+
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_METHOD,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ &method))
+ goto next;
+
+ if (!strcmp (method, "autoip")) {
+ nm_gconf_set_string_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_METHOD,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL);
+ } else if (!strcmp (method, "dhcp")) {
+ nm_gconf_set_string_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_METHOD,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_METHOD_AUTO);
+ }
+
+ g_free (method);
+
+next:
+ g_free (id);
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+#define IP4_KEY_IGNORE_DHCP_DNS "ignore-dhcp-dns"
+
+void
+nm_gconf_migrate_0_7_ignore_dhcp_dns (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ gboolean ignore_auto_dns = FALSE;
+
+ if (!nm_gconf_get_bool_helper (client, iter->data,
+ IP4_KEY_IGNORE_DHCP_DNS,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ &ignore_auto_dns))
+ continue;
+
+ /* add new key with new name */
+ if (ignore_auto_dns) {
+ nm_gconf_set_bool_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_IGNORE_AUTO_DNS,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ ignore_auto_dns);
+ }
+
+ /* delete old key */
+ unset_one_setting_property (client,
+ (const char *) iter->data,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ IP4_KEY_IGNORE_DHCP_DNS);
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+static NMIP4Route *
+convert_route (const char *in_route)
+{
+ NMIP4Route *route = NULL;
+ struct in_addr tmp;
+ char *p, *str_route;
+ long int prefix = 32;
+
+ str_route = g_strdup (in_route);
+ p = strchr (str_route, '/');
+ if (!p || !(*(p + 1))) {
+ g_warning ("Ignoring invalid route '%s'", str_route);
+ goto out;
+ }
+
+ errno = 0;
+ prefix = strtol (p + 1, NULL, 10);
+ if (errno || prefix <= 0 || prefix > 32) {
+ g_warning ("Ignoring invalid route '%s'", str_route);
+ goto out;
+ }
+
+ /* don't pass the prefix to inet_pton() */
+ *p = '\0';
+ if (inet_pton (AF_INET, str_route, &tmp) <= 0) {
+ g_warning ("Ignoring invalid route '%s'", str_route);
+ goto out;
+ }
+
+ route = nm_ip4_route_new ();
+ nm_ip4_route_set_dest (route, tmp.s_addr);
+ nm_ip4_route_set_prefix (route, (guint32) prefix);
+
+out:
+ g_free (str_route);
+ return route;
+}
+
+#define VPN_KEY_ROUTES "routes"
+
+static void
+free_one_route (gpointer data, gpointer user_data)
+{
+ g_array_free ((GArray *) data, TRUE);
+}
+
+void
+nm_gconf_migrate_0_7_vpn_routes (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ GSList *old_routes = NULL, *routes_iter;
+ GPtrArray *new_routes = NULL;
+
+ if (!nm_gconf_get_stringlist_helper (client, iter->data,
+ VPN_KEY_ROUTES,
+ NM_SETTING_VPN_SETTING_NAME,
+ &old_routes))
+ continue;
+
+ /* Convert 'x.x.x.x/x' into a route structure */
+ for (routes_iter = old_routes; routes_iter; routes_iter = g_slist_next (routes_iter)) {
+ NMIP4Route *route;
+
+ route = convert_route (routes_iter->data);
+ if (route) {
+ GArray *tmp_route;
+ guint32 tmp;
+
+ if (!new_routes)
+ new_routes = g_ptr_array_sized_new (3);
+
+ tmp_route = g_array_sized_new (FALSE, TRUE, sizeof (guint32), 4);
+ tmp = nm_ip4_route_get_dest (route);
+ g_array_append_val (tmp_route, tmp);
+ tmp = nm_ip4_route_get_prefix (route);
+ g_array_append_val (tmp_route, tmp);
+ tmp = nm_ip4_route_get_next_hop (route);
+ g_array_append_val (tmp_route, tmp);
+ tmp = nm_ip4_route_get_metric (route);
+ g_array_append_val (tmp_route, tmp);
+ g_ptr_array_add (new_routes, tmp_route);
+ nm_ip4_route_unref (route);
+ }
+ }
+
+ if (new_routes) {
+ char *method = NULL;
+
+ /* Set new routes */
+ nm_gconf_set_ip4_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_ROUTES,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ 4,
+ new_routes);
+
+ g_ptr_array_foreach (new_routes, (GFunc) free_one_route, NULL);
+ g_ptr_array_free (new_routes, TRUE);
+
+ /* To make a valid ip4 setting, need a method too */
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_METHOD,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ &method)) {
+ /* If no method was specified, use 'auto' */
+ nm_gconf_set_string_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_METHOD,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ NM_SETTING_IP4_CONFIG_METHOD_AUTO);
+ }
+ g_free (method);
+ }
+
+ /* delete old key */
+ unset_one_setting_property (client,
+ (const char *) iter->data,
+ NM_SETTING_VPN_SETTING_NAME,
+ VPN_KEY_ROUTES);
+
+ g_slist_foreach (old_routes, (GFunc) g_free, NULL);
+ g_slist_free (old_routes);
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+void
+nm_gconf_migrate_0_7_vpn_properties (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ char *path;
+ GSList *properties, *props_iter;
+
+ path = g_strdup_printf ("%s/vpn-properties", (const char *) iter->data);
+ properties = gconf_client_all_entries (client, path, NULL);
+
+ for (props_iter = properties; props_iter; props_iter = props_iter->next) {
+ GConfEntry *entry = (GConfEntry *) props_iter->data;
+ char *tmp;
+ char *key_name = g_path_get_basename (entry->key);
+
+ /* 'service-type' is reserved */
+ if (!strcmp (key_name, NM_SETTING_VPN_SERVICE_TYPE))
+ goto next;
+
+ /* Don't convert the setting name */
+ if (!strcmp (key_name, NM_SETTING_NAME))
+ goto next;
+
+ switch (entry->value->type) {
+ case GCONF_VALUE_STRING:
+ tmp = (char *) gconf_value_get_string (entry->value);
+ if (tmp && strlen (tmp)) {
+ nm_gconf_set_string_helper (client, (const char *) iter->data,
+ key_name,
+ NM_SETTING_VPN_SETTING_NAME,
+ gconf_value_get_string (entry->value));
+ }
+ break;
+ case GCONF_VALUE_INT:
+ tmp = g_strdup_printf ("%d", gconf_value_get_int (entry->value));
+ nm_gconf_set_string_helper (client, (const char *) iter->data,
+ key_name,
+ NM_SETTING_VPN_SETTING_NAME,
+ tmp);
+ g_free (tmp);
+ break;
+ case GCONF_VALUE_BOOL:
+ tmp = gconf_value_get_bool (entry->value) ? "yes" : "no";
+ nm_gconf_set_string_helper (client, (const char *) iter->data,
+ key_name,
+ NM_SETTING_VPN_SETTING_NAME,
+ tmp);
+ break;
+ default:
+ g_warning ("%s: don't know how to convert type %d",
+ __func__, entry->value->type);
+ break;
+ }
+
+ next:
+ g_free (key_name);
+ gconf_entry_unref (entry);
+ }
+
+ if (properties) {
+ g_slist_free (properties);
+
+ /* delete old vpn-properties dir */
+ gconf_client_recursive_unset (client, path, 0, NULL);
+ }
+
+ g_free (path);
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+static void
+move_one_vpn_string_bool (GConfClient *client,
+ const char *path,
+ const char *old_key,
+ const char *new_key)
+{
+ char *value = NULL;
+
+ if (!nm_gconf_get_string_helper (client, path,
+ old_key,
+ NM_SETTING_VPN_SETTING_NAME,
+ &value))
+ return;
+
+ if (value && !strcmp (value, "yes")) {
+ nm_gconf_set_string_helper (client, path,
+ new_key,
+ NM_SETTING_VPN_SETTING_NAME,
+ "yes");
+ }
+ g_free (value);
+
+ /* delete old key */
+ unset_one_setting_property (client, path, NM_SETTING_VPN_SETTING_NAME, old_key);
+}
+
+static void
+move_one_vpn_string_string (GConfClient *client,
+ const char *path,
+ const char *old_key,
+ const char *new_key)
+{
+ char *value = NULL;
+
+ if (!nm_gconf_get_string_helper (client, path,
+ old_key,
+ NM_SETTING_VPN_SETTING_NAME,
+ &value))
+ return;
+
+ if (value && strlen (value)) {
+ nm_gconf_set_string_helper (client, path,
+ new_key,
+ NM_SETTING_VPN_SETTING_NAME,
+ value);
+ }
+ g_free (value);
+
+ /* delete old key */
+ unset_one_setting_property (client, path, NM_SETTING_VPN_SETTING_NAME, old_key);
+}
+
+void
+nm_gconf_migrate_0_7_openvpn_properties (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ char *old_type = NULL, *new_type = NULL, *service = NULL;
+
+ if (!nm_gconf_get_string_helper (client, (const char *) iter->data,
+ NM_SETTING_VPN_SERVICE_TYPE,
+ NM_SETTING_VPN_SETTING_NAME,
+ &service))
+ continue;
+
+ if (!service || strcmp (service, "org.freedesktop.NetworkManager.openvpn")) {
+ g_free (service);
+ continue;
+ }
+ g_free (service);
+
+ move_one_vpn_string_bool (client, iter->data, "dev", "tap-dev");
+ move_one_vpn_string_bool (client, iter->data, "proto", "proto-tcp");
+ move_one_vpn_string_string (client, iter->data, "shared-key", "static-key");
+ move_one_vpn_string_string (client, iter->data, "shared-key-direction", "static-key-direction");
+
+ if (!nm_gconf_get_string_helper (client, (const char *) iter->data,
+ "connection-type",
+ NM_SETTING_VPN_SETTING_NAME,
+ &old_type))
+ continue;
+
+ /* Convert connection type from old integer to new string */
+ if (!strcmp (old_type, "0"))
+ new_type = "tls";
+ else if (!strcmp (old_type, "1"))
+ new_type = "static-key";
+ else if (!strcmp (old_type, "2"))
+ new_type = "password";
+ else if (!strcmp (old_type, "3"))
+ new_type = "password-tls";
+ g_free (old_type);
+
+ if (new_type) {
+ nm_gconf_set_string_helper (client, (const char *) iter->data,
+ "connection-type",
+ NM_SETTING_VPN_SETTING_NAME,
+ new_type);
+ }
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+void
+nm_gconf_migrate_0_7_connection_uuid (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ char *uuid = NULL;
+
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &uuid)) {
+ /* Give the connection a UUID */
+ uuid = nm_utils_uuid_generate ();
+ nm_gconf_set_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ uuid);
+ }
+
+ g_free (uuid);
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+static void
+migrate_openvpn_secrets (const char *name, const char *uuid)
+{
+ int status;
+ GList *list = NULL;
+ GList *iter;
+
+ status = gnome_keyring_find_network_password_sync (g_get_user_name (), /* user */
+ NULL, /* domain */
+ name, /* server */
+ NULL, /* object */
+ "org.freedesktop.NetworkManager.openvpn", /* protocol */
+ NULL, /* authtype */
+ 0, /* port */
+ &list);
+ if (status != GNOME_KEYRING_RESULT_OK || !g_list_length (list))
+ return;
+
+ /* Go through all passwords and assign to appropriate variable */
+ for (iter = list; iter; iter = iter->next) {
+ GnomeKeyringNetworkPasswordData *found = iter->data;
+
+ /* Ignore session items */
+ if (strcmp (found->keyring, "session") != 0)
+ nm_gconf_add_keyring_item (uuid, name, NM_SETTING_VPN_SETTING_NAME, found->object, found->password);
+
+ gnome_keyring_item_delete_sync (found->keyring, found->item_id);
+ }
+
+ gnome_keyring_network_password_list_free (list);
+}
+
+/* Move keyring items from 'connection-id' or 'connection-name' to 'connection-uuid' */
+void
+nm_gconf_migrate_0_7_keyring_items (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ GnomeKeyringResult ret;
+ GList *found_list = NULL, *found_iter;
+ char *uuid = NULL;
+ char *old_id = NULL;
+ char *name = NULL;
+
+ /* Get the connection's UUID and name */
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &uuid))
+ goto next;
+
+ if (!nm_gconf_get_string_helper (client, iter->data,
+ NM_SETTING_CONNECTION_ID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &name))
+ goto next;
+
+ old_id = g_path_get_basename ((const char *) iter->data);
+
+ /* Move any keyring keys associated with the connection */
+ ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ "connection-id",
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ old_id,
+ NULL);
+ if (ret != GNOME_KEYRING_RESULT_OK) {
+ /* Or even older keyring items */
+ ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ "connection-name",
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ name,
+ NULL);
+ if (ret != GNOME_KEYRING_RESULT_OK)
+ goto next;
+ }
+
+ for (found_iter = found_list; found_iter; found_iter = g_list_next (found_iter)) {
+ GnomeKeyringFound *found = (GnomeKeyringFound *) found_iter->data;
+ char *setting_name = NULL;
+ char *setting_key = NULL;
+ int i;
+
+ for (i = 0; found->attributes && (i < found->attributes->len); i++) {
+ GnomeKeyringAttribute *attr;
+
+ attr = &(gnome_keyring_attribute_list_index (found->attributes, i));
+ if (!strcmp (attr->name, KEYRING_SN_TAG) && (attr->type == GNOME_KEYRING_ATTRIBUTE_TYPE_STRING)) {
+ /* Migrate old vpn-properties secrets too */
+ if (!strcmp (attr->value.string, "vpn-properties"))
+ setting_name = NM_SETTING_VPN_SETTING_NAME;
+ else
+ setting_name = attr->value.string;
+ } else if (!strcmp (attr->name, KEYRING_SK_TAG) && (attr->type == GNOME_KEYRING_ATTRIBUTE_TYPE_STRING))
+ setting_key = attr->value.string;
+ }
+
+ if (setting_name && setting_key) {
+ nm_gconf_add_keyring_item (uuid, name, setting_name, setting_key, found->secret);
+ ret = gnome_keyring_item_delete_sync (found->keyring, found->item_id);
+ }
+ }
+ gnome_keyring_found_list_free (found_list);
+
+ /* Old OpenVPN secrets have a different keyring style */
+ migrate_openvpn_secrets (name, uuid);
+
+ next:
+ g_free (name);
+ g_free (old_id);
+ g_free (uuid);
+ }
+ nm_utils_slist_free (connections, g_free);
+
+ gconf_client_suggest_sync (client, NULL);
+}
+
+void
+nm_gconf_migrate_0_7_vpn_never_default (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ /* Between 0.7.0 and 0.7.1, the 'never-default' key was added to
+ * make which connections receive the default route less complicated
+ * and more reliable. Previous to 0.7.1, a VPN connection whose
+ * server returned static routes, or for which the user had entered
+ * manual static routes, was never chosen as the default connection.
+ * With 0.7.1, all connections are candidates for the default connection
+ * unless 'never-default' is TRUE. For 0.7.0 VPN connections, try to
+ * set 'never-default' when possible. This doesn't cover all cases
+ * since we certainly don't know if the VPN server is returning
+ * any routes here, but it will work for some.
+ */
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ char *service = NULL;
+ GArray *array = NULL;
+
+ if (!nm_gconf_get_string_helper (client, (const char *) iter->data,
+ NM_SETTING_VPN_SERVICE_TYPE,
+ NM_SETTING_VPN_SETTING_NAME,
+ &service))
+ continue;
+
+ g_free (service);
+
+ /* If the user entered manual static routes, NetworkManager 0.7.0
+ * would have never set this VPN connection as the default, so
+ * set 'never-default' to TRUE.
+ */
+
+ if (!nm_gconf_get_uint_array_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_ROUTES,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ &array))
+ continue;
+
+ if (!array->len) {
+ g_array_free (array, TRUE);
+ continue;
+ }
+
+ /* Static routes found; set 'never-default' */
+ nm_gconf_set_bool_helper (client, iter->data,
+ NM_SETTING_IP4_CONFIG_NEVER_DEFAULT,
+ NM_SETTING_IP4_CONFIG_SETTING_NAME,
+ TRUE);
+ g_array_free (array, TRUE);
+ }
+ nm_utils_slist_free (connections, g_free);
+ gconf_client_suggest_sync (client, NULL);
+}
+
+void
+nm_gconf_migrate_0_7_autoconnect_default (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ /* Between 0.7.0 and 0.7.1, autoconnect was switched to TRUE by default.
+ * Since default values aren't saved in GConf to reduce clutter, when NM
+ * gets the connection from the applet, libnm-util will helpfully fill in
+ * autoconnect=TRUE, causing existing connections that used to be
+ * autoconnect=FALSE to be automatically activated.
+ */
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ gboolean autoconnect = FALSE;
+
+ if (!nm_gconf_get_bool_helper (client, (const char *) iter->data,
+ NM_SETTING_CONNECTION_AUTOCONNECT,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &autoconnect)) {
+ /* If the key wasn't present, that used to mean FALSE, but now
+ * we need to make that explicit.
+ */
+ nm_gconf_set_bool_helper (client, iter->data,
+ NM_SETTING_CONNECTION_AUTOCONNECT,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ FALSE);
+ }
+ }
+ nm_utils_slist_free (connections, g_free);
+ gconf_client_suggest_sync (client, NULL);
+}
+
+void
+nm_gconf_migrate_0_7_ca_cert_ignore (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ /* With 0.8, the applet stores the key that suppresses the nag dialog
+ * when the user elects to ignore CA certificates in a different place than
+ * the connection itself. Move the old location to the new location.
+ */
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ const char *dir = iter->data;
+ char *uuid = NULL;
+ gboolean ignore_ca_cert = FALSE;
+ gboolean ignore_phase2_ca_cert = FALSE;
+
+ if (!nm_gconf_get_string_helper (client, dir,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &uuid))
+ continue;
+
+ nm_gconf_get_bool_helper (client, dir,
+ NMA_CA_CERT_IGNORE_TAG,
+ NM_SETTING_802_1X_SETTING_NAME,
+ &ignore_ca_cert);
+ if (ignore_ca_cert)
+ nm_gconf_set_ignore_ca_cert (uuid, FALSE, TRUE);
+ /* delete old key */
+ unset_one_setting_property (client, dir,
+ NM_SETTING_802_1X_SETTING_NAME,
+ NMA_CA_CERT_IGNORE_TAG);
+
+ nm_gconf_get_bool_helper (client, dir,
+ NMA_PHASE2_CA_CERT_IGNORE_TAG,
+ NM_SETTING_802_1X_SETTING_NAME,
+ &ignore_phase2_ca_cert);
+ if (ignore_phase2_ca_cert)
+ nm_gconf_set_ignore_ca_cert (uuid, TRUE, TRUE);
+ unset_one_setting_property (client, dir,
+ NM_SETTING_802_1X_SETTING_NAME,
+ NMA_PHASE2_CA_CERT_IGNORE_TAG);
+ }
+
+ nm_utils_slist_free (connections, g_free);
+ gconf_client_suggest_sync (client, NULL);
+}
+
+static void
+copy_one_cert_value (GConfClient *client,
+ const char *dir,
+ const char *tag,
+ const char *key)
+{
+ char *path = NULL;
+
+ if (nm_gconf_get_string_helper (client, dir,
+ tag,
+ NM_SETTING_802_1X_SETTING_NAME,
+ &path)) {
+ nm_gconf_set_string_helper (client, dir, key, NM_SETTING_802_1X_SETTING_NAME, path);
+ g_free (path);
+ }
+}
+
+static void
+copy_one_private_key_password (const char *uuid,
+ const char *id,
+ const char *old_key,
+ const char *new_key)
+{
+ GnomeKeyringResult ret;
+ GList *found_list = NULL;
+
+ /* Find the secret */
+ ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ KEYRING_UUID_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ uuid,
+ KEYRING_SN_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ NM_SETTING_802_1X_SETTING_NAME,
+ KEYRING_SK_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ old_key,
+ NULL);
+ if ((ret == GNOME_KEYRING_RESULT_OK) && g_list_length (found_list)) {
+ GnomeKeyringFound *found = found_list->data;
+
+ nm_gconf_add_keyring_item (uuid,
+ id,
+ NM_SETTING_802_1X_SETTING_NAME,
+ new_key,
+ found->secret);
+ gnome_keyring_item_delete_sync (found->keyring, found->item_id);
+ gnome_keyring_found_list_free (found_list);
+ }
+}
+
+void
+nm_gconf_migrate_0_7_certs (GConfClient *client)
+{
+ GSList *connections, *iter;
+
+ /* With 0.8, the certificate/key path is stored in the value itself, not
+ * in the lookaside "nma" value.
+ */
+
+ connections = gconf_client_all_dirs (client, GCONF_PATH_CONNECTIONS, NULL);
+ for (iter = connections; iter; iter = iter->next) {
+ const char *dir = iter->data;
+ char *uuid = NULL, *id = NULL;
+
+ if (!nm_gconf_get_string_helper (client, dir,
+ NM_SETTING_CONNECTION_UUID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &uuid))
+ continue;
+
+ if (!nm_gconf_get_string_helper (client, dir,
+ NM_SETTING_CONNECTION_ID,
+ NM_SETTING_CONNECTION_SETTING_NAME,
+ &id)) {
+ g_free (uuid);
+ continue;
+ }
+
+ copy_one_cert_value (client, dir, NMA_PATH_CA_CERT_TAG, NM_SETTING_802_1X_CA_CERT);
+ copy_one_cert_value (client, dir, NMA_PATH_PHASE2_CA_CERT_TAG, NM_SETTING_802_1X_PHASE2_CA_CERT);
+ copy_one_cert_value (client, dir, NMA_PATH_CLIENT_CERT_TAG, NM_SETTING_802_1X_CLIENT_CERT);
+ copy_one_cert_value (client, dir, NMA_PATH_PHASE2_CLIENT_CERT_TAG, NM_SETTING_802_1X_PHASE2_CLIENT_CERT);
+ copy_one_cert_value (client, dir, NMA_PATH_PRIVATE_KEY_TAG, NM_SETTING_802_1X_PRIVATE_KEY);
+ copy_one_cert_value (client, dir, NMA_PATH_PHASE2_PRIVATE_KEY_TAG, NM_SETTING_802_1X_PHASE2_PRIVATE_KEY);
+
+ copy_one_private_key_password (uuid, id, NMA_PRIVATE_KEY_PASSWORD_TAG, NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD);
+ copy_one_private_key_password (uuid, id, NMA_PHASE2_PRIVATE_KEY_PASSWORD_TAG, NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD);
+
+ g_free (uuid);
+ g_free (id);
+ }
+
+ nm_utils_slist_free (connections, g_free);
+ gconf_client_suggest_sync (client, NULL);
+}
+
diff --git a/libnm-gtk/gconf-upgrade.h b/libnm-gtk/gconf-upgrade.h
new file mode 100644
index 0000000..868601c
--- /dev/null
+++ b/libnm-gtk/gconf-upgrade.h
@@ -0,0 +1,56 @@
+/* NetworkManager -- Network link manager
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2005 Red Hat, Inc.
+ */
+
+#ifndef GCONF_UPGRADE_H
+#define GCONF_UPGRADE_H
+
+#include <gconf/gconf-client.h>
+
+void nm_gconf_migrate_0_6_connections (GConfClient *client);
+
+void nm_gconf_migrate_0_7_wireless_security (GConfClient *client);
+
+void nm_gconf_migrate_0_7_keyring_items (GConfClient *client);
+
+void nm_gconf_migrate_0_7_netmask_to_prefix (GConfClient *client);
+
+void nm_gconf_migrate_0_7_ip4_method (GConfClient *client);
+
+void nm_gconf_migrate_0_7_ignore_dhcp_dns (GConfClient *client);
+
+void nm_gconf_migrate_0_7_vpn_routes (GConfClient *client);
+
+void nm_gconf_migrate_0_7_vpn_properties (GConfClient *client);
+
+void nm_gconf_migrate_0_7_openvpn_properties (GConfClient *client);
+
+void nm_gconf_migrate_0_7_connection_uuid (GConfClient *client);
+
+void nm_gconf_migrate_0_7_vpn_never_default (GConfClient *client);
+
+void nm_gconf_migrate_0_7_autoconnect_default (GConfClient *client);
+
+void nm_gconf_migrate_0_7_ca_cert_ignore (GConfClient *client);
+
+void nm_gconf_migrate_0_7_certs (GConfClient *client);
+
+#endif /* GCONF_UPGRADE_H */
+
diff --git a/libnm-gtk/libnm-gtk-gsm-device.c b/libnm-gtk/libnm-gtk-gsm-device.c
new file mode 100644
index 0000000..cd050c2
--- /dev/null
+++ b/libnm-gtk/libnm-gtk-gsm-device.c
@@ -0,0 +1,309 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+#include "libnm-gtk-gsm-device.h"
+
+#define MM_DBUS_SERVICE "org.freedesktop.ModemManager"
+#define MM_DBUS_INTERFACE_MODEM "org.freedesktop.ModemManager.Modem"
+#define MM_DBUS_INTERFACE_MODEM_GSM_CARD "org.freedesktop.ModemManager.Modem.Gsm.Card"
+
+typedef struct {
+ DBusGProxy *modem_proxy;
+ DBusGProxy *card_proxy;
+} NMGsmDevicePrivate;
+
+static void
+destroy_priv (gpointer data)
+{
+ NMGsmDevicePrivate *priv = data;
+
+ g_object_unref (priv->modem_proxy);
+ g_object_unref (priv->card_proxy);
+ g_slice_free (NMGsmDevicePrivate, data);
+}
+
+static NMGsmDevicePrivate *
+get_private (NMGsmDevice *device)
+{
+ NMGsmDevicePrivate *priv;
+
+ priv = g_object_get_data (G_OBJECT (device), "libnm-gtk-gsm-device-private");
+ if (!priv) {
+ priv = g_slice_new (NMGsmDevicePrivate);
+
+ priv->modem_proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (device)),
+ MM_DBUS_SERVICE,
+ nm_device_get_udi (NM_DEVICE (device)),
+ MM_DBUS_INTERFACE_MODEM);
+
+ priv->card_proxy = dbus_g_proxy_new_for_name (nm_object_get_connection (NM_OBJECT (device)),
+ MM_DBUS_SERVICE,
+ nm_device_get_udi (NM_DEVICE (device)),
+ MM_DBUS_INTERFACE_MODEM_GSM_CARD);
+
+ g_object_set_data_full (G_OBJECT (device), "libnm-gtk-gsm-device-private", priv, destroy_priv);
+ }
+
+ return priv;
+}
+
+#define GET_PRIVATE(o) get_private(o);
+
+static void
+modem_enable_cb (DBusGProxy *proxy,
+ DBusGProxyCall *call_id,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *result = user_data;
+ GError *error = NULL;
+
+ if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) {
+ g_simple_async_result_set_from_error (result, error);
+ g_error_free (error);
+ }
+
+ g_simple_async_result_complete (result);
+}
+
+void
+nm_gsm_device_enable (NMGsmDevice *device,
+ gboolean enabled,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ NMGsmDevicePrivate *priv;
+ GSimpleAsyncResult *result;
+
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+
+ result = g_simple_async_result_new (G_OBJECT (device), callback, user_data, nm_gsm_device_enable_finish);
+
+ priv = GET_PRIVATE (device);
+ dbus_g_proxy_begin_call (priv->modem_proxy,
+ "Enable", modem_enable_cb,
+ result, g_object_unref,
+ G_TYPE_BOOLEAN, enabled,
+ G_TYPE_INVALID);
+}
+
+gboolean
+nm_gsm_device_enable_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error)
+{
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+
+ if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error) ||
+ !g_simple_async_result_is_valid (result, G_OBJECT (device), nm_gsm_device_enable_finish))
+ return FALSE;
+
+ return TRUE;
+}
+
+static void
+modem_send_pin_cb (DBusGProxy *proxy,
+ DBusGProxyCall *call_id,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *result = user_data;
+ GError *error = NULL;
+
+ if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) {
+ g_simple_async_result_set_from_error (result, error);
+ g_error_free (error);
+ }
+
+ g_simple_async_result_complete (result);
+}
+
+void
+nm_gsm_device_send_pin (NMGsmDevice *device,
+ const char *pin,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ NMGsmDevicePrivate *priv;
+ GSimpleAsyncResult *result;
+
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+ g_return_if_fail (pin != NULL);
+
+ result = g_simple_async_result_new (G_OBJECT (device), callback, user_data, nm_gsm_device_send_pin_finish);
+
+ priv = GET_PRIVATE (device);
+ dbus_g_proxy_begin_call (priv->card_proxy,
+ "SendPin", modem_send_pin_cb,
+ result, g_object_unref,
+ G_TYPE_STRING, pin,
+ G_TYPE_INVALID);
+}
+
+gboolean
+nm_gsm_device_send_pin_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error)
+{
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+
+ if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error) ||
+ !g_simple_async_result_is_valid (result, G_OBJECT (device), nm_gsm_device_send_pin_finish))
+ return FALSE;
+
+ return TRUE;
+}
+
+static void
+modem_enable_pin_cb (DBusGProxy *proxy,
+ DBusGProxyCall *call_id,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *result = user_data;
+ GError *error = NULL;
+
+ if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_INVALID)) {
+ g_simple_async_result_set_from_error (result, error);
+ g_error_free (error);
+ }
+
+ g_simple_async_result_complete (result);
+}
+
+void
+nm_gsm_device_enable_pin (NMGsmDevice *device,
+ const char *pin,
+ gboolean enabled,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ NMGsmDevicePrivate *priv;
+ GSimpleAsyncResult *result;
+
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+ g_return_if_fail (pin != NULL);
+
+ result = g_simple_async_result_new (G_OBJECT (device), callback, user_data, nm_gsm_device_enable_pin_finish);
+
+ priv = GET_PRIVATE (device);
+ dbus_g_proxy_begin_call (priv->card_proxy,
+ "EnablePin", modem_enable_pin_cb,
+ result, g_object_unref,
+ G_TYPE_STRING, pin,
+ G_TYPE_BOOLEAN, enabled,
+ G_TYPE_INVALID);
+}
+
+gboolean
+nm_gsm_device_enable_pin_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error)
+{
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+
+ if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error) ||
+ !g_simple_async_result_is_valid (result, G_OBJECT (device), nm_gsm_device_enable_pin_finish))
+ return FALSE;
+
+ return TRUE;
+}
+
+static void
+modem_get_imei_cb (DBusGProxy *proxy,
+ DBusGProxyCall *call_id,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *result = user_data;
+ char *str = NULL;
+ GError *error = NULL;
+
+ if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_STRING, &str, G_TYPE_INVALID)) {
+ g_simple_async_result_set_from_error (result, error);
+ g_error_free (error);
+ } else
+ g_simple_async_result_set_op_res_gpointer (result, str, g_free);
+
+ g_simple_async_result_complete (result);
+}
+
+void
+nm_gsm_device_get_imei (NMGsmDevice *device,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ NMGsmDevicePrivate *priv;
+ GSimpleAsyncResult *result;
+
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+
+ result = g_simple_async_result_new (G_OBJECT (device), callback, user_data, nm_gsm_device_get_imei_finish);
+
+ priv = GET_PRIVATE (device);
+ dbus_g_proxy_begin_call (priv->card_proxy,
+ "GetImei", modem_get_imei_cb,
+ result, g_object_unref,
+ G_TYPE_INVALID);
+}
+
+char *
+nm_gsm_device_get_imei_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error)
+{
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+
+ if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error) ||
+ !g_simple_async_result_is_valid (result, G_OBJECT (device), nm_gsm_device_get_imei_finish))
+ return NULL;
+
+ return g_strdup (g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (result)));
+}
+
+static void
+modem_get_imsi_cb (DBusGProxy *proxy,
+ DBusGProxyCall *call_id,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *result = user_data;
+ char *str = NULL;
+ GError *error = NULL;
+
+ if (!dbus_g_proxy_end_call (proxy, call_id, &error, G_TYPE_STRING, &str, G_TYPE_INVALID)) {
+ g_simple_async_result_set_from_error (result, error);
+ g_error_free (error);
+ } else
+ g_simple_async_result_set_op_res_gpointer (result, str, g_free);
+
+ g_simple_async_result_complete (result);
+}
+
+void
+nm_gsm_device_get_imsi (NMGsmDevice *device,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ NMGsmDevicePrivate *priv;
+ GSimpleAsyncResult *result;
+
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+
+ result = g_simple_async_result_new (G_OBJECT (device), callback, user_data, nm_gsm_device_get_imsi_finish);
+
+ priv = GET_PRIVATE (device);
+ dbus_g_proxy_begin_call (priv->card_proxy,
+ "GetImsi", modem_get_imsi_cb,
+ result, g_object_unref,
+ G_TYPE_INVALID);
+}
+
+char *
+nm_gsm_device_get_imsi_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error)
+{
+ g_return_if_fail (NM_IS_GSM_DEVICE (device));
+
+ if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error) ||
+ !g_simple_async_result_is_valid (result, G_OBJECT (device), nm_gsm_device_get_imsi_finish))
+ return NULL;
+
+ return g_strdup (g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (result)));
+}
+
diff --git a/libnm-gtk/libnm-gtk-gsm-device.h b/libnm-gtk/libnm-gtk-gsm-device.h
new file mode 100644
index 0000000..ba47243
--- /dev/null
+++ b/libnm-gtk/libnm-gtk-gsm-device.h
@@ -0,0 +1,70 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2010 Novell, Inc.
+ */
+
+#ifndef LIBNM_GTK_GSM_DEVICE_H
+#define LIBNM_GTK_GSM_DEVICE_H
+
+#include <gio/gio.h>
+#include <nm-gsm-device.h>
+
+void nm_gsm_device_enable (NMGsmDevice *device,
+ gboolean enabled,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean nm_gsm_device_enable_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error);
+
+void nm_gsm_device_send_pin (NMGsmDevice *device,
+ const char *pin,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean nm_gsm_device_send_pin_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error);
+
+void nm_gsm_device_enable_pin (NMGsmDevice *device,
+ const char *pin,
+ gboolean enabled,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+gboolean nm_gsm_device_enable_pin_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error);
+
+void nm_gsm_device_get_imei (NMGsmDevice *device,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+char *nm_gsm_device_get_imei_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error);
+
+void nm_gsm_device_get_imsi (NMGsmDevice *device,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+char *nm_gsm_device_get_imsi_finish (NMGsmDevice *device,
+ GAsyncResult *result,
+ GError **error);
+
+#endif /* LIBNM_GTK_GSM_DEVICE_H */
diff --git a/libnm-gtk/nm-bt-item.c b/libnm-gtk/nm-bt-item.c
new file mode 100644
index 0000000..2545c89
--- /dev/null
+++ b/libnm-gtk/nm-bt-item.c
@@ -0,0 +1,87 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include "nm-bt-item.h"
+
+G_DEFINE_TYPE (NMBtItem, nm_bt_item, NM_TYPE_DEVICE_ITEM)
+
+NMListItem *
+nm_bt_item_new (NMClient *client,
+ NMDeviceBt *device,
+ NMSettingsConnectionInterface *connection)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_BT (device), NULL);
+ g_return_val_if_fail (NM_IS_SETTINGS_CONNECTION_INTERFACE (connection), NULL);
+
+ return (NMListItem *) g_object_new (NM_TYPE_BT_ITEM,
+ NM_LIST_ITEM_TYPE_NAME, _("bluetooth"),
+ NM_CONNECTION_ITEM_CLIENT, client,
+ NM_CONNECTION_ITEM_CONNECTION, connection,
+ NM_DEVICE_ITEM_DEVICE, device,
+ NULL);
+}
+
+static int
+priority (NMListItem *item)
+{
+ return NM_LIST_ITEM_PRIORITY_DEV_BT + NM_LIST_ITEM_CLASS (nm_bt_item_parent_class)->priority (item);
+}
+
+static const char *
+bt_get_hw_address (NMDeviceItem *item)
+{
+ NMDeviceBt *device;
+
+ device = NM_DEVICE_BT (nm_device_item_get_device (NM_DEVICE_ITEM (item)));
+
+ return nm_device_bt_get_hw_address (device);
+}
+
+/*****************************************************************************/
+
+static void
+notify (GObject *object, GParamSpec *spec)
+{
+ /* If the connection is removed from the item, request deletion */
+ if (spec && !g_strcmp0 (spec->name, NM_CONNECTION_ITEM_CONNECTION) &&
+ !nm_connection_item_get_connection (NM_CONNECTION_ITEM (object)))
+
+ nm_list_item_request_remove (NM_LIST_ITEM (object));
+}
+
+static void
+nm_bt_item_init (NMBtItem *self)
+{
+ g_object_set (self, NM_LIST_ITEM_ICON, "nm-device-wwan", NULL);
+}
+
+static void
+nm_bt_item_class_init (NMBtItemClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMListItemClass *list_class = NM_LIST_ITEM_CLASS (klass);
+ NMDeviceItemClass *device_class = NM_DEVICE_ITEM_CLASS (klass);
+
+ object_class->notify = notify;
+
+ list_class->priority = priority;
+ device_class->get_hw_address = bt_get_hw_address;
+}
diff --git a/libnm-gtk/nm-bt-item.h b/libnm-gtk/nm-bt-item.h
new file mode 100644
index 0000000..87a672a
--- /dev/null
+++ b/libnm-gtk/nm-bt-item.h
@@ -0,0 +1,52 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_BT_ITEM_H
+#define NM_BT_ITEM_H
+
+#include <glib-object.h>
+#include <nm-device-bt.h>
+#include <nm-device-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_BT_ITEM (nm_bt_item_get_type ())
+#define NM_BT_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_BT_ITEM, NMBtItem))
+#define NM_BT_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_BT_ITEM, NMBtItemClass))
+#define NM_IS_BT_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_BT_ITEM))
+#define NM_IS_BT_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_BT_ITEM))
+#define NM_BT_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_BT_ITEM, NMBtItemClass))
+
+typedef struct {
+ NMDeviceItem parent;
+} NMBtItem;
+
+typedef struct {
+ NMDeviceItemClass parent_class;
+} NMBtItemClass;
+
+GType nm_bt_item_get_type (void);
+
+NMListItem *nm_bt_item_new (NMClient *client,
+ NMDeviceBt *device,
+ NMSettingsConnectionInterface *connection);
+
+G_END_DECLS
+
+#endif /* NM_BT_ITEM_H */
diff --git a/libnm-gtk/nm-bt-provider.c b/libnm-gtk/nm-bt-provider.c
new file mode 100644
index 0000000..11a0dcb
--- /dev/null
+++ b/libnm-gtk/nm-bt-provider.c
@@ -0,0 +1,71 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-bt-provider.h"
+#include "nm-bt-item.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NMBtProvider, nm_bt_provider, NM_TYPE_DEVICE_PROVIDER)
+
+NMItemProvider *
+nm_bt_provider_new (NMClient *client,
+ NMDeviceBt *device)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_BT (device), NULL);
+
+ return (NMItemProvider *) g_object_new (NM_TYPE_BT_PROVIDER,
+ NM_ITEM_PROVIDER_CLIENT, client,
+ NM_DEVICE_PROVIDER_DEVICE, device,
+ NULL);
+}
+
+static void
+bt_added (NMItemProvider *provider,
+ NMSettingsConnectionInterface *connection)
+{
+ NMDeviceProvider *device_provider = NM_DEVICE_PROVIDER (provider);
+ NMDevice *device;
+
+ if (!nm_device_provider_ready (device_provider))
+ return;
+
+ device = nm_device_provider_get_device (device_provider);
+ if (utils_connection_valid_for_device (NM_CONNECTION (connection), device, NULL)) {
+ NMListItem *item;
+
+ item = nm_bt_item_new (nm_item_provider_get_client (provider), NM_DEVICE_BT (device), connection);
+ nm_item_provider_item_added (provider, item);
+ }
+}
+
+/*****************************************************************************/
+
+static void
+nm_bt_provider_init (NMBtProvider *self)
+{
+}
+
+static void
+nm_bt_provider_class_init (NMBtProviderClass *klass)
+{
+ NMItemProviderClass *item_class = NM_ITEM_PROVIDER_CLASS (klass);
+
+ item_class->connection_added = bt_added;
+}
diff --git a/libnm-gtk/nm-bt-provider.h b/libnm-gtk/nm-bt-provider.h
new file mode 100644
index 0000000..dcde2d3
--- /dev/null
+++ b/libnm-gtk/nm-bt-provider.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_BT_PROVIDER_H
+#define NM_BT_PROVIDER_H
+
+#include <glib-object.h>
+#include <nm-device-bt.h>
+#include <nm-device-provider.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_BT_PROVIDER (nm_bt_provider_get_type ())
+#define NM_BT_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_BT_PROVIDER, NMBtProvider))
+#define NM_BT_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_BT_PROVIDER, NMBtProviderClass))
+#define NM_IS_BT_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_BT_PROVIDER))
+#define NM_IS_BT_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_BT_PROVIDER))
+#define NM_BT_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_BT_PROVIDER, NMBtProviderClass))
+
+typedef struct {
+ NMDeviceProvider parent;
+} NMBtProvider;
+
+typedef struct {
+ NMDeviceProviderClass parent_class;
+} NMBtProviderClass;
+
+GType nm_bt_provider_get_type (void);
+
+NMItemProvider *nm_bt_provider_new (NMClient *client,
+ NMDeviceBt *device);
+
+G_END_DECLS
+
+#endif /* NM_BT_PROVIDER_H */
diff --git a/libnm-gtk/nm-cdma-item.c b/libnm-gtk/nm-cdma-item.c
new file mode 100644
index 0000000..8e479a5
--- /dev/null
+++ b/libnm-gtk/nm-cdma-item.c
@@ -0,0 +1,76 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <nm-setting-8021x.h>
+#include "nm-cdma-item.h"
+
+G_DEFINE_TYPE (NMCdmaItem, nm_cdma_item, NM_TYPE_DEVICE_ITEM)
+
+NMListItem *
+nm_cdma_item_new (NMClient *client,
+ NMCdmaDevice *device,
+ NMSettingsConnectionInterface *connection)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_CDMA_DEVICE (device), NULL);
+ g_return_val_if_fail (NM_IS_SETTINGS_CONNECTION_INTERFACE (connection), NULL);
+
+ return (NMListItem *) g_object_new (NM_TYPE_CDMA_ITEM,
+ NM_LIST_ITEM_TYPE_NAME, _("3G"),
+ NM_CONNECTION_ITEM_CLIENT, client,
+ NM_CONNECTION_ITEM_CONNECTION, connection,
+ NM_DEVICE_ITEM_DEVICE, device,
+ NULL);
+}
+
+static int
+priority (NMListItem *item)
+{
+ return NM_LIST_ITEM_PRIORITY_DEV_CDMA + NM_LIST_ITEM_CLASS (nm_cdma_item_parent_class)->priority (item);
+}
+
+/*****************************************************************************/
+
+static void
+notify (GObject *object, GParamSpec *spec)
+{
+ /* If the connection is removed from the item, request deletion */
+ if (spec && !g_strcmp0 (spec->name, NM_CONNECTION_ITEM_CONNECTION) &&
+ !nm_connection_item_get_connection (NM_CONNECTION_ITEM (object)))
+
+ nm_list_item_request_remove (NM_LIST_ITEM (object));
+}
+
+static void
+nm_cdma_item_init (NMCdmaItem *self)
+{
+ g_object_set (self, NM_LIST_ITEM_ICON, "nm-device-wwan", NULL);
+}
+
+static void
+nm_cdma_item_class_init (NMCdmaItemClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMListItemClass *list_class = NM_LIST_ITEM_CLASS (klass);
+
+ object_class->notify = notify;
+
+ list_class->priority = priority;
+}
diff --git a/libnm-gtk/nm-cdma-item.h b/libnm-gtk/nm-cdma-item.h
new file mode 100644
index 0000000..f58ed70
--- /dev/null
+++ b/libnm-gtk/nm-cdma-item.h
@@ -0,0 +1,52 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_CDMA_ITEM_H
+#define NM_CDMA_ITEM_H
+
+#include <glib-object.h>
+#include <nm-cdma-device.h>
+#include <nm-device-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_CDMA_ITEM (nm_cdma_item_get_type ())
+#define NM_CDMA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CDMA_ITEM, NMCdmaItem))
+#define NM_CDMA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_CDMA_ITEM, NMCdmaItemClass))
+#define NM_IS_CDMA_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CDMA_ITEM))
+#define NM_IS_CDMA_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_CDMA_ITEM))
+#define NM_CDMA_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CDMA_ITEM, NMCdmaItemClass))
+
+typedef struct {
+ NMDeviceItem parent;
+} NMCdmaItem;
+
+typedef struct {
+ NMDeviceItemClass parent_class;
+} NMCdmaItemClass;
+
+GType nm_cdma_item_get_type (void);
+
+NMListItem *nm_cdma_item_new (NMClient *client,
+ NMCdmaDevice *device,
+ NMSettingsConnectionInterface *connection);
+
+G_END_DECLS
+
+#endif /* NM_CDMA_ITEM_H */
diff --git a/libnm-gtk/nm-cdma-provider.c b/libnm-gtk/nm-cdma-provider.c
new file mode 100644
index 0000000..f3bc4d8
--- /dev/null
+++ b/libnm-gtk/nm-cdma-provider.c
@@ -0,0 +1,71 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-cdma-provider.h"
+#include "nm-cdma-item.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NMCdmaProvider, nm_cdma_provider, NM_TYPE_DEVICE_PROVIDER)
+
+NMItemProvider *
+nm_cdma_provider_new (NMClient *client,
+ NMCdmaDevice *device)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_CDMA_DEVICE (device), NULL);
+
+ return (NMItemProvider *) g_object_new (NM_TYPE_CDMA_PROVIDER,
+ NM_ITEM_PROVIDER_CLIENT, client,
+ NM_DEVICE_PROVIDER_DEVICE, device,
+ NULL);
+}
+
+static void
+cdma_added (NMItemProvider *provider,
+ NMSettingsConnectionInterface *connection)
+{
+ NMDeviceProvider *device_provider = NM_DEVICE_PROVIDER (provider);
+ NMDevice *device;
+
+ if (!nm_device_provider_ready (device_provider))
+ return;
+
+ device = nm_device_provider_get_device (device_provider);
+ if (utils_connection_valid_for_device (NM_CONNECTION (connection), device, NULL)) {
+ NMListItem *item;
+
+ item = nm_cdma_item_new (nm_item_provider_get_client (provider), NM_CDMA_DEVICE (device), connection);
+ nm_item_provider_item_added (provider, item);
+ }
+}
+
+/*****************************************************************************/
+
+static void
+nm_cdma_provider_init (NMCdmaProvider *self)
+{
+}
+
+static void
+nm_cdma_provider_class_init (NMCdmaProviderClass *klass)
+{
+ NMItemProviderClass *item_class = NM_ITEM_PROVIDER_CLASS (klass);
+
+ item_class->connection_added = cdma_added;
+}
diff --git a/libnm-gtk/nm-cdma-provider.h b/libnm-gtk/nm-cdma-provider.h
new file mode 100644
index 0000000..57f9d81
--- /dev/null
+++ b/libnm-gtk/nm-cdma-provider.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_CDMA_PROVIDER_H
+#define NM_CDMA_PROVIDER_H
+
+#include <glib-object.h>
+#include <nm-cdma-device.h>
+#include <nm-device-provider.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_CDMA_PROVIDER (nm_cdma_provider_get_type ())
+#define NM_CDMA_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CDMA_PROVIDER, NMCdmaProvider))
+#define NM_CDMA_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_CDMA_PROVIDER, NMCdmaProviderClass))
+#define NM_IS_CDMA_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CDMA_PROVIDER))
+#define NM_IS_CDMA_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_CDMA_PROVIDER))
+#define NM_CDMA_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CDMA_PROVIDER, NMCdmaProviderClass))
+
+typedef struct {
+ NMDeviceProvider parent;
+} NMCdmaProvider;
+
+typedef struct {
+ NMDeviceProviderClass parent_class;
+} NMCdmaProviderClass;
+
+GType nm_cdma_provider_get_type (void);
+
+NMItemProvider *nm_cdma_provider_new (NMClient *client,
+ NMCdmaDevice *device);
+
+G_END_DECLS
+
+#endif /* NM_CDMA_PROVIDER_H */
diff --git a/libnm-gtk/nm-connection-item.c b/libnm-gtk/nm-connection-item.c
new file mode 100644
index 0000000..023d93d
--- /dev/null
+++ b/libnm-gtk/nm-connection-item.c
@@ -0,0 +1,568 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <string.h>
+#include <glib/gi18n.h>
+#include <nm-settings-interface.h>
+#include <nm-setting-connection.h>
+#include <nm-settings-connection-interface.h>
+#include <nm-active-connection.h>
+#include <nm-utils.h>
+#include "nm-connection-item.h"
+#include "gconf-helpers.h"
+
+G_DEFINE_TYPE (NMConnectionItem, nm_connection_item, NM_TYPE_LIST_ITEM)
+
+enum {
+ PROP_0,
+ PROP_CLIENT,
+ PROP_CONNECTION,
+ PROP_DELETE_ALLOWED,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_CONNECTION_ITEM, NMConnectionItemPrivate))
+
+typedef struct {
+ NMClient *client;
+ NMSettingsConnectionInterface *connection;
+ NMActiveConnection *ac;
+ gboolean delete_allowed;
+ gboolean connect_pending;
+
+ gulong secrets_requested_id;
+ gulong removed_id;
+ gulong updated_id;
+ gulong acs_changed_id;
+ gulong ac_state_changed_id;
+
+ gboolean disposed;
+} NMConnectionItemPrivate;
+
+NMClient *
+nm_connection_item_get_client (NMConnectionItem *self)
+{
+ g_return_val_if_fail (NM_IS_CONNECTION_ITEM (self), NULL);
+
+ return GET_PRIVATE (self)->client;
+}
+
+NMSettingsConnectionInterface *
+nm_connection_item_get_connection (NMConnectionItem *self)
+{
+ g_return_val_if_fail (NM_IS_CONNECTION_ITEM (self), NULL);
+
+ return GET_PRIVATE (self)->connection;
+}
+
+static void
+secrets_requested (NMGConfConnection *connection,
+ const char *setting_name,
+ const char **hints,
+ gboolean ask_user,
+ NMNewSecretsRequestedFunc callback,
+ gpointer callback_data,
+ gpointer user_data)
+{
+ NMConnectionItem *self = NM_CONNECTION_ITEM (user_data);
+
+ if (NM_CONNECTION_ITEM_GET_CLASS (self)->secrets_requested)
+ NM_CONNECTION_ITEM_GET_CLASS (self)->secrets_requested (self,
+ (NMConnection *) connection,
+ setting_name, hints,
+ ask_user, callback, callback_data);
+ else {
+ GError *error;
+
+ error = g_error_new_literal (NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
+ "No secrets providers registered");
+
+ callback (NM_SETTINGS_CONNECTION_INTERFACE (connection), NULL, error, callback_data);
+ g_error_free (error);
+ }
+}
+
+static void
+connection_removed (NMSettingsConnectionInterface *connection,
+ gpointer data)
+{
+ nm_connection_item_set_connection (NM_CONNECTION_ITEM (data), NULL);
+}
+
+static gboolean
+connection_update_id (NMConnectionItem *self)
+{
+ NMConnection *connection;
+ const char *id;
+
+ connection = (NMConnection *) nm_connection_item_get_connection (self);
+ if (connection) {
+ NMSettingConnection *s_con;
+
+ s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ id = nm_setting_connection_get_id (s_con);
+ } else
+ id = NULL;
+
+ g_object_set (self, NM_LIST_ITEM_NAME, id, NULL);
+
+ return FALSE;
+}
+
+static void
+connection_updated (NMSettingsConnectionInterface *connection,
+ GHashTable *new_settings,
+ gpointer data)
+{
+ /* Delay the update: This callback gets called as a response to DBus signal handler
+ and changing the connection item here will much likely initiate some DBus calls
+ as well, causing reentrance issues. */
+ g_idle_add ((GSourceFunc) connection_update_id, data);
+}
+
+static void
+ac_state_changed (NMActiveConnection *ac,
+ GParamSpec *pspec,
+ gpointer user_data)
+{
+ NMListItem *item = NM_LIST_ITEM (user_data);
+ NMListItemStatus status;
+
+ if (ac) {
+ switch (nm_active_connection_get_state (ac)) {
+ case NM_ACTIVE_CONNECTION_STATE_ACTIVATED:
+ status = NM_LIST_ITEM_STATUS_CONNECTED;
+ break;
+ case NM_ACTIVE_CONNECTION_STATE_ACTIVATING:
+ status = NM_LIST_ITEM_STATUS_CONNECTING;
+ break;
+ default:
+ status = NM_LIST_ITEM_STATUS_DISCONNECTED;
+ break;
+ }
+ } else
+ status = NM_LIST_ITEM_STATUS_DISCONNECTED;
+
+ if (status != nm_list_item_get_status (item))
+ g_object_set (G_OBJECT (item), NM_LIST_ITEM_STATUS, status, NULL);
+}
+
+static void
+set_active_connection (NMConnectionItem *self,
+ NMActiveConnection *ac)
+{
+ NMConnectionItemPrivate *priv = GET_PRIVATE (self);
+
+ if (priv->ac) {
+ g_signal_handler_disconnect (priv->ac, priv->ac_state_changed_id);
+ g_object_unref (priv->ac);
+ }
+
+ if (ac) {
+ priv->ac = g_object_ref (ac);
+ priv->ac_state_changed_id = g_signal_connect (priv->ac, "notify::" NM_ACTIVE_CONNECTION_STATE,
+ G_CALLBACK (ac_state_changed), self);
+ } else {
+ priv->ac_state_changed_id = 0;
+ priv->ac = NULL;
+ }
+
+ ac_state_changed (ac, NULL, self);
+}
+
+static void
+active_connections_changed (NMClient *client,
+ GParamSpec *pspec,
+ gpointer user_data)
+{
+ NMConnectionItem *self = NM_CONNECTION_ITEM (user_data);
+ NMConnectionItemPrivate *priv = GET_PRIVATE (self);
+ NMConnection *connection;
+ const GPtrArray *acs;
+ const char *path;
+ NMActiveConnection *ac = NULL;
+ NMConnectionScope scope;
+ int i;
+
+ if (!priv->connection)
+ return;
+
+ connection = NM_CONNECTION (nm_connection_item_get_connection (self));
+ path = nm_connection_get_path (connection);
+ scope = nm_connection_get_scope (connection);
+
+ acs = nm_client_get_active_connections (client);
+ for (i = 0; acs && i < acs->len; i++) {
+ ac = g_ptr_array_index (acs, i);
+
+ if (scope == nm_active_connection_get_scope (ac) && !strcmp (path, nm_active_connection_get_connection (ac)))
+ break;
+
+ ac = NULL;
+ }
+
+ set_active_connection (self, ac);
+}
+
+static gboolean
+idle_connect (gpointer data)
+{
+ nm_list_item_connect (NM_LIST_ITEM (data));
+
+ return FALSE;
+}
+
+void
+nm_connection_item_set_connection (NMConnectionItem *self,
+ NMSettingsConnectionInterface *connection)
+{
+ NMConnectionItemPrivate *priv;
+ gboolean show_delete;
+
+ g_return_if_fail (NM_IS_CONNECTION_ITEM (self));
+
+ priv = GET_PRIVATE (self);
+
+ if (priv->connection) {
+ set_active_connection (self, NULL);
+ g_signal_handler_disconnect (priv->connection, priv->secrets_requested_id);
+ g_signal_handler_disconnect (priv->connection, priv->removed_id);
+ g_signal_handler_disconnect (priv->connection, priv->updated_id);
+ g_signal_handler_disconnect (priv->client, priv->acs_changed_id);
+ g_object_unref (priv->connection);
+ }
+
+ if (connection) {
+ priv->connection = g_object_ref (connection);
+
+ if (NM_IS_GCONF_CONNECTION (connection))
+ priv->secrets_requested_id = g_signal_connect (connection,
+ "new-secrets-requested",
+ G_CALLBACK (secrets_requested),
+ self);
+
+ priv->removed_id = g_signal_connect (connection, "removed", G_CALLBACK (connection_removed), self);
+ priv->updated_id = g_signal_connect (connection, "updated", G_CALLBACK (connection_updated), self);
+ connection_update_id (self);
+
+ priv->acs_changed_id = g_signal_connect (priv->client, "notify::" NM_CLIENT_ACTIVE_CONNECTIONS,
+ G_CALLBACK (active_connections_changed), self);
+ active_connections_changed (priv->client, NULL, self);
+ } else {
+ priv->secrets_requested_id = 0;
+ priv->removed_id = 0;
+ priv->updated_id = 0;
+ priv->acs_changed_id = 0;
+ priv->connection = NULL;
+ }
+
+ g_object_notify (G_OBJECT (self), NM_CONNECTION_ITEM_CONNECTION);
+
+ if (priv->delete_allowed && connection != NULL)
+ show_delete = TRUE;
+ else
+ show_delete = FALSE;
+
+ g_object_set (G_OBJECT (self), NM_LIST_ITEM_SHOW_DELETE, show_delete, NULL);
+
+ if (priv->connect_pending) {
+ priv->connect_pending = FALSE;
+
+ if (connection)
+ idle_connect (self);
+ }
+}
+
+void
+nm_connection_item_new_connection (NMConnectionItem *self,
+ NMConnection *connection,
+ gboolean connect)
+{
+ g_return_if_fail (NM_IS_CONNECTION_ITEM (self));
+ g_return_if_fail (NM_IS_CONNECTION (connection));
+
+ if (connect)
+ GET_PRIVATE (self)->connect_pending = TRUE;
+
+ nm_gconf_write_connection (connection, NULL, NULL);
+}
+
+static void
+create_connection_secrets_received (NMSettingsConnectionInterface *connection,
+ GHashTable *settings,
+ GError *error,
+ gpointer user_data)
+{
+ GSimpleAsyncResult *result = user_data;
+
+ if (error)
+ g_simple_async_result_set_from_error (result, error);
+ else {
+ /* Create a duplicate of the connection - otherwise we'll loose the secrets as soon as
+ this function returns */
+ g_simple_async_result_set_op_res_gpointer (result,
+ nm_connection_duplicate (NM_CONNECTION (connection)),
+ g_object_unref);
+
+ g_object_unref (connection);
+ }
+
+ g_simple_async_result_complete_in_idle (result);
+ g_object_unref (result);
+}
+
+void
+nm_connection_item_create_connection (NMConnectionItem *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ NMConnection *connection;
+ GSimpleAsyncResult *result;
+
+ g_return_if_fail (NM_IS_CONNECTION_ITEM (self));
+
+ if (NM_CONNECTION_ITEM_GET_CLASS (self)->create_connection)
+ connection = NM_CONNECTION_ITEM_GET_CLASS (self)->create_connection (self);
+ else
+ connection = NULL;
+
+ if (connection) {
+ const char *setting_name;
+ GPtrArray *hints_array = NULL;
+
+ result = g_simple_async_result_new (G_OBJECT (self), callback, user_data,
+ nm_connection_item_create_connection_finish);
+
+ setting_name = nm_connection_need_secrets (connection, &hints_array);
+ if (hints_array)
+ /* Hints are for weaks, bah. */
+ g_ptr_array_free (hints_array, TRUE);
+
+ if (setting_name)
+ secrets_requested ((NMGConfConnection *) connection, setting_name, NULL, TRUE,
+ create_connection_secrets_received, result, self);
+ else {
+ /* No extra secrets needed, we're done */
+ g_simple_async_result_set_op_res_gpointer (result, connection, g_object_unref);
+ g_simple_async_result_complete_in_idle (result);
+ }
+ } else {
+ result = g_simple_async_result_new_error (G_OBJECT (self), callback, user_data,
+ 0, 0, "%s", "Could not create the new connection");
+ g_simple_async_result_complete_in_idle (result);
+ }
+}
+
+NMConnection *
+nm_connection_item_create_connection_finish (NMConnectionItem *self,
+ GAsyncResult *result,
+ GError **error)
+{
+ NMConnection *connection;
+
+ g_return_val_if_fail (NM_IS_CONNECTION_ITEM (self), NULL);
+
+ if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error) ||
+ !g_simple_async_result_is_valid (result, G_OBJECT (self), nm_connection_item_create_connection_finish))
+ return NULL;
+
+ connection = (NMConnection *) g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (result));
+ if (connection)
+ g_object_ref (connection);
+
+ return connection;
+}
+
+static void
+delete_cb (NMSettingsConnectionInterface *connection,
+ GError *error,
+ gpointer user_data)
+{
+ if (error) {
+ char *msg;
+
+ msg = g_strdup_printf (_("Could not delete connection: %s"), error->message);
+ nm_list_item_warning (NM_LIST_ITEM (user_data), msg);
+ g_free (msg);
+ }
+}
+
+static void
+do_delete (NMListItem *item)
+{
+ NMConnectionItemPrivate *priv = GET_PRIVATE (item);
+
+ if (priv->connection && priv->delete_allowed)
+ nm_settings_connection_interface_delete (priv->connection, delete_cb, item);
+}
+
+static int
+priority (NMListItem *item)
+{
+ NMConnectionItemPrivate *priv = GET_PRIVATE (item);
+ int priority = 0;
+
+ if (priv->ac && nm_active_connection_get_state (priv->ac) == NM_ACTIVE_CONNECTION_STATE_ACTIVATED) {
+ if (nm_active_connection_get_default (priv->ac))
+ priority += NM_LIST_ITEM_PRIORITY_DEFAULT_ROUTE;
+
+ priority += NM_LIST_ITEM_PRIORITY_ACTIVATED;
+ }
+
+ if (priv->connection)
+ priority += NM_LIST_ITEM_PRIORITY_CONFIGURED;
+
+ priority += NM_LIST_ITEM_CLASS (nm_connection_item_parent_class)->priority (item);
+
+ return priority;
+}
+
+static NMConnection *
+create_connection (NMConnectionItem *self)
+{
+ NMConnection *connection;
+ NMSetting *setting;
+ char *id;
+
+ connection = nm_connection_new ();
+
+ setting = nm_setting_connection_new ();
+ id = nm_utils_uuid_generate ();
+ g_object_set (setting, NM_SETTING_CONNECTION_UUID, id, NULL);
+ g_free (id);
+
+ nm_connection_add_setting (connection, setting);
+
+ return connection;
+}
+
+/*****************************************************************************/
+
+static void
+nm_connection_item_init (NMConnectionItem *self)
+{
+ NMConnectionItemPrivate *priv = GET_PRIVATE (self);
+
+ priv->delete_allowed = TRUE;
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMConnectionItemPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ /* Construct only */
+ priv->client = g_value_dup_object (value);
+ break;
+ case PROP_CONNECTION:
+ nm_connection_item_set_connection (NM_CONNECTION_ITEM (object), g_value_get_object (value));
+ break;
+ case PROP_DELETE_ALLOWED:
+ priv->delete_allowed = g_value_get_boolean (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMConnectionItem *self = NM_CONNECTION_ITEM (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ g_value_set_object (value, GET_PRIVATE (self)->client);
+ break;
+ case PROP_CONNECTION:
+ g_value_set_object (value, nm_connection_item_get_connection (self));
+ break;
+ case PROP_DELETE_ALLOWED:
+ g_value_set_boolean (value, GET_PRIVATE (self)->delete_allowed);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NMConnectionItem *self = NM_CONNECTION_ITEM (object);
+ NMConnectionItemPrivate *priv = GET_PRIVATE (self);
+
+ if (!priv->disposed) {
+ nm_connection_item_set_connection (self, NULL);
+ g_object_unref (priv->client);
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_connection_item_parent_class)->dispose (object);
+}
+
+static void
+nm_connection_item_class_init (NMConnectionItemClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMListItemClass *list_class = NM_LIST_ITEM_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMConnectionItemPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ list_class->delete = do_delete;
+ list_class->priority = priority;
+
+ klass->create_connection = create_connection;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_CLIENT,
+ g_param_spec_object (NM_CONNECTION_ITEM_CLIENT,
+ "NMClient",
+ "NMClient",
+ NM_TYPE_CLIENT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property
+ (object_class, PROP_CONNECTION,
+ g_param_spec_object (NM_CONNECTION_ITEM_CONNECTION,
+ "Connection",
+ "Connection",
+ NM_TYPE_SETTINGS_CONNECTION_INTERFACE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property
+ (object_class, PROP_DELETE_ALLOWED,
+ g_param_spec_boolean (NM_CONNECTION_ITEM_DELETE_ALLOWED,
+ "delete allowed",
+ "delete allowed",
+ TRUE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+}
diff --git a/libnm-gtk/nm-connection-item.h b/libnm-gtk/nm-connection-item.h
new file mode 100644
index 0000000..b949bfb
--- /dev/null
+++ b/libnm-gtk/nm-connection-item.h
@@ -0,0 +1,82 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_CONNECTION_ITEM_H
+#define NM_CONNECTION_ITEM_H
+
+#include <glib-object.h>
+#include <gio/gio.h>
+#include <nm-client.h>
+#include <nm-settings-connection-interface.h>
+#include <nm-list-item.h>
+#include <nm-gconf-connection.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_CONNECTION_ITEM (nm_connection_item_get_type ())
+#define NM_CONNECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION_ITEM, NMConnectionItem))
+#define NM_CONNECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_CONNECTION_ITEM, NMConnectionItemClass))
+#define NM_IS_CONNECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTION_ITEM))
+#define NM_IS_CONNECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_CONNECTION_ITEM))
+#define NM_CONNECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CONNECTION_ITEM, NMConnectionItemClass))
+
+#define NM_CONNECTION_ITEM_CLIENT "client"
+#define NM_CONNECTION_ITEM_CONNECTION "connection"
+#define NM_CONNECTION_ITEM_DELETE_ALLOWED "delete-allowed"
+
+typedef struct {
+ NMListItem parent;
+} NMConnectionItem;
+
+typedef struct {
+ NMListItemClass parent_class;
+
+ void (*secrets_requested) (NMConnectionItem *self,
+ NMConnection *connection,
+ const char *setting_name,
+ const char **hints,
+ gboolean ask_user,
+ NMNewSecretsRequestedFunc callback,
+ gpointer callback_data);
+
+ NMConnection *(*create_connection) (NMConnectionItem *self);
+} NMConnectionItemClass;
+
+GType nm_connection_item_get_type (void);
+
+NMClient *nm_connection_item_get_client (NMConnectionItem *self);
+NMSettingsConnectionInterface *nm_connection_item_get_connection (NMConnectionItem *self);
+void nm_connection_item_set_connection (NMConnectionItem *self,
+ NMSettingsConnectionInterface *connection);
+
+void nm_connection_item_new_connection (NMConnectionItem *self,
+ NMConnection *connection,
+ gboolean connect);
+
+void nm_connection_item_create_connection (NMConnectionItem *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+
+NMConnection *nm_connection_item_create_connection_finish (NMConnectionItem *self,
+ GAsyncResult *result,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* NM_CONNECTION_ITEM_H */
diff --git a/libnm-gtk/nm-connection-list.c b/libnm-gtk/nm-connection-list.c
new file mode 100644
index 0000000..0db5a7b
--- /dev/null
+++ b/libnm-gtk/nm-connection-list.c
@@ -0,0 +1,263 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-connection-list.h"
+
+G_DEFINE_TYPE (NMConnectionList, nm_connection_list, GTK_TYPE_LIST_STORE)
+
+enum {
+ PROP_0,
+ PROP_CLIENT,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_CONNECTION_LIST, NMConnectionListPrivate))
+
+typedef struct {
+ NMClient *client;
+ GSList *settings;
+
+ gboolean disposed;
+} NMConnectionListPrivate;
+
+GtkTreeModel *
+nm_connection_list_new (NMClient *client)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+
+ return (GtkTreeModel *) g_object_new (NM_TYPE_CONNECTION_LIST,
+ NM_CONNECTION_LIST_CLIENT, client,
+ NULL);
+}
+
+/* Connection handling */
+
+static void
+connection_updated (NMSettingsConnectionInterface *connection,
+ GHashTable *new_settings,
+ gpointer data)
+{
+}
+
+static void
+connection_removed (NMSettingsConnectionInterface *connection,
+ gpointer data)
+{
+ g_signal_handlers_disconnect_matched (connection, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, data);
+}
+
+static void
+connection_added (NMSettingsInterface *settings,
+ NMSettingsConnectionInterface *connection,
+ gpointer data)
+{
+ g_signal_connect (connection, "updated", G_CALLBACK (connection_updated), data);
+ g_signal_connect (connection, "removed", G_CALLBACK (connection_removed), data);
+}
+
+static void
+connection_handling_cleanup (NMConnectionList *self)
+{
+ NMConnectionListPrivate *priv = GET_PRIVATE (self);
+ GSList *iter;
+
+ for (iter = priv->settings; iter; iter = iter->next) {
+ NMSettingsInterface *settings = NM_SETTINGS_INTERFACE (iter->data);
+ GSList *connections;
+ GSList *connection_iter;
+
+ connections = nm_settings_interface_list_connections (settings);
+ for (connection_iter = connections; connection_iter; connection_iter = connection_iter->next)
+ connection_removed (NM_SETTINGS_CONNECTION_INTERFACE (connection_iter->data), self);
+
+ g_slist_free (connections);
+
+ g_signal_handlers_disconnect_matched (settings, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, self);
+ g_object_unref (settings);
+ }
+
+ g_slist_free (priv->settings);
+}
+
+/* Device handling */
+
+static void
+device_state_changed (NMDevice *device,
+ NMDeviceState new_state,
+ NMDeviceState old_state,
+ NMDeviceStateReason reason)
+{
+}
+
+static void
+device_added (NMClient *client,
+ NMDevice *device,
+ gpointer user_data)
+{
+ g_signal_connect (device, "state-changed", G_CALLBACK (device_state_changed), user_data);
+}
+
+static void
+device_removed (NMClient *client,
+ NMDevice *device,
+ gpointer user_data)
+{
+ g_signal_handlers_disconnect_matched (device, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, user_data);
+}
+
+static void
+device_handling_setup (NMConnectionList *self)
+{
+ NMConnectionListPrivate *priv = GET_PRIVATE (self);
+ const GPtrArray *devices;
+ int i;
+
+ g_signal_connect (priv->client, "device-added", G_CALLBACK (device_added), self);
+ g_signal_connect (priv->client, "device-removed", G_CALLBACK (device_removed), self);
+
+ devices = nm_client_get_devices (priv->client);
+ for (i = 0; devices && devices->len > i; i++)
+ device_added (priv->client, NM_DEVICE (g_ptr_array_index (devices, i)), self);
+}
+
+static void
+device_handling_cleanup (NMConnectionList *self)
+{
+ NMConnectionListPrivate *priv = GET_PRIVATE (self);
+ const GPtrArray *devices;
+ int i;
+
+ g_signal_handlers_disconnect_matched (priv->client, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, self);
+
+ devices = nm_client_get_devices (priv->client);
+ for (i = 0; devices && devices->len > i; i++)
+ device_removed (priv->client, NM_DEVICE (g_ptr_array_index (devices, i)), self);
+}
+
+void
+nm_connection_list_add_settings (NMConnectionList *self,
+ NMSettingsInterface *settings)
+{
+ NMConnectionListPrivate *priv;
+ GSList *connections;
+ GSList *iter;
+
+ g_return_if_fail (NM_IS_CONNECTION_LIST (self));
+ g_return_if_fail (NM_IS_SETTINGS_INTERFACE (settings));
+
+ priv = GET_PRIVATE (self);
+
+ if (priv->settings == NULL)
+ /* First setting, set up device handling */
+ device_handling_setup (self);
+
+ priv->settings = g_slist_prepend (priv->settings, g_object_ref (settings));
+ g_signal_connect (settings, "new-connection", G_CALLBACK (connection_added), self);
+
+ connections = nm_settings_interface_list_connections (settings);
+ for (iter = connections; iter; iter = iter->next)
+ connection_added (settings, NM_SETTINGS_CONNECTION_INTERFACE (iter->data), self);
+
+ g_slist_free (connections);
+}
+
+/*****************************************************************************/
+
+static void
+nm_connection_list_init (NMConnectionList *self)
+{
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMConnectionListPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ /* Construct only */
+ priv->client = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMConnectionListPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ g_value_set_object (value, priv->client);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NMConnectionList *self = NM_CONNECTION_LIST (object);
+ NMConnectionListPrivate *priv = GET_PRIVATE (self);
+
+ if (!priv->disposed) {
+ connection_handling_cleanup (self);
+ device_handling_cleanup (self);
+
+ if (priv->client)
+ g_object_unref (priv->client);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_connection_list_parent_class)->dispose (object);
+}
+
+static void
+nm_connection_list_class_init (NMConnectionListClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMConnectionListPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_CLIENT,
+ g_param_spec_object (NM_CONNECTION_LIST_CLIENT,
+ "NMClient",
+ "NMClient",
+ NM_TYPE_CLIENT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
diff --git a/libnm-gtk/nm-connection-list.h b/libnm-gtk/nm-connection-list.h
new file mode 100644
index 0000000..175d6d8
--- /dev/null
+++ b/libnm-gtk/nm-connection-list.h
@@ -0,0 +1,54 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_CONNECTION_LIST_H
+#define NM_CONNECTION_LIST_H
+
+#include <gtk/gtk.h>
+#include <nm-client.h>
+#include <nm-settings-interface.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_CONNECTION_LIST (nm_connection_list_get_type ())
+#define NM_CONNECTION_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION_LIST, NMConnectionList))
+#define NM_CONNECTION_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_CONNECTION_LIST, NMConnectionListClass))
+#define NM_IS_CONNECTION_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTION_LIST))
+#define NM_IS_CONNECTION_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_CONNECTION_LIST))
+#define NM_CONNECTION_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CONNECTION_LIST, NMConnectionListClass))
+
+#define NM_CONNECTION_LIST_CLIENT "client"
+
+typedef struct {
+ GtkListStore parent;
+} NMConnectionList;
+
+typedef struct {
+ GtkListStoreClass parent_class;
+} NMConnectionListClass;
+
+GType nm_connection_list_get_type (void);
+
+GtkTreeModel *nm_connection_list_new (NMClient *client);
+void nm_connection_list_add_settings (NMConnectionList *self,
+ NMSettingsInterface *settings);
+
+G_END_DECLS
+
+#endif /* NM_CONNECTION_LIST_H */
diff --git a/libnm-gtk/nm-connection-model.c b/libnm-gtk/nm-connection-model.c
new file mode 100644
index 0000000..e84e17c
--- /dev/null
+++ b/libnm-gtk/nm-connection-model.c
@@ -0,0 +1,203 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <nm-setting-connection.h>
+#include "nm-connection-model.h"
+
+G_DEFINE_TYPE (NMConnectionModel, nm_connection_model, GTK_TYPE_LIST_STORE)
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_CONNECTION_MODEL, NMConnectionModelPrivate))
+
+typedef struct {
+ GSList *settings;
+
+ gboolean disposed;
+} NMConnectionModelPrivate;
+
+static GQuark quark_item_iter = 0;
+
+GtkTreeModel *
+nm_connection_model_new (void)
+{
+ return (GtkTreeModel *) g_object_new (NM_TYPE_CONNECTION_MODEL, NULL);
+}
+
+static void
+update_iter (GtkListStore *store,
+ GtkTreeIter *iter,
+ NMSettingsConnectionInterface *connection)
+{
+ NMSettingConnection *s_con;
+
+ s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (connection),
+ NM_TYPE_SETTING_CONNECTION);
+ g_return_if_fail (s_con != NULL);
+
+ gtk_list_store_set (store, iter,
+ NM_CONNECTION_MODEL_COL_CONNECTION, connection,
+ NM_CONNECTION_MODEL_COL_NAME, nm_setting_connection_get_id (s_con),
+ NM_CONNECTION_MODEL_COL_TYPE, nm_setting_connection_get_connection_type (s_con),
+ -1);
+}
+
+static void
+connection_updated (NMSettingsConnectionInterface *connection,
+ GHashTable *new_settings,
+ gpointer user_data)
+{
+ GtkTreeIter *iter;
+
+ iter = (GtkTreeIter *) g_object_get_qdata (G_OBJECT (connection), quark_item_iter);
+ if (iter)
+ update_iter (GTK_LIST_STORE (user_data), iter, connection);
+}
+
+static void
+connection_removed (NMSettingsConnectionInterface *connection,
+ gpointer user_data)
+{
+ GtkListStore *store = GTK_LIST_STORE (user_data);
+ GtkTreeIter *iter;
+
+ g_signal_handlers_disconnect_by_func (connection, connection_updated, user_data);
+ g_signal_handlers_disconnect_by_func (connection, connection_removed, user_data);
+
+ iter = (GtkTreeIter *) g_object_get_qdata (G_OBJECT (connection), quark_item_iter);
+ if (iter) {
+ gtk_list_store_remove (store, iter);
+ g_object_set_qdata (G_OBJECT (connection), quark_item_iter, NULL);
+ }
+}
+
+static void
+connection_added (NMSettingsInterface *settings,
+ NMSettingsConnectionInterface *connection,
+ gpointer user_data)
+{
+ GtkListStore *store = GTK_LIST_STORE (user_data);
+ GtkTreeIter *iter;
+
+ iter = g_slice_new0 (GtkTreeIter);
+
+ gtk_list_store_append (store, iter);
+ update_iter (store, iter, connection);
+
+ g_object_set_qdata_full (G_OBJECT (connection), quark_item_iter, iter, (GDestroyNotify) gtk_tree_iter_free);
+ g_signal_connect (connection, "updated", G_CALLBACK (connection_updated), user_data);
+ g_signal_connect (connection, "removed", G_CALLBACK (connection_removed), user_data);
+}
+
+void
+nm_connection_model_add_settings (NMConnectionModel *self,
+ NMSettingsInterface *settings)
+{
+ NMConnectionModelPrivate *priv;
+ GSList *items;
+ GSList *iter;
+
+ g_return_if_fail (NM_IS_CONNECTION_MODEL (self));
+ g_return_if_fail (NM_IS_SETTINGS_INTERFACE (settings));
+
+ priv = GET_PRIVATE (self);
+ priv->settings = g_slist_append (priv->settings, g_object_ref (settings));
+ g_signal_connect (settings, "new-connection", G_CALLBACK (connection_added), self);
+
+ items = nm_settings_interface_list_connections (settings);
+ for (iter = items; iter; iter = iter->next)
+ connection_added (settings, NM_SETTINGS_CONNECTION_INTERFACE (iter->data), self);
+
+ g_slist_free (items);
+}
+
+#if 0
+static int
+sort_callback (GtkTreeModel *model,
+ GtkTreeIter *a,
+ GtkTreeIter *b,
+ gpointer user_data)
+{
+ GValue value_a = {0, };
+ GValue value_b = {0, };
+ int result;
+
+ gtk_tree_model_get_value (model, a, NM_CONNECTION_MODEL_COL_ITEM, &value_a);
+ gtk_tree_model_get_value (model, b, NM_CONNECTION_MODEL_COL_ITEM, &value_b);
+
+ result = nm_list_item_compare (NM_LIST_ITEM (g_value_get_object (&value_a)),
+ NM_LIST_ITEM (g_value_get_object (&value_b)));
+
+ g_value_unset (&value_a);
+ g_value_unset (&value_b);
+
+ return result;
+}
+#endif
+
+/*****************************************************************************/
+
+static void
+nm_connection_model_init (NMConnectionModel *self)
+{
+ GType types[NM_CONNECTION_MODEL_N_COLUMNS];
+
+ types[NM_CONNECTION_MODEL_COL_CONNECTION] = NM_TYPE_SETTINGS_CONNECTION_INTERFACE;
+ types[NM_CONNECTION_MODEL_COL_NAME] = G_TYPE_STRING;
+ types[NM_CONNECTION_MODEL_COL_TYPE] = G_TYPE_STRING;
+
+ gtk_list_store_set_column_types (GTK_LIST_STORE (self), NM_CONNECTION_MODEL_N_COLUMNS, types);
+
+#if 0
+ gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (self),
+ NM_CONNECTION_MODEL_COL_ITEM,
+ sort_callback,
+ NULL,
+ NULL);
+
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (self), NM_CONNECTION_MODEL_COL_ITEM, GTK_SORT_ASCENDING);
+#endif
+}
+
+static void
+dispose (GObject *object)
+{
+ NMConnectionModelPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ if (priv->settings) {
+ g_slist_foreach (priv->settings, (GFunc) g_object_unref, NULL);
+ g_slist_free (priv->settings);
+ }
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_connection_model_parent_class)->dispose (object);
+}
+
+static void
+nm_connection_model_class_init (NMConnectionModelClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ quark_item_iter = g_quark_from_static_string ("NMConnectionModel-item-iter");
+
+ g_type_class_add_private (object_class, sizeof (NMConnectionModelPrivate));
+
+ object_class->dispose = dispose;
+}
diff --git a/libnm-gtk/nm-connection-model.h b/libnm-gtk/nm-connection-model.h
new file mode 100644
index 0000000..5d3b7a8
--- /dev/null
+++ b/libnm-gtk/nm-connection-model.h
@@ -0,0 +1,60 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_CONNECTION_MODEL_H
+#define NM_CONNECTION_MODEL_H
+
+#include <gtk/gtk.h>
+#include <nm-settings-interface.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_CONNECTION_MODEL (nm_connection_model_get_type ())
+#define NM_CONNECTION_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_CONNECTION_MODEL, NMConnectionModel))
+#define NM_CONNECTION_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_CONNECTION_MODEL, NMConnectionModelClass))
+#define NM_IS_CONNECTION_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_CONNECTION_MODEL))
+#define NM_IS_CONNECTION_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_CONNECTION_MODEL))
+#define NM_CONNECTION_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_CONNECTION_MODEL, NMConnectionModelClass))
+
+enum {
+ NM_CONNECTION_MODEL_COL_CONNECTION,
+ NM_CONNECTION_MODEL_COL_NAME,
+ NM_CONNECTION_MODEL_COL_TYPE,
+
+ NM_CONNECTION_MODEL_N_COLUMNS
+};
+
+typedef struct {
+ GtkListStore parent;
+} NMConnectionModel;
+
+typedef struct {
+ GtkListStoreClass parent_class;
+} NMConnectionModelClass;
+
+GType nm_connection_model_get_type (void);
+
+GtkTreeModel *nm_connection_model_new (void);
+void nm_connection_model_add_settings (NMConnectionModel *self,
+ NMSettingsInterface *settings);
+
+
+G_END_DECLS
+
+#endif /* NM_CONNECTION_MODEL_H */
diff --git a/libnm-gtk/nm-device-handler.c b/libnm-gtk/nm-device-handler.c
new file mode 100644
index 0000000..feda6eb
--- /dev/null
+++ b/libnm-gtk/nm-device-handler.c
@@ -0,0 +1,263 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <nm-device-ethernet.h>
+#include <nm-device-wifi.h>
+#include <nm-gsm-device.h>
+#include <nm-cdma-device.h>
+#include <nm-device-bt.h>
+
+#include "nm-device-handler.h"
+#include "nm-ethernet-provider.h"
+#include "nm-wifi-provider.h"
+#include "nm-gsm-provider.h"
+#include "nm-cdma-provider.h"
+#include "nm-bt-provider.h"
+
+G_DEFINE_TYPE (NMDeviceHandler, nm_device_handler, G_TYPE_OBJECT)
+
+enum {
+ PROP_0,
+ PROP_CLIENT,
+
+ LAST_PROP
+};
+
+enum {
+ PROVIDER_ADDED,
+ PROVIDER_REMOVED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_DEVICE_HANDLER, NMDeviceHandlerPrivate))
+
+typedef struct {
+ NMClient *client;
+ GSList *providers;
+
+ gboolean disposed;
+} NMDeviceHandlerPrivate;
+
+
+NMDeviceHandler *
+nm_device_handler_new (NMClient *client)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+
+ return (NMDeviceHandler *) g_object_new (NM_TYPE_DEVICE_HANDLER,
+ NM_DEVICE_HANDLER_CLIENT, client,
+ NULL);
+}
+
+GSList *
+nm_device_handler_get_providers (NMDeviceHandler *self)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_HANDLER (self), NULL);
+
+ return GET_PRIVATE (self)->providers;
+}
+
+static NMItemProvider *
+create_provider (NMDeviceHandler *self, NMDevice *device)
+{
+ NMDeviceHandlerPrivate *priv = GET_PRIVATE (self);
+ NMItemProvider *provider;
+ GType type;
+
+ type = G_OBJECT_TYPE (device);
+
+ if (type == NM_TYPE_DEVICE_ETHERNET)
+ provider = nm_ethernet_provider_new (priv->client, NM_DEVICE_ETHERNET (device));
+ else if (type == NM_TYPE_DEVICE_WIFI)
+ provider = nm_wifi_provider_new (priv->client, NM_DEVICE_WIFI (device));
+ else if (type == NM_TYPE_GSM_DEVICE)
+ provider = nm_gsm_provider_new (priv->client, NM_GSM_DEVICE (device));
+ else if (type == NM_TYPE_CDMA_DEVICE)
+ provider = nm_cdma_provider_new (priv->client, NM_CDMA_DEVICE (device));
+ else if (type == NM_TYPE_DEVICE_BT)
+ provider = nm_bt_provider_new (priv->client, NM_DEVICE_BT (device));
+ else {
+ g_warning ("Unknown device type %s", G_OBJECT_TYPE_NAME (device));
+ provider = NULL;
+ }
+
+ return provider;
+}
+
+static void
+device_added (NMClient *client,
+ NMDevice *device,
+ gpointer user_data)
+{
+ NMDeviceHandler *self = NM_DEVICE_HANDLER (user_data);
+ NMDeviceHandlerPrivate *priv = GET_PRIVATE (self);
+ NMItemProvider *provider;
+
+ provider = create_provider (self, device);
+ if (provider) {
+ priv->providers = g_slist_prepend (priv->providers, provider);
+ g_signal_emit (self, signals[PROVIDER_ADDED], 0, provider);
+ }
+}
+
+static void
+device_removed (NMClient *client,
+ NMDevice *device,
+ gpointer user_data)
+{
+ NMDeviceHandler *self = NM_DEVICE_HANDLER (user_data);
+ NMDeviceHandlerPrivate *priv = GET_PRIVATE (self);
+ GSList *iter;
+
+ for (iter = priv->providers; iter; iter = iter->next) {
+ NMDeviceProvider *provider = (NMDeviceProvider *) iter->data;
+
+ if (nm_device_provider_get_device (provider) == device) {
+ priv->providers = g_slist_delete_link (priv->providers, iter);
+ g_signal_emit (self, signals[PROVIDER_REMOVED], 0, provider);
+ g_object_unref (provider);
+ break;
+ }
+ }
+}
+
+/*****************************************************************************/
+
+static void
+nm_device_handler_init (NMDeviceHandler *self)
+{
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMDeviceHandlerPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ /* Construct only */
+ priv->client = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMDeviceHandlerPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ g_value_set_object (value, priv->client);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+constructed (GObject *object)
+{
+ NMDeviceHandlerPrivate *priv = GET_PRIVATE (object);
+ const GPtrArray *devices;
+ int i;
+
+ if (G_OBJECT_CLASS (nm_device_handler_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_device_handler_parent_class)->constructed (object);
+
+ g_signal_connect (priv->client, "device-added", G_CALLBACK (device_added), object);
+ g_signal_connect (priv->client, "device-removed", G_CALLBACK (device_removed), object);
+
+ devices = nm_client_get_devices (priv->client);
+ for (i = 0; devices && devices->len > i; i++)
+ device_added (priv->client, NM_DEVICE (g_ptr_array_index (devices, i)), object);
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceHandlerPrivate *priv = GET_PRIVATE (object);
+ const GPtrArray *devices;
+ int i;
+
+ if (!priv->disposed) {
+ g_signal_handlers_disconnect_matched (priv->client, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, object);
+
+ devices = nm_client_get_devices (priv->client);
+ for (i = 0; devices && devices->len > i; i++)
+ device_removed (priv->client, NM_DEVICE (g_ptr_array_index (devices, i)), object);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_device_handler_parent_class)->dispose (object);
+}
+
+static void
+nm_device_handler_class_init (NMDeviceHandlerClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMDeviceHandlerPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_CLIENT,
+ g_param_spec_object (NM_DEVICE_HANDLER_CLIENT,
+ "NMClient",
+ "NMClient",
+ NM_TYPE_CLIENT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ /* Signals */
+ signals[PROVIDER_ADDED] =
+ g_signal_new ("provider-added",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMDeviceHandlerClass, provider_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ NM_TYPE_ITEM_PROVIDER);
+
+ signals[PROVIDER_REMOVED] =
+ g_signal_new ("provider-removed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMDeviceHandlerClass, provider_removed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ NM_TYPE_ITEM_PROVIDER);
+}
diff --git a/libnm-gtk/nm-device-handler.h b/libnm-gtk/nm-device-handler.h
new file mode 100644
index 0000000..e33a98d
--- /dev/null
+++ b/libnm-gtk/nm-device-handler.h
@@ -0,0 +1,60 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_DEVICE_HANDLER_H
+#define NM_DEVICE_HANDLER_H
+
+#include <glib-object.h>
+#include <nm-client.h>
+#include <nm-item-provider.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_HANDLER (nm_device_handler_get_type ())
+#define NM_DEVICE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_HANDLER, NMDeviceHandler))
+#define NM_DEVICE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_HANDLER, NMDeviceHandlerClass))
+#define NM_IS_DEVICE_HANDLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_HANDLER))
+#define NM_IS_DEVICE_HANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_HANDLER))
+#define NM_DEVICE_HANDLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_HANDLER, NMDeviceHandlerClass))
+
+#define NM_DEVICE_HANDLER_CLIENT "client"
+
+typedef struct {
+ GObject parent;
+} NMDeviceHandler;
+
+typedef struct {
+ GObjectClass parent_class;
+
+ /* Signals */
+ void (*provider_added) (NMDeviceHandler *self,
+ NMItemProvider *provider);
+
+ void (*provider_removed) (NMDeviceHandler *self,
+ NMItemProvider *provider);
+} NMDeviceHandlerClass;
+
+GType nm_device_handler_get_type (void);
+
+NMDeviceHandler *nm_device_handler_new (NMClient *client);
+GSList *nm_device_handler_get_providers (NMDeviceHandler *self);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_HANDLER_H */
diff --git a/libnm-gtk/nm-device-item.c b/libnm-gtk/nm-device-item.c
new file mode 100644
index 0000000..2cc33e2
--- /dev/null
+++ b/libnm-gtk/nm-device-item.c
@@ -0,0 +1,198 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include "nm-device-item.h"
+
+G_DEFINE_ABSTRACT_TYPE (NMDeviceItem, nm_device_item, NM_TYPE_CONNECTION_ITEM)
+
+enum {
+ PROP_0,
+ PROP_DEVICE,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_DEVICE_ITEM, NMDeviceItemPrivate))
+
+typedef struct {
+ NMDevice *device;
+
+ gboolean disposed;
+} NMDeviceItemPrivate;
+
+NMDevice *
+nm_device_item_get_device (NMDeviceItem *self)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_ITEM (self), NULL);
+
+ return GET_PRIVATE (self)->device;
+}
+
+const char *
+nm_device_item_get_hw_address (NMDeviceItem *self)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_ITEM (self), NULL);
+
+ if (NM_DEVICE_ITEM_GET_CLASS (self)->get_hw_address)
+ return NM_DEVICE_ITEM_GET_CLASS (self)->get_hw_address (self);
+
+ return NULL;
+}
+
+static void
+connect_cb (gpointer user_data, const char *object_path, GError *error)
+{
+ if (error) {
+ char *msg;
+
+ msg = g_strdup_printf (_("Could not activate device: %s"), error->message);
+ nm_list_item_warning (NM_LIST_ITEM (user_data), msg);
+ g_free (msg);
+ }
+}
+
+static void
+connect (NMListItem *item)
+{
+ NMDeviceItem *self = NM_DEVICE_ITEM (item);
+ NMConnectionItem *connection_item = NM_CONNECTION_ITEM (self);
+ NMConnection *connection;
+ const char *path;
+ const char *service_name;
+ char *specific_object;
+ NMConnectionScope scope;
+
+ connection = NM_CONNECTION (nm_connection_item_get_connection (connection_item));
+ path = nm_connection_get_path (connection);
+
+ scope = nm_connection_get_scope (connection);
+ service_name = (scope == NM_CONNECTION_SCOPE_USER) ?
+ NM_DBUS_SERVICE_USER_SETTINGS : NM_DBUS_SERVICE_SYSTEM_SETTINGS;
+
+ if (NM_DEVICE_ITEM_GET_CLASS (item)->get_specific_object)
+ specific_object = NM_DEVICE_ITEM_GET_CLASS (item)->get_specific_object (self);
+ else
+ specific_object = g_strdup ("/");
+
+ nm_client_activate_connection (nm_connection_item_get_client (connection_item),
+ service_name, path,
+ nm_device_item_get_device (self),
+ specific_object,
+ connect_cb,
+ item);
+
+ g_free (specific_object);
+}
+
+static void
+disconnect_cb (NMDevice *device, GError *error, gpointer user_data)
+{
+ if (error) {
+ char *msg;
+
+ msg = g_strdup_printf (_("Could not deactivate device: %s"), error->message);
+ nm_list_item_warning (NM_LIST_ITEM (user_data), msg);
+ g_free (msg);
+ }
+}
+
+static void
+disconnect (NMListItem *item)
+{
+ nm_device_disconnect (nm_device_item_get_device (NM_DEVICE_ITEM (item)), disconnect_cb, item);
+}
+
+/*****************************************************************************/
+
+static void
+nm_device_item_init (NMDeviceItem *self)
+{
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMDeviceItemPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_DEVICE:
+ /* Construct only */
+ priv->device = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMDeviceItemPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_DEVICE:
+ g_value_set_object (value, priv->device);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceItemPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ g_object_unref (priv->device);
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_device_item_parent_class)->dispose (object);
+}
+
+static void
+nm_device_item_class_init (NMDeviceItemClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMListItemClass *list_class = NM_LIST_ITEM_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMDeviceItemPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ list_class->connect = connect;
+ list_class->disconnect = disconnect;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_DEVICE,
+ g_param_spec_object (NM_DEVICE_ITEM_DEVICE,
+ "Device",
+ "Device",
+ NM_TYPE_DEVICE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
diff --git a/libnm-gtk/nm-device-item.h b/libnm-gtk/nm-device-item.h
new file mode 100644
index 0000000..ea2c640
--- /dev/null
+++ b/libnm-gtk/nm-device-item.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_DEVICE_ITEM_H
+#define NM_DEVICE_ITEM_H
+
+#include <glib-object.h>
+#include <nm-device.h>
+#include <nm-connection-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_ITEM (nm_device_item_get_type ())
+#define NM_DEVICE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_ITEM, NMDeviceItem))
+#define NM_DEVICE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_ITEM, NMDeviceItemClass))
+#define NM_IS_DEVICE_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_ITEM))
+#define NM_IS_DEVICE_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_ITEM))
+#define NM_DEVICE_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_ITEM, NMDeviceItemClass))
+
+#define NM_DEVICE_ITEM_DEVICE "device"
+
+typedef struct {
+ NMConnectionItem parent;
+} NMDeviceItem;
+
+typedef struct {
+ NMConnectionItemClass parent_class;
+
+ /* Methods */
+ char *(*get_specific_object) (NMDeviceItem *self);
+ const char *(*get_hw_address) (NMDeviceItem *self);
+} NMDeviceItemClass;
+
+GType nm_device_item_get_type (void);
+
+NMDevice *nm_device_item_get_device (NMDeviceItem *self);
+const char *nm_device_item_get_hw_address (NMDeviceItem *self);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_ITEM_H */
diff --git a/libnm-gtk/nm-device-model.c b/libnm-gtk/nm-device-model.c
new file mode 100644
index 0000000..359e0ba
--- /dev/null
+++ b/libnm-gtk/nm-device-model.c
@@ -0,0 +1,266 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <nm-device.h>
+#include <nm-device-ethernet.h>
+#include <nm-device-wifi.h>
+#include <nm-serial-device.h>
+
+#include "nm-device-model.h"
+#include "nm-icon-cache.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NMDeviceModel, nm_device_model, GTK_TYPE_LIST_STORE)
+
+enum {
+ PROP_0,
+ PROP_CLIENT,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_DEVICE_MODEL, NMDeviceModelPrivate))
+
+typedef struct {
+ NMClient *client;
+ gulong device_added_id;
+ gulong device_removed_id;
+
+ gboolean disposed;
+} NMDeviceModelPrivate;
+
+static GQuark quark_device_iter = 0;
+
+NMDeviceModel *
+nm_device_model_new (NMClient *client)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+
+ return (NMDeviceModel *) g_object_new (NM_TYPE_DEVICE_MODEL,
+ NM_DEVICE_MODEL_CLIENT, client,
+ NULL);
+}
+
+static void
+device_state_changed (NMDevice *device,
+ NMDeviceState new_state,
+ NMDeviceState old_state,
+ NMDeviceStateReason reason,
+ gpointer user_data)
+{
+ GtkListStore *store = GTK_LIST_STORE (user_data);
+ GtkTreeIter *iter;
+
+ iter = (GtkTreeIter *) g_object_get_qdata (G_OBJECT (device), quark_device_iter);
+ if (iter)
+ gtk_list_store_set (store, iter, NM_DEVICE_MODEL_COL_STATE, new_state, -1);
+}
+
+static void
+device_added (NMClient *client,
+ NMDevice *device,
+ gpointer user_data)
+{
+ GtkListStore *store = GTK_LIST_STORE (user_data);
+ GtkTreeIter *iter;
+ GdkPixbuf *pixbuf;
+
+ iter = g_slice_new0 (GtkTreeIter);
+
+ if (NM_IS_DEVICE_ETHERNET (device))
+ pixbuf = nm_icon_cache_get ("nm-device-wired");
+ else if (NM_IS_DEVICE_WIFI (device))
+ pixbuf = nm_icon_cache_get ("nm-device-wireless");
+ else if (NM_IS_SERIAL_DEVICE (device))
+ pixbuf = nm_icon_cache_get ("nm-device-wwan");
+ else {
+ g_warning ("Unhandled device type (%s)", G_OBJECT_TYPE_NAME (device));
+ pixbuf = NULL;
+ }
+
+ gtk_list_store_append (store, iter);
+ gtk_list_store_set (store, iter,
+ NM_DEVICE_MODEL_COL_DEVICE, device,
+ NM_DEVICE_MODEL_COL_IFACE, nm_device_get_iface (device),
+ NM_DEVICE_MODEL_COL_DESCRIPTION, utils_get_device_description (device),
+ NM_DEVICE_MODEL_COL_ICON, pixbuf,
+ NM_DEVICE_MODEL_COL_STATE, nm_device_get_state (device),
+ -1);
+
+ g_object_set_qdata_full (G_OBJECT (device), quark_device_iter, iter, (GDestroyNotify) gtk_tree_iter_free);
+ g_signal_connect (device, "state-changed", G_CALLBACK (device_state_changed), user_data);
+}
+
+static void
+device_removed (NMClient *client,
+ NMDevice *device,
+ gpointer user_data)
+{
+ GtkListStore *store = GTK_LIST_STORE (user_data);
+ GtkTreeIter *iter;
+
+ iter = (GtkTreeIter *) g_object_get_qdata (G_OBJECT (device), quark_device_iter);
+ if (iter) {
+ g_signal_handlers_disconnect_by_func (device, device_state_changed, user_data);
+ gtk_list_store_remove (store, iter);
+ g_object_set_qdata (G_OBJECT (device), quark_device_iter, NULL);
+ }
+}
+
+#if 0
+static int
+sort_callback (GtkTreeModel *model,
+ GtkTreeIter *a,
+ GtkTreeIter *b,
+ gpointer user_data)
+{
+ GValue value_a = {0, };
+ GValue value_b = {0, };
+ int result;
+
+ gtk_tree_model_get_value (model, a, NM_DEVICE_MODEL_COL_ITEM, &value_a);
+ gtk_tree_model_get_value (model, b, NM_DEVICE_MODEL_COL_ITEM, &value_b);
+
+ result = nm_device_item_compare (NM_DEVICE_ITEM (g_value_get_object (&value_a)),
+ NM_DEVICE_ITEM (g_value_get_object (&value_b)));
+
+ g_value_unset (&value_a);
+ g_value_unset (&value_b);
+
+ return result;
+}
+#endif
+
+/*****************************************************************************/
+
+static void
+nm_device_model_init (NMDeviceModel *self)
+{
+ GType types[NM_DEVICE_MODEL_N_COLUMNS];
+
+ types[NM_DEVICE_MODEL_COL_DEVICE] = NM_TYPE_DEVICE;
+ types[NM_DEVICE_MODEL_COL_IFACE] = G_TYPE_STRING;
+ types[NM_DEVICE_MODEL_COL_DESCRIPTION] = G_TYPE_STRING;
+ types[NM_DEVICE_MODEL_COL_ICON] = GDK_TYPE_PIXBUF;
+ types[NM_DEVICE_MODEL_COL_STATE] = G_TYPE_INT;
+
+ gtk_list_store_set_column_types (GTK_LIST_STORE (self), NM_DEVICE_MODEL_N_COLUMNS, types);
+#if 0
+ gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (self),
+ NM_DEVICE_MODEL_COL_ITEM,
+ sort_callback,
+ NULL,
+ NULL);
+
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (self), NM_DEVICE_MODEL_COL_DEVICE, GTK_SORT_ASCENDING);
+#endif
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMDeviceModelPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ /* Construct only */
+ priv->client = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMDeviceModelPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ g_value_set_object (value, priv->client);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+constructed (GObject *object)
+{
+ NMDeviceModelPrivate *priv = GET_PRIVATE (object);
+ const GPtrArray *devices;
+ int i;
+
+ if (G_OBJECT_CLASS (nm_device_model_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_device_model_parent_class)->constructed (object);
+
+ priv->device_added_id = g_signal_connect (priv->client, "device-added", G_CALLBACK (device_added), object);
+ priv->device_removed_id = g_signal_connect (priv->client, "device-removed", G_CALLBACK (device_removed), object);
+
+ devices = nm_client_get_devices (priv->client);
+ for (i = 0; devices && devices->len > i; i++)
+ device_added (priv->client, NM_DEVICE (g_ptr_array_index (devices, i)), object);
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceModelPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ g_signal_handler_disconnect (priv->client, priv->device_added_id);
+ g_signal_handler_disconnect (priv->client, priv->device_removed_id);
+
+ if (priv->client)
+ g_object_unref (priv->client);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_device_model_parent_class)->dispose (object);
+}
+
+static void
+nm_device_model_class_init (NMDeviceModelClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ quark_device_iter = g_quark_from_static_string ("NMDeviceModel-device-iter");
+
+ g_type_class_add_private (object_class, sizeof (NMDeviceModelPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_CLIENT,
+ g_param_spec_object (NM_DEVICE_MODEL_CLIENT,
+ "NMClient",
+ "NMClient",
+ NM_TYPE_CLIENT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
diff --git a/libnm-gtk/nm-device-model.h b/libnm-gtk/nm-device-model.h
new file mode 100644
index 0000000..e7ff8f6
--- /dev/null
+++ b/libnm-gtk/nm-device-model.h
@@ -0,0 +1,61 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_DEVICE_MODEL_H
+#define NM_DEVICE_MODEL_H
+
+#include <gtk/gtk.h>
+#include <nm-client.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_MODEL (nm_device_model_get_type ())
+#define NM_DEVICE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_MODEL, NMDeviceModel))
+#define NM_DEVICE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_MODEL, NMDeviceModelClass))
+#define NM_IS_DEVICE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_MODEL))
+#define NM_IS_DEVICE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_MODEL))
+#define NM_DEVICE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_MODEL, NMDeviceModelClass))
+
+#define NM_DEVICE_MODEL_CLIENT "client"
+
+enum {
+ NM_DEVICE_MODEL_COL_DEVICE,
+ NM_DEVICE_MODEL_COL_IFACE,
+ NM_DEVICE_MODEL_COL_DESCRIPTION,
+ NM_DEVICE_MODEL_COL_ICON,
+ NM_DEVICE_MODEL_COL_STATE,
+
+ NM_DEVICE_MODEL_N_COLUMNS
+};
+
+typedef struct {
+ GtkListStore parent;
+} NMDeviceModel;
+
+typedef struct {
+ GtkListStoreClass parent_class;
+} NMDeviceModelClass;
+
+GType nm_device_model_get_type (void);
+
+NMDeviceModel *nm_device_model_new (NMClient *client);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_MODEL_H */
diff --git a/libnm-gtk/nm-device-provider.c b/libnm-gtk/nm-device-provider.c
new file mode 100644
index 0000000..67f4743
--- /dev/null
+++ b/libnm-gtk/nm-device-provider.c
@@ -0,0 +1,152 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-device-provider.h"
+
+G_DEFINE_ABSTRACT_TYPE (NMDeviceProvider, nm_device_provider, NM_TYPE_ITEM_PROVIDER)
+
+enum {
+ PROP_0,
+ PROP_DEVICE,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_DEVICE_PROVIDER, NMDeviceProviderPrivate))
+
+typedef struct {
+ NMDevice *device;
+ gulong state_changed_id;
+
+ gboolean disposed;
+} NMDeviceProviderPrivate;
+
+NMDevice *
+nm_device_provider_get_device (NMDeviceProvider *self)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_PROVIDER (self), NULL);
+
+ return GET_PRIVATE (self)->device;
+}
+
+gboolean
+nm_device_provider_ready (NMDeviceProvider *self)
+{
+ g_return_val_if_fail (NM_IS_DEVICE_PROVIDER (self), FALSE);
+
+ return nm_device_get_state (nm_device_provider_get_device (self)) >= NM_DEVICE_STATE_DISCONNECTED;
+}
+
+static void
+device_state_changed (NMDevice *device,
+ NMDeviceState new_state,
+ NMDeviceState old_state,
+ NMDeviceStateReason reason,
+ gpointer user_data)
+{
+ NMDeviceProvider *self = NM_DEVICE_PROVIDER (user_data);
+
+ if (old_state < NM_DEVICE_STATE_DISCONNECTED && new_state >= NM_DEVICE_STATE_DISCONNECTED)
+ /* Device became usable */
+ nm_item_provider_reset (NM_ITEM_PROVIDER (self));
+ else if (old_state >= NM_DEVICE_STATE_DISCONNECTED && new_state < NM_DEVICE_STATE_DISCONNECTED)
+ /* Device became unusable */
+ nm_item_provider_clear (NM_ITEM_PROVIDER (self));
+
+ if (NM_DEVICE_PROVIDER_GET_CLASS (self)->state_changed)
+ NM_DEVICE_PROVIDER_GET_CLASS (self)->state_changed (self, new_state, old_state, reason);
+}
+
+/*****************************************************************************/
+
+static void
+nm_device_provider_init (NMDeviceProvider *self)
+{
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMDeviceProviderPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_DEVICE:
+ /* Construct only */
+ priv->device = g_value_dup_object (value);
+ priv->state_changed_id = g_signal_connect (priv->device, "state-changed",
+ G_CALLBACK (device_state_changed), object);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMDeviceProviderPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_DEVICE:
+ g_value_set_object (value, priv->device);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NMDeviceProviderPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ g_signal_handler_disconnect (priv->device, priv->state_changed_id);
+ g_object_unref (priv->device);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_device_provider_parent_class)->dispose (object);
+}
+
+static void
+nm_device_provider_class_init (NMDeviceProviderClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMDeviceProviderPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_DEVICE,
+ g_param_spec_object (NM_DEVICE_PROVIDER_DEVICE,
+ "NMDevice",
+ "NMDevice",
+ NM_TYPE_DEVICE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
diff --git a/libnm-gtk/nm-device-provider.h b/libnm-gtk/nm-device-provider.h
new file mode 100644
index 0000000..70695d7
--- /dev/null
+++ b/libnm-gtk/nm-device-provider.h
@@ -0,0 +1,59 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_DEVICE_PROVIDER_H
+#define NM_DEVICE_PROVIDER_H
+
+#include <glib-object.h>
+#include <nm-device.h>
+#include <nm-item-provider.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_DEVICE_PROVIDER (nm_device_provider_get_type ())
+#define NM_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DEVICE_PROVIDER, NMDeviceProvider))
+#define NM_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DEVICE_PROVIDER, NMDeviceProviderClass))
+#define NM_IS_DEVICE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DEVICE_PROVIDER))
+#define NM_IS_DEVICE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_DEVICE_PROVIDER))
+#define NM_DEVICE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DEVICE_PROVIDER, NMDeviceProviderClass))
+
+#define NM_DEVICE_PROVIDER_DEVICE "device"
+
+typedef struct {
+ NMItemProvider parent;
+} NMDeviceProvider;
+
+typedef struct {
+ NMItemProviderClass parent_class;
+
+ /* Methods */
+ void (*state_changed) (NMDeviceProvider *self,
+ NMDeviceState new_state,
+ NMDeviceState old_state,
+ NMDeviceStateReason reason);
+} NMDeviceProviderClass;
+
+GType nm_device_provider_get_type (void);
+
+NMDevice *nm_device_provider_get_device (NMDeviceProvider *self);
+gboolean nm_device_provider_ready (NMDeviceProvider *self);
+
+G_END_DECLS
+
+#endif /* NM_DEVICE_PROVIDER_H */
diff --git a/libnm-gtk/nm-ethernet-item.c b/libnm-gtk/nm-ethernet-item.c
new file mode 100644
index 0000000..a31af28
--- /dev/null
+++ b/libnm-gtk/nm-ethernet-item.c
@@ -0,0 +1,129 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <string.h>
+#include <glib/gi18n.h>
+#include <nm-setting-8021x.h>
+#include "nm-ethernet-item.h"
+#include "nm-icon-cache.h"
+
+G_DEFINE_TYPE (NMEthernetItem, nm_ethernet_item, NM_TYPE_DEVICE_ITEM)
+
+NMListItem *
+nm_ethernet_item_new (NMClient *client,
+ NMDeviceEthernet *device,
+ NMSettingsConnectionInterface *connection)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), NULL);
+ g_return_val_if_fail (NM_IS_SETTINGS_CONNECTION_INTERFACE (connection), NULL);
+
+ return (NMListItem *) g_object_new (NM_TYPE_ETHERNET_ITEM,
+ NM_LIST_ITEM_TYPE_NAME, _("wired"),
+ NM_CONNECTION_ITEM_DELETE_ALLOWED, FALSE,
+ NM_CONNECTION_ITEM_CLIENT, client,
+ NM_CONNECTION_ITEM_CONNECTION, connection,
+ NM_DEVICE_ITEM_DEVICE, device,
+ NULL);
+}
+
+static void
+update_icon (NMEthernetItem *self)
+{
+ const char *icon;
+ NMListItemStatus status;
+
+ status = nm_list_item_get_status (NM_LIST_ITEM (self));
+ if (status == NM_LIST_ITEM_STATUS_CONNECTED)
+ icon = "nm-device-wired";
+ else
+ icon = "nm-no-connection";
+
+ if (icon)
+ g_object_set (self, NM_LIST_ITEM_ICON, icon, NULL);
+}
+
+static int
+priority (NMListItem *item)
+{
+ return NM_LIST_ITEM_PRIORITY_DEV_ETHERNET + NM_LIST_ITEM_CLASS (nm_ethernet_item_parent_class)->priority (item);
+}
+
+static const char *
+ethernet_get_hw_address (NMDeviceItem *item)
+{
+ NMDeviceEthernet *device;
+
+ device = NM_DEVICE_ETHERNET (nm_device_item_get_device (NM_DEVICE_ITEM (item)));
+
+ return nm_device_ethernet_get_hw_address (device);
+}
+
+/*****************************************************************************/
+
+static void
+nm_ethernet_item_init (NMEthernetItem *self)
+{
+ update_icon (self);
+}
+
+static void
+constructed (GObject *object)
+{
+ NMConnection *connection;
+ NMSetting *setting;
+
+ if (G_OBJECT_CLASS (nm_ethernet_item_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_ethernet_item_parent_class)->constructed (object);
+
+ connection = NM_CONNECTION (nm_connection_item_get_connection (NM_CONNECTION_ITEM (object)));
+ setting = nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+
+ if (setting)
+ g_object_set (object, NM_LIST_ITEM_SECURITY, _("802.1x"), NULL);
+}
+
+static void
+notify (GObject *object,
+ GParamSpec *pspec)
+{
+ if (!pspec || !pspec->name)
+ return;
+
+ if (!strcmp (pspec->name, NM_LIST_ITEM_STATUS))
+ update_icon (NM_ETHERNET_ITEM (object));
+ else if (!strcmp (pspec->name, NM_CONNECTION_ITEM_CONNECTION) &&
+ !nm_connection_item_get_connection (NM_CONNECTION_ITEM (object)))
+ /* If the connection is removed from the item, request deletion */
+ nm_list_item_request_remove (NM_LIST_ITEM (object));
+}
+
+static void
+nm_ethernet_item_class_init (NMEthernetItemClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMListItemClass *list_class = NM_LIST_ITEM_CLASS (klass);
+ NMDeviceItemClass *device_class = NM_DEVICE_ITEM_CLASS (klass);
+
+ object_class->constructed = constructed;
+ object_class->notify = notify;
+
+ list_class->priority = priority;
+ device_class->get_hw_address = ethernet_get_hw_address;
+}
diff --git a/libnm-gtk/nm-ethernet-item.h b/libnm-gtk/nm-ethernet-item.h
new file mode 100644
index 0000000..9662742
--- /dev/null
+++ b/libnm-gtk/nm-ethernet-item.h
@@ -0,0 +1,52 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_ETHERNET_ITEM_H
+#define NM_ETHERNET_ITEM_H
+
+#include <glib-object.h>
+#include <nm-device-ethernet.h>
+#include <nm-device-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_ETHERNET_ITEM (nm_ethernet_item_get_type ())
+#define NM_ETHERNET_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_ETHERNET_ITEM, NMEthernetItem))
+#define NM_ETHERNET_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_ETHERNET_ITEM, NMEthernetItemClass))
+#define NM_IS_ETHERNET_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_ETHERNET_ITEM))
+#define NM_IS_ETHERNET_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_ETHERNET_ITEM))
+#define NM_ETHERNET_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ETHERNET_ITEM, NMEthernetItemClass))
+
+typedef struct {
+ NMDeviceItem parent;
+} NMEthernetItem;
+
+typedef struct {
+ NMDeviceItemClass parent_class;
+} NMEthernetItemClass;
+
+GType nm_ethernet_item_get_type (void);
+
+NMListItem *nm_ethernet_item_new (NMClient *client,
+ NMDeviceEthernet *device,
+ NMSettingsConnectionInterface *connection);
+
+G_END_DECLS
+
+#endif /* NM_ETHERNET_ITEM_H */
diff --git a/libnm-gtk/nm-ethernet-provider.c b/libnm-gtk/nm-ethernet-provider.c
new file mode 100644
index 0000000..6305edc
--- /dev/null
+++ b/libnm-gtk/nm-ethernet-provider.c
@@ -0,0 +1,71 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-ethernet-provider.h"
+#include "nm-ethernet-item.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NMEthernetProvider, nm_ethernet_provider, NM_TYPE_DEVICE_PROVIDER)
+
+NMItemProvider *
+nm_ethernet_provider_new (NMClient *client,
+ NMDeviceEthernet *device)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_ETHERNET (device), NULL);
+
+ return (NMItemProvider *) g_object_new (NM_TYPE_ETHERNET_PROVIDER,
+ NM_ITEM_PROVIDER_CLIENT, client,
+ NM_DEVICE_PROVIDER_DEVICE, device,
+ NULL);
+}
+
+static void
+ethernet_added (NMItemProvider *provider,
+ NMSettingsConnectionInterface *connection)
+{
+ NMDeviceProvider *device_provider = NM_DEVICE_PROVIDER (provider);
+ NMDevice *device;
+
+ if (!nm_device_provider_ready (device_provider))
+ return;
+
+ device = nm_device_provider_get_device (device_provider);
+ if (utils_connection_valid_for_device (NM_CONNECTION (connection), device, NULL)) {
+ NMListItem *item;
+
+ item = nm_ethernet_item_new (nm_item_provider_get_client (provider), NM_DEVICE_ETHERNET (device), connection);
+ nm_item_provider_item_added (provider, item);
+ }
+}
+
+/*****************************************************************************/
+
+static void
+nm_ethernet_provider_init (NMEthernetProvider *self)
+{
+}
+
+static void
+nm_ethernet_provider_class_init (NMEthernetProviderClass *klass)
+{
+ NMItemProviderClass *item_class = NM_ITEM_PROVIDER_CLASS (klass);
+
+ item_class->connection_added = ethernet_added;
+}
diff --git a/libnm-gtk/nm-ethernet-provider.h b/libnm-gtk/nm-ethernet-provider.h
new file mode 100644
index 0000000..20f8c95
--- /dev/null
+++ b/libnm-gtk/nm-ethernet-provider.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_ETHERNET_PROVIDER_H
+#define NM_ETHERNET_PROVIDER_H
+
+#include <glib-object.h>
+#include <nm-device-ethernet.h>
+#include <nm-device-provider.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_ETHERNET_PROVIDER (nm_ethernet_provider_get_type ())
+#define NM_ETHERNET_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_ETHERNET_PROVIDER, NMEthernetProvider))
+#define NM_ETHERNET_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_ETHERNET_PROVIDER, NMEthernetProviderClass))
+#define NM_IS_ETHERNET_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_ETHERNET_PROVIDER))
+#define NM_IS_ETHERNET_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_ETHERNET_PROVIDER))
+#define NM_ETHERNET_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ETHERNET_PROVIDER, NMEthernetProviderClass))
+
+typedef struct {
+ NMDeviceProvider parent;
+} NMEthernetProvider;
+
+typedef struct {
+ NMDeviceProviderClass parent_class;
+} NMEthernetProviderClass;
+
+GType nm_ethernet_provider_get_type (void);
+
+NMItemProvider *nm_ethernet_provider_new (NMClient *client,
+ NMDeviceEthernet *device);
+
+G_END_DECLS
+
+#endif /* NM_ETHERNET_PROVIDER_H */
diff --git a/libnm-gtk/nm-gconf-connection.c b/libnm-gtk/nm-gconf-connection.c
new file mode 100644
index 0000000..0117e84
--- /dev/null
+++ b/libnm-gtk/nm-gconf-connection.c
@@ -0,0 +1,1001 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2008 Novell, Inc.
+ * (C) Copyright 2008 - 2009 Red Hat, Inc.
+ */
+
+#include <string.h>
+#include <unistd.h>
+
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib.h>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <gnome-keyring.h>
+
+#include <nm-setting-connection.h>
+#include <nm-setting-vpn.h>
+#include <nm-setting-8021x.h>
+
+#include "nm-gconf-connection.h"
+#include "gconf-helpers.h"
+#include "nm-utils.h"
+#include "utils.h"
+#include "nma-marshal.h"
+#include "nm-settings-interface.h"
+
+static NMSettingsConnectionInterface *parent_settings_connection_iface;
+
+static void settings_connection_interface_init (NMSettingsConnectionInterface *class);
+
+G_DEFINE_TYPE_EXTENDED (NMGConfConnection, nm_gconf_connection, NM_TYPE_EXPORTED_CONNECTION, 0,
+ G_IMPLEMENT_INTERFACE (NM_TYPE_SETTINGS_CONNECTION_INTERFACE,
+ settings_connection_interface_init))
+
+#define NM_GCONF_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_GCONF_CONNECTION, NMGConfConnectionPrivate))
+
+typedef struct {
+ GConfClient *client;
+ char *dir;
+
+ gboolean disposed;
+} NMGConfConnectionPrivate;
+
+enum {
+ PROP_0,
+ PROP_CLIENT,
+ PROP_DIR,
+
+ LAST_PROP
+};
+
+enum {
+ NEW_SECRETS_REQUESTED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+NMGConfConnection *
+nm_gconf_connection_new (GConfClient *client, const char *conf_dir)
+{
+ NMConnection *connection;
+ NMGConfConnection *gconf_connection;
+
+ g_return_val_if_fail (GCONF_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (conf_dir != NULL, NULL);
+
+ /* retrieve GConf data */
+ connection = nm_gconf_read_connection (client, conf_dir);
+ if (connection) {
+ gconf_connection = nm_gconf_connection_new_from_connection (client, conf_dir, connection);
+ g_object_unref (connection);
+ } else {
+ nm_warning ("No connection read from GConf at %s.", conf_dir);
+ gconf_connection = NULL;
+ }
+
+ return gconf_connection;
+}
+
+NMGConfConnection *
+nm_gconf_connection_new_from_connection (GConfClient *client,
+ const char *conf_dir,
+ NMConnection *connection)
+{
+ GObject *object;
+ NMGConfConnection *self;
+ GError *error = NULL;
+ gboolean success;
+ GHashTable *settings;
+
+ g_return_val_if_fail (GCONF_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (conf_dir != NULL, NULL);
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
+
+ /* Ensure the connection is valid first */
+ success = nm_connection_verify (connection, &error);
+ if (!success) {
+ g_warning ("Invalid connection %s: '%s' / '%s' invalid: %d",
+ conf_dir,
+ g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)),
+ (error && error->message) ? error->message : "(unknown)",
+ error ? error->code : -1);
+ g_clear_error (&error);
+ return NULL;
+ }
+
+ object = g_object_new (NM_TYPE_GCONF_CONNECTION,
+ NM_GCONF_CONNECTION_CLIENT, client,
+ NM_GCONF_CONNECTION_DIR, conf_dir,
+ NM_CONNECTION_SCOPE, NM_CONNECTION_SCOPE_USER,
+ NULL);
+ if (!object)
+ return NULL;
+
+ self = NM_GCONF_CONNECTION (object);
+
+ /* Fill certs so that the nm_connection_replace_settings verification works */
+ settings = nm_connection_to_hash (connection);
+ success = nm_connection_replace_settings (NM_CONNECTION (self), settings, NULL);
+ g_hash_table_destroy (settings);
+
+ /* Already verified the settings above, they had better be OK */
+ g_assert (success);
+
+ return self;
+}
+
+const char *
+nm_gconf_connection_get_gconf_path (NMGConfConnection *self)
+{
+ g_return_val_if_fail (NM_IS_GCONF_CONNECTION (self), NULL);
+
+ return NM_GCONF_CONNECTION_GET_PRIVATE (self)->dir;
+}
+
+gboolean
+nm_gconf_connection_gconf_changed (NMGConfConnection *self)
+{
+ NMGConfConnectionPrivate *priv = NM_GCONF_CONNECTION_GET_PRIVATE (self);
+ NMConnection *new;
+ GHashTable *new_settings;
+ GError *error = NULL;
+ gboolean success;
+
+ new = nm_gconf_read_connection (priv->client, priv->dir);
+ if (!new) {
+ g_warning ("No connection read from GConf at %s.", priv->dir);
+ goto invalid;
+ }
+
+ success = nm_connection_verify (new, &error);
+ if (!success) {
+ g_warning ("%s: Invalid connection %s: '%s' / '%s' invalid: %d",
+ __func__, priv->dir,
+ g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)),
+ error->message, error->code);
+ g_object_unref (new);
+ goto invalid;
+ }
+
+ /* Ignore the GConf update if nothing changed */
+ if (nm_connection_compare (NM_CONNECTION (self), new, NM_SETTING_COMPARE_FLAG_EXACT)) {
+ g_object_unref (new);
+ return TRUE;
+ }
+
+ new_settings = nm_connection_to_hash (new);
+ success = nm_connection_replace_settings (NM_CONNECTION (self), new_settings, &error);
+ g_hash_table_destroy (new_settings);
+ g_object_unref (new);
+
+ if (!success) {
+ g_warning ("%s: '%s' / '%s' invalid: %d",
+ __func__,
+ error ? g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)) : "(none)",
+ (error && error->message) ? error->message : "(none)",
+ error ? error->code : -1);
+ goto invalid;
+ }
+
+ nm_settings_connection_interface_emit_updated (NM_SETTINGS_CONNECTION_INTERFACE (self));
+ return TRUE;
+
+ invalid:
+ g_clear_error (&error);
+ g_signal_emit_by_name (self, NM_SETTINGS_CONNECTION_INTERFACE_REMOVED);
+ return FALSE;
+}
+
+/******************************************************/
+
+static GValue *
+string_to_gvalue (const char *str)
+{
+ GValue *val;
+
+ val = g_slice_new0 (GValue);
+ g_value_init (val, G_TYPE_STRING);
+ g_value_set_string (val, str);
+
+ return val;
+}
+
+#define FILE_TAG "file://"
+
+static GValue *
+path_to_gvalue (const char *path)
+{
+ GValue *val;
+ GByteArray *array;
+
+ array = g_byte_array_sized_new (strlen (FILE_TAG) + strlen (path) + 1);
+ g_byte_array_append (array, (guint8 *) FILE_TAG, strlen (FILE_TAG));
+ g_byte_array_append (array, (guint8 *) path, strlen (path) + 1); /* +1 for the trailing NULL */
+
+ val = g_slice_new0 (GValue);
+ g_value_init (val, DBUS_TYPE_G_UCHAR_ARRAY);
+ g_value_take_boxed (val, array);
+
+ return val;
+}
+
+static void
+destroy_gvalue (gpointer data)
+{
+ GValue *value = (GValue *) data;
+
+ g_value_unset (value);
+ g_slice_free (GValue, value);
+}
+
+static GHashTable *
+nm_gconf_connection_get_keyring_items (NMGConfConnection *self,
+ const char *setting_name,
+ GError **error)
+{
+ NMGConfConnectionPrivate *priv;
+ NMSettingConnection *s_con;
+ GHashTable *secrets;
+ GList *found_list = NULL;
+ GnomeKeyringResult ret;
+ GList *iter;
+ const char *connection_name;
+ char *path = NULL;
+
+ g_return_val_if_fail (self != NULL, NULL);
+ g_return_val_if_fail (setting_name != NULL, NULL);
+ g_return_val_if_fail (error != NULL, NULL);
+ g_return_val_if_fail (*error == NULL, NULL);
+
+ priv = NM_GCONF_CONNECTION_GET_PRIVATE (self);
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (NM_CONNECTION (self), NM_TYPE_SETTING_CONNECTION));
+ g_assert (s_con);
+
+ connection_name = nm_setting_connection_get_id (s_con);
+ g_assert (connection_name);
+
+ pre_keyring_callback ();
+
+ ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ KEYRING_UUID_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ nm_setting_connection_get_uuid (s_con),
+ KEYRING_SN_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ setting_name,
+ NULL);
+ if ((ret != GNOME_KEYRING_RESULT_OK) || (g_list_length (found_list) == 0))
+ return NULL;
+
+ secrets = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, destroy_gvalue);
+
+ for (iter = found_list; iter != NULL; iter = g_list_next (iter)) {
+ GnomeKeyringFound *found = (GnomeKeyringFound *) iter->data;
+ int i;
+ const char *key_name = NULL;
+
+ for (i = 0; i < found->attributes->len; i++) {
+ GnomeKeyringAttribute *attr;
+
+ attr = &(gnome_keyring_attribute_list_index (found->attributes, i));
+ if ( (strcmp (attr->name, KEYRING_SK_TAG) == 0)
+ && (attr->type == GNOME_KEYRING_ATTRIBUTE_TYPE_STRING)) {
+ key_name = attr->value.string;
+ break;
+ }
+ }
+
+ if (key_name == NULL) {
+ g_set_error (error,
+ NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_SECRETS_UNAVAILABLE,
+ "%s.%d - Internal error; keyring item '%s/%s' didn't "
+ "have a 'setting-key' attribute.",
+ __FILE__, __LINE__, connection_name, setting_name);
+ break;
+ }
+
+ g_hash_table_insert (secrets,
+ g_strdup (key_name),
+ string_to_gvalue (found->secret));
+ }
+
+ /* The phase1 and phase2 private key are still marked as 'secret' for
+ * backwards compat, but since they don't get stored in the keyring since
+ * they aren't really secret (because we now use paths everywhere and not
+ * the decrypted private key like 0.7.x). So we need to grab them out of
+ * GConf and add them to the returned secret hash.
+ */
+ /* Private key path */
+ path = NULL;
+ if (nm_gconf_get_string_helper (priv->client,
+ priv->dir,
+ NM_SETTING_802_1X_PRIVATE_KEY,
+ NM_SETTING_802_1X_SETTING_NAME,
+ &path)) {
+ g_hash_table_insert (secrets,
+ g_strdup (NM_SETTING_802_1X_PRIVATE_KEY),
+ path_to_gvalue (path));
+ g_free (path);
+ }
+
+ /* Phase2 private key path */
+ path = NULL;
+ if (nm_gconf_get_string_helper (priv->client,
+ priv->dir,
+ NM_SETTING_802_1X_PHASE2_PRIVATE_KEY,
+ NM_SETTING_802_1X_SETTING_NAME,
+ &path)) {
+ g_hash_table_insert (secrets,
+ g_strdup (NM_SETTING_802_1X_PHASE2_PRIVATE_KEY),
+ path_to_gvalue (path));
+ g_free (path);
+ }
+
+ if (*error) {
+ nm_warning ("%s: error reading secrets: (%d) %s", __func__,
+ (*error)->code, (*error)->message);
+ g_hash_table_destroy (secrets);
+ secrets = NULL;
+ }
+
+ gnome_keyring_found_list_free (found_list);
+ return secrets;
+}
+
+static void
+delete_done (GnomeKeyringResult result, gpointer user_data)
+{
+}
+
+static void
+clear_keyring_items (NMGConfConnection *self)
+{
+ NMSettingConnection *s_con;
+ const char *uuid;
+ GList *found_list = NULL;
+ GnomeKeyringResult ret;
+ GList *iter;
+
+ g_return_if_fail (self != NULL);
+
+ s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (self), NM_TYPE_SETTING_CONNECTION);
+ g_return_if_fail (s_con != NULL);
+
+ uuid = nm_setting_connection_get_uuid (s_con);
+ g_return_if_fail (uuid != NULL);
+
+ pre_keyring_callback ();
+
+ ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
+ &found_list,
+ KEYRING_UUID_TAG,
+ GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
+ uuid,
+ NULL);
+ if (ret == GNOME_KEYRING_RESULT_OK) {
+ for (iter = found_list; iter != NULL; iter = g_list_next (iter)) {
+ GnomeKeyringFound *found = (GnomeKeyringFound *) iter->data;
+
+ gnome_keyring_item_delete (found->keyring,
+ found->item_id,
+ delete_done,
+ NULL,
+ NULL);
+ }
+ gnome_keyring_found_list_free (found_list);
+ }
+}
+
+/******************************************************/
+
+static gboolean
+update (NMSettingsConnectionInterface *connection,
+ NMSettingsConnectionInterfaceUpdateFunc callback,
+ gpointer user_data)
+{
+ NMGConfConnectionPrivate *priv = NM_GCONF_CONNECTION_GET_PRIVATE (connection);
+
+ nm_gconf_write_connection (NM_CONNECTION (connection),
+ priv->client,
+ priv->dir);
+ gconf_client_notify (priv->client, priv->dir);
+ gconf_client_suggest_sync (priv->client, NULL);
+
+ return parent_settings_connection_iface->update (connection, callback, user_data);
+}
+
+static gboolean
+do_delete (NMSettingsConnectionInterface *connection,
+ NMSettingsConnectionInterfaceDeleteFunc callback,
+ gpointer user_data)
+{
+ NMGConfConnectionPrivate *priv = NM_GCONF_CONNECTION_GET_PRIVATE (connection);
+ gboolean success;
+ GError *error = NULL;
+
+ /* Clean up keyring keys */
+ clear_keyring_items (NM_GCONF_CONNECTION (connection));
+
+ success = gconf_client_recursive_unset (priv->client, priv->dir, 0, &error);
+ if (!success) {
+ callback (connection, error, user_data);
+ g_error_free (error);
+ return FALSE;
+ }
+ gconf_client_suggest_sync (priv->client, NULL);
+
+ return parent_settings_connection_iface->delete (connection, callback, user_data);
+}
+
+static gboolean
+internal_get_secrets (NMSettingsConnectionInterface *connection,
+ const char *setting_name,
+ const char **hints,
+ gboolean request_new,
+ gboolean local,
+ NMNewSecretsRequestedFunc callback,
+ gpointer callback_data,
+ GError **error)
+{
+ NMGConfConnection *self = NM_GCONF_CONNECTION (connection);
+ GHashTable *settings = NULL;
+ GHashTable *secrets = NULL;
+ NMSettingConnection *s_con;
+ NMSetting *setting;
+ const char *connection_id;
+ const char *connection_type;
+
+ setting = nm_connection_get_setting_by_name (NM_CONNECTION (self), setting_name);
+ if (!setting) {
+ g_set_error (error,
+ NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION,
+ "%s.%d - Connection didn't have requested setting '%s'.",
+ __FILE__, __LINE__, setting_name);
+ return FALSE;
+ }
+
+ s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (self), NM_TYPE_SETTING_CONNECTION);
+ g_assert (s_con);
+ connection_id = nm_setting_connection_get_id (s_con);
+ connection_type = nm_setting_connection_get_connection_type (s_con);
+
+ if (!s_con || !connection_id || !strlen (connection_id) || !connection_type) {
+ g_set_error (error,
+ NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION,
+ "%s.%d - Connection didn't have required '"
+ NM_SETTING_CONNECTION_SETTING_NAME
+ "' setting , or the connection name was invalid.",
+ __FILE__, __LINE__);
+ return FALSE;
+ }
+
+ /* Only try to get new secrets for D-Bus requests */
+ if (local) {
+ secrets = nm_gconf_connection_get_keyring_items (self, setting_name, error);
+ if (!secrets && error && *error)
+ return FALSE;
+ } else {
+ /* VPN passwords are handled by the VPN plugin's auth dialog */
+ if (!strcmp (connection_type, NM_SETTING_VPN_SETTING_NAME))
+ goto get_secrets;
+
+ if (request_new) {
+ nm_info ("New secrets for %s/%s requested; ask the user",
+ connection_id, setting_name);
+ nm_connection_clear_secrets (NM_CONNECTION (self));
+ goto get_secrets;
+ }
+
+ secrets = nm_gconf_connection_get_keyring_items (self, setting_name, error);
+ if (!secrets) {
+ if (error && *error)
+ return FALSE;
+
+ nm_info ("No keyring secrets found for %s/%s; asking user.",
+ connection_id, setting_name);
+ goto get_secrets;
+ }
+
+ if (g_hash_table_size (secrets) == 0) {
+ g_hash_table_destroy (secrets);
+ nm_warning ("%s.%d - Secrets were found for setting '%s' but none"
+ " were valid.", __FILE__, __LINE__, setting_name);
+ goto get_secrets;
+ }
+
+ /* If there were hints, and none of the hints were returned by the keyring,
+ * get some new secrets.
+ */
+ if (hints && g_strv_length ((char **) hints)) {
+ GHashTableIter iter;
+ gpointer key, value;
+ gboolean found = FALSE;
+
+ g_hash_table_iter_init (&iter, secrets);
+ while (g_hash_table_iter_next (&iter, &key, &value) && !found) {
+ const char **hint = hints;
+
+ while (!found && *hint) {
+ if (!strcmp (*hint, (const char *) key) && value && G_IS_VALUE (value)) {
+ found = TRUE;
+ break;
+ }
+ hint++;
+ }
+ }
+
+ if (!found) {
+ g_hash_table_destroy (secrets);
+ goto get_secrets;
+ }
+ }
+ }
+
+ /* Returned secrets are a{sa{sv}}; this is the outer a{s...} hash that
+ * will contain all the individual settings hashes.
+ */
+ settings = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free,
+ (GDestroyNotify) g_hash_table_destroy);
+ if (secrets)
+ g_hash_table_insert (settings, g_strdup (setting_name), secrets);
+ callback (NM_SETTINGS_CONNECTION_INTERFACE (self), settings, NULL, callback_data);
+ g_hash_table_destroy (settings);
+ return TRUE;
+
+ get_secrets:
+ g_signal_emit (self,
+ signals[NEW_SECRETS_REQUESTED],
+ 0,
+ setting_name,
+ hints,
+ request_new,
+ callback,
+ callback_data);
+ return TRUE;
+}
+
+typedef struct {
+ NMSettingsConnectionInterfaceGetSecretsFunc callback;
+ gpointer callback_data;
+} GetSecretsInfo;
+
+static void
+get_secrets_cb (NMSettingsConnectionInterface *connection,
+ GHashTable *settings,
+ GError *error,
+ gpointer user_data)
+{
+ GetSecretsInfo *info = user_data;
+
+ info->callback (NM_SETTINGS_CONNECTION_INTERFACE (connection), settings, error, info->callback_data);
+ g_free (info);
+}
+
+static gboolean
+get_secrets (NMSettingsConnectionInterface *connection,
+ const char *setting_name,
+ const char **hints,
+ gboolean request_new,
+ NMSettingsConnectionInterfaceGetSecretsFunc callback,
+ gpointer user_data)
+{
+ GetSecretsInfo *info;
+ GError *error = NULL;
+
+ info = g_malloc0 (sizeof (GetSecretsInfo));
+ info->callback = callback;
+ info->callback_data = user_data;
+
+ if (!internal_get_secrets (connection,
+ setting_name,
+ hints,
+ request_new,
+ TRUE,
+ get_secrets_cb,
+ info,
+ &error)) {
+ callback (NM_SETTINGS_CONNECTION_INTERFACE (connection), NULL, error, user_data);
+ g_error_free (error);
+ g_free (info);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/******************************************************/
+
+static gboolean
+is_dbus_request_authorized (DBusGMethodInvocation *context,
+ gboolean allow_user,
+ GError **error)
+{
+ DBusGConnection *bus = NULL;
+ DBusConnection *connection = NULL;
+ char *sender = NULL;
+ gulong sender_uid = G_MAXULONG;
+ DBusError dbus_error;
+ gboolean success = FALSE;
+
+ sender = dbus_g_method_get_sender (context);
+ if (!sender) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
+ "%s", "Could not determine D-Bus requestor");
+ goto out;
+ }
+
+ bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
+ if (!bus) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
+ "%s", "Could not get the system bus");
+ goto out;
+ }
+ connection = dbus_g_connection_get_connection (bus);
+ if (!connection) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
+ "%s", "Could not get the D-Bus system bus");
+ goto out;
+ }
+
+ dbus_error_init (&dbus_error);
+ sender_uid = dbus_bus_get_unix_user (connection, sender, &dbus_error);
+ if (dbus_error_is_set (&dbus_error)) {
+ dbus_error_free (&dbus_error);
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_PERMISSION_DENIED,
+ "%s", "Could not determine the Unix user ID of the requestor");
+ goto out;
+ }
+
+ /* And finally, the actual UID check */
+ if ( (allow_user && (sender_uid == geteuid()))
+ || (sender_uid == 0))
+ success = TRUE;
+ else {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_PERMISSION_DENIED,
+ "%s", "Requestor UID does not match the UID of the user settings service");
+ }
+
+ out:
+ if (bus)
+ dbus_g_connection_unref (bus);
+ g_free (sender);
+ return success;
+}
+
+static void
+con_update_cb (NMSettingsConnectionInterface *connection,
+ GError *error,
+ gpointer user_data)
+{
+ DBusGMethodInvocation *context = user_data;
+
+ if (error)
+ dbus_g_method_return_error (context, error);
+ else
+ dbus_g_method_return (context);
+}
+
+static void
+dbus_update (NMExportedConnection *exported,
+ GHashTable *new_settings,
+ DBusGMethodInvocation *context)
+{
+ NMGConfConnection *self = NM_GCONF_CONNECTION (exported);
+ NMConnection *new;
+ gboolean success = FALSE;
+ GError *error = NULL;
+
+ /* Restrict Update to execution by the current user and root for DBus invocation */
+ if (!is_dbus_request_authorized (context, TRUE, &error)) {
+ dbus_g_method_return_error (context, error);
+ g_error_free (error);
+ return;
+ }
+
+ new = nm_connection_new_from_hash (new_settings, &error);
+ if (!new) {
+ dbus_g_method_return_error (context, error);
+ g_error_free (error);
+ return;
+ }
+ g_object_unref (new);
+
+ success = nm_connection_replace_settings (NM_CONNECTION (self), new_settings, NULL);
+ /* Settings better be valid; we verified them above */
+ g_assert (success);
+
+ nm_settings_connection_interface_update (NM_SETTINGS_CONNECTION_INTERFACE (self),
+ con_update_cb,
+ context);
+}
+
+static void
+con_delete_cb (NMSettingsConnectionInterface *connection,
+ GError *error,
+ gpointer user_data)
+{
+ DBusGMethodInvocation *context = user_data;
+
+ if (error)
+ dbus_g_method_return_error (context, error);
+ else
+ dbus_g_method_return (context);
+}
+
+static void
+dbus_delete (NMExportedConnection *exported,
+ DBusGMethodInvocation *context)
+{
+ NMGConfConnection *self = NM_GCONF_CONNECTION (exported);
+ GError *error = NULL;
+
+ /* Restrict Update to execution by the current user and root for DBus invocation */
+ if (!is_dbus_request_authorized (context, TRUE, &error)) {
+ dbus_g_method_return_error (context, error);
+ g_error_free (error);
+ return;
+ }
+
+ nm_settings_connection_interface_delete (NM_SETTINGS_CONNECTION_INTERFACE (self),
+ con_delete_cb,
+ context);
+}
+
+static void
+dbus_get_secrets_cb (NMSettingsConnectionInterface *connection,
+ GHashTable *settings,
+ GError *error,
+ gpointer user_data)
+{
+ DBusGMethodInvocation *context = user_data;
+
+ if (error)
+ dbus_g_method_return_error (context, error);
+ else
+ dbus_g_method_return (context, settings);
+}
+
+static void
+dbus_get_secrets (NMExportedConnection *connection,
+ const gchar *setting_name,
+ const gchar **hints,
+ gboolean request_new,
+ DBusGMethodInvocation *context)
+{
+ GError *error = NULL;
+
+ /* Restrict GetSecrets to execution by root for DBus invocation */
+ if (!is_dbus_request_authorized (context, FALSE, &error)) {
+ dbus_g_method_return_error (context, error);
+ g_error_free (error);
+ return;
+ }
+
+ if (!internal_get_secrets (NM_SETTINGS_CONNECTION_INTERFACE (connection),
+ setting_name,
+ hints,
+ request_new,
+ FALSE,
+ dbus_get_secrets_cb,
+ context,
+ &error)) {
+ dbus_g_method_return_error (context, error);
+ g_error_free (error);
+ }
+}
+
+static GHashTable *
+dbus_get_settings (NMExportedConnection *connection, GError **error)
+{
+ GHashTable *settings;
+ const char *user_name;
+ NMSettingVPN *s_vpn;
+ gboolean added = FALSE;
+
+ /* Insert the default VPN username when NM gets the connection; it doesn't
+ * get stored in GConf since it's always available and could change at any
+ * time, so it's inserted on-the-fly.
+ */
+ s_vpn = NM_SETTING_VPN (nm_connection_get_setting (NM_CONNECTION (connection), NM_TYPE_SETTING_VPN));
+ if (s_vpn) {
+ user_name = g_get_user_name ();
+ g_assert (g_utf8_validate (user_name, -1, NULL));
+ g_object_set (s_vpn, NM_SETTING_VPN_USER_NAME, user_name, NULL);
+ added = TRUE;
+ }
+
+ settings = NM_EXPORTED_CONNECTION_CLASS (nm_gconf_connection_parent_class)->get_settings (connection, error);
+
+ if (added)
+ g_object_set (s_vpn, NM_SETTING_VPN_USER_NAME, NULL, NULL);
+
+ return settings;
+}
+
+/************************************************************/
+
+static void
+settings_connection_interface_init (NMSettingsConnectionInterface *iface)
+{
+ parent_settings_connection_iface = g_type_interface_peek_parent (iface);
+
+ iface->update = update;
+ iface->delete = do_delete;
+ iface->get_secrets = get_secrets;
+}
+
+static void
+nm_gconf_connection_init (NMGConfConnection *connection)
+{
+}
+
+static GObject *
+constructor (GType type,
+ guint n_construct_params,
+ GObjectConstructParam *construct_params)
+{
+ GObject *object;
+ NMGConfConnectionPrivate *priv;
+
+ object = G_OBJECT_CLASS (nm_gconf_connection_parent_class)->constructor (type, n_construct_params, construct_params);
+
+ if (!object)
+ return NULL;
+
+ priv = NM_GCONF_CONNECTION_GET_PRIVATE (object);
+
+ if (!priv->client) {
+ nm_warning ("GConfClient not provided.");
+ g_object_unref (object);
+ return NULL;
+ }
+
+ if (!priv->dir) {
+ nm_warning ("GConf directory not provided.");
+ g_object_unref (object);
+ return NULL;
+ }
+
+ return object;
+}
+
+static void
+dispose (GObject *object)
+{
+ NMGConfConnectionPrivate *priv = NM_GCONF_CONNECTION_GET_PRIVATE (object);
+
+ if (priv->disposed)
+ return;
+ priv->disposed = TRUE;
+
+ g_object_unref (priv->client);
+
+ G_OBJECT_CLASS (nm_gconf_connection_parent_class)->dispose (object);
+}
+
+static void
+finalize (GObject *object)
+{
+ NMGConfConnectionPrivate *priv = NM_GCONF_CONNECTION_GET_PRIVATE (object);
+
+ g_free (priv->dir);
+
+ G_OBJECT_CLASS (nm_gconf_connection_parent_class)->finalize (object);
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMGConfConnectionPrivate *priv = NM_GCONF_CONNECTION_GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ /* Construct only */
+ priv->client = GCONF_CLIENT (g_value_dup_object (value));
+ break;
+ case PROP_DIR:
+ /* Construct only */
+ priv->dir = g_value_dup_string (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMGConfConnectionPrivate *priv = NM_GCONF_CONNECTION_GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ g_value_set_object (value, priv->client);
+ break;
+ case PROP_DIR:
+ g_value_set_string (value, priv->dir);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+nm_gconf_connection_class_init (NMGConfConnectionClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+ NMExportedConnectionClass *ec_class = NM_EXPORTED_CONNECTION_CLASS (class);
+
+ g_type_class_add_private (class, sizeof (NMGConfConnectionPrivate));
+
+ /* Virtual methods */
+ object_class->constructor = constructor;
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+ object_class->finalize = finalize;
+
+ ec_class->update = dbus_update;
+ ec_class->delete = dbus_delete;
+ ec_class->get_secrets = dbus_get_secrets;
+ ec_class->get_settings = dbus_get_settings;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_CLIENT,
+ g_param_spec_object (NM_GCONF_CONNECTION_CLIENT,
+ "GConfClient",
+ "GConfClient",
+ GCONF_TYPE_CLIENT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property
+ (object_class, PROP_DIR,
+ g_param_spec_string (NM_GCONF_CONNECTION_DIR,
+ "GConf directory",
+ "GConf directory",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ /* Signals */
+ signals[NEW_SECRETS_REQUESTED] =
+ g_signal_new ("new-secrets-requested",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMGConfConnectionClass, new_secrets_requested),
+ NULL, NULL,
+ nma_marshal_VOID__STRING_POINTER_BOOLEAN_POINTER_POINTER,
+ G_TYPE_NONE, 5,
+ G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN, G_TYPE_POINTER, G_TYPE_POINTER);
+}
diff --git a/libnm-gtk/nm-gconf-connection.h b/libnm-gtk/nm-gconf-connection.h
new file mode 100644
index 0000000..f6583e0
--- /dev/null
+++ b/libnm-gtk/nm-gconf-connection.h
@@ -0,0 +1,79 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2008 Novell, Inc.
+ * (C) Copyright 2008 Red Hat, Inc.
+ */
+
+#ifndef NM_GCONF_CONNECTION_H
+#define NM_GCONF_CONNECTION_H
+
+#include <gconf/gconf-client.h>
+#include <dbus/dbus-glib.h>
+#include <nm-connection.h>
+#include <nm-exported-connection.h>
+#include <nm-settings-connection-interface.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_GCONF_CONNECTION (nm_gconf_connection_get_type ())
+#define NM_GCONF_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_GCONF_CONNECTION, NMGConfConnection))
+#define NM_GCONF_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_GCONF_CONNECTION, NMGConfConnectionClass))
+#define NM_IS_GCONF_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_GCONF_CONNECTION))
+#define NM_IS_GCONF_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_GCONF_CONNECTION))
+#define NM_GCONF_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_GCONF_CONNECTION, NMGConfConnectionClass))
+
+#define NM_GCONF_CONNECTION_CLIENT "client"
+#define NM_GCONF_CONNECTION_DIR "dir"
+
+typedef struct {
+ NMExportedConnection parent;
+} NMGConfConnection;
+
+typedef void (*NMNewSecretsRequestedFunc) (NMSettingsConnectionInterface *connection,
+ GHashTable *settings,
+ GError *error,
+ gpointer user_data);
+
+typedef struct {
+ NMExportedConnectionClass parent;
+
+ /* Signals */
+ void (*new_secrets_requested) (NMGConfConnection *self,
+ const char *setting_name,
+ const char **hints,
+ gboolean ask_user,
+ NMNewSecretsRequestedFunc callback,
+ gpointer callback_data);
+} NMGConfConnectionClass;
+
+GType nm_gconf_connection_get_type (void);
+
+NMGConfConnection *nm_gconf_connection_new (GConfClient *client,
+ const char *conf_dir);
+
+NMGConfConnection *nm_gconf_connection_new_from_connection (GConfClient *client,
+ const char *conf_dir,
+ NMConnection *connection);
+
+gboolean nm_gconf_connection_gconf_changed (NMGConfConnection *self);
+
+const char *nm_gconf_connection_get_gconf_path (NMGConfConnection *self);
+
+G_END_DECLS
+
+#endif /* NM_GCONF_CONNECTION_H */
diff --git a/libnm-gtk/nm-gconf-settings.c b/libnm-gtk/nm-gconf-settings.c
new file mode 100644
index 0000000..bd31cba
--- /dev/null
+++ b/libnm-gtk/nm-gconf-settings.c
@@ -0,0 +1,525 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2008 Novell, Inc.
+ */
+
+#include <string.h>
+#include <stdio.h>
+
+#include "nm-gconf-settings.h"
+#include "gconf-helpers.h"
+#include "nma-marshal.h"
+#include "nm-utils.h"
+
+G_DEFINE_TYPE (NMGConfSettings, nm_gconf_settings, NM_TYPE_SETTINGS_SERVICE)
+
+#define NM_GCONF_SETTINGS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_GCONF_SETTINGS, NMGConfSettingsPrivate))
+
+typedef struct {
+ GConfClient *client;
+ guint conf_notify_id;
+ GSList *connections;
+ guint read_connections_id;
+ GHashTable *pending_changes;
+ gboolean reading_connections;
+
+ gboolean disposed;
+} NMGConfSettingsPrivate;
+
+enum {
+ NEW_SECRETS_REQUESTED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+
+NMGConfSettings *
+nm_gconf_settings_new (DBusGConnection *bus)
+{
+ return (NMGConfSettings *) g_object_new (NM_TYPE_GCONF_SETTINGS,
+ NM_SETTINGS_SERVICE_SCOPE, NM_CONNECTION_SCOPE_USER,
+ NM_SETTINGS_SERVICE_BUS, bus,
+ NULL);
+}
+
+static void
+connection_new_secrets_requested_cb (NMGConfConnection *connection,
+ const char *setting_name,
+ const char **hints,
+ gboolean ask_user,
+ NMNewSecretsRequestedFunc callback,
+ gpointer callback_data,
+ gpointer user_data)
+{
+ NMGConfSettings *self = NM_GCONF_SETTINGS (user_data);
+
+ /* Re-emit the signal to listeners so they don't have to know about
+ * every single connection
+ */
+ g_signal_emit (self,
+ signals[NEW_SECRETS_REQUESTED],
+ 0,
+ connection,
+ setting_name,
+ hints,
+ ask_user,
+ callback,
+ callback_data);
+}
+
+static void
+connection_removed (NMExportedConnection *connection, gpointer user_data)
+{
+ NMGConfSettingsPrivate *priv = NM_GCONF_SETTINGS_GET_PRIVATE (user_data);
+
+ priv->connections = g_slist_remove (priv->connections, connection);
+ g_object_unref (connection);
+}
+
+static void
+internal_add_connection (NMGConfSettings *self, NMGConfConnection *connection)
+{
+ NMGConfSettingsPrivate *priv = NM_GCONF_SETTINGS_GET_PRIVATE (self);
+ DBusGConnection *bus = NULL;
+
+ g_return_if_fail (connection != NULL);
+ g_return_if_fail (NM_IS_GCONF_CONNECTION (connection));
+
+ priv->connections = g_slist_prepend (priv->connections, connection);
+ g_signal_connect (connection, "new-secrets-requested",
+ G_CALLBACK (connection_new_secrets_requested_cb),
+ self);
+
+ g_signal_connect (connection, "removed", G_CALLBACK (connection_removed), self);
+
+ g_object_get (G_OBJECT (self), NM_SETTINGS_SERVICE_BUS, &bus, NULL);
+ if (bus) {
+ nm_settings_service_export_connection (NM_SETTINGS_SERVICE (self),
+ NM_SETTINGS_CONNECTION_INTERFACE (connection));
+ dbus_g_connection_unref (bus);
+ }
+
+ if (!priv->reading_connections)
+ /* Don't emit the signal when doing the initial population */
+ g_signal_emit_by_name (self, NM_SETTINGS_INTERFACE_NEW_CONNECTION, NM_CONNECTION (connection));
+
+ g_return_if_fail (NM_IS_GCONF_CONNECTION (priv->connections->data));
+}
+
+static void
+update_cb (NMSettingsConnectionInterface *connection,
+ GError *error,
+ gpointer user_data)
+{
+ if (error) {
+ g_warning ("%s: %s:%d error updating connection %s: (%d) %s",
+ __func__, __FILE__, __LINE__,
+ nm_gconf_connection_get_gconf_path (NM_GCONF_CONNECTION (connection)),
+ error ? error->code : -1,
+ (error && error->message) ? error->message : "(unknown)");
+ }
+}
+
+NMGConfConnection *
+nm_gconf_settings_add_connection (NMGConfSettings *self, NMConnection *connection)
+{
+ NMGConfSettingsPrivate *priv;
+ NMGConfConnection *exported;
+ guint32 i = 0;
+ char *path = NULL;
+
+ g_return_val_if_fail (NM_IS_GCONF_SETTINGS (self), NULL);
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
+
+ priv = NM_GCONF_SETTINGS_GET_PRIVATE (self);
+
+ /* Find free GConf directory */
+ while (i++ < G_MAXUINT32) {
+ char buf[255];
+
+ snprintf (&buf[0], 255, GCONF_PATH_CONNECTIONS"/%d", i);
+ if (!gconf_client_dir_exists (priv->client, buf, NULL)) {
+ path = g_strdup (buf);
+ break;
+ }
+ }
+
+ if (path == NULL) {
+ nm_warning ("Couldn't find free GConf directory for new connection.");
+ return NULL;
+ }
+
+ exported = nm_gconf_connection_new_from_connection (priv->client, path, connection);
+ g_free (path);
+ if (exported) {
+ internal_add_connection (self, exported);
+
+ /* Must save connection to GConf _after_ adding it to the connections
+ * list to avoid races with GConf notifications.
+ */
+ nm_settings_connection_interface_update (NM_SETTINGS_CONNECTION_INTERFACE (exported), update_cb, NULL);
+ }
+
+ return exported;
+}
+
+static gboolean
+is_dbus_request_authorized (DBusGMethodInvocation *context,
+ GError **error)
+{
+ DBusGConnection *bus = NULL;
+ DBusConnection *connection = NULL;
+ char *sender = NULL;
+ gulong sender_uid = G_MAXULONG;
+ DBusError dbus_error;
+ gboolean success = FALSE;
+
+ sender = dbus_g_method_get_sender (context);
+ if (!sender) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
+ "%s", "Could not determine D-Bus requestor");
+ goto out;
+ }
+
+ bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
+ if (!bus) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
+ "%s", "Could not get the system bus");
+ goto out;
+ }
+ connection = dbus_g_connection_get_connection (bus);
+ if (!connection) {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
+ "%s", "Could not get the D-Bus system bus");
+ goto out;
+ }
+
+ dbus_error_init (&dbus_error);
+ sender_uid = dbus_bus_get_unix_user (connection, sender, &dbus_error);
+ if (dbus_error_is_set (&dbus_error)) {
+ dbus_error_free (&dbus_error);
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_PERMISSION_DENIED,
+ "%s", "Could not determine the Unix user ID of the requestor");
+ goto out;
+ }
+
+ /* And finally, the actual UID check */
+ if (sender_uid == geteuid ())
+ success = TRUE;
+ else {
+ g_set_error (error, NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_PERMISSION_DENIED,
+ "%s", "Requestor UID does not match the UID of the user settings service");
+ }
+
+ out:
+ if (bus)
+ dbus_g_connection_unref (bus);
+
+ g_free (sender);
+ return success;
+}
+
+static void
+add_connection (NMSettingsService *settings,
+ NMConnection *connection,
+ DBusGMethodInvocation *context, /* Only present for D-Bus calls */
+ NMSettingsAddConnectionFunc callback,
+ gpointer user_data)
+{
+ NMGConfSettings *self = NM_GCONF_SETTINGS (settings);
+ GError *error = NULL;
+
+ if (context)
+ is_dbus_request_authorized (context, &error);
+
+ if (!error)
+ nm_gconf_settings_add_connection (self, connection);
+
+ callback (NM_SETTINGS_INTERFACE (settings), error, user_data);
+ if (error)
+ g_error_free (error);
+}
+
+static NMGConfConnection *
+get_connection_by_gconf_path (NMGConfSettings *self, const char *path)
+{
+ NMGConfSettingsPrivate *priv;
+ GSList *iter;
+
+ g_return_val_if_fail (NM_IS_GCONF_SETTINGS (self), NULL);
+ g_return_val_if_fail (path != NULL, NULL);
+
+ priv = NM_GCONF_SETTINGS_GET_PRIVATE (self);
+ for (iter = priv->connections; iter; iter = iter->next) {
+ NMGConfConnection *connection = NM_GCONF_CONNECTION (iter->data);
+ const char *gconf_path;
+
+ gconf_path = nm_gconf_connection_get_gconf_path (connection);
+ if (gconf_path && !strcmp (gconf_path, path))
+ return connection;
+ }
+
+ return NULL;
+}
+
+static void
+read_connections (NMGConfSettings *settings)
+{
+ NMGConfSettingsPrivate *priv = NM_GCONF_SETTINGS_GET_PRIVATE (settings);
+ GSList *dir_list;
+ GSList *iter;
+
+ dir_list = nm_gconf_get_all_connections (priv->client);
+ if (!dir_list)
+ return;
+
+ priv->reading_connections = TRUE;
+
+ for (iter = dir_list; iter; iter = iter->next) {
+ char *dir = (char *) iter->data;
+ NMGConfConnection *connection;
+
+ connection = nm_gconf_connection_new (priv->client, dir);
+ if (connection)
+ internal_add_connection (settings, connection);
+ g_free (dir);
+ }
+
+ priv->reading_connections = FALSE;
+
+ g_slist_free (dir_list);
+ priv->connections = g_slist_reverse (priv->connections);
+}
+
+static gboolean
+read_connections_cb (gpointer data)
+{
+ NM_GCONF_SETTINGS_GET_PRIVATE (data)->read_connections_id = 0;
+ read_connections (NM_GCONF_SETTINGS (data));
+
+ return FALSE;
+}
+
+static GSList *
+list_connections (NMSettingsService *settings)
+{
+ NMGConfSettingsPrivate *priv = NM_GCONF_SETTINGS_GET_PRIVATE (settings);
+
+ if (priv->read_connections_id) {
+ g_source_remove (priv->read_connections_id);
+ priv->read_connections_id = 0;
+
+ read_connections (NM_GCONF_SETTINGS (settings));
+ }
+
+ return g_slist_copy (priv->connections);
+}
+
+typedef struct {
+ NMGConfSettings *settings;
+ char *path;
+} ConnectionChangedInfo;
+
+static void
+connection_changed_info_destroy (gpointer data)
+{
+ ConnectionChangedInfo *info = (ConnectionChangedInfo *) data;
+
+ g_free (info->path);
+ g_free (info);
+}
+
+static gboolean
+connection_changes_done (gpointer data)
+{
+ ConnectionChangedInfo *info = (ConnectionChangedInfo *) data;
+ NMGConfSettingsPrivate *priv = NM_GCONF_SETTINGS_GET_PRIVATE (info->settings);
+ NMGConfConnection *connection;
+
+ connection = get_connection_by_gconf_path (info->settings, info->path);
+
+ if (gconf_client_dir_exists (priv->client, info->path, NULL)) {
+ if (connection) {
+ /* Update */
+ if (!nm_gconf_connection_gconf_changed (connection))
+ connection_removed (NM_EXPORTED_CONNECTION (connection), info->settings);
+ } else {
+ /* Add */
+ connection = nm_gconf_connection_new (priv->client, info->path);
+ if (connection)
+ internal_add_connection (info->settings, connection);
+ }
+ } else {
+ if (connection)
+ /* Remove */
+ connection_removed (NM_EXPORTED_CONNECTION (connection), info->settings);
+ /* else already removed */
+ }
+
+ g_hash_table_remove (priv->pending_changes, info->path);
+
+ return FALSE;
+}
+
+static void
+connections_changed_cb (GConfClient *conf_client,
+ guint cnxn_id,
+ GConfEntry *entry,
+ gpointer user_data)
+{
+ NMGConfSettings *self = NM_GCONF_SETTINGS (user_data);
+ NMGConfSettingsPrivate *priv = NM_GCONF_SETTINGS_GET_PRIVATE (self);
+ char **dirs = NULL;
+ guint len;
+ char *path = NULL;
+
+ dirs = g_strsplit (gconf_entry_get_key (entry), "/", -1);
+ len = g_strv_length (dirs);
+ if (len < 5)
+ goto out;
+
+ if ( strcmp (dirs[0], "")
+ || strcmp (dirs[1], "system")
+ || strcmp (dirs[2], "networking")
+ || strcmp (dirs[3], "connections"))
+ goto out;
+
+ path = g_strconcat ("/", dirs[1], "/", dirs[2], "/", dirs[3], "/", dirs[4], NULL);
+
+ if (!g_hash_table_lookup (priv->pending_changes, path)) {
+ ConnectionChangedInfo *info;
+ guint id;
+
+ info = g_new (ConnectionChangedInfo, 1);
+ info->settings = self;
+ info->path = path;
+ path = NULL;
+
+ id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 500,
+ connection_changes_done, info,
+ connection_changed_info_destroy);
+ g_hash_table_insert (priv->pending_changes, info->path, GUINT_TO_POINTER (id));
+ }
+
+ out:
+ g_free (path);
+ g_strfreev (dirs);
+}
+
+static void
+remove_pending_change (gpointer data)
+{
+ g_source_remove (GPOINTER_TO_UINT (data));
+}
+
+/************************************************************/
+
+static void
+nm_gconf_settings_init (NMGConfSettings *self)
+{
+ NMGConfSettingsPrivate *priv = NM_GCONF_SETTINGS_GET_PRIVATE (self);
+
+ priv->client = gconf_client_get_default ();
+ priv->pending_changes = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, remove_pending_change);
+
+ gconf_client_add_dir (priv->client,
+ GCONF_PATH_CONNECTIONS,
+ GCONF_CLIENT_PRELOAD_NONE,
+ NULL);
+
+ priv->conf_notify_id = gconf_client_notify_add (priv->client,
+ GCONF_PATH_CONNECTIONS,
+ (GConfClientNotifyFunc) connections_changed_cb,
+ self,
+ NULL, NULL);
+}
+
+static GObject *
+constructor (GType type,
+ guint n_construct_params,
+ GObjectConstructParam *construct_params)
+{
+ GObject *object;
+
+ object = G_OBJECT_CLASS (nm_gconf_settings_parent_class)->constructor (type, n_construct_params, construct_params);
+ if (object)
+ NM_GCONF_SETTINGS_GET_PRIVATE (object)->read_connections_id = g_idle_add (read_connections_cb, object);
+ return object;
+}
+
+static void
+dispose (GObject *object)
+{
+ NMGConfSettingsPrivate *priv = NM_GCONF_SETTINGS_GET_PRIVATE (object);
+
+ if (priv->disposed)
+ return;
+
+ priv->disposed = TRUE;
+
+ g_hash_table_destroy (priv->pending_changes);
+
+ if (priv->read_connections_id) {
+ g_source_remove (priv->read_connections_id);
+ priv->read_connections_id = 0;
+ }
+
+ gconf_client_notify_remove (priv->client, priv->conf_notify_id);
+ gconf_client_remove_dir (priv->client, GCONF_PATH_CONNECTIONS, NULL);
+
+ g_slist_foreach (priv->connections, (GFunc) g_object_unref, NULL);
+ g_slist_free (priv->connections);
+
+ g_object_unref (priv->client);
+
+ G_OBJECT_CLASS (nm_gconf_settings_parent_class)->dispose (object);
+}
+
+static void
+nm_gconf_settings_class_init (NMGConfSettingsClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+ NMSettingsServiceClass *settings_class = NM_SETTINGS_SERVICE_CLASS (class);
+
+ g_type_class_add_private (class, sizeof (NMGConfSettingsPrivate));
+
+ /* Virtual methods */
+ object_class->constructor = constructor;
+ object_class->dispose = dispose;
+
+ settings_class->list_connections = list_connections;
+ settings_class->add_connection = add_connection;
+
+ /* Signals */
+ signals[NEW_SECRETS_REQUESTED] =
+ g_signal_new ("new-secrets-requested",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMGConfSettingsClass, new_secrets_requested),
+ NULL, NULL,
+ nma_marshal_VOID__OBJECT_STRING_POINTER_BOOLEAN_POINTER_POINTER,
+ G_TYPE_NONE, 6,
+ G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN, G_TYPE_POINTER, G_TYPE_POINTER);
+}
diff --git a/libnm-gtk/nm-gconf-settings.h b/libnm-gtk/nm-gconf-settings.h
new file mode 100644
index 0000000..f1e6497
--- /dev/null
+++ b/libnm-gtk/nm-gconf-settings.h
@@ -0,0 +1,64 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2008 Novell, Inc.
+ */
+
+#ifndef NM_GCONF_SETTINGS_H
+#define NM_GCONF_SETTINGS_H
+
+#include <nm-connection.h>
+#include <nm-settings-service.h>
+
+#include "nm-gconf-connection.h"
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_GCONF_SETTINGS (nm_gconf_settings_get_type ())
+#define NM_GCONF_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_GCONF_SETTINGS, NMGConfSettings))
+#define NM_GCONF_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_GCONF_SETTINGS, NMGConfSettingsClass))
+#define NM_IS_GCONF_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_GCONF_SETTINGS))
+#define NM_IS_GCONF_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_GCONF_SETTINGS))
+#define NM_GCONF_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_GCONF_SETTINGS, NMGConfSettingsClass))
+
+typedef struct {
+ NMSettingsService parent;
+} NMGConfSettings;
+
+typedef struct {
+ NMSettingsServiceClass parent;
+
+ /* Signals */
+ void (*new_secrets_requested) (NMGConfSettings *self,
+ NMGConfConnection *exported,
+ const char *setting_name,
+ const char **hints,
+ gboolean ask_user,
+ NMNewSecretsRequestedFunc callback,
+ gpointer callback_data);
+} NMGConfSettingsClass;
+
+GType nm_gconf_settings_get_type (void);
+
+NMGConfSettings *nm_gconf_settings_new (DBusGConnection *bus);
+
+NMGConfConnection *nm_gconf_settings_add_connection (NMGConfSettings *self,
+ NMConnection *connection);
+
+G_END_DECLS
+
+#endif /* NM_GCONF_SETTINGS_H */
diff --git a/libnm-gtk/nm-gsm-item.c b/libnm-gtk/nm-gsm-item.c
new file mode 100644
index 0000000..e3cffc9
--- /dev/null
+++ b/libnm-gtk/nm-gsm-item.c
@@ -0,0 +1,76 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <nm-setting-8021x.h>
+#include "nm-gsm-item.h"
+
+G_DEFINE_TYPE (NMGsmItem, nm_gsm_item, NM_TYPE_DEVICE_ITEM)
+
+NMListItem *
+nm_gsm_item_new (NMClient *client,
+ NMGsmDevice *device,
+ NMSettingsConnectionInterface *connection)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_GSM_DEVICE (device), NULL);
+ g_return_val_if_fail (NM_IS_SETTINGS_CONNECTION_INTERFACE (connection), NULL);
+
+ return (NMListItem *) g_object_new (NM_TYPE_GSM_ITEM,
+ NM_LIST_ITEM_TYPE_NAME, _("3G"),
+ NM_CONNECTION_ITEM_CLIENT, client,
+ NM_CONNECTION_ITEM_CONNECTION, connection,
+ NM_DEVICE_ITEM_DEVICE, device,
+ NULL);
+}
+
+static int
+priority (NMListItem *item)
+{
+ return NM_LIST_ITEM_PRIORITY_DEV_GSM + NM_LIST_ITEM_CLASS (nm_gsm_item_parent_class)->priority (item);
+}
+
+/*****************************************************************************/
+
+static void
+notify (GObject *object, GParamSpec *spec)
+{
+ /* If the connection is removed from the item, request deletion */
+ if (spec && !g_strcmp0 (spec->name, NM_CONNECTION_ITEM_CONNECTION) &&
+ !nm_connection_item_get_connection (NM_CONNECTION_ITEM (object)))
+
+ nm_list_item_request_remove (NM_LIST_ITEM (object));
+}
+
+static void
+nm_gsm_item_init (NMGsmItem *self)
+{
+ g_object_set (self, NM_LIST_ITEM_ICON, "nm-device-wwan", NULL);
+}
+
+static void
+nm_gsm_item_class_init (NMGsmItemClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMListItemClass *list_class = NM_LIST_ITEM_CLASS (klass);
+
+ object_class->notify = notify;
+
+ list_class->priority = priority;
+}
diff --git a/libnm-gtk/nm-gsm-item.h b/libnm-gtk/nm-gsm-item.h
new file mode 100644
index 0000000..5ea92c7
--- /dev/null
+++ b/libnm-gtk/nm-gsm-item.h
@@ -0,0 +1,52 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_GSM_ITEM_H
+#define NM_GSM_ITEM_H
+
+#include <glib-object.h>
+#include <nm-gsm-device.h>
+#include <nm-device-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_GSM_ITEM (nm_gsm_item_get_type ())
+#define NM_GSM_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_GSM_ITEM, NMGsmItem))
+#define NM_GSM_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_GSM_ITEM, NMGsmItemClass))
+#define NM_IS_GSM_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_GSM_ITEM))
+#define NM_IS_GSM_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_GSM_ITEM))
+#define NM_GSM_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_GSM_ITEM, NMGsmItemClass))
+
+typedef struct {
+ NMDeviceItem parent;
+} NMGsmItem;
+
+typedef struct {
+ NMDeviceItemClass parent_class;
+} NMGsmItemClass;
+
+GType nm_gsm_item_get_type (void);
+
+NMListItem *nm_gsm_item_new (NMClient *client,
+ NMGsmDevice *device,
+ NMSettingsConnectionInterface *connection);
+
+G_END_DECLS
+
+#endif /* NM_GSM_ITEM_H */
diff --git a/libnm-gtk/nm-gsm-pin-request-item.c b/libnm-gtk/nm-gsm-pin-request-item.c
new file mode 100644
index 0000000..c773f79
--- /dev/null
+++ b/libnm-gtk/nm-gsm-pin-request-item.c
@@ -0,0 +1,179 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <nm-setting-8021x.h>
+#include "nm-gsm-pin-request-item.h"
+#include "libnm-gtk-gsm-device.h"
+
+G_DEFINE_TYPE (NMGsmPinRequestItem, nm_gsm_pin_request_item, NM_TYPE_LIST_ITEM)
+
+enum {
+ UNLOCKED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_GSM_PIN_REQUEST_ITEM, NMGsmPinRequestItemPrivate))
+
+typedef struct {
+ NMGsmDevice *device;
+} NMGsmPinRequestItemPrivate;
+
+
+NMListItem *
+nm_gsm_pin_request_item_new (NMGsmDevice *device)
+{
+ NMListItem *item;
+
+ g_return_val_if_fail (NM_IS_GSM_DEVICE (device), NULL);
+
+ item = (NMListItem *) g_object_new (NM_TYPE_GSM_PIN_REQUEST_ITEM,
+ NM_LIST_ITEM_TYPE_NAME, _("3G"),
+ NULL);
+
+ if (item)
+ GET_PRIVATE (item)->device = g_object_ref (device);
+
+ return item;
+}
+
+static void
+pin_disabled (GObject *obj, GAsyncResult *result, gpointer user_data)
+{
+ NMGsmPinRequestItem *self = NM_GSM_PIN_REQUEST_ITEM (user_data);
+ GError *error = NULL;
+
+ if (nm_gsm_device_enable_pin_finish (NM_GSM_DEVICE (obj), result, &error)) {
+ g_debug ("PIN disabled successfully");
+ } else {
+ char *msg;
+
+ msg = g_strdup_printf (_("PIN unlocking failed: %s"), error->message);
+ nm_list_item_warning (NM_LIST_ITEM (self), msg);
+ g_free (msg);
+ g_error_free (error);
+ }
+}
+
+static void
+pin_unlocked (GObject *obj, GAsyncResult *result, gpointer user_data)
+{
+ NMGsmPinRequestItem *self = NM_GSM_PIN_REQUEST_ITEM (user_data);
+ GError *error = NULL;
+
+ if (nm_gsm_device_send_pin_finish (NM_GSM_DEVICE (obj), result, &error)) {
+ g_debug ("PIN unlocked successfully");
+ g_signal_emit (self, signals[UNLOCKED], 0);
+ } else {
+ char *msg;
+
+ msg = g_strdup_printf (_("PIN unlocking failed: %s"), error->message);
+ nm_list_item_warning (NM_LIST_ITEM (self), msg);
+ g_free (msg);
+ g_error_free (error);
+ }
+}
+
+void
+nm_gsm_pin_request_item_unlock (NMGsmPinRequestItem *self,
+ const char *pin,
+ gboolean disable_pin)
+{
+ NMGsmPinRequestItemPrivate *priv = GET_PRIVATE (self);
+
+ g_return_if_fail (NM_IS_GSM_PIN_REQUEST_ITEM (self));
+ g_return_if_fail (pin != NULL);
+
+ if (disable_pin)
+ nm_gsm_device_enable_pin (priv->device, pin, FALSE, pin_disabled, self);
+ else
+ nm_gsm_device_send_pin (priv->device, pin, pin_unlocked, self);
+}
+
+gboolean
+nm_gsm_pin_request_item_unlock_finish (NMGsmPinRequestItem *self,
+ GAsyncResult *result,
+ GError **error)
+{
+ g_return_val_if_fail (NM_IS_GSM_PIN_REQUEST_ITEM (self), FALSE);
+
+ if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), error) ||
+ !g_simple_async_result_is_valid (result, G_OBJECT (self), nm_gsm_pin_request_item_unlock_finish))
+ return FALSE;
+
+
+
+ return TRUE;
+}
+
+static int
+priority (NMListItem *item)
+{
+ return NM_LIST_ITEM_PRIORITY_DEV_GSM + NM_LIST_ITEM_CLASS (nm_gsm_pin_request_item_parent_class)->priority (item);
+}
+
+/*****************************************************************************/
+
+static void
+nm_gsm_pin_request_item_init (NMGsmPinRequestItem *self)
+{
+ g_object_set (self,
+ NM_LIST_ITEM_NAME, _("Locked GSM device"),
+ NM_LIST_ITEM_ICON, "nm-device-wwan",
+ NM_LIST_ITEM_SHOW_DELETE, FALSE,
+ NULL);
+}
+
+static void
+dispose (GObject *object)
+{
+ NMGsmPinRequestItemPrivate *priv = GET_PRIVATE (object);
+
+ if (priv->device) {
+ g_object_unref (priv->device);
+ priv->device = NULL;
+ }
+
+ G_OBJECT_CLASS (nm_gsm_pin_request_item_parent_class)->dispose (object);
+}
+
+static void
+nm_gsm_pin_request_item_class_init (NMGsmPinRequestItemClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMListItemClass *list_class = NM_LIST_ITEM_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMGsmPinRequestItemPrivate));
+
+ object_class->dispose = dispose;
+ list_class->priority = priority;
+
+ /* Signals */
+ signals[UNLOCKED] =
+ g_signal_new ("unlocked",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMGsmPinRequestItemClass, unlocked),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
diff --git a/libnm-gtk/nm-gsm-pin-request-item.h b/libnm-gtk/nm-gsm-pin-request-item.h
new file mode 100644
index 0000000..2b4860f
--- /dev/null
+++ b/libnm-gtk/nm-gsm-pin-request-item.h
@@ -0,0 +1,57 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_GSM_PIN_REQUEST_ITEM_H
+#define NM_GSM_PIN_REQUEST_ITEM_H
+
+#include <glib-object.h>
+#include <gio/gio.h>
+#include <nm-gsm-device.h>
+#include <nm-list-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_GSM_PIN_REQUEST_ITEM (nm_gsm_pin_request_item_get_type ())
+#define NM_GSM_PIN_REQUEST_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_GSM_PIN_REQUEST_ITEM, NMGsmPinRequestItem))
+#define NM_GSM_PIN_REQUEST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_GSM_PIN_REQUEST_ITEM, NMGsmPinRequestItemClass))
+#define NM_IS_GSM_PIN_REQUEST_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_GSM_PIN_REQUEST_ITEM))
+#define NM_IS_GSM_PIN_REQUEST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_GSM_PIN_REQUEST_ITEM))
+#define NM_GSM_PIN_REQUEST_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_GSM_PIN_REQUEST_ITEM, NMGsmPinRequestItemClass))
+
+typedef struct {
+ NMListItem parent;
+} NMGsmPinRequestItem;
+
+typedef struct {
+ NMListItemClass parent_class;
+
+ /* Signals */
+ void (*unlocked) (NMGsmPinRequestItem *self);
+} NMGsmPinRequestItemClass;
+
+GType nm_gsm_pin_request_item_get_type (void);
+
+NMListItem *nm_gsm_pin_request_item_new (NMGsmDevice *device);
+void nm_gsm_pin_request_item_unlock (NMGsmPinRequestItem *self,
+ const char *pin,
+ gboolean disable_pin);
+
+G_END_DECLS
+
+#endif /* NM_GSM_PIN_REQUEST_ITEM_H */
diff --git a/libnm-gtk/nm-gsm-provider.c b/libnm-gtk/nm-gsm-provider.c
new file mode 100644
index 0000000..d046ab1
--- /dev/null
+++ b/libnm-gtk/nm-gsm-provider.c
@@ -0,0 +1,335 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <arpa/inet.h>
+#include <nm-connection.h>
+#include <nm-settings-interface.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-serial.h>
+#include <nm-setting-ppp.h>
+#include <nm-setting-gsm.h>
+#include <nm-setting-ip4-config.h>
+#include <nm-utils.h>
+
+#include "nm-gsm-provider.h"
+#include "nm-gsm-item.h"
+#include "libnm-gtk-gsm-device.h"
+#include "nm-gsm-pin-request-item.h"
+#include "nm-mobile-providers.h"
+#include "gconf-helpers.h"
+#include "utils.h"
+
+#define MM_MODEM_ERROR "org.freedesktop.ModemManager.Modem.Gsm"
+#define MM_MODEM_ERROR_SIM_PIN MM_MODEM_ERROR ".SimPinRequired"
+
+G_DEFINE_TYPE (NMGsmProvider, nm_gsm_provider, NM_TYPE_DEVICE_PROVIDER)
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_GSM_PROVIDER, NMGsmProviderPrivate))
+
+typedef struct {
+ gboolean usable;
+ gboolean pin_needed;
+} NMGsmProviderPrivate;
+
+NMItemProvider *
+nm_gsm_provider_new (NMClient *client,
+ NMGsmDevice *device)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_GSM_DEVICE (device), NULL);
+
+ return (NMItemProvider *) g_object_new (NM_TYPE_GSM_PROVIDER,
+ NM_ITEM_PROVIDER_CLIENT, client,
+ NM_DEVICE_PROVIDER_DEVICE, device,
+ NULL);
+}
+
+static void
+gsm_added (NMItemProvider *provider,
+ NMSettingsConnectionInterface *connection)
+{
+ NMDeviceProvider *device_provider = NM_DEVICE_PROVIDER (provider);
+ NMGsmProviderPrivate *priv;
+ NMDevice *device;
+
+ if (!nm_device_provider_ready (device_provider))
+ return;
+
+ priv = GET_PRIVATE (provider);
+ if (!priv->usable)
+ return;
+
+ device = nm_device_provider_get_device (device_provider);
+ if (utils_connection_valid_for_device (NM_CONNECTION (connection), device, NULL)) {
+ NMListItem *item;
+
+ item = nm_gsm_item_new (nm_item_provider_get_client (provider), NM_GSM_DEVICE (device), connection);
+ nm_item_provider_item_added (provider, item);
+ }
+}
+
+static NMConnection *
+mobile_new_connection (NMMobileProvider *provider,
+ NMMobileAccessMethod *method)
+{
+ NMConnection *connection;
+ NMSetting *type_setting;
+ NMSetting *setting;
+ char *name;
+ char *uuid;
+
+ connection = nm_connection_new ();
+
+ if (method->type == NM_MOBILE_ACCESS_METHOD_TYPE_GSM) {
+ type_setting = nm_setting_gsm_new ();
+ g_object_set (type_setting,
+ NM_SETTING_GSM_NUMBER, "*99#",
+ NM_SETTING_GSM_USERNAME, method->username,
+ NM_SETTING_GSM_PASSWORD, method->password,
+ NM_SETTING_GSM_APN, method->gsm_apn,
+ NULL);
+
+ /* FIXME: Choose the network_id more intelligently */
+ if (g_slist_length (method->gsm_mcc_mnc) == 1) {
+ NMGsmMccMnc *mcc_mnc = (NMGsmMccMnc *) method->gsm_mcc_mnc->data;
+ char *network_id;
+
+ network_id = g_strconcat (mcc_mnc->mcc, mcc_mnc->mnc, NULL);
+ g_object_set (type_setting,
+ NM_SETTING_GSM_NETWORK_ID, network_id,
+ NULL);
+
+ g_free (network_id);
+ }
+ } else
+ g_assert_not_reached ();
+
+ nm_connection_add_setting (connection, type_setting);
+
+ if (method->gateway || method->dns) {
+ GSList *iter;
+
+ setting = nm_setting_ip4_config_new ();
+ g_object_set (setting, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
+
+ for (iter = method->dns; iter; iter = iter->next) {
+ struct in_addr addr;
+
+ if (inet_pton (AF_INET, (char *) iter->data, &addr) > 0)
+ nm_setting_ip4_config_add_dns (NM_SETTING_IP4_CONFIG (setting), addr.s_addr);
+ }
+
+ /* I'd rather not use the gateway from providers database */
+ /* if (method->gateway) */
+
+ nm_connection_add_setting (connection, setting);
+ }
+
+ /* Serial setting */
+ setting = nm_setting_serial_new ();
+ g_object_set (setting,
+ NM_SETTING_SERIAL_BAUD, 115200,
+ NM_SETTING_SERIAL_BITS, 8,
+ NM_SETTING_SERIAL_PARITY, 'n',
+ NM_SETTING_SERIAL_STOPBITS, 1,
+ NULL);
+
+ nm_connection_add_setting (connection, setting);
+
+ setting = nm_setting_ppp_new ();
+ nm_connection_add_setting (connection, setting);
+
+ setting = nm_setting_connection_new ();
+ uuid = nm_utils_uuid_generate ();
+ name = g_strdup_printf ("Mobile %s", provider->name);
+
+ g_object_set (setting,
+ NM_SETTING_CONNECTION_ID, name,
+ NM_SETTING_CONNECTION_TYPE, nm_setting_get_name (type_setting),
+ NM_SETTING_CONNECTION_AUTOCONNECT, FALSE,
+ NM_SETTING_CONNECTION_UUID, uuid,
+ NULL);
+ g_free (uuid);
+ g_free (name);
+ nm_connection_add_setting (connection, setting);
+
+ return connection;
+}
+
+static void
+got_imsi (GObject *obj, GAsyncResult *result, gpointer user_data)
+{
+ NMGsmDevice *device = NM_GSM_DEVICE (obj);
+ char *imsi;
+ GHashTable *providers;
+ NMMobileProvider *provider = NULL;
+ NMMobileAccessMethod *access_method = NULL;
+ GError *error = NULL;
+
+ imsi = nm_gsm_device_get_imsi_finish (device, result, &error);
+ if (error) {
+ g_warning ("Reading IMSI failed: %s", error->message);
+ g_clear_error (&error);
+ return;
+ }
+
+ g_message ("Got IMSI: %s", imsi);
+ providers = nm_mobile_providers_parse (NULL);
+ if (nm_mobile_provider_lookup (providers, NM_MOBILE_ACCESS_METHOD_TYPE_GSM, imsi, &provider, &access_method)) {
+ NMConnection *connection;
+
+ g_message ("Provider %s", provider->name);
+ g_message ("method %s, apn %s", access_method->name, access_method->gsm_apn);
+ connection = mobile_new_connection (provider, access_method);
+ if (connection) {
+ g_message ("Successfully created new connection");
+ /* Just add it to GConf, we'll get notified when that succeeds */
+ nm_gconf_write_connection (connection, NULL, NULL);
+ g_object_unref (connection);
+ }
+ }
+
+ g_hash_table_destroy (providers);
+ g_free (imsi);
+ GET_PRIVATE (user_data)->usable = TRUE;
+}
+
+static void
+modem_became_usable (NMGsmProvider *self)
+{
+ NMGsmDevice *device;
+ GSList *list;
+ GSList *iter;
+ gboolean have_connections = FALSE;
+
+ device = NM_GSM_DEVICE (nm_device_provider_get_device (NM_DEVICE_PROVIDER (self)));
+
+ /* Do we have a configuration yet? */
+ list = nm_item_provider_get_connections (NM_ITEM_PROVIDER (self));
+ for (iter = list; iter; iter = iter->next) {
+ NMSettingsConnectionInterface *connection = (NMSettingsConnectionInterface *) iter->data;
+ NMListItem *item;
+
+ if (!utils_connection_valid_for_device (NM_CONNECTION (connection), NM_DEVICE (device), NULL))
+ continue;
+
+ item = nm_gsm_item_new (nm_item_provider_get_client (NM_ITEM_PROVIDER (self)), device, connection);
+ nm_item_provider_item_added (NM_ITEM_PROVIDER (self), item);
+ have_connections = TRUE;
+ }
+
+ if (have_connections)
+ GET_PRIVATE (self)->usable = TRUE;
+ else
+ /* No? let's try to create one automagically */
+ nm_gsm_device_get_imsi (device, got_imsi, self);
+}
+
+static void
+pin_unlocked (NMGsmPinRequestItem *req_item,
+ gpointer user_data)
+{
+ NMGsmProvider *self = NM_GSM_PROVIDER (user_data);
+ NMGsmProviderPrivate *priv = GET_PRIVATE (self);
+
+ nm_list_item_request_remove (NM_LIST_ITEM (req_item));
+ priv->pin_needed = FALSE;
+ modem_became_usable (self);
+}
+
+static void
+modem_enabled (GObject *obj, GAsyncResult *result, gpointer user_data)
+{
+ NMGsmDevice *device = NM_GSM_DEVICE (obj);
+ NMGsmProvider *self = NM_GSM_PROVIDER (user_data);
+ NMGsmProviderPrivate *priv = GET_PRIVATE (self);
+ GError *error = NULL;
+ gboolean success;
+
+ success = nm_gsm_device_enable_finish (device, result, &error);
+ if (error) {
+ /* FIXME: The first condition only should work, but for some reason, doesn't */
+ if (dbus_g_error_has_name (error, MM_MODEM_ERROR_SIM_PIN) ||
+ !g_strcmp0 (error->message, "SIM PIN required")) {
+
+ g_debug ("PIN needed");
+ priv->pin_needed = TRUE;
+ } else
+ g_warning ("Modem enable failed: %s", error->message);
+
+ g_clear_error (&error);
+ } else
+ g_debug ("Modem enabled successfully");
+
+ if (success)
+ modem_became_usable (self);
+ else if (priv->pin_needed) {
+ NMListItem *item;
+
+ /* Add a PIN request item */
+ item = nm_gsm_pin_request_item_new (device);
+ g_signal_connect (item, "unlocked", G_CALLBACK (pin_unlocked), self);
+ nm_item_provider_item_added (NM_ITEM_PROVIDER (self), item);
+ }
+}
+
+static gboolean
+initial_pin_check (gpointer data)
+{
+ NMGsmDevice *device;
+
+ device = NM_GSM_DEVICE (nm_device_provider_get_device (NM_DEVICE_PROVIDER (data)));
+ nm_gsm_device_enable (device, TRUE, modem_enabled, data);
+
+ return FALSE;
+}
+
+/*****************************************************************************/
+
+static void
+nm_gsm_provider_init (NMGsmProvider *self)
+{
+}
+
+static void
+constructed (GObject *object)
+{
+ GSource *source;
+
+ if (G_OBJECT_CLASS (nm_gsm_provider_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_gsm_provider_parent_class)->constructed (object);
+
+ source = g_idle_source_new ();
+ g_source_set_closure (source, g_cclosure_new_object (G_CALLBACK (initial_pin_check), object));
+ g_source_attach (source, NULL);
+ g_source_unref (source);
+}
+
+static void
+nm_gsm_provider_class_init (NMGsmProviderClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMItemProviderClass *item_class = NM_ITEM_PROVIDER_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMGsmProviderPrivate));
+
+ object_class->constructed = constructed;
+
+ item_class->connection_added = gsm_added;
+}
diff --git a/libnm-gtk/nm-gsm-provider.h b/libnm-gtk/nm-gsm-provider.h
new file mode 100644
index 0000000..c497b10
--- /dev/null
+++ b/libnm-gtk/nm-gsm-provider.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_GSM_PROVIDER_H
+#define NM_GSM_PROVIDER_H
+
+#include <glib-object.h>
+#include <nm-gsm-device.h>
+#include <nm-device-provider.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_GSM_PROVIDER (nm_gsm_provider_get_type ())
+#define NM_GSM_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_GSM_PROVIDER, NMGsmProvider))
+#define NM_GSM_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_GSM_PROVIDER, NMGsmProviderClass))
+#define NM_IS_GSM_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_GSM_PROVIDER))
+#define NM_IS_GSM_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_GSM_PROVIDER))
+#define NM_GSM_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_GSM_PROVIDER, NMGsmProviderClass))
+
+typedef struct {
+ NMDeviceProvider parent;
+} NMGsmProvider;
+
+typedef struct {
+ NMDeviceProviderClass parent_class;
+} NMGsmProviderClass;
+
+GType nm_gsm_provider_get_type (void);
+
+NMItemProvider *nm_gsm_provider_new (NMClient *client,
+ NMGsmDevice *device);
+
+G_END_DECLS
+
+#endif /* NM_GSM_PROVIDER_H */
diff --git a/libnm-gtk/nm-icon-cache.c b/libnm-gtk/nm-icon-cache.c
new file mode 100644
index 0000000..d0a3427
--- /dev/null
+++ b/libnm-gtk/nm-icon-cache.c
@@ -0,0 +1,101 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <gtk/gtk.h>
+#include "nm-icon-cache.h"
+
+static GtkIconTheme *icon_theme = NULL;
+static GHashTable *cache = NULL;
+
+void
+nm_icon_cache_invalidate (void)
+{
+ if (cache) {
+ g_hash_table_destroy (cache);
+ cache = NULL;
+ }
+
+ if (icon_theme)
+ icon_theme = NULL;
+}
+
+static void
+init_icon_theme (void)
+{
+ char **path = NULL;
+ int n_path;
+ int i;
+
+ icon_theme = gtk_icon_theme_get_default ();
+ g_signal_connect (icon_theme, "changed", G_CALLBACK (nm_icon_cache_invalidate), NULL);
+
+ gtk_icon_theme_get_search_path (icon_theme, &path, &n_path);
+ for (i = n_path - 1; i >= 0; i--) {
+ if (g_strcmp0 (ICONDIR, path[i]) == 0)
+ break;
+ }
+
+ if (i < 0)
+ gtk_icon_theme_append_search_path (icon_theme, ICONDIR);
+
+ g_strfreev (path);
+}
+
+GdkPixbuf *
+nm_icon_cache_get (const char *icon_name)
+{
+ GdkPixbuf *pixbuf;
+ GError *error = NULL;
+
+ g_return_val_if_fail (icon_name != NULL, NULL);
+
+ if (G_UNLIKELY (icon_theme == NULL))
+ init_icon_theme ();
+
+ if (G_UNLIKELY (cache == NULL)) {
+ cache = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
+ pixbuf = NULL;
+ } else
+ pixbuf = (GdkPixbuf *) g_hash_table_lookup (cache, icon_name);
+
+ if (!pixbuf) {
+ pixbuf = gtk_icon_theme_load_icon (icon_theme, icon_name, 48, 0, &error);
+
+ if (!pixbuf) {
+ /* Try harder, using our own icons if theme doesn't provide something */
+ char *path;
+
+ path = g_strconcat (ICONDIR, icon_name, ".png", NULL);
+ pixbuf = gdk_pixbuf_new_from_file (path, NULL);
+ g_free (path);
+ }
+
+ if (pixbuf)
+ g_hash_table_insert (cache, g_strdup (icon_name), pixbuf);
+ }
+
+ if (error) {
+ if (!pixbuf)
+ g_warning ("Error loading icon '%s': %s", icon_name, error->message);
+
+ g_error_free (error);
+ }
+
+ return pixbuf;
+}
diff --git a/libnm-gtk/nm-icon-cache.h b/libnm-gtk/nm-icon-cache.h
new file mode 100644
index 0000000..92f6354
--- /dev/null
+++ b/libnm-gtk/nm-icon-cache.h
@@ -0,0 +1,28 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_ICON_CACHE_H
+#define NM_ICON_CACHE_H
+
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+GdkPixbuf *nm_icon_cache_get (const char *icon_name);
+void nm_icon_cache_invalidate (void);
+
+#endif /* NM_ICON_CACHE_H */
diff --git a/libnm-gtk/nm-item-provider.c b/libnm-gtk/nm-item-provider.c
new file mode 100644
index 0000000..5c460e0
--- /dev/null
+++ b/libnm-gtk/nm-item-provider.c
@@ -0,0 +1,310 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+
+#include <nm-setting-connection.h>
+#include "nm-item-provider.h"
+
+G_DEFINE_ABSTRACT_TYPE (NMItemProvider, nm_item_provider, G_TYPE_OBJECT)
+
+enum {
+ PROP_0,
+ PROP_CLIENT,
+
+ LAST_PROP
+};
+
+enum {
+ ITEM_ADDED,
+ ITEM_CHANGED,
+ ITEM_REMOVED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_ITEM_PROVIDER, NMItemProviderPrivate))
+
+typedef struct {
+ NMClient *client;
+ GSList *settings;
+
+ GSList *items;
+
+ gboolean disposed;
+} NMItemProviderPrivate;
+
+static void
+item_changed (NMListItem *item,
+ GParamSpec *pspec,
+ gpointer user_data)
+{
+ g_signal_emit (user_data, signals[ITEM_CHANGED], 0, item);
+}
+
+static void
+remove_item (NMListItem *item,
+ gpointer user_data)
+{
+ NMItemProvider *self = NM_ITEM_PROVIDER (user_data);
+ NMItemProviderPrivate *priv = GET_PRIVATE (self);
+ GSList *link;
+
+ link = g_slist_find (priv->items, item);
+ if (link) {
+ g_signal_handlers_disconnect_matched (item, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, user_data);
+
+ priv->items = g_slist_delete_link (priv->items, link);
+ g_signal_emit (self, signals[ITEM_REMOVED], 0, item);
+ g_object_unref (item);
+ }
+}
+
+void
+nm_item_provider_item_added (NMItemProvider *provider,
+ NMListItem *item)
+{
+ NMItemProviderPrivate *priv;
+
+ g_return_if_fail (NM_IS_ITEM_PROVIDER (provider));
+ g_return_if_fail (NM_IS_LIST_ITEM (item));
+
+ priv = GET_PRIVATE (provider);
+ priv->items = g_slist_prepend (priv->items, g_object_ref_sink (item));
+ g_signal_connect (item, "request-remove", G_CALLBACK (remove_item), provider);
+ g_signal_connect (item, "notify", G_CALLBACK (item_changed), provider);
+
+ g_signal_emit (provider, signals[ITEM_ADDED], 0, item);
+}
+
+static void
+connection_added (NMSettingsInterface *settings,
+ NMSettingsConnectionInterface *connection,
+ gpointer data)
+{
+ NMItemProvider *self = NM_ITEM_PROVIDER (data);
+
+ if (NM_ITEM_PROVIDER_GET_CLASS (self)->connection_added)
+ NM_ITEM_PROVIDER_GET_CLASS (self)->connection_added (self, connection);
+}
+
+static void
+add_settings_connections (NMSettingsInterface *settings,
+ NMItemProvider *self)
+{
+ GSList *items;
+ GSList *iter;
+
+ items = nm_settings_interface_list_connections (settings);
+ for (iter = items; iter; iter = iter->next)
+ connection_added (settings, NM_SETTINGS_CONNECTION_INTERFACE (iter->data), self);
+
+ g_slist_free (items);
+}
+
+void
+nm_item_provider_add_settings (NMItemProvider *self,
+ NMSettingsInterface *settings)
+{
+ NMItemProviderPrivate *priv;
+
+ g_return_if_fail (NM_IS_ITEM_PROVIDER (self));
+ g_return_if_fail (NM_IS_SETTINGS_INTERFACE (settings));
+
+ priv = GET_PRIVATE (self);
+
+ priv->settings = g_slist_prepend (priv->settings, g_object_ref (settings));
+ g_signal_connect (settings, "new-connection", G_CALLBACK (connection_added), self);
+ add_settings_connections (settings, self);
+}
+
+NMClient *
+nm_item_provider_get_client (NMItemProvider *self)
+{
+ g_return_val_if_fail (NM_IS_ITEM_PROVIDER (self), NULL);
+
+ return GET_PRIVATE (self)->client;
+}
+
+GSList *
+nm_item_provider_get_connections (NMItemProvider *self)
+{
+ NMItemProviderPrivate *priv;
+ GSList *iter;
+ GSList *list = NULL;
+
+ g_return_val_if_fail (NM_IS_ITEM_PROVIDER (self), NULL);
+
+ priv = GET_PRIVATE (self);
+ for (iter = priv->settings; iter; iter = iter->next)
+ list = g_slist_concat (list, nm_settings_interface_list_connections (NM_SETTINGS_INTERFACE (iter->data)));
+
+ return list;
+}
+
+GSList *
+nm_item_provider_get_items (NMItemProvider *self)
+{
+ g_return_val_if_fail (NM_IS_ITEM_PROVIDER (self), NULL);
+
+ return GET_PRIVATE (self)->items;
+}
+
+void
+nm_item_provider_clear (NMItemProvider *self)
+{
+ NMItemProviderPrivate *priv;
+
+ g_return_if_fail (NM_IS_ITEM_PROVIDER (self));
+
+ priv = GET_PRIVATE (self);
+ g_slist_foreach (priv->items, (GFunc) remove_item, self);
+}
+
+void
+nm_item_provider_reset (NMItemProvider *self)
+{
+ NMItemProviderPrivate *priv;
+
+ g_return_if_fail (NM_IS_ITEM_PROVIDER (self));
+
+ priv = GET_PRIVATE (self);
+ g_slist_foreach (priv->settings, (GFunc) add_settings_connections, self);
+}
+
+/*****************************************************************************/
+
+static void
+nm_item_provider_init (NMItemProvider *self)
+{
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMItemProviderPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ /* Construct only */
+ priv->client = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMItemProviderPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ g_value_set_object (value, priv->client);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NMItemProviderPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ GSList *iter;
+
+ nm_item_provider_clear (NM_ITEM_PROVIDER (object));
+
+ for (iter = priv->settings; iter; iter = iter->next) {
+ GObject *settings = iter->data;
+
+ g_signal_handlers_disconnect_by_func (settings, connection_added, object);
+ g_object_unref (settings);
+ }
+ g_slist_free (priv->settings);
+
+ if (priv->client)
+ g_object_unref (priv->client);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_item_provider_parent_class)->dispose (object);
+}
+
+static void
+nm_item_provider_class_init (NMItemProviderClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMItemProviderPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_CLIENT,
+ g_param_spec_object (NM_ITEM_PROVIDER_CLIENT,
+ "NMClient",
+ "NMClient",
+ NM_TYPE_CLIENT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ signals[ITEM_ADDED] =
+ g_signal_new ("item-added",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMItemProviderClass, item_added),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ NM_TYPE_LIST_ITEM);
+
+ /* Signals */
+ signals[ITEM_CHANGED] =
+ g_signal_new ("item-changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMItemProviderClass, item_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ NM_TYPE_LIST_ITEM);
+
+ signals[ITEM_REMOVED] =
+ g_signal_new ("item-removed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMItemProviderClass, item_removed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ NM_TYPE_LIST_ITEM);
+}
diff --git a/libnm-gtk/nm-item-provider.h b/libnm-gtk/nm-item-provider.h
new file mode 100644
index 0000000..6376375
--- /dev/null
+++ b/libnm-gtk/nm-item-provider.h
@@ -0,0 +1,79 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_ITEM_PROVIDER_H
+#define NM_ITEM_PROVIDER_H
+
+#include <glib-object.h>
+#include <nm-client.h>
+#include <nm-settings-interface.h>
+#include <nm-list-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_ITEM_PROVIDER (nm_item_provider_get_type ())
+#define NM_ITEM_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_ITEM_PROVIDER, NMItemProvider))
+#define NM_ITEM_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_ITEM_PROVIDER, NMItemProviderClass))
+#define NM_IS_ITEM_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_ITEM_PROVIDER))
+#define NM_IS_ITEM_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_ITEM_PROVIDER))
+#define NM_ITEM_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_ITEM_PROVIDER, NMItemProviderClass))
+
+#define NM_ITEM_PROVIDER_CLIENT "client"
+
+typedef struct {
+ GObject parent;
+} NMItemProvider;
+
+typedef struct {
+ GObjectClass parent_class;
+
+ /* Methods */
+ void (*connection_added) (NMItemProvider *self,
+ NMSettingsConnectionInterface *connection);
+
+ /* Signals */
+ void (*item_added) (NMItemProvider *self,
+ NMListItem *item);
+
+ void (*item_changed) (NMItemProvider *self,
+ NMListItem *item);
+
+ void (*item_removed) (NMItemProvider *self,
+ NMListItem *item);
+} NMItemProviderClass;
+
+GType nm_item_provider_get_type (void);
+
+void nm_item_provider_add_settings (NMItemProvider *self,
+ NMSettingsInterface *settings);
+
+NMClient *nm_item_provider_get_client (NMItemProvider *self);
+GSList *nm_item_provider_get_connections (NMItemProvider *self);
+
+GSList *nm_item_provider_get_items (NMItemProvider *self);
+
+void nm_item_provider_item_added (NMItemProvider *provider,
+ NMListItem *item);
+
+void nm_item_provider_clear (NMItemProvider *self);
+void nm_item_provider_reset (NMItemProvider *self);
+
+G_END_DECLS
+
+#endif /* NM_ITEM_PROVIDER_H */
diff --git a/libnm-gtk/nm-list-item.c b/libnm-gtk/nm-list-item.c
new file mode 100644
index 0000000..1317014
--- /dev/null
+++ b/libnm-gtk/nm-list-item.c
@@ -0,0 +1,363 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-list-item.h"
+
+G_DEFINE_TYPE (NMListItem, nm_list_item, G_TYPE_INITIALLY_UNOWNED)
+
+enum {
+ PROP_0,
+ PROP_NAME,
+ PROP_TYPE_NAME,
+ PROP_ICON,
+ PROP_SECURITY,
+ PROP_STATUS,
+ PROP_SHOW_DELETE,
+
+ LAST_PROP
+};
+
+enum {
+ REQUEST_REMOVE,
+ WARNING,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_LIST_ITEM, NMListItemPrivate))
+
+typedef struct {
+ char *name;
+ char *type_name;
+ char *security;
+ char *icon;
+ NMListItemStatus status;
+ gboolean show_delete;
+
+ gboolean disposed;
+} NMListItemPrivate;
+
+const char *
+nm_list_item_get_name (NMListItem *self)
+{
+ g_return_val_if_fail (NM_IS_LIST_ITEM (self), NULL);
+
+ return GET_PRIVATE (self)->name;
+}
+
+const char *
+nm_list_item_get_type_name (NMListItem *self)
+{
+ g_return_val_if_fail (NM_IS_LIST_ITEM (self), NULL);
+
+ return GET_PRIVATE (self)->type_name;
+}
+
+const char *
+nm_list_item_get_icon (NMListItem *self)
+{
+ g_return_val_if_fail (NM_IS_LIST_ITEM (self), NULL);
+
+ return GET_PRIVATE (self)->icon;
+}
+
+const char *
+nm_list_item_get_security (NMListItem *self)
+{
+ g_return_val_if_fail (NM_IS_LIST_ITEM (self), NULL);
+
+ return GET_PRIVATE (self)->security;
+}
+
+NMListItemStatus
+nm_list_item_get_status (NMListItem *self)
+{
+ g_return_val_if_fail (NM_IS_LIST_ITEM (self), NM_LIST_ITEM_STATUS_DISCONNECTED);
+
+ return GET_PRIVATE (self)->status;
+}
+
+gboolean
+nm_list_item_get_show_delete (NMListItem *self)
+{
+ g_return_val_if_fail (NM_IS_LIST_ITEM (self), FALSE);
+
+ return GET_PRIVATE (self)->show_delete;
+}
+
+void
+nm_list_item_request_remove (NMListItem *self)
+{
+ g_return_if_fail (NM_IS_LIST_ITEM (self));
+
+ g_signal_emit (self, signals[REQUEST_REMOVE], 0);
+}
+
+void
+nm_list_item_connect (NMListItem *self)
+{
+ g_return_if_fail (NM_IS_LIST_ITEM (self));
+
+ if (NM_LIST_ITEM_GET_CLASS (self)->connect)
+ NM_LIST_ITEM_GET_CLASS (self)->connect (self);
+}
+
+void
+nm_list_item_disconnect (NMListItem *self)
+{
+ g_return_if_fail (NM_IS_LIST_ITEM (self));
+
+ if (NM_LIST_ITEM_GET_CLASS (self)->disconnect)
+ NM_LIST_ITEM_GET_CLASS (self)->disconnect (self);
+}
+
+void
+nm_list_item_delete (NMListItem *self)
+{
+ g_return_if_fail (NM_IS_LIST_ITEM (self));
+
+ if (NM_LIST_ITEM_GET_CLASS (self)->delete)
+ NM_LIST_ITEM_GET_CLASS (self)->delete (self);
+}
+
+static int
+priority (NMListItem *self)
+{
+ return 0;
+}
+
+static int
+nm_list_item_get_priority (NMListItem *item)
+{
+ return NM_LIST_ITEM_GET_CLASS (item)->priority (item);
+}
+
+int
+nm_list_item_compare (NMListItem *self,
+ NMListItem *other)
+{
+ int priority;
+ int other_priority;
+
+ g_return_val_if_fail (NM_IS_LIST_ITEM (self), 1);
+ g_return_val_if_fail (NM_IS_LIST_ITEM (other), 1);
+
+ priority = nm_list_item_get_priority (self);
+ other_priority = nm_list_item_get_priority (other);
+
+ if (priority > other_priority)
+ return -1;
+ else if (priority < other_priority)
+ return 1;
+
+ return g_strcmp0 (nm_list_item_get_name (self), nm_list_item_get_name (other));
+}
+
+void
+nm_list_item_warning (NMListItem *self,
+ const char *message)
+{
+ g_return_if_fail (NM_IS_LIST_ITEM (self));
+ g_return_if_fail (message != NULL);
+
+ g_signal_emit (self, signals[WARNING], 0, message);
+}
+
+/*****************************************************************************/
+
+static void
+nm_list_item_init (NMListItem *self)
+{
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMListItemPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_NAME:
+ g_free (priv->name);
+ priv->name = g_value_dup_string (value);
+ g_object_notify (object, NM_LIST_ITEM_NAME);
+ break;
+ case PROP_TYPE_NAME:
+ g_free (priv->type_name);
+ priv->type_name = g_value_dup_string (value);
+ g_object_notify (object, NM_LIST_ITEM_TYPE_NAME);
+ break;
+ case PROP_ICON:
+ g_free (priv->icon);
+ priv->icon = g_value_dup_string (value);
+ g_object_notify (object, NM_LIST_ITEM_ICON);
+ break;
+ case PROP_SECURITY:
+ g_free (priv->security);
+ priv->security = g_value_dup_string (value);
+ g_object_notify (object, NM_LIST_ITEM_SECURITY);
+ break;
+ case PROP_STATUS:
+ priv->status = g_value_get_int (value);
+ g_object_notify (object, NM_LIST_ITEM_STATUS);
+ break;
+ case PROP_SHOW_DELETE:
+ priv->show_delete = g_value_get_boolean (value);
+ g_object_notify (object, NM_LIST_ITEM_SHOW_DELETE);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMListItem *self = NM_LIST_ITEM (object);
+
+ switch (prop_id) {
+ case PROP_NAME:
+ g_value_set_string (value, nm_list_item_get_name (self));
+ break;
+ case PROP_TYPE_NAME:
+ g_value_set_string (value, nm_list_item_get_type_name (self));
+ break;
+ case PROP_ICON:
+ g_value_set_string (value, nm_list_item_get_icon (self));
+ break;
+ case PROP_SECURITY:
+ g_value_set_string (value, nm_list_item_get_security (self));
+ break;
+ case PROP_STATUS:
+ g_value_set_int (value, nm_list_item_get_status (self));
+ break;
+ case PROP_SHOW_DELETE:
+ g_value_set_boolean (value, nm_list_item_get_show_delete (self));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NMListItemPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ g_free (priv->name);
+ g_free (priv->type_name);
+ g_free (priv->icon);
+ g_free (priv->security);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_list_item_parent_class)->dispose (object);
+}
+
+static void
+nm_list_item_class_init (NMListItemClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMListItemPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ klass->priority = priority;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_NAME,
+ g_param_spec_string (NM_LIST_ITEM_NAME,
+ "Name",
+ "Name",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_TYPE_NAME,
+ g_param_spec_string (NM_LIST_ITEM_TYPE_NAME,
+ "TypeName",
+ "TypeName",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_ICON,
+ g_param_spec_string (NM_LIST_ITEM_ICON,
+ "Icon",
+ "Icon",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_SECURITY,
+ g_param_spec_string (NM_LIST_ITEM_SECURITY,
+ "Security",
+ "Security",
+ NULL,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_STATUS,
+ g_param_spec_int (NM_LIST_ITEM_STATUS,
+ "Status",
+ "Status",
+ NM_LIST_ITEM_STATUS_DISCONNECTED,
+ NM_LIST_ITEM_STATUS_CONNECTED,
+ NM_LIST_ITEM_STATUS_DISCONNECTED,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class, PROP_SHOW_DELETE,
+ g_param_spec_boolean (NM_LIST_ITEM_SHOW_DELETE,
+ "Show delete",
+ "Show delete button",
+ FALSE,
+ G_PARAM_READWRITE));
+
+ /* Signals */
+ signals[REQUEST_REMOVE] =
+ g_signal_new ("request-remove",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMListItemClass, request_remove),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ signals[WARNING] =
+ g_signal_new ("warning",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMListItemClass, warning),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1,
+ G_TYPE_STRING);
+}
diff --git a/libnm-gtk/nm-list-item.h b/libnm-gtk/nm-list-item.h
new file mode 100644
index 0000000..6032f4b
--- /dev/null
+++ b/libnm-gtk/nm-list-item.h
@@ -0,0 +1,99 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_LIST_ITEM_H
+#define NM_LIST_ITEM_H
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_LIST_ITEM (nm_list_item_get_type ())
+#define NM_LIST_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_LIST_ITEM, NMListItem))
+#define NM_LIST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_LIST_ITEM, NMListItemClass))
+#define NM_IS_LIST_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_LIST_ITEM))
+#define NM_IS_LIST_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_LIST_ITEM))
+#define NM_LIST_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_LIST_ITEM, NMListItemClass))
+
+typedef enum {
+ NM_LIST_ITEM_STATUS_DISCONNECTED,
+ NM_LIST_ITEM_STATUS_CONNECTING,
+ NM_LIST_ITEM_STATUS_CONNECTED
+} NMListItemStatus;
+
+#define NM_LIST_ITEM_NAME "name"
+#define NM_LIST_ITEM_TYPE_NAME "type-name"
+#define NM_LIST_ITEM_ICON "icon"
+#define NM_LIST_ITEM_SECURITY "security"
+#define NM_LIST_ITEM_STATUS "status"
+#define NM_LIST_ITEM_SHOW_DELETE "show-delete"
+
+/* Sorting priorities. These are summed and the items are sorted
+ in ascending numeric order (higher first) */
+#define NM_LIST_ITEM_PRIORITY_DEFAULT_ROUTE 1000
+#define NM_LIST_ITEM_PRIORITY_ACTIVATED 200
+#define NM_LIST_ITEM_PRIORITY_CONFIGURED 100
+#define NM_LIST_ITEM_PRIORITY_DEV_ETHERNET 99
+#define NM_LIST_ITEM_PRIORITY_DEV_WIFI 98
+#define NM_LIST_ITEM_PRIORITY_DEV_GSM 97
+#define NM_LIST_ITEM_PRIORITY_DEV_CDMA 96
+#define NM_LIST_ITEM_PRIORITY_DEV_BT 95
+
+typedef struct {
+ GInitiallyUnowned parent;
+} NMListItem;
+
+typedef struct {
+ GInitiallyUnownedClass parent_class;
+
+ /* Methods */
+ void (*connect) (NMListItem *self);
+ void (*disconnect) (NMListItem *self);
+ void (*delete) (NMListItem *self);
+ int (*priority) (NMListItem *self);
+
+ /* Signals */
+ void (*request_remove) (NMListItem *self);
+ void (*warning) (NMListItem *self,
+ const char *message);
+} NMListItemClass;
+
+GType nm_list_item_get_type (void);
+
+const char *nm_list_item_get_name (NMListItem *self);
+const char *nm_list_item_get_type_name (NMListItem *self);
+const char *nm_list_item_get_icon (NMListItem *self);
+const char *nm_list_item_get_security (NMListItem *self);
+NMListItemStatus nm_list_item_get_status (NMListItem *self);
+gboolean nm_list_item_get_show_delete (NMListItem *self);
+
+void nm_list_item_request_remove (NMListItem *self);
+
+void nm_list_item_connect (NMListItem *self);
+void nm_list_item_disconnect (NMListItem *self);
+void nm_list_item_delete (NMListItem *self);
+int nm_list_item_compare (NMListItem *self,
+ NMListItem *other);
+
+void nm_list_item_warning (NMListItem *self,
+ const char *message);
+
+G_END_DECLS
+
+#endif /* NM_LIST_ITEM_H */
diff --git a/libnm-gtk/nm-list-model.c b/libnm-gtk/nm-list-model.c
new file mode 100644
index 0000000..e257392
--- /dev/null
+++ b/libnm-gtk/nm-list-model.c
@@ -0,0 +1,314 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-list-model.h"
+#include "nm-list-item.h"
+#include "nm-device-handler.h"
+
+G_DEFINE_TYPE (NMListModel, nm_list_model, GTK_TYPE_LIST_STORE)
+
+enum {
+ PROP_0,
+ PROP_CLIENT,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_LIST_MODEL, NMListModelPrivate))
+
+typedef struct {
+ NMClient *client;
+ GSList *settings;
+ NMDeviceHandler *device_handler;
+
+ gboolean disposed;
+} NMListModelPrivate;
+
+static GQuark quark_item_iter = 0;
+
+NMListModel *
+nm_list_model_new (NMClient *client)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+
+ return (NMListModel *) g_object_new (NM_TYPE_LIST_MODEL,
+ NM_LIST_MODEL_CLIENT, client,
+ NULL);
+}
+
+void
+nm_list_model_add_settings (NMListModel *self,
+ NMSettingsInterface *settings)
+{
+ NMListModelPrivate *priv;
+
+ g_return_if_fail (NM_IS_LIST_MODEL (self));
+ g_return_if_fail (NM_IS_SETTINGS_INTERFACE (settings));
+
+ priv = GET_PRIVATE (self);
+ priv->settings = g_slist_append (priv->settings, g_object_ref (settings));
+
+ g_slist_foreach (nm_device_handler_get_providers (priv->device_handler),
+ (GFunc) nm_item_provider_add_settings, settings);
+}
+
+NMClient *
+nm_list_model_get_client (NMListModel *self)
+{
+ g_return_val_if_fail (NM_IS_LIST_MODEL (self), NULL);
+
+ return GET_PRIVATE (self)->client;
+}
+
+static void
+item_added (NMItemProvider *provider,
+ NMListItem *item,
+ gpointer user_data)
+{
+ GtkListStore *store = GTK_LIST_STORE (user_data);
+ GtkTreeIter *iter;
+
+ iter = g_slice_new0 (GtkTreeIter);
+ gtk_list_store_insert_with_values (store, iter, G_MAXINT,
+ NM_LIST_MODEL_COL_ITEM, item,
+ NM_LIST_MODEL_COL_NAME, nm_list_item_get_name (item),
+ NM_LIST_MODEL_COL_ICON, nm_list_item_get_icon (item),
+ NM_LIST_MODEL_COL_SECURITY, nm_list_item_get_security (item),
+ NM_LIST_MODEL_COL_STATUS, nm_list_item_get_status (item),
+ NM_LIST_MODEL_COL_SHOW_DELETE, nm_list_item_get_show_delete (item),
+ -1);
+
+ g_object_set_qdata_full (G_OBJECT (item), quark_item_iter, iter, (GDestroyNotify) gtk_tree_iter_free);
+}
+
+static void
+item_changed (NMItemProvider *provider,
+ NMListItem *item,
+ gpointer user_data)
+{
+ GtkListStore *store = GTK_LIST_STORE (user_data);
+ GtkTreeIter *iter;
+
+ iter = (GtkTreeIter *) g_object_get_qdata (G_OBJECT (item), quark_item_iter);
+ if (iter)
+ gtk_list_store_set (store, iter,
+ NM_LIST_MODEL_COL_ITEM, item,
+ NM_LIST_MODEL_COL_NAME, nm_list_item_get_name (item),
+ NM_LIST_MODEL_COL_ICON, nm_list_item_get_icon (item),
+ NM_LIST_MODEL_COL_SECURITY, nm_list_item_get_security (item),
+ NM_LIST_MODEL_COL_STATUS, nm_list_item_get_status (item),
+ NM_LIST_MODEL_COL_SHOW_DELETE, nm_list_item_get_show_delete (item),
+ -1);
+}
+
+static void
+item_removed (NMItemProvider *provider,
+ NMListItem *item,
+ gpointer user_data)
+{
+ GtkListStore *store = GTK_LIST_STORE (user_data);
+ GtkTreeIter *iter;
+
+ iter = (GtkTreeIter *) g_object_get_qdata (G_OBJECT (item), quark_item_iter);
+ if (iter) {
+ gtk_list_store_remove (store, iter);
+ g_object_set_qdata (G_OBJECT (item), quark_item_iter, NULL);
+ }
+}
+
+static void
+device_provider_added (NMDeviceHandler *handler,
+ NMItemProvider *provider,
+ gpointer user_data)
+{
+ NMListModelPrivate *priv = GET_PRIVATE (user_data);
+ GSList *list;
+ GSList *iter;
+
+ g_signal_connect (provider, "item-added", G_CALLBACK (item_added), user_data);
+ g_signal_connect (provider, "item-changed", G_CALLBACK (item_changed), user_data);
+ g_signal_connect (provider, "item-removed", G_CALLBACK (item_removed), user_data);
+
+ list = nm_item_provider_get_items (provider);
+ for (iter = list; iter; iter = iter->next)
+ item_added (provider, (NMListItem *) iter->data, user_data);
+
+ for (iter = priv->settings; iter; iter = iter->next)
+ nm_item_provider_add_settings (provider, (NMSettingsInterface *) iter->data);
+}
+
+static void
+device_provider_removed (NMDeviceHandler *handler,
+ NMItemProvider *provider,
+ gpointer user_data)
+{
+ g_signal_handlers_disconnect_matched (provider, G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, user_data);
+}
+
+static int
+sort_callback (GtkTreeModel *model,
+ GtkTreeIter *a,
+ GtkTreeIter *b,
+ gpointer user_data)
+{
+ NMListItem *item_a;
+ NMListItem *item_b;
+ int result;
+
+ gtk_tree_model_get (model, a, NM_LIST_MODEL_COL_ITEM, &item_a, -1);
+ gtk_tree_model_get (model, b, NM_LIST_MODEL_COL_ITEM, &item_b, -1);
+
+ result = nm_list_item_compare (item_a, item_b);
+
+ if (item_a)
+ g_object_unref (item_a);
+
+ if (item_b)
+ g_object_unref (item_b);
+
+ return result;
+}
+
+/*****************************************************************************/
+
+static void
+nm_list_model_init (NMListModel *self)
+{
+ GType types[NM_LIST_MODEL_N_COLUMNS];
+
+ types[NM_LIST_MODEL_COL_ITEM] = NM_TYPE_LIST_ITEM;
+ types[NM_LIST_MODEL_COL_NAME] = G_TYPE_STRING;
+ types[NM_LIST_MODEL_COL_ICON] = G_TYPE_STRING;
+ types[NM_LIST_MODEL_COL_SECURITY] = G_TYPE_STRING;
+ types[NM_LIST_MODEL_COL_STATUS] = G_TYPE_INT;
+ types[NM_LIST_MODEL_COL_SHOW_DELETE] = G_TYPE_BOOLEAN;
+
+ gtk_list_store_set_column_types (GTK_LIST_STORE (self), NM_LIST_MODEL_N_COLUMNS, types);
+
+ gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (self),
+ NM_LIST_MODEL_COL_ITEM,
+ sort_callback,
+ NULL,
+ NULL);
+
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (self), NM_LIST_MODEL_COL_ITEM, GTK_SORT_ASCENDING);
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMListModelPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ /* Construct only */
+ priv->client = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMListModelPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_CLIENT:
+ g_value_set_object (value, priv->client);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+constructed (GObject *object)
+{
+ NMListModelPrivate *priv = GET_PRIVATE (object);
+ GSList *list;
+ GSList *iter;
+
+ if (G_OBJECT_CLASS (nm_list_model_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_list_model_parent_class)->constructed (object);
+
+ priv->device_handler = nm_device_handler_new (priv->client);
+ g_signal_connect (priv->device_handler, "provider-added", G_CALLBACK (device_provider_added), object);
+ g_signal_connect (priv->device_handler, "provider-removed", G_CALLBACK (device_provider_removed), object);
+
+ list = nm_device_handler_get_providers (priv->device_handler);
+ for (iter = list; iter; iter = iter->next)
+ device_provider_added (priv->device_handler, NM_ITEM_PROVIDER (iter->data), object);
+
+ /* FIXME: create VPNProvider */
+}
+
+static void
+dispose (GObject *object)
+{
+ NMListModelPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ if (priv->device_handler)
+ g_object_unref (priv->device_handler);
+
+ if (priv->settings) {
+ g_slist_foreach (priv->settings, (GFunc) g_object_unref, NULL);
+ g_slist_free (priv->settings);
+ priv->settings = NULL;
+ }
+
+ if (priv->client)
+ g_object_unref (priv->client);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_list_model_parent_class)->dispose (object);
+}
+
+static void
+nm_list_model_class_init (NMListModelClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ quark_item_iter = g_quark_from_static_string ("NMListModel-item-iter");
+
+ g_type_class_add_private (object_class, sizeof (NMListModelPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_CLIENT,
+ g_param_spec_object (NM_LIST_MODEL_CLIENT,
+ "NMClient",
+ "NMClient",
+ NM_TYPE_CLIENT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
diff --git a/libnm-gtk/nm-list-model.h b/libnm-gtk/nm-list-model.h
new file mode 100644
index 0000000..22f4683
--- /dev/null
+++ b/libnm-gtk/nm-list-model.h
@@ -0,0 +1,67 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_LIST_MODEL_H
+#define NM_LIST_MODEL_H
+
+#include <gtk/gtk.h>
+#include <nm-client.h>
+#include <nm-settings-interface.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_LIST_MODEL (nm_list_model_get_type ())
+#define NM_LIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_LIST_MODEL, NMListModel))
+#define NM_LIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_LIST_MODEL, NMListModelClass))
+#define NM_IS_LIST_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_LIST_MODEL))
+#define NM_IS_LIST_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_LIST_MODEL))
+#define NM_LIST_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_LIST_MODEL, NMListModelClass))
+
+#define NM_LIST_MODEL_CLIENT "client"
+
+enum {
+ NM_LIST_MODEL_COL_ITEM,
+ NM_LIST_MODEL_COL_NAME,
+ NM_LIST_MODEL_COL_ICON,
+ NM_LIST_MODEL_COL_SECURITY,
+ NM_LIST_MODEL_COL_STATUS,
+ NM_LIST_MODEL_COL_SHOW_DELETE,
+
+ NM_LIST_MODEL_N_COLUMNS
+};
+
+typedef struct {
+ GtkListStore parent;
+} NMListModel;
+
+typedef struct {
+ GtkListStoreClass parent_class;
+} NMListModelClass;
+
+GType nm_list_model_get_type (void);
+
+NMListModel *nm_list_model_new (NMClient *client);
+void nm_list_model_add_settings (NMListModel *self,
+ NMSettingsInterface *settings);
+
+NMClient *nm_list_model_get_client (NMListModel *self);
+
+G_END_DECLS
+
+#endif /* NM_LIST_MODEL_H */
diff --git a/libnm-gtk/nm-mobile-providers.c b/libnm-gtk/nm-mobile-providers.c
new file mode 100644
index 0000000..df1fd07
--- /dev/null
+++ b/libnm-gtk/nm-mobile-providers.c
@@ -0,0 +1,866 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+
+#include <glib/gi18n.h>
+
+#include "nm-mobile-providers.h"
+
+#define ISO_3166_COUNTRY_CODES "/usr/share/zoneinfo/iso3166.tab"
+
+static GHashTable *
+read_country_codes (void)
+{
+ GHashTable *table;
+ GIOChannel *channel;
+ GString *buffer;
+ GError *error = NULL;
+ GIOStatus status;
+
+ channel = g_io_channel_new_file (ISO_3166_COUNTRY_CODES, "r", &error);
+ if (!channel) {
+ if (error) {
+ g_warning ("Could not read " ISO_3166_COUNTRY_CODES ": %s", error->message);
+ g_error_free (error);
+ } else
+ g_warning ("Could not read " ISO_3166_COUNTRY_CODES ": Unknown error");
+
+ return NULL;
+ }
+
+ table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ buffer = g_string_sized_new (32);
+
+ status = G_IO_STATUS_NORMAL;
+ while (status == G_IO_STATUS_NORMAL) {
+ status = g_io_channel_read_line_string (channel, buffer, NULL, &error);
+
+ switch (status) {
+ case G_IO_STATUS_NORMAL:
+ if (buffer->str[0] != '#') {
+ char **pieces;
+
+ pieces = g_strsplit (buffer->str, "\t", 2);
+ g_hash_table_insert (table, pieces[0], g_strchomp (pieces[1]));
+ g_free (pieces);
+ }
+
+ g_string_truncate (buffer, 0);
+ break;
+ case G_IO_STATUS_EOF:
+ break;
+ case G_IO_STATUS_ERROR:
+ g_warning ("Error while reading: %s", error->message);
+ g_error_free (error);
+ break;
+ case G_IO_STATUS_AGAIN:
+ /* FIXME: Try again a few times, but really, it never happes, right? */
+ break;
+ }
+ }
+
+ g_string_free (buffer, TRUE);
+ g_io_channel_unref (channel);
+
+ return table;
+}
+
+/* XML Parser */
+
+typedef enum {
+ PARSER_TOPLEVEL = 0,
+ PARSER_COUNTRY,
+ PARSER_PROVIDER,
+ PARSER_METHOD_GSM,
+ PARSER_METHOD_GSM_APN,
+ PARSER_METHOD_CDMA,
+ PARSER_ERROR
+} MobileContextState;
+
+typedef struct {
+ GHashTable *country_codes;
+ GHashTable *table;
+
+ char *current_country;
+ GSList *current_providers;
+ NMMobileProvider *current_provider;
+ NMMobileAccessMethod *current_method;
+ GSList *mcc_mncs;
+
+ char *text_buffer;
+ MobileContextState state;
+} MobileParser;
+
+static NMGsmMccMnc *
+mcc_mnc_new (const char *mcc, const char *mnc)
+{
+ NMGsmMccMnc *m;
+
+ m = g_slice_new0 (NMGsmMccMnc);
+ m->mcc = g_strdup (mcc);
+ m->mnc = g_strdup (mnc);
+ return m;
+}
+
+static void
+mcc_mnc_free (NMGsmMccMnc *m)
+{
+ g_return_if_fail (m != NULL);
+ g_free (m->mcc);
+ g_free (m->mnc);
+ g_slice_free (NMGsmMccMnc, m);
+}
+
+static GSList *
+mcc_mnc_list_copy (GSList *list)
+{
+ GSList *iter, *ret = NULL;
+
+ for (iter = list; iter; iter = g_slist_next (iter)) {
+ NMGsmMccMnc *m = iter->data;
+
+ ret = g_slist_prepend (ret, mcc_mnc_new (m->mcc, m->mnc));
+ }
+
+ return g_slist_reverse (ret);
+}
+
+static NMMobileAccessMethod *
+access_method_new (void)
+{
+ NMMobileAccessMethod *method;
+
+ method = g_slice_new0 (NMMobileAccessMethod);
+ method->refs = 1;
+ method->lcl_names = g_hash_table_new_full (g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) g_free);
+
+ return method;
+}
+
+NMMobileAccessMethod *
+nm_mobile_access_method_ref (NMMobileAccessMethod *method)
+{
+ g_return_val_if_fail (method != NULL, NULL);
+ g_return_val_if_fail (method->refs > 0, NULL);
+
+ method->refs++;
+
+ return method;
+}
+
+void
+nm_mobile_access_method_unref (NMMobileAccessMethod *method)
+{
+ g_return_if_fail (method != NULL);
+ g_return_if_fail (method->refs > 0);
+
+ if (--method->refs == 0) {
+ g_free (method->name);
+ g_hash_table_destroy (method->lcl_names);
+ g_free (method->username);
+ g_free (method->password);
+ g_free (method->gateway);
+ g_free (method->gsm_apn);
+ g_slist_foreach (method->dns, (GFunc) g_free, NULL);
+ g_slist_free (method->dns);
+
+ g_slist_foreach (method->gsm_mcc_mnc, (GFunc) mcc_mnc_free, NULL);
+ g_slist_free (method->gsm_mcc_mnc);
+
+ g_slist_free (method->cdma_sid);
+
+ g_slice_free (NMMobileAccessMethod, method);
+ }
+}
+
+GType
+nm_mobile_access_method_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0)) {
+ type = g_boxed_type_register_static ("NMMobileAccessMethod",
+ (GBoxedCopyFunc) nm_mobile_access_method_ref,
+ (GBoxedFreeFunc) nm_mobile_access_method_unref);
+ }
+ return type;
+}
+
+
+static NMMobileProvider *
+provider_new (void)
+{
+ NMMobileProvider *provider;
+
+ provider = g_slice_new0 (NMMobileProvider);
+ provider->refs = 1;
+ provider->lcl_names = g_hash_table_new_full (g_str_hash, g_str_equal,
+ (GDestroyNotify) g_free,
+ (GDestroyNotify) g_free);
+
+ return provider;
+}
+
+NMMobileProvider *
+nm_mobile_provider_ref (NMMobileProvider *provider)
+{
+ provider->refs++;
+
+ return provider;
+}
+
+void
+nm_mobile_provider_unref (NMMobileProvider *provider)
+{
+ if (--provider->refs == 0) {
+ g_free (provider->name);
+ g_hash_table_destroy (provider->lcl_names);
+
+ g_slist_foreach (provider->methods, (GFunc) nm_mobile_access_method_unref, NULL);
+ g_slist_free (provider->methods);
+
+ g_slice_free (NMMobileProvider, provider);
+ }
+}
+
+GType
+nm_mobile_provider_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0)) {
+ type = g_boxed_type_register_static ("NMMobileProvider",
+ (GBoxedCopyFunc) nm_mobile_provider_ref,
+ (GBoxedFreeFunc) nm_mobile_provider_unref);
+ }
+ return type;
+}
+
+static void
+provider_list_free (gpointer data)
+{
+ GSList *list = (GSList *) data;
+
+ while (list) {
+ nm_mobile_provider_unref ((NMMobileProvider *) list->data);
+ list = g_slist_delete_link (list, list);
+ }
+}
+
+static void
+parser_toplevel_start (MobileParser *parser,
+ const char *name,
+ const char **attribute_names,
+ const char **attribute_values)
+{
+ int i;
+
+ if (!strcmp (name, "serviceproviders")) {
+ for (i = 0; attribute_names && attribute_names[i]; i++) {
+ if (!strcmp (attribute_names[i], "format")) {
+ if (strcmp (attribute_values[i], "2.0")) {
+ g_warning ("%s: mobile broadband provider database format '%s'"
+ " not supported.", __func__, attribute_values[i]);
+ parser->state = PARSER_ERROR;
+ break;
+ }
+ }
+ }
+ } else if (!strcmp (name, "country")) {
+ for (i = 0; attribute_names && attribute_names[i]; i++) {
+ if (!strcmp (attribute_names[i], "code")) {
+ char *country_code;
+ char *country;
+
+ country_code = g_ascii_strup (attribute_values[i], -1);
+ country = g_hash_table_lookup (parser->country_codes, country_code);
+ if (country) {
+ parser->current_country = g_strdup (country);
+ g_free (country_code);
+ } else
+ parser->current_country = country_code;
+
+ parser->state = PARSER_COUNTRY;
+ break;
+ }
+ }
+ }
+}
+
+static void
+parser_country_start (MobileParser *parser,
+ const char *name,
+ const char **attribute_names,
+ const char **attribute_values)
+{
+ if (!strcmp (name, "provider")) {
+ parser->state = PARSER_PROVIDER;
+ parser->current_provider = provider_new ();
+ }
+}
+
+static void
+parser_provider_start (MobileParser *parser,
+ const char *name,
+ const char **attribute_names,
+ const char **attribute_values)
+{
+ if (!strcmp (name, "gsm"))
+ parser->state = PARSER_METHOD_GSM;
+ else if (!strcmp (name, "cdma")) {
+ parser->state = PARSER_METHOD_CDMA;
+ parser->current_method = access_method_new ();
+ }
+}
+
+static void
+parser_gsm_start (MobileParser *parser,
+ const char *name,
+ const char **attribute_names,
+ const char **attribute_values)
+{
+ if (!strcmp (name, "network-id")) {
+ const char *mcc = NULL, *mnc = NULL;
+ int i;
+
+ for (i = 0; attribute_names && attribute_names[i]; i++) {
+ if (!strcmp (attribute_names[i], "mcc"))
+ mcc = attribute_values[i];
+ else if (!strcmp (attribute_names[i], "mnc"))
+ mnc = attribute_values[i];
+
+ if (mcc && strlen (mcc) && mnc && strlen (mnc)) {
+ parser->mcc_mncs = g_slist_append (parser->mcc_mncs, mcc_mnc_new (mcc, mnc));
+ break;
+ }
+ }
+ } else if (!strcmp (name, "apn")) {
+ int i;
+
+ for (i = 0; attribute_names && attribute_names[i]; i++) {
+ if (!strcmp (attribute_names[i], "value")) {
+
+ parser->state = PARSER_METHOD_GSM_APN;
+ parser->current_method = access_method_new ();
+ parser->current_method->gsm_apn = g_strdup (attribute_values[i]);
+ break;
+ }
+ }
+ }
+}
+
+static void
+parser_cdma_start (MobileParser *parser,
+ const char *name,
+ const char **attribute_names,
+ const char **attribute_values)
+{
+ if (!strcmp (name, "sid")) {
+ int i;
+
+ for (i = 0; attribute_names && attribute_names[i]; i++) {
+ if (!strcmp (attribute_names[i], "value")) {
+ unsigned long tmp;
+
+ errno = 0;
+ tmp = strtoul (attribute_values[i], NULL, 10);
+ if (errno == 0 && tmp > 0)
+ parser->current_method->cdma_sid = g_slist_prepend (parser->current_method->cdma_sid,
+ GUINT_TO_POINTER ((guint32) tmp));
+ break;
+ }
+ }
+ }
+}
+
+static void
+mobile_parser_start_element (GMarkupParseContext *context,
+ const gchar *element_name,
+ const gchar **attribute_names,
+ const gchar **attribute_values,
+ gpointer data,
+ GError **error)
+{
+ MobileParser *parser = (MobileParser *) data;
+
+ if (parser->text_buffer) {
+ g_free (parser->text_buffer);
+ parser->text_buffer = NULL;
+ }
+
+ switch (parser->state) {
+ case PARSER_TOPLEVEL:
+ parser_toplevel_start (parser, element_name, attribute_names, attribute_values);
+ break;
+ case PARSER_COUNTRY:
+ parser_country_start (parser, element_name, attribute_names, attribute_values);
+ break;
+ case PARSER_PROVIDER:
+ parser_provider_start (parser, element_name, attribute_names, attribute_values);
+ break;
+ case PARSER_METHOD_GSM:
+ parser_gsm_start (parser, element_name, attribute_names, attribute_values);
+ break;
+ case PARSER_METHOD_CDMA:
+ parser_cdma_start (parser, element_name, attribute_names, attribute_values);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+parser_country_end (MobileParser *parser,
+ const char *name)
+{
+ if (!strcmp (name, "country")) {
+ g_hash_table_insert (parser->table, parser->current_country, parser->current_providers);
+ parser->current_country = NULL;
+ parser->current_providers = NULL;
+ parser->state = PARSER_TOPLEVEL;
+ }
+}
+
+static void
+parser_provider_end (MobileParser *parser,
+ const char *name)
+{
+ if (!strcmp (name, "name")) {
+ if (!parser->current_provider->name) {
+ /* Use the first one. */
+ parser->current_provider->name = parser->text_buffer;
+ parser->text_buffer = NULL;
+ }
+ } else if (!strcmp (name, "provider")) {
+ parser->current_provider->methods = g_slist_reverse (parser->current_provider->methods);
+
+ parser->current_providers = g_slist_prepend (parser->current_providers, parser->current_provider);
+ parser->current_provider = NULL;
+ parser->state = PARSER_COUNTRY;
+ }
+}
+
+static void
+parser_gsm_end (MobileParser *parser,
+ const char *name)
+{
+ if (!strcmp (name, "gsm")) {
+ g_slist_foreach (parser->mcc_mncs, (GFunc) mcc_mnc_free, NULL);
+ g_slist_free (parser->mcc_mncs);
+ parser->mcc_mncs = NULL;
+ parser->state = PARSER_PROVIDER;
+ }
+}
+
+static void
+parser_gsm_apn_end (MobileParser *parser,
+ const char *name)
+{
+ if (!strcmp (name, "name")) {
+ if (!parser->current_method->name) {
+ /* Use the first one. */
+ parser->current_method->name = parser->text_buffer;
+ parser->text_buffer = NULL;
+ }
+ } else if (!strcmp (name, "username")) {
+ parser->current_method->username = parser->text_buffer;
+ parser->text_buffer = NULL;
+ } else if (!strcmp (name, "password")) {
+ parser->current_method->password = parser->text_buffer;
+ parser->text_buffer = NULL;
+ } else if (!strcmp (name, "dns")) {
+ parser->current_method->dns = g_slist_prepend (parser->current_method->dns, parser->text_buffer);
+ parser->text_buffer = NULL;
+ } else if (!strcmp (name, "gateway")) {
+ parser->current_method->gateway = parser->text_buffer;
+ parser->text_buffer = NULL;
+ } else if (!strcmp (name, "apn")) {
+ parser->current_method->type = NM_MOBILE_ACCESS_METHOD_TYPE_GSM;
+ parser->current_method->dns = g_slist_reverse (parser->current_method->dns);
+ parser->current_method->gsm_mcc_mnc = mcc_mnc_list_copy (parser->mcc_mncs);
+
+ if (!parser->current_method->name)
+ parser->current_method->name = g_strdup (_("Default"));
+
+ parser->current_provider->methods = g_slist_prepend (parser->current_provider->methods,
+ parser->current_method);
+ parser->current_method = NULL;
+ parser->state = PARSER_METHOD_GSM;
+ }
+}
+
+static void
+parser_cdma_end (MobileParser *parser,
+ const char *name)
+{
+ if (!strcmp (name, "username")) {
+ parser->current_method->username = parser->text_buffer;
+ parser->text_buffer = NULL;
+ } else if (!strcmp (name, "password")) {
+ parser->current_method->password = parser->text_buffer;
+ parser->text_buffer = NULL;
+ } else if (!strcmp (name, "dns")) {
+ parser->current_method->dns = g_slist_prepend (parser->current_method->dns, parser->text_buffer);
+ parser->text_buffer = NULL;
+ } else if (!strcmp (name, "gateway")) {
+ parser->current_method->gateway = parser->text_buffer;
+ parser->text_buffer = NULL;
+ } else if (!strcmp (name, "cdma")) {
+ parser->current_method->type = NM_MOBILE_ACCESS_METHOD_TYPE_CDMA;
+ parser->current_method->dns = g_slist_reverse (parser->current_method->dns);
+ parser->current_method->cdma_sid = g_slist_reverse (parser->current_method->cdma_sid);
+
+ if (!parser->current_method->name)
+ parser->current_method->name = g_strdup (parser->current_provider->name);
+
+ parser->current_provider->methods = g_slist_prepend (parser->current_provider->methods,
+ parser->current_method);
+ parser->current_method = NULL;
+ parser->state = PARSER_PROVIDER;
+ }
+}
+
+static void
+mobile_parser_end_element (GMarkupParseContext *context,
+ const gchar *element_name,
+ gpointer data,
+ GError **error)
+{
+ MobileParser *parser = (MobileParser *) data;
+
+ switch (parser->state) {
+ case PARSER_COUNTRY:
+ parser_country_end (parser, element_name);
+ break;
+ case PARSER_PROVIDER:
+ parser_provider_end (parser, element_name);
+ break;
+ case PARSER_METHOD_GSM:
+ parser_gsm_end (parser, element_name);
+ break;
+ case PARSER_METHOD_GSM_APN:
+ parser_gsm_apn_end (parser, element_name);
+ break;
+ case PARSER_METHOD_CDMA:
+ parser_cdma_end (parser, element_name);
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+mobile_parser_characters (GMarkupParseContext *context,
+ const gchar *text,
+ gsize text_len,
+ gpointer data,
+ GError **error)
+{
+ MobileParser *parser = (MobileParser *) data;
+
+ g_free (parser->text_buffer);
+ parser->text_buffer = g_strdup (text);
+}
+
+static const GMarkupParser mobile_parser = {
+ mobile_parser_start_element,
+ mobile_parser_end_element,
+ mobile_parser_characters,
+ NULL, /* passthrough */
+ NULL /* error */
+};
+
+GHashTable *
+nm_mobile_providers_parse (GHashTable **out_ccs)
+{
+ GMarkupParseContext *ctx;
+ GIOChannel *channel;
+ MobileParser parser;
+ GError *error = NULL;
+ char buffer[4096];
+ GIOStatus status;
+ gsize len = 0;
+
+ memset (&parser, 0, sizeof (MobileParser));
+
+ parser.country_codes = read_country_codes ();
+ if (!parser.country_codes)
+ goto out;
+
+ channel = g_io_channel_new_file (MOBILE_BROADBAND_PROVIDER_INFO, "r", &error);
+ if (!channel) {
+ if (error) {
+ g_warning ("Could not read " MOBILE_BROADBAND_PROVIDER_INFO ": %s", error->message);
+ g_error_free (error);
+ } else
+ g_warning ("Could not read " MOBILE_BROADBAND_PROVIDER_INFO ": Unknown error");
+
+ goto out;
+ }
+
+ parser.table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, provider_list_free);
+ parser.state = PARSER_TOPLEVEL;
+
+ ctx = g_markup_parse_context_new (&mobile_parser, 0, &parser, NULL);
+
+ status = G_IO_STATUS_NORMAL;
+ while (status == G_IO_STATUS_NORMAL) {
+ status = g_io_channel_read_chars (channel, buffer, sizeof (buffer), &len, &error);
+
+ switch (status) {
+ case G_IO_STATUS_NORMAL:
+ if (!g_markup_parse_context_parse (ctx, buffer, len, &error)) {
+ status = G_IO_STATUS_ERROR;
+ g_warning ("Error while parsing XML: %s", error->message);
+ g_error_free (error);;
+ }
+ break;
+ case G_IO_STATUS_EOF:
+ break;
+ case G_IO_STATUS_ERROR:
+ g_warning ("Error while reading: %s", error->message);
+ g_error_free (error);
+ break;
+ case G_IO_STATUS_AGAIN:
+ /* FIXME: Try again a few times, but really, it never happes, right? */
+ break;
+ }
+ }
+
+ g_io_channel_unref (channel);
+ g_markup_parse_context_free (ctx);
+
+ if (parser.current_provider) {
+ g_warning ("pending current provider");
+ nm_mobile_provider_unref (parser.current_provider);
+ }
+
+ if (parser.current_providers) {
+ g_warning ("pending current providers");
+ provider_list_free (parser.current_providers);
+ }
+
+ g_free (parser.current_country);
+ g_free (parser.text_buffer);
+
+ out:
+ if (parser.country_codes) {
+ if (out_ccs)
+ *out_ccs = parser.country_codes;
+ else
+ g_hash_table_destroy (parser.country_codes);
+ }
+
+ return parser.table;
+}
+
+static gboolean
+nm_gsm_mcc_mnc_matches (NMGsmMccMnc *mcc_mnc, const char *imsi)
+{
+ size_t mcc_len;
+ size_t mnc_len;
+
+ if (!mcc_mnc->mcc || !mcc_mnc->mnc)
+ return FALSE;
+
+ mcc_len = strlen (mcc_mnc->mcc);
+ mnc_len = strlen (mcc_mnc->mnc);
+
+ if (strlen (imsi) < mcc_len + mnc_len)
+ return FALSE;
+
+ if (strncmp (mcc_mnc->mcc, imsi, mcc_len))
+ return FALSE;
+
+ if (strncmp (mcc_mnc->mnc, imsi + mcc_len, mnc_len))
+ return FALSE;
+
+ return TRUE;
+}
+
+static NMMobileAccessMethod *
+gsm_method_lookup (NMMobileProvider *provider, const char *imsi)
+{
+ GSList *iter;
+ GSList *inner_iter;
+
+ for (iter = provider->methods; iter; iter = iter->next) {
+ NMMobileAccessMethod *method = (NMMobileAccessMethod *) iter->data;
+
+ for (inner_iter = method->gsm_mcc_mnc; inner_iter; inner_iter = inner_iter->next) {
+ NMGsmMccMnc *mcc_mnc = (NMGsmMccMnc *) inner_iter->data;
+
+ if (nm_gsm_mcc_mnc_matches (mcc_mnc, imsi))
+ return method;
+ }
+ }
+
+ return NULL;
+}
+
+static NMMobileAccessMethod *
+cdma_method_lookup (NMMobileProvider *provider, const char *imsi)
+{
+ /* FIXME */
+ return FALSE;
+}
+
+NMMobileAccessMethod *
+nm_mobile_provider_access_method_lookup (NMMobileProvider *provider,
+ NMMobileProviderType provider_type,
+ const char *imsi)
+{
+ NMMobileAccessMethod *method;
+
+ g_return_val_if_fail (provider != NULL, NULL);
+ g_return_val_if_fail (imsi != NULL, NULL);
+
+ switch (provider_type) {
+ case NM_MOBILE_ACCESS_METHOD_TYPE_GSM:
+ method = gsm_method_lookup (provider, imsi);
+ break;
+ case NM_MOBILE_ACCESS_METHOD_TYPE_CDMA:
+ method = cdma_method_lookup (provider, imsi);
+ break;
+ default:
+ method = NULL;
+ break;
+ }
+
+ return method;
+}
+
+gboolean
+nm_mobile_provider_lookup (GHashTable *providers,
+ NMMobileProviderType provider_type,
+ const char *imsi,
+ NMMobileProvider **provider,
+ NMMobileAccessMethod **access_method)
+{
+ GHashTableIter iter;
+ gpointer key, value;
+
+ g_return_val_if_fail (providers != NULL, FALSE);
+ g_return_val_if_fail (imsi != NULL, FALSE);
+
+ g_hash_table_iter_init (&iter, providers);
+ while (g_hash_table_iter_next (&iter, &key, &value)) {
+ GSList *country_providers = (GSList *) value;
+ GSList *list_iter;
+
+ for (list_iter = country_providers; list_iter; list_iter = list_iter->next) {
+ NMMobileProvider *p = (NMMobileProvider *) list_iter->data;
+ NMMobileAccessMethod *m;
+
+ m = nm_mobile_provider_access_method_lookup (p, provider_type, imsi);
+ if (m) {
+ *provider = p;
+ *access_method = m;
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+static void
+dump_generic (NMMobileAccessMethod *method)
+{
+ GSList *iter;
+ GString *dns;
+
+ g_print (" username: %s\n", method->username ? method->username : "");
+ g_print (" password: %s\n", method->password ? method->password : "");
+
+ dns = g_string_new (NULL);
+ for (iter = method->dns; iter; iter = g_slist_next (iter))
+ g_string_append_printf (dns, "%s%s", dns->len ? ", " : "", (char *) iter->data);
+ g_print (" dns : %s\n", dns->str);
+ g_string_free (dns, TRUE);
+
+ g_print (" gateway : %s\n", method->gateway ? method->gateway : "");
+}
+
+static void
+dump_cdma (NMMobileAccessMethod *method)
+{
+ GSList *iter;
+
+ g_print (" CDMA: %s\n", method->name);
+
+ dump_generic (method);
+
+ for (iter = method->cdma_sid; iter; iter = g_slist_next (iter))
+ g_print (" SID: %d\n", GPOINTER_TO_UINT (iter->data));
+}
+
+static void
+dump_gsm (NMMobileAccessMethod *method)
+{
+ GSList *iter;
+
+ g_print (" APN: %s (%s)\n", method->name, method->gsm_apn);
+
+ dump_generic (method);
+
+ for (iter = method->gsm_mcc_mnc; iter; iter = g_slist_next (iter)) {
+ NMGsmMccMnc *m = iter->data;
+ g_print (" MCC/MNC: %s-%s\n", m->mcc, m->mnc);
+ }
+}
+
+static void
+dump_country (gpointer key, gpointer value, gpointer user_data)
+{
+ GSList *citer, *miter;
+
+ for (citer = value; citer; citer = g_slist_next (citer)) {
+ NMMobileProvider *provider = citer->data;
+
+ g_print ("Provider: %s (%s)\n", provider->name, (const char *) key);
+ for (miter = provider->methods; miter; miter = g_slist_next (miter)) {
+ NMMobileAccessMethod *method = miter->data;
+
+ switch (method->type) {
+ case NM_MOBILE_ACCESS_METHOD_TYPE_CDMA:
+ dump_cdma (method);
+ break;
+ case NM_MOBILE_ACCESS_METHOD_TYPE_GSM:
+ dump_gsm (method);
+ break;
+ default:
+ break;
+ }
+ g_print ("\n");
+ }
+ }
+}
+
+void
+nm_mobile_providers_dump (GHashTable *providers)
+{
+ g_return_if_fail (providers != NULL);
+ g_hash_table_foreach (providers, dump_country, NULL);
+}
diff --git a/libnm-gtk/nm-mobile-providers.h b/libnm-gtk/nm-mobile-providers.h
new file mode 100644
index 0000000..3268ea7
--- /dev/null
+++ b/libnm-gtk/nm-mobile-providers.h
@@ -0,0 +1,100 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_MOBILE_PROVIDERS_H
+#define NM_MOBILE_PROVIDERS_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#define NM_TYPE_MOBILE_PROVIDER (nm_mobile_provider_get_type ())
+#define NM_TYPE_MOBILE_ACCESS_METHOD (nm_mobile_access_method_get_type ())
+
+typedef enum {
+ NM_MOBILE_ACCESS_METHOD_TYPE_UNKNOWN = 0,
+ NM_MOBILE_ACCESS_METHOD_TYPE_GSM,
+ NM_MOBILE_ACCESS_METHOD_TYPE_CDMA
+} NMMobileProviderType;
+
+typedef struct {
+ char *mcc;
+ char *mnc;
+} NMGsmMccMnc;
+
+typedef struct {
+ char *name;
+ /* maps lang (char *) -> name (char *) */
+ GHashTable *lcl_names;
+
+ char *username;
+ char *password;
+ char *gateway;
+ GSList *dns; /* GSList of 'char *' */
+
+ /* Only used with NM_PROVIDER_TYPE_GSM */
+ char *gsm_apn;
+ GSList *gsm_mcc_mnc; /* GSList of NMGsmMccMnc */
+
+ /* Only used with NM_PROVIDER_TYPE_CDMA */
+ GSList *cdma_sid; /* GSList of guint32 */
+
+ NMMobileProviderType type;
+
+ gint refs;
+} NMMobileAccessMethod;
+
+typedef struct {
+ char *name;
+ /* maps lang (char *) -> name (char *) */
+ GHashTable *lcl_names;
+
+ GSList *methods; /* GSList of NMMobileAccessMethod */
+
+ gint refs;
+} NMMobileProvider;
+
+
+GType nm_mobile_provider_get_type (void);
+GType nm_mobile_access_method_get_type (void);
+
+NMMobileProvider *nm_mobile_provider_ref (NMMobileProvider *provider);
+void nm_mobile_provider_unref (NMMobileProvider *provider);
+
+NMMobileAccessMethod *nm_mobile_access_method_ref (NMMobileAccessMethod *method);
+void nm_mobile_access_method_unref (NMMobileAccessMethod *method);
+
+/* Returns a hash table where keys are country names 'char *',
+ values are a 'GSList *' of 'NMMobileProvider *'.
+ Everything is destroyed with g_hash_table_destroy (). */
+
+GHashTable *nm_mobile_providers_parse (GHashTable **out_ccs);
+
+NMMobileAccessMethod *nm_mobile_provider_access_method_lookup (NMMobileProvider *provider,
+ NMMobileProviderType provider_type,
+ const char *imsi);
+
+gboolean nm_mobile_provider_lookup (GHashTable *providers,
+ NMMobileProviderType provider_type,
+ const char *imsi,
+ NMMobileProvider **provider,
+ NMMobileAccessMethod **access_method);
+
+void nm_mobile_providers_dump (GHashTable *providers);
+
+#endif /* NM_MOBILE_PROVIDERS_H */
diff --git a/libnm-gtk/nm-status-icon.c b/libnm-gtk/nm-status-icon.c
new file mode 100644
index 0000000..c83ec55
--- /dev/null
+++ b/libnm-gtk/nm-status-icon.c
@@ -0,0 +1,246 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-status-icon.h"
+#include "nm-list-item.h"
+#include "nm-device-item.h"
+#include "nm-icon-cache.h"
+
+#define ACTIVATION_STEPS 6
+
+G_DEFINE_TYPE (NMStatusIcon, nm_status_icon, GTK_TYPE_STATUS_ICON)
+
+enum {
+ PROP_0,
+ PROP_MODEL,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_STATUS_ICON, NMStatusIconPrivate))
+
+typedef struct {
+ NMStatusModel *model;
+ NMListItem *item;
+
+ guint animation_id;
+ guint animation_step;
+
+ gboolean disposed;
+} NMStatusIconPrivate;
+
+GtkStatusIcon *
+nm_status_icon_new (NMStatusModel *model)
+{
+ g_return_val_if_fail (NM_IS_STATUS_MODEL (model), NULL);
+
+ return (GtkStatusIcon *) g_object_new (NM_TYPE_STATUS_ICON,
+ NM_STATUS_ICON_MODEL, model,
+ NULL);
+}
+
+static gboolean
+activation_animation (gpointer data)
+{
+ NMStatusIconPrivate *priv = GET_PRIVATE (data);
+ char *image;
+ GdkPixbuf *pixbuf;
+ int stage;
+
+ if (++priv->animation_step > ACTIVATION_STEPS)
+ priv->animation_step = 1;
+
+ if (NM_IS_DEVICE_ITEM (priv->item)) {
+ NMDeviceState state;
+
+ state = nm_device_get_state (nm_device_item_get_device (NM_DEVICE_ITEM (priv->item)));
+ switch (state) {
+ case NM_DEVICE_STATE_PREPARE:
+ stage = 1;
+ break;
+ case NM_DEVICE_STATE_CONFIG:
+ case NM_DEVICE_STATE_NEED_AUTH:
+ stage = 2;
+ break;
+ case NM_DEVICE_STATE_IP_CONFIG:
+ stage = 3;
+ break;
+ default:
+ stage = 1;
+ break;
+ }
+ } else
+ stage = 1;
+
+ image = g_strdup_printf ("nm-stage%02d-connecting%04d", stage, priv->animation_step);
+ pixbuf = nm_icon_cache_get (image);
+ g_free (image);
+
+ if (pixbuf)
+ gtk_status_icon_set_from_pixbuf (GTK_STATUS_ICON (data), pixbuf);
+
+ return TRUE;
+}
+
+static void
+item_status_changed (NMListItem *item,
+ GParamSpec *spec,
+ gpointer user_data)
+{
+ NMStatusIconPrivate *priv = GET_PRIVATE (user_data);
+ GdkPixbuf *pixbuf;
+
+ if (priv->animation_id) {
+ g_source_remove (priv->animation_id);
+ priv->animation_id = 0;
+ }
+
+ switch (nm_list_item_get_status (item)) {
+ case NM_LIST_ITEM_STATUS_CONNECTING:
+ priv->animation_id = g_timeout_add (200, activation_animation, user_data);
+ activation_animation (user_data);
+ pixbuf = NULL;
+ break;
+ default:
+ pixbuf = nm_icon_cache_get (nm_list_item_get_icon (item));
+ }
+
+ if (pixbuf)
+ gtk_status_icon_set_from_pixbuf (GTK_STATUS_ICON (user_data), pixbuf);
+}
+
+static void
+model_changed (NMStatusModel *model,
+ NMListItem *active_item,
+ gpointer user_data)
+{
+ NMStatusIcon *self = NM_STATUS_ICON (user_data);
+ NMStatusIconPrivate *priv = GET_PRIVATE (self);
+
+ if (active_item == priv->item)
+ return;
+
+ if (priv->item)
+ g_signal_handlers_disconnect_by_func (priv->item, item_status_changed, self);
+
+ priv->item = active_item;
+
+ if (active_item) {
+ g_signal_connect (active_item, "notify::" NM_LIST_ITEM_STATUS, G_CALLBACK (item_status_changed), self);
+ g_signal_connect (active_item, "notify::" NM_LIST_ITEM_ICON, G_CALLBACK (item_status_changed), self);
+ item_status_changed (active_item, NULL, self);
+ } else {
+ GdkPixbuf *pixbuf;
+
+ pixbuf = nm_icon_cache_get ("nm-no-connection");
+ if (pixbuf)
+ gtk_status_icon_set_from_pixbuf (GTK_STATUS_ICON (self), pixbuf);
+ }
+}
+
+/*****************************************************************************/
+
+static void
+nm_status_icon_init (NMStatusIcon *self)
+{
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMStatusIconPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_MODEL:
+ /* Construct only */
+ priv->model = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMStatusIconPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_MODEL:
+ g_value_set_object (value, priv->model);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+constructed (GObject *object)
+{
+ NMStatusIconPrivate *priv = GET_PRIVATE (object);
+
+ if (G_OBJECT_CLASS (nm_status_icon_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_status_icon_parent_class)->constructed (object);
+
+ g_signal_connect (priv->model, "changed", G_CALLBACK (model_changed), object);
+}
+
+static void
+dispose (GObject *object)
+{
+ NMStatusIconPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ if (priv->animation_id)
+ g_source_remove (priv->animation_id);
+
+ if (priv->model)
+ g_object_unref (priv->model);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_status_icon_parent_class)->dispose (object);
+}
+
+static void
+nm_status_icon_class_init (NMStatusIconClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMStatusIconPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_MODEL,
+ g_param_spec_object (NM_STATUS_ICON_MODEL,
+ "NMStatusModel",
+ "NMStatusModel",
+ NM_TYPE_STATUS_MODEL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
diff --git a/libnm-gtk/nm-status-icon.h b/libnm-gtk/nm-status-icon.h
new file mode 100644
index 0000000..7dbc123
--- /dev/null
+++ b/libnm-gtk/nm-status-icon.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_STATUS_ICON_H
+#define NM_STATUS_ICON_H
+
+#include <gtk/gtk.h>
+#include <nm-status-model.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_STATUS_ICON (nm_status_icon_get_type ())
+#define NM_STATUS_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_STATUS_ICON, NMStatusIcon))
+#define NM_STATUS_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_STATUS_ICON, NMStatusIconClass))
+#define NM_IS_STATUS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_STATUS_ICON))
+#define NM_IS_STATUS_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_STATUS_ICON))
+#define NM_STATUS_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_STATUS_ICON, NMStatusIconClass))
+
+#define NM_STATUS_ICON_MODEL "model"
+
+typedef struct {
+ GtkStatusIcon parent;
+} NMStatusIcon;
+
+typedef struct {
+ GtkStatusIconClass parent;
+} NMStatusIconClass;
+
+GType nm_status_icon_get_type (void);
+
+GtkStatusIcon *nm_status_icon_new (NMStatusModel *model);
+
+G_END_DECLS
+
+#endif /* NM_STATUS_ICON_H */
diff --git a/libnm-gtk/nm-status-model.c b/libnm-gtk/nm-status-model.c
new file mode 100644
index 0000000..fbb9b49
--- /dev/null
+++ b/libnm-gtk/nm-status-model.c
@@ -0,0 +1,140 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include "nm-status-model.h"
+
+G_DEFINE_TYPE (NMStatusModel, nm_status_model, GTK_TYPE_TREE_MODEL_FILTER)
+
+enum {
+ CHANGED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+GtkTreeModel *
+nm_status_model_new (GtkTreeModel *list_model)
+{
+ g_return_val_if_fail (GTK_IS_TREE_MODEL (list_model), NULL);
+
+ return (GtkTreeModel *) g_object_new (NM_TYPE_STATUS_MODEL,
+ "child-model", list_model,
+ NULL);
+}
+
+NMListItem *
+nm_status_model_get_active_item (NMStatusModel *self)
+{
+ NMListItem *item = NULL;
+ GtkTreeIter iter;
+
+ g_return_val_if_fail (NM_IS_STATUS_MODEL (self), NULL);
+
+ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (self), &iter))
+ gtk_tree_model_get (GTK_TREE_MODEL (self), &iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+
+ return item;
+}
+
+static gboolean
+model_changed_cb (gpointer data)
+{
+ NMStatusModel *self = NM_STATUS_MODEL (data);
+ NMListItem *item;
+
+ item = nm_status_model_get_active_item (self);
+ g_signal_emit (self, signals[CHANGED], 0, item);
+ g_object_unref (item);
+
+ return FALSE;
+}
+
+static void
+model_changed (NMStatusModel *self)
+{
+ GSource *source;
+
+ source = g_idle_source_new ();
+ g_source_set_closure (source, g_cclosure_new_object (G_CALLBACK (model_changed_cb), G_OBJECT (self)));
+ g_source_attach (source, NULL);
+ g_source_unref (source);
+}
+
+static gboolean
+row_visible_func (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ NMListItem *item = NULL;
+ gboolean visible = FALSE;
+
+ gtk_tree_model_get (model, iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+ if (item) {
+ NMListItemStatus status;
+
+ status = nm_list_item_get_status (item);
+ g_object_unref (item);
+
+ if (status == NM_LIST_ITEM_STATUS_CONNECTED || status == NM_LIST_ITEM_STATUS_CONNECTING)
+ visible = TRUE;
+ }
+
+ return visible;
+}
+
+/*****************************************************************************/
+
+static void
+nm_status_model_init (NMStatusModel *self)
+{
+ gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (self),
+ row_visible_func, NULL, NULL);
+
+ g_signal_connect_swapped (self, "row-deleted", G_CALLBACK (model_changed), self);
+ g_signal_connect_swapped (self, "row-inserted", G_CALLBACK (model_changed), self);
+ g_signal_connect_swapped (self, "rows-reordered", G_CALLBACK (model_changed), self);
+}
+
+static void
+finalize (GObject *object)
+{
+ g_signal_handlers_disconnect_by_func (object, model_changed, object);
+
+ G_OBJECT_CLASS (nm_status_model_parent_class)->finalize (object);
+}
+
+static void
+nm_status_model_class_init (NMStatusModelClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = finalize;
+
+ /* Signals */
+ signals[CHANGED] =
+ g_signal_new ("changed",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NMStatusModelClass, changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1,
+ NM_TYPE_LIST_ITEM);
+}
diff --git a/libnm-gtk/nm-status-model.h b/libnm-gtk/nm-status-model.h
new file mode 100644
index 0000000..38aed54
--- /dev/null
+++ b/libnm-gtk/nm-status-model.h
@@ -0,0 +1,55 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_STATUS_MODEL_H
+#define NM_STATUS_MODEL_H
+
+#include <gtk/gtk.h>
+#include <nm-list-model.h>
+#include <nm-list-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_STATUS_MODEL (nm_status_model_get_type ())
+#define NM_STATUS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_STATUS_MODEL, NMStatusModel))
+#define NM_STATUS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_STATUS_MODEL, NMStatusModelClass))
+#define NM_IS_STATUS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_STATUS_MODEL))
+#define NM_IS_STATUS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_STATUS_MODEL))
+#define NM_STATUS_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_STATUS_MODEL, NMStatusModelClass))
+
+typedef struct {
+ GtkTreeModelFilter parent;
+} NMStatusModel;
+
+typedef struct {
+ GtkTreeModelFilterClass parent_class;
+
+ /* Signals */
+ void (*changed) (NMStatusModel *self,
+ NMListItem *active_item);
+} NMStatusModelClass;
+
+GType nm_status_model_get_type (void);
+
+GtkTreeModel *nm_status_model_new (GtkTreeModel *list_model);
+NMListItem *nm_status_model_get_active_item (NMStatusModel *self);
+
+G_END_DECLS
+
+#endif /* NM_STATUS_MODEL_H */
diff --git a/libnm-gtk/nm-wifi-item.c b/libnm-gtk/nm-wifi-item.c
new file mode 100644
index 0000000..634fa4b
--- /dev/null
+++ b/libnm-gtk/nm-wifi-item.c
@@ -0,0 +1,735 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-wireless.h>
+#include <nm-setting-wireless-security.h>
+#include <nm-setting-8021x.h>
+#include <nm-settings-interface.h>
+#include <nm-utils.h>
+#include "nm-wifi-item.h"
+#include "wireless-dialog.h"
+#include "nm-icon-cache.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NMWifiItem, nm_wifi_item, NM_TYPE_DEVICE_ITEM)
+
+enum {
+ PROP_0,
+ PROP_AP,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_WIFI_ITEM, NMWifiItemPrivate))
+
+typedef struct {
+ GSList *ap_list;
+ NMAccessPoint *current_ap;
+
+ gboolean disposed;
+} NMWifiItemPrivate;
+
+NMListItem *
+nm_wifi_item_new (NMClient *client,
+ NMDeviceWifi *device,
+ NMAccessPoint *ap,
+ NMSettingsConnectionInterface *connection)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL);
+ g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), NULL);
+
+ return (NMListItem *) g_object_new (NM_TYPE_WIFI_ITEM,
+ NM_LIST_ITEM_TYPE_NAME, _("WiFi"),
+ NM_CONNECTION_ITEM_CLIENT, client,
+ NM_CONNECTION_ITEM_CONNECTION, connection,
+ NM_DEVICE_ITEM_DEVICE, device,
+ NM_WIFI_ITEM_AP, ap,
+ NULL);
+}
+
+NMAccessPoint *
+nm_wifi_item_get_ap (NMWifiItem *self)
+{
+ g_return_val_if_fail (NM_IS_WIFI_ITEM (self), NULL);
+
+ return GET_PRIVATE (self)->current_ap;
+}
+
+static void
+update_icon (NMWifiItem *self)
+{
+ NMWifiItemPrivate *priv = GET_PRIVATE (self);
+ const char *icon;
+ guint strength;
+
+ strength = CLAMP (nm_access_point_get_strength (priv->current_ap), 0, 100);
+ if (strength > 80)
+ icon = "nm-signal-100-active";
+ else if (strength > 55)
+ icon = "nm-signal-75-active";
+ else if (strength > 30)
+ icon = "nm-signal-50-active";
+ else if (strength > 5)
+ icon = "nm-signal-25-active";
+ else
+ icon = "nm-signal-00-active";
+
+ if (icon)
+ g_object_set (self, NM_LIST_ITEM_ICON, icon, NULL);
+}
+
+static void
+update_current_ap (NMWifiItem *self)
+{
+ NMWifiItemPrivate *priv = GET_PRIVATE (self);
+ GSList *iter;
+
+ /* FIXME: If device is activated, use activation AP only */
+
+ for (iter = priv->ap_list; iter; iter = iter->next) {
+ NMAccessPoint *ap = (NMAccessPoint *) iter->data;
+
+ if (!priv->current_ap || nm_access_point_get_strength (priv->current_ap) < nm_access_point_get_strength (ap))
+ priv->current_ap = ap;
+ }
+
+ update_icon (self);
+}
+
+gboolean
+nm_wifi_item_add_ap (NMWifiItem *self,
+ NMAccessPoint *ap)
+{
+ NMWifiItemPrivate *priv;
+
+ g_return_val_if_fail (NM_IS_WIFI_ITEM (self), FALSE);
+ g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), FALSE);
+
+ priv = GET_PRIVATE (self);
+ if (priv->current_ap && !utils_access_point_is_compatible (priv->current_ap, ap))
+ return FALSE;
+
+ priv->ap_list = g_slist_prepend (priv->ap_list, g_object_ref (ap));
+ update_current_ap (self);
+
+ g_signal_connect_swapped (ap, "notify::" NM_ACCESS_POINT_STRENGTH, G_CALLBACK (update_current_ap), self);
+
+ return TRUE;
+}
+
+void
+nm_wifi_item_remove_ap (NMWifiItem *self,
+ NMAccessPoint *ap)
+{
+ NMWifiItemPrivate *priv;
+ GSList *iter;
+
+ g_return_if_fail (NM_IS_WIFI_ITEM (self));
+ g_return_if_fail (NM_IS_ACCESS_POINT (ap));
+
+ priv = GET_PRIVATE (self);
+ for (iter = priv->ap_list; iter; iter = iter->next) {
+ if (ap != iter->data)
+ continue;
+
+ g_signal_handlers_disconnect_matched (ap,
+ G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, update_current_ap, self);
+
+ priv->ap_list = g_slist_delete_link (priv->ap_list, iter);
+ g_object_unref (ap);
+
+ if (priv->ap_list)
+ update_current_ap (self);
+ else
+ /* No APs left, die */
+ nm_list_item_request_remove (NM_LIST_ITEM (self));
+
+ break;
+ }
+}
+
+static char *
+wifi_get_specific_object (NMDeviceItem *item)
+{
+ NMAccessPoint *ap;
+
+ ap = GET_PRIVATE (item)->current_ap;
+
+ return g_strdup (nm_object_get_path (NM_OBJECT (ap)));
+}
+
+static const char *
+wifi_get_hw_address (NMDeviceItem *item)
+{
+ NMDeviceWifi *device;
+
+ device = NM_DEVICE_WIFI (nm_device_item_get_device (NM_DEVICE_ITEM (item)));
+
+ return nm_device_wifi_get_hw_address (device);
+}
+
+static int
+priority (NMListItem *item)
+{
+ return NM_LIST_ITEM_PRIORITY_DEV_WIFI + NM_LIST_ITEM_CLASS (nm_wifi_item_parent_class)->priority (item);
+}
+
+static const char * default_ssid_list[] = {
+ "linksys",
+ "linksys-a",
+ "linksys-g",
+ "default",
+ "belkin54g",
+ "NETGEAR",
+ NULL
+};
+
+static gboolean
+is_manufacturer_default_ssid (const GByteArray *ssid)
+{
+ const char **default_ssid = default_ssid_list;
+
+ while (*default_ssid) {
+ if (ssid->len == strlen (*default_ssid)) {
+ if (!memcmp (*default_ssid, ssid->data, ssid->len))
+ return TRUE;
+ }
+ default_ssid++;
+ }
+ return FALSE;
+}
+
+static void
+add_ciphers_from_flags (NMSettingWirelessSecurity *sec,
+ guint32 flags,
+ gboolean pairwise)
+{
+ if (pairwise) {
+ if (flags & NM_802_11_AP_SEC_PAIR_TKIP)
+ nm_setting_wireless_security_add_pairwise (sec, "tkip");
+ if (flags & NM_802_11_AP_SEC_PAIR_CCMP)
+ nm_setting_wireless_security_add_pairwise (sec, "ccmp");
+ } else {
+ if (flags & NM_802_11_AP_SEC_GROUP_WEP40)
+ nm_setting_wireless_security_add_group (sec, "wep40");
+ if (flags & NM_802_11_AP_SEC_GROUP_WEP104)
+ nm_setting_wireless_security_add_group (sec, "wep104");
+ if (flags & NM_802_11_AP_SEC_GROUP_TKIP)
+ nm_setting_wireless_security_add_group (sec, "tkip");
+ if (flags & NM_802_11_AP_SEC_GROUP_CCMP)
+ nm_setting_wireless_security_add_group (sec, "ccmp");
+ }
+}
+
+static NMSettingWirelessSecurity *
+get_security_for_ap (NMAccessPoint *ap,
+ guint32 dev_caps,
+ gboolean *supported,
+ NMSetting8021x **s_8021x)
+{
+ NMSettingWirelessSecurity *sec;
+ NM80211Mode mode;
+ guint32 flags;
+ guint32 wpa_flags;
+ guint32 rsn_flags;
+
+ g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), NULL);
+ g_return_val_if_fail (supported != NULL, NULL);
+ g_return_val_if_fail (*supported == TRUE, NULL);
+ g_return_val_if_fail (s_8021x != NULL, NULL);
+ g_return_val_if_fail (*s_8021x == NULL, NULL);
+
+ sec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
+
+ mode = nm_access_point_get_mode (ap);
+ flags = nm_access_point_get_flags (ap);
+ wpa_flags = nm_access_point_get_wpa_flags (ap);
+ rsn_flags = nm_access_point_get_rsn_flags (ap);
+
+ /* No security */
+ if ( !(flags & NM_802_11_AP_FLAGS_PRIVACY)
+ && (wpa_flags == NM_802_11_AP_SEC_NONE)
+ && (rsn_flags == NM_802_11_AP_SEC_NONE))
+ goto none;
+
+ /* Static WEP, Dynamic WEP, or LEAP */
+ if (flags & NM_802_11_AP_FLAGS_PRIVACY) {
+ if ((dev_caps & NM_WIFI_DEVICE_CAP_RSN) || (dev_caps & NM_WIFI_DEVICE_CAP_WPA)) {
+ /* If the device can do WPA/RSN but the AP has no WPA/RSN informatoin
+ * elements, it must be LEAP or static/dynamic WEP.
+ */
+ if ((wpa_flags == NM_802_11_AP_SEC_NONE) && (rsn_flags == NM_802_11_AP_SEC_NONE)) {
+ g_object_set (sec,
+ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "none",
+ NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, 0,
+ NULL);
+ return sec;
+ }
+ /* Otherwise, the AP supports WPA or RSN, which is preferred */
+ } else {
+ /* Device can't do WPA/RSN, but can at least pass through the
+ * WPA/RSN information elements from a scan. Since Privacy was
+ * advertised, LEAP or static/dynamic WEP must be in use.
+ */
+ g_object_set (sec,
+ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "none",
+ NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, 0,
+ NULL);
+ return sec;
+ }
+ }
+
+ /* Stuff after this point requires infrastructure */
+ if (mode != NM_802_11_MODE_INFRA) {
+ *supported = FALSE;
+ goto none;
+ }
+
+ /* WPA2 PSK first */
+ if ( (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_PSK)
+ && (dev_caps & NM_WIFI_DEVICE_CAP_RSN)) {
+ g_object_set (sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-psk", NULL);
+ nm_setting_wireless_security_add_proto (sec, "rsn");
+ add_ciphers_from_flags (sec, rsn_flags, TRUE);
+ add_ciphers_from_flags (sec, rsn_flags, FALSE);
+ return sec;
+ }
+
+ /* WPA PSK */
+ if ( (wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_PSK)
+ && (dev_caps & NM_WIFI_DEVICE_CAP_WPA)) {
+ g_object_set (sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-psk", NULL);
+ nm_setting_wireless_security_add_proto (sec, "wpa");
+ add_ciphers_from_flags (sec, wpa_flags, TRUE);
+ add_ciphers_from_flags (sec, wpa_flags, FALSE);
+ return sec;
+ }
+
+ /* WPA2 Enterprise */
+ if ( (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)
+ && (dev_caps & NM_WIFI_DEVICE_CAP_RSN)) {
+ g_object_set (sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-eap", NULL);
+ nm_setting_wireless_security_add_proto (sec, "rsn");
+ add_ciphers_from_flags (sec, rsn_flags, TRUE);
+ add_ciphers_from_flags (sec, rsn_flags, FALSE);
+
+ *s_8021x = NM_SETTING_802_1X (nm_setting_802_1x_new ());
+ nm_setting_802_1x_add_eap_method (*s_8021x, "ttls");
+ g_object_set (*s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "mschapv2", NULL);
+ return sec;
+ }
+
+ /* WPA Enterprise */
+ if ( (wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)
+ && (dev_caps & NM_WIFI_DEVICE_CAP_WPA)) {
+ g_object_set (sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-eap", NULL);
+ nm_setting_wireless_security_add_proto (sec, "wpa");
+ add_ciphers_from_flags (sec, wpa_flags, TRUE);
+ add_ciphers_from_flags (sec, wpa_flags, FALSE);
+
+ *s_8021x = NM_SETTING_802_1X (nm_setting_802_1x_new ());
+ nm_setting_802_1x_add_eap_method (*s_8021x, "ttls");
+ g_object_set (*s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "mschapv2", NULL);
+ return sec;
+ }
+
+ *supported = FALSE;
+
+ none:
+ g_object_unref (sec);
+ return NULL;
+}
+
+static NMConnection *
+create_connection (NMConnectionItem *item)
+{
+ NMConnection *connection;
+ NMDeviceWifi *device;
+ NMAccessPoint *ap;
+ NMSetting *s_con;
+ NMSetting *s_wireless;
+ NMSettingWirelessSecurity *s_wireless_sec;
+ NMSetting8021x *s_8021x = NULL;
+ const GByteArray *ap_ssid;
+ char *id;
+ char buf[33];
+ int buf_len;
+ NM80211Mode mode;
+ guint32 dev_caps;
+ gboolean supported = TRUE;
+
+ device = NM_DEVICE_WIFI (nm_device_item_get_device (NM_DEVICE_ITEM (item)));
+ ap = nm_wifi_item_get_ap (NM_WIFI_ITEM (item));
+
+ dev_caps = nm_device_wifi_get_capabilities (device);
+ s_wireless_sec = get_security_for_ap (ap, dev_caps, &supported, &s_8021x);
+ if (!supported)
+ return NULL;
+
+ if (NM_CONNECTION_ITEM_CLASS (nm_wifi_item_parent_class)->create_connection)
+ connection = NM_CONNECTION_ITEM_CLASS (nm_wifi_item_parent_class)->create_connection (item);
+
+ if (!connection)
+ return NULL;
+
+ s_wireless = nm_setting_wireless_new ();
+ ap_ssid = nm_access_point_get_ssid (ap);
+ g_object_set (s_wireless, NM_SETTING_WIRELESS_SSID, ap_ssid, NULL);
+
+ mode = nm_access_point_get_mode (ap);
+ if (mode == NM_802_11_MODE_ADHOC)
+ g_object_set (s_wireless, NM_SETTING_WIRELESS_MODE, "adhoc", NULL);
+ else if (mode == NM_802_11_MODE_INFRA)
+ g_object_set (s_wireless, NM_SETTING_WIRELESS_MODE, "infrastructure", NULL);
+ else
+ g_assert_not_reached ();
+
+ nm_connection_add_setting (connection, s_wireless);
+
+ if (s_wireless_sec) {
+ g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL);
+ nm_connection_add_setting (connection, NM_SETTING (s_wireless_sec));
+ }
+ if (s_8021x)
+ nm_connection_add_setting (connection, NM_SETTING (s_8021x));
+
+ s_con = nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
+ g_object_set (s_con,
+ NM_SETTING_CONNECTION_TYPE, nm_setting_get_name (s_wireless),
+ NM_SETTING_CONNECTION_AUTOCONNECT, !is_manufacturer_default_ssid (ap_ssid),
+ NULL);
+
+ memset (buf, 0, sizeof (buf));
+ buf_len = MIN (ap_ssid->len, sizeof (buf) - 1);
+ memcpy (buf, ap_ssid->data, buf_len);
+ id = nm_utils_ssid_to_utf8 (buf, buf_len);
+ g_object_set (s_con, NM_SETTING_CONNECTION_ID, id, NULL);
+ g_free (id);
+
+ return connection;
+}
+
+static void
+connection_created_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ NMConnectionItem *connection_item = NM_CONNECTION_ITEM (source_object);
+ NMConnection *connection;
+
+ connection = nm_connection_item_create_connection_finish (connection_item, result, NULL);
+ if (connection) {
+ nm_connection_item_new_connection (connection_item, connection, TRUE);
+ g_object_unref (connection);
+ }
+}
+
+static void
+connect (NMListItem *item)
+{
+ NMConnectionItem *connection_item = NM_CONNECTION_ITEM (item);
+ NMConnection *connection;
+
+ connection = (NMConnection *) nm_connection_item_get_connection (connection_item);
+ if (connection) {
+ NM_LIST_ITEM_CLASS (nm_wifi_item_parent_class)->connect (item);
+ return;
+ }
+
+ /* We don't have a connection yet, so create one */
+ nm_connection_item_create_connection (connection_item, connection_created_cb, NULL);
+}
+
+static void
+update_cb (NMSettingsConnectionInterface *connection,
+ GError *error,
+ gpointer user_data)
+{
+ if (error) {
+ g_warning ("%s: failed to update connection: (%d) %s",
+ __func__, error->code, error->message);
+ }
+}
+
+typedef struct {
+ NMNewSecretsRequestedFunc callback;
+ gpointer callback_data;
+} SecretsRequestInfo;
+
+static void
+connection_secrets_response_cb (NMAWirelessDialog *dialog,
+ gint response,
+ gpointer user_data)
+{
+ SecretsRequestInfo *info = user_data;
+ NMConnection *connection;
+ GHashTable *settings = NULL;
+ NMSetting *s_wireless_sec;
+ const char *key_mgmt;
+ GError *error = NULL;
+
+ gtk_widget_hide (GTK_WIDGET (dialog));
+
+ connection = nma_wireless_dialog_get_connection (dialog);
+
+ if (response != GTK_RESPONSE_OK) {
+ error = g_error_new (NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_SECRETS_REQUEST_CANCELED,
+ "%s.%d (%s): canceled",
+ __FILE__, __LINE__, __func__);
+
+ goto done;
+ }
+
+ /* Returned secrets are a{sa{sv}}; this is the outer a{s...} hash that
+ * will contain all the individual settings hashes.
+ */
+ settings = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, (GDestroyNotify) g_hash_table_destroy);
+
+ /* If the user chose an 802.1x-based auth method, return 802.1x secrets,
+ * not wireless secrets. Can happen with Dynamic WEP, because NM doesn't
+ * know the capabilities of the AP (since Dynamic WEP APs don't broadcast
+ * beacons), and therefore defaults to requesting WEP secrets from the
+ * wireless-security setting, not the 802.1x setting.
+ */
+
+ s_wireless_sec = nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ key_mgmt = nm_setting_wireless_security_get_key_mgmt (NM_SETTING_WIRELESS_SECURITY (s_wireless_sec));
+ if (!strcmp (key_mgmt, "ieee8021x") || !strcmp (key_mgmt, "wpa-eap")) {
+ const char *auth_alg;
+
+ /* LEAP secrets aren't in the 802.1x setting */
+ auth_alg = nm_setting_wireless_security_get_auth_alg (NM_SETTING_WIRELESS_SECURITY (s_wireless_sec));
+ if (!auth_alg || strcmp (auth_alg, "leap")) {
+ NMSetting *s_8021x;
+
+ s_8021x = nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ if (!s_8021x) {
+ error = g_error_new (NM_SETTINGS_INTERFACE_ERROR,
+ NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION,
+ "%s.%d (%s): requested setting '802-1x' didn't"
+ " exist in the connection.",
+ __FILE__, __LINE__, __func__);
+ goto done;
+ }
+
+ /* Add the 802.1x setting */
+ g_hash_table_insert (settings,
+ g_strdup (nm_setting_get_name (s_8021x)),
+ nm_setting_to_hash (s_8021x));
+ }
+ }
+
+ /* Add the 802-11-wireless-security setting no matter what */
+ g_hash_table_insert (settings,
+ g_strdup (nm_setting_get_name (s_wireless_sec)),
+ nm_setting_to_hash (s_wireless_sec));
+
+ info->callback ((NMSettingsConnectionInterface *) connection, settings, NULL, info->callback_data);
+
+ /* Save the connection back to GConf _after_ hashing it, because
+ * saving to GConf might trigger the GConf change notifiers, resulting
+ * in the connection being read back in from GConf which clears secrets.
+ */
+ if (NM_IS_GCONF_CONNECTION (connection)) {
+ nm_settings_connection_interface_update (NM_SETTINGS_CONNECTION_INTERFACE (connection),
+ update_cb,
+ NULL);
+ }
+
+done:
+ if (settings)
+ g_hash_table_destroy (settings);
+
+ if (error) {
+ g_warning ("%s", error->message);
+ info->callback (NM_SETTINGS_CONNECTION_INTERFACE (connection), NULL, error, info->callback_data);
+ g_error_free (error);
+ }
+
+ g_free (info);
+
+ if (connection)
+ nm_connection_clear_secrets (connection);
+
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
+static void
+secrets_requested (NMConnectionItem *item,
+ NMConnection *connection,
+ const char *setting_name,
+ const char **hints,
+ gboolean ask_user,
+ NMNewSecretsRequestedFunc callback,
+ gpointer callback_data)
+{
+ GtkWidget *dialog;
+ SecretsRequestInfo *info;
+
+ dialog = nma_wireless_dialog_new (nm_connection_item_get_client (item),
+ connection,
+ nm_device_item_get_device (NM_DEVICE_ITEM (item)),
+ nm_wifi_item_get_ap (NM_WIFI_ITEM (item)));
+
+ info = g_new (SecretsRequestInfo, 1);
+ info->callback = callback;
+ info->callback_data = callback_data;
+
+ g_signal_connect (dialog, "done", G_CALLBACK (connection_secrets_response_cb), info);
+ nma_wireless_dialog_show (NMA_WIRELESS_DIALOG (dialog));
+}
+
+/*****************************************************************************/
+
+static void
+nm_wifi_item_init (NMWifiItem *self)
+{
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NMWifiItem *self = NM_WIFI_ITEM (object);
+
+ switch (prop_id) {
+ case PROP_AP:
+ /* Construct only */
+ nm_wifi_item_add_ap (self, NM_ACCESS_POINT (g_value_dup_object (value)));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NMWifiItemPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_AP:
+ g_value_set_object (value, priv->current_ap);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+constructed (GObject *object)
+{
+ NMWifiItemPrivate *priv = GET_PRIVATE (object);
+ const GByteArray *ssid;
+ char *str;
+ guint32 flags;
+ guint32 wpa_flags;
+ guint32 rsn_flags;
+
+ if (G_OBJECT_CLASS (nm_wifi_item_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_wifi_item_parent_class)->constructed (object);
+
+ ssid = nm_access_point_get_ssid (priv->current_ap);
+ str = nm_utils_ssid_to_utf8 ((char *) ssid->data, ssid->len);
+ g_object_set (object, NM_LIST_ITEM_NAME, str, NULL);
+ g_free (str);
+
+ flags = nm_access_point_get_flags (priv->current_ap);
+ wpa_flags = nm_access_point_get_wpa_flags (priv->current_ap);
+ rsn_flags = nm_access_point_get_rsn_flags (priv->current_ap);
+
+ if (rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_PSK ||
+ wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_PSK ||
+ rsn_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X ||
+ wpa_flags & NM_802_11_AP_SEC_KEY_MGMT_802_1X)
+ str = "WPA encrypted";
+ else if (flags & NM_802_11_AP_FLAGS_PRIVACY)
+ str = "WEP encrypted";
+ else
+ str = NULL;
+
+ if (str)
+ g_object_set (object, NM_LIST_ITEM_SECURITY, str, NULL);
+}
+
+static void
+dispose (GObject *object)
+{
+ NMWifiItemPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ while (priv->ap_list) {
+ NMAccessPoint *ap = (NMAccessPoint *) priv->ap_list->data;
+
+ g_signal_handlers_disconnect_matched (ap,
+ G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, update_current_ap, object);
+ g_object_unref (ap);
+ priv->ap_list = g_slist_delete_link (priv->ap_list, priv->ap_list);
+ }
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_wifi_item_parent_class)->dispose (object);
+}
+
+
+static void
+nm_wifi_item_class_init (NMWifiItemClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMListItemClass *list_class = NM_LIST_ITEM_CLASS (klass);
+ NMConnectionItemClass *connection_class = NM_CONNECTION_ITEM_CLASS (klass);
+ NMDeviceItemClass *device_class = NM_DEVICE_ITEM_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMWifiItemPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+
+ list_class->priority = priority;
+ list_class->connect = connect;
+
+ connection_class->secrets_requested = secrets_requested;
+ connection_class->create_connection = create_connection;
+
+ device_class->get_specific_object = wifi_get_specific_object;
+ device_class->get_hw_address = wifi_get_hw_address;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_AP,
+ g_param_spec_object (NM_WIFI_ITEM_AP,
+ "NMAccessPoint",
+ "NMAccessPoint",
+ NM_TYPE_ACCESS_POINT,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
diff --git a/libnm-gtk/nm-wifi-item.h b/libnm-gtk/nm-wifi-item.h
new file mode 100644
index 0000000..d9c0745
--- /dev/null
+++ b/libnm-gtk/nm-wifi-item.h
@@ -0,0 +1,63 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_WIFI_ITEM_H
+#define NM_WIFI_ITEM_H
+
+#include <glib-object.h>
+#include <nm-device-wifi.h>
+#include <nm-device-item.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_WIFI_ITEM (nm_wifi_item_get_type ())
+#define NM_WIFI_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_WIFI_ITEM, NMWifiItem))
+#define NM_WIFI_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_WIFI_ITEM, NMWifiItemClass))
+#define NM_IS_WIFI_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_WIFI_ITEM))
+#define NM_IS_WIFI_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_WIFI_ITEM))
+#define NM_WIFI_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_WIFI_ITEM, NMWifiItemClass))
+
+#define NM_WIFI_ITEM_AP "ap"
+
+typedef struct {
+ NMDeviceItem parent;
+} NMWifiItem;
+
+typedef struct {
+ NMDeviceItemClass parent_class;
+} NMWifiItemClass;
+
+GType nm_wifi_item_get_type (void);
+
+NMListItem *nm_wifi_item_new (NMClient *client,
+ NMDeviceWifi *device,
+ NMAccessPoint *ap,
+ NMSettingsConnectionInterface *connection);
+
+NMAccessPoint *nm_wifi_item_get_ap (NMWifiItem *self);
+
+gboolean nm_wifi_item_add_ap (NMWifiItem *self,
+ NMAccessPoint *ap);
+
+void nm_wifi_item_remove_ap (NMWifiItem *self,
+ NMAccessPoint *ap);
+
+G_END_DECLS
+
+#endif /* NM_WIFI_ITEM_H */
diff --git a/libnm-gtk/nm-wifi-provider.c b/libnm-gtk/nm-wifi-provider.c
new file mode 100644
index 0000000..8c2d9ba
--- /dev/null
+++ b/libnm-gtk/nm-wifi-provider.c
@@ -0,0 +1,227 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <nm-utils.h>
+#include "nm-wifi-provider.h"
+#include "nm-wifi-item.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NMWifiProvider, nm_wifi_provider, NM_TYPE_DEVICE_PROVIDER)
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NM_TYPE_WIFI_PROVIDER, NMWifiProviderPrivate))
+
+typedef struct {
+ gulong ap_added_id;
+ gulong ap_removed_id;
+
+ gboolean disposed;
+} NMWifiProviderPrivate;
+
+NMItemProvider *
+nm_wifi_provider_new (NMClient *client,
+ NMDeviceWifi *device)
+{
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL);
+
+ return (NMItemProvider *) g_object_new (NM_TYPE_WIFI_PROVIDER,
+ NM_ITEM_PROVIDER_CLIENT, client,
+ NM_DEVICE_PROVIDER_DEVICE, device,
+ NULL);
+}
+
+static void
+wifi_added (NMItemProvider *provider,
+ NMSettingsConnectionInterface *connection)
+{
+ NMDeviceProvider *device_provider = NM_DEVICE_PROVIDER (provider);
+ NMDeviceWifi *device;
+ GSList *list;
+ GSList *iter;
+ const GPtrArray *ap_list;
+ int i;
+
+ if (!nm_device_provider_ready (device_provider))
+ return;
+
+ device = NM_DEVICE_WIFI (nm_device_provider_get_device (device_provider));
+
+ /* First, see if we have an AP item already which has
+ no connection and is compatible with this connection */
+ list = nm_item_provider_get_items (provider);
+ for (iter = list; iter; iter = iter->next) {
+ NMListItem *item = (NMListItem *) iter->data;
+ NMSettingsConnectionInterface *item_connection;
+ NMAccessPoint *ap;
+
+ item_connection = nm_connection_item_get_connection (NM_CONNECTION_ITEM (item));
+ if (item_connection == connection) {
+ /* Already have this same connection why do we get called??? */
+ g_warning ("Connection already in the list, something is broken");
+ return;
+ }
+
+ if (item_connection)
+ continue;
+
+ ap = nm_wifi_item_get_ap (NM_WIFI_ITEM (item));
+ if (utils_connection_valid_for_device (NM_CONNECTION (connection), NM_DEVICE (device), ap)) {
+ g_object_set (item, NM_CONNECTION_ITEM_CONNECTION, connection, NULL);
+ return;
+ }
+ }
+
+ /* That didn't work. let's see if we have a compatible AP so we can still
+ show this connection. This happens when there's multiple connections which
+ match an AP and we want to have an item for each connection */
+
+ ap_list = nm_device_wifi_get_access_points (device);
+ for (i = 0; ap_list && ap_list->len > i; i++) {
+ NMAccessPoint *ap = (NMAccessPoint *) g_ptr_array_index (ap_list, i);
+
+ if (utils_connection_valid_for_device (NM_CONNECTION (connection), NM_DEVICE (device), ap)) {
+ NMListItem *item;
+
+ item = nm_wifi_item_new (nm_item_provider_get_client (provider), device, ap, connection);
+ nm_item_provider_item_added (provider, item);
+ break;
+ }
+ }
+}
+
+static void
+ap_added (NMDeviceWifi *device,
+ NMAccessPoint *ap,
+ gpointer user_data)
+{
+ NMItemProvider *provider = NM_ITEM_PROVIDER (user_data);
+ const GByteArray *ssid;
+ GSList *list;
+ GSList *iter;
+ NMListItem *item;
+ gboolean added = FALSE;
+
+ /* Don't add BSSs that hide their SSID */
+ ssid = nm_access_point_get_ssid (ap);
+ if (!ssid || nm_utils_is_empty_ssid (ssid->data, ssid->len))
+ return;
+
+ /* First, check if any existing item already has a compatible AP */
+ list = nm_item_provider_get_items (provider);
+ for (iter = list; iter; iter = iter->next) {
+ NMWifiItem *wifi_item = (NMWifiItem *) iter->data;
+
+ if (nm_wifi_item_add_ap (wifi_item, ap))
+ added = TRUE;
+ }
+
+ if (added)
+ return;
+
+ /* It was not compatible with any existing item, see if we
+ * have a connection for this AP */
+ list = nm_item_provider_get_connections (provider);
+ for (iter = list; iter; iter = iter->next) {
+ NMSettingsConnectionInterface *connection = (NMSettingsConnectionInterface *) iter->data;
+
+ if (!utils_connection_valid_for_device (NM_CONNECTION (connection), NM_DEVICE (device), ap))
+ continue;
+
+ item = nm_wifi_item_new (nm_item_provider_get_client (provider), device, ap, connection);
+ nm_item_provider_item_added (provider, item);
+ added = TRUE;
+ }
+
+ g_slist_free (list);
+
+ if (added)
+ return;
+
+ /* There's no connection for this AP. Create a connectionless item */
+ item = nm_wifi_item_new (nm_item_provider_get_client (provider), device, ap, NULL);
+ nm_item_provider_item_added (provider, item);
+}
+
+static void
+ap_removed (NMDeviceWifi *device,
+ NMAccessPoint *ap,
+ gpointer user_data)
+{
+ g_slist_foreach (nm_item_provider_get_items (NM_ITEM_PROVIDER (user_data)),
+ (GFunc) nm_wifi_item_remove_ap, ap);
+}
+
+/*****************************************************************************/
+
+static void
+nm_wifi_provider_init (NMWifiProvider *self)
+{
+}
+
+static void
+constructed (GObject *object)
+{
+ NMWifiProviderPrivate *priv = GET_PRIVATE (object);
+ NMDeviceWifi *device;
+ const GPtrArray *ap_list;
+ int i;
+
+ if (G_OBJECT_CLASS (nm_wifi_provider_parent_class)->constructed)
+ G_OBJECT_CLASS (nm_wifi_provider_parent_class)->constructed (object);
+
+ device = NM_DEVICE_WIFI (nm_device_provider_get_device (NM_DEVICE_PROVIDER (object)));
+ priv->ap_added_id = g_signal_connect (device, "access-point-added", G_CALLBACK (ap_added), object);
+ priv->ap_removed_id = g_signal_connect (device, "access-point-removed", G_CALLBACK (ap_removed), object);
+
+ ap_list = nm_device_wifi_get_access_points (device);
+ for (i = 0; ap_list && ap_list->len > i; i++)
+ ap_added (device, (NMAccessPoint *) g_ptr_array_index (ap_list, i), object);
+}
+
+static void
+dispose (GObject *object)
+{
+ NMWifiProviderPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ NMDevice *device;
+
+ device = nm_device_provider_get_device (NM_DEVICE_PROVIDER (object));
+ g_signal_handler_disconnect (device, priv->ap_added_id);
+ g_signal_handler_disconnect (device, priv->ap_removed_id);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nm_wifi_provider_parent_class)->dispose (object);
+}
+
+static void
+nm_wifi_provider_class_init (NMWifiProviderClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMItemProviderClass *item_class = NM_ITEM_PROVIDER_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NMWifiProviderPrivate));
+
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+
+ item_class->connection_added = wifi_added;
+}
diff --git a/libnm-gtk/nm-wifi-provider.h b/libnm-gtk/nm-wifi-provider.h
new file mode 100644
index 0000000..78d6890
--- /dev/null
+++ b/libnm-gtk/nm-wifi-provider.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NM_WIFI_PROVIDER_H
+#define NM_WIFI_PROVIDER_H
+
+#include <glib-object.h>
+#include <nm-device-wifi.h>
+#include <nm-device-provider.h>
+
+G_BEGIN_DECLS
+
+#define NM_TYPE_WIFI_PROVIDER (nm_wifi_provider_get_type ())
+#define NM_WIFI_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_WIFI_PROVIDER, NMWifiProvider))
+#define NM_WIFI_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_WIFI_PROVIDER, NMWifiProviderClass))
+#define NM_IS_WIFI_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_WIFI_PROVIDER))
+#define NM_IS_WIFI_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_WIFI_PROVIDER))
+#define NM_WIFI_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_WIFI_PROVIDER, NMWifiProviderClass))
+
+typedef struct {
+ NMDeviceProvider parent;
+} NMWifiProvider;
+
+typedef struct {
+ NMDeviceProviderClass parent_class;
+} NMWifiProviderClass;
+
+GType nm_wifi_provider_get_type (void);
+
+NMItemProvider *nm_wifi_provider_new (NMClient *client,
+ NMDeviceWifi *device);
+
+G_END_DECLS
+
+#endif /* NM_WIFI_PROVIDER_H */
diff --git a/libnm-gtk/test.c b/libnm-gtk/test.c
new file mode 100644
index 0000000..1e7de4c
--- /dev/null
+++ b/libnm-gtk/test.c
@@ -0,0 +1,224 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <gtk/gtk.h>
+#include <nm-client.h>
+#include <nm-remote-settings-system.h>
+#include "nm-list-model.h"
+#include "nm-device-model.h"
+#include "nm-status-icon.h"
+#include "nm-connection-model.h"
+#include "nm-gconf-settings.h"
+
+static void
+setup_status_icon (NMListModel *model)
+{
+ NMStatusModel *status_model;
+ GtkStatusIcon *status_icon;
+
+ status_model = NM_STATUS_MODEL (nm_status_model_new (GTK_TREE_MODEL (model)));
+ status_icon = nm_status_icon_new (status_model);
+ g_object_unref (status_model);
+}
+
+static GtkWidget *
+create_device_combo (void)
+{
+ GtkWidget *combo;
+ GtkCellRenderer *renderer;
+
+ combo = gtk_combo_box_new ();
+
+ gtk_cell_layout_clear (GTK_CELL_LAYOUT (combo));
+
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), renderer,
+ "pixbuf", NM_DEVICE_MODEL_COL_ICON);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), renderer,
+ "text", NM_DEVICE_MODEL_COL_IFACE);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), renderer, TRUE);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), renderer,
+ "text", NM_DEVICE_MODEL_COL_DESCRIPTION);
+
+ return combo;
+}
+
+static GtkWidget *
+create_connection_tree (void)
+{
+ GtkWidget *tree;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
+
+ tree = gtk_tree_view_new ();
+
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Name",
+ renderer,
+ "text", NM_CONNECTION_MODEL_COL_NAME,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
+
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Type",
+ renderer,
+ "text", NM_CONNECTION_MODEL_COL_TYPE,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
+
+ return tree;
+}
+
+static GtkWidget *
+create_list_tree (void)
+{
+ GtkWidget *tree;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
+
+ tree = gtk_tree_view_new ();
+
+ renderer = gtk_cell_renderer_pixbuf_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Icon",
+ renderer,
+ "icon-name", NM_LIST_MODEL_COL_ICON,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
+
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Name",
+ renderer,
+ "text", NM_LIST_MODEL_COL_NAME,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
+
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Security",
+ renderer,
+ "text", NM_LIST_MODEL_COL_SECURITY,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
+
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Status",
+ renderer,
+ "text", NM_LIST_MODEL_COL_STATUS,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
+
+ renderer = gtk_cell_renderer_toggle_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Show delete",
+ renderer,
+ "active", NM_LIST_MODEL_COL_SHOW_DELETE,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (tree), column);
+
+ return tree;
+}
+
+static void
+do_stuff (void)
+{
+ NMClient *client;
+ DBusGConnection *bus;
+ NMSettingsInterface *user_settings;
+ NMSettingsInterface *system_settings;
+ GtkTreeModel *model;
+ GtkWidget *tree;
+ GtkWidget *scrolled;
+ GtkWidget *window;
+ GtkWidget *box;
+
+ /* Window setup */
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_default_size (GTK_WINDOW (window), 400, 400);
+ g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), NULL);
+ box = gtk_vbox_new (FALSE, 6);
+ gtk_container_add (GTK_CONTAINER (window), box);
+
+ client = nm_client_new ();
+ bus = nm_object_get_connection (NM_OBJECT (client));
+ system_settings = (NMSettingsInterface *) nm_remote_settings_system_new (bus);
+ user_settings = (NMSettingsInterface *) nm_gconf_settings_new (bus);
+
+ /* Device model/tree */
+ model = GTK_TREE_MODEL (nm_device_model_new (client));
+ tree = create_device_combo ();
+ gtk_combo_box_set_model (GTK_COMBO_BOX (tree), model);
+ g_object_unref (model);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (tree), 0);
+ gtk_box_pack_start (GTK_BOX (box), tree, FALSE, TRUE, 0);
+
+ /* Connection model/tree */
+ model = nm_connection_model_new ();
+ nm_connection_model_add_settings (NM_CONNECTION_MODEL (model), user_settings);
+ nm_connection_model_add_settings (NM_CONNECTION_MODEL (model), system_settings);
+
+ tree = create_connection_tree ();
+ gtk_tree_view_set_model (GTK_TREE_VIEW (tree), model);
+ g_object_unref (model);
+ scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ gtk_container_add (GTK_CONTAINER (scrolled), tree);
+ gtk_box_pack_start (GTK_BOX (box), scrolled, TRUE, TRUE, 0);
+
+ /* List model/tree */
+ model = GTK_TREE_MODEL (nm_list_model_new (client));
+ nm_list_model_add_settings (NM_LIST_MODEL (model), user_settings);
+ nm_list_model_add_settings (NM_LIST_MODEL (model), system_settings);
+
+ tree = create_list_tree ();
+ gtk_tree_view_set_model (GTK_TREE_VIEW (tree), model);
+ setup_status_icon (NM_LIST_MODEL (model));
+ g_object_unref (model);
+
+ scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_POLICY_AUTOMATIC,
+ GTK_POLICY_AUTOMATIC);
+
+ gtk_container_add (GTK_CONTAINER (scrolled), tree);
+ gtk_box_pack_start (GTK_BOX (box), scrolled, TRUE, TRUE, 0);
+
+ gtk_widget_show_all (window);
+
+ g_object_unref (user_settings);
+ g_object_unref (system_settings);
+ g_object_unref (client);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gtk_init (&argc, &argv);
+
+ do_stuff ();
+ gtk_main ();
+
+ return 0;
+}
diff --git a/libnm-gtk/utils.c b/libnm-gtk/utils.c
new file mode 100644
index 0000000..94ac317
--- /dev/null
+++ b/libnm-gtk/utils.c
@@ -0,0 +1,874 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <string.h>
+#include <netinet/ether.h>
+#include <glib.h>
+#include <nm-device-ethernet.h>
+#include <nm-device-wifi.h>
+#include <nm-device-bt.h>
+#include <nm-gsm-device.h>
+#include <nm-cdma-device.h>
+#include <nm-access-point.h>
+
+#include <nm-setting-connection.h>
+#include <nm-setting-wired.h>
+#include <nm-setting-wireless.h>
+#include <nm-setting-wireless-security.h>
+#include <nm-setting-8021x.h>
+#include <nm-setting-gsm.h>
+#include <nm-setting-cdma.h>
+#include <nm-setting-pppoe.h>
+#include <nm-setting-bluetooth.h>
+#include <nm-utils.h>
+
+#include "utils.h"
+
+/*
+ * utils_bin2hexstr
+ *
+ * Convert a byte-array into a hexadecimal string.
+ *
+ * Code originally by Alex Larsson <alexl redhat com> and
+ * copyright Red Hat, Inc. under terms of the LGPL.
+ *
+ */
+char *
+utils_bin2hexstr (const char *bytes, int len, int final_len)
+{
+ static char hex_digits[] = "0123456789abcdef";
+ char * result;
+ int i;
+
+ g_return_val_if_fail (bytes != NULL, NULL);
+ g_return_val_if_fail (len > 0, NULL);
+ g_return_val_if_fail (len < 256, NULL); /* Arbitrary limit */
+
+ result = g_malloc0 (len * 2 + 1);
+ for (i = 0; i < len; i++)
+ {
+ result[2*i] = hex_digits[(bytes[i] >> 4) & 0xf];
+ result[2*i+1] = hex_digits[bytes[i] & 0xf];
+ }
+ /* Cut converted key off at the correct length for this cipher type */
+ if (final_len > -1)
+ result[final_len] = '\0';
+
+ return result;
+}
+
+static char *ignored_words[] = {
+ "Semiconductor",
+ "Components",
+ "Corporation",
+ "Communications",
+ "Company",
+ "Corp.",
+ "Corp",
+ "Co.",
+ "Inc.",
+ "Inc",
+ "Ltd.",
+ "Limited.",
+ "Intel?",
+ "chipset",
+ "adapter",
+ "[hex]",
+ "NDIS",
+ "Module",
+ NULL
+};
+
+static char *ignored_phrases[] = {
+ "Multiprotocol MAC/baseband processor",
+ "Wireless LAN Controller",
+ "Wireless LAN Adapter",
+ "Wireless Adapter",
+ "Network Connection",
+ "Wireless Cardbus Adapter",
+ "Wireless CardBus Adapter",
+ "54 Mbps Wireless PC Card",
+ "Wireless PC Card",
+ "Wireless PC",
+ "PC Card with XJACK(r) Antenna",
+ "Wireless cardbus",
+ "Wireless LAN PC Card",
+ "Technology Group Ltd.",
+ "Communication S.p.A.",
+ "Business Mobile Networks BV",
+ "Mobile Broadband Minicard Composite Device",
+ "Mobile Communications AB",
+ NULL
+};
+
+static char *
+fixup_desc_string (const char *desc)
+{
+ char *p, *temp;
+ char **words, **item;
+ GString *str;
+
+ p = temp = g_strdup (desc);
+ while (*p) {
+ if (*p == '_' || *p == ',')
+ *p = ' ';
+ p++;
+ }
+
+ /* Attempt to shorten ID by ignoring certain phrases */
+ for (item = ignored_phrases; *item; item++) {
+ guint32 ignored_len = strlen (*item);
+
+ p = strstr (temp, *item);
+ if (p)
+ memmove (p, p + ignored_len, strlen (p + ignored_len) + 1); /* +1 for the \0 */
+ }
+
+ /* Attmept to shorten ID by ignoring certain individual words */
+ words = g_strsplit (temp, " ", 0);
+ str = g_string_new_len (NULL, strlen (temp));
+ g_free (temp);
+
+ for (item = words; *item; item++) {
+ int i = 0;
+ gboolean ignore = FALSE;
+
+ if (g_ascii_isspace (**item) || (**item == '\0'))
+ continue;
+
+ while (ignored_words[i] && !ignore) {
+ if (!strcmp (*item, ignored_words[i]))
+ ignore = TRUE;
+ i++;
+ }
+
+ if (!ignore) {
+ if (str->len)
+ g_string_append_c (str, ' ');
+ g_string_append (str, *item);
+ }
+ }
+ g_strfreev (words);
+
+ temp = str->str;
+ g_string_free (str, FALSE);
+
+ return temp;
+}
+
+#define DESC_TAG "description"
+
+const char *
+utils_get_device_description (NMDevice *device)
+{
+ char *description = NULL;
+ const char *dev_product;
+ const char *dev_vendor;
+ char *product = NULL;
+ char *vendor = NULL;
+ GString *str;
+
+ g_return_val_if_fail (device != NULL, NULL);
+
+ description = g_object_get_data (G_OBJECT (device), DESC_TAG);
+ if (description)
+ return description;
+
+ dev_product = nm_device_get_product (device);
+ dev_vendor = nm_device_get_vendor (device);
+ if (!dev_product || !dev_vendor)
+ return NULL;
+
+ product = fixup_desc_string (dev_product);
+ vendor = fixup_desc_string (dev_vendor);
+
+ str = g_string_new_len (NULL, strlen (vendor) + strlen (product) + 1);
+
+ g_string_append (str, vendor);
+ g_free (vendor);
+
+ g_string_append_c (str, ' ');
+ g_string_append (str, product);
+ g_free (product);
+
+ description = str->str;
+ g_string_free (str, FALSE);
+
+ g_object_set_data_full (G_OBJECT (device),
+ "description", description,
+ (GDestroyNotify) g_free);
+
+ return description;
+}
+
+struct cf_pair {
+ guint32 chan;
+ guint32 freq;
+};
+
+static struct cf_pair a_table[] = {
+ /* A band */
+ { 7, 5035 },
+ { 8, 5040 },
+ { 9, 5045 },
+ { 11, 5055 },
+ { 12, 5060 },
+ { 16, 5080 },
+ { 34, 5170 },
+ { 36, 5180 },
+ { 38, 5190 },
+ { 40, 5200 },
+ { 42, 5210 },
+ { 44, 5220 },
+ { 46, 5230 },
+ { 48, 5240 },
+ { 50, 5250 },
+ { 52, 5260 },
+ { 56, 5280 },
+ { 58, 5290 },
+ { 60, 5300 },
+ { 64, 5320 },
+ { 100, 5500 },
+ { 104, 5520 },
+ { 108, 5540 },
+ { 112, 5560 },
+ { 116, 5580 },
+ { 120, 5600 },
+ { 124, 5620 },
+ { 128, 5640 },
+ { 132, 5660 },
+ { 136, 5680 },
+ { 140, 5700 },
+ { 149, 5745 },
+ { 152, 5760 },
+ { 153, 5765 },
+ { 157, 5785 },
+ { 160, 5800 },
+ { 161, 5805 },
+ { 165, 5825 },
+ { 183, 4915 },
+ { 184, 4920 },
+ { 185, 4925 },
+ { 187, 4935 },
+ { 188, 4945 },
+ { 192, 4960 },
+ { 196, 4980 },
+ { 0, -1 }
+};
+
+static struct cf_pair bg_table[] = {
+ /* B/G band */
+ { 1, 2412 },
+ { 2, 2417 },
+ { 3, 2422 },
+ { 4, 2427 },
+ { 5, 2432 },
+ { 6, 2437 },
+ { 7, 2442 },
+ { 8, 2447 },
+ { 9, 2452 },
+ { 10, 2457 },
+ { 11, 2462 },
+ { 12, 2467 },
+ { 13, 2472 },
+ { 14, 2484 },
+ { 0, -1 }
+};
+
+guint32
+utils_freq_to_channel (guint32 freq)
+{
+ int i = 0;
+
+ while (a_table[i].chan && (a_table[i].freq != freq))
+ i++;
+ if (a_table[i].chan)
+ return a_table[i].chan;
+
+ i = 0;
+ while (bg_table[i].chan && (bg_table[i].freq != freq))
+ i++;
+ return bg_table[i].chan;
+}
+
+guint32
+utils_channel_to_freq (guint32 channel, char *band)
+{
+ int i = 0;
+
+ if (!strcmp (band, "a")) {
+ while (a_table[i].chan && (a_table[i].chan != channel))
+ i++;
+ return a_table[i].freq;
+ } else if (!strcmp (band, "bg")) {
+ while (bg_table[i].chan && (bg_table[i].chan != channel))
+ i++;
+ return bg_table[i].freq;
+ }
+
+ return 0;
+}
+
+guint32
+utils_find_next_channel (guint32 channel, int direction, char *band)
+{
+ size_t a_size = sizeof (a_table) / sizeof (struct cf_pair);
+ size_t bg_size = sizeof (bg_table) / sizeof (struct cf_pair);
+ struct cf_pair *pair = NULL;
+
+ if (!strcmp (band, "a")) {
+ if (channel < a_table[0].chan)
+ return a_table[0].chan;
+ if (channel > a_table[a_size - 2].chan)
+ return a_table[a_size - 2].chan;
+ pair = &a_table[0];
+ } else if (!strcmp (band, "bg")) {
+ if (channel < bg_table[0].chan)
+ return bg_table[0].chan;
+ if (channel > bg_table[bg_size - 2].chan)
+ return bg_table[bg_size - 2].chan;
+ pair = &bg_table[0];
+ } else {
+ g_assert_not_reached ();
+ return 0;
+ }
+
+ while (pair->chan) {
+ if (channel == pair->chan)
+ return channel;
+ if ((channel < (pair+1)->chan) && (channel > pair->chan)) {
+ if (direction > 0)
+ return (pair+1)->chan;
+ else
+ return pair->chan;
+ }
+ pair++;
+ }
+ return 0;
+}
+
+/*
+ * utils_ether_addr_valid
+ *
+ * Compares an Ethernet address against known invalid addresses.
+ *
+ */
+gboolean
+utils_ether_addr_valid (const struct ether_addr *test_addr)
+{
+ guint8 invalid_addr1[ETH_ALEN] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
+ guint8 invalid_addr2[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+ guint8 invalid_addr3[ETH_ALEN] = {0x44, 0x44, 0x44, 0x44, 0x44, 0x44};
+ guint8 invalid_addr4[ETH_ALEN] = {0x00, 0x30, 0xb4, 0x00, 0x00, 0x00}; /* prism54 dummy MAC */
+
+ g_return_val_if_fail (test_addr != NULL, FALSE);
+
+ /* Compare the AP address the card has with invalid ethernet MAC addresses. */
+ if (!memcmp (test_addr->ether_addr_octet, &invalid_addr1, ETH_ALEN))
+ return FALSE;
+
+ if (!memcmp (test_addr->ether_addr_octet, &invalid_addr2, ETH_ALEN))
+ return FALSE;
+
+ if (!memcmp (test_addr->ether_addr_octet, &invalid_addr3, ETH_ALEN))
+ return FALSE;
+
+ if (!memcmp (test_addr->ether_addr_octet, &invalid_addr4, ETH_ALEN))
+ return FALSE;
+
+ if (test_addr->ether_addr_octet[0] & 1) /* Multicast addresses */
+ return FALSE;
+
+ return TRUE;
+}
+
+static gboolean
+utils_check_ap_compatible (NMAccessPoint *ap,
+ NMConnection *connection)
+{
+ NMSettingWireless *s_wireless;
+ NMSettingWirelessSecurity *s_wireless_sec;
+ const GByteArray *setting_bssid;
+ const char *setting_mode;
+ const char *setting_band;
+ NM80211Mode ap_mode;
+ guint32 freq;
+
+ g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), FALSE);
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
+
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ if (s_wireless == NULL)
+ return FALSE;
+
+ if (!nm_utils_same_ssid (nm_setting_wireless_get_ssid (s_wireless), nm_access_point_get_ssid (ap), TRUE))
+ return FALSE;
+
+ setting_bssid = nm_setting_wireless_get_bssid (s_wireless);
+ if (setting_bssid) {
+ struct ether_addr ap_addr;
+
+ if (ether_aton_r (nm_access_point_get_hw_address (ap), &ap_addr)) {
+ if (memcmp (setting_bssid->data, &ap_addr, ETH_ALEN))
+ return FALSE;
+ }
+ }
+
+ ap_mode = nm_access_point_get_mode (ap);
+ setting_mode = nm_setting_wireless_get_mode (s_wireless);
+ if (setting_mode) {
+ if ( !strcmp (setting_mode, "infrastructure")
+ && (ap_mode != NM_802_11_MODE_INFRA))
+ return FALSE;
+ if ( !strcmp (setting_mode, "adhoc")
+ && (ap_mode != NM_802_11_MODE_ADHOC))
+ return FALSE;
+ }
+
+ freq = nm_access_point_get_frequency (ap);
+ setting_band = nm_setting_wireless_get_band (s_wireless);
+ if (setting_band) {
+ if (!strcmp (setting_band, "a")) {
+ if (freq < 5170 || freq > 5825)
+ return FALSE;
+ } else if (!strcmp (setting_band, "bg")) {
+ if (freq < 2412 || freq > 2472)
+ return FALSE;
+ }
+ }
+
+ // FIXME: channel check
+
+ s_wireless_sec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection,
+ NM_TYPE_SETTING_WIRELESS_SECURITY);
+
+ return nm_setting_wireless_ap_security_compatible (s_wireless,
+ s_wireless_sec,
+ nm_access_point_get_flags (ap),
+ nm_access_point_get_wpa_flags (ap),
+ nm_access_point_get_rsn_flags (ap),
+ nm_access_point_get_mode (ap));
+}
+
+static gboolean
+connection_valid_for_wired (NMConnection *connection,
+ NMSettingConnection *s_con,
+ NMDevice *device,
+ gpointer specific_object)
+{
+ NMDeviceEthernet *ethdev = NM_DEVICE_ETHERNET (device);
+ NMSettingWired *s_wired;
+ const char *str_mac;
+ struct ether_addr *bin_mac;
+ const char *connection_type;
+ const GByteArray *setting_mac;
+ gboolean is_pppoe = FALSE;
+
+ connection_type = nm_setting_connection_get_connection_type (s_con);
+ if (!strcmp (connection_type, NM_SETTING_PPPOE_SETTING_NAME))
+ is_pppoe = TRUE;
+
+ if (!is_pppoe && strcmp (connection_type, NM_SETTING_WIRED_SETTING_NAME))
+ return FALSE;
+
+ s_wired = NM_SETTING_WIRED (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRED));
+ if (!is_pppoe && !s_wired)
+ return FALSE;
+
+ if (s_wired) {
+ /* Match MAC address */
+ setting_mac = nm_setting_wired_get_mac_address (s_wired);
+ if (!setting_mac)
+ return TRUE;
+
+ str_mac = nm_device_ethernet_get_hw_address (ethdev);
+ g_return_val_if_fail (str_mac != NULL, FALSE);
+
+ bin_mac = ether_aton (str_mac);
+ g_return_val_if_fail (bin_mac != NULL, FALSE);
+
+ if (memcmp (bin_mac->ether_addr_octet, setting_mac->data, ETH_ALEN))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static gboolean
+connection_valid_for_wireless (NMConnection *connection,
+ NMSettingConnection *s_con,
+ NMDevice *device,
+ gpointer specific_object)
+{
+ NMDeviceWifi *wdev = NM_DEVICE_WIFI (device);
+ NMSettingWireless *s_wireless;
+ NMSettingWirelessSecurity *s_wireless_sec;
+ const GByteArray *setting_mac;
+ const char *setting_security, *key_mgmt;
+ guint32 wcaps;
+ NMAccessPoint *ap;
+
+ if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_WIRELESS_SETTING_NAME))
+ return FALSE;
+
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ g_return_val_if_fail (s_wireless != NULL, FALSE);
+
+ /* Match MAC address */
+ setting_mac = nm_setting_wireless_get_mac_address (s_wireless);
+ if (setting_mac) {
+ const char *str_mac;
+ struct ether_addr *bin_mac;
+
+ str_mac = nm_device_wifi_get_hw_address (wdev);
+ g_return_val_if_fail (str_mac != NULL, FALSE);
+
+ bin_mac = ether_aton (str_mac);
+ g_return_val_if_fail (bin_mac != NULL, FALSE);
+
+ if (memcmp (bin_mac->ether_addr_octet, setting_mac->data, ETH_ALEN))
+ return FALSE;
+ }
+
+ /* If an AP was given make sure that's compatible with the connection first */
+ if (specific_object) {
+ ap = NM_ACCESS_POINT (specific_object);
+ g_assert (ap);
+
+ if (!utils_check_ap_compatible (ap, connection))
+ return FALSE;
+ }
+
+ setting_security = nm_setting_wireless_get_security (s_wireless);
+ if (!setting_security || strcmp (setting_security, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME))
+ return TRUE; /* all devices can do unencrypted networks */
+
+ s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ if (!s_wireless_sec)
+ return TRUE; /* all devices can do unencrypted networks */
+
+ key_mgmt = nm_setting_wireless_security_get_key_mgmt (s_wireless_sec);
+
+ /* All devices should support static WEP */
+ if (!strcmp (key_mgmt, "none"))
+ return TRUE;
+
+ /* All devices should support legacy LEAP and Dynamic WEP */
+ if (!strcmp (key_mgmt, "ieee8021x"))
+ return TRUE;
+
+ /* Match security with device capabilities */
+ wcaps = nm_device_wifi_get_capabilities (wdev);
+
+ /* At this point, the device better have basic WPA support. */
+ if ( !(wcaps & NM_WIFI_DEVICE_CAP_WPA)
+ || !(wcaps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
+ return FALSE;
+
+ /* Check for only RSN */
+ if ( (nm_setting_wireless_security_get_num_protos (s_wireless_sec) == 1)
+ && !strcmp (nm_setting_wireless_security_get_proto (s_wireless_sec, 0), "rsn")
+ && !(wcaps & NM_WIFI_DEVICE_CAP_RSN))
+ return FALSE;
+
+ /* Check for only pairwise CCMP */
+ if ( (nm_setting_wireless_security_get_num_pairwise (s_wireless_sec) == 1)
+ && !strcmp (nm_setting_wireless_security_get_pairwise (s_wireless_sec, 0), "ccmp")
+ && !(wcaps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
+ return FALSE;
+
+ /* Check for only group CCMP */
+ if ( (nm_setting_wireless_security_get_num_groups (s_wireless_sec) == 1)
+ && !strcmp (nm_setting_wireless_security_get_group (s_wireless_sec, 0), "ccmp")
+ && !(wcaps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
+ return FALSE;
+
+ return TRUE;
+}
+
+static gboolean
+connection_valid_for_gsm (NMConnection *connection,
+ NMSettingConnection *s_con,
+ NMDevice *device,
+ gpointer specific_object)
+{
+ NMSettingGsm *s_gsm;
+
+ if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_GSM_SETTING_NAME))
+ return FALSE;
+
+ s_gsm = NM_SETTING_GSM (nm_connection_get_setting (connection, NM_TYPE_SETTING_GSM));
+ g_return_val_if_fail (s_gsm != NULL, FALSE);
+
+ return TRUE;
+}
+
+static gboolean
+connection_valid_for_cdma (NMConnection *connection,
+ NMSettingConnection *s_con,
+ NMDevice *device,
+ gpointer specific_object)
+{
+ NMSettingCdma *s_cdma;
+
+ if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_CDMA_SETTING_NAME))
+ return FALSE;
+
+ s_cdma = NM_SETTING_CDMA (nm_connection_get_setting (connection, NM_TYPE_SETTING_CDMA));
+ g_return_val_if_fail (s_cdma != NULL, FALSE);
+
+ return TRUE;
+}
+
+static guint32
+get_connection_bt_type (NMConnection *connection)
+{
+ NMSettingBluetooth *s_bt;
+ const char *bt_type;
+
+ s_bt = (NMSettingBluetooth *) nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH);
+ if (!s_bt)
+ return NM_BT_CAPABILITY_NONE;
+
+ bt_type = nm_setting_bluetooth_get_connection_type (s_bt);
+ g_assert (bt_type);
+
+ if (!strcmp (bt_type, NM_SETTING_BLUETOOTH_TYPE_DUN))
+ return NM_BT_CAPABILITY_DUN;
+ else if (!strcmp (bt_type, NM_SETTING_BLUETOOTH_TYPE_PANU))
+ return NM_BT_CAPABILITY_NAP;
+
+ return NM_BT_CAPABILITY_NONE;
+}
+
+static gboolean
+connection_valid_for_bt (NMConnection *connection,
+ NMSettingConnection *s_con,
+ NMDevice *device,
+ gpointer specific_object)
+{
+ NMSettingBluetooth *s_bt;
+ const GByteArray *array;
+ char *str;
+ const char *hw_addr;
+ int addr_match = FALSE;
+ guint32 bt_type;
+
+ if (strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_BLUETOOTH_SETTING_NAME))
+ return FALSE;
+
+ s_bt = NM_SETTING_BLUETOOTH (nm_connection_get_setting (connection, NM_TYPE_SETTING_BLUETOOTH));
+ if (!s_bt)
+ return FALSE;
+
+ array = nm_setting_bluetooth_get_bdaddr (s_bt);
+ if (!array || (array->len != ETH_ALEN))
+ return FALSE;
+
+ bt_type = get_connection_bt_type (connection);
+ if (!(bt_type & nm_device_bt_get_capabilities (NM_DEVICE_BT (device))))
+ return FALSE;
+
+ str = g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X",
+ array->data[0], array->data[1], array->data[2],
+ array->data[3], array->data[4], array->data[5]);
+ hw_addr = nm_device_bt_get_hw_address (NM_DEVICE_BT (device));
+ if (hw_addr)
+ addr_match = !g_ascii_strcasecmp (hw_addr, str);
+ g_free (str);
+
+ return addr_match;
+}
+
+gboolean
+utils_connection_valid_for_device (NMConnection *connection,
+ NMDevice *device,
+ gpointer specific_object)
+{
+ NMSettingConnection *s_con;
+
+ g_return_val_if_fail (connection != NULL, FALSE);
+ g_return_val_if_fail (device != NULL, FALSE);
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_return_val_if_fail (s_con != NULL, FALSE);
+ g_return_val_if_fail (nm_setting_connection_get_connection_type (s_con) != NULL, FALSE);
+
+ if (NM_IS_DEVICE_ETHERNET (device))
+ return connection_valid_for_wired (connection, s_con, device, specific_object);
+ else if (NM_IS_DEVICE_WIFI (device))
+ return connection_valid_for_wireless (connection, s_con, device, specific_object);
+ else if (NM_IS_GSM_DEVICE (device))
+ return connection_valid_for_gsm (connection, s_con, device, specific_object);
+ else if (NM_IS_CDMA_DEVICE (device))
+ return connection_valid_for_cdma (connection, s_con, device, specific_object);
+ else if (NM_IS_DEVICE_BT (device))
+ return connection_valid_for_bt (connection, s_con, device, specific_object);
+ else
+ g_warning ("Unknown device type '%s'", g_type_name (G_OBJECT_TYPE(device)));
+
+ return FALSE;
+}
+
+gboolean
+utils_access_point_is_compatible (NMAccessPoint *ap1,
+ NMAccessPoint *ap2)
+{
+ const GByteArray *ssid1;
+ const GByteArray *ssid2;
+
+ if (!ap1 || !ap2)
+ return FALSE;
+
+ ssid1 = nm_access_point_get_ssid (ap1);
+ ssid2 = nm_access_point_get_ssid (ap2);
+
+ if (!ssid1 || !ssid2)
+ return FALSE;
+
+ if (ssid1->len != ssid2->len || memcmp (ssid1->data, ssid2->data, ssid1->len))
+ return FALSE;
+
+ if (nm_access_point_get_mode (ap1) != nm_access_point_get_mode (ap2) ||
+ nm_access_point_get_flags (ap1) != nm_access_point_get_flags (ap2) ||
+ nm_access_point_get_wpa_flags (ap1) != nm_access_point_get_wpa_flags (ap2) ||
+ nm_access_point_get_rsn_flags (ap1) != nm_access_point_get_rsn_flags (ap2))
+ return FALSE;
+
+ return TRUE;
+}
+
+GSList *
+utils_filter_connections_for_device (NMDevice *device, GSList *connections)
+{
+ GSList *iter;
+ GSList *filtered = NULL;
+
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *connection = NM_CONNECTION (iter->data);
+
+ if (utils_connection_valid_for_device (connection, device, NULL))
+ filtered = g_slist_append (filtered, connection);
+ }
+
+ return filtered;
+}
+
+gboolean
+utils_mac_valid (const struct ether_addr *addr)
+{
+ guint8 invalid1[ETH_ALEN] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
+ guint8 invalid2[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+ guint8 invalid3[ETH_ALEN] = {0x44, 0x44, 0x44, 0x44, 0x44, 0x44};
+ guint8 invalid4[ETH_ALEN] = {0x00, 0x30, 0xb4, 0x00, 0x00, 0x00}; /* prism54 dummy MAC */
+
+ g_return_val_if_fail (addr != NULL, FALSE);
+
+ /* Compare the AP address the card has with invalid ethernet MAC addresses. */
+ if (!memcmp (addr->ether_addr_octet, &invalid1, ETH_ALEN))
+ return FALSE;
+
+ if (!memcmp (addr->ether_addr_octet, &invalid2, ETH_ALEN))
+ return FALSE;
+
+ if (!memcmp (addr->ether_addr_octet, &invalid3, ETH_ALEN))
+ return FALSE;
+
+ if (!memcmp (addr->ether_addr_octet, &invalid4, ETH_ALEN))
+ return FALSE;
+
+ if (addr->ether_addr_octet[0] & 1) /* Multicast addresses */
+ return FALSE;
+
+ return TRUE;
+}
+
+char *
+utils_ether_ntop (const struct ether_addr *mac)
+{
+ /* we like leading zeros and all-caps, instead
+ * of what glibc's ether_ntop() gives us
+ */
+ return g_strdup_printf ("%02X:%02X:%02X:%02X:%02X:%02X",
+ mac->ether_addr_octet[0], mac->ether_addr_octet[1],
+ mac->ether_addr_octet[2], mac->ether_addr_octet[3],
+ mac->ether_addr_octet[4], mac->ether_addr_octet[5]);
+}
+
+
+char *
+utils_next_available_name (GSList *connections, const char *format)
+{
+ GSList *names = NULL, *iter;
+ char *cname = NULL;
+ int i = 0;
+
+ for (iter = connections; iter; iter = g_slist_next (iter)) {
+ NMConnection *candidate = NM_CONNECTION (iter->data);
+ NMSettingConnection *s_con;
+ const char *id;
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (candidate, NM_TYPE_SETTING_CONNECTION));
+ id = nm_setting_connection_get_id (s_con);
+ g_assert (id);
+ names = g_slist_append (names, (gpointer) id);
+ }
+
+ /* Find the next available unique connection name */
+ while (!cname && (i++ < 10000)) {
+ char *temp;
+ gboolean found = FALSE;
+
+ temp = g_strdup_printf (format, i);
+ for (iter = names; iter; iter = g_slist_next (iter)) {
+ if (!strcmp (iter->data, temp)) {
+ found = TRUE;
+ break;
+ }
+ }
+ if (!found)
+ cname = temp;
+ else
+ g_free (temp);
+ }
+
+ g_slist_free (names);
+ return cname;
+}
+
+static NMDialogDoneCallback dialog_done_callback = NULL;
+static gpointer dialog_done_user_data = NULL;
+
+void
+nm_utils_set_dialog_done_cb (NMDialogDoneCallback callback,
+ gpointer user_data)
+{
+ dialog_done_callback = callback;
+ dialog_done_user_data = user_data;
+}
+
+void
+nm_utils_dialog_done (void)
+{
+ if (dialog_done_callback)
+ dialog_done_callback (dialog_done_user_data);
+}
diff --git a/libnm-gtk/utils.h b/libnm-gtk/utils.h
new file mode 100644
index 0000000..b47aa5b
--- /dev/null
+++ b/libnm-gtk/utils.h
@@ -0,0 +1,65 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef UTILS_H
+#define UTILS_H
+
+#include <glib.h>
+#include <nm-connection.h>
+#include <nm-device.h>
+#include <net/ethernet.h>
+#include <nm-access-point.h>
+
+char * utils_bin2hexstr (const char *bytes, int len, int final_len);
+
+const char *utils_get_device_description (NMDevice *device);
+
+guint32 utils_freq_to_channel (guint32 freq);
+guint32 utils_channel_to_freq (guint32 channel, char *band);
+guint32 utils_find_next_channel (guint32 channel, int direction, char *band);
+
+gboolean utils_ether_addr_valid (const struct ether_addr *test_addr);
+
+gboolean utils_connection_valid_for_device (NMConnection *connection,
+ NMDevice *device,
+ gpointer specific_object);
+
+gboolean utils_access_point_is_compatible (NMAccessPoint *ap1,
+ NMAccessPoint *ap2);
+
+GSList *utils_filter_connections_for_device (NMDevice *device, GSList *connections);
+
+char *utils_ether_ntop (const struct ether_addr *mac);
+
+gboolean utils_mac_valid (const struct ether_addr *addr);
+
+char *utils_next_available_name (GSList *connections, const char *format);
+
+
+typedef void (*NMDialogDoneCallback) (gpointer user_data);
+
+void nm_utils_set_dialog_done_cb (NMDialogDoneCallback callback,
+ gpointer user_data);
+
+void nm_utils_dialog_done (void);
+
+#endif /* UTILS_H */
+
diff --git a/libnm-gtk/wireless-dialog.c b/libnm-gtk/wireless-dialog.c
new file mode 100644
index 0000000..f6a7912
--- /dev/null
+++ b/libnm-gtk/wireless-dialog.c
@@ -0,0 +1,1213 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 - 2008 Red Hat, Inc.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string.h>
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
+#include <netinet/ether.h>
+
+#include <nm-client.h>
+#include <nm-utils.h>
+#include <nm-device-wifi.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-wireless.h>
+#include <nm-setting-ip4-config.h>
+
+#include "wireless-dialog.h"
+#include "wireless-security.h"
+#include "utils.h"
+#include "gconf-helpers.h"
+
+G_DEFINE_TYPE (NMAWirelessDialog, nma_wireless_dialog, GTK_TYPE_DIALOG)
+
+enum {
+ DONE,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
+#define NMA_WIRELESS_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), \
+ NMA_TYPE_WIRELESS_DIALOG, \
+ NMAWirelessDialogPrivate))
+
+typedef struct {
+ NMClient *client;
+ GtkBuilder *builder;
+
+ NMConnection *connection;
+ NMDevice *device;
+ NMAccessPoint *ap;
+ gboolean adhoc_create;
+
+ GtkTreeModel *device_model;
+ GtkTreeModel *connection_model;
+ GtkSizeGroup *group;
+ GtkWidget *sec_combo;
+
+ gboolean nag_ignored;
+
+ gboolean disposed;
+} NMAWirelessDialogPrivate;
+
+#define D_NAME_COLUMN 0
+#define D_DEV_COLUMN 1
+
+#define S_NAME_COLUMN 0
+#define S_SEC_COLUMN 1
+
+#define C_NAME_COLUMN 0
+#define C_CON_COLUMN 1
+#define C_SEP_COLUMN 2
+#define C_NEW_COLUMN 3
+
+static void security_combo_changed (GtkWidget *combo, gpointer user_data);
+static gboolean security_combo_init (NMAWirelessDialog *self);
+
+static void
+nma_wireless_dialog_set_nag_ignored (NMAWirelessDialog *self, gboolean ignored)
+{
+ g_return_if_fail (self != NULL);
+
+ NMA_WIRELESS_DIALOG_GET_PRIVATE (self)->nag_ignored = ignored;
+}
+
+static void
+model_free (GtkTreeModel *model, guint col)
+{
+ GtkTreeIter iter;
+
+ if (!model)
+ return;
+
+ if (gtk_tree_model_get_iter_first (model, &iter)) {
+ do {
+ char *str;
+
+ gtk_tree_model_get (model, &iter, col, &str, -1);
+ g_free (str);
+ } while (gtk_tree_model_iter_next (model, &iter));
+ }
+ g_object_unref (model);
+}
+
+static void
+size_group_clear (GtkSizeGroup *group)
+{
+ GSList *children;
+ GSList *iter;
+
+ g_return_if_fail (group != NULL);
+
+ children = gtk_size_group_get_widgets (group);
+ for (iter = children; iter; iter = g_slist_next (iter))
+ gtk_size_group_remove_widget (group, GTK_WIDGET (iter->data));
+}
+
+static void
+size_group_add_permanent (GtkSizeGroup *group,
+ GtkBuilder *builder)
+{
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "network_name_label"));
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "security_combo_label"));
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "device_label"));
+ gtk_size_group_add_widget (group, widget);
+}
+
+static void
+security_combo_changed (GtkWidget *combo,
+ gpointer user_data)
+{
+ NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ GtkWidget *vbox;
+ GList *elt, *children;
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ WirelessSecurity *sec = NULL;
+ GtkWidget *sec_widget;
+
+ vbox = GTK_WIDGET (gtk_builder_get_object (priv->builder, "security_vbox"));
+ g_assert (vbox);
+
+ size_group_clear (priv->group);
+
+ /* Remove any previous wireless security widgets */
+ children = gtk_container_get_children (GTK_CONTAINER (vbox));
+ for (elt = children; elt; elt = g_list_next (elt))
+ gtk_container_remove (GTK_CONTAINER (vbox), GTK_WIDGET (elt->data));
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
+ if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter)) {
+ g_warning ("%s: no active security combo box item.", __func__);
+ return;
+ }
+
+ gtk_tree_model_get (model, &iter, S_SEC_COLUMN, &sec, -1);
+ if (!sec)
+ return;
+
+ sec_widget = wireless_security_get_widget (sec);
+ g_assert (sec_widget);
+
+ size_group_add_permanent (priv->group, priv->builder);
+ wireless_security_add_to_size_group (sec, priv->group);
+
+ if (gtk_widget_get_parent (sec_widget))
+ gtk_widget_reparent (sec_widget, vbox);
+ else
+ gtk_container_add (GTK_CONTAINER (vbox), sec_widget);
+
+ wireless_security_unref (sec);
+
+ /* Re-validate */
+ wireless_security_changed_cb (NULL, sec);
+}
+
+static GByteArray *
+validate_dialog_ssid (NMAWirelessDialog *self)
+{
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ GtkWidget *widget;
+ const char *ssid;
+ guint32 ssid_len;
+ GByteArray *ssid_ba;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "network_name_entry"));
+
+ ssid = gtk_entry_get_text (GTK_ENTRY (widget));
+ ssid_len = strlen (ssid);
+
+ if (!ssid || !ssid_len || (ssid_len > 32))
+ return NULL;
+
+ ssid_len = strlen (ssid);
+ ssid_ba = g_byte_array_sized_new (ssid_len);
+ g_byte_array_append (ssid_ba, (unsigned char *) ssid, ssid_len);
+ return ssid_ba;
+}
+
+static void
+stuff_changed_cb (WirelessSecurity *sec, gpointer user_data)
+{
+ NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ GByteArray *ssid = NULL;
+ gboolean free_ssid = TRUE;
+ gboolean valid = FALSE;
+
+ if (priv->connection) {
+ NMSettingWireless *s_wireless;
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (priv->connection, NM_TYPE_SETTING_WIRELESS));
+ g_assert (s_wireless);
+ ssid = (GByteArray *) nm_setting_wireless_get_ssid (s_wireless);
+ free_ssid = FALSE;
+ } else {
+ ssid = validate_dialog_ssid (self);
+ }
+
+ if (ssid) {
+ valid = wireless_security_validate (sec, ssid);
+ if (free_ssid)
+ g_byte_array_free (ssid, TRUE);
+ }
+
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (self), GTK_RESPONSE_OK, valid);
+}
+
+static void
+ssid_entry_changed (GtkWidget *entry, gpointer user_data)
+{
+ NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ GtkTreeIter iter;
+ WirelessSecurity *sec = NULL;
+ GtkTreeModel *model;
+ gboolean valid = FALSE;
+ GByteArray *ssid;
+
+ ssid = validate_dialog_ssid (self);
+ if (!ssid)
+ goto out;
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->sec_combo));
+ if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->sec_combo), &iter))
+ gtk_tree_model_get (model, &iter, S_SEC_COLUMN, &sec, -1);
+
+ if (sec) {
+ valid = wireless_security_validate (sec, ssid);
+ wireless_security_unref (sec);
+ } else {
+ valid = TRUE;
+ }
+
+ out:
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (self), GTK_RESPONSE_OK, valid);
+}
+
+static void
+connection_combo_changed (GtkWidget *combo,
+ gpointer user_data)
+{
+ NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ gboolean is_new = FALSE;
+ NMSettingWireless *s_wireless;
+ char *utf8_ssid;
+ GtkWidget *widget;
+
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter);
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
+
+ if (priv->connection)
+ g_object_unref (priv->connection);
+
+ gtk_tree_model_get (model, &iter,
+ C_CON_COLUMN, &priv->connection,
+ C_NEW_COLUMN, &is_new, -1);
+
+ if (!security_combo_init (self)) {
+ g_warning ("Couldn't change wireless security combo box.");
+ return;
+ }
+ security_combo_changed (priv->sec_combo, self);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "network_name_entry"));
+ if (priv->connection) {
+ const GByteArray *ssid;
+
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (priv->connection, NM_TYPE_SETTING_WIRELESS));
+ ssid = nm_setting_wireless_get_ssid (s_wireless);
+ utf8_ssid = nm_utils_ssid_to_utf8 ((const char *) ssid->data, ssid->len);
+ gtk_entry_set_text (GTK_ENTRY (widget), utf8_ssid);
+ g_free (utf8_ssid);
+ } else {
+ gtk_entry_set_text (GTK_ENTRY (widget), "");
+ }
+
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (priv->builder, "network_name_entry")), is_new);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (priv->builder, "network_name_label")), is_new);
+ gtk_widget_set_sensitive (priv->sec_combo, is_new);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (priv->builder, "security_combo_label")), is_new);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (priv->builder, "security_vbox")), is_new);
+}
+
+static gboolean
+connection_combo_separator_cb (GtkTreeModel *model, GtkTreeIter *iter, gpointer data)
+{
+ gboolean is_separator = FALSE;
+
+ gtk_tree_model_get (model, iter, C_SEP_COLUMN, &is_separator, -1);
+ return is_separator;
+}
+
+static gboolean
+connection_combo_init (NMAWirelessDialog *self, NMConnection *connection)
+{
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ GtkListStore *store;
+ GtkTreeIter tree_iter;
+ GtkWidget *widget;
+ GtkCellRenderer *renderer;
+
+ g_return_val_if_fail (priv->connection == NULL, FALSE);
+
+ /* Clear any old model */
+ model_free (priv->connection_model, C_NAME_COLUMN);
+
+ /* New model */
+ store = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_OBJECT, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
+ priv->connection_model = GTK_TREE_MODEL (store);
+
+ if (connection) {
+ NMSettingConnection *s_con;
+ const char *id;
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_assert (s_con);
+
+ id = nm_setting_connection_get_id (s_con);
+ g_assert (id);
+
+ gtk_list_store_append (store, &tree_iter);
+ gtk_list_store_set (store, &tree_iter,
+ C_NAME_COLUMN, id,
+ C_CON_COLUMN, connection, -1);
+
+ priv->connection = g_object_ref (connection);
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "connection_combo"));
+
+ gtk_cell_layout_clear (GTK_CELL_LAYOUT (widget));
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), renderer, TRUE);
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (widget), renderer,
+ "text", C_NAME_COLUMN);
+ gtk_combo_box_set_wrap_width (GTK_COMBO_BOX (widget), 1);
+
+ gtk_combo_box_set_model (GTK_COMBO_BOX (widget), priv->connection_model);
+
+ gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (widget),
+ connection_combo_separator_cb,
+ NULL,
+ NULL);
+
+ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ G_CALLBACK (connection_combo_changed), self);
+
+ gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->builder, "connection_label")));
+ gtk_widget_hide (widget);
+
+ return TRUE;
+}
+
+static void
+device_combo_changed (GtkWidget *combo,
+ gpointer user_data)
+{
+ NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter);
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
+
+ g_object_unref (priv->device);
+ gtk_tree_model_get (model, &iter, D_DEV_COLUMN, &priv->device, -1);
+
+ if (!connection_combo_init (self, NULL)) {
+ g_warning ("Couldn't change connection combo box.");
+ return;
+ }
+
+ if (!security_combo_init (self)) {
+ g_warning ("Couldn't change wireless security combo box.");
+ return;
+ }
+
+ security_combo_changed (priv->sec_combo, self);
+}
+
+static void
+add_device_to_model (GtkListStore *model, NMDevice *device)
+{
+ GtkTreeIter iter;
+ char *desc;
+
+ desc = (char *) utils_get_device_description (device);
+ if (!desc)
+ desc = (char *) nm_device_get_iface (device);
+ g_assert (desc);
+
+ gtk_list_store_append (model, &iter);
+ gtk_list_store_set (model, &iter, D_NAME_COLUMN, desc, D_DEV_COLUMN, device, -1);
+}
+
+static gboolean
+can_use_device (NMDevice *device)
+{
+ /* Ignore unsupported devices */
+ if (!(nm_device_get_capabilities (device) & NM_DEVICE_CAP_NM_SUPPORTED))
+ return FALSE;
+
+ if (!NM_IS_DEVICE_WIFI (device))
+ return FALSE;
+
+ if (nm_device_get_state (device) < NM_DEVICE_STATE_DISCONNECTED)
+ return FALSE;
+
+ return TRUE;
+}
+
+static gboolean
+device_combo_init (NMAWirelessDialog *self, NMDevice *device)
+{
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ const GPtrArray *devices;
+ GtkListStore *store;
+ int i, num_added = 0;
+
+ g_return_val_if_fail (priv->device == NULL, FALSE);
+
+ store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_OBJECT);
+ priv->device_model = GTK_TREE_MODEL (store);
+
+ if (device) {
+ if (!can_use_device (device))
+ return FALSE;
+ add_device_to_model (store, device);
+ num_added++;
+ } else {
+ devices = nm_client_get_devices (priv->client);
+ if (devices->len == 0)
+ return FALSE;
+
+ for (i = 0; devices && (i < devices->len); i++) {
+ device = NM_DEVICE (g_ptr_array_index (devices, i));
+ if (can_use_device (device)) {
+ add_device_to_model (store, device);
+ num_added++;
+ }
+ }
+ }
+
+ if (num_added > 0) {
+ GtkWidget *widget;
+ GtkTreeIter iter;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "device_combo"));
+ gtk_combo_box_set_model (GTK_COMBO_BOX (widget), priv->device_model);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ G_CALLBACK (device_combo_changed), self);
+ if (num_added == 1) {
+ gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->builder, "device_label")));
+ gtk_widget_hide (widget);
+ }
+ gtk_tree_model_get_iter_first (priv->device_model, &iter);
+ gtk_tree_model_get (priv->device_model, &iter, D_DEV_COLUMN, &priv->device, -1);
+ }
+
+ return num_added > 0 ? TRUE : FALSE;
+}
+
+static gboolean
+find_proto (NMSettingWirelessSecurity *sec, const char *item)
+{
+ guint32 i;
+
+ for (i = 0; i < nm_setting_wireless_security_get_num_protos (sec); i++) {
+ if (!strcmp (item, nm_setting_wireless_security_get_proto (sec, i)))
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static NMUtilsSecurityType
+get_default_type_for_security (NMSettingWirelessSecurity *sec,
+ gboolean have_ap,
+ guint32 ap_flags,
+ guint32 dev_caps)
+{
+ const char *key_mgmt, *auth_alg;
+
+ g_return_val_if_fail (sec != NULL, NMU_SEC_NONE);
+
+ key_mgmt = nm_setting_wireless_security_get_key_mgmt (sec);
+ auth_alg = nm_setting_wireless_security_get_auth_alg (sec);
+
+ /* No IEEE 802.1x */
+ if (!strcmp (key_mgmt, "none"))
+ return NMU_SEC_STATIC_WEP;
+
+ if ( !strcmp (key_mgmt, "ieee8021x")
+ && (!have_ap || (ap_flags & NM_802_11_AP_FLAGS_PRIVACY))) {
+ if (auth_alg && !strcmp (auth_alg, "leap"))
+ return NMU_SEC_LEAP;
+ return NMU_SEC_DYNAMIC_WEP;
+ }
+
+ if ( !strcmp (key_mgmt, "wpa-none")
+ || !strcmp (key_mgmt, "wpa-psk")) {
+ if (!have_ap || (ap_flags & NM_802_11_AP_FLAGS_PRIVACY)) {
+ if (find_proto (sec, "rsn"))
+ return NMU_SEC_WPA2_PSK;
+ else if (find_proto (sec, "wpa"))
+ return NMU_SEC_WPA_PSK;
+ else
+ return NMU_SEC_WPA_PSK;
+ }
+ }
+
+ if ( !strcmp (key_mgmt, "wpa-eap")
+ && (!have_ap || (ap_flags & NM_802_11_AP_FLAGS_PRIVACY))) {
+ if (find_proto (sec, "rsn"))
+ return NMU_SEC_WPA2_ENTERPRISE;
+ else if (find_proto (sec, "wpa"))
+ return NMU_SEC_WPA_ENTERPRISE;
+ else
+ return NMU_SEC_WPA_ENTERPRISE;
+ }
+
+ return NMU_SEC_INVALID;
+}
+
+static void
+add_security_item (NMAWirelessDialog *self,
+ WirelessSecurity *sec,
+ GtkListStore *model,
+ GtkTreeIter *iter,
+ const char *text)
+{
+ wireless_security_set_changed_notify (sec, stuff_changed_cb, self);
+ gtk_list_store_append (model, iter);
+ gtk_list_store_set (model, iter, S_NAME_COLUMN, text, S_SEC_COLUMN, sec, -1);
+ wireless_security_unref (sec);
+}
+
+static gboolean
+security_combo_init (NMAWirelessDialog *self)
+{
+ NMAWirelessDialogPrivate *priv;
+ GtkListStore *sec_model;
+ GtkTreeIter iter;
+ guint32 ap_flags = 0;
+ guint32 ap_wpa = 0;
+ guint32 ap_rsn = 0;
+ guint32 dev_caps;
+ NMSettingWirelessSecurity *wsec = NULL;
+ NMUtilsSecurityType default_type = NMU_SEC_NONE;
+ NMWepKeyType wep_type = NM_WEP_KEY_TYPE_KEY;
+ int active = -1;
+ int item = 0;
+ NMSettingWireless *s_wireless = NULL;
+ gboolean is_adhoc;
+
+ g_return_val_if_fail (self != NULL, FALSE);
+
+ priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ g_return_val_if_fail (priv->device != NULL, FALSE);
+ g_return_val_if_fail (priv->sec_combo != NULL, FALSE);
+
+ is_adhoc = priv->adhoc_create;
+
+ /* The security options displayed are filtered based on device
+ * capabilities, and if provided, additionally by access point capabilities.
+ * If a connection is given, that connection's options should be selected
+ * by default.
+ */
+ dev_caps = nm_device_wifi_get_capabilities (NM_DEVICE_WIFI (priv->device));
+ if (priv->ap != NULL) {
+ ap_flags = nm_access_point_get_flags (priv->ap);
+ ap_wpa = nm_access_point_get_wpa_flags (priv->ap);
+ ap_rsn = nm_access_point_get_rsn_flags (priv->ap);
+ }
+
+ if (priv->connection) {
+ const char *mode;
+ const char *security;
+
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (priv->connection, NM_TYPE_SETTING_WIRELESS));
+
+ mode = nm_setting_wireless_get_mode (s_wireless);
+ if (mode && !strcmp (mode, "adhoc"))
+ is_adhoc = TRUE;
+
+ wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (priv->connection,
+ NM_TYPE_SETTING_WIRELESS_SECURITY));
+
+ security = nm_setting_wireless_get_security (s_wireless);
+ if (!security || strcmp (security, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME))
+ wsec = NULL;
+ if (wsec) {
+ default_type = get_default_type_for_security (wsec, !!priv->ap, ap_flags, dev_caps);
+ if (default_type == NMU_SEC_STATIC_WEP)
+ wep_type = nm_setting_wireless_security_get_wep_key_type (wsec);
+ if (wep_type == NM_WEP_KEY_TYPE_UNKNOWN)
+ wep_type = NM_WEP_KEY_TYPE_KEY;
+ }
+ } else if (is_adhoc) {
+ default_type = NMU_SEC_STATIC_WEP;
+ wep_type = NM_WEP_KEY_TYPE_PASSPHRASE;
+ }
+
+ sec_model = gtk_list_store_new (2, G_TYPE_STRING, wireless_security_get_g_type ());
+
+ if (nm_utils_security_valid (NMU_SEC_NONE, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
+ gtk_list_store_append (sec_model, &iter);
+ gtk_list_store_set (sec_model, &iter,
+ S_NAME_COLUMN, _("None"),
+ -1);
+ if (default_type == NMU_SEC_NONE)
+ active = item;
+ item++;
+ }
+
+ /* Don't show Static WEP if both the AP and the device are capable of WPA,
+ * even though technically it's possible to have this configuration.
+ */
+ if ( nm_utils_security_valid (NMU_SEC_STATIC_WEP, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)
+ && ((!ap_wpa && !ap_rsn) || !(dev_caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN)))) {
+ WirelessSecurityWEPKey *ws_wep;
+
+ ws_wep = ws_wep_key_new (priv->connection, NM_WEP_KEY_TYPE_KEY, priv->adhoc_create);
+ if (ws_wep) {
+ add_security_item (self, WIRELESS_SECURITY (ws_wep), sec_model,
+ &iter, _("WEP 40/128-bit Key"));
+ if ((active < 0) && (default_type == NMU_SEC_STATIC_WEP) && (wep_type == NM_WEP_KEY_TYPE_KEY))
+ active = item;
+ item++;
+ }
+
+ ws_wep = ws_wep_key_new (priv->connection, NM_WEP_KEY_TYPE_PASSPHRASE, priv->adhoc_create);
+ if (ws_wep) {
+ add_security_item (self, WIRELESS_SECURITY (ws_wep), sec_model,
+ &iter, _("WEP 128-bit Passphrase"));
+ if ((active < 0) && (default_type == NMU_SEC_STATIC_WEP) && (wep_type == NM_WEP_KEY_TYPE_PASSPHRASE))
+ active = item;
+ item++;
+ }
+ }
+
+ /* Don't show LEAP if both the AP and the device are capable of WPA,
+ * even though technically it's possible to have this configuration.
+ */
+ if ( nm_utils_security_valid (NMU_SEC_LEAP, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)
+ && ((!ap_wpa && !ap_rsn) || !(dev_caps & (NM_WIFI_DEVICE_CAP_WPA | NM_WIFI_DEVICE_CAP_RSN)))) {
+ WirelessSecurityLEAP *ws_leap;
+
+ ws_leap = ws_leap_new (priv->connection);
+ if (ws_leap) {
+ add_security_item (self, WIRELESS_SECURITY (ws_leap), sec_model,
+ &iter, _("LEAP"));
+ if ((active < 0) && (default_type == NMU_SEC_LEAP))
+ active = item;
+ item++;
+ }
+ }
+
+ if (nm_utils_security_valid (NMU_SEC_DYNAMIC_WEP, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
+ WirelessSecurityDynamicWEP *ws_dynamic_wep;
+
+ ws_dynamic_wep = ws_dynamic_wep_new (priv->connection);
+ if (ws_dynamic_wep) {
+ add_security_item (self, WIRELESS_SECURITY (ws_dynamic_wep), sec_model,
+ &iter, _("Dynamic WEP (802.1x)"));
+ if ((active < 0) && (default_type == NMU_SEC_DYNAMIC_WEP))
+ active = item;
+ item++;
+ }
+ }
+
+ if ( nm_utils_security_valid (NMU_SEC_WPA_PSK, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)
+ || nm_utils_security_valid (NMU_SEC_WPA2_PSK, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
+ WirelessSecurityWPAPSK *ws_wpa_psk;
+
+ ws_wpa_psk = ws_wpa_psk_new (priv->connection);
+ if (ws_wpa_psk) {
+ add_security_item (self, WIRELESS_SECURITY (ws_wpa_psk), sec_model,
+ &iter, _("WPA & WPA2 Personal"));
+ if ((active < 0) && ((default_type == NMU_SEC_WPA_PSK) || (default_type == NMU_SEC_WPA2_PSK)))
+ active = item;
+ item++;
+ }
+ }
+
+ if ( nm_utils_security_valid (NMU_SEC_WPA_ENTERPRISE, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)
+ || nm_utils_security_valid (NMU_SEC_WPA2_ENTERPRISE, dev_caps, !!priv->ap, is_adhoc, ap_flags, ap_wpa, ap_rsn)) {
+ WirelessSecurityWPAEAP *ws_wpa_eap;
+
+ ws_wpa_eap = ws_wpa_eap_new (priv->connection);
+ if (ws_wpa_eap) {
+ add_security_item (self, WIRELESS_SECURITY (ws_wpa_eap), sec_model,
+ &iter, _("WPA & WPA2 Enterprise"));
+ if ((active < 0) && ((default_type == NMU_SEC_WPA_ENTERPRISE) || (default_type == NMU_SEC_WPA2_ENTERPRISE)))
+ active = item;
+ item++;
+ }
+ }
+
+ gtk_combo_box_set_model (GTK_COMBO_BOX (priv->sec_combo), GTK_TREE_MODEL (sec_model));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (priv->sec_combo), active < 0 ? 0 : (guint32) active);
+ g_object_unref (G_OBJECT (sec_model));
+ return TRUE;
+}
+
+static gboolean
+revalidate (gpointer user_data)
+{
+ NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+
+ security_combo_changed (priv->sec_combo, self);
+ return FALSE;
+}
+
+static gboolean
+internal_init (NMAWirelessDialog *self,
+ NMConnection *specific_connection,
+ NMDevice *specific_device,
+ gboolean auth_only,
+ gboolean create)
+{
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ GtkWidget *widget;
+ char *label, *icon_name = "network-wireless";
+ gboolean security_combo_focus = FALSE;
+
+ gtk_window_set_position (GTK_WINDOW (self), GTK_WIN_POS_CENTER_ALWAYS);
+ gtk_container_set_border_width (GTK_CONTAINER (self), 6);
+ gtk_window_set_default_size (GTK_WINDOW (self), 488, -1);
+ gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
+ gtk_dialog_set_has_separator (GTK_DIALOG (self), FALSE);
+
+ if (auth_only)
+ icon_name = "dialog-password";
+ else
+ icon_name = "network-wireless";
+
+ gtk_window_set_icon_name (GTK_WINDOW (self), icon_name);
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "image1"));
+ gtk_image_set_from_icon_name (GTK_IMAGE (widget), icon_name, GTK_ICON_SIZE_DIALOG);
+
+ gtk_box_set_spacing (GTK_BOX (gtk_bin_get_child (GTK_BIN (self))), 2);
+
+ widget = gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
+ gtk_box_set_child_packing (GTK_BOX (GTK_DIALOG (self)->action_area), widget,
+ FALSE, TRUE, 0, GTK_PACK_END);
+
+ /* Connect/Create button */
+ if (create) {
+ GtkWidget *image;
+
+ widget = gtk_button_new_with_mnemonic (_("C_reate"));
+ image = gtk_image_new_from_stock (GTK_STOCK_CONNECT, GTK_ICON_SIZE_BUTTON);
+ gtk_button_set_image (GTK_BUTTON (widget), image);
+
+ gtk_widget_show (widget);
+ gtk_dialog_add_action_widget (GTK_DIALOG (self), widget, GTK_RESPONSE_OK);
+ } else
+ widget = gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CONNECT, GTK_RESPONSE_OK);
+
+ gtk_box_set_child_packing (GTK_BOX (GTK_DIALOG (self)->action_area), widget,
+ FALSE, TRUE, 0, GTK_PACK_END);
+ g_object_set (G_OBJECT (widget), "can-default", TRUE, NULL);
+ gtk_widget_grab_default (widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "hbox1"));
+ if (!widget) {
+ nm_warning ("Couldn't find UI wireless_dialog widget.");
+ return FALSE;
+ }
+
+ gtk_widget_reparent (widget, gtk_bin_get_child (GTK_BIN (self)));
+
+ /* If given a valid connection, hide the SSID bits and connection combo */
+ if (specific_connection) {
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "network_name_label"));
+ gtk_widget_hide (widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "network_name_entry"));
+ gtk_widget_hide (widget);
+
+ security_combo_focus = TRUE;
+ } else {
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "network_name_entry"));
+ g_signal_connect (G_OBJECT (widget), "changed", (GCallback) ssid_entry_changed, self);
+ gtk_widget_grab_focus (widget);
+ }
+
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (self), GTK_RESPONSE_OK, FALSE);
+
+ if (!device_combo_init (self, specific_device)) {
+ g_warning ("No wireless devices available.");
+ return FALSE;
+ }
+
+ if (!connection_combo_init (self, specific_connection)) {
+ g_warning ("Couldn't set up connection combo box.");
+ return FALSE;
+ }
+
+ if (!security_combo_init (self)) {
+ g_warning ("Couldn't set up wireless security combo box.");
+ return FALSE;
+ }
+
+ if (security_combo_focus)
+ gtk_widget_grab_focus (priv->sec_combo);
+
+ security_combo_changed (priv->sec_combo, self);
+ g_signal_connect (G_OBJECT (priv->sec_combo), "changed", G_CALLBACK (security_combo_changed), self);
+
+ if (priv->connection) {
+ char *tmp;
+ char *esc_ssid = NULL;
+ NMSettingWireless *s_wireless;
+ const GByteArray *ssid;
+
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (priv->connection, NM_TYPE_SETTING_WIRELESS));
+ ssid = s_wireless ? nm_setting_wireless_get_ssid (s_wireless) : NULL;
+ if (ssid)
+ esc_ssid = nm_utils_ssid_to_utf8 ((const char *) ssid->data, ssid->len);
+
+ tmp = g_strdup_printf (_("Passwords or encryption keys are required to access the wireless network '%s'."),
+ esc_ssid ? esc_ssid : "<unknown>");
+ gtk_window_set_title (GTK_WINDOW (self), _("Wireless Network Authentication Required"));
+ label = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s",
+ _("Authentication required by wireless network"),
+ tmp);
+ g_free (esc_ssid);
+ g_free (tmp);
+ } else if (priv->adhoc_create) {
+ gtk_window_set_title (GTK_WINDOW (self), _("Create New Wireless Network"));
+ label = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s",
+ _("New wireless network"),
+ _("Enter a name for the wireless network you wish to create."));
+ } else {
+ gtk_window_set_title (GTK_WINDOW (self), _("Connect to Hidden Wireless Network"));
+ label = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s",
+ _("Hidden wireless network"),
+ _("Enter the name and security details of the hidden wireless network you wish to connect to."));
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "caption_label"));
+ gtk_label_set_markup (GTK_LABEL (widget), label);
+ g_free (label);
+
+ /* Re-validate from an idle handler so that widgets like file choosers
+ * have had time to find their files.
+ */
+ g_idle_add (revalidate, self);
+
+ return TRUE;
+}
+
+NMConnection *
+nma_wireless_dialog_get_connection (NMAWirelessDialog *self)
+{
+ g_return_val_if_fail (NMA_IS_WIRELESS_DIALOG (self), NULL);
+
+ return NMA_WIRELESS_DIALOG_GET_PRIVATE (self)->connection;
+}
+
+NMDevice *
+nma_wireless_dialog_get_device (NMAWirelessDialog *self)
+{
+ NMAWirelessDialogPrivate *priv;
+ GObject *combo;
+ NMDevice *device = NULL;
+ GtkTreeIter iter;
+
+ g_return_val_if_fail (NMA_IS_WIRELESS_DIALOG (self), NULL);
+
+ priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ combo = gtk_builder_get_object (priv->builder, "device_combo");
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter);
+ gtk_tree_model_get (priv->device_model, &iter, D_DEV_COLUMN, &device, -1);
+
+ if (device)
+ g_object_unref (device);
+
+ return device;
+}
+
+NMAccessPoint *
+nma_wireless_dialog_get_ap (NMAWirelessDialog *self)
+{
+ g_return_val_if_fail (NMA_IS_WIRELESS_DIALOG (self), NULL);
+
+ return NMA_WIRELESS_DIALOG_GET_PRIVATE (self)->ap;
+}
+
+GtkWidget *
+nma_wireless_dialog_new (NMClient *client,
+ NMConnection *connection,
+ NMDevice *device,
+ NMAccessPoint *ap)
+{
+ NMAWirelessDialog *self;
+ NMAWirelessDialogPrivate *priv;
+ guint32 dev_caps;
+
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
+ g_return_val_if_fail (NM_IS_DEVICE (device), NULL);
+ g_return_val_if_fail (NM_IS_ACCESS_POINT (ap), NULL);
+
+ /* Ensure device validity */
+ dev_caps = nm_device_get_capabilities (device);
+ g_return_val_if_fail (dev_caps & NM_DEVICE_CAP_NM_SUPPORTED, NULL);
+ g_return_val_if_fail (NM_IS_DEVICE_WIFI (device), NULL);
+
+ self = NMA_WIRELESS_DIALOG (g_object_new (NMA_TYPE_WIRELESS_DIALOG, NULL));
+ if (!self)
+ return NULL;
+
+ priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+
+ priv->client = g_object_ref (client);
+ priv->ap = g_object_ref (ap);
+
+ if (!internal_init (self, connection, device, TRUE, FALSE)) {
+ nm_warning ("Couldn't create wireless security dialog.");
+ g_object_unref (self);
+ return NULL;
+ }
+
+ return GTK_WIDGET (self);
+}
+
+GtkWidget *
+nma_wireless_dialog_hidden_new (NMClient *client)
+{
+ NMAWirelessDialog *self;
+ NMAWirelessDialogPrivate *priv;
+
+ g_return_val_if_fail (NM_IS_CLIENT (client), NULL);
+
+ self = NMA_WIRELESS_DIALOG (g_object_new (NMA_TYPE_WIRELESS_DIALOG, NULL));
+ if (!self)
+ return NULL;
+
+ priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+
+ priv->client = g_object_ref (client);
+
+ if (!internal_init (self, NULL, NULL, FALSE, FALSE)) {
+ nm_warning ("Couldn't create wireless security dialog.");
+ g_object_unref (self);
+ return NULL;
+ }
+
+ return GTK_WIDGET (self);
+}
+
+void
+nma_wireless_dialog_show (NMAWirelessDialog *dialog)
+{
+ GtkWidget *widget;
+
+ g_return_if_fail (NMA_IS_WIRELESS_DIALOG (dialog));
+
+ widget = GTK_WIDGET (dialog);
+
+ /* Prevent focus stealing */
+ gtk_widget_realize (widget);
+ gtk_widget_show (widget);
+ gtk_window_present_with_time (GTK_WINDOW (widget), gdk_x11_get_server_time (widget->window));
+}
+
+static gboolean
+wireless_dialog_close (gpointer user_data)
+{
+ GtkWidget *dialog = GTK_WIDGET (user_data);
+
+ gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+ return FALSE;
+}
+
+static void
+nag_dialog_response_cb (GtkDialog *nag_dialog,
+ gint response,
+ gpointer user_data)
+{
+ NMAWirelessDialog *wireless_dialog = NMA_WIRELESS_DIALOG (user_data);
+
+ if (response == GTK_RESPONSE_NO) { /* user opted not to correct the warning */
+ nma_wireless_dialog_set_nag_ignored (wireless_dialog, TRUE);
+ g_idle_add (wireless_dialog_close, wireless_dialog);
+ }
+}
+
+static void
+dialog_response (GtkDialog *dialog,
+ gint response,
+ gpointer user_data)
+{
+ NMAWirelessDialog *self = NMA_WIRELESS_DIALOG (user_data);
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ NMSetting *setting;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ WirelessSecurity *sec = NULL;
+
+ if (response != GTK_RESPONSE_OK)
+ goto out;
+
+ if (!priv->connection) {
+ /* Create new connection */
+ char *id;
+ char *uuid;
+ GByteArray *ssid;
+
+ priv->connection = nm_connection_new ();
+
+ /* Wireless setting */
+ setting = nm_setting_wireless_new ();
+ ssid = validate_dialog_ssid (self);
+ g_object_set (setting, NM_SETTING_WIRELESS_SSID, ssid, NULL);
+ nm_connection_add_setting (priv->connection, setting);
+
+ if (ssid) {
+ id = nm_utils_ssid_to_utf8 ((char *) ssid->data, ssid->len);
+ g_byte_array_free (ssid, TRUE);
+ } else
+ id = NULL;
+
+ /* Connection setting */
+ setting = nm_setting_connection_new ();
+ uuid = nm_utils_uuid_generate ();
+
+ /* FIXME: don't autoconnect until the connection is successful at least once */
+ /* Don't autoconnect adhoc networks by default for now */
+ g_object_set (setting,
+ NM_SETTING_CONNECTION_TYPE, NM_SETTING_WIRELESS_SETTING_NAME,
+ NM_SETTING_CONNECTION_UUID, uuid,
+ NM_SETTING_CONNECTION_ID, id,
+ NM_SETTING_CONNECTION_AUTOCONNECT, !priv->adhoc_create,
+ NULL);
+
+ g_free (uuid);
+ g_free (id);
+ nm_connection_add_setting (priv->connection, setting);
+
+ /* IPv4 setting */
+ if (priv->adhoc_create) {
+ g_object_set (setting, NM_SETTING_WIRELESS_MODE, "adhoc", NULL);
+
+ setting = nm_setting_ip4_config_new ();
+ g_object_set (setting,
+ NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_SHARED,
+ NULL);
+
+ nm_connection_add_setting (priv->connection, setting);
+ }
+ }
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->sec_combo));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->sec_combo), &iter);
+ gtk_tree_model_get (model, &iter, S_SEC_COLUMN, &sec, -1);
+
+ if (sec && !priv->nag_ignored) {
+ GtkWidget *nag_dialog;
+
+ /* Nag the user about certificates or whatever. Only destroy the dialog
+ * if no nagging was done.
+ */
+ nag_dialog = wireless_security_nag_user (sec);
+ if (nag_dialog) {
+ gtk_window_set_transient_for (GTK_WINDOW (nag_dialog), GTK_WINDOW (dialog));
+ g_signal_connect (nag_dialog, "response",
+ G_CALLBACK (nag_dialog_response_cb),
+ dialog);
+ return;
+ }
+ }
+
+ /* Fill security */
+ if (sec) {
+ wireless_security_fill_connection (sec, priv->connection);
+ wireless_security_unref (sec);
+ } else {
+ /* Unencrypted */
+ setting = nm_connection_get_setting (priv->connection, NM_TYPE_SETTING_WIRELESS);
+ g_object_set (setting, NM_SETTING_WIRELESS_SEC, NULL, NULL);
+ }
+
+ out:
+ g_signal_emit (self, signals[DONE], 0, response);
+ nm_utils_dialog_done ();
+
+ /* FIXME: clear security? */
+}
+
+static void
+nma_wireless_dialog_init (NMAWirelessDialog *self)
+{
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (self);
+ GError *error = NULL;
+
+ priv->builder = gtk_builder_new ();
+ gtk_builder_add_from_file (priv->builder, UIDIR "/wireless-security.ui", &error);
+ if (error) {
+ g_error ("Could not load wireless security UI file: %s", error->message);
+ g_error_free (error);
+ }
+
+ g_signal_connect (self, "response", G_CALLBACK (dialog_response), self);
+
+ priv->sec_combo = GTK_WIDGET (gtk_builder_get_object (priv->builder, "security_combo"));
+ priv->group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+}
+
+static void
+dispose (GObject *object)
+{
+ NMAWirelessDialogPrivate *priv = NMA_WIRELESS_DIALOG_GET_PRIVATE (object);
+
+ if (!priv->disposed)
+ return;
+
+ priv->disposed = TRUE;
+
+ model_free (priv->device_model, D_NAME_COLUMN);
+ model_free (priv->connection_model, C_NAME_COLUMN);
+ gtk_combo_box_set_model (GTK_COMBO_BOX (priv->sec_combo), NULL);
+
+ if (priv->group)
+ g_object_unref (priv->group);
+
+ if (priv->connection)
+ g_object_unref (priv->connection);
+
+ if (priv->device)
+ g_object_unref (priv->device);
+
+ if (priv->ap)
+ g_object_unref (priv->ap);
+
+ g_object_unref (priv->builder);
+
+ if (priv->client)
+ g_object_unref (priv->client);
+
+ G_OBJECT_CLASS (nma_wireless_dialog_parent_class)->dispose (object);
+}
+
+static void
+nma_wireless_dialog_class_init (NMAWirelessDialogClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ g_type_class_add_private (object_class, sizeof (NMAWirelessDialogPrivate));
+
+ /* virtual methods */
+ object_class->dispose = dispose;
+
+ /* Signals */
+ signals[DONE] = g_signal_new ("done",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NMAWirelessDialogClass, done),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
+}
diff --git a/libnm-gtk/wireless-dialog.h b/libnm-gtk/wireless-dialog.h
new file mode 100644
index 0000000..a5d4724
--- /dev/null
+++ b/libnm-gtk/wireless-dialog.h
@@ -0,0 +1,66 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef WIRELESS_DIALOG_H
+#define WIRELESS_DIALOG_H
+
+#include <gtk/gtk.h>
+#include <glib.h>
+#include <glib-object.h>
+
+#include <nm-client.h>
+#include <nm-connection.h>
+#include <nm-device.h>
+#include <nm-access-point.h>
+
+#define NMA_TYPE_WIRELESS_DIALOG (nma_wireless_dialog_get_type ())
+#define NMA_WIRELESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMA_TYPE_WIRELESS_DIALOG, NMAWirelessDialog))
+#define NMA_WIRELESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMA_TYPE_WIRELESS_DIALOG, NMAWirelessDialogClass))
+#define NMA_IS_WIRELESS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMA_TYPE_WIRELESS_DIALOG))
+#define NMA_IS_WIRELESS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMA_TYPE_WIRELESS_DIALOG))
+#define NMA_WIRELESS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMA_TYPE_WIRELESS_DIALOG, NMAWirelessDialogClass))
+
+typedef struct {
+ GtkDialog parent;
+} NMAWirelessDialog;
+
+typedef struct {
+ GtkDialogClass parent;
+
+ /* Signals */
+ void (*done) (NMAWirelessDialog *dialog, gint response_id);
+} NMAWirelessDialogClass;
+
+GType nma_wireless_dialog_get_type (void);
+
+GtkWidget *nma_wireless_dialog_new (NMClient *client,
+ NMConnection *connection,
+ NMDevice *device,
+ NMAccessPoint *ap);
+
+GtkWidget *nma_wireless_dialog_hidden_new (NMClient *client);
+void nma_wireless_dialog_show (NMAWirelessDialog *self);
+NMConnection *nma_wireless_dialog_get_connection (NMAWirelessDialog *self);
+NMDevice *nma_wireless_dialog_get_device (NMAWirelessDialog *self);
+NMAccessPoint *nma_wireless_dialog_get_ap (NMAWirelessDialog *self);
+
+#endif /* WIRELESS_DIALOG_H */
diff --git a/libnm-gtk/wireless-helper.h b/libnm-gtk/wireless-helper.h
new file mode 100644
index 0000000..ffef449
--- /dev/null
+++ b/libnm-gtk/wireless-helper.h
@@ -0,0 +1,33 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2008 Red Hat, Inc.
+ */
+
+/* Hacks necessary to #include wireless.h; yay for WEXT */
+
+#ifndef __user
+#define __user
+#endif
+#include <sys/types.h>
+#include <linux/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <wireless.h>
+
diff --git a/libnm-gtk/wireless-security.ui b/libnm-gtk/wireless-security.ui
new file mode 100644
index 0000000..ea0b206
--- /dev/null
+++ b/libnm-gtk/wireless-security.ui
@@ -0,0 +1,312 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkListStore" id="model1">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0"> </col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model2">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0"> </col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkDialog" id="wireless_dialog">
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Other Wireless Network...</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-always</property>
+ <property name="default_width">488</property>
+ <property name="icon_name">gtk-dialog-authentication</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="yalign">0</property>
+ <property name="icon_name">network-wireless</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="caption_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkVBox" id="security_vbox">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="security_combo_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Wireless Security:</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="security_combo">
+ <property name="visible">True</property>
+ <property name="model">model1</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="network_name_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Network Name:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">network_name_entry</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="network_name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="activates_default">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="connection_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Connection:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="connection_combo">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="device_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Wireless _adapter:</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">device_combo</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="device_combo">
+ <property name="visible">True</property>
+ <property name="model">model2</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="cancel_button">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="ok_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">False</property>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image5">
+ <property name="visible">True</property>
+ <property name="stock">gtk-connect</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label67">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">C_onnect</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-6">cancel_button</action-widget>
+ <action-widget response="-5">ok_button</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/Makefile.am b/libnm-gtk/wireless-security/Makefile.am
new file mode 100644
index 0000000..117d32f
--- /dev/null
+++ b/libnm-gtk/wireless-security/Makefile.am
@@ -0,0 +1,54 @@
+noinst_LTLIBRARIES = libwireless-security.la
+
+libwireless_security_la_SOURCES = \
+ wireless-security.h \
+ wireless-security.c \
+ ws-wep-key.h \
+ ws-wep-key.c \
+ ws-wpa-psk.h \
+ ws-wpa-psk.c \
+ ws-leap.h \
+ ws-leap.c \
+ ws-wpa-eap.h \
+ ws-wpa-eap.c \
+ ws-dynamic-wep.h \
+ ws-dynamic-wep.c \
+ eap-method.h \
+ eap-method.c \
+ eap-method-tls.h \
+ eap-method-tls.c \
+ eap-method-leap.h \
+ eap-method-leap.c \
+ eap-method-ttls.h \
+ eap-method-ttls.c \
+ eap-method-peap.h \
+ eap-method-peap.c \
+ eap-method-simple.h \
+ eap-method-simple.c \
+ helpers.h \
+ helpers.c
+
+libwireless_security_la_CPPFLAGS = \
+ $(NMN_CFLAGS) \
+ -I${top_srcdir}/libnm-gtk \
+ -I${top_srcdir}/src/ \
+ -DUIDIR=\""$(uidir)"\"
+
+libwireless_security_la_LIBADD = \
+ $(NMN_LIBS)
+
+uidir = $(datadir)/network-manager-netbook
+ui_DATA = \
+ ca-nag-dialog.ui \
+ dynamic-wep.ui \
+ eap-leap.ui \
+ eap-peap.ui \
+ eap-simple.ui \
+ eap-tls.ui \
+ eap-ttls.ui \
+ leap.ui \
+ wep-key.ui \
+ wpa-eap.ui \
+ wpa-psk.ui
+
+EXTRA_DIST = $(ui_DATA)
diff --git a/libnm-gtk/wireless-security/ca-nag-dialog.ui b/libnm-gtk/wireless-security/ca-nag-dialog.ui
new file mode 100644
index 0000000..56d5fd9
--- /dev/null
+++ b/libnm-gtk/wireless-security/ca-nag-dialog.ui
@@ -0,0 +1,191 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkDialog" id="nag_user_dialog">
+ <property name="border_width">6</property>
+ <property name="modal">True</property>
+ <property name="window_position">center</property>
+ <property name="type_hint">dialog</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkHBox" id="hbox5">
+ <property name="visible">True</property>
+ <property name="border_width">6</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkImage" id="image4">
+ <property name="visible">True</property>
+ <property name="yalign">0</property>
+ <property name="stock">gtk-dialog-warning</property>
+ <property name="icon-size">6</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="content_vbox">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="content_label">
+ <property name="visible">True</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes"><span weight="bold" size="larger">No Certificate Authority certificate chosen</span>
+
+Not using a Certificate Authority (CA) certificate can result in connections to insecure, rogue wireless networks. Would you like to choose a Certificate Authority certificate?</property>
+ <property name="use_markup">True</property>
+ <property name="wrap">True</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="ignore_checkbox">
+ <property name="label" translatable="yes">Don't warn me again</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ignore_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox4">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image3">
+ <property name="visible">True</property>
+ <property name="stock">gtk-no</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label57">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Ignore</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="change_button">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="receives_default">False</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="xscale">0</property>
+ <property name="yscale">0</property>
+ <child>
+ <object class="GtkHBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="stock">gtk-ok</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label56">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Choose CA Certificate</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-9">ignore_button</action-widget>
+ <action-widget response="-8">change_button</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/dynamic-wep.ui b/libnm-gtk/wireless-security/dynamic-wep.ui
new file mode 100644
index 0000000..220fcb1
--- /dev/null
+++ b/libnm-gtk/wireless-security/dynamic-wep.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkListStore" id="model7">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0"> </col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkWindow" id="dynamic_wep_widget">
+ <property name="title">dynamic_wep_widget</property>
+ <child>
+ <object class="GtkNotebook" id="dynamic_wep_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="table12">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="dynamic_wep_auth_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Authentication:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="dynamic_wep_auth_combo">
+ <property name="visible">True</property>
+ <property name="model">model7</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer7"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="dynamic_wep_method_vbox">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label55">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/eap-leap.ui b/libnm-gtk/wireless-security/eap-leap.ui
new file mode 100644
index 0000000..b4d44e3
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-leap.ui
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="eap_leap_widget">
+ <property name="title">eap_leap_widget</property>
+ <child>
+ <object class="GtkNotebook" id="eap_leap_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="table9">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="eap_leap_username_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">User Name:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_leap_password_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_leap_password_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="eap_leap_show_checkbutton">
+ <property name="label" translatable="yes">Show password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_leap_username_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label43">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/eap-method-leap.c b/libnm-gtk/wireless-security/eap-method-leap.c
new file mode 100644
index 0000000..b951160
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-leap.c
@@ -0,0 +1,162 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <ctype.h>
+#include <string.h>
+#include <nm-setting-8021x.h>
+
+#include "eap-method.h"
+#include "wireless-security.h"
+#include "gconf-helpers.h"
+#include "helpers.h"
+
+static void
+show_toggled_cb (GtkCheckButton *button, EAPMethod *method)
+{
+ GtkWidget *widget;
+ gboolean visible;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (method->builder, "eap_leap_password_entry"));
+ g_assert (widget);
+
+ visible = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
+}
+
+static void
+destroy (EAPMethod *parent)
+{
+ EAPMethodLEAP *method = (EAPMethodLEAP *) parent;
+
+ g_slice_free (EAPMethodLEAP, method);
+}
+
+static gboolean
+validate (EAPMethod *parent)
+{
+ GtkWidget *widget;
+ const char *text;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_leap_username_entry"));
+ g_assert (widget);
+ text = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (!text || !strlen (text))
+ return FALSE;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_leap_password_entry"));
+ g_assert (widget);
+ text = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (!text || !strlen (text))
+ return FALSE;
+
+ return TRUE;
+}
+
+static void
+add_to_size_group (EAPMethod *parent, GtkSizeGroup *group)
+{
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_leap_username_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_leap_password_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+}
+
+static void
+fill_connection (EAPMethod *parent, NMConnection *connection)
+{
+ NMSetting8021x *s_8021x;
+ GtkWidget *widget;
+
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ g_assert (s_8021x);
+
+ nm_setting_802_1x_add_eap_method (s_8021x, "leap");
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_leap_username_entry"));
+ g_assert (widget);
+ g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, gtk_entry_get_text (GTK_ENTRY (widget)), NULL);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_leap_password_entry"));
+ g_assert (widget);
+ g_object_set (s_8021x, NM_SETTING_802_1X_PASSWORD, gtk_entry_get_text (GTK_ENTRY (widget)), NULL);
+}
+
+EAPMethodLEAP *
+eap_method_leap_new (WirelessSecurity *parent,
+ NMConnection *connection)
+{
+ EAPMethodLEAP *method;
+ GtkWidget *widget;
+ GtkBuilder *builder;
+
+ method = g_slice_new0 (EAPMethodLEAP);
+ if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group,
+ fill_connection, destroy, "eap-leap.ui", "eap_leap_notebook")) {
+
+ g_slice_free (EAPMethodLEAP, method);
+ return NULL;
+ }
+
+ builder = EAP_METHOD (method)->builder;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_leap_username_entry"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+ if (connection) {
+ NMSetting8021x *s_8021x;
+
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ if (s_8021x && nm_setting_802_1x_get_identity (s_8021x))
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_identity (s_8021x));
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_leap_password_entry"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+
+ /* Fill secrets, if any */
+ if (connection) {
+ helper_fill_secret_entry (connection,
+ GTK_ENTRY (widget),
+ NM_TYPE_SETTING_802_1X,
+ (HelperSecretFunc) nm_setting_802_1x_get_password,
+ NM_SETTING_802_1X_SETTING_NAME,
+ NM_SETTING_802_1X_PASSWORD);
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_leap_show_checkbutton"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "toggled",
+ (GCallback) show_toggled_cb,
+ method);
+
+ return method;
+}
+
diff --git a/libnm-gtk/wireless-security/eap-method-leap.h b/libnm-gtk/wireless-security/eap-method-leap.h
new file mode 100644
index 0000000..12f4354
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-leap.h
@@ -0,0 +1,36 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef EAP_METHOD_LEAP_H
+#define EAP_METHOD_LEAP_H
+
+#include "wireless-security.h"
+
+typedef struct {
+ struct _EAPMethod parent;
+
+} EAPMethodLEAP;
+
+EAPMethodLEAP * eap_method_leap_new (WirelessSecurity *parent,
+ NMConnection *connection);
+
+#endif /* EAP_METHOD_LEAP_H */
+
diff --git a/libnm-gtk/wireless-security/eap-method-peap.c b/libnm-gtk/wireless-security/eap-method-peap.c
new file mode 100644
index 0000000..893c1c8
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-peap.c
@@ -0,0 +1,336 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <ctype.h>
+#include <string.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-8021x.h>
+
+#include "eap-method.h"
+#include "wireless-security.h"
+#include "gconf-helpers.h"
+
+#define I_NAME_COLUMN 0
+#define I_METHOD_COLUMN 1
+
+static void
+destroy (EAPMethod *parent)
+{
+ EAPMethodPEAP *method = (EAPMethodPEAP *) parent;
+
+ if (method->size_group)
+ g_object_unref (method->size_group);
+ g_slice_free (EAPMethodPEAP, method);
+}
+
+static gboolean
+validate (EAPMethod *parent)
+{
+ GtkWidget *widget;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ EAPMethod *eap = NULL;
+ gboolean valid = FALSE;
+
+ if (!eap_method_validate_filepicker (parent->builder, "eap_peap_ca_cert_button", TYPE_CA_CERT, NULL, NULL))
+ return FALSE;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_inner_auth_combo"));
+ g_assert (widget);
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, I_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+ valid = eap_method_validate (eap);
+ eap_method_unref (eap);
+ return valid;
+}
+
+static void
+add_to_size_group (EAPMethod *parent, GtkSizeGroup *group)
+{
+ EAPMethodPEAP *method = (EAPMethodPEAP *) parent;
+ GtkWidget *widget;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ EAPMethod *eap;
+
+ if (method->size_group)
+ g_object_unref (method->size_group);
+ method->size_group = g_object_ref (group);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_anon_identity_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_ca_cert_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_version_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_inner_auth_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_inner_auth_combo"));
+ g_assert (widget);
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, I_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+ eap_method_add_to_size_group (eap, group);
+ eap_method_unref (eap);
+}
+
+static void
+fill_connection (EAPMethod *parent, NMConnection *connection)
+{
+ NMSettingConnection *s_con;
+ NMSetting8021x *s_8021x;
+ NMSetting8021xCKFormat format = NM_SETTING_802_1X_CK_FORMAT_UNKNOWN;
+ GtkWidget *widget;
+ const char *text;
+ char *filename;
+ EAPMethod *eap = NULL;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ int peapver_active = 0;
+ GError *error = NULL;
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_assert (s_con);
+
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ g_assert (s_8021x);
+
+ nm_setting_802_1x_add_eap_method (s_8021x, "peap");
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_anon_identity_entry"));
+ g_assert (widget);
+ text = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (text && strlen (text))
+ g_object_set (s_8021x, NM_SETTING_802_1X_ANONYMOUS_IDENTITY, text, NULL);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_ca_cert_button"));
+ g_assert (widget);
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ if (!nm_setting_802_1x_set_ca_cert (s_8021x, filename, NM_SETTING_802_1X_CK_SCHEME_PATH, &format, &error)) {
+ g_warning ("Couldn't read CA certificate '%s': %s", filename, error ? error->message : "(unknown)");
+ g_clear_error (&error);
+ }
+
+ nm_gconf_set_ignore_ca_cert (nm_setting_connection_get_uuid (s_con),
+ FALSE,
+ eap_method_get_ignore_ca_cert (parent));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_version_combo"));
+ peapver_active = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
+ switch (peapver_active) {
+ case 1: /* PEAP v0 */
+ g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PHASE1_PEAPVER, "0", NULL);
+ break;
+ case 2: /* PEAP v1 */
+ g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PHASE1_PEAPVER, "1", NULL);
+ break;
+ default: /* Automatic */
+ g_object_set (G_OBJECT (s_8021x), NM_SETTING_802_1X_PHASE1_PEAPVER, NULL, NULL);
+ break;
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_inner_auth_combo"));
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, I_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+
+ eap_method_fill_connection (eap, connection);
+ eap_method_unref (eap);
+}
+static void
+inner_auth_combo_changed_cb (GtkWidget *combo, gpointer user_data)
+{
+ EAPMethod *parent = (EAPMethod *) user_data;
+ EAPMethodPEAP *method = (EAPMethodPEAP *) parent;
+ GtkWidget *vbox;
+ EAPMethod *eap = NULL;
+ GList *elt, *children;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GtkWidget *eap_widget;
+
+ vbox = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_peap_inner_auth_vbox"));
+ g_assert (vbox);
+
+ /* Remove any previous wireless security widgets */
+ children = gtk_container_get_children (GTK_CONTAINER (vbox));
+ for (elt = children; elt; elt = g_list_next (elt))
+ gtk_container_remove (GTK_CONTAINER (vbox), GTK_WIDGET (elt->data));
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter);
+ gtk_tree_model_get (model, &iter, I_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+
+ eap_widget = eap_method_get_widget (eap);
+ g_assert (eap_widget);
+
+ if (method->size_group)
+ eap_method_add_to_size_group (eap, method->size_group);
+
+ if (gtk_widget_get_parent (eap_widget))
+ gtk_widget_reparent (eap_widget, vbox);
+ else
+ gtk_container_add (GTK_CONTAINER (vbox), eap_widget);
+
+ eap_method_unref (eap);
+
+ wireless_security_changed_cb (combo, method->sec_parent);
+}
+
+static GtkWidget *
+inner_auth_combo_init (EAPMethodPEAP *method,
+ NMConnection *connection)
+{
+ GtkWidget *combo;
+ GtkListStore *auth_model;
+ GtkTreeIter iter;
+ EAPMethodSimple *em_mschap_v2;
+ EAPMethodSimple *em_md5;
+
+ auth_model = gtk_list_store_new (2, G_TYPE_STRING, eap_method_get_g_type ());
+
+ em_mschap_v2 = eap_method_simple_new (method->sec_parent,
+ connection,
+ EAP_METHOD_SIMPLE_TYPE_MSCHAP_V2);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ I_NAME_COLUMN, _("MSCHAPv2"),
+ I_METHOD_COLUMN, em_mschap_v2,
+ -1);
+ eap_method_unref (EAP_METHOD (em_mschap_v2));
+
+ em_md5 = eap_method_simple_new (method->sec_parent,
+ connection,
+ EAP_METHOD_SIMPLE_TYPE_MD5);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ I_NAME_COLUMN, _("MD5"),
+ I_METHOD_COLUMN, em_md5,
+ -1);
+ eap_method_unref (EAP_METHOD (em_md5));
+
+ combo = GTK_WIDGET (gtk_builder_get_object (EAP_METHOD (method)->builder,
+ "eap_peap_inner_auth_combo"));
+ g_assert (combo);
+
+ gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (auth_model));
+ g_object_unref (G_OBJECT (auth_model));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
+
+ g_signal_connect (G_OBJECT (combo), "changed",
+ (GCallback) inner_auth_combo_changed_cb,
+ method);
+ return combo;
+}
+
+EAPMethodPEAP *
+eap_method_peap_new (WirelessSecurity *parent,
+ NMConnection *connection)
+{
+ EAPMethodPEAP *method;
+ GtkBuilder *builder;
+ GtkWidget *widget;
+ GtkFileFilter *filter;
+ NMSetting8021x *s_8021x = NULL;
+ const char *filename;
+
+ method = g_slice_new0 (EAPMethodPEAP);
+ if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group,
+ fill_connection, destroy, "eap-peap.ui", "eap_peap_notebook")) {
+ g_slice_free (EAPMethodPEAP, method);
+ return NULL;
+ }
+
+ builder = EAP_METHOD (method)->builder;
+
+ eap_method_nag_init (EAP_METHOD (method), "ca-nag-dialog.ui", "eap_peap_ca_cert_button", connection, FALSE);
+
+ method->sec_parent = parent;
+
+ if (connection)
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_peap_ca_cert_button"));
+ g_assert (widget);
+ gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (widget), TRUE);
+ gtk_file_chooser_button_set_title (GTK_FILE_CHOOSER_BUTTON (widget),
+ _("Choose a Certificate Authority certificate..."));
+ g_signal_connect (G_OBJECT (widget), "file-set",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+ filter = eap_method_default_file_chooser_filter_new (FALSE);
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter);
+ if (connection && s_8021x) {
+ if (nm_setting_802_1x_get_ca_cert_scheme (s_8021x) == NM_SETTING_802_1X_CK_SCHEME_PATH) {
+ filename = nm_setting_802_1x_get_ca_cert_path (s_8021x);
+ if (filename)
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), filename);
+ }
+ }
+
+ widget = inner_auth_combo_init (method, connection);
+ inner_auth_combo_changed_cb (widget, (gpointer) method);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_peap_version_combo"));
+ g_assert (widget);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
+ if (s_8021x) {
+ const char *peapver;
+
+ peapver = nm_setting_802_1x_get_phase1_peapver (s_8021x);
+ if (peapver) {
+ /* Index 0 is "Automatic" */
+ if (!strcmp (peapver, "0"))
+ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 1);
+ else if (!strcmp (peapver, "1"))
+ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 2);
+ }
+ }
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_peap_anon_identity_entry"));
+ if (s_8021x && nm_setting_802_1x_get_anonymous_identity (s_8021x))
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_anonymous_identity (s_8021x));
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+
+ return method;
+}
+
diff --git a/libnm-gtk/wireless-security/eap-method-peap.h b/libnm-gtk/wireless-security/eap-method-peap.h
new file mode 100644
index 0000000..bb30e3a
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-peap.h
@@ -0,0 +1,38 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef EAP_METHOD_PEAP_H
+#define EAP_METHOD_PEAP_H
+
+#include "wireless-security.h"
+
+typedef struct {
+ struct _EAPMethod parent;
+
+ GtkSizeGroup *size_group;
+ WirelessSecurity *sec_parent;
+} EAPMethodPEAP;
+
+EAPMethodPEAP * eap_method_peap_new (WirelessSecurity *parent,
+ NMConnection *connection);
+
+#endif /* EAP_METHOD_PEAP_H */
+
diff --git a/libnm-gtk/wireless-security/eap-method-simple.c b/libnm-gtk/wireless-security/eap-method-simple.c
new file mode 100644
index 0000000..e00e7a8
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-simple.c
@@ -0,0 +1,184 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <ctype.h>
+#include <string.h>
+#include <nm-setting-8021x.h>
+
+#include "eap-method.h"
+#include "wireless-security.h"
+#include "gconf-helpers.h"
+#include "helpers.h"
+
+static void
+show_toggled_cb (GtkCheckButton *button, EAPMethod *method)
+{
+ GtkWidget *widget;
+ gboolean visible;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (method->builder, "eap_simple_password_entry"));
+ g_assert (widget);
+
+ visible = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
+}
+
+static void
+destroy (EAPMethod *parent)
+{
+ EAPMethodSimple *method = (EAPMethodSimple *) parent;
+
+ g_slice_free (EAPMethodSimple, method);
+}
+
+static gboolean
+validate (EAPMethod *parent)
+{
+ GtkWidget *widget;
+ const char *text;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_simple_username_entry"));
+ g_assert (widget);
+ text = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (!text || !strlen (text))
+ return FALSE;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_simple_password_entry"));
+ g_assert (widget);
+ text = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (!text || !strlen (text))
+ return FALSE;
+
+ return TRUE;
+}
+
+static void
+add_to_size_group (EAPMethod *parent, GtkSizeGroup *group)
+{
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_simple_username_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_simple_password_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+}
+
+static void
+fill_connection (EAPMethod *parent, NMConnection *connection)
+{
+ EAPMethodSimple *method = (EAPMethodSimple *) parent;
+ NMSetting8021x *s_8021x;
+ GtkWidget *widget;
+
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ g_assert (s_8021x);
+
+ switch (method->type) {
+ case EAP_METHOD_SIMPLE_TYPE_PAP:
+ g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "pap", NULL);
+ break;
+ case EAP_METHOD_SIMPLE_TYPE_MSCHAP:
+ g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "mschap", NULL);
+ break;
+ case EAP_METHOD_SIMPLE_TYPE_MSCHAP_V2:
+ g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "mschapv2", NULL);
+ break;
+ case EAP_METHOD_SIMPLE_TYPE_MD5:
+ g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "md5", NULL);
+ break;
+ case EAP_METHOD_SIMPLE_TYPE_CHAP:
+ g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "chap", NULL);
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_simple_username_entry"));
+ g_assert (widget);
+ g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, gtk_entry_get_text (GTK_ENTRY (widget)), NULL);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_simple_password_entry"));
+ g_assert (widget);
+ g_object_set (s_8021x, NM_SETTING_802_1X_PASSWORD, gtk_entry_get_text (GTK_ENTRY (widget)), NULL);
+}
+
+EAPMethodSimple *
+eap_method_simple_new (WirelessSecurity *parent,
+ NMConnection *connection,
+ EAPMethodSimpleType type)
+{
+ EAPMethodSimple *method;
+ GtkBuilder *builder;
+ GtkWidget *widget;
+
+ method = g_slice_new0 (EAPMethodSimple);
+ if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group,
+ fill_connection, destroy, "eap-simple.ui", "eap_simple_notebook")) {
+ g_slice_free (EAPMethodSimple, method);
+ return NULL;
+ }
+
+ builder = EAP_METHOD (method)->builder;
+
+ method->type = type;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_simple_username_entry"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+ if (connection) {
+ NMSetting8021x *s_8021x;
+
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ if (s_8021x && nm_setting_802_1x_get_identity (s_8021x))
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_identity (s_8021x));
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_simple_password_entry"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+
+ /* Fill secrets, if any */
+ if (connection) {
+ helper_fill_secret_entry (connection,
+ GTK_ENTRY (widget),
+ NM_TYPE_SETTING_802_1X,
+ (HelperSecretFunc) nm_setting_802_1x_get_password,
+ NM_SETTING_802_1X_SETTING_NAME,
+ NM_SETTING_802_1X_PASSWORD);
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_simple_show_checkbutton"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "toggled",
+ (GCallback) show_toggled_cb,
+ method);
+
+ return method;
+}
+
diff --git a/libnm-gtk/wireless-security/eap-method-simple.h b/libnm-gtk/wireless-security/eap-method-simple.h
new file mode 100644
index 0000000..a4735b3
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-simple.h
@@ -0,0 +1,46 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef EAP_METHOD_SIMPLE_H
+#define EAP_METHOD_SIMPLE_H
+
+#include "wireless-security.h"
+
+typedef enum {
+ EAP_METHOD_SIMPLE_TYPE_PAP = 0,
+ EAP_METHOD_SIMPLE_TYPE_MSCHAP,
+ EAP_METHOD_SIMPLE_TYPE_MSCHAP_V2,
+ EAP_METHOD_SIMPLE_TYPE_MD5,
+ EAP_METHOD_SIMPLE_TYPE_CHAP,
+} EAPMethodSimpleType;
+
+typedef struct {
+ struct _EAPMethod parent;
+
+ EAPMethodSimpleType type;
+} EAPMethodSimple;
+
+EAPMethodSimple * eap_method_simple_new (WirelessSecurity *parent,
+ NMConnection *connection,
+ EAPMethodSimpleType type);
+
+#endif /* EAP_METHOD_SIMPLE_H */
+
diff --git a/libnm-gtk/wireless-security/eap-method-tls.c b/libnm-gtk/wireless-security/eap-method-tls.c
new file mode 100644
index 0000000..37bb93f
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-tls.c
@@ -0,0 +1,404 @@
+/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <ctype.h>
+#include <string.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-8021x.h>
+
+#include "gconf-helpers.h"
+#include "eap-method.h"
+#include "wireless-security.h"
+#include "utils.h"
+#include "helpers.h"
+
+static void
+show_toggled_cb (GtkCheckButton *button, EAPMethod *method)
+{
+ GtkWidget *widget;
+ gboolean visible;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (method->builder, "eap_tls_private_key_password_entry"));
+ g_assert (widget);
+
+ visible = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
+}
+
+static void
+destroy (EAPMethod *parent)
+{
+ EAPMethodTLS *method = (EAPMethodTLS *) parent;
+
+ g_slice_free (EAPMethodTLS, method);
+}
+
+static gboolean
+validate (EAPMethod *parent)
+{
+ NMSetting8021xCKType ck_type = NM_SETTING_802_1X_CK_TYPE_UNKNOWN;
+ GtkWidget *widget;
+ const char *password, *identity;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_identity_entry"));
+ g_assert (widget);
+ identity = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (!identity || !strlen (identity))
+ return FALSE;
+
+ if (!eap_method_validate_filepicker (parent->builder, "eap_tls_ca_cert_button", TYPE_CA_CERT, NULL, NULL))
+ return FALSE;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_private_key_password_entry"));
+ g_assert (widget);
+ password = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (!password || !strlen (password))
+ return FALSE;
+
+ if (!eap_method_validate_filepicker (parent->builder,
+ "eap_tls_private_key_button",
+ TYPE_PRIVATE_KEY,
+ password,
+ &ck_type))
+ return FALSE;
+
+ if (ck_type != NM_SETTING_802_1X_CK_TYPE_PKCS12) {
+ if (!eap_method_validate_filepicker (parent->builder, "eap_tls_user_cert_button", TYPE_CLIENT_CERT, NULL, NULL))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+add_to_size_group (EAPMethod *parent, GtkSizeGroup *group)
+{
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_identity_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_user_cert_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_ca_cert_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_private_key_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_private_key_password_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+}
+
+static void
+fill_connection (EAPMethod *parent, NMConnection *connection)
+{
+ EAPMethodTLS *method = (EAPMethodTLS *) parent;
+ NMSetting8021xCKType key_type = NM_SETTING_802_1X_CK_TYPE_UNKNOWN;
+ NMSetting8021xCKFormat format = NM_SETTING_802_1X_CK_FORMAT_UNKNOWN;
+ NMSetting8021x *s_8021x;
+ NMSettingConnection *s_con;
+ GtkWidget *widget;
+ char *filename, *pk_filename, *cc_filename;
+ char *password = NULL;
+ GError *error = NULL;
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_assert (s_con);
+
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ g_assert (s_8021x);
+
+ if (method->phase2)
+ g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_AUTH, "tls", NULL);
+ else
+ nm_setting_802_1x_add_eap_method (s_8021x, "tls");
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_identity_entry"));
+ g_assert (widget);
+ g_object_set (s_8021x, NM_SETTING_802_1X_IDENTITY, gtk_entry_get_text (GTK_ENTRY (widget)), NULL);
+
+
+ /* TLS private key */
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_private_key_password_entry"));
+ g_assert (widget);
+ password = g_strdup (gtk_entry_get_text (GTK_ENTRY (widget)));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_private_key_button"));
+ g_assert (widget);
+ pk_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ g_assert (pk_filename);
+
+ if (method->phase2) {
+ if (!nm_setting_802_1x_set_phase2_private_key (s_8021x, pk_filename, password, NM_SETTING_802_1X_CK_SCHEME_PATH, &format, &error)) {
+ g_warning ("Couldn't read phase2 private key '%s': %s", pk_filename, error ? error->message : "(unknown)");
+ g_clear_error (&error);
+ }
+ } else {
+ if (!nm_setting_802_1x_set_private_key (s_8021x, pk_filename, password, NM_SETTING_802_1X_CK_SCHEME_PATH, &format, &error)) {
+ g_warning ("Couldn't read private key '%s': %s", pk_filename, error ? error->message : "(unknown)");
+ g_clear_error (&error);
+ }
+ }
+
+ /* TLS client certificate */
+ if (key_type == NM_SETTING_802_1X_CK_TYPE_PKCS12) {
+ /* if the key is pkcs#12, the cert is filled with the same data */
+ cc_filename = g_strdup (pk_filename);
+ } else {
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_user_cert_button"));
+ g_assert (widget);
+ cc_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ }
+
+ g_assert (cc_filename);
+ if (method->phase2) {
+ if (!nm_setting_802_1x_set_phase2_client_cert (s_8021x, cc_filename, NM_SETTING_802_1X_CK_SCHEME_PATH, &format, &error)) {
+ g_warning ("Couldn't read phase2 client certificate '%s': %s", cc_filename, error ? error->message : "(unknown)");
+ g_clear_error (&error);
+ }
+ } else {
+ if (!nm_setting_802_1x_set_client_cert (s_8021x, cc_filename, NM_SETTING_802_1X_CK_SCHEME_PATH, &format, &error)) {
+ g_warning ("Couldn't read client certificate '%s': %s", cc_filename, error ? error->message : "(unknown)");
+ g_clear_error (&error);
+ }
+ }
+ g_free (cc_filename);
+ g_free (pk_filename);
+
+ /* TLS CA certificate */
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_ca_cert_button"));
+ g_assert (widget);
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+
+ format = NM_SETTING_802_1X_CK_FORMAT_UNKNOWN;
+ if (method->phase2) {
+ if (!nm_setting_802_1x_set_phase2_ca_cert (s_8021x, filename, NM_SETTING_802_1X_CK_SCHEME_PATH, &format, &error)) {
+ g_warning ("Couldn't read phase2 CA certificate '%s': %s", filename, error ? error->message : "(unknown)");
+ g_clear_error (&error);
+ }
+ } else {
+ if (!nm_setting_802_1x_set_ca_cert (s_8021x, filename, NM_SETTING_802_1X_CK_SCHEME_PATH, &format, &error)) {
+ g_warning ("Couldn't read CA certificate '%s': %s", filename, error ? error->message : "(unknown)");
+ g_clear_error (&error);
+ }
+ }
+
+ nm_gconf_set_ignore_ca_cert (nm_setting_connection_get_uuid (s_con),
+ method->phase2,
+ eap_method_get_ignore_ca_cert (parent));
+}
+
+static void
+private_key_picker_helper (EAPMethod *parent, const char *filename, gboolean changed)
+{
+ NMSetting8021x *setting;
+ NMSetting8021xCKType cert_type = NM_SETTING_802_1X_CK_TYPE_UNKNOWN;
+ const char *password;
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_private_key_password_entry"));
+ g_assert (widget);
+ password = gtk_entry_get_text (GTK_ENTRY (widget));
+
+ setting = (NMSetting8021x *) nm_setting_802_1x_new ();
+ nm_setting_802_1x_set_private_key_from_file (setting, filename, password, &cert_type, NULL);
+ g_object_unref (setting);
+
+ /* With PKCS#12, the client cert must be the same as the private key */
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_tls_user_cert_button"));
+ if (cert_type == NM_SETTING_802_1X_CK_TYPE_PKCS12) {
+ gtk_file_chooser_unselect_all (GTK_FILE_CHOOSER (widget));
+ gtk_widget_set_sensitive (widget, FALSE);
+ } else if (changed)
+ gtk_widget_set_sensitive (widget, TRUE);
+}
+
+static void
+private_key_picker_file_set_cb (GtkWidget *chooser, gpointer user_data)
+{
+ EAPMethod *parent = (EAPMethod *) user_data;
+ char *filename;
+
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
+ if (filename)
+ private_key_picker_helper (parent, filename, TRUE);
+ g_free (filename);
+}
+
+static void reset_filter (GtkWidget *widget, GParamSpec *spec, gpointer user_data)
+{
+ if (!gtk_file_chooser_get_filter (GTK_FILE_CHOOSER (widget))) {
+ g_signal_handlers_block_by_func (widget, reset_filter, user_data);
+ gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (widget), GTK_FILE_FILTER (user_data));
+ g_signal_handlers_unblock_by_func (widget, reset_filter, user_data);
+ }
+}
+
+typedef const char * (*PathFunc) (NMSetting8021x *setting);
+typedef NMSetting8021xCKScheme (*SchemeFunc) (NMSetting8021x *setting);
+
+static void
+setup_filepicker (GtkBuilder *builder,
+ const char *name,
+ const char *title,
+ WirelessSecurity *parent,
+ EAPMethodTLS *method,
+ NMSetting8021x *s_8021x,
+ SchemeFunc scheme_func,
+ PathFunc path_func,
+ gboolean privkey,
+ gboolean client_cert)
+{
+ GtkWidget *widget;
+ GtkFileFilter *filter;
+ const char *filename = NULL;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, name));
+ g_assert (widget);
+ gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (widget), TRUE);
+ gtk_file_chooser_button_set_title (GTK_FILE_CHOOSER_BUTTON (widget), title);
+
+ if (s_8021x && path_func && scheme_func) {
+ if (scheme_func (s_8021x) == NM_SETTING_802_1X_CK_SCHEME_PATH) {
+ filename = path_func (s_8021x);
+ if (filename)
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), filename);
+ }
+ }
+
+ /* Connect a special handler for private keys to intercept PKCS#12 key types
+ * and desensitize the user cert button.
+ */
+ if (privkey) {
+ g_signal_connect (G_OBJECT (widget), "selection-changed",
+ (GCallback) private_key_picker_file_set_cb,
+ method);
+ if (filename)
+ private_key_picker_helper ((EAPMethod *) method, filename, FALSE);
+ }
+
+ g_signal_connect (G_OBJECT (widget), "selection-changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+
+ filter = eap_method_default_file_chooser_filter_new (privkey);
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter);
+
+ /* For some reason, GTK+ calls set_current_filter (..., NULL) from
+ * gtkfilechooserdefault.c::show_and_select_files_finished_loading() on our
+ * dialog; so force-reset the filter to what we want it to be whenever
+ * it gets cleared.
+ */
+ if (client_cert)
+ g_signal_connect (G_OBJECT (widget), "notify::filter", (GCallback) reset_filter, filter);
+}
+
+EAPMethodTLS *
+eap_method_tls_new (WirelessSecurity *parent,
+ NMConnection *connection,
+ gboolean phase2)
+{
+ EAPMethodTLS *method;
+ GtkBuilder *builder;
+ GtkWidget *widget;
+ NMSetting8021x *s_8021x = NULL;
+
+ method = g_slice_new0 (EAPMethodTLS);
+ if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group,
+ fill_connection, destroy, "eap-tls.ui", "eap_tls_notebook")) {
+ g_slice_free (EAPMethodTLS, method);
+ return NULL;
+ }
+
+ builder = EAP_METHOD (method)->builder;
+
+ eap_method_nag_init (EAP_METHOD (method), "ca-nag-dialog.ui", "eap_tls_ca_cert_button", connection, phase2);
+
+ method->phase2 = phase2;
+
+ if (connection)
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_tls_identity_entry"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+ if (s_8021x && nm_setting_802_1x_get_identity (s_8021x))
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_identity (s_8021x));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_tls_private_key_password_entry"));
+ g_assert (widget);
+
+ /* Fill secrets, if any */
+ if (connection) {
+ helper_fill_secret_entry (connection,
+ GTK_ENTRY (widget),
+ NM_TYPE_SETTING_802_1X,
+ phase2 ? (HelperSecretFunc) nm_setting_802_1x_get_phase2_private_key_password :
+ (HelperSecretFunc) nm_setting_802_1x_get_private_key_password,
+ NM_SETTING_802_1X_SETTING_NAME,
+ phase2 ? NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD :
+ NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD);
+ }
+
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+ setup_filepicker (builder, "eap_tls_user_cert_button",
+ _("Choose your personal certificate..."),
+ parent, method, s_8021x,
+ phase2 ? nm_setting_802_1x_get_phase2_client_cert_scheme : nm_setting_802_1x_get_client_cert_scheme,
+ phase2 ? nm_setting_802_1x_get_phase2_client_cert_path : nm_setting_802_1x_get_client_cert_path,
+ FALSE, TRUE);
+ setup_filepicker (builder, "eap_tls_ca_cert_button",
+ _("Choose a Certificate Authority certificate..."),
+ parent, method, s_8021x,
+ phase2 ? nm_setting_802_1x_get_phase2_ca_cert_scheme : nm_setting_802_1x_get_ca_cert_scheme,
+ phase2 ? nm_setting_802_1x_get_phase2_ca_cert_path : nm_setting_802_1x_get_ca_cert_path,
+ FALSE, FALSE);
+ setup_filepicker (builder,
+ "eap_tls_private_key_button",
+ _("Choose your private key..."),
+ parent, method, s_8021x,
+ phase2 ? nm_setting_802_1x_get_phase2_private_key_scheme : nm_setting_802_1x_get_private_key_scheme,
+ phase2 ? nm_setting_802_1x_get_phase2_private_key_path : nm_setting_802_1x_get_private_key_path,
+ TRUE, FALSE);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_tls_show_checkbutton"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "toggled",
+ (GCallback) show_toggled_cb,
+ method);
+
+ return method;
+}
+
diff --git a/libnm-gtk/wireless-security/eap-method-tls.h b/libnm-gtk/wireless-security/eap-method-tls.h
new file mode 100644
index 0000000..5db7c30
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-tls.h
@@ -0,0 +1,38 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef EAP_METHOD_TLS_H
+#define EAP_METHOD_TLS_H
+
+#include "wireless-security.h"
+
+typedef struct {
+ struct _EAPMethod parent;
+
+ gboolean phase2;
+} EAPMethodTLS;
+
+EAPMethodTLS * eap_method_tls_new (WirelessSecurity *parent,
+ NMConnection *connection,
+ gboolean phase2);
+
+#endif /* EAP_METHOD_TLS_H */
+
diff --git a/libnm-gtk/wireless-security/eap-method-ttls.c b/libnm-gtk/wireless-security/eap-method-ttls.c
new file mode 100644
index 0000000..d53f61e
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-ttls.c
@@ -0,0 +1,347 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <ctype.h>
+#include <string.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-8021x.h>
+
+#include "eap-method.h"
+#include "wireless-security.h"
+#include "gconf-helpers.h"
+
+#define I_NAME_COLUMN 0
+#define I_METHOD_COLUMN 1
+
+static void
+destroy (EAPMethod *parent)
+{
+ EAPMethodTTLS *method = (EAPMethodTTLS *) parent;
+
+ if (method->size_group)
+ g_object_unref (method->size_group);
+ g_slice_free (EAPMethodTTLS, method);
+}
+
+static gboolean
+validate (EAPMethod *parent)
+{
+ GtkWidget *widget;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ EAPMethod *eap = NULL;
+ gboolean valid = FALSE;
+
+ if (!eap_method_validate_filepicker (parent->builder, "eap_ttls_ca_cert_button", TYPE_CA_CERT, NULL, NULL))
+ return FALSE;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_inner_auth_combo"));
+ g_assert (widget);
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, I_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+ valid = eap_method_validate (eap);
+ eap_method_unref (eap);
+ return valid;
+}
+
+static void
+add_to_size_group (EAPMethod *parent, GtkSizeGroup *group)
+{
+ EAPMethodTTLS *method = (EAPMethodTTLS *) parent;
+ GtkWidget *widget;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ EAPMethod *eap;
+
+ if (method->size_group)
+ g_object_unref (method->size_group);
+ method->size_group = g_object_ref (group);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_anon_identity_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_ca_cert_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_inner_auth_label"));
+ g_assert (widget);
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_inner_auth_combo"));
+ g_assert (widget);
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, I_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+ eap_method_add_to_size_group (eap, group);
+ eap_method_unref (eap);
+}
+
+static void
+fill_connection (EAPMethod *parent, NMConnection *connection)
+{
+ NMSettingConnection *s_con;
+ NMSetting8021x *s_8021x;
+ NMSetting8021xCKFormat format = NM_SETTING_802_1X_CK_FORMAT_UNKNOWN;
+ GtkWidget *widget;
+ const char *text;
+ char *filename;
+ EAPMethod *eap = NULL;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GError *error = NULL;
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_assert (s_con);
+
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+ g_assert (s_8021x);
+
+ nm_setting_802_1x_add_eap_method (s_8021x, "ttls");
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_anon_identity_entry"));
+ g_assert (widget);
+ text = gtk_entry_get_text (GTK_ENTRY (widget));
+ if (text && strlen (text))
+ g_object_set (s_8021x, NM_SETTING_802_1X_ANONYMOUS_IDENTITY, text, NULL);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_ca_cert_button"));
+ g_assert (widget);
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ if (!nm_setting_802_1x_set_ca_cert (s_8021x, filename, NM_SETTING_802_1X_CK_SCHEME_PATH, &format, &error)) {
+ g_warning ("Couldn't read CA certificate '%s': %s", filename, error ? error->message : "(unknown)");
+ g_clear_error (&error);
+ }
+
+ nm_gconf_set_ignore_ca_cert (nm_setting_connection_get_uuid (s_con),
+ FALSE,
+ eap_method_get_ignore_ca_cert (parent));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_inner_auth_combo"));
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, I_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+
+ eap_method_fill_connection (eap, connection);
+ eap_method_unref (eap);
+}
+
+static void
+inner_auth_combo_changed_cb (GtkWidget *combo, gpointer user_data)
+{
+ EAPMethod *parent = (EAPMethod *) user_data;
+ EAPMethodTTLS *method = (EAPMethodTTLS *) parent;
+ GtkWidget *vbox;
+ EAPMethod *eap = NULL;
+ GList *elt, *children;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GtkWidget *eap_widget;
+
+ vbox = GTK_WIDGET (gtk_builder_get_object (parent->builder, "eap_ttls_inner_auth_vbox"));
+ g_assert (vbox);
+
+ /* Remove any previous wireless security widgets */
+ children = gtk_container_get_children (GTK_CONTAINER (vbox));
+ for (elt = children; elt; elt = g_list_next (elt))
+ gtk_container_remove (GTK_CONTAINER (vbox), GTK_WIDGET (elt->data));
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter);
+ gtk_tree_model_get (model, &iter, I_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+
+ eap_widget = eap_method_get_widget (eap);
+ g_assert (eap_widget);
+
+ if (method->size_group)
+ eap_method_add_to_size_group (eap, method->size_group);
+
+ if (gtk_widget_get_parent (eap_widget))
+ gtk_widget_reparent (eap_widget, vbox);
+ else
+ gtk_container_add (GTK_CONTAINER (vbox), eap_widget);
+
+ eap_method_unref (eap);
+
+ wireless_security_changed_cb (combo, method->sec_parent);
+}
+
+static GtkWidget *
+inner_auth_combo_init (EAPMethodTTLS *method,
+ NMConnection *connection,
+ NMSetting8021x *s_8021x)
+{
+ GtkWidget *combo;
+ GtkListStore *auth_model;
+ GtkTreeIter iter;
+ EAPMethodSimple *em_pap;
+ EAPMethodSimple *em_mschap;
+ EAPMethodSimple *em_mschap_v2;
+ EAPMethodSimple *em_chap;
+ guint32 active = 0;
+ const char *phase2_auth = NULL;
+
+ auth_model = gtk_list_store_new (2, G_TYPE_STRING, eap_method_get_g_type ());
+
+ if (s_8021x) {
+ if (nm_setting_802_1x_get_phase2_auth (s_8021x))
+ phase2_auth = nm_setting_802_1x_get_phase2_auth (s_8021x);
+ else if (nm_setting_802_1x_get_phase2_autheap (s_8021x))
+ phase2_auth = nm_setting_802_1x_get_phase2_autheap (s_8021x);
+ }
+
+ em_pap = eap_method_simple_new (method->sec_parent,
+ connection,
+ EAP_METHOD_SIMPLE_TYPE_PAP);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ I_NAME_COLUMN, _("PAP"),
+ I_METHOD_COLUMN, em_pap,
+ -1);
+ eap_method_unref (EAP_METHOD (em_pap));
+
+ /* Check for defaulting to PAP */
+ if (phase2_auth && !strcasecmp (phase2_auth, "pap"))
+ active = 0;
+
+ em_mschap = eap_method_simple_new (method->sec_parent,
+ connection,
+ EAP_METHOD_SIMPLE_TYPE_MSCHAP);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ I_NAME_COLUMN, _("MSCHAP"),
+ I_METHOD_COLUMN, em_mschap,
+ -1);
+ eap_method_unref (EAP_METHOD (em_mschap));
+
+ /* Check for defaulting to MSCHAP */
+ if (phase2_auth && !strcasecmp (phase2_auth, "mschap"))
+ active = 1;
+
+ em_mschap_v2 = eap_method_simple_new (method->sec_parent,
+ connection,
+ EAP_METHOD_SIMPLE_TYPE_MSCHAP_V2);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ I_NAME_COLUMN, _("MSCHAPv2"),
+ I_METHOD_COLUMN, em_mschap_v2,
+ -1);
+ eap_method_unref (EAP_METHOD (em_mschap_v2));
+
+ /* Check for defaulting to MSCHAPv2 */
+ if (phase2_auth && !strcasecmp (phase2_auth, "mschapv2"))
+ active = 2;
+
+ em_chap = eap_method_simple_new (method->sec_parent,
+ connection,
+ EAP_METHOD_SIMPLE_TYPE_CHAP);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ I_NAME_COLUMN, _("CHAP"),
+ I_METHOD_COLUMN, em_chap,
+ -1);
+ eap_method_unref (EAP_METHOD (em_chap));
+
+ /* Check for defaulting to CHAP */
+ if (phase2_auth && !strcasecmp (phase2_auth, "chap"))
+ active = 4;
+
+ combo = GTK_WIDGET (gtk_builder_get_object (EAP_METHOD (method)->builder,
+ "eap_ttls_inner_auth_combo"));
+ g_assert (combo);
+
+ gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (auth_model));
+ g_object_unref (G_OBJECT (auth_model));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), active);
+
+ g_signal_connect (G_OBJECT (combo), "changed",
+ (GCallback) inner_auth_combo_changed_cb,
+ method);
+ return combo;
+}
+
+EAPMethodTTLS *
+eap_method_ttls_new (WirelessSecurity *parent,
+ NMConnection *connection)
+{
+ EAPMethodTTLS *method;
+ GtkBuilder *builder;
+ GtkWidget *widget;
+ GtkFileFilter *filter;
+ NMSetting8021x *s_8021x = NULL;
+ const char *filename;
+
+ method = g_slice_new0 (EAPMethodTTLS);
+ if (!eap_method_init (EAP_METHOD (method), validate, add_to_size_group,
+ fill_connection, destroy, "eap-ttls.ui", "eap_ttls_notebook")) {
+ g_slice_free (EAPMethodTTLS, method);
+ return NULL;
+ }
+
+ builder = EAP_METHOD (method)->builder;
+
+ eap_method_nag_init (EAP_METHOD (method), "ca-nag-dialog.ui", "eap_ttls_ca_cert_button", connection, FALSE);
+
+ method->sec_parent = parent;
+
+ if (connection)
+ s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_ttls_ca_cert_button"));
+ g_assert (widget);
+ gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (widget), TRUE);
+ gtk_file_chooser_button_set_title (GTK_FILE_CHOOSER_BUTTON (widget),
+ _("Choose a Certificate Authority certificate..."));
+ g_signal_connect (G_OBJECT (widget), "file-set",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+ filter = eap_method_default_file_chooser_filter_new (FALSE);
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter);
+ if (connection && s_8021x) {
+ if (nm_setting_802_1x_get_ca_cert_scheme (s_8021x) == NM_SETTING_802_1X_CK_SCHEME_PATH) {
+ filename = nm_setting_802_1x_get_ca_cert_path (s_8021x);
+ if (filename)
+ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), filename);
+ }
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "eap_ttls_anon_identity_entry"));
+ if (s_8021x && nm_setting_802_1x_get_anonymous_identity (s_8021x))
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_802_1x_get_anonymous_identity (s_8021x));
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ parent);
+
+ widget = inner_auth_combo_init (method, connection, s_8021x);
+ inner_auth_combo_changed_cb (widget, (gpointer) method);
+
+ return method;
+}
+
diff --git a/libnm-gtk/wireless-security/eap-method-ttls.h b/libnm-gtk/wireless-security/eap-method-ttls.h
new file mode 100644
index 0000000..950e445
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method-ttls.h
@@ -0,0 +1,38 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef EAP_METHOD_TTLS_H
+#define EAP_METHOD_TTLS_H
+
+#include "wireless-security.h"
+
+typedef struct {
+ struct _EAPMethod parent;
+
+ GtkSizeGroup *size_group;
+ WirelessSecurity *sec_parent;
+} EAPMethodTTLS;
+
+EAPMethodTTLS * eap_method_ttls_new (WirelessSecurity *parent,
+ NMConnection *connection);
+
+#endif /* EAP_METHOD_TLS_H */
+
diff --git a/libnm-gtk/wireless-security/eap-method.c b/libnm-gtk/wireless-security/eap-method.c
new file mode 100644
index 0000000..edf4eaa
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method.c
@@ -0,0 +1,474 @@
+/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
+
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <nm-setting-connection.h>
+#include <nm-setting-8021x.h>
+#include "eap-method.h"
+#include "gconf-helpers.h"
+
+
+GType
+eap_method_get_g_type (void)
+{
+ static GType type_id = 0;
+
+ if (!type_id) {
+ type_id = g_boxed_type_register_static ("EAPMethod",
+ (GBoxedCopyFunc) eap_method_ref,
+ (GBoxedFreeFunc) eap_method_unref);
+ }
+
+ return type_id;
+}
+
+GtkWidget *
+eap_method_get_widget (EAPMethod *method)
+{
+ g_return_val_if_fail (method != NULL, NULL);
+
+ return method->ui_widget;
+}
+
+gboolean
+eap_method_validate (EAPMethod *method)
+{
+ g_return_val_if_fail (method != NULL, FALSE);
+
+ g_assert (method->validate);
+ return (*(method->validate)) (method);
+}
+
+void
+eap_method_add_to_size_group (EAPMethod *method, GtkSizeGroup *group)
+{
+ g_return_if_fail (method != NULL);
+ g_return_if_fail (group != NULL);
+
+ g_assert (method->add_to_size_group);
+ return (*(method->add_to_size_group)) (method, group);
+}
+
+void
+eap_method_fill_connection (EAPMethod *method, NMConnection *connection)
+{
+ g_return_if_fail (method != NULL);
+ g_return_if_fail (connection != NULL);
+
+ g_assert (method->fill_connection);
+ return (*(method->fill_connection)) (method, connection);
+}
+
+static void
+nag_dialog_response_cb (GtkDialog *nag_dialog,
+ gint response,
+ gpointer user_data)
+{
+ EAPMethod *method = (EAPMethod *) user_data;
+ GtkWidget *widget;
+
+ if (response == GTK_RESPONSE_NO) {
+ /* Grab the value of the "don't bother me" checkbox */
+ widget = GTK_WIDGET (gtk_builder_get_object (method->builder, "ignore_checkbox"));
+ g_assert (widget);
+
+ method->ignore_ca_cert = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ }
+
+ gtk_widget_hide (GTK_WIDGET (nag_dialog));
+}
+
+GtkWidget *
+eap_method_nag_user (EAPMethod *method)
+{
+ GtkWidget *widget;
+ char *filename = NULL;
+
+ g_return_val_if_fail (method != NULL, NULL);
+
+ if (!method->nag_dialog || method->ignore_ca_cert)
+ return NULL;
+
+ /* Checkbox should be unchecked each time dialog comes up */
+ widget = GTK_WIDGET (gtk_builder_get_object (method->builder, "ignore_checkbox"));
+ g_assert (widget);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
+
+ /* Nag the user if the CA Cert is blank, since it's a security risk. */
+ widget = GTK_WIDGET (gtk_builder_get_object (method->builder, method->ca_cert_chooser));
+ g_assert (widget);
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ if (filename != NULL) {
+ g_free (filename);
+ return NULL;
+ }
+
+ gtk_window_present (GTK_WINDOW (method->nag_dialog));
+ return method->nag_dialog;
+}
+
+gboolean
+eap_method_nag_init (EAPMethod *method,
+ const char *ui_file,
+ const char *ca_cert_chooser,
+ NMConnection *connection,
+ gboolean phase2)
+{
+ GtkWidget *dialog;
+ char *path;
+ GError *error = NULL;
+
+ g_return_val_if_fail (method != NULL, FALSE);
+ g_return_val_if_fail (ui_file != NULL, FALSE);
+ g_return_val_if_fail (ca_cert_chooser != NULL, FALSE);
+
+ path = g_build_filename (UIDIR, ui_file, NULL);
+ if (!gtk_builder_add_from_file (method->builder, path, &error)) {
+ if (error) {
+ g_warning ("Couldn't load '%s': %s", path, error->message);
+ g_error_free (error);
+ } else
+ g_warning ("Couldn't load '%s'", path);
+
+ g_free (path);
+
+ return FALSE;
+ }
+
+ g_free (path);
+
+ method->ca_cert_chooser = g_strdup (ca_cert_chooser);
+ if (connection) {
+ NMSettingConnection *s_con;
+ const char *uuid;
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_assert (s_con);
+ uuid = nm_setting_connection_get_uuid (s_con);
+ g_assert (uuid);
+
+ method->ignore_ca_cert = nm_gconf_get_ignore_ca_cert (uuid, phase2);
+ }
+
+ dialog = GTK_WIDGET (gtk_builder_get_object (method->builder, "nag_user_dialog"));
+ g_assert (dialog);
+ g_signal_connect (dialog, "response", G_CALLBACK (nag_dialog_response_cb), method);
+
+ method->nag_dialog = dialog;
+ return TRUE;
+}
+
+gboolean
+eap_method_get_ignore_ca_cert (EAPMethod *method)
+{
+ g_return_val_if_fail (method != NULL, FALSE);
+
+ return method->ignore_ca_cert;
+}
+
+gboolean
+eap_method_init (EAPMethod *method,
+ EMValidateFunc validate,
+ EMAddToSizeGroupFunc add_to_size_group,
+ EMFillConnectionFunc fill_connection,
+ EMDestroyFunc destroy,
+ const char *ui_file,
+ const char *ui_widget)
+{
+ char *path;
+ GtkBuilder *builder;
+ GError *error = NULL;
+
+ builder = gtk_builder_new ();
+
+ path = g_build_filename (UIDIR, ui_file, NULL);
+ if (!gtk_builder_add_from_file (builder, path, &error)) {
+ if (error) {
+ g_warning ("Couldn't load '%s': %s", path, error->message);
+ g_error_free (error);
+ } else
+ g_warning ("Couldn't load '%s'", path);
+
+ g_free (path);
+ g_object_unref (builder);
+
+ return FALSE;
+ }
+
+ g_free (path);
+
+ method->builder = builder;
+ method->refcount = 1;
+ method->validate = validate;
+ method->add_to_size_group = add_to_size_group;
+ method->fill_connection = fill_connection;
+ method->destroy = destroy;
+
+ method->ui_widget = GTK_WIDGET (gtk_builder_get_object (builder, ui_widget));
+ g_assert (method->ui_widget);
+ g_object_ref_sink (method->ui_widget);
+
+ return TRUE;
+}
+
+
+EAPMethod *
+eap_method_ref (EAPMethod *method)
+{
+ g_return_val_if_fail (method != NULL, NULL);
+ g_return_val_if_fail (method->refcount > 0, NULL);
+
+ method->refcount++;
+ return method;
+}
+
+void
+eap_method_unref (EAPMethod *method)
+{
+ g_return_if_fail (method != NULL);
+ g_return_if_fail (method->refcount > 0);
+
+ g_assert (method->destroy);
+
+ method->refcount--;
+ if (method->refcount == 0) {
+ if (method->nag_dialog)
+ gtk_widget_destroy (method->nag_dialog);
+ g_free (method->ca_cert_chooser);
+ g_object_unref (method->builder);
+ g_object_unref (method->ui_widget);
+ (*(method->destroy)) (method);
+ }
+}
+
+gboolean
+eap_method_validate_filepicker (GtkBuilder *builder,
+ const char *name,
+ guint32 item_type,
+ const char *password,
+ NMSetting8021xCKType *out_ck_type)
+{
+ GtkWidget *widget;
+ char *filename;
+ NMSetting8021x *setting;
+ gboolean success = FALSE;
+ GError *error = NULL;
+
+ if (item_type == TYPE_PRIVATE_KEY) {
+ g_return_val_if_fail (password != NULL, NM_SETTING_802_1X_CK_TYPE_UNKNOWN);
+ g_return_val_if_fail (strlen (password), NM_SETTING_802_1X_CK_TYPE_UNKNOWN);
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, name));
+ g_assert (widget);
+ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget));
+ if (!filename)
+ return (item_type == TYPE_CA_CERT) ? NM_SETTING_802_1X_CK_TYPE_X509 : NM_SETTING_802_1X_CK_TYPE_UNKNOWN;
+
+ if (!g_file_test (filename, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR))
+ goto out;
+
+ setting = (NMSetting8021x *) nm_setting_802_1x_new ();
+
+ if (item_type == TYPE_PRIVATE_KEY) {
+ if (!nm_setting_802_1x_set_private_key_from_file (setting, filename, password, out_ck_type, &error)) {
+ g_warning ("Error: couldn't verify private key: %d %s",
+ error ? error->code : -1, error ? error->message : "(none)");
+ g_clear_error (&error);
+ } else
+ success = TRUE;
+ } else if (item_type == TYPE_CLIENT_CERT) {
+ if (!nm_setting_802_1x_set_client_cert_from_file (setting, filename, out_ck_type, &error)) {
+ g_warning ("Error: couldn't verify client certificate: %d %s",
+ error ? error->code : -1, error ? error->message : "(none)");
+ g_clear_error (&error);
+ } else
+ success = TRUE;
+ } else if (item_type == TYPE_CA_CERT) {
+ if (!nm_setting_802_1x_set_ca_cert_from_file (setting, filename, out_ck_type, &error)) {
+ g_warning ("Error: couldn't verify CA certificate: %d %s",
+ error ? error->code : -1, error ? error->message : "(none)");
+ g_clear_error (&error);
+ } else
+ success = TRUE;
+ } else
+ g_warning ("%s: invalid item type %d.", __func__, item_type);
+
+ g_object_unref (setting);
+
+out:
+ g_free (filename);
+ return success;
+}
+
+static const char *
+find_tag (const char *tag, const char *buf, gsize len)
+{
+ gsize i, taglen;
+
+ taglen = strlen (tag);
+ if (len < taglen)
+ return NULL;
+
+ for (i = 0; i < len - taglen; i++) {
+ if (memcmp (buf + i, tag, taglen) == 0)
+ return buf + i;
+ }
+ return NULL;
+}
+
+static const char *pem_rsa_key_begin = "-----BEGIN RSA PRIVATE KEY-----";
+static const char *pem_dsa_key_begin = "-----BEGIN DSA PRIVATE KEY-----";
+static const char *pem_cert_begin = "-----BEGIN CERTIFICATE-----";
+
+static gboolean
+file_has_extension (const char *filename, const char *extensions[])
+{
+ char *p, *ext;
+ int i = 0;
+ gboolean found = FALSE;
+
+ p = strrchr (filename, '.');
+ if (!p)
+ return FALSE;
+
+ ext = g_ascii_strdown (p, -1);
+ if (ext) {
+ while (extensions[i]) {
+ if (!strcmp (ext, extensions[i++])) {
+ found = TRUE;
+ break;
+ }
+ }
+ }
+ g_free (ext);
+
+ return found;
+}
+
+static gboolean
+file_is_der_or_pem (const char *filename, gboolean privkey)
+{
+ int fd;
+ unsigned char buffer[8192];
+ ssize_t bytes_read;
+ guint16 der_tag = 0x8230;
+ gboolean success = FALSE;
+
+ fd = open (filename, O_RDONLY);
+ if (fd < 0)
+ return FALSE;
+
+ bytes_read = read (fd, buffer, sizeof (buffer) - 1);
+ if (bytes_read < 400) /* needs to be lower? */
+ goto out;
+ buffer[bytes_read] = '\0';
+
+ /* Check for DER signature */
+ if (!memcmp (buffer, &der_tag, 2)) {
+ success = TRUE;
+ goto out;
+ }
+
+ /* Check for PEM signatures */
+ if (privkey) {
+ if (find_tag (pem_rsa_key_begin, (const char *) buffer, bytes_read)) {
+ success = TRUE;
+ goto out;
+ }
+
+ if (find_tag (pem_dsa_key_begin, (const char *) buffer, bytes_read)) {
+ success = TRUE;
+ goto out;
+ }
+ } else {
+ if (find_tag (pem_cert_begin, (const char *) buffer, bytes_read)) {
+ success = TRUE;
+ goto out;
+ }
+ }
+
+out:
+ close (fd);
+ return success;
+}
+
+static gboolean
+default_filter_privkey (const GtkFileFilterInfo *filter_info, gpointer user_data)
+{
+ const char *extensions[] = { ".der", ".pem", ".p12", NULL };
+
+ if (!filter_info->filename)
+ return FALSE;
+
+ if (!file_has_extension (filter_info->filename, extensions))
+ return FALSE;
+
+ if (!file_is_der_or_pem (filter_info->filename, TRUE))
+ return FALSE;
+
+ return TRUE;
+}
+
+static gboolean
+default_filter_cert (const GtkFileFilterInfo *filter_info, gpointer user_data)
+{
+ const char *extensions[] = { ".der", ".pem", ".crt", ".cer", NULL };
+
+ if (!filter_info->filename)
+ return FALSE;
+
+ if (!file_has_extension (filter_info->filename, extensions))
+ return FALSE;
+
+ if (!file_is_der_or_pem (filter_info->filename, FALSE))
+ return FALSE;
+
+ return TRUE;
+}
+
+GtkFileFilter *
+eap_method_default_file_chooser_filter_new (gboolean privkey)
+{
+ GtkFileFilter *filter;
+
+ filter = gtk_file_filter_new ();
+ if (privkey) {
+ gtk_file_filter_add_custom (filter, GTK_FILE_FILTER_FILENAME, default_filter_privkey, NULL, NULL);
+ gtk_file_filter_set_name (filter, _("DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"));
+ } else {
+ gtk_file_filter_add_custom (filter, GTK_FILE_FILTER_FILENAME, default_filter_cert, NULL, NULL);
+ gtk_file_filter_set_name (filter, _("DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"));
+ }
+ return filter;
+}
+
diff --git a/libnm-gtk/wireless-security/eap-method.h b/libnm-gtk/wireless-security/eap-method.h
new file mode 100644
index 0000000..0263cc1
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-method.h
@@ -0,0 +1,110 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef EAP_METHOD_H
+#define EAP_METHOD_H
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include <nm-connection.h>
+#include <nm-setting-8021x.h>
+
+typedef struct _EAPMethod EAPMethod;
+
+typedef void (*EMAddToSizeGroupFunc) (EAPMethod *method, GtkSizeGroup *group);
+typedef void (*EMFillConnectionFunc) (EAPMethod *method, NMConnection *connection);
+typedef void (*EMDestroyFunc) (EAPMethod *method);
+typedef gboolean (*EMValidateFunc) (EAPMethod *method);
+
+struct _EAPMethod {
+ guint32 refcount;
+ GtkBuilder *builder;
+ GtkWidget *ui_widget;
+
+ char *ca_cert_chooser;
+ GtkWidget *nag_dialog;
+
+ gboolean ignore_ca_cert;
+
+ EMAddToSizeGroupFunc add_to_size_group;
+ EMFillConnectionFunc fill_connection;
+ EMValidateFunc validate;
+ EMDestroyFunc destroy;
+};
+
+#define EAP_METHOD(x) ((EAPMethod *) x)
+
+
+GtkWidget *eap_method_get_widget (EAPMethod *method);
+
+gboolean eap_method_validate (EAPMethod *method);
+
+void eap_method_add_to_size_group (EAPMethod *method, GtkSizeGroup *group);
+
+void eap_method_fill_connection (EAPMethod *method, NMConnection *connection);
+
+GtkWidget * eap_method_nag_user (EAPMethod *method);
+
+EAPMethod *eap_method_ref (EAPMethod *method);
+
+void eap_method_unref (EAPMethod *method);
+
+GType eap_method_get_g_type (void);
+
+/* Below for internal use only */
+
+#include "eap-method-tls.h"
+#include "eap-method-leap.h"
+#include "eap-method-ttls.h"
+#include "eap-method-peap.h"
+#include "eap-method-simple.h"
+
+gboolean eap_method_init (EAPMethod *method,
+ EMValidateFunc validate,
+ EMAddToSizeGroupFunc add_to_size_group,
+ EMFillConnectionFunc fill_connection,
+ EMDestroyFunc destroy,
+ const char *ui_file,
+ const char *ui_widget);
+
+GtkFileFilter * eap_method_default_file_chooser_filter_new (gboolean privkey);
+
+#define TYPE_CLIENT_CERT 0
+#define TYPE_CA_CERT 1
+#define TYPE_PRIVATE_KEY 2
+
+gboolean eap_method_validate_filepicker (GtkBuilder *builder,
+ const char *name,
+ guint32 item_type,
+ const char *password,
+ NMSetting8021xCKType *out_ck_type);
+
+gboolean eap_method_nag_init (EAPMethod *method,
+ const char *ui_file,
+ const char *ca_cert_chooser,
+ NMConnection *connection,
+ gboolean phase2);
+
+gboolean eap_method_get_ignore_ca_cert (EAPMethod *method);
+
+#endif /* EAP_METHOD_H */
+
diff --git a/libnm-gtk/wireless-security/eap-peap.ui b/libnm-gtk/wireless-security/eap-peap.ui
new file mode 100644
index 0000000..ff8b703
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-peap.ui
@@ -0,0 +1,188 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkListStore" id="model8">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0"> </col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model9">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">Automatic</col>
+ </row>
+ <row>
+ <col id="0">Version 0</col>
+ </row>
+ <row>
+ <col id="0">Version 1</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkWindow" id="eap_peap_widget">
+ <property name="title">eap_peap_widget</property>
+ <child>
+ <object class="GtkNotebook" id="eap_peap_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="table13">
+ <property name="visible">True</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="eap_peap_anon_identity_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Anonymous Identity:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_peap_anon_identity_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_peap_ca_cert_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">CA Certificate:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFileChooserButton" id="eap_peap_ca_cert_button">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="eap_peap_inner_auth_vbox">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_peap_inner_auth_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Inner Authentication:</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="eap_peap_inner_auth_combo">
+ <property name="visible">True</property>
+ <property name="model">model8</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer8"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_peap_version_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">PEAP Version:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="eap_peap_version_combo">
+ <property name="visible">True</property>
+ <property name="model">model9</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer9"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label61">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/eap-simple.ui b/libnm-gtk/wireless-security/eap-simple.ui
new file mode 100644
index 0000000..1336380
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-simple.ui
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="eap_simple_widget">
+ <property name="title">eap_simple_widget</property>
+ <child>
+ <object class="GtkNotebook" id="eap_simple_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="table11">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="eap_simple_username_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">User Name:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_simple_password_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_simple_password_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="eap_simple_show_checkbutton">
+ <property name="label" translatable="yes">Show password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_simple_username_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label53">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/eap-tls.ui b/libnm-gtk/wireless-security/eap-tls.ui
new file mode 100644
index 0000000..df63483
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-tls.ui
@@ -0,0 +1,180 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="eap_tls_widget">
+ <property name="title">eap_tls_widget</property>
+ <child>
+ <object class="GtkNotebook" id="eap_tls_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="table8">
+ <property name="visible">True</property>
+ <property name="n_rows">6</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="eap_tls_identity_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Identity:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_tls_identity_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_tls_user_cert_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">User Certificate:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_tls_ca_cert_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">CA Certificate:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFileChooserButton" id="eap_tls_ca_cert_button">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_tls_private_key_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Private Key:</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFileChooserButton" id="eap_tls_private_key_button">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_tls_private_key_password_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Private Key Password:</property>
+ </object>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_tls_private_key_password_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="eap_tls_show_checkbutton">
+ <property name="label" translatable="yes">Show password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFileChooserButton" id="eap_tls_user_cert_button">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label34">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/eap-ttls.ui b/libnm-gtk/wireless-security/eap-ttls.ui
new file mode 100644
index 0000000..d2d6b10
--- /dev/null
+++ b/libnm-gtk/wireless-security/eap-ttls.ui
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkListStore" id="model6">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0"> </col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkWindow" id="eap_ttls_widget">
+ <property name="title">eap_ttls_widget</property>
+ <child>
+ <object class="GtkNotebook" id="eap_ttls_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="table10">
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="eap_ttls_anon_identity_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Anonymous Identity:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="eap_ttls_anon_identity_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_ttls_ca_cert_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">CA Certificate:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFileChooserButton" id="eap_ttls_ca_cert_button">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="eap_ttls_inner_auth_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Inner Authentication:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="eap_ttls_inner_auth_combo">
+ <property name="visible">True</property>
+ <property name="model">model6</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer6"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="eap_ttls_inner_auth_vbox">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label49">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/helpers.c b/libnm-gtk/wireless-security/helpers.c
new file mode 100644
index 0000000..47deb6a
--- /dev/null
+++ b/libnm-gtk/wireless-security/helpers.c
@@ -0,0 +1,49 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Red Hat, Inc.
+ */
+
+#include "helpers.h"
+#include "gconf-helpers.h"
+
+void
+helper_fill_secret_entry (NMConnection *connection,
+ GtkEntry *entry,
+ GType setting_type,
+ HelperSecretFunc func,
+ const char *setting_name,
+ const char *secret_name)
+{
+ NMSetting *setting;
+ const char *tmp;
+
+ g_return_if_fail (connection != NULL);
+ g_return_if_fail (entry != NULL);
+ g_return_if_fail (func != NULL);
+ g_return_if_fail (setting_name != NULL);
+ g_return_if_fail (secret_name != NULL);
+
+ setting = nm_connection_get_setting (connection, setting_type);
+ if (setting) {
+ tmp = (*func) (setting);
+ if (tmp)
+ gtk_entry_set_text (entry, tmp);
+ }
+}
+
diff --git a/libnm-gtk/wireless-security/helpers.h b/libnm-gtk/wireless-security/helpers.h
new file mode 100644
index 0000000..9512676
--- /dev/null
+++ b/libnm-gtk/wireless-security/helpers.h
@@ -0,0 +1,40 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Red Hat, Inc.
+ */
+
+#ifndef _HELPERS_H_
+#define _HELPERS_H_
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <nm-connection.h>
+#include <nm-setting.h>
+
+typedef const char * (*HelperSecretFunc)(NMSetting *);
+
+void helper_fill_secret_entry (NMConnection *connection,
+ GtkEntry *entry,
+ GType setting_type,
+ HelperSecretFunc func,
+ const char *setting_name,
+ const char *secret_name);
+
+#endif /* _HELPERS_H_ */
+
diff --git a/libnm-gtk/wireless-security/leap.ui b/libnm-gtk/wireless-security/leap.ui
new file mode 100644
index 0000000..527142e
--- /dev/null
+++ b/libnm-gtk/wireless-security/leap.ui
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="leap_widget">
+ <property name="title">leap_widget</property>
+ <child>
+ <object class="GtkNotebook" id="leap_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="table5">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="leap_username_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">User Name:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="leap_password_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password:</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="leap_password_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="leap_show_checkbutton">
+ <property name="label" translatable="yes">Show password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="leap_username_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="GtkLabel">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/wep-key.ui b/libnm-gtk/wireless-security/wep-key.ui
new file mode 100644
index 0000000..e8b40b0
--- /dev/null
+++ b/libnm-gtk/wireless-security/wep-key.ui
@@ -0,0 +1,185 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkListStore" id="model3">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">Open System</col>
+ </row>
+ <row>
+ <col id="0">Shared Key</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkListStore" id="model4">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0">1 (Default)</col>
+ </row>
+ <row>
+ <col id="0">2</col>
+ </row>
+ <row>
+ <col id="0">3</col>
+ </row>
+ <row>
+ <col id="0">4</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkWindow" id="wep_key_widget">
+ <property name="title">wep_key_widget</property>
+ <child>
+ <object class="GtkNotebook" id="wep_key_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="table6">
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="wep_key_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Key:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="wep_key_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label31">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="wep_key_show_checkbutton">
+ <property name="label" translatable="yes">Show key</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="wep_key_auth_method_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Authentication:</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="wep_key_auth_method_combo">
+ <property name="visible">True</property>
+ <property name="model">model3</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer3"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="wep_key_index_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">WEP Index:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="wep_key_index_combo">
+ <property name="visible">True</property>
+ <property name="model">model4</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer4"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/wireless-security.c b/libnm-gtk/wireless-security/wireless-security.c
new file mode 100644
index 0000000..a041eb8
--- /dev/null
+++ b/libnm-gtk/wireless-security/wireless-security.c
@@ -0,0 +1,441 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <string.h>
+
+#include <glib.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n.h>
+
+#include <nm-setting-connection.h>
+#include <nm-setting-wired.h>
+#include <nm-setting-wireless.h>
+#include <nm-setting-wireless-security.h>
+#include <nm-setting-8021x.h>
+
+#include "wireless-security.h"
+#include "eap-method.h"
+
+GType
+wireless_security_get_g_type (void)
+{
+ static GType type_id = 0;
+
+ if (!type_id) {
+ type_id = g_boxed_type_register_static ("WirelessSecurity",
+ (GBoxedCopyFunc) wireless_security_ref,
+ (GBoxedFreeFunc) wireless_security_unref);
+ }
+
+ return type_id;
+}
+
+GtkWidget *
+wireless_security_get_widget (WirelessSecurity *sec)
+{
+ g_return_val_if_fail (sec != NULL, NULL);
+
+ return sec->ui_widget;
+}
+
+void
+wireless_security_set_changed_notify (WirelessSecurity *sec,
+ WSChangedFunc func,
+ gpointer user_data)
+{
+ g_return_if_fail (sec != NULL);
+
+ sec->changed_notify = func;
+ sec->changed_notify_data = user_data;
+}
+
+void
+wireless_security_changed_cb (GtkWidget *ignored, gpointer user_data)
+{
+ WirelessSecurity *sec = WIRELESS_SECURITY (user_data);
+
+ if (sec->changed_notify)
+ (*(sec->changed_notify)) (sec, sec->changed_notify_data);
+}
+
+gboolean
+wireless_security_validate (WirelessSecurity *sec, const GByteArray *ssid)
+{
+ g_return_val_if_fail (sec != NULL, FALSE);
+
+ g_assert (sec->validate);
+ return (*(sec->validate)) (sec, ssid);
+}
+
+void
+wireless_security_add_to_size_group (WirelessSecurity *sec, GtkSizeGroup *group)
+{
+ g_return_if_fail (sec != NULL);
+ g_return_if_fail (group != NULL);
+
+ g_assert (sec->add_to_size_group);
+ return (*(sec->add_to_size_group)) (sec, group);
+}
+
+void
+wireless_security_fill_connection (WirelessSecurity *sec,
+ NMConnection *connection)
+{
+ g_return_if_fail (sec != NULL);
+ g_return_if_fail (connection != NULL);
+
+ g_assert (sec->fill_connection);
+ return (*(sec->fill_connection)) (sec, connection);
+}
+
+WirelessSecurity *
+wireless_security_ref (WirelessSecurity *sec)
+{
+ g_return_val_if_fail (sec != NULL, NULL);
+ g_return_val_if_fail (sec->refcount > 0, NULL);
+
+ sec->refcount++;
+ return sec;
+}
+
+void
+wireless_security_unref (WirelessSecurity *sec)
+{
+ g_return_if_fail (sec != NULL);
+ g_return_if_fail (sec->refcount > 0);
+
+ g_assert (sec->destroy);
+
+ sec->refcount--;
+ if (sec->refcount == 0) {
+ g_object_unref (sec->builder);
+ g_object_unref (sec->ui_widget);
+ (*(sec->destroy)) (sec);
+ }
+}
+
+gboolean
+wireless_security_init (WirelessSecurity *sec,
+ WSValidateFunc validate,
+ WSAddToSizeGroupFunc add_to_size_group,
+ WSFillConnectionFunc fill_connection,
+ WSDestroyFunc destroy,
+ const char *ui_file,
+ const char *ui_widget)
+{
+ char *path;
+ GtkBuilder *builder;
+ GError *error = NULL;
+
+ builder = gtk_builder_new ();
+ path = g_build_filename (UIDIR, ui_file, NULL);
+ if (!gtk_builder_add_from_file (builder, path, &error)) {
+ if (error) {
+ g_warning ("Couldn't load '%s': %s", path, error->message);
+ g_error_free (error);
+ } else
+ g_warning ("Couldn't load '%s'", path);
+
+ g_free (path);
+ g_object_unref (builder);
+
+ return FALSE;
+ }
+
+ g_free (path);
+
+ sec->builder = builder;
+ sec->refcount = 1;
+
+ sec->validate = validate;
+ sec->add_to_size_group = add_to_size_group;
+ sec->fill_connection = fill_connection;
+ sec->destroy = destroy;
+
+ sec->ui_widget = GTK_WIDGET (gtk_builder_get_object (builder, ui_widget));
+ g_assert (sec->ui_widget);
+ g_object_ref_sink (sec->ui_widget);
+
+ return TRUE;
+}
+
+GtkWidget *
+wireless_security_nag_user (WirelessSecurity *sec)
+{
+ g_return_val_if_fail (sec != NULL, NULL);
+
+ if (sec->nag_user)
+ return (*(sec->nag_user)) (sec);
+ return NULL;
+}
+
+void
+wireless_security_clear_ciphers (NMConnection *connection)
+{
+ NMSettingWirelessSecurity *s_wireless_sec;
+
+ g_return_if_fail (connection != NULL);
+
+ s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection,
+ NM_TYPE_SETTING_WIRELESS_SECURITY));
+ g_assert (s_wireless_sec);
+
+ nm_setting_wireless_security_clear_protos (s_wireless_sec);
+ nm_setting_wireless_security_clear_pairwise (s_wireless_sec);
+ nm_setting_wireless_security_clear_groups (s_wireless_sec);
+}
+
+void
+ws_802_1x_add_to_size_group (WirelessSecurity *sec,
+ GtkSizeGroup *size_group,
+ const char *label_name,
+ const char *combo_name)
+{
+ GtkWidget *widget;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ EAPMethod *eap;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (sec->builder, label_name));
+ g_assert (widget);
+ gtk_size_group_add_widget (size_group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (sec->builder, combo_name));
+ g_assert (widget);
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, AUTH_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+ eap_method_add_to_size_group (eap, size_group);
+ eap_method_unref (eap);
+}
+
+gboolean
+ws_802_1x_validate (WirelessSecurity *sec, const char *combo_name)
+{
+ GtkWidget *widget;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ EAPMethod *eap = NULL;
+ gboolean valid = FALSE;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (sec->builder, combo_name));
+ g_assert (widget);
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, AUTH_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+ valid = eap_method_validate (eap);
+ eap_method_unref (eap);
+ return valid;
+}
+
+void
+ws_802_1x_auth_combo_changed (GtkWidget *combo,
+ WirelessSecurity *sec,
+ const char *vbox_name,
+ GtkSizeGroup *size_group)
+{
+ GtkWidget *vbox;
+ EAPMethod *eap = NULL;
+ GList *elt, *children;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ GtkWidget *eap_widget;
+
+ vbox = GTK_WIDGET (gtk_builder_get_object (sec->builder, vbox_name));
+ g_assert (vbox);
+
+ /* Remove any previous wireless security widgets */
+ children = gtk_container_get_children (GTK_CONTAINER (vbox));
+ for (elt = children; elt; elt = g_list_next (elt))
+ gtk_container_remove (GTK_CONTAINER (vbox), GTK_WIDGET (elt->data));
+
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter);
+ gtk_tree_model_get (model, &iter, AUTH_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+
+ eap_widget = eap_method_get_widget (eap);
+ g_assert (eap_widget);
+
+ if (size_group)
+ eap_method_add_to_size_group (eap, size_group);
+
+ if (gtk_widget_get_parent (eap_widget))
+ gtk_widget_reparent (eap_widget, vbox);
+ else
+ gtk_container_add (GTK_CONTAINER (vbox), eap_widget);
+
+ eap_method_unref (eap);
+
+ wireless_security_changed_cb (combo, WIRELESS_SECURITY (sec));
+}
+
+GtkWidget *
+ws_802_1x_auth_combo_init (WirelessSecurity *sec,
+ const char *combo_name,
+ GCallback auth_combo_changed_cb,
+ NMConnection *connection)
+{
+ GtkWidget *combo;
+ GtkListStore *auth_model;
+ GtkTreeIter iter;
+ EAPMethodTLS *em_tls;
+ EAPMethodLEAP *em_leap;
+ EAPMethodTTLS *em_ttls;
+ EAPMethodPEAP *em_peap;
+ const char *default_method = NULL;
+ int active = -1, item = 0;
+ gboolean wired = FALSE;
+
+ /* Grab the default EAP method out of the security object */
+ if (connection) {
+ NMSettingConnection *s_con;
+ NMSetting8021x *s_8021x;
+
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_assert (s_con);
+
+ if (!strcmp (nm_setting_connection_get_connection_type (s_con), NM_SETTING_WIRED_SETTING_NAME))
+ wired = TRUE;
+
+ s_8021x = (NMSetting8021x *) nm_connection_get_setting (connection, NM_TYPE_SETTING_802_1X);
+ if (s_8021x && nm_setting_802_1x_get_num_eap_methods (s_8021x))
+ default_method = nm_setting_802_1x_get_eap_method (s_8021x, 0);
+ }
+
+ auth_model = gtk_list_store_new (2, G_TYPE_STRING, eap_method_get_g_type ());
+
+ em_tls = eap_method_tls_new (sec, connection, FALSE);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ AUTH_NAME_COLUMN, _("TLS"),
+ AUTH_METHOD_COLUMN, em_tls,
+ -1);
+ eap_method_unref (EAP_METHOD (em_tls));
+ if (default_method && (active < 0) && !strcmp (default_method, "tls"))
+ active = item;
+ item++;
+
+ if (!wired) {
+ em_leap = eap_method_leap_new (sec, connection);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ AUTH_NAME_COLUMN, _("LEAP"),
+ AUTH_METHOD_COLUMN, em_leap,
+ -1);
+ eap_method_unref (EAP_METHOD (em_leap));
+ if (default_method && (active < 0) && !strcmp (default_method, "leap"))
+ active = item;
+ item++;
+ }
+
+ em_ttls = eap_method_ttls_new (sec, connection);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ AUTH_NAME_COLUMN, _("Tunneled TLS"),
+ AUTH_METHOD_COLUMN, em_ttls,
+ -1);
+ eap_method_unref (EAP_METHOD (em_ttls));
+ if (default_method && (active < 0) && !strcmp (default_method, "ttls"))
+ active = item;
+ item++;
+
+ em_peap = eap_method_peap_new (sec, connection);
+ gtk_list_store_append (auth_model, &iter);
+ gtk_list_store_set (auth_model, &iter,
+ AUTH_NAME_COLUMN, _("Protected EAP (PEAP)"),
+ AUTH_METHOD_COLUMN, em_peap,
+ -1);
+ eap_method_unref (EAP_METHOD (em_peap));
+ if (default_method && (active < 0) && !strcmp (default_method, "peap"))
+ active = item;
+ item++;
+
+ combo = GTK_WIDGET (gtk_builder_get_object (sec->builder, combo_name));
+ g_assert (combo);
+
+ gtk_combo_box_set_model (GTK_COMBO_BOX (combo), GTK_TREE_MODEL (auth_model));
+ g_object_unref (G_OBJECT (auth_model));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (combo), active < 0 ? 0 : (guint32) active);
+
+ g_signal_connect (G_OBJECT (combo), "changed", auth_combo_changed_cb, sec);
+
+ return combo;
+}
+
+void
+ws_802_1x_fill_connection (WirelessSecurity *sec,
+ const char *combo_name,
+ NMConnection *connection)
+{
+ GtkWidget *widget;
+ NMSettingWireless *s_wireless;
+ NMSettingWirelessSecurity *s_wireless_sec;
+ NMSetting8021x *s_8021x;
+ EAPMethod *eap = NULL;
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ g_assert (s_wireless);
+
+ g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL);
+
+ /* Blow away the old wireless security setting by adding a clear one */
+ s_wireless_sec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
+ nm_connection_add_setting (connection, (NMSetting *) s_wireless_sec);
+
+ /* Blow away the old 802.1x setting by adding a clear one */
+ s_8021x = (NMSetting8021x *) nm_setting_802_1x_new ();
+ nm_connection_add_setting (connection, (NMSetting *) s_8021x);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (sec->builder, combo_name));
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, AUTH_METHOD_COLUMN, &eap, -1);
+ g_assert (eap);
+
+ eap_method_fill_connection (eap, connection);
+ eap_method_unref (eap);
+}
+
+GtkWidget *
+ws_802_1x_nag_user (WirelessSecurity *sec,
+ const char *combo_name)
+{
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ EAPMethod *eap = NULL;
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (sec->builder, combo_name));
+ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget));
+ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter);
+ gtk_tree_model_get (model, &iter, AUTH_METHOD_COLUMN, &eap, -1);
+ g_return_val_if_fail (eap != NULL, NULL);
+
+ return eap_method_nag_user (eap);
+}
+
diff --git a/libnm-gtk/wireless-security/wireless-security.h b/libnm-gtk/wireless-security/wireless-security.h
new file mode 100644
index 0000000..3d22df6
--- /dev/null
+++ b/libnm-gtk/wireless-security/wireless-security.h
@@ -0,0 +1,127 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef WIRELESS_SECURITY_H
+#define WIRELESS_SECURITY_H
+
+#include <glib.h>
+#include <gtk/gtk.h>
+
+#include <nm-connection.h>
+
+typedef struct _WirelessSecurity WirelessSecurity;
+
+typedef void (*WSChangedFunc) (WirelessSecurity *sec, gpointer user_data);
+
+typedef void (*WSAddToSizeGroupFunc) (WirelessSecurity *sec, GtkSizeGroup *group);
+typedef void (*WSFillConnectionFunc) (WirelessSecurity *sec, NMConnection *connection);
+typedef void (*WSDestroyFunc) (WirelessSecurity *sec);
+typedef gboolean (*WSValidateFunc) (WirelessSecurity *sec, const GByteArray *ssid);
+typedef GtkWidget * (*WSNagUserFunc) (WirelessSecurity *sec);
+
+struct _WirelessSecurity {
+ guint32 refcount;
+ GtkBuilder *builder;
+ GtkWidget *ui_widget;
+ WSChangedFunc changed_notify;
+ gpointer changed_notify_data;
+
+ WSAddToSizeGroupFunc add_to_size_group;
+ WSFillConnectionFunc fill_connection;
+ WSValidateFunc validate;
+ WSNagUserFunc nag_user;
+ WSDestroyFunc destroy;
+};
+
+#define WIRELESS_SECURITY(x) ((WirelessSecurity *) x)
+
+
+GtkWidget *wireless_security_get_widget (WirelessSecurity *sec);
+
+void wireless_security_set_changed_notify (WirelessSecurity *sec,
+ WSChangedFunc func,
+ gpointer user_data);
+
+gboolean wireless_security_validate (WirelessSecurity *sec, const GByteArray *ssid);
+
+void wireless_security_add_to_size_group (WirelessSecurity *sec,
+ GtkSizeGroup *group);
+
+void wireless_security_fill_connection (WirelessSecurity *sec,
+ NMConnection *connection);
+
+GtkWidget * wireless_security_nag_user (WirelessSecurity *sec);
+
+WirelessSecurity *wireless_security_ref (WirelessSecurity *sec);
+
+void wireless_security_unref (WirelessSecurity *sec);
+
+GType wireless_security_get_g_type (void);
+
+/* Below for internal use only */
+
+#include "ws-wep-key.h"
+#include "ws-wpa-psk.h"
+#include "ws-leap.h"
+#include "ws-wpa-eap.h"
+#include "ws-dynamic-wep.h"
+
+gboolean wireless_security_init (WirelessSecurity *sec,
+ WSValidateFunc validate,
+ WSAddToSizeGroupFunc add_to_size_group,
+ WSFillConnectionFunc fill_connection,
+ WSDestroyFunc destroy,
+ const char *ui_file,
+ const char *ui_widget);
+
+void wireless_security_changed_cb (GtkWidget *entry, gpointer user_data);
+
+void wireless_security_clear_ciphers (NMConnection *connection);
+
+#define AUTH_NAME_COLUMN 0
+#define AUTH_METHOD_COLUMN 1
+
+GtkWidget *ws_802_1x_auth_combo_init (WirelessSecurity *sec,
+ const char *combo_name,
+ GCallback auth_combo_changed_cb,
+ NMConnection *connection);
+
+void ws_802_1x_auth_combo_changed (GtkWidget *combo,
+ WirelessSecurity *sec,
+ const char *vbox_name,
+ GtkSizeGroup *size_group);
+
+gboolean ws_802_1x_validate (WirelessSecurity *sec, const char *combo_name);
+
+void ws_802_1x_add_to_size_group (WirelessSecurity *sec,
+ GtkSizeGroup *size_group,
+ const char *label_name,
+ const char *combo_name);
+
+void ws_802_1x_fill_connection (WirelessSecurity *sec,
+ const char *combo_name,
+ NMConnection *connection);
+
+GtkWidget * ws_802_1x_nag_user (WirelessSecurity *sec,
+ const char *combo_name);
+
+#endif /* WIRELESS_SECURITY_H */
+
diff --git a/libnm-gtk/wireless-security/wpa-eap.ui b/libnm-gtk/wireless-security/wpa-eap.ui
new file mode 100644
index 0000000..fc8ff34
--- /dev/null
+++ b/libnm-gtk/wireless-security/wpa-eap.ui
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkListStore" id="model5">
+ <columns>
+ <!-- column-name gchararray -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0"> </col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkWindow" id="wpa_eap_widget">
+ <property name="title">wpa_eap_widget</property>
+ <child>
+ <object class="GtkNotebook" id="wpa_eap_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="wpa_eap_table">
+ <property name="visible">True</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="wpa_eap_auth_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Authentication:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="wpa_eap_auth_combo">
+ <property name="visible">True</property>
+ <property name="model">model5</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer5"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="wpa_eap_method_vbox">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="GtkLabel">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/wpa-psk.ui b/libnm-gtk/wireless-security/wpa-psk.ui
new file mode 100644
index 0000000..3839cc6
--- /dev/null
+++ b/libnm-gtk/wireless-security/wpa-psk.ui
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.14"/>
+ <!-- interface-naming-policy toplevel-contextual -->
+ <object class="GtkWindow" id="wpa_psk_widget">
+ <property name="title">wpa_psk_widget</property>
+ <child>
+ <object class="GtkNotebook" id="wpa_psk_notebook">
+ <property name="visible">True</property>
+ <property name="show_tabs">False</property>
+ <property name="show_border">False</property>
+ <child>
+ <object class="GtkTable" id="wpa_psk_table">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="wpa_psk_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password:</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="wpa_psk_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">64</property>
+ <property name="visibility">False</property>
+ <property name="activates_default">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="wpa_psk_type_label">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Type:</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label32">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="wpa_psk_show_checkbutton">
+ <property name="label" translatable="yes">Show password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="wpa_psk_type_combo">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="GtkLabel">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/libnm-gtk/wireless-security/ws-dynamic-wep.c b/libnm-gtk/wireless-security/ws-dynamic-wep.c
new file mode 100644
index 0000000..e5e23b9
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-dynamic-wep.c
@@ -0,0 +1,121 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <ctype.h>
+#include <string.h>
+#include <nm-setting-wireless.h>
+
+#include "wireless-security.h"
+#include "eap-method.h"
+
+static void
+destroy (WirelessSecurity *parent)
+{
+ WirelessSecurityDynamicWEP *sec = (WirelessSecurityDynamicWEP *) parent;
+
+ if (sec->size_group)
+ g_object_unref (sec->size_group);
+ g_slice_free (WirelessSecurityDynamicWEP, sec);
+}
+
+static gboolean
+validate (WirelessSecurity *parent, const GByteArray *ssid)
+{
+ return ws_802_1x_validate (parent, "dynamic_wep_auth_combo");
+}
+
+static void
+add_to_size_group (WirelessSecurity *parent, GtkSizeGroup *group)
+{
+ WirelessSecurityDynamicWEP *sec = (WirelessSecurityDynamicWEP *) parent;
+
+ if (sec->size_group)
+ g_object_unref (sec->size_group);
+ sec->size_group = g_object_ref (group);
+
+ ws_802_1x_add_to_size_group (parent,
+ sec->size_group,
+ "dynamic_wep_auth_label",
+ "dynamic_wep_auth_combo");
+}
+
+static void
+fill_connection (WirelessSecurity *parent, NMConnection *connection)
+{
+ NMSettingWirelessSecurity *s_wireless_sec;
+
+ ws_802_1x_fill_connection (parent, "dynamic_wep_auth_combo", connection);
+
+ s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection,
+ NM_TYPE_SETTING_WIRELESS_SECURITY));
+ g_assert (s_wireless_sec);
+
+ g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "ieee8021x", NULL);
+
+ nm_setting_wireless_security_add_pairwise (s_wireless_sec, "wep40");
+ nm_setting_wireless_security_add_pairwise (s_wireless_sec, "wep104");
+ nm_setting_wireless_security_add_group (s_wireless_sec, "wep40");
+ nm_setting_wireless_security_add_group (s_wireless_sec, "wep104");
+}
+
+static void
+auth_combo_changed_cb (GtkWidget *combo, gpointer user_data)
+{
+ WirelessSecurity *parent = WIRELESS_SECURITY (user_data);
+ WirelessSecurityDynamicWEP *sec = (WirelessSecurityDynamicWEP *) parent;
+
+ ws_802_1x_auth_combo_changed (combo,
+ parent,
+ "dynamic_wep_method_vbox",
+ sec->size_group);
+}
+
+static GtkWidget *
+nag_user (WirelessSecurity *parent)
+{
+ return ws_802_1x_nag_user (parent, "dynamic_wep_auth_combo");
+}
+
+WirelessSecurityDynamicWEP *
+ws_dynamic_wep_new (NMConnection *connection)
+{
+ WirelessSecurityDynamicWEP *sec;
+ GtkWidget *widget;
+
+ sec = g_slice_new0 (WirelessSecurityDynamicWEP);
+ if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+ fill_connection, destroy, "dynamic-wep.ui", "dynamic_wep_notebook")) {
+ g_slice_free (WirelessSecurityDynamicWEP, sec);
+ return NULL;
+ }
+
+ WIRELESS_SECURITY (sec)->nag_user = nag_user;
+
+ widget = ws_802_1x_auth_combo_init (WIRELESS_SECURITY (sec),
+ "dynamic_wep_auth_combo",
+ (GCallback) auth_combo_changed_cb,
+ connection);
+ auth_combo_changed_cb (widget, (gpointer) sec);
+
+ return sec;
+}
+
diff --git a/libnm-gtk/wireless-security/ws-dynamic-wep.h b/libnm-gtk/wireless-security/ws-dynamic-wep.h
new file mode 100644
index 0000000..c272af2
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-dynamic-wep.h
@@ -0,0 +1,34 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef WS_DYNAMIC_WEP_H
+#define WS_DYNAMIC_WEP_H
+
+typedef struct {
+ struct _WirelessSecurity parent;
+
+ GtkSizeGroup *size_group;
+} WirelessSecurityDynamicWEP;
+
+WirelessSecurityDynamicWEP * ws_dynamic_wep_new (NMConnection *connection);
+
+#endif /* WS_DYNAMIC_WEP_H */
+
diff --git a/libnm-gtk/wireless-security/ws-leap.c b/libnm-gtk/wireless-security/ws-leap.c
new file mode 100644
index 0000000..92efffb
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-leap.c
@@ -0,0 +1,174 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <string.h>
+#include <nm-setting-wireless.h>
+
+#include "wireless-security.h"
+#include "utils.h"
+#include "helpers.h"
+
+
+static void
+show_toggled_cb (GtkCheckButton *button, WirelessSecurity *sec)
+{
+ GtkWidget *widget;
+ gboolean visible;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (sec->builder, "leap_password_entry"));
+ g_assert (widget);
+
+ visible = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
+}
+
+static void
+destroy (WirelessSecurity *parent)
+{
+ WirelessSecurityLEAP *sec = (WirelessSecurityLEAP *) parent;
+
+ g_slice_free (WirelessSecurityLEAP, sec);
+}
+
+static gboolean
+validate (WirelessSecurity *parent, const GByteArray *ssid)
+{
+ GtkWidget *entry;
+ const char *text;
+
+ entry = GTK_WIDGET (gtk_builder_get_object (parent->builder, "leap_username_entry"));
+ g_assert (entry);
+ text = gtk_entry_get_text (GTK_ENTRY (entry));
+ if (!text || !strlen (text))
+ return FALSE;
+
+ entry = GTK_WIDGET (gtk_builder_get_object (parent->builder, "leap_password_entry"));
+ g_assert (entry);
+ text = gtk_entry_get_text (GTK_ENTRY (entry));
+ if (!text || !strlen (text))
+ return FALSE;
+
+ return TRUE;
+}
+
+static void
+add_to_size_group (WirelessSecurity *parent, GtkSizeGroup *group)
+{
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "leap_username_label"));
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "leap_password_label"));
+ gtk_size_group_add_widget (group, widget);
+}
+
+static void
+fill_connection (WirelessSecurity *parent, NMConnection *connection)
+{
+ NMSettingWireless *s_wireless;
+ NMSettingWirelessSecurity *s_wireless_sec;
+ GtkWidget *widget;
+ const char *leap_password = NULL, *leap_username = NULL;
+
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ g_assert (s_wireless);
+
+ g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL);
+
+ /* Blow away the old security setting by adding a clear one */
+ s_wireless_sec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
+ nm_connection_add_setting (connection, (NMSetting *) s_wireless_sec);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "leap_username_entry"));
+ leap_username = gtk_entry_get_text (GTK_ENTRY (widget));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "leap_password_entry"));
+ leap_password = gtk_entry_get_text (GTK_ENTRY (widget));
+
+ g_object_set (s_wireless_sec,
+ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "ieee8021x",
+ NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, "leap",
+ NM_SETTING_WIRELESS_SECURITY_LEAP_USERNAME, leap_username,
+ NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD, leap_password,
+ NULL);
+}
+
+WirelessSecurityLEAP *
+ws_leap_new (NMConnection *connection)
+{
+ WirelessSecurityLEAP *sec;
+ GtkBuilder *builder;
+ GtkWidget *widget;
+ NMSettingWirelessSecurity *wsec = NULL;
+
+ sec = g_slice_new0 (WirelessSecurityLEAP);
+ if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+ fill_connection, destroy, "leap.ui", "leap_notebook")) {
+ g_slice_free (WirelessSecurityLEAP, sec);
+ return NULL;
+ }
+
+ builder = WIRELESS_SECURITY (sec)->builder;
+
+ if (connection) {
+ wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ if (wsec) {
+ const char *auth_alg;
+
+ /* Ignore if wireless security doesn't specify LEAP */
+ auth_alg = nm_setting_wireless_security_get_auth_alg (wsec);
+ if (!auth_alg || strcmp (auth_alg, "leap"))
+ wsec = NULL;
+ }
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "leap_password_entry"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ sec);
+ if (wsec) {
+ helper_fill_secret_entry (connection,
+ GTK_ENTRY (widget),
+ NM_TYPE_SETTING_WIRELESS_SECURITY,
+ (HelperSecretFunc) nm_setting_wireless_security_get_leap_password,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD);
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "leap_username_entry"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ sec);
+ if (wsec)
+ gtk_entry_set_text (GTK_ENTRY (widget), nm_setting_wireless_security_get_leap_username (wsec));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "leap_show_checkbutton"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "toggled",
+ (GCallback) show_toggled_cb,
+ sec);
+
+ return sec;
+}
+
diff --git a/libnm-gtk/wireless-security/ws-leap.h b/libnm-gtk/wireless-security/ws-leap.h
new file mode 100644
index 0000000..5c5c42f
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-leap.h
@@ -0,0 +1,33 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef WS_LEAP_H
+#define WS_LEAP_H
+
+typedef struct {
+ struct _WirelessSecurity parent;
+
+} WirelessSecurityLEAP;
+
+WirelessSecurityLEAP * ws_leap_new (NMConnection *connection);
+
+#endif /* WS_LEAP_H */
+
diff --git a/libnm-gtk/wireless-security/ws-wep-key.c b/libnm-gtk/wireless-security/ws-wep-key.c
new file mode 100644
index 0000000..19c95cc
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-wep-key.c
@@ -0,0 +1,333 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <ctype.h>
+#include <string.h>
+
+#include <nm-setting-wireless.h>
+#include <nm-setting-wireless-security.h>
+
+#include "wireless-security.h"
+#include "utils.h"
+
+static void
+show_toggled_cb (GtkCheckButton *button, WirelessSecurity *sec)
+{
+ GtkWidget *widget;
+ gboolean visible;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (sec->builder, "wep_key_entry"));
+ g_assert (widget);
+
+ visible = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
+}
+
+static void
+key_index_combo_changed_cb (GtkWidget *combo, WirelessSecurity *parent)
+{
+ WirelessSecurityWEPKey *sec = (WirelessSecurityWEPKey *) parent;
+ GtkWidget *entry;
+ const char *key;
+ int key_index;
+
+ /* Save WEP key for old key index */
+ entry = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_entry"));
+ key = gtk_entry_get_text (GTK_ENTRY (entry));
+ if (key)
+ strcpy (sec->keys[sec->cur_index], key);
+ else
+ memset (sec->keys[sec->cur_index], 0, sizeof (sec->keys[sec->cur_index]));
+
+ key_index = gtk_combo_box_get_active (GTK_COMBO_BOX (combo));
+ g_return_if_fail (key_index <= 3);
+ g_return_if_fail (key_index >= 0);
+
+ /* Populate entry with key from new index */
+ gtk_entry_set_text (GTK_ENTRY (entry), sec->keys[key_index]);
+ sec->cur_index = key_index;
+
+ wireless_security_changed_cb (combo, parent);
+}
+
+static void
+destroy (WirelessSecurity *parent)
+{
+ WirelessSecurityWEPKey *sec = (WirelessSecurityWEPKey *) parent;
+ int i;
+
+ for (i = 0; i < 4; i++)
+ memset (sec->keys[i], 0, sizeof (sec->keys[i]));
+
+ g_slice_free (WirelessSecurityWEPKey, sec);
+}
+
+static gboolean
+validate (WirelessSecurity *parent, const GByteArray *ssid)
+{
+ WirelessSecurityWEPKey *sec = (WirelessSecurityWEPKey *) parent;
+ GtkWidget *entry;
+ const char *key;
+ int i;
+
+ entry = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_entry"));
+ g_assert (entry);
+
+ key = gtk_entry_get_text (GTK_ENTRY (entry));
+ if (!key)
+ return FALSE;
+
+ if (sec->type == NM_WEP_KEY_TYPE_KEY) {
+ if ((strlen (key) == 10) || (strlen (key) == 26)) {
+ for (i = 0; i < strlen (key); i++) {
+ if (!isxdigit (key[i]))
+ return FALSE;
+ }
+ } else if ((strlen (key) == 5) || (strlen (key) == 13)) {
+ for (i = 0; i < strlen (key); i++) {
+ if (!isascii (key[i]))
+ return FALSE;
+ }
+ } else {
+ return FALSE;
+ }
+ } else if (sec->type == NM_WEP_KEY_TYPE_PASSPHRASE) {
+ if (!strlen (key) || (strlen (key) > 64))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+add_to_size_group (WirelessSecurity *parent, GtkSizeGroup *group)
+{
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_auth_method_label"));
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_label"));
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_index_label"));
+ gtk_size_group_add_widget (group, widget);
+}
+
+static void
+fill_connection (WirelessSecurity *parent, NMConnection *connection)
+{
+ WirelessSecurityWEPKey *sec = (WirelessSecurityWEPKey *) parent;
+ NMSettingWireless *s_wireless;
+ NMSettingWirelessSecurity *s_wsec;
+ GtkWidget *widget;
+ gint auth_alg;
+ const char *key;
+ int i;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_auth_method_combo"));
+ auth_alg = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wep_key_entry"));
+ key = gtk_entry_get_text (GTK_ENTRY (widget));
+ strcpy (sec->keys[sec->cur_index], key);
+
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ g_assert (s_wireless);
+
+ g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL);
+
+ /* Blow away the old security setting by adding a clear one */
+ s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
+ nm_connection_add_setting (connection, (NMSetting *) s_wsec);
+
+ g_object_set (s_wsec,
+ NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "none",
+ NM_SETTING_WIRELESS_SECURITY_WEP_TX_KEYIDX, sec->cur_index,
+ NM_SETTING_WIRELESS_SECURITY_AUTH_ALG, (auth_alg == 1) ? "shared" : "open",
+ NULL);
+
+ for (i = 0; i < 4; i++) {
+ if (strlen (sec->keys[i]))
+ nm_setting_wireless_security_set_wep_key (s_wsec, i, sec->keys[i]);
+ }
+}
+
+static void
+wep_entry_filter_cb (GtkEntry * entry,
+ const gchar *text,
+ gint length,
+ gint * position,
+ gpointer data)
+{
+ WirelessSecurityWEPKey *sec = (WirelessSecurityWEPKey *) data;
+ GtkEditable *editable = GTK_EDITABLE (entry);
+ int i, count = 0;
+ gchar *result = g_new (gchar, length);
+
+ if (sec->type == NM_WEP_KEY_TYPE_KEY) {
+ for (i = 0; i < length; i++) {
+ if (isxdigit(text[i]) || isascii(text[i]))
+ result[count++] = text[i];
+ }
+ } else if (sec->type == NM_WEP_KEY_TYPE_PASSPHRASE) {
+ for (i = 0; i < length; i++)
+ result[count++] = text[i];
+ }
+
+ if (count == 0)
+ goto out;
+
+ g_signal_handlers_block_by_func (G_OBJECT (editable),
+ G_CALLBACK (wep_entry_filter_cb),
+ data);
+ gtk_editable_insert_text (editable, result, count, position);
+ g_signal_handlers_unblock_by_func (G_OBJECT (editable),
+ G_CALLBACK (wep_entry_filter_cb),
+ data);
+
+out:
+ g_signal_stop_emission_by_name (G_OBJECT (editable), "insert-text");
+ g_free (result);
+}
+
+static void
+fill_secrets (WirelessSecurityWEPKey *sec, NMConnection *connection)
+{
+ NMSettingWirelessSecurity *s_wsec;
+ const char *tmp;
+ int i;
+
+ g_return_if_fail (sec != NULL);
+ g_return_if_fail (connection != NULL);
+
+ s_wsec = (NMSettingWirelessSecurity *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY);
+ for (i = 0; s_wsec && i < 4; i++) {
+ tmp = nm_setting_wireless_security_get_wep_key (s_wsec, i);
+ if (tmp)
+ strcpy (sec->keys[i], tmp);
+ }
+}
+
+WirelessSecurityWEPKey *
+ws_wep_key_new (NMConnection *connection,
+ NMWepKeyType type,
+ gboolean adhoc_create)
+{
+ WirelessSecurityWEPKey *sec;
+ GtkBuilder *builder;
+ GtkWidget *widget;
+ NMSettingWirelessSecurity *s_wsec = NULL;
+ guint8 default_key_idx = 0;
+ gboolean is_adhoc = adhoc_create;
+ gboolean is_shared_key = FALSE;
+
+ sec = g_slice_new0 (WirelessSecurityWEPKey);
+ if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+ fill_connection, destroy, "wep-key.ui", "wep_key_notebook")) {
+ g_slice_free (WirelessSecurityWEPKey, sec);
+ return NULL;
+ }
+
+ builder = WIRELESS_SECURITY (sec)->builder;
+
+ sec->type = type;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_entry"));
+ g_assert (widget);
+
+ if (connection) {
+ NMSettingWireless *s_wireless;
+ const char *mode, *auth_alg;
+
+ /* Fill secrets, if any */
+ fill_secrets (sec, connection);
+
+ s_wireless = (NMSettingWireless *) nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS);
+ mode = s_wireless ? nm_setting_wireless_get_mode (s_wireless) : NULL;
+ if (mode && !strcmp (mode, "adhoc"))
+ is_adhoc = TRUE;
+
+ s_wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS_SECURITY));
+ if (s_wsec) {
+ auth_alg = nm_setting_wireless_security_get_auth_alg (s_wsec);
+ if (auth_alg && !strcmp (auth_alg, "shared"))
+ is_shared_key = TRUE;
+ }
+ }
+
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ sec);
+ g_signal_connect (G_OBJECT (widget), "insert-text",
+ (GCallback) wep_entry_filter_cb,
+ sec);
+ if (sec->type == NM_WEP_KEY_TYPE_KEY)
+ gtk_entry_set_max_length (GTK_ENTRY (widget), 26);
+ else if (sec->type == NM_WEP_KEY_TYPE_PASSPHRASE)
+ gtk_entry_set_max_length (GTK_ENTRY (widget), 64);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_index_combo"));
+ if (connection && s_wsec)
+ default_key_idx = nm_setting_wireless_security_get_wep_tx_keyidx (s_wsec);
+
+ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), default_key_idx);
+ sec->cur_index = default_key_idx;
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) key_index_combo_changed_cb,
+ sec);
+
+ /* Key index is useless with adhoc networks */
+ if (is_adhoc) {
+ gtk_widget_hide (widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_index_label"));
+ gtk_widget_hide (widget);
+ }
+
+ /* Fill the key entry with the key for that index */
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_entry"));
+ if (strlen (sec->keys[default_key_idx]))
+ gtk_entry_set_text (GTK_ENTRY (widget), sec->keys[default_key_idx]);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_show_checkbutton"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "toggled",
+ (GCallback) show_toggled_cb,
+ sec);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_auth_method_combo"));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), is_shared_key ? 1 : 0);
+
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ sec);
+
+ /* Ad-Hoc connections can't use Shared Key auth */
+ if (is_adhoc) {
+ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
+ gtk_widget_hide (widget);
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wep_key_auth_method_label"));
+ gtk_widget_hide (widget);
+ }
+
+ return sec;
+}
+
diff --git a/libnm-gtk/wireless-security/ws-wep-key.h b/libnm-gtk/wireless-security/ws-wep-key.h
new file mode 100644
index 0000000..0b00b4e
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-wep-key.h
@@ -0,0 +1,40 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef WS_WEP_KEY_H
+#define WS_WEP_KEY_H
+
+#include <nm-setting-wireless-security.h>
+
+typedef struct {
+ struct _WirelessSecurity parent;
+
+ NMWepKeyType type;
+ char keys[4][65];
+ guint8 cur_index;
+} WirelessSecurityWEPKey;
+
+WirelessSecurityWEPKey * ws_wep_key_new (NMConnection *connection,
+ NMWepKeyType type,
+ gboolean adhoc_create);
+
+#endif /* WS_WEP_KEY_H */
+
diff --git a/libnm-gtk/wireless-security/ws-wpa-eap.c b/libnm-gtk/wireless-security/ws-wpa-eap.c
new file mode 100644
index 0000000..cd27298
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-wpa-eap.c
@@ -0,0 +1,116 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <ctype.h>
+#include <string.h>
+#include <nm-setting-wireless.h>
+
+#include "wireless-security.h"
+#include "eap-method.h"
+
+static void
+destroy (WirelessSecurity *parent)
+{
+ WirelessSecurityWPAEAP *sec = (WirelessSecurityWPAEAP *) parent;
+
+ if (sec->size_group)
+ g_object_unref (sec->size_group);
+ g_slice_free (WirelessSecurityWPAEAP, sec);
+}
+
+static gboolean
+validate (WirelessSecurity *parent, const GByteArray *ssid)
+{
+ return ws_802_1x_validate (parent, "wpa_eap_auth_combo");
+}
+
+static void
+add_to_size_group (WirelessSecurity *parent, GtkSizeGroup *group)
+{
+ WirelessSecurityWPAEAP *sec = (WirelessSecurityWPAEAP *) parent;
+
+ if (sec->size_group)
+ g_object_unref (sec->size_group);
+ sec->size_group = g_object_ref (group);
+
+ ws_802_1x_add_to_size_group (parent,
+ sec->size_group,
+ "wpa_eap_auth_label",
+ "wpa_eap_auth_combo");
+}
+
+static void
+fill_connection (WirelessSecurity *parent, NMConnection *connection)
+{
+ NMSettingWirelessSecurity *s_wireless_sec;
+
+ ws_802_1x_fill_connection (parent, "wpa_eap_auth_combo", connection);
+
+ s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection,
+ NM_TYPE_SETTING_WIRELESS_SECURITY));
+ g_assert (s_wireless_sec);
+
+ g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-eap", NULL);
+}
+
+static void
+auth_combo_changed_cb (GtkWidget *combo, gpointer user_data)
+{
+ WirelessSecurity *parent = WIRELESS_SECURITY (user_data);
+ WirelessSecurityWPAEAP *sec = (WirelessSecurityWPAEAP *) parent;
+
+ ws_802_1x_auth_combo_changed (combo,
+ parent,
+ "wpa_eap_method_vbox",
+ sec->size_group);
+}
+
+static GtkWidget *
+nag_user (WirelessSecurity *parent)
+{
+ return ws_802_1x_nag_user (parent, "wpa_eap_auth_combo");
+}
+
+WirelessSecurityWPAEAP *
+ws_wpa_eap_new (NMConnection *connection)
+{
+ WirelessSecurityWPAEAP *sec;
+ GtkWidget *widget;
+
+ sec = g_slice_new0 (WirelessSecurityWPAEAP);
+ if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+ fill_connection, destroy, "wpa-eap.ui", "wpa_eap_notebook")) {
+ g_slice_free (WirelessSecurityWPAEAP, sec);
+ return NULL;
+ }
+
+ WIRELESS_SECURITY (sec)->nag_user = nag_user;
+
+ widget = ws_802_1x_auth_combo_init (WIRELESS_SECURITY (sec),
+ "wpa_eap_auth_combo",
+ (GCallback) auth_combo_changed_cb,
+ connection);
+ auth_combo_changed_cb (widget, (gpointer) sec);
+
+ return sec;
+}
+
diff --git a/libnm-gtk/wireless-security/ws-wpa-eap.h b/libnm-gtk/wireless-security/ws-wpa-eap.h
new file mode 100644
index 0000000..6b09d83
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-wpa-eap.h
@@ -0,0 +1,34 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef WS_WPA_EAP_H
+#define WS_WPA_EAP_H
+
+typedef struct {
+ struct _WirelessSecurity parent;
+
+ GtkSizeGroup *size_group;
+} WirelessSecurityWPAEAP;
+
+WirelessSecurityWPAEAP * ws_wpa_eap_new (NMConnection *connection);
+
+#endif /* WS_WPA_EAP_H */
+
diff --git a/libnm-gtk/wireless-security/ws-wpa-psk.c b/libnm-gtk/wireless-security/ws-wpa-psk.c
new file mode 100644
index 0000000..eaa555c
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-wpa-psk.c
@@ -0,0 +1,189 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#include <ctype.h>
+#include <string.h>
+#include <nm-setting-wireless.h>
+
+#include "wireless-security.h"
+#include "utils.h"
+#include "helpers.h"
+
+#define WPA_PMK_LEN 32
+
+static void
+show_toggled_cb (GtkCheckButton *button, WirelessSecurity *sec)
+{
+ GtkWidget *widget;
+ gboolean visible;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (sec->builder, "wpa_psk_entry"));
+ g_assert (widget);
+
+ visible = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
+ gtk_entry_set_visibility (GTK_ENTRY (widget), visible);
+}
+
+static void
+destroy (WirelessSecurity *parent)
+{
+ WirelessSecurityWPAPSK *sec = (WirelessSecurityWPAPSK *) parent;
+
+ g_slice_free (WirelessSecurityWPAPSK, sec);
+}
+
+static gboolean
+validate (WirelessSecurity *parent, const GByteArray *ssid)
+{
+ GtkWidget *entry;
+ const char *key;
+ guint32 len;
+ int i;
+
+ entry = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wpa_psk_entry"));
+ g_assert (entry);
+
+ key = gtk_entry_get_text (GTK_ENTRY (entry));
+ len = strlen (key);
+ if ((len < 8) || (len > 64))
+ return FALSE;
+
+ if (len == 64) {
+ /* Hex PSK */
+ for (i = 0; i < len; i++) {
+ if (!isxdigit (key[i]))
+ return FALSE;
+ }
+ }
+
+ /* passphrase can be between 8 and 63 characters inclusive */
+
+ return TRUE;
+}
+
+static void
+add_to_size_group (WirelessSecurity *parent, GtkSizeGroup *group)
+{
+ GtkWidget *widget;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wpa_psk_type_label"));
+ gtk_size_group_add_widget (group, widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wpa_psk_label"));
+ gtk_size_group_add_widget (group, widget);
+}
+
+static void
+fill_connection (WirelessSecurity *parent, NMConnection *connection)
+{
+ GtkWidget *widget;
+ const char *key;
+ NMSettingWireless *s_wireless;
+ NMSettingWirelessSecurity *s_wireless_sec;
+ const char *mode;
+ gboolean is_adhoc = FALSE;
+
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ g_assert (s_wireless);
+
+ mode = nm_setting_wireless_get_mode (s_wireless);
+ if (mode && !strcmp (mode, "adhoc"))
+ is_adhoc = TRUE;
+
+ g_object_set (s_wireless, NM_SETTING_WIRELESS_SEC, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME, NULL);
+
+ /* Blow away the old security setting by adding a clear one */
+ s_wireless_sec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();
+ nm_connection_add_setting (connection, (NMSetting *) s_wireless_sec);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (parent->builder, "wpa_psk_entry"));
+ key = gtk_entry_get_text (GTK_ENTRY (widget));
+ g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_PSK, key, NULL);
+
+ wireless_security_clear_ciphers (connection);
+ if (is_adhoc) {
+ /* Ad-Hoc settings as specified by the supplicant */
+ g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-none", NULL);
+ nm_setting_wireless_security_add_proto (s_wireless_sec, "wpa");
+ nm_setting_wireless_security_add_pairwise (s_wireless_sec, "none");
+
+ /* Ad-hoc can only have _one_ group cipher... default to TKIP to be more
+ * compatible for now. Maybe we'll support selecting CCMP later.
+ */
+ nm_setting_wireless_security_add_group (s_wireless_sec, "tkip");
+ } else {
+ g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-psk", NULL);
+
+ /* Just leave ciphers and protocol empty, the supplicant will
+ * figure that out magically based on the AP IEs and card capabilities.
+ */
+ }
+}
+
+WirelessSecurityWPAPSK *
+ws_wpa_psk_new (NMConnection *connection)
+{
+ WirelessSecurityWPAPSK *sec;
+ GtkBuilder *builder;
+ GtkWidget *widget;
+
+ sec = g_slice_new0 (WirelessSecurityWPAPSK);
+ if (!wireless_security_init (WIRELESS_SECURITY (sec), validate, add_to_size_group,
+ fill_connection, destroy, "wpa-psk.ui", "wpa_psk_notebook")) {
+ g_slice_free (WirelessSecurityWPAPSK, sec);
+ return NULL;
+ }
+
+ builder = WIRELESS_SECURITY (sec)->builder;
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wpa_psk_entry"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "changed",
+ (GCallback) wireless_security_changed_cb,
+ sec);
+
+ /* Fill secrets, if any */
+ if (connection) {
+ helper_fill_secret_entry (connection,
+ GTK_ENTRY (widget),
+ NM_TYPE_SETTING_WIRELESS_SECURITY,
+ (HelperSecretFunc) nm_setting_wireless_security_get_psk,
+ NM_SETTING_WIRELESS_SECURITY_SETTING_NAME,
+ NM_SETTING_WIRELESS_SECURITY_PSK);
+ }
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wpa_psk_show_checkbutton"));
+ g_assert (widget);
+ g_signal_connect (G_OBJECT (widget), "toggled",
+ (GCallback) show_toggled_cb,
+ sec);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wpa_psk_type_combo"));
+ g_assert (widget);
+ gtk_widget_hide (widget);
+
+ widget = GTK_WIDGET (gtk_builder_get_object (builder, "wpa_psk_type_label"));
+ g_assert (widget);
+ gtk_widget_hide (widget);
+
+ return sec;
+}
+
diff --git a/libnm-gtk/wireless-security/ws-wpa-psk.h b/libnm-gtk/wireless-security/ws-wpa-psk.h
new file mode 100644
index 0000000..6504960
--- /dev/null
+++ b/libnm-gtk/wireless-security/ws-wpa-psk.h
@@ -0,0 +1,33 @@
+/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
+ *
+ * Dan Williams <dcbw redhat com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2007 Red Hat, Inc.
+ */
+
+#ifndef WS_WPA_PSK_H
+#define WS_WPA_PSK_H
+
+typedef struct {
+ struct _WirelessSecurity parent;
+
+} WirelessSecurityWPAPSK;
+
+WirelessSecurityWPAPSK * ws_wpa_psk_new (NMConnection *connection);
+
+#endif /* WS_WEP_KEY_H */
+
diff --git a/marshallers/.gitignore b/marshallers/.gitignore
new file mode 100644
index 0000000..5ed6c5c
--- /dev/null
+++ b/marshallers/.gitignore
@@ -0,0 +1,2 @@
+nma-marshal.[ch]
+
diff --git a/marshallers/Makefile.am b/marshallers/Makefile.am
new file mode 100644
index 0000000..a4f8458
--- /dev/null
+++ b/marshallers/Makefile.am
@@ -0,0 +1,25 @@
+noinst_LTLIBRARIES = libmarshallers.la
+
+BUILT_SOURCES = \
+ nma-marshal.h \
+ nma-marshal.c
+
+libmarshallers_la_SOURCES = \
+ nma-marshal-main.c
+
+libmarshallers_la_CPPFLAGS = \
+ $(NMN_CFLAGS)
+
+libmarshallers_la_LIBADD = $(GOBJECT_LIBS)
+
+EXTRA_DIST = nma-marshal.list
+CLEANFILES = $(BUILT_SOURCES)
+
+nma-marshal.h: nma-marshal.list
+ $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --prefix=nma_marshal --header > $@
+
+nma-marshal.c: nma-marshal.list
+ $(AM_V_GEN) $(GLIB_GENMARSHAL) $< --prefix=nma_marshal --body > $@
+
+nma-marshal-main.c: nma-marshal.c nma-marshal.h
+
diff --git a/marshallers/nma-marshal-main.c b/marshallers/nma-marshal-main.c
new file mode 100644
index 0000000..44af87a
--- /dev/null
+++ b/marshallers/nma-marshal-main.c
@@ -0,0 +1,2 @@
+#include "nma-marshal.h"
+#include "nma-marshal.c"
diff --git a/marshallers/nma-marshal.list b/marshallers/nma-marshal.list
new file mode 100644
index 0000000..4cf3524
--- /dev/null
+++ b/marshallers/nma-marshal.list
@@ -0,0 +1,7 @@
+VOID:POINTER
+VOID:STRING,STRING,STRING
+VOID:STRING,POINTER,BOOLEAN,POINTER,POINTER
+VOID:OBJECT,STRING,POINTER,BOOLEAN,POINTER,POINTER
+VOID:POINTER,POINTER
+VOID:INT,POINTER
+
diff --git a/network-manager-netbook.css.in b/network-manager-netbook.css.in
new file mode 100644
index 0000000..1b641b1
--- /dev/null
+++ b/network-manager-netbook.css.in
@@ -0,0 +1,123 @@
+MnbToolbarButton {
+ background-color: #fff0;
+}
+
+MnbToolbarButton:checked {
+ border-image: url("file://@pkgdatadir@/icons/toolbar-button-active.png") 0 stretch;
+}
+
+MnbToolbarButton:hover, MnbToolbarButton:active {
+ border-image: url("file://@pkgdatadir@/icons/toolbar-button-hover.png") 0 stretch;
+}
+
+MnbToolbarButton#no-network {
+ background-image: url("file://@pkgdatadir@/icons/nm-no-connection-normal.png");
+}
+
+MnbToolbarButton#no-network:hover, MnbToolbarButton#no-network:active, MnbToolbarButton#no-network:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-no-connection-active.png");
+}
+
+MnbToolbarButton#device-wired {
+ background-image: url("file://@pkgdatadir@/icons/nm-device-wired-normal.png");
+}
+
+MnbToolbarButton#device-wired:hover, MnbToolbarButton#device-wired:active, MnbToolbarButton#device-wired:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-device-wired-active.png");
+}
+
+MnbToolbarButton#signal-100 {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-100-normal.png");
+}
+
+MnbToolbarButton#signal-100:hover, MnbToolbarButton#signal-100:active, MnbToolbarButton#signal-100:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-100-active.png");
+}
+
+MnbToolbarButton#signal-75 {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-75-normal.png");
+}
+
+MnbToolbarButton#signal-75:hover, MnbToolbarButton#signal-75:active, MnbToolbarButton#signal-75:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-75-active.png");
+}
+
+MnbToolbarButton#signal-50 {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-50-normal.png");
+}
+
+MnbToolbarButton#signal-50:hover, MnbToolbarButton#signal-50:active, MnbToolbarButton#signal-50:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-50-active.png");
+}
+
+MnbToolbarButton#signal-25 {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-25-normal.png");
+}
+
+MnbToolbarButton#signal-25:hover, MnbToolbarButton#signal-25:active, MnbToolbarButton#signal-25:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-25-active.png");
+}
+
+MnbToolbarButton#signal-00 {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-00-normal.png");
+}
+
+MnbToolbarButton#signal-00:hover, MnbToolbarButton#signal-00:active, MnbToolbarButton#signal-00:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-signal-00-active.png");
+}
+
+MnbToolbarButton#device-wwan {
+ background-image: url("file://@pkgdatadir@/icons/nm-device-wwan-normal.png");
+}
+
+MnbToolbarButton#device-wwan:hover, MnbToolbarButton#device-wwan:active, MnbToolbarButton#device-wwan:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-device-wwan-active.png");
+}
+
+MnbToolbarButton#progress-01 {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-01-normal.png");
+}
+
+MnbToolbarButton#progress-01:hover, MnbToolbarButton#progress-01:active, MnbToolbarButton#progress-01:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-01-active.png");
+}
+
+MnbToolbarButton#progress-02 {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-02-normal.png");
+}
+
+MnbToolbarButton#progress-02:hover, MnbToolbarButton#progress-02:active, MnbToolbarButton#progress-02:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-02-active.png");
+}
+
+MnbToolbarButton#progress-03 {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-03-normal.png");
+}
+
+MnbToolbarButton#progress-03:hover, MnbToolbarButton#progress-03:active, MnbToolbarButton#progress-03:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-03-active.png");
+}
+
+MnbToolbarButton#progress-04 {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-04-normal.png");
+}
+
+MnbToolbarButton#progress-04:hover, MnbToolbarButton#progress-04:active, MnbToolbarButton#progress-04:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-04-active.png");
+}
+
+MnbToolbarButton#progress-05 {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-05-normal.png");
+}
+
+MnbToolbarButton#progress-05:hover, MnbToolbarButton#progress-05:active, MnbToolbarButton#progress-05:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-05-active.png");
+}
+
+MnbToolbarButton#progress-06 {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-06-normal.png");
+}
+
+MnbToolbarButton#progress-06:hover, MnbToolbarButton#progress-06:active, MnbToolbarButton#progress-06:checked {
+ background-image: url("file://@pkgdatadir@/icons/nm-progress-working-06-active.png");
+}
diff --git a/network-manager-netbook.desktop.in b/network-manager-netbook.desktop.in
new file mode 100644
index 0000000..7e38d2f
--- /dev/null
+++ b/network-manager-netbook.desktop.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+_Name=network-manager-netbook
+_Comment=Control your network connections
+Icon=nm-device-wireless
+Exec= libexecdir@/network-manager-netbook
+Terminal=false
+Type=Application
+OnlyShowIn=MOBLIN;
diff --git a/network-manager-netbook.doap b/network-manager-netbook.doap
new file mode 100644
index 0000000..c784353
--- /dev/null
+++ b/network-manager-netbook.doap
@@ -0,0 +1,17 @@
+<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
+ xmlns:foaf="http://xmlns.com/foaf/0.1/"
+ xmlns:gnome="http://api.gnome.org/doap-extensions#"
+ xmlns="http://usefulinc.com/ns/doap#">
+
+ <name xml:lang="en">network-manager-netbook</name>
+ <shortdesc xml:lang="en">NetworkManager frontent for netbooks</shortdesc>
+
+ <maintainer>
+ <foaf:Person>
+ <foaf:name>Tambet Ingo</foaf:name>
+ <foaf:mbox rdf:resource="mailto:tambet gmail com" />
+ <gnome:userid>tambeti</gnome:userid>
+ </foaf:Person>
+ </maintainer>
+</Project>
diff --git a/org.moblin.UX.Shell.Panels.network.service.in b/org.moblin.UX.Shell.Panels.network.service.in
new file mode 100644
index 0000000..c811bfd
--- /dev/null
+++ b/org.moblin.UX.Shell.Panels.network.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.moblin.UX.Shell.Panels.network
+Exec= libexecdir@/network-manager-netbook
diff --git a/po/.gitignore b/po/.gitignore
new file mode 100644
index 0000000..746eeb4
--- /dev/null
+++ b/po/.gitignore
@@ -0,0 +1,2 @@
+*.gmo
+POTFILES
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..9db0c41
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,36 @@
+# please keep this list sorted alphabetically
+#
+ar
+bg
+cs
+da
+de
+el
+es
+et
+eu
+fi
+fr
+gl
+hu
+gu
+id
+it
+ja
+ko
+lt
+lv
+nb
+nl
+pa
+pl
+pt
+pt_BR
+ru
+sl
+sv
+tr
+uk
+zh_CN
+zh_HK
+zh_TW
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..cc22b24
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,39 @@
+network-manager-netbook.desktop.in
+gnome-bluetooth/network-manager-applet.c
+libnm-gtk/nm-mobile-providers.c
+libnm-gtk/nm-bt-item.c
+libnm-gtk/nm-connection-item.c
+libnm-gtk/nm-device-item.c
+libnm-gtk/nm-ethernet-item.c
+libnm-gtk/nm-gsm-pin-request-item.c
+libnm-gtk/nm-wifi-item.c
+libnm-gtk/nm-gsm-item.c
+libnm-gtk/nm-cdma-item.c
+libnm-gtk/wireless-dialog.c
+[type: gettext/glade]libnm-gtk/wireless-security.ui
+[type: gettext/glade]libnm-gtk/wireless-security/ca-nag-dialog.ui
+[type: gettext/glade]libnm-gtk/wireless-security/dynamic-wep.ui
+[type: gettext/glade]libnm-gtk/wireless-security/eap-leap.ui
+[type: gettext/glade]libnm-gtk/wireless-security/eap-peap.ui
+[type: gettext/glade]libnm-gtk/wireless-security/eap-simple.ui
+[type: gettext/glade]libnm-gtk/wireless-security/eap-tls.ui
+[type: gettext/glade]libnm-gtk/wireless-security/eap-ttls.ui
+[type: gettext/glade]libnm-gtk/wireless-security/leap.ui
+[type: gettext/glade]libnm-gtk/wireless-security/wep-key.ui
+[type: gettext/glade]libnm-gtk/wireless-security/wpa-eap.ui
+[type: gettext/glade]libnm-gtk/wireless-security/wpa-psk.ui
+libnm-gtk/wireless-security/eap-method-peap.c
+libnm-gtk/wireless-security/eap-method-tls.c
+libnm-gtk/wireless-security/eap-method-ttls.c
+libnm-gtk/wireless-security/eap-method.c
+libnm-gtk/wireless-security/wireless-security.c
+src/gtkinfobar.c
+src/nmn-list.c
+src/nmn-applet.c
+src/main.c
+src/nmn-network-renderer.c
+src/nmn-panel-client.c
+src/nmn-gsm-pin-request-renderer.c
+src/nmn-item-renderer.c
+src/nmn-connection-details.c
+src/nmn-new-connection.c
diff --git a/po/ar.po b/po/ar.po
new file mode 100644
index 0000000..7094708
--- /dev/null
+++ b/po/ar.po
@@ -0,0 +1,555 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-27 16:37+0200\n"
+"PO-Revision-Date: 2009-09-24 11:55\n"
+"Last-Translator: Novell Language <language novell com>\n"
+"Language-Team: Novell Language <language novell com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr ""
+
+#: ../libnm-gtk/nm-ethernet-item.c:88
+msgid "802.1x"
+msgstr ""
+
+#: ../libnm-gtk/nm-wifi-item.c:60 ../src/nmn-list.c:105
+#: ../src/nmn-applet.c:337 ../src/nmn-new-connection.c:636
+msgid "WiFi"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-item.c:36 ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:115 ../src/nmn-applet.c:349
+#: ../src/nmn-new-connection.c:661
+msgid "3G"
+msgstr ""
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "بÙ?ا"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Ù?Ù?ØªØ§Ø 40/128 Ù?Ù? WEP"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "عبارة Ù?رÙ?ر 128 بت Ù?Ù?Ù? WEP"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "WEP دÙ?Ù?اÙ?Ù?Ù?Ù? (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "Ø¥Ù?_شاء"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr "Ù?Ù?Ù?ات اÙ?سر Ø£Ù? Ù?Ù?اتÙ?Ø Ø§Ù?تشÙ?Ù?ر Ù?Ø·Ù?Ù?بة Ù?Ù?Ù?صÙ?Ù? Ø¥Ù?Ù? اÙ?شبÙ?Ø© اÙ?Ù?اسÙ?Ù?Ù?Ø© '%s'."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Ù?Ø·Ù?Ù?ب Ù?صادÙ?Ø© اÙ?شبÙ?Ø© اÙ?Ù?اسÙ?Ù?Ù?Ø©"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Ù?Ø·Ù?Ù?ب اÙ?Ù?صادÙ?Ø© Ù?Ù? Ù?Ù?بÙ? اÙ?شبÙ?Ø© اÙ?Ù?اسÙ?Ù?Ù?Ø©"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Ø¥Ù?شاء شبÙ?Ø© Ù?اسÙ?Ù?Ù?Ø© جدÙ?دة"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "شبÙ?Ø© Ù?اسÙ?Ù?Ù?Ø© جدÙ?دة"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "أدخÙ? اسÙ?Ù?ا Ù?Ù?شبÙ?Ø© اÙ?Ù?اسÙ?Ù?Ù?Ø© اÙ?تÙ? ترÙ?د Ø¥Ù?شاءÙ?ا."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "اتصاÙ? باÙ?شبÙ?ات اÙ?Ù?اسÙ?Ù?Ù?Ø© اÙ?Ù?Ø®Ù?Ù?Ø©"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "شبÙ?Ø© Ù?اسÙ?Ù?Ù?Ø© Ù?Ø®Ù?Ù?Ø©"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"أدخÙ? اÙ?اسÙ? Ù?تÙ?اصÙ?Ù? Ø£Ù?اÙ? اÙ?شبÙ?Ø© اÙ?Ù?اسÙ?Ù?Ù?Ø© اÙ?Ù?Ø®Ù?Ù?Ø© اÙ?تÙ? ترÙ?د اÙ?اتصاÙ? بÙ?ا."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "ات_صاÙ?"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "اÙ?اتصاÙ?:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "شبÙ?Ø© Ù?اسÙ?Ù?Ù?Ø© أخرÙ?..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Ù?_ØÙ?Ù? Ù?اسÙ?Ù?Ù?:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "ا_سÙ? اÙ?شبÙ?Ø©:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "Ø£Ù?_اÙ? اÙ?شبÙ?Ø© اÙ?Ù?اسÙ?Ù?Ù?Ø©:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Ù?Ù? Ù?تÙ? اختÙ?ار Ø£Ù? Ø´Ù?ادة جÙ?Ø© إصدا "
+"اÙ?Ø´Ù?ادات</span>\n"
+"\n"
+"Ù?د Ù?ؤدÙ? عدÙ? استخداÙ? Ø´Ù?ادة جÙ?Ø© إصدار اÙ?Ø´Ù?ادات Ø¥Ù?Ù? عÙ?Ù?Ù?ات اتصاÙ? بشبÙ?ات Ù?اسÙ?Ù?Ù?Ø© "
+"تاÙ?Ù?Ø© Ù?غÙ?ر Ø¢Ù?Ù?Ø©. Ù?Ù? ترÙ?د اختÙ?ار Ø´Ù?ادة جÙ?Ø© إصدار Ø´Ù?اداتØ?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "اختر Ø´Ù?ادة CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "عدÙ? إظÙ?ار اÙ?تØØ°Ù?ر Ù?رة أخرÙ?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "تجاÙ?Ù?"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Ù?صادÙ?Ø©:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Ù?Ù?Ù?Ø© اÙ?سر:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "إظÙ?ار Ù?Ù?Ù?Ø© اÙ?سر"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "اسÙ? اÙ?Ù?ستخدÙ?:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Ù?Ù?Ù?Ø© Ù?جÙ?Ù?Ù?Ø©:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Ø´Ù?ادة CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Ù?صادÙ?Ø© داخÙ?Ù?Ø©:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "إصدار PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "اÙ?Ù?Ù?Ù?Ø©:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Ù?Ù?Ù?Ø© سر اÙ?Ù?Ù?ØªØ§Ø Ø§Ù?خاص:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "اÙ?Ù?Ù?ØªØ§Ø Ø§Ù?خاص:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Ø´Ù?ادة اÙ?Ù?ستخدÙ?:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "اÙ?Ù?Ù?تاØ:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "إظÙ?ار اÙ?Ù?Ù?تاØ"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Ù?Ù?رس WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "اÙ?Ù?Ù?ع:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "اختÙ?ار Ø´Ù?ادة جÙ?Ø© إصدار اÙ?Ø´Ù?ادات..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "اختÙ?ار Ø´Ù?ادة شخصÙ?Ø©..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Ù?تÙ? اÙ?Ø¢Ù? اختÙ?ار Ù?Ù?تاØÙ? اÙ?خاص..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "اÙ?Ù?Ù?اتÙ?Ø Ø§Ù?خاصة DER Ø£Ù? PEM Ø£Ù? PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "اÙ?Ø´Ù?ادتاÙ? DER Ø£Ù? PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "TLS Ù?Ù?Ù?Ù?"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "EAP Ù?ØÙ?Ù? (PEAP)"
+
+#: ../src/nmn-list.c:68
+msgid " and "
+msgstr ""
+
+#: ../src/nmn-list.c:79
+msgid "Sorry, we can't find any networks."
+msgstr ""
+
+#: ../src/nmn-list.c:82
+msgid " You could try disabling Offline mode."
+msgstr ""
+
+#: ../src/nmn-list.c:102
+msgid " You could try turning on "
+msgstr ""
+
+#: ../src/nmn-list.c:110 ../src/nmn-applet.c:343
+msgid "Wired"
+msgstr ""
+
+#: ../src/nmn-applet.c:304
+#, fuzzy
+msgid "Add new connection"
+msgstr "إضاÙ?Ø© اتصاÙ? جدÙ?د"
+
+#: ../src/nmn-applet.c:310
+#, fuzzy
+msgid "Networks"
+msgstr "ا_سÙ? اÙ?شبÙ?Ø©:"
+
+#: ../src/nmn-applet.c:355
+msgid "WiMAX"
+msgstr ""
+
+#: ../src/nmn-applet.c:362
+msgid "Bluetooth"
+msgstr ""
+
+#: ../src/nmn-applet.c:376
+msgid "Offline mode"
+msgstr ""
+
+#: ../src/nmn-applet.c:382
+#, fuzzy
+msgid "This will disable all your connections"
+msgstr "سÙ?ؤدÙ? Ù?ذا Ø¥Ù?Ù? تعطÙ?Ù? Ù?اÙ?Ø© اÙ?اتصاÙ?ات اÙ?Ù?اسÙ?Ù?Ù?Ø©"
+
+#: ../src/main.c:54
+msgid "Run in standalone mode"
+msgstr ""
+
+#: ../src/main.c:61
+msgid "NetworkManager Netbook"
+msgstr ""
+
+#: ../src/main.c:62
+msgid "- NetworkManager Netbook"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:67
+#, fuzzy
+msgid "network"
+msgstr "شبÙ?Ø© Ù?Ø®Ù?Ù?Ø©"
+
+#: ../src/nmn-panel-client.c:181
+#, fuzzy
+msgid "Network connected"
+msgstr "غÙ?ر Ù?تصÙ?"
+
+#: ../src/nmn-panel-client.c:185
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:188
+#, c-format
+msgid "You're now connected to %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:190
+msgid "You're now connected to network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:192
+#, fuzzy
+msgid "Network lost"
+msgstr "ا_سÙ? اÙ?شبÙ?Ø©:"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:199
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:201
+msgid "Sorry, we've lost your connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:236
+#, c-format
+msgid "networks - not connected"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:239
+#, fuzzy, c-format
+msgid "networks - connecting"
+msgstr "إضاÙ?Ø© اتصاÙ? جدÙ?د"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - %s - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:249
+#, c-format
+msgid "networks - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:251
+#, fuzzy
+msgid "networks - connected"
+msgstr "غÙ?ر Ù?تصÙ?"
+
+#: ../src/nmn-item-renderer.c:140
+msgid "Connected"
+msgstr "Ù?تصÙ?"
+
+#: ../src/nmn-item-renderer.c:141 ../src/nmn-item-renderer.c:145
+msgid "Disconnect"
+msgstr "Ù?طع اÙ?اتصاÙ?"
+
+#: ../src/nmn-item-renderer.c:144
+msgid "Connecting..."
+msgstr "Ù?تÙ? اÙ?Ø¢Ù? اÙ?اتصاÙ?..."
+
+#: ../src/nmn-item-renderer.c:148
+msgid "Disconnected"
+msgstr "غÙ?ر Ù?تصÙ?"
+
+#: ../src/nmn-item-renderer.c:149
+msgid "Connect"
+msgstr "اتصاÙ?"
+
+#: ../src/nmn-item-renderer.c:263
+msgid "Really remove?"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:279
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+
+#: ../src/nmn-connection-details.c:104
+msgid "(none)"
+msgstr "(بÙ?ا)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:475
+msgid "Connect by:"
+msgstr "اتصاÙ? بÙ?اسطة:"
+
+#: ../src/nmn-connection-details.c:478
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:483
+msgid "Manual"
+msgstr "Ù?دÙ?Ù?"
+
+#: ../src/nmn-connection-details.c:488
+msgid "Link Local"
+msgstr "ارتباط Ù?ØÙ?Ù?"
+
+#. Address
+#: ../src/nmn-connection-details.c:496
+msgid "IP Address:"
+msgstr "عÙ?Ù?اÙ? IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:505
+msgid "Subnet mask:"
+msgstr "Ù?Ù?اع اÙ?شبÙ?Ø© اÙ?Ù?رعÙ?Ø©:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:514
+msgid "Router:"
+msgstr "Ù?Ù?جÙ?:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:523
+msgid "DNS:"
+msgstr "DNS:"
+
+#: ../src/nmn-new-connection.c:247
+msgid "3G disabled"
+msgstr "تÙ? تعطÙ?Ù? 3G"
+
+#: ../src/nmn-new-connection.c:252
+msgid "Internal 3G modem and SIM card detected"
+msgstr "تÙ? اÙ?تشاÙ? Ù?Ù?دÙ? 3G داخÙ?Ù? Ù?بطاÙ?Ø© SIM"
+
+#: ../src/nmn-new-connection.c:254
+msgid "No modems detected"
+msgstr "Ù?Ù? Ù?تÙ? اÙ?تشاÙ? أجÙ?زة Ù?Ù?دÙ?"
+
+#: ../src/nmn-new-connection.c:611
+msgid "Add a new connection"
+msgstr "إضاÙ?Ø© اتصاÙ? جدÙ?د"
+
+#: ../src/nmn-new-connection.c:631
+msgid "Hidden network"
+msgstr "شبÙ?Ø© Ù?Ø®Ù?Ù?Ø©"
+
+#: ../src/nmn-new-connection.c:657
+msgid "Save connection"
+msgstr "ØÙ?ظ اÙ?اتصاÙ?"
+
+#: ../src/nmn-new-connection.c:666
+msgid "Return to Networking"
+msgstr "اÙ?عÙ?دة Ø¥Ù?Ù? اÙ?شبÙ?ات"
+
+#: ../src/nmn-mobile-providers.c:504
+msgid "Default"
+msgstr "اÙ?تراضÙ?"
+
+#~ msgid "Unavailable"
+#~ msgstr "غÙ?ر Ù?تاØ"
+
+#~ msgid "On"
+#~ msgstr "تشغÙ?Ù?"
+
+#~ msgid "Off"
+#~ msgstr "Ø¥Ù?Ù?اÙ? اÙ?تشغÙ?Ù?"
+
+#~ msgid "Advanced"
+#~ msgstr "Ù?تÙ?دÙ?"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>Ù?ضع اÙ?Ø·Ù?راÙ?</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>سÙ?Ù?Ù?</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>إضاÙ?Ø© اتصاÙ? جدÙ?د</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>اÙ?شبÙ?ات</b></big>"
diff --git a/po/bg.po b/po/bg.po
new file mode 100644
index 0000000..e18c702
--- /dev/null
+++ b/po/bg.po
@@ -0,0 +1,662 @@
+# Bulgarian translation of network-manager-netbook po-file.
+# Copyright (C) 2010 Krasimir Chonov <mk2616 abv bg>.
+# This file is distributed under the same license as the network-manager-netbook package.
+# Krasimir Chonov <mk2616 abv bg>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook master\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-03-11 22:19+0200\n"
+"PO-Revision-Date: 2010-03-11 10:53+0200\n"
+"Last-Translator: Krasimir Chonov <mk2616 abv bg>\n"
+"Language-Team: Bulgarian <dict fsa-bg org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "УпÑ?авление на мÑ?ежовиÑ?е вÑ?Ñ?зки"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Ð?зползвайÑ?е Ð?нÑ?еÑ?неÑ? Ñ?Ñ?ез ваÑ?иÑ? мобилен Ñ?елеÑ?он"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Ð?аÑ?ални наÑ?Ñ?Ñ?ойки"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Ð?е може да Ñ?е изÑ?Ñ?ие вÑ?Ñ?зкаÑ?а: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Ð?е може да Ñ?е акÑ?ивиÑ?а: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Ð?е може да Ñ?е деакÑ?ивиÑ?а: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "жиÑ?на"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Ð?Ñ?клÑ?Ñ?ванеÑ?о Ñ? PIN е неÑ?Ñ?пеÑ?но: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Ð?аклÑ?Ñ?ен GSM апаÑ?аÑ?"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Ð?ез"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "40/128 биÑ?ов клÑ?Ñ? за WEP"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "128 биÑ?ова паÑ?ола за WEP"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Ð?инамиÑ?ен WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "ЧаÑ?Ñ?на WPA & WPA2"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "Ð?оÑ?поÑ?аÑ?ивна WPA & WPA2"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "С_Ñ?здаване"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Ð?еобÑ?одими Ñ?а паÑ?оли или Ñ?иÑ?Ñ?иÑ?ани клÑ?Ñ?ове за доÑ?Ñ?Ñ?п до безжиÑ?наÑ?а мÑ?ежа â??%"
+"sâ??."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Ð?еобÑ?одимо е иденÑ?иÑ?иÑ?иÑ?ане"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Ð?еобÑ?одимо е иденÑ?иÑ?иÑ?иÑ?ане за безжиÑ?на мÑ?ежа"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "СÑ?здаване на нова безжиÑ?на мÑ?ежа"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Ð?ова безжиÑ?на мÑ?ежа"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Ð?Ñ?ведеÑ?е име на безжиÑ?наÑ?а мÑ?ежа, коÑ?Ñ?о иÑ?каÑ?е да Ñ?Ñ?здадеÑ?е."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "СвÑ?Ñ?зване кÑ?м Ñ?кÑ?иÑ?а безжиÑ?на мÑ?ежа"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "СкÑ?иÑ?а безжиÑ?на мÑ?ежа"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Ð?Ñ?ведеÑ?е данниÑ?е на Ñ?кÑ?иÑ?аÑ?а безжиÑ?на мÑ?ежа, кÑ?м коÑ?Ñ?о иÑ?каÑ?е да Ñ?е Ñ?вÑ?Ñ?жеÑ?е."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "С_вÑ?Ñ?зване"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Ð?Ñ?Ñ?зка:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Ð?Ñ?Ñ?га безжиÑ?на мÑ?ежаâ?¦"
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Ð?езжиÑ?ен _адапÑ?еÑ?:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Ð?ме на мÑ?ежа:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Ð?аÑ?иÑ?а:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Ð?е е избÑ?ан Ñ?еÑ?Ñ?иÑ?икаÑ? на "
+"Ñ?доÑ?Ñ?овеÑ?иÑ?елÑ?</span>\n"
+"Ð?е Ñ?е използва Ñ?еÑ?Ñ?иÑ?икаÑ? на Ñ?доÑ?Ñ?овеÑ?иÑ?елÑ? и поÑ?ади Ñ?ази пÑ?иÑ?ина можеÑ?е да "
+"попаднеÑ?е на неÑ?игÑ?Ñ?ни или злонамеÑ?ени безжиÑ?ни мÑ?ежи. Ð?елаеÑ?е ли да "
+"избеÑ?еÑ?е Ñ?еÑ?Ñ?иÑ?икаÑ? на Ñ?доÑ?Ñ?овеÑ?иÑ?елÑ??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Ð?збоÑ? на Ñ?еÑ?Ñ?иÑ?икаÑ? на Ñ?доÑ?Ñ?овеÑ?иÑ?ел"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Ð?ез Ñ?ледваÑ?о пÑ?едÑ?пÑ?еждение"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ð?гноÑ?иÑ?ане"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Ð?денÑ?иÑ?иÑ?иÑ?ане:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Ð?аÑ?ола:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Ð?оказване на паÑ?олаÑ?а"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Ð?оÑ?Ñ?ебиÑ?ел:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Ð?нонимен:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "СеÑ?Ñ?иÑ?икаÑ? на Ñ?доÑ?Ñ?овеÑ?иÑ?ел:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Ð?Ñ?Ñ?Ñ?еÑ?но иденÑ?иÑ?иÑ?иÑ?ане:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Ð?еÑ?Ñ?иÑ? на PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "СамолиÑ?ноÑ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Ð?аÑ?ола на Ñ?аÑ?Ñ?ниÑ? клÑ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "ЧаÑ?Ñ?ен клÑ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Ð?оÑ?Ñ?ебиÑ?елÑ?ки Ñ?еÑ?Ñ?иÑ?икаÑ?:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Ð?лÑ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Ð?оказване на клÑ?Ñ?а"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Ð?ндекÑ? в WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Ð?ид:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Ð?збоÑ? на Ñ?еÑ?Ñ?иÑ?икаÑ? на Ñ?доÑ?Ñ?овеÑ?иÑ?елÑ?â?¦"
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Ð?збоÑ? на лиÑ?ен Ñ?еÑ?Ñ?иÑ?икаÑ?â?¦"
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Ð?збоÑ? на Ñ?аÑ?Ñ?ен клÑ?Ñ?â?¦"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "ЧаÑ?Ñ?ни клÑ?Ñ?ове â?? DER, PEM или PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "СеÑ?Ñ?иÑ?икаÑ?и â?? DER или PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "ТÑ?нел Ñ?Ñ?ез TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Ð?аÑ?иÑ?ен EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Ð?ид Ñ?Ñ?обÑ?ение"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Ð?идÑ?Ñ? на Ñ?Ñ?обÑ?ениеÑ?о"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Рамка на облаÑ?Ñ?Ñ?а Ñ?Ñ?Ñ? Ñ?Ñ?дÑ?Ñ?жание"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "ШиÑ?оÑ?ина на Ñ?амкаÑ?а"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "РазÑ?Ñ?оÑ?ние в облаÑ?Ñ?Ñ?а за дейÑ?Ñ?вие"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "РазÑ?Ñ?оÑ?ние междÑ? елеменÑ?иÑ?е"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "РазÑ?Ñ?оÑ?ние междÑ? бÑ?Ñ?ониÑ?е"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "РазÑ?Ñ?оÑ?ние междÑ? бÑ?Ñ?ониÑ?е"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Рамка на облаÑ?Ñ? за дейÑ?Ñ?вие"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "ШиÑ?оÑ?ина на Ñ?амкаÑ?а около облаÑ?Ñ?Ñ?а за дейÑ?Ñ?вие"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " и "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Ð?е могаÑ? да Ñ?е намеÑ?Ñ?Ñ? никакви мÑ?ежи."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Ð?ожеÑ?е да пÑ?обваÑ?е да изклÑ?Ñ?иÑ?е Ñ?ежима â??Ð?зклÑ?Ñ?енâ??."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Ð?ожеÑ?е да пÑ?обваÑ?е да вклÑ?Ñ?иÑ?е "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Ð?иÑ?на"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Ð?обавÑ?не на нова вÑ?Ñ?зка"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Ð?Ñ?ежи"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Режим â??Ð?зклÑ?Ñ?енâ??"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Това Ñ?е изклÑ?Ñ?и вÑ?иÑ?ки вÑ?Ñ?зки"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Ð?зпÑ?лнÑ?ване в Ñ?амоÑ?Ñ?оÑ?Ñ?елен Ñ?ежим"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Ð?зпÑ?лнÑ?ване в Ñ?ежим Ñ?абоÑ?на Ñ?Ñ?анÑ?иÑ?"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "â?? NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Ñ?вÑ?Ñ?зана"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Ð?Ñ?екÑ?Ñ?ване"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "СвÑ?Ñ?зване"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Ð?Ñ?казване"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Ð?Ñ?екÑ?Ñ?наÑ?а вÑ?Ñ?зка"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "СвÑ?Ñ?зване"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Ð?алиÑ?на"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Ð?е може да Ñ?е обнови вÑ?Ñ?зкаÑ?а: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Ð?аиÑ?Ñ?ина ли да Ñ?е пÑ?емаÑ?не?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Ð?е, запазване"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Ð?а, изÑ?Ñ?иване"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Ð?Ñ?каÑ?е ли вÑ?Ñ?зкаÑ?а по %2$s кÑ?м мÑ?ежаÑ?а â??%1$sâ?? да бÑ?де\n"
+"пÑ?емаÑ?наÑ?а? Това Ñ?е пÑ?емаÑ?не паÑ?олаÑ?а и веÑ?е нÑ?ма да\n"
+"можеÑ?е да Ñ?е Ñ?вÑ?Ñ?зваÑ?е авÑ?омаÑ?иÑ?но кÑ?м â??%3$sâ??."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "РазÑ?иÑ?ени"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Ð?Ñ?емаÑ?ване"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "мÑ?ежа"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "СвÑ?Ñ?зана мÑ?ежа"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Сега Ñ?Ñ?е Ñ?вÑ?Ñ?зани кÑ?м мÑ?ежаÑ?а â??%sâ?? по %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Сега Ñ?Ñ?е Ñ?вÑ?Ñ?зани кÑ?м мÑ?ежаÑ?а â??%sâ??"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Сега Ñ?Ñ?е Ñ?вÑ?Ñ?зани кÑ?м мÑ?ежа"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Ð?Ñ?ежаÑ?а е изгÑ?бена"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Ð?Ñ?Ñ?зкаÑ?а кÑ?м â??%2$sâ?? по %1$s беÑ?е изгÑ?бена"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Ð?Ñ?Ñ?зкаÑ?а кÑ?м â??%sâ?? беÑ?е изгÑ?бена"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Ð?Ñ?Ñ?зкаÑ?а беÑ?е изгÑ?бена"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "мÑ?ежи â?? без вÑ?Ñ?зка"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "мÑ?ежи â?? Ñ?вÑ?Ñ?зване"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "мÑ?ежи â?? â??%sâ??, по %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "мÑ?ежи â?? â??%sâ??"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "мÑ?ежи â?? Ñ?вÑ?Ñ?зана"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Ð?Ñ?клÑ?Ñ?ване"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Ð?ез PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(без)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "СвÑ?Ñ?зване Ñ?Ñ?ез:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Ð Ñ?Ñ?но"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Ð?окална вÑ?Ñ?зка"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP адÑ?еÑ?:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "ШлÑ?з:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Ð?аÑ?Ñ?Ñ?Ñ?Ñ?изаÑ?оÑ?:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Ð?аÑ?иÑ?Ñ? MAC адÑ?еÑ?:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G е изклÑ?Ñ?ен"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "Ð?одемÑ?Ñ? за 3G е заклÑ?Ñ?ен"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Ð?Ñ?кÑ?иÑ?и Ñ?а вгÑ?аден модем за 3G и SIM каÑ?Ñ?а"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Ð?е Ñ?а намеÑ?ени модеми"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Ð?обавÑ?не на нова вÑ?Ñ?зка"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "СкÑ?иÑ?а мÑ?ежа"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Ð?апазване"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Ð?бÑ?аÑ?но кÑ?м наÑ?Ñ?Ñ?ойкиÑ?е"
diff --git a/po/cs.po b/po/cs.po
new file mode 100644
index 0000000..5e70201
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,664 @@
+# Czech translation of network-manager-netbook.
+# Copyright (C) 2010 the author(s) of network-manager-netbook.
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg.
+# This file is distributed under the same license as the package network-manager-netbook.
+# Marek Ä?ernocký <marek manet cz>, 2009, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-03-07 15:49+0000\n"
+"PO-Revision-Date: 2010-03-07 21:08+0100\n"
+"Last-Translator: Marek Ä?ernocký <marek manet cz>\n"
+"Language-Team: Czech <gnome-cs-list gnome org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Ovládejte svá sÃÅ¥ová pÅ?ipojenÃ"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "PÅ?ipojit se k Internetu pomocà svého mobilnÃho telefonu"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "VýchozÃ"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Nelze smazat pÅ?ipojenÃ: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Nelze aktivovat zaÅ?ÃzenÃ: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Nelze deaktivovat zaÅ?ÃzenÃ: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "drátová"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Odemknutà pomocà kódu PIN selhalo: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Zamknuté zaÅ?Ãzenà GSM"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Žádný"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP â?? 40/128bitový klÃÄ?"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP â?? 128bitové heslo"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamický WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA a WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA a WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "_VytvoÅ?it"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Pro pÅ?Ãstup k bezdrátové sÃti %s jsou požadována hesla nebo Å¡ifrovacà klÃÄ?e."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Je požadováno ovÄ?Å?enà bezdrátové sÃtÄ?"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Bezdrátová sÃÅ¥ požaduje ovÄ?Å?enÃ"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "VytvoÅ?it novou bezdrátovou sÃÅ¥"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nová bezdrátová sÃÅ¥"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Zadejte název bezdrátové sÃtÄ?, kterou chcete vytvoÅ?it."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "PÅ?ipojit ke skryté bezdrátové sÃti"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Skrytá bezdrátová sÃÅ¥"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Zadejte název a podrobnosti o zabezpeÄ?enà skryté bezdrátové sÃtÄ?, ke které "
+"se chcete pÅ?ipojit."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_PÅ?ipojit"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "PÅ?ipojenÃ:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Jiná bezdrátová sÃÅ¥â?¦"
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Bezdrátový _adaptér:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Název sÃtÄ?:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_ZabezpeÄ?enà bezdrátové sÃtÄ?:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Nebyl zvolen žádný certifikát "
+"CertifikaÄ?nà autority</span>\n"
+"\n"
+"PÅ?ipojenà bez certifikátu CertifikaÄ?nà autority (CA) může vést k pÅ?ipojenà k "
+"nezabezpeÄ?ené a tedy nebezpeÄ?né bezdrátové sÃti. Chcete zvolit certifikát "
+"CertifikaÄ?nà autority?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Zvolit certifikát CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Toto upozornÄ?nà již pÅ?ÃÅ¡tÄ? nezobrazovat"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorovat"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "OvÄ?Å?enÃ:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Heslo:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Zobrazit heslo"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Uživatelské jméno:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Anonymnà identita:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Certifikát CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "VnitÅ?nà ovÄ?Å?enÃ:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Verze PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identita:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Heslo soukrom̩ho kl̀?e:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Soukromý klÃÄ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Uživatelský certifikát:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "KlÃÄ?:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Zobrazit klÃÄ?"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Index WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Typ:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Zvolit certifikát CertifikaÄ?nà autorityâ?¦"
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Zvolit osobnà certifikát�"
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Zvolit soukromý klÃÄ?â?¦"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Soukrom̩ kl̀?e DER, PEM nebo PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "Certifikáty DER nebo PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunelované pÅ?ipojenà TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "ChránÄ?né pÅ?ipojenà EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Typ zprávy"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Typ zprávy"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "OhraniÄ?enà oblasti s obsahem"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Å ÃÅ?ka ohraniÄ?enà okolo oblasti s obsahem"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Rozestup oblastàs obsahem"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Rozestup mezi prvky oblasti"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Rozestup tlaÄ?Ãtek"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Mezery mezi tlaÄ?Ãtky"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "OhraniÄ?enà oblasti akcÃ"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Å ÃÅ?ka ohraniÄ?enà okolo oblasti akcÃ"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " a "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Bohužel nelze najÃt žádnou sÃÅ¥."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " MÄ?li byste zkusit vypnout režim off-line."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " MÄ?li byste zkusit zapnout "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Drátová"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "PÅ?idat nové pÅ?ipojenÃ"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "SÃtÄ?"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Režim off-line"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "TÃmto budou zakázána vÅ¡echna pÅ?ipojenÃ"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Spustit v samostatném režimu"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Spustit v režimu pracovnÃho prostÅ?edÃ"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "Správce sÃtÄ? pro netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- Správce sÃtÄ? pro netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "PÅ?ipojeno"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Odpojit"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "PÅ?ipojovánÃ"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Zrušit"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Odpojeno"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "PÅ?ipojit"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Dostupné"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Nelze aktualizovat pÅ?ipojenÃ: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "SkuteÄ?nÄ? odebrat?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Ne, uložit"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Ano, smazat"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Opravdu chcete odebrat sÃÅ¥ â??%sâ?? (%s)? TÃm se\n"
+"zapomene heslo a nebudete se moci nadále\n"
+"automaticky pÅ?ipojovat k â??%sâ??."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "ProkroÄ?ilé"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Odstranit pÅ?ipojenÃ"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "sÃÅ¥"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "SÃÅ¥ pÅ?ipojena"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Nynà jste pÅ?ipojeni k %s, sÃti %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Nynà jste pÅ?ipojeni k sÃti %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Nynà jste pÅ?ipojeni k sÃti"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "SÃÅ¥ ztracena"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "VaÅ¡e pÅ?ipojenà %s k %s bylo bohužel ztraceno"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "VaÅ¡e pÅ?ipojenà %s bylo bohužel ztraceno"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "VaÅ¡e pÅ?ipojenà bylo bohužel ztraceno"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "sÃtÄ? - nepÅ?ipojeno"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "sÃtÄ? - pÅ?ipojuje se"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "sÃtÄ? - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "sÃtÄ? - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "sÃtÄ? - pÅ?ipojeno"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Odemknout"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Vypnout PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(žádné)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "PÅ?ipojit pomocÃ:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "RuÄ?nÄ?"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "MÃstnà propojenÃ"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Adresa IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Maska podsÃtÄ?:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "SmÄ?rovaÄ?:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Vaše adresa MAC:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "PÅ?ipojenà 3G zakázáno"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "Modem 3G je zamknutý"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Rozpoznán internà modem 3G a karta SIM"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Nebyly rozpoznány žádné modemy"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "PÅ?idat nové pÅ?ipojenÃ"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Skrytá sÃÅ¥"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Uložit pÅ?ipojenÃ"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "ZpÄ?t do nastavenà sÃtÃ"
+
diff --git a/po/da.po b/po/da.po
new file mode 100644
index 0000000..57f4fb4
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,664 @@
+# Danish translation for network-manager-netbook.
+# Copyright (C) 2010 network-manager-netbook og nedenstående oversættere.
+# This file is distributed under the same license as the network-manager-netbook package.
+# Joe Hansen (joedalton2 yahoo dk), 2010.
+# kim Iskov <kimiskov gmail dk>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook master\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-09-27 00:38+0200\n"
+"PO-Revision-Date: 2010-09-27 00:37+0200\n"
+"Last-Translator: Kim Iskov <kimiskov gmail com>\n"
+"Language-Team: Danish <dansk dansk-gruppen dk>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Administrer dine netværksforbindelser"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Tilgå internettet ved hjælp af din mobiltelefon"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Standard"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Kunne ikke slette forbindelse: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Kunne ikke aktivere enhed: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Kunne ikke deaktivere enhed: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "trådløst"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "PIN-oplåsning mislykkedes: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "LÃ¥st GSM-enhed"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Ingen"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-bit-nøgle"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bit-adgangsfrase"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamisk WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "Personlig udgave af WPA & WPA2"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "_Opret"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Adgangskoder eller krypteringsnøgler er krævet for at tilgå det trådløse "
+"netværk '%s'."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Trådløs netværksgodkendelse krævet"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Godkendelse krævet af trådløst netværk"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Opret nyt trådløst netværk"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nyt trådløst netværk"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Indtast et navn for det trådløse netværk du ønsker at oprette."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Forbind til et skjult trådløst netværk"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Skjult trådløst netværk"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Indtast navnet og sikkerhedsdetaljerne på det skjulte trådløse netværk du "
+"ønsker at forbinde til."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_Forbind"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Forbindelse:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Andet trådløst netværk..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Trådløs _adapter:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Netværksnavn:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Trådløs sikkerhed:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Intet CA-certifikat er valgt</span>\n"
+"\n"
+"Den manglende brug af et CA-certifikat (Certificate Authority) kan resultere "
+"i forbindelser med usikre, uberegnelige trådløse netværk. �nsker du at vælge "
+"et CA-certifikat?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Vælg CA-certifikat"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Advar mig ikke igen"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorer"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Godkendelse:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Adgangskode:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Vis adgangskode"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Brugernavn:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Anonym identitet:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA-certifikat:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Indre godkendelse:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP-version:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identitet:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Adgangskode til privat nøgle:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Privat nøgle:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Brugercertifikat:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Nøgle:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Vis nøgle"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP-indeks:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Type:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Vælg et certificat for certifikatgodkendelse..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Vælg dit personlige certifikat..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Vælg din private nøgle..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Private nøgler for DER, PEM, eller PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "Certifikater for DER eller PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "TLS gennem tunnel"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Beskyttet EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Beskedtype"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Beskedens type"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Margen for indholdsområde"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Bredden på indholdsområdets margen"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Mellemrum for Indholdsområde"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Plads imellem elementer i området"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Knapplads"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Plads imellem knapper"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Grænse for handlingssområde"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Bredde på handlingsområdets margen"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " og "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Beklager, vi kan ikke finde nogle netværk."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Du kan prøve at slå offlinetilstand fra."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Du kan prøve at slå følgende til "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Kablet"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Tilføj ny forbindelse"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Netværk"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Offlinetilstand"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Dette vil slå alle dine forbindelser fra"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Kør i uafhængig tilstand"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Kør i skrivebordstilstand"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Forbundet"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Luk forbindelse"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Forbinder"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Afbryd"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Lukket ned"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Forbind"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Tilgængelig"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Kunne ikke opdatere forbindelse: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Er du sikker på at du vil fjerne?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Nej, gem"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Ja, slet"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Vil du fjerne netværket '%s' (%s)? Dette gør\n"
+"at adgangskoden ikke længere huskes og du vil\n"
+"ikke længere blive forbundet automatisk til '%s'."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Avanceret"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Fjern forbindelse"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "netværk"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Netværket er tilsluttet"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Du er nu forbundet til %s, et %s-netværk"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Du er nu forbundet til %s-netværket"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Du er nu forbundet til netværk"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Netværket er mistet"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Beklager, vi har tabt din %s-forbindelse til %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Beklager, vi har tabt din %s-forbindelse"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Beklager, vi har tabt din forbindelse"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "netværk - ikke forbundet"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "netværk - forbinder"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "netværk - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "netværk - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "netværk - forbundet"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "LÃ¥s op"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Slå PIN fra"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(ingen)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Forbind med:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manuelt"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Lokal henvisning"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP-adresse:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Undernetmaske:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Ruter:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Din MAC-adresse:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G slået fra"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G-modem er låst"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Internt 3G-modem og SIM-kort fundet"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Ingen modemmer fundet"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Tilføj en ny forbindelse"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Skjult netværk"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Gem forbindelse"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Tilbage til netværk"
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..aa1091b
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,698 @@
+# German translation of the NetworkManager netbook.
+# Copyright (C) 2005 Dan Williams <dcbw redhat com>
+# This file is distributed under the same license as the NetworkManager package.
+# Hendrik Brandt <heb gnome-de org>, 2004, 2005.
+# Frank Arnold <frank scirocco-5v-turbo de>, 2005.
+# Hendrik Richter <hendrikr gnome org>, 2006.
+# Jochen Skulj <jochen jochenskulj de>, 2008.
+# Tobias Wolf <towolf gmx net>, 2008.
+# Hauke Mehrtens <hauke hauke-m de>, 2008.
+# Mario Blättermann <mariobl gnome org>, 2008-2010.
+# Stefan Horning <stefan hornings de>, 2009.
+# Tambet Ingo <tambet novell com>, 2009.
+# Novell Language <language novell com>
+# Christian Kirbach <Christian Kirbach googlemail com>, 2009, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook 0.2\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-03-06 09:48+0000\n"
+"PO-Revision-Date: 2010-03-06 14:29+0100\n"
+"Last-Translator: Christian Kirbach <Christian Kirbach googlemail com>\n"
+"Language-Team: Deutsch <gnome-de gnome org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Verwaltung Ihrer Netzwerkverbindungen"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Zugriff auf das Internet über Ihr Mobiltelefon"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Standard"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "Bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Die Verbindung konnte nicht gelöscht werden: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Das Gerät konnte nicht aktiviert werden: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Das Gerät konnte nicht deaktiviert werden: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "Kabelgebunden"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Entsperren der PIN schlug fehl: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Gesperrtes GSM-Gerät"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Keine"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-bit Schlüssel"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bit Passphrase"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamic WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "E_rstellen"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Es werden Passwörter oder Schlüssel für die Verschlüsselung benötigt, um "
+"sich mit dem Funknetzwerk »%s« zu verbinden."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Das drahtlose Netzwerk benötigt eine Authentifizierung"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Eine Authentifizierung wird vom drahtlosen Netzwerk benötigt"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Neues drahtloses Netzwerk erstellen"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Neues drahtloses Netzwerk"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr ""
+"Bitte einen Namen für das drahtlose Netzwerk, das erstellt werden soll, "
+"eingeben."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Zu einem versteckten drahtlosen Netzwerk verbinden"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Verstecktes drahtloses Netzwerk"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Bitte Namen und Sicherheitsdetails für das versteckte drahtlose Netzwerk "
+"eingeben, mit dem Sie sich verbinden wollen. "
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_Verbinden"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Verbindung:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Anderes kabelgebundenes Netzwerk â?¦"
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Drahtloser _Adapter:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Netzwerkname:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Drahtloses Netzwerk:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Es wurde kein CA-Zertifikat "
+"ausgewählt</span>\n"
+"\n"
+"Wenn Sie kein CA-Zertifikat verwenden, kann dies zu unsicheren Verbindungen "
+"oder schadhaften Funknetzwerken führen. Möchten Sie ein CA-Zertifikat "
+"auswählen?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "CA-Zertifikat auswählen �"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Warnhinweis nicht mehr anzeigen"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorieren"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Authentifizierung:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Passwort:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Passwort anzeigen"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Benutzername:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Anonyme Identität:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA-Zertifikat:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Interne Authentifizierung:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP-Version:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identität:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Passwort des privaten Schlüssels:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Privater Schlüssel:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Benutzerzertifikat:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Schlüssel:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Schlüssel anzeigen"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP-Index:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Typ:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Zertifikat der Zertifizierungsstelle auswählen..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Persönliches Zertifikat auswählen..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Privaten Schlüssel auswählen..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM, oder PKCS#12 private Schlüssel (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER oder PEM Zertifikate (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Getunneltes TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Protected EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Nachrichtentyp"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Der Typ der Nachricht"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Rand um den Inhaltsbereich"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Breite des Randes um den Inhaltsbereich"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Abstände im Inhaltsbereich"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Abstände zwischen Elementen im Inhaltsbereich"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Knopfabstand"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Abstände zwischen Knöpfen"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Rand des Aktionsbereichs"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Breite des Rands des Aktionsbereichs"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " einzuschalten und"
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Es können leider keine Netzwerke gefunden werden."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Sie könnten versuchen, den Offline-Modus zu deaktivieren."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Sie könnten versuchen,"
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Kabelgebunden"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Neue Verbindung hinzufügen"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Netzwerke"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Offline-Modus"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Dadurch werden alle Netzwerkverbindungen deaktiviert"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Im unabhängigen Modus ausführen"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Im Desktop-Modus ausführen"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetzwerkManager-Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetzwerkManager-Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Verbunden"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Trennen"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Verbindung wird aufgebaut"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Nicht verbunden"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Verbinde"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Verfügbar"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Verbindung konnte nicht aktualisiert werden: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Wirklich löschen?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Nein, speichern"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Ja, löschen"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Wollen Sie das %s-Netzwerk »%s« löschen? Dadurch\n"
+"wird das Passwort vergessen und Sie werden nicht\n"
+"mehr automatisch mit »%s« verbunden."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Erweitert"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Verbindung entfernen"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "Netzwerk"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Verbindung wurde hergestellt"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Sie sind nun mit dem Netzwerk %s verbunden, einem %s-Netzwerk"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Sie sind nun mit dem Netzwerk %s verbunden"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Sie sind nun mit dem Netzwerk verbunden"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Verbindung wurde unterbrochen"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Die %s-Verbindung zu %s wurde unterbrochen"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Die %s-Verbindung wurde unterbrochen"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Die Verbindung wurde unterbrochen"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "Netzwerke - Nicht verbunden"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "Netzwerke - Verbindung wird hergestellt"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "Netzwerke - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "Netzwerke - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "Netzwerke - Verbunden"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Entsperren"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "PIN deaktivieren"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(ohne)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Verbinden durch:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manuell"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Link Local"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP-Adresse:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Teilnetzmaske:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Router:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Ihre MAC-Adresse:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G ist deaktiviert"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G-Modem ist gesperrt"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Internes 3G-Modem und SIM-Karte wurden erkannt"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Keine Modems erkannt"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Eine neue Verbindung hinzufügen"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Verborgenes Netzwerk"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Verbindung speichern"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Zurück zum Netzwerk"
+
+#~ msgid "On"
+#~ msgstr "An"
+
+#~ msgid "Off"
+#~ msgstr "Aus"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>Verkabelt</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>Eine neue Verbindung hinzufügen</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>Netzwerke</b></big>"
diff --git a/po/el.po b/po/el.po
new file mode 100644
index 0000000..ed10fae
--- /dev/null
+++ b/po/el.po
@@ -0,0 +1,672 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-03-14 12:10+0200\n"
+"PO-Revision-Date: 2010-03-14 12:33+0200\n"
+"Last-Translator: Kostas Papadimas <pkst gnome org>\n"
+"Language-Team: Novell Language <language novell com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Î?ιαÏ?ειÏ?ιÏ?Ï?είÏ?ε Ï?ιÏ? Ï?Ï?νδÎÏ?ειÏ? δικÏ?Ï?οÏ?"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Î Ï?Ï?Ï?βαÏ?η Ï?Ï?ο διαδίκÏ?Ï?ο μÎÏ?Ï? Ï?οÏ? κινηÏ?οÏ? Ï?αÏ? Ï?λεÏ?Ï?νοÏ?"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Î Ï?οεÏ?ιλογή"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Î?δÏ?ναμία διαγÏ?αÏ?ήÏ? Ï?Ï?νδεÏ?ηÏ?: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Î?δÏ?ναμία ενεÏ?γοÏ?οίηÏ?ηÏ? Ï?Ï?Ï?κεÏ?ήÏ?: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Î?δÏ?ναμία αÏ?ενεÏ?γοÏ?οίηÏ?ηÏ? Ï?Ï?Ï?κεÏ?ήÏ?: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "ενÏ?Ï?Ï?μαÏ?η"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50
+#: ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498
+#: ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Î?Ï?οÏ?Ï?Ï?ία ξεκλειδÏ?μαÏ?οÏ? PIN: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Î?λειδÏ?μÎνη Ï?Ï?Ï?κεÏ?ή GSM"
+
+#: ../libnm-gtk/nm-wifi-item.c:61
+#: ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476
+#: ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Î?αμία"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Î?λειδί WEP 40/128 bit"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "ΣÏ?νθημαÏ?ική Ï?Ï?άÏ?η WEP 128 bit"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamic WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "_Î?ημιοÏ?Ï?γία"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid "Passwords or encryption keys are required to access the wireless network '%s'."
+msgstr "Î?Ï?αιÏ?οÏ?νÏ?αι κÏ?δικοί Ï?Ï?Ï?Ï?βαÏ?ηÏ? ή κλειδιά κÏ?Ï?Ï?Ï?ογÏ?άÏ?ηÏ?ηÏ? για Ï?Ï?Ï?Ï?βαÏ?η Ï?Ï?ο αÏ?Ï?Ï?μαÏ?ο δίκÏ?Ï?ο '%s'."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Î?Ï?αιÏ?είÏ?αι ÎλεγÏ?οÏ? Ï?αÏ?Ï?Ï?Ï?ηÏ?αÏ? Ï?Ï?ο αÏ?Ï?Ï?μαÏ?ο δίκÏ?Ï?ο"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Î?Ï?αιÏ?είÏ?αι ÎλεγÏ?οÏ? Ï?αÏ?Ï?Ï?Ï?ηÏ?αÏ? αÏ?Ï? Ï?ο αÏ?Ï?Ï?μαÏ?ο δίκÏ?Ï?ο"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Î?ημιοÏ?Ï?γία νÎοÏ? αÏ?Ï?Ï?μαÏ?οÏ? δικÏ?Ï?οÏ?"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Î?Îο αÏ?Ï?Ï?μαÏ?ο δίκÏ?Ï?ο"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Î?αÏ?αÏ?Ï?Ï?ήÏ?Ï?ε Îνα Ï?νομα για Ï?ο αÏ?Ï?Ï?μαÏ?ο δίκÏ?Ï?ο Ï?οÏ? θÎλεÏ?ε να δημιοÏ?Ï?γήÏ?εÏ?ε."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "ΣÏ?νδεÏ?η Ï?ε κÏ?Ï?Ï?Ï? αÏ?Ï?Ï?μαÏ?ο δίκÏ?Ï?ο"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Î?Ï?Ï?Ï?Ï? αÏ?Ï?Ï?μαÏ?ο δίκÏ?Ï?ο"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid "Enter the name and security details of the hidden wireless network you wish to connect to."
+msgstr "Î?ιÏ?άγεÏ?ε Ï?ο Ï?νομα και Ï?α Ï?Ï?οιÏ?εία αÏ?Ï?αλείαÏ? Ï?οÏ? κÏ?Ï?Ï?οÏ? αÏ?Ï?Ï?μαÏ?οÏ? δικÏ?Ï?οÏ?, Ï?Ï?ο οÏ?οίο θÎλεÏ?ε να Ï?Ï?νδεθείÏ?ε."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_ΣÏ?νδεÏ?η"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "ΣÏ?νδεÏ?η:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Î?λλο αÏ?Ï?Ï?μαÏ?ο δίκÏ?Ï?ο..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Î?Ï?Ï?Ï?μαÏ?οÏ? _Ï?Ï?οÏ?αÏ?μογÎαÏ?:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "Î?νομα _δικÏ?Ï?οÏ?:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Î?Ï?Ï?άλεια αÏ?Ï?Ï?μαÏ?οÏ? δικÏ?Ï?οÏ?:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections to insecure, rogue wireless networks. Would you like to choose a Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Î?εν εÏ?ιλÎÏ?θηκε Ï?ιÏ?Ï?οÏ?οιηÏ?ικÏ? κάÏ?οιαÏ? αÏ?Ï?ήÏ? ÎκδοÏ?ηÏ? Ï?ιÏ?Ï?οÏ?οιηÏ?ικÏ?ν</span>\n"
+"\n"
+"Î?ν δεν Ï?Ï?ηÏ?ιμοÏ?οιηθεί κάÏ?οια αÏ?Ï?ή ÎκδοÏ?ηÏ? Ï?ιÏ?Ï?οÏ?οιηÏ?ικÏ?ν (CA), μÏ?οÏ?εί να Ï?Ï?οκÏ?Ï?οÏ?ν Ï?Ï?νδÎÏ?ειÏ? Ï?ε μη αÏ?Ï?αλή, εÏ?ικίνδÏ?να αÏ?Ï?Ï?μαÏ?α δίκÏ?Ï?α. Î?ÎλεÏ?ε να εÏ?ιλÎξεÏ?ε Îνα Ï?ιÏ?Ï?οÏ?οιηÏ?ικÏ? μιαÏ? αÏ?Ï?ήÏ? ÎκδοÏ?ηÏ? Ï?ιÏ?Ï?οÏ?οιηÏ?ικÏ?ν;"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Î?Ï?ιλογή Ï?ιÏ?Ï?οÏ?οιηÏ?ικοÏ? CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Î?α μην Ï?Ï?οειδοÏ?οιηθÏ? ξανά"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "ΠαÏ?άβλεÏ?η"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Î?λεγÏ?οÏ? Ï?αÏ?Ï?Ï?Ï?ηÏ?αÏ?:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Î?Ï?δικÏ?Ï? Ï?Ï?Ï?Ï?βαÏ?ηÏ?:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Î?μÏ?άνιÏ?η κÏ?δικοÏ? Ï?Ï?Ï?Ï?βαÏ?ηÏ?"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Î?νομα Ï?Ï?ήÏ?Ï?η:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Î?νÏ?νÏ?μη Ï?αÏ?Ï?Ï?Ï?ηÏ?α:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "ΠιÏ?Ï?οÏ?οιηÏ?ικÏ? CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Î?νδÏ?Ï?εÏ?οÏ? ÎλεγÏ?οÏ? Ï?αÏ?Ï?Ï?Ï?ηÏ?αÏ?:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Î?κδοÏ?η PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "ΤαÏ?Ï?Ï?Ï?ηÏ?α:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Î?Ï?δικÏ?Ï? Ï?Ï?Ï?Ï?βαÏ?ηÏ? ιδιÏ?Ï?ικοÏ? κλειδιοÏ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Î?διÏ?Ï?ικÏ? κλειδί:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "ΠιÏ?Ï?οÏ?οιηÏ?ικÏ? Ï?Ï?ήÏ?Ï?η:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Î?λειδί:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Î?μÏ?άνιÏ?η κλειδιοÏ?"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Î?είκÏ?ηÏ? WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "ΤÏ?Ï?οÏ?:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Î?Ï?ιλÎξÏ?ε Îνα Ï?ιÏ?Ï?οÏ?οιηÏ?ικÏ? αÏ?Ï? κάÏ?οια αÏ?Ï?ή ÎκδοÏ?ηÏ? Ï?ιÏ?Ï?οÏ?οιηÏ?ικÏ?ν..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Î?Ï?ιλÎξÏ?ε Ï?ο Ï?Ï?οÏ?Ï?Ï?ικÏ? Ï?αÏ? Ï?ιÏ?Ï?οÏ?οιηÏ?ικÏ?..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Î?Ï?ιλÎξÏ?ε Ï?ο ιδιÏ?Ï?ικÏ? Ï?αÏ? κλειδί..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Î?διÏ?Ï?ικά κλειδιά DER, PEM ή PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "ΠιÏ?Ï?οÏ?οιηÏ?ικά DER ή PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunneled TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Protected EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "ΤÏ?Ï?οÏ? μηνÏ?μαÏ?οÏ?"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Î? Ï?Ï?Ï?οÏ? Ï?οÏ? μηνÏ?μαÏ?οÏ?"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "ΠεÏ?ίγÏ?αμμα Ï?εÏ?ιοÏ?ήÏ? Ï?εÏ?ιεÏ?ομÎνοÏ?"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Το Ï?λάÏ?οÏ? Ï?οÏ? Ï?εÏ?ιγÏ?άμμαÏ?οÏ? Ï?ηÏ? Ï?εÏ?ιοÏ?ήÏ? Ï?εÏ?ιεÏ?ομÎνοÏ?"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Î?Ï?Ï?Ï?Ï?αÏ?η Ï?εÏ?ιοÏ?ήÏ? Ï?εÏ?ιεÏ?ομÎνοÏ?"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Î? αÏ?Ï?Ï?Ï?αÏ?η ανάμεÏ?α Ï?Ï?α Ï?Ï?οιÏ?εία Ï?ηÏ? Ï?εÏ?ιοÏ?ήÏ?"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Î?Ï?Ï?Ï?Ï?αÏ?η κοÏ?μÏ?ιοÏ?"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Î? αÏ?Ï?Ï?Ï?αÏ?η ανάμεÏ?α Ï?Ï?α κοÏ?μÏ?ιά"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "ΠεÏ?ίγÏ?αμμα Ï?εÏ?ιοÏ?ήÏ? ενεÏ?γειÏ?ν"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Το Ï?λάÏ?οÏ? Ï?οÏ? Ï?εÏ?ιγÏ?άμμαÏ?οÏ? γÏ?Ï?Ï? αÏ?Ï? Ï?ην Ï?εÏ?ιοÏ?ή Ï?Ï?ν ενεÏ?γειÏ?ν"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " και"
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "ΣÏ?γγνÏ?μη, δεν ήÏ?αν δÏ?ναÏ?ή η εÏ?Ï?εÏ?η δικÏ?Ï?Ï?ν."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Î?α Ï?Ï?ÎÏ?ει να αÏ?ενεÏ?γοÏ?οιήÏ?εÏ?ε Ï?ην εÏ?γαÏ?ία Ï?Ï?Ï?ίÏ? Ï?Ï?νδεÏ?η"
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Î Ï?οÏ?Ï?αθήÏ?Ï?ε να ενεÏ?γοÏ?οιήÏ?εÏ?ε "
+
+#: ../src/nmn-list.c:112
+#: ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Î?νÏ?Ï?Ï?μαÏ?η"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Î Ï?οÏ?θήκη νÎαÏ? Ï?Ï?νδεÏ?ηÏ?"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Î?ίκÏ?Ï?α"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Î?Ï?γαÏ?ία Ï?Ï?Ï?ίÏ? Ï?Ï?νδεÏ?η"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Î?Ï?Ï?ι θα αÏ?ενεÏ?γοÏ?οιηθοÏ?ν Ï?λεÏ? οι Ï?Ï?νδÎÏ?ειÏ?"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Î?κÏ?ÎλεÏ?η Ï?ε λειÏ?οÏ?Ï?γία standalone"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Î?κÏ?ÎλεÏ?η Ï?ε λειÏ?οÏ?Ï?γία desktop"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Î?ε Ï?Ï?νδεÏ?η"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Î?Ï?οÏ?Ï?νδεÏ?η"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Î?ίνεÏ?αι Ï?Ï?νδεÏ?η"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Î?κÏ?Ï?Ï?Ï?η"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "ΧÏ?Ï?ίÏ? Ï?Ï?νδεÏ?η"
+
+#: ../src/nmn-network-renderer.c:115
+#: ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "ΣÏ?νδεÏ?η"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Î?ιαθÎÏ?ιμη"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Î?δÏ?ναμία ενημÎÏ?Ï?Ï?ηÏ? Ï?Ï?νδεÏ?ηÏ?: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Î?λήθεια να γίνει αÏ?ομάκÏ?Ï?νÏ?η;"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Î?Ï?ι, αÏ?οθήκεÏ?Ï?η"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Î?αι, διαγÏ?αÏ?ή"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Î?ÎλεÏ?ε να αÏ?ομακÏ?Ï?νεÏ?ε Ï?ο δίκÏ?Ï?ο '%s' %s; Î?Ï?Ï?Ï?\n"
+"θα ÎÏ?ει Ï?αν αÏ?οÏ?ÎλεÏ?μα Ï?ην διαγÏ?αÏ?ή Ï?οÏ? κÏ?δικοÏ? και δεν θα μÏ?οÏ?είÏ?ε Ï?ια\n"
+"να Ï?Ï?νδÎεÏ?Ï?ε αÏ?Ï?Ï?μαÏ?α Ï?Ï?ο '%s'."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Î?ια Ï?Ï?οÏ?Ï?Ï?ημÎνοÏ?Ï?"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Î?Ï?ομάκÏ?Ï?νÏ?η Ï?Ï?νδεÏ?ηÏ?"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "δίκÏ?Ï?ο"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Î?γινε Ï?Ï?νδεÏ?η Ï?ε δίκÏ?Ï?ο"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "'Î?Ï?εÏ?ε Ï?Ï?νδεθεί Ï?Ï?ο %s, Îνα δίκÏ?Ï?ο %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "'Î?Ï?εÏ?ε Ï?Ï?νδεθεί Ï?Ï?ο δίκÏ?Ï?ο %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "'Î?Ï?εÏ?ε Ï?Ï?νδεθεί Ï?ε δίκÏ?Ï?ο"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Î?Ï?Ï?λεια δικÏ?Ï?οÏ?"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "ΣÏ?γγνÏ?μη, Ï?άθηκε η %s Ï?Ï?νδεÏ?η Ï?αÏ? Ï?Ï?ο %s "
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "ΣÏ?γγνÏ?μη, Ï?άθηκε η %s Ï?Ï?νδεÏ?η Ï?αÏ?"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "ΣÏ?γγνÏ?μη, Ï?άθηκε η Ï?Ï?νδεÏ?η Ï?αÏ?"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "δίκÏ?Ï?α - Ï?Ï?Ï?ίÏ? Ï?Ï?νδεÏ?η"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "δίκÏ?Ï?α - γίνεÏ?αι Ï?Ï?νδεÏ?η"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "δίκÏ?Ï?α - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "δίκÏ?Ï?α - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "δίκÏ?Ï?α - με Ï?Ï?νδεÏ?η"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Î?εκλείδÏ?μα"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Î?Ï?ενεÏ?γοÏ?οίηÏ?η PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(κανÎνα)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "ΤÏ?Ï?Ï?οÏ? Ï?Ï?νδεÏ?ηÏ?:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Î?η αÏ?Ï?Ï?μαÏ?η"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "ΤοÏ?ική Ï?Ï?νδεÏ?η"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Î?ιεÏ?θÏ?νÏ?η IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Î?άÏ?κα subnet:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Î?Ï?ομολογηÏ?ήÏ?:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Î?ιεÏ?θÏ?νÏ?η MAC Ï?αÏ?:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "Το 3G αÏ?ενεÏ?γοÏ?οιήθηκε"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "Το 3G μÏ?νÏ?εμ είναι κλειδÏ?μÎνο"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Î?νÏ?οÏ?ίÏ?Ï?ηκαν εÏ?Ï?Ï?εÏ?ικÏ? 3G modem και κάÏ?Ï?α SIM"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Î?εν ενÏ?οÏ?ίÏ?Ï?ηκαν modem"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Î Ï?οÏ?θήκη νÎαÏ? Ï?Ï?νδεÏ?ηÏ?"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Î?Ï?Ï?Ï?Ï? δίκÏ?Ï?ο"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Î?Ï?οθήκεÏ?Ï?η Ï?Ï?νδεÏ?ηÏ?"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Î?Ï?ιÏ?Ï?Ï?οÏ?ή Ï?Ï?ο Î?ίκÏ?Ï?ο"
+
+#~ msgid "On"
+#~ msgstr "Î?νεÏ?γÏ?"
+#~ msgid "Off"
+#~ msgstr "Î?νενεÏ?γÏ?"
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>Î?ειÏ?οÏ?Ï?γία Ï?Ï?ήÏ?ηÏ?</b>"
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>Î?νÏ?Ï?Ï?μαÏ?η</b>"
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>Î Ï?οÏ?θήκη νÎαÏ? Ï?Ï?νδεÏ?ηÏ?</b></big>"
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>Î?ίκÏ?Ï?α</b></big>"
+
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..dc81bc8
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,691 @@
+# Antonio Ognio <antonio linux org pe>, 2004.
+# Francisco Javier F. Serrador <serrador cvs gnome org>, 2004, 2005, 2006.
+# Lucas Vieites Fariña <lucas asixinformatica com>, 2005, 2006.
+# Tambet Ingo <tambet novell com>, 2009.
+# Novell Language <language novell com>
+# Jorge González <jorgegonz svn gnome org>, 2007, 2008, 2009, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook 0.2\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-03-04 23:58+0000\n"
+"PO-Revision-Date: 2010-03-07 16:46+0100\n"
+"Last-Translator: Jorge González <jorgegonz svn gnome org>\n"
+"Language-Team: Español <gnome-es-list gnome org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Controle sus conexiones de red"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Acceda a Internet usando su teléfono móvil"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Predeterminado"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+#| msgid "Control your network connections"
+msgid "Could not delete connection: %s"
+msgstr "No se pudo eliminar la conexión: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "No se pudo activar el dispositivo: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "No se pudo desactivar el dispositivo: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "cableada"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Falló el desbloqueo con el PIN: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Dispositivo GSM bloqueado"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Ninguno"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Llave WEP 40/128-bit"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "Contraseña WEP 128-bit"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "WEP dinámico (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Empresarial"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "C_rear"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Se necesitan contraseñas o claves de cifrado para acceder a la red "
+"inalámbrica «%s»."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Se requiere autenticación para la red inalámbrica"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "La red inalámbrica requiere autenticación"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Crear nueva red inalámbrica"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Red inalámbrica nueva"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Introducir un nombre para la red inalámbrica que quiere crear."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Conectar a una red inalámbrica oculta"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Red inalámbrica oculta"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Introducir el nombre y los detalles de seguridad de la red inalámbrica "
+"oculta a la que quiere conectarse."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "C_onectar"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Conexión:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Otra red inalámbrica�"
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "_Adaptador inalámbrico:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Nombre de la red:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "Seg_uridad inalámbrica:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">No se eligió ningún certificado CA</"
+"span>\n"
+"\n"
+"No usar un certificado de Certificate Authority (CA) puede dar lugar a "
+"conexiones inseguras, redes inalámbricas promiscuas. ¿Quiere elegir un "
+"certificado Certificate Authority?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Elegir certificado CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "No preguntar de nuevo"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorar"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Autenticación:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Contraseña:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Mostrar contraseña"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Usuario:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Identidad anónima:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Certificado CA"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Autenticación interna:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Versión de PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identidad:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Contraseña de clave privada:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Clave privada:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Certificado de usuario:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Clave:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Mostrar clave"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Ã?ndice WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Tipo:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Escoge un certificado de una Autoridad Certificadora..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Escoge tu certificado personal..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Escoge tu llave privada..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Llaves privadas DER, PEM, o PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "Certificados DER o PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunelado TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "EAP protegido (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Tipo de mensaje"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "El tipo de mensaje"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Borde del área de contenidos"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Anchura del borde alrededor del área de contenido"
+
+#: ../src/gtkinfobar.c:444
+#| msgid "Connecting"
+msgid "Content area spacing"
+msgstr "Separación del área de contenido"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Espacio entre los elementos del área"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Espaciado de los botones"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Espaciado entre los botones"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Borde del área de acción"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Anchura del borde alrededor del área de acción"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " y "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "No se encontró ninguna red."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Puede intentarlo desactivando el modo Desconectado."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Puede intentarlo activándo"
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Conexión cableada"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Añadir una conexión nueva"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Redes"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Modo desconectado"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Esto desactivará todas sus conexiones"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Ejecutar en modo independiente"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Ejecutar en modo escritorio"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Conectado"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Desconectar"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Conectando"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Desconectado"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Conectar"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Disponible"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+#| msgid "Add new connection"
+msgid "Could not update connection: %s"
+msgstr "No se pudo actualizar la conexión: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "¿Quiere quitarla?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "No, guardar"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "SÃ, borrar"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"¿Quiere quitar la red %2$s «%1$s»? Esto\n"
+"olvidará la contraseña y no se conectará\n"
+"de forma automática a «%3$s»."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Avanzado"
+
+#: ../src/nmn-network-renderer.c:397
+#| msgid "Save connection"
+msgid "Remove connection"
+msgstr "Eliminar conexión"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "red"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Conectado a la red"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Ahora está conectado a %s, una red %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Ahora está conectado a la red %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Ahora está conectado a la red"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Se perdió la red"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Se perdió su conexión %s con %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Se perdió su conexión %s"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Se perdió su conexión"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "redes - no conectado"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "redes - conectando"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "redes - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "redes - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "redes - conectado"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Desbloquear"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Desactivar el PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(ninguno)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Conectar mediante:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manual"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Local del enlace"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Dirección IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Máscara de subred:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Router:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Su dirección MAC:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G desactivado"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "El módem 3G está bloqueado"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Módem 3G interno y tarjeta SIM detectados"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "No se detectó ningún módem"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Añadir una conexión nueva"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Red oculta"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Guardar la conexión"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Volver a las redes"
+
+#~ msgid "On"
+#~ msgstr "Encendido"
+
+#~ msgid "Off"
+#~ msgstr "Apagado"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>Conexión cableada</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>Añadir una conexión nueva</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>Redes</b></big>"
diff --git a/po/et.po b/po/et.po
new file mode 100644
index 0000000..7bfe935
--- /dev/null
+++ b/po/et.po
@@ -0,0 +1,504 @@
+# Networkmanageri tõlge eesti keelde.
+# Estonian translation of Networkmanager.
+#
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2007 The GNOME Project
+# This file is distributed under the same license as the Networkmanager package.
+#
+# Priit Laes <amd store20 com>, 2006.
+# Ivar Smolin <okul at linux.ee>, 2006-2007.
+# Mattias Põldaru <mahfiaz gmail com>, 2008-2010.
+# Tambet Ingo <tambet novell com>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook 0.2\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-03-08 11:30+0000\n"
+"PO-Revision-Date: 2010-03-10 07:16+0300\n"
+"Last-Translator: Mattias Põldaru <mahfiaz gmail com>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "Control your network connections"
+msgstr "Võrguühenduste juhtimine"
+
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+msgid "Access the Internet using your mobile phone"
+msgstr "Internetiühendus mobiiltelefoni kaudu"
+
+msgid "Default"
+msgstr "Vaikimisi"
+
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "�hendust pole võimalik kustutada: %s"
+
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Seadet pole võimalik aktiveerida: %s"
+
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Seadet pole võimalik deaktiveerida: %s"
+
+msgid "wired"
+msgstr "juhtmega"
+
+msgid "802.1x"
+msgstr "802.1x"
+
+msgid "3G"
+msgstr "3G"
+
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "PIN-koodi luku eemaldamine nurjus: %s"
+
+msgid "Locked GSM device"
+msgstr "GSM seade on lukus"
+
+msgid "WiFi"
+msgstr "WiFi"
+
+msgid "None"
+msgstr "Puudub"
+
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-bitine võti"
+
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bitine parool"
+
+msgid "LEAP"
+msgstr "LEAP"
+
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dünaamiline WEP (802.1x)"
+
+msgid "WPA & WPA2 Personal"
+msgstr "Dünaamiline WEP"
+
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 ettevõtte"
+
+msgid "C_reate"
+msgstr "_Loo"
+
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Paroolid või krüpteerimisvõtmed on vajalikud ligipääsuks juhtmeta võrgule '%"
+"s'."
+
+msgid "Wireless Network Authentication Required"
+msgstr "Juhtmeta võrgu salasõna päring"
+
+msgid "Authentication required by wireless network"
+msgstr "Juhtmeta võrgu jaoks on vaja salasõna"
+
+msgid "Create New Wireless Network"
+msgstr "Loo uus juhtmeta võrk"
+
+msgid "New wireless network"
+msgstr "Uus juhtmeta võrk"
+
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Sisesta loodava juhtmeta võrgu nimi"
+
+msgid "Connect to Hidden Wireless Network"
+msgstr " Varjatud juhtmeta võrku ühendumine"
+
+msgid "Hidden wireless network"
+msgstr "Varjatud juhmeta võrk"
+
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Sisesta varjatud juhtmeta võrgu, millesse tahad ühenduda, nimi ja parool."
+
+msgid "C_onnect"
+msgstr "Ã?_henda"
+
+msgid "Connection:"
+msgstr "Ã?hendus:"
+
+msgid "Other Wireless Network..."
+msgstr "Loo uus juhtmeta võrk..."
+
+msgid "Wireless _adapter:"
+msgstr "Võrgu_kaart:"
+
+msgid "_Network Name:"
+msgstr "_Võrgu nimi:"
+
+msgid "_Wireless Security:"
+msgstr "_Juhtmeta võrgu turvalisus:"
+
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Ã?htki sertifitseerimiskeskuse "
+"sertifikaadifaili pole valitud</span>\n"
+"\n"
+"Sertifitseerimiskeskuse sertifikaadifaili mittekasutamine võib põhjustada "
+"ühendumise ebaturvalistesse, kuritegelikesse võrkudesse. Kas sa valiksid "
+"siiski sertifitseerimiskeskuse sertifikaadifaili?"
+
+msgid "Choose CA Certificate"
+msgstr "Vali privaatsertifikaati fail"
+
+msgid "Don't warn me again"
+msgstr "Enam ei hoiatata"
+
+msgid "Ignore"
+msgstr "Eira"
+
+msgid "Authentication:"
+msgstr "Autentimine:"
+
+msgid "Password:"
+msgstr "Parool:"
+
+msgid "Show password"
+msgstr "Parooli näidatakse"
+
+msgid "User Name:"
+msgstr "Kasutajanimi:"
+
+msgid "Anonymous Identity:"
+msgstr "Anonüümne identiteet:"
+
+msgid "CA Certificate:"
+msgstr "Sertifitseerimiskeskuse sertifikaadifail:"
+
+msgid "Inner Authentication:"
+msgstr "Sise-autentimine:"
+
+msgid "PEAP Version:"
+msgstr "PEAP versioon:"
+
+msgid "Identity:"
+msgstr "Identiteet:"
+
+msgid "Private Key Password:"
+msgstr "Privaatvõtme parool:"
+
+msgid "Private Key:"
+msgstr "Privaatvõtme fail:"
+
+msgid "User Certificate:"
+msgstr "Kasutaja sertifikaadifail:"
+
+msgid "Key:"
+msgstr "Võti:"
+
+msgid "Show key"
+msgstr "Näita võtit"
+
+msgid "WEP Index:"
+msgstr "WEP indeks:"
+
+msgid "Type:"
+msgstr "Liik:"
+
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+msgid "MD5"
+msgstr "MD5"
+
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Vali sertifitseerimiskeskuse sertifikaadifail..."
+
+msgid "Choose your personal certificate..."
+msgstr "Vali privaatsertifikaati fail..."
+
+msgid "Choose your private key..."
+msgstr "Vali privaatvõtme fail..."
+
+msgid "PAP"
+msgstr "PAP"
+
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+msgid "CHAP"
+msgstr "CHAP"
+
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM või PKCS#12 privaatvõtmed (*.der, *.pem, *.p12)"
+
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER või PEM sertifikaadid (*.der, *.pem, *.crt, *.cer)"
+
+msgid "TLS"
+msgstr "TLS"
+
+msgid "Tunneled TLS"
+msgstr "Tunnelis TLS"
+
+msgid "Protected EAP (PEAP)"
+msgstr "Kaitstud EAP (PEAP)"
+
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+msgid "Message Type"
+msgstr "Teate liik"
+
+msgid "The type of message"
+msgstr "Teate liik"
+
+msgid "Content area border"
+msgstr "Sisuala raam"
+
+msgid "Width of border around the content area"
+msgstr "Sisuala ümbritsev raam"
+
+msgid "Content area spacing"
+msgstr "Sisuala vahe"
+
+msgid "Spacing between elements of the area"
+msgstr "Ala elementide vahel olev ruum"
+
+msgid "Button spacing"
+msgstr "Nuppude vahe"
+
+msgid "Spacing between buttons"
+msgstr "Nuppude vahekaugus"
+
+msgid "Action area border"
+msgstr "Tegevusala raam"
+
+msgid "Width of border around the action area"
+msgstr "Tegevusala ümbritsev raam"
+
+msgid " and "
+msgstr " ja "
+
+msgid "Sorry, we can't find any networks."
+msgstr "Vabandust, ühtegi võrku ei leitud."
+
+msgid " You could try disabling Offline mode."
+msgstr "Võid proovida võrguta režiimi väljalülitamist."
+
+msgid " You could try turning on "
+msgstr "Võid proovida sisselülitada "
+
+msgid "Wired"
+msgstr "Juhtmega"
+
+msgid "Add new connection"
+msgstr "Lisa uus ühendus"
+
+msgid "Networks"
+msgstr "Võrgud"
+
+msgid "WiMAX"
+msgstr "WiMAX"
+
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+msgid "Offline mode"
+msgstr "Võrguta režiim"
+
+msgid "This will disable all your connections"
+msgstr "See keelab kõik võrguühendused"
+
+msgid "Run in standalone mode"
+msgstr "Eraldiseisvas režiimis käivitamine"
+
+msgid "Run in desktop mode"
+msgstr "Töölauarežiimis käivitamine"
+
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+msgid "Connected"
+msgstr "Ã?hendatud"
+
+msgid "Disconnect"
+msgstr "Ã?henda lahti"
+
+msgid "Connecting"
+msgstr "Ã?hendumine"
+
+msgid "Cancel"
+msgstr "Loobu"
+
+msgid "Disconnected"
+msgstr "Ã?hendamata"
+
+msgid "Connect"
+msgstr "Ã?henda"
+
+msgid "Available"
+msgstr "Saadaval"
+
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "�hendust pole võimalik uuendada: %s"
+
+msgid "Really remove?"
+msgstr "Kas tõesti eemaldada?"
+
+# võib-olla peaks olema siin "Ei, jäta alles"
+msgid "No, save"
+msgstr "Ei, salvesta"
+
+msgid "Yes, delete"
+msgstr "Jah, kustuta"
+
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Kas tahad eemaldada '%s' %s võrgu? Sellega\n"
+"kustutatakse parool ja võrguga '%s' enam\n"
+"automaatselt ei ühenduta."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+msgid "Advanced"
+msgstr "Täpsemalt"
+
+msgid "Remove connection"
+msgstr "Kustuta ühendus"
+
+msgid "network"
+msgstr "võrk"
+
+msgid "Network connected"
+msgstr "Võrguühendus loodud"
+
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Nüüd oled ühendatud võrku %s, see on %s võrk"
+
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Nüüd oled ühendatud võrku %s"
+
+msgid "You're now connected to network"
+msgstr "Nüüd oled võrku ühendatud"
+
+msgid "Network lost"
+msgstr "Võrguühendus katkes"
+
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Kahjuks katkes %s ühendus võrguga %s"
+
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Kahjuks katkes %s ühendus"
+
+msgid "Sorry, we've lost your connection"
+msgstr "Kahjuks katkes ühendus"
+
+#, c-format
+msgid "networks - not connected"
+msgstr "võrgud - ühendus puudub"
+
+#, c-format
+msgid "networks - connecting"
+msgstr "võrgud - ühendumine"
+
+#, c-format
+msgid "networks - %s - %s"
+msgstr "võrgud - %s - %s"
+
+#, c-format
+msgid "networks - %s"
+msgstr "võrgud - %s"
+
+msgid "networks - connected"
+msgstr "võrgud - ühendatud"
+
+msgid "Unlock"
+msgstr "Luku eemaldamine"
+
+msgid "Disable PIN"
+msgstr "PIN-koodi väljalülitamine"
+
+msgid "(none)"
+msgstr "(Puudub)"
+
+#. Connect by:
+msgid "Connect by:"
+msgstr "Ã?henda:"
+
+msgid "DHCP"
+msgstr "DHCP"
+
+msgid "Manual"
+msgstr "Käsitsi:"
+
+msgid "Link Local"
+msgstr "Link Local"
+
+#. Address
+msgid "IP Address:"
+msgstr "IP-aadress:"
+
+#. Netmask
+msgid "Subnet mask:"
+msgstr "Alamvõrgu mask:"
+
+#. Gateway
+msgid "Router:"
+msgstr "Lüüs (gateway):"
+
+#. DNS
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+msgid "Your MAC address:"
+msgstr "Sinu MAC-aadress:"
+
+msgid "3G disabled"
+msgstr "3G keelatud"
+
+msgid "3G modem is locked"
+msgstr "3G-modem on lukus"
+
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Leiti 3G-modem ja SIM kaart"
+
+msgid "No modems detected"
+msgstr "Ei leitud ühtegi modemit"
+
+msgid "Add a new connection"
+msgstr "Lisa uus ühendus"
+
+msgid "Hidden network"
+msgstr "Varjatud juhtmeta võrk"
+
+msgid "Save connection"
+msgstr "Salvesta ühendus"
+
+msgid "Return to Networking"
+msgstr "Tagasi"
diff --git a/po/eu.po b/po/eu.po
new file mode 100644
index 0000000..baa43c2
--- /dev/null
+++ b/po/eu.po
@@ -0,0 +1,664 @@
+# translation of eu.po to Basque
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Iñaki Larrañaga Murgoitio <dooteo euskalgnu org>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: eu\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-03-20 18:52+0100\n"
+"PO-Revision-Date: 2010-03-20 19:20+0100\n"
+"Last-Translator: Iñaki Larrañaga Murgoitio <dooteo euskalgnu org>\n"
+"Language-Team: Basque <itzulpena euskalgnu org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Kontrolatu zure sareko konexioak"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Sarbidetu internetera telefono mugikorra erabiliz"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Lehenetsia"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Ezin izan da konexioa ezabatu: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Ezin izan da gailua aktibatu: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Ezin izan da gailua desaktibatu: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "hariduna"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Huts egin du PIN desblokeatzean: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "GSM gailua blokeatuta"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFia"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Bat ere ez"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128 bit-eko gakoa"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128 bit-eko pasaesaldia"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "WEP dinamikoa (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA eta WPA2 pertsonala"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA eta WPA2 enpresa"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "_Sortu"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Pasahitzak edo enkriptatze-gakoak behar dira haririk gabeko '%s' sarera "
+"sarbidetzeko."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Haririk gabeko sarearen autentifikazioa behar da"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Haririk gabeko sareak autentifikazioa eskatzen du"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Sortu haririk gabeko sare berria"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Haririk gabeko sare berria"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Sartu izen bat sortzea nahi duzun haririk gabeko sarearentzako."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Konektatu ezkutuko haririk gabeko sarera"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Ezkutuko haririk gabeko sarea"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr "Sartu konektatzea nahi duzun ezkutuko haririk gabeko sarearen izena eta segurtasuneko xehetasunak."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_Konektatu"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Konexioa:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Beste haririk gabeko sarea..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Haririk gabeko _moldagailua:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Sarearen izena:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Haririk gabearen segurtasuna:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Ez da ziurtagiri-emailearen "
+"ziurtagirik aukeratu</span>\n"
+"\n"
+"Autoritate ziurtagiri-emailearen (ZE) ziurtagiririk ez erabiltzeak haririk "
+"gabeko sare maltzur eta ez-seguru baten konexioa izatea eragin dezake. "
+"Nahi duzu autoritate ziurtagiri-emaile bat aukeratzea?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Aukeratu ZE ziurtagiria"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Ez abisatu berriro"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ezikusi egin"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Autentifikazioa:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Pasahitza:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Erakutsi pasahitza"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Erabiltzaile-izena:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Nortasun anonimoa:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "ZE ziurtagiria:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Barneko autentifikazioa:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP bertsioa:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identitatea:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Gako pribatuaren pasahitza:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Gako pribatua:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Erabiltzailearen ziurtagiria:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Gakoa:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Erakutsi gakoa"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP indizea:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Mota:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Aukeratu autoritate ziurtagiri-emailearen ziurtagiria..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Aukeratu ziurtagiri pertsonala..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Aukeratu gako pribatua..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM, edo PKCS#12 gako pribatuak (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER edo PEM ziurtagiriak (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tuneldun TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Babestutako EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Mezu mota"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Mezuaren mota"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Edukiaren arearen ertza"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Edukiaren arearen inguruko ertzaren zabalera"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Edukiaren arearen tartea"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Areako elementuen arteko tartea"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Botoien tartea"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Botoien arteko tartea"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Ekintza-arearen ertza"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Ekintza-arearen inguruko ertzaren zabalera"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " eta "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Ezin da inolako sarerik aurkitu."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Lineaz kanpo modua desgaitzen saia zintezke"
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Saia zaitez aktibatzen "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Hariduna"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Gehitu konexio berria"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Sareak"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Lineaz kanpoko modua"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Konexio guztiak desgaituko ditu"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Exekutatu bakarkako moduan"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Exekutatu mahaigainaren moduan"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Konektatuta"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Deskonektatu"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Konektatzen"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Utzi"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Deskonektatuta"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Konektatu"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Erabilgarri"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Ezin izan da konexioa eguneratu: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Benetan kendu?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Ez, gorde"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Bai ezabatu"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"'%s' %s sarea kentzea nahi duzu?\n"
+"Honek pasahitza ahaztuko du eta ezin izango\n"
+"duzu automatikoki berriro konektatu '%s'(e)ra."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Aurreratua"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Kendu konexioa"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "sarea"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Sarea konektatuta"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "%s(e)ra konektatuta zaude, %s sarea"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "%s sarera konektatuta zaude"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Sarera konektatuta zaude"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Sarea galdu da"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "%s konexioa galdu da %s(e)rekin"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "%s konexioa galdu da"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Konexioa galdu da"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "sareak - ez dago konektatuta"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "sareak - konektatzen"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "sareak - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "sareak - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "sareak - konektatuta"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Desblokeatu"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Desgaitu PINa"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(bat ere ez)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Honek konektatuta:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Eskuz"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Esteka lokala"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP helbidea:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Azpisarearen maskara:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Bideratzailea:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNSa:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "MAC helbidea:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G desgaituta"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G modema blokeatuta dago"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Barnekoa 3G modema eta SIM txartela detektatuta"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Ez da modemik detektatu"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Gehitu konexio berria"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Ezkutatu sarea"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Gorde konexioa"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Itzuli sarera"
+
diff --git a/po/fi.po b/po/fi.po
new file mode 100644
index 0000000..75948c9
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,558 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-27 16:37+0200\n"
+"PO-Revision-Date: 2009-09-16 15:17\n"
+"Last-Translator: Novell Language <language novell com>\n"
+"Language-Team: Novell Language <language novell com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr ""
+
+#: ../libnm-gtk/nm-ethernet-item.c:88
+msgid "802.1x"
+msgstr ""
+
+#: ../libnm-gtk/nm-wifi-item.c:60 ../src/nmn-list.c:105
+#: ../src/nmn-applet.c:337 ../src/nmn-new-connection.c:636
+msgid "WiFi"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-item.c:36 ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:115 ../src/nmn-applet.c:349
+#: ../src/nmn-new-connection.c:661
+msgid "3G"
+msgstr ""
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Ei mitään"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-bittinen avain"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bittinen salauslause"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynaaminen WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA ja WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA ja WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "L_uo"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Langattoman verkon %s käyttäminen edellyttää salasanoja tai salausavaimia."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Langattoman verkon todennus vaaditaan"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Langattoman verkon vaatima todennus"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Luo uusi langaton verkko"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Uusi langaton verkko"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Anna luotavalle langattomalle verkolle nimi."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Muodosta yhteys piilotettuun langattomaan verkkoon"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Piilotettu langaton verkko"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Anna sen piilotetun langattoman verkon nimi ja suojaustiedot, johon haluat "
+"muodostaa yhteyden."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_Yhdistä"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Yhteys:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Muu langaton verkko..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Langaton _sovitin:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Verkon nimi:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "L_angaton suojaus:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Varmenteen myöntäjän varmennetta ei "
+"ole valittu</span>\n"
+"\n"
+"Jos et käytä varmenteen myöntäjän varmennetta, yhteys voidaan muodostaa "
+"suojaamattomiin langattomiin verkkoihin. Haluatko valita varmenteen "
+"myöntäjän varmenteen?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Valitse varmenteen myäntäjän varmenne"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "�lä näytä tätä varoitusta enää uudelleen"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ohita"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Todennus:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Salasana:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Näytä salasana"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Käyttäjänimi:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Anonyymi henkilöllisyys:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Varmenne:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Sisäinen varmennus:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP-versio:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Henkilöllisyys:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Yksityisen avaimen salasana:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Yksityinen avain:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Käyttäjän varmenne:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Avain:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Näytä avain"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP-indeksi:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Tyyppi:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Valitse varmenteen myöntäjän varmenne..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Valitse oma varmenne..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Valitse oma yksityinen avain..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER- PEM- tai PKCS#12 -yksityiset avaimet (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER- tai PEM-varmenteet (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunneloitu TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Suojattu EAP (PEAP)"
+
+#: ../src/nmn-list.c:68
+msgid " and "
+msgstr ""
+
+#: ../src/nmn-list.c:79
+msgid "Sorry, we can't find any networks."
+msgstr ""
+
+#: ../src/nmn-list.c:82
+msgid " You could try disabling Offline mode."
+msgstr ""
+
+#: ../src/nmn-list.c:102
+msgid " You could try turning on "
+msgstr ""
+
+#: ../src/nmn-list.c:110 ../src/nmn-applet.c:343
+msgid "Wired"
+msgstr ""
+
+#: ../src/nmn-applet.c:304
+#, fuzzy
+msgid "Add new connection"
+msgstr "Lisää uusi yhteys"
+
+#: ../src/nmn-applet.c:310
+#, fuzzy
+msgid "Networks"
+msgstr "_Verkon nimi:"
+
+#: ../src/nmn-applet.c:355
+msgid "WiMAX"
+msgstr ""
+
+#: ../src/nmn-applet.c:362
+msgid "Bluetooth"
+msgstr ""
+
+#: ../src/nmn-applet.c:376
+msgid "Offline mode"
+msgstr ""
+
+#: ../src/nmn-applet.c:382
+#, fuzzy
+msgid "This will disable all your connections"
+msgstr "Tämä poistaa kaikki langattomat yhteydet käytöstä"
+
+#: ../src/main.c:54
+msgid "Run in standalone mode"
+msgstr ""
+
+#: ../src/main.c:61
+msgid "NetworkManager Netbook"
+msgstr ""
+
+#: ../src/main.c:62
+msgid "- NetworkManager Netbook"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:67
+#, fuzzy
+msgid "network"
+msgstr "Piilotettu verkko"
+
+#: ../src/nmn-panel-client.c:181
+#, fuzzy
+msgid "Network connected"
+msgstr "Yhteys katkaistu"
+
+#: ../src/nmn-panel-client.c:185
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:188
+#, c-format
+msgid "You're now connected to %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:190
+msgid "You're now connected to network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:192
+#, fuzzy
+msgid "Network lost"
+msgstr "_Verkon nimi:"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:199
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:201
+msgid "Sorry, we've lost your connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:236
+#, c-format
+msgid "networks - not connected"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:239
+#, fuzzy, c-format
+msgid "networks - connecting"
+msgstr "Lisää uusi yhteys"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - %s - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:249
+#, c-format
+msgid "networks - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:251
+#, fuzzy
+msgid "networks - connected"
+msgstr "Yhteys katkaistu"
+
+#: ../src/nmn-item-renderer.c:140
+msgid "Connected"
+msgstr "Yhteydessä"
+
+#: ../src/nmn-item-renderer.c:141 ../src/nmn-item-renderer.c:145
+msgid "Disconnect"
+msgstr "Katkaise yhteys"
+
+#: ../src/nmn-item-renderer.c:144
+msgid "Connecting..."
+msgstr "Yhdistetään..."
+
+#: ../src/nmn-item-renderer.c:148
+msgid "Disconnected"
+msgstr "Yhteys katkaistu"
+
+#: ../src/nmn-item-renderer.c:149
+msgid "Connect"
+msgstr "Yhdistä"
+
+#: ../src/nmn-item-renderer.c:263
+msgid "Really remove?"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:279
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+
+#: ../src/nmn-connection-details.c:104
+msgid "(none)"
+msgstr "(ei mitään)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:475
+msgid "Connect by:"
+msgstr "Yhdistämistapa:"
+
+#: ../src/nmn-connection-details.c:478
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:483
+msgid "Manual"
+msgstr "Manuaalinen"
+
+#: ../src/nmn-connection-details.c:488
+msgid "Link Local"
+msgstr "Linkki paikalliseen"
+
+#. Address
+#: ../src/nmn-connection-details.c:496
+msgid "IP Address:"
+msgstr "IP-osoite:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:505
+msgid "Subnet mask:"
+msgstr "Aliverkon peite:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:514
+msgid "Router:"
+msgstr "Reititin:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:523
+msgid "DNS:"
+msgstr "DNS:"
+
+#: ../src/nmn-new-connection.c:247
+msgid "3G disabled"
+msgstr "3G poistettu käytöstä"
+
+#: ../src/nmn-new-connection.c:252
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Havaittiin sisäinen 3G-modeemi ja SIM-kortti"
+
+#: ../src/nmn-new-connection.c:254
+msgid "No modems detected"
+msgstr "Modeemeita ei ole havaittu"
+
+#: ../src/nmn-new-connection.c:611
+msgid "Add a new connection"
+msgstr "Lisää uusi yhteys"
+
+#: ../src/nmn-new-connection.c:631
+msgid "Hidden network"
+msgstr "Piilotettu verkko"
+
+#: ../src/nmn-new-connection.c:657
+msgid "Save connection"
+msgstr "Tallenna yhteys"
+
+#: ../src/nmn-new-connection.c:666
+msgid "Return to Networking"
+msgstr "Palaa verkkoon"
+
+#: ../src/nmn-mobile-providers.c:504
+msgid "Default"
+msgstr "Oletus"
+
+#~ msgid "Unavailable"
+#~ msgstr "Ei käytettävissä"
+
+#~ msgid "On"
+#~ msgstr "Päällä"
+
+#~ msgid "Off"
+#~ msgstr "Pois päältä"
+
+#~ msgid "Advanced"
+#~ msgstr "Lisäasetukset"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>Lentotila</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>Langallinen</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>Lisää uusi yhteys</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>Verkot</b></big>"
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..ed54a32
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,670 @@
+# Copyright (C) 2006-2009 Listed contributors
+# This file is distributed under the same license as the
+# network-manager-netbook package.
+#
+# SuSE Linux Products GmbH, Nuernberg, 2006
+# Nicolas Repentin <nicolas shivaserv fr>, 2009-2010
+# Claude Paroz <claude 2xlibre net>, 2009
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook fr\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-03-12 07:37+0000\n"
+"PO-Revision-Date: 2010-03-13 21:19+0100\n"
+"Last-Translator: Nicolas Repentin <nicolas repentin gmail com>\n"
+"Language-Team: GNOME French Team <gnomefr traduc org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Gérer vos connexions réseau"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Accéder à Internet en utilisant votre téléphone portable"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Valeur par défaut"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "Bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Impossible de supprimer la connexion : %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Impossible d'activer le périphérique : %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Impossible de désactiver le périphérique : %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "câblé"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "�chec de déblocage PIN : %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Périphérique GSM verrouillé"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Aucun"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Clé WEP 40/128 bits"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "Phrase secrète WEP 128 bits"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "WEP dynamique (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA et WPA2 Personnel"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA et WPA2 Entreprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "C_réer"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Des clés de codage ou des mots de passe sont requis pour accéder au réseau "
+"sans fil « %s »."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Une authentification au réseau sans fil est requise."
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Une authentification est requise par le réseau sans fil."
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Créer un nouveau réseau sans fil"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nouveau réseau sans fil"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Entrez un nom pour le réseau sans fil que vous souhaitez créer."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Se connecter à un réseau sans fil masqué"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Réseau sans fil masqué"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Entrez le nom et les détails de sécurité du réseau sans fil masqué auquel "
+"vous souhaitez vous connecter."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "Se c_onnecter"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Connexion :"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Autre réseau sans fil..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "_Adaptateur sans fil :"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Nom du réseau :"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "Sécurité sans _fil :"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Aucun certificat d'autorité de "
+"certification sélectionné</span>\n"
+"\n"
+"Si vous ne choisissez pas un certificat d'une autorité de certification "
+"(CA), vous risquez de vous connecter à des réseaux sans fil non sécurisés "
+"malveillants. Voulez-vous sélectionner un certificat d'autorité de "
+"certification ?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Sélectionner un certificat CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Ne plus m'avertir"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorer"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Authentification :"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Mot de passe :"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Afficher le mot de passe"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Nom d'utilisateur :"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Identité anonyme :"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Certificat CAÂ :"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Authentification interne :"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Version PEAPÂ :"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identité :"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Mot de passe de la clé privée :"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Clé privée :"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Certificat utilisateur :"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Clé :"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Afficher la clé"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Index WEPÂ :"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Type :"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Choisir un certificat d'une autorité de certification..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Choisir votre certificat personnel..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Choisir votre clé privée..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Clés privées DER, PEM ou PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "Certificats DER ou PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunnel TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "EAP protégé (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Type de message"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Le type du message"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Bordure de la zone de contenu"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Ã?paisseur de la bordure autour de la zone du contenu"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Espacement de la zone de contenu"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Espace entre les éléments de la zone"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Espacement des boutons"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Espace entre les boutons"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Bordure de zone d'action"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Ã?paisseur de la bordure autour de la zone d'action"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " et "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Désolé, aucun réseau trouvé."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Essayez de désactiver le mode hors-ligne."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Essayez d'activer la connexion "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Par câble"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Ajouter une nouvelle connexion"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Réseaux"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Mode hors-ligne"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Cette opération désactive toutes les connexions"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Exécuter en mode autonome"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Exécuter en mode bureau"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Connecté"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Se déconnecter"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Connexion en cours"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Annuler"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Déconnecté"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Se connecter"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Disponible"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Impossible de mettre à jour la connexion : %s"
+
+# Window title
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Confirmation de suppression"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Non, enregistrer"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Oui, supprimer"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Voulez-vous supprimer le réseau %2$s « %1$s » ? Le mot\n"
+"de passe sera aussi supprimé et vous ne serez plus\n"
+"automatiquement connecté à « %3$s »."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Avancé"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Supprimer la connexion"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "réseau"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Réseau connecté"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Vous êtes maintenant connecté à %s, un réseau %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Vous êtes maintenant connecté au réseau %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Vous êtes maintenant connecté au réseau"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Réseau perdu"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Désolé, votre connexion %s au réseau %s a été perdue"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Désolé, votre connexion %s a été perdue"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Désolé, votre connexion a été perdue"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "Réseaux - non connecté"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "Réseaux - connexion en cours"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "Réseaux - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "Réseaux - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "Réseaux - connecté"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Débloquer"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Désactiver le code PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(aucun)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Mode de connexion :"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manuel"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Lien local"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Adresse IPÂ :"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Masque de sous-réseau :"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Routeur :"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNSÂ :"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Votre adresse MACÂ :"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G désactivé"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "Le modem 3G est verrouillé"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Carte SIM et modem 3G interne détectés"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Aucun modem détecté"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Ajouter une nouvelle connexion"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Réseau masqué"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Enregistrer la connexion"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Retour à la configuration du réseau"
diff --git a/po/gl.po b/po/gl.po
new file mode 100644
index 0000000..530ba50
--- /dev/null
+++ b/po/gl.po
@@ -0,0 +1,664 @@
+# Galician translation for network-manager-netbook.
+# Copyright (C) 2010 network-manager-netbook's COPYRIGHT HOLDER
+# This file is distributed under the same license as the network-manager-netbook package.
+# Francisco Diéguez <frandieguez ubuntu com>, 2010.
+# Fran Diéguez <frandieguez ubuntu com>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook master\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-04-09 19:47+0200\n"
+"PO-Revision-Date: 2010-04-09 19:47+0200\n"
+"Last-Translator: Fran Diéguez <frandieguez ubuntu com>\n"
+"Language-Team: Galician <gnome g11n net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Controla as súas conexións de rede"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Acceda á Internet usando o seu teléfono móbil"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Predefinido"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Non foi posÃbel eliminar a conexión: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Non foi posÃbel activar o dispositivo: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Non foi posÃbel desactivar o dispositivo: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "con cabos"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Produciuse un fallo ao desbloquear o PIN: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Dispositivo GSM bloqueado"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Ningún"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Chave WEP de 40/128-bits"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "Frase de paso WEB de 128 bits"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "WEP dinámico (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 persoal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 empresarial"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "C_rear"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"As contrasinais e chaves de cifrado requÃrense para acceder ás redes "
+"inarámicas '%s'."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "RequÃrese a autenticación de rede inarámica "
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "A rede inarámica require autenticación"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Crear unha nova rede inarámica"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nova rede inarámica"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Insira un nome para a rede inarámica que desexa crear."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Conectar a unha rede inarámica oculta"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Rede inarámica oculta"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Insira o nome e os detalles de seguridade da rede inarámica oculta á que "
+"desexa conectar."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "C_onectar"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Conexión:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Outras redes inarámicas..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "_Adaptador inarámico:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Nome da rede:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "Seguridade inará_mica:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Non seleccionou ningún certificado de "
+"autoridade</span>\n"
+"\n"
+"Se non usa un certificado de Autoridade de certificación (CA) pode causar "
+"que teña conexións non seguras, máis aÃnda nas redes inarámicas. Desexa "
+"seleccionar un certificado de autoridade de certificación?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Seleccionar certificado de CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Non avisarme de novo"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorar"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Autenticación:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Contrasinal:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Mostrar contrasinal"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Nome de usuario:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Identidade anónima:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Certificado de CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Autenticación interna:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Versión de PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identidade:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Contrasinal da chave privada:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Chave privada:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Certificado de usuario:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Chave:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Mostrar chave"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Ã?ndice WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Tipo:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Seleccione un certificado de Autoridade de Certificación..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Seleccione o seu certificado persoal..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Seleccione a súa chave privada..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM, ou chaves privadas PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER ou certificados PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "TLS por medio de túnel"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "EAP protexido (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Tipo de mensaxe"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "O tipo de mensaxe"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Borde da área de contido"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Anchura do borde ao redor da área de contido"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Espazo da área de contido"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "O espazo entre os elementos da área"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Espazo entre botóns"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "O espazo entre os botóns"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Borde da área de acción"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Anchura do borde ao redor da área de acción"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " e "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Desculpe, non é posÃbel encontrar ningunha rede."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr "Pode tentar desactivando o modo desconectado."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr "Pode tentar activando"
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Con cabos"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Engadir nova conexión"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Redes"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Modo desconectado"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Isto desactivará todas as conexións"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Executar en modo autónomo"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Executar en modo escritorio"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Conectado"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Desconectado"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Conectando"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Desconectado"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Conectar"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "DispoñÃbel"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Non foi posÃbel actualizar a conexión: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Está seguro que quere eliminala?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Non, gardar"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Si, eliminar"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Desexa eliminar a rede %s '%s'? Iso esquencerá\n"
+"o contrasinal e non poderá conectar automaticamente\n"
+"nunca máis a '%s'."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Avanzado"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Eliminar a conexión"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "rede"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Conectado á rede"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Vostede agora está conectado a %s, unha rede %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Vostede agora está conectado a unha rede %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Vostede agora está conectado á rede"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Rede perdida"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Perdeu a conexión %s a %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Perdeu a súa conexión %s"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Perdeu a súa conexión"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "redes - non conectado"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "redes - conectando"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "redes - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "redes - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "redes - conectado"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Desbloquear"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Desactivar PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(ningúnha)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Conectado por:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manual"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Ligazón local"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Enderezo IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Máscara de subrede:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Router:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "O seu enderezo MAC:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G desactivado"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "O modem 3G está bloqueado"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Deteoctouse un módem 3G interno e unha tarxeta SIM"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Non se detectou ningún módem"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Engadir unha nova conexión"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Rede oculta"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Gardar conexión"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Voltar a Rede"
diff --git a/po/gu.po b/po/gu.po
new file mode 100644
index 0000000..be2ab40
--- /dev/null
+++ b/po/gu.po
@@ -0,0 +1,552 @@
+# translation of network-manager-netbook.po.master.gu.po to Gujarati
+# Gujarati translation for network-manager-netbook.
+# Copyright (C) 2009 network-manager-netbook's COPYRIGHT HOLDER
+# This file is distributed under the same license as the network-manager-netbook package.
+#
+# Sweta Kothari <swkothar redhat com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook.po.master.gu\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-27 16:38+0200\n"
+"PO-Revision-Date: 2009-10-28 16:16+0530\n"
+"Last-Translator: Sweta Kothari <swkothar redhat com>\n"
+"Language-Team: Gujarati\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n!=1);\n"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+#, fuzzy
+msgid "wired"
+msgstr "વાયરવાળ��"
+
+#: ../libnm-gtk/nm-ethernet-item.c:88
+msgid "802.1x"
+msgstr ""
+
+#: ../libnm-gtk/nm-wifi-item.c:60 ../src/nmn-list.c:105
+#: ../src/nmn-applet.c:337 ../src/nmn-new-connection.c:636
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/nm-gsm-item.c:36 ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:115 ../src/nmn-applet.c:349
+#: ../src/nmn-new-connection.c:661
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "��� નહિ�"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-bit ��"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bit પાસફ�ર��"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamic WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "બનાવ� (_r)"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "વાયરલ�સ ન��વર�� સત�તાધિ�રણ �ર�ર�"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "સત�તાધિ�રણ � વાયરલ�સ ન��વર�� દ�દારા �ર�ર� ��"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "નવા� વાયરલ�સ ન��વર��ન� બનાવ�"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "નવ�� વાયરલ�સ ન��વર��"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "વાયરલ�સ ન��વર�� �� તમ� બનાવવા મા��� �� ત� મા�� નામન� દા�લ �ર�."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "��પાય�લ વાયરલ�સ ન��વર�� ન� ��ડ�"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "��પાય�લ વાયરલ�સ ન��વર��"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "��ડાવ� (_o)"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "��ડાણ:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "બ��ા વાયરલ�સ ન��વર��..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "વાયરલ�સ �ડપ��ર (_a):"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "ન��વર�� નામ (_N):"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "વાયરલ�સ સ�ર��ષા (_W):"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "CA પ�રમાણપત�રન� પસ�દ �ર�"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "ફર�થ� મન� ��તવ� નહિ�"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "�વ�ણ�"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "સત�તાધિ�રણ:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "પાસવર�ડ:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "પાસવર�ડન� બતાવ�"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "વપરાશ�ર�તા નામ:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr ""
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA પ�રમાણપત�ર:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr ""
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP �વ�ત�તિ:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr ""
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "�ાન�� �� પાસવર�ડ:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "�ાન�� ��:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "વપરાશ�ર�તા પ�રમાણપત�ર:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "��:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "��ન� બતાવ�"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP �ન���રમણિ�ા:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "પ�ર�ાર:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Certificate Authority પ�રમાણપત�રન� પસ�દ �ર�..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "તમારા� વ�ય��તિ�ત પ�રમાણપત�રન� પસ�દ �ર�..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "તમાર� �ાન�� �� ન� પસ�દ �ર�..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM, �થવા PKCS#12 �ાન�� ��� (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER or PEM પ�રમાણપત�ર� (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunneled TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "સ�ર��ષિત EAP (PEAP)"
+
+#: ../src/nmn-list.c:68
+msgid " and "
+msgstr " �ન� "
+
+#: ../src/nmn-list.c:79
+msgid "Sorry, we can't find any networks."
+msgstr "દિલ��ર ���, �મ� ���પણ ન��વર���ન� શ�ધ� શ��યા નહિ�."
+
+#: ../src/nmn-list.c:82
+msgid " You could try disabling Offline mode."
+msgstr "તમ� �ફલા�ન સ�થિતિન� નિષ���રિય �રવાન� પ�રયત�ન �ર� શ�� ��."
+
+#: ../src/nmn-list.c:102
+msgid " You could try turning on "
+msgstr ""
+
+#: ../src/nmn-list.c:110 ../src/nmn-applet.c:343
+msgid "Wired"
+msgstr "વાયરવાળ��"
+
+#: ../src/nmn-applet.c:304
+#, fuzzy
+msgid "Add new connection"
+msgstr "નવા� ��ડાણન� �મ�ર�"
+
+#: ../src/nmn-applet.c:310
+#, fuzzy
+msgid "Networks"
+msgstr "ન��વર�� નામ (_N):"
+
+#: ../src/nmn-applet.c:355
+msgid "WiMAX"
+msgstr ""
+
+#: ../src/nmn-applet.c:362
+msgid "Bluetooth"
+msgstr ""
+
+#: ../src/nmn-applet.c:376
+#, fuzzy
+msgid "Offline mode"
+msgstr "<b>�ફલા�ન સ�થિતિ</b>"
+
+#: ../src/nmn-applet.c:382
+#, fuzzy
+msgid "This will disable all your connections"
+msgstr "� બધા ન��વર�� ��ડાણ�ન� નિષ���રિય �રશ�"
+
+#: ../src/main.c:54
+msgid "Run in standalone mode"
+msgstr ""
+
+#: ../src/main.c:61
+msgid "NetworkManager Netbook"
+msgstr ""
+
+#: ../src/main.c:62
+msgid "- NetworkManager Netbook"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:67
+#, fuzzy
+msgid "network"
+msgstr "��પાય�લ ન��વર��"
+
+#: ../src/nmn-panel-client.c:181
+#, fuzzy
+msgid "Network connected"
+msgstr "��ડાય�લ"
+
+#: ../src/nmn-panel-client.c:185
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:188
+#, c-format
+msgid "You're now connected to %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:190
+msgid "You're now connected to network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:192
+#, fuzzy
+msgid "Network lost"
+msgstr "ન��વર�� નામ (_N):"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:199
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:201
+msgid "Sorry, we've lost your connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:236
+#, c-format
+msgid "networks - not connected"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:239
+#, fuzzy, c-format
+msgid "networks - connecting"
+msgstr "નવા� ��ડાણન� �મ�ર�"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - %s - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:249
+#, c-format
+msgid "networks - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:251
+msgid "networks - connected"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:140
+msgid "Connected"
+msgstr "��ડાય�લ"
+
+#: ../src/nmn-item-renderer.c:141 ../src/nmn-item-renderer.c:145
+msgid "Disconnect"
+msgstr "��ડાણન� ત�ડ�"
+
+#: ../src/nmn-item-renderer.c:144
+msgid "Connecting..."
+msgstr "��ડાણ �ર� રહ�યા ��..."
+
+#: ../src/nmn-item-renderer.c:148
+msgid "Disconnected"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:149
+msgid "Connect"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:263
+msgid "Really remove?"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:279
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+
+#: ../src/nmn-connection-details.c:104
+msgid "(none)"
+msgstr "(��� નહિ�)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:475
+msgid "Connect by:"
+msgstr "વડ� ��ડાવ�:"
+
+#: ../src/nmn-connection-details.c:478
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:483
+msgid "Manual"
+msgstr ""
+
+#: ../src/nmn-connection-details.c:488
+msgid "Link Local"
+msgstr ""
+
+#. Address
+#: ../src/nmn-connection-details.c:496
+msgid "IP Address:"
+msgstr "IP સરનામ��:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:505
+msgid "Subnet mask:"
+msgstr "સબન�� માસ��:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:514
+msgid "Router:"
+msgstr "રા��ર:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:523
+msgid "DNS:"
+msgstr "DNS:"
+
+#: ../src/nmn-new-connection.c:247
+msgid "3G disabled"
+msgstr "3G નિષ���રિય થય�લ"
+
+#: ../src/nmn-new-connection.c:252
+msgid "Internal 3G modem and SIM card detected"
+msgstr "��તરિ� 3G મ�ડ�મ �ન� SIM �ાર�ડ મળ�યા�"
+
+#: ../src/nmn-new-connection.c:254
+msgid "No modems detected"
+msgstr "મ�ડ�મ� મળ�યા નહિ�"
+
+#: ../src/nmn-new-connection.c:611
+msgid "Add a new connection"
+msgstr "નવા� ��ડાણન� �મ�ર�"
+
+#: ../src/nmn-new-connection.c:631
+msgid "Hidden network"
+msgstr "��પાય�લ ન��વર��"
+
+#: ../src/nmn-new-connection.c:657
+msgid "Save connection"
+msgstr "��ડાણન� સ���રહ�"
+
+#: ../src/nmn-new-connection.c:666
+msgid "Return to Networking"
+msgstr ""
+
+#: ../src/nmn-mobile-providers.c:504
+msgid "Default"
+msgstr "મà«?ળàªà«?ત"
+
+#~ msgid "Unavailable"
+#~ msgstr "બિન�પલ�બધ"
+
+#~ msgid "On"
+#~ msgstr "�ાલ�"
+
+#~ msgid "Off"
+#~ msgstr "બ�ધ"
+
+#~ msgid "Advanced"
+#~ msgstr "�ન�નત"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>વાયરવાળ��</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>નવા� ��ડાણન� �મ�ર�</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>ન��વર���</b></big>"
diff --git a/po/hu.po b/po/hu.po
new file mode 100644
index 0000000..293be2c
--- /dev/null
+++ b/po/hu.po
@@ -0,0 +1,666 @@
+# Hungarian translation of network-manager-netbook
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# Copyright (C) 2006, 2010, Free Software Foundation, Inc.
+# This file is distributed under the same license as the network-manager-netbook package.
+#
+# Gabor Kelemen <kelemeng at gnome dot hu>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook master\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-06-05 20:38+0200\n"
+"PO-Revision-Date: 2010-06-05 20:37+0200\n"
+"Last-Translator: Gabor Kelemen <kelemeng at gnome dot hu>\n"
+"Language-Team: Hungarian <gnome at fsf dot hu>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Hálózati kapcsolatok felügyelete"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "HálózatkezelÅ? netbookokra"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Az internet elérése mobiltelefonnal"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Alapértelmezett"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Nem törölhetÅ? a hálózati kapcsolat: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Nem aktiválható az eszköz: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Nem deaktiválható az eszköz: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "vezetékes"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "A PIN-feloldás meghiúsult: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "A GSM-eszköz zárolva"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Nincs"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128 bites kulcs"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128 bites jelszó"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dinamikus WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "Létre_hozás"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"A(z) â??%sâ?? vezeték nélküli hálózat eléréséhez jelszó vagy titkosÃtási kulcs "
+"szükséges."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Vezeték nélküli hálózati hitelesÃtés szükséges"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "A vezeték nélküli hálózathoz hitelesÃtés szükséges"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "�j vezeték nélküli hálózat létrehozása"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "�j vezeték nélküli hálózat"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Add meg a létrehozni kÃvánt vezeték nélküli hálózat nevét."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Kapcsolódás rejtett vezeték nélküli hálózathoz"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Rejtett vezeték nélküli hálózat"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Add meg annak a rejtett vezeték nélküli hálózatnak a nevét és biztonsági "
+"adatait, amelyikhez kapcsolódni szeretnél."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "C_satlakozás"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Kapcsolat:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Egyéb vezeték nélküli hálózat..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Vezeték nélküli _adapter:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Hálózat neve:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "Ve_zeték nélküli biztonság:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Nincs kiválasztott "
+"hitelesÃtésszolgáltatói tanúsÃtvány</span>\n"
+"\n"
+"A hitelesÃtésszolgáltatói tanúsÃtvány használatának mellÅ?zése nem "
+"biztonságos, engedélyezetlen vezeték nélküli hálózatokhoz való csatlakozást "
+"eredményezhet. Választasz most hitelesÃtésszolgáltatói tanúsÃtványt?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "HitelesÃtésszolgáltatói tanúsÃtvány választása"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Ne jelenjen meg legközelebb ez a figyelmeztetés"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Figyelmen kÃvül hagyás"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "HitelesÃtés:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Jelszó:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Jelszó megjelenÃtése"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Felhasználónév:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Névtelen identitás:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "HitelesÃtésszolgáltatói tanúsÃtvány:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "BelsÅ? hitelesÃtés:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP-verzió:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "AzonosÃtó:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Személyes kulcs jelszava:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Személyes kulcs:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Felhasználói tanúsÃtvány:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Kulcs:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Kulcs megjelenÃtése"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP-index:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "TÃpus:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "HitelesÃtésszolgáltatói tanúsÃtvány választása..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Személyes tanúsÃtvány választása..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Személyes kulcs választása..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM vagy PKCS#12 személyes kulcs (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER vagy PEM tanúsÃtvány (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Bújtatott TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Protected EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Ã?zenettÃpus"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Az üzenet tÃpusa"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Tartalomterület-szegély"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "A tartalomterület körüli szegély szélessége"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Tartalomterület térköze"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "A terület elemei közötti térköz"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Gombok távolsága"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "A gombok egymástól való távolsága"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Műveletterület-szegély"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "A műveletterület körüli szegély szélessége"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " és "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Elnézést, nem található egy hálózat sem."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Próbálja kikapcsolni a kapcsolat nélküli módot."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Próbálja bekapcsolni ezt: "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Vezetékes"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "�j kapcsolat hozzáadása"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Hálózatok"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Kapcsolat nélküli mód"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Ezzel az összes kapcsolat le lesz tiltva"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Futás önálló módban"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Futás asztali módban"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "HálózatkezelÅ? netbookokra"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "â?? HálózatkezelÅ? netbookokra"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Csatlakozva"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Kapcsolat bontása"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Csatlakozás"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Mégse"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Nincs kapcsolat"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Csatlakozás"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "ElérhetÅ?"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "A kapcsolat nem frissÃthetÅ?: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Valóban eltávolÃtja?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Nem, mentem"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Igen, törlöm"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"El kÃvánja távolÃtani a(z) â??%sâ?? nevű %s hálózatot? Ezután\n"
+"a program elfelejti a jelszót, és nem lesz képes többé\n"
+"automatikusan csatlakozni ehhez: â??%sâ??."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Speciális"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Kapcsolat eltávolÃtása"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "hálózat"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Hálózat csatlakoztatva"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Mostantól a(z) â??%sâ?? nevű %s hálózatra csatlakozik"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Mostantól egy %s hálózatra csatlakozik"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Mostantól csatlakozik a hálózatra"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "A hálózat elveszett"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Elnézést, elveszett a(z) %s kapcsolata a(z) â??%sâ?? nevű hálózathoz"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Elnézést, elveszett a(z) %s kapcsolata"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Elnézést, elveszett a kapcsolata"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "hálózatok - nem csatlakozik"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "hálózatok - csatlakozás"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "hálózatok - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "hálózatok - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "hálózatok - csatlakozva"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Feloldás"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "PIN letiltása"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(nincs)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Csatlakozás:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manuális"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Helyi kapcsolat"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP-cÃm:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Alhálózati maszk:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "�tválasztó:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Az Ã?n MAC-cÃme:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G letiltva"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "A 3G modem zárolva"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "BelsÅ? 3G-modem és SIM-kártya észlelhetÅ?"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Nem található modem"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "�j kapcsolat hozzáadása"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Rejtett hálózat"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Kapcsolat mentése"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Vissza a Hálózathoz"
diff --git a/po/id.po b/po/id.po
new file mode 100644
index 0000000..9ae27be
--- /dev/null
+++ b/po/id.po
@@ -0,0 +1,660 @@
+# Translation of network-manager-netbook into Indonesian
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the network-manager-netbook package.
+# Andika Triwidada <andika gmail com>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-04-02 11:39+0000\n"
+"PO-Revision-Date: 2010-04-04 09:46+0700\n"
+"Last-Translator: Andika Triwidada <andika gmail com>\n"
+"Language-Team: Indonesian <id li org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Indonesian\n"
+"X-Poedit-Country: Indonesia\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Kendalikan sambungan jaringan Anda"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Akses Internet memakai telepon seluler Anda"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Baku"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Tak dapat menghapus sambungan: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Tak bisa mengaktifkan perangkat: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Tak bisa mematikan perangkat: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "kabel"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50
+#: ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498
+#: ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Buka kunci PIN gagal: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Perangkat GSM terkunci"
+
+#: ../libnm-gtk/nm-wifi-item.c:61
+#: ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476
+#: ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Tidak ada"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Kunci WEP 40/128-bit"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "Frasa-kunci WEP 128-bit"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "WEP Dinamis (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "B_uat"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid "Passwords or encryption keys are required to access the wireless network '%s'."
+msgstr "Kata sandi atau kunci penyandian diperlukan untuk mengakses jaringan nirkabel '%s'."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Otentikasi Jaringan Nirkabel Diperlukan"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Otentikasi dibutuhkan oleh jaringan nirkabel"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Buat Jaringan Nirkabel Baru"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Jaringan nirkabel baru"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Masukkan sebuah nama untuk jaringan nirkabel yang ingin Anda buat."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Sambung ke Jaringan Nirkabel Tersembunyi"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Jaringan nirkabel tersembunyi"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid "Enter the name and security details of the hidden wireless network you wish to connect to."
+msgstr "Masukkan nama dan detil keamanan dari jaringan nirkabel tersembunyi yang ingin Anda sambungkan."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "S_ambung"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Sambungan:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Jaringan Nirkabel Lain..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "_Adaptor nirkabel:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Nama Jaringan:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Keamanan Nirkabel:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections to insecure, rogue wireless networks. Would you like to choose a Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Tak ada sertifikat Certificate Authority yang dipilih</span>\n"
+"\n"
+"Tak memakai sertifikat Certificate Authority (CA) bisa menghasilkan sambungan ke jaringan nirkabel liar yang tak aman. Apakah Anda ingin memilih sebuah sertificat Certificate Authority?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Pilih Sertifikat CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Jangan peringatkan saya lagi"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Abaikan"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Otentikasi:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Kata sandi:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Tampilkan kata sandi"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Nama Pengguna:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Identitas Anonim:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Sertifikat CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Otentikasi Inner:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Versi PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identitas:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Kata Sandi Kunci Privat:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Kunci Privat:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Sertifikat Pengguna:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Kunci:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Tampilkan kunci"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Indeks WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Jenis:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Pilih sebuah sertifikat Certificate Authority..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Pilih sertifikat pribadi Anda..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Pilih kunci privat Anda..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Kunci privat DER, PEM, atau PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "Sertfikat DER atau PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunneled TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "EAP Terlindungi (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Tipe Pesan"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Tipe pesan"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Bingkai area isi"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Lebar bingkai sekeliling wilayah isi"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Jarak wilayah isi"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Jarak antar elemen dari wilayah"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Jarak tombol"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Jarak antara tombol-tombol"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Bingkai area aksi"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Lebar tepi sekitar wilayah aksi"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " dan "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Maaf, kami tak menemukan jaringan apapun."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Anda dapat mencoba mematikan mode Terputus."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Anda dapat mencoba menyalakan "
+
+#: ../src/nmn-list.c:112
+#: ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Kabel"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Tambah sambungan baru"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Jaringan"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Mode luring"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Ini akan mematikan semua sambungan Anda"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Jalankan di mode mandiri"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Jalankan di mode desktop"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "ManajerJaringan Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- ManajerJaringan Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Terhubung"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Putuskan"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Menghubungkan"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Batal"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Terputus"
+
+#: ../src/nmn-network-renderer.c:115
+#: ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Sambungkan"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Tersedia"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Tak dapat memperbaruhi sambungan: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Benar-benar hapus?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Tidak, simpan"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Ya, hapus"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Apakah Anda ingin menghapus '%s' jaringan %s? Ini\n"
+"akan melupakan kata sandi dan Anda tidak lagi akan\n"
+"tersambung otomatis ke '%s'."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Tingkat lanjut"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Hapus sambungan"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "jaringan"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Tersambung jaringan"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Anda kini tersambung ke %s, suatu jaringan %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Anda kini tersambung ke jaringan %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Anda kini tersambung ke jaringan"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Jaringan putus"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Maaf, sambungan %s Anda ke %s terputus"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Maaf, sambungan %s Anda terputus"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Maaf, sambungan Anda terputus"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "jaringan - tak terhubung"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "jaringan - sedang menyambung"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "jaringan - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "jaringan - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "jaringan - tersambung"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Buka-kunci"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Matikan PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(tiada)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Menyambung dengan:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manual"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Link Lokal"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Alamat IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Mask subnet:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Router:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Alamat MAC Anda:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3D dimatikan"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "Modem 3G terkunci"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Modem 3G internal dan kartu SIM terdeteksi"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Tak ada modem terdeteksi"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Tambah sambungan baru"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Jaringan tersembunyi"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Simpan sambungan"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Kembali ke Jaringan"
+
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..51f1120
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,669 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# Copyright (C) 2010 the network-manager-netbook copyright holders
+# This file is distributed under the same license as the network-manager-netbook package.
+# Milo Casagrande <milo ubuntu com>, 2010.
+# Francesco Marletta <francesco marletta tiscali it>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-03-12 07:37+0000\n"
+"PO-Revision-Date: 2010-03-12 09:33+0100\n"
+"Last-Translator: Francesco Marletta <francesco marletta tiscali it>\n"
+"Language-Team: Italian <tp lists linux it>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Controlla le proprie connessioni di rete"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Accedere a Internet usando il telefono cellulare"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Predefinito"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, fuzzy, c-format
+#| msgid "Control your network connections"
+msgid "Could not delete connection: %s"
+msgstr "Controlla le proprie connessioni di rete"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr ""
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr ""
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "via cavo"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Dispositivo GSM bloccato"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Nessuno"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Chiave WEP a 40/128 bit"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "Passphrase WEP a 128 bit"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "WEP dinamico (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA e WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA e WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "C_rea"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Per accedere alla rete senza fili «%s» è necessario disporre di password o "
+"chiavi di cifratura."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Richiesta autenticazione per rete senza fili"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Autenticazione richiesta dalla rete senza fili"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Crea nuova rete senza fili"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nuova rete senza fili"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Inserire un nome per la rete senza fili da creare."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Connetti a rete senza fili nascosta"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Rete senza fili nascosta"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Inserire il nome e i dettagli di sicurezza della rete senza fili alla quale "
+"connettersi."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "C_onnetti"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Connessione:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Altra rete senza fili..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "_Adattatore senza fili:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Nome rete:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "Sicurezza _senza fili:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Non è stato selezionato un certificato "
+"di un'autorità di certificazione</span>\n"
+"\n"
+"Se non si utilizza un certificato di un'autorità di certificazione (CA) si "
+"rischia di connettersi a reti senza fili insicure e pericolose. Selezionare "
+"un certificato di un'autorità di certificazione?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Scegliere un certificato CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Non visualizzare più questo messaggio"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignora"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Autenticazione:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Password:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Mostra password"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Nome utente:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Identità anonima:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Certificato CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Autenticazione interna:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Versione PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identità :"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Password chiave privata:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Chiave privata:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Certificato utente:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Chiave:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Mostra chiave"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Indice WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Tipo:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Scegliere il certificato di un'autorità di certificazione..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Scegliere il certificato personale..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Scegliere la chiave privata..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Chiavi private DER, PEM o PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "Certificati DER o PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "TLS via tunnel"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "EAP protetto (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr ""
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr ""
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr ""
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr ""
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr ""
+
+#: ../src/gtkinfobar.c:444
+#, fuzzy
+#| msgid "Connecting"
+msgid "Content area spacing"
+msgstr "Connessione in corso"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr ""
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr ""
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr ""
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr ""
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr ""
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " e "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Impossibile trovare alcuna rete."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr "� possibile provare disabilitando la modalità fuori rete."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr "Ã? possibile provare attivando "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Via cavo"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Aggiungi nuova connessione"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Reti"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Modalità fuori rete"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Questo disabiliterà tutte le connessioni"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Avvia in modalità standalone"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Avvia in modalità desktop"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Connessi"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Disconnetti"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Connessione in corso"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Annulla"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Disconnessi"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Connetti"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Disponibile"
+
+#: ../src/nmn-network-renderer.c:157
+#, fuzzy, c-format
+#| msgid "Add new connection"
+msgid "Could not update connection: %s"
+msgstr "Aggiungi nuova connessione"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Rimuovere veramente?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "No, salva"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Sì, rimuovi"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Rimuovere la rete «%s» %s? Questo rimuoverà \n"
+"la password e non sarà più possibile connettersi\n"
+"automaticamente a «%s»."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Avanzate"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Rimuovi connessione"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "rete"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Rete collegata"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Attualmente connessi a %s, una rete %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Attualmente connessi a una rete %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Attualmente connessi a una rete"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Connessione persa"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "La connessione %s a %s è stata persa"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "La connessione %s è stata persa"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "La connessione è stata persa"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "reti - non connessi"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "reti - connessione in corso"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "reti - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "reti - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "reti - connessi"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Sblocca"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Disabilita PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(nessuno)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Connetti via:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manuale"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Link Local"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Indirizzo IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Maschera sottorete:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Router:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Indirizzo MAC:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G disabilitato"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "Modem 3G bloccato"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Rilevati modem 3G interno e scheda SIM"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Nessun modem rilevato"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Aggiungi nuova connessione"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Rete nascosta"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Salva connessione"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Torna a Networking"
diff --git a/po/ja.po b/po/ja.po
new file mode 100644
index 0000000..2f28863
--- /dev/null
+++ b/po/ja.po
@@ -0,0 +1,558 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-27 16:37+0200\n"
+"PO-Revision-Date: 2009-09-16 15:18\n"
+"Last-Translator: Novell Language <language novell com>\n"
+"Language-Team: Novell Language <language novell com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr ""
+
+#: ../libnm-gtk/nm-ethernet-item.c:88
+msgid "802.1x"
+msgstr ""
+
+#: ../libnm-gtk/nm-wifi-item.c:60 ../src/nmn-list.c:105
+#: ../src/nmn-applet.c:337 ../src/nmn-new-connection.c:636
+msgid "WiFi"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-item.c:36 ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:115 ../src/nmn-applet.c:349
+#: ../src/nmn-new-connection.c:661
+msgid "3G"
+msgstr ""
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "ã?ªã??"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128ã??ã??ã??ã?ã?¼"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128ã??ã??ã??ã??ã?¹ã??ã?¬ã?¼ã?º"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "ã??ã?¤ã??ã??ã??ã?¯WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2ã??ã?¼ã?½ã??ã?«"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2ã?¨ã?³ã?¿ã?¼ã??ã?©ã?¤ã?º"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "ä½?æ??(_R)"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼ã?¯ '%s' ã?«ã?¢ã?¯ã?»ã?¹ã??ã??ã?«ã?¯ã??ã?¹ã?¯ã?¼ã??ã?¾ã??ã?¯æ??å?·å??ã?ã?¼ã??å¿?"
+"è¦?ã?§ã??ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¢ã?¼ã?¯èª?証ã??å¿?è¦?ã?§ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼ã?¯ã?«ã??ã??èª?証ã??å¿?è¦?ã?§ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "æ?°è¦?ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼ã?¯ã?®ä½?æ??"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "æ?°è¦?ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼ã?¯"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "ä½?æ??ã??ã??ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼ã?¯ã?®å??å??ã??å?¥å??ã??ã?¦ã??ã? ã??ã??ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "é??表示ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼ã?¯ã?«æ?¥ç¶?"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "é??表示ã?®ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼ã?¯"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"æ?¥ç¶?ã??ã??é??表示ã?®ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼ã?¯ã?®å??å??ã?¨ã?»ã?ã?¥ã?ªã??ã?£è©³ç´°ã??å?¥å??ã??ã?¦ã??ã? "
+"ã??ã??ã??"
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "��(_O)"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "��:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "ã??ã?®ä»?ã?®ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼ã?¯..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "ã?¯ã?¤ã?¤ã?¬ã?¹ã?¢ã??ã??ã?¿(_A):"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "ã??ã??ã??ã?¯ã?¼ã?¯å??(_N):"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "ã?¯ã?¤ã?¤ã?¬ã?¹ã?»ã?ã?¥ã?ªã??ã?£(_W):"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">èª?証å±?ã?®è¨¼æ??æ?¸ã??é?¸æ??ã??ã??ã?¦ã??ã?¾ã??ã??</"
+"span>\n"
+"\n"
+"èª?証å±?(CA)ã?®è¨¼æ??æ?¸ã??使ç?¨ã??ã?¦ã??ã?ªã??å ´å??ã??å®?å?¨ã?§ã?ªã??ä¸?æ£ã?®ã?¯ã?¤ã?¤ã?¬ã?¹ã??ã??ã??ã?¯ã?¼"
+"ã?¯ã?«æ?¥ç¶?ã??ã??ã??å?¯è?½æ?§ã??ã??ã??ã?¾ã??ã??èª?証å±?ã?®è¨¼æ??æ?¸ã??é?¸æ??ã??ã?¾ã??ã???"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "CA証æ??æ?¸ã?®é?¸æ??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "ä»?å¾?ã??ã?®ã?¡ã??ã?»ã?¼ã?¸ã??表示ã??ã?ªã??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "��"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "�証:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "ã??ã?¹ã?¯ã?¼ã??:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "ã??ã?¹ã?¯ã?¼ã??ã?®è¡¨ç¤º"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "ã?¦ã?¼ã?¶å??:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "å?¿å??ã?®è?å?¥æ??å ±:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA証æ??æ?¸:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "å??é?¨èª?証:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAPã??ã?¼ã?¸ã?§ã?³:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "è?å?¥æ??å ±:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "ç§?å¯?é?µã?®ã??ã?¹ã?¯ã?¼ã??:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "���:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "ã?¦ã?¼ã?¶è¨¼æ??æ?¸:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "é?µ:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "��表示"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEPã?¤ã?³ã??ã??ã?¯ã?¹:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "ã?¿ã?¤ã??:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "èª?証å±?証æ??æ?¸ã?®é?¸æ??..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "å??人証æ??æ?¸ã?®é?¸æ??..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "ç§?å¯?é?µã?®é?¸æ??..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DERã??PEMã??ã?¾ã??ã?¯PKCS#12ã?®ç§?å¯?é?µ(*.derã??*.pemã??*.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DERã?¾ã??ã?¯PEM証æ??æ?¸(*.derã??*.pemã??*.crtã??*.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "ã??ã?³ã??ã?«å??TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "ä¿?è·æ¸?ã?¿EAP (PEAP)"
+
+#: ../src/nmn-list.c:68
+msgid " and "
+msgstr ""
+
+#: ../src/nmn-list.c:79
+msgid "Sorry, we can't find any networks."
+msgstr ""
+
+#: ../src/nmn-list.c:82
+msgid " You could try disabling Offline mode."
+msgstr ""
+
+#: ../src/nmn-list.c:102
+msgid " You could try turning on "
+msgstr ""
+
+#: ../src/nmn-list.c:110 ../src/nmn-applet.c:343
+msgid "Wired"
+msgstr ""
+
+#: ../src/nmn-applet.c:304
+#, fuzzy
+msgid "Add new connection"
+msgstr "æ?°ã??ã??æ?¥ç¶?ã??追å? ã??ã?¾ã??"
+
+#: ../src/nmn-applet.c:310
+#, fuzzy
+msgid "Networks"
+msgstr "ã??ã??ã??ã?¯ã?¼ã?¯å??(_N):"
+
+#: ../src/nmn-applet.c:355
+msgid "WiMAX"
+msgstr ""
+
+#: ../src/nmn-applet.c:362
+msgid "Bluetooth"
+msgstr ""
+
+#: ../src/nmn-applet.c:376
+msgid "Offline mode"
+msgstr ""
+
+#: ../src/nmn-applet.c:382
+#, fuzzy
+msgid "This will disable all your connections"
+msgstr "ã?¯ã?¤ã?¤ã?¬ã?¹æ?¥ç¶?ã??ã??ã?¹ã?¦ç?¡å?¹ã?«ã?ªã??ã?¾ã??"
+
+#: ../src/main.c:54
+msgid "Run in standalone mode"
+msgstr ""
+
+#: ../src/main.c:61
+msgid "NetworkManager Netbook"
+msgstr ""
+
+#: ../src/main.c:62
+msgid "- NetworkManager Netbook"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:67
+#, fuzzy
+msgid "network"
+msgstr "é??表示ã?®ã??ã??ã??ã?¯ã?¼ã?¯"
+
+#: ../src/nmn-panel-client.c:181
+#, fuzzy
+msgid "Network connected"
+msgstr "���"
+
+#: ../src/nmn-panel-client.c:185
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:188
+#, c-format
+msgid "You're now connected to %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:190
+msgid "You're now connected to network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:192
+#, fuzzy
+msgid "Network lost"
+msgstr "ã??ã??ã??ã?¯ã?¼ã?¯å??(_N):"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:199
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:201
+msgid "Sorry, we've lost your connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:236
+#, c-format
+msgid "networks - not connected"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:239
+#, fuzzy, c-format
+msgid "networks - connecting"
+msgstr "æ?°ã??ã??æ?¥ç¶?ã??追å? ã??ã?¾ã??"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - %s - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:249
+#, c-format
+msgid "networks - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:251
+#, fuzzy
+msgid "networks - connected"
+msgstr "���"
+
+#: ../src/nmn-item-renderer.c:140
+msgid "Connected"
+msgstr "����"
+
+#: ../src/nmn-item-renderer.c:141 ../src/nmn-item-renderer.c:145
+msgid "Disconnect"
+msgstr "å??æ?"
+
+#: ../src/nmn-item-renderer.c:144
+msgid "Connecting..."
+msgstr "æ?¥ç¶?ã??ã?¦ã??ã?¾ã??..."
+
+#: ../src/nmn-item-renderer.c:148
+msgid "Disconnected"
+msgstr "���"
+
+#: ../src/nmn-item-renderer.c:149
+msgid "Connect"
+msgstr "��"
+
+#: ../src/nmn-item-renderer.c:263
+msgid "Really remove?"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:279
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+
+#: ../src/nmn-connection-details.c:104
+msgid "(none)"
+msgstr "(ã?ªã??)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:475
+msgid "Connect by:"
+msgstr "����:"
+
+#: ../src/nmn-connection-details.c:478
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:483
+msgid "Manual"
+msgstr "æ??å??"
+
+#: ../src/nmn-connection-details.c:488
+msgid "Link Local"
+msgstr "ã?ã?¼ã?«ã?«ã?®ã?ªã?³ã?¯"
+
+#. Address
+#: ../src/nmn-connection-details.c:496
+msgid "IP Address:"
+msgstr "IPã?¢ã??ã?¬ã?¹:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:505
+msgid "Subnet mask:"
+msgstr "ã?µã??ã??ã??ã??ã??ã?¹ã?¯:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:514
+msgid "Router:"
+msgstr "���:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:523
+msgid "DNS:"
+msgstr "DNS:"
+
+#: ../src/nmn-new-connection.c:247
+msgid "3G disabled"
+msgstr "3Gç?¡å?¹"
+
+#: ../src/nmn-new-connection.c:252
+msgid "Internal 3G modem and SIM card detected"
+msgstr "å??é?¨3Gã??ã??ã?³SIMIã?«ã?¼ã??ã??æ¤?å?ºã??ã??ã?¾ã??ã??"
+
+#: ../src/nmn-new-connection.c:254
+msgid "No modems detected"
+msgstr "ã?¢ã??ã? ã??æ¤?å?ºã??ã??ã?¾ã??ã??"
+
+#: ../src/nmn-new-connection.c:611
+msgid "Add a new connection"
+msgstr "æ?°ã??ã??æ?¥ç¶?ã??追å? ã??ã?¾ã??"
+
+#: ../src/nmn-new-connection.c:631
+msgid "Hidden network"
+msgstr "é??表示ã?®ã??ã??ã??ã?¯ã?¼ã?¯"
+
+#: ../src/nmn-new-connection.c:657
+msgid "Save connection"
+msgstr "æ?¥ç¶?ã?®ä¿?å?"
+
+#: ../src/nmn-new-connection.c:666
+msgid "Return to Networking"
+msgstr "ã??ã??ã??ã?¯ã?¼ã?ã?³ã?°ã?«æ?»ã??"
+
+#: ../src/nmn-mobile-providers.c:504
+msgid "Default"
+msgstr "ã??ã??ã?©ã?«ã??"
+
+#~ msgid "Unavailable"
+#~ msgstr "使ç?¨ã?§ã??ã?¾ã??ã??"
+
+#~ msgid "On"
+#~ msgstr "��"
+
+#~ msgid "Off"
+#~ msgstr "ã?ªã??"
+
+#~ msgid "Advanced"
+#~ msgstr "詳細"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>ã??ã?©ã?¤ã??ã?¢ã?¼ã??</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>æ??ç·?</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>æ?°ã??ã??æ?¥ç¶?ã?®è¿½å? </b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>ã??ã??ã??ã?¯ã?¼ã?¯</b></big>"
diff --git a/po/ko.po b/po/ko.po
new file mode 100644
index 0000000..b523fbf
--- /dev/null
+++ b/po/ko.po
@@ -0,0 +1,554 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-27 16:37+0200\n"
+"PO-Revision-Date: 2009-09-16 15:19\n"
+"Last-Translator: Novell Language <language novell com>\n"
+"Language-Team: Novell Language <language novell com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr ""
+
+#: ../libnm-gtk/nm-ethernet-item.c:88
+msgid "802.1x"
+msgstr ""
+
+#: ../libnm-gtk/nm-wifi-item.c:60 ../src/nmn-list.c:105
+#: ../src/nmn-applet.c:337 ../src/nmn-new-connection.c:636
+msgid "WiFi"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-item.c:36 ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:115 ../src/nmn-applet.c:349
+#: ../src/nmn-new-connection.c:661
+msgid "3G"
+msgstr ""
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "ì??ì??"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128ë¹?í?¸ í?¤"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128ë¹?í?¸ ì??í?¸ 구문"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "ë??ì ? WEP(802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 ê°?ì?¸"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 기ì??"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "ì??ì?±(_R)"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"무ì? ë?¤í?¸ì??í?¬ '%s'ì?? ì?¡ì?¸ì?¤í??ë ¤ë©´ ë¹?ë°?ë²?í?¸ ë??ë?? ì??í?¸í?? í?¤ê°? í??ì??í?©ë??ë?¤."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "무ì? ë?¤í?¸ì??í?¬ ì?¸ì¦?ì?´ í??ì??í?¨"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "무ì? ë?¤í?¸ì??í?¬ì??ì?? ì?¸ì¦?ì?? ì??구í?¨"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "ì?? 무ì? ë?¤í?¸ì??í?¬ ì??ì?±"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "ì?? 무ì? ë?¤í?¸ì??í?¬"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "ì??ì?±í? 무ì? ë?¤í?¸ì??í?¬ì?? ì?´ë¦?ì?? ì??ë ¥í?©ë??ë?¤."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "ì?¨ê²¨ì§? 무ì? ë?¤í?¸ì??í?¬ì?? ì?°ê²°"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "ì?¨ê²¨ì§? 무ì? ë?¤í?¸ì??í?¬"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr "ì?°ê²°í? ì?¨ê²¨ì§? 무ì? ë?¤í?¸ì??í?¬ì?? ì?´ë¦? ë°? ë³´ì?? ì?¸ë¶? ì?¬í?ì?? ì??ë ¥í?©ë??ë?¤."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "ì?°ê²°(_O)"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "ì?°ê²°:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "기í?? 무ì? ë?¤í?¸ì??í?¬..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "무ì? ì?´ë??í?°(_A):"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "ë?¤í?¸ì??í?¬ ì?´ë¦?(_N):"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "무ì? ë³´ì??(_W):"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">ì? í??í?? CA ì?¸ì¦?ì??ê°? ì??ì?µë??ë?¤</span>\n"
+"\n"
+"CA(Certificate Authority) ì?¸ì¦?ì??를 ì?¬ì?©í??ì§? ì??ì?? ê²½ì?° ì??ì ?í??ì§? ì??ì?? 무ì? ë?¤í?¸"
+"ì??í?¬ì?? ì?°ê²°ë? ì?? ì??ì?µë??ë?¤. CA ì?¸ì¦?ì??를 ì? í??í??ì??ê² ì?µë??ê¹??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "CA ì?¸ì¦?ì?? ì? í??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "ì?´ ë©?ì??ì§?를 ë?¤ì?? í??ì?? ì?? í?¨"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "무ì??"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "��:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "ë¹?ë°?ë²?í?¸:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "ë¹?ë°?ë²?í?¸ í??ì??"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "ì?¬ì?©ì?? ì?´ë¦?:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "�� ID:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA ì?¸ì¦?ì??:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "�� ��:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP ë²?ì ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "ID:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "ê°?ì?¸ í?¤ ë¹?ë°?ë²?í?¸:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "ê°?ì?¸ í?¤:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "ì?¬ì?©ì?? ì?¸ì¦?ì??:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "í?¤:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "í?¤ í??ì??"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP ���:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "ì? í??:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "ì?¸ì¦? 기ê´? ì?¸ì¦?ì?? ì? í??..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "ê°?ì?¸ ì?¸ì¦?ì?? ì? í??..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "ê°?ì?¸ í?¤ ì? í??..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM ë??ë?? PKCS#12 ê°?ì?¸ í?¤(*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER ë??ë?? PEM ì?¸ì¦?ì??(*.pem, *.crt, *.key, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "í?°ë?? TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "ë³´í?¸ë?? EAP(PEAP)"
+
+#: ../src/nmn-list.c:68
+msgid " and "
+msgstr ""
+
+#: ../src/nmn-list.c:79
+msgid "Sorry, we can't find any networks."
+msgstr ""
+
+#: ../src/nmn-list.c:82
+msgid " You could try disabling Offline mode."
+msgstr ""
+
+#: ../src/nmn-list.c:102
+msgid " You could try turning on "
+msgstr ""
+
+#: ../src/nmn-list.c:110 ../src/nmn-applet.c:343
+msgid "Wired"
+msgstr ""
+
+#: ../src/nmn-applet.c:304
+#, fuzzy
+msgid "Add new connection"
+msgstr "ì?? ì?°ê²° ì¶?ê°?"
+
+#: ../src/nmn-applet.c:310
+#, fuzzy
+msgid "Networks"
+msgstr "ë?¤í?¸ì??í?¬ ì?´ë¦?(_N):"
+
+#: ../src/nmn-applet.c:355
+msgid "WiMAX"
+msgstr ""
+
+#: ../src/nmn-applet.c:362
+msgid "Bluetooth"
+msgstr ""
+
+#: ../src/nmn-applet.c:376
+msgid "Offline mode"
+msgstr ""
+
+#: ../src/nmn-applet.c:382
+#, fuzzy
+msgid "This will disable all your connections"
+msgstr "모ë? 무ì? ì?°ê²°ì?´ ë¹?í??ì?±í??ë?©ë??ë?¤."
+
+#: ../src/main.c:54
+msgid "Run in standalone mode"
+msgstr ""
+
+#: ../src/main.c:61
+msgid "NetworkManager Netbook"
+msgstr ""
+
+#: ../src/main.c:62
+msgid "- NetworkManager Netbook"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:67
+#, fuzzy
+msgid "network"
+msgstr "ì?¨ê²¨ì§? ë?¤í?¸ì??í?¬"
+
+#: ../src/nmn-panel-client.c:181
+#, fuzzy
+msgid "Network connected"
+msgstr "ì?°ê²° í?´ì ?ë?¨"
+
+#: ../src/nmn-panel-client.c:185
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:188
+#, c-format
+msgid "You're now connected to %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:190
+msgid "You're now connected to network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:192
+#, fuzzy
+msgid "Network lost"
+msgstr "ë?¤í?¸ì??í?¬ ì?´ë¦?(_N):"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:199
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:201
+msgid "Sorry, we've lost your connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:236
+#, c-format
+msgid "networks - not connected"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:239
+#, fuzzy, c-format
+msgid "networks - connecting"
+msgstr "ì?? ì?°ê²° ì¶?ê°?"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - %s - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:249
+#, c-format
+msgid "networks - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:251
+#, fuzzy
+msgid "networks - connected"
+msgstr "ì?°ê²° í?´ì ?ë?¨"
+
+#: ../src/nmn-item-renderer.c:140
+msgid "Connected"
+msgstr "ì?°ê²°ë?¨"
+
+#: ../src/nmn-item-renderer.c:141 ../src/nmn-item-renderer.c:145
+msgid "Disconnect"
+msgstr "ì?°ê²° í?´ì ?"
+
+#: ../src/nmn-item-renderer.c:144
+msgid "Connecting..."
+msgstr "�결 �..."
+
+#: ../src/nmn-item-renderer.c:148
+msgid "Disconnected"
+msgstr "ì?°ê²° í?´ì ?ë?¨"
+
+#: ../src/nmn-item-renderer.c:149
+msgid "Connect"
+msgstr "ì?°ê²°"
+
+#: ../src/nmn-item-renderer.c:263
+msgid "Really remove?"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:279
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+
+#: ../src/nmn-connection-details.c:104
+msgid "(none)"
+msgstr "(ì??ì??)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:475
+msgid "Connect by:"
+msgstr "ì?°ê²° ë°©ë²?:"
+
+#: ../src/nmn-connection-details.c:478
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:483
+msgid "Manual"
+msgstr "ì??ë??"
+
+#: ../src/nmn-connection-details.c:488
+msgid "Link Local"
+msgstr "�� �컬"
+
+#. Address
+#: ../src/nmn-connection-details.c:496
+msgid "IP Address:"
+msgstr "IP 주ì??:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:505
+msgid "Subnet mask:"
+msgstr "ì??ë¸?ë?· ë§?ì?¤í?¬:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:514
+msgid "Router:"
+msgstr "���:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:523
+msgid "DNS:"
+msgstr "DNS:"
+
+#: ../src/nmn-new-connection.c:247
+msgid "3G disabled"
+msgstr "3G ì?¬ì?© ì?? í?¨"
+
+#: ../src/nmn-new-connection.c:252
+msgid "Internal 3G modem and SIM card detected"
+msgstr "í??ì§?ë?? ë?´ë¶? 3G 모ë?? ë°? SIM ì¹´ë??"
+
+#: ../src/nmn-new-connection.c:254
+msgid "No modems detected"
+msgstr "í??ì§?ë?? 모ë?? ì??ì??"
+
+#: ../src/nmn-new-connection.c:611
+msgid "Add a new connection"
+msgstr "ì?? ì?°ê²° ì¶?ê°?"
+
+#: ../src/nmn-new-connection.c:631
+msgid "Hidden network"
+msgstr "ì?¨ê²¨ì§? ë?¤í?¸ì??í?¬"
+
+#: ../src/nmn-new-connection.c:657
+msgid "Save connection"
+msgstr "ì?°ê²° ì ?ì?¥"
+
+#: ../src/nmn-new-connection.c:666
+msgid "Return to Networking"
+msgstr "ë?¤í?¸ì??í?¹ì?¼ë¡? ë??ì??ê°?기"
+
+#: ../src/nmn-mobile-providers.c:504
+msgid "Default"
+msgstr "기본�"
+
+#~ msgid "Unavailable"
+#~ msgstr "�� ���"
+
+#~ msgid "On"
+#~ msgstr "ì?¤ì ?"
+
+#~ msgid "Off"
+#~ msgstr "í?´ì ?"
+
+#~ msgid "Advanced"
+#~ msgstr "ê³ ê¸?"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>ë¹?í?? 모ë??</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>ì? ì? </b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>ì?? ì?°ê²° ì¶?ê°?</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>ë?¤í?¸ì??í?¬</b></big>"
diff --git a/po/lt.po b/po/lt.po
new file mode 100644
index 0000000..a0a72ac
--- /dev/null
+++ b/po/lt.po
@@ -0,0 +1,668 @@
+# Lithuanian translation for network-manager-netbook.
+# Copyright (C) 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the network-manager-netbook package.
+# Aurimas Ä?ernius <aurisc4 gmail com>, 2010.
+# Žygimantas BeruÄ?ka <zygis gnome org>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook master\n"
+"Report-Msgid-Bugs-To: "
+"http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component"
+"=network-manager-netbook\n"
+"POT-Creation-Date: 2010-06-05 18:39+0000\n"
+"PO-Revision-Date: 2010-06-26 16:41+0300\n"
+"Last-Translator: Aurimas Ä?ernius <aurisc4 gmail com>\n"
+"Language-Team: Lithuanian <gnome-lt lists akl lt>\n"
+"Language: lt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: UTF-8\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%"
+"100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Virtaal 0.6.1\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Valdykite savo tinklo ryšius"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Prisijunkite prie interneto naudodami savo mobilųjį telefonÄ?"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Numatyta"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Nepavyko ištrinti ryšio: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Nepavyko aktyvuoti įrenginio: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Nepavyko išjungti įrenginio: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "laidinis"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "PIN atrakinti nepavyko: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Užrakintas GSM įrenginys"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "NÄ?ra"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128 bitų raktas"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128 bitų slaptažodis"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dinaminis WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "Asmeninis WPA ir WPA2"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "Industrinis WPA ir WPA2"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "_Sukurti"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Norint prieiti prie belaidžio tinklo â??%sâ?? reikia nurodyti slaptažodžius arba "
+"Å¡ifravimo raktus."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Reikia nustatyti tapatybÄ? belaidžiame tinkle"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Belaidžiame tinkle reikia nustatyti tapatybÄ?"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Sukurti naujÄ? belaidį tinklÄ?"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Naujas belaidis tinklas"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Ä®veskite sukurtino belaidžio tinklo pavadinimÄ?."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Jungtis prie paslÄ?pto belaidžio tinklo"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "PaslÄ?ptas belaidis tinklas"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Ä®veskite paslÄ?pto belaidžio tinklo, prie kurio norite jungtis, pavadinimÄ? ir "
+"saugumo informacijÄ?."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_Prisijungti"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Ryšys:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Kitas belaidis tinklas..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Belaidis _adapteris:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Tinklo pavadinimas:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Belaidis saugumas:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Nepasirinktas joks liudijimų įstaigos "
+"liudijimas</span>\n"
+"\n"
+"Gali būti, jog nenaudodami liudijimų įstaigos (LĮ) liudijimo prisijungsite "
+"prie nesaugių, piktavališkų belaidžių tinklų. Ar norite pasirinkti liudijimų "
+"įstaigos liudijimÄ??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Pasirinkti LÄ® liudijimÄ?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "NebeperspÄ?ti ateityje"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Nepaisyti"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "TapatybÄ?s nustatymas:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Slaptažodis:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Rodyti slaptažodį"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Naudotojo vardas:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "AnoniminÄ? tapatybÄ?:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "LÄ® liudijimas:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Vidinis tapatybÄ?s nustatymas:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP versija:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "TapatybÄ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Asmeninio rakto slaptažodis:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Asmeninis raktas:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Naudotojo liudijimas:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Raktas:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Rodyti raktÄ?"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP indeksas:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Tipas:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Pasirinkite liudijimų įstaigos liudijimÄ?..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Pasirinkite savo asmeninį liudijimÄ?..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Pasirinkite savo asmeninį raktÄ?..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM, arba PKCS#12 asmeniniai raktai (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER arba PEM liudijimai (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tuneliuojamas TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Apsaugotas EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Pranešimo tipas"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Pranešimo tipas"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Turinio srities rÄ?melis"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "RÄ?melio aplink turinio sritį plotis"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Turinio srities protarpiai"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Protarpiai tarp srities elementų"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Mygtukų protarpiai"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Protarpiai tarp mygtukų"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Veiksmų srities rÄ?melis"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "RÄ?melio aplink veiksmų sritį plotis"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " ir "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Atleiskite, nepavyko rasti jokių tinklų."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " MÄ?ginkite iÅ¡jungti darbo atsijungus veiksenÄ?."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " MÄ?ginkite įjungti "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Laidinis"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "PridÄ?ti naujÄ? ryšį"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Tinklai"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Atsijungimo veiksena"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Bus išjungti visi jūsų ryšiai"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Paleisti vienetinÄ?je veiksenoje"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Paleisti darbo aplinkos veiksenoje"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "â?? NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Prisijungta"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Atsijungti"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Jungiamasi"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Atšaukti"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Atsijungta"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Prisijungti"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Prieinamas"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Nepavyko atnaujinti ryšio: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Tikrai pašalinti?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Ne, išsaugoti"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Taip, pašalinti"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Ar norite paÅ¡alinti â??%sâ?? %s tinklÄ?? Bus pamirÅ¡tas\n"
+"slaptažodis ir automatiÅ¡kai nebeprisijungsite prie â??%sâ??."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "SudÄ?tingesni"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Pašalinti ryšį"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "tinklas"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Prisijungta prie tinklo"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Dabar esate prisijungÄ? prie %s, %s tinklo"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Dabar esate prisijungÄ? prie %s tinklo"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Dabar esate prisijungÄ? prie tinklo"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Nutrūko tinklo ryšys"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Atleiskite, nutrūko jūsų ryšys %s su %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Atleiskite, nutrūko jūsų ryšys %s"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Atleiskite, nutrūko jūsų ryšys"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "tinklai â?? neprisijungta"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "tinklai â?? jungiamasi"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "tinklai â?? %s â?? %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "tinklai â?? %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "tinklai â?? prisijungta"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Atrakinti"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "IÅ¡jungti PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(nÄ?ra)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Prisijungta su:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Rankiniu būdu"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Vietinis ryšys"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP adresas:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Potinklio kaukÄ?:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Maršrutizatorius:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Jūsų MAC adresas:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G išjungtas"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G modemas užrakintas"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Aptiktas vidinis 3G modemas ir SIM kortelÄ?"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Nerasta modemų"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "PridÄ?ti naujÄ? ryšį"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "PaslÄ?ptas tinklas"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Išsaugoti ryšį"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Grįžti prie tinklo ryšių"
diff --git a/po/lv.po b/po/lv.po
new file mode 100644
index 0000000..d651d30
--- /dev/null
+++ b/po/lv.po
@@ -0,0 +1,667 @@
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# RÅ«dolfs Mazurs <rudolfs mazurs gmail com>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
+"cgi?product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-03-21 13:28+0000\n"
+"PO-Revision-Date: 2010-03-26 10:27+0200\n"
+"Last-Translator: RÅ«dolfs Mazurs <rudolfs mazurs gmail com>\n"
+"Language-Team: Latviešu <kde-i18n-doc kde org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : "
+"2);\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "PÄ?rvaldiet savu tÄ«klu savienojumus"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Piekļūstiet Internetam, izmantojot mobilo tÄ?lruni"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "NoklusÄ?tais"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "NevarÄ?ja izdzÄ?st savienojumu: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "NevarÄ?ja aktivizÄ?t ierÄ«ci: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "NevarÄ?ja deaktivizÄ?t ierÄ«ci: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "vadu"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "PIN koda atbloÄ·Ä?Å¡ana neizdevÄ?s: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "BloÄ·Ä?ta GSM ierÄ«ce"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Nav"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-bitu atslÄ?ga"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bitu parole"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dinamiskais WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "Iz_veidot"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Lai piekļūtu bezvadu tÄ«klam '%s', ir nepiecieÅ¡ama parole vai Å¡ifrÄ?Å¡anas "
+"atslÄ?ga."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Ir nepiecieÅ¡ama bezvadu tÄ«kla autentifikÄ?cija"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Bezvadu tÄ«kls pieprasa autentifikÄ?ciju"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Izveidot jaunu bezvadu tīklu"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Jauns bezvadu tīkls"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Ievadiet jaunÄ? bezvadu tÄ«kla nosaukumu."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Savienoties ar slÄ?ptu bezvadu tÄ«klu"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "SlÄ?pts bezvadu tÄ«kls"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Ievadiet nosaukumu un droÅ¡Ä«bas detaļas tÄ«klam, ar kuru vÄ?laties savienoties."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "Savien_oties"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Savienojums:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Citi bezvadu tīkli..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Bezv_adu tīkla ierīce:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "TÄ«kla _nosaukums:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Bezvadu tīkla drošība:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Nav izvÄ?lÄ?ta sertificÄ?Å¡anas "
+"institūcija</span>\n"
+"\n"
+"SertificÄ?Å¡anas institÅ«cijas (CA) sertifikÄ?ta neizmantoÅ¡anas rezultÄ?tÄ? var "
+"savienoties ar nedroÅ¡iem vai blÄ?žu bezvadu tÄ«kliem. Vai vÄ?laties izvÄ?lieties "
+"sertificÄ?Å¡anas institÅ«cijas sertifikÄ?tu?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "IzvÄ?lieties CA sertifikÄ?tu"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Vairs mani nebrÄ«dinÄ?t"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "IgnorÄ?t"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "AutentifikÄ?cija:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Parole:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "RÄ?dÄ«t paroli"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "LietotÄ?jvÄ?rds:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "AnonÄ«ma identitÄ?te:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA sertifikÄ?ts:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "IekÅ¡Ä?jÄ? autentifikÄ?cija:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP versija:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "IdentitÄ?te:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "PrivÄ?tÄ?s atslÄ?gas parole:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "PrivÄ?tÄ? atslÄ?ga:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "LietotÄ?ja sertifikÄ?ts:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "AtslÄ?ga:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "RÄ?dÄ«t atslÄ?gu"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP indekss:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Tips:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "IzvÄ?lieties sertificÄ?Å¡anas institÅ«cijas sertifikÄ?tu..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "IzvÄ?lieties savu personÄ«go sertifikÄ?tu..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "IzvÄ?lieties savu privÄ?to atslÄ?gu..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM vai PKCS#12 privÄ?tÄ?s atslÄ?gas (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER vai PEM sertifikÄ?ti (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "TunelÄ?ts TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Protected EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "ZiÅ?ojuma tips"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Å Ä« veida ziÅ?ojums"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Satura lauka mala"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Malas platums ap satura lauku"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Satura lauka atstarpes"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Atstarpes starp laukuma elementiem"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Pogu atstarpes"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Atstarpes starp pogÄ?m"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Darbības lauka malas"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Malu platums ap darbības lauku"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " un "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "DiemžÄ?l neizdevÄ?s atrast tÄ«klus."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Varat mÄ?Ä£inÄ?t atslÄ?gt bezsaistes režīmu."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Varat mÄ?Ä£inÄ?t ieslÄ?gt "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Vadu tīkls"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Pievienot jaunu savienojumu"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "TÄ«kli"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Bezsaistes režīms"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Tas atslÄ?gs visus savienojumus"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Palaist savrupÄ? (standalone) režīmÄ? "
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Palaist darbvirsmas režīmÄ?"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Savienots"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Atvienots"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Savienojas"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Atcelt"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Atvienots"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Savienot"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Pieejams"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "NevarÄ?ja atjauninÄ?t savienojumu: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "TieÅ¡Ä?m izÅ?emt?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "NÄ?, saglabÄ?t"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "JÄ?, izdzÄ?st"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Vai vÄ?laties izÅ?emt '%s' %s tÄ«klu? TÄ? rezultÄ?ta\n"
+"Tiks aizmirsta parole un jūs vairs netiksiet\n"
+"automÄ?tiski savienoti ar '%s'."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "PaplaÅ¡inÄ?ts"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "IzÅ?emt savienojumu"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "tīkls"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "TÄ«kls savienots"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Ir izveidots savienojums ar %s, %s tīkls"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Ir izveidots savienojums ar %s tīklu"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Ir izveidots savienojums ar tīklu"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "TÄ«kls pazudis"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "DiemžÄ?l ir pazaudÄ?ts %s savienojums ar %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "DiemžÄ?l ir pazaudÄ?ts %s savienojums"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "DiemžÄ?l ir pazaudÄ?ts savienojums"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "tīkli - nav savienoti"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "tīkli - savienojas"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "tīkli - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "tīkli - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "tīkli - savienojies"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "AtbloÄ·Ä?t"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "AtslÄ?gt PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(nav)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Savienoties ar:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Pašrocīgi"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "LokÄ?lais tÄ«kls"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP adrese:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Apakštīkla maska:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "MarÅ¡rutÄ?tÄ?js:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "MAC adrese:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G atslÄ?gts"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G modems ir bloÄ·Ä?ts"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Ir atrasts iekÅ¡Ä?jais 3G modems un SIM karte"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Nav atrasti modemi"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Pievienot jaunu savienojumu"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "SlÄ?pts tÄ«kls"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "SaglabÄ?t savienojumu"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Atgriezties pie tīklošanas"
+
+
diff --git a/po/nb.po b/po/nb.po
new file mode 100644
index 0000000..504690b
--- /dev/null
+++ b/po/nb.po
@@ -0,0 +1,2041 @@
+# translation of NetworkManager to Norwegian Bokmal
+# This file is distributed under the same license as the NetworkManager package.
+# Copyright (C) 2004, 2005 Red Hat, Inc.
+# Kjartan Maraas <kmaraas gnome org>, 2004-2010.
+# Terance Edward Sola <terance lyse net>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: NetworkManager 0.9.x\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-03-14 12:43+0100\n"
+"PO-Revision-Date: 2010-03-09 17:51+0100\n"
+"Last-Translator: Kjartan Maraas <kmaraas gnome org>\n"
+"Language-Team: Norwegian Bokmal <i18n-nb lister ping uio no>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Kontroller dine nettverksforbindelser"
+
+#: ../network-manager-netbook.desktop.in.h:2
+#, fuzzy
+msgid "network-manager-netbook"
+msgstr "NetworkManager panelprogram"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+#, fuzzy
+msgid "Access the Internet using your mobile phone"
+msgstr "Koble til internett med din mobiltelefon"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Forvalg"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr ""
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, fuzzy, c-format
+msgid "Could not delete connection: %s"
+msgstr "Kunne ikke redigere tilkobling"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, fuzzy, c-format
+msgid "Could not activate device: %s"
+msgstr "Kunne ikke lage en ny tilkobling"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr ""
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+#, fuzzy
+msgid "wired"
+msgstr "Kablet"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+#, fuzzy
+msgid "Locked GSM device"
+msgstr "Installert GSM-enhet"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr ""
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Ingen"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-bit nøkkel"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bit passord"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamisk WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 personlig"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA og WPA2 enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "_Lag:"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Passord eller krypteringsnøkler er nødvendig for å koble til trådløst "
+"nettverk «%s»."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Autentisering for trådløst nettverk kreves"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Autentisering kreves av trådløst nettverk"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Opprett nytt trådløst nettverk"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nytt trådløst nettverk"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Oppgi et navn på det trådløse nettverket du ønsker å opprette."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Koble til skjult trådløst nettverk"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Skjult trådløst nettverk"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Oppgi navnet til det skjulte trådløse nettverket du ønsker å koble deg til."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "K_oble til"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+#, fuzzy
+msgid "Connection:"
+msgstr "Tilkobli_ng:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Annet trådløst nettverk ..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Trådløst _kort:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+#, fuzzy
+msgid "_Network Name:"
+msgstr "_Nettverksnavn:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+#, fuzzy
+msgid "_Wireless Security:"
+msgstr "Tr_ådløs sikkerhet:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+#, fuzzy
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"Ã? ikke bruke et Certificate Authority-sertifikat (CA) kan resultere i "
+"tilkoblinger til usikre og villedende trådløse nettverk. Vil du velge et "
+"Certificate Authority-sertifikat?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Velg CA-sertifikat"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+#, fuzzy
+msgid "Don't warn me again"
+msgstr "Ikke ad_var meg igjen"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorer"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+#, fuzzy
+msgid "Authentication:"
+msgstr "_Autentisering:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Passord:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+#, fuzzy
+msgid "Show password"
+msgstr "_Vis passord"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+#, fuzzy
+msgid "User Name:"
+msgstr "Br_ukernavn:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+#, fuzzy
+msgid "Anonymous Identity:"
+msgstr "Anony_m identitet:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+#, fuzzy
+msgid "CA Certificate:"
+msgstr "C_A-sertifikat:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+#, fuzzy
+msgid "Inner Authentication:"
+msgstr "I_ntern autentisering:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+#, fuzzy
+msgid "PEAP Version:"
+msgstr "_PEAP-versjon:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+#, fuzzy
+msgid "Identity:"
+msgstr "I_dentitet:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+#, fuzzy
+msgid "Private Key Password:"
+msgstr "Passord for _privat nøkkel:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+#, fuzzy
+msgid "Private Key:"
+msgstr "Privat nø_kkel:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+#, fuzzy
+msgid "User Certificate:"
+msgstr "Br_ukersertifikat:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+#, fuzzy
+msgid "Key:"
+msgstr "Nø_kkel:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+#, fuzzy
+msgid "Show key"
+msgstr "_Vis nøkkel"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+#, fuzzy
+msgid "WEP Index:"
+msgstr "WEP-inde_ks:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+#, fuzzy
+msgid "Type:"
+msgstr "_Type:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Velg et Certificate Authority-sertifikat ..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Velg ditt personlige sertifikat ..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Velg din private nøkkel ..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM eller PKCS#12 private nøkler (*.der, *.pem, *.12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER eller PEM-sertifikater (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunnelert TLS (TTLS)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Beskyttet EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr ""
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr ""
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr ""
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr ""
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr ""
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr ""
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr ""
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr ""
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr ""
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr ""
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr ""
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr ""
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr ""
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr ""
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr ""
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Kablet"
+
+#: ../src/nmn-applet.c:436
+#, fuzzy
+msgid "Add new connection"
+msgstr "Ingen nettverksforbindelse"
+
+#: ../src/nmn-applet.c:442
+#, fuzzy
+msgid "Networks"
+msgstr "N_ettverk:"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr ""
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr ""
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr ""
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr ""
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr ""
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr ""
+
+#: ../src/main.c:78
+#, fuzzy
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager panelprogram"
+
+#: ../src/main.c:79
+#, fuzzy
+msgid "- NetworkManager Netbook"
+msgstr "NetworkManager panelprogram"
+
+#: ../src/nmn-network-renderer.c:106
+#, fuzzy
+msgid "Connected"
+msgstr "K_oble til"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Koble fra"
+
+#: ../src/nmn-network-renderer.c:110
+#, fuzzy
+msgid "Connecting"
+msgstr "Tilkobli_ng:"
+
+#: ../src/nmn-network-renderer.c:111
+#, fuzzy
+msgid "Cancel"
+msgstr "Ka_nal"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Frakoblet"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+#, fuzzy
+msgid "Connect"
+msgstr "K_oble til"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Tilgjengelige"
+
+#: ../src/nmn-network-renderer.c:157
+#, fuzzy, c-format
+msgid "Could not update connection: %s"
+msgstr "Kunne ikke redigere tilkobling"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr ""
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr ""
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr ""
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+#, fuzzy
+msgid "Advanced"
+msgstr "<b>Avansert</b>"
+
+#: ../src/nmn-network-renderer.c:397
+#, fuzzy
+msgid "Remove connection"
+msgstr "Ingen nettverksforbindelse"
+
+#: ../src/nmn-panel-client.c:68
+#, fuzzy
+msgid "network"
+msgstr "N_ettverk:"
+
+#: ../src/nmn-panel-client.c:189
+#, fuzzy
+msgid "Network connected"
+msgstr "Ingen nettverksforbindelse"
+
+#: ../src/nmn-panel-client.c:193
+#, fuzzy, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Du er nå tilkoblet GSM-nettverk."
+
+#: ../src/nmn-panel-client.c:196
+#, fuzzy, c-format
+msgid "You're now connected to %s network"
+msgstr "Du er nå tilkoblet GSM-nettverk."
+
+#: ../src/nmn-panel-client.c:198
+#, fuzzy
+msgid "You're now connected to network"
+msgstr "Du er nå tilkoblet GSM-nettverk."
+
+#: ../src/nmn-panel-client.c:200
+#, fuzzy
+msgid "Network lost"
+msgstr "N_ettverk:"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:209
+#, fuzzy
+msgid "Sorry, we've lost your connection"
+msgstr "Ingen nettverksforbindelse"
+
+#: ../src/nmn-panel-client.c:244
+#, fuzzy, c-format
+msgid "networks - not connected"
+msgstr "Ingen nettverksforbindelse"
+
+#: ../src/nmn-panel-client.c:247
+#, fuzzy, c-format
+msgid "networks - connecting"
+msgstr "Ingen nettverksforbindelse"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:262
+#, fuzzy, c-format
+msgid "networks - %s"
+msgstr "Hjemmenettverk (%s)"
+
+#: ../src/nmn-panel-client.c:264
+#, fuzzy
+msgid "networks - connected"
+msgstr "Ingen nettverksforbindelse"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+#, fuzzy
+msgid "Unlock"
+msgstr "LÃ¥s _opp"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr ""
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(ingen)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+#, fuzzy
+msgid "Connect by:"
+msgstr "K_oble til"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr ""
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manuelt"
+
+#: ../src/nmn-connection-details.c:490
+#, fuzzy
+msgid "Link Local"
+msgstr "Kun lokal link"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP-adresse:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+#, fuzzy
+msgid "Subnet mask:"
+msgstr "Subnettmaske:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+#, fuzzy
+msgid "Router:"
+msgstr "_Rate:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr ""
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+#, fuzzy
+msgid "Your MAC address:"
+msgstr "_MAC-adresse:"
+
+#: ../src/nmn-new-connection.c:282
+#, fuzzy
+msgid "3G disabled"
+msgstr "Nettverk slått av"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr ""
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr ""
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr ""
+
+#: ../src/nmn-new-connection.c:660
+#, fuzzy
+msgid "Add a new connection"
+msgstr "Ingen nettverksforbindelse"
+
+#: ../src/nmn-new-connection.c:680
+#, fuzzy
+msgid "Hidden network"
+msgstr "Skjult trådløst nettverk"
+
+#: ../src/nmn-new-connection.c:706
+#, fuzzy
+msgid "Save connection"
+msgstr "DSL-tilkobling %d"
+
+#: ../src/nmn-new-connection.c:715
+#, fuzzy
+msgid "Return to Networking"
+msgstr "Slå på _nettverk"
+
+#~ msgid "Network Manager"
+#~ msgstr "NetworkManager"
+
+#~ msgid "Disable WiFi Create"
+#~ msgstr "Slå av oppretting av WiFi"
+
+#~ msgid "Disable connected notifications"
+#~ msgstr "Slå av varsling om tilkobling"
+
+#~ msgid "Disable disconnected notifications"
+#~ msgstr "Slå av varsling om frakobling"
+
+#~ msgid "Stamp"
+#~ msgstr "Stempel"
+
+#~ msgid "Suppress networks available notifications"
+#~ msgstr "Slå av varsling om tilgjengelige nettverk"
+
+#~ msgid "Manage and change your network connection settings"
+#~ msgstr "HÃ¥ndter og endre innstillinger for nettverksforbindelser"
+
+#~ msgid "Network Connections"
+#~ msgstr "Nettverkstilkoblinger"
+
+#~ msgid "An instance of nm-applet is already running.\n"
+#~ msgstr "En instans av nm-applet kjører allerede.\n"
+
+#~ msgid "You are now connected to '%s'."
+#~ msgstr "Du er nå koblet til «%s»."
+
+#~ msgid "Connection Established"
+#~ msgstr "Tilkoblingen er satt opp"
+
+#~ msgid "You are now connected to the mobile broadband network."
+#~ msgstr "Du er nå koblet til mobilt bredbåndsnettverk."
+
+#~ msgid "Preparing mobile broadband connection '%s'..."
+#~ msgstr "Forbereder mobil bredbåndsforbindelse «%s»..."
+
+#~ msgid "Configuring mobile broadband connection '%s'..."
+#~ msgstr "Konfigurerer mobil bredbåndsforbindelse «%s»..."
+
+#~ msgid "User authentication required for mobile broadband connection '%s'..."
+#~ msgstr "Brukerautentisering kreves for mobil bredbåndsforbindelse «%s»..."
+
+#~ msgid "Requesting a network address for '%s'..."
+#~ msgstr "Ber om en nettverksadresse for «%s»..."
+
+#~ msgid "Mobile broadband connection '%s' active"
+#~ msgstr "Mobil bredbåndsforbindelse «%s» er aktiv"
+
+#~ msgid "CDMA"
+#~ msgstr "CDMA"
+
+#~ msgid "Mobile Broadband (%s)"
+#~ msgstr "Mobilt bredbånd (%s)"
+
+#~ msgid "Mobile Broadband"
+#~ msgstr "Mobilt bredbånd"
+
+#~ msgid "New Mobile Broadband (CDMA) connection..."
+#~ msgstr "Ny mobil bredbåndstilkobling (CDMA)..."
+
+#~ msgid "You are now connected to the CDMA network."
+#~ msgstr "Du er nå tilkoblet CDMA-nettverk."
+
+#~ msgid "Mobile broadband connection '%s' active: (%d%%%s%s)"
+#~ msgstr "Mobil bredbåndsforbindelse «%s» er aktiv: (%d%%%s%s)"
+
+#~ msgid "GSM"
+#~ msgstr "GSM"
+
+#~ msgid "New Mobile Broadband (GSM) connection..."
+#~ msgstr "Ny tilkobling med mobilt bredbånd (GSM)..."
+
+#~ msgid "PIN code required"
+#~ msgstr "PIN-kode kreves"
+
+#~ msgid "PUK code required"
+#~ msgstr "PUK-kode kreves"
+
+#~ msgid "PIN code is needed for the mobile broadband device"
+#~ msgstr "PIN-kode kreves for enhet for mobilt bredbånd"
+
+#~ msgid "PUK code is needed for the mobile broadband device"
+#~ msgstr "PUK-kode kreves for enhet for mobilt bredbånd"
+
+#, fuzzy
+#~ msgid "SIM PIN unlock required"
+#~ msgstr "PIN-kode kreves"
+
+#, fuzzy
+#~ msgid "SIM PIN Unlock Required"
+#~ msgstr "PIN-kode kreves"
+
+#~ msgid "PIN code:"
+#~ msgstr "PIN-kode:"
+
+#, fuzzy
+#~ msgid "SIM PUK unlock required"
+#~ msgstr "PUK-kode kreves"
+
+#, fuzzy
+#~ msgid "SIM PUK Unlock Required"
+#~ msgstr "PUK-kode kreves"
+
+#~ msgid "PUK code:"
+#~ msgstr "PUK-kode:"
+
+#~ msgid "New PIN code:"
+#~ msgstr "Ny PIN-kode:"
+
+#~ msgid "Auto Ethernet"
+#~ msgstr "Automatisk Ethernet"
+
+#~ msgid "Wired Networks (%s)"
+#~ msgstr "Kablete nettverk (%s)"
+
+#~ msgid "Wired Network (%s)"
+#~ msgstr "Kablet nettverk (%s)"
+
+#~ msgid "Wired Networks"
+#~ msgstr "Kablede nettverk"
+
+#~ msgid "Wired Network"
+#~ msgstr "Kablet nettverk"
+
+#~ msgid "disconnected"
+#~ msgstr "frakoblet"
+
+#~ msgid "You are now connected to the wired network."
+#~ msgstr "Du er nå koblet til kablet nettverk."
+
+#~ msgid "Preparing wired network connection '%s'..."
+#~ msgstr "Forbereder kablet nettverkstilkobling til «%s»..."
+
+#~ msgid "Configuring wired network connection '%s'..."
+#~ msgstr "Konfigurerer kablet nettverkstilkobling til «%s»..."
+
+#~ msgid "User authentication required for wired network connection '%s'..."
+#~ msgstr "Brukeraautentisering kreves av kablet nettverksforbindelse «%s»..."
+
+#~ msgid "Requesting a wired network address for '%s'..."
+#~ msgstr "Ber om en nettverksadresse på kablet nettverk for «%s»..."
+
+#~ msgid "Wired network connection '%s' active"
+#~ msgstr "Kablet nettverkforbindelse «%s» er aktiv"
+
+#~ msgid "DSL authentication"
+#~ msgstr "DSL-autentisering"
+
+#~ msgid "_Connect to Hidden Wireless Network..."
+#~ msgstr "_Koble til skjult trådløst nettverk..."
+
+#~ msgid "Create _New Wireless Network..."
+#~ msgstr "Lag _nytt trådløst nettverk..."
+
+#~ msgid "Wireless Networks (%s)"
+#~ msgstr "Trådløse nettverk (%s)"
+
+#~ msgid "Wireless Network (%s)"
+#~ msgstr "Trådløst nettverk (%s)"
+
+#~ msgid "Wireless Network"
+#~ msgid_plural "Wireless Networks"
+#~ msgstr[0] "Trådløst nettverk"
+#~ msgstr[1] "Trådløse nettverk"
+
+#~ msgid "wireless is disabled"
+#~ msgstr "trådløs er slått av"
+
+#~ msgid "More networks"
+#~ msgstr "Flere nettverk"
+
+#~ msgid "Wireless Networks Available"
+#~ msgstr "Trådløse nettverk er tilgjengelige"
+
+#~ msgid "Click on this icon to connect to a wireless network"
+#~ msgstr "Klikk på dette ikonet for å koble til et trådløst nettverk"
+
+#~ msgid "Don't show this message again"
+#~ msgstr "Ikke vis denne meldingen igjen"
+
+#~ msgid "You are now connected to the wireless network '%s'."
+#~ msgstr "Du er nå koblet til trådløst nettverk «%s»."
+
+#~ msgid "Preparing wireless network connection '%s'..."
+#~ msgstr "Forbereder trådløs nettverkstilkobling «%s»..."
+
+#~ msgid "Configuring wireless network connection '%s'..."
+#~ msgstr "Konfigurerer trådløs nettverkstilkobling «%s»..."
+
+#~ msgid "User authentication required for wireless network '%s'..."
+#~ msgstr "Brukerautentisering kreves av trådløst nettverk «%s»..."
+
+#~ msgid "Requesting a wireless network address for '%s'..."
+#~ msgstr "Ber om en nettverksadresse på trådløst nettverk for «%s»..."
+
+#~ msgid "Wireless network connection '%s' active: %s (%d%%)"
+#~ msgstr "Trådløs nettverkstilkobling «%s» er aktiv: %s (%d%%)"
+
+#~ msgid "Wireless network connection '%s' active"
+#~ msgstr "Trådløs nettverkstilkobling «%s» er aktiv"
+
+#~ msgid "Error displaying connection information:"
+#~ msgstr "Feil under visning av tilkoblingsinformasjon:"
+
+#~ msgid "Dynamic WEP"
+#~ msgstr "Dynamisk WEP"
+
+#~ msgid "WPA/WPA2"
+#~ msgstr "WPA/WPA2"
+
+#~ msgid "WEP"
+#~ msgstr "WEP"
+
+#~ msgid "Unknown"
+#~ msgstr "Ukjent"
+
+#~ msgid "%u Mb/s"
+#~ msgstr "%u Mb/s"
+
+#~ msgid "Ethernet (%s)"
+#~ msgstr "Ethernet (%s)"
+
+#~ msgid "802.11 WiFi (%s)"
+#~ msgstr "802.11 WiFi (%s)"
+
+#~ msgid "GSM (%s)"
+#~ msgstr "GSM (%s)"
+
+#~ msgid "CDMA (%s)"
+#~ msgstr "CDMA (%s)"
+
+#~ msgid "Interface:"
+#~ msgstr "Grensesnitt:"
+
+#~ msgid "Hardware Address:"
+#~ msgstr "Maskinvareadresse:"
+
+#~ msgid "Driver:"
+#~ msgstr "Driver:"
+
+#~ msgid "Speed:"
+#~ msgstr "Hastighet:"
+
+#~ msgid "Security:"
+#~ msgstr "Sikkerhet:"
+
+#~ msgid "Broadcast Address:"
+#~ msgstr "Kringkastingsadresse:"
+
+#~ msgid "Default Route:"
+#~ msgstr "Forvalgt rute:"
+
+#~ msgid "Primary DNS:"
+#~ msgstr "Primær DNS:"
+
+#~ msgid "Secondary DNS:"
+#~ msgstr "Sekundær DNS:"
+
+#~ msgid "No valid active connections found!"
+#~ msgstr "Ingen gyldige aktive tilkoblinger funnet!"
+
+#~ msgid ""
+#~ "Copyright © 2004-2008 Red Hat, Inc.\n"
+#~ "Copyright © 2005-2008 Novell, Inc."
+#~ msgstr ""
+#~ "Opphavsrett © 2004-2008 Red Hat, Inc.\n"
+#~ "Opphavsrett © 2005-2008 Novell, Inc."
+
+#~ msgid ""
+#~ "Notification area applet for managing your network devices and "
+#~ "connections."
+#~ msgstr ""
+#~ "Panelprogram for håndtering av dine nettverksenheter og -tilkoblinger."
+
+#~ msgid "NetworkManager Website"
+#~ msgstr "NetworkManager nettsted"
+
+#~ msgid "translator-credits"
+#~ msgstr ""
+#~ "Kjartan Maraas <kmaraas AT gnome DOT org>\n"
+#~ "Espen Stefansen <libbe AT stefansen DOT net>, 2007"
+
+#~ msgid "Missing resources"
+#~ msgstr "Mangler ressurser"
+
+#~ msgid "Mobile broadband network password"
+#~ msgstr "Passord for tilkoblign med mobilt bredbånd"
+
+#~ msgid "A password is required to connect to '%s'."
+#~ msgstr "Et passord kreves for å koble til «%s»."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed because the network connection was "
+#~ "interrupted."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet fordi nettverksforbindelsen ble avbrutt."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed because the VPN service stopped "
+#~ "unexpectedly."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet fordi VPN-tjenesten stoppet uventet."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed because the VPN service returned invalid "
+#~ "configuration."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet fordi VPN-tjenesten returnerte ugyldig "
+#~ "konfigurasjon."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed because the connection attempt timed out."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet pga tidsavbrudd for tilkoblingsforsøket."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed because the VPN service did not start in "
+#~ "time."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet fordi VPN-tjenesten ikke startet i tide."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed because the VPN service failed to start."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet fordi VPN-tjenesten ikke klarte å starte opp."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed because there were no valid VPN secrets."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet fordi det ikke finnes gyldige VPN-passord."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed because of invalid VPN secrets."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet pga ugyldig hemmelighet for VPN."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' disconnected because the network connection was "
+#~ "interrupted."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» ble koblet fra fordi nettverkstilkoblingen ble avbrutt."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' disconnected because the VPN service stopped."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» koblet fra fordi VPN-tjenesten stoppet."
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' disconnected."
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» koblet fra."
+
+#~ msgid "VPN Login Message"
+#~ msgstr "PÃ¥loggingsmelding for VPN"
+
+#~ msgid "VPN Connection Failed"
+#~ msgstr "VPN-tilkobling feilet"
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed because the VPN service failed to start.\n"
+#~ "\n"
+#~ "%s"
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» feilet fordi VPN-tjenesten ikke klarte å starte.\n"
+#~ "\n"
+#~ "%s"
+
+#~ msgid ""
+#~ "\n"
+#~ "The VPN connection '%s' failed to start.\n"
+#~ "\n"
+#~ "%s"
+#~ msgstr ""
+#~ "\n"
+#~ "VPN-tilkobling «%s» klarte ikke å starte.\n"
+#~ "\n"
+#~ "%s"
+
+#~ msgid "device not ready"
+#~ msgstr "enheten er ikke klar"
+
+#~ msgid "device not managed"
+#~ msgstr "enheten er ikke håndtert"
+
+#~ msgid "No network devices available"
+#~ msgstr "Ingen nettverksenheter tilgjengelig"
+
+#~ msgid "_VPN Connections"
+#~ msgstr "_VPN-tilkoblinger"
+
+#~ msgid "_Configure VPN..."
+#~ msgstr "_Sett opp VPN ..."
+
+#~ msgid "_Disconnect VPN"
+#~ msgstr "Ko_ble fra VPN"
+
+#~ msgid "NetworkManager is not running..."
+#~ msgstr "NetworkManager kjører ikke ..."
+
+#~ msgid "Enable _Wireless"
+#~ msgstr "Slå på _trådløs"
+
+#~ msgid "Enable _Mobile Broadband"
+#~ msgstr "Slå på _mobilt bredbånd"
+
+#~ msgid "Enable N_otifications"
+#~ msgstr "Slå på _varsling"
+
+#~ msgid "Connection _Information"
+#~ msgstr "Tilkoblings_informasjon"
+
+#~ msgid "Edit Connections..."
+#~ msgstr "Rediger tilkoblinger ..."
+
+#~ msgid "_Help"
+#~ msgstr "_Hjelp"
+
+#~ msgid "_About"
+#~ msgstr "_Om"
+
+#~ msgid "The network connection has been disconnected."
+#~ msgstr "Nettverksforbindelsen har blitt frakoblet."
+
+#~ msgid "Preparing network connection '%s'..."
+#~ msgstr "Forbereder nettverkstilkobling «%s»..."
+
+#~ msgid "User authentication required for network connection '%s'..."
+#~ msgstr "Brukerautentisering kreves for nettverkstilkobling «%s»..."
+
+#~ msgid "Network connection '%s' active"
+#~ msgstr "Nettverkstilkobling «%s» er aktiv"
+
+#~ msgid "Starting VPN connection '%s'..."
+#~ msgstr "Starter VPN-tilkobling «%s»..."
+
+#~ msgid "User authentication required for VPN connection '%s'..."
+#~ msgstr "Brukerautentisering kreves for VPN-tilkobling «%s»..."
+
+#~ msgid "Requesting a VPN address for '%s'..."
+#~ msgstr "Ber om en nettverksadresse på VPN for «%s»..."
+
+#~ msgid "VPN connection '%s' active"
+#~ msgstr "VPN-tilkobling «%s» er aktiv"
+
+#~ msgid ""
+#~ "The NetworkManager Applet could not find some required resources (the "
+#~ "glade file was not found)."
+#~ msgstr ""
+#~ "NetworkManager fant ikke nødvendige ressurser (glade-filen ble ikke "
+#~ "funnet)."
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid ""
+#~ "1 (Default)\n"
+#~ "2\n"
+#~ "3\n"
+#~ "4"
+#~ msgstr ""
+#~ "1 (forvalg)\n"
+#~ "2\n"
+#~ "3\n"
+#~ "4"
+
+#~ msgid ""
+#~ "<span size=\"larger\" weight=\"bold\">Active Network Connections</span>"
+#~ msgstr ""
+#~ "<span size=\"larger\" weight=\"bold\">Aktive nettverksforbindelser</span>"
+
+#~ msgid "As_k for this password every time"
+#~ msgstr "Spør om dette passordet _hver gang"
+
+#~ msgid ""
+#~ "Automatic\n"
+#~ "Version 0\n"
+#~ "Version 1"
+#~ msgstr ""
+#~ "Automatisk\n"
+#~ "Versjon 0\n"
+#~ "Versjon 1"
+
+#~ msgid "Connection Information"
+#~ msgstr "Tilkoblingsinformasjon"
+
+#~ msgid "No"
+#~ msgstr "Nei"
+
+#~ msgid ""
+#~ "Open System\n"
+#~ "Shared Key"
+#~ msgstr ""
+#~ "Ã?pent system\n"
+#~ "Delt nøkkel"
+
+#~ msgid "Yes"
+#~ msgstr "Ja"
+
+#~ msgid "_Password:"
+#~ msgstr "_Passord:"
+
+#~ msgid "label"
+#~ msgstr "etikett"
+
+#~ msgid "automatic"
+#~ msgstr "automatisk"
+
+#~ msgid "Failed to update connection secrets due to an unknown error."
+#~ msgstr ""
+#~ "Klarte ikke å oppdatere hemmelighet for tilkobling på grunn av en ukjent "
+#~ "feil."
+
+#~ msgid "_Service:"
+#~ msgstr "Tjene_ste:"
+
+#~ msgid "<b>Addresses</b>"
+#~ msgstr "<b>Adresser</b>"
+
+#~ msgid ""
+#~ "Automatic\n"
+#~ "Automatic with manual DNS settings\n"
+#~ "Manual\n"
+#~ "Link-Local\n"
+#~ "Shared to other computers"
+#~ msgstr ""
+#~ "Automatisk\n"
+#~ "Automatisk med manuelle DNS-innstillinger\n"
+#~ "Manuell\n"
+#~ "Lokal link\n"
+#~ "Delt med andre datamaskiner"
+
+#~ msgid "D_HCP client ID:"
+#~ msgstr "Klient-ID for D_HCP:"
+
+#~ msgid ""
+#~ "Domains used when resolving host names. Use commas to separate multiple "
+#~ "domains."
+#~ msgstr ""
+#~ "Domener som brukes ved oppslag av vertsnavn. Bruk komma for å skille "
+#~ "flere domener."
+
+#~ msgid ""
+#~ "IP addresses identify your computer on the network. Click the \"Add\" "
+#~ "button to add an IP address."
+#~ msgstr ""
+#~ "IP-adresser identifiserer din datamaskin på nettverket. Klikk på «Legg "
+#~ "til»-knappen for å legge til en IP-adresse."
+
+#~ msgid ""
+#~ "IP addresses of domain name servers used to resolve host names. Use "
+#~ "commas to separate multiple domain name server addresses."
+#~ msgstr ""
+#~ "IP-adresse for navnetjenere som brukes for å slå opp vertsnavn. Bruk "
+#~ "komma for å skille flere navnetjenere."
+
+#~ msgid ""
+#~ "If enabled, this connection will never be used as the default network "
+#~ "connection."
+#~ msgstr ""
+#~ "Hvis dette slås på vil tilkoblingen aldri bli brukt som forvalgt "
+#~ "nettverkstilkobling."
+
+#~ msgid "Ig_nore automatically obtained routes"
+#~ msgstr "Overse automatisk i_nnhentede ruter"
+
+#~ msgid "Use this c_onnection only for resources on its network"
+#~ msgstr "Bruk denne tilk_oblingen kun for ressurser på sitt nettverk"
+
+#~ msgid "_DNS servers:"
+#~ msgstr "_DNS-tjenere"
+
+#~ msgid "_Method:"
+#~ msgstr "_Metode:"
+
+#~ msgid "_Routesâ?¦"
+#~ msgstr "_Ruter..."
+
+#~ msgid "_Search domains:"
+#~ msgstr "_Søkedomener:"
+
+#~ msgid "_Routes…"
+#~ msgstr "_Ruter…"
+
+#~ msgid "<b>Basic</b>"
+#~ msgstr "<b>Grunnleggende</b>"
+
+#~ msgid ""
+#~ "Any\n"
+#~ "3G (UMTS/HSPA)\n"
+#~ "2G (GPRS/EDGE)\n"
+#~ "Prefer 3G (UMTS/HSPA)\n"
+#~ "Prefer 2G (GPRS/EDGE)"
+#~ msgstr ""
+#~ "Alle\n"
+#~ "3G (UMTS/HSPA)\n"
+#~ "2G (GPRS/EDGE)\n"
+#~ "Foretrekk 3G (UMTS/HSPA)\n"
+#~ "Foretrekk 2G (GPRS/EDGE)"
+
+#~ msgid "Change..."
+#~ msgstr "Bytt..."
+
+#~ msgid "Nu_mber:"
+#~ msgstr "Nu_mmer:"
+
+#~ msgid "PI_N:"
+#~ msgstr "PI_N:"
+
+#~ msgid "Sho_w passwords"
+#~ msgstr "_Vis passord"
+
+#~ msgid "_APN:"
+#~ msgstr "_APN:"
+
+#~ msgid "_Band:"
+#~ msgstr "_BÃ¥nd:"
+
+#~ msgid "<b>Allowed Authentication Methods</b>"
+#~ msgstr "<b>Tillatte autentiseringsmetoder</b>"
+
+#~ msgid "<b>Authentication</b>"
+#~ msgstr "<b>Autentisering</b>"
+
+#~ msgid "<b>Compression</b>"
+#~ msgstr "<b>Komprimering</b>"
+
+#~ msgid "<b>Echo</b>"
+#~ msgstr "<b>Ekko</b>"
+
+#~ msgid "Allow _BSD data compression"
+#~ msgstr "Tillat _BSD-datakomprimering"
+
+#~ msgid "Allow _Deflate data compression"
+#~ msgstr "Tillat _Deflate-datakomprimering"
+
+#~ msgid "Allowed methods:"
+#~ msgstr "Tillatte metoder:"
+
+#~ msgid "C_HAP"
+#~ msgstr "C_HAP"
+
+#~ msgid "Challenge Handshake Authentication Protocol"
+#~ msgstr "Challenge Handshake Authentication Protocol"
+
+#~ msgid "Configure _Methodsâ?¦"
+#~ msgstr "Konfigurer _metoder..."
+
+#~ msgid "Extensible Authentication Protocol"
+#~ msgstr "Extensible Authentication Protocol"
+
+#~ msgid "MSCHAP v_2"
+#~ msgstr "MSCHAP v_2"
+
+#~ msgid "Microsoft Challenge Handshake Authentication Protocol"
+#~ msgstr "Microsoft Challenge Handshake Authentication Protocol"
+
+#~ msgid "Microsoft Challenge Handshake Authentication Protocol version 2"
+#~ msgstr "Microsoft Challenge Handshake Authentication Protocol versjon 2"
+
+#~ msgid "Password Authentication Protocol"
+#~ msgstr "Password Authentication Protocol"
+
+#~ msgid "Send PPP _echo packets"
+#~ msgstr "Send _ekko-pakker for PPP"
+
+#~ msgid "Use TCP _header compression"
+#~ msgstr "Bruk komprimering av TCP-_hoder"
+
+#~ msgid "Use _stateful MPPE"
+#~ msgstr "Bruk _stateful MPPE"
+
+#~ msgid "_EAP"
+#~ msgstr "_EAP"
+
+#~ msgid "_MSCHAP"
+#~ msgstr "_MSCHAP"
+
+#~ msgid "_PAP"
+#~ msgstr "_PAP"
+
+#~ msgid "_Require 128-bit encryption"
+#~ msgstr "K_rev 128-bit kryptering"
+
+#~ msgid "_Use point-to-point encryption (MPPE)"
+#~ msgstr "Br_uk punkt-til-punkt kryptering (MPPE)"
+
+#~ msgid "Aut_onegotiate"
+#~ msgstr "F_orhandle automatisk"
+
+#~ msgid ""
+#~ "Automatic\n"
+#~ "10 Mb/s\n"
+#~ "100 Mb/s\n"
+#~ "1 Gb/s\n"
+#~ "10 Gb/s"
+#~ msgstr ""
+#~ "Automatisk\n"
+#~ "10 Mb/s\n"
+#~ "100 Mb/s\n"
+#~ "1 Gb/s\n"
+#~ "10 Gb/s"
+
+#~ msgid ""
+#~ "Automatic\n"
+#~ "Twisted Pair (TP)\n"
+#~ "Attachment Unit Interface (AUI)\n"
+#~ "BNC\n"
+#~ "Media Independent Interface (MII)"
+#~ msgstr ""
+#~ "Automatisk\n"
+#~ "Tvisted Pair (TP)\n"
+#~ "Attachment Unit Interface (AUI)\n"
+#~ "BNC\n"
+#~ "Media Independent Interface (MII)"
+
+#~ msgid "Full duple_x"
+#~ msgstr "Full duple_ks"
+
+#~ msgid "MT_U:"
+#~ msgstr "MT_U:"
+
+#~ msgid "_Port:"
+#~ msgstr "_Port:"
+
+#~ msgid "_Speed:"
+#~ msgstr "_Hastighet:"
+
+#~ msgid "bytes"
+#~ msgstr "bytes"
+
+#~ msgid ""
+#~ "Automatic\n"
+#~ "A (5 GHz)\n"
+#~ "B/G (2.4 GHz)"
+#~ msgstr ""
+#~ "Automatisk\n"
+#~ "A (5 GHz)\n"
+#~ "B/G (2.4 GHz)"
+
+#~ msgid "Ban_d:"
+#~ msgstr "BÃ¥n_d:"
+
+#~ msgid ""
+#~ "Infrastructure\n"
+#~ "Ad-hoc"
+#~ msgstr ""
+#~ "Infrastruktur\n"
+#~ "Ad-hoc"
+
+#~ msgid "M_ode:"
+#~ msgstr "M_odus:"
+
+#~ msgid "Mb/s"
+#~ msgstr "Mb/s"
+
+#~ msgid "Transmission po_wer:"
+#~ msgstr "Overføringsst_yrke:"
+
+#~ msgid "_BSSID:"
+#~ msgstr "_BSSID:"
+
+#~ msgid "_SSID:"
+#~ msgstr "_SSID:"
+
+#~ msgid "mW"
+#~ msgstr "mW"
+
+#~ msgid "_Security:"
+#~ msgstr "_Sikkerhet:"
+
+#~ msgid ""
+#~ "<span weight=\"bold\" size=\"larger\">Choose a VPN Connection Type</"
+#~ "span>\n"
+#~ "\n"
+#~ "Select the type of VPN you wish to use for the new connection. If the "
+#~ "type of VPN connection you wish to create does not appear in the list, "
+#~ "you may not have the correct VPN plugin installed."
+#~ msgstr ""
+#~ "<span weight=\"bold\" size=\"larger\">Velg en type VPN-tilkobling</span>\n"
+#~ "\n"
+#~ "Velg type VPN du ønsker å bruke for den nye tilkoblingen. Hvis du ikke "
+#~ "finner riktig type VPN-tilkobling i listen er det mulig at du ikke har "
+#~ "korrekt VPN-tillegg installert."
+
+#~ msgid "Createâ?¦"
+#~ msgstr "Lag:"
+
+#~ msgid "Address"
+#~ msgstr "Adresse"
+
+#~ msgid "Netmask"
+#~ msgstr "Nettmaske"
+
+#~ msgid "Gateway"
+#~ msgstr "Gateway"
+
+#~ msgid "Metric"
+#~ msgstr "Metrisk"
+
+#~ msgid "Prefix"
+#~ msgstr "Prefiks"
+
+#~ msgid "Could not load DSL user interface."
+#~ msgstr "Kunne ikke laste brukergrensesnitt for DSL."
+
+#~ msgid "DSL"
+#~ msgstr "DSL"
+
+#~ msgid "Automatic (VPN)"
+#~ msgstr "Automatisk (VPN)"
+
+#~ msgid "Automatic (VPN) addresses only"
+#~ msgstr "Kun automatiske (VPN) adresser"
+
+#~ msgid "Automatic (PPP)"
+#~ msgstr "Automatisk (PPP)"
+
+#~ msgid "Automatic (PPP) addresses only"
+#~ msgstr "Kun automatiske (PPP) adresser"
+
+#~ msgid "Automatic (PPPoE)"
+#~ msgstr "Automatisk (PPPoE)"
+
+#~ msgid "Automatic (PPPoE) addresses only"
+#~ msgstr "Kunn automatiske (PPPoE) adresser"
+
+#~ msgid "Automatic (DHCP)"
+#~ msgstr "Automatisk (DHCP)"
+
+#~ msgid "Automatic (DHCP) addresses only"
+#~ msgstr "Kun automatiske (DHCP) adresser"
+
+#~ msgid "Shared to other computers"
+#~ msgstr "Delt med andre datamaskiner"
+
+#~ msgid "Editing IPv4 routes for %s"
+#~ msgstr "Rediger IPv4-ruter for %s"
+
+#~ msgid "Could not load IPv4 user interface."
+#~ msgstr "Kunne ikke laste brukergrensesnitt for IPv4"
+
+#~ msgid "IPv4 Settings"
+#~ msgstr "IPv4-innstillinger"
+
+#~ msgid "Automatic"
+#~ msgstr "Automatisk"
+
+#~ msgid "Automatic, addresses only"
+#~ msgstr "Automatisk, kun adresser"
+
+#~ msgid "Editing IPv6 routes for %s"
+#~ msgstr "Rediger IPv6-ruter for %s"
+
+#~ msgid "Could not load IPv6 user interface."
+#~ msgstr "Kunne ikke laste brukergrensesnitt for IPv6."
+
+#~ msgid "IPv6 Settings"
+#~ msgstr "IPv6-innstillinger"
+
+#~ msgid "Could not load mobile broadband user interface."
+#~ msgstr "Kunne ikke laste brukergrensesnitt for mobilt bredbånd."
+
+#~ msgid "Unsupported mobile broadband connection type."
+#~ msgstr "Ikke støttet type mobil bredbåndsforbindelse."
+
+#~ msgid "Select Mobile Broadband Provider Type"
+#~ msgstr "Velg type tilbyder for mobilt bredbånd"
+
+#~ msgid ""
+#~ "Select the technology your mobile broadband provider uses. If you are "
+#~ "unsure, ask your provider."
+#~ msgstr ""
+#~ "Velg tekonlogien din bredbåndstilbyder for mobil bruker. Spør tilbyderen "
+#~ "hvis du er usikker."
+
+#~ msgid ""
+#~ "My provider uses _GSM-based technology (i.e. GPRS, EDGE, UMTS, HSDPA)"
+#~ msgstr ""
+#~ "Min tilbyder bruker _GSM-basert teknologi (f.eks GPRS, EDGE, UMTS, HSDPA)"
+
+#~ msgid "My provider uses _CDMA-based technology (i.e. 1xRTT, EVDO)"
+#~ msgstr "Min tilbyder bruker _CDMA-basert teknologi (f.eks 1xRTT, EVDO)"
+
+#~ msgid "EAP"
+#~ msgstr "EAP"
+
+#~ msgid "none"
+#~ msgstr "ingen"
+
+#~ msgid "Editing PPP authentication methods for %s"
+#~ msgstr "Rediger PPP-autentiseringsmetoder for %s"
+
+#~ msgid "Could not load PPP user interface."
+#~ msgstr "Kunne ikke laste brukergrensesnitt for PPP."
+
+#~ msgid "PPP Settings"
+#~ msgstr "PPP-innstillinger"
+
+#~ msgid "VPN"
+#~ msgstr "VPN"
+
+#~ msgid "Could not find VPN plugin service for '%s'."
+#~ msgstr "Kunne ikke finne tjenneste for VPN-tillegg «%s»."
+
+#~ msgid "VPN connection %d"
+#~ msgstr "VPN-tilkobling %d"
+
+#~ msgid "Could not load wired user interface."
+#~ msgstr "Kunne ikke laste brukergrensesnitt for kablet nettverk."
+
+#~ msgid "Wired connection %d"
+#~ msgstr "Kablet nettverkforbindelse %d"
+
+#~ msgid "802.1x Security"
+#~ msgstr "802.1x sikkerhet"
+
+#~ msgid "Use 802.1X security for this connection"
+#~ msgstr "Bruk 802.1X-sikkerhet for denne tilkoblingen"
+
+#~ msgid "default"
+#~ msgstr "forvalg"
+
+#~ msgid "%u (%u MHz)"
+#~ msgstr "%u (%u MHz)"
+
+#~ msgid "Could not load WiFi user interface."
+#~ msgstr "Kunne ikke laste brukergrensesnitt for trådløst nettverk."
+
+#~ msgid "Wireless"
+#~ msgstr "Trådløs"
+
+#~ msgid "Wireless connection %d"
+#~ msgstr "Trådløs nettverksforbindelse %d"
+
+#~ msgid "Could not load WiFi security user interface; missing WiFi setting."
+#~ msgstr ""
+#~ "Kunne ikke laste brukergrensesnitt for trådløs sikkerhet; mangler WiFi-"
+#~ "innstilling."
+
+#~ msgid "Could not load WiFi security user interface."
+#~ msgstr "Kunne ikke laste brukergrensesnitt for trådløs sikkerhet."
+
+#~ msgid "Wireless Security"
+#~ msgstr "Trådløs sikkerhet"
+
+#~ msgid "Editing %s"
+#~ msgstr "Redigerer %s"
+
+#~ msgid "Editing un-named connection"
+#~ msgstr "Redigerer tilkobling uten navn"
+
+#~ msgid ""
+#~ "The connection editor could not find some required resources (the "
+#~ "NetworkManager applet glade file was not found)."
+#~ msgstr ""
+#~ "Redigering av tilkobling fant ikke alle nødvendige ressurser (glade-fil "
+#~ "for panelprogrammet ble ikke funnet)."
+
+#~ msgid ""
+#~ "The connection editor could not find some required resources (the glade "
+#~ "file was not found)."
+#~ msgstr ""
+#~ "Redigering av tilkobling fant ikke alle nødvendige ressurser (glade-fil "
+#~ "ble ikke funnet)."
+
+#~ msgid "Error creating connection editor dialog."
+#~ msgstr "Feil under oppretting av dialog for redigering av tilkobling."
+
+#~ msgid "Apply"
+#~ msgstr "Bruk"
+
+#~ msgid "Save this connection for all users of this machine."
+#~ msgstr "Lagre denne tilkoblingen for alle brukere på denne maskinen."
+
+#~ msgid "Apply..."
+#~ msgstr "Bruk..."
+
+#~ msgid "Authenticate to save this connection for all users of this machine."
+#~ msgstr ""
+#~ "Autentiser for å lagre denne tilkoblingen for alle brukere på denne "
+#~ "maskinen."
+
+#~ msgid "Available to all users"
+#~ msgstr "Tilgjengelig for alle brukere"
+
+#~ msgid "Connect _automatically"
+#~ msgstr "_Automatisk tilkobling"
+
+#~ msgid "Connection _name:"
+#~ msgstr "Tilkoblings_navn:"
+
+#~ msgid "E_xport"
+#~ msgstr "E_ksporter"
+
+#~ msgid "_Import"
+#~ msgstr "_Importer"
+
+#~ msgid "never"
+#~ msgstr "aldri"
+
+#~ msgid "now"
+#~ msgstr "nå"
+
+#~ msgid "%d minute ago"
+#~ msgid_plural "%d minutes ago"
+#~ msgstr[0] "%d minutt siden"
+#~ msgstr[1] "%d minutter siden"
+
+#~ msgid "%d hour ago"
+#~ msgid_plural "%d hours ago"
+#~ msgstr[0] "%d time siden"
+#~ msgstr[1] "%d timer siden"
+
+#~ msgid "%d day ago"
+#~ msgid_plural "%d days ago"
+#~ msgstr[0] "%d dag siden"
+#~ msgstr[1] "%d dager siden"
+
+#~ msgid "%d month ago"
+#~ msgid_plural "%d months ago"
+#~ msgstr[0] "%d måned siden"
+#~ msgstr[1] "%d måneder siden"
+
+#~ msgid "%d year ago"
+#~ msgid_plural "%d years ago"
+#~ msgstr[0] "%d år siden"
+#~ msgstr[1] "%d år siden"
+
+#~ msgid "Connection add failed"
+#~ msgstr "Klarte ikke å legge til tilkobling"
+
+#~ msgid "Error editing connection: property '%s' / '%s' invalid: %d"
+#~ msgstr "Feil ved redigering av tilkobling: egenskap «%s» / «%s» ugyldig: %d"
+
+#~ msgid "An unknown error ocurred."
+#~ msgstr "En ukjent feil oppsto."
+
+#~ msgid "Error initializing editor"
+#~ msgstr "Feil under initiering av redigering"
+
+#~ msgid "Could not edit new connection"
+#~ msgstr "Kunne ikke redigere ny tilkobling"
+
+#~ msgid "Connection delete failed"
+#~ msgstr "Sletting av tilkobling feilet"
+
+#~ msgid "Are you sure you wish to delete the connection %s?"
+#~ msgstr "Sikker på at du vil slette denne tilkoblingen %s?"
+
+#~ msgid "Cannot import VPN connection"
+#~ msgstr "Kan ikke importere VPN-tilkobling"
+
+#~ msgid "Could not edit imported connection"
+#~ msgstr "Kunne ikke redigere importert tilkobling"
+
+#~ msgid "Name"
+#~ msgstr "Navn"
+
+#~ msgid "Last Used"
+#~ msgstr "Sist brukt"
+
+#~ msgid "Edit"
+#~ msgstr "Rediger"
+
+#~ msgid "Edit the selected connection"
+#~ msgstr "Rediger valgt tilkobling"
+
+#~ msgid "Edit..."
+#~ msgstr "Rediger..."
+
+#~ msgid "Authenticate to edit the selected connection"
+#~ msgstr "Autentiser for å redigere valgt tilkobling."
+
+#~ msgid "Delete"
+#~ msgstr "Slett"
+
+#~ msgid "Delete the selected connection"
+#~ msgstr "Slett valgt tilkobling"
+
+#~ msgid "Delete..."
+#~ msgstr "Slett..."
+
+#~ msgid "Authenticate to delete the selected connection"
+#~ msgstr "Autentiser for å slette valgt tilkobling"
+
+#~ msgid "Select file to import"
+#~ msgstr "Velg fil som skal importeres"
+
+#~ msgid "A file named \"%s\" already exists."
+#~ msgstr "En fil med navn «%s» eksisterer allerede."
+
+#~ msgid "_Replace"
+#~ msgstr "E_rstatt"
+
+#~ msgid "Do you want to replace %s with the VPN connection you are saving?"
+#~ msgstr "Vil du erstatte %s med VPN-tilkoblingen du lagrer?"
+
+#~ msgid "Cannot export VPN connection"
+#~ msgstr "Kan ikke eksportere VPN-tilkobling"
+
+#~ msgid ""
+#~ "The VPN connection '%s' could not be exported to %s.\n"
+#~ "\n"
+#~ "Error: %s."
+#~ msgstr ""
+#~ "VPN-tilkobling «%s» kunne ikke eksporteres til %s.\n"
+#~ "\n"
+#~ "Feil: %s."
+
+#~ msgid "Export VPN connection..."
+#~ msgstr "Eksporter VPN-tilkobling..."
+
+#~ msgid "%s Network"
+#~ msgstr "%s nettverk:"
+
+#~ msgid "Error: %s"
+#~ msgstr "Feil: %s"
+
+#, fuzzy
+#~ msgid "failed to connect to the phone."
+#~ msgstr "Du er nå tilkoblet GSM-nettverk."
+
+#, fuzzy
+#~ msgid "could not connect to the system bus."
+#~ msgstr "Du er nå koblet til trådløst nettverk «%s»."
+
+#, fuzzy
+#~ msgid "could not find the Bluetooth device."
+#~ msgstr "Kunne ikke finne tjenneste for VPN-tillegg «%s»."
+
+#~ msgid "Usage:"
+#~ msgstr "Bruk:"
+
+#~ msgid "GPRS"
+#~ msgstr "GPRS"
+
+#~ msgid "EDGE"
+#~ msgstr "EDGE"
+
+#~ msgid "UMTS"
+#~ msgstr "UMTS"
+
+#~ msgid "HSDPA"
+#~ msgstr "HSDPA"
+
+#~ msgid "HSUPA"
+#~ msgstr "HSUPA"
+
+#~ msgid "HSPA"
+#~ msgstr "HSPA"
+
+#~ msgid "not registered"
+#~ msgstr "ikke registrert"
+
+#~ msgid "searching"
+#~ msgstr "søker"
+
+#~ msgid "registration denied"
+#~ msgstr "registrering nektet"
+
+#, fuzzy
+#~ msgid "Roaming network (%s)"
+#~ msgstr "Kablet nettverk (%s)"
+
+#~ msgid ""
+#~ "Your mobile broadband connection is configured with the following "
+#~ "settings:"
+#~ msgstr ""
+#~ "Din mobile bredbåndstilkobling er konfigurert med følgende innstillinger:"
+
+#~ msgid "Your Device:"
+#~ msgstr "Din enhet:"
+
+#~ msgid "Your Provider:"
+#~ msgstr "Din tilbyder:"
+
+#~ msgid "Your Plan:"
+#~ msgstr "Din plan:"
+
+#~ msgid "Confirm Mobile Broadband Settings"
+#~ msgstr "Bekreft innstillinger for mobilt bredbånd"
+
+#~ msgid "Unlisted"
+#~ msgstr "Ikke listet"
+
+#~ msgid "_Select your plan:"
+#~ msgstr "_Velg din plan:"
+
+#~ msgid "Selected plan _APN (Access Point Name):"
+#~ msgstr "_APN (Navn på aksesspunkt) for valgt plan:"
+
+#~ msgid "Choose your Billing Plan"
+#~ msgstr "Velg din betalingsplan"
+
+#~ msgid "My plan is not listed..."
+#~ msgstr "Min plan er ikke på listen..."
+
+#~ msgid "Select your provider from a _list:"
+#~ msgstr "Velg din tilbyder fra en _liste:"
+
+#~ msgid "Provider"
+#~ msgstr "Tilbyder"
+
+#~ msgid "I can't find my provider and I wish to enter it _manually:"
+#~ msgstr "Jeg kan ikke finne min tilbyder og ønsker å oppgi denne _manuelt:"
+
+#~ msgid "Provider:"
+#~ msgstr "Tilbyder:"
+
+#~ msgid "My provider uses GSM technology (GPRS, EDGE, UMTS, HSPA)"
+#~ msgstr "Min tilbyder bruker GSM-teknologi (GPRS, EDGE, UMTS, HSDPA)"
+
+#~ msgid "My provider uses CDMA technology (1xRTT, EVDO)"
+#~ msgstr "Min tilbyder bruker CDMA-teknologi (1xRTT, EVDO)"
+
+#~ msgid "Choose your Provider"
+#~ msgstr "Velg din tilbyder"
+
+#~ msgid "Country List:"
+#~ msgstr "Liste med land:"
+
+#~ msgid "Country"
+#~ msgstr "Land"
+
+#~ msgid "My country is not listed"
+#~ msgstr "Landet mitt er ikke på listen"
+
+#~ msgid "Choose your Provider's Country"
+#~ msgstr "Velg din tilbyders land"
+
+#~ msgid "Installed CDMA device"
+#~ msgstr "Installert CDMA-enhet"
+
+#~ msgid ""
+#~ "This assistant helps you easily set up a mobile broadband connection to a "
+#~ "cellular (3G) network."
+#~ msgstr ""
+#~ "Denne assistenten hjelper deg å sette opp en mobil bredbåndstilkobling "
+#~ "til et mobilnettverk (3G)."
+
+#~ msgid "You will need the following information:"
+#~ msgstr "Du trenger følgende informasjon:"
+
+#~ msgid "Your broadband provider's name"
+#~ msgstr "Navnet på din bredbåndstilbyder"
+
+#~ msgid "Your broadband billing plan name"
+#~ msgstr "Navn på betalingsplan for bredbånd"
+
+#~ msgid "(in some cases) Your broadband billing plan APN (Access Point Name)"
+#~ msgstr ""
+#~ "(i enkelte tilfeller) APN (navn på aksesspunkt) for din betalingsplan for "
+#~ "bredbånd"
+
+#~ msgid "Create a connection for _this mobile broadband device:"
+#~ msgstr "Lag en tilkobling for _denne mobile bredbåndsenheten:"
+
+#~ msgid "Any device"
+#~ msgstr "Enhver enhet"
+
+#~ msgid "Set up a Mobile Broadband Connection"
+#~ msgstr "Sett opp en mobil bredbåndstilkobling"
+
+#~ msgid "New Mobile Broadband Connection"
+#~ msgstr "Ny mobil bredbåndstilkobling"
+
+#~ msgid "Cannot start VPN connection '%s'"
+#~ msgstr "Kan ikke starte VPN-tilkobling «%s»"
+
+#~ msgid ""
+#~ "Could not find the authentication dialog for VPN connection type '%s'. "
+#~ "Contact your system administrator."
+#~ msgstr ""
+#~ "Fant ikke autentiseringsdialogen for VPN tilkoblingstypen «%s». Kontakt "
+#~ "din systemadministrator."
+
+#~ msgid ""
+#~ "There was a problem launching the authentication dialog for VPN "
+#~ "connection type '%s'. Contact your system administrator."
+#~ msgstr ""
+#~ "Det oppstod en feil under oppstart av autentiseringsdialogen for VPN "
+#~ "tilkoblingstypen «%s». Kontakt din systemadministrator."
+
+#~ msgid "Wired 802.1X authentication"
+#~ msgstr "Kablet 802.1X-autentisering"
+
+#~ msgid "New..."
+#~ msgstr "Ny..."
+
+#~ msgid "No Certificate Authority certificate chosen"
+#~ msgstr "Ingen Certificate Authority-sertifikat er valgt"
+
+#~ msgid "GTC"
+#~ msgstr "GTC"
+
+#~ msgid "Unencrypted private keys are insecure"
+#~ msgstr "Private nøkler uten kryptering er ikke sikre"
diff --git a/po/nl.po b/po/nl.po
new file mode 100644
index 0000000..c7ec829
--- /dev/null
+++ b/po/nl.po
@@ -0,0 +1,559 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-27 16:38+0200\n"
+"PO-Revision-Date: 2009-09-22 11:00\n"
+"Last-Translator: Novell Language <language novell com>\n"
+"Language-Team: Novell Language <language novell com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr ""
+
+#: ../libnm-gtk/nm-ethernet-item.c:88
+msgid "802.1x"
+msgstr ""
+
+#: ../libnm-gtk/nm-wifi-item.c:60 ../src/nmn-list.c:105
+#: ../src/nmn-applet.c:337 ../src/nmn-new-connection.c:636
+msgid "WiFi"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-item.c:36 ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:115 ../src/nmn-applet.c:349
+#: ../src/nmn-new-connection.c:661
+msgid "3G"
+msgstr ""
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Geen"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEB 40/128-bits sleutel"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bit wachtwoordzin"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamische WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Persoonlijk"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "_Maak"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Wachtwoorden of versleuteling is nodig om toegang te krijgen tot draadloos "
+"netwerk '%s'."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Draadloze netwerk authenticatie vereist"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Authenticatie vereist door draadloos netwerk"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Maak een nieuw draadloos netwerk"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nieuw draadloos netwerk"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Geef een naam voor het nieuwe draadloze netwerk."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Verbind met een verborgen draadloos netwerk"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Verborgen draadloos netwerk"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Geef de naam en beveiligings details op van het verborgen draadloos netwek "
+"waar je mee wilt verbinden."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_Verbinden"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Verbinding:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Ander draadloos netwerk..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Draadloze _adapter:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Netwerknaam:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Draadloze beveiliging:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Geen "
+"certificeringsinstantiecertificaat gekozen</span>\n"
+"\n"
+"Als u geen certificaat van een certificeringsinstantie gebruikt, kan dit "
+"leiden tot verbindingen met onveilige, kwaadaardige draadloze netwerken. "
+"Wilt u een certificeringsinstantiecertificaat kiezen?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Certificeringsinstantiecertificaat kiezen"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Niet opnieuw waarschuwen"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Negeren"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Verificatie:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Wachtwoord:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Wachtwoord weergeven"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Gebruikersnaam:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Anonieme identiteit:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Certificaat van certificeringsinstantie:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Binnenste verificatie:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP-versie:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identiteit:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Wachtwoord van privésleutel:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Privésleutel:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Gebruikerscertificaat:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Sleutel:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Sleutel weergeven"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP-index:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Type:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Kies een certifikaat autoriteits bestand..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Kies je persoonlijke certifikaat..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Kie je persoonlijke sleutel..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM, of PKCS#12 prive sleutels (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER of PEM certifikaten (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Vertunneld TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Beschermd EAP (PEAP)"
+
+#: ../src/nmn-list.c:68
+msgid " and "
+msgstr ""
+
+#: ../src/nmn-list.c:79
+msgid "Sorry, we can't find any networks."
+msgstr ""
+
+#: ../src/nmn-list.c:82
+msgid " You could try disabling Offline mode."
+msgstr ""
+
+#: ../src/nmn-list.c:102
+msgid " You could try turning on "
+msgstr ""
+
+#: ../src/nmn-list.c:110 ../src/nmn-applet.c:343
+msgid "Wired"
+msgstr ""
+
+#: ../src/nmn-applet.c:304
+#, fuzzy
+msgid "Add new connection"
+msgstr "Nieuwe verbinding toevoegen"
+
+#: ../src/nmn-applet.c:310
+#, fuzzy
+msgid "Networks"
+msgstr "_Netwerknaam:"
+
+#: ../src/nmn-applet.c:355
+msgid "WiMAX"
+msgstr ""
+
+#: ../src/nmn-applet.c:362
+msgid "Bluetooth"
+msgstr ""
+
+#: ../src/nmn-applet.c:376
+msgid "Offline mode"
+msgstr ""
+
+#: ../src/nmn-applet.c:382
+#, fuzzy
+msgid "This will disable all your connections"
+msgstr "Hiermee worden alle draadloze verbindingen uitgeschakeld"
+
+#: ../src/main.c:54
+msgid "Run in standalone mode"
+msgstr ""
+
+#: ../src/main.c:61
+msgid "NetworkManager Netbook"
+msgstr ""
+
+#: ../src/main.c:62
+msgid "- NetworkManager Netbook"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:67
+#, fuzzy
+msgid "network"
+msgstr "Verborgen netwerk"
+
+#: ../src/nmn-panel-client.c:181
+#, fuzzy
+msgid "Network connected"
+msgstr "Niet verbonden"
+
+#: ../src/nmn-panel-client.c:185
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:188
+#, c-format
+msgid "You're now connected to %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:190
+msgid "You're now connected to network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:192
+#, fuzzy
+msgid "Network lost"
+msgstr "_Netwerknaam:"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:199
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:201
+msgid "Sorry, we've lost your connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:236
+#, c-format
+msgid "networks - not connected"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:239
+#, fuzzy, c-format
+msgid "networks - connecting"
+msgstr "Nieuwe verbinding toevoegen"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - %s - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:249
+#, c-format
+msgid "networks - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:251
+#, fuzzy
+msgid "networks - connected"
+msgstr "Niet verbonden"
+
+#: ../src/nmn-item-renderer.c:140
+msgid "Connected"
+msgstr "Verbonden"
+
+#: ../src/nmn-item-renderer.c:141 ../src/nmn-item-renderer.c:145
+msgid "Disconnect"
+msgstr "Verbreek verbinding"
+
+#: ../src/nmn-item-renderer.c:144
+msgid "Connecting..."
+msgstr "Verbinden..."
+
+#: ../src/nmn-item-renderer.c:148
+msgid "Disconnected"
+msgstr "Niet verbonden"
+
+#: ../src/nmn-item-renderer.c:149
+msgid "Connect"
+msgstr "Verbind"
+
+#: ../src/nmn-item-renderer.c:263
+msgid "Really remove?"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:279
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+
+#: ../src/nmn-connection-details.c:104
+msgid "(none)"
+msgstr "(geen)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:475
+msgid "Connect by:"
+msgstr "Verbinden via:"
+
+#: ../src/nmn-connection-details.c:478
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:483
+msgid "Manual"
+msgstr "Handmatig"
+
+#: ../src/nmn-connection-details.c:488
+msgid "Link Local"
+msgstr "Lokaal koppelen"
+
+#. Address
+#: ../src/nmn-connection-details.c:496
+msgid "IP Address:"
+msgstr "IP-adres:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:505
+msgid "Subnet mask:"
+msgstr "Subnetmasker:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:514
+msgid "Router:"
+msgstr "Router:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:523
+msgid "DNS:"
+msgstr "DNS:"
+
+#: ../src/nmn-new-connection.c:247
+msgid "3G disabled"
+msgstr "3G uitgeschakeld"
+
+#: ../src/nmn-new-connection.c:252
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Interne 3G-modem en SIM-kaart gedetecteerd"
+
+#: ../src/nmn-new-connection.c:254
+msgid "No modems detected"
+msgstr "Geen modems gedetecteerd"
+
+#: ../src/nmn-new-connection.c:611
+msgid "Add a new connection"
+msgstr "Nieuwe verbinding toevoegen"
+
+#: ../src/nmn-new-connection.c:631
+msgid "Hidden network"
+msgstr "Verborgen netwerk"
+
+#: ../src/nmn-new-connection.c:657
+msgid "Save connection"
+msgstr "Verbinding opslaan"
+
+#: ../src/nmn-new-connection.c:666
+msgid "Return to Networking"
+msgstr "Terug naar netwerken"
+
+#: ../src/nmn-mobile-providers.c:504
+msgid "Default"
+msgstr "Standaard"
+
+#~ msgid "Unavailable"
+#~ msgstr "Niet beschikbaar"
+
+#~ msgid "On"
+#~ msgstr "Aan"
+
+#~ msgid "Off"
+#~ msgstr "Uit"
+
+#~ msgid "Advanced"
+#~ msgstr "Geavanceerd"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>Vluchtmodus</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>Bedraad</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>Een nieuwe verbinding toevoegen</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>Netwerken</b></big>"
diff --git a/po/pa.po b/po/pa.po
new file mode 100644
index 0000000..5460537
--- /dev/null
+++ b/po/pa.po
@@ -0,0 +1,687 @@
+# Punjabi translation for network-manager-netbook.
+# Copyright (C) 2009 network-manager-netbook's COPYRIGHT HOLDER
+# This file is distributed under the same license as the network-manager-netbook package.
+#
+# A S Alam <aalam users sf net>, 2009, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug."
+"cgi?product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-03-04 23:58+0000\n"
+"PO-Revision-Date: 2010-03-21 18:57+0530\n"
+"Last-Translator: A S Alam <aalam users sf net>\n"
+"Language-Team: Punjabi/Panjabi <kde-i18n-doc kde org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "�ਪਣ� ਨ�ੱ�ਵਰ� ��ਨ��ਸ਼ਨ �ੰ�ਰ�ਲ �ਰ�"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "�ਪਣਾ ਮ�ਬਾ�ਲ ਫ�ਨ �ਸਤ�ਮਾਲ �ਰ�� �ੰ�ਰਨ�ੱ� ਵਰਤ��"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "ਡਿਫਾਲ�"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "ਬਲਿ���ੱਥ"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+#| msgid "Control your network connections"
+msgid "Could not delete connection: %s"
+msgstr "%s: ��ਨ��� ਹ�ਾ�� ਨਹ�� �ਾ ਸ�ਿ�"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "%s: �ੰਤਰ ����ਵ�� ਨਹ�� ��ਤਾ �ਾ ਸ�ਿ�"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "%s: �ੰਤਰ ਡ�����ਵ�� ਨਹ�� ��ਤਾ �ਾ ਸ�ਿ�"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "ਤਾਰ ਨਾਲ"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "PIN �ਣ-ਲਾ� �ਰਨ ਲ� ਫ�ਲ�ਹ: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "ਲਾ� ਹ��� GSM �ੰਤਰ"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "ਵਾ�ਫਾ�"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "��� ਨਹ��"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-ਬਿੱ� ��ੰ��"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-ਬਿੱ� ਸ਼ਬਦ"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "ਡਾ�ਨ�ਮਿ� WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 ਨਿੱ��"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 �ੰ�ਰਪਰਾ��਼"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "ਬਣਾ�(_r)"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr "ਬ�ਤਾਰ ਨ�ੱ�ਵਰ� '%s' ਵਰਤਣ ਲ� ਪਾਸਵਰਡ �ਾ� �ੰ��ਰਿਪਸ਼ਨ ��ੰ�� ਦ� ਲ�� ਹ�।"
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "ਬ�ਤਾਰ ਨ�ੱ�ਵਰ� ਪਰਮਾਣ�ਿਤਾ ਲ���ਦ� ਹ�"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "ਬ�ਤਾਰ ਨ�ੱ�ਵਰ� ਵਲ�� ਪਰਮਾਣ�ਿਤਾ ਲ� ਲ�� ਹ�"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "ਨਵਾ� ਬ�ਤਾਰ ਨ�ੱ�ਵਰ� ਬਣਾ�"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "ਨਵਾ� ਬ�ਤਾਰ ਨ�ੱ�ਵਰ�"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "ਬ�ਤਾਰ ਨ�ੱ�ਵਰ� ਲ� ਨਾ� ਦਿ�, �� ਤ�ਸ�� ਬਣਾ� �ਾਹ�ੰਦ� ਹ�।"
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "ਲ��ਵਾ� ਬ�ਤਾਰ ਨ�ੱ�ਵਰ� ਬਣਾ�"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "ਲ��ਵਾ� ਬ�ਤਾਰ ਨ�ੱ�ਵਰ�"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr "ਲ��ਵ�� ਬ�ਤਾਰ ਨ�ੱ�ਵਰ� ਲ� ਨਾ� �ਤ� ਸ�ਰੱ�ਿ� ਵ�ਰਵਾ ਦਿ�, �ਿਸ ਨਾਲ ਤ�ਸ�� ��ਨ��� �ਰਨਾ �ਾਹ�ਦ� ਹ�।"
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "��ਨ��� �ਰ�(_o)"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "��ਨ��ਸ਼ਨ:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "ਹ�ਰ ਬ�ਤਾਰ ਨ�ੱ�ਵਰ�..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "ਬ�ਤਾਰ �ਡੱਪ�ਰ(_a):"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "ਨ�ੱ�ਵਰ� ਨਾ�(_N):"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "ਬ�ਤਾਰ ਸ�ਰੱ�ਿ�(_W):"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">��� ਸਰ��ਫਿ��� �ਥਾਰ�� ਸਰ��ਫਿ��� ਨਹ�� ��ਣਿ�</"
+"span>\n"
+"\n"
+"ਸਰ��ਫਿ��� �ਥਾਰ�� (CA) ਸਰ��ਫਿ��� ਨਾ ਵਰਤਣ ਦ� ਨਤ��� ਵ��� �ਸ�ਰੱ�ਿ�ਤ, ਠੱ� ਬ�ਤਾਰ ਨ�ੱ�ਵਰ�ਾ� ਨਾਲ "
+"��ਨ��ਸ਼ਨ ਹ� ਸ�ਦਾ ਹ�। �� ਤ�ਸ�� ਸਰ��ਫਿ��� �ਥਾਰ�� ਸਰ��ਫਿ��� ��ਣਨਾ �ਾਹ�ੰਦ� ਹ�?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "CA ਸਰ��ਫਿ��� ��ਣ�"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "ਮ�ਨ�ੰ ��ਤਾਵਨ� ਨਾ ਦਿ�"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "�ਣਡਿੱਠਾ"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "ਪਰਮਾਣ�ਿਤਾ:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "ਪਾਸਵਰਡ:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "ਪਾਸਵਰਡ ਵ���"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "ਯ��਼ਰ ਨਾ�:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "��ਿ�ਤ ਪ�ਾਣ:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA ਸਰ��ਫਿ���:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "�ੰਦਰ�ਨ� ਪਰਮਾਣ�ਿਤਾ:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP ਵਰ�ਨ:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "ਪ�ਾਣ:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "ਪ�ਰਾ�ਵ�� ��ੰ�� ਪਾਸਵਰਡ:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "ਪ�ਰਾ�ਵ�� ��ੰ��:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "ਯ��਼ਰ ਸਰ��ਫਿ���:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "��ੰ��:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "��ੰ�� ਵ���"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP �ੰਡ��ਸ:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "�ਾ�ਪ:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "ਸਰ��ਫਿ��� �ਥਾਰ�� ਸਰ��ਫਿ��� ��ਣ�..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "�ਪਣਾ ਪ�ਰਾ�ਵ�� ਸਰ��ਫਿ��� ��ਣ�..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "�ਪਣ� ਪ�ਰਾ�ਵ�� ��ੰ�� ��ਣ�..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM, �ਾ� PKCS#12 ਪ�ਰਾ�ਵ�� ��ੰ���� (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER �ਾ� PEM ਸਰ��ਫਿ��� (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "�ਨਲ TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "ਸ�ਰੱ�ਿ�ਤ EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "ਸ�ਨ�ਹਾ �ਿਸਮ"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "ਸ�ਨ�ਹਾ ਦ� �ਿਸਮ"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "ਸਮੱ�ਰ� �ਰ�� ਬਾਰਡਰ"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "ਸਮੱ�ਰ� �ਰ�� ਦ��ਲ� ਬਾਰਡਰ ਦ� ���ਾ�"
+
+#: ../src/gtkinfobar.c:444
+#| msgid "Connecting"
+msgid "Content area spacing"
+msgstr "ਸਮੱ�ਰ� �ਰ�� ਥਾ�"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "�ਰ�� ਦ� ਸਮੱ�ਰ� ਵਿ�ਲ� �ਾਲ� ਥਾ�"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "ਬ�ਨ ਥਾ�"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "ਬ�ਨਾ� ਵਿ�ਲ� �ਾਲ� ਥਾ�"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "��ਸ਼ਨ �ਰ�� ਬਾਰਡਰ"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "��ਸ਼ਨ �ਰ�� ਦ��ਲ� ਬਾਰਡਰ ਦ� ���ਾ�"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " �ਤ� "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "à¨?ਫਸà©?ਸ, ਸਾਨà©?à©° à¨?à©?à¨? ਵà©? ਨà©?ੱà¨?ਵਰà¨? ਨਹà©?à¨? ਲੱà¨à¨¿à¨?।"
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " ਤ�ਸ�� �ਫਲਾ�ਨ ਮ�ਡ ਨ�ੰ ਬੰਦ �ਰ�� ��ਸ਼ਿਸ਼ �ਰ ਸ�ਦ� ਹ�।"
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " ਤ�ਸ�� �ਾਲ �ਰ�� ��ਸ਼ਿਸ਼ �ਰ ਸ�ਦ� ਹ� "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "ਤਾਰ"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "ਨਵਾ� ��ਨ��ਸ਼ਨ ਸ਼ਾਮਲ �ਰ�"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "ਨ�ੱ�ਵਰ�"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "ਬਲਿ���ੱਥ"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "�ਫਲਾ�ਨ ਮ�ਡ"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "�ਸ ਨਾਲ ਸਾਰ� ਨ�ੱ�ਵਰ� ��ਨ��ਸ਼ਨ �ਯ�� ਹ� �ਾਣ��"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "�ੱ�ਲ� ਮ�ਡ ਵਿੱ� �ਲਾ�"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "ਡ�ਸ��ਾਪ ਮ�ਡ ਵਿੱ� �ਲਾ�"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "ਨ�ੱ�ਵਰ�ਮ�ਨ��ਰ ਨ��ਬ�ੱ�"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- ਨ�ੱ�ਵਰ�ਮ�ਨ��ਰ ਨ�ੱ�ਬ�ੱ�"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "��ਨ��� ਹ�"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "ਡਿਸ-��ਨ��� �ਰ�"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "��ਨ��� ��ਤਾ �ਾ ਰਿਹਾ ਹ�"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "ਰੱਦ �ਰ�"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "ਡਿਸ-��ਨ��� ਹ�"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "��ਨ��� �ਰ�"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "�ਪਲੱਬਧ"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+#| msgid "Add new connection"
+msgid "Could not update connection: %s"
+msgstr "%s: ��ਨ��ਸ਼ਨ �ੱਪਡ�� ਨਹ�� ��ਤਾ �ਾ ਸ�ਿ�"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "ਹ�ਾ�ਣਾ ਹ�?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "ਨਹà©?à¨?, ਸੰà¨à¨¾à¨²à©?"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "ਹਾ�, ਹ�ਾ�"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"à¨?à©? ਤà©?ਸà©?à¨? '%s' %s ਨà©?ੱà¨?ਵਰà¨? ਹà¨?ਾà¨?ਣਾ à¨?ਾਹà©?ੰਦà©? ਹà©?? à¨?ਹ ਪਾਸਵਰਡ à¨à©?ੱਲਾ\n"
+"ਦ�ਵ��ਾ �ਤ� ਤ�ਸ�� ਬਾ�ਦ ਵਿੱ� ਫ�ਰ '%s' ਨਾਲ ���ਮ��ਿ�\n"
+"��ਨ��� ਨਹ�� ਹ�ਵ���।"
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "ਮਾਹਰ"
+
+#: ../src/nmn-network-renderer.c:397
+#| msgid "Save connection"
+msgid "Remove connection"
+msgstr "��ਨ��ਸ਼ਨ ਹ�ਾ�"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "ਨ�ੱ�ਵਰ�"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "ਨ�ੱ�ਵਰ� ��ਨ��� ਹ�"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "ਹ�ਣ ਤ�ਸ�� %s ਨਾਲ ��ਨ��� ਹ�, %s ਨ�ੱ�ਵਰ�"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "ਹ�ਣ ਤ�ਸ�� %s ਨ�ੱ�ਵਰ� ਨਾਲ ��ਨ��� ਹ�"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "ਹ�ਣ ਤ�ਸ�� ਨ�ੱ�ਵਰ� ਨਾਲ ��ਨ��� ਹ�"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "ਨ�ੱ�ਵਰ� �ਤਮ ਹ���"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "�ਫਸ�ਸ, �ਸ�� ਤ�ਹਾਡਾ %s ��ਨ��ਸ਼ਨ %s ਨਾਲ ��� ਦਿੱਤਾ ਹ�"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "�ਫਸ�ਸ, �ਸ�� ਤ�ਹਾਡਾ %s ��ਨ��ਸ਼ਨ ���� �ਿ� ਹ�"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "�ਫਸ�ਸ, �ਸ�� ਤ�ਹਾਡਾ ��ਨ��ਸ਼ਨ ��� ਦਿੱਤਾ ਹ�"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "ਨ�ੱ�ਵਰ� - ��ਨ��� ਨਹ�� ਹ�"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "ਨ�ੱ�ਵਰ� - ��ਨ��� ��ਤਾ �ਾ ਰਿਹਾ ਹ�"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "ਨ�ੱ�ਵਰ� - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "ਨ�ੱ�ਵਰ� - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "ਨ��ਵਰ� - ��ਨ��� ਹ�"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "�ਣ-ਲਾ�"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "PIN �ਯ��"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(��� ਨਹ��)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "��ਨ��� ��ਤਾ:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "ਮ�ਨ��ਲ"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "ਲ��ਲ ਲਿੰ�"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP �ਡਰ�ੱਸ:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "ਸਬਨ�ੱ� ਮਾਸ�:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "ਰਾ��ਰ:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "ਤ�ਹਾਡਾ ਮ�� �ਡਰ�ੱਸ:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G �ਯ��"
+
+#: ../src/nmn-new-connection.c:288
+#| msgid "3G disabled"
+msgid "3G modem is locked"
+msgstr "3G ਮਾਡਮ ਲਾ� ਹ�"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "�ੰਦਰ�ਨ� 3G ਮਾਡਮ �ਤ� SIM �ਾਰਡ ਮਿਲਿ�"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "ਮਾਡਮ ਨਹ�� ਮਿਲਿ�"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "ਨਵਾ� ��ਨ��ਸ਼ਨ ਸ਼ਾਮਲ �ਰ�"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "ਲ��ਵਾ� ਨ�ੱ�ਵਰ�"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "à¨?à©?ਨà©?à¨?ਸ਼ਨ ਸੰà¨à¨¾à¨²à©?"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "ਨ�ੱ�ਵਰ�ਿੰ� �ੱਤ� ਵਾਪਸ �ਾ�"
+
+#~ msgid "On"
+#~ msgstr "�ਾਲ�"
+
+#~ msgid "Off"
+#~ msgstr "ਬੰਦ"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>ਵਾ�ਫਾ�</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>ਤਾਰ ਵਾਲਾ</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>ਨਵਾ� ��ਨ��ਸ਼ਨ ਸ਼ਾਮਲ �ਰ�</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>ਨ�ੱ�ਵਰ�</b></big>"
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..283735e
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,666 @@
+# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+# Aviary.pl
+# JeÅ?li masz jakiekolwiek uwagi odnoszÄ?ce siÄ? do tÅ?umaczenia lub chcesz
+# pomóc w jego rozwijaniu i pielÄ?gnowaniu, napisz do nas:
+# gnomepl aviary pl
+# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-03-08 12:30+0100\n"
+"PO-Revision-Date: 2010-03-08 12:25+0100\n"
+"Last-Translator: Piotr DrÄ?g <piotrdrag gmail com>\n"
+"Language-Team: Polish <gnomepl aviary pl>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2\n"
+"X-Poedit-Language: Polish\n"
+"X-Poedit-Country: Poland\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Kontrola poÅ?Ä?czeÅ? sieciowych"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "DostÄ?p do Internetu używajÄ?c telefonu komórkowego"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "DomyÅ?lne"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Nie można usunÄ?Ä? poÅ?Ä?czenia: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Nie można aktywowaÄ? urzÄ?dzenia: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Nie można deaktywowaÄ? poÅ?Ä?czenia: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "przewodowe"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Odblokowanie za pomocÄ? kodu PIN siÄ? nie powiodÅ?o: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Zablokowane urzÄ?dzenie GSM"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Brak"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Klucz WEP 40/128-bitowy"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "128-bitowe hasÅ?o WEP"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamiczne WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA i WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA i WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "_Utwórz"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"DostÄ?p do sieci bezprzewodowej \"%s\" wymaga hasÅ?a lub kluczy szyfrowania."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Wymagane uwierzytelnienie bezprzewodowe"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Ta sieÄ? bezprzewodowa wymaga uwierzytelnienia"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Utworzenie nowej sieci bezprzewodowej"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nowa sieÄ? bezprzewodowa"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr ""
+"ProszÄ? wprowadziÄ? nazwÄ? dla poÅ?Ä?czenia sieciowego, które ma zostaÄ? utworzone."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "PoÅ?Ä?czenie z ukrytÄ? sieciÄ? bezprzewodowÄ?"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Ukryta sieÄ? bezprzewodowa"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"ProszÄ? wprowadziÄ? nazwÄ? i szczegóÅ?y zabezpieczeÅ? ukrytej sieci "
+"bezprzewodowej, z którÄ? poÅ?Ä?czyÄ?."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_PoÅ?Ä?cz"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "PoÅ?Ä?czenie:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Inna sieÄ? bezprzewodowa..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "_Adapter bezprzewodowy:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Nazwa sieci:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Zabezpieczenia:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Nie wybrano certyfikatu CA</span>\n"
+"\n"
+"Niestosowanie certyfikatu CA może spowodowaÄ? nawiÄ?zywanie poÅ?Ä?czeÅ? z "
+"niebezpiecznymi i przestÄ?pczymi sieciami bezprzewodowymi. WybraÄ? certyfikat "
+"CA?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Wybór certyfikatu CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Bez ostrzegania ponownie"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Zignoruj"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Uwierzytelnianie:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "HasÅ?o:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "WyÅ?wietlanie hasÅ?a"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Nazwa użytkownika:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "TożsamoÅ?Ä? anonimowa:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Certyfikat CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Uwierzytelnianie wewnÄ?trzne:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Wersja protokoÅ?u PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "TożsamoÅ?Ä?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "HasÅ?o klucza prywatnego:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Klucz prywatny:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Certyfikat użytkownika:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Klucz:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "WyÅ?wietlanie klucza"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Indeks WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Typ:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Wybierz certyfikat CA..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Wybierz certyfikat osobisty..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Wybierz klucz prywatny..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Klucze prywatne DER, PEM lub PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "Certyfikaty DER lub PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunelowany TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Chroniony EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Typ komunikatu"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Typ komunikatu"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "KrawÄ?dź obszaru treÅ?ci"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "SzerokoÅ?Ä? krawÄ?dzi dookoÅ?a obszaru treÅ?ci"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "OdstÄ?p w obszarze treÅ?ci"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "OdstÄ?py miÄ?dzy elementami w obszarze"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "OdstÄ?py przycisków"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "OdstÄ?py miÄ?dzy przyciskami"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "KrawÄ?dź obszaru dziaÅ?ania"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "SzerokoÅ?Ä? krawÄ?dzi dookoÅ?a obszaru dziaÅ?ania"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " i "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Nie można odnaleźÄ? żadnych sieci."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Można spróbowaÄ? wyÅ?Ä?czyÄ? tryb offline."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Można spróbowaÄ? wÅ?Ä?czyÄ? "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Przewodowa"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Dodaj nowe poÅ?Ä?czenie"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Sieci"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Tryb offline"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Spowoduje to wyÅ?Ä?czenie wszystkich poÅ?Ä?czeÅ?"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Uruchomienie w trybie samodzielnym"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Uruchomienie w trybie pulpitu"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager dla netbooków"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager dla netbooków"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "PoÅ?Ä?czono"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "RozÅ?Ä?cz"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Å?Ä?czenie"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Anuluj"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "NiepoÅ?Ä?czono"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "PoÅ?Ä?cz"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "DostÄ?pne"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Nie można zaktualizowaÄ? poÅ?Ä?czenia: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Na pewno usunÄ?Ä??"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Nie, zapisaÄ?"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Tak, usunÄ?Ä?"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"UsunÄ?Ä? sieÄ? \"%s\" %s? Spowoduje to zapomnienie hasÅ?a\n"
+"i utratÄ? automatycznego Å?Ä?czenia z sieciÄ? \"%s\"."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Zaawansowane"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "UsuÅ? poÅ?Ä?czenie"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "sieÄ?"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "PoÅ?Ä?czono z sieciÄ?"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "PoÅ?Ä?czono z %s, sieciÄ? %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "PoÅ?Ä?czono z sieciÄ? %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "PoÅ?Ä?czono z sieciÄ?"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Utracono sieÄ?"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Utracono poÅ?Ä?czenie %s z %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Utracono poÅ?Ä?czenie %s"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Utracono poÅ?Ä?czenie"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "sieci - nie poÅ?Ä?czono"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "sieci - Å?Ä?czenie"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "sieci - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "sieci - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "sieci - poÅ?Ä?czono"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Odblokuj"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "WyÅ?Ä?cz kod PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(brak)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "PoÅ?Ä?cz przez:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "RÄ?cznie"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Link-Local"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Adres IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Maska podsieci:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Router:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Adres MAC:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "SieÄ? 3G jest wyÅ?Ä?czona"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "Modem 3G jest zablokowany"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Wykryto wewnÄ?trzny modem 3G i kartÄ? SIM"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Nie wykryto modemów"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Dodaj nowe poÅ?Ä?czenie"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "SieÄ? ukryta"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Zapisz poÅ?Ä?czenie"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Powrót do obszaru Sieci"
diff --git a/po/pt.po b/po/pt.po
new file mode 100644
index 0000000..5117a51
--- /dev/null
+++ b/po/pt.po
@@ -0,0 +1,665 @@
+# beagle's Portuguese translation.
+# Copyright © 2007 beagle
+# This file is distributed under the same license as the beagle package.
+#
+#
+# Filipe Gomes <filipefgomes gmail com>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: beagle\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-09-04 15:51+0100\n"
+"PO-Revision-Date: 2010-09-01 12:11+0100\n"
+"Last-Translator: Filipe Gomes <filipefgomes gmail com>\n"
+"Language-Team: Portuguese <gnome_pt yahoogroups com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Controle as suas ligações de rede"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Aceder à Internet utilizando o seu telemóvel"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Por Omissão"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Incapaz de apagar ligação: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Incapaz de activar dispositivo: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Incapaz de desactivar dispositivo: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "com fios"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Desbloqueamento PIN falhou: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Dispositivo GSM bloqueado"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Nenhum"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Chave WEP 40/128-bit"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "Frase-senha WEP 128-bit"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "WEP Dinâmico (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 Pessoal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 Empresarial"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "C_riar"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Senhas ou chaves de encriptação são necessárias para aceder à rede sem fios "
+"'%s'."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Autenticação de Rede Sem Fios Necessária"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Autenticação pedida pela rede sem fios"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Criar uma Nova Rede Sem Fios"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nova rede sem fios"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Introduza um nome para a rede sem fios que deseja criar."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Ligar-se a Rede Sem Fios Oculta"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Rede sem fios oculta"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Introduza o nome e detalhes de segurança da rede sem fios oculta a que se "
+"deseja ligar."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "Li_gar"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Nome da Ligação:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Outra Rede sem Fios..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "_Dispositivo de rede sem fios:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Nome da Rede:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Segurança Sem Fios:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Nenhum certificado de Autoridade "
+"Certificadora escolhido</span>\n"
+"\n"
+"Não usar um certificado de Autoridade Certificadora (CA) pode resultar em "
+"ligações inseguras, redes sem fios inseguras. Deseja escolher um "
+"certificado de Autoridade Certificadora?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Escolha o Certificado CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Não avisar novamente"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorar"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Autenticação:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Senha:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Apresentar a senha"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Utilizador:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Identidade Anónima:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Certificado CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Autenticação Interna:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Versão do PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identidade:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Senha de Chave Privada:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Chave Privada:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Certificado do Utilizador:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Chave:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Apresentar a chave"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Ã?ndice WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Tipo:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Escolha um certificado de Autoridade Certificadora..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Escolha o seu certificado pessoal..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Escolha a sua chave privada..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Chaves privadas DER, PEM, ou PKCS# 12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "Certificados DER ou PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "TLS Encapsulado"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "EAP Protegido (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Tipo de Mensagem"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "O tipo de mensagem"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Margem da área de conteúdo"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Largura da margem à volta da área de conteúdo"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Espaçamento da área de conteúdo"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Espaçamento entre os elementos da área"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Espaçamento dos botões"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Espaçamento entre os botões"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Margem da área de acção"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Largura da margem à volta da área de acção"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " e "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Desculpe, não conseguimos encontrar quaisquer redes."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Pode tentar desactivar o modo Desligado."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Pode tentar ligar "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Com Fios"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Adicionar uma nova ligação"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Redes"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Modo Desligado"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Isto irá desactivar todas as suas ligações"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Executar em modo autónomo"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Executar em modo de ambiente de trabalho"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Ligado"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Desligar"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "A Estabelecer Ligação"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Desligado"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Ligar"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "DisponÃvel"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Incapaz de actualizar ligação: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Apagar mesmo?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Não, gravar"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Sim, apagar"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Quer remover a rede '%s'%s? Isto irá esquecer\n"
+"a senha e não poderá ligar-se mais\n"
+"automaticamente a '%s'."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Avançada"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Remover ligação"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "rede"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Rede ligada"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Encontra-se agora ligado à rede %s, uma rede %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Encontra-se agora ligado à rede %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Encontra-se agora ligado à rede"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Rede perdida"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Desculpe, perdemos a sua ligação %s a %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Desculpe, perdemos a sua ligação %s"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Desculpe, perdemos a sua ligação"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "redes - não ligado"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "redes - a ligar"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "redes - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "redes - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "redes - ligado"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Desbloquear"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Desactivar PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(nenhum)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Ligado por:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manual"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Ligação-Local"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Endereço IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Máscara de sub-rede:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Router:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "O seu endereço MAC:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G desactivado"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "Modem 3G está bloqueado"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Modem 3G interno e cartão SIM detectados"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Nenhum modem detectado"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Adicionar uma nova ligação"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Rede oculta"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Guardar ligação"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Regressar à Configuração de Rede"
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644
index 0000000..12b1ca2
--- /dev/null
+++ b/po/pt_BR.po
@@ -0,0 +1,688 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+# Antonio Fernandes C. Neto <fernandes pelivre org>, 2009, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-04-20 17:31-0400\n"
+"PO-Revision-Date: 2010-04-20 18:02-0300\n"
+"Last-Translator: Vladimir Melo <vmelo gnome org>\n"
+"Language-Team: Brazilian Portuguese <gnome-pt_br-list gnome org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Portuguese\n"
+"X-Poedit-Country: BRAZIL\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Controle suas conexões de rede"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Acessar internet usando seu telefone celular"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Padrão"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Não foi possÃvel excluir a conexão: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Não foi possÃvel ativar o dispositivo: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Não foi possÃvel desativar o dispositivo: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "com fio"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Falha ao desbloquear PIN: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Dispositivo GSM bloqueado"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Nenhum"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "Chave WEP 40/128 bits"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "Frase Secreta WEP 128 bits"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "WEP Dinâmico (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA e WPA2 Pessoal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA e WPA2 Empresarial"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "C_riar"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Senhas ou chaves criptográficas são obrigatórias para acessar a rede sem fio "
+"\"%s\"."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Autenticação de rede sem fio obrigatória"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Autenticação obrigatória por rede sem fio"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Criar nova rede sem fio"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nova rede sem fio"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Digite um nome para a rede sem fio que deseja criar."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Conectar à rede sem fio oculta"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Rede sem fio oculta"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Digite o nome e os detalhes de segurança da rede sem fio oculta à qual "
+"deseja se conectar."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "C_onectar"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Conexão:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Outra rede sem fio..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Adaptador s_em fio:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Nome da rede:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Segurança sem fio:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Nenhum certificado de Autoridade de "
+"Certificação escolhido</span>\n"
+"\n"
+"Se um certificado de Autoridade de Certificação (CA) não for usado, isso "
+"poderá resultar em conexões com redes sem fio não seguras nem confiáveis. "
+"Deseja escolher um certificado de autoridade de certificação?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Escolher certificado CA"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Não avisar novamente"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorar"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Autenticação:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Senha:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Mostrar senha"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Nome de usuário:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Identidade anônima:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Certificado CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Autenticação interna:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Versão do PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identidade:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Senha de chave privada:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Chave privada:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Certificado do usuário:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Chave:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Mostrar chave"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Ã?ndice WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Tipo:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Escolher um certificado da autoridade de certificação..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Escolher seu certificado pessoal..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Escolher sua chave privada..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Chaves privadas DER, PEM ou PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "Certificados DER ou PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "TLS encapsulado"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "EAP protegido (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Tipo de mensagem"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "O tipo de mensagem"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Borda da área de conteúdo"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Largura da borda ao redor da área de conteúdo"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Espaçamento da área de conteúdo"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Espaçamento entre os elementos da área"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Espaçamento do botão"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Espaçamento entre os botões"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Borda da área de ação"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Largura ao redor da borda da área de ação"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " e "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Desculpe, não foi possÃvel localizar nenhuma rede."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr "Você pode tentar desabilitar o modo off-line."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr "Você pode tentar ativar"
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Com fio"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Adicionar nova conexão"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Redes"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Modo off-line"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Isso desabilitará todas suas conexões"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Executa em modo autônomo"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Executa em modo área de trabalho"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "Gerenciador de rede para Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- Gerenciador de rede para Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Conectado"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Desconectar"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Conectando"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Desconectado"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Conectar"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "DisponÃvel"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Não foi possÃvel atualizar conexão: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Realmente quer remover?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Não, salvar"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Sim, excluir"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Deseja remover a rede \"%s\" %s? Isso\n"
+"esquecerá a senha e você não conectará mais\n"
+"automaticamente a \"%s\"."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Avançado"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Remover conexão"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "rede"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Rede conectada"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Conectado a %s, uma rede %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Conectado à rede %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Conectado à rede"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Rede perdida"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Desculpe, perdemos sua conexão %s para %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Desculpe, perdemos sua conexão %s"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Desculpe, perdemos sua conexão"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "redes - desconectado"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "redes - conectando"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "redes - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "redes - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "redes - conectado"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Desbloquear"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Desabilitar PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(nenhum)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Conectar por:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manual"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Link local"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "Endereço IP:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Máscara de sub-rede:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Roteador:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Seu endereço MAC:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G desabilitado"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "Modem 3G está bloqueado"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Modem 3G interno e cartão SIM detectados"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Nenhum modem detectado"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Adicionar uma nova conexão"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Rede oculta"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Gravar conexão"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Voltar à rede"
+
+#~ msgid "On"
+#~ msgstr "Ativado"
+
+#~ msgid "Off"
+#~ msgstr "Desativado"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>Modo de vôo</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>Wi-Fi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>Cabeada</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>Adicionar uma nova conexão</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>Redes</b></big>"
diff --git a/po/ru.po b/po/ru.po
new file mode 100644
index 0000000..3c3e62e
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,665 @@
+# translation of network-manager-netbook.master.ru.po to Russian
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+#
+# Yuri Kozlov <yuray komyakino ru>, 2010.
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-03-29 00:16+0300\n"
+"PO-Revision-Date: 2010-03-28 15:25+0400\n"
+"Last-Translator: Yuri Kozlov <yuray komyakino ru>\n"
+"Language-Team: Russian <debian-l10n-russian lists debian org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "УпÑ?авление Ñ?еÑ?евÑ?ми подклÑ?Ñ?ениÑ?ми"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Ð?оÑ?Ñ?Ñ?п в инÑ?еÑ?неÑ? Ñ?еÑ?ез мобилÑ?нÑ?й Ñ?елеÑ?он"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Ð?о Ñ?молÑ?аниÑ?"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Ð?е Ñ?далоÑ?Ñ? Ñ?далиÑ?Ñ? Ñ?оединение: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Ð?е Ñ?далоÑ?Ñ? акÑ?ивиÑ?оваÑ?Ñ? Ñ?Ñ?Ñ?Ñ?ойÑ?Ñ?во: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Ð?е Ñ?далоÑ?Ñ? деакÑ?ивиÑ?оваÑ?Ñ? Ñ?Ñ?Ñ?Ñ?ойÑ?Ñ?во: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "пÑ?оводное"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Ð?е Ñ?далоÑ?Ñ? Ñ?азблокиÑ?оваÑ?Ñ? Ñ? помоÑ?Ñ?Ñ? PIN: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Ð?аблокиÑ?ованное Ñ?Ñ?Ñ?Ñ?ойÑ?Ñ?во GSM"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Ð?еÑ?"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-биÑ?нÑ?й клÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-биÑ?наÑ? клÑ?Ñ?еваÑ? Ñ?Ñ?аза"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Ð?инамиÑ?еÑ?кий WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA и WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA и WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "_СоздаÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Ð?лÑ? доÑ?Ñ?Ñ?па к беÑ?пÑ?оводной Ñ?еÑ?и '%s' необÑ?одим паÑ?олÑ? или клÑ?Ñ? Ñ?иÑ?Ñ?ованиÑ?"
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "ТÑ?ебÑ?еÑ?Ñ?Ñ? аÑ?Ñ?енÑ?иÑ?икаÑ?иÑ? в беÑ?пÑ?оводной Ñ?еÑ?и"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Ð?еобÑ?одима аÑ?Ñ?енÑ?иÑ?икаÑ?иÑ? в беÑ?пÑ?оводной Ñ?еÑ?и"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "СоздаÑ?Ñ? новое беÑ?пÑ?оводное подклÑ?Ñ?ение"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Ð?овое беÑ?пÑ?оводное подклÑ?Ñ?ение"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Ð?ведиÑ?е имÑ? Ñ?оздаваемой беÑ?пÑ?оводной Ñ?еÑ?и"
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Ð?одклÑ?Ñ?иÑ?Ñ?Ñ?Ñ? к Ñ?кÑ?Ñ?Ñ?ой беÑ?пÑ?оводной Ñ?еÑ?и"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "СкÑ?Ñ?Ñ?аÑ? беÑ?пÑ?оводнаÑ? Ñ?еÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Ð?ведиÑ?е имÑ? и дополниÑ?елÑ?нÑ?Ñ? инÑ?оÑ?маÑ?иÑ? о Ñ?кÑ?Ñ?Ñ?ой беÑ?пÑ?оводной Ñ?еÑ?и, к "
+"коÑ?оÑ?ой вÑ? Ñ?оÑ?иÑ?е подклÑ?Ñ?иÑ?Ñ?Ñ?Ñ?."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "Ð?_одклÑ?Ñ?иÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Соединение:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Ð?Ñ?Ñ?гаÑ? беÑ?пÑ?оводнаÑ? Ñ?еÑ?Ñ?..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "_Ð?дапÑ?еÑ? беÑ?пÑ?оводной Ñ?еÑ?и:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Ð?мÑ? Ñ?еÑ?и:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "Ð?езопаÑ?ноÑ?Ñ?Ñ? _беÑ?пÑ?оводной Ñ?еÑ?и:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Ð?е вÑ?бÑ?ано ни одного Ñ?еÑ?Ñ?иÑ?икаÑ?а какой-"
+"либо Ñ?еÑ?Ñ?иÑ?иÑ?иÑ?Ñ?Ñ?Ñ?ей оÑ?ганизаÑ?ии</span>\n"
+"\n"
+"Ð?Ñ?каз оÑ? иÑ?полÑ?зованиÑ? Ñ?еÑ?Ñ?иÑ?икаÑ?а Ñ?еÑ?Ñ?иÑ?иÑ?иÑ?Ñ?Ñ?Ñ?ей оÑ?ганизаÑ?ии (СÐ?) можеÑ? "
+"пÑ?ивеÑ?Ñ?и к иÑ?полÑ?зованиÑ? незаÑ?иÑ?еннÑ?Ñ?, моÑ?енниÑ?еÑ?киÑ? беÑ?пÑ?оводнÑ?Ñ? Ñ?еÑ?ей. "
+"Ð?Ñ?бÑ?аÑ?Ñ? Ñ?еÑ?Ñ?иÑ?икаÑ? Ñ?еÑ?Ñ?иÑ?иÑ?иÑ?Ñ?Ñ?Ñ?ей оÑ?ганизаÑ?ии?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Ð?Ñ?бÑ?аÑ?Ñ? Ñ?еÑ?Ñ?иÑ?икаÑ? СÐ?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Ð?олÑ?Ñ?е не пÑ?едÑ?пÑ?еждаÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ð?гноÑ?иÑ?оваÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Ð?Ñ?Ñ?енÑ?иÑ?икаÑ?иÑ?:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Ð?аÑ?олÑ?:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Ð?оказаÑ?Ñ? паÑ?олÑ?"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Ð?мÑ? полÑ?зоваÑ?елÑ?:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Ð?нонимнаÑ? Ñ?лекÑ?Ñ?оннаÑ? пеÑ?Ñ?она:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "СеÑ?Ñ?иÑ?икаÑ? СÐ?:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Ð?нÑ?Ñ?Ñ?еннÑ?Ñ? аÑ?Ñ?енÑ?иÑ?икаÑ?иÑ?:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Ð?еÑ?Ñ?иÑ? PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "ÐлекÑ?Ñ?оннаÑ? пеÑ?Ñ?она:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Ð?аÑ?олÑ? закÑ?Ñ?Ñ?ого клÑ?Ñ?а:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Ð?акÑ?Ñ?Ñ?Ñ?й клÑ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "СеÑ?Ñ?иÑ?икаÑ? полÑ?зоваÑ?елÑ?:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Ð?лÑ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Ð?оказаÑ?Ñ? клÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Ð?ндекÑ? WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Тип:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Ð?Ñ?беÑ?иÑ?е Ñ?еÑ?Ñ?иÑ?икаÑ? Ñ?еÑ?Ñ?иÑ?иÑ?иÑ?Ñ?Ñ?Ñ?ей оÑ?ганизаÑ?ии..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Ð?Ñ?беÑ?иÑ?е Ñ?вой лиÑ?нÑ?й Ñ?еÑ?Ñ?иÑ?икаÑ?"
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Ð?Ñ?беÑ?иÑ?е Ñ?вой Ñ?екÑ?еÑ?нÑ?й клÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM, или Ñ?екÑ?еÑ?нÑ?е клÑ?Ñ?и PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "СеÑ?Ñ?иÑ?икаÑ?Ñ? DER или PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "ТÑ?ннелÑ?нÑ?й TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Ð?аÑ?иÑ?Ñ?ннÑ?й EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Тип Ñ?ообÑ?ениÑ?"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Тип Ñ?ообÑ?ениÑ?"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Ð?Ñ?аниÑ?а облаÑ?Ñ?и Ñ?одеÑ?жимого"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "ШиÑ?ина гÑ?аниÑ?Ñ? вокÑ?Ñ?г облаÑ?Ñ?и Ñ?одеÑ?жимого"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Ð?Ñ?оÑ?Ñ?Ñ?анÑ?Ñ?ва облаÑ?Ñ?и Ñ?одеÑ?жимого"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Ð?Ñ?оÑ?Ñ?Ñ?анÑ?Ñ?во междÑ? Ñ?леменÑ?ами облаÑ?Ñ?и"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Ð?Ñ?оÑ?Ñ?Ñ?анÑ?Ñ?во междÑ? кнопками"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Ð?Ñ?оÑ?Ñ?Ñ?анÑ?Ñ?во междÑ? кнопками"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Ð?Ñ?аниÑ?а облаÑ?Ñ?и дейÑ?Ñ?виÑ?"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "ШиÑ?ина гÑ?аниÑ?Ñ? вокÑ?Ñ?г облаÑ?Ñ?и дейÑ?Ñ?виÑ?"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " и "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Ð?е Ñ?далоÑ?Ñ? найÑ?и ни одной Ñ?еÑ?и."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Ð?ожно попÑ?обоваÑ?Ñ? вÑ?клÑ?Ñ?иÑ?Ñ? авÑ?ономнÑ?й Ñ?ежим."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Ð?ожно попÑ?обоваÑ?Ñ? вклÑ?Ñ?иÑ?Ñ? "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Ð?Ñ?оводнаÑ?"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Ð?обавиÑ?Ñ? новое Ñ?оединение"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "СеÑ?и"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Ð?вÑ?ономнÑ?й Ñ?ежим"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "ÐÑ?о пÑ?иведÑ?Ñ? к вÑ?клÑ?Ñ?ениÑ? вÑ?еÑ? Ñ?оединений"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "РабоÑ?аÑ?Ñ? в авÑ?ономном Ñ?ежиме"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "РабоÑ?аÑ?Ñ? в наÑ?Ñ?олÑ?ном Ñ?ежиме"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Ð?одклÑ?Ñ?ено"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Ð?Ñ?Ñ?оединиÑ?Ñ?"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Ð?одклÑ?Ñ?ение"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Ð?Ñ?мена"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Ð?Ñ?Ñ?оединено"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Ð?одклÑ?Ñ?иÑ?Ñ?"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Ð?оÑ?Ñ?Ñ?пно"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Ð?е Ñ?далоÑ?Ñ? обновиÑ?Ñ? Ñ?оединение: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Ð?одÑ?веÑ?ждаеÑ?е Ñ?даление?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Ð?еÑ?, Ñ?оÑ?Ñ?аниÑ?Ñ?"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Ð?а, Ñ?далиÑ?Ñ?"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"ХоÑ?иÑ?е Ñ?далиÑ?Ñ? Ñ?еÑ?Ñ? '%s' %s? Ð?Ñ?и Ñ?Ñ?ом бÑ?деÑ?\n"
+"Ñ?далÑ?н паÑ?олÑ? и вÑ? болÑ?Ñ?е не Ñ?можеÑ?е авÑ?омаÑ?иÑ?еÑ?ки\n"
+"подклÑ?Ñ?аÑ?Ñ?Ñ?Ñ? к '%s'."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Ð?ополниÑ?елÑ?но"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "УдалиÑ?Ñ? Ñ?оединение"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "Ñ?еÑ?Ñ?"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Ð?одклÑ?Ñ?ено к Ñ?еÑ?и"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "ТепеÑ?Ñ? вÑ? подклÑ?Ñ?енÑ? к %s, Ñ?еÑ?Ñ? %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "ТепеÑ?Ñ? вÑ? подклÑ?Ñ?енÑ? к Ñ?еÑ?и %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "ТепеÑ?Ñ? вÑ? подклÑ?Ñ?енÑ? к Ñ?еÑ?и"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "СеÑ?и поÑ?еÑ?Ñ?на"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Ð?Ñ?ло Ñ?азоÑ?вано подклÑ?Ñ?ение %s к %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Ð?Ñ?ло Ñ?азоÑ?вано подклÑ?Ñ?ение %s"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Ð?Ñ?ло Ñ?азоÑ?вано подклÑ?Ñ?ение"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "Ñ?еÑ?и - не подклÑ?Ñ?енÑ?"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "Ñ?еÑ?и - Ñ?оединение"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "Ñ?еÑ?и - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "Ñ?еÑ?и - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "Ñ?еÑ?и - подклÑ?Ñ?енÑ?"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "РазблокиÑ?оваÑ?Ñ?"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Ð?Ñ?клÑ?Ñ?иÑ?Ñ? PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(неÑ?)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Ð?одклÑ?Ñ?иÑ?Ñ? Ñ?еÑ?ез:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Ð?Ñ?Ñ?Ñ?нÑ?Ñ?"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Ð?окалÑ?ное Ñ?оединение"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP-адÑ?еÑ?:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Ð?аÑ?ка подÑ?еÑ?и:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Ð?аÑ?Ñ?Ñ?Ñ?Ñ?изаÑ?оÑ?:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "MAC-адÑ?еÑ?:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G оÑ?клÑ?Ñ?ено"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G модем заблокиÑ?ован"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Ð?бнаÑ?Ñ?жен вÑ?Ñ?Ñ?оеннÑ?й 3G-модем и SIM-каÑ?Ñ?а"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Ð?одемÑ? не найденÑ?"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Ð?обавиÑ?Ñ? новое Ñ?оединение"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "СкÑ?Ñ?Ñ?аÑ? Ñ?еÑ?Ñ?"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "СоÑ?Ñ?аниÑ?Ñ? Ñ?оединение"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Ð?еÑ?нÑ?Ñ?Ñ?Ñ?Ñ? в Ñ?аздел Ñ?еÑ?ей"
diff --git a/po/sl.po b/po/sl.po
new file mode 100644
index 0000000..2d89591
--- /dev/null
+++ b/po/sl.po
@@ -0,0 +1,676 @@
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the network-manager-netbook package.
+# Matej UrbanÄ?iÄ? <mateju svn gnome org>, 2009.
+# Andrej ŽnidarÅ¡iÄ? <andrej znidarsic gmail com>, 2009 - 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-03-04 23:59+0000\n"
+"PO-Revision-Date: 2010-03-06 10:45+0100\n"
+"Last-Translator: Andrej ŽnidarÅ¡iÄ? <andrej znidarsic gmail com>\n"
+"Language-Team: Slovenian GNOME Translation Team <gnome-si googlegroups com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"
+"X-Poedit-Country: SLOVENIA\n"
+"X-Poedit-Language: Slovenian\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Nadzor omrežnih povezav"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Dostop do omrežja z mobilnim telefonom"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Privzeto"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Povezave ni mogoÄ?e izbrisati: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Naprave ni mogoÄ?e omogoÄ?iti: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Naprave ni mogoÄ?e onemogoÄ?iti: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "žiÄ?no"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50
+#: ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498
+#: ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Odklepanje PIN je spodletelo: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Zaklenjena GSM naprava"
+
+#: ../libnm-gtk/nm-wifi-item.c:61
+#: ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476
+#: ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Brez"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-bitni kljuÄ?"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bit Å¡ifrirno geslo"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "DinamiÄ?ni WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "Osebni WPA & WPA2"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "Podjetniški WPA & WPA2"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "Ustva_ri"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid "Passwords or encryption keys are required to access the wireless network '%s'."
+msgstr "Za povezavo v brezžiÄ?no omrežje '%s' je zahtevana overitev ali nastavitev Å¡ifrirnega kljuÄ?a."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Zahtevana je overitev brezžiÄ?nega omrežja"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "BrezžiÄ?nego omrežje zahteva overitev"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Ustvari novo brezžiÄ?no omrežje"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Novo brezžiÄ?no omrežje"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Vnesite ime brezžiÄ?nega omrežja, ki ga želite ustvariti."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Povezava s skritim brezžiÄ?nim omrežjem"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Skrito brezžiÄ?no omrežje"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid "Enter the name and security details of the hidden wireless network you wish to connect to."
+msgstr "Vnesite ime in varnostne nastavitve skritega brezžiÄ?nega omrežja, s katerim se želite povezati."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "Po_vezava"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Povezava:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Drugo brezžiÄ?no omrežje ..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "BrezžiÄ?ni _vmesnik:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Ime omrežja:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_BrezžiÄ?na varnost:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections to insecure, rogue wireless networks. Would you like to choose a Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Ni izbranega pooblastitelja potrdila</span>\n"
+"\n"
+"Brez uporabe ustreznega pooblastitelja potrdila (CA), varnih povezav ni mogoÄ?e ustvariti. Ali ga želite izbrati takoj?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Izbor CA potrdila"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "_Ne opozori veÄ?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Prezri"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Overitev:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Geslo:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Pokaži geslo"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Uporabniško ime:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Brezimni uporabnik:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "Potrdilo CA:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Notranja overitev:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "RazliÄ?ica PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Istovetnost:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Geslo osebnega kljuÄ?a:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Osebni kljuÄ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Uporabniško potrdilo:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "KljuÄ?:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Pokaži kljuÄ?"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP kazalo:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Vrsta:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Izbor pooblastitelja potrdila ..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Izbor osebnega potrdila ..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Izbor zasebnega kljuÄ?a ..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM, ali PKCS#12 osebni kljuÄ?i (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER ali PEM potrdila (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tuneliran TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Varovani EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Vrsta sporoÄ?ila"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Vrsta sporoÄ?ila"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Rob podroÄ?ja vsebine"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "Å irina robu okoli glavnega podroÄ?ja vsebine"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Razmik podroÄ?ja vsebine"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Razmik med predmeti podroÄ?ja"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Razmik gumbov"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Razmik med gumbi"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Rob podroÄ?ja dejavnosti"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "Å irina robu okoli podroÄ?ja dejanj"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " in"
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Omrežja ni mogoÄ?e najti."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr "Morda je treba omogoÄ?iti povezavo."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr "Morda je treba napravo omogoÄ?iti."
+
+#: ../src/nmn-list.c:112
+#: ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "ŽiÄ?no"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Dodaj povezavo"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Omrežja"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "NaÄ?in brez povezave"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "S tem bodo onemogoÄ?ene vse omrežne povezave"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Zagon v samostojnem naÄ?inu"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Zaženi v namiznem naÄ?inu"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "Upravljalnik omrežja Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- Upravljalnik omrežja Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Povezano"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Prekini povezavo"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Povezovanje"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "PrekliÄ?i"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Prekinjena povezava"
+
+#: ../src/nmn-network-renderer.c:115
+#: ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Poveži"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Na voljo"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Ni mogoÄ?e posodobiti povezave: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Ali naj bo zares odstranjena?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Ne, shrani"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Da, izbriši"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Ali želite odstraniti '%s' %s omrežje? S tem\n"
+"izbrišete geslo in se povezava v omrežje ne\n"
+"bo veÄ? samodejno vzpostavila z '%s'."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Napredno"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Odstrani povezavo"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "omrežje"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Omrežje povezano"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Povezava %s z %s omrežjem je vzpostavljena"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Povezava z omrežjem %s je vzpostavljena"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Povezava z omrežjem je vzpostavljena"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Omrežje izgubljeno"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Povezava %s z %s je izgubljena"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Povezava z %s je izgubljena"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Povezava je izgubljena"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "omrežja - brez povezave"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "omrežja - povezovanje"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "omrežja - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "omrežja - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "omrežja - povezano"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "Odkleni"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "OnemogoÄ?i PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(brez)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Poveži preko:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "RoÄ?no"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Krajevna povezava"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP naslov:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Maska podomrežja:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Usmerjevalnik:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Vaš naslov MAC:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G: onemogoÄ?en"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G modem je zaklenjeno."
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Zaznana sta 3G modem in SIM kartica"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Ni zaznanega modema"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Dodaj povezavo"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Skrito omrežje"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Shrani povezavo"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Vrni se na povezovanje"
+
+#~ msgid "On"
+#~ msgstr "OmogoÄ?eno"
+#~ msgid "Off"
+#~ msgstr "OnemogoÄ?eno"
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>ŽiÄ?no</b>"
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>Dodaj povezavo</b></big>"
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>Omrežja</b></big>"
+
diff --git a/po/sv.po b/po/sv.po
new file mode 100644
index 0000000..2643a94
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,673 @@
+# Swedish messages for NetworkManagerNetbook.
+# Copyright (C) 2004-2010 Free Software Foundation, Inc.
+# Christian Rose <menthos menthos com>, 2004, 2005, 2006.
+# Daniel Nylander <po danielnylander se>, 2006, 2007, 2008, 2009, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-03-12 08:35+0100\n"
+"PO-Revision-Date: 2010-03-12 08:37+0100\n"
+"Last-Translator: Daniel Nylander <po danielnylander se>\n"
+"Language-Team: Novell Language <language novell com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Hantera dina nätverksanslutningar"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Kom åt Internet med din mobiltelefon"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Standard"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Kunde inte ta bort anslutning: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Kunde inte aktivera enheten: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Kunde inte inaktivera enheten: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "trådat"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50
+#: ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498
+#: ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "PIN-upplåsning misslyckades: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "LÃ¥st GSM-enhet"
+
+#: ../libnm-gtk/nm-wifi-item.c:61
+#: ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476
+#: ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Ingen"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128-bitars nyckel"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128-bitars lösenord"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamisk WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA och WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA och WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "S_kapa"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid "Passwords or encryption keys are required to access the wireless network '%s'."
+msgstr "Lösenord eller krypteringsnycklar krävs för att komma åt det trådlösa nätverket \"%s\"."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Autentisering till det trådlösa nätverket krävs"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Autentisering krävs av det trådlösa nätverket"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Skapa nytt trådlöst nätverk"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Nytt trådlöst nätverk"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Ange ett namn för det trådlösa nätverket som du vill skapa."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Anslut till dolt trådlöst nätverk"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Dolt trådlöst nätverk"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid "Enter the name and security details of the hidden wireless network you wish to connect to."
+msgstr "Ange namn och säkerhetsuppgifter för det dolda trådlösa nätverket som du vill ansluta till."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "A_nslut"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Anslutning:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Annat trådlöst nätverk..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Trådlös _adapter:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Nätverksnamn:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Trådlös säkerhet:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections to insecure, rogue wireless networks. Would you like to choose a Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Inget Certificate Authority-certifikat har valts</span>\n"
+"\n"
+"Att inte använda ett Certificate Authority-certifikat (CA) kan resultera i anslutningar till osäkra och missledande trådlösa nätverk. Vill du välja ett Certificate Authority-certifikat?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Välj CA-certifikat"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Varna inte igen"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ignorera"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Autentisering:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Lösenord:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Visa lösenord"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Användarnamn:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Anonym identitet:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA-certifikat:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Inre autentisering:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP-version:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Identitet:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Lösenord för privat nyckel:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Privat nyckel:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Användarcertifikat:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Nyckel:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Visa nyckel"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP-index:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "TYP:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Välj ett certifikat från en certifikatutfärdare..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Välj ditt personliga certifikat..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Välj din privata nyckel..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Privata nycklar av typen DER, PEM eller PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER- eller PEM-certifikat (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tunnlad TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Protected EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Meddelandetyp"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Typ av meddelande"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr ""
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr ""
+
+#: ../src/gtkinfobar.c:444
+#, fuzzy
+msgid "Content area spacing"
+msgstr "Ansluter"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr ""
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr ""
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr ""
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr ""
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr ""
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " och "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Tyvärr, vi kunde inte hitta några nätverk."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Du kan försöka att inaktivera frånkopplat läge."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Du kan försöka att slå på "
+
+#: ../src/nmn-list.c:112
+#: ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Trådat"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Lägg till ny anslutning"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Nätverk"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Frånkopplat läge"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Detta kommer att inaktivera alla dina anslutningar"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Kör i fristående läge"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Kör i skrivbordsläge"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Ansluten"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Koppla från"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Ansluter"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "Avbryt"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Inte ansluten"
+
+#: ../src/nmn-network-renderer.c:115
+#: ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Anslut"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Tillgänglig"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Kunde inte uppdatera anslutning: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Verkligen ta bort?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Nej, spara"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Ja, ta bort"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"Vill du ta bort \"%s\" %s-nätverket? Detta kommer\n"
+"att glömma lösenordet och du kommer inte längre\n"
+"att kunna ansluta automatiskt till \"%s\"."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Avancerat"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Ta bort anslutning"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "nätverk"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Nätverket anslutet"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "Du är nu ansluten till %s, ett %s-nätverk"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "Du är nu ansluten till %s-nätverket"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "Du är nu ansluten till nätverket"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Nätverket tappat"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Tyvärr, vi har tappat din %s-anslutning till %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Tyvärr, vi har tappat din %s-anslutning"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Tyvärr, vi har tappat din anslutning"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "nätverk - inte ansluten"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "nätverk - ansluter"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "nätverk - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "nätverk - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "nätverk - ansluten"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "LÃ¥s upp"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Inaktivera PIN-kod"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(ingen)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Anslut med:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Manuellt"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Lokal länk"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP-adress:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Nätmask:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Router:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "Din MAC-adress:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G inaktiverat"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G-modemet är låst"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Internt 3G-modem och SIM-kort hittades"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Inga modem hittades"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Lägg till en ny anslutning"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Dolt nätverk"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Spara anslutning"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "�tergå till nätverksinställningar"
+
+#~ msgid "On"
+#~ msgstr "PÃ¥"
+#~ msgid "Off"
+#~ msgstr "Av"
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>Trådat</b>"
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>Lägg till en ny anslutning</b></big>"
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>Nätverk</b></big>"
+
diff --git a/po/tr.po b/po/tr.po
new file mode 100644
index 0000000..05301b2
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,557 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-27 16:38+0200\n"
+"PO-Revision-Date: 2009-09-22 11:18\n"
+"Last-Translator: Novell Language <language novell com>\n"
+"Language-Team: Novell Language <language novell com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr ""
+
+#: ../libnm-gtk/nm-ethernet-item.c:88
+msgid "802.1x"
+msgstr ""
+
+#: ../libnm-gtk/nm-wifi-item.c:60 ../src/nmn-list.c:105
+#: ../src/nmn-applet.c:337 ../src/nmn-new-connection.c:636
+msgid "WiFi"
+msgstr ""
+
+#: ../libnm-gtk/nm-gsm-item.c:36 ../libnm-gtk/nm-cdma-item.c:36
+#: ../src/nmn-list.c:115 ../src/nmn-applet.c:349
+#: ../src/nmn-new-connection.c:661
+msgid "3G"
+msgstr ""
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Yok"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128 bit Anahtar"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128 bit Å?ifre"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Dynamic WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA ve WPA2 KiÅ?isel"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA ve WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "OluÅ?tu_r"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"'%s' kablosuz aÄ?a eriÅ?mek için parolalar veya Å?ifreleme anahtarları gerekir."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Kablosuz AÄ? Kimlik DoÄ?rulaması Gerekli"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Kablosuz aÄ? kimlik doÄ?rulaması gerektiriyor"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "Yeni Kablosuz AÄ? OluÅ?tur"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Yeni kablosuz aÄ?"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "OluÅ?turmak istediÄ?iniz kablosuz aÄ? için bir ad girin."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Gizli Kablosuz AÄ?a BaÄ?lan"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Gizli kablosuz aÄ?"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"BaÄ?lantı istediÄ?iniz gizli kablosuz aÄ?ın adını ve güvenlik bilgileriniı girin"
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "B_aÄ?lan"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "BaÄ?lantı:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "BaÅ?ka Kablosuz AÄ?..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Kablosuz baÄ?_daÅ?tırıcı:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_AÄ? Adı:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Kablosuz GüvenliÄ?i:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Hiçbir Sertifika Yetkilisi sertifikası "
+"seçilmemiÅ?</span>\n"
+"\n"
+"Bir Sertifika Yetkilisi (CA) sertifikasının kullanılmaması güvenli olmayan, "
+"sahtecilik yapılan kablosuz aÄ?lara baÄ?lantı yapılmasına neden olabilir. Bir "
+"Sertifika Yetkilisi sertifikası seçmek ister misiniz?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "CA Sertifikası Seç"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Bir daha uyarma"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Yoksay"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Kimlik DoÄ?rulama:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Parola:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Parolayı göster"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Kullanıcı Adı:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Adsız Kimlik:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA Sertifikası:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "İç Kimlik DoÄ?rulama:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP Sürümü:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Kimlik:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "�zel Anahtar Parolası:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Ã?zal Anahtar:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "Kullanıcı Sertifikası:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Anahtar:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Anahtarı göster"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP Dizini:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Tür:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Bir Sertifika Yetkilisi sertifikası seç..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "KÅ?isel sertifikanızı seçin..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "�zel anahtarınızı seçin..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DER, PEM veya PKCS#12 özel anahtarları (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER veya PEM sertifikaları (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "Tünel TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Korumalı EAP (PEAP)"
+
+#: ../src/nmn-list.c:68
+msgid " and "
+msgstr ""
+
+#: ../src/nmn-list.c:79
+msgid "Sorry, we can't find any networks."
+msgstr ""
+
+#: ../src/nmn-list.c:82
+msgid " You could try disabling Offline mode."
+msgstr ""
+
+#: ../src/nmn-list.c:102
+msgid " You could try turning on "
+msgstr ""
+
+#: ../src/nmn-list.c:110 ../src/nmn-applet.c:343
+msgid "Wired"
+msgstr ""
+
+#: ../src/nmn-applet.c:304
+#, fuzzy
+msgid "Add new connection"
+msgstr "Yeni baÄ?lantı ekle"
+
+#: ../src/nmn-applet.c:310
+#, fuzzy
+msgid "Networks"
+msgstr "_AÄ? Adı:"
+
+#: ../src/nmn-applet.c:355
+msgid "WiMAX"
+msgstr ""
+
+#: ../src/nmn-applet.c:362
+msgid "Bluetooth"
+msgstr ""
+
+#: ../src/nmn-applet.c:376
+msgid "Offline mode"
+msgstr ""
+
+#: ../src/nmn-applet.c:382
+#, fuzzy
+msgid "This will disable all your connections"
+msgstr "Bu iÅ?lem tüm kablosuz baÄ?lantıları devre dıÅ?ı bırakacak"
+
+#: ../src/main.c:54
+msgid "Run in standalone mode"
+msgstr ""
+
+#: ../src/main.c:61
+msgid "NetworkManager Netbook"
+msgstr ""
+
+#: ../src/main.c:62
+msgid "- NetworkManager Netbook"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:67
+#, fuzzy
+msgid "network"
+msgstr "Gizli aÄ?"
+
+#: ../src/nmn-panel-client.c:181
+#, fuzzy
+msgid "Network connected"
+msgstr "BaÄ?lantı Kesildi"
+
+#: ../src/nmn-panel-client.c:185
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:188
+#, c-format
+msgid "You're now connected to %s network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:190
+msgid "You're now connected to network"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:192
+#, fuzzy
+msgid "Network lost"
+msgstr "_AÄ? Adı:"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:199
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:201
+msgid "Sorry, we've lost your connection"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:236
+#, c-format
+msgid "networks - not connected"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:239
+#, fuzzy, c-format
+msgid "networks - connecting"
+msgstr "Yeni baÄ?lantı ekle"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - %s - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:249
+#, c-format
+msgid "networks - %s"
+msgstr ""
+
+#: ../src/nmn-panel-client.c:251
+#, fuzzy
+msgid "networks - connected"
+msgstr "BaÄ?lantı Kesildi"
+
+#: ../src/nmn-item-renderer.c:140
+msgid "Connected"
+msgstr "BaÄ?lantı Kuruldu"
+
+#: ../src/nmn-item-renderer.c:141 ../src/nmn-item-renderer.c:145
+msgid "Disconnect"
+msgstr "BaÄ?lantı Kes"
+
+#: ../src/nmn-item-renderer.c:144
+msgid "Connecting..."
+msgstr "BaÄ?lanıyor..."
+
+#: ../src/nmn-item-renderer.c:148
+msgid "Disconnected"
+msgstr "BaÄ?lantı Kesildi"
+
+#: ../src/nmn-item-renderer.c:149
+msgid "Connect"
+msgstr "BaÄ?lan"
+
+#: ../src/nmn-item-renderer.c:263
+msgid "Really remove?"
+msgstr ""
+
+#: ../src/nmn-item-renderer.c:279
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+
+#: ../src/nmn-connection-details.c:104
+msgid "(none)"
+msgstr "(hiçbiri)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:475
+msgid "Connect by:"
+msgstr "BaÄ?lantı yöntemi:"
+
+#: ../src/nmn-connection-details.c:478
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:483
+msgid "Manual"
+msgstr "Elle"
+
+#: ../src/nmn-connection-details.c:488
+msgid "Link Local"
+msgstr "Yerel BaÄ?lantı"
+
+#. Address
+#: ../src/nmn-connection-details.c:496
+msgid "IP Address:"
+msgstr "IP Adresi:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:505
+msgid "Subnet mask:"
+msgstr "Alt aÄ? maskesi:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:514
+msgid "Router:"
+msgstr "Yönlendirici:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:523
+msgid "DNS:"
+msgstr "DNS:"
+
+#: ../src/nmn-new-connection.c:247
+msgid "3G disabled"
+msgstr "3G devre dıÅ?ı"
+
+#: ../src/nmn-new-connection.c:252
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Dahili 3G modem ve SIM kart algılandı"
+
+#: ../src/nmn-new-connection.c:254
+msgid "No modems detected"
+msgstr "Hiçbir modem algılanmadı"
+
+#: ../src/nmn-new-connection.c:611
+msgid "Add a new connection"
+msgstr "Yeni baÄ?lantı ekle"
+
+#: ../src/nmn-new-connection.c:631
+msgid "Hidden network"
+msgstr "Gizli aÄ?"
+
+#: ../src/nmn-new-connection.c:657
+msgid "Save connection"
+msgstr "BaÄ?lantıyı kaydet"
+
+#: ../src/nmn-new-connection.c:666
+msgid "Return to Networking"
+msgstr "AÄ?a Dön"
+
+#: ../src/nmn-mobile-providers.c:504
+msgid "Default"
+msgstr "Varsayılan"
+
+#~ msgid "Unavailable"
+#~ msgstr "Kullanılamıyor"
+
+#~ msgid "On"
+#~ msgstr "Açık"
+
+#~ msgid "Off"
+#~ msgstr "Kapalı"
+
+#~ msgid "Advanced"
+#~ msgstr "GeliÅ?miÅ?"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>UçuÅ? modu/b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>Kablolu</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>Yeni baÄ?lantı ekle</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>AÄ?lar</b></big>"
diff --git a/po/uk.po b/po/uk.po
new file mode 100644
index 0000000..ac8f9ec
--- /dev/null
+++ b/po/uk.po
@@ -0,0 +1,663 @@
+# Ukrainian translation of NetworkManager
+# Copyright (C) Free Software Foundation, 2005
+# This file is distributed under the same license as the NetworkManager package.
+# Maxim Dziumanenko <dziumanenko gmail com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-04-02 14:08+0300\n"
+"PO-Revision-Date: 2010-04-02 03:32+0200\n"
+"Last-Translator: Maxim Dziumanenko <dziumanenko gmail com>\n"
+"Language-Team: Ukrainian <trans-uk lists fedoraproject org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "Ð?еÑ?Ñ?ваннÑ? меÑ?ежними з'Ñ?днаннÑ?ми"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "Ð?оÑ?Ñ?Ñ?п до Ñ?нÑ?еÑ?неÑ? Ñ?еÑ?ез мобÑ?лÑ?ний Ñ?елеÑ?он"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "Типово"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "bluetooth"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "Ð?е вдаÑ?Ñ?Ñ?Ñ?Ñ? вÑ?Ñ?ановиÑ?и з'Ñ?днаннÑ?: %s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "Ð?е вдаÑ?Ñ?Ñ?Ñ?Ñ? акÑ?ивÑ?ваÑ?и пÑ?иÑ?Ñ?Ñ?Ñ?й: %s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "Ð?е вдалоÑ?Ñ? деакÑ?ивÑ?ваÑ?и пÑ?иÑ?Ñ?Ñ?Ñ?й: %s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "дÑ?оÑ?ове"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "Ð?е вдалоÑ?Ñ? Ñ?озблокÑ?ваÑ?и за допомогоÑ? PIN: %s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "Ð?аблокований пÑ?иÑ?Ñ?Ñ?Ñ?й GSM"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "Ð?емаÑ?"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP Ñ?з 40/128-Ñ?озÑ?Ñ?дним клÑ?Ñ?ем"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP Ñ?з 128-Ñ?озÑ?Ñ?дноÑ? кодовоÑ? Ñ?Ñ?азоÑ?"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "Ð?инамÑ?Ñ?ний WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA Ñ? WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA Ñ? WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "С_Ñ?воÑ?иÑ?и"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr ""
+"Ð?лÑ? доÑ?Ñ?Ñ?пÑ? до безпÑ?оводовоÑ? меÑ?ежÑ? '%s' поÑ?Ñ?Ñ?бнÑ? паÑ?олÑ? або клÑ?Ñ?Ñ? "
+"Ñ?иÑ?Ñ?Ñ?ваннÑ?."
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "Ð?оÑ?Ñ?Ñ?бна авÑ?енÑ?иÑ?Ñ?каÑ?Ñ?Ñ? безпÑ?оводовоÑ? меÑ?ежÑ?"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "Ð?езпÑ?оводова меÑ?ежа вимагаÑ? авÑ?енÑ?иÑ?Ñ?каÑ?Ñ?Ñ?"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "СÑ?воÑ?иÑ?и новÑ? безпÑ?оводовÑ? меÑ?ежÑ?"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "Ð?ова безпÑ?оводова меÑ?ежа"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "Ð?ведÑ?Ñ?Ñ? Ñ?м'Ñ? длÑ? безпÑ?оводовоÑ? меÑ?ежÑ?, Ñ?кÑ? поÑ?Ñ?Ñ?бно Ñ?Ñ?воÑ?иÑ?и."
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "Ð?Ñ?дклÑ?Ñ?иÑ?иÑ?Ñ? до пÑ?иÑ?ованоÑ? безпÑ?оводовоÑ? меÑ?ежÑ?"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "Ð?Ñ?иÑ?ована безпÑ?оводова меÑ?ежа"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr ""
+"Ð?ведÑ?Ñ?Ñ? Ñ?м'Ñ? Ñ?а вÑ?домоÑ?Ñ?Ñ? пÑ?о безпекÑ? пÑ?иÑ?ованоÑ? безпÑ?оводовоÑ? меÑ?ежÑ?, до "
+"Ñ?коÑ? поÑ?Ñ?Ñ?бно пÑ?дклÑ?Ñ?иÑ?иÑ?Ñ?."
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "_Ð?Ñ?дклÑ?Ñ?иÑ?иÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "Ð?Ñ?дклÑ?Ñ?еннÑ?:"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "Ð?нÑ?а безпÑ?оводова меÑ?ежа..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "Ð?езпÑ?оводовий _адапÑ?еÑ?:"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "_Ð?м'Ñ? меÑ?ежÑ?:"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "_Ð?езпÑ?оводова безпека:"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">Ð?е вибÑ?ано Ñ?еÑ?Ñ?иÑ?Ñ?каÑ? Ñ?енÑ?Ñ?Ñ? "
+"Ñ?еÑ?Ñ?иÑ?Ñ?каÑ?Ñ?Ñ?</span>\n"
+"\n"
+"Ð?евикоÑ?иÑ?Ñ?аннÑ? Ñ?еÑ?Ñ?иÑ?Ñ?каÑ?а, виданого Ñ?енÑ?Ñ?ом Ñ?еÑ?Ñ?иÑ?Ñ?каÑ?Ñ?Ñ? (ЦС), може "
+"пÑ?извеÑ?Ñ?и до пÑ?дклÑ?Ñ?еннÑ? до незаÑ?иÑ?ениÑ? небезпеÑ?ниÑ? безпÑ?оводовиÑ? меÑ?еж. "
+"Ð?ибÑ?аÑ?и Ñ?еÑ?Ñ?иÑ?Ñ?каÑ? Ñ?енÑ?Ñ?Ñ? Ñ?еÑ?Ñ?иÑ?Ñ?каÑ?Ñ?Ñ??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "Ð?ибÑ?аÑ?и Ñ?еÑ?Ñ?иÑ?Ñ?каÑ? ЦС"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "Ð?Ñ?лÑ?Ñ?е не попеÑ?еджаÑ?и"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "Ð?гноÑ?Ñ?ваÑ?и"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "Ð?вÑ?енÑ?иÑ?Ñ?каÑ?Ñ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "Ð?аÑ?олÑ?:"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "Ð?оказаÑ?и паÑ?олÑ?"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "Ð?м'Ñ? коÑ?иÑ?Ñ?Ñ?ваÑ?а:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "Ð?нонÑ?мна Ñ?денÑ?иÑ?Ñ?каÑ?Ñ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "СеÑ?Ñ?иÑ?Ñ?каÑ? ЦС:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "Ð?нÑ?Ñ?Ñ?Ñ?Ñ?нÑ? авÑ?енÑ?иÑ?Ñ?каÑ?Ñ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "Ð?еÑ?Ñ?Ñ?Ñ? PEAP:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "Ð?денÑ?иÑ?Ñ?каÑ?Ñ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "Ð?аÑ?олÑ? закÑ?иÑ?ого клÑ?Ñ?а:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "Ð?акÑ?иÑ?ий клÑ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "СеÑ?Ñ?иÑ?Ñ?каÑ? коÑ?иÑ?Ñ?Ñ?ваÑ?а:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "Ð?лÑ?Ñ?:"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "Ð?оказаÑ?и клÑ?Ñ?"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "Ð?ндекÑ? WEP:"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "Тип:"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "Ð?ибÑ?аÑ?и Ñ?еÑ?Ñ?иÑ?Ñ?каÑ? Ñ?енÑ?Ñ?Ñ? Ñ?еÑ?Ñ?иÑ?Ñ?каÑ?Ñ?Ñ?..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "Ð?ибеÑ?Ñ?Ñ?Ñ? ваÑ? оÑ?обиÑ?Ñ?ий Ñ?еÑ?Ñ?иÑ?Ñ?каÑ?..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "Ð?ибеÑ?Ñ?Ñ?Ñ? ваÑ? закÑ?иÑ?ий клÑ?Ñ?..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "Ð?акÑ?иÑ?Ñ? клÑ?Ñ?Ñ? DER, PEM або PKCS#12 (*.der, *.pem, *.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "СеÑ?Ñ?иÑ?Ñ?каÑ?и DER або PEM (*.der, *.pem, *.crt, *.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "ТÑ?нелÑ?ований TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "Ð?аÑ?иÑ?ений EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "Тип повÑ?домленнÑ?"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "Тип повÑ?домленнÑ?"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "Ð?ежа облаÑ?Ñ?Ñ? змÑ?Ñ?Ñ?Ñ?"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "ШиÑ?ина межÑ? навколо облаÑ?Ñ?Ñ? вмÑ?Ñ?Ñ?Ñ?"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "Ð?Ñ?оÑ?Ñ?Ñ?Ñ? облаÑ?Ñ?Ñ? вмÑ?Ñ?Ñ?Ñ?"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "Ð?Ñ?оÑ?Ñ?Ñ?Ñ? мÑ?ж елеменÑ?ами облаÑ?Ñ?Ñ?"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "Ð?Ñ?оÑ?Ñ?Ñ?Ñ? мÑ?ж кнопками"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "Ð?Ñ?оÑ?Ñ?Ñ?Ñ? мÑ?ж кнопками"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "Ð?ежа облаÑ?Ñ?Ñ? дÑ?й"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "ШиÑ?ина межÑ? навколо облаÑ?Ñ?Ñ? дÑ?й"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " Ñ?а "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "Ð?е вдаÑ?Ñ?Ñ?Ñ?Ñ? знайÑ?и жодноÑ? меÑ?ежÑ?."
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " Ð?ожна Ñ?пÑ?обÑ?ваÑ?и вимкнÑ?Ñ?и авÑ?ономний Ñ?ежим."
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " Ð?ожна Ñ?пÑ?обÑ?ваÑ?и вклÑ?Ñ?иÑ?Ñ? "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "Ð?Ñ?оÑ?ова"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "Ð?одаÑ?и нове з'Ñ?днаннÑ?"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "Ð?еÑ?ежÑ?"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "Bluetooth"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "Ð?вÑ?ономний Ñ?ежим"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "Це пÑ?изведе до вимиканнÑ? Ñ?Ñ?Ñ?Ñ? з'Ñ?днанÑ?"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "Ð?Ñ?аÑ?Ñ?ваÑ?и Ñ? авÑ?ономномÑ? Ñ?ежимÑ?"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "Ð?апÑ?Ñ?Ñ?иÑ?и Ñ? наÑ?Ñ?Ñ?лÑ?номÑ? Ñ?ежимÑ?"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager Netbook"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr "- NetworkManager Netbook"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "Ð?Ñ?дклÑ?Ñ?ено"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "Ð?Ñ?дклÑ?Ñ?иÑ?иÑ?Ñ?"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "Ð?Ñ?дклÑ?Ñ?еннÑ?"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "СкаÑ?Ñ?ваÑ?и"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "Ð?Ñ?дклÑ?Ñ?ено"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "Ð?Ñ?дклÑ?Ñ?иÑ?иÑ?Ñ?"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "Ð?оÑ?Ñ?Ñ?пно"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "Ð?е вдалоÑ?Ñ? оновиÑ?и з'Ñ?днаннÑ?: %s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "Ð?Ñ?дÑ?веÑ?джÑ?Ñ?Ñ?е видаленнÑ??"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "Ð?Ñ?, збеÑ?егÑ?и"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "Так, видалиÑ?и"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"ХоÑ?еÑ?е видалиÑ?и меÑ?ежÑ? '%s' %s? Ð?Ñ?и Ñ?Ñ?омÑ? бÑ?де\n"
+"видалений паÑ?олÑ? Ñ? ви бÑ?лÑ?Ñ?е не зможеÑ?е авÑ?омаÑ?иÑ?но\n"
+"пÑ?дклÑ?Ñ?аÑ?иÑ?Ñ? до «%s»."
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "Ð?одаÑ?ково"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "Ð?идалиÑ?и з'Ñ?днаннÑ?"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "меÑ?ежа"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "Ð?Ñ?дклÑ?Ñ?ено до меÑ?ежÑ?"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "ТепеÑ? ви пÑ?иÑ?днанÑ? до %s, меÑ?ежа %s"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "ТепеÑ? ви пÑ?иÑ?днанÑ? до меÑ?ежÑ? %s"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "ТепеÑ? ви пÑ?иÑ?днанÑ? до меÑ?ежÑ?"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "Ð?еÑ?ежÑ? вÑ?Ñ?аÑ?ено"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "Ð?Ñ?ло Ñ?озÑ?Ñ?вано пÑ?дклÑ?Ñ?еннÑ? %s до %s"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "Ð?Ñ?ло Ñ?озÑ?Ñ?вано з'Ñ?днаннÑ? %s"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "Ð?Ñ?ло Ñ?озÑ?Ñ?вано з'Ñ?днаннÑ?"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "меÑ?ежÑ? - не пÑ?иÑ?днанÑ?"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "меÑ?ежÑ? - з'Ñ?днаннÑ?"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "меÑ?ежÑ? - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "меÑ?ежÑ? - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "меÑ?ежÑ? - пÑ?иÑ?днанÑ?"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "РозблокÑ?ваÑ?и"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "Ð?имкнÑ?Ñ?и PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(немаÑ?)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "Ð?Ñ?иÑ?днаÑ?иÑ?Ñ? Ñ?еÑ?ез:"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "Ð?Ñ?Ñ?Ñ?нÑ?"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "Ð?окалÑ?не з'Ñ?днаннÑ?"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP-адÑ?еÑ?а:"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "Ð?аÑ?ка пÑ?дмеÑ?ежÑ?:"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "Ð?аÑ?Ñ?Ñ?Ñ?Ñ?изаÑ?оÑ?:"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNS:"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "MAC-адÑ?еÑ?а:"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G вÑ?дклÑ?Ñ?ено"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G модем заблокований"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "Ð?иÑ?влено внÑ?Ñ?Ñ?Ñ?Ñ?нÑ? 3G-модем Ñ?а SIM-каÑ?Ñ?кÑ?"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "Ð?одемÑ?в не виÑ?влено"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "Ð?одаÑ?и нове з'Ñ?днаннÑ?"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "Ð?Ñ?иÑ?ована меÑ?ежа"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "Ð?беÑ?егÑ?и з'Ñ?днаннÑ?"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "Ð?овеÑ?нÑ?Ñ?иÑ?Ñ? до Ñ?оздÑ?лÑ? меÑ?еж"
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
index 0000000..8c1f83c
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,683 @@
+# Simplified Chinese translation of network-manager-netbook
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# Copyright (C) 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the network-manager-netbook package.
+# YunQiang Su <wzssyqa gmail com>, 2010.
+# Jessica Ban <bancage gmail com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: network-manager-netbook master\n"
+"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
+"product=NetworkManager&component=network-manager-netbook\n"
+"POT-Creation-Date: 2010-06-26 13:43+0000\n"
+"PO-Revision-Date: 2010-07-16 12:57+0800\n"
+"Last-Translator: Jessica Ban <bancage gmail com>\n"
+"Language-Team: Chinese (simplified) <i18n-zh googlegroups com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "管ç??æ?¨ç??ç½?ç»?è¿?æ?¥"
+
+#: ../network-manager-netbook.desktop.in.h:2
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "使ç?¨ç§»å?¨ç?µè¯?访é?®äº?è??ç½?"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "�认"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "è??ç??"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "æ? æ³?å? é?¤è¿?æ?¥ï¼?%s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "æ? æ³?æ¿?活设å¤?ï¼?%s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "æ? æ³?å??ç?¨è®¾å¤?ï¼?%s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "æ??线"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "PIN 解é??失败ï¼?%s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "被é??å®?ç?? GSM 设å¤?"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "æ? "
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128 ���"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128 ä½?é??è¡?å?£ä»¤"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "å?¨æ?? WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA & WPA2 个人ç??"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA & WPA2 ä¼?ä¸?ç??"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "å??建(_R)"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr "é??è¦?å?£ä»¤æ??å? å¯?å¯?é?¥æ??è?½è®¿é?®æ? 线ç½?ç»?â??%sâ??ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "é??è¦?æ? 线ç½?ç»?é?´å®?"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "æ? 线ç½?ç»?é??è¦?é?´å®?"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "å??建æ?°ç??æ? 线ç½?ç»?"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "æ?°å»ºæ? 线ç½?ç»?"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "è¾?å?¥è¦?å??建ç??æ? 线ç½?ç»?å??称ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "è¿?æ?¥å?°é??è??ç??æ? 线ç½?ç»?"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "é??è??æ? 线ç½?ç»?"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr "è¾?å?¥è¦?è¿?æ?¥ç??å·²é??è??æ? 线ç½?ç»?ç??å??称å??å®?å?¨ç»?è??ã??"
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "è¿?æ?¥(_O)"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "���"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "å?¶ä»?æ? 线ç½?ç»?..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "æ? 线é??é??å?¨(_A)ï¼?"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "ç½?ç»?å??称(_N)ï¼?"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "æ? 线å®?å?¨æ?§(_W)ï¼?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">æ?ªé??æ?©â??è¯?书é¢?å??æ?ºæ??â??è¯?书</span>\n"
+"\n"
+"ä¸?使ç?¨è¯?书é¢?å??æ?ºæ??(CA)ç??è¯?书å?¯è?½å¯¼è?´è¿?æ?¥å?°ä¸?å®?å?¨ã??å¼?常ç??æ? 线ç½?ç»?ã??æ?¯å?¦è¦?é??"
+"æ?©â??è¯?书é¢?å??æ?ºæ??â??è¯?书ï¼?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "é??æ?© CA è¯?书"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "ä¸?å??è¦å??æ??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "忽�"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "认��"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "�令�"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "�示�令"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "ç?¨æ?·å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "å?¿å??身份ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA �书�"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "å??é?¨é?´å®?ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP ç??æ?¬ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "身份�"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "�����令�"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "�����"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "���书�"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "���"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "�示��"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP 索��"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "ç±»å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "é??æ?©è¯?书é¢?å??æ?ºæ??è¯?书..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "é??æ?©ä¸ªäººè¯?书..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "é??æ?©ç§?ç?¨å¯?é?¥..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DERã??PEM æ?? PKCS#12 ç§?ç?¨å¯?é?¥(*.derã??*.pemã??*.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER æ?? PEM è¯?书(*.derã??*.pemã??*.crtã??*.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "é?§é?? TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "å??ä¿?æ?¤ç?? EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtkä¿¡æ?¯æ?¡å??åº?æ?°æ?®"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "ä¿¡æ?¯ç±»å??"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "ä¿¡æ?¯ç??ç±»å??"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "å??容å?ºå??è¾¹ç??"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "å??容å?ºå??è¾¹ç??ç??宽度"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "å??容å?ºå??空é?´"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "å?¨å?ºå??å??ç´ é?´å? ç©ºæ ¼"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "æ??é?®ç©ºæ ¼æ ¡éª?"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "æ??é?®é?´å? ç©ºæ ¼"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "æ??ä½?å?ºå??è¾¹ç??"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "æ??ä½?å?ºå??è¾¹ç??宽度"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr " å?? "
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "æ?±æ?ï¼?没æ??æ?¾å?°ä»»ä½?ç½?ç»?ã??"
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr " æ?¨å?¯ä»¥å°?è¯?ç¦?ç?¨ç¦»çº¿æ¨¡å¼?ã??"
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr " æ?¨å?¯ä»¥å°?è¯?æ??å¼? "
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "æ??线"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "æ·»å? æ?°è¿?æ?¥"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "ç½?ç»?å??称"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "è??ç??"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "离线模�"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "è¿?å°?ç¦?ç?¨æ?¨ç??æ??æ??è¿?æ?¥"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "å?¨ç?¬ç«?模å¼?ä¸è¿?è¡?"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "å?¨æ¡?é?¢æ¨¡å¼?ä¸è¿?è¡?"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr "NetworkManager ���"
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr " - NetworkManager ���"
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "已��"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "æ?å¼?"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "æ£å?¨è¿?æ?¥..."
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "å??æ¶?"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "å·²æ?å¼?"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "è¿?æ?¥"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "��"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "æ? æ³?æ?´æ?°è¿?æ?¥ï¼?%s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "ç??ç¡®è¦?å? é?¤ï¼?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "ä¸?ï¼?ä¿?å?"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "æ?¯ï¼?å? é?¤"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"æ?¨æ?³è¦?å? é?¤ '%s' %s è¿?æ?¥ï¼?è¿?å°?å¿?è®°å?£ä»¤ï¼?并ä¸?\n"
+"æ?¨å°?ä¸?å??å?¯ä»¥è?ªå?¨è¿?æ?¥å?° '%s'ã??"
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "�级"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "å? é?¤è¿?æ?¥"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "ç½?ç»?"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "��已��"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "�已���� %s��个 %s ��"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "æ?¨å·²è¿?æ?¥å?° %s ç½?ç»?ã??"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "�已�����"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "��丢失"
+
+#: ../src/nmn-panel-client.c:204
+#, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "æ?±æ?ï¼?å·²ç»?丢失äº?æ?¨å?° %2$s ç?? %1$s è¿?æ?¥ã??"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "æ?±æ?ï¼?å·²ç»?丢失äº?æ?¨ç?? %s è¿?æ?¥"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "æ?±æ?ï¼?丢失äº?æ?¨ç??è¿?æ?¥"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "�� - ���"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "ç½?ç»? - æ£å?¨è¿?æ?¥"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "ç½?ç»? - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "ç½?ç»? - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "�� - 已��"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "解é??"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "�� PIN"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(æ? )"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "è¿?æ?¥é??è¿?ï¼?"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "æ??å?¨"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "����"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP å?°å??ï¼?"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "å?ç½?æ?©ç ?ï¼?"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "路���"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNSï¼?"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "æ?¨ç?? MAC å?°å??ï¼?"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G 已��"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G è°?å?¶è§£è°?å?¨å·²é??å®?"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "æ£?æµ?å?°å??é?¨ 3G è°?å?¶è§£è°?å?¨å?? SIM å?¡"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "������解��"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "æ·»å? æ?°è¿?æ?¥"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "é??è??ç½?ç»?"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "ä¿?å?è¿?æ?¥"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "è¿?å??è??ç½?ç?¶æ??"
+
+#~ msgid "On"
+#~ msgstr "å¼?"
+
+#~ msgid "Off"
+#~ msgstr "å?³"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>��模�</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>æ??线</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>æ·»å? æ?°è¿?æ?¥</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>ç½?ç»?</b></big>"
diff --git a/po/zh_HK.po b/po/zh_HK.po
new file mode 100644
index 0000000..343e0b7
--- /dev/null
+++ b/po/zh_HK.po
@@ -0,0 +1,681 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+# Novell Language <language novell com>
+# Cheng-Chia Tseng <pswo10680 gmail com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager 1.7\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-04-17 11:32+0800\n"
+"PO-Revision-Date: 2010-04-17 11:33+0800\n"
+"Last-Translator: Cheng-Chia Tseng <pswo10680 gmail com>\n"
+"Language-Team: Chinese (Hong Kong) <community linuxhall org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "æ?§å?¶ä½ ç??網絡é?£ç·?"
+
+#: ../network-manager-netbook.desktop.in.h:2
+#, fuzzy
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "使ç?¨ä½ ç??æµ?å??é?»è©±å?å??äº?è?¯ç¶²"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "é ?è¨"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "è??ç??"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "�������%s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "ç?¡æ³?å??ç?¨è£?ç½®ï¼?%s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "ç?¡æ³?å??ç?¨è£?ç½®ï¼?%s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "æ??ç·?"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "PIN 碼解é??失æ??ï¼?%s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "å·²ä¸?é??ç?? GSM è£?ç½®"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "ç?¡"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128 ä½?å??å¯?碼å??"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128 ä½?å??å¯?碼ç??èª?"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "å??æ?? WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA è?? WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA è?? WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "建�(_R)"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr "å?å??ç?¡ç·?網絡ã??%sã??é??è¦?æ??ä¾?å¯?碼æ??å? å¯?å¯?碼å??ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "é??è¦?ç?¡ç·?網絡é©?è?"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "ç?¡ç·?網絡é??è¦?é©?è?"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "�建��網絡"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "���網絡"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "ç?ºè¦?建ç«?ç??ç?¡ç·?網絡輸å?¥å??稱ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "é?£æ?¥è?³é?±è??ç??ç?¡ç·?網絡"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "é?±è??ç??ç?¡ç·?網絡"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr "輸å?¥è¦?é?£æ?¥ä¹?é?±è??ç?¡ç·?網絡ç??å??稱å??å®?å?¨æ?§è©³ç´°è³?æ??ã??"
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "��(_O)"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "��︰"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "����網絡..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "�����(_A)�"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "網絡å??稱(_N)ï¼?"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "Wireless Security(_W)ï¼?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">æ?ªé?¸æ??è?æ?¸ç®¡ç??ä¸å¿?ç°½ç?¼ç??è?æ?¸</span>\n"
+"\n"
+"è?¥ä¸?使ç?¨è?æ?¸ç®¡ç??ä¸å¿? (CA) ç°½ç?¼ç??è?æ?¸ï¼?å?¯è?½æ??é?£ç·?è?³ä¸?å®?å?¨ã??ä¸?å??ç´?æ??ç??ç?¡ç·?網絡ã??è¦?é?¸æ??è?æ?¸ç®¡ç??ä¸å¿?ç°½ç?¼ç??è?æ?¸å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "é?¸æ?? CA è?æ?¸"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "ä¸?è¦?å??次è¦å??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "忽�"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "é©?è?ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "�碼�"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "顯示�碼"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "使ç?¨è??å??稱ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "å?¿å??身å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA è?æ?¸ï¸°"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "å?§é?¨é©?è?ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP ç??æ?¬ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "身å??︰"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "ç§?å¯?å¯?碼å??å¯?碼ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "ç§?å¯?å¯?碼å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "使ç?¨è??è?æ?¸ï¸°"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "å¯?碼å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "顯示å¯?碼å??"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP 索��"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "é¡?å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "é?¸æ??è?æ?¸æ??æ¬?ä¸å¿?ç°½ç?¼ç??è?æ?¸..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "é?¸æ??ä½ ç??å??人è?æ?¸..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "é?¸æ??ä½ ç??ç§?å¯?å¯?碼å??..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DERã??PEM æ?? PKCS#12 ç§?å¯?å¯?碼å?? (*.derã??*.pemã??*.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER æ?? PEM è?æ?¸ (*.derã??*.pemã??*.crtã??*.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "ç¶?ç?± TLS é??é??"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "å??ä¿?è·ç?? EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "è¨?æ?¯é¡?å??"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "è¨?æ?¯ç??é¡?å??"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "å?§å®¹å??å??é??ç·£"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "å?§å®¹å??å??å?¨å??ç??é??ç·£"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "å?§å®¹å??å??é??é??"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "é??å??å??å??ç??å??ç´ é??é??"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "æ??é?µé??é??"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "æ??é?µç??é??é??"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "å??ä½?å??å??é??ç·£"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "å??ä½?å??å??å?¨å??é??ç·£ç??é??度"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr "è??"
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "å¾?æ?±æ?ï¼?æ??å??æ?¾ä¸?å?°ä»»ä½?網絡ã??"
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr "ä½ å?¯ä»¥å??試å??ç?¨ã??é?¢ç·?模å¼?ã??ã??"
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr "ä½ å?¯ä»¥å??試é??å??"
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "æ??ç·?"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "å? å?¥æ?°é?£ç·?"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "網絡"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "è??ç??"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "��模�"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "é??å°?æ??å??ç?¨æ??æ??ä½ ç??é?£ç·?"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "以��模���"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "以��模���"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr ""
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr ""
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "已��"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "ä¸æ?·é?£æ?¥"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "æ£å?¨é?£æ?¥"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "å??æ¶?"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "å·²ä¸æ?·é?£æ?¥"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "��"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "��"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "�������%s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "ç??ç??è¦?移é?¤å??ï¼?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "ä¸?ï¼?å?²å?"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "����"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"ä½ å??è¦?移é?¤ã??%sã??%s 網絡å??ï¼?é??\n"
+"æ??å¿?è¨?å¯?碼ï¼?並ä¸?ä½ å°?ç?¡æ³?å??è?ªå??\n"
+"é?£æ?¥å?°ã??%sã??ã??"
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "é?²é??"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "移���"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "網絡"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "��已��"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "ä½ ç?¾å?¨å·²é?£æ?¥å?° %sï¼?%s 網絡"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "ä½ ç?¾å?¨å·²é?£æ?¥å?° %s 網絡"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "ä½ ç?¾å?¨å·²ç¶?é?£æ?¥å?°ç¶²çµ¡"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "網絡�失"
+
+#: ../src/nmn-panel-client.c:204
+#, fuzzy, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "å¾?æ?±æ?ï¼?æ??å??å·²ä¸?å¤±ä½ é?£æ?¥å?° %s ç?? %s é?£ç·?"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "å¾?æ?±æ?ï¼?æ??å??å·²ä¸?å¤±ä½ ç?? %s é?£ç·?"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "å¾?æ?±æ?ï¼?æ??å??å·²ä¸?å¤±ä½ ç??é?£ç·?"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "網絡 - ���"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "網絡 - é?£æ?¥ä¸"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "網絡 - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "網絡 - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "網絡 - 已��"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "解é??"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "å??ç?¨ PIN 碼"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(ç?¡)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "���︰"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "æ??å??"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "����"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP ä½?å??ï¼?"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "å?網絡é?®ç½©ï¼?"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "路���"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNSï¼?"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "ä½ ç?? MAC ä½?å??ï¼?"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G å·²å??ç?¨"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G æ?¸æ??æ©?å·²ä¸?é??"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "å?µæ¸¬å?°å?§é?¨ 3G æ?¸æ??æ©?è?? SIM å?¡"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "æ?ªå?µæ¸¬å?°æ?¸æ??æ©?"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "æ?°å¢?æ?°ç??é?£ç·?"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "é?±è??ç??網絡"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "å?²å?é?£ç·?"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "è¿?å??è?³ç¶²çµ¡"
+
+#~ msgid "On"
+#~ msgstr "é??å??"
+
+#~ msgid "Off"
+#~ msgstr "é??é??"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>��模�</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>æ??ç·?</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>æ?°å¢?æ?°ç??é?£ç·?</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>網路</b></big>"
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644
index 0000000..edee237
--- /dev/null
+++ b/po/zh_TW.po
@@ -0,0 +1,682 @@
+# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
+# This file is distributed under the same license as the package.
+# Novell Language <language novell com>
+# Cheng-Chia Tseng <pswo10680 gmail com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: upstream-translations.network-manager 1.7\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-04-17 11:32+0800\n"
+"PO-Revision-Date: 2010-03-08 22:52+0800\n"
+"Last-Translator: Cheng-Chia Tseng <pswo10680 gmail com>\n"
+"Language-Team: Novell Language <language novell com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../network-manager-netbook.desktop.in.h:1
+msgid "Control your network connections"
+msgstr "æ?§å?¶æ?¨ç??網路é?£ç·?"
+
+#: ../network-manager-netbook.desktop.in.h:2
+#, fuzzy
+msgid "network-manager-netbook"
+msgstr "network-manager-netbook"
+
+#: ../gnome-bluetooth/network-manager-applet.c:292
+msgid "Access the Internet using your mobile phone"
+msgstr "使ç?¨æ?¨ç??è¡?å??é?»è©±å?å??網é??網路"
+
+#: ../libnm-gtk/nm-mobile-providers.c:504
+msgid "Default"
+msgstr "é ?è¨"
+
+#: ../libnm-gtk/nm-bt-item.c:35
+msgid "bluetooth"
+msgstr "è??ç??"
+
+#: ../libnm-gtk/nm-connection-item.c:402
+#, c-format
+msgid "Could not delete connection: %s"
+msgstr "�������%s"
+
+#: ../libnm-gtk/nm-device-item.c:65
+#, c-format
+msgid "Could not activate device: %s"
+msgstr "ç?¡æ³?å??ç?¨è£?ç½®ï¼?%s"
+
+#: ../libnm-gtk/nm-device-item.c:110
+#, c-format
+msgid "Could not deactivate device: %s"
+msgstr "ç?¡æ³?å??ç?¨è£?ç½®ï¼?%s"
+
+#: ../libnm-gtk/nm-ethernet-item.c:38
+msgid "wired"
+msgstr "æ??ç·?"
+
+#: ../libnm-gtk/nm-ethernet-item.c:99
+msgid "802.1x"
+msgstr "802.1x"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:50 ../libnm-gtk/nm-gsm-item.c:36
+#: ../libnm-gtk/nm-cdma-item.c:36 ../src/nmn-list.c:117
+#: ../src/nmn-applet.c:498 ../src/nmn-new-connection.c:710
+msgid "3G"
+msgstr "3G"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:70
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:89
+#, c-format
+msgid "PIN unlocking failed: %s"
+msgstr "PIN 碼解é??失æ??ï¼?%s"
+
+#: ../libnm-gtk/nm-gsm-pin-request-item.c:140
+msgid "Locked GSM device"
+msgstr "å·²ä¸?é??ç?? GSM è£?ç½®"
+
+#: ../libnm-gtk/nm-wifi-item.c:61 ../src/nmn-list.c:107
+#: ../src/nmn-applet.c:476 ../src/nmn-new-connection.c:685
+msgid "WiFi"
+msgstr "WiFi"
+
+#: ../libnm-gtk/wireless-dialog.c:655
+msgid "None"
+msgstr "ç?¡"
+
+#: ../libnm-gtk/wireless-dialog.c:672
+msgid "WEP 40/128-bit Key"
+msgstr "WEP 40/128 ä½?å??é??é?°"
+
+#: ../libnm-gtk/wireless-dialog.c:681
+msgid "WEP 128-bit Passphrase"
+msgstr "WEP 128 ä½?å??å¯?碼ç??èª?"
+
+#: ../libnm-gtk/wireless-dialog.c:698
+#: ../libnm-gtk/wireless-security/wireless-security.c:345
+msgid "LEAP"
+msgstr "LEAP"
+
+#: ../libnm-gtk/wireless-dialog.c:711
+msgid "Dynamic WEP (802.1x)"
+msgstr "å??æ?? WEP (802.1x)"
+
+#: ../libnm-gtk/wireless-dialog.c:725
+msgid "WPA & WPA2 Personal"
+msgstr "WPA è?? WPA2 Personal"
+
+#: ../libnm-gtk/wireless-dialog.c:739
+msgid "WPA & WPA2 Enterprise"
+msgstr "WPA è?? WPA2 Enterprise"
+
+#: ../libnm-gtk/wireless-dialog.c:799
+msgid "C_reate"
+msgstr "建�(_R)"
+
+#: ../libnm-gtk/wireless-dialog.c:870
+#, c-format
+msgid ""
+"Passwords or encryption keys are required to access the wireless network '%"
+"s'."
+msgstr "å?å??ç?¡ç·?網路ã??%sã??é??è¦?æ??ä¾?å¯?碼æ??å? å¯?é??é?°ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:872
+msgid "Wireless Network Authentication Required"
+msgstr "é??è¦?ç?¡ç·?網路é©?è?"
+
+#: ../libnm-gtk/wireless-dialog.c:874
+msgid "Authentication required by wireless network"
+msgstr "ç?¡ç·?網路é??è¦?é©?è?"
+
+#: ../libnm-gtk/wireless-dialog.c:879
+msgid "Create New Wireless Network"
+msgstr "�建��網路"
+
+#: ../libnm-gtk/wireless-dialog.c:881
+msgid "New wireless network"
+msgstr "���網路"
+
+#: ../libnm-gtk/wireless-dialog.c:882
+msgid "Enter a name for the wireless network you wish to create."
+msgstr "ç?ºè¦?建ç«?ç??ç?¡ç·?網路輸å?¥å??稱ã??"
+
+#: ../libnm-gtk/wireless-dialog.c:884
+msgid "Connect to Hidden Wireless Network"
+msgstr "é?£æ?¥è?³é?±è??ç??ç?¡ç·?網路"
+
+#: ../libnm-gtk/wireless-dialog.c:886
+msgid "Hidden wireless network"
+msgstr "é?±è??ç??ç?¡ç·?網路"
+
+#: ../libnm-gtk/wireless-dialog.c:887
+msgid ""
+"Enter the name and security details of the hidden wireless network you wish "
+"to connect to."
+msgstr "輸å?¥è¦?é?£æ?¥ä¹?é?±è??ç?¡ç·?網路ç??å??稱å??å®?å?¨æ?§è©³ç´°è³?æ??ã??"
+
+#: ../libnm-gtk/wireless-security.ui.h:1
+msgid "C_onnect"
+msgstr "��(_O)"
+
+#: ../libnm-gtk/wireless-security.ui.h:2
+msgid "Connection:"
+msgstr "��︰"
+
+#: ../libnm-gtk/wireless-security.ui.h:3
+msgid "Other Wireless Network..."
+msgstr "����網路..."
+
+#: ../libnm-gtk/wireless-security.ui.h:4
+msgid "Wireless _adapter:"
+msgstr "�����(_A)�"
+
+#: ../libnm-gtk/wireless-security.ui.h:5
+msgid "_Network Name:"
+msgstr "網路å??稱(_N)ï¼?"
+
+#: ../libnm-gtk/wireless-security.ui.h:6
+msgid "_Wireless Security:"
+msgstr "Wireless Security(_W)ï¼?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:1
+msgid ""
+"<span weight=\"bold\" size=\"larger\">No Certificate Authority certificate "
+"chosen</span>\n"
+"\n"
+"Not using a Certificate Authority (CA) certificate can result in connections "
+"to insecure, rogue wireless networks. Would you like to choose a "
+"Certificate Authority certificate?"
+msgstr ""
+"<span weight=\"bold\" size=\"larger\">æ?ªé?¸æ??è?æ?¸ç®¡ç??ä¸å¿?ç°½ç?¼ç??è?æ?¸</span>\n"
+"\n"
+"è?¥ä¸?使ç?¨è?æ?¸ç®¡ç??ä¸å¿? (CA) ç°½ç?¼ç??è?æ?¸ï¼?å?¯è?½æ??é?£ç·?è?³ä¸?å®?å?¨ã??ä¸?å??ç´?æ??ç??ç?¡ç·?網"
+"è·¯ã??è¦?é?¸æ??è?æ?¸ç®¡ç??ä¸å¿?ç°½ç?¼ç??è?æ?¸å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:4
+msgid "Choose CA Certificate"
+msgstr "é?¸æ?? CA è?æ?¸"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:5
+msgid "Don't warn me again"
+msgstr "ä¸?è¦?å??次è¦å??"
+
+#: ../libnm-gtk/wireless-security/ca-nag-dialog.ui.h:6
+msgid "Ignore"
+msgstr "忽�"
+
+#: ../libnm-gtk/wireless-security/dynamic-wep.ui.h:1
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-eap.ui.h:1
+msgid "Authentication:"
+msgstr "é©?è?ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:1
+#: ../libnm-gtk/wireless-security/leap.ui.h:1
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:1
+msgid "Password:"
+msgstr "�碼�"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:5
+#: ../libnm-gtk/wireless-security/leap.ui.h:2
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:2
+msgid "Show password"
+msgstr "顯示�碼"
+
+#: ../libnm-gtk/wireless-security/eap-leap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-simple.ui.h:3
+#: ../libnm-gtk/wireless-security/leap.ui.h:3
+msgid "User Name:"
+msgstr "使ç?¨è??å??稱ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:1
+msgid "Anonymous Identity:"
+msgstr "å?¿å??身å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:2
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:1
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:2
+msgid "CA Certificate:"
+msgstr "CA æ??è?︰"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:3
+#: ../libnm-gtk/wireless-security/eap-ttls.ui.h:3
+msgid "Inner Authentication:"
+msgstr "å?§é?¨é©?è?ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-peap.ui.h:4
+msgid "PEAP Version:"
+msgstr "PEAP ç??æ?¬ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:2
+msgid "Identity:"
+msgstr "身å??︰"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:3
+msgid "Private Key Password:"
+msgstr "ç§?å¯?é??é?°å¯?碼ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:4
+msgid "Private Key:"
+msgstr "ç§?å¯?é??é?°ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-tls.ui.h:6
+msgid "User Certificate:"
+msgstr "使ç?¨è??æ??è?︰"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:2
+msgid "Key:"
+msgstr "é??é?°ï¼?"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:3
+msgid "Show key"
+msgstr "顯示é??é?°"
+
+#: ../libnm-gtk/wireless-security/wep-key.ui.h:4
+msgid "WEP Index:"
+msgstr "WEP 索��"
+
+#: ../libnm-gtk/wireless-security/wpa-psk.ui.h:3
+msgid "Type:"
+msgstr "é¡?å??ï¼?"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:231
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:253
+msgid "MSCHAPv2"
+msgstr "MSCHAPv2"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:241
+msgid "MD5"
+msgstr "MD5"
+
+#: ../libnm-gtk/wireless-security/eap-method-peap.c:291
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:383
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:321
+msgid "Choose a Certificate Authority certificate..."
+msgstr "é?¸æ??æ??è?æ??æ¬?ä¸å¿?ç°½ç?¼ç??æ??è?..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:377
+msgid "Choose your personal certificate..."
+msgstr "é?¸æ??æ?¨ç??å??人æ??è?..."
+
+#: ../libnm-gtk/wireless-security/eap-method-tls.c:390
+msgid "Choose your private key..."
+msgstr "é?¸æ??æ?¨ç??ç§?å¯?é??é?°..."
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:225
+msgid "PAP"
+msgstr "PAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:239
+msgid "MSCHAP"
+msgstr "MSCHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method-ttls.c:267
+msgid "CHAP"
+msgstr "CHAP"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:467
+msgid "DER, PEM, or PKCS#12 private keys (*.der, *.pem, *.p12)"
+msgstr "DERã??PEM æ?? PKCS#12 ç§?å¯?é??é?° (*.derã??*.pemã??*.p12)"
+
+#: ../libnm-gtk/wireless-security/eap-method.c:470
+msgid "DER or PEM certificates (*.der, *.pem, *.crt, *.cer)"
+msgstr "DER æ?? PEM æ??è? (*.derã??*.pemã??*.crtã??*.cer)"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:333
+msgid "TLS"
+msgstr "TLS"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:357
+msgid "Tunneled TLS"
+msgstr "ç¶?ç?± TLS é??é??"
+
+#: ../libnm-gtk/wireless-security/wireless-security.c:368
+msgid "Protected EAP (PEAP)"
+msgstr "å??ä¿?è·ç?? EAP (PEAP)"
+
+#: ../src/gtkinfobar.c:250
+msgid "gtk-info-bar-response-data"
+msgstr "gtk-info-bar-response-data"
+
+#: ../src/gtkinfobar.c:372
+msgid "Message Type"
+msgstr "è¨?æ?¯é¡?å??"
+
+#: ../src/gtkinfobar.c:373
+msgid "The type of message"
+msgstr "è¨?æ?¯ç??é¡?å??"
+
+#: ../src/gtkinfobar.c:427
+msgid "Content area border"
+msgstr "å?§å®¹å??å??é??ç·£"
+
+#: ../src/gtkinfobar.c:428
+msgid "Width of border around the content area"
+msgstr "å?§å®¹å??å??å?¨å??ç??é??ç·£"
+
+#: ../src/gtkinfobar.c:444
+msgid "Content area spacing"
+msgstr "å?§å®¹å??å??é??é??"
+
+#: ../src/gtkinfobar.c:445
+msgid "Spacing between elements of the area"
+msgstr "é??å??å??å??ç??å??ç´ é??é??"
+
+#: ../src/gtkinfobar.c:460
+msgid "Button spacing"
+msgstr "æ??é?µé??é??"
+
+#: ../src/gtkinfobar.c:461
+msgid "Spacing between buttons"
+msgstr "æ??é?µç??é??é??"
+
+#: ../src/gtkinfobar.c:476
+msgid "Action area border"
+msgstr "å??ä½?å??å??é??ç·£"
+
+#: ../src/gtkinfobar.c:477
+msgid "Width of border around the action area"
+msgstr "å??ä½?å??å??å?¨å??é??ç·£ç??寬度"
+
+#: ../src/nmn-list.c:70
+msgid " and "
+msgstr "è??"
+
+#: ../src/nmn-list.c:81
+msgid "Sorry, we can't find any networks."
+msgstr "å¾?æ?±æ?ï¼?æ??å??æ?¾ä¸?å?°ä»»ä½?網路ã??"
+
+#: ../src/nmn-list.c:84
+msgid " You could try disabling Offline mode."
+msgstr "æ?¨å?¯ä»¥è©¦è??å??ç?¨ã??é?¢ç·?模å¼?ã??ã??"
+
+#: ../src/nmn-list.c:104
+msgid " You could try turning on "
+msgstr "æ?¨å?¯ä»¥è©¦è??é??å??"
+
+#: ../src/nmn-list.c:112 ../src/nmn-applet.c:487
+msgid "Wired"
+msgstr "æ??ç·?"
+
+#: ../src/nmn-applet.c:436
+msgid "Add new connection"
+msgstr "å? å?¥æ?°é?£ç·?"
+
+#: ../src/nmn-applet.c:442
+msgid "Networks"
+msgstr "網路"
+
+#: ../src/nmn-applet.c:510
+msgid "WiMAX"
+msgstr "WiMAX"
+
+#: ../src/nmn-applet.c:521
+msgid "Bluetooth"
+msgstr "è??ç??"
+
+#: ../src/nmn-applet.c:538
+msgid "Offline mode"
+msgstr "��模�"
+
+#: ../src/nmn-applet.c:546
+msgid "This will disable all your connections"
+msgstr "é??å°?æ??å??ç?¨æ??æ??æ?¨ç??é?£ç·?"
+
+#: ../src/main.c:69
+msgid "Run in standalone mode"
+msgstr "以��模���"
+
+#: ../src/main.c:70
+msgid "Run in desktop mode"
+msgstr "以��模���"
+
+#: ../src/main.c:78
+msgid "NetworkManager Netbook"
+msgstr ""
+
+#: ../src/main.c:79
+msgid "- NetworkManager Netbook"
+msgstr ""
+
+#: ../src/nmn-network-renderer.c:106
+msgid "Connected"
+msgstr "已��"
+
+#: ../src/nmn-network-renderer.c:107
+msgid "Disconnect"
+msgstr "ä¸æ?·é?£æ?¥"
+
+#: ../src/nmn-network-renderer.c:110
+msgid "Connecting"
+msgstr "æ£å?¨é?£æ?¥"
+
+#: ../src/nmn-network-renderer.c:111
+msgid "Cancel"
+msgstr "å??æ¶?"
+
+#: ../src/nmn-network-renderer.c:114
+msgid "Disconnected"
+msgstr "å·²ä¸æ?·é?£æ?¥"
+
+#: ../src/nmn-network-renderer.c:115 ../src/nmn-network-renderer.c:381
+msgid "Connect"
+msgstr "��"
+
+#: ../src/nmn-network-renderer.c:122
+msgid "Available"
+msgstr "��"
+
+#: ../src/nmn-network-renderer.c:157
+#, c-format
+msgid "Could not update connection: %s"
+msgstr "�������%s"
+
+#: ../src/nmn-network-renderer.c:299
+msgid "Really remove?"
+msgstr "ç??ç??è¦?移é?¤å??ï¼?"
+
+#: ../src/nmn-network-renderer.c:303
+msgid "No, save"
+msgstr "ä¸?ï¼?å?²å?"
+
+#: ../src/nmn-network-renderer.c:305
+msgid "Yes, delete"
+msgstr "����"
+
+#: ../src/nmn-network-renderer.c:315
+#, c-format
+msgid ""
+"Do you want to remove the '%s' %s network? This\n"
+"will forget the password and you will no longer be\n"
+"automatically connected to '%s'."
+msgstr ""
+"æ?¨å??è¦?移é?¤ã??%sã??%s 網路å??ï¼?é??\n"
+"æ??å¿?è¨?å¯?碼ï¼?並ä¸?æ?¨å°?ç?¡æ³?å??è?ªå??\n"
+"é?£æ?¥å?°ã??%sã??ã??"
+
+#. FIXME: this should be visibile only for NMDeviceItems
+#: ../src/nmn-network-renderer.c:376
+msgid "Advanced"
+msgstr "é?²é??"
+
+#: ../src/nmn-network-renderer.c:397
+msgid "Remove connection"
+msgstr "移���"
+
+#: ../src/nmn-panel-client.c:68
+msgid "network"
+msgstr "網路"
+
+#: ../src/nmn-panel-client.c:189
+msgid "Network connected"
+msgstr "��已��"
+
+#: ../src/nmn-panel-client.c:193
+#, c-format
+msgid "You're now connected to %s, a %s network"
+msgstr "���已��� %s�%s 網路"
+
+#: ../src/nmn-panel-client.c:196
+#, c-format
+msgid "You're now connected to %s network"
+msgstr "���已��� %s 網路"
+
+#: ../src/nmn-panel-client.c:198
+msgid "You're now connected to network"
+msgstr "���已����網路"
+
+#: ../src/nmn-panel-client.c:200
+msgid "Network lost"
+msgstr "網路�失"
+
+#: ../src/nmn-panel-client.c:204
+#, fuzzy, c-format
+msgid "Sorry, we've lost your %s connection to %s"
+msgstr "å¾?æ?±æ?ï¼?æ??å??å·²ä¸?失æ?¨é?£æ?¥å?° %s ç?? %s é?£ç·?"
+
+#: ../src/nmn-panel-client.c:207
+#, c-format
+msgid "Sorry, we've lost your %s connection"
+msgstr "å¾?æ?±æ?ï¼?æ??å??å·²ä¸?失æ?¨ç?? %s é?£ç·?"
+
+#: ../src/nmn-panel-client.c:209
+msgid "Sorry, we've lost your connection"
+msgstr "å¾?æ?±æ?ï¼?æ??å??å·²ä¸?失æ?¨ç??é?£ç·?"
+
+#: ../src/nmn-panel-client.c:244
+#, c-format
+msgid "networks - not connected"
+msgstr "網路 - ���"
+
+#: ../src/nmn-panel-client.c:247
+#, c-format
+msgid "networks - connecting"
+msgstr "網路 - é?£æ?¥ä¸"
+
+#: ../src/nmn-panel-client.c:260
+#, c-format
+msgid "networks - %s - %s"
+msgstr "網路 - %s - %s"
+
+#: ../src/nmn-panel-client.c:262
+#, c-format
+msgid "networks - %s"
+msgstr "網路 - %s"
+
+#: ../src/nmn-panel-client.c:264
+msgid "networks - connected"
+msgstr "網路 - 已��"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:146
+msgid "Unlock"
+msgstr "解é??"
+
+#: ../src/nmn-gsm-pin-request-renderer.c:151
+msgid "Disable PIN"
+msgstr "å??ç?¨ PIN 碼"
+
+#: ../src/nmn-connection-details.c:108
+msgid "(none)"
+msgstr "(ç?¡)"
+
+#. Connect by:
+#: ../src/nmn-connection-details.c:484
+msgid "Connect by:"
+msgstr "���︰"
+
+#: ../src/nmn-connection-details.c:488
+msgid "DHCP"
+msgstr "DHCP"
+
+#: ../src/nmn-connection-details.c:489
+msgid "Manual"
+msgstr "æ??å??"
+
+#: ../src/nmn-connection-details.c:490
+msgid "Link Local"
+msgstr "����"
+
+#. Address
+#: ../src/nmn-connection-details.c:497
+msgid "IP Address:"
+msgstr "IP ä½?å??ï¼?"
+
+#. Netmask
+#: ../src/nmn-connection-details.c:506
+msgid "Subnet mask:"
+msgstr "å?網路é?®ç½©ï¼?"
+
+#. Gateway
+#: ../src/nmn-connection-details.c:515
+msgid "Router:"
+msgstr "路���"
+
+#. DNS
+#: ../src/nmn-connection-details.c:524
+msgid "DNS:"
+msgstr "DNSï¼?"
+
+#. Hardware address
+#: ../src/nmn-connection-details.c:534
+msgid "Your MAC address:"
+msgstr "æ?¨ç?? MAC ä½?å??ï¼?"
+
+#: ../src/nmn-new-connection.c:282
+msgid "3G disabled"
+msgstr "3G å·²å??ç?¨"
+
+#: ../src/nmn-new-connection.c:288
+msgid "3G modem is locked"
+msgstr "3G æ?¸æ??æ©?å·²ä¸?é??"
+
+#: ../src/nmn-new-connection.c:291
+msgid "Internal 3G modem and SIM card detected"
+msgstr "å?µæ¸¬å?°å?§é?¨ 3G æ?¸æ??æ©?è?? SIM å?¡"
+
+#: ../src/nmn-new-connection.c:293
+msgid "No modems detected"
+msgstr "æ?ªå?µæ¸¬å?°æ?¸æ??æ©?"
+
+#: ../src/nmn-new-connection.c:660
+msgid "Add a new connection"
+msgstr "æ?°å¢?æ?°ç??é?£ç·?"
+
+#: ../src/nmn-new-connection.c:680
+msgid "Hidden network"
+msgstr "é?±è??ç??網路"
+
+#: ../src/nmn-new-connection.c:706
+msgid "Save connection"
+msgstr "å?²å?é?£ç·?"
+
+#: ../src/nmn-new-connection.c:715
+msgid "Return to Networking"
+msgstr "è¿?å??è?³ç¶²è·¯"
+
+#~ msgid "On"
+#~ msgstr "é??å??"
+
+#~ msgid "Off"
+#~ msgstr "é??é??"
+
+#~ msgid "<b>3G</b>"
+#~ msgstr "<b>3G</b>"
+
+#~ msgid "<b>Flight mode</b>"
+#~ msgstr "<b>��模�</b>"
+
+#~ msgid "<b>WiFi</b>"
+#~ msgstr "<b>WiFi</b>"
+
+#~ msgid "<b>Wired</b>"
+#~ msgstr "<b>æ??ç·?</b>"
+
+#~ msgid "<big><b>Add a new connection</b></big>"
+#~ msgstr "<big><b>æ?°å¢?æ?°ç??é?£ç·?</b></big>"
+
+#~ msgid "<big><b>Networks</b></big>"
+#~ msgstr "<big><b>網路</b></big>"
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..2d10d4b
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1 @@
+network-manager-netbook
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..48805a7
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,45 @@
+NULL=
+
+libexec_PROGRAMS = network-manager-netbook
+
+network_manager_netbook_CPPFLAGS = \
+ $(NMN_CFLAGS) \
+ -I${top_builddir}/marshallers \
+ -I${top_srcdir}/libnm-gtk \
+ -I${top_srcdir}/libnm-gtk/wireless-security \
+ -DUIDIR=\""$(uidir)"\" \
+ -DICON_PATH=\""$(pkgdatadir)/icons/"\" \
+ -DNMNLOCALEDIR=\"$(datadir)/locale\" \
+ -DTHEME_PATH=\""$(pkgdatadir)/theme/"\" \
+ $(NULL)
+
+network_manager_netbook_LDADD = \
+ $(NMN_LIBS) \
+ ${top_builddir}/marshallers/libmarshallers.la \
+ ${top_builddir}/libnm-gtk/libnm-gtk.la \
+ ${top_builddir}/libnm-gtk/wireless-security/libwireless-security.la \
+ $(NULL)
+
+network_manager_netbook_SOURCES = \
+ gtkinfobar.c \
+ gtkinfobar.h \
+ nmn-applet.c \
+ nmn-applet.h \
+ nmn-connection-details.c \
+ nmn-connection-details.h \
+ nmn-gsm-pin-request-renderer.c \
+ nmn-gsm-pin-request-renderer.h \
+ nmn-item-renderer.c \
+ nmn-item-renderer.h \
+ nmn-list.c \
+ nmn-list.h \
+ nmn-model.c \
+ nmn-model.h \
+ nmn-network-renderer.c \
+ nmn-network-renderer.h \
+ nmn-new-connection.c \
+ nmn-new-connection.h \
+ nmn-panel-client.c \
+ nmn-panel-client.h \
+ main.c \
+ $(NULL)
diff --git a/src/gtkinfobar.c b/src/gtkinfobar.c
new file mode 100644
index 0000000..17c10c1
--- /dev/null
+++ b/src/gtkinfobar.c
@@ -0,0 +1,1249 @@
+/*
+ * gtkinfobar.c
+ * This file is part of GTK+
+ *
+ * Copyright (C) 2005 - Paolo Maggi
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the gedit Team, 2005. See the AUTHORS file for a
+ * list of people on the gtk Team.
+ * See the gedit ChangeLog files for a list of changes.
+ *
+ * Modified by the GTK+ team, 2008-2009.
+ */
+
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <glib/gi18n.h>
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+#include "gtkinfobar.h"
+
+
+/**
+ * SECTION:gtkinfobar
+ * @short_description: Report important messages to the user
+ * @include: gtk/gtk.h
+ * @see_also: #GtkStatusbar, #GtkMessageDialog
+ *
+ * #EggInfoBar is a widget that can be used to show messages to
+ * the user without showing a dialog. It is often temporarily shown
+ * at the top or bottom of a document. In contrast to #GtkDialog, which
+ * has a horizontal action area at the bottom, #EggInfoBar has a
+ * vertical action area at the side.
+ *
+ * The API of #EggInfoBar is very similar to #GtkDialog, allowing you
+ * to add buttons to the action area with egg_info_bar_add_button() or
+ * egg_info_bar_new_with_buttons(). The sensitivity of action widgets
+ * can be controlled with egg_info_bar_set_response_sensitive().
+ * To add widgets to the main content area of a #EggInfoBar, use
+ * egg_info_bar_get_content_area() and add your widgets to the container.
+ *
+ * Similar to #GtkMessageDialog, the contents of a #EggInfoBar can by
+ * classified as error message, warning, informational message, etc,
+ * by using egg_info_bar_set_message_type(). GTK+ uses the message type
+ * to determine the background color of the message area.
+ *
+ * <example>
+ * <title>Simple EggInfoBar usage.</title>
+ * <programlisting>
+ * /* set up info bar */
+ * info_bar = egg_info_bar_new ();
+ * gtk_widget_set_no_show_all (info_bar, TRUE);
+ * message_label = gtk_label_new ("");
+ * gtk_widget_show (message_label);
+ * content_area = egg_info_bar_get_content_area (EGG_INFO_BAR (info_bar));
+ * gtk_container_add (GTK_CONTAINER (content_area), message_label);
+ * egg_info_bar_add_button (EGG_INFO_BAR (info_bar),
+ * GTK_STOCK_OK, GTK_RESPONSE_OK);
+ * g_signal_connect (info_bar, "response",
+ * G_CALLBACK (gtk_widget_hide), NULL);
+ * gtk_table_attach (GTK_TABLE (table),
+ * info_bar,
+ * 0, 1, 2, 3,
+ * GTK_EXPAND | GTK_FILL, 0,
+ * 0, 0);
+ *
+ * /* ... */
+ *
+ * /* show an error message */
+ * gtk_label_set_text (GTK_LABEL (message_label), error_message);
+ * egg_info_bar_set_message_type (EGG_INFO_BAR (info_bar),
+ * GTK_MESSAGE_ERROR);
+ * gtk_widget_show (info_bar);
+ * </programlisting>
+ * </example>
+ *
+ * <refsect2 id="EggInfoBar-BUILDER-UI">
+ * <title>EggInfoBar as GtkBuildable</title>
+ * <para>
+ * The EggInfoBar implementation of the GtkBuildable interface exposes
+ * the content area and action area as internal children with the names
+ * "content_area" and "action_area".
+ * </para>
+ * <para>
+ * EggInfoBar supports a custom <action-widgets> element, which
+ * can contain multiple <action-widget> elements. The "response"
+ * attribute specifies a numeric response, and the content of the element
+ * is the id of widget (which should be a child of the dialogs @action_area).
+ * </para>
+ * </refsect2>
+ */
+
+#define EGG_INFO_BAR_GET_PRIVATE(object) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((object), \
+ EGG_TYPE_INFO_BAR, \
+ EggInfoBarPrivate))
+
+enum
+{
+ PROP_0,
+ PROP_MESSAGE_TYPE
+};
+
+struct _EggInfoBarPrivate
+{
+ GtkWidget *content_area;
+ GtkWidget *action_area;
+
+ GtkMessageType message_type;
+};
+
+typedef struct _ResponseData ResponseData;
+
+struct _ResponseData
+{
+ gint response_id;
+};
+
+enum
+{
+ RESPONSE,
+ CLOSE,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
+
+static void egg_info_bar_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void egg_info_bar_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void egg_info_bar_style_set (GtkWidget *widget,
+ GtkStyle *prev_style);
+static gboolean egg_info_bar_expose (GtkWidget *widget,
+ GdkEventExpose *event);
+static void egg_info_bar_buildable_interface_init (GtkBuildableIface *iface);
+static GObject *egg_info_bar_buildable_get_internal_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *childname);
+static gboolean egg_info_bar_buildable_custom_tag_start (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ GMarkupParser *parser,
+ gpointer *data);
+static void egg_info_bar_buildable_custom_finished (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ gpointer user_data);
+
+
+G_DEFINE_TYPE_WITH_CODE (EggInfoBar, egg_info_bar, GTK_TYPE_HBOX,
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
+ egg_info_bar_buildable_interface_init))
+
+static void
+egg_info_bar_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ EggInfoBar *info_bar;
+ EggInfoBarPrivate *priv;
+
+ info_bar = EGG_INFO_BAR (object);
+ priv = EGG_INFO_BAR_GET_PRIVATE (info_bar);
+
+ switch (prop_id)
+ {
+ case PROP_MESSAGE_TYPE:
+ egg_info_bar_set_message_type (info_bar, g_value_get_enum (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+egg_info_bar_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ EggInfoBar *info_bar;
+ EggInfoBarPrivate *priv;
+
+ info_bar = EGG_INFO_BAR (object);
+ priv = EGG_INFO_BAR_GET_PRIVATE (info_bar);
+
+ switch (prop_id)
+ {
+ case PROP_MESSAGE_TYPE:
+ g_value_set_enum (value, egg_info_bar_get_message_type (info_bar));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+egg_info_bar_finalize (GObject *object)
+{
+ G_OBJECT_CLASS (egg_info_bar_parent_class)->finalize (object);
+}
+
+static void
+response_data_free (gpointer data)
+{
+ g_slice_free (ResponseData, data);
+}
+
+static ResponseData *
+get_response_data (GtkWidget *widget,
+ gboolean create)
+{
+ ResponseData *ad = g_object_get_data (G_OBJECT (widget),
+ "gtk-info-bar-response-data");
+
+ if (ad == NULL && create)
+ {
+ ad = g_slice_new (ResponseData);
+
+ g_object_set_data_full (G_OBJECT (widget),
+ _("gtk-info-bar-response-data"),
+ ad,
+ response_data_free);
+ }
+
+ return ad;
+}
+
+static GtkWidget *
+find_button (EggInfoBar *info_bar,
+ gint response_id)
+{
+ GList *children, *list;
+ GtkWidget *child = NULL;
+
+ children = gtk_container_get_children (GTK_CONTAINER (info_bar->priv->action_area));
+
+ for (list = children; list; list = list->next)
+ {
+ ResponseData *rd = get_response_data (list->data, FALSE);
+
+ if (rd && rd->response_id == response_id)
+ {
+ child = list->data;
+ break;
+ }
+ }
+
+ g_list_free (children);
+
+ return child;
+}
+
+static void
+egg_info_bar_close (EggInfoBar *info_bar)
+{
+ if (!find_button (info_bar, GTK_RESPONSE_CANCEL))
+ return;
+
+ egg_info_bar_response (EGG_INFO_BAR (info_bar),
+ GTK_RESPONSE_CANCEL);
+}
+
+static gboolean
+egg_info_bar_expose (GtkWidget *widget,
+ GdkEventExpose *event)
+{
+ EggInfoBarPrivate *priv = EGG_INFO_BAR_GET_PRIVATE (widget);
+ const char* type_detail[] = {
+ "infobar-info",
+ "infobar-warning",
+ "infobar-question",
+ "infobar-error",
+ "infobar"
+ };
+
+ if (priv->message_type != GTK_MESSAGE_OTHER)
+ {
+ const char *detail;
+
+ detail = type_detail[priv->message_type];
+
+ gtk_paint_box (widget->style,
+ widget->window,
+ GTK_STATE_NORMAL,
+ GTK_SHADOW_OUT,
+ NULL,
+ widget,
+ detail,
+ widget->allocation.x,
+ widget->allocation.y,
+ widget->allocation.width,
+ widget->allocation.height);
+ }
+
+ if (GTK_WIDGET_CLASS (egg_info_bar_parent_class)->expose_event)
+ GTK_WIDGET_CLASS (egg_info_bar_parent_class)->expose_event (widget, event);
+
+ return FALSE;
+}
+
+static void
+egg_info_bar_class_init (EggInfoBarClass *klass)
+{
+ GtkWidgetClass *widget_class;
+ GObjectClass *object_class;
+ GtkBindingSet *binding_set;
+
+ widget_class = GTK_WIDGET_CLASS (klass);
+ object_class = G_OBJECT_CLASS (klass);
+
+ object_class->get_property = egg_info_bar_get_property;
+ object_class->set_property = egg_info_bar_set_property;
+ object_class->finalize = egg_info_bar_finalize;
+
+ widget_class->style_set = egg_info_bar_style_set;
+ widget_class->expose_event = egg_info_bar_expose;
+
+ klass->close = egg_info_bar_close;
+
+ /**
+ * EggInfoBar:message-type:
+ *
+ * The type of the message.
+ *
+ * The type is used to determine the colors to use in the info bar.
+ * The following symbolic color names can by used to customize
+ * these colors:
+ * "info_fg_color", "info_bg_color",
+ * "warning_fg_color", "warning_bg_color",
+ * "question_fg_color", "question_bg_color",
+ * "error_fg_color", "error_bg_color".
+ * "other_fg_color", "other_bg_color".
+ *
+ * If the type is #GTK_MESSAGE_OTHER, no info bar is painted but the
+ * colors are still set.
+ *
+ * Since: 2.18
+ */
+ g_object_class_install_property (object_class,
+ PROP_MESSAGE_TYPE,
+ g_param_spec_enum ("message-type",
+ _("Message Type"),
+ _("The type of message"),
+ GTK_TYPE_MESSAGE_TYPE,
+ GTK_MESSAGE_INFO,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ /**
+ * EggInfoBar::response:
+ * @info_bar: the object on which the signal is emitted
+ * @response_id: the response ID
+ *
+ * Emitted when an action widget is clicked or the application programmer
+ * calls gtk_dialog_response(). The @response_id depends on which action
+ * widget was clicked.
+ *
+ * Since: 2.18
+ */
+ signals[RESPONSE] = g_signal_new ("response",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EggInfoBarClass, response),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__INT,
+ G_TYPE_NONE, 1,
+ G_TYPE_INT);
+
+ /**
+ * EggInfoBar::close:
+ *
+ * The ::close signal is a
+ * <link linkend="keybinding-signals">keybinding signal</link>
+ * which gets emitted when the user uses a keybinding to dismiss
+ * the info bar.
+ *
+ * The default binding for this signal is the Escape key.
+ *
+ * Since: 2.18
+ */
+ signals[CLOSE] = g_signal_new ("close",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (EggInfoBarClass, close),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ /**
+ * EggInfoBar:content-area-border:
+ *
+ * The width of the border around the content
+ * content area of the info bar.
+ *
+ * Since: 2.18
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("content-area-border",
+ _("Content area border"),
+ _("Width of border around the content area"),
+ 0,
+ G_MAXINT,
+ 8,
+ G_PARAM_READABLE));
+
+ /**
+ * EggInfoBar:content-area-spacing:
+ *
+ * The default spacing used between elements of the
+ * content area of the info bar.
+ *
+ * Since: 2.18
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("content-area-spacing",
+ _("Content area spacing"),
+ _("Spacing between elements of the area"),
+ 0,
+ G_MAXINT,
+ 16,
+ G_PARAM_READABLE));
+
+ /**
+ * EggInfoBar:button-spacing:
+ *
+ * Spacing between buttons in the action area of the info bar.
+ *
+ * Since: 2.18
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("button-spacing",
+ _("Button spacing"),
+ _("Spacing between buttons"),
+ 0,
+ G_MAXINT,
+ 6,
+ G_PARAM_READABLE));
+
+ /**
+ * EggInfoBar:action-area-border:
+ *
+ * Width of the border around the action area of the info bar.
+ *
+ * Since: 2.18
+ */
+ gtk_widget_class_install_style_property (widget_class,
+ g_param_spec_int ("action-area-border",
+ _("Action area border"),
+ _("Width of border around the action area"),
+ 0,
+ G_MAXINT,
+ 5,
+ G_PARAM_READABLE));
+
+ binding_set = gtk_binding_set_by_class (klass);
+
+ gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0, "close", 0);
+
+ g_type_class_add_private (object_class, sizeof (EggInfoBarPrivate));
+}
+
+static void
+egg_info_bar_update_colors (EggInfoBar *info_bar)
+{
+ GtkWidget *widget = (GtkWidget*)info_bar;
+ EggInfoBarPrivate *priv;
+ GdkColor info_default_border_color = { 0, 0xb800, 0xad00, 0x9d00 };
+ GdkColor info_default_fill_color = { 0, 0xff00, 0xff00, 0xbf00 };
+ GdkColor warning_default_border_color = { 0, 0xb000, 0x7a00, 0x2b00 };
+ GdkColor warning_default_fill_color = { 0, 0xfc00, 0xaf00, 0x3e00 };
+ GdkColor question_default_border_color = { 0, 0x6200, 0x7b00, 0xd960 };
+ GdkColor question_default_fill_color = { 0, 0x8c00, 0xb000, 0xd700 };
+ GdkColor error_default_border_color = { 0, 0xa800, 0x2700, 0x2700 };
+ GdkColor error_default_fill_color = { 0, 0xf000, 0x3800, 0x3800 };
+ GdkColor other_default_border_color = { 0, 0xb800, 0xad00, 0x9d00 };
+ GdkColor other_default_fill_color = { 0, 0xff00, 0xff00, 0xbf00 };
+ GdkColor *fg, *bg;
+ GdkColor sym_fg, sym_bg;
+ GtkStyle *style;
+ const char* fg_color_name[] = {
+ "info_fg_color",
+ "warning_fg_color",
+ "question_fg_color",
+ "error_fg_color",
+ "other_fg_color"
+ };
+ const char* bg_color_name[] = {
+ "info_bg_color",
+ "warning_bg_color",
+ "question_bg_color",
+ "error_bg_color",
+ "other_bg_color"
+ };
+
+ priv = EGG_INFO_BAR_GET_PRIVATE (info_bar);
+ style = gtk_widget_get_style (widget);
+
+ if (gtk_style_lookup_color (style, fg_color_name[priv->message_type], &sym_fg) &&
+ gtk_style_lookup_color (style, bg_color_name[priv->message_type], &sym_bg))
+ {
+ fg = &sym_fg;
+ bg = &sym_bg;
+ }
+ else
+ {
+ switch (priv->message_type)
+ {
+ case GTK_MESSAGE_INFO:
+ fg = &info_default_border_color;
+ bg = &info_default_fill_color;
+ break;
+
+ case GTK_MESSAGE_WARNING:
+ fg = &warning_default_border_color;
+ bg = &warning_default_fill_color;
+ break;
+
+ case GTK_MESSAGE_QUESTION:
+ fg = &question_default_border_color;
+ bg = &question_default_fill_color;
+ break;
+
+ case GTK_MESSAGE_ERROR:
+ fg = &error_default_border_color;
+ bg = &error_default_fill_color;
+ break;
+
+ case GTK_MESSAGE_OTHER:
+ fg = &other_default_border_color;
+ bg = &other_default_fill_color;
+ break;
+
+ default:
+ g_assert_not_reached();
+ fg = NULL;
+ bg = NULL;
+ }
+ }
+
+ if (!gdk_color_equal (bg, &widget->style->bg[GTK_STATE_NORMAL]))
+ gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, bg);
+ if (!gdk_color_equal (fg, &widget->style->fg[GTK_STATE_NORMAL]))
+ gtk_widget_modify_fg (widget, GTK_STATE_NORMAL, fg);
+}
+
+static void
+egg_info_bar_style_set (GtkWidget *widget,
+ GtkStyle *prev_style)
+{
+ EggInfoBar *info_bar = EGG_INFO_BAR (widget);
+ gint button_spacing;
+ gint action_area_border;
+ gint content_area_spacing;
+ gint content_area_border;
+
+ gtk_widget_style_get (widget,
+ "button-spacing", &button_spacing,
+ "action-area-border", &action_area_border,
+ "content-area-spacing", &content_area_spacing,
+ "content-area-border", &content_area_border,
+ NULL);
+
+ gtk_box_set_spacing (GTK_BOX (info_bar->priv->action_area), button_spacing);
+ gtk_container_set_border_width (GTK_CONTAINER (info_bar->priv->action_area),
+ action_area_border);
+ gtk_box_set_spacing (GTK_BOX (info_bar->priv->content_area), content_area_spacing);
+ gtk_container_set_border_width (GTK_CONTAINER (info_bar->priv->content_area),
+ content_area_border);
+
+ egg_info_bar_update_colors (info_bar);
+}
+
+static void
+egg_info_bar_init (EggInfoBar *info_bar)
+{
+ GtkWidget *content_area;
+ GtkWidget *action_area;
+
+ gtk_widget_push_composite_child ();
+
+ info_bar->priv = EGG_INFO_BAR_GET_PRIVATE (info_bar);
+
+ content_area = gtk_hbox_new (FALSE, 0);
+ gtk_widget_show (content_area);
+ gtk_box_pack_start (GTK_BOX (info_bar), content_area, TRUE, TRUE, 0);
+
+ action_area = gtk_vbutton_box_new ();
+ gtk_widget_show (action_area);
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area), GTK_BUTTONBOX_END);
+ gtk_box_pack_start (GTK_BOX (info_bar), action_area, FALSE, TRUE, 0);
+
+ gtk_widget_set_app_paintable (GTK_WIDGET (info_bar), TRUE);
+ gtk_widget_set_redraw_on_allocate (GTK_WIDGET (info_bar), TRUE);
+
+ info_bar->priv->content_area = content_area;
+ info_bar->priv->action_area = action_area;
+
+ gtk_widget_pop_composite_child ();
+}
+
+static GtkBuildableIface *parent_buildable_iface;
+
+static void
+egg_info_bar_buildable_interface_init (GtkBuildableIface *iface)
+{
+ parent_buildable_iface = g_type_interface_peek_parent (iface);
+ iface->get_internal_child = egg_info_bar_buildable_get_internal_child;
+ iface->custom_tag_start = egg_info_bar_buildable_custom_tag_start;
+ iface->custom_finished = egg_info_bar_buildable_custom_finished;
+}
+
+static GObject *
+egg_info_bar_buildable_get_internal_child (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ const gchar *childname)
+{
+ if (strcmp (childname, "content_area") == 0)
+ return G_OBJECT (EGG_INFO_BAR (buildable)->priv->content_area);
+ else if (strcmp (childname, "action_area") == 0)
+ return G_OBJECT (EGG_INFO_BAR (buildable)->priv->action_area);
+
+ return parent_buildable_iface->get_internal_child (buildable,
+ builder,
+ childname);
+}
+
+static gint
+get_response_for_widget (EggInfoBar *info_bar,
+ GtkWidget *widget)
+{
+ ResponseData *rd;
+
+ rd = get_response_data (widget, FALSE);
+ if (!rd)
+ return GTK_RESPONSE_NONE;
+ else
+ return rd->response_id;
+}
+
+static void
+action_widget_activated (GtkWidget *widget,
+ EggInfoBar *info_bar)
+{
+ gint response_id;
+
+ response_id = get_response_for_widget (info_bar, widget);
+ egg_info_bar_response (info_bar, response_id);
+}
+
+/**
+ * egg_info_bar_add_action_widget:
+ * @info_bar: a #EggInfoBar
+ * @child: an activatable widget
+ * @response_id: response ID for @child
+ *
+ * Add an activatable widget to the action area of a #EggInfoBar,
+ * connecting a signal handler that will emit the #EggInfoBar::response
+ * signal on the message area when the widget is activated. The widget
+ * is appended to the end of the message areas action area.
+ *
+ * Since: 2.18
+ */
+void
+egg_info_bar_add_action_widget (EggInfoBar *info_bar,
+ GtkWidget *child,
+ gint response_id)
+{
+ ResponseData *ad;
+ guint signal_id;
+
+ g_return_if_fail (EGG_IS_INFO_BAR (info_bar));
+ g_return_if_fail (GTK_IS_WIDGET (child));
+
+ ad = get_response_data (child, TRUE);
+
+ ad->response_id = response_id;
+
+ if (GTK_IS_BUTTON (child))
+ signal_id = g_signal_lookup ("clicked", GTK_TYPE_BUTTON);
+ else
+ signal_id = GTK_WIDGET_GET_CLASS (child)->activate_signal;
+
+ if (signal_id)
+ {
+ GClosure *closure;
+
+ closure = g_cclosure_new_object (G_CALLBACK (action_widget_activated),
+ G_OBJECT (info_bar));
+ g_signal_connect_closure_by_id (child, signal_id, 0, closure, FALSE);
+ }
+ else
+ g_warning ("Only 'activatable' widgets can be packed into the action area of a EggInfoBar");
+
+ gtk_box_pack_end (GTK_BOX (info_bar->priv->action_area),
+ child, FALSE, FALSE, 0);
+ if (response_id == GTK_RESPONSE_HELP)
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (info_bar->priv->action_area),
+ child, TRUE);
+}
+
+/**
+ * egg_info_bar_get_action_area:
+ * @info_bar: a #EggInfoBar
+ *
+ * Returns the action area of @info_bar.
+ *
+ * Returns: the action area.
+ *
+ * Since: 2.18
+ */
+GtkWidget*
+egg_info_bar_get_action_area (EggInfoBar *info_bar)
+{
+ g_return_val_if_fail (EGG_IS_INFO_BAR (info_bar), NULL);
+
+ return info_bar->priv->action_area;
+}
+
+/**
+ * egg_info_bar_get_content_area:
+ * @info_bar: a #EggInfoBar
+ *
+ * Returns the content area of @info_bar.
+ *
+ * Returns: the content area.
+ *
+ * Since: 2.18
+ */
+GtkWidget*
+egg_info_bar_get_content_area (EggInfoBar *info_bar)
+{
+ g_return_val_if_fail (EGG_IS_INFO_BAR (info_bar), NULL);
+
+ return info_bar->priv->content_area;
+}
+
+/**
+ * egg_info_bar_add_button:
+ * @info_bar: a #EggInfoBar
+ * @button_text: text of button, or stock ID
+ * @response_id: response ID for the button
+ *
+ * Adds a button with the given text (or a stock button, if button_text
+ * is a stock ID) and sets things up so that clicking the button will emit
+ * the "response" signal with the given response_id. The button is appended
+ * to the end of the info bars's action area. The button widget is
+ * returned, but usually you don't need it.
+ *
+ * Returns: the button widget that was added
+ *
+ * Since: 2.18
+ */
+GtkWidget*
+egg_info_bar_add_button (EggInfoBar *info_bar,
+ const gchar *button_text,
+ gint response_id)
+{
+ GtkWidget *button;
+
+ g_return_val_if_fail (EGG_IS_INFO_BAR (info_bar), NULL);
+ g_return_val_if_fail (button_text != NULL, NULL);
+
+ button = gtk_button_new_from_stock (button_text);
+
+ gtk_widget_set_can_default (button, TRUE);
+
+ gtk_widget_show (button);
+
+ egg_info_bar_add_action_widget (info_bar, button, response_id);
+
+ return button;
+}
+
+static void
+add_buttons_valist (EggInfoBar *info_bar,
+ const gchar *first_button_text,
+ va_list args)
+{
+ const gchar* text;
+ gint response_id;
+
+ g_return_if_fail (EGG_IS_INFO_BAR (info_bar));
+
+ if (first_button_text == NULL)
+ return;
+
+ text = first_button_text;
+ response_id = va_arg (args, gint);
+
+ while (text != NULL)
+ {
+ egg_info_bar_add_button (info_bar, text, response_id);
+
+ text = va_arg (args, gchar*);
+ if (text == NULL)
+ break;
+
+ response_id = va_arg (args, int);
+ }
+}
+
+/**
+ * egg_info_bar_add_buttons:
+ * @info_bar: a #EggInfoBar
+ * @first_button_text: button text or stock ID
+ * @...: response ID for first button, then more text-response_id pairs,
+ * ending with %NULL
+ *
+ * Adds more buttons, same as calling egg_info_bar_add_button()
+ * repeatedly. The variable argument list should be %NULL-terminated
+ * as with egg_info_bar_new_with_buttons(). Each button must have both
+ * text and response ID.
+ *
+ * Since: 2.18
+ */
+void
+egg_info_bar_add_buttons (EggInfoBar *info_bar,
+ const gchar *first_button_text,
+ ...)
+{
+ va_list args;
+
+ va_start (args, first_button_text);
+ add_buttons_valist (info_bar, first_button_text, args);
+ va_end (args);
+}
+
+/**
+ * egg_info_bar_new:
+ *
+ * Creates a new #EggInfoBar object.
+ *
+ * Returns: a new #EggInfoBar object
+ *
+ * Since: 2.18
+ */
+GtkWidget *
+egg_info_bar_new (void)
+{
+ return g_object_new (EGG_TYPE_INFO_BAR, NULL);
+}
+
+/**
+ * egg_info_bar_new_with_buttons:
+ * @first_button_text: (allow-none): stock ID or text to go in first button, or %NULL
+ * @...: response ID for first button, then additional buttons, ending
+ * with %NULL
+ *
+ * Creates a new #EggInfoBar with buttons. Button text/response ID
+ * pairs should be listed, with a %NULL pointer ending the list.
+ * Button text can be either a stock ID such as %GTK_STOCK_OK, or
+ * some arbitrary text. A response ID can be any positive number,
+ * or one of the values in the #GtkResponseType enumeration. If the
+ * user clicks one of these dialog buttons, EggInfoBar will emit
+ * the "response" signal with the corresponding response ID.
+ *
+ * Returns: a new #EggInfoBar
+ */
+GtkWidget*
+egg_info_bar_new_with_buttons (const gchar *first_button_text,
+ ...)
+{
+ EggInfoBar *info_bar;
+ va_list args;
+
+ info_bar = EGG_INFO_BAR (egg_info_bar_new ());
+
+ va_start (args, first_button_text);
+ add_buttons_valist (info_bar, first_button_text, args);
+ va_end (args);
+
+ return GTK_WIDGET (info_bar);
+}
+
+/**
+ * egg_info_bar_set_response_sensitive:
+ * @info_bar: a #EggInfoBar
+ * @response_id: a response ID
+ * @setting: TRUE for sensitive
+ *
+ * Calls gtk_widget_set_sensitive (widget, setting) for each
+ * widget in the info bars's action area with the given response_id.
+ * A convenient way to sensitize/desensitize dialog buttons.
+ *
+ * Since: 2.18
+ */
+void
+egg_info_bar_set_response_sensitive (EggInfoBar *info_bar,
+ gint response_id,
+ gboolean setting)
+{
+ GList *children, *list;
+
+ g_return_if_fail (EGG_IS_INFO_BAR (info_bar));
+
+ children = gtk_container_get_children (GTK_CONTAINER (info_bar->priv->action_area));
+
+ for (list = children; list; list = list->next)
+ {
+ GtkWidget *widget = list->data;
+ ResponseData *rd = get_response_data (widget, FALSE);
+
+ if (rd && rd->response_id == response_id)
+ gtk_widget_set_sensitive (widget, setting);
+ }
+
+ g_list_free (children);
+}
+
+/**
+ * egg_info_bar_set_default_response:
+ * @info_bar: a #EggInfoBar
+ * @response_id: a response ID
+ *
+ * Sets the last widget in the info bar's action area with
+ * the given response_id as the default widget for the dialog.
+ * Pressing "Enter" normally activates the default widget.
+ *
+ * Note that this function currently requires @info_bar to
+ * be added to a widget hierarchy.
+ *
+ * Since: 2.18
+ */
+void
+egg_info_bar_set_default_response (EggInfoBar *info_bar,
+ gint response_id)
+{
+ GList *children, *list;
+
+ g_return_if_fail (EGG_IS_INFO_BAR (info_bar));
+
+ children = gtk_container_get_children (GTK_CONTAINER (info_bar->priv->action_area));
+
+ for (list = children; list; list = list->next)
+ {
+ GtkWidget *widget = list->data;
+ ResponseData *rd = get_response_data (widget, FALSE);
+
+ if (rd && rd->response_id == response_id)
+ gtk_widget_grab_default (widget);
+ }
+
+ g_list_free (children);
+}
+
+/**
+ * egg_info_bar_response:
+ * @info_bar: a #EggInfoBar
+ * @response_id: a response ID
+ *
+ * Emits the 'response' signal with the given @response_id.
+ *
+ * Since: 2.18
+ */
+void
+egg_info_bar_response (EggInfoBar *info_bar,
+ gint response_id)
+{
+ g_return_if_fail (EGG_IS_INFO_BAR (info_bar));
+
+ g_signal_emit (info_bar, signals[RESPONSE], 0, response_id);
+}
+
+typedef struct
+{
+ gchar *widget_name;
+ gchar *response_id;
+} ActionWidgetInfo;
+
+typedef struct
+{
+ EggInfoBar *info_bar;
+ GtkBuilder *builder;
+ GSList *items;
+ gchar *response;
+} ActionWidgetsSubParserData;
+
+static void
+attributes_start_element (GMarkupParseContext *context,
+ const gchar *element_name,
+ const gchar **names,
+ const gchar **values,
+ gpointer user_data,
+ GError **error)
+{
+ ActionWidgetsSubParserData *parser_data = (ActionWidgetsSubParserData*)user_data;
+ guint i;
+
+ if (strcmp (element_name, "action-widget") == 0)
+ {
+ for (i = 0; names[i]; i++)
+ if (strcmp (names[i], "response") == 0)
+ parser_data->response = g_strdup (values[i]);
+ }
+ else if (strcmp (element_name, "action-widgets") == 0)
+ return;
+ else
+ g_warning ("Unsupported tag for EggInfoBar: %s\n", element_name);
+}
+
+static void
+attributes_text_element (GMarkupParseContext *context,
+ const gchar *text,
+ gsize text_len,
+ gpointer user_data,
+ GError **error)
+{
+ ActionWidgetsSubParserData *parser_data = (ActionWidgetsSubParserData*)user_data;
+ ActionWidgetInfo *item;
+
+ if (!parser_data->response)
+ return;
+
+ item = g_new (ActionWidgetInfo, 1);
+ item->widget_name = g_strndup (text, text_len);
+ item->response_id = parser_data->response;
+ parser_data->items = g_slist_prepend (parser_data->items, item);
+ parser_data->response = NULL;
+}
+
+static const GMarkupParser attributes_parser =
+{
+ attributes_start_element,
+ NULL,
+ attributes_text_element,
+};
+
+gboolean
+egg_info_bar_buildable_custom_tag_start (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ GMarkupParser *parser,
+ gpointer *data)
+{
+ ActionWidgetsSubParserData *parser_data;
+
+ if (child)
+ return FALSE;
+
+ if (strcmp (tagname, "action-widgets") == 0)
+ {
+ parser_data = g_slice_new0 (ActionWidgetsSubParserData);
+ parser_data->info_bar = EGG_INFO_BAR (buildable);
+ parser_data->items = NULL;
+
+ *parser = attributes_parser;
+ *data = parser_data;
+ return TRUE;
+ }
+
+ return parent_buildable_iface->custom_tag_start (buildable, builder, child,
+ tagname, parser, data);
+}
+
+static void
+egg_info_bar_buildable_custom_finished (GtkBuildable *buildable,
+ GtkBuilder *builder,
+ GObject *child,
+ const gchar *tagname,
+ gpointer user_data)
+{
+ GSList *l;
+ ActionWidgetsSubParserData *parser_data;
+ GObject *object;
+ EggInfoBar *info_bar;
+ ResponseData *ad;
+ guint signal_id;
+
+ if (strcmp (tagname, "action-widgets"))
+ {
+ parent_buildable_iface->custom_finished (buildable, builder, child,
+ tagname, user_data);
+ return;
+ }
+
+ info_bar = EGG_INFO_BAR (buildable);
+ parser_data = (ActionWidgetsSubParserData*)user_data;
+ parser_data->items = g_slist_reverse (parser_data->items);
+
+ for (l = parser_data->items; l; l = l->next)
+ {
+ ActionWidgetInfo *item = l->data;
+
+ object = gtk_builder_get_object (builder, item->widget_name);
+ if (!object)
+ {
+ g_warning ("Unknown object %s specified in action-widgets of %s",
+ item->widget_name,
+ gtk_buildable_get_name (GTK_BUILDABLE (buildable)));
+ continue;
+ }
+
+ ad = get_response_data (GTK_WIDGET (object), TRUE);
+ ad->response_id = atoi (item->response_id);
+
+ if (GTK_IS_BUTTON (object))
+ signal_id = g_signal_lookup ("clicked", GTK_TYPE_BUTTON);
+ else
+ signal_id = GTK_WIDGET_GET_CLASS (object)->activate_signal;
+
+ if (signal_id)
+ {
+ GClosure *closure;
+
+ closure = g_cclosure_new_object (G_CALLBACK (action_widget_activated),
+ G_OBJECT (info_bar));
+ g_signal_connect_closure_by_id (object,
+ signal_id,
+ 0,
+ closure,
+ FALSE);
+ }
+
+ if (ad->response_id == GTK_RESPONSE_HELP)
+ gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (info_bar->priv->action_area),
+ GTK_WIDGET (object), TRUE);
+
+ g_free (item->widget_name);
+ g_free (item->response_id);
+ g_free (item);
+ }
+ g_slist_free (parser_data->items);
+ g_slice_free (ActionWidgetsSubParserData, parser_data);
+}
+
+/**
+ * egg_info_bar_set_message_type:
+ * @info_bar: a #EggInfoBar
+ * @message_type: a #GtkMessageType
+ *
+ * Sets the message type of the message area.
+ * GTK+ uses this type to determine what color to use
+ * when drawing the message area.
+ *
+ * Since: 2.18
+ */
+void
+egg_info_bar_set_message_type (EggInfoBar *info_bar,
+ GtkMessageType message_type)
+{
+ EggInfoBarPrivate *priv;
+ AtkObject *atk_obj;
+
+ g_return_if_fail (EGG_IS_INFO_BAR (info_bar));
+
+ priv = EGG_INFO_BAR_GET_PRIVATE (info_bar);
+
+ if (priv->message_type != message_type)
+ {
+ priv->message_type = message_type;
+
+ egg_info_bar_update_colors (info_bar);
+ gtk_widget_queue_draw (GTK_WIDGET (info_bar));
+
+ atk_obj = gtk_widget_get_accessible (GTK_WIDGET (info_bar));
+ if (GTK_IS_ACCESSIBLE (atk_obj))
+ {
+ GtkStockItem item;
+ const char *stock_id = NULL;
+
+ atk_object_set_role (atk_obj, ATK_ROLE_ALERT);
+
+ switch (message_type)
+ {
+ case GTK_MESSAGE_INFO:
+ stock_id = GTK_STOCK_DIALOG_INFO;
+ break;
+
+ case GTK_MESSAGE_QUESTION:
+ stock_id = GTK_STOCK_DIALOG_QUESTION;
+ break;
+
+ case GTK_MESSAGE_WARNING:
+ stock_id = GTK_STOCK_DIALOG_WARNING;
+ break;
+
+ case GTK_MESSAGE_ERROR:
+ stock_id = GTK_STOCK_DIALOG_ERROR;
+ break;
+
+ case GTK_MESSAGE_OTHER:
+ break;
+
+ default:
+ g_warning ("Unknown GtkMessageType %u", message_type);
+ break;
+ }
+
+ if (stock_id)
+ {
+ gtk_stock_lookup (stock_id, &item);
+ atk_object_set_name (atk_obj, item.label);
+ }
+ }
+
+ g_object_notify (G_OBJECT (info_bar), "message-type");
+ }
+}
+
+/**
+ * egg_info_bar_get_message_type:
+ * @info_bar: a #EggInfoBar
+ *
+ * Returns the message type of the message area.
+ *
+ * Returns: the message type of the message area.
+ *
+ * Since: 2.18
+ */
+GtkMessageType
+egg_info_bar_get_message_type (EggInfoBar *info_bar)
+{
+ EggInfoBarPrivate *priv;
+
+ g_return_val_if_fail (EGG_IS_INFO_BAR (info_bar), GTK_MESSAGE_OTHER);
+
+ priv = EGG_INFO_BAR_GET_PRIVATE (info_bar);
+
+ return priv->message_type;
+}
diff --git a/src/gtkinfobar.h b/src/gtkinfobar.h
new file mode 100644
index 0000000..abbb792
--- /dev/null
+++ b/src/gtkinfobar.h
@@ -0,0 +1,116 @@
+/*
+ * gtkinfobar.h
+ * This file is part of GTK+
+ *
+ * Copyright (C) 2005 - Paolo Maggi
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Modified by the gedit Team, 2005. See the gedit AUTHORS file for a
+ * list of people on the gedit Team.
+ * See the gedit ChangeLog files for a list of changes.
+ *
+ * Modified by the GTK+ Team, 2008-2009.
+ */
+
+#ifndef __EGG_INFO_BAR_H__
+#define __EGG_INFO_BAR_H__
+
+#include <gtk/gtkhbox.h>
+#include <gtk/gtkenums.h>
+
+G_BEGIN_DECLS
+
+/*
+ * Type checking and casting macros
+ */
+#define EGG_TYPE_INFO_BAR (egg_info_bar_get_type())
+#define EGG_INFO_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), EGG_TYPE_INFO_BAR, EggInfoBar))
+#define EGG_INFO_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), EGG_TYPE_INFO_BAR, EggInfoBarClass))
+#define EGG_IS_INFO_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), EGG_TYPE_INFO_BAR))
+#define EGG_IS_INFO_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_INFO_BAR))
+#define EGG_INFO_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), EGG_TYPE_INFO_BAR, EggInfoBarClass))
+
+
+typedef struct _EggInfoBarPrivate EggInfoBarPrivate;
+typedef struct _EggInfoBarClass EggInfoBarClass;
+typedef struct _EggInfoBar EggInfoBar;
+
+
+struct _EggInfoBar
+{
+ GtkHBox parent;
+
+ /*< private > */
+ EggInfoBarPrivate *priv;
+};
+
+
+struct _EggInfoBarClass
+{
+ GtkHBoxClass parent_class;
+
+ /* Signals */
+ void (* response) (EggInfoBar *info_bar, gint response_id);
+
+ /* Keybinding signals */
+ void (* close) (EggInfoBar *info_bar);
+
+ /* Padding for future expansion */
+ void (*_gtk_reserved1) (void);
+ void (*_gtk_reserved2) (void);
+ void (*_gtk_reserved3) (void);
+ void (*_gtk_reserved4) (void);
+ void (*_gtk_reserved5) (void);
+ void (*_gtk_reserved6) (void);
+};
+
+GType egg_info_bar_get_type (void) G_GNUC_CONST;
+GtkWidget *egg_info_bar_new (void);
+
+GtkWidget *egg_info_bar_new_with_buttons (const gchar *first_button_text,
+ ...);
+
+GtkWidget *egg_info_bar_get_action_area (EggInfoBar *info_bar);
+GtkWidget *egg_info_bar_get_content_area (EggInfoBar *info_bar);
+void egg_info_bar_add_action_widget (EggInfoBar *info_bar,
+ GtkWidget *child,
+ gint response_id);
+GtkWidget *egg_info_bar_add_button (EggInfoBar *info_bar,
+ const gchar *button_text,
+ gint response_id);
+void egg_info_bar_add_buttons (EggInfoBar *info_bar,
+ const gchar *first_button_text,
+ ...);
+void egg_info_bar_set_response_sensitive (EggInfoBar *info_bar,
+ gint response_id,
+ gboolean setting);
+void egg_info_bar_set_default_response (EggInfoBar *info_bar,
+ gint response_id);
+
+/* Emit response signal */
+void egg_info_bar_response (EggInfoBar *info_bar,
+ gint response_id);
+
+void egg_info_bar_set_message_type (EggInfoBar *info_bar,
+ GtkMessageType message_type);
+GtkMessageType egg_info_bar_get_message_type (EggInfoBar *info_bar);
+
+G_END_DECLS
+
+#endif /* __EGG_INFO_BAR_H__ */
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..162dd66
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,142 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <glib/gi18n.h>
+#include <gtk/gtk.h>
+#include "nmn-applet.h"
+#include "nm-status-model.h"
+#include "nm-icon-cache.h"
+#include "nm-status-icon.h"
+#include "nmn-panel-client.h"
+
+static void
+panel_client_show (MplPanelClient *panel_client,
+ gpointer user_data)
+{
+ nmn_applet_show (NMN_APPLET (user_data));
+}
+
+static void
+panel_client_hide (MplPanelClient *panel_client,
+ gpointer user_data)
+{
+ nmn_applet_hide (NMN_APPLET (user_data));
+}
+
+static void
+dialog_done_cb (gpointer user_data)
+{
+ mpl_panel_client_request_focus (MPL_PANEL_CLIENT (user_data));
+}
+
+static void
+status_icon_activated (GtkStatusIcon *status_icon,
+ gpointer user_data)
+{
+ gtk_widget_show (GTK_WIDGET (user_data));
+}
+
+int
+main (int argc, char *argv[])
+{
+ NmnModel *model;
+ NmnApplet *applet;
+ GtkWidget *container;
+ gboolean standalone = FALSE;
+ gboolean desktop = FALSE;
+ GError *error = NULL;
+ GOptionEntry entries[] = {
+ { "standalone", 's', 0, G_OPTION_ARG_NONE, &standalone, _("Run in standalone mode"), NULL },
+ { "desktop", 'd', 0, G_OPTION_ARG_NONE, &desktop, _("Run in desktop mode"), NULL },
+ { NULL }
+ };
+
+ bindtextdomain (GETTEXT_PACKAGE, NMNLOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+
+ g_set_application_name (_("NetworkManager Netbook"));
+ gtk_init_with_args (&argc, &argv, _("- NetworkManager Netbook"),
+ entries, GETTEXT_PACKAGE, &error);
+
+ if (error) {
+ g_printerr ("%s\n", error->message);
+ g_error_free (error);
+ return 1;
+ }
+
+ model = nmn_model_new ();
+ applet = nmn_applet_new (model);
+
+ if (standalone) {
+ container = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ g_signal_connect (container, "delete-event", (GCallback) gtk_main_quit, NULL);
+ gtk_widget_set_size_request (container, 800, -1);
+ gtk_widget_show (container);
+ } else if (desktop) {
+ NMStatusModel *status_model;
+ GtkStatusIcon *status_icon;
+
+ status_model = NM_STATUS_MODEL (nm_status_model_new (GTK_TREE_MODEL (model)));
+ status_icon = nm_status_icon_new (status_model);
+ g_object_unref (status_model);
+
+ container = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ g_signal_connect (status_icon, "activate", G_CALLBACK (status_icon_activated), container);
+ g_signal_connect (container, "delete-event", (GCallback) gtk_widget_hide, NULL);
+ gtk_widget_set_size_request (container, 800, -1);
+ } else {
+ NMStatusModel *status_model;
+ NmnPanelClient *panel_client;
+
+ /* Force to the moblin theme */
+ gtk_settings_set_string_property (gtk_settings_get_default (),
+ "gtk-theme-name",
+ "Moblin-Netbook",
+ NULL);
+
+ status_model = NM_STATUS_MODEL (nm_status_model_new (GTK_TREE_MODEL (model)));
+ panel_client = nmn_panel_client_new (status_model);
+ g_object_unref (status_model);
+
+ if (!panel_client)
+ g_error ("Moblin panel client intialization failed.");
+
+ g_signal_connect (panel_client, "show-begin", G_CALLBACK (panel_client_show), applet);
+ g_signal_connect (panel_client, "show-end", G_CALLBACK (panel_client_hide), applet);
+ nm_utils_set_dialog_done_cb (dialog_done_cb, panel_client);
+
+ container = mpl_panel_gtk_get_window (MPL_PANEL_GTK (panel_client));
+ gtk_widget_modify_bg (container, GTK_STATE_NORMAL, >k_widget_get_style (container)->white);
+ gtk_widget_show (container);
+ }
+
+ gtk_widget_show (GTK_WIDGET (applet));
+ gtk_container_add (GTK_CONTAINER (container), GTK_WIDGET (applet));
+
+ gtk_main ();
+ g_object_unref (model);
+ nm_icon_cache_invalidate ();
+
+ return 0;
+}
diff --git a/src/nmn-applet.c b/src/nmn-applet.c
new file mode 100644
index 0000000..644538d
--- /dev/null
+++ b/src/nmn-applet.c
@@ -0,0 +1,664 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <nbtk/nbtk-gtk.h>
+#include <nm-device-ethernet.h>
+#include <nm-device-wifi.h>
+#include <nm-serial-device.h>
+#include <nm-device-bt.h>
+#include "nmn-applet.h"
+#include "nmn-new-connection.h"
+
+#include "nmn-model.h"
+#include "nmn-list.h"
+
+G_DEFINE_TYPE (NmnApplet, nmn_applet, GTK_TYPE_NOTEBOOK)
+
+enum {
+ PROP_0,
+ PROP_MODEL,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NMN_TYPE_APPLET, NmnAppletPrivate))
+
+typedef struct {
+ NmnModel *model;
+
+ GtkWidget *pane;
+ GtkWidget *list;
+
+ GtkWidget *switches_table;
+ GtkWidget *enable_wifi_label;
+ GtkWidget *enable_wifi;
+ GtkWidget *enable_ethernet_label;
+ GtkWidget *enable_ethernet;
+ GtkWidget *enable_3g_label;
+ GtkWidget *enable_3g;
+ GtkWidget *enable_wimax_label;
+ GtkWidget *enable_wimax;
+ GtkWidget *enable_bt_label;
+ GtkWidget *enable_bt;
+ GtkWidget *enable_network;
+ GtkWidget *add_new_connection;
+
+ GtkWidget *new_dialog;
+
+ gboolean network_list_populated;
+
+ gboolean disposed;
+} NmnAppletPrivate;
+
+enum {
+ PAGE_NETWORKS = 0,
+ PAGE_ADD_CONNECTION = 1,
+};
+
+enum {
+ SWITCHES_ROW_WIFI = 0,
+ SWITCHES_ROW_ETHERNET = 1,
+ SWITCHES_ROW_3G = 2,
+ SWITCHES_ROW_WIMAX = 3,
+ SWITCHES_ROW_BT = 4
+};
+
+static void add_new_connection_hide (GtkWidget *widget, gpointer user_data);
+static void wifi_toggle_set_sensitive (NmnModel *model, GtkWidget *widget, gboolean suggested);
+
+NmnApplet *
+nmn_applet_new (NmnModel *model)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (model), NULL);
+
+ return NMN_APPLET (g_object_new (NMN_TYPE_APPLET,
+ NMN_APPLET_MODEL, model,
+ NULL));
+}
+
+static void
+update_switches_visibility (NmnApplet *applet)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (applet);
+ GtkTable *table;
+ gboolean visible;
+ int ethernet;
+ int wifi;
+ int modem;
+ int wimax;
+ int bt;
+
+ ethernet = wifi = modem = wimax = bt = 0;
+
+ if (!nmn_model_offline_mode_get_active (priv->model)) {
+ const GPtrArray *devices;
+ int i;
+
+ devices = nm_client_get_devices (nmn_model_get_client (priv->model));
+ for (i = 0; devices && i < devices->len; i++) {
+ NMDevice *device = NM_DEVICE (g_ptr_array_index (devices, i));
+
+ if (NM_IS_DEVICE_ETHERNET (device))
+ ethernet++;
+ else if (NM_IS_DEVICE_WIFI (device))
+ wifi++;
+ else if (NM_IS_SERIAL_DEVICE (device))
+ modem++;
+ else if (NM_IS_DEVICE_BT (device))
+ bt++;
+ }
+ }
+
+ table = GTK_TABLE (priv->switches_table);
+
+ visible = wifi > 0;
+ gtk_table_set_row_spacing (table, SWITCHES_ROW_WIFI, visible ? 6 : 0);
+ g_object_set (priv->enable_wifi_label, "visible", visible, NULL);
+ g_object_set (priv->enable_wifi, "visible", visible, NULL);
+
+ visible = ethernet > 0;
+ gtk_table_set_row_spacing (table, SWITCHES_ROW_ETHERNET, visible ? 6 : 0);
+ g_object_set (priv->enable_ethernet_label, "visible", visible, NULL);
+ g_object_set (priv->enable_ethernet, "visible", visible, NULL);
+
+ visible = modem > 0;
+ gtk_table_set_row_spacing (table, SWITCHES_ROW_3G, visible ? 6 : 0);
+ g_object_set (priv->enable_3g_label, "visible", visible, NULL);
+ g_object_set (priv->enable_3g, "visible", visible, NULL);
+
+ visible = wimax > 0;
+ gtk_table_set_row_spacing (table, SWITCHES_ROW_WIMAX, visible ? 6 : 0);
+ g_object_set (priv->enable_wimax_label, "visible", visible, NULL);
+ g_object_set (priv->enable_wimax, "visible", visible, NULL);
+
+ visible = bt > 0;
+ gtk_table_set_row_spacing (table, SWITCHES_ROW_BT, visible ? 6 : 0);
+ g_object_set (priv->enable_bt_label, "visible", visible, NULL);
+ g_object_set (priv->enable_bt, "visible", visible, NULL);
+}
+
+void
+nmn_applet_show (NmnApplet *applet)
+{
+}
+
+void
+nmn_applet_hide (NmnApplet *applet)
+{
+ add_new_connection_hide (NULL, applet);
+}
+
+/* enable/disable wifi button */
+
+static void
+enable_wifi_toggled (NbtkGtkLightSwitch *w,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ nmn_model_wifi_toggled (priv->model, active);
+}
+
+static void
+wifi_toggle_set_sensitive (NmnModel *model,
+ GtkWidget *widget,
+ gboolean suggested)
+{
+ if (suggested == FALSE || nmn_model_wifi_can_change (model) == FALSE)
+ gtk_widget_set_sensitive (widget, FALSE);
+ else
+ gtk_widget_set_sensitive (widget, TRUE);
+}
+
+static void
+wifi_toggled (NmnModel *model,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ g_signal_handlers_block_by_func (priv->model, enable_wifi_toggled, user_data);
+ nbtk_gtk_light_switch_set_active (NBTK_GTK_LIGHT_SWITCH (priv->enable_wifi), active);
+ g_signal_handlers_unblock_by_func (priv->model, enable_wifi_toggled, user_data);
+
+ wifi_toggle_set_sensitive (priv->model, priv->enable_wifi, TRUE);
+}
+
+static void
+enable_wifi_setup (NmnApplet *applet)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (applet);
+
+ g_signal_connect (priv->enable_wifi, "switch-flipped", G_CALLBACK (enable_wifi_toggled), applet);
+ gtk_widget_show (priv->enable_wifi);
+
+ g_signal_connect (priv->model, "wifi-toggled", G_CALLBACK (wifi_toggled), applet);
+ wifi_toggled (priv->model, nmn_model_wifi_get_active (priv->model), applet);
+}
+
+/* enable/disable ethernet button */
+
+static void
+enable_ethernet_toggled (NbtkGtkLightSwitch *w,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ nmn_model_ethernet_toggled (priv->model, active);
+}
+
+static void
+ethernet_toggled (NmnModel *model,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ g_signal_handlers_block_by_func (priv->model, enable_ethernet_toggled, user_data);
+ nbtk_gtk_light_switch_set_active (NBTK_GTK_LIGHT_SWITCH (priv->enable_ethernet), active);
+ g_signal_handlers_unblock_by_func (priv->model, enable_ethernet_toggled, user_data);
+}
+
+static void
+enable_ethernet_setup (NmnApplet *applet)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (applet);
+
+ g_signal_connect (priv->enable_ethernet, "switch-flipped", G_CALLBACK (enable_ethernet_toggled), applet);
+ gtk_widget_show (priv->enable_ethernet);
+
+ g_signal_connect (priv->model, "ethernet-toggled", G_CALLBACK (ethernet_toggled), applet);
+ ethernet_toggled (priv->model, nmn_model_ethernet_get_active (priv->model), applet);
+}
+
+/* enable/disable 3G button */
+
+static void
+enable_3g_toggled (NbtkGtkLightSwitch *w,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ nmn_model_modems_toggled (priv->model, active);
+}
+
+static void
+modems_toggled (NmnModel *model,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ g_signal_handlers_block_by_func (priv->model, enable_3g_toggled, user_data);
+ nbtk_gtk_light_switch_set_active (NBTK_GTK_LIGHT_SWITCH (priv->enable_3g), active);
+ g_signal_handlers_unblock_by_func (priv->model, enable_3g_toggled, user_data);
+}
+
+static void
+enable_3g_setup (NmnApplet *applet)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (applet);
+
+ g_signal_connect (priv->enable_3g, "switch-flipped", G_CALLBACK (enable_3g_toggled), applet);
+ gtk_widget_show (priv->enable_3g);
+
+ g_signal_connect (priv->model, "modems-toggled", G_CALLBACK (modems_toggled), applet);
+ modems_toggled (priv->model, nmn_model_modems_get_active (priv->model), applet);
+}
+
+/* enable/disable Bluetooth button */
+
+static void
+enable_bt_toggled (NbtkGtkLightSwitch *w,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ nmn_model_bt_toggled (priv->model, active);
+}
+
+static void
+bt_toggled (NmnModel *model,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ g_signal_handlers_block_by_func (priv->model, enable_bt_toggled, user_data);
+ nbtk_gtk_light_switch_set_active (NBTK_GTK_LIGHT_SWITCH (priv->enable_bt), active);
+ g_signal_handlers_unblock_by_func (priv->model, enable_bt_toggled, user_data);
+}
+
+static void
+enable_bt_setup (NmnApplet *applet)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (applet);
+
+ g_signal_connect (priv->enable_bt, "switch-flipped", G_CALLBACK (enable_bt_toggled), applet);
+ gtk_widget_show (priv->enable_bt);
+
+ g_signal_connect (priv->model, "bt-toggled", G_CALLBACK (bt_toggled), applet);
+ bt_toggled (priv->model, nmn_model_bt_get_active (priv->model), applet);
+}
+
+/* enable/disable Offline mode button */
+
+static void
+enable_network_toggled (NbtkGtkLightSwitch *w,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ nmn_model_offline_mode_toggled (priv->model, active);
+}
+
+static void
+offline_toggled (NmnModel *model,
+ gboolean active,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ g_signal_handlers_block_by_func (priv->model, enable_network_toggled, user_data);
+ nbtk_gtk_light_switch_set_active (NBTK_GTK_LIGHT_SWITCH (priv->enable_network), active);
+ g_signal_handlers_unblock_by_func (priv->model, enable_network_toggled, user_data);
+
+ update_switches_visibility (NMN_APPLET (user_data));
+}
+
+static void
+enable_network_setup (NmnApplet *applet)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (applet);
+
+ g_signal_connect (priv->enable_network, "switch-flipped", G_CALLBACK (enable_network_toggled), applet);
+ gtk_widget_show (priv->enable_network);
+
+ g_signal_connect (priv->model, "offline-mode-toggled", G_CALLBACK (offline_toggled), applet);
+ offline_toggled (priv->model, nmn_model_offline_mode_get_active (priv->model), applet);
+}
+
+static void
+add_new_connection_show (GtkButton *button,
+ gpointer user_data)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (user_data);
+
+ nmn_new_connection_update (NMN_NEW_CONNECTION (priv->new_dialog));
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (user_data), PAGE_ADD_CONNECTION);
+}
+
+static void
+add_new_connection_hide (GtkWidget *widget,
+ gpointer user_data)
+{
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (user_data), PAGE_NETWORKS);
+}
+
+/* add new connection button */
+
+static void
+add_new_connection_setup (NmnApplet *applet)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (applet);
+
+ priv->new_dialog = nmn_new_connection_create (priv->model);
+ gtk_notebook_append_page (GTK_NOTEBOOK (applet), priv->new_dialog, NULL);
+ gtk_widget_modify_bg (priv->new_dialog, GTK_STATE_NORMAL, >k_widget_get_style (priv->new_dialog)->white);
+ g_signal_connect (priv->new_dialog, "close", G_CALLBACK (add_new_connection_hide), applet);
+ g_signal_connect (priv->add_new_connection, "clicked", G_CALLBACK (add_new_connection_show), applet);
+}
+
+static gboolean
+devices_changed_cb (gpointer user_data)
+{
+ update_switches_visibility (NMN_APPLET (user_data));
+ return FALSE;
+}
+
+static void
+devices_changed (NMClient *client,
+ NMDevice *device,
+ gpointer user_data)
+{
+ /* Do it in the idle handler, otherwise the client still has the device
+ which is being removed here */
+ g_idle_add (devices_changed_cb, user_data);
+}
+
+static void
+nmn_applet_init (NmnApplet *applet)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (applet);
+ GtkWidget *w;
+ GtkWidget *vbox;
+ GtkWidget *frame;
+ GtkWidget *table;
+ const char *markup_str;
+ char *label;
+
+ gtk_notebook_set_show_tabs (GTK_NOTEBOOK (applet), FALSE);
+
+ priv->pane = gtk_hbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (priv->pane), 6);
+ gtk_notebook_append_page (GTK_NOTEBOOK (applet), priv->pane, NULL);
+
+ /* left side (Networks list, add new connection button) */
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (priv->pane), vbox, TRUE, TRUE, 0);
+
+ frame = nbtk_gtk_frame_new ();
+ gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
+
+ priv->add_new_connection = gtk_button_new_with_label (_("Add new connection"));
+ gtk_box_pack_start (GTK_BOX (vbox), priv->add_new_connection, FALSE, FALSE, 0);
+
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_container_add (GTK_CONTAINER (frame), vbox);
+
+ label = g_strdup_printf ("<span font_desc=\"Sans Bold 18\" foreground=\"#3e3e3e\">%s</span>", _("Networks"));
+ w = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (w), label);
+ g_free (label);
+ gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5);
+ gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0);
+
+ w = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (w), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ priv->list = nmn_list_new ();
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (w), priv->list);
+ gtk_widget_show (priv->list);
+ gtk_box_pack_start (GTK_BOX (vbox), w, TRUE, TRUE, 0);
+
+
+ /* Right side, switches */
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (priv->pane), vbox, FALSE, FALSE, 0);
+
+ frame = nbtk_gtk_frame_new ();
+ gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
+
+ w = gtk_vbox_new (FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (frame), w);
+
+ table = gtk_table_new (5, 2, FALSE);
+ priv->switches_table = table;
+ gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (table), 6);
+ gtk_box_pack_start (GTK_BOX (w), table, FALSE, FALSE, 0);
+
+ markup_str = "<span font_desc=\"Sans Bold 12\" foreground=\"#3e3e3e\">%s</span>";
+
+ w = gtk_label_new (NULL);
+ label = g_strdup_printf (markup_str, _("WiFi"));
+ gtk_label_set_markup (GTK_LABEL (w), label);
+ g_free (label);
+ priv->enable_wifi_label = w;
+ gtk_misc_set_alignment (GTK_MISC (w), 0.2, 0.5);
+ gtk_table_attach_defaults (GTK_TABLE (table), w, 0, 1, SWITCHES_ROW_WIFI, SWITCHES_ROW_WIFI + 1);
+ priv->enable_wifi = nbtk_gtk_light_switch_new ();
+ gtk_table_attach_defaults (GTK_TABLE (table), priv->enable_wifi, 1, 2,
+ SWITCHES_ROW_WIFI, SWITCHES_ROW_WIFI + 1);
+
+ w = gtk_label_new (NULL);
+ label = g_strdup_printf (markup_str, _("Wired"));
+ gtk_label_set_markup (GTK_LABEL (w), label);
+ g_free (label);
+ priv->enable_ethernet_label = w;
+ gtk_misc_set_alignment (GTK_MISC (w), 0.2, 0.5);
+ gtk_table_attach_defaults (GTK_TABLE (table), w, 0, 1, SWITCHES_ROW_ETHERNET, SWITCHES_ROW_ETHERNET + 1);
+ priv->enable_ethernet = nbtk_gtk_light_switch_new ();
+ gtk_table_attach_defaults (GTK_TABLE (table), priv->enable_ethernet, 1, 2,
+ SWITCHES_ROW_ETHERNET, SWITCHES_ROW_ETHERNET + 1);
+
+ w = gtk_label_new (NULL);
+ label = g_strdup_printf (markup_str, _("3G"));
+ gtk_label_set_markup (GTK_LABEL (w), label);
+ g_free (label);
+ priv->enable_3g_label = w;
+ gtk_misc_set_alignment (GTK_MISC (w), 0.2, 0.5);
+ gtk_table_attach_defaults (GTK_TABLE (table), w, 0, 1, SWITCHES_ROW_3G, SWITCHES_ROW_3G + 1);
+ priv->enable_3g = nbtk_gtk_light_switch_new ();
+ gtk_table_attach_defaults (GTK_TABLE (table), priv->enable_3g, 1, 2,
+ SWITCHES_ROW_3G, SWITCHES_ROW_3G + 1);
+
+
+ w = gtk_label_new (NULL);
+ label = g_strdup_printf (markup_str, _("WiMAX"));
+ gtk_label_set_markup (GTK_LABEL (w), label);
+ g_free (label);
+ priv->enable_wimax_label = w;
+ gtk_misc_set_alignment (GTK_MISC (w), 0.2, 0.5);
+ gtk_table_attach_defaults (GTK_TABLE (table), w, 0, 1, SWITCHES_ROW_WIMAX, SWITCHES_ROW_WIMAX + 1);
+ priv->enable_wimax = nbtk_gtk_light_switch_new ();
+ gtk_table_attach_defaults (GTK_TABLE (table), priv->enable_wimax, 1, 2,
+ SWITCHES_ROW_WIMAX, SWITCHES_ROW_WIMAX + 1);
+
+ w = gtk_label_new (NULL);
+ label = g_strdup_printf (markup_str, _("Bluetooth"));
+ gtk_label_set_markup (GTK_LABEL (w), label);
+ g_free (label);
+ priv->enable_bt_label = w;
+ gtk_misc_set_alignment (GTK_MISC (w), 0.2, 0.5);
+ gtk_table_attach_defaults (GTK_TABLE (table), w, 0, 1, SWITCHES_ROW_BT, SWITCHES_ROW_BT + 1);
+ priv->enable_bt = nbtk_gtk_light_switch_new ();
+ gtk_table_attach_defaults (GTK_TABLE (table), priv->enable_bt, 1, 2,
+ SWITCHES_ROW_BT, SWITCHES_ROW_BT + 1);
+
+ frame = nbtk_gtk_frame_new ();
+ gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
+
+ table = gtk_table_new (2, 2, TRUE);
+ gtk_container_add (GTK_CONTAINER (frame), table);
+
+ w = gtk_label_new (NULL);
+ label = g_strdup_printf (markup_str, _("Offline mode"));
+ gtk_label_set_markup (GTK_LABEL (w), label);
+ g_free (label);
+ gtk_misc_set_alignment (GTK_MISC (w), 0.2, 0.5);
+ gtk_table_attach_defaults (GTK_TABLE (table), w, 0, 1, 0, 1);
+ priv->enable_network = nbtk_gtk_light_switch_new ();
+ gtk_table_attach_defaults (GTK_TABLE (table), priv->enable_network, 1, 2, 0, 1);
+
+ w = gtk_label_new (_("This will disable all your connections"));
+ gtk_table_attach_defaults (GTK_TABLE (table), w, 0, 2, 1, 2);
+
+ gtk_widget_show_all (priv->pane);
+}
+
+static GObject*
+constructor (GType type,
+ guint n_construct_params,
+ GObjectConstructParam *construct_params)
+{
+ GObject *object;
+ NmnApplet *applet;
+ NmnAppletPrivate *priv;
+ NMClient *client;
+
+ object = G_OBJECT_CLASS (nmn_applet_parent_class)->constructor
+ (type, n_construct_params, construct_params);
+
+ if (!object)
+ return NULL;
+
+ applet = NMN_APPLET (object);
+ priv = GET_PRIVATE (applet);
+
+ if (!priv->model) {
+ g_warning ("Missing constructor arguments");
+ g_object_unref (object);
+ return NULL;
+ }
+
+ nmn_list_set_model (NMN_LIST (priv->list), GTK_TREE_MODEL (priv->model));
+ enable_wifi_setup (applet);
+ enable_ethernet_setup (applet);
+ enable_3g_setup (applet);
+ enable_bt_setup (applet);
+ enable_network_setup (applet);
+ add_new_connection_setup (applet);
+ add_new_connection_hide (NULL, applet);
+
+ client = nmn_model_get_client (priv->model);
+ g_signal_connect (client, "device-added", G_CALLBACK (devices_changed), applet);
+ g_signal_connect (client, "device-removed", G_CALLBACK (devices_changed), applet);
+ update_switches_visibility (applet);
+
+ return object;
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_MODEL:
+ /* Construct only */
+ priv->model = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_MODEL:
+ g_value_set_object (value, priv->model);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NmnAppletPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ if (priv->model) {
+ g_signal_handlers_disconnect_by_func (nmn_model_get_client (priv->model), devices_changed, object);
+ g_object_unref (priv->model);
+ }
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nmn_applet_parent_class)->dispose (object);
+}
+
+static void
+nmn_applet_class_init (NmnAppletClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ g_type_class_add_private (object_class, sizeof (NmnAppletPrivate));
+
+ object_class->constructor = constructor;
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ /* properties */
+ g_object_class_install_property
+ (object_class, PROP_MODEL,
+ g_param_spec_object (NMN_APPLET_MODEL,
+ "NmnModel",
+ "NmnModel",
+ NMN_TYPE_MODEL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
diff --git a/src/nmn-applet.h b/src/nmn-applet.h
new file mode 100644
index 0000000..97ba7f5
--- /dev/null
+++ b/src/nmn-applet.h
@@ -0,0 +1,53 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NMN_APPLET_H
+#define NMN_APPLET_H
+
+#include <gtk/gtk.h>
+#include "nmn-model.h"
+
+G_BEGIN_DECLS
+
+#define NMN_TYPE_APPLET (nmn_applet_get_type ())
+#define NMN_APPLET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMN_TYPE_APPLET, NmnApplet))
+#define NMN_APPLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMN_TYPE_APPLET, NmnAppletClass))
+#define NMN_IS_APPLET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMN_TYPE_APPLET))
+#define NMN_IS_APPLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMN_TYPE_APPLET))
+#define NMN_APPLET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMN_TYPE_APPLET, NmnAppletClass))
+
+#define NMN_APPLET_MODEL "model"
+
+typedef struct {
+ GtkNotebook parent;
+} NmnApplet;
+
+typedef struct {
+ GtkNotebookClass parent;
+} NmnAppletClass;
+
+GType nmn_applet_get_type (void);
+
+NmnApplet *nmn_applet_new (NmnModel *model);
+void nmn_applet_show (NmnApplet *applet);
+void nmn_applet_hide (NmnApplet *applet);
+
+G_END_DECLS
+
+#endif /* NMN_APPLET_H */
diff --git a/src/nmn-connection-details.c b/src/nmn-connection-details.c
new file mode 100644
index 0000000..1ec89f5
--- /dev/null
+++ b/src/nmn-connection-details.c
@@ -0,0 +1,562 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <glib/gi18n.h>
+#include <string.h>
+#include <stdlib.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <nm-utils.h>
+#include "nmn-connection-details.h"
+
+G_DEFINE_TYPE (NmnConnectionDetails, nmn_connection_details, GTK_TYPE_TABLE)
+
+enum {
+ CHANGED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NMN_TYPE_CONNECTION_DETAILS, NmnConnectionDetailsPrivate))
+
+typedef struct {
+ GtkWidget *connect_method;
+
+ GtkWidget *address;
+ GtkWidget *netmask;
+ GtkWidget *gateway;
+ GtkWidget *dns;
+ GtkWidget *hw_address;
+
+ gboolean editable;
+ gboolean last_check_result;
+
+ gboolean disposed;
+} NmnConnectionDetailsPrivate;
+
+enum {
+ CONNECT_METHOD_DHCP = 0,
+ CONNECT_METHOD_MANUAL = 1,
+ CONNECT_METHOD_LINK_LOCAL = 2
+};
+
+NmnConnectionDetails *
+nmn_connection_details_new (void)
+{
+ return NMN_CONNECTION_DETAILS (g_object_new (NMN_TYPE_CONNECTION_DETAILS, NULL));
+}
+
+static void
+editable_changed (NmnConnectionDetails *self,
+ gboolean editable)
+{
+ NmnConnectionDetailsPrivate *priv = GET_PRIVATE (self);
+ gboolean entries_enabled;
+
+ priv->editable = editable;
+
+ gtk_widget_set_sensitive (priv->connect_method, editable);
+
+ if (editable)
+ entries_enabled = gtk_combo_box_get_active (GTK_COMBO_BOX (priv->connect_method)) == CONNECT_METHOD_MANUAL;
+ else
+ entries_enabled = FALSE;
+
+ gtk_widget_set_sensitive (priv->address, entries_enabled);
+ gtk_widget_set_sensitive (priv->netmask, entries_enabled);
+ gtk_widget_set_sensitive (priv->gateway, entries_enabled);
+
+ gtk_text_view_set_editable (GTK_TEXT_VIEW (priv->dns), entries_enabled);
+}
+
+static void
+connect_method_changed (GtkComboBox *combo,
+ gpointer user_data)
+{
+ NmnConnectionDetails *self = NMN_CONNECTION_DETAILS (user_data);
+
+ editable_changed (self, GET_PRIVATE (self)->editable);
+}
+
+static char *
+ip4_address_as_string (guint32 ip)
+{
+ char *ip_string;
+ struct in_addr tmp_addr;
+
+ tmp_addr.s_addr = ip;
+ ip_string = g_malloc0 (INET_ADDRSTRLEN + 1);
+ if (!inet_ntop (AF_INET, &tmp_addr, ip_string, INET_ADDRSTRLEN))
+ strcpy (ip_string, _("(none)"));
+
+ return ip_string;
+}
+
+void
+nmn_connection_details_set_data (NmnConnectionDetails *self,
+ NMSettingIP4Config *setting,
+ NMIP4Config *config,
+ const char *hw_address)
+{
+ NmnConnectionDetailsPrivate *priv;
+ GtkTextBuffer *buffer;
+ NMIP4Address *address = NULL;
+ GString *string;
+ char *str;
+ int i;
+
+ g_return_if_fail (NMN_IS_CONNECTION_DETAILS (self));
+
+ priv = GET_PRIVATE (self);
+
+ if (setting) {
+ const char *method;
+
+ method = nm_setting_ip4_config_get_method (setting);
+ if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO))
+ gtk_combo_box_set_active (GTK_COMBO_BOX (priv->connect_method), CONNECT_METHOD_DHCP);
+ else if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL))
+ gtk_combo_box_set_active (GTK_COMBO_BOX (priv->connect_method), CONNECT_METHOD_MANUAL);
+ else if (!strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL))
+ gtk_combo_box_set_active (GTK_COMBO_BOX (priv->connect_method), CONNECT_METHOD_LINK_LOCAL);
+ else
+ g_assert_not_reached ();
+ } else
+ gtk_combo_box_set_active (GTK_COMBO_BOX (priv->connect_method), CONNECT_METHOD_DHCP);
+
+ /* We're editable when we're not connected, ie, when
+ the active IP4 config is not present */
+ editable_changed (self, config == NULL);
+
+ /* We prefer config if it's present */
+ if (config) {
+ const GSList *list;
+
+ list = nm_ip4_config_get_addresses (config);
+ address = list ? list->data : NULL;
+ }
+
+ if (!address && setting)
+ address = nm_setting_ip4_config_get_address (setting, 0);
+
+ if (address) {
+ str = ip4_address_as_string (nm_ip4_address_get_address (address));
+ gtk_entry_set_text (GTK_ENTRY (priv->address), str);
+ g_free (str);
+
+ str = ip4_address_as_string (nm_utils_ip4_prefix_to_netmask (nm_ip4_address_get_prefix (address)));
+ gtk_entry_set_text (GTK_ENTRY (priv->netmask), str);
+ g_free (str);
+
+ str = ip4_address_as_string (nm_ip4_address_get_gateway (address));
+ gtk_entry_set_text (GTK_ENTRY (priv->gateway), str);
+ g_free (str);
+ } else {
+ gtk_entry_set_text (GTK_ENTRY (priv->address), "");
+ gtk_entry_set_text (GTK_ENTRY (priv->gateway), "");
+ gtk_entry_set_text (GTK_ENTRY (priv->gateway), "");
+ }
+
+ if (config) {
+ const GArray *array;
+
+ string = g_string_sized_new (256);
+ array = nm_ip4_config_get_nameservers (config);
+ for (i = 0; array && i < array->len; i++) {
+ if (i > 0)
+ g_string_append_c (string, '\n');
+
+ str = ip4_address_as_string (g_array_index (array, guint32, i));
+ g_string_append (string, str);
+ g_free (str);
+ }
+
+ str = g_string_free (string, FALSE);
+ } else if (setting) {
+ string = g_string_sized_new (256);
+ for (i = 0; i < nm_setting_ip4_config_get_num_dns (setting); i++) {
+ if (i > 0)
+ g_string_append_c (string, '\n');
+
+ str = ip4_address_as_string (nm_setting_ip4_config_get_dns (setting, i));
+ g_string_append (string, str);
+ g_free (str);
+ }
+
+ str = g_string_free (string, FALSE);
+ } else
+ str = g_strdup ("");
+
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->dns));
+ gtk_text_buffer_set_text (buffer, str, -1);
+ g_free (str);
+
+ gtk_label_set_text (GTK_LABEL (priv->hw_address), hw_address);
+}
+
+
+static gboolean
+parse_netmask (const char *str, guint32 *prefix)
+{
+ struct in_addr tmp_addr;
+ glong tmp_prefix;
+
+ errno = 0;
+
+ /* Is it a prefix? */
+ if (!strchr (str, '.')) {
+ tmp_prefix = strtol (str, NULL, 10);
+ if (!errno && tmp_prefix >= 0 && tmp_prefix <= 32) {
+ *prefix = tmp_prefix;
+ return TRUE;
+ }
+ }
+
+ /* Is it a netmask? */
+ if (inet_pton (AF_INET, str, &tmp_addr) > 0) {
+ *prefix = nm_utils_ip4_netmask_to_prefix (tmp_addr.s_addr);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static gboolean
+parse_dns_list (GtkTextView *view, GSList **dns_list)
+{
+ GtkTextBuffer *buffer;
+ char **items;
+ char **iter;
+ char *str = NULL;
+ gboolean success = TRUE;
+
+ buffer = gtk_text_view_get_buffer (view);
+ g_object_get (buffer, "text", &str, NULL);
+
+ items = g_strsplit (str, ", ;:\n", 0);
+ g_free (str);
+
+ for (iter = items; *iter; iter++) {
+ char *stripped = g_strstrip (*iter);
+ struct in_addr tmp_addr;
+
+ if (strlen (stripped) < 1)
+ continue;
+
+ if (inet_pton (AF_INET, stripped, &tmp_addr))
+ *dns_list = g_slist_prepend (*dns_list, GUINT_TO_POINTER (tmp_addr.s_addr));
+ else {
+ success = FALSE;
+ break;
+ }
+ }
+
+ g_strfreev (items);
+
+ if (success)
+ *dns_list = g_slist_reverse (*dns_list);
+ else {
+ g_slist_free (*dns_list);
+ *dns_list = NULL;
+ }
+
+ return success;
+}
+
+static gboolean
+ui_to_setting (NmnConnectionDetails *self,
+ const char **method,
+ NMIP4Address **address,
+ GSList **dns_list)
+{
+ NmnConnectionDetailsPrivate *priv = GET_PRIVATE (self);
+ int active;
+ gboolean success = FALSE;
+
+ active = gtk_combo_box_get_active (GTK_COMBO_BOX (priv->connect_method));
+
+ if (active == CONNECT_METHOD_DHCP) {
+ *method = NM_SETTING_IP4_CONFIG_METHOD_AUTO;
+ *address = NULL;
+ success = TRUE;
+ } else if (active == CONNECT_METHOD_LINK_LOCAL) {
+ *method = NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL;
+ *address = NULL;
+ success = TRUE;
+ } else {
+ struct in_addr tmp_addr = { 0 };
+ guint32 prefix;
+
+ *address = nm_ip4_address_new ();
+
+ if (inet_aton (gtk_entry_get_text (GTK_ENTRY (priv->address)), &tmp_addr) == 0)
+ goto out;
+ nm_ip4_address_set_address (*address, tmp_addr.s_addr);
+
+ if (!parse_netmask (gtk_entry_get_text (GTK_ENTRY (priv->netmask)), &prefix))
+ goto out;
+ nm_ip4_address_set_prefix (*address, prefix);
+
+ if (inet_aton (gtk_entry_get_text (GTK_ENTRY (priv->gateway)), &tmp_addr) == 0)
+ goto out;
+ nm_ip4_address_set_gateway (*address, tmp_addr.s_addr);
+
+ if (!parse_dns_list (GTK_TEXT_VIEW (priv->dns), dns_list))
+ goto out;
+
+ *method = NM_SETTING_IP4_CONFIG_METHOD_MANUAL;
+
+ success = TRUE;
+ }
+
+ out:
+ if (!success && *address) {
+ nm_ip4_address_unref (*address);
+ *address = NULL;
+ }
+
+ return success;
+}
+
+NMSettingIP4Config *
+nmn_connection_details_get_data (NmnConnectionDetails *self)
+{
+ NMSettingIP4Config *setting;
+ const char *method;
+ NMIP4Address *address;
+ GSList *dns_list = NULL;
+ GSList *iter;
+
+ g_return_val_if_fail (NMN_IS_CONNECTION_DETAILS (self), NULL);
+
+ if (!ui_to_setting (self, &method, &address, &dns_list))
+ return NULL;
+
+ setting = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ());
+ g_object_set (setting, NM_SETTING_IP4_CONFIG_METHOD, method, NULL);
+ if (address) {
+ nm_setting_ip4_config_add_address (setting, address);
+ nm_ip4_address_unref (address);
+ }
+
+ for (iter = dns_list; iter; iter = iter->next)
+ nm_setting_ip4_config_add_dns (setting, GPOINTER_TO_UINT (iter->data));
+
+ g_slist_free (dns_list);
+
+ return setting;
+}
+
+gboolean
+nmn_connection_details_verify (NmnConnectionDetails *self)
+{
+ g_return_val_if_fail (NMN_IS_CONNECTION_DETAILS (self), FALSE);
+
+ return GET_PRIVATE (self)->last_check_result;
+}
+
+static void
+ip_filter_cb (GtkEditable *editable,
+ gchar *text,
+ gint length,
+ gint *position,
+ gpointer user_data)
+{
+ gchar *result;
+ int i;
+ int count = 0;
+
+ result = g_new (gchar, length);
+ for (i = 0; i < length; i++) {
+ int c = text[i];
+
+ if ((c >= '0' && c <= '9') || c == '.')
+ result[count++] = c;
+ }
+
+ if (count > 0) {
+ g_signal_handlers_block_by_func (editable, G_CALLBACK (ip_filter_cb), user_data);
+ gtk_editable_insert_text (editable, result, count, position);
+ g_signal_handlers_unblock_by_func (editable, G_CALLBACK (ip_filter_cb), user_data);
+ }
+
+ g_signal_stop_emission_by_name (editable, "insert-text");
+ g_free (result);
+}
+
+static void
+dns_filter_cb (GtkTextBuffer *textbuffer,
+ GtkTextIter *location,
+ gchar *text,
+ gint length,
+ gpointer user_data)
+{
+ gchar *result;
+ int i;
+ int count = 0;
+
+ result = g_new (gchar, length);
+ for (i = 0; i < length; i++) {
+ char c = text[i];
+
+ if ((c >= '0' && c <= '9') || c == '.' || c == '\n' || c == ' ' || c == ';' || c == ':')
+ result[count++] = c;
+ }
+
+ if (count > 0) {
+ g_signal_handlers_block_by_func (textbuffer, G_CALLBACK (dns_filter_cb), user_data);
+ gtk_text_buffer_insert_at_cursor (textbuffer, result, count);
+ g_signal_handlers_unblock_by_func (textbuffer, G_CALLBACK (dns_filter_cb), user_data);
+ }
+
+ g_signal_stop_emission_by_name (textbuffer, "insert-text");
+ g_free (result);
+}
+
+static void
+stuff_changed (NmnConnectionDetails *self)
+{
+ NmnConnectionDetailsPrivate *priv = GET_PRIVATE (self);
+ const char *method;
+ NMIP4Address *address;
+ GSList *dns_list = NULL;
+ gboolean verified;
+
+ verified = ui_to_setting (self, &method, &address, &dns_list);
+ if (address)
+ nm_ip4_address_unref (address);
+ g_slist_free (dns_list);
+
+ if (verified != priv->last_check_result) {
+ priv->last_check_result = verified;
+ g_signal_emit (self, signals[CHANGED], 0, verified);
+ }
+}
+
+static inline GtkWidget *
+aligned_label_new (const char *text)
+{
+ GtkWidget *w;
+
+ w = gtk_label_new (text);
+ g_object_set (w, "xalign", 0.0, NULL);
+
+ return w;
+}
+
+static void
+nmn_connection_details_init (NmnConnectionDetails *details)
+{
+ NmnConnectionDetailsPrivate *priv = GET_PRIVATE (details);
+ GtkTable *table;
+ GtkWidget *w;
+ GtkTextBuffer *buffer;
+
+ g_object_set (details,
+ "n-rows", 6,
+ "n-columns", 2,
+ "homogeneous", FALSE,
+ "row-spacing", 6,
+ "column-spacing", 6,
+ NULL);
+
+ table = GTK_TABLE (details);
+
+ /* Connect by: */
+ w = aligned_label_new (_("Connect by:"));
+ gtk_table_attach_defaults (table, w, 0, 1, 0, 1);
+
+ w = gtk_combo_box_new_text ();
+ gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("DHCP"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Manual"));
+ gtk_combo_box_append_text (GTK_COMBO_BOX (w), _("Link Local"));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (w), 0);
+ g_signal_connect (w, "changed", G_CALLBACK (connect_method_changed), details);
+ gtk_table_attach_defaults (table, w, 1, 2, 0, 1);
+ priv->connect_method = w;
+
+ /* Address */
+ w = aligned_label_new (_("IP Address:"));
+ gtk_table_attach_defaults (table, w, 0, 1, 1, 2);
+
+ priv->address = gtk_entry_new ();
+ gtk_table_attach_defaults (table, priv->address, 1, 2, 1, 2);
+ g_signal_connect (priv->address, "insert-text", G_CALLBACK (ip_filter_cb), NULL);
+ g_signal_connect_swapped (priv->address, "changed", G_CALLBACK (stuff_changed), details);
+
+ /* Netmask */
+ w = aligned_label_new (_("Subnet mask:"));
+ gtk_table_attach_defaults (table, w, 0, 1, 2, 3);
+
+ priv->netmask = gtk_entry_new ();
+ gtk_table_attach_defaults (table, priv->netmask, 1, 2, 2, 3);
+ g_signal_connect (priv->netmask, "insert-text", G_CALLBACK (ip_filter_cb), NULL);
+ g_signal_connect_swapped (priv->netmask, "changed", G_CALLBACK (stuff_changed), details);
+
+ /* Gateway */
+ w = aligned_label_new (_("Router:"));
+ gtk_table_attach_defaults (table, w, 0, 1, 3, 4);
+
+ priv->gateway = gtk_entry_new ();
+ gtk_table_attach_defaults (table, priv->gateway, 1, 2, 3, 4);
+ g_signal_connect (priv->gateway, "insert-text", G_CALLBACK (ip_filter_cb), NULL);
+ g_signal_connect_swapped (priv->gateway, "changed", G_CALLBACK (stuff_changed), details);
+
+ /* DNS */
+ w = aligned_label_new (_("DNS:"));
+ gtk_table_attach_defaults (table, w, 0, 1, 4, 5);
+
+ priv->dns = gtk_text_view_new ();
+ gtk_table_attach_defaults (table, priv->dns, 1, 2, 4, 5);
+ buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->dns));
+ g_signal_connect (buffer, "insert-text", G_CALLBACK (dns_filter_cb), NULL);
+ g_signal_connect_swapped (buffer, "changed", G_CALLBACK (stuff_changed), details);
+
+ /* Hardware address */
+ w = aligned_label_new (_("Your MAC address:"));
+ gtk_table_attach_defaults (table, w, 0, 1, 5, 6);
+
+ priv->hw_address = aligned_label_new (NULL);
+ gtk_table_attach_defaults (table, priv->hw_address, 1, 2, 5, 6);
+
+ editable_changed (details, TRUE);
+ stuff_changed (details);
+ gtk_widget_show_all (GTK_WIDGET (details));
+}
+
+static void
+nmn_connection_details_class_init (NmnConnectionDetailsClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ g_type_class_add_private (object_class, sizeof (NmnConnectionDetailsPrivate));
+
+ /* Signals */
+ signals[CHANGED] =
+ g_signal_new ("changed",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (NmnConnectionDetailsClass, changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
+}
diff --git a/src/nmn-connection-details.h b/src/nmn-connection-details.h
new file mode 100644
index 0000000..e53622e
--- /dev/null
+++ b/src/nmn-connection-details.h
@@ -0,0 +1,58 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NMN_CONNECTION_DETAILS_H
+#define NMN_CONNECTION_DETAILS_H
+
+#include <gtk/gtk.h>
+#include <nm-setting-ip4-config.h>
+#include <nm-ip4-config.h>
+
+#define NMN_TYPE_CONNECTION_DETAILS (nmn_connection_details_get_type ())
+#define NMN_CONNECTION_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMN_TYPE_CONNECTION_DETAILS, NmnConnectionDetails))
+#define NMN_CONNECTION_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMN_TYPE_CONNECTION_DETAILS, NmnConnectionDetailsClass))
+#define NMN_IS_CONNECTION_DETAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMN_TYPE_CONNECTION_DETAILS))
+#define NMN_IS_CONNECTION_DETAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMN_TYPE_CONNECTION_DETAILS))
+#define NMN_CONNECTION_DETAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMN_TYPE_CONNECTION_DETAILS, NmnConnectionDetailsClass))
+
+typedef struct {
+ GtkTable parent;
+} NmnConnectionDetails;
+
+typedef struct {
+ GtkTableClass parent;
+
+ /* Signals */
+ void (*changed) (NmnConnectionDetails *self,
+ gboolean complete);
+} NmnConnectionDetailsClass;
+
+GType nmn_connection_details_get_type (void);
+
+NmnConnectionDetails *nmn_connection_details_new (void);
+void nmn_connection_details_set_data (NmnConnectionDetails *self,
+ NMSettingIP4Config *setting,
+ NMIP4Config *config,
+ const char *hw_address);
+
+NMSettingIP4Config *nmn_connection_details_get_data (NmnConnectionDetails *self);
+gboolean nmn_connection_details_verify (NmnConnectionDetails *self);
+
+
+#endif /* NMN_CONNECTION_DETAILS_H */
diff --git a/src/nmn-gsm-pin-request-renderer.c b/src/nmn-gsm-pin-request-renderer.c
new file mode 100644
index 0000000..4802ff6
--- /dev/null
+++ b/src/nmn-gsm-pin-request-renderer.c
@@ -0,0 +1,191 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <string.h>
+#include <glib/gi18n.h>
+#include "nmn-gsm-pin-request-renderer.h"
+#include "libnm-gtk-gsm-device.h"
+#include "nm-gsm-pin-request-item.h"
+#include "nm-icon-cache.h"
+#include "nm-connection-item.h"
+#include "nm-device-item.h"
+#include "nmn-connection-details.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NmnGsmPinRequestRenderer, nmn_gsm_pin_request_renderer, NMN_TYPE_ITEM_RENDERER)
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NMN_TYPE_GSM_PIN_REQUEST_RENDERER, NmnGsmPinRequestRendererPrivate))
+
+typedef struct {
+ NMListItem *item;
+
+ GtkWidget *box_to_hide;
+ GtkWidget *entry;
+ GtkWidget *unlock_button;
+ GtkWidget *disable_pin;
+} NmnGsmPinRequestRendererPrivate;
+
+GtkWidget *
+nmn_gsm_pin_request_renderer_new (void)
+{
+ return (GtkWidget *) g_object_new (NMN_TYPE_GSM_PIN_REQUEST_RENDERER, NULL);
+}
+
+static void
+item_warning (NMListItem *item,
+ const char *message,
+ gpointer user_data)
+{
+ NmnGsmPinRequestRendererPrivate *priv = GET_PRIVATE (user_data);
+
+ gtk_editable_select_region (GTK_EDITABLE (priv->entry), 0, -1);
+ gtk_widget_grab_focus (priv->entry);
+}
+
+static void
+unlock (NmnGsmPinRequestRenderer *self)
+{
+ NmnGsmPinRequestRendererPrivate *priv = GET_PRIVATE (self);
+ NMListItem *item;
+ const char *text;
+ gboolean disable_pin;
+
+ text = gtk_entry_get_text (GTK_ENTRY (priv->entry));
+ disable_pin = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->disable_pin));
+
+ item = nmn_item_renderer_get_item (NMN_ITEM_RENDERER (self));
+ nm_gsm_pin_request_item_unlock (NM_GSM_PIN_REQUEST_ITEM (item), text, disable_pin);
+}
+
+static void
+sensitize_widgets (NmnGsmPinRequestRenderer *self)
+{
+ NmnGsmPinRequestRendererPrivate *priv = GET_PRIVATE (self);
+ const char *text;
+ gboolean sensitive;
+
+ text = gtk_entry_get_text (GTK_ENTRY (priv->entry));
+ if (text && strlen (text) > 0)
+ sensitive = TRUE;
+ else
+ sensitive = FALSE;
+
+ gtk_widget_set_sensitive (priv->unlock_button, sensitive);
+ gtk_widget_set_sensitive (priv->disable_pin, sensitive);
+}
+
+static void
+pin_entry_changed (GtkEditable *editable,
+ gpointer user_data)
+{
+ nmn_item_renderer_hide_error (NMN_ITEM_RENDERER (user_data));
+ sensitize_widgets (NMN_GSM_PIN_REQUEST_RENDERER (user_data));
+}
+
+static void
+init_widgets (NmnGsmPinRequestRenderer *self)
+{
+ NmnGsmPinRequestRendererPrivate *priv = GET_PRIVATE (self);
+ GtkWidget *parent_container;
+ GtkWidget *hbox;
+ GtkWidget *vbox;
+ GtkWidget *w;
+ char *str;
+ NMListItem *item;
+
+ item = nmn_item_renderer_get_item (NMN_ITEM_RENDERER (self));
+ g_signal_connect (item, "warning", G_CALLBACK (item_warning), self);
+
+ parent_container = nmn_item_renderer_get_content_area (NMN_ITEM_RENDERER (self));
+
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
+ gtk_container_add (GTK_CONTAINER (parent_container), hbox);
+
+ w = gtk_image_new_from_pixbuf (nm_icon_cache_get (nm_list_item_get_icon (item)));
+ gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
+
+ w = gtk_label_new ("");
+ gtk_label_set_use_markup (GTK_LABEL (w), TRUE);
+ str = g_strdup_printf ("<big><b>%s</b></big>", nm_list_item_get_name (item));
+ gtk_label_set_markup (GTK_LABEL (w), str);
+ g_free (str);
+ gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5);
+ gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0);
+
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ priv->box_to_hide = hbox;
+
+ w = gtk_entry_new ();
+ gtk_entry_set_visibility (GTK_ENTRY (w), FALSE);
+ gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+ priv->entry = w;
+ g_signal_connect_swapped (w, "activate", G_CALLBACK (unlock), self);
+ g_signal_connect (w, "changed", G_CALLBACK (pin_entry_changed), self);
+
+ w = gtk_button_new_with_label (_("Unlock"));
+ gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+ priv->unlock_button = w;
+ g_signal_connect_swapped (w, "clicked", G_CALLBACK (unlock), self);
+
+ w = gtk_check_button_new_with_label (_("Disable PIN"));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), TRUE);
+ gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+ priv->disable_pin = w;
+
+ gtk_widget_show_all (GTK_WIDGET (self));
+}
+
+static void
+renderer_background_updated (NmnItemRenderer *item_renderer,
+ gboolean prelight)
+{
+ NmnGsmPinRequestRendererPrivate *priv = GET_PRIVATE (item_renderer);
+
+ g_object_set (priv->box_to_hide, "visible", prelight, NULL);
+}
+
+static void
+renderer_item_changed (NmnItemRenderer *item_renderer)
+{
+ init_widgets (NMN_GSM_PIN_REQUEST_RENDERER (item_renderer));
+ renderer_background_updated (item_renderer, nmn_item_renderer_is_prelight (item_renderer));
+ sensitize_widgets (NMN_GSM_PIN_REQUEST_RENDERER (item_renderer));
+}
+
+static void
+nmn_gsm_pin_request_renderer_init (NmnGsmPinRequestRenderer *item)
+{
+}
+
+static void
+nmn_gsm_pin_request_renderer_class_init (NmnGsmPinRequestRendererClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+ NmnItemRendererClass *renderer_class = NMN_ITEM_RENDERER_CLASS (class);
+
+ g_type_class_add_private (object_class, sizeof (NmnGsmPinRequestRendererPrivate));
+
+ renderer_class->background_updated = renderer_background_updated;
+ renderer_class->item_changed = renderer_item_changed;
+}
diff --git a/src/nmn-gsm-pin-request-renderer.h b/src/nmn-gsm-pin-request-renderer.h
new file mode 100644
index 0000000..4351d0f
--- /dev/null
+++ b/src/nmn-gsm-pin-request-renderer.h
@@ -0,0 +1,45 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NMN_GSM_PIN_REQUEST_RENDERER_H
+#define NMN_GSM_PIN_REQUEST_RENDERER_H
+
+#include <gtk/gtk.h>
+#include <nmn-item-renderer.h>
+
+#define NMN_TYPE_GSM_PIN_REQUEST_RENDERER (nmn_gsm_pin_request_renderer_get_type ())
+#define NMN_GSM_PIN_REQUEST_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMN_TYPE_GSM_PIN_REQUEST_RENDERER, NmnGsmPinRequestRenderer))
+#define NMN_GSM_PIN_REQUEST_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMN_TYPE_GSM_PIN_REQUEST_RENDERER, NmnGsmPinRequestRendererClass))
+#define NMN_IS_GSM_PIN_REQUEST_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMN_TYPE_GSM_PIN_REQUEST_RENDERER))
+#define NMN_IS_GSM_PIN_REQUEST_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMN_TYPE_GSM_PIN_REQUEST_RENDERER))
+#define NMN_GSM_PIN_REQUEST_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMN_TYPE_GSM_PIN_REQUEST_RENDERER, NmnPinRequestRendererClass))
+
+typedef struct {
+ NmnItemRenderer parent;
+} NmnGsmPinRequestRenderer;
+
+typedef struct {
+ NmnItemRendererClass parent;
+} NmnGsmPinRequestRendererClass;
+
+GType nmn_gsm_pin_request_renderer_get_type (void);
+
+GtkWidget *nmn_gsm_pin_request_renderer_new (void);
+
+#endif /* NMN_ITEM_RENDERER_H */
diff --git a/src/nmn-item-renderer.c b/src/nmn-item-renderer.c
new file mode 100644
index 0000000..127e92e
--- /dev/null
+++ b/src/nmn-item-renderer.c
@@ -0,0 +1,246 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <string.h>
+#include <glib/gi18n.h>
+#include "nmn-item-renderer.h"
+#include "nm-list-item.h"
+#include "nm-icon-cache.h"
+#include "nm-connection-item.h"
+#include "nm-device-item.h"
+#include "nmn-connection-details.h"
+#include "gtkinfobar.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NmnItemRenderer, nmn_item_renderer, GTK_TYPE_EVENT_BOX)
+
+enum {
+ PROP_0,
+ PROP_ITEM,
+
+ LAST_PROP
+};
+
+enum {
+ BACKGROUND_UPDATED,
+ ITEM_CHANGED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NMN_TYPE_ITEM_RENDERER, NmnItemRendererPrivate))
+
+typedef struct {
+ NMListItem *item;
+
+ GtkWidget *content_area;
+ GtkWidget *info_bar;
+ GtkWidget *info_label;
+
+ gboolean prelight;
+ GdkColor prelight_color;
+ GdkColor connection_item_color;
+} NmnItemRendererPrivate;
+
+static void
+update_background (NmnItemRenderer *self)
+{
+ NmnItemRendererPrivate *priv = GET_PRIVATE (self);
+ GdkColor *color;
+
+ if (priv->prelight) {
+ color = &priv->prelight_color;
+ } else {
+ if (NM_IS_CONNECTION_ITEM (priv->item) && nm_connection_item_get_connection (NM_CONNECTION_ITEM (priv->item)))
+ color = &priv->connection_item_color;
+ else
+ color = NULL;
+ }
+
+ gtk_widget_modify_bg (GTK_WIDGET (self), GTK_STATE_NORMAL, color);
+ g_signal_emit (self, signals[BACKGROUND_UPDATED], 0, priv->prelight);
+}
+
+NMListItem *
+nmn_item_renderer_get_item (NmnItemRenderer *self)
+{
+ g_return_val_if_fail (NMN_IS_ITEM_RENDERER (self), NULL);
+
+ return GET_PRIVATE (self)->item;
+}
+
+static void
+item_warning (NMListItem *item,
+ const char *message,
+ gpointer user_data)
+{
+ nmn_item_renderer_show_error (NMN_ITEM_RENDERER (user_data), message);
+}
+
+void
+nmn_item_renderer_set_item (NmnItemRenderer *self,
+ NMListItem *item)
+{
+ NmnItemRendererPrivate *priv;
+
+ g_return_if_fail (NMN_IS_ITEM_RENDERER (self));
+ g_return_if_fail (NM_IS_LIST_ITEM (item));
+
+ priv = GET_PRIVATE (self);
+ g_return_if_fail (priv->item == NULL);
+
+ priv->item = g_object_ref (item);
+ g_signal_connect (item, "warning", G_CALLBACK (item_warning), self);
+
+ g_signal_emit (self, signals[ITEM_CHANGED], 0);
+}
+
+gboolean
+nmn_item_renderer_is_prelight (NmnItemRenderer *self)
+{
+ g_return_val_if_fail (NMN_IS_ITEM_RENDERER (self), FALSE);
+
+ return GET_PRIVATE (self)->prelight;
+}
+
+GtkWidget *
+nmn_item_renderer_get_content_area (NmnItemRenderer *self)
+{
+ g_return_val_if_fail (NMN_IS_ITEM_RENDERER (self), NULL);
+
+ return GET_PRIVATE (self)->content_area;
+}
+
+void
+nmn_item_renderer_show_error (NmnItemRenderer *self,
+ const char *message)
+{
+ NmnItemRendererPrivate *priv = GET_PRIVATE (self);
+
+ g_return_if_fail (NMN_IS_ITEM_RENDERER (self));
+ g_return_if_fail (message != NULL);
+
+ gtk_label_set_text (GTK_LABEL (priv->info_label), message);
+ gtk_widget_show (priv->info_bar);
+}
+
+void
+nmn_item_renderer_hide_error (NmnItemRenderer *self)
+{
+ g_return_if_fail (NMN_IS_ITEM_RENDERER (self));
+
+ gtk_widget_hide (GET_PRIVATE (self)->info_bar);
+}
+
+static gboolean
+enter_notify_event (GtkWidget *widget,
+ GdkEventCrossing *event)
+{
+ NmnItemRendererPrivate *priv = GET_PRIVATE (widget);
+
+ priv->prelight = TRUE;
+ update_background (NMN_ITEM_RENDERER (widget));
+
+ return TRUE;
+}
+
+static gboolean
+leave_notify_event (GtkWidget *widget,
+ GdkEventCrossing *event)
+{
+ NmnItemRendererPrivate *priv = GET_PRIVATE (widget);
+
+ if (event->detail != GDK_NOTIFY_INFERIOR) {
+ priv->prelight = FALSE;
+ update_background (NMN_ITEM_RENDERER (widget));
+ }
+
+ return TRUE;
+}
+
+static void
+nmn_item_renderer_init (NmnItemRenderer *item)
+{
+ NmnItemRendererPrivate *priv = GET_PRIVATE (item);
+ GtkWidget *w;
+
+ gdk_color_parse ("#cbcbcb", &priv->prelight_color);
+ gdk_color_parse ("#e8e8e8", &priv->connection_item_color);
+
+ priv->content_area = gtk_vbox_new (FALSE, 6);
+ gtk_container_add (GTK_CONTAINER (item), priv->content_area);
+
+ priv->info_bar = egg_info_bar_new ();
+ gtk_widget_set_no_show_all (priv->info_bar, TRUE);
+ gtk_box_pack_end (GTK_BOX (priv->content_area), priv->info_bar, FALSE, FALSE, 0);
+
+ priv->info_label = gtk_label_new (NULL);
+ w = egg_info_bar_get_content_area (EGG_INFO_BAR (priv->info_bar));
+ gtk_container_add (GTK_CONTAINER (w), priv->info_label);
+ gtk_widget_show (priv->info_label);
+}
+
+static void
+dispose (GObject *object)
+{
+ NmnItemRendererPrivate *priv = GET_PRIVATE (object);
+
+ if (priv->item) {
+ g_object_unref (priv->item);
+ priv->item = NULL;
+ }
+
+ G_OBJECT_CLASS (nmn_item_renderer_parent_class)->dispose (object);
+}
+
+static void
+nmn_item_renderer_class_init (NmnItemRendererClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
+
+ g_type_class_add_private (object_class, sizeof (NmnItemRendererPrivate));
+
+ object_class->dispose = dispose;
+
+ widget_class->enter_notify_event = enter_notify_event;
+ widget_class->leave_notify_event = leave_notify_event;
+
+ /* signals */
+ signals[BACKGROUND_UPDATED] = g_signal_new
+ ("background-updated",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NmnItemRendererClass, background_updated),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
+
+ signals[ITEM_CHANGED] = g_signal_new
+ ("item-changed",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NmnItemRendererClass, item_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
diff --git a/src/nmn-item-renderer.h b/src/nmn-item-renderer.h
new file mode 100644
index 0000000..875028e
--- /dev/null
+++ b/src/nmn-item-renderer.h
@@ -0,0 +1,65 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NMN_ITEM_RENDERER_H
+#define NMN_ITEM_RENDERER_H
+
+#include <gtk/gtk.h>
+#include <nm-list-item.h>
+
+#define NMN_TYPE_ITEM_RENDERER (nmn_item_renderer_get_type ())
+#define NMN_ITEM_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMN_TYPE_ITEM_RENDERER, NmnItemRenderer))
+#define NMN_ITEM_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMN_TYPE_ITEM_RENDERER, NmnItemRendererClass))
+#define NMN_IS_ITEM_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMN_TYPE_ITEM_RENDERER))
+#define NMN_IS_ITEM_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMN_TYPE_ITEM_RENDERER))
+#define NMN_ITEM_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMN_TYPE_ITEM_RENDERER, NmnItemRendererClass))
+
+typedef struct {
+ GtkEventBox parent;
+
+ GtkTreeIter iter;
+ int index;
+} NmnItemRenderer;
+
+typedef struct {
+ GtkEventBoxClass parent;
+
+ /* Signals */
+ void (*background_updated) (NmnItemRenderer *self,
+ gboolean prelight);
+
+ void (*item_changed) (NmnItemRenderer *self);
+} NmnItemRendererClass;
+
+GType nmn_item_renderer_get_type (void);
+
+NMListItem *nmn_item_renderer_get_item (NmnItemRenderer *self);
+void nmn_item_renderer_set_item (NmnItemRenderer *self,
+ NMListItem *item);
+
+gboolean nmn_item_renderer_is_prelight (NmnItemRenderer *self);
+
+GtkWidget *nmn_item_renderer_get_content_area (NmnItemRenderer *self);
+
+void nmn_item_renderer_show_error (NmnItemRenderer *self,
+ const char *message);
+
+void nmn_item_renderer_hide_error (NmnItemRenderer *self);
+
+#endif /* NMN_ITEM_RENDERER_H */
diff --git a/src/nmn-list.c b/src/nmn-list.c
new file mode 100644
index 0000000..b188ec7
--- /dev/null
+++ b/src/nmn-list.c
@@ -0,0 +1,444 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <string.h>
+#include <glib/gi18n.h>
+#include <nm-list-model.h>
+#include <nm-list-item.h>
+#include <nm-gsm-pin-request-item.h>
+#include "nmn-list.h"
+#include "nmn-model.h"
+#include "nmn-network-renderer.h"
+#include "nmn-gsm-pin-request-renderer.h"
+
+G_DEFINE_TYPE (NmnList, nmn_list, GTK_TYPE_VBOX)
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NMN_TYPE_LIST, NmnListPrivate))
+
+typedef struct {
+ GtkTreeModel *model;
+ GSList *rows;
+
+ gulong row_deleted_id;
+ gulong row_inserted_id;
+ gulong rows_reordered_id;
+ guint layout_idle_id;
+
+ gboolean disposed;
+} NmnListPrivate;
+
+GtkWidget *
+nmn_list_new (void)
+{
+ return GTK_WIDGET (g_object_new (NMN_TYPE_LIST, NULL));
+}
+
+GtkWidget *
+nmn_list_new_with_model (GtkTreeModel *model)
+{
+ GtkWidget *list;
+
+ list = nmn_list_new ();
+ if (list)
+ nmn_list_set_model (NMN_LIST (list), model);
+
+ return list;
+}
+
+static const char *
+get_punctuation (guint items_left)
+{
+ if (items_left > 1)
+ return ", ";
+ if (items_left == 1)
+ return _(" and ");
+
+ /* items_left == 0 */
+ return ".";
+}
+
+static char *
+get_empty_text (NmnModel *model)
+{
+ GString *string;
+
+ string = g_string_new (_("Sorry, we can't find any networks."));
+
+ if (nmn_model_offline_mode_get_active (model)) {
+ g_string_append (string, _(" You could try disabling Offline mode."));
+ } else {
+ gboolean wifi_enabled;
+ gboolean ethernet_enabled;
+ gboolean modem_enabled;
+ guint disabled_count = 0;
+
+ wifi_enabled = nmn_model_wifi_get_active (model);
+ if (!wifi_enabled)
+ disabled_count++;
+
+ ethernet_enabled = nmn_model_ethernet_get_active (model);
+ if (!ethernet_enabled)
+ disabled_count++;
+
+ modem_enabled = nmn_model_modems_get_active (model);
+ if (!modem_enabled)
+ disabled_count++;
+
+ if (disabled_count > 0) {
+ g_string_append (string, _(" You could try turning on "));
+
+ if (!wifi_enabled) {
+ g_string_append (string, _("WiFi"));
+ g_string_append (string, get_punctuation (--disabled_count));
+ }
+
+ if (!ethernet_enabled) {
+ g_string_append (string, _("Wired"));
+ g_string_append (string, get_punctuation (--disabled_count));
+ }
+
+ if (!modem_enabled) {
+ g_string_append (string, _("3G"));
+ g_string_append (string, get_punctuation (--disabled_count));
+ }
+ }
+ }
+
+ return g_string_free (string, FALSE);
+}
+
+static void
+nmn_list_clear (NmnList *self)
+{
+ GtkContainer *container = GTK_CONTAINER (self);
+ GList *list;
+ GList *iter;
+
+ list = gtk_container_get_children (container);
+ for (iter = list; iter; iter = iter->next)
+ gtk_container_remove (container, GTK_WIDGET (iter->data));
+
+ g_list_free (list);
+}
+
+static void
+switches_flipped (NmnList *self)
+{
+ NmnListPrivate *priv = GET_PRIVATE (self);
+ char *txt, *s;
+ GtkWidget *w;
+
+ if (priv->rows || !NMN_IS_MODEL (priv->model))
+ return;
+
+ nmn_list_clear (self);
+
+ txt = get_empty_text (NMN_MODEL (priv->model));
+ s = g_strdup_printf ("<big><b>%s</b></big>", txt);
+ g_free (txt);
+
+ w = gtk_label_new (NULL);
+ gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5);
+ gtk_label_set_markup (GTK_LABEL (w), s);
+ g_free (s);
+
+ gtk_box_pack_start (GTK_BOX (self), w, FALSE, FALSE, 0);
+ gtk_widget_show (w);
+}
+
+static void
+nmn_list_layout (NmnList *self)
+{
+ NmnListPrivate *priv = GET_PRIVATE (self);
+ GSList *iter;
+
+ if (priv->layout_idle_id) {
+ g_source_remove (priv->layout_idle_id);
+ priv->layout_idle_id = 0;
+ }
+
+ /* FIXME: This could probably be much more efficient, especially for cases where
+ a single item is added to the end of the list or a single item changes it's location */
+
+ nmn_list_clear (self);
+ switches_flipped (self);
+
+ for (iter = priv->rows; iter; iter = iter->next) {
+ NmnItemRenderer *renderer = iter->data;
+ NMListItem *item;
+
+ item = nmn_item_renderer_get_item (renderer);
+ if (!item) {
+ GtkTreeIter iter;
+
+ if (gtk_tree_model_get_flags (priv->model) & GTK_TREE_MODEL_ITERS_PERSIST)
+ iter = renderer->iter;
+ else {
+ GtkTreePath *path;
+
+ path = gtk_tree_path_new_from_indices (renderer->index, -1);
+ gtk_tree_model_get_iter (priv->model, &iter, path);
+ gtk_tree_path_free (path);
+ }
+
+ gtk_tree_model_get (priv->model, &iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+ if (item) {
+ nmn_item_renderer_set_item (renderer, item);
+ g_object_unref (item);
+ }
+ }
+
+ if (item) {
+ gtk_box_pack_start (GTK_BOX (self), GTK_WIDGET (renderer), FALSE, FALSE, 0);
+ gtk_widget_show (GTK_WIDGET (renderer));
+ }
+ }
+}
+
+static gboolean
+queue_layout_cb (gpointer data)
+{
+ NmnListPrivate *priv = GET_PRIVATE (data);
+
+ priv->layout_idle_id = 0;
+ nmn_list_layout (NMN_LIST (data));
+
+ return FALSE;
+}
+
+static void
+queue_layout (NmnList *self)
+{
+ NmnListPrivate *priv = GET_PRIVATE (self);
+
+ if (!priv->layout_idle_id)
+ priv->layout_idle_id = g_idle_add (queue_layout_cb, self);
+}
+
+static void
+model_row_deleted (GtkTreeModel *model,
+ GtkTreePath *path,
+ gpointer user_data)
+{
+ NmnList *self = NMN_LIST (user_data);
+ NmnListPrivate *priv = GET_PRIVATE (self);
+ GSList *list;
+ GSList *next;
+ NmnItemRenderer *renderer;
+ int index;
+
+ index = gtk_tree_path_get_indices(path)[0];
+ list = g_slist_nth (priv->rows, index);
+ renderer = list->data;
+ g_object_unref (renderer);
+
+ for (next = list->next; next; next = next->next) {
+ renderer = next->data;
+ renderer->index--;
+ }
+
+ priv->rows = g_slist_delete_link (priv->rows, list);
+ queue_layout (self);
+}
+
+static void
+model_row_inserted (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
+{
+ NmnList *self = NMN_LIST (user_data);
+ NmnListPrivate *priv = GET_PRIVATE (self);
+ NmnItemRenderer *renderer;
+ GSList *list;
+ NMListItem *item;
+ int index;
+
+ index = gtk_tree_path_get_indices (path)[0];
+
+ gtk_tree_model_get (model, iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+
+ if (item && NM_IS_GSM_PIN_REQUEST_ITEM (item))
+ renderer = (NmnItemRenderer *) nmn_gsm_pin_request_renderer_new ();
+ else
+ renderer = (NmnItemRenderer *) nmn_network_renderer_new ();
+
+ renderer->index = index;
+
+ if (gtk_tree_model_get_flags (model) & GTK_TREE_MODEL_ITERS_PERSIST)
+ renderer->iter = *iter;
+
+ if (item) {
+ nmn_item_renderer_set_item (renderer, item);
+ g_object_unref (item);
+ }
+
+ priv->rows = g_slist_insert (priv->rows, g_object_ref_sink (renderer), index);
+
+ list = g_slist_nth (priv->rows, index + 1);
+ for (; list; list = list->next) {
+ renderer = list->data;
+ renderer->index++;
+ }
+
+ queue_layout (self);
+}
+
+static void
+model_rows_reordered (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gint *new_order,
+ gpointer user_data)
+{
+ NmnList *self = NMN_LIST (user_data);
+ NmnListPrivate *priv = GET_PRIVATE (self);
+ GSList *list;
+ NmnItemRenderer **renderer_array;
+ GSList *rows = NULL;
+ gint *order;
+ int length;
+ int i;
+
+ length = gtk_tree_model_iter_n_children (model, NULL);
+
+ order = g_new (int, length);
+ for (i = 0; i < length; i++)
+ order[new_order[i]] = i;
+
+ renderer_array = g_new (NmnItemRenderer *, length);
+ for (i = 0, list = priv->rows; list != NULL; list = list->next, i++)
+ renderer_array[order[i]] = list->data;
+ g_free (order);
+
+ for (i = length - 1; i >= 0; i--) {
+ renderer_array[i]->index = i;
+ rows = g_slist_prepend (rows, renderer_array[i]);
+ }
+
+ g_free (renderer_array);
+ g_slist_free (priv->rows);
+ priv->rows = rows;
+
+ queue_layout (self);
+}
+
+static gboolean
+model_foreach_cb (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
+{
+ model_row_inserted (model, path, iter, user_data);
+
+ return FALSE;
+}
+
+void
+nmn_list_set_model (NmnList *list,
+ GtkTreeModel *model)
+{
+ NmnListPrivate *priv;
+
+ g_return_if_fail (NMN_IS_LIST (list));
+
+ priv = GET_PRIVATE (list);
+
+ if (model == priv->model)
+ return;
+
+ if (priv->model) {
+ if (NMN_IS_MODEL (priv->model))
+ g_signal_handlers_disconnect_by_func (priv->model, switches_flipped, list);
+
+ g_signal_handler_disconnect (priv->model, priv->row_deleted_id);
+ g_signal_handler_disconnect (priv->model, priv->row_inserted_id);
+ g_signal_handler_disconnect (priv->model, priv->rows_reordered_id);
+
+ g_object_unref (priv->model);
+ }
+
+ priv->model = model;
+
+ if (priv->model) {
+ g_object_ref (priv->model);
+
+ priv->row_deleted_id = g_signal_connect (model, "row-deleted", G_CALLBACK (model_row_deleted), list);
+ priv->row_inserted_id = g_signal_connect (model, "row-inserted", G_CALLBACK (model_row_inserted), list);
+ priv->rows_reordered_id = g_signal_connect (model, "rows-reordered", G_CALLBACK (model_rows_reordered), list);
+
+ gtk_tree_model_foreach (model, model_foreach_cb, list);
+
+ if (NMN_IS_MODEL (model)) {
+ g_signal_connect_swapped (model, "ethernet-toggled", G_CALLBACK (switches_flipped), list);
+ g_signal_connect_swapped (model, "wifi-toggled", G_CALLBACK (switches_flipped), list);
+ g_signal_connect_swapped (model, "modems-toggled", G_CALLBACK (switches_flipped), list);
+ g_signal_connect_swapped (model, "bt-toggled", G_CALLBACK (switches_flipped), list);
+ g_signal_connect_swapped (model, "offline-mode-toggled", G_CALLBACK (switches_flipped), list);
+ }
+ }
+}
+
+GtkTreeModel *
+nmn_list_get_model (NmnList *list)
+{
+ g_return_val_if_fail (NMN_IS_LIST (list), NULL);
+
+ return GET_PRIVATE (list)->model;
+}
+
+/*****************************************************************************/
+
+static void
+nmn_list_init (NmnList *list)
+{
+ gtk_box_set_homogeneous (GTK_BOX (list), FALSE);
+ gtk_box_set_spacing (GTK_BOX (list), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (list), 6);
+}
+
+static void
+dispose (GObject *object)
+{
+ NmnListPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ if (priv->layout_idle_id)
+ g_source_remove (priv->layout_idle_id);
+
+ g_slist_foreach (priv->rows, (GFunc) g_object_unref, NULL);
+ g_slist_free (priv->rows);
+
+ nmn_list_set_model (NMN_LIST (object), NULL);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nmn_list_parent_class)->dispose (object);
+}
+
+static void
+nmn_list_class_init (NmnListClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ g_type_class_add_private (object_class, sizeof (NmnListPrivate));
+
+ object_class->dispose = dispose;
+}
diff --git a/src/nmn-list.h b/src/nmn-list.h
new file mode 100644
index 0000000..8d6a4b4
--- /dev/null
+++ b/src/nmn-list.h
@@ -0,0 +1,49 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NMN_LIST_H
+#define NMN_LIST_H
+
+#include <gtk/gtk.h>
+
+#define NMN_TYPE_LIST (nmn_list_get_type ())
+#define NMN_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMN_TYPE_LIST, NmnList))
+#define NMN_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMN_TYPE_LIST, NmnListClass))
+#define NMN_IS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMN_TYPE_LIST))
+#define NMN_IS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMN_TYPE_LIST))
+#define NMN_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMN_TYPE_LIST, NmnListClass))
+
+typedef struct {
+ GtkVBox parent;
+} NmnList;
+
+typedef struct {
+ GtkVBoxClass parent;
+} NmnListClass;
+
+GType nmn_list_get_type (void);
+
+GtkWidget *nmn_list_new (void);
+GtkWidget *nmn_list_new_with_model (GtkTreeModel *model);
+void nmn_list_set_model (NmnList *list,
+ GtkTreeModel *model);
+
+GtkTreeModel *nmn_list_get_model (NmnList *list);
+
+#endif /* NMN_LIST_H */
diff --git a/src/nmn-model.c b/src/nmn-model.c
new file mode 100644
index 0000000..d9318f3
--- /dev/null
+++ b/src/nmn-model.c
@@ -0,0 +1,563 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <nm-remote-settings-system.h>
+#include "nmn-model.h"
+#include "nm-list-model.h"
+#include "nm-gconf-settings.h"
+#include "nm-list-item.h"
+#include "nm-ethernet-item.h"
+#include "nm-wifi-item.h"
+#include "nm-gsm-item.h"
+#include "nm-gsm-pin-request-item.h"
+#include "nm-cdma-item.h"
+#include "nm-bt-item.h"
+
+G_DEFINE_TYPE (NmnModel, nmn_model, GTK_TYPE_TREE_MODEL_FILTER)
+
+enum {
+ ETHERNET_TOGGLED,
+ WIFI_TOGGLED,
+ MODEMS_TOGGLED,
+ BT_TOGGLED,
+ OFFLINE_MODE_TOGGLED,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NMN_TYPE_MODEL, NmnModelPrivate))
+
+typedef struct {
+ NMClient *client;
+ NMSettingsInterface *user_settings;
+ NMSettingsInterface *system_settings;
+
+ gboolean ethernet_active;
+ gboolean wifi_active;
+ gboolean modems_active;
+ gboolean bt_active;
+ gboolean offline_mode_active;
+
+ gboolean disposed;
+} NmnModelPrivate;
+
+NmnModel *
+nmn_model_new (void)
+{
+ NmnModel *model;
+ NMClient *client;
+ NMListModel *child_model;
+
+ client = nm_client_new ();
+ child_model = nm_list_model_new (client);
+ g_object_unref (client);
+
+ model = (NmnModel *) g_object_new (NMN_TYPE_MODEL,
+ "child-model", child_model,
+ NULL);
+
+ g_object_unref (child_model);
+
+ return model;
+}
+
+NMClient *
+nmn_model_get_client (NmnModel *self)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (self), NULL);
+
+ return GET_PRIVATE (self)->client;
+}
+
+NMSettingsInterface *
+nmn_model_get_user_settings (NmnModel *self)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (self), NULL);
+
+ return GET_PRIVATE (self)->user_settings;
+}
+
+NMSettingsInterface *
+nmn_model_get_system_settings (NmnModel *self)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (self), NULL);
+
+ return GET_PRIVATE (self)->system_settings;
+}
+
+gboolean
+nmn_model_ethernet_get_active (NmnModel *self)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (self), FALSE);
+
+ return GET_PRIVATE (self)->ethernet_active;
+}
+
+static void
+ethernet_set_active (NmnModel *self,
+ gboolean active)
+{
+ GtkTreeModel *child_model;
+ GtkTreeIter iter;
+ gboolean valid;
+
+ child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (self));
+
+ valid = gtk_tree_model_get_iter_first (child_model, &iter);
+ while (valid) {
+ NMListItem *item = NULL;
+
+ gtk_tree_model_get (child_model, &iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+ if (item) {
+ if (NM_IS_ETHERNET_ITEM (item)) {
+ gboolean disconnected = nm_list_item_get_status (item) == NM_LIST_ITEM_STATUS_DISCONNECTED;
+
+ if (active && disconnected)
+ nm_list_item_connect (item);
+ else if (!active && !disconnected)
+ nm_list_item_disconnect (item);
+ }
+
+ g_object_unref (item);
+ }
+
+ valid = gtk_tree_model_iter_next (child_model, &iter);
+ }
+}
+
+void
+nmn_model_ethernet_toggled (NmnModel *self,
+ gboolean active)
+{
+ NmnModelPrivate *priv;
+
+ g_return_if_fail (NMN_IS_MODEL (self));
+
+ priv = GET_PRIVATE (self);
+ if (priv->ethernet_active != active) {
+ /* FIXME: Save in gconf? */
+ priv->ethernet_active = active;
+ gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (self));
+ ethernet_set_active (self, active);
+
+ g_signal_emit (self, signals[ETHERNET_TOGGLED], 0, active);
+ }
+}
+
+gboolean
+nmn_model_wifi_can_change (NmnModel *self)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (self), FALSE);
+
+ return nm_client_wireless_hardware_get_enabled (nmn_model_get_client (self));
+}
+
+gboolean
+nmn_model_wifi_get_active (NmnModel *self)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (self), FALSE);
+
+ return GET_PRIVATE (self)->wifi_active;
+}
+
+static void
+wifi_toggled_internal (NmnModel *self, gboolean active)
+{
+ NmnModelPrivate *priv = GET_PRIVATE (self);
+
+ if (priv->wifi_active != active) {
+ /* FIXME: Save in gconf? */
+ priv->wifi_active = active;
+ gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (self));
+
+ g_signal_emit (self, signals[WIFI_TOGGLED], 0, active);
+ }
+}
+
+void
+nmn_model_wifi_toggled (NmnModel *self,
+ gboolean active)
+{
+ g_return_if_fail (NMN_IS_MODEL (self));
+
+ wifi_toggled_internal (self, active);
+ nm_client_wireless_set_enabled (nmn_model_get_client (self), active);
+}
+
+gboolean
+nmn_model_modems_get_active (NmnModel *self)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (self), FALSE);
+
+ return GET_PRIVATE (self)->modems_active;
+}
+
+static void
+modems_deactive (NmnModel *self)
+{
+ GtkTreeModel *child_model;
+ GtkTreeIter iter;
+ gboolean valid;
+
+ child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (self));
+ valid = gtk_tree_model_get_iter_first (child_model, &iter);
+ while (valid) {
+ NMListItem *item = NULL;
+
+ gtk_tree_model_get (child_model, &iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+ if (item) {
+ if ((NM_IS_GSM_ITEM (item) || NM_IS_CDMA_ITEM (item)) &&
+ nm_list_item_get_status (item) != NM_LIST_ITEM_STATUS_DISCONNECTED)
+
+ nm_list_item_disconnect (item);
+
+ g_object_unref (item);
+ }
+
+ valid = gtk_tree_model_iter_next (child_model, &iter);
+ }
+}
+
+void
+nmn_model_modems_toggled (NmnModel *self,
+ gboolean active)
+{
+ NmnModelPrivate *priv;
+
+ g_return_if_fail (NMN_IS_MODEL (self));
+
+ priv = GET_PRIVATE (self);
+ if (priv->modems_active != active) {
+ /* FIXME: Save in gconf? */
+ priv->modems_active = active;
+ gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (self));
+ if (!active)
+ modems_deactive (self);
+
+ g_signal_emit (self, signals[MODEMS_TOGGLED], 0, active);
+ }
+}
+
+gboolean
+nmn_model_bt_get_active (NmnModel *self)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (self), FALSE);
+
+ return GET_PRIVATE (self)->bt_active;
+}
+
+static void
+bt_deactive (NmnModel *self)
+{
+ GtkTreeModel *child_model;
+ GtkTreeIter iter;
+ gboolean valid;
+
+ child_model = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (self));
+ valid = gtk_tree_model_get_iter_first (child_model, &iter);
+ while (valid) {
+ NMListItem *item = NULL;
+
+ gtk_tree_model_get (child_model, &iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+ if (item) {
+ if (NM_IS_BT_ITEM (item) && nm_list_item_get_status (item) != NM_LIST_ITEM_STATUS_DISCONNECTED)
+ nm_list_item_disconnect (item);
+
+ g_object_unref (item);
+ }
+
+ valid = gtk_tree_model_iter_next (child_model, &iter);
+ }
+}
+
+void
+nmn_model_bt_toggled (NmnModel *self,
+ gboolean active)
+{
+ NmnModelPrivate *priv;
+
+ g_return_if_fail (NMN_IS_MODEL (self));
+
+ priv = GET_PRIVATE (self);
+ if (priv->bt_active != active) {
+ /* FIXME: Save in gconf? */
+ priv->bt_active = active;
+ gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (self));
+ if (!active)
+ bt_deactive (self);
+
+ g_signal_emit (self, signals[BT_TOGGLED], 0, active);
+ }
+}
+
+gboolean
+nmn_model_offline_mode_get_active (NmnModel *self)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (self), FALSE);
+
+ return GET_PRIVATE (self)->offline_mode_active;
+}
+
+static void
+offline_mode_toggled_internal (NmnModel *self, gboolean active)
+{
+ NmnModelPrivate *priv = GET_PRIVATE (self);
+
+ if (priv->offline_mode_active != active) {
+ /* FIXME: Save in gconf? */
+ priv->offline_mode_active = active;
+ gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (self));
+
+ g_signal_emit (self, signals[OFFLINE_MODE_TOGGLED], 0, active);
+ }
+}
+
+void
+nmn_model_offline_mode_toggled (NmnModel *self,
+ gboolean active)
+{
+ g_return_if_fail (NMN_IS_MODEL (self));
+
+ offline_mode_toggled_internal (self, active);
+ nm_client_sleep (nmn_model_get_client (self), active);
+}
+
+static void
+nm_client_state_changed (NMClient *client,
+ GParamSpec *gobject,
+ gpointer user_data)
+{
+ offline_mode_toggled_internal (NMN_MODEL (user_data), nm_client_get_state (client) == NM_STATE_ASLEEP);
+}
+
+static void
+nm_wireless_state_changed (NMClient *client,
+ GParamSpec *gobject,
+ gpointer user_data)
+{
+ wifi_toggled_internal (NMN_MODEL (user_data), nm_client_wireless_get_enabled (client));
+}
+
+static gboolean
+model_row_visible_func (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ NMListItem *item = NULL;
+ gboolean visible = FALSE;
+
+ gtk_tree_model_get (model, iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+ if (item) {
+ NmnModelPrivate *priv = GET_PRIVATE (data);
+
+ if (priv->offline_mode_active)
+ visible = FALSE;
+ else if (NM_IS_WIFI_ITEM (item))
+ visible = priv->wifi_active;
+ else if (NM_IS_ETHERNET_ITEM (item))
+ visible = priv->ethernet_active;
+ else if (NM_IS_GSM_ITEM (item) || NM_IS_GSM_PIN_REQUEST_ITEM (item))
+ visible = priv->modems_active;
+ else if (NM_IS_CDMA_ITEM (item))
+ visible = priv->modems_active;
+ else if (NM_IS_BT_ITEM (item))
+ visible = priv->bt_active;
+
+ g_object_unref (item);
+ }
+
+ return visible;
+}
+
+static gboolean
+request_dbus_name (DBusGConnection *bus)
+{
+ DBusGProxy *proxy;
+ GError *error = NULL;
+ int request_name_result;
+
+ dbus_connection_set_change_sigpipe (TRUE);
+ dbus_connection_set_exit_on_disconnect (dbus_g_connection_get_connection (bus), FALSE);
+
+ proxy = dbus_g_proxy_new_for_name (bus,
+ "org.freedesktop.DBus",
+ "/org/freedesktop/DBus",
+ "org.freedesktop.DBus");
+
+ if (!dbus_g_proxy_call (proxy, "RequestName", &error,
+ G_TYPE_STRING, NM_DBUS_SERVICE_USER_SETTINGS,
+ G_TYPE_UINT, DBUS_NAME_FLAG_DO_NOT_QUEUE,
+ G_TYPE_INVALID,
+ G_TYPE_UINT, &request_name_result,
+ G_TYPE_INVALID)) {
+ g_warning ("Could not acquire the NetworkManagerUserSettings service.\n"
+ " Message: '%s'", error->message);
+ g_error_free (error);
+ return FALSE;
+ }
+
+ if (request_name_result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) {
+ g_warning ("Could not acquire the NetworkManagerUserSettings service "
+ "as it is already taken. Return: %d",
+ request_name_result);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+nmn_model_init (NmnModel *model)
+{
+ NmnModelPrivate *priv = GET_PRIVATE (model);
+
+ gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (model),
+ model_row_visible_func, model, NULL);
+
+ /* FIXME: Load from gconf? */
+ priv->ethernet_active = TRUE;
+ priv->wifi_active = TRUE;
+ priv->modems_active = TRUE;
+ priv->bt_active = TRUE;
+ priv->offline_mode_active = FALSE;
+}
+
+static void
+constructed (GObject *object)
+{
+ NmnModelPrivate *priv = GET_PRIVATE (object);
+ NMListModel *child_model;
+ DBusGConnection *bus;
+
+ if (G_OBJECT_CLASS (nmn_model_parent_class)->constructed)
+ G_OBJECT_CLASS (nmn_model_parent_class)->constructed (object);
+
+ child_model = NM_LIST_MODEL (gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (object)));
+
+ priv->client = nm_list_model_get_client (child_model);
+ bus = nm_object_get_connection (NM_OBJECT (priv->client));
+
+ priv->user_settings = NM_SETTINGS_INTERFACE (nm_gconf_settings_new (bus));
+ priv->system_settings = NM_SETTINGS_INTERFACE (nm_remote_settings_system_new (bus));
+
+ nm_list_model_add_settings (child_model, priv->user_settings);
+ nm_list_model_add_settings (child_model, priv->system_settings);
+
+ g_signal_connect (priv->client,
+ "notify::" NM_CLIENT_STATE,
+ G_CALLBACK (nm_client_state_changed),
+ object);
+
+ g_signal_connect (priv->client,
+ "notify::" NM_CLIENT_WIRELESS_ENABLED,
+ G_CALLBACK (nm_wireless_state_changed),
+ object);
+
+ g_signal_connect (priv->client,
+ "notify::" NM_CLIENT_WIRELESS_HARDWARE_ENABLED,
+ G_CALLBACK (nm_wireless_state_changed),
+ object);
+
+ nm_wireless_state_changed (priv->client, NULL, object);
+ nm_client_state_changed (priv->client, NULL, object);
+
+ if (request_dbus_name (bus))
+ dbus_g_connection_register_g_object (bus, NM_DBUS_PATH_SETTINGS, G_OBJECT (priv->user_settings));
+}
+
+static void
+dispose (GObject *object)
+{
+ NmnModelPrivate *priv = GET_PRIVATE (object);
+
+ if (!priv->disposed) {
+ g_signal_handlers_disconnect_by_func (priv->client, gtk_tree_model_filter_refilter, object);
+
+ g_object_unref (priv->user_settings);
+ g_object_unref (priv->system_settings);
+
+ priv->disposed = TRUE;
+ }
+
+ G_OBJECT_CLASS (nmn_model_parent_class)->dispose (object);
+}
+
+static void
+nmn_model_class_init (NmnModelClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ g_type_class_add_private (object_class, sizeof (NmnModelPrivate));
+
+ object_class->constructed = constructed;
+ object_class->dispose = dispose;
+
+ /* signals */
+ signals[ETHERNET_TOGGLED] = g_signal_new
+ ("ethernet-toggled",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NmnModelClass, ethernet_toggled),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
+
+ signals[WIFI_TOGGLED] = g_signal_new
+ ("wifi-toggled",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NmnModelClass, wifi_toggled),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
+
+ signals[MODEMS_TOGGLED] = g_signal_new
+ ("modems-toggled",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NmnModelClass, modems_toggled),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
+
+ signals[BT_TOGGLED] = g_signal_new
+ ("bt-toggled",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NmnModelClass, bt_toggled),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
+
+ signals[OFFLINE_MODE_TOGGLED] = g_signal_new
+ ("offline-mode-toggled",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NmnModelClass, offline_mode_toggled),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
+}
diff --git a/src/nmn-model.h b/src/nmn-model.h
new file mode 100644
index 0000000..c5f3615
--- /dev/null
+++ b/src/nmn-model.h
@@ -0,0 +1,87 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NMN_MODEL_H
+#define NMN_MODEL_H
+
+#include <gtk/gtk.h>
+#include <nm-client.h>
+#include <nm-settings-interface.h>
+
+#define NMN_TYPE_MODEL (nmn_model_get_type ())
+#define NMN_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMN_TYPE_MODEL, NmnModel))
+#define NMN_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMN_TYPE_MODEL, NmnModelClass))
+#define NMN_IS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMN_TYPE_MODEL))
+#define NMN_IS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMN_TYPE_MODEL))
+#define NMN_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMN_TYPE_MODEL, NmnModelClass))
+
+typedef struct {
+ GtkTreeModelFilter parent;
+} NmnModel;
+
+typedef struct {
+ GtkTreeModelFilterClass parent;
+
+ /* Signals */
+ void (*ethernet_toggled) (NmnModel *self,
+ gboolean active);
+
+ void (*wifi_toggled) (NmnModel *self,
+ gboolean active);
+
+ void (*modems_toggled) (NmnModel *self,
+ gboolean active);
+
+ void (*bt_toggled) (NmnModel *self,
+ gboolean active);
+
+ void (*offline_mode_toggled) (NmnModel *self,
+ gboolean active);
+} NmnModelClass;
+
+GType nmn_model_get_type (void);
+
+NmnModel *nmn_model_new (void);
+NMClient *nmn_model_get_client (NmnModel *self);
+
+NMSettingsInterface *nmn_model_get_user_settings (NmnModel *self);
+NMSettingsInterface *nmn_model_get_system_settings (NmnModel *self);
+
+gboolean nmn_model_ethernet_get_active (NmnModel *self);
+void nmn_model_ethernet_toggled (NmnModel *self,
+ gboolean active);
+
+gboolean nmn_model_wifi_can_change (NmnModel *self);
+gboolean nmn_model_wifi_get_active (NmnModel *self);
+void nmn_model_wifi_toggled (NmnModel *self,
+ gboolean active);
+
+gboolean nmn_model_modems_get_active (NmnModel *self);
+void nmn_model_modems_toggled (NmnModel *self,
+ gboolean active);
+
+gboolean nmn_model_bt_get_active (NmnModel *self);
+void nmn_model_bt_toggled (NmnModel *self,
+ gboolean active);
+
+gboolean nmn_model_offline_mode_get_active (NmnModel *self);
+void nmn_model_offline_mode_toggled (NmnModel *self,
+ gboolean active);
+
+#endif /* NMN_MODEL_H */
diff --git a/src/nmn-network-renderer.c b/src/nmn-network-renderer.c
new file mode 100644
index 0000000..ab0355a
--- /dev/null
+++ b/src/nmn-network-renderer.c
@@ -0,0 +1,473 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <string.h>
+#include <glib/gi18n.h>
+#include "nmn-network-renderer.h"
+#include "nm-list-item.h"
+#include "nm-icon-cache.h"
+#include "nm-connection-item.h"
+#include "nm-device-item.h"
+#include "nmn-connection-details.h"
+#include "utils.h"
+
+G_DEFINE_TYPE (NmnNetworkRenderer, nmn_network_renderer, NMN_TYPE_ITEM_RENDERER)
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NMN_TYPE_NETWORK_RENDERER, NmnNetworkRendererPrivate))
+
+typedef struct {
+ GtkBox *vbox; /* child of self */
+ GtkBox *hbox; /* child of vbox */
+
+ GtkImage *icon;
+ GtkLabel *name_and_status;
+ GtkLabel *security_label;
+ GtkWidget *expander;
+ NmnConnectionDetails *details;
+ GtkWidget *connect_button;
+ GtkWidget *remove_button;
+
+ gulong item_changed_id;
+} NmnNetworkRendererPrivate;
+
+static NmnConnectionDetails *get_details (NmnNetworkRenderer *self);
+static void renderer_background_updated (NmnItemRenderer *item_renderer, gboolean prelight);
+
+GtkWidget *
+nmn_network_renderer_new (void)
+{
+ return (GtkWidget *) g_object_new (NMN_TYPE_NETWORK_RENDERER, NULL);
+}
+
+static void
+update_details (NmnNetworkRenderer *self)
+{
+ NmnNetworkRendererPrivate *priv = GET_PRIVATE (self);
+ NMConnection *connection;
+ const char *hw_address;
+ NMSettingIP4Config *setting = NULL;
+ NMIP4Config *config = NULL;
+ NMListItem *item;
+
+ if (!priv->details)
+ return;
+
+ item = nmn_item_renderer_get_item (NMN_ITEM_RENDERER (self));
+ connection = (NMConnection *) nm_connection_item_get_connection (NM_CONNECTION_ITEM (item));
+ if (connection) {
+ NMDevice *device;
+
+ device = nm_device_item_get_device (NM_DEVICE_ITEM (item));
+ setting = (NMSettingIP4Config *) nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+
+ if (device && nm_device_get_state (device) == NM_DEVICE_STATE_ACTIVATED)
+ config = nm_device_get_ip4_config (device);
+ }
+
+ hw_address = nm_device_item_get_hw_address (NM_DEVICE_ITEM (item));
+ nmn_connection_details_set_data (priv->details, setting, config, hw_address);
+}
+
+static void
+item_changed (NMListItem *item,
+ GParamSpec *spec,
+ gpointer user_data)
+{
+ NmnNetworkRenderer *self = NMN_NETWORK_RENDERER (user_data);
+ NmnNetworkRendererPrivate *priv = GET_PRIVATE (self);
+ const char *property = spec ? spec->name : NULL;
+ char *str;
+
+ if (!property || !strcmp (property, NM_LIST_ITEM_NAME) ||
+ !strcmp (property, NM_LIST_ITEM_STATUS) || !strcmp (property, NM_CONNECTION_ITEM_CONNECTION)) {
+ const char *status_str;
+ const char *button_label;
+ NMListItemStatus status;
+
+ status = nm_list_item_get_status (item);
+ switch (status) {
+ case NM_LIST_ITEM_STATUS_CONNECTED:
+ status_str = _("Connected");
+ button_label = _("Disconnect");
+ break;
+ case NM_LIST_ITEM_STATUS_CONNECTING:
+ status_str = _("Connecting");
+ button_label = _("Cancel");
+ break;
+ default:
+ status_str = _("Disconnected");
+ button_label = _("Connect");
+ break;
+ }
+
+ if (NM_IS_CONNECTION_ITEM (item) && nm_connection_item_get_connection (NM_CONNECTION_ITEM (item)))
+ str = g_strdup_printf ("<big><b>%s - %s</b></big>", nm_list_item_get_name (item), status_str);
+ else {
+ const char *available_str = _("Available");
+
+ str = g_strdup_printf ("<big><b>%s - %s</b></big>",
+ nm_list_item_get_name (item),
+ available_str);
+ }
+
+ gtk_label_set_markup (priv->name_and_status, str);
+ g_free (str);
+
+ gtk_button_set_label (GTK_BUTTON (priv->connect_button), button_label);
+ update_details (self);
+ renderer_background_updated (NMN_ITEM_RENDERER (self),
+ nmn_item_renderer_is_prelight (NMN_ITEM_RENDERER (self)));
+ }
+
+ if (!property || !strcmp (property, NM_LIST_ITEM_ICON))
+ gtk_image_set_from_pixbuf (priv->icon, nm_icon_cache_get (nm_list_item_get_icon (item)));
+
+ if (!property || !strcmp (property, NM_LIST_ITEM_SECURITY))
+ gtk_label_set_text (priv->security_label, nm_list_item_get_security (item));
+}
+
+static void
+update_connection_cb (NMSettingsConnectionInterface *connection,
+ GError *error,
+ gpointer user_data)
+{
+ NMListItem *item;
+
+ item = nmn_item_renderer_get_item (NMN_ITEM_RENDERER (user_data));
+
+ if (error) {
+ char *msg;
+
+ msg = g_strdup_printf (_("Could not update connection: %s"), error->message);
+ nm_list_item_warning (item, msg);
+ g_free (msg);
+ } else
+ nm_list_item_connect (item);
+}
+
+static void
+connect_with_updated_details (NmnItemRenderer *self,
+ NMConnection *connection,
+ gboolean new_connection)
+{
+ NmnConnectionDetails *details;
+ gboolean changed = FALSE;
+
+ details = GET_PRIVATE (self)->details;
+ if (details) {
+ NMSetting *current_config;
+ NMSetting *new_config;
+
+ current_config = nm_connection_get_setting (connection, NM_TYPE_SETTING_IP4_CONFIG);
+ new_config = NM_SETTING (nmn_connection_details_get_data (NMN_CONNECTION_DETAILS (details)));
+
+ if (current_config == NULL || nm_setting_compare (current_config, new_config, 0) == FALSE) {
+ nm_connection_add_setting (connection, new_config);
+ changed = TRUE;
+ }
+ }
+
+ if (new_connection) {
+ NMConnectionItem *connection_item = NM_CONNECTION_ITEM (nmn_item_renderer_get_item (self));
+
+ nm_connection_item_new_connection (connection_item, connection, TRUE);
+ g_object_unref (connection);
+ } else if (changed)
+ nm_settings_connection_interface_update (NM_SETTINGS_CONNECTION_INTERFACE (connection),
+ update_connection_cb, self);
+ else
+ nm_list_item_connect (nmn_item_renderer_get_item (self));
+}
+
+static void
+connection_created_cb (GObject *object,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ NMConnection *connection;
+ GError *error = NULL;
+
+ connection = nm_connection_item_create_connection_finish (NM_CONNECTION_ITEM (object), result, &error);
+ if (connection)
+ connect_with_updated_details (NMN_ITEM_RENDERER (user_data), connection, TRUE);
+}
+
+static void
+connect_button_clicked (GtkButton *button, gpointer user_data)
+{
+ NmnItemRenderer *self = NMN_ITEM_RENDERER (user_data);
+ NMListItem *item;
+
+ nmn_item_renderer_hide_error (self);
+
+ item = nmn_item_renderer_get_item (self);
+ if (nm_list_item_get_status (item) == NM_LIST_ITEM_STATUS_DISCONNECTED) {
+ NMConnectionItem *connection_item;
+ NMConnection *connection;
+
+ connection_item = NM_CONNECTION_ITEM (nmn_item_renderer_get_item (self));
+ connection = (NMConnection *) nm_connection_item_get_connection (connection_item);
+ if (connection)
+ connect_with_updated_details (self, connection, FALSE);
+ else
+ /* We don't have a connection yet, so create one */
+ nm_connection_item_create_connection (connection_item, connection_created_cb, self);
+ } else
+ nm_list_item_disconnect (item);
+}
+
+static void
+details_changed (NmnConnectionDetails *details,
+ gboolean complete,
+ gpointer user_data)
+{
+ NmnNetworkRendererPrivate *priv = GET_PRIVATE (user_data);
+
+ nmn_item_renderer_hide_error (NMN_ITEM_RENDERER (user_data));
+ gtk_widget_set_sensitive (GTK_WIDGET (priv->connect_button), complete);
+}
+
+static NmnConnectionDetails *
+get_details (NmnNetworkRenderer *self)
+{
+ NmnNetworkRendererPrivate *priv = GET_PRIVATE (self);
+ GtkWidget *alignment;
+ NMListItem *item;
+
+ if (priv->details)
+ return priv->details;
+
+ item = nmn_item_renderer_get_item (NMN_ITEM_RENDERER (self));
+ if (!NM_IS_DEVICE_ITEM (item) || !nm_device_item_get_device (NM_DEVICE_ITEM (item)))
+ return NULL;
+
+ priv->details = nmn_connection_details_new ();
+ update_details (self);
+
+ alignment = gtk_alignment_new (0, 0, 0, 0);
+ gtk_container_add (GTK_CONTAINER (alignment), GTK_WIDGET (priv->details));
+ gtk_widget_show (alignment);
+ gtk_box_pack_end (priv->vbox, alignment, FALSE, FALSE, 0);
+
+ g_signal_connect (priv->details, "changed", G_CALLBACK (details_changed), self);
+ details_changed (priv->details, nmn_connection_details_verify (priv->details), self);
+
+ return priv->details;
+}
+
+static void
+advanced_expanded (GtkExpander *expander,
+ GParamSpec *param_spec,
+ gpointer user_data)
+{
+ NmnConnectionDetails *details;
+
+ nmn_item_renderer_hide_error (NMN_ITEM_RENDERER (user_data));
+ details = get_details (NMN_NETWORK_RENDERER (user_data));
+ if (details)
+ g_object_set (details, "visible", gtk_expander_get_expanded (expander), NULL);
+}
+
+static void
+remove_button_clicked (GtkButton *button, gpointer user_data)
+{
+ NmnItemRenderer *renderer = NMN_ITEM_RENDERER (user_data);
+ GtkDialog *dialog;
+ GtkWidget *label;
+ const char *name;
+ char *label_text;
+ NMListItem *item;
+
+ nmn_item_renderer_hide_error (renderer);
+ item = nmn_item_renderer_get_item (renderer);
+ dialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Really remove?"),
+ NULL,
+ GTK_DIALOG_MODAL |
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ _("No, save"),
+ GTK_RESPONSE_REJECT,
+ _("Yes, delete"),
+ GTK_RESPONSE_ACCEPT,
+ NULL));
+
+ gtk_dialog_set_has_separator (dialog, FALSE);
+ gtk_dialog_set_default_response (dialog, GTK_RESPONSE_ACCEPT);
+ gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
+ gtk_window_set_icon_name (GTK_WINDOW (dialog), GTK_STOCK_DELETE);
+
+ name = nm_list_item_get_name (item);
+ label_text = g_strdup_printf (_("Do you want to remove the '%s' %s network? "
+ "This\nwill forget the password and you will"
+ " no longer be\nautomatically connected to "
+ "'%s'."),
+ name,
+ nm_list_item_get_type_name (item),
+ name);
+
+ label = gtk_label_new (label_text);
+ g_free (label_text);
+
+ gtk_box_set_spacing (GTK_BOX (dialog->vbox), 12);
+ gtk_box_pack_start (GTK_BOX (dialog->vbox), label, TRUE, TRUE, 6);
+ gtk_widget_show_all (GTK_WIDGET (dialog));
+
+ if (gtk_dialog_run (dialog) == GTK_RESPONSE_ACCEPT)
+ nm_list_item_delete (item);
+
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+ nm_utils_dialog_done ();
+}
+
+static void
+init_widgets (NmnNetworkRenderer *self)
+{
+ NmnNetworkRendererPrivate *priv = GET_PRIVATE (self);
+ GtkWidget *parent_container;
+ GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *w;
+
+ parent_container = nmn_item_renderer_get_content_area (NMN_ITEM_RENDERER (self));
+
+ priv->vbox = GTK_BOX (gtk_vbox_new (FALSE, 6));
+ gtk_container_set_border_width (GTK_CONTAINER (priv->vbox), 6);
+ gtk_container_add (GTK_CONTAINER (parent_container), GTK_WIDGET (priv->vbox));
+
+ priv->hbox = GTK_BOX (gtk_hbox_new (FALSE, 6));
+ gtk_container_set_border_width (GTK_CONTAINER (priv->hbox), 6);
+ gtk_box_pack_start (priv->vbox, GTK_WIDGET (priv->hbox), FALSE, FALSE, 0);
+
+ priv->icon = GTK_IMAGE (gtk_image_new ());
+ gtk_box_pack_start (priv->hbox, GTK_WIDGET (priv->icon), FALSE, FALSE, 0);
+
+ vbox = gtk_vbox_new (FALSE, 0);
+ gtk_box_pack_start (priv->hbox, vbox, FALSE, FALSE, 0);
+
+ w = gtk_label_new ("");
+ gtk_label_set_use_markup (GTK_LABEL (w), TRUE);
+ gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5);
+ gtk_box_pack_start (GTK_BOX (vbox), w, FALSE, FALSE, 0);
+ priv->name_and_status = GTK_LABEL (w);
+
+ hbox = gtk_hbox_new (FALSE, 12);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+
+ w = gtk_label_new ("");
+ gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+ priv->security_label = GTK_LABEL (w);
+
+ /* FIXME: this should be visibile only for NMDeviceItems */
+ w = gtk_expander_new (_("Advanced"));
+ gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+ priv->expander = w;
+ g_signal_connect (w, "notify::expanded", G_CALLBACK (advanced_expanded), self);
+
+ w = gtk_button_new_with_label (_("Connect"));
+ gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0);
+ priv->connect_button = w;
+ g_signal_connect (w, "clicked", G_CALLBACK (connect_button_clicked), self);
+
+ /* Remove button */
+ vbox = gtk_vbox_new (FALSE, 0);
+ gtk_box_pack_end (priv->hbox, vbox, FALSE, FALSE, 0);
+
+ w = gtk_button_new ();
+ gtk_widget_set_no_show_all (w, TRUE);
+ gtk_button_set_image (GTK_BUTTON (w),
+ gtk_image_new_from_icon_name ("edit-clear", GTK_ICON_SIZE_MENU));
+
+ gtk_button_set_relief (GTK_BUTTON (w), GTK_RELIEF_NONE);
+ gtk_button_set_image_position (GTK_BUTTON (w), GTK_POS_RIGHT);
+ gtk_widget_set_tooltip_text (w, _("Remove connection"));
+ gtk_box_pack_start (GTK_BOX (vbox), w, TRUE, FALSE, 0);
+ priv->remove_button = w;
+ g_signal_connect (w, "clicked", G_CALLBACK (remove_button_clicked), self);
+
+ gtk_widget_show_all (GTK_WIDGET (self));
+}
+
+static void
+renderer_background_updated (NmnItemRenderer *item_renderer,
+ gboolean prelight)
+{
+ NmnNetworkRendererPrivate *priv = GET_PRIVATE (item_renderer);
+ NMListItem *item;
+ gboolean show_delete;
+
+ item = nmn_item_renderer_get_item (item_renderer);
+ if (prelight && item && nm_list_item_get_show_delete (item))
+ show_delete = TRUE;
+ else
+ show_delete = FALSE;
+
+ g_object_set (priv->connect_button, "visible", prelight, NULL);
+ g_object_set (priv->remove_button, "visible", show_delete, NULL);
+ g_object_set (priv->expander, "visible", prelight, NULL);
+}
+
+static void
+renderer_item_changed (NmnItemRenderer *item_renderer)
+{
+ NmnNetworkRendererPrivate *priv = GET_PRIVATE (item_renderer);
+ NMListItem *item;
+
+ init_widgets (NMN_NETWORK_RENDERER (item_renderer));
+
+ item = nmn_item_renderer_get_item (item_renderer);
+ if (item) {
+ priv->item_changed_id = g_signal_connect (item, "notify", G_CALLBACK (item_changed), item_renderer);
+ item_changed (item, NULL, item_renderer);
+ }
+ /* FIXME: disconnect previous handlers */
+}
+
+static void
+nmn_network_renderer_init (NmnNetworkRenderer *item)
+{
+}
+
+static void
+dispose (GObject *object)
+{
+ NmnNetworkRendererPrivate *priv = GET_PRIVATE (object);
+
+ if (priv->item_changed_id) {
+ NMListItem *item;
+
+ item = nmn_item_renderer_get_item (NMN_ITEM_RENDERER (object));
+ g_signal_handler_disconnect (item, priv->item_changed_id);
+ priv->item_changed_id = 0;
+ }
+
+ G_OBJECT_CLASS (nmn_network_renderer_parent_class)->dispose (object);
+}
+
+static void
+nmn_network_renderer_class_init (NmnNetworkRendererClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+ NmnItemRendererClass *renderer_class = NMN_ITEM_RENDERER_CLASS (class);
+
+ g_type_class_add_private (object_class, sizeof (NmnNetworkRendererPrivate));
+
+ object_class->dispose = dispose;
+
+ renderer_class->background_updated = renderer_background_updated;
+ renderer_class->item_changed = renderer_item_changed;
+}
diff --git a/src/nmn-network-renderer.h b/src/nmn-network-renderer.h
new file mode 100644
index 0000000..cd11da3
--- /dev/null
+++ b/src/nmn-network-renderer.h
@@ -0,0 +1,45 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NMN_NETWORK_RENDERER_H
+#define NMN_NETWORK_RENDERER_H
+
+#include <gtk/gtk.h>
+#include "nmn-item-renderer.h"
+
+#define NMN_TYPE_NETWORK_RENDERER (nmn_network_renderer_get_type ())
+#define NMN_NETWORK_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMN_TYPE_NETWORK_RENDERER, NmnNetworkRenderer))
+#define NMN_NETWORK_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMN_TYPE_NETWORK_RENDERER, NmnNetworkRendererClass))
+#define NMN_IS_NETWORK_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMN_TYPE_NETWORK_RENDERER))
+#define NMN_IS_NETWORK_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMN_TYPE_NETWORK_RENDERER))
+#define NMN_NETWORK_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMN_TYPE_NETWORK_RENDERER, NmnNetworkRendererClass))
+
+typedef struct {
+ NmnItemRenderer parent;
+} NmnNetworkRenderer;
+
+typedef struct {
+ NmnItemRendererClass parent;
+} NmnNetworkRendererClass;
+
+GType nmn_network_renderer_get_type (void);
+
+GtkWidget *nmn_network_renderer_new (void);
+
+#endif /* NMN_NETWORK_RENDERER_H */
diff --git a/src/nmn-new-connection.c b/src/nmn-new-connection.c
new file mode 100644
index 0000000..a8350a2
--- /dev/null
+++ b/src/nmn-new-connection.c
@@ -0,0 +1,832 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <arpa/inet.h>
+#include <glib/gi18n.h>
+#include <NetworkManager.h>
+#include <nm-gsm-device.h>
+#include <nm-cdma-device.h>
+#include <nm-connection.h>
+#include <nm-settings-interface.h>
+#include <nm-setting-connection.h>
+#include <nm-setting-serial.h>
+#include <nm-setting-ppp.h>
+#include <nm-setting-gsm.h>
+#include <nm-setting-cdma.h>
+#include <nm-setting-ip4-config.h>
+#include <nm-utils.h>
+#include <nm-mobile-providers.h>
+#include "nmn-new-connection.h"
+#include "nm-list-model.h"
+#include "nm-wifi-item.h"
+#include "nm-gsm-pin-request-item.h"
+#include "nm-gconf-settings.h"
+#include "nmn-list.h"
+#include "wireless-dialog.h"
+
+G_DEFINE_TYPE (NmnNewConnection, nmn_new_connection, GTK_TYPE_VBOX)
+
+enum {
+ PROP_0,
+ PROP_MODEL,
+
+ LAST_PROP
+};
+
+enum {
+ CLOSE,
+
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NMN_TYPE_NEW_CONNECTION, NmnNewConnectionPrivate))
+
+typedef struct {
+ NmnModel *model;
+
+ /* WiFi widgets */
+ GtkWidget *wifi_list_container;
+ GtkWidget *wifi_list;
+
+ /* 3G widgets */
+ GtkWidget *mobile_label;
+ GtkWidget *mobile_list;
+ GtkWidget *mobile_save;
+ gboolean mobile_list_populated;
+ gulong mobile_toggled_id;
+
+ gboolean disposed;
+} NmnNewConnectionPrivate;
+
+GtkWidget *
+nmn_new_connection_create (NmnModel *model)
+{
+ g_return_val_if_fail (NMN_IS_MODEL (model), NULL);
+
+ return GTK_WIDGET (g_object_new (NMN_TYPE_NEW_CONNECTION,
+ NMN_NEW_CONNECTION_MODEL, model,
+ NULL));
+}
+
+static void
+connect_requested (gpointer instance, gpointer user_data)
+{
+ gtk_widget_hide (GTK_WIDGET (user_data));
+}
+
+static void
+connect_cb (gpointer user_data,
+ const char *object_path,
+ GError *error)
+{
+ /* FIXME: Report the error somewhere */
+ g_warning ("connect_cb: %s %s", object_path,
+ error ? error->message : "success");
+}
+
+static void
+save_timestamp_cb (NMSettingsConnectionInterface *connection,
+ GError *error,
+ gpointer user_data)
+{
+ if (error) {
+ g_warning ("Error saving connection %s timestamp: (%d) %s",
+ nm_connection_get_path (NM_CONNECTION (connection)),
+ error->code,
+ error->message);
+ }
+}
+
+static gboolean
+save_connection (NmnModel *model, NMConnection *connection)
+{
+ NMSettingConnection *s_con;
+ NMSettingsConnectionInterface *gconf_connection;
+ NMGConfSettings *settings;
+
+ settings = NM_GCONF_SETTINGS (nmn_model_get_user_settings (model));
+
+ gconf_connection = nm_settings_interface_get_connection_by_path (NM_SETTINGS_INTERFACE (settings),
+ nm_connection_get_path (connection));
+ if (!gconf_connection)
+ return FALSE;
+ s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION));
+ g_object_set (s_con, NM_SETTING_CONNECTION_TIMESTAMP, (guint64) time (NULL), NULL);
+ nm_settings_connection_interface_update (gconf_connection, save_timestamp_cb, NULL);
+
+ return TRUE;
+}
+
+static void
+wifi_dialog_done (NMAWirelessDialog *dialog,
+ gint response,
+ gpointer user_data)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (user_data);
+ NMConnection *connection;
+
+ if (response != GTK_RESPONSE_OK)
+ goto done;
+
+ connection = nma_wireless_dialog_get_connection (dialog);
+ save_connection (priv->model, connection);
+
+ nm_client_activate_connection (nmn_model_get_client (priv->model),
+ NM_DBUS_SERVICE_USER_SETTINGS,
+ nm_connection_get_path (connection),
+ nma_wireless_dialog_get_device (dialog),
+ "/",
+ connect_cb,
+ NULL);
+
+ done:
+ gtk_widget_hide (GTK_WIDGET (dialog));
+ gtk_widget_destroy (GTK_WIDGET (dialog));
+}
+
+static void
+wifi_search (GtkButton *button, gpointer user_data)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (user_data);
+ GtkWidget *dialog;
+
+ dialog = nma_wireless_dialog_hidden_new (nmn_model_get_client (priv->model));
+ g_signal_connect (dialog, "done", G_CALLBACK (wifi_dialog_done), user_data);
+ nma_wireless_dialog_show (NMA_WIRELESS_DIALOG (dialog));
+}
+
+static gboolean
+wifi_model_visible_func (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ NMListItem *item = NULL;
+ gboolean visible = FALSE;
+
+ gtk_tree_model_get (model, iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+ if (item) {
+ /* Show unconfigured WiFi items */
+ if (NM_IS_WIFI_ITEM (item) && !nm_connection_item_get_connection (NM_CONNECTION_ITEM (item)))
+ visible = TRUE;
+
+ g_object_unref (item);
+ }
+
+ return visible;
+}
+
+static void
+wifi_page_init (NmnNewConnection *connection)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (connection);
+ GtkTreeModel *wifi_model;
+
+ wifi_model = gtk_tree_model_filter_new (GTK_TREE_MODEL (priv->model), NULL);
+ gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (wifi_model),
+ wifi_model_visible_func, NULL, NULL);
+
+ priv->wifi_list = nmn_list_new_with_model (wifi_model);
+ g_object_unref (wifi_model);
+ //g_signal_connect (priv->wifi_list, "connect-requested", G_CALLBACK (connect_requested), connection);
+ gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (priv->wifi_list_container), priv->wifi_list);
+ gtk_widget_show_all (priv->wifi_list);
+}
+
+/* Mobile */
+
+#define MOBILE_COL_NAME 0
+#define MOBILE_COL_PROVIDER 1
+#define MOBILE_COL_METHOD 2
+
+static gboolean
+mobile_have_device (NmnNewConnection *connection, NMMobileProviderType *type)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (connection);
+ NMClient *client;
+ const GPtrArray *devices;
+ int i;
+ gboolean found = FALSE;
+
+ client = nmn_model_get_client (priv->model);
+ devices = nm_client_get_devices (client);
+ for (i = 0; !found && devices && i < devices->len; i++) {
+ NMDevice *device = NM_DEVICE (g_ptr_array_index (devices, i));
+
+ if (NM_IS_GSM_DEVICE (device)) {
+ found = TRUE;
+ *type = NM_MOBILE_ACCESS_METHOD_TYPE_GSM;
+ }
+
+ if (NM_IS_CDMA_DEVICE (device)) {
+ found = TRUE;
+ *type = NM_MOBILE_ACCESS_METHOD_TYPE_CDMA;
+ }
+ }
+
+ return found;
+}
+
+static gboolean
+gsm_is_locked (NmnModel *nmn_model)
+{
+ GtkTreeModel *model = GTK_TREE_MODEL (nmn_model);
+ GtkTreeIter iter;
+ gboolean valid;
+ gboolean found = FALSE;
+
+ valid = gtk_tree_model_get_iter_first (model, &iter);
+ while (valid && !found) {
+ NMListItem *item = NULL;
+
+ gtk_tree_model_get (model, &iter, NM_LIST_MODEL_COL_ITEM, &item, -1);
+ if (item) {
+ if (NM_IS_GSM_PIN_REQUEST_ITEM (item))
+ found = TRUE;
+
+ g_object_unref (item);
+ }
+
+ valid = gtk_tree_model_iter_next (model, &iter);
+ }
+
+ return found;
+}
+
+static void
+mobile_status_update (NmnNewConnection *connection)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (connection);
+ NMMobileProviderType type;
+ gboolean active;
+
+ if (!nmn_model_modems_get_active (priv->model)) {
+ active = FALSE;
+ gtk_label_set_text (GTK_LABEL (priv->mobile_label), _("3G disabled"));
+ } else {
+ active = mobile_have_device (connection, &type);
+
+ if (active) {
+ if (type == NM_MOBILE_ACCESS_METHOD_TYPE_GSM && gsm_is_locked (priv->model)) {
+ gtk_label_set_text (GTK_LABEL (priv->mobile_label), _("3G modem is locked"));
+ active = FALSE;
+ } else
+ gtk_label_set_text (GTK_LABEL (priv->mobile_label), _("Internal 3G modem and SIM card detected"));
+ } else
+ gtk_label_set_text (GTK_LABEL (priv->mobile_label), _("No modems detected"));
+ }
+
+ gtk_widget_set_sensitive (priv->mobile_list, active);
+ gtk_widget_set_sensitive (priv->mobile_save, active);
+}
+
+static gboolean
+method_list_has_type (GSList *list, NMMobileProviderType type)
+{
+ GSList *iter;
+
+ for (iter = list; iter; iter = iter->next) {
+ NMMobileAccessMethod *method = iter->data;
+
+ if (method->type == type)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static gboolean
+provider_list_has_type (GSList *list, NMMobileProviderType type)
+{
+ GSList *iter;
+
+ for (iter = list; iter; iter = iter->next) {
+ NMMobileProvider *provider = (NMMobileProvider *) iter->data;
+
+ if (method_list_has_type (provider->methods, type))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+typedef struct {
+ GtkTreeStore *store;
+ NMMobileProviderType provider_type;
+
+ GtkTreeIter *parent_iter;
+} MobilePopulateInfo;
+
+static void
+add_one_method (gpointer data, gpointer user_data)
+{
+ NMMobileAccessMethod *method = (NMMobileAccessMethod *) data;
+ MobilePopulateInfo *info = (MobilePopulateInfo *) user_data;
+ GtkTreeIter iter;
+
+ if (method->type != info->provider_type)
+ return;
+
+ gtk_tree_store_append (info->store, &iter, info->parent_iter);
+
+ if (method->type == NM_MOBILE_ACCESS_METHOD_TYPE_GSM) {
+ char *txt;
+
+ txt = g_strdup_printf ("%s (APN %s)", method->name, method->gsm_apn);
+ gtk_tree_store_set (info->store, &iter,
+ MOBILE_COL_NAME, txt,
+ MOBILE_COL_METHOD, method,
+ -1);
+
+ g_free (txt);
+ } else {
+ gtk_tree_store_set (info->store, &iter,
+ MOBILE_COL_NAME, method->name,
+ MOBILE_COL_METHOD, method,
+ -1);
+ }
+}
+
+static void
+add_one_provider (gpointer data, gpointer user_data)
+{
+ NMMobileProvider *provider = (NMMobileProvider *) data;
+ MobilePopulateInfo *info = (MobilePopulateInfo *) user_data;
+ GtkTreeIter *country_iter;
+ GtkTreeIter iter;
+
+ if (!method_list_has_type (provider->methods, info->provider_type))
+ return;
+
+ gtk_tree_store_append (info->store, &iter, info->parent_iter);
+ gtk_tree_store_set (info->store, &iter,
+ MOBILE_COL_NAME, provider->name,
+ MOBILE_COL_PROVIDER, provider,
+ -1);
+
+ country_iter = info->parent_iter;
+ info->parent_iter = &iter;
+ g_slist_foreach (provider->methods, add_one_method, info);
+ info->parent_iter = country_iter;
+}
+
+static void
+add_one_country (gpointer key, gpointer value, gpointer user_data)
+{
+ GSList *providers = (GSList *) value;
+ MobilePopulateInfo *info = (MobilePopulateInfo *) user_data;
+ GtkTreeIter iter;
+
+ if (!provider_list_has_type (providers, info->provider_type))
+ return;
+
+ gtk_tree_store_append (info->store, &iter, NULL);
+ gtk_tree_store_set (info->store, &iter,
+ MOBILE_COL_NAME, key,
+ -1);
+
+ info->parent_iter = &iter;
+ g_slist_foreach (providers, add_one_provider, info);
+}
+
+static void
+mobile_list_populate (NmnNewConnection *connection)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (connection);
+ GHashTable *mobile_providers;
+ GtkTreeStore *store;
+ GtkTreeModel *sort_model;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
+ NMMobileProviderType provider_type;
+ MobilePopulateInfo info;
+
+ if (priv->mobile_list_populated || !mobile_have_device (connection, &provider_type))
+ return;
+
+ mobile_providers = nm_mobile_providers_parse (NULL);
+ if (!mobile_providers)
+ return;
+
+ store = gtk_tree_store_new (3, G_TYPE_STRING, NM_TYPE_MOBILE_PROVIDER, NM_TYPE_MOBILE_ACCESS_METHOD);
+
+ info.store = store;
+ info.provider_type = provider_type;
+ g_hash_table_foreach (mobile_providers, add_one_country, &info);
+ g_hash_table_destroy (mobile_providers);
+
+ sort_model = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (store));
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sort_model),
+ MOBILE_COL_NAME, GTK_SORT_ASCENDING);
+
+ gtk_tree_view_set_model (GTK_TREE_VIEW (priv->mobile_list), sort_model);
+
+ renderer = gtk_cell_renderer_text_new ();
+ column = gtk_tree_view_column_new_with_attributes ("Country",
+ renderer,
+ "text", MOBILE_COL_NAME,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (priv->mobile_list), column);
+ gtk_tree_view_column_set_clickable (column, TRUE);
+
+ priv->mobile_list_populated = TRUE;
+}
+
+static void
+mobile_tree_selection_changed (GtkTreeSelection *selection,
+ gpointer user_data)
+{
+ NmnNewConnection *connection = (NmnNewConnection *) user_data;
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (connection);
+ GtkTreeModel *model;
+ NMMobileAccessMethod *method = NULL;
+ GtkTreeIter iter;
+
+ if (gtk_tree_selection_get_selected (selection, &model, &iter))
+ gtk_tree_model_get (model, &iter, MOBILE_COL_METHOD, &method, -1);
+
+ gtk_widget_set_sensitive (priv->mobile_save, method != NULL);
+ if (method)
+ nm_mobile_access_method_unref (method);
+}
+
+static NMConnection *
+mobile_new_connection (NMMobileProvider *provider,
+ NMMobileAccessMethod *method)
+{
+ NMConnection *connection;
+ NMSetting *type_setting;
+ NMSetting *setting;
+ char *name;
+ char *uuid;
+
+ connection = nm_connection_new ();
+
+ if (method->type == NM_MOBILE_ACCESS_METHOD_TYPE_GSM) {
+ type_setting = nm_setting_gsm_new ();
+ g_object_set (type_setting,
+ NM_SETTING_GSM_NUMBER, "*99#",
+ NM_SETTING_GSM_USERNAME, method->username,
+ NM_SETTING_GSM_PASSWORD, method->password,
+ NM_SETTING_GSM_APN, method->gsm_apn,
+ NULL);
+
+ /* FIXME: Choose the network_id more intelligently */
+ if (g_slist_length (method->gsm_mcc_mnc) == 1) {
+ NMGsmMccMnc *mcc_mnc = (NMGsmMccMnc *) method->gsm_mcc_mnc->data;
+ char *network_id;
+
+ network_id = g_strconcat (mcc_mnc->mcc, mcc_mnc->mnc, NULL);
+ g_object_set (type_setting,
+ NM_SETTING_GSM_NETWORK_ID, network_id,
+ NULL);
+
+ g_free (network_id);
+ }
+ } else if (method->type == NM_MOBILE_ACCESS_METHOD_TYPE_CDMA) {
+ type_setting = nm_setting_cdma_new ();
+ g_object_set (type_setting, NM_SETTING_CDMA_NUMBER, "#777", NULL);
+ } else
+ g_assert_not_reached ();
+
+ nm_connection_add_setting (connection, type_setting);
+
+ if (method->gateway || method->dns) {
+ GSList *iter;
+
+ setting = nm_setting_ip4_config_new ();
+ g_object_set (setting, NM_SETTING_IP4_CONFIG_METHOD, NM_SETTING_IP4_CONFIG_METHOD_AUTO, NULL);
+
+ for (iter = method->dns; iter; iter = iter->next) {
+ struct in_addr addr;
+
+ if (inet_pton (AF_INET, (char *) iter->data, &addr) > 0)
+ nm_setting_ip4_config_add_dns (NM_SETTING_IP4_CONFIG (setting), addr.s_addr);
+ }
+
+ /* I'd rather not use the gateway from providers database */
+ /* if (method->gateway) */
+
+ nm_connection_add_setting (connection, setting);
+ }
+
+ /* Serial setting */
+ setting = nm_setting_serial_new ();
+ g_object_set (setting,
+ NM_SETTING_SERIAL_BAUD, 115200,
+ NM_SETTING_SERIAL_BITS, 8,
+ NM_SETTING_SERIAL_PARITY, 'n',
+ NM_SETTING_SERIAL_STOPBITS, 1,
+ NULL);
+
+ nm_connection_add_setting (connection, setting);
+
+ setting = nm_setting_ppp_new ();
+ nm_connection_add_setting (connection, setting);
+
+ setting = nm_setting_connection_new ();
+ uuid = nm_utils_uuid_generate ();
+ name = g_strdup_printf ("Mobile %s", provider->name);
+
+ g_object_set (setting,
+ NM_SETTING_CONNECTION_ID, name,
+ NM_SETTING_CONNECTION_TYPE, nm_setting_get_name (type_setting),
+ NM_SETTING_CONNECTION_AUTOCONNECT, FALSE,
+ NM_SETTING_CONNECTION_UUID, uuid,
+ NULL);
+ g_free (uuid);
+ g_free (name);
+ nm_connection_add_setting (connection, setting);
+
+ return connection;
+}
+
+static void
+mobile_save_clicked (GtkButton *button, gpointer user_data)
+{
+ NmnNewConnection *self = (NmnNewConnection *) user_data;
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (self);
+ GtkTreeSelection *selection;
+ GtkTreeModel *model;
+ NMMobileProvider *provider = NULL;
+ NMMobileAccessMethod *method = NULL;
+ GtkTreeIter method_iter;
+ GtkTreeIter provider_iter;
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->mobile_list));
+ if (!gtk_tree_selection_get_selected (selection, &model, &method_iter))
+ return;
+
+ if (!gtk_tree_model_iter_parent (model, &provider_iter, &method_iter))
+ return;
+
+ gtk_tree_model_get (model, &method_iter, MOBILE_COL_METHOD, &method, -1);
+ gtk_tree_model_get (model, &provider_iter, MOBILE_COL_PROVIDER, &provider, -1);
+
+ if (provider && method) {
+ NMConnection *connection;
+
+ connection = NULL;
+ connection = mobile_new_connection (provider, method);
+
+ if (connection) {
+ nm_gconf_settings_add_connection (NM_GCONF_SETTINGS (nmn_model_get_user_settings (priv->model)),
+ connection);
+ g_object_unref (connection);
+ }
+
+ gtk_widget_hide (GTK_WIDGET (self));
+ }
+
+ if (provider)
+ nm_mobile_provider_unref (provider);
+
+ if (method)
+ nm_mobile_access_method_unref (method);
+}
+
+static void
+mobile_device_added (NMClient *client,
+ NMDevice *device,
+ gpointer user_data)
+{
+ if (NM_IS_GSM_DEVICE (device) || NM_IS_CDMA_DEVICE (device)) {
+ NmnNewConnection *connection = NMN_NEW_CONNECTION (user_data);
+
+ mobile_list_populate (connection);
+ }
+}
+
+static void
+mobile_page_init (NmnNewConnection *connection)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (connection);
+ NMClient *client = nmn_model_get_client (priv->model);
+
+ g_signal_connect (client, "device-added", G_CALLBACK (mobile_device_added), connection);
+ g_signal_connect_swapped (client, "device-removed", G_CALLBACK (mobile_status_update), connection);
+
+ priv->mobile_toggled_id = g_signal_connect_swapped (priv->model, "modems-toggled",
+ G_CALLBACK (mobile_status_update),
+ connection);
+}
+
+void
+nmn_new_connection_update (NmnNewConnection *self)
+{
+ g_return_if_fail (NMN_IS_NEW_CONNECTION (self));
+
+ mobile_list_populate (self);
+ mobile_status_update (self);
+}
+
+static void
+close (NmnNewConnection *self)
+{
+ g_signal_emit (self, signals[CLOSE], 0);
+}
+
+static void
+nmn_new_connection_init (NmnNewConnection *self)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (self);
+ GtkWidget *w;
+ GtkWidget *notebook;
+ GtkWidget *box;
+ GtkWidget *button;
+ GtkTreeSelection *selection;
+ char *label;
+
+ gtk_box_set_spacing (GTK_BOX (self), 6);
+ gtk_container_set_border_width (GTK_CONTAINER (self), 6);
+
+ label = g_strdup_printf ("<big><b>%s</b></big>", _("Add a new connection"));
+ w = gtk_label_new (NULL);
+ gtk_label_set_markup (GTK_LABEL (w), label);
+ g_free (label);
+ gtk_misc_set_alignment (GTK_MISC (w), 0.0, 0.5);
+ gtk_box_pack_start (GTK_BOX (self), w, FALSE, FALSE, 0);
+
+ notebook = gtk_notebook_new ();
+ gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook), GTK_POS_LEFT);
+ gtk_box_pack_start (GTK_BOX (self), notebook, TRUE, TRUE, 0);
+
+ /* WiFi page */
+ box = gtk_vbox_new (FALSE, 6);
+ priv->wifi_list_container = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (priv->wifi_list_container),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_box_pack_start (GTK_BOX (box), priv->wifi_list_container, TRUE, TRUE, 0);
+
+ w = gtk_alignment_new (0.0, 0.5, 0.0, 1.0);
+ gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE, 0);
+ button = gtk_button_new_with_label (_("Hidden network"));
+ gtk_container_add (GTK_CONTAINER (w), button);
+ g_signal_connect (button, "clicked", G_CALLBACK (wifi_search), self);
+ g_signal_connect (button, "clicked", G_CALLBACK (connect_requested), self);
+
+ gtk_notebook_append_page (GTK_NOTEBOOK (notebook), box, gtk_label_new (_("WiFi")));
+
+ /* 3G page */
+ box = gtk_vbox_new (FALSE, 6);
+ priv->mobile_label = gtk_label_new (NULL);
+ gtk_misc_set_alignment (GTK_MISC (priv->mobile_label), 0.0, 0.5);
+ gtk_box_pack_start (GTK_BOX (box), priv->mobile_label, FALSE, TRUE, 0);
+
+ w = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (w), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0);
+
+ priv->mobile_list = gtk_tree_view_new ();
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (priv->mobile_list), FALSE);
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->mobile_list));
+ gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+ g_signal_connect (selection, "changed", G_CALLBACK (mobile_tree_selection_changed), self);
+ gtk_container_add (GTK_CONTAINER (w), priv->mobile_list);
+
+ w = gtk_alignment_new (0.0, 0.5, 0.0, 1.0);
+ gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE, 0);
+ priv->mobile_save = gtk_button_new_with_label (_("Save connection"));
+ gtk_container_add (GTK_CONTAINER (w), priv->mobile_save);
+ g_signal_connect (priv->mobile_save, "clicked", G_CALLBACK (mobile_save_clicked), self);
+
+ gtk_notebook_append_page (GTK_NOTEBOOK (notebook), box, gtk_label_new (_("3G")));
+
+ /* Close button */
+ w = gtk_alignment_new (0.0, 0.5, 0.0, 1.0);
+ gtk_box_pack_start (GTK_BOX (self), w, FALSE, FALSE, 0);
+ button = gtk_button_new_with_label (_("Return to Networking"));
+ gtk_container_add (GTK_CONTAINER (w), button);
+ g_signal_connect_swapped (button, "clicked", G_CALLBACK (close), self);
+
+ gtk_widget_show_all (GTK_WIDGET (self));
+}
+
+static GObject*
+constructor (GType type,
+ guint n_construct_params,
+ GObjectConstructParam *construct_params)
+{
+ GObject *object;
+ NmnNewConnectionPrivate *priv;
+
+ object = G_OBJECT_CLASS (nmn_new_connection_parent_class)->constructor
+ (type, n_construct_params, construct_params);
+
+ if (!object)
+ return NULL;
+
+ priv = GET_PRIVATE (object);
+
+ if (!priv->model) {
+ g_warning ("Missing constructor arguments");
+ g_object_unref (object);
+ return NULL;
+ }
+
+ wifi_page_init (NMN_NEW_CONNECTION (object));
+ mobile_page_init (NMN_NEW_CONNECTION (object));
+
+ return object;
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_MODEL:
+ /* Construct only */
+ priv->model = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_MODEL:
+ g_value_set_object (value, priv->model);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+dispose (GObject *object)
+{
+ NmnNewConnectionPrivate *priv = GET_PRIVATE (object);
+
+ if (priv->disposed)
+ return;
+
+ priv->disposed = TRUE;
+
+ g_signal_handler_disconnect (priv->model, priv->mobile_toggled_id);
+
+ if (priv->model)
+ g_object_unref (priv->model);
+
+ G_OBJECT_CLASS (nmn_new_connection_parent_class)->dispose (object);
+}
+
+static void
+nmn_new_connection_class_init (NmnNewConnectionClass *class)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (class);
+
+ g_type_class_add_private (object_class, sizeof (NmnNewConnectionPrivate));
+
+ /* methods */
+ object_class->constructor = constructor;
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->dispose = dispose;
+
+ /* properties */
+ g_object_class_install_property
+ (object_class, PROP_MODEL,
+ g_param_spec_object (NMN_NEW_CONNECTION_MODEL,
+ "NmnModel",
+ "NmnModel",
+ NMN_TYPE_MODEL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ /* signals */
+ signals[CLOSE] = g_signal_new
+ ("close",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (NmnNewConnectionClass, close),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+}
diff --git a/src/nmn-new-connection.h b/src/nmn-new-connection.h
new file mode 100644
index 0000000..0969f06
--- /dev/null
+++ b/src/nmn-new-connection.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NMN_NEW_CONNECTION_H
+#define NMN_NEW_CONNECTION_H
+
+#include <gtk/gtk.h>
+#include "nmn-model.h"
+
+#define NMN_TYPE_NEW_CONNECTION (nmn_new_connection_get_type ())
+#define NMN_NEW_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMN_TYPE_NEW_CONNECTION, NmnNewConnection))
+#define NMN_NEW_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMN_TYPE_NEW_CONNECTION, NmnNewConnectionClass))
+#define NMN_IS_NEW_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMN_TYPE_NEW_CONNECTION))
+#define NMN_IS_NEW_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMN_TYPE_NEW_CONNECTION))
+#define NMN_NEW_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMN_TYPE_NEW_CONNECTION, NmnNewConnectionClass))
+
+#define NMN_NEW_CONNECTION_MODEL "model"
+
+typedef struct {
+ GtkVBox parent;
+} NmnNewConnection;
+
+typedef struct {
+ GtkVBoxClass parent;
+
+ /* Signals */
+ void (*close) (NmnNewConnection *self);
+} NmnNewConnectionClass;
+
+GType nmn_new_connection_get_type (void);
+
+GtkWidget *nmn_new_connection_create (NmnModel *model);
+void nmn_new_connection_update (NmnNewConnection *self);
+
+#endif /* NMN_NEW_CONNECTION_H */
diff --git a/src/nmn-panel-client.c b/src/nmn-panel-client.c
new file mode 100644
index 0000000..bdfdae5
--- /dev/null
+++ b/src/nmn-panel-client.c
@@ -0,0 +1,401 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#include <string.h>
+#include <glib/gi18n.h>
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+#include <libnotify/notify.h>
+#include <moblin-panel/mpl-panel-common.h>
+#include <nm-device-ethernet.h>
+#include <nm-device-wifi.h>
+#include <nm-gsm-device.h>
+#include <nm-cdma-device.h>
+#include <nm-utils.h>
+#include <nm-ethernet-item.h>
+
+#include "nmn-panel-client.h"
+
+#define ACTIVATION_STEPS 6
+
+G_DEFINE_TYPE (NmnPanelClient, nmn_panel_client, MPL_TYPE_PANEL_GTK)
+
+enum {
+ PROP_0,
+ PROP_MODEL,
+
+ LAST_PROP
+};
+
+#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), NMN_TYPE_PANEL_CLIENT, NmnPanelClientPrivate))
+
+typedef struct {
+ NMStatusModel *model;
+
+ NMListItem *item;
+ guint animation_id;
+ guint animation_step;
+
+ /* Saved from previous item */
+ NMListItemStatus status;
+ char *connection_type;
+ char *connection_name;
+} NmnPanelClientPrivate;
+
+NmnPanelClient *
+nmn_panel_client_new (NMStatusModel *model)
+{
+ g_return_val_if_fail (NM_IS_STATUS_MODEL (model), NULL);
+
+ return (NmnPanelClient *) g_object_new (NMN_TYPE_PANEL_CLIENT,
+ "name", MPL_PANEL_NETWORK,
+ "tooltip", _("network"),
+ "stylesheet", THEME_PATH "/network-manager-netbook.css",
+ "button-style", "unknown",
+ "toolbar-service", TRUE,
+ NMN_PANEL_CLIENT_MODEL, model,
+ NULL);
+
+}
+
+static void
+stop_activation_animation (NmnPanelClient *self)
+{
+ NmnPanelClientPrivate *priv = GET_PRIVATE (self);
+
+ if (priv->animation_id) {
+ g_source_remove (priv->animation_id);
+ priv->animation_id = 0;
+ priv->animation_step = 0;
+ }
+}
+
+static gboolean
+activation_animation (gpointer data)
+{
+ NmnPanelClient *self = NMN_PANEL_CLIENT (data);
+ NmnPanelClientPrivate *priv = GET_PRIVATE (self);
+ char *image;
+
+ if (++priv->animation_step > ACTIVATION_STEPS)
+ priv->animation_step = 1;
+
+ image = g_strdup_printf ("progress-%02d", priv->animation_step);
+ g_print ("Requesting button style %s", image);
+ mpl_panel_client_request_button_style (MPL_PANEL_CLIENT (self), image);
+ g_free (image);
+
+ return TRUE;
+}
+
+/* FIXME: This is all pretty gross */
+static const char *
+massage_icon (const char *original)
+{
+ static char *icon = NULL;
+
+ if (icon) {
+ g_free (icon);
+ icon = NULL;
+ }
+
+ if (!original)
+ return NULL;
+
+ if (g_str_has_prefix (original, "nm-"))
+ icon = g_strdup (original + 3);
+ else
+ icon = g_strdup (original);
+
+ if (g_str_has_suffix (icon, "-active") || g_str_has_suffix (icon, "-normal"))
+ icon[strlen(icon) - 7] = '\0';
+
+ return icon;
+}
+
+static void
+update_icon (NmnPanelClient *self)
+{
+ NmnPanelClientPrivate *priv = GET_PRIVATE (self);
+ NMListItemStatus status;
+
+ status = priv->item ? nm_list_item_get_status (priv->item) : NM_LIST_ITEM_STATUS_DISCONNECTED;
+ switch (status) {
+ case NM_LIST_ITEM_STATUS_CONNECTING:
+ if (priv->animation_id == 0) {
+ priv->animation_id = g_timeout_add (200, activation_animation, self);
+ activation_animation (self);
+ }
+ break;
+ case NM_LIST_ITEM_STATUS_DISCONNECTED:
+ stop_activation_animation (self);
+ mpl_panel_client_request_button_style (MPL_PANEL_CLIENT (self), "no-network");
+ break;
+ case NM_LIST_ITEM_STATUS_CONNECTED:
+ stop_activation_animation (self);
+ mpl_panel_client_request_button_style (MPL_PANEL_CLIENT (self),
+ massage_icon (nm_list_item_get_icon (priv->item)));
+
+ break;
+ }
+}
+
+static void
+update_notification (NmnPanelClient *self)
+{
+ NmnPanelClientPrivate *priv = GET_PRIVATE (self);
+ const char *title;
+ char *msg;
+ const char *connection_type;
+ const char *connection_name;
+ const char *icon;
+ NMListItemStatus status;
+
+ if (priv->item) {
+ status = nm_list_item_get_status (priv->item);
+ connection_type = nm_list_item_get_type_name (priv->item);
+
+ /* Don't say "Connected to Wired, a wired network */
+ if (!NM_IS_ETHERNET_ITEM (priv->item))
+ connection_name = nm_list_item_get_name (priv->item);
+ else
+ connection_name = NULL;
+
+ icon = nm_list_item_get_icon (priv->item);
+ } else {
+ status = NM_LIST_ITEM_STATUS_DISCONNECTED;
+ connection_type = NULL;
+ connection_name = NULL;
+ icon = NULL;
+ }
+
+ if (priv->status == NM_LIST_ITEM_STATUS_DISCONNECTED && status == NM_LIST_ITEM_STATUS_CONNECTED) {
+ title = _("Network connected");
+
+ if (connection_type) {
+ if (connection_name)
+ msg = g_strdup_printf (_("You're now connected to %s, a %s network"),
+ connection_name, connection_type);
+ else
+ msg = g_strdup_printf (_("You're now connected to %s network"), connection_type);
+ } else
+ msg = g_strdup (_("You're now connected to network"));
+ } else if (priv->status == NM_LIST_ITEM_STATUS_CONNECTED && status == NM_LIST_ITEM_STATUS_DISCONNECTED) {
+ title = _("Network lost");
+
+ if (priv->connection_type) {
+ if (priv->connection_name)
+ msg = g_strdup_printf (_("Sorry, we've lost your %s connection to %s"),
+ priv->connection_type, priv->connection_name);
+ else
+ msg = g_strdup_printf (_("Sorry, we've lost your %s connection"), priv->connection_type);
+ } else
+ msg = g_strdup (_("Sorry, we've lost your connection"));
+ } else {
+ title = NULL;
+ msg = NULL;
+ }
+
+ if (title && msg) {
+ NotifyNotification *note;
+
+ note = notify_notification_new (title, msg, icon, NULL);
+ notify_notification_set_timeout (note, 10000);
+ notify_notification_show (note, NULL);
+ g_object_unref (note);
+ g_free (msg);
+
+ priv->status = status;
+ g_free (priv->connection_type);
+ priv->connection_type = connection_type ? g_strdup (connection_type) : NULL;
+ g_free (priv->connection_name);
+ priv->connection_name = connection_name ? g_strdup (connection_name) : NULL;
+ }
+}
+
+static void
+update_tooltip (NmnPanelClient *self)
+{
+ NmnPanelClientPrivate *priv = GET_PRIVATE (self);
+ char *tip;
+ const char *connection_type;
+ const char *connection_name;
+ NMListItemStatus status;
+
+ status = priv->item ? nm_list_item_get_status (priv->item) : NM_LIST_ITEM_STATUS_DISCONNECTED;
+ switch (status) {
+ case NM_LIST_ITEM_STATUS_DISCONNECTED:
+ tip = g_strdup_printf (_("networks - not connected"));
+ break;
+ case NM_LIST_ITEM_STATUS_CONNECTING:
+ tip = g_strdup_printf (_("networks - connecting"));
+ break;
+ case NM_LIST_ITEM_STATUS_CONNECTED:
+ connection_type = nm_list_item_get_type_name (priv->item);
+
+ /* Don't produce "networks - Wired - wired" */
+ if (!NM_IS_ETHERNET_ITEM (priv->item))
+ connection_name = nm_list_item_get_name (priv->item);
+ else
+ connection_name = NULL;
+
+ if (connection_type) {
+ if (connection_name)
+ tip = g_strdup_printf (_("networks - %s - %s"), connection_name, connection_type);
+ else
+ tip = g_strdup_printf (_("networks - %s"), connection_type);
+ } else
+ tip = g_strdup (_("networks - connected"));
+
+ break;
+ }
+
+ mpl_panel_client_request_tooltip (MPL_PANEL_CLIENT (self), tip);
+ g_free (tip);
+}
+
+static void
+item_status_changed (NMListItem *item,
+ GParamSpec *spec,
+ gpointer user_data)
+{
+ NmnPanelClient *self = NMN_PANEL_CLIENT (user_data);
+
+ update_notification (self);
+ update_tooltip (self);
+ update_icon (self);
+}
+
+static void
+model_changed (NMStatusModel *model,
+ NMListItem *active_item,
+ gpointer user_data)
+{
+ NmnPanelClient *self = NMN_PANEL_CLIENT (user_data);
+ NmnPanelClientPrivate *priv = GET_PRIVATE (self);
+
+ if (active_item == priv->item)
+ return;
+
+ if (priv->item)
+ g_signal_handlers_disconnect_by_func (priv->item, item_status_changed, self);
+
+ priv->item = active_item;
+
+ if (active_item) {
+ g_signal_connect (active_item, "notify::" NM_LIST_ITEM_STATUS, G_CALLBACK (item_status_changed), self);
+ g_signal_connect (active_item, "notify::" NM_LIST_ITEM_ICON, G_CALLBACK (item_status_changed), self);
+ }
+
+ item_status_changed (active_item, NULL, self);
+}
+
+/*****************************************************************************/
+
+static void
+nmn_panel_client_init (NmnPanelClient *self)
+{
+ notify_init ("network-manager-netbook");
+ mpl_panel_client_set_height_request (MPL_PANEL_CLIENT (self), 499);
+}
+
+static void
+set_property (GObject *object, guint prop_id,
+ const GValue *value, GParamSpec *pspec)
+{
+ NmnPanelClientPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_MODEL:
+ /* Construct only */
+ priv->model = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+get_property (GObject *object, guint prop_id,
+ GValue *value, GParamSpec *pspec)
+{
+ NmnPanelClientPrivate *priv = GET_PRIVATE (object);
+
+ switch (prop_id) {
+ case PROP_MODEL:
+ g_value_set_object (value, priv->model);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+constructed (GObject *object)
+{
+ NmnPanelClientPrivate *priv = GET_PRIVATE (object);
+
+ if (G_OBJECT_CLASS (nmn_panel_client_parent_class)->constructed)
+ G_OBJECT_CLASS (nmn_panel_client_parent_class)->constructed (object);
+
+ g_signal_connect (priv->model, "changed", G_CALLBACK (model_changed), object);
+ item_status_changed (NULL, NULL, object);
+}
+
+static void
+finalize (GObject *object)
+{
+ NmnPanelClientPrivate *priv = GET_PRIVATE (object);
+
+ stop_activation_animation (NMN_PANEL_CLIENT (object));
+
+ g_free (priv->connection_type);
+ g_free (priv->connection_name);
+
+ if (priv->model)
+ g_object_unref (priv->model);
+
+ notify_uninit ();
+
+ G_OBJECT_CLASS (nmn_panel_client_parent_class)->finalize (object);
+}
+
+static void
+nmn_panel_client_class_init (NmnPanelClientClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (object_class, sizeof (NmnPanelClientPrivate));
+
+ object_class->set_property = set_property;
+ object_class->get_property = get_property;
+ object_class->constructed = constructed;
+ object_class->finalize = finalize;
+
+ /* Properties */
+ g_object_class_install_property
+ (object_class, PROP_MODEL,
+ g_param_spec_object (NMN_PANEL_CLIENT_MODEL,
+ "NMStatusModel",
+ "NMStatusModel",
+ NM_TYPE_STATUS_MODEL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
diff --git a/src/nmn-panel-client.h b/src/nmn-panel-client.h
new file mode 100644
index 0000000..875f73d
--- /dev/null
+++ b/src/nmn-panel-client.h
@@ -0,0 +1,52 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2009 Novell, Inc.
+ */
+
+#ifndef NMN_PANEL_CLIENT_H
+#define NMN_PANEL_CLIENT_H
+
+#include <glib-object.h>
+#include <moblin-panel/mpl-panel-gtk.h>
+#include <nm-status-model.h>
+
+G_BEGIN_DECLS
+
+#define NMN_TYPE_PANEL_CLIENT (nmn_panel_client_get_type ())
+#define NMN_PANEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NMN_TYPE_PANEL_CLIENT, NmnPanelClient))
+#define NMN_PANEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NMN_TYPE_PANEL_CLIENT, NmnPanelClientClass))
+#define NMN_IS_PANEL_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NMN_TYPE_PANEL_CLIENT))
+#define NMN_IS_PANEL_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NMN_TYPE_PANEL_CLIENT))
+#define NMN_PANEL_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NMN_TYPE_PANEL_CLIENT, NmnPanelClientClass))
+
+#define NMN_PANEL_CLIENT_MODEL "model"
+
+typedef struct {
+ MplPanelGtk parent;
+} NmnPanelClient;
+
+typedef struct {
+ MplPanelGtkClass parent;
+} NmnPanelClientClass;
+
+GType nmn_panel_client_get_type (void);
+
+NmnPanelClient *nmn_panel_client_new (NMStatusModel *model);
+
+G_END_DECLS
+
+#endif /* NMN_PANEL_CLIENT_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]