Commit 0a926bb4 authored by Dan Winship's avatar Dan Winship
Browse files

connection-editor: add support for Bond connections

parent 0b6b8348
......@@ -18,6 +18,7 @@ src/applet.h
[type: gettext/glade]src/connection-editor/ce-ip6-routes.ui
[type: gettext/glade]src/connection-editor/ce-new-connection.ui
src/connection-editor/ce-page.c
[type: gettext/glade]src/connection-editor/ce-page-bond.ui
[type: gettext/glade]src/connection-editor/ce-page-dsl.ui
[type: gettext/glade]src/connection-editor/ce-page-ethernet.ui
[type: gettext/glade]src/connection-editor/ce-page-infiniband.ui
......@@ -36,6 +37,7 @@ src/connection-editor/nm-connection-editor.c
[type: gettext/glade]src/connection-editor/nm-connection-editor.ui
src/connection-editor/nm-connection-list.c
src/connection-editor/page-8021x-security.c
src/connection-editor/page-bond.c
src/connection-editor/page-dsl.c
src/connection-editor/page-ethernet.c
src/connection-editor/page-infiniband.c
......
......@@ -50,6 +50,8 @@ nm_connection_editor_SOURCES = \
page-ppp.c \
page-vpn.h \
page-vpn.c \
page-bond.h \
page-bond.c \
vpn-helpers.h \
vpn-helpers.c \
ip4-routes-dialog.h \
......@@ -84,6 +86,7 @@ ui_DATA = \
ce-page-wifi-security.ui \
ce-page-wimax.ui \
ce-page-infiniband.ui \
ce-page-bond.ui \
ce-page-ip4.ui \
ce-ip4-routes.ui \
ce-page-ip6.ui \
......
This diff is collapsed.
......@@ -31,6 +31,7 @@
#include "page-wimax.h"
#include "page-dsl.h"
#include "page-infiniband.h"
#include "page-bond.h"
#include "page-vpn.h"
#include "vpn-helpers.h"
......@@ -103,6 +104,11 @@ get_connection_type_list (void)
data.setting_type = NM_TYPE_SETTING_INFINIBAND;
g_array_append_val (array, data);
data.name = _("Bond");
data.new_connection_func = bond_connection_new;
data.setting_type = NM_TYPE_SETTING_BOND;
g_array_append_val (array, data);
/* Add "VPN" only if there are plugins */
vpn_plugins_hash = vpn_get_plugins (NULL);
have_vpn_plugins = vpn_plugins_hash && g_hash_table_size (vpn_plugins_hash);
......
......@@ -47,6 +47,7 @@
#include <nm-setting-cdma.h>
#include <nm-setting-wimax.h>
#include <nm-setting-infiniband.h>
#include <nm-setting-bond.h>
#include <nm-utils.h>
#include <nm-remote-connection.h>
......@@ -67,6 +68,7 @@
#include "page-vpn.h"
#include "page-wimax.h"
#include "page-infiniband.h"
#include "page-bond.h"
#include "ce-polkit-button.h"
#include "vpn-helpers.h"
......@@ -191,7 +193,7 @@ update_sensitivity (NMConnectionEditor *editor)
gtk_widget_set_sensitive (widget, sensitive);
widget = GTK_WIDGET (gtk_builder_get_object (editor->builder, "connection_autoconnect"));
gtk_widget_set_sensitive (widget, sensitive);
gtk_widget_set_sensitive (widget, sensitive && !nm_setting_connection_get_master (s_con));
widget = GTK_WIDGET (gtk_builder_get_object (editor->builder, "connection_name"));
gtk_widget_set_sensitive (widget, sensitive);
......@@ -852,6 +854,9 @@ nm_connection_editor_set_connection (NMConnectionEditor *editor,
} else if (!strcmp (connection_type, NM_SETTING_INFINIBAND_SETTING_NAME)) {
if (!add_page (editor, ce_page_infiniband_new, editor->connection, error))
goto out;
} else if (!strcmp (connection_type, NM_SETTING_BOND_SETTING_NAME)) {
if (!add_page (editor, ce_page_bond_new, editor->connection, error))
goto out;
} else {
g_warning ("Unhandled setting type '%s'", connection_type);
}
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager Connection editor -- Connection editor for NetworkManager
*
* 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.
*
* Copyright 2012 Red Hat, Inc.
*/
#ifndef __PAGE_BOND_H__
#define __PAGE_BOND_H__
#include <nm-connection.h>
#include <glib.h>
#include <glib-object.h>
#include "ce-page.h"
#define CE_TYPE_PAGE_BOND (ce_page_bond_get_type ())
#define CE_PAGE_BOND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CE_TYPE_PAGE_BOND, CEPageBond))
#define CE_PAGE_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CE_TYPE_PAGE_BOND, CEPageBondClass))
#define CE_IS_PAGE_BOND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CE_TYPE_PAGE_BOND))
#define CE_IS_PAGE_BOND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), CE_TYPE_PAGE_BOND))
#define CE_PAGE_BOND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CE_TYPE_PAGE_BOND, CEPageBondClass))
typedef struct {
CEPage parent;
} CEPageBond;
typedef struct {
CEPageClass parent;
} CEPageBondClass;
GType ce_page_bond_get_type (void);
CEPage *ce_page_bond_new (NMConnection *connection,
GtkWindow *parent,
NMClient *client,
NMRemoteSettings *settings,
const char **out_secrets_setting_name,
GError **error);
void bond_connection_new (GtkWindow *parent,
const char *detail,
NMRemoteSettings *settings,
PageNewConnectionResultFunc result_func,
gpointer user_data);
#endif /* __PAGE_BOND_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment