Commit Graph

12 Commits

Author SHA1 Message Date
Thomas Haller
9ef23947cc all: fix various warnings detected with coverity
https://bugzilla.gnome.org/show_bug.cgi?id=728320

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-02 15:20:30 +02:00
Dan Winship
96a5ad51c2 tui: fix using Escape from main menu
We weren't checking whether the form closed because the menu was
activated or because the user hit Escape
2014-03-21 13:32:50 -04:00
Dan Winship
f6e2b6528f tui: fix binding of some int/uint properties (rh #1078281)
GLib registers number->string value transforms (meaning that
number-valued properties like NMSettingVlan:id or NMSettingWired:mtu
get loaded into their NmtNewtEntries correctly), but not the
corresponding string->number transforms (meaning changes made in the
entries don't get propagated back to the settings, and due to
http://bugzilla.gnome.org/show_bug.cgi?id=726574, there's no warning
about this). Fix this by registering our own transforms.
2014-03-21 13:32:50 -04:00
Dan Winship
941ce35238 tui: fix quitting from "nmtui edit CONN-ID"
If you launched nmtui directly into the editor for a specific
connection, it would hang with a blank screen when you quit.

Fix this by changing the way startup works a bit, and have the created
toplevel NmtNewtForm get returned all the way to nmtui.c, which can
then connect to the "quit" signal on it and quit (rather than having
the different subprograms trying to guess whether they're supposed to
quit-on-exit or not).
2014-03-21 13:32:50 -04:00
Dan Williams
4478d86ea8 trivial: fix variable shadowing 2014-01-17 10:26:42 -06:00
Dan Winship
64cb43b3b2 tui: add nmt_newt_text_width()
We were using g_utf8_strlen() to measure strings for layout, but that
counts combining marks too, and also fails to deal with "fullwidth"
(ie, double-width) CJK characters.

Add a new utility function to do a better job of this (based on code
from vte), and use it everywhere.
2014-01-16 09:19:07 -05:00
Dan Winship
4c0ac46a99 libnm-util: add a missing GValue transform needed by nmtui 2014-01-16 09:19:06 -05:00
Dan Winship
eb9cd6da08 tui: reorganize the main dialog
"Cancel" didn't really make sense here, but changing it to "Quit" is
also weird because if you were going to use the "OK" button you'd have
to tab past "Quit" first... So make it be an option in the menu
instead.
2014-01-16 09:19:06 -05:00
Dan Winship
ed6b8f8c1d tui: localize startup/usage-related strings 2014-01-16 09:19:06 -05:00
Dan Winship
bbb416a6a7 tui: error out if NM is not running 2014-01-16 09:19:06 -05:00
Dan Winship
41ada32127 tui: hide the debugging-related command line options 2013-12-17 12:51:18 -05:00
Dan Winship
3bda3fb60c nmtui: initial import of nmtui
nmtui is a TUI (curses-based Text User Interface) for NetworkManager
2013-12-13 16:00:51 +01:00