Commit graph

10 commits

Author SHA1 Message Date
Dan Winship
b4216ccb2d tui: allow Esc to cancel "nmtui connect" 2014-03-24 13:19:13 -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 Winship
5d581b0d08 tui: handle Esc correctly from toplevel windows
The main "connect" and "edit" windows set the "escape-exits" flag, but
that just closed the form without exiting the app, leaving the user
trapped. Fix this by emitting a signal when the form quits, and
catching that. (And now we don't need to watch the "clicked" signal on
the quit buttons, since they have the "exit-on-activate" flag set.)
2014-02-17 15:30:04 -05:00
Dan Winship
46ef9029bc tui: fix activation of "new" Wi-Fi networks
When activating a never-before-used Wi-Fi network, we need to call
nm_client_add_and_activate_connection(), not
nm_client_activate_connection(). (We still pass a NULL connection,
since NM will attempt to auto-fill it for us, and will succeed as long
as it's not an 802.1x connection.)
2014-01-16 09:19:07 -05: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
1d40b9f872 tui: implement deactivation in "nmtui connect" 2014-01-16 09:19:07 -05:00
Dan Winship
0fe46a5839 tui: reorganize "nmtui connect" code
Make NmtConnectConnectionList just a dumb connection list, and have
the actual connecting code be in nmtui-connect.c
2014-01-16 09:19:06 -05:00
Dan Winship
c1017d04df tui: rename nmt_newt_error_dialog() to nmt_newt_message_dialog() 2014-01-16 09:19:06 -05:00
Dan Winship
867c3cdae0 tui: fix the error-on-startup cases 2014-01-16 09:19:06 -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