138
138
/// il faut creer une connection ...
139
139
g_print ("aucune des connexions existantes ne convient pour ce point d'acces\n");
141
GHashTable *pSettings = g_hash_table_new_full (g_str_hash,
144
g_hash_table_destroy);
146
GHashTable *pSubSettings = g_hash_table_new_full (g_str_hash,
150
g_hash_table_insert (pSettings, "connection", pSubSettings);
151
g_hash_table_insert (pSubSettings, "type", g_strdup ("802-11-wireless"));
152
g_hash_table_insert (pSettings, "id", g_strdup_printf ("CD - %s", pItemData->cSsid));
154
pSubSettings = g_hash_table_new_full (g_str_hash,
158
g_hash_table_insert (pSubSettings, "ssid", g_strdup (pItemData->cSsid));
159
g_hash_table_insert (pSubSettings, "mode", g_strdup ("infrastructure"));
162
DBusGProxy *dbus_proxy_Settings = cairo_dock_create_new_system_proxy (
164
"/org/freedesktop/NetworkManagerSettings",
165
"org.freedesktop.NetworkManagerSettings");
167
GError *erreur = NULL;
168
dbus_g_proxy_call (dbus_proxy_Settings, "AddConnection", &erreur,
169
CD_DBUS_TYPE_HASH_TABLE_OF_HASH_TABLE, pSettings,
174
cd_warning (erreur->message);
175
g_error_free (erreur);
179
/// on attend le signal NewConnection ...
183
/// on active la connexion...
428
474
pItemData->cDevice = g_strdup (cDevice);
429
475
pItemData->iPercent = iPercent;
430
476
pItemData->cAccessPoint = g_strdup (cAccessPointPath);
477
pItemData->cSsid = g_strdup (cSsid);
433
480
int n = GPOINTER_TO_INT (pConnList->data);