diff options
author | Thomas Haller <thaller@redhat.com> | 2020-09-28 14:50:01 +0200 |
---|---|---|
committer | Antonio Cardace <acardace@redhat.com> | 2020-09-28 16:07:52 +0200 |
commit | 740b092fda3d5f45102422f22884c88ea6c42858 (patch) | |
tree | 5a049cc10c99efb5ee39606b8b1d0893a9f46db3 /clients | |
parent | 328fb90f3e0d4e35975aff63944ac0412d7893a5 (diff) | |
download | NetworkManager-740b092fda3d5f45102422f22884c88ea6c42858.tar.gz |
format: replace tabs for indentation in code commentsac/clang-format
sed -i \
-e 's/^'$'\t'' \*/ */g' \
-e 's/^'$'\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t\t\t\t'' \*/ */g' \
-e 's/^'$'\t\t\t\t\t\t\t'' \*/ */g' \
$(git ls-files -- '*.[hc]')
Diffstat (limited to 'clients')
57 files changed, 962 insertions, 962 deletions
diff --git a/clients/cli/common.c b/clients/cli/common.c index b0796dd385..7298dcb7c0 100644 --- a/clients/cli/common.c +++ b/clients/cli/common.c @@ -487,7 +487,7 @@ found: if (!already_tracked) { if (match_by_uuid) { /* the profile is matched exactly (by UUID). We prepend it - * to the list of all found profiles. */ + * to the list of all found profiles. */ g_ptr_array_insert(result, result_inital_len, g_object_ref(connection)); } else g_ptr_array_add(result, g_object_ref(connection)); @@ -521,10 +521,10 @@ nmc_find_active_connection(const GPtrArray *active_cons, con = nm_active_connection_get_connection(candidate); /* When filter_type is NULL, compare connection ID (filter_val) - * against all types. Otherwise, only compare against the specific - * type. If 'path' or 'apath' filter types are specified, comparison - * against numeric index (in addition to the whole path) is allowed. - */ + * against all types. Otherwise, only compare against the specific + * type. If 'path' or 'apath' filter types are specified, comparison + * against numeric index (in addition to the whole path) is allowed. + */ if (NM_IN_STRSET(filter_type, NULL, "id")) { v = nm_active_connection_get_id(candidate); if (complete) @@ -683,7 +683,7 @@ get_secrets_from_user(const NmcConfig *nmc_config, char * pwd = NULL; /* First try to find the password in provided passwords file, - * then ask user. */ + * then ask user. */ if (pwds_hash && (pwd = g_hash_table_lookup(pwds_hash, secret->entry_id))) { pwd = g_strdup(pwd); } else { @@ -787,7 +787,7 @@ nmc_secrets_requested(NMSecretAgentSimple *agent, nm_secret_agent_simple_response(agent, request_id, secrets); else { /* Unregister our secret agent on failure, so that another agent - * may be tried */ + * may be tried */ if (nmc->secret_agent) { nm_secret_agent_old_unregister(NM_SECRET_AGENT_OLD(nmc->secret_agent), NULL, NULL); g_clear_object(&nmc->secret_agent); @@ -1011,8 +1011,8 @@ nmc_readline_echo(const NmcConfig *nmc_config, gboolean echo_on, const char *pro saved_history = history_get_history_state(); history_set_history_state(&passwd_history); /* stifling history is important as it tells readline to - * not store anything, otherwise sensitive data could be - * leaked */ + * not store anything, otherwise sensitive data could be + * leaked */ stifle_history(0); rl_redisplay_function = nmc_secret_redisplay; } diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 45e49f9616..80b7aa46ec 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -163,7 +163,7 @@ static int active_connection_get_state_ord(NMActiveConnection *active) { /* returns an integer related to @active's state, that can be used for sorting - * active connections based on their activation state. */ + * active connections based on their activation state. */ if (!active) return -2; @@ -291,8 +291,8 @@ get_vpn_connection_type(NMConnection *connection) return NULL; /* The service type is in form of "org.freedesktop.NetworkManager.vpnc". - * Extract end part after last dot, e.g. "vpnc" - */ + * Extract end part after last dot, e.g. "vpnc" + */ type = nm_setting_vpn_get_service_type(nm_connection_get_setting_vpn(connection)); if (!type) return NULL; @@ -481,11 +481,11 @@ _con_show_fcn_get_id(NMConnection *c, NMActiveConnection *ac) s = s_con ? nm_setting_connection_get_id(s_con) : NULL; if (!s && ac) { /* note that if we have no s_con, that usually means that the user has no permissions - * to see the connection. We still fall to get the ID from the active-connection, - * which exposes it despite the user having no permissions. - * - * That might be unexpected, because the user is shown an ID, which he later - * is unable to resolve in other operations. */ + * to see the connection. We still fall to get the ID from the active-connection, + * which exposes it despite the user having no permissions. + * + * That might be unexpected, because the user is shown an ID, which he later + * is unable to resolve in other operations. */ s = nm_active_connection_get_id(ac); } return s; @@ -503,7 +503,7 @@ _con_show_fcn_get_type(NMConnection *c, NMActiveConnection *ac, NMMetaAccessorGe s = s_con ? nm_setting_connection_get_connection_type(s_con) : NULL; if (!s && ac) { /* see _con_show_fcn_get_id() for why we fallback to get the value - * from @ac. */ + * from @ac. */ s = nm_active_connection_get_connection_type(ac); } return connection_type_to_display(s, get_type); @@ -525,16 +525,16 @@ static gconstpointer _metagen_con_show_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARG if (!row_data->show_active_fields) { /* we are not supposed to show any fields of the active connection. - * We only tracked the primary_active to get the coloring right. - * From now on, there is no active connection. */ + * We only tracked the primary_active to get the coloring right. + * From now on, there is no active connection. */ ac = NULL; /* in this mode, we expect that we are called only with connections that - * have a [connection] setting and a UUID. Otherwise, the connection is - * effectively invisible to the user, and should be hidden. - * - * But in that case, we expect that the caller pre-filtered this row out. - * So assert(). */ + * have a [connection] setting and a UUID. Otherwise, the connection is + * effectively invisible to the user, and should be hidden. + * + * But in that case, we expect that the caller pre-filtered this row out. + * So assert(). */ nm_assert(s_con); nm_assert(nm_setting_connection_get_uuid(s_con)); } @@ -549,7 +549,7 @@ static gconstpointer _metagen_con_show_get_fcn(NMC_META_GENERIC_INFO_GET_FCN_ARG s = s_con ? nm_setting_connection_get_uuid(s_con) : NULL; if (!s && ac) { /* see _con_show_fcn_get_id() for why we fallback to get the value - * from @ac. */ + * from @ac. */ s = nm_active_connection_get_uuid(ac); } return s; @@ -726,7 +726,7 @@ static gconstpointer _metagen_con_active_general_get_fcn(NMC_META_GENERIC_INFO_G return c ? nm_connection_get_path(c) : NULL; case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_ZONE: /* this is really ugly, because the zone is not a property of the active-connection, - * but the settings-connection profile. There is no guarantee, that they agree. */ + * but the settings-connection profile. There is no guarantee, that they agree. */ return s_con ? nm_setting_connection_get_zone(s_con) : NULL; case NMC_GENERIC_INFO_TYPE_CON_ACTIVE_GENERAL_MASTER_PATH: dev = nm_active_connection_get_master(ac); @@ -824,7 +824,7 @@ static gconstpointer _metagen_con_active_vpn_get_fcn(NMC_META_GENERIC_INFO_GET_F nm_assert(k); v = nm_setting_vpn_get_data_item(s_vpn, k); /* update the arr array in-place. Previously it contained - * the constant keys, now it contains the strdup'ed output text. */ + * the constant keys, now it contains the strdup'ed output text. */ arr2[i] = g_strdup_printf("%s = %s", k, v); } @@ -1819,8 +1819,8 @@ con_show_get_items_cmp(gconstpointer pa, gconstpointer pb, gpointer user_data) static const NmcSortOrder def[] = {NMC_SORT_ACTIVE, NMC_SORT_NAME, NMC_SORT_PATH}; /* Note: the default order does not consider whether a column is shown. - * That means, the selection of the output fields, does not affect the - * order (although there could be an argument that it should). */ + * That means, the selection of the output fields, does not affect the + * order (although there could be an argument that it should). */ order_arr = def; order_len = G_N_ELEMENTS(def); } @@ -1900,16 +1900,16 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields arr = nm_client_get_connections(nmc->client); for (i = 0; i < arr->len; i++) { /* Note: libnm will not expose connection that are invisible - * to the user but currently inactive. - * - * That differs from get-active-connection(). If an invisible connection - * is active, we can get its NMActiveConnection. We can even obtain - * the corresponding NMRemoteConnection (although, of course it has - * no visible settings). - * - * I think this inconsistency is a bug in libnm. Anyway, the result is, - * that we print invisible connections if they are active, but otherwise - * we exclude them. */ + * to the user but currently inactive. + * + * That differs from get-active-connection(). If an invisible connection + * is active, we can get its NMActiveConnection. We can even obtain + * the corresponding NMRemoteConnection (although, of course it has + * no visible settings). + * + * I think this inconsistency is a bug in libnm. Anyway, the result is, + * that we print invisible connections if they are active, but otherwise + * we exclude them. */ c = arr->pdata[i]; g_hash_table_insert(row_hash, c, @@ -1923,7 +1923,7 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields c = nm_active_connection_get_connection(ac); if (!show_active_fields && !c) { /* the active connection has no connection, and we don't show - * any active fields. Skip this row. */ + * any active fields. Skip this row. */ continue; } @@ -1931,11 +1931,11 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields if (show_active_fields || !c) { /* the active connection either has no connection (in which we create a - * connection-less row), or we are interested in showing each active - * connection in its own row. Add a row. */ + * connection-less row), or we are interested in showing each active + * connection in its own row. Add a row. */ if (row_data) { /* we create a rowdata for this connection earlier. We drop it, because this - * connection is tracked via the rowdata of the active connection. */ + * connection is tracked via the rowdata of the active connection. */ g_hash_table_remove(row_hash, c); _metagen_con_show_row_data_destroy(row_data); } @@ -1946,11 +1946,11 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields } /* we add the active connection to the row for the referenced - * connection. We need to group them this way, to print the proper - * color (activated or not) based on primary_active. */ + * connection. We need to group them this way, to print the proper + * color (activated or not) based on primary_active. */ if (!row_data) { /* this is unexpected. The active connection references a connection that - * seemingly no longer exists. It's a bug in libnm. Add a row nonetheless. */ + * seemingly no longer exists. It's a bug in libnm. Add a row nonetheless. */ row_data = _metagen_con_show_row_data_new_for_connection(c, show_active_fields); g_hash_table_insert(row_hash, c, row_data); } @@ -1973,11 +1973,11 @@ con_show_get_items(NmCli *nmc, gboolean active_only, gboolean show_active_fields s_con = nm_connection_get_setting_connection(row_data->connection); if (!s_con || !nm_setting_connection_get_uuid(s_con)) { /* we are in a mode, where we only print rows for connection. - * For that we require that all rows are visible to the user, - * meaning: the have a [connection] setting and a UUID. - * - * Otherwise, this connection is likely invisible to the user. - * Skip it. */ + * For that we require that all rows are visible to the user, + * meaning: the have a [connection] setting and a UUID. + * + * Otherwise, this connection is likely invisible to the user. + * Skip it. */ _metagen_con_show_row_data_destroy(row_data); continue; } @@ -2161,11 +2161,11 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con fields_str = nmc->required_fields; /* determine whether the user wants to see any fields that are related to active-connections - * (e.g. the apath, the current state, or the device where the profile is active). - * - * If that's the case, then we will show one line for each active connection. In case - * a profile has multiple active connections, it will be listed multiple times. - * If that's not the case, we filter out these duplicate lines. */ + * (e.g. the apath, the current state, or the device where the profile is active). + * + * If that's the case, then we will show one line for each active connection. In case + * a profile has multiple active connections, it will be listed multiple times. + * If that's not the case, we filter out these duplicate lines. */ selection = nm_meta_selection_create_parse_list( (const NMMetaAbstractInfo *const *) metagen_con_show, fields_str, @@ -2219,7 +2219,7 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con nm_clear_g_free(&nmc->required_fields); /* Before printing the connections check if we have a "--show-secret" - * option after the connection ids */ + * option after the connection ids */ if (!nmc->nmc_config.show_secrets && !nmc->complete) { int argc_cp = argc; const char *const *argv_cp = argv; @@ -2276,8 +2276,8 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con if (!selector && !nm_streq0(*argv, nm_object_get_path(NM_OBJECT(explicit_acon)))) { /* we matched the apath based on the last component alone (note the full D-Bus path). - * That is how nmc_find_active_connection() works, if you pass in a selector. - * Reject it. */ + * That is how nmc_find_active_connection() works, if you pass in a selector. + * Reject it. */ explicit_acon = NULL; } nm_g_object_ref(explicit_acon); @@ -2293,10 +2293,10 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con } /* Print connection details: - * Usually we have both static and active connection. - * But when a connection is private to a user, another user - * may see only the active connection. - */ + * Usually we have both static and active connection. + * But when a connection is private to a user, another user + * may see only the active connection. + */ if (nmc->complete) { next_arg(nmc, &argc, &argv, NULL); @@ -2313,7 +2313,7 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con break; explicit_acon_handled = TRUE; /* the user referenced an "apath". In this case, we can only have at most one connection - * and one apath. */ + * and one apath. */ con = NM_CONNECTION(nm_active_connection_get_connection(explicit_acon)); } else { if (i_found_cons >= found_cons->len) @@ -2353,8 +2353,8 @@ do_connections_show(const NMCCommand *cmd, NmCli *nmc, int argc, const char *con if (i > 0) { /* if there are multiple active connections, separate them with newline. - * that is a bit odd, because we already separate connections with newlines, - * and commonly don't separate the connection from the first active connection. */ + * that is a bit odd, because we already separate connections with newlines, + * and commonly don't separate the connection from the first active connection. */ g_print("\n"); } @@ -2419,8 +2419,8 @@ get_default_active_connection(NmCli *nmc, NMDevice **device) } /* Prefer the default connection if one exists, otherwise return the first - * non-default connection. - */ + * non-default connection. + */ if (!default_ac && non_default_ac) { default_ac = non_default_ac; *device = non_default_device; @@ -2697,7 +2697,7 @@ progress_active_connection_cb(gpointer user_data) if (ac_state == NM_ACTIVE_CONNECTION_STATE_ACTIVATING) { /* If the connection is activating, the device state - * is more interesting. */ + * is more interesting. */ ac_devs = nm_active_connection_get_devices(active); device = ac_devs->len > 0 ? g_ptr_array_index(ac_devs, 0) : NULL; } else { @@ -2780,10 +2780,10 @@ activate_connection_cb(GObject *client, GAsyncResult *result, gpointer user_data G_CALLBACK(device_state_cb), info); /* Both active_connection_state_cb () and device_state_cb () will just - * call check_activated (info). So, just call it once directly after - * connecting on both the signals of the objects and skip the call to - * the callbacks. - */ + * call check_activated (info). So, just call it once directly after + * connecting on both the signals of the objects and skip the call to + * the callbacks. + */ check_activated(info); /* Start progress indication showing VPN states */ @@ -2923,9 +2923,9 @@ do_connection_up(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const int * argc_ptr; /* - * Set default timeout for connection activation. - * Activation can take quite a long time, use 90 seconds. - */ + * Set default timeout for connection activation. + * Activation can take quite a long time, use 90 seconds. + */ if (nmc->timeout == -1) nmc->timeout = 90; @@ -3008,9 +3008,9 @@ do_connection_up(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const return; /* Use nowait_flag instead of should_wait because exiting has to be postponed till - * active_connection_state_cb() is called. That gives NM time to check our permissions - * and we can follow activation progress. - */ + * active_connection_state_cb() is called. That gives NM time to check our permissions + * and we can follow activation progress. + */ nmc->nowait_flag = (nmc->timeout == 0); nmc->should_wait++; @@ -3038,7 +3038,7 @@ do_connection_up(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const typedef struct { NmCli *nmc; /* a list of object that is relevant for the callback. The object - * type differs, and depends on the type of callback. */ + * type differs, and depends on the type of callback. */ GPtrArray * obj_list; guint timeout_id; GCancellable *cancellable; @@ -3386,7 +3386,7 @@ get_valid_settings_array(const char *con_type) const NMMetaSettingInfoEditor *setting_info; /* No connection type yet? Return settings for a generic connection - * (just the "connection" setting), which always makes sense. */ + * (just the "connection" setting), which always makes sense. */ if (!con_type) return nm_meta_setting_info_valid_parts_default; @@ -3450,11 +3450,11 @@ get_valid_properties_string(const NMMetaSettingValidPartItem *const *array, } /* If postix (so prefix is terminated by a dot), check - * that prefix is not ambiguous */ + * that prefix is not ambiguous */ if (postfix) { /* If we have a perfect match, no need to look for others - * prefix and no check on ambiguity should be performed. - * Moreover, erase previous matches from output string */ + * prefix and no check on ambiguity should be performed. + * Moreover, erase previous matches from output string */ if (nm_streq(prefix, setting_info->general->setting_name) || nm_streq0(prefix, setting_info->alias)) { g_string_erase(str, 0, -1); @@ -3897,7 +3897,7 @@ static gboolean _meta_property_needs_bond_hack(const NMMetaPropertyInfo *property_info) { /* hack: the bond property data is handled special and not generically. - * Eventually, get rid of explicitly checking whether we handle a bond. */ + * Eventually, get rid of explicitly checking whether we handle a bond. */ if (!property_info) g_return_val_if_reached(FALSE); return property_info->property_typ_data @@ -4945,8 +4945,8 @@ nmc_process_connection_properties(NmCli * nmc, GError ** error) { /* First check if we have a slave-type, as this would mean we will not - * have ip properties but possibly others, slave-type specific. - */ + * have ip properties but possibly others, slave-type specific. + */ /* Go through arguments and set properties */ do { const NMMetaSettingValidPartItem *const *type_settings; @@ -5044,7 +5044,7 @@ nmc_process_connection_properties(NmCli * nmc, GError * local = NULL; /* This seems like a <setting>.<property> (such as "connection.id" or "bond.mode"), - * optionally prefixed with "+| or "-". */ + * optionally prefixed with "+| or "-". */ if (*argc == 1 && nmc->complete) complete_property_name(nmc, connection, modifier, option_sett, option_prop); @@ -5595,13 +5595,13 @@ read_properties: if (argc && !nmc_process_connection_properties(nmc, connection, &argc, &argv, FALSE, &error)) { if (g_strcmp0(*argv, "--") == 0 && !seen_dash_dash) { /* This is for compatibility with older nmcli that required - * options and properties to be separated with "--" */ + * options and properties to be separated with "--" */ seen_dash_dash = TRUE; next_arg(nmc, &argc, &argv, NULL); goto read_properties; } else if (g_strcmp0(*argv, "save") == 0) { /* It would be better if "save" was a separate argument and not - * mixed with properties, but there's not much we can do about it now. */ + * mixed with properties, but there's not much we can do about it now. */ argc--; argv++; if (!argc) { @@ -5634,7 +5634,7 @@ read_properties: questionnaire_mandatory(nmc, connection); /* Traditionally, we didn't ask for these options for ethernet slaves. They don't - * make much sense, since these are likely to be set by the master anyway. */ + * make much sense, since these are likely to be set by the master anyway. */ if (nm_setting_connection_get_slave_type(s_con)) { disable_options(NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_MTU); disable_options(NM_SETTING_WIRED_SETTING_NAME, NM_SETTING_WIRED_MAC_ADDRESS); @@ -5642,14 +5642,14 @@ read_properties: } /* Connection id is special in that it's required but we don't insist - * on getting it from the user -- we just make up something sensible. */ + * on getting it from the user -- we just make up something sensible. */ if (!nm_setting_connection_get_id(s_con)) { const char *ifname = nm_setting_connection_get_interface_name(s_con); const char *type = nm_setting_connection_get_connection_type(s_con); const char *slave_type = nm_setting_connection_get_slave_type(s_con); /* If only bother when there's a type, which is not guaranteed at this point. - * Otherwise, the validation will fail anyway. */ + * Otherwise, the validation will fail anyway. */ if (type) { gs_free char * try_name = NULL; gs_free char * default_name = NULL; @@ -5668,16 +5668,16 @@ read_properties: set_default_interface_name(nmc, s_con); /* Now see if there's something optional that needs to be asked for. - * Keep asking until there's no more things to ask for. */ + * Keep asking until there's no more things to ask for. */ do { /* This ensures all settings that make sense are present. */ nm_connection_normalize(connection, NULL, NULL, NULL); } while (nmc->ask && questionnaire_one_optional(nmc, connection)); /* Mandatory settings. No good reason to check this other than guarding the user - * from doing something that's not likely to make sense (such as missing ifname - * on a bond/bridge/team, etc.). Added just to preserve traditional behavior, it - * perhaps is a good idea to just remove this. */ + * from doing something that's not likely to make sense (such as missing ifname + * on a bond/bridge/team, etc.). Added just to preserve traditional behavior, it + * perhaps is a good idea to just remove this. */ for (s = 0; s < _NM_META_SETTING_TYPE_NUM; s++) { const NMMetaPropertyInfo *const *property_infos; guint p; @@ -5972,8 +5972,8 @@ gen_property_names(const char *text, int state) valid_settings_main = get_valid_settings_array(nmc_tab_completion.con_type); /* Support autocompletion of slave-connection parameters - * guessing the slave type from the setting name already - * typed (or autocompleted) */ + * guessing the slave type from the setting name already + * typed (or autocompleted) */ if (nm_streq0(strv[0], NM_SETTING_TEAM_PORT_SETTING_NAME)) slv_type = NM_SETTING_TEAM_SETTING_NAME; else if (nm_streq0(strv[0], NM_SETTING_BRIDGE_PORT_SETTING_NAME)) @@ -6768,8 +6768,8 @@ editor_main_usage(void) { g_print("------------------------------------------------------------------------------\n"); /* TRANSLATORS: do not translate command names and keywords before :: - * However, you should translate terms enclosed in <>. - */ + * However, you should translate terms enclosed in <>. + */ g_print(_("---[ Main menu ]---\n" "goto [<setting> | <prop>] :: go to a setting or property\n" "remove <setting>[.<prop>] | <prop> :: remove setting or reset property value\n" @@ -6953,8 +6953,8 @@ editor_sub_help(void) { g_print("------------------------------------------------------------------------------\n"); /* TRANSLATORS: do not translate command names and keywords before :: - * However, you should translate terms enclosed in <>. - */ + * However, you should translate terms enclosed in <>. + */ g_print(_("---[ Property menu ]---\n" "set [<value>] :: set new value\n" "add [<value>] :: add new option to the property\n" @@ -7310,9 +7310,9 @@ property_edit_submenu(NmCli * nmc, case NMC_EDITOR_SUB_CMD_SET: case NMC_EDITOR_SUB_CMD_ADD: /* list, arrays,...: SET replaces the whole property value - * ADD adds the new value(s) - * single values: : both SET and ADD sets the new value - */ + * ADD adds the new value(s) + * single values: : both SET and ADD sets the new value + */ if (!cmd_property_arg) { gs_strfreev char **to_free = NULL; const char *const *avals; @@ -8266,9 +8266,9 @@ editor_menu_main(NmCli *nmc, NMConnection *connection, const char *connection_ty refresh_remote_connection(&weak, &rem_con); /* Replace local connection with the remote one to be sure they are equal. - * This mitigates problems with plugins not preserving some properties or - * adding ipv{4,6} settings when not present. - */ + * This mitigates problems with plugins not preserving some properties or + * adding ipv{4,6} settings when not present. + */ if (con_tmp) { gs_free char *s_name = NULL; @@ -8547,7 +8547,7 @@ editor_init_existing_connection(NMConnection *connection) NMSettingConnection *s_con; /* FIXME: this approach of connecting handlers to do something is fundamentally - * flawed. See the comment in nmc_setting_ip6_connect_handlers(). */ + * flawed. See the comment in nmc_setting_ip6_connect_handlers(). */ s_ip4 = nm_connection_get_setting_ip4_config(connection); s_ip6 = nm_connection_get_setting_ip6_config(connection); @@ -8670,8 +8670,8 @@ do_connection_edit(const NMCCommand *cmd, NmCli *nmc, int argc, const char *cons } /* Duplicate the connection and use that so that we need not - * differentiate existing vs. new later - */ + * differentiate existing vs. new later + */ connection = nm_simple_connection_new_clone(found_con); /* Merge secrets into the connection */ diff --git a/clients/cli/devices.c b/clients/cli/devices.c index 999896efce..534596887c 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -2231,9 +2231,9 @@ do_device_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const return; /* - * Use nowait_flag instead of should_wait, because exiting has to be postponed - * till connect_device_cb() is called, giving NM time to check our permissions. - */ + * Use nowait_flag instead of should_wait, because exiting has to be postponed + * till connect_device_cb() is called, giving NM time to check our permissions. + */ nmc->nowait_flag = (nmc->timeout == 0); nmc->should_wait++; @@ -2285,8 +2285,8 @@ static void device_removed_cb(NMClient *client, NMDevice *device, DeviceCbInfo *info) { /* Success: device has been removed. - * It can also happen when disconnecting a software device. - */ + * It can also happen when disconnecting a software device. + */ if (!g_slist_find(info->queue, device)) return; @@ -2767,7 +2767,7 @@ do_device_set(const NMCCommand *cmd, NmCli *nmc, int argc, const char *const *ar return; /* when multiple properties are specified, set them in the order as they - * are specified on the command line. */ + * are specified on the command line. */ if (values[DEV_SET_AUTOCONNECT].idx >= 0 && values[DEV_SET_MANAGED].idx >= 0 && values[DEV_SET_MANAGED].idx < values[DEV_SET_AUTOCONNECT].idx) { nm_device_set_managed(device, values[DEV_SET_MANAGED].value); @@ -3189,19 +3189,19 @@ wifi_list_rescan_cb(GObject *source_object, GAsyncResult *res, gpointer user_dat if (g_error_matches(error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_ALLOWED)) { if (nm_device_get_state(NM_DEVICE(wifi)) < NM_DEVICE_STATE_DISCONNECTED) { /* the device is either unmanaged or unavailable. - * - * If it's unmanaged, we don't expect any scan result and are done. - * If it's unavailable, that usually means that we wait for wpa_supplicant - * to start. In that case, also quit (without scan results). */ + * + * If it's unmanaged, we don't expect any scan result and are done. + * If it's unavailable, that usually means that we wait for wpa_supplicant + * to start. In that case, also quit (without scan results). */ force_finished = TRUE; done = TRUE; } else { /* This likely means that scanning is already in progress. There's - * a good chance we'll get updated results soon; wait for them. - * - * But also, NetworkManager ratelimits (and rejects requests). That - * means, possibly we were just ratelimited, so waiting will not lead - * to a new scan result. Instead, repeatedly ask new scans... */ + * a good chance we'll get updated results soon; wait for them. + * + * But also, NetworkManager ratelimits (and rejects requests). That + * means, possibly we were just ratelimited, so waiting will not lead + * to a new scan result. Instead, repeatedly ask new scans... */ nm_utils_invoke_on_timeout(1000, wifi_list_data->scan_cancellable, wifi_list_rescan_retry_cb, @@ -3837,8 +3837,8 @@ do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char * if (nm_access_point_connection_valid(ap, NM_CONNECTION(avail_con))) { /* ap has been checked against bssid1, bssid2 and the ssid - * and now avail_con has been checked against ap. - */ + * and now avail_con has been checked against ap. + */ connection = g_object_ref(avail_con); break; } @@ -3854,7 +3854,7 @@ do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char * if (!connection) { /* If there are some connection data from user, create a connection and - * fill them into proper settings. */ + * fill them into proper settings. */ if (con_name || private || bssid2_arr || hidden) connection = nm_simple_connection_new(); @@ -3968,9 +3968,9 @@ do_device_wifi_connect(const NMCCommand *cmd, NmCli *nmc, int argc, const char * // implementing add/edit connections support for nmcli. /* nowait_flag indicates user input. should_wait says whether quit in start(). - * We have to delay exit after add_and_activate_cb() is called, even if - * the user doesn't want to wait, in order to give NM time to check our - * permissions. */ + * We have to delay exit after add_and_activate_cb() is called, even if + * the user doesn't want to wait, in order to give NM time to check our + * permissions. */ nmc->nowait_flag = (nmc->timeout == 0); nmc->should_wait++; diff --git a/clients/cli/general.c b/clients/cli/general.c index d9b922b086..db59f5776f 100644 --- a/clients/cli/general.c +++ b/clients/cli/general.c @@ -1482,7 +1482,7 @@ nmc_command_func_overview(const NMCCommand *cmd, NmCli *nmc, int argc, const cha color = nmc_device_state_to_color(device); if (ac) { /* TRANSLATORS: prints header line for activated device in plain `nmcli` overview output as - * "<interface-name>: <device-state> to <connection-id>" */ + * "<interface-name>: <device-state> to <connection-id>" */ tmp = nmc_colorize(&nmc->nmc_config, color, C_("nmcli-overview", "%s: %s to %s"), @@ -1491,7 +1491,7 @@ nmc_command_func_overview(const NMCCommand *cmd, NmCli *nmc, int argc, const cha nm_active_connection_get_id(ac)); } else { /* TRANSLATORS: prints header line for not active device in plain `nmcli` overview output as - * "<interface-name>: <device-state>" */ + * "<interface-name>: <device-state>" */ tmp = nmc_colorize(&nmc->nmc_config, color, C_("nmcli-overview", "%s: %s"), diff --git a/clients/cli/nmcli.c b/clients/cli/nmcli.c index 7058fd1357..f2f44d4618 100644 --- a/clients/cli/nmcli.c +++ b/clients/cli/nmcli.c @@ -139,8 +139,8 @@ complete_one(gpointer key, gpointer value, gpointer user_data) if ((!*last && !strchr(name, '.')) || matches(last, name)) { if (option != prefix) { /* value prefix was not a standalone argument, - * it was part of --option=<value> argument. - * Repeat the part leading to "=". */ + * it was part of --option=<value> argument. + * Repeat the part leading to "=". */ g_print("%s=", option); } g_print("%.*s%s%s\n", @@ -201,8 +201,8 @@ complete_option_with_value(const char *option, const char *prefix, ...) if (!*prefix || matches(prefix, candidate)) { if (option != prefix) { /* value prefix was not a standalone argument, - * it was part of --option=<value> argument. - * Repeat the part leading to "=". */ + * it was part of --option=<value> argument. + * Repeat the part leading to "=". */ g_print("%s=", option); } g_print("%s\n", candidate); @@ -262,13 +262,13 @@ matches_arg(NmCli *nmc, int *argc, const char *const **argv, const char *pattern if (opt[1] == '-') { /* We know one '-' was already seen by the caller. - * Skip it if there's a second one*/ + * Skip it if there's a second one*/ opt++; } if (arg) { /* If there's a "=" separator, replace it with NUL so that matches() - * works and consider the part after it to be the argument's value. */ + * works and consider the part after it to be the argument's value. */ s = strchr(opt, '='); if (s) { opt = nm_strndup_a(300, opt, s - opt, &opt_free); @@ -284,7 +284,7 @@ matches_arg(NmCli *nmc, int *argc, const char *const **argv, const char *pattern *arg = g_steal_pointer(&arg_tmp); else { /* We need a value, but the option didn't contain a "=<value>" part. - * Proceed to the next argument. */ + * Proceed to the next argument. */ if (*argc <= 1) { g_string_printf(nmc->return_text, _("Error: missing argument for '%s' option."), @@ -564,8 +564,8 @@ parse_color_scheme(char * palette_buffer, int i; /* This reads through the raw color scheme file contents, identifying the - * color names and sequences, putting in terminating NULs in place, so that - * pointers into the buffer can readily be used as strings in the palette. */ + * color names and sequences, putting in terminating NULs in place, so that + * pointers into the buffer can readily be used as strings in the palette. */ while (1) { /* Leading whitespace. */ while (nm_utils_is_separator(*p) || *p == '\n') @@ -819,8 +819,8 @@ process_command_line(NmCli *nmc, int argc, char **argv_orig) nmc->required_fields = g_strdup(value); nmc->nmc_config_mutable.print_output = NMC_PRINT_TERSE; /* We want fixed tabular mode here, but just set the mode specified and rely on defaults: - * in this way we allow use of "-m multiline" to swap the output mode also if placed - * before the "-g <field>" option (-g may be still more practical and easy to remember than -t -f). + * in this way we allow use of "-m multiline" to swap the output mode also if placed + * before the "-g <field>" option (-g may be still more practical and easy to remember than -t -f). */ nmc->mode_specified = TRUE; } else if (matches_arg(nmc, &argc, &argv, "-nocheck", NULL)) { diff --git a/clients/cli/settings.c b/clients/cli/settings.c index 86b493c340..83837af3d0 100644 --- a/clients/cli/settings.c +++ b/clients/cli/settings.c @@ -52,8 +52,8 @@ ipv4_addresses_changed_cb(GObject *object, GParamSpec *pspec, gpointer user_data g_signal_handlers_block_by_func(object, G_CALLBACK(ipv4_method_changed_cb), NULL); /* If we have some IP addresses set method to 'manual'. - * Else if the method was 'manual', change it back to 'auto'. - */ + * Else if the method was 'manual', change it back to 'auto'. + */ if (nm_setting_ip_config_get_num_addresses(NM_SETTING_IP_CONFIG(object))) { if (g_strcmp0(nm_setting_ip_config_get_method(NM_SETTING_IP_CONFIG(object)), NM_SETTING_IP4_CONFIG_METHOD_MANUAL)) { @@ -124,8 +124,8 @@ ipv6_addresses_changed_cb(GObject *object, GParamSpec *pspec, gpointer user_data g_signal_handlers_block_by_func(object, G_CALLBACK(ipv6_method_changed_cb), NULL); /* If we have some IP addresses set method to 'manual'. - * Else if the method was 'manual', change it back to 'auto'. - */ + * Else if the method was 'manual', change it back to 'auto'. + */ if (nm_setting_ip_config_get_num_addresses(NM_SETTING_IP_CONFIG(object))) { if (g_strcmp0(nm_setting_ip_config_get_method(NM_SETTING_IP_CONFIG(object)), NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) { @@ -142,24 +142,24 @@ ipv6_addresses_changed_cb(GObject *object, GParamSpec *pspec, gpointer user_data } else { answered = FALSE; /* FIXME: editor_init_existing_connection() and registering handlers is not the - * right approach. - * - * This only happens to work because in nmcli's edit mode - * tends to append addresses -- instead of setting them. - * If we would change that (to behavior I'd expect), we'd get: - * - * nmcli> set ipv6.addresses fc01::1:5/68 - * Do you also want to set 'ipv6.method' to 'manual'? [yes]: y - * nmcli> set ipv6.addresses fc01::1:6/68 - * Do you also want to set 'ipv6.method' to 'manual'? [yes]: - * - * That's because nmc_setting_set_property() calls set_fcn(). With modifier '\0' - * (set), it would first clear all addresses before adding the address. Thereby - * emitting multiple property changed signals. - * - * That can be avoided by freezing/thawing the signals, but this solution - * here is ugly in general. - */ + * right approach. + * + * This only happens to work because in nmcli's edit mode + * tends to append addresses -- instead of setting them. + * If we would change that (to behavior I'd expect), we'd get: + * + * nmcli> set ipv6.addresses fc01::1:5/68 + * Do you also want to set 'ipv6.method' to 'manual'? [yes]: y + * nmcli> set ipv6.addresses fc01::1:6/68 + * Do you also want to set 'ipv6.method' to 'manual'? [yes]: + * + * That's because nmc_setting_set_property() calls set_fcn(). With modifier '\0' + * (set), it would first clear all addresses before adding the address. Thereby + * emitting multiple property changed signals. + * + * That can be avoided by freezing/thawing the signals, but this solution + * here is ugly in general. + */ if (!g_strcmp0(nm_setting_ip_config_get_method(NM_SETTING_IP_CONFIG(object)), NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) g_object_set(object, @@ -451,7 +451,7 @@ _env_get_nm_devices(const NMMetaEnvironment *environment, nm_assert(nmc); /* the returned list is *not* NULL terminated. Need to - * provide and honor the out_len argument. */ + * provide and honor the out_len argument. */ nm_assert(out_len); devices = nm_client_get_devices(nmc->client); @@ -475,7 +475,7 @@ _env_get_nm_connections(const NMMetaEnvironment *environment, nm_assert(nmc); /* the returned list is *not* NULL terminated. Need to - * provide and honor the out_len argument. */ + * provide and honor the out_len argument. */ nm_assert(out_len); values = nm_client_get_connections(nmc->client); @@ -587,8 +587,8 @@ nmc_setting_set_property(NMClient * client, if (modifier == NM_META_ACCESSOR_MODIFIER_DEL && !property_info->property_type->set_supports_remove) { /* The property is a plain property. It does not support '-'. - * - * Maybe we should fail, but just return silently. */ + * + * Maybe we should fail, but just return silently. */ return TRUE; } @@ -743,8 +743,8 @@ setting_details(const NmcConfig *nmc_config, NMSetting *setting, const char *one if (one_prop) { /* hack around setting-details being called for one setting. Must prefix the - * property name with the setting name. Later we should remove setting_details() - * and merge it into the caller. */ + * property name with the setting name. Later we should remove setting_details() + * and merge it into the caller. */ fields_str = g_strdup_printf("%s.%s", nm_setting_get_name(setting), one_prop); } diff --git a/clients/cli/utils.c b/clients/cli/utils.c index 8e7014ad1c..5746d4204b 100644 --- a/clients/cli/utils.c +++ b/clients/cli/utils.c @@ -264,9 +264,9 @@ nmc_parse_args(nmc_arg_t * arg_arr, if (strcmp(**argv, p->name) == 0) { if (p->found) { /* Don't allow repeated arguments, because the argument of the same - * name could be used later on the line for another purpose. Assume - * that's the case and return. - */ + * name could be used later on the line for another purpose. Assume + * that's the case and return. + */ return TRUE; } @@ -347,8 +347,8 @@ void nmc_terminal_erase_line(void) { /* We intentionally use printf(), not g_print() here, to ensure that - * GLib doesn't mistakenly try to convert the string. - */ + * GLib doesn't mistakenly try to convert the string. + */ printf("\33[2K\r"); fflush(stdout); } @@ -648,10 +648,10 @@ typedef struct _PrintDataCol { const struct _PrintDataCol *parent_col; /* while constructing the list of columns in _output_selection_append(), we keep track - * of the parent by index. The reason is, that at that point our columns are still - * tracked in a GArray which is growing (hence, the pointers are changing). - * Later, _output_selection_complete() converts the index into the actual pointer. - */ + * of the parent by index. The reason is, that at that point our columns are still + * tracked in a GArray which is growing (hence, the pointers are changing). + * Later, _output_selection_complete() converts the index into the actual pointer. + */ guint _parent_idx; }; const NMMetaSelectionItem *selection_item; @@ -932,7 +932,7 @@ typedef struct { bool title_to_free : 1; /* whether the column should be printed. If not %TRUE, - * the column will be skipped. */ + * the column will be skipped. */ bool to_print : 1; int width; @@ -1034,7 +1034,7 @@ _print_fill(const NmcConfig * nmc_config, header_cell->col = col; /* by default, the entire column is skipped. That is the case, - * unless we have a cell (below) which opts-in to be printed. */ + * unless we have a cell (below) which opts-in to be printed. */ header_cell->to_print = FALSE; header_cell->title = nm_meta_abstract_info_get_name(info, TRUE); @@ -1096,13 +1096,13 @@ _print_fill(const NmcConfig * nmc_config, if ((is_default && nmc_config->overview) || NM_FLAGS_HAS(text_out_flags, NM_META_ACCESSOR_GET_OUT_FLAGS_HIDE)) { /* don't mark the entry for display. This is to shorten the output in case - * the property is the default value. But we only do that, if the user - * opts in to this behavior (-overview), or of the property marks itself - * eligible to be hidden. - * - * In general, only new API shall mark itself eligible to be hidden. - * Long established properties cannot, because it would be a change - * in behavior. */ + * the property is the default value. But we only do that, if the user + * opts in to this behavior (-overview), or of the property marks itself + * eligible to be hidden. + * + * In general, only new API shall mark itself eligible to be hidden. + * Long established properties cannot, because it would be a change + * in behavior. */ } else header_cell->to_print = TRUE; @@ -1211,7 +1211,7 @@ _print_skip_column(const NmcConfig *nmc_config, const PrintDataHeaderCell *heade &nmc_meta_type_generic_info) && selection_item->sub_selection) { /* in tabular form, we skip the "name" entry for sections that have sub-selections. - * That is, for "ipv4.may-fail", but not for "ipv4". */ + * That is, for "ipv4.may-fail", but not for "ipv4". */ return TRUE; } } @@ -1488,7 +1488,7 @@ nmc_terminal_spawn_pager(const NmcConfig *nmc_config) _exit(EXIT_FAILURE); /* Check whether our parent died before we were able - * to set the death signal */ + * to set the death signal */ if (getppid() != parent_pid) _exit(EXIT_SUCCESS); @@ -1498,11 +1498,11 @@ nmc_terminal_spawn_pager(const NmcConfig *nmc_config) } /* Debian's alternatives command for pagers is - * called 'pager'. Note that we do not call - * sensible-pagers here, since that is just a - * shell script that implements a logic that - * is similar to this one anyway, but is - * Debian-specific. */ + * called 'pager'. Note that we do not call + * sensible-pagers here, since that is just a + * shell script that implements a logic that + * is similar to this one anyway, but is + * Debian-specific. */ execlp("pager", "pager", NULL); execlp("less", "less", NULL); diff --git a/clients/cli/utils.h b/clients/cli/utils.h index 61e91d0282..dd3913fa43 100644 --- a/clients/cli/utils.h +++ b/clients/cli/utils.h @@ -292,8 +292,8 @@ nmc_meta_generic_get_str_i18n_null(const char *s, NMMetaAccessorGetType get_type { if (get_type == NM_META_ACCESSOR_GET_TYPE_PARSABLE) { /* in parsable mode, return NULL. That is useful if @s is a pretty string - * to describe a missing value (like "(unknown)"). We don't want to print - * that for parsable mode. */ + * to describe a missing value (like "(unknown)"). We don't want to print + * that for parsable mode. */ return NULL; } return nmc_meta_generic_get_str_i18n(s, get_type); @@ -339,15 +339,15 @@ nmc_meta_generic_get_enum_with_detail(NmcMetaGenericGetEnumType get_enum_type, switch (get_enum_type) { case NMC_META_GENERIC_GET_ENUM_TYPE_PARENTHESES: /* note that this function will always print "$NUM ($NICK)", also in PARSABLE - * mode. That might not be desired, but it's done for certain properties to preserve - * previous behavior. */ + * mode. That might not be desired, but it's done for certain properties to preserve + * previous behavior. */ if (get_type == NM_META_ACCESSOR_GET_TYPE_PRETTY) return g_strdup_printf(_("%lld (%s)"), (long long) enum_val, gettext(str_val)); return g_strdup_printf("%lld (%s)", (long long) enum_val, str_val); case NMC_META_GENERIC_GET_ENUM_TYPE_DASH: /* note that this function will always print "$NUM ($NICK)", also in PARSABLE - * mode. That might not be desired, but it's done for certain properties to preserve - * previous behavior. */ + * mode. That might not be desired, but it's done for certain properties to preserve + * previous behavior. */ if (get_type == NM_META_ACCESSOR_GET_TYPE_PRETTY) return g_strdup_printf(_("%lld - %s"), (long long) enum_val, gettext(str_val)); return g_strdup_printf("%lld - %s", (long long) enum_val, str_val); diff --git a/clients/cloud-setup/nm-cloud-setup-utils.c b/clients/cloud-setup/nm-cloud-setup-utils.c index e302c3da5a..8d28fe8aa0 100644 --- a/clients/cloud-setup/nm-cloud-setup-utils.c +++ b/clients/cloud-setup/nm-cloud-setup-utils.c @@ -138,17 +138,17 @@ static gboolean _wait_for_objects_iterate_until_done_idle_cb(gpointer user_data) { /* This avoids a race where: - * - * - we check whether there are objects to wait for. - * - the last object to wait for gets removed (issuing g_main_loop_quit()). - * - we run the mainloop (and missed our signal). - * - * It's really a missing feature of GMainLoop where the "is-running" flag is always set to - * TRUE by g_main_loop_run(). That means, you cannot catch a g_main_loop_quit() in a race - * free way while not iterating the loop. - * - * Avoid this, by checking once again after we start running the mainloop. - */ + * + * - we check whether there are objects to wait for. + * - the last object to wait for gets removed (issuing g_main_loop_quit()). + * - we run the mainloop (and missed our signal). + * + * It's really a missing feature of GMainLoop where the "is-running" flag is always set to + * TRUE by g_main_loop_run(). That means, you cannot catch a g_main_loop_quit() in a race + * free way while not iterating the loop. + * + * Avoid this, by checking once again after we start running the mainloop. + */ G_LOCK(_wait_for_objects_lock); _wait_for_objects_maybe_quit_mainloops_with_lock(); @@ -496,7 +496,7 @@ nmcs_utils_hwaddr_normalize(const char *hwaddr, gssize len) hwaddr = nm_strndup_a(300, hwaddr, len, &hwaddr_clone); } /* we cannot use _nm_utils_hwaddr_aton() because that requires a delimiter. - * Azure exposes MAC addresses without delimiter, so accept that too. */ + * Azure exposes MAC addresses without delimiter, so accept that too. */ if (!nm_utils_hexstr2bin_full(hwaddr, FALSE, FALSE, @@ -544,7 +544,7 @@ nmcs_utils_parse_get_full_line(GBytes *mem, const char *needle) if (line != mem_data && line[-1] != '\n') { /* the line must be preceeded either by the begin of the data or - * by a newline. */ + * by a newline. */ return NULL; } @@ -574,9 +574,9 @@ nmcs_utils_uri_build_concat_v(const char *base, const char **components, gsize n if (n_components > 0 && components[0] && components[0][0] == '/') { /* the first component starts with a slash. We allow that, and don't add a duplicate - * slash. Otherwise, we add a separator after base. - * - * We only do that for the first component. */ + * slash. Otherwise, we add a separator after base. + * + * We only do that for the first component. */ } else nm_str_buf_append_c(&strbuf, '/'); diff --git a/clients/cloud-setup/nm-http-client.c b/clients/cloud-setup/nm-http-client.c index 9254456506..942bd07906 100644 --- a/clients/cloud-setup/nm-http-client.c +++ b/clients/cloud-setup/nm-http-client.c @@ -204,7 +204,7 @@ _ehandle_complete(EHandleData *edata, GError *error_take) *get_result = (GetResult){ .response_code = response_code, /* This ensures that response_data is always NUL terminated. This is an important guarantee - * that NMHttpClient makes. */ + * that NMHttpClient makes. */ .response_data = nm_str_buf_finalize_to_gbytes(&edata->recv_data), }; diff --git a/clients/cloud-setup/nmcs-provider-azure.c b/clients/cloud-setup/nmcs-provider-azure.c index 02774a7b2a..53223f4b74 100644 --- a/clients/cloud-setup/nmcs-provider-azure.c +++ b/clients/cloud-setup/nmcs-provider-azure.c @@ -264,7 +264,7 @@ _get_config_ips_prefix_list_cb(GObject *source, GAsyncResult *result, gpointer u if (line_len == 0) continue; /* Truncate the string. It's safe to do, because we own @response_data an it has an - * extra NULL character after the buffer. */ + * extra NULL character after the buffer. */ ((char *) line)[line_len] = '\0'; if (line[line_len - 1] == '/') @@ -432,7 +432,7 @@ _get_net_ifaces_list_cb(GObject *source, GAsyncResult *result, gpointer user_dat continue; /* Truncate the string. It's safe to do, because we own @response_data an it has an - * extra NULL character after the buffer. */ + * extra NULL character after the buffer. */ ((char *) line)[line_len] = '\0'; if (line[line_len - 1] == '/' && line_len != 0) diff --git a/clients/cloud-setup/nmcs-provider-ec2.c b/clients/cloud-setup/nmcs-provider-ec2.c index 6af661cb0b..03bd4776a7 100644 --- a/clients/cloud-setup/nmcs-provider-ec2.c +++ b/clients/cloud-setup/nmcs-provider-ec2.c @@ -26,8 +26,8 @@ again: base = g_atomic_pointer_get(&base_cached); if (G_UNLIKELY(!base)) { /* The base URI can be set via environment variable. - * This is mainly for testing, it's not usually supposed to be configured. - * Consider this private API! */ + * This is mainly for testing, it's not usually supposed to be configured. + * Consider this private API! */ base = g_getenv(NMCS_ENV_VARIABLE("NM_CLOUD_SETUP_EC2_HOST")); if (base && base[0] && !strchr(base, '/')) { @@ -307,7 +307,7 @@ _get_config_metadata_ready_cb(GObject *source, GAsyncResult *result, gpointer us } /* We ignore errors. Only if we got no response at all, it's a problem. - * Otherwise, we proceed with whatever we could fetch. */ + * Otherwise, we proceed with whatever we could fetch. */ if (!response_parsed) { _get_config_task_maybe_return( iface_data, @@ -438,7 +438,7 @@ _get_config_metadata_ready_check(long response_code, continue; /* Truncate the string. It's safe to do, because we own @response_data an it has an - * extra NUL character after the buffer. */ + * extra NUL character after the buffer. */ ((char *) cur_line)[cur_line_len] = '\0'; hwaddr = nmcs_utils_hwaddr_normalize( @@ -483,9 +483,9 @@ get_config(NMCSProvider *provider, NMCSProviderGetConfigTaskData *get_config_dat }; /* First we fetch the "macs/". If the caller requested some particular - * MAC addresses, then we poll until we see them. They might not yet be - * around from the start... - */ + * MAC addresses, then we poll until we see them. They might not yet be + * around from the start... + */ nm_http_client_poll_get(nmcs_provider_get_http_client(provider), (uri = _ec2_uri_interfaces()), HTTP_TIMEOUT_MS, diff --git a/clients/cloud-setup/nmcs-provider-gcp.c b/clients/cloud-setup/nmcs-provider-gcp.c index 173a054f9e..099bfe4c50 100644 --- a/clients/cloud-setup/nmcs-provider-gcp.c +++ b/clients/cloud-setup/nmcs-provider-gcp.c @@ -219,7 +219,7 @@ _get_config_ips_list_cb(GObject *source, GAsyncResult *result, gpointer user_dat gint64 fip_index; /* Truncate the string. It's safe to do, because we own @response_data an it has an - * extra NUL character after the buffer. */ + * extra NUL character after the buffer. */ ((char *) line)[line_len] = '\0'; fip_index = _nm_utils_ascii_str_to_int64(line, 10, 0, G_MAXINT64, -1); @@ -358,7 +358,7 @@ _get_net_ifaces_list_cb(GObject *source, GAsyncResult *result, gpointer user_dat continue; /* Truncate the string. It's safe to do, because we own @response_data an it has an - * extra NUL character after the buffer. */ + * extra NUL character after the buffer. */ ((char *) line)[line_len] = '\0'; if (line[line_len - 1] == '/') ((char *) line)[--line_len] = '\0'; diff --git a/clients/cloud-setup/nmcs-provider.h b/clients/cloud-setup/nmcs-provider.h index f3ed222992..3b7396547e 100644 --- a/clients/cloud-setup/nmcs-provider.h +++ b/clients/cloud-setup/nmcs-provider.h @@ -22,7 +22,7 @@ typedef struct { gsize iproutes_len; /* TRUE, if the configuration was requested via hwaddrs argument to - * nmcs_provider_get_config(). */ + * nmcs_provider_get_config(). */ bool was_requested : 1; } NMCSProviderGetConfigIfaceData; diff --git a/clients/common/nm-client-utils.c b/clients/common/nm-client-utils.c index 7ac6d4443f..d9f8692934 100644 --- a/clients/common/nm-client-utils.c +++ b/clients/common/nm-client-utils.c @@ -252,8 +252,8 @@ nmc_bond_validate_mode(const char *mode, GError **error) NULL}; if (nmc_string_to_uint(mode, TRUE, 0, 6, &mode_int)) { /* Translate bonding mode numbers to mode names: - * https://www.kernel.org/doc/Documentation/networking/bonding.txt - */ + * https://www.kernel.org/doc/Documentation/networking/bonding.txt + */ return valid_modes[mode_int]; } else return nmc_string_is_valid(mode, valid_modes, error); @@ -500,29 +500,29 @@ nmc_activation_get_effective_state(NMActiveConnection *active, if (!device || ac_reason != NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED || nm_device_get_active_connection(device) != active) { /* (1) - * - we have no device, - * - or, @ac_reason is specific - * - or, @device no longer references the current @active - * >> we complete with @ac_reason. */ + * - we have no device, + * - or, @ac_reason is specific + * - or, @device no longer references the current @active + * >> we complete with @ac_reason. */ *reason = gettext(nm_active_connection_state_reason_to_string(ac_reason)); } else if (dev_state <= NM_DEVICE_STATE_DISCONNECTED || dev_state >= NM_DEVICE_STATE_FAILED) { /* (2) - * - not (1) - * - and, the device is no longer in an activated state, - * >> we complete with @dev_reason. */ + * - not (1) + * - and, the device is no longer in an activated state, + * >> we complete with @dev_reason. */ *reason = gettext(nmc_device_reason_to_string(dev_reason)); } else { /* (3) - * we wait for the device go disconnect. We will get a better - * failure reason from the device (2). */ + * we wait for the device go disconnect. We will get a better + * failure reason from the device (2). */ return NM_ACTIVE_CONNECTION_STATE_UNKNOWN; } break; case NM_ACTIVE_CONNECTION_STATE_ACTIVATING: /* activating master connection does not automatically activate any slaves, so their - * active connection state will not progress beyond ACTIVATING state. - * Monitor the device instead. */ + * active connection state will not progress beyond ACTIVATING state. + * Monitor the device instead. */ if (device && (NM_IS_DEVICE_BOND(device) || NM_IS_DEVICE_TEAM(device) || NM_IS_DEVICE_BRIDGE(device)) @@ -844,8 +844,8 @@ nmc_utils_parse_passwd_file(char * contents /* will be modified */, if (nm_streq(l_setting, "vpn") && NM_STR_HAS_PREFIX(l_prop, "secret.")) { /* in 1.12.0, we wrongly required the VPN secrets to be named - * "vpn.secret". It should be "vpn.secrets". Work around it - * (rh#1628833). */ + * "vpn.secret". It should be "vpn.secrets". Work around it + * (rh#1628833). */ l_hash_key = g_strdup_printf("vpn.secrets.%s", &l_prop[NM_STRLEN("secret.")]); } else l_hash_key = g_strdup_printf("%s.%s", l_setting, l_prop); @@ -866,8 +866,8 @@ nmc_utils_parse_passwd_file(char * contents /* will be modified */, if (!g_utf8_validate(l_hash_val, -1, NULL)) { /* In some cases it might make sense to support binary secrets (like the WPA-PSK which has no - * defined encoding. However, all API that follows can only handle UTF-8, and no mechanism - * to escape the secrets. Reject non-UTF-8 early. */ + * defined encoding. However, all API that follows can only handle UTF-8, and no mechanism + * to escape the secrets. Reject non-UTF-8 early. */ NM_SET_OUT(out_error_line, contents_line); nm_utils_error_set(error, NM_UTILS_ERROR_UNKNOWN, _("secret is not UTF-8")); return NULL; diff --git a/clients/common/nm-meta-setting-access.c b/clients/common/nm-meta-setting-access.c index 9384a90b02..a68d0c8c88 100644 --- a/clients/common/nm-meta-setting-access.c +++ b/clients/common/nm-meta-setting-access.c @@ -296,7 +296,7 @@ nm_meta_abstract_info_complete(const NMMetaAbstractInfo * abstract_info, return values; /* for convenience, we allow the complete_fcn() implementations to - * ignore "text". We filter out invalid matches here. */ + * ignore "text". We filter out invalid matches here. */ text_len = strlen(text); @@ -403,8 +403,8 @@ _output_selection_pack(const NMMetaAbstractInfo *const *fields_array, GArray *ar len = array ? array->len : 0; /* re-organize the collected output data in one buffer that can be freed using - * g_free(). This makes allocation more complicated, but saves us from special - * handling for free. */ + * g_free(). This makes allocation more complicated, but saves us from special + * handling for free. */ result = g_malloc0(sizeof(NMMetaSelectionResultList) + (len * sizeof(NMMetaSelectionItem)) + (str ? str->len : 0)); *((guint *) &result->num) = len; diff --git a/clients/common/nm-meta-setting-desc.c b/clients/common/nm-meta-setting-desc.c index 553772e5de..938eae9813 100644 --- a/clients/common/nm-meta-setting-desc.c +++ b/clients/common/nm-meta-setting-desc.c @@ -45,7 +45,7 @@ static GType _gtype_property_get_gtype(GType gtype, const char *property_name) { /* given @gtype, a type for a GObject, lookup the property @property_name - * and return its value_type. */ + * and return its value_type. */ if (G_TYPE_IS_CLASSED(gtype)) { GParamSpec * param_spec; nm_auto_unref_gtypeclass GTypeClass *gtypeclass = g_type_class_ref(gtype); @@ -178,8 +178,8 @@ _value_strsplit(const char *value, ValueStrsplitMode split_mode, gsize *out_len) gs_free const char **strv = NULL; /* FIXME: some modes should support backslash escaping. - * In particular, to distinguish from _value_str_as_index_list(), which - * does not accept '\\'. */ + * In particular, to distinguish from _value_str_as_index_list(), which + * does not accept '\\'. */ /* note that all modes remove empty tokens (",", "a,,b", ",,"). */ switch (split_mode) { @@ -213,7 +213,7 @@ _value_strsplit_assert_unsplitable(const char *str) gsize j, l; /* Assert that we cannot split the token and that it - * has no unescaped delimiters. */ + * has no unescaped delimiters. */ strv_test = _value_strsplit(str, VALUE_STRSPLIT_MODE_ESCAPED_TOKENS, NULL); nm_assert(NM_PTRARRAY_LEN(strv_test) == 1); @@ -378,7 +378,7 @@ _parse_ip_route(int family, const char *str, GError **error) while ( g_hash_table_iter_next(&iter, (gpointer *) &iter_key, (gpointer *) &iter_value)) { /* need to sink the reference, because nm_utils_parse_variant_attributes() returns - * floating refs. */ + * floating refs. */ g_variant_ref_sink(iter_value); if (!nm_ip_route_attribute_validate(iter_key, iter_value, family, NULL, error)) { @@ -850,7 +850,7 @@ _get_fcn_gobject_impl(const NMMetaPropertyInfo *property_info, g_object_get_property(G_OBJECT(setting), property_info->property_name, &val); /* Currently, only one particular property asks us to "handle_emptyunset". - * So, don't implement it (yet) for the other types, where it's unneeded. */ + * So, don't implement it (yet) for the other types, where it's unneeded. */ nm_assert(!handle_emptyunset || (gtype_prop == G_TYPE_STRV && !glib_handles_str_transform)); if (gtype_prop == G_TYPE_STRING) { @@ -859,7 +859,7 @@ _get_fcn_gobject_impl(const NMMetaPropertyInfo *property_info, if (property_info->property_typ_data && property_info->property_typ_data->subtype.gobject_string.handle_emptyunset) { /* This string property can both be empty and NULL. We need to - * signal them differently. */ + * signal them differently. */ cstr = g_value_get_string(&val); nm_assert((!!is_default) == (cstr == NULL)); RETURN_STR_EMPTYUNSET(get_type, is_default, NULL); @@ -1188,7 +1188,7 @@ static gconstpointer _get_fcn_gobject_enum(ARGS_GET_FCN) } /* the gobject_enum.value_infos are currently ignored for the getter. They - * only declare additional aliases for the setter. */ + * only declare additional aliases for the setter. */ if (property_info->property_typ_data) value_infos = property_info->property_typ_data->subtype.gobject_enum.value_infos_get; @@ -1226,14 +1226,14 @@ static gboolean _set_fcn_gobject_string(ARGS_SET_FCN) if (property_info->property_typ_data->subtype.gobject_string.handle_emptyunset) { if (value && value[0] && NM_STRCHAR_ALL(value, ch, ch == ' ')) { /* this string property can both be %NULL and empty. To express that, we coerce - * a value of all whitespaces to dropping the first whitespace. That means, - * " " gives "", " " gives " ", and so on. - * - * This way the user can set the string value to "" (meaning NULL) and to - * " " (meaning ""), and any other string. - * - * This is and non-obvious escaping mechanism. But out of all the possible - * solutions, it seems the most sensible one. */ + * a value of all whitespaces to dropping the first whitespace. That means, + * " " gives "", " " gives " ", and so on. + * + * This way the user can set the string value to "" (meaning NULL) and to + * " " (meaning ""), and any other string. + * + * This is and non-obvious escaping mechanism. But out of all the possible + * solutions, it seems the most sensible one. */ value++; } } @@ -1666,7 +1666,7 @@ static const char *const *_values_fcn_gobject_enum(ARGS_VALUES_FCN) } /* the gobject_enum.value_infos are currently ignored for the list of - * values. They only declare additional (hidden) aliases for the setter. */ + * values. They only declare additional (hidden) aliases for the setter. */ v = nm_utils_strv_make_deep_copied(nm_utils_enum_get_values(gtype, min, max)); return (const char *const *) (*out_to_free = v); @@ -1927,7 +1927,7 @@ static gboolean _set_fcn_multilist(ARGS_SET_FCN) else if (property_info->property_typ_data->subtype.multilist.clear_emptyunset_fcn && _is_default(property_info, setting)) { /* the property is already the default. But we hav here a '+' / '-' modifier, so - * that always makes it non-default (empty) first. */ + * that always makes it non-default (empty) first. */ _multilist_clear_property(property_info, setting, TRUE); } @@ -2143,7 +2143,7 @@ static const char *const *_complete_fcn_vpn_service_type(ARGS_COMPLETE_FCN) if (!text || !*text) { /* If the prompt text is empty or contains no '.', - * filter out full names. */ + * filter out full names. */ for (i = 0, j = 0; values[i]; i++) { if (strchr(values[i], '.')) { g_free(values[i]); @@ -2439,20 +2439,20 @@ _nm_meta_setting_bond_add_option(NMSetting * setting, if ((val2 = nm_setting_bond_get_option_by_name(s_bond, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE)) && !nm_streq(val2, value)) { /* "active_slave" option is deprecated and an alias for "primary". When - * setting "primary" to a different value, remove the deprecated "active_slave" - * setting. - * - * If we wouldn't do this, then the profile would work as requested, but ignoring - * the (redundant, differing) "active_slave" option. That is confusing, thus clean - * it up. */ + * setting "primary" to a different value, remove the deprecated "active_slave" + * setting. + * + * If we wouldn't do this, then the profile would work as requested, but ignoring + * the (redundant, differing) "active_slave" option. That is confusing, thus clean + * it up. */ nm_setting_bond_remove_option(s_bond, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE); } } else if (nm_streq(name, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE)) { if ((val2 = nm_setting_bond_get_option_by_name(s_bond, NM_SETTING_BOND_OPTION_PRIMARY)) && !nm_streq(val2, value)) { /* "active_slave" is a deprecated alias for "primary". NetworkManager will ignore - * "active_slave" if "primary" is set, we thus need to coerce the primary option - * too. */ + * "active_slave" if "primary" is set, we thus need to coerce the primary option + * too. */ nm_setting_bond_add_option(s_bond, NM_SETTING_BOND_OPTION_PRIMARY, value); } } @@ -2526,12 +2526,12 @@ static gboolean _set_fcn_connection_type(ARGS_SET_FCN) if (nm_setting_connection_get_uuid(NM_SETTING_CONNECTION(setting))) { /* Don't allow setting type unless the connection is brand new. - * Just because it's a bad idea and the user wouldn't probably want that. - * No technical reason, really. - * Also, using uuid to see if the connection is brand new is a bit - * hacky: we can not see if the type is already set, because - * nmc_setting_set_property() is called only after the property - * we're setting (type) has been removed. */ + * Just because it's a bad idea and the user wouldn't probably want that. + * No technical reason, really. + * Also, using uuid to see if the connection is brand new is a bit + * hacky: we can not see if the type is already set, because + * nmc_setting_set_property() is called only after the property + * we're setting (type) has been removed. */ g_set_error(error, 1, 0, _("Can not change the connection type")); return FALSE; } @@ -2661,7 +2661,7 @@ static const char *const *_complete_fcn_connection_master(ARGS_COMPLETE_FCN) if ((!text || !*text) && operation_context && operation_context->connection) { /* if we have no text yet, initially only complete for matching - * slave-type. */ + * slave-type. */ s_con = nm_connection_get_setting_connection(operation_context->connection); if (s_con) expected_type = nm_setting_connection_get_slave_type(s_con); @@ -3339,16 +3339,16 @@ static gboolean _set_fcn_objlist(ARGS_SET_FCN) for (i = 0; i < nstrv; i++) { /* FIXME: there is the problem here that set_fcn() might succeed on the first item - * (modifying it), and fail to parse the second one. - * - * Optimally, we would first parse all input strings before starting the - * modify the setting. The setting should only be modified if (and only if) - * the entire operation succeeds to set all items. - * - * Currently, in interactive mode this leads to odd behavior. - * - * This does not only affect objlist.set_fcn() or _pt_objlist properties. - * E.g. we also call _gobject_property_reset() before validating the input. */ + * (modifying it), and fail to parse the second one. + * + * Optimally, we would first parse all input strings before starting the + * modify the setting. The setting should only be modified if (and only if) + * the entire operation succeeds to set all items. + * + * Currently, in interactive mode this leads to odd behavior. + * + * This does not only affect objlist.set_fcn() or _pt_objlist properties. + * E.g. we also call _gobject_property_reset() before validating the input. */ if (!property_info->property_typ_data->subtype.objlist .set_fcn(setting, !_SET_FCN_DO_REMOVE(modifier, value), strv[i], error)) return FALSE; @@ -3395,8 +3395,8 @@ static gboolean _set_fcn_ip_config_gateway(ARGS_SET_FCN) } /* Since commit c1907a218a6b6bfe8175eb6ed87a523aaabc69ae, having a gateway and never-default=yes - * will be normalized away. That means, when we set a gateway, we also want to unset never-default, - * otherwise the operation gets silently reverted. */ + * will be normalized away. That means, when we set a gateway, we also want to unset never-default, + * otherwise the operation gets silently reverted. */ g_object_set(setting, property_info->property_name, value, @@ -3467,11 +3467,11 @@ _objlist_set_fcn_ip_config_routing_rules(NMSetting * setting, return FALSE; /* also for @do_add, we first always search whether such a rule already exist - * and remove the first occurrence. - * - * The effect is, that we don't add multiple times the same rule, - * and that if the rule already exists, it gets moved to the end (append). - */ + * and remove the first occurrence. + * + * The effect is, that we don't add multiple times the same rule, + * and that if the rule already exists, it gets moved to the end (append). + */ n = nm_setting_ip_config_get_num_routing_rules(s_ip); for (i = 0; i < n; i++) { NMIPRoutingRule *rr; @@ -4529,7 +4529,7 @@ static const NMMetaPropertyType _pt_objlist = { #define MTU_GET_FCN(type, func) \ /* macro that returns @func as const (guint32(*)(NMSetting*)) type, but checks - * that the actual type is (guint32(*)(type *)). */ \ + * that the actual type is (guint32(*)(type *)). */ \ ((guint32 (*) (NMSetting *)) ((sizeof (func == ((guint32 (*) (type *)) func))) ? func : func) ) #define TEAM_DESCRIBE_MESSAGE \ diff --git a/clients/common/nm-meta-setting-desc.h b/clients/common/nm-meta-setting-desc.h index fed2fa36d4..41551e1523 100644 --- a/clients/common/nm-meta-setting-desc.h +++ b/clients/common/nm-meta-setting-desc.h @@ -159,8 +159,8 @@ typedef enum { NM_META_ACCESSOR_GET_OUT_FLAGS_STRV = (1LL << 0), /* the property allows to be hidden, if and only if, it's value is set to the - * default. This should only be set by new properties, to preserve behavior - * of old properties, which were always printed. */ + * default. This should only be set by new properties, to preserve behavior + * of old properties, which were always printed. */ NM_META_ACCESSOR_GET_OUT_FLAGS_HIDE = (1LL << 1), } NMMetaAccessorGetOutFlags; @@ -231,7 +231,7 @@ struct _NMMetaPropertyType { char *** out_to_free); /* Whether set_fcn() supports the '-' modifier. That is, whether the property - * is a list type. */ + * is a list type. */ bool set_supports_remove : 1; }; @@ -280,8 +280,8 @@ struct _NMMetaPropertyTypData { void (*clear_all_fcn)(NMSetting *setting); /* some multilist properties distinguish between an empty list and - * and unset. If this function pointer is set, certain behaviors come - * into action to handle that. */ + * and unset. If this function pointer is set, certain behaviors come + * into action to handle that. */ void (*clear_emptyunset_fcn)(NMSetting *setting, gboolean is_set /* or else set default */); @@ -417,15 +417,15 @@ struct _NMMetaSettingInfoEditor { guint properties_num; /* a NMConnection has a main type (connection.type), which is a - * main NMSetting instance. Depending on the type, a connection - * may have a list of other allowed settings. - * - * For example, a connection of type "vlan" may have settings - * of type "connection", "vlan", and "wired". - * - * Some setting types a not a main type (NMSettingProxy). They - * don't have valid_settings but are usually referenced by other - * settings to be valid for them. */ + * main NMSetting instance. Depending on the type, a connection + * may have a list of other allowed settings. + * + * For example, a connection of type "vlan" may have settings + * of type "connection", "vlan", and "wired". + * + * Some setting types a not a main type (NMSettingProxy). They + * don't have valid_settings but are usually referenced by other + * settings to be valid for them. */ const NMMetaSettingValidPartItem *const *valid_parts; void (*setting_init_fcn)(const NMMetaSettingInfoEditor *setting_info, diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c index bee1e7a782..270299db74 100644 --- a/clients/common/nm-polkit-listener.c +++ b/clients/common/nm-polkit-listener.c @@ -170,7 +170,7 @@ choose_identity(GVariant *identities) const char * user; /* Choose identity. First try current user, then root, and else - * take the first one we find. */ + * take the first one we find. */ user = getenv("USER"); @@ -428,10 +428,10 @@ io_watch_have_data(int fd, GIOCondition condition, gpointer user_data) } /* Either an error or EOF happened. The data we parsed so far was not relevant. - * Regardless of what we still have unprocessed in the receive buffers, we are done. - * - * We would expect that the other side completed with SUCCESS or FAILURE. Apparently - * it didn't. If we had any good request, we assume success. */ + * Regardless of what we still have unprocessed in the receive buffers, we are done. + * + * We would expect that the other side completed with SUCCESS or FAILURE. Apparently + * it didn't. If we had any good request, we assume success. */ auth_result = request->request_any_response; goto out; } diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c index 0a8be69a0b..604c7477bb 100644 --- a/clients/common/nm-secret-agent-simple.c +++ b/clients/common/nm-secret-agent-simple.c @@ -263,9 +263,9 @@ add_8021x_secrets(RequestData *request, GPtrArray *secrets) if (NM_IN_STRSET(eap_method, "md5", "leap", "ttls", "peap")) { /* TTLS and PEAP are actually much more complicated, but this complication - * is not visible here since we only care about phase2 authentication - * (and don't even care of which one) - */ + * is not visible here since we only care about phase2 authentication + * (and don't even care of which one) + */ secret = _secret_real_new_plain(NM_SECRET_AGENT_SECRET_TYPE_PROPERTY, _("Username"), NM_SETTING(s_8021x), @@ -612,8 +612,8 @@ _auth_dialog_exited(GPid pid, int status, gpointer user_data) out: /* Try to fall back to the hardwired VPN support if the auth dialog fails. - * We may eventually get rid of the whole hardwired secrets handling at some point, - * when the auth helpers are goode enough.. */ + * We may eventually get rid of the whole hardwired secrets handling at some point, + * when the auth helpers are goode enough.. */ if (error && add_vpn_secrets(request, secrets, &message)) { g_clear_error(&error); if (!message) { @@ -660,7 +660,7 @@ _auth_dialog_read_done(GObject *source_object, GAsyncResult *res, gpointer user_ break; case 0: /* Done reading. Let's wait for the auth dialog to exit so that we're able to collect the status. - * Remember we can be cancelled in between. */ + * Remember we can be cancelled in between. */ data->child_watch_id = g_child_watch_add(data->auth_dialog_pid, _auth_dialog_exited, data); data->cancellable = g_object_ref(data->request->cancellable); data->cancellable_id = @@ -688,7 +688,7 @@ _auth_dialog_write_done(GObject *source_object, GAsyncResult *res, gpointer user _nm_unused gs_free char *auth_dialog_request_free = user_data; /* We don't care about write errors. If there are any problems, the - * reader shall notice. */ + * reader shall notice. */ g_output_stream_write_finish(auth_dialog_out, res, NULL); g_output_stream_close(auth_dialog_out, NULL, NULL); } @@ -1214,7 +1214,7 @@ cancel_get_secrets(NMSecretAgentOld *agent, const char *connection_path, const c request = g_hash_table_lookup(priv->requests, &request_id); if (!request) { /* this is really a bug of the caller (or us?). We cannot invoke a callback, - * hence the caller cannot cleanup the request. */ + * hence the caller cannot cleanup the request. */ g_return_if_reached(); } @@ -1266,9 +1266,9 @@ nm_secret_agent_simple_enable(NMSecretAgentSimple *self, const char *path) gs_free char * path_full = NULL; /* The path is only used to match a request_id with the current - * connection. Since the request_id is "${CONNECTION_PATH}/${SETTING}", - * add a trailing '/' to the path to match the full connection path. - */ + * connection. Since the request_id is "${CONNECTION_PATH}/${SETTING}", + * add a trailing '/' to the path to match the full connection path. + */ path_full = path ? g_strdup_printf("%s/", path) : NULL; if (!nm_streq0(path_full, priv->path)) { @@ -1365,27 +1365,27 @@ nm_secret_agent_simple_class_init(NMSecretAgentSimpleClass *klass) agent_class->delete_secrets = delete_secrets; /** - * NMSecretAgentSimple::request-secrets: - * @agent: the #NMSecretAgentSimple - * @request_id: request ID, to eventually pass to - * nm_secret_agent_simple_response(). - * @title: a title for the password dialog - * @prompt: a prompt message for the password dialog - * @secrets: (element-type #NMSecretAgentSimpleSecret): array of secrets - * being requested. - * - * Emitted when the agent requires secrets from the user. - * - * The application should ask user for the secrets. For example, - * nmtui should create a password dialog (#NmtPasswordDialog) - * with the given title and prompt, and an entry for each - * element of @secrets. If any of the secrets already have a - * <literal>value</literal> filled in, the corresponding entry - * should be initialized to that value. - * - * When the dialog is complete, the app must call - * nm_secret_agent_simple_response() with the results. - */ + * NMSecretAgentSimple::request-secrets: + * @agent: the #NMSecretAgentSimple + * @request_id: request ID, to eventually pass to + * nm_secret_agent_simple_response(). + * @title: a title for the password dialog + * @prompt: a prompt message for the password dialog + * @secrets: (element-type #NMSecretAgentSimpleSecret): array of secrets + * being requested. + * + * Emitted when the agent requires secrets from the user. + * + * The application should ask user for the secrets. For example, + * nmtui should create a password dialog (#NmtPasswordDialog) + * with the given title and prompt, and an entry for each + * element of @secrets. If any of the secrets already have a + * <literal>value</literal> filled in, the corresponding entry + * should be initialized to that value. + * + * When the dialog is complete, the app must call + * nm_secret_agent_simple_response() with the results. + */ signals[REQUEST_SECRETS] = g_signal_new(NM_SECRET_AGENT_SIMPLE_REQUEST_SECRETS, G_TYPE_FROM_CLASS(klass), 0, diff --git a/clients/common/nm-vpn-helpers.c b/clients/common/nm-vpn-helpers.c index e786fcb2e4..d872f7d5d5 100644 --- a/clients/common/nm-vpn-helpers.c +++ b/clients/common/nm-vpn-helpers.c @@ -231,11 +231,11 @@ nm_vpn_openconnect_authenticate_helper(const char *host, return FALSE; /* Parse output and set cookie, gateway and gwcert - * output example: - * COOKIE='loremipsum' - * HOST='1.2.3.4' - * FINGERPRINT='sha1:32bac90cf09a722e10ecc1942c67fe2ac8c21e2e' - */ + * output example: + * COOKIE='loremipsum' + * HOST='1.2.3.4' + * FINGERPRINT='sha1:32bac90cf09a722e10ecc1942c67fe2ac8c21e2e' + */ output_v = nm_utils_strsplit_set_with_empty(output, "\r\n"); for (iter = output_v; iter && *iter; iter++) { char *s_mutable = (char *) *iter; @@ -288,9 +288,9 @@ _line_match(char *line, const char *key, gsize key_len, const char **out_key, ch nm_assert(out_value && !*out_value); /* Note that `wg-quick` (linux.bash) does case-insensitive comparison (shopt -s nocasematch). - * `wg setconf` does case-insensitive comparison too (with strncasecmp, which is locale dependent). - * - * We do a case-insensitive comparison of the key, however in a locale-independent manner. */ + * `wg setconf` does case-insensitive comparison too (with strncasecmp, which is locale dependent). + * + * We do a case-insensitive comparison of the key, however in a locale-independent manner. */ if (g_ascii_strncasecmp(line, key, key_len) != 0) return FALSE; @@ -366,9 +366,9 @@ nm_vpn_wireguard_import(const char *filename, GError **error) g_return_val_if_fail(!error || !*error, NULL); /* contrary to "wg-quick", we never interpret the filename as "/etc/wireguard/$INTERFACE.conf". - * If the filename has no '/', it is interpreted as relative to the current working directory. - * However, we do require a suitable filename suffix and that the name corresponds to the interface - * name. */ + * If the filename has no '/', it is interpreted as relative to the current working directory. + * However, we do require a suitable filename suffix and that the name corresponds to the interface + * name. */ cstr = strrchr(filename, '/'); cstr = cstr ? &cstr[1] : filename; if (NM_STR_HAS_SUFFIX(cstr, ".conf")) { @@ -401,14 +401,14 @@ nm_vpn_wireguard_import(const char *filename, GError **error) return NULL; /* We interpret the file like `wg-quick up` and `wg setconf` do. - * - * Of course the WireGuard scripts do something fundamentlly different. They - * perform actions to configure the WireGuard link in kernel, add routes and - * addresses, and call resolvconf. It all happens at the time when the script - * run. - * - * This code here instead generates a NetworkManager connection profile so that - * NetworkManager will apply a similar configuration when later activating the profile. */ + * + * Of course the WireGuard scripts do something fundamentlly different. They + * perform actions to configure the WireGuard link in kernel, add routes and + * addresses, and call resolvconf. It all happens at the time when the script + * run. + * + * This code here instead generates a NetworkManager connection profile so that + * NetworkManager will apply a similar configuration when later activating the profile. */ #define _TABLE_AUTO ((gint64) -1) #define _TABLE_OFF ((gint64) -2) @@ -433,14 +433,14 @@ nm_vpn_wireguard_import(const char *filename, GError **error) (line_remainder++)[0] = '\0'; /* Drop all spaces and truncate at first '#'. - * See wg's config_read_line(). - * - * Note that wg-quick doesn't do that. - * - * Neither `wg setconf` nor `wg-quick` does a strict parsing. - * We don't either. Just try to interpret the file (mostly) the same as - * they would. - */ + * See wg's config_read_line(). + * + * Note that wg-quick doesn't do that. + * + * Neither `wg setconf` nor `wg-quick` does a strict parsing. + * We don't either. Just try to interpret the file (mostly) the same as + * they would. + */ { gsize l, n; @@ -448,7 +448,7 @@ nm_vpn_wireguard_import(const char *filename, GError **error) for (l = 0; (ch = line[l]); l++) { if (g_ascii_isspace(ch)) { /* wg-setconf strips all whitespace before parsing the content. That means, - * *[I nterface]" will be accepted. We do that too. */ + * *[I nterface]" will be accepted. We do that too. */ continue; } if (ch == '#') @@ -524,8 +524,8 @@ nm_vpn_wireguard_import(const char *filename, GError **error) goto fail_invalid_value; /* wg-quick accepts the "MTU" value, but it also fetches routes to - * autodetect it. NetworkManager won't do that, we can only configure - * an explicit MTU or no autodetection will be performed. */ + * autodetect it. NetworkManager won't do that, we can only configure + * an explicit MTU or no autodetection will be performed. */ data_mtu = i64; continue; } @@ -562,7 +562,7 @@ nm_vpn_wireguard_import(const char *filename, GError **error) data_table = _TABLE_OFF; else { /* we don't support table names from /etc/iproute2/rt_tables - * But we accept hex like `ip route add` would. */ + * But we accept hex like `ip route add` would. */ i64 = _nm_utils_ascii_str_to_int64(value, 0, 0, G_MAXINT32, -1); if (i64 == -1) goto fail_invalid_value; @@ -581,7 +581,7 @@ nm_vpn_wireguard_import(const char *filename, GError **error) if (line_match(line, "SaveConfig", &matched_key, &value)) { /* we ignore the setting, but enforce that it's either true or false (like - * wg-quick. */ + * wg-quick. */ if (!NM_IN_STRSET(value, "true", "false")) goto fail_invalid_value; continue; @@ -589,7 +589,7 @@ nm_vpn_wireguard_import(const char *filename, GError **error) if (line_match(line, "ListenPort", &matched_key, &value)) { /* we don't use getaddrinfo(), unlike `wg setconf`. Just interpret - * the port as plain decimal number. */ + * the port as plain decimal number. */ i64 = _nm_utils_ascii_str_to_int64(value, 10, 0, 0xFFFF, -1); if (i64 == -1) goto fail_invalid_value; @@ -748,10 +748,10 @@ fail_invalid_secret: if (data_dns && !data_addr) { /* When specifying "DNS", we also require an "Address" for the same address - * family. That is because a NMSettingIPConfig cannot have @method_disabled - * and DNS settings at the same time. - * - * We don't have addresses. Silently ignore the DNS setting. */ + * family. That is because a NMSettingIPConfig cannot have @method_disabled + * and DNS settings at the same time. + * + * We don't have addresses. Silently ignore the DNS setting. */ data_dns = NULL; data_dns_search2 = NULL; } @@ -762,8 +762,8 @@ fail_invalid_secret: NULL); /* For WireGuard profiles, always set dns-priority to a negative value, - * so that DNS servers on other profiles get ignored. This is also what - * wg-quick does, by calling `resolvconf -x`. */ + * so that DNS servers on other profiles get ignored. This is also what + * wg-quick does, by calling `resolvconf -x`. */ g_object_set(s_ip, NM_SETTING_IP_CONFIG_DNS_PRIORITY, (int) -50, NULL); if (data_addr) { @@ -775,7 +775,7 @@ fail_invalid_secret: nm_setting_ip_config_add_dns(s_ip, data_dns->pdata[i]); /* Of the wg-quick doesn't specify a search domain, assume the user - * wants to use the domain server for all searches. */ + * wants to use the domain server for all searches. */ if (!data_dns_search2) nm_setting_ip_config_add_dns_search(s_ip, "~"); } @@ -786,20 +786,20 @@ fail_invalid_secret: if (data_table == _TABLE_AUTO) { /* in the "auto" setting, wg-quick adds peer-routes automatically to the main - * table. NetworkManager will do that too, but there are differences: - * - * - NetworkManager (contrary to wg-quick) does not check whether the peer-route is necessary. - * It will always add a route for each allowed-ips range, even if there is already another - * route that would ensure packets to the endpoint are routed via the WireGuard interface. - * If you don't want that, disable "wireguard.peer-routes", and add the necessary routes - * yourself to "ipv4.routes" and "ipv6.routes". - * - * - With "auto", wg-quick also configures policy routing to handle default-routes (/0) to - * avoid routing loops. - * The imported connection profile will have wireguard.ip4-auto-default-route and - * wireguard.ip6-auto-default-route set to "default". It will thus configure wg-quick's - * policy routing if the profile has any AllowedIPs ranges with /0. - */ + * table. NetworkManager will do that too, but there are differences: + * + * - NetworkManager (contrary to wg-quick) does not check whether the peer-route is necessary. + * It will always add a route for each allowed-ips range, even if there is already another + * route that would ensure packets to the endpoint are routed via the WireGuard interface. + * If you don't want that, disable "wireguard.peer-routes", and add the necessary routes + * yourself to "ipv4.routes" and "ipv6.routes". + * + * - With "auto", wg-quick also configures policy routing to handle default-routes (/0) to + * avoid routing loops. + * The imported connection profile will have wireguard.ip4-auto-default-route and + * wireguard.ip6-auto-default-route set to "default". It will thus configure wg-quick's + * policy routing if the profile has any AllowedIPs ranges with /0. + */ } else if (data_table == _TABLE_OFF) { if (is_v4) { g_object_set(s_wg, NM_SETTING_WIREGUARD_PEER_ROUTES, FALSE, NULL); diff --git a/clients/tui/newt/nmt-newt-button.c b/clients/tui/newt/nmt-newt-button.c index 402faf7bbf..88a1d7ecb8 100644 --- a/clients/tui/newt/nmt-newt-button.c +++ b/clients/tui/newt/nmt-newt-button.c @@ -203,11 +203,11 @@ nmt_newt_button_class_init(NmtNewtButtonClass *button_class) /* signals */ /** - * NmtNewtButton::clicked: - * @button: the #NmtNewtButton - * - * Emitted when the button is clicked. - */ + * NmtNewtButton::clicked: + * @button: the #NmtNewtButton + * + * Emitted when the button is clicked. + */ signals[CLICKED] = g_signal_new("clicked", G_OBJECT_CLASS_TYPE(object_class), G_SIGNAL_RUN_FIRST, @@ -221,10 +221,10 @@ nmt_newt_button_class_init(NmtNewtButtonClass *button_class) /* properties */ /** - * NmtNewtButton:label: - * - * The button's label - */ + * NmtNewtButton:label: + * + * The button's label + */ g_object_class_install_property( object_class, PROP_LABEL, diff --git a/clients/tui/newt/nmt-newt-checkbox.c b/clients/tui/newt/nmt-newt-checkbox.c index 9e67dbd2f5..1a1cdfa654 100644 --- a/clients/tui/newt/nmt-newt-checkbox.c +++ b/clients/tui/newt/nmt-newt-checkbox.c @@ -195,19 +195,19 @@ nmt_newt_checkbox_class_init(NmtNewtCheckboxClass *checkbox_class) component_class->build_component = nmt_newt_checkbox_build_component; /** - * NmtNewtCheckbox:label: - * - * The checkbox's label - */ + * NmtNewtCheckbox:label: + * + * The checkbox's label + */ g_object_class_install_property( object_class, PROP_LABEL, g_param_spec_string("label", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtCheckbox:active: - * - * The checkbox's checked state - */ + * NmtNewtCheckbox:active: + * + * The checkbox's checked state + */ g_object_class_install_property( object_class, PROP_ACTIVE, diff --git a/clients/tui/newt/nmt-newt-component.c b/clients/tui/newt/nmt-newt-component.c index a7007e2c41..3f63ab864c 100644 --- a/clients/tui/newt/nmt-newt-component.c +++ b/clients/tui/newt/nmt-newt-component.c @@ -123,8 +123,8 @@ nmt_newt_component_size_allocate(NmtNewtWidget *widget, int x, int y, int width, newtGrid grid; /* You can't directly place a newtComponent, so we create a newtGrid, - * position the component within that, and then place the grid. - */ + * position the component within that, and then place the grid. + */ grid = newtCreateGrid(1, 1); newtGridSetField(grid, 0, @@ -267,21 +267,21 @@ nmt_newt_component_class_init(NmtNewtComponentClass *component_class) /* properties */ /** - * NmtNewtComponent:component: - * - * The component's #newtComponent - */ + * NmtNewtComponent:component: + * + * The component's #newtComponent + */ g_object_class_install_property( object_class, PROP_COMPONENT, g_param_spec_pointer("component", "", "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtComponent:sensitive: - * - * Whether the component is sensitive. Insensitive components will - * be skipped over in the keyboard tab chain, and may be displayed - * differently. - */ + * NmtNewtComponent:sensitive: + * + * Whether the component is sensitive. Insensitive components will + * be skipped over in the keyboard tab chain, and may be displayed + * differently. + */ g_object_class_install_property( object_class, PROP_SENSITIVE, diff --git a/clients/tui/newt/nmt-newt-entry-numeric.c b/clients/tui/newt/nmt-newt-entry-numeric.c index 10d6490c7c..c6c5d0778d 100644 --- a/clients/tui/newt/nmt-newt-entry-numeric.c +++ b/clients/tui/newt/nmt-newt-entry-numeric.c @@ -196,12 +196,12 @@ nmt_newt_entry_numeric_class_init(NmtNewtEntryNumericClass *entry_class) object_class->get_property = nmt_newt_entry_numeric_get_property; /** - * NmtNewtEntryNumeric:minimum: - * - * The minimum #NmtNewtWidget:valid value for the entry. If this - * is non-negative, then the entry will not allow negative numbers - * to be entered. - */ + * NmtNewtEntryNumeric:minimum: + * + * The minimum #NmtNewtWidget:valid value for the entry. If this + * is non-negative, then the entry will not allow negative numbers + * to be entered. + */ g_object_class_install_property( object_class, PROP_MINIMUM, @@ -213,10 +213,10 @@ nmt_newt_entry_numeric_class_init(NmtNewtEntryNumericClass *entry_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtEntryNumeric:maximum: - * - * The maximum #NmtNewtWidget:valid value for the entry. - */ + * NmtNewtEntryNumeric:maximum: + * + * The maximum #NmtNewtWidget:valid value for the entry. + */ g_object_class_install_property( object_class, PROP_MAXIMUM, @@ -228,11 +228,11 @@ nmt_newt_entry_numeric_class_init(NmtNewtEntryNumericClass *entry_class) G_MAXINT64, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtEntryNumeric:optional: - * - * If %TRUE, allow empty string to indicate some default value. - * It means the property is optional and can be left at the default - */ + * NmtNewtEntryNumeric:optional: + * + * If %TRUE, allow empty string to indicate some default value. + * It means the property is optional and can be left at the default + */ g_object_class_install_property( object_class, PROP_OPTIONAL, diff --git a/clients/tui/newt/nmt-newt-entry.c b/clients/tui/newt/nmt-newt-entry.c index 6fbc302134..5ab1f79273 100644 --- a/clients/tui/newt/nmt-newt-entry.c +++ b/clients/tui/newt/nmt-newt-entry.c @@ -457,28 +457,28 @@ nmt_newt_entry_class_init(NmtNewtEntryClass *entry_class) component_class->build_component = nmt_newt_entry_build_component; /** - * NmtNewtEntry:text - * - * The entry's text - */ + * NmtNewtEntry:text + * + * The entry's text + */ g_object_class_install_property( object_class, PROP_TEXT, g_param_spec_string("text", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtEntry:width - * - * The entry's width in characters - */ + * NmtNewtEntry:width + * + * The entry's width in characters + */ g_object_class_install_property( object_class, PROP_WIDTH, g_param_spec_int("width", "", "", -1, 80, -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtEntry:flags - * - * The entry's #NmtNewtEntryFlags - */ + * NmtNewtEntry:flags + * + * The entry's #NmtNewtEntryFlags + */ g_object_class_install_property( object_class, PROP_FLAGS, @@ -490,11 +490,11 @@ nmt_newt_entry_class_init(NmtNewtEntryClass *entry_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtEntry:password - * - * %TRUE if #NmtNewtEntry:flags contains %NMT_NEWT_ENTRY_PASSWORD, - * %FALSE if not. - */ + * NmtNewtEntry:password + * + * %TRUE if #NmtNewtEntry:flags contains %NMT_NEWT_ENTRY_PASSWORD, + * %FALSE if not. + */ g_object_class_install_property( object_class, PROP_PASSWORD, diff --git a/clients/tui/newt/nmt-newt-form.c b/clients/tui/newt/nmt-newt-form.c index d9ad278bc9..76e03c5aa7 100644 --- a/clients/tui/newt/nmt-newt-form.c +++ b/clients/tui/newt/nmt-newt-form.c @@ -281,8 +281,8 @@ nmt_newt_form_iterate(NmtNewtForm *form) if (es.reason == NEWT_EXIT_COMPONENT) { /* The user hit Return/Space on a component; update the form focus - * to point that component, and activate it. - */ + * to point that component, and activate it. + */ focus = nmt_newt_widget_find_component(priv->content, es.u.co); if (focus) { nmt_newt_form_set_focus(form, focus); @@ -572,11 +572,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) /* signals */ /** - * NmtNewtForm::quit: - * @form: the #NmtNewtForm - * - * Emitted when the form quits. - */ + * NmtNewtForm::quit: + * @form: the #NmtNewtForm + * + * Emitted when the form quits. + */ signals[QUIT] = g_signal_new("quit", G_OBJECT_CLASS_TYPE(object_class), G_SIGNAL_RUN_FIRST, @@ -588,11 +588,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) 0); /** - * NmtNewtForm:title: - * - * The form's title. If non-%NULL, this will be displayed above - * the form in its border. - */ + * NmtNewtForm:title: + * + * The form's title. If non-%NULL, this will be displayed above + * the form in its border. + */ g_object_class_install_property( object_class, PROP_TITLE, @@ -602,11 +602,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY)); /** - * NmtNewtForm:fullscreen: - * - * If %TRUE, the form will fill the entire "screen" (ie, terminal - * window). - */ + * NmtNewtForm:fullscreen: + * + * If %TRUE, the form will fill the entire "screen" (ie, terminal + * window). + */ g_object_class_install_property( object_class, PROP_FULLSCREEN, @@ -616,11 +616,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY)); /** - * NmtNewtForm:fullscreen-vertical: - * - * If %TRUE, the form will fill the entire "screen" (ie, terminal - * window) vertically, but not necessarily horizontally. - */ + * NmtNewtForm:fullscreen-vertical: + * + * If %TRUE, the form will fill the entire "screen" (ie, terminal + * window) vertically, but not necessarily horizontally. + */ g_object_class_install_property( object_class, PROP_FULLSCREEN_VERTICAL, @@ -630,11 +630,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY)); /** - * NmtNewtForm:fullscreen-horizontal: - * - * If %TRUE, the form will fill the entire "screen" (ie, terminal - * window) horizontally, but not necessarily vertically. - */ + * NmtNewtForm:fullscreen-horizontal: + * + * If %TRUE, the form will fill the entire "screen" (ie, terminal + * window) horizontally, but not necessarily vertically. + */ g_object_class_install_property( object_class, PROP_FULLSCREEN_HORIZONTAL, @@ -644,11 +644,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) FALSE, G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY)); /** - * NmtNewtForm:x: - * - * The form's x coordinate. By default, the form will be centered - * on the screen. - */ + * NmtNewtForm:x: + * + * The form's x coordinate. By default, the form will be centered + * on the screen. + */ g_object_class_install_property( object_class, PROP_X, @@ -660,11 +660,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY)); /** - * NmtNewtForm:y: - * - * The form's y coordinate. By default, the form will be centered - * on the screen. - */ + * NmtNewtForm:y: + * + * The form's y coordinate. By default, the form will be centered + * on the screen. + */ g_object_class_install_property( object_class, PROP_Y, @@ -676,11 +676,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY)); /** - * NmtNewtForm:width: - * - * The form's width. By default, this will be determined by the - * width of the form's content. - */ + * NmtNewtForm:width: + * + * The form's width. By default, this will be determined by the + * width of the form's content. + */ g_object_class_install_property( object_class, PROP_WIDTH, @@ -692,11 +692,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY)); /** - * NmtNewtForm:height: - * - * The form's height. By default, this will be determined by the - * height of the form's content. - */ + * NmtNewtForm:height: + * + * The form's height. By default, this will be determined by the + * height of the form's content. + */ g_object_class_install_property( object_class, PROP_HEIGHT, @@ -708,10 +708,10 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY)); /** - * NmtNewtForm:padding: - * - * The padding between the form's content and its border. - */ + * NmtNewtForm:padding: + * + * The padding between the form's content and its border. + */ g_object_class_install_property( object_class, PROP_PADDING, @@ -723,11 +723,11 @@ nmt_newt_form_class_init(NmtNewtFormClass *form_class) 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY)); /** - * NmtNewtForm:escape-exits: - * - * If %TRUE, then hitting the Escape key will cause the form to - * exit. - */ + * NmtNewtForm:escape-exits: + * + * If %TRUE, then hitting the Escape key will cause the form to + * exit. + */ g_object_class_install_property( object_class, PROP_ESCAPE_EXITS, diff --git a/clients/tui/newt/nmt-newt-label.c b/clients/tui/newt/nmt-newt-label.c index 08b31e9232..d31514f9db 100644 --- a/clients/tui/newt/nmt-newt-label.c +++ b/clients/tui/newt/nmt-newt-label.c @@ -265,19 +265,19 @@ nmt_newt_label_class_init(NmtNewtLabelClass *label_class) component_class->build_component = nmt_newt_label_build_component; /** - * NmtNewtLabel:text: - * - * The label's text - */ + * NmtNewtLabel:text: + * + * The label's text + */ g_object_class_install_property( object_class, PROP_TEXT, g_param_spec_string("text", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtLabel:style: - * - * The label's #NmtNewtLabelStyle - */ + * NmtNewtLabel:style: + * + * The label's #NmtNewtLabelStyle + */ g_object_class_install_property(object_class, PROP_STYLE, g_param_spec_int("style", @@ -288,10 +288,10 @@ nmt_newt_label_class_init(NmtNewtLabelClass *label_class) 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtLabel:highlight: - * - * Whether the label is highlighted. - */ + * NmtNewtLabel:highlight: + * + * Whether the label is highlighted. + */ g_object_class_install_property( object_class, PROP_HIGHLIGHT, diff --git a/clients/tui/newt/nmt-newt-listbox.c b/clients/tui/newt/nmt-newt-listbox.c index 18da63d634..c6d51dab17 100644 --- a/clients/tui/newt/nmt-newt-listbox.c +++ b/clients/tui/newt/nmt-newt-listbox.c @@ -450,10 +450,10 @@ nmt_newt_listbox_class_init(NmtNewtListboxClass *listbox_class) /* properties */ /** - * NmtNewtListbox:height: - * - * The listbox's height, or -1 if it has no fixed height. - */ + * NmtNewtListbox:height: + * + * The listbox's height, or -1 if it has no fixed height. + */ g_object_class_install_property(object_class, PROP_HEIGHT, g_param_spec_int("height", @@ -464,10 +464,10 @@ nmt_newt_listbox_class_init(NmtNewtListboxClass *listbox_class) -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtListbox:flags: - * - * The listbox's #NmtNewtListboxFlags. - */ + * NmtNewtListbox:flags: + * + * The listbox's #NmtNewtListboxFlags. + */ g_object_class_install_property( object_class, PROP_FLAGS, @@ -479,10 +479,10 @@ nmt_newt_listbox_class_init(NmtNewtListboxClass *listbox_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtListbox:active: - * - * The currently-selected row. - */ + * NmtNewtListbox:active: + * + * The currently-selected row. + */ g_object_class_install_property(object_class, PROP_ACTIVE, g_param_spec_int("active", @@ -493,20 +493,20 @@ nmt_newt_listbox_class_init(NmtNewtListboxClass *listbox_class) 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtListbox:active-key: - * - * The key of the currently-selected row. - */ + * NmtNewtListbox:active-key: + * + * The key of the currently-selected row. + */ g_object_class_install_property( object_class, PROP_ACTIVE_KEY, g_param_spec_pointer("active-key", "", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtListbox:skip-null-keys: - * - * If %TRUE, rows with %NULL key values will be skipped over when - * navigating the list with the arrow keys. - */ + * NmtNewtListbox:skip-null-keys: + * + * If %TRUE, rows with %NULL key values will be skipped over when + * navigating the list with the arrow keys. + */ g_object_class_install_property( object_class, PROP_SKIP_NULL_KEYS, diff --git a/clients/tui/newt/nmt-newt-popup.c b/clients/tui/newt/nmt-newt-popup.c index 1c1175fd2b..a388cbaf64 100644 --- a/clients/tui/newt/nmt-newt-popup.c +++ b/clients/tui/newt/nmt-newt-popup.c @@ -140,14 +140,14 @@ nmt_newt_popup_activated(NmtNewtWidget *widget) &button_x, &button_y); /* (window_x + button_x) is the screen X coordinate of the newtComponent. A - * newtButton labelled "Foo" is rendered as " <Foo>" (with a preceding - * space), so the "F" is at (window_x + button_x + 2). We've added 1 column - * of padding to the left of the listbox, so we need to position the popup - * at (window_x + button_x + 1) in order for its text to be aligned with the - * button's text. (The x and y coordinates given to NmtNewtForm are the - * coordinates of the top left of the window content, ignoring the border - * graphics.) - */ + * newtButton labelled "Foo" is rendered as " <Foo>" (with a preceding + * space), so the "F" is at (window_x + button_x + 2). We've added 1 column + * of padding to the left of the listbox, so we need to position the popup + * at (window_x + button_x + 1) in order for its text to be aligned with the + * button's text. (The x and y coordinates given to NmtNewtForm are the + * coordinates of the top left of the window content, ignoring the border + * graphics.) + */ window_x += button_x + 1; window_y += button_y - priv->active; @@ -316,10 +316,10 @@ nmt_newt_popup_class_init(NmtNewtPopupClass *popup_class) component_class->build_component = nmt_newt_popup_build_component; /** - * NmtNewtPopup:active: - * - * The index of the currently-active entry. - */ + * NmtNewtPopup:active: + * + * The index of the currently-active entry. + */ g_object_class_install_property(object_class, PROP_ACTIVE, g_param_spec_uint("active", @@ -330,10 +330,10 @@ nmt_newt_popup_class_init(NmtNewtPopupClass *popup_class) 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtPopup:active-id: - * - * The textual ID of the currently-active entry. - */ + * NmtNewtPopup:active-id: + * + * The textual ID of the currently-active entry. + */ g_object_class_install_property( object_class, PROP_ACTIVE_ID, diff --git a/clients/tui/newt/nmt-newt-section.c b/clients/tui/newt/nmt-newt-section.c index 6f481a0679..2f5d870fd9 100644 --- a/clients/tui/newt/nmt-newt-section.c +++ b/clients/tui/newt/nmt-newt-section.c @@ -262,10 +262,10 @@ adjust_border_for_allocation(NmtNewtSectionPrivate *priv, int height) int i; /* We have to use a series of one-line labels rather than a multi-line - * textbox, because newt will hide any component that's partially offscreen, - * but we want the on-screen portion of the border to show even if part of - * it is offscreen. - */ + * textbox, because newt will hide any component that's partially offscreen, + * but we want the on-screen portion of the border to show even if part of + * it is offscreen. + */ if (height == 1) { nmt_newt_widget_set_visible(priv->border_closed_label, TRUE); @@ -379,10 +379,10 @@ nmt_newt_section_class_init(NmtNewtSectionClass *section_class) /* properties */ /** - * NmtNewtSection:show-border: - * - * %TRUE if the section should show a border along the left side. - */ + * NmtNewtSection:show-border: + * + * %TRUE if the section should show a border along the left side. + */ g_object_class_install_property( object_class, PROP_SHOW_BORDER, @@ -393,11 +393,11 @@ nmt_newt_section_class_init(NmtNewtSectionClass *section_class) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtSection:open: - * - * %TRUE if the section is open (ie, its body is visible), %FALSE - * if not. - */ + * NmtNewtSection:open: + * + * %TRUE if the section is open (ie, its body is visible), %FALSE + * if not. + */ g_object_class_install_property( object_class, PROP_OPEN, diff --git a/clients/tui/newt/nmt-newt-stack.c b/clients/tui/newt/nmt-newt-stack.c index 6f74976af9..2af2a9ddd6 100644 --- a/clients/tui/newt/nmt-newt-stack.c +++ b/clients/tui/newt/nmt-newt-stack.c @@ -97,9 +97,9 @@ nmt_newt_stack_size_request(NmtNewtWidget *widget, int *width, int *height) } /* We size-request all pages so that embedded NmtPageGrids will - * participate in their size-grouping (so that switching pages - * won't result in the column widths changing). - */ + * participate in their size-grouping (so that switching pages + * won't result in the column widths changing). + */ for (i = 0; i < priv->children->len; i++) { nmt_newt_widget_size_request(priv->children->pdata[i], &child_width, &child_height); if (i == priv->active) { @@ -312,10 +312,10 @@ nmt_newt_stack_class_init(NmtNewtStackClass *stack_class) container_class->child_validity_changed = nmt_newt_stack_child_validity_changed; /** - * NmtNewtStack:active: - * - * The index of the active page - */ + * NmtNewtStack:active: + * + * The index of the active page + */ g_object_class_install_property(object_class, PROP_ACTIVE, g_param_spec_uint("active", @@ -326,10 +326,10 @@ nmt_newt_stack_class_init(NmtNewtStackClass *stack_class) 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtStack:active-id: - * - * The ID of the active page - */ + * NmtNewtStack:active-id: + * + * The ID of the active page + */ g_object_class_install_property( object_class, PROP_ACTIVE_ID, diff --git a/clients/tui/newt/nmt-newt-textbox.c b/clients/tui/newt/nmt-newt-textbox.c index b5de5dc1d7..591f399a81 100644 --- a/clients/tui/newt/nmt-newt-textbox.c +++ b/clients/tui/newt/nmt-newt-textbox.c @@ -237,19 +237,19 @@ nmt_newt_textbox_class_init(NmtNewtTextboxClass *textbox_class) component_class->build_component = nmt_newt_textbox_build_component; /** - * NmtNewtTextbox:text: - * - * The textbox's text - */ + * NmtNewtTextbox:text: + * + * The textbox's text + */ g_object_class_install_property( object_class, PROP_TEXT, g_param_spec_string("text", "", "", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtTextbox:flags: - * - * The textbox's flags - */ + * NmtNewtTextbox:flags: + * + * The textbox's flags + */ g_object_class_install_property( object_class, PROP_FLAGS, @@ -261,11 +261,11 @@ nmt_newt_textbox_class_init(NmtNewtTextboxClass *textbox_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtTextbox:wrap-width: - * - * The width in characters at which the textbox's text - * will wrap, or 0 if it does not wrap. - */ + * NmtNewtTextbox:wrap-width: + * + * The width in characters at which the textbox's text + * will wrap, or 0 if it does not wrap. + */ g_object_class_install_property( object_class, PROP_WRAP_WIDTH, diff --git a/clients/tui/newt/nmt-newt-toggle-button.c b/clients/tui/newt/nmt-newt-toggle-button.c index 60fdd98414..adeb69bc76 100644 --- a/clients/tui/newt/nmt-newt-toggle-button.c +++ b/clients/tui/newt/nmt-newt-toggle-button.c @@ -185,28 +185,28 @@ nmt_newt_toggle_button_class_init(NmtNewtToggleButtonClass *button_class) widget_class->activated = nmt_newt_toggle_button_activated; /** - * NmtNewtToggleButton:on-label: - * - * The label the button displays when it is "on". - */ + * NmtNewtToggleButton:on-label: + * + * The label the button displays when it is "on". + */ g_object_class_install_property( object_class, PROP_ON_LABEL, g_param_spec_string("on-label", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtToggleButton:off-label: - * - * The label the button displays when it is "off". - */ + * NmtNewtToggleButton:off-label: + * + * The label the button displays when it is "off". + */ g_object_class_install_property( object_class, PROP_OFF_LABEL, g_param_spec_string("off-label", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtToggleButton:active: - * - * Whether the button is currently "on" (%TRUE) or "off" (%FALSE) - */ + * NmtNewtToggleButton:active: + * + * Whether the button is currently "on" (%TRUE) or "off" (%FALSE) + */ g_object_class_install_property( object_class, PROP_ACTIVE, diff --git a/clients/tui/newt/nmt-newt-utils.c b/clients/tui/newt/nmt-newt-utils.c index 9c6bb9b4e3..6a67638455 100644 --- a/clients/tui/newt/nmt-newt-utils.c +++ b/clients/tui/newt/nmt-newt-utils.c @@ -58,9 +58,9 @@ nmt_newt_dialog_g_log_handler(const char * log_domain, message); /* newtWinMessage() wraps the window too narrowly by default, so - * we don't want to use that. But we intentionally avoid using any - * NmtNewt classes, to avoid possible error recursion. - */ + * we don't want to use that. But we intentionally avoid using any + * NmtNewt classes, to avoid possible error recursion. + */ newtGetScreenSize(&screen_width, &screen_height); text = newtTextboxReflowed(-1, -1, full_message, MAX(70, screen_width - 10), 0, 0, 0); diff --git a/clients/tui/newt/nmt-newt-widget.c b/clients/tui/newt/nmt-newt-widget.c index 1a5ac0ff24..bbce69704d 100644 --- a/clients/tui/newt/nmt-newt-widget.c +++ b/clients/tui/newt/nmt-newt-widget.c @@ -557,13 +557,13 @@ nmt_newt_widget_class_init(NmtNewtWidgetClass *widget_class) /* signals */ /** - * NmtNewtWidget::needs-rebuild: - * @widget: the #NmtNewtWidget - * - * Emitted when nmt_newt_widget_need_rebuild() is called on @widget - * or any of its children. This signal propagates up the container - * hierarchy, eventually reaching the top-level #NmtNewtForm. - */ + * NmtNewtWidget::needs-rebuild: + * @widget: the #NmtNewtWidget + * + * Emitted when nmt_newt_widget_need_rebuild() is called on @widget + * or any of its children. This signal propagates up the container + * hierarchy, eventually reaching the top-level #NmtNewtForm. + */ signals[NEEDS_REBUILD] = g_signal_new("needs-rebuild", G_OBJECT_CLASS_TYPE(object_class), G_SIGNAL_RUN_FIRST, @@ -575,11 +575,11 @@ nmt_newt_widget_class_init(NmtNewtWidgetClass *widget_class) 0); /** - * NmtNewtWidget::activated: - * @widget: the #NmtNewtWidget - * - * Emitted when the widget's #newtComponent is activated. - */ + * NmtNewtWidget::activated: + * @widget: the #NmtNewtWidget + * + * Emitted when the widget's #newtComponent is activated. + */ signals[ACTIVATED] = g_signal_new("activated", G_OBJECT_CLASS_TYPE(object_class), G_SIGNAL_RUN_FIRST, @@ -593,10 +593,10 @@ nmt_newt_widget_class_init(NmtNewtWidgetClass *widget_class) /* properties */ /** - * NmtNewtWidget:parent: - * - * The widget's parent widget, or %NULL if it has no parent. - */ + * NmtNewtWidget:parent: + * + * The widget's parent widget, or %NULL if it has no parent. + */ g_object_class_install_property(object_class, PROP_PARENT, g_param_spec_object("parent", @@ -605,32 +605,32 @@ nmt_newt_widget_class_init(NmtNewtWidgetClass *widget_class) NMT_TYPE_NEWT_WIDGET, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtWidget:visible: - * - * Whether the widget is visible. Invisible widgets do not get - * realized or sized. - */ + * NmtNewtWidget:visible: + * + * Whether the widget is visible. Invisible widgets do not get + * realized or sized. + */ g_object_class_install_property( object_class, PROP_VISIBLE, g_param_spec_boolean("visible", "", "", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtWidget:valid: - * - * Whether the widget's content is considered valid. Components - * determine their own validity. A container, by default, is - * considered valid if all of its children are valid. - */ + * NmtNewtWidget:valid: + * + * Whether the widget's content is considered valid. Components + * determine their own validity. A container, by default, is + * considered valid if all of its children are valid. + */ g_object_class_install_property( object_class, PROP_VALID, g_param_spec_boolean("valid", "", "", TRUE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** - * NmtNewtWidget:exit-on-activate: - * - * If %TRUE, the widget will call nmt_newt_form_quit() on its form - * when it is activated. - */ + * NmtNewtWidget:exit-on-activate: + * + * If %TRUE, the widget will call nmt_newt_form_quit() on its form + * when it is activated. + */ g_object_class_install_property( object_class, PROP_EXIT_ON_ACTIVATE, diff --git a/clients/tui/nm-editor-bindings.c b/clients/tui/nm-editor-bindings.c index 442d0355f9..c8863c90b9 100644 --- a/clients/tui/nm-editor-bindings.c +++ b/clients/tui/nm-editor-bindings.c @@ -1069,8 +1069,8 @@ vlan_settings_changed(GObject *object, GParamSpec *pspec, gpointer user_data) return; /* If the id in INTERFACE_NAME changed, and ID is either unset, or was previously - * in sync with INTERFACE_NAME, then update ID. - */ + * in sync with INTERFACE_NAME, then update ID. + */ if (id != ifname_id && (id == binding->last_ifname_id || id == 0)) { binding->updating = TRUE; g_object_set(G_OBJECT(binding->s_vlan), NM_SETTING_VLAN_ID, ifname_id, NULL); @@ -1078,8 +1078,8 @@ vlan_settings_changed(GObject *object, GParamSpec *pspec, gpointer user_data) } /* If the PARENT in INTERFACE_NAME changed, and PARENT is either unset, or was - * previously in sync with INTERFACE_NAME, then update PARENT. - */ + * previously in sync with INTERFACE_NAME, then update PARENT. + */ if (g_strcmp0(parent, ifname_parent) != 0 && (g_strcmp0(parent, binding->last_ifname_parent) == 0 || !parent || !*parent)) { binding->updating = TRUE; diff --git a/clients/tui/nmt-address-list.c b/clients/tui/nmt-address-list.c index f859b7ef7f..c62871c05f 100644 --- a/clients/tui/nmt-address-list.c +++ b/clients/tui/nmt-address-list.c @@ -237,10 +237,10 @@ nmt_address_list_class_init(NmtAddressListClass *list_class) widget_list_class->remove_clicked = nmt_address_list_remove_clicked; /** - * NmtAddressList:list-type: - * - * The type of address the list holds. - */ + * NmtAddressList:list-type: + * + * The type of address the list holds. + */ g_object_class_install_property( object_class, PROP_LIST_TYPE, @@ -252,10 +252,10 @@ nmt_address_list_class_init(NmtAddressListClass *list_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtAddressList:strings: - * - * The strings in the list's entries. - */ + * NmtAddressList:strings: + * + * The strings in the list's entries. + */ g_object_class_install_property(object_class, PROP_STRINGS, g_param_spec_boxed("strings", diff --git a/clients/tui/nmt-connect-connection-list.c b/clients/tui/nmt-connect-connection-list.c index f651c7cfc5..ae346d733a 100644 --- a/clients/tui/nmt-connect-connection-list.c +++ b/clients/tui/nmt-connect-connection-list.c @@ -157,8 +157,8 @@ sort_connections(gconstpointer a, gconstpointer b) } /* If one is an NMConnection and the other is an NMAccessPoint, the - * connection comes first. - */ + * connection comes first. + */ if (nmta->conn) return -1; else if (nmtb->conn) diff --git a/clients/tui/nmt-device-entry.c b/clients/tui/nmt-device-entry.c index 04a2bb4f3e..399f1a623b 100644 --- a/clients/tui/nmt-device-entry.c +++ b/clients/tui/nmt-device-entry.c @@ -491,10 +491,10 @@ nmt_device_entry_class_init(NmtDeviceEntryClass *deventry_class) object_class->finalize = nmt_device_entry_finalize; /** - * NmtDeviceEntry:label: - * - * The entry's label - */ + * NmtDeviceEntry:label: + * + * The entry's label + */ g_object_class_install_property( object_class, PROP_LABEL, @@ -504,21 +504,21 @@ nmt_device_entry_class_init(NmtDeviceEntryClass *deventry_class) NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtDeviceEntry:width: - * - * The entry's width in characters - */ + * NmtDeviceEntry:width: + * + * The entry's width in characters + */ g_object_class_install_property( object_class, PROP_WIDTH, g_param_spec_int("width", "", "", -1, 80, -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtDeviceEntry:hardware-type: - * - * The type of #NMDevice to limit the entry to, or %G_TYPE_NONE - * if the entry is for a virtual device and should not accept - * hardware addresses. - */ + * NmtDeviceEntry:hardware-type: + * + * The type of #NMDevice to limit the entry to, or %G_TYPE_NONE + * if the entry is for a virtual device and should not accept + * hardware addresses. + */ g_object_class_install_property(object_class, PROP_HARDWARE_TYPE, g_param_spec_gtype("hardware-type", @@ -527,10 +527,10 @@ nmt_device_entry_class_init(NmtDeviceEntryClass *deventry_class) G_TYPE_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtDeviceEntry:interface-name: - * - * The interface name of the device identified by the entry. - */ + * NmtDeviceEntry:interface-name: + * + * The interface name of the device identified by the entry. + */ g_object_class_install_property( object_class, PROP_INTERFACE_NAME, @@ -540,10 +540,10 @@ nmt_device_entry_class_init(NmtDeviceEntryClass *deventry_class) NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtDeviceEntry:mac-address: - * - * The hardware address of the device identified by the entry. - */ + * NmtDeviceEntry:mac-address: + * + * The hardware address of the device identified by the entry. + */ g_object_class_install_property( object_class, PROP_MAC_ADDRESS, diff --git a/clients/tui/nmt-edit-connection-list.c b/clients/tui/nmt-edit-connection-list.c index c51f80cff2..fb5cc8078e 100644 --- a/clients/tui/nmt-edit-connection-list.c +++ b/clients/tui/nmt-edit-connection-list.c @@ -428,11 +428,11 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class) /* signals */ /** - * NmtEditConnectionList::add-connection: - * @list: the #NmtEditConnectionList - * - * Emitted when the user clicks the list's "Add" button. - */ + * NmtEditConnectionList::add-connection: + * @list: the #NmtEditConnectionList + * + * Emitted when the user clicks the list's "Add" button. + */ signals[ADD_CONNECTION] = g_signal_new("add-connection", G_OBJECT_CLASS_TYPE(object_class), @@ -445,13 +445,13 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class) 0); /** - * NmtEditConnectionList::edit-connection: - * @list: the #NmtEditConnectionList - * @connection: the connection to edit - * - * Emitted when the user clicks the list's "Edit" button, or - * hits "Return" on the listbox. - */ + * NmtEditConnectionList::edit-connection: + * @list: the #NmtEditConnectionList + * @connection: the connection to edit + * + * Emitted when the user clicks the list's "Edit" button, or + * hits "Return" on the listbox. + */ signals[EDIT_CONNECTION] = g_signal_new("edit-connection", G_OBJECT_CLASS_TYPE(object_class), @@ -465,12 +465,12 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class) NM_TYPE_CONNECTION); /** - * NmtEditConnectionList::remove-connection: - * @list: the #NmtEditConnectionList - * @connection: the connection to remove - * - * Emitted when the user clicks the list's "Delete" button. - */ + * NmtEditConnectionList::remove-connection: + * @list: the #NmtEditConnectionList + * @connection: the connection to remove + * + * Emitted when the user clicks the list's "Delete" button. + */ signals[REMOVE_CONNECTION] = g_signal_new("remove-connection", G_OBJECT_CLASS_TYPE(object_class), @@ -486,12 +486,12 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class) /* properties */ /** - * NmtEditConnectionList:grouped: - * - * If %TRUE, connections should be grouped by type, with headers - * indicating the types (as in the main connection list). If %FALSE, - * they will not be grouped (as in slave connection lists). - */ + * NmtEditConnectionList:grouped: + * + * If %TRUE, connections should be grouped by type, with headers + * indicating the types (as in the main connection list). If %FALSE, + * they will not be grouped (as in slave connection lists). + */ g_object_class_install_property( object_class, PROP_GROUPED, @@ -502,21 +502,21 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtEditConnectionListFilter: - * @list: the #NmtEditConnectionList - * @connection: an #NMConnection - * @user_data: the user data - * - * Decides whether @connection should be displayed in @list. - * - * Returns: %TRUE or %FALSE - */ + * NmtEditConnectionListFilter: + * @list: the #NmtEditConnectionList + * @connection: an #NMConnection + * @user_data: the user data + * + * Decides whether @connection should be displayed in @list. + * + * Returns: %TRUE or %FALSE + */ /** - * NmtEditConnectionList:connection-filter: - * - * A callback function for filtering which connections appear in - * the list. - */ + * NmtEditConnectionList:connection-filter: + * + * A callback function for filtering which connections appear in + * the list. + */ g_object_class_install_property( object_class, PROP_CONNECTION_FILTER, @@ -525,10 +525,10 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class) "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtEditConnectionList:connection-filter-data: - * - * Data for the #NmtEditConnectionList:connection-filter. - */ + * NmtEditConnectionList:connection-filter-data: + * + * Data for the #NmtEditConnectionList:connection-filter. + */ g_object_class_install_property( object_class, PROP_CONNECTION_FILTER_DATA, @@ -538,11 +538,11 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtEditConnectionList:extra-widget: - * - * An extra button widget to display at the bottom of the button - * box. - */ + * NmtEditConnectionList:extra-widget: + * + * An extra button widget to display at the bottom of the button + * box. + */ g_object_class_install_property( object_class, PROP_EXTRA_WIDGET, @@ -553,12 +553,12 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtEditConnectionList:connections: - * - * The list of connections in the widget. - * - * Element-Type: #NMConnection - */ + * NmtEditConnectionList:connections: + * + * The list of connections in the widget. + * + * Element-Type: #NMConnection + */ g_object_class_install_property(object_class, PROP_CONNECTIONS, g_param_spec_boxed("connections", @@ -568,10 +568,10 @@ nmt_edit_connection_list_class_init(NmtEditConnectionListClass *list_class) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** - * NmtEditConnectionList:num-connections: - * - * The number of connections in the widget. - */ + * NmtEditConnectionList:num-connections: + * + * The number of connections in the widget. + */ g_object_class_install_property(object_class, PROP_NUM_CONNECTIONS, g_param_spec_int("num-connections", diff --git a/clients/tui/nmt-editor-page.c b/clients/tui/nmt-editor-page.c index dec56ba04e..51b9da66f3 100644 --- a/clients/tui/nmt-editor-page.c +++ b/clients/tui/nmt-editor-page.c @@ -160,10 +160,10 @@ nmt_editor_page_class_init(NmtEditorPageClass *page_class) /* properties */ /** - * NmtEditorPage:connection: - * - * The page's #NMConnection. - */ + * NmtEditorPage:connection: + * + * The page's #NMConnection. + */ g_object_class_install_property( object_class, PROP_CONNECTION, diff --git a/clients/tui/nmt-editor-section.c b/clients/tui/nmt-editor-section.c index 4fbdd16ec7..73fc24dfd4 100644 --- a/clients/tui/nmt-editor-section.c +++ b/clients/tui/nmt-editor-section.c @@ -68,8 +68,8 @@ rebuild_header(NmtEditorSection *section) NmtEditorSectionPrivate *priv = NMT_EDITOR_SECTION_GET_PRIVATE(section); /* Removing any widget in an NmtEditorGrid removes its whole row, so we can - * remove the existing title/widget/toggle by asking to remove toggle. - */ + * remove the existing title/widget/toggle by asking to remove toggle. + */ nmt_newt_container_remove(NMT_NEWT_CONTAINER(priv->header), priv->toggle); nmt_editor_grid_append(priv->header, priv->title, priv->header_widget, priv->toggle); @@ -222,10 +222,10 @@ nmt_editor_section_class_init(NmtEditorSectionClass *section_class) /* properties */ /** - * NmtEditorSection:title: - * - * The section's title. - */ + * NmtEditorSection:title: + * + * The section's title. + */ g_object_class_install_property( object_class, PROP_TITLE, @@ -236,10 +236,10 @@ nmt_editor_section_class_init(NmtEditorSectionClass *section_class) G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtEditorSection:show-by-default: - * - * Whether the section should be expanded by default. - */ + * NmtEditorSection:show-by-default: + * + * Whether the section should be expanded by default. + */ g_object_class_install_property( object_class, PROP_SHOW_BY_DEFAULT, @@ -250,11 +250,11 @@ nmt_editor_section_class_init(NmtEditorSectionClass *section_class) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtEditorSection:header-widget: - * - * The widget (if any) that appears between the section title and its toggle - * button. - */ + * NmtEditorSection:header-widget: + * + * The widget (if any) that appears between the section title and its toggle + * button. + */ g_object_class_install_property( object_class, PROP_HEADER_WIDGET, diff --git a/clients/tui/nmt-editor.c b/clients/tui/nmt-editor.c index be68e6c5b6..d94adfa112 100644 --- a/clients/tui/nmt-editor.c +++ b/clients/tui/nmt-editor.c @@ -166,8 +166,8 @@ save_connection_and_exit(NmtNewtButton *button, gpointer user_data) } /* Clear secrets so they don't lay around in memory; they'll get - * requested again anyway next time the connection is edited. - */ + * requested again anyway next time the connection is edited. + */ nm_connection_clear_secrets(priv->orig_connection); } else { nm_client_add_connection_async(nm_client, @@ -334,8 +334,8 @@ nmt_editor_constructed(GObject *object) hardware_type = priv->type_data->device_type; /* For connections involving multiple network devices, clarify which one - * NMSettingConnection:interface-name refers to. - */ + * NMSettingConnection:interface-name refers to. + */ if (nm_connection_is_type(priv->edit_connection, NM_SETTING_PPPOE_SETTING_NAME)) deventry_label = _("Ethernet device"); else @@ -507,10 +507,10 @@ nmt_editor_class_init(NmtEditorClass *entry_class) object_class->finalize = nmt_editor_finalize; /** - * NmtEditor:connection: - * - * The connection being edited. - */ + * NmtEditor:connection: + * + * The connection being edited. + */ g_object_class_install_property( object_class, PROP_CONNECTION, @@ -520,10 +520,10 @@ nmt_editor_class_init(NmtEditorClass *entry_class) NM_TYPE_CONNECTION, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtEditor:type-data: - * - * The #NmEditorConnectionTypeData for #NmtEditor:connection. - */ + * NmtEditor:type-data: + * + * The #NmEditorConnectionTypeData for #NmtEditor:connection. + */ g_object_class_install_property( object_class, PROP_TYPE_DATA, diff --git a/clients/tui/nmt-ip-entry.c b/clients/tui/nmt-ip-entry.c index c22775bc7e..9173ad2a70 100644 --- a/clients/tui/nmt-ip-entry.c +++ b/clients/tui/nmt-ip-entry.c @@ -175,10 +175,10 @@ nmt_ip_entry_class_init(NmtIPEntryClass *entry_class) object_class->get_property = nmt_ip_entry_get_property; /** - * NmtIPEntry:family: - * - * The address family. Eg, %AF_INET - */ + * NmtIPEntry:family: + * + * The address family. Eg, %AF_INET + */ g_object_class_install_property( object_class, PROP_FAMILY, @@ -190,11 +190,11 @@ nmt_ip_entry_class_init(NmtIPEntryClass *entry_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtIPEntry:prefix: - * - * If %TRUE, the entry accepts address/prefix combinations. If - * %FALSE it accepts just addresses. - */ + * NmtIPEntry:prefix: + * + * If %TRUE, the entry accepts address/prefix combinations. If + * %FALSE it accepts just addresses. + */ g_object_class_install_property( object_class, PROP_PREFIX, @@ -204,12 +204,12 @@ nmt_ip_entry_class_init(NmtIPEntryClass *entry_class) FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtIPEntry:optional: - * - * If %TRUE, the entry will be #NmtNewtWidget:valid when it is - * empty. If %FALSE, it will only be valid when it contains a - * valid address or address/prefix. - */ + * NmtIPEntry:optional: + * + * If %TRUE, the entry will be #NmtNewtWidget:valid when it is + * empty. If %FALSE, it will only be valid when it contains a + * valid address or address/prefix. + */ g_object_class_install_property( object_class, PROP_OPTIONAL, diff --git a/clients/tui/nmt-mac-entry.c b/clients/tui/nmt-mac-entry.c index 5101c326da..77804f319d 100644 --- a/clients/tui/nmt-mac-entry.c +++ b/clients/tui/nmt-mac-entry.c @@ -110,8 +110,8 @@ mac_validator(NmtNewtEntry *entry, const char *text, gpointer user_data) g_free(fixed); /* FIXME: NmtNewtEntry doesn't correctly deal with us calling set_text() - * from inside the validator. - */ + * from inside the validator. + */ nmt_newt_widget_needs_rebuild(NMT_NEWT_WIDGET(entry)); } @@ -193,11 +193,11 @@ nmt_mac_entry_class_init(NmtMacEntryClass *entry_class) object_class->get_property = nmt_mac_entry_get_property; /** - * NmtMacEntry:mac-length: - * - * The length in bytes of the hardware address type the entry - * accepts: either %ETH_ALEN or %INFINIBAND_ALEN. - */ + * NmtMacEntry:mac-length: + * + * The length in bytes of the hardware address type the entry + * accepts: either %ETH_ALEN or %INFINIBAND_ALEN. + */ g_object_class_install_property(object_class, PROP_MAC_LENGTH, g_param_spec_int("mac-length", @@ -208,11 +208,11 @@ nmt_mac_entry_class_init(NmtMacEntryClass *entry_class) ETH_ALEN, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtMacEntry:mac-address: - * - * The MAC address, as a string (as with the various #NMSetting - * "mac-address" properties). - */ + * NmtMacEntry:mac-address: + * + * The MAC address, as a string (as with the various #NMSetting + * "mac-address" properties). + */ g_object_class_install_property( object_class, PROP_MAC_ADDRESS, @@ -222,11 +222,11 @@ nmt_mac_entry_class_init(NmtMacEntryClass *entry_class) NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtMacEntry:entry-type: - * - * The type of the #NmtMacEntry. Can be either used for plain - * MAC addresses or for the extended format for cloned MAC addresses. - */ + * NmtMacEntry:entry-type: + * + * The type of the #NmtMacEntry. Can be either used for plain + * MAC addresses or for the extended format for cloned MAC addresses. + */ g_object_class_install_property( object_class, PROP_ENTRY_TYPE, diff --git a/clients/tui/nmt-mtu-entry.c b/clients/tui/nmt-mtu-entry.c index 7b5c304590..980b4c88d8 100644 --- a/clients/tui/nmt-mtu-entry.c +++ b/clients/tui/nmt-mtu-entry.c @@ -160,10 +160,10 @@ nmt_mtu_entry_class_init(NmtMtuEntryClass *entry_class) object_class->get_property = nmt_mtu_entry_get_property; /** - * NmtMtuEntry:mtu: - * - * The contents of the entry, as a number. - */ + * NmtMtuEntry:mtu: + * + * The contents of the entry, as a number. + */ g_object_class_install_property(object_class, PROP_MTU, g_param_spec_int("mtu", diff --git a/clients/tui/nmt-page-bond.c b/clients/tui/nmt-page-bond.c index d732b58ba8..553b9943e9 100644 --- a/clients/tui/nmt-page-bond.c +++ b/clients/tui/nmt-page-bond.c @@ -36,8 +36,8 @@ typedef struct { NmtSlaveList *slaves; /* Note: when adding new options to the UI also ensure they are - * initialized in bond_connection_setup_func() - */ + * initialized in bond_connection_setup_func() + */ NmtNewtPopup * mode; NmtNewtEntry * primary; NmtNewtPopup * monitoring; diff --git a/clients/tui/nmt-page-wifi.c b/clients/tui/nmt-page-wifi.c index 279fd80f10..866c045ea3 100644 --- a/clients/tui/nmt-page-wifi.c +++ b/clients/tui/nmt-page-wifi.c @@ -172,9 +172,9 @@ nmt_page_wifi_constructed(GObject *object) s_wsec = nm_connection_get_setting_wireless_security(conn); if (!s_wsec) { /* It makes things simpler if we always have a - * NMSettingWirelessSecurity; we'll hold a ref on one, and add - * it to and remove it from the connection as needed. - */ + * NMSettingWirelessSecurity; we'll hold a ref on one, and add + * it to and remove it from the connection as needed. + */ s_wsec = NM_SETTING_WIRELESS_SECURITY(nm_setting_wireless_security_new()); } priv->s_wsec = g_object_ref_sink(s_wsec); diff --git a/clients/tui/nmt-password-dialog.c b/clients/tui/nmt-password-dialog.c index 2704312429..fb2cf7d712 100644 --- a/clients/tui/nmt-password-dialog.c +++ b/clients/tui/nmt-password-dialog.c @@ -91,8 +91,8 @@ maybe_save_input_and_exit(NmtNewtWidget *widget, gpointer dialog) int i; /* This gets invoked when the user types Return in the final entry, - * but the form may not be fully valid in that case. - */ + * but the form may not be fully valid in that case. + */ if (!nmt_newt_widget_get_valid(priv->secret_grid)) return; @@ -245,10 +245,10 @@ nmt_password_dialog_class_init(NmtPasswordDialogClass *dialog_class) object_class->finalize = nmt_password_dialog_finalize; /** - * NmtPasswordDialog:request-id: - * - * The request ID from the #NMSecretAgentSimple - */ + * NmtPasswordDialog:request-id: + * + * The request ID from the #NMSecretAgentSimple + */ g_object_class_install_property( object_class, PROP_REQUEST_ID, @@ -258,10 +258,10 @@ nmt_password_dialog_class_init(NmtPasswordDialogClass *dialog_class) NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtPasswordDialog:prompt: - * - * The prompt text. - */ + * NmtPasswordDialog:prompt: + * + * The prompt text. + */ g_object_class_install_property( object_class, PROP_PROMPT, @@ -271,12 +271,12 @@ nmt_password_dialog_class_init(NmtPasswordDialogClass *dialog_class) NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtPasswordDialog:secrets: - * - * The array of request secrets - * - * Element-Type: #NMSecretAgentSimpleSecret. - */ + * NmtPasswordDialog:secrets: + * + * The array of request secrets + * + * Element-Type: #NMSecretAgentSimpleSecret. + */ g_object_class_install_property( object_class, PROP_SECRETS, diff --git a/clients/tui/nmt-password-fields.c b/clients/tui/nmt-password-fields.c index 90e2e88246..6c11b3acfa 100644 --- a/clients/tui/nmt-password-fields.c +++ b/clients/tui/nmt-password-fields.c @@ -246,19 +246,19 @@ nmt_password_fields_class_init(NmtPasswordFieldsClass *entry_class) object_class->finalize = nmt_password_fields_finalize; /** - * NmtPasswordFields:width: - * - * The width in characters of the password entry - */ + * NmtPasswordFields:width: + * + * The width in characters of the password entry + */ g_object_class_install_property( object_class, PROP_WIDTH, g_param_spec_int("width", "", "", -1, 80, -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtPasswordFields:extras: - * - * The extra widgets to show - */ + * NmtPasswordFields:extras: + * + * The extra widgets to show + */ g_object_class_install_property( object_class, PROP_EXTRAS, @@ -270,19 +270,19 @@ nmt_password_fields_class_init(NmtPasswordFieldsClass *entry_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtPasswordFields:password: - * - * The entered password. - */ + * NmtPasswordFields:password: + * + * The entered password. + */ g_object_class_install_property( object_class, PROP_PASSWORD, g_param_spec_string("password", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtPasswordFields:always-ask: - * - * The current state of the "Always ask" checkbox. - */ + * NmtPasswordFields:always-ask: + * + * The current state of the "Always ask" checkbox. + */ g_object_class_install_property( object_class, PROP_ALWAYS_ASK, @@ -292,10 +292,10 @@ nmt_password_fields_class_init(NmtPasswordFieldsClass *entry_class) FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtPasswordFields:show-password: - * - * The current state of the "Show password" checkbox. - */ + * NmtPasswordFields:show-password: + * + * The current state of the "Show password" checkbox. + */ g_object_class_install_property( object_class, PROP_SHOW_PASSWORD, diff --git a/clients/tui/nmt-route-editor.c b/clients/tui/nmt-route-editor.c index 143e26b0e7..54741c1a5a 100644 --- a/clients/tui/nmt-route-editor.c +++ b/clients/tui/nmt-route-editor.c @@ -170,11 +170,11 @@ nmt_route_editor_class_init(NmtRouteEditorClass *entry_class) object_class->finalize = nmt_route_editor_finalize; /** - * NmtRouteEditor:setting: - * - * The #NMSettingIP4Config or #NMSettingIP6Config whose routes are - * being edited. - */ + * NmtRouteEditor:setting: + * + * The #NMSettingIP4Config or #NMSettingIP6Config whose routes are + * being edited. + */ g_object_class_install_property( object_class, PROP_SETTING, diff --git a/clients/tui/nmt-route-entry.c b/clients/tui/nmt-route-entry.c index 60e122054d..e8c772152e 100644 --- a/clients/tui/nmt-route-entry.c +++ b/clients/tui/nmt-route-entry.c @@ -227,10 +227,10 @@ nmt_route_entry_class_init(NmtRouteEntryClass *entry_class) widget_class->get_focus_component = nmt_route_entry_get_focus_component; /** - * NmtRouteEntry:family: - * - * The address family of the route, eg, %AF_INET - */ + * NmtRouteEntry:family: + * + * The address family of the route, eg, %AF_INET + */ g_object_class_install_property( object_class, PROP_FAMILY, @@ -242,10 +242,10 @@ nmt_route_entry_class_init(NmtRouteEntryClass *entry_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtRouteEntry:ip-entry-width: - * - * The width in characters of the IP address entries - */ + * NmtRouteEntry:ip-entry-width: + * + * The width in characters of the IP address entries + */ g_object_class_install_property( object_class, PROP_IP_ENTRY_WIDTH, @@ -257,10 +257,10 @@ nmt_route_entry_class_init(NmtRouteEntryClass *entry_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtRouteEntry:metric-entry-width: - * - * The width in characters of the metric entry - */ + * NmtRouteEntry:metric-entry-width: + * + * The width in characters of the metric entry + */ g_object_class_install_property( object_class, PROP_METRIC_ENTRY_WIDTH, @@ -272,10 +272,10 @@ nmt_route_entry_class_init(NmtRouteEntryClass *entry_class) 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtRouteEntry:route: - * - * The contents of the entries, as an #NMIPRoute. - */ + * NmtRouteEntry:route: + * + * The contents of the entries, as an #NMIPRoute. + */ g_object_class_install_property(object_class, PROP_ROUTE, g_param_spec_boxed("route", diff --git a/clients/tui/nmt-route-table.c b/clients/tui/nmt-route-table.c index d0f0283512..4b0ea58b7d 100644 --- a/clients/tui/nmt-route-table.c +++ b/clients/tui/nmt-route-table.c @@ -272,10 +272,10 @@ nmt_route_table_class_init(NmtRouteTableClass *table_class) object_class->finalize = nmt_route_table_finalize; /** - * NmtRouteTable:family: - * - * The network address family of the routes, eg %AF_INET - */ + * NmtRouteTable:family: + * + * The network address family of the routes, eg %AF_INET + */ g_object_class_install_property( object_class, PROP_FAMILY, @@ -287,13 +287,13 @@ nmt_route_table_class_init(NmtRouteTableClass *table_class) -1, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtRouteTable:routes: - * - * The array of routes, suitable for binding to #NMSettingIP4Config:routes - * or #NMSettingIP6Config:routes. - * - * Element-type: NMIPRoute - */ + * NmtRouteTable:routes: + * + * The array of routes, suitable for binding to #NMSettingIP4Config:routes + * or #NMSettingIP6Config:routes. + * + * Element-type: NMIPRoute + */ g_object_class_install_property(object_class, PROP_ROUTES, g_param_spec_boxed("routes", diff --git a/clients/tui/nmt-slave-list.c b/clients/tui/nmt-slave-list.c index aab4f4ca03..d0faffe8a4 100644 --- a/clients/tui/nmt-slave-list.c +++ b/clients/tui/nmt-slave-list.c @@ -208,10 +208,10 @@ nmt_slave_list_class_init(NmtSlaveListClass *list_class) connection_list_class->remove_connection = nmt_slave_list_remove_connection; /** - * NmtSlaveList:master: - * - * The master #NMConnection whose slaves are being displayed. - */ + * NmtSlaveList:master: + * + * The master #NMConnection whose slaves are being displayed. + */ g_object_class_install_property( object_class, PROP_MASTER, @@ -221,16 +221,16 @@ nmt_slave_list_class_init(NmtSlaveListClass *list_class) NM_TYPE_CONNECTION, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtSlaveList:type-filter: - * - * If non-%NULL, this will be used to limit the connection types - * that are available when the user clicks on the "Add" button to - * add a new slave. If the filter filters the list down to only a - * single connection type, then the user will not be presented - * with a connection-type dialog, and will instead be immediately - * taken to an editor window for the new slave after clicking - * "Add". - */ + * NmtSlaveList:type-filter: + * + * If non-%NULL, this will be used to limit the connection types + * that are available when the user clicks on the "Add" button to + * add a new slave. If the filter filters the list down to only a + * single connection type, then the user will not be presented + * with a connection-type dialog, and will instead be immediately + * taken to an editor window for the new slave after clicking + * "Add". + */ g_object_class_install_property( object_class, PROP_TYPE_FILTER, @@ -239,10 +239,10 @@ nmt_slave_list_class_init(NmtSlaveListClass *list_class) "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** - * NmtSlaveList:type-filter-data: - * - * User data passed to #NmtSlaveList:type-filter - */ + * NmtSlaveList:type-filter-data: + * + * User data passed to #NmtSlaveList:type-filter + */ g_object_class_install_property( object_class, PROP_TYPE_FILTER_DATA, diff --git a/clients/tui/nmt-widget-list.c b/clients/tui/nmt-widget-list.c index 3a8676789f..19d9f98b58 100644 --- a/clients/tui/nmt-widget-list.c +++ b/clients/tui/nmt-widget-list.c @@ -381,16 +381,16 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class) /* signals */ /** - * NmtNewtWidget::add-clicked: - * @list: the #NmtNewtWidgetList - * - * Emitted when the user clicks the "Add" button. The caller can - * decide whether or not to add a new widget, and call - * nmt_widget_list_set_length() with the new length if so. - * - * FIXME: the "Add" button should be insensitive if it's - * not going to work. - */ + * NmtNewtWidget::add-clicked: + * @list: the #NmtNewtWidgetList + * + * Emitted when the user clicks the "Add" button. The caller can + * decide whether or not to add a new widget, and call + * nmt_widget_list_set_length() with the new length if so. + * + * FIXME: the "Add" button should be insensitive if it's + * not going to work. + */ signals[ADD_CLICKED] = g_signal_new("add-clicked", G_OBJECT_CLASS_TYPE(object_class), G_SIGNAL_RUN_FIRST, @@ -401,17 +401,17 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class) G_TYPE_NONE, 0); /** - * NmtNewtWidget::remove-clicked: - * @list: the #NmtNewtWidgetList - * @n: the widget being removed - * - * Emitted when the user clicks one of the "Remove" buttons. The - * caller can decide whether or not to remove the widget, and - * call nmt_widget_list_set_length() with the new length if so. - * - * FIXME: the "Remove" button should be insensitive if it's not - * going to work. - */ + * NmtNewtWidget::remove-clicked: + * @list: the #NmtNewtWidgetList + * @n: the widget being removed + * + * Emitted when the user clicks one of the "Remove" buttons. The + * caller can decide whether or not to remove the widget, and + * call nmt_widget_list_set_length() with the new length if so. + * + * FIXME: the "Remove" button should be insensitive if it's not + * going to work. + */ signals[REMOVE_CLICKED] = g_signal_new("remove-clicked", G_OBJECT_CLASS_TYPE(object_class), G_SIGNAL_RUN_FIRST, @@ -426,10 +426,10 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class) /* properties */ /** - * NmtWidgetList:create-callback: - * - * Callback called to create a new widget. - */ + * NmtWidgetList:create-callback: + * + * Callback called to create a new widget. + */ g_object_class_install_property( object_class, PROP_CREATE_CALLBACK, @@ -438,29 +438,29 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class) "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtWidgetList:user-data: - * - * User data for #NmtWidgetList:create-callback - */ + * NmtWidgetList:user-data: + * + * User data for #NmtWidgetList:create-callback + */ g_object_class_install_property( object_class, PROP_USER_DATA, g_param_spec_pointer("user-data", "", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtWidgetList:destroy-notify: - * - * #GDestroyNotify for #NmtWidgetList:user-data - */ + * NmtWidgetList:destroy-notify: + * + * #GDestroyNotify for #NmtWidgetList:user-data + */ g_object_class_install_property( object_class, PROP_DESTROY_NOTIFY, g_param_spec_pointer("destroy-notify", "", "", G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtWidgetList:length: - * - * The length of the widget list; changing this value will add or - * remove widgets from the list. - */ + * NmtWidgetList:length: + * + * The length of the widget list; changing this value will add or + * remove widgets from the list. + */ g_object_class_install_property(object_class, PROP_LENGTH, g_param_spec_int("length", @@ -471,11 +471,11 @@ nmt_widget_list_class_init(NmtWidgetListClass *list_class) 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** - * NmtWidgetList:empty-widget: - * - * If non-%NULL, this widget will be displayed when there are - * no "real" widgets in the list. - */ + * NmtWidgetList:empty-widget: + * + * If non-%NULL, this widget will be displayed when there are + * no "real" widgets in the list. + */ g_object_class_install_property( object_class, PROP_EMPTY_WIDGET, diff --git a/clients/tui/nmtui-connect.c b/clients/tui/nmtui-connect.c index 8948b1d695..7c4edceeab 100644 --- a/clients/tui/nmtui-connect.c +++ b/clients/tui/nmtui-connect.c @@ -259,10 +259,10 @@ activate_connection(NMConnection *connection, NMDevice *device, NMObject *specif specific_object_path = specific_object ? nm_object_get_path(specific_object) : NULL; /* There's no way to cancel an nm_client_activate_connection() / - * nm_client_add_and_activate_connection() call, so we always let them - * complete, even if the user hits Esc; they shouldn't normally take long - * to complete anyway. - */ + * nm_client_add_and_activate_connection() call, so we always let them + * complete, even if the user hits Esc; they shouldn't normally take long + * to complete anyway. + */ nmt_sync_op_init(&op); if (connection) { @@ -306,8 +306,8 @@ activate_connection(NMConnection *connection, NMDevice *device, NMObject *specif } /* Now wait for the connection to actually reach the ACTIVATED state, - * allowing the user to cancel if it takes too long. - */ + * allowing the user to cancel if it takes too long. + */ nmt_sync_op_init(&op); info.active = ac; info.device = device; |