summaryrefslogtreecommitdiff
path: root/clients/tui
Commit message (Collapse)AuthorAgeFilesLines
* tui: quit from top-level form when exitingBeniamino Galvani2016-04-271-1/+15
| | | | | | | The top-level form was left on screen after exit (this is visible only on some types of terminal as vt100), breaking automated tests. Fixes: b2fb80928e27dc29240e604bab4f391302fc71f3
* tui: return to initial menu after sub-forms exitBeniamino Galvani2016-04-157-30/+33
| | | | | | | | | | When the user runs nmtui and selects an operation (edit, connect or set-hostname) from the initial menu, the expectation is that once the operation terminates the initial menu is shown again, so that the user can perform multiple operations (like creating a connection and activating it) without quitting. https://bugzilla.gnome.org/show_bug.cgi?id=763836
* build: disable deprecation checks for internal compilationThomas Haller2016-04-051-1/+0
| | | | | | | | | | | | For internal compilation we want to be able to use deprecated API without warnings. Define the version min/max macros to effectively disable deprecation warnings. However, don't do it via CFLAGS option in the makefiles, instead hack it to "nm-default.h". After all, *every* source file that is for internal compilation needs to include this header as first.
* all: cleanup includes and let "nm-default.h" include "config.h"Thomas Haller2016-02-1960-89/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - All internal source files (except "examples", which are not internal) should include "config.h" first. As also all internal source files should include "nm-default.h", let "config.h" be included by "nm-default.h" and include "nm-default.h" as first in every source file. We already wanted to include "nm-default.h" before other headers because it might contains some fixes (like "nm-glib.h" compatibility) that is required first. - After including "nm-default.h", we optinally allow for including the corresponding header file for the source file at hand. The idea is to ensure that each header file is self contained. - Don't include "config.h" or "nm-default.h" in any header file (except "nm-sd-adapt.h"). Public headers anyway must not include these headers, and internal headers are never included after "nm-default.h", as of the first previous point. - Include all internal headers with quotes instead of angle brackets. In practice it doesn't matter, because in our public headers we must include other headers with angle brackets. As we use our public headers also to compile our interal source files, effectively the result must be the same. Still do it for consistency. - Except for <config.h> itself. Include it with angle brackets as suggested by https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
* tui: disallow reserved vlan id 4095Thomas Haller2016-01-221-1/+1
|
* build: minor change creating symlinks in install-exec-hook for nmtuiThomas Haller2016-01-071-2/+2
|
* build: use symlinks for nmtuiMichael Biebl2016-01-071-1/+1
| | | | | | Make /usr/bin/nmtui-* symbolic links to /usr/bin/nmtui. https://bugzilla.gnome.org/show_bug.cgi?id=759824
* build: rename directory "include" to "shared"Thomas Haller2015-12-242-4/+4
| | | | | | | | | | Up to now, the "include" directory contained (only) header files that were used project-wide by libs, core, clients, et al. Since the directory now also contains a non-header file, the "include" name is misleading. Instead of adding yet another directory that is project-wide, with non-header-only content, rename the "include" directory to "shared".
* tui: prefill a secret in the entry if we have a valueJiří Klimeš2015-12-121-0/+2
|
* tui: allow connecting to OpenConnectJiří Klimeš2015-12-121-1/+91
| | | | by running "openconnect --authenticate" and getting secrets from it
* clients: move vpn_get_secret_names() to nm-vpn-helpersJiří Klimeš2015-12-121-0/+2
| | | | | | | It should eventually move into libnm and ideally the data be obtained from VPN plugins. (No functional change, only moving the function).
* clients: move clients/tui/vpn-helpers.c to clients/common/nm-vpn-helpers.cJiří Klimeš2015-11-263-367/+6
| | | | | The file has not been used up to now. But it is going to be used by both nmtui and nmcli later.
* tui: add a checkbox for ignore-auto-routes (bgo #756200)Jiří Klimeš2015-10-092-0/+12
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=756200
* build: extract version macros from "nm-version.h" to new header file ↵Thomas Haller2015-09-302-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "nm-version-macros.h" For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus paths of NetworkManager. It is desirable to have this header usable without having a dependency on "glib.h", for example for a QT application. For that, commit c0852964a890cf43cc2dcaeff41ac6edc5028f24 removed that dependancy. For libnm-glib library, the analog to "nm-dbus-interface.h" is "NetworkManager.h", and the same applies there. Commit 159e827a72f420048e12d318f8ba1edd3f641fc8 removed that include. However, that broke build on PackageKit [1] which expected to get the version macros by including "NetworkManager.h". So at least for libnm-glib, we need to preserve old behavior so that a user including "NetworkManager.h" gets the version macros, but not "glib.h". Extract the version macros to a new header file "nm-version-macros.h". This header doesn't include "glib.h" and can be included from "NetworkManager.h". This gives as previous behavior and a glib-free include. For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h". Very few users will actually need the version macros, but not using libnm. Users that use libnm, should just include (libnm's) "NetworkManager.h" to get all headers. As a special case, a user who doesn't want to use glib/libnm, but still needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include them both separately. [1] https://github.com/hughsie/PackageKit/issues/85 Fixes: 4545a7fe9670ce4d7c259c11c2cc853bfae6729b
* tui: fix crash during activation when failed to create secret-agentThomas Haller2015-09-301-4/+4
| | | | | | | | | | NetworkManager only allows one 'client:user-id' to register as secret agent. Thus, when starting nmtui in two terminals, creating the secret agent can fail. This can lead to a crash. https://bugzilla.gnome.org/show_bug.cgi?id=755883
* build: fix out-of-tree build for missing "nm-version.h"Thomas Haller2015-08-051-0/+1
| | | | Fixes: 19c3ea948a7c74774621baf62d68cb4826e1b97c
* all: drop includes to <glib/gi18n.h> for "nm-default.h"Dan Winship2015-08-0538-67/+0
| | | | | | | The localization headers are now included via "nm-default.h". Also fixes several places, where we wrongly included <glib/gi18n-lib.h> instead of <glib/gi18n.h>. For example under "clients/" directory.
* all: make use of new header file "nm-default.h"Thomas Haller2015-08-0527-25/+27
|
* tui: use NMVpnPluginInfo in vpn-helper.cThomas Haller2015-07-292-132/+28
| | | | | | vpn-helper.c is currently not yet used. It was added for future VPN support for nmtui. Refactor it to make use of the new vpn helper functions in libnm.
* all: rename nm-glib-compat.h to nm-glib.h, use everywhereDan Winship2015-07-2426-24/+28
| | | | | | | | | | | | | | | | Rather than randomly including one or more of <glib.h>, <glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include "nm-glib-compat.h" most of the time), rename nm-glib-compat.h to nm-glib.h, include <gio/gio.h> from there, and then change all .c files in NM to include "nm-glib.h" rather than including the glib headers directly. (Public headers files still have to include the real glib headers, since nm-glib.h isn't installed...) Also, remove glib includes from header files that are already including a base object header file (which must itself already include the glib headers).
* tui: fix the previous commitJiří Klimeš2015-03-021-1/+1
| | | | Fixes cdc8bd1.
* tui: add "Enable IGMP snooping" to bridge editor (bgo #744853)Jiří Klimeš2015-03-021-0/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=744853
* tui: fix a crash when connection list for activation is empty (rh #1119663)Jiří Klimeš2015-02-271-3/+5
| | | | | | When there are no connections for a device, do not add the header. https://bugzilla.redhat.com/show_bug.cgi?id=1119663
* tui: fix crash when editing DSL connectionJiří Klimeš2015-01-071-0/+2
| | | | | | | | | | | | | | | | | | | | | Program received signal SIGSEGV, Segmentation fault. 0x000000000041b3e5 in nmt_page_dsl_constructed (object=0x7fffec0228c0 [NmtPageDsl]) at nmt-page-dsl.c:109 109 priv->ethernet_page = nmt_page_ethernet_new (conn, nmt_editor_page_device_get_device_entry (NMT_EDITOR_PAGE_DEVICE (dsl))); Missing separate debuginfos, use: debuginfo-install libffi-3.0.10-3.fc18.x86_64 newt-0.52.15-1.fc19.x86_64 (gdb) bt #0 0x000000000041b3e5 in nmt_page_dsl_constructed (object=0x7fffec0228c0 [NmtPageDsl]) at nmt-page-dsl.c:109 #1 0x0000003e9ac161e3 in g_object_newv (object_type=1, object_type@entry=16203872, n_parameters=n_parameters@entry=2, parameters=parameters@entry=0xf74350) at gobject.c:1741 #2 0x0000003e9ac16560 in g_object_new_valist (object_type=object_type@entry=16203872, first_property_name=first_property_name@entry=0x42e524 "connection", var_args=var_args@entry=0x7fffffffcef8) at gobject.c:1830 #3 0x0000003e9ac16894 in g_object_new (object_type=16203872, first_property_name=first_property_name@entry=0x42e524 "connection") at gobject.c:1545 #4 0x000000000041b504 in nmt_page_dsl_new (conn=<optimized out>, deventry=deventry@entry=0x974690 [NmtDeviceEntry]) at nmt-page-dsl.c:47 #5 0x000000000041808e in nmt_editor_constructed (object=<optimized out>) at nmt-editor.c:355 #6 0x0000003e9ac161e3 in g_object_newv (object_type=1, object_type@entry=16174256, n_parameters=n_parameters@entry=4, parameters=parameters@entry=0xf6cec0) at gobject.c:1741 ... (gdb) p priv $1 = (NmtPageDslPrivate *) 0x0
* tui: fix saving "Available to all users" (rh #1176042)Jiří Klimeš2015-01-071-1/+1
|
* tui: fix deletion of slaves with master (rh #1131574)Dan Winship2014-12-051-5/+12
| | | | | | | We wait for each deletion to complete, so the connections were getting removed from the connections array as we edited it (unlike with the old transfer-container GSList-based code). Fix this by copying the slaves out into their own list first.
* tui: width and height parameters was swapped, but they are ignored anywayJiří Klimeš2014-12-051-4/+4
| | | | | Coverity: Defect type: SWAPPED_ARGUMENTS clients/tui/newt/nmt-newt-section.c:328: swapped_arguments: The positions of arguments in the call to "nmt_newt_widget_size_request" do not match the ordering of the parameters: * "&border_height" is passed to "width" * "&border_width" is passed to "height"
* tui: set GError so that it is not NULL laterJiří Klimeš2014-12-051-1/+1
| | | | | | Coverity: Defect type: FORWARD_NULL clients/tui/nmtui-edit.c:467: var_deref_op: Dereferencing null pointer "error".
* tui: fix a bug that hid the IP method popup (rh #1167710)Dan Winship2014-11-251-0/+1
|
* libnm: rename NMSecretAgent to NMSecretAgentOldDan Winship2014-11-211-2/+2
| | | | | | As with NMVpnPluginOld, rename NMSecretAgent to NMSecretAgentOld, to leave the name "NMSecretAgent" open for a new-and-improved version in NM 1.2.
* clients: merge nm_secret_agent_simple_set_connection_path() into ↵Dan Williams2014-11-211-7/+4
| | | | | | | | nm_secret_agent_simple_enable() set_connection_path() is almost always called right before enable(), and it's unclear why it would be called anywhere else. So just merge the two methods.
* clients: NMSecretAgentSimple API fixupsDan Winship2014-11-211-5/+5
| | | | | | | | nm_secret_agent_simple_*() functions should take an NMSecretAgentSimple, not an NMSecretAgent. The type macros were incorrectly validating against NM_TYPE_SECRET_AGENT rather than NM_TYPE_SECRET_AGENT_SIMPLE.
* nmtui: Add a not reached assert to make compiler happyLubomir Rintel2014-11-211-0/+2
| | | | | | | nmt-editor.c: In function ‘nmt_editor_constructed’: nmt-editor.c:365:2: error: ‘page’ may be used uninitialized in this function [-Werror=maybe-uninitialized] add_sections_for_page (editor, grid, page); ^
* tui: tweak NmtEditorGrid column rulesDan Winship2014-11-212-27/+32
| | | | | | | | | | | | | | | If an NmtEditorGrid row has a widget, but no label, then we make the widget span both the label and widget columns. But previously we weren't doing the same for rows with labels but no widgets. (In fact, we didn't even allow rows with no widgets; label-only rows had to specify dummy widgets.) Fix it so that labels will span into an empty widget column. (This ensures that a long section name won't force the entire grid to have an overwide label column). Also, in both the "no label" and "no widget" cases, still show the "extra" column if it's present.
* tui: simplify DSL page handlingDan Winship2014-11-213-30/+76
| | | | | | Rather than having NmtEditor need to know that DSL requires a DSL page, and Ethernet page, and a PPP page, just have the DSL page itself return multiple sections.
* tui: rework how editor pages workDan Winship2014-11-2133-269/+514
| | | | | | | | | | | | Instead of having NmtEditorPage be a widget itself, have it just be an object that returns a list of NmtEditorSections, where NmtEditorSection is a subclass of NmtNewtSection. (This will be important when adding VPN pages, which will be split up into multiple sections, but with the different sections needing to cooperate on updating the NMSettingVpn. This reorganization lets us have an NMPageVpn containing multiple sections, with the NMPageVpn object handling the coordination between the sections.)
* tui: merge NmtPageMain into NmtEditorDan Winship2014-11-214-386/+193
| | | | | | All page types except NmtPageMain are displayed as collapsible sections. NmtPageMain behaved quite differently from everything else. So merge it into its container, NmtEditor.
* tui: rename two classesDan Winship2014-11-2132-347/+347
| | | | | | | | Rename NmtPageDevice to NmtEditorPageDevice, and rename NmtPageGrid to NmtEditorGrid. Now all types with names starting with "NmtPage" are instantiable page types, not abstract classes or low-level widgets.
* cli: Process secret agent request for a connection only if we know its pathlr/nm-1-0-fixesLubomir Rintel2014-11-201-2/+19
| | | | | | | | | | | If we're activating the device without knowing the connection in advance, defer servicing the requests for the secrets until we set the path. [lkundrak@fedora20-2 ~]$ nmcli --ask c ifname wlan0 (process:18405): libnm-CRITICAL **: nm_object_get_path: assertion 'NM_IS_OBJECT (object)' failed Error: Connection activation failed: The device has no connections available. [lkundrak@fedora20-2 ~]$
* tui: refresh the "nmtui connect" list when connections are added/removedDan Winship2014-11-191-18/+9
| | | | | | | | We were refreshing the list when the set of available devices changed, or the set of active connections changed, but not when the set of available connections changed. https://bugzilla.gnome.org/show_bug.cgi?id=740333
* all: consistently include config.hDan Winship2014-11-131-0/+2
| | | | | | | | | | | config.h should be included from every .c file, and it should be included before any other include. Fix that. (As a side effect of how I did this, this also changes us to consistently use "config.h" rather than <config.h>. To the extent that it matters [which is not much], quotes are more correct anyway, since we're talking about a file in our own build tree, not a system include.)
* tui: fix unsetting Gateway (rh #1163896)Dan Winship2014-11-131-1/+1
| | | | | When the Gateway field is empty, we need to set the property to NULL, not "".
* tui: fix alignment of pop-up menusDan Winship2014-11-121-2/+17
| | | | | | | | Pop-up menus were slightly mis-aligned in the main window, and even more mis-aligned in slave-editing windows. Fix that. Also add a bit of padding to the pop-up window, because it just looks better that way.
* tui: fix gateway editingDan Winship2014-11-124-6/+122
| | | | | | | | | | | | | | | | | | | | | Since adding NMSettingIPConfig:gateway, we were just binding that property to the Gateway entry as a string. But this caused two different problems: first, we were trying to set the :gateway property from the entry even when the IP address in the entry was incomplete (causing warnings), and second, we were no longer enforcing the rule that the gateway can only be set when there are static addresses configured. Fix this by adding back nm_editor_bind_ip_gateway_to_string(), but with new semantics reflecting the new way NMSettingIPConfig:addresses and :gateway work. (Besides just fixing the new bugs, this also makes the Gateway entry insensitive when there are no addresses; before, nmtui would allow you to type there, but the value would not be saved.) Fixes: Test263_nmtui_ipv4_addresses_delete_ip_and_back_to_auto https://bugzilla.gnome.org/show_bug.cgi?id=740017
* clients: only handle secret requests for connection being explicitly activatedJiří Klimeš2014-11-121-1/+1
| | | | | | | | | | | When a connection is being activated, nmcli could ask for secrets for another connection, which might confuse users. We check the request now and only ask for secrets of connection being activated. Test case: $ nmcli con up my-ethernet0 Passwords or encryption keys are required to access the wireless network 'Red Hat'. Warning: password for '802-1x.identity' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
* tui: fix generated new connection namesDan Winship2014-11-111-1/+1
| | | | | | Now that "i" is being used in the first loop over all connections, we need to reset it before using it again in the loop to find an available name.
* all: allow route metrics to be "0"Dan Winship2014-11-071-3/+6
| | | | | Change NMIPRoute to use "-1" for "default", so that "0" is a valid metric. Update everything for that.
* libnm-core: add NMSettingIPConfig:gateway, drop NMIPAddress:gatewayDan Winship2014-11-074-122/+10
| | | | | | | | | | | | | | The gateway is a global property of the IPv4/IPv6 configuration, not an attribute of any particular address. So represent it as such in the API; remove the gateway from NMIPAddress, and add it to NMSettingIPConfig. Behind the scenes, the gateway is still serialized along with the first address in NMSettingIPConfig:addresses, and is deserialized from that if the settings dictionary doesn't contain a 'gateway' key. Adjust nmcli's interactive mode to prompt for IP addresses and gateway separately. (Patch partly from Jirka Klimeš.)
* libnm-core: extract NMSettingIPConfig superclass out of IP4, IP6 classesDan Winship2014-11-073-51/+41
| | | | | | | | Split a base NMSettingIPConfig class out of NMSettingIP4Config and NMSettingIP6Config, and update things accordingly. Further simplifications of now-redundant IPv4-vs-IPv6 code are possible, and should happen in the future.
* libnm-core, all: merge IPv4 and IPv6 address/route typesDan Winship2014-11-077-841/+275
| | | | | | Merge NMIP4Address and NMIP6Address into NMIPAddress, and NMIP4Route and NMIP6Route into NMIPRoute. The new types represent IP addresses as strings, rather than in binary, and so are address-family agnostic.