Commit a134e098 authored by Richard Hughes's avatar Richard Hughes

network: Add the first version of a simple network panel that uses NetworkManager

This is very much a work in progress, and will be changed quite a bit before GNOME 3.
parent 4821672a
......@@ -383,6 +383,8 @@ panels/info/Makefile
panels/info/gnome-info-panel.desktop.in
panels/power/Makefile
panels/power/gnome-power-panel.desktop.in
panels/network/Makefile
panels/network/gnome-network-panel.desktop.in
panels/universal-access/Makefile
panels/universal-access/gnome-universal-access-panel.desktop.in
panels/user-accounts/Makefile
......
......@@ -7,6 +7,7 @@ SUBDIRS= \
mouse \
region \
proxy \
network \
info \
sound \
default-applications \
......
INCLUDES = \
$(PANEL_CFLAGS) \
$(GNOMECC_CAPPLETS_CFLAGS) \
-DGNOMECC_UI_DIR="\"$(uidir)\"" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \
$(NULL)
ccpanelsdir = $(PANELS_DIR)
ccpanels_LTLIBRARIES = libnetwork.la
libnetwork_la_SOURCES = \
network-module.c \
cc-network-panel.c \
cc-network-panel.h
libnetwork_la_LIBADD = $(PANEL_LIBS) $(CAPPLET_LIBS)
libnetwork_la_LDFLAGS = $(PANEL_LDFLAGS)
uidir = $(pkgdatadir)/ui
dist_ui_DATA = network.ui
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
desktop_in_files = gnome-network-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA)
-include $(top_srcdir)/git.mk
This diff is collapsed.
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2010 Richard Hughes <richard@hughsie.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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef _CC_NETWORK_PANEL_H
#define _CC_NETWORK_PANEL_H
#include <libgnome-control-center/cc-panel.h>
G_BEGIN_DECLS
#define CC_TYPE_NETWORK_PANEL cc_network_panel_get_type()
#define CC_NETWORK_PANEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
CC_TYPE_NETWORK_PANEL, CcNetworkPanel))
#define CC_NETWORK_PANEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
CC_TYPE_NETWORK_PANEL, CcNetworkPanelClass))
#define CC_IS_NETWORK_PANEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
CC_TYPE_NETWORK_PANEL))
#define CC_IS_NETWORK_PANEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
CC_TYPE_NETWORK_PANEL))
#define CC_NETWORK_PANEL_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
CC_TYPE_NETWORK_PANEL, CcNetworkPanelClass))
typedef struct _CcNetworkPanel CcNetworkPanel;
typedef struct _CcNetworkPanelClass CcNetworkPanelClass;
typedef struct _CcNetworkPanelPrivate CcNetworkPanelPrivate;
struct _CcNetworkPanel
{
CcPanel parent;
CcNetworkPanelPrivate *priv;
};
struct _CcNetworkPanelClass
{
CcPanelClass parent_class;
};
GType cc_network_panel_get_type (void) G_GNUC_CONST;
void cc_network_panel_register (GIOModule *module);
G_END_DECLS
#endif /* _CC_NETWORK_PANEL_H */
[Desktop Entry]
_Name=Network
_Comment=Network settings
Exec=gnome-control-center network
Icon=gnome-network-properties
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;X-GNOME-NetworkSettings;X-GNOME-Settings-Panel;
OnlyShowIn=GNOME;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-control-center
X-GNOME-Bugzilla-Component=network
X-GNOME-Bugzilla-Version=@VERSION@
X-GNOME-Settings-Panel=network
# Translators: those are keywords for the network control-center panel
_X-GNOME-Keywords=Network;Wireless;IP;LAN;
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2010 Richard Hughes <richard@hughsie.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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*
*/
#include <config.h>
#include "cc-network-panel.h"
#include <glib/gi18n-lib.h>
void
g_io_module_load (GIOModule *module)
{
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
/* register the panel */
cc_network_panel_register (module);
}
void
g_io_module_unload (GIOModule *module)
{
}
......@@ -13,13 +13,15 @@
<object class="GtkListStore" id="liststore_devices">
<columns>
<!-- column-name icon -->
<column type="gchar"/>
<column type="gchararray"/>
<!-- column-name title -->
<column type="gchar"/>
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchar"/>
<column type="gchararray"/>
<!-- column-name tooltip -->
<column type="gchar"/>
<column type="gchararray"/>
<!-- column-name proxy-device -->
<column type="gpointer"/>
</columns>
</object>
<object class="GtkWindow" id="window1">
......@@ -40,7 +42,7 @@
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">automatic</property>
<property name="hscrollbar_policy">never</property>
<property name="vscrollbar_policy">automatic</property>
<property name="shadow_type">in</property>
<child>
......@@ -64,7 +66,7 @@
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
<object class="GtkHBox" id="hbox3">
<object class="GtkHBox" id="hbox_device_header">
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
......@@ -78,7 +80,7 @@
</packing>
</child>
<child>
<object class="GtkImage" id="image1">
<object class="GtkImage" id="image_device">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon-size">6</property>
......@@ -96,7 +98,7 @@
<object class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="label1">
<object class="GtkLabel" id="label_device">
<property name="visible">True</property>
<property name="label">Wired</property>
<attributes>
......@@ -121,7 +123,7 @@
<object class="GtkHBox" id="hbox5">
<property name="visible">True</property>
<child>
<object class="GtkLabel" id="label2">
<object class="GtkLabel" id="label_status">
<property name="visible">True</property>
<property name="label">Cable unplugged</property>
</object>
......@@ -984,7 +986,7 @@
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox_proxy_mode">
<object class="GtkComboBoxText" id="combobox_proxy_mode">
<property name="visible">True</property>
<property name="model">liststore_proxy_method</property>
</object>
......@@ -1043,7 +1045,7 @@
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox34">
<object class="GtkHBox" id="hbox_proxy_http">
<property name="visible">True</property>
<property name="spacing">9</property>
<child>
......@@ -1087,7 +1089,7 @@
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox36">
<object class="GtkHBox" id="hbox_proxy_shttp">
<property name="visible">True</property>
<property name="spacing">9</property>
<child>
......@@ -1131,7 +1133,7 @@
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox46">
<object class="GtkHBox" id="hbox_proxy_ftp">
<property name="visible">True</property>
<property name="spacing">9</property>
<child>
......@@ -1175,7 +1177,7 @@
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox48">
<object class="GtkHBox" id="hbox_proxy_socks">
<property name="visible">True</property>
<property name="spacing">9</property>
<child>
......@@ -1279,7 +1281,7 @@
<property name="visible">True</property>
<property name="layout_style">start</property>
<child>
<object class="GtkButton" id="button2">
<object class="GtkButton" id="button_add">
<property name="label">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......@@ -1294,7 +1296,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="button3">
<object class="GtkButton" id="button_remove">
<property name="label">gtk-remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......@@ -1389,19 +1391,23 @@
<object class="GtkListStore" id="liststore_proxy_method">
<columns>
<!-- column-name text -->
<column type="gchar"/>
<column type="gchararray"/>
<!-- column-name type -->
<column type="gint"/>
</columns>
<data>
<row>
<col id="0">A</col>
<col id="0">None</col>
<col id="1">0</col>
</row>
<row>
<col id="0">M</col>
<col id="0">Manual</col>
<col id="1">1</col>
</row>
<row>
<col id="0">Automatic</col>
<col id="1">2</col>
</row>
</data>
</object>
</interface>
......@@ -48,6 +48,8 @@ panels/mouse/gnome-mouse-panel.desktop.in.in
panels/proxy/gnome-proxy-properties.c
panels/proxy/gnome-proxy-panel.desktop.in.in
[type: gettext/glade]panels/proxy/gnome-proxy-properties.ui
panels/network/cc-network-panel.c
panels/network/gnome-network-panel.desktop.in.in
[type: gettext/glade]panels/network/network.ui
panels/power/gnome-power-panel.desktop.in.in
panels/power/cc-power-panel.c
......
......@@ -19,6 +19,7 @@ panels/user-accounts/fingerprint-strings.h
capplets/localization/localization.desktop.in
capplets/mouse/gnome-settings-mouse.desktop.in
panels/proxy/gnome-proxy-panel.desktop.in
panels/network/gnome-network-panel.desktop.in
capplets/sound/gnome-settings-sound.desktop.in
font-viewer/gnome-font-viewer.desktop.in
schemas/desktop_gnome_font_rendering.schemas.in
......
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