[Frugalware-darcs] fw-control-center: gnetconfig: pre_up/down and post_up/down can be now be removed.

Priyank priyank at frugalware.org
Wed Jun 20 22:23:17 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=fw-control-center;a=darcs_commitdiff;h=20070620202212-5ce2c-bf0bad42a976cc4fa8b2a4cbd4c4fe9280304a90.gz;

[gnetconfig: pre_up/down and post_up/down can be now be removed.
Priyank <priyank at frugalware.org>**20070620202212] {
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 207
-	GList				*iflist = NULL;
-	gchar				*name = NULL;
+	GList			*iflist = NULL;
+	gchar			*name = NULL;
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 227
-	char				*command;
-	gint				res;
+	char			*command;
+	gint			res;
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 230
-	ift	= gnetconfig_get_active_interface ();
+	ift = gnetconfig_get_active_interface ();
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 235
-		{	
+		{
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 251
+	GtkTreeModel		*model = NULL;
+	GtkTreeIter		iter;
+	GtkTreeSelection	*selection = NULL;
+	GList			*list = NULL;
+	char			*command = NULL;
+	fwnet_interface_t	*inf = NULL;
+
+	model = gtk_tree_view_get_model (GTK_TREE_VIEW(gn_preup_treeview));
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(gn_preup_treeview));
+	if (FALSE == gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+
+	gtk_tree_model_get (model, &iter, 1, &command, -1);
+	inf = gnetconfig_get_active_interface();
+	for (list = inf->pre_ups; list != NULL; list = list->next)
+	{
+		if (list->data && !strcmp((char*)list->data, command))
+		{
+			inf->pre_ups = g_list_delete_link (inf->pre_ups, list);
+			break;
+		}
+	}
+	
+	gnetconfig_save_profile (active_profile);
+	gnetconfig_populate_opts (gnetconfig_get_active_interface()->name);
+	
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 284
-	char				*command;
-	gint				res;
+	char			*command;
+	gint			res;
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 308
+	GtkTreeModel		*model = NULL;
+	GtkTreeIter		iter;
+	GtkTreeSelection	*selection = NULL;
+	GList			*list = NULL;
+	char			*command = NULL;
+	fwnet_interface_t	*inf = NULL;
+
+	model = gtk_tree_view_get_model (GTK_TREE_VIEW(gn_preup_treeview));
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(gn_preup_treeview));
+	if (FALSE == gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+
+	gtk_tree_model_get (model, &iter, 1, &command, -1);
+	inf = gnetconfig_get_active_interface();
+	for (list = inf->pre_downs; list != NULL; list = list->next)
+	{
+		if (list->data && !strcmp((char*)list->data, command))
+		{
+			inf->pre_downs = g_list_delete_link (inf->pre_downs, list);
+			break;
+		}
+	}
+	
+	gnetconfig_save_profile (active_profile);
+	gnetconfig_populate_opts (gnetconfig_get_active_interface()->name);
+	
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 341
-	char				*command;
-	gint				res;
+	char			*command;
+	gint			res;
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 365
+	GtkTreeModel		*model = NULL;
+	GtkTreeIter		iter;
+	GtkTreeSelection	*selection = NULL;
+	GList			*list = NULL;
+	char			*command = NULL;
+	fwnet_interface_t	*inf = NULL;
+
+	model = gtk_tree_view_get_model (GTK_TREE_VIEW(gn_preup_treeview));
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(gn_preup_treeview));
+	if (FALSE == gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+
+	gtk_tree_model_get (model, &iter, 1, &command, -1);
+	inf = gnetconfig_get_active_interface();
+	for (list = inf->post_ups; list != NULL; list = list->next)
+	{
+		if (list->data && !strcmp((char*)list->data, command))
+		{
+			inf->post_ups = g_list_delete_link (inf->post_ups, list);
+			break;
+		}
+	}
+	
+	gnetconfig_save_profile (active_profile);
+	gnetconfig_populate_opts (gnetconfig_get_active_interface()->name);
+	
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 398
-	char				*command;
-	gint				res;
+	char			*command;
+	gint			res;
hunk ./gnetconfig/src/gnetconfig-interface_opts.c 422
+	GtkTreeModel		*model = NULL;
+	GtkTreeIter		iter;
+	GtkTreeSelection	*selection = NULL;
+	GList			*list = NULL;
+	char			*command = NULL;
+	fwnet_interface_t	*inf = NULL;
+
+	model = gtk_tree_view_get_model (GTK_TREE_VIEW(gn_preup_treeview));
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(gn_preup_treeview));
+	if (FALSE == gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+
+	gtk_tree_model_get (model, &iter, 1, &command, -1);
+	inf = gnetconfig_get_active_interface();
+	for (list = inf->post_downs; list != NULL; list = list->next)
+	{
+		if (list->data && !strcmp((char*)list->data, command))
+		{
+			inf->post_downs = g_list_delete_link (inf->post_downs, list);
+			break;
+		}
+	}
+	
+	gnetconfig_save_profile (active_profile);
+	gnetconfig_populate_opts (gnetconfig_get_active_interface()->name);
+	
}


More information about the Frugalware-darcs mailing list